BttnOne (#1385)
* Added connection artifacts * Update apiProperties.json * Updated the properties and name * Updated readme to new requirements and fixed apidef errors * Update Readme.md
This commit is contained in:
Родитель
556d7e38b0
Коммит
f815706092
|
@ -0,0 +1,39 @@
|
|||
# Bttn ONE Connector
|
||||
The magical bttn that automates your business, improves your customer experience, and so much more…
|
||||
This connector is for the bttn ONE. The next generation of Internet of Things buttons.
|
||||
|
||||
## Publisher: Bttn
|
||||
|
||||
## Prerequisites
|
||||
You will need the following to proceed:
|
||||
* A bttn ONE device.
|
||||
* A Bttn account.
|
||||
* A Power Automate action created on the customer portal.
|
||||
|
||||
### How to get a Bttn
|
||||
Visit bt.tn for more information and how to order one of our unique IoT buttons!
|
||||
|
||||
## Authentication
|
||||
Connect this connector to your Bttn account using Oauth. You are automatically forwarded to the Bttn login page.
|
||||
|
||||
## Supported Operations
|
||||
The connector supports the following operations:
|
||||
* `getActionConfigurations`: Get action configurations
|
||||
* `bttnWebhook`: Create webhook
|
||||
|
||||
### Get action configurations
|
||||
Lists all your Power Automate actions configured on the Bttn portal.
|
||||
|
||||
### Create Webhook
|
||||
Sets a webhook for your Power Automate flow on a configured Power Automate Action. This webhook wil be executed when the bttn ONE is pressed.
|
||||
|
||||
## Obtaining Credentials
|
||||
Credentials can be obtained when you register to the Bttn platform and get your hands on our Bttn ONE device.
|
||||
|
||||
## Known Issues and Limitations
|
||||
You are only able to configure one Action to one webhook. If you require multiple triggers you will need to create multiple actions on our portal.
|
||||
Please name them correctly so you can identify your actions
|
||||
|
||||
## Deployment Instructions
|
||||
paconn create --api-def apiDefinition.swagger.json --api-prop apiProperties.json --icon icon.png
|
||||
(https://docs.microsoft.com/en-us/connectors/custom-connectors/paconn-cli)
|
|
@ -0,0 +1,323 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Bttn ONE",
|
||||
"description": "The magical bttn that automates your business, improves your customer experience, and so much more\u2026",
|
||||
"version": "1.0",
|
||||
"contact": {
|
||||
"name": "Bttn support",
|
||||
"url": "https://bttn.freshdesk.com/support/solutions",
|
||||
"email": "support@bt.tn"
|
||||
}
|
||||
},
|
||||
"host": "powerautomate.bt.tn",
|
||||
"basePath": "/",
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"consumes": [],
|
||||
"produces": [],
|
||||
"paths": {
|
||||
"/api/company/1": {
|
||||
"get": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "default",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"companyId": {
|
||||
"type": "string",
|
||||
"description": "The unique id of the company"
|
||||
},
|
||||
"companyName": {
|
||||
"type": "string",
|
||||
"description": "The name of the company"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "getCompanies",
|
||||
"description": "Retrieves the companies from BTTN",
|
||||
"operationId": "GetCompanies",
|
||||
"parameters": [],
|
||||
"x-ms-visibility": "internal"
|
||||
}
|
||||
},
|
||||
"/api/action/1/powerAutomate/addSubscription": {
|
||||
"x-ms-notification-content": {
|
||||
"description": "Bttn Webhook Response",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"event_id": {
|
||||
"type": "string",
|
||||
"description": "The id of the event"
|
||||
},
|
||||
"action_configuration_id": {
|
||||
"type": "string",
|
||||
"description": "The id of the configuration"
|
||||
},
|
||||
"action_type": {
|
||||
"type": "string",
|
||||
"description": "The type of action"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "string",
|
||||
"description": "the id of the company"
|
||||
},
|
||||
"configuration": {
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"description": "the action configuration"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"description": "creation timestamp"
|
||||
},
|
||||
"device_id": {
|
||||
"type": "string",
|
||||
"description": "The id of the device"
|
||||
},
|
||||
"event_status": {
|
||||
"type": "string",
|
||||
"description": "The event status"
|
||||
},
|
||||
"trigger_type": {
|
||||
"type": "string",
|
||||
"description": "The type of trigger"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"description": "last updated timestamp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/action/1/powerAutomate/addWebhook": {
|
||||
"x-ms-notification-content": {
|
||||
"description": "Bttn Webhook Response",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"actionName": {
|
||||
"type": "string",
|
||||
"description": "The name of the action"
|
||||
},
|
||||
"deviceId": {
|
||||
"type": "string",
|
||||
"description": "the id of the device"
|
||||
},
|
||||
"triggerType": {
|
||||
"type": "string",
|
||||
"description": "The trigger type"
|
||||
},
|
||||
"eventId": {
|
||||
"type": "string",
|
||||
"description": "The id of th event"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful response",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"actionConfigurationId": {
|
||||
"type": "string",
|
||||
"description": "the id of the configuration"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The action name"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-trigger": "single",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"summary": "bttnWebhook",
|
||||
"description": "Creates the webhook that will be used to trigger the Flow",
|
||||
"operationId": "BttnWebhook",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"actionConfigId": {
|
||||
"type": "string",
|
||||
"description": "The id of the action configuration",
|
||||
"title": "",
|
||||
"x-ms-dynamic-values": {
|
||||
"operationId": "GetActionConfigurations",
|
||||
"value-path": "actionConfigurationId",
|
||||
"value-title": "name"
|
||||
}
|
||||
},
|
||||
"hookUrl": {
|
||||
"type": "string",
|
||||
"description": "The url of the hook",
|
||||
"x-ms-notification-url": true,
|
||||
"x-ms-visibility": "internal",
|
||||
"title": ""
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"actionConfigId",
|
||||
"hookUrl"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/action/1/powerAutomate/getActionsForUser": {
|
||||
"get": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ActionResponse",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"actionConfigurationId": {
|
||||
"type": "string",
|
||||
"description": "The id of the configuration"
|
||||
},
|
||||
"companyId": {
|
||||
"type": "string",
|
||||
"description": "The id of the company"
|
||||
},
|
||||
"actionType": {
|
||||
"type": "string",
|
||||
"description": "The type of the action"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "name of the action"
|
||||
},
|
||||
"configuration": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The url"
|
||||
}
|
||||
},
|
||||
"description": "configuration"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"description": "createdAt timestamp"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"description": "updatedAt timestamp"
|
||||
},
|
||||
"pressLimit": {
|
||||
"type": "string",
|
||||
"description": "The amount the action can be triggered"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "getActionConfigurations",
|
||||
"description": "Retrieves the available action configurations",
|
||||
"operationId": "GetActionConfigurations",
|
||||
"parameters": [],
|
||||
"x-ms-visibility": "internal"
|
||||
}
|
||||
},
|
||||
"/api/action/1/powerAutomate/removeWebhook/{actionConfigurationId}": {
|
||||
"delete": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "default",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"actionConfigurationId": {
|
||||
"type": "string",
|
||||
"description": "the id of the configuration"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The action name"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"operationId": "DeleteWebhook",
|
||||
"summary": "deleteWebhook",
|
||||
"description": "Deletes the webhook",
|
||||
"x-ms-visibility": "internal",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "actionConfigurationId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-ms-url-encoding": "single"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-connector-metadata": [
|
||||
{
|
||||
"propertyName": "Website",
|
||||
"propertyValue": "https://bt.tn"
|
||||
},
|
||||
{
|
||||
"propertyName": "Privacy policy",
|
||||
"propertyValue": "https://bt.tn/legal#privacy"
|
||||
},
|
||||
{
|
||||
"propertyName": "Categories",
|
||||
"propertyValue": "Internet of Things;Productivity"
|
||||
}
|
||||
],
|
||||
"definitions": {},
|
||||
"parameters": {},
|
||||
"responses": {},
|
||||
"securityDefinitions": {
|
||||
"oauth2_auth": {
|
||||
"type": "oauth2",
|
||||
"flow": "accessCode",
|
||||
"authorizationUrl": "https://sso.bt.tn/auth/realms/bttn/protocol/openid-connect/auth",
|
||||
"tokenUrl": "https://sso.bt.tn/auth/realms/bttn/protocol/openid-connect/token",
|
||||
"scopes": {
|
||||
"powerautomate": "powerautomate"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"oauth2_auth": [
|
||||
"powerautomate"
|
||||
]
|
||||
}
|
||||
],
|
||||
"tags": []
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"properties": {
|
||||
"connectionParameters": {
|
||||
"token": {
|
||||
"type": "oauthSetting",
|
||||
"oAuthSettings": {
|
||||
"identityProvider": "oauth2",
|
||||
"clientId": "[[TEST]]",
|
||||
"scopes": [
|
||||
"powerautomate"
|
||||
],
|
||||
"redirectMode": "Global",
|
||||
"redirectUrl": "https://global.consent.azure-apim.net/redirect",
|
||||
"properties": {
|
||||
"IsFirstParty": "False",
|
||||
"IsOnbehalfofLoginSupported": false
|
||||
},
|
||||
"customParameters": {
|
||||
"authorizationUrl": {
|
||||
"value": "https://sso.bt.tn/auth/realms/bttn/protocol/openid-connect/auth"
|
||||
},
|
||||
"tokenUrl": {
|
||||
"value": "https://sso.bt.tn/auth/realms/bttn/protocol/openid-connect/token"
|
||||
},
|
||||
"refreshUrl": {
|
||||
"value": "https://sso.bt.tn/auth/realms/bttn/protocol/openid-connect/token"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"iconBrandColor": "#c51a1b",
|
||||
"capabilities": [],
|
||||
"publisher": "Bttn",
|
||||
"stackOwner": "Bttn"
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче