Adding Taqnyat SMS connector (certified-connectors) (#2077)
* First * Fixing Validation Errors * Remove SendSMS schema Def Co-authored-by: M7md.cc <m7md.cc@gmail.com>
This commit is contained in:
Родитель
4a1d9d041f
Коммит
0994612ceb
|
@ -0,0 +1,37 @@
|
|||
# Taqnyat.sa
|
||||
Taqnyat offers reliable SMS, Whatsapp and Voice messages for business automation communication.
|
||||
|
||||
## Publisher: Taqnyat
|
||||
|
||||
## Prerequisites
|
||||
You will need the following to proceed:
|
||||
* A Taqnyat account With Predifend Token.
|
||||
* Make sure you have enough balance in your Taqnyat account.
|
||||
* Make sure you have verified sender name in your Taqnyat account.
|
||||
|
||||
## Supported Operations
|
||||
|
||||
### Messages
|
||||
|
||||
#### Send SMS
|
||||
Send an SMS to your contacts through your Taqnyat account. [More info](https://www.taqnyat.sa/documentation/sms/#message-send-resource).
|
||||
|
||||
### Sender Names
|
||||
|
||||
#### Get Sendernames
|
||||
Get your verified sender names from Taqnyat. [More info](https://www.taqnyat.sa/documentation/sms/#message-senders-resource).
|
||||
|
||||
### Balance
|
||||
|
||||
#### Get Balance
|
||||
Get your Account Balance by Your Money Currency & by points . [More info](https://www.taqnyat.sa/documentation/sms/#account-balance-resource)
|
||||
|
||||
|
||||
## Obtaining Credentials
|
||||
The API key "Token" can be obtained by entering the portal of your Taqnyat account. [More info](https://www.taqnyat.sa/documentation/sms/#setup-bearer-token).
|
||||
|
||||
|
||||
## Deployment Instructions
|
||||
* Register on [Taqnyat](https://taqnyat.sa/)
|
||||
* Add balance to your account
|
||||
* Add an Application token to your account [More info](https://www.taqnyat.sa/documentation/sms/#setup-bearer-token).
|
|
@ -0,0 +1,363 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Taqnyat",
|
||||
"description": "Taqnyat integration for short messages \"SMS\"",
|
||||
"version": "1.0",
|
||||
"contact": {
|
||||
"name": "Taqnyat Support",
|
||||
"url": "https://www.taqnyat.sa/",
|
||||
"email": "support@taqnyat.sa"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT for OAS 2.0",
|
||||
"url": "https://opensource.org/licenses/MIT"
|
||||
}
|
||||
},
|
||||
"host": "api.taqnyat.sa",
|
||||
"basePath": "/",
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"x-ms-connector-metadata": [
|
||||
{
|
||||
"propertyName": "Website",
|
||||
"propertyValue": "https://www.taqnyat.sa/"
|
||||
},
|
||||
{
|
||||
"propertyName": "Privacy policy",
|
||||
"propertyValue": "https://www.taqnyat.sa/en/privacy/"
|
||||
},
|
||||
{
|
||||
"propertyName": "Categories",
|
||||
"propertyValue": "Communication;Website"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/v1/messages": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "default",
|
||||
"x-ms-summary": "Success response",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"statusCode": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "Status Code",
|
||||
"description": "Status Code of your request",
|
||||
"x-ms-summary": "Status Code"
|
||||
},
|
||||
"messageId": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "Message ID",
|
||||
"x-ms-summary": "Message ID",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Message Id for your message was sent"
|
||||
},
|
||||
"cost": {
|
||||
"type": "string",
|
||||
"title": "Cost",
|
||||
"x-ms-summary": "Cost",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Cost of your message was sent"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string",
|
||||
"title": "Currency",
|
||||
"x-ms-summary": "Currency",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Currency of your message was sent"
|
||||
},
|
||||
"totalCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "Total Count",
|
||||
"x-ms-summary": "Total Count",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Total Count of your messages was sent"
|
||||
},
|
||||
"msgLength": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "Message Length",
|
||||
"x-ms-summary": "Message Length",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Message Length of your message was sent"
|
||||
},
|
||||
"accepted": {
|
||||
"type": "string",
|
||||
"title": "Accepted",
|
||||
"x-ms-summary": "Accepted",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Accepted of mobile numbers for your message was sent"
|
||||
},
|
||||
"rejected": {
|
||||
"type": "string",
|
||||
"title": "Rejected",
|
||||
"x-ms-summary": "Rejected",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Rejected of mobile numbers for your message was sent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Response to failed send sms.",
|
||||
"x-ms-summary": "Failed response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/FailureResponseBody"
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "Send SMS",
|
||||
"description": "Send SMS To Recipients Mobile",
|
||||
"operationId": "SendSMS",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Request body",
|
||||
"in": "body",
|
||||
"description": "Request body.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SendSMSRequestBody"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/messages/senders": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "default",
|
||||
"x-ms-summary": "Success response",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"statusCode": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "Status Code",
|
||||
"description": "Status Code of your request",
|
||||
"x-ms-summary": "Status Code",
|
||||
"x-ms-visibility": "advanced"
|
||||
},
|
||||
"senders": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"senderName": {
|
||||
"type": "string",
|
||||
"title": "Sender Name",
|
||||
"x-ms-summary": "Sender Name",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Sender Name that will be used as a sender of the outbound text message."
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"title": "Status",
|
||||
"x-ms-summary": "Status",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Your Sender Name status"
|
||||
},
|
||||
"destination": {
|
||||
"type": "string",
|
||||
"title": "Destination",
|
||||
"x-ms-summary": "Destination",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Your Sender Name destination"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Response to failed get senders.",
|
||||
"x-ms-summary": "Failure response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/FailureResponseBody"
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "Sender Names",
|
||||
"description": "Get Your Verified Sender Names",
|
||||
"operationId": "GetSenders",
|
||||
"parameters": []
|
||||
}
|
||||
},
|
||||
"/account/balance": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "default",
|
||||
"x-ms-summary": "Success response",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"statusCode": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "Status Code",
|
||||
"description": "Status Code of your request",
|
||||
"x-ms-summary": "Status Code",
|
||||
"x-ms-visibility": "advanced"
|
||||
},
|
||||
"accountStatus": {
|
||||
"type": "string",
|
||||
"title": "Account Status",
|
||||
"x-ms-summary": "Account Status",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Your Account Status"
|
||||
},
|
||||
"accountExpiryDate": {
|
||||
"type": "string",
|
||||
"title": "Account Expiry Date",
|
||||
"x-ms-summary": "Account Expiry Date",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Your Account Expiry Date"
|
||||
},
|
||||
"balance": {
|
||||
"type": "string",
|
||||
"title": "Balance",
|
||||
"x-ms-summary": "Balance",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Your Account Balance in Your Currency"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string",
|
||||
"title": "Currency",
|
||||
"x-ms-summary": "Currency",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Your Account Currency"
|
||||
},
|
||||
"points": {
|
||||
"type": "string",
|
||||
"title": "Points",
|
||||
"x-ms-summary": "Points",
|
||||
"x-ms-visibility": "important",
|
||||
"description": "Your Account Points"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Response to failed get account balance.",
|
||||
"x-ms-summary": "Failed response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/FailureResponseBody"
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "Account Balance",
|
||||
"description": "Get Your Account Balance",
|
||||
"operationId": "GetAccountBalance",
|
||||
"parameters": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"SendSMSRequestBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"recipients": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Recipient phone number",
|
||||
"title": "Recipient phone number"
|
||||
},
|
||||
"description": "recipients",
|
||||
"x-ms-visibility": "important",
|
||||
"x-ms-summary": "Recipient's phone number",
|
||||
"title": "Recipient's phone number"
|
||||
},
|
||||
"body": {
|
||||
"type": "string",
|
||||
"description": "Your Message Body Text",
|
||||
"title": "Message Text",
|
||||
"x-ms-visibility": "important",
|
||||
"x-ms-summary": "Message Text"
|
||||
},
|
||||
"sender": {
|
||||
"type": "string",
|
||||
"description": "Sender Name that will be used as a sender of the outbound text message.",
|
||||
"title": "Message Sender Name",
|
||||
"x-ms-visibility": "important",
|
||||
"x-ms-summary": "Message Sender Name",
|
||||
"x-ms-dynamic-values": {
|
||||
"operationId": "GetSenders",
|
||||
"value-path": "senderName",
|
||||
"value-collection": "senders",
|
||||
"value-title": "senderName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"body",
|
||||
"recipients",
|
||||
"sender"
|
||||
]
|
||||
},
|
||||
"FailureResponseBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"statusCode": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Status Code of your request",
|
||||
"title": "Status Code",
|
||||
"x-ms-summary": "Status Code",
|
||||
"x-ms-visibility": "advanced"
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "Error Message of your request",
|
||||
"title": "Error Message",
|
||||
"x-ms-summary": "Error Message",
|
||||
"x-ms-visibility": "important"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {},
|
||||
"responses": {},
|
||||
"securityDefinitions": {
|
||||
"BearerAuth": {
|
||||
"type": "apiKey",
|
||||
"in": "header",
|
||||
"name": "Authorization",
|
||||
"description": "Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": []
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"properties": {
|
||||
"connectionParameters": {
|
||||
"api_key": {
|
||||
"type": "securestring",
|
||||
"uiDefinition": {
|
||||
"displayName": "Taqnyat Token",
|
||||
"description": "The Taqnyat Token for this api",
|
||||
"tooltip": "Provide your Taqnyat Token",
|
||||
"constraints": {
|
||||
"tabIndex": 2,
|
||||
"clearText": false,
|
||||
"required": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"iconBrandColor": "#f2766d",
|
||||
"capabilities": [],
|
||||
"publisher": "Taqnyat Network Operation",
|
||||
"stackOwner": "Taqnyat.sa"
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче