1
0
mirror of synced 2025-12-25 02:09:19 -05:00

Source Tyntec SMS: Make Connector Compatible with Builder (#38838)

This commit is contained in:
btkcodedev
2024-06-06 07:13:08 +05:30
committed by GitHub
parent bb261ec080
commit a1b5506aea
11 changed files with 532 additions and 398 deletions

View File

@@ -2,7 +2,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 3c0c3cd1-b3e0-464a-9090-d3ceb5f92346
dockerImageTag: 0.1.2
dockerImageTag: 0.1.3
dockerRepository: airbyte/source-tyntec-sms
githubIssueLabel: source-tyntec-sms
icon: tyntec.svg

View File

@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
version = "0.1.2"
version = "0.1.3"
name = "source-tyntec-sms"
description = "Source implementation for Tyntec Sms."
authors = [ "Airbyte <contact@airbyte.io>",]

View File

@@ -1,81 +1,533 @@
version: "0.29.0"
version: 0.79.1
definitions:
selector:
extractor:
field_path: []
requester:
# API Docs: https://api.tyntec.com/reference/sms/current.html#sms-api
url_base: "https://api.tyntec.com"
http_method: "GET"
authenticator:
type: ApiKeyAuthenticator
header: "apikey"
api_token: "{{ config['api_key'] }}"
retriever:
record_selector:
$ref: "#/definitions/selector"
paginator:
type: NoPagination
requester:
$ref: "#/definitions/requester"
base_stream:
retriever:
$ref: "#/definitions/retriever"
# API Docs: https://api.tyntec.com/reference/sms/current.html#sms-api-Send%20SMS%20(GET)
sms_stream:
$ref: "#/definitions/base_stream"
$parameters:
name: "sms"
primary_key: "requestId"
path: "/messaging/v1/sms?to={{ config['to'] }}&from={{ config['from']}}&message={{ config['message'] or ''}}"
sms_partition_router:
type: SubstreamPartitionRouter
parent_stream_configs:
- stream: "#/definitions/sms_stream"
parent_key: "requestId"
partition_field: "requestId"
# API Docs: https://api.tyntec.com/reference/sms/current.html#sms-api-Read%20SMS%20status
messages_stream:
$ref: "#/definitions/base_stream"
$parameters:
name: "messages"
primary_key: "requestId"
retriever:
$ref: "#/definitions/retriever"
record_selector:
$ref: "#/definitions/selector"
requester:
$ref: "#/definitions/requester"
path: "/messaging/v1/messages/{{ stream_slice.requestId }}"
partition_router:
$ref: "#/definitions/sms_partition_router"
# API Docs: https://api.tyntec.com/reference/sms/current.html#sms-api-List%20all%20contacts
contacts_stream:
$ref: "#/definitions/base_stream"
$parameters:
name: "contacts"
path: "/byon/contacts/v1"
# API Docs: https://api.tyntec.com/reference/sms/current.html#sms-api-List%20all%20phone%20numbers
phones_stream:
$ref: "#/definitions/base_stream"
$parameters:
name: "phones"
path: "/byon/phonebook/v1/numbers"
# API Docs: https://api.tyntec.com/reference/sms/current.html#sms-api-List%20all%20phones
registrations_stream:
$ref: "#/definitions/base_stream"
$parameters:
name: "registrations"
path: "/byon/provisioning/v1"
streams:
- "#/definitions/sms_stream"
- "#/definitions/messages_stream"
- "#/definitions/contacts_stream"
- "#/definitions/phones_stream"
- "#/definitions/registrations_stream"
type: DeclarativeSource
check:
type: CheckStream
stream_names:
- "phones"
- phones
definitions:
streams:
sms:
type: DeclarativeStream
name: sms
primary_key:
- requestId
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: >-
/messaging/v1/sms?to={{ config['to'] }}&from={{
config['from']}}&message={{ config['message'] or ''}}
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path: []
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/sms"
messages:
type: DeclarativeStream
name: messages
primary_key:
- requestId
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: /messaging/v1/messages/{{ stream_slice.requestId }}
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path: []
partition_router:
- type: SubstreamPartitionRouter
parent_stream_configs:
- type: ParentStreamConfig
parent_key: requestId
partition_field: requestId
stream:
$ref: "#/definitions/streams/sms"
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/messages"
contacts:
type: DeclarativeStream
name: contacts
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: /byon/contacts/v1
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path: []
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/contacts"
phones:
type: DeclarativeStream
name: phones
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: /byon/phonebook/v1/numbers
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path: []
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/phones"
registrations:
type: DeclarativeStream
name: registrations
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: /byon/provisioning/v1
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path: []
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/registrations"
base_requester:
type: HttpRequester
url_base: https://api.tyntec.com
authenticator:
type: ApiKeyAuthenticator
api_token: "{{ config['api_key'] }}"
inject_into:
type: RequestOption
field_name: apikey
inject_into: header
streams:
- $ref: "#/definitions/streams/sms"
- $ref: "#/definitions/streams/messages"
- $ref: "#/definitions/streams/contacts"
- $ref: "#/definitions/streams/phones"
- $ref: "#/definitions/streams/registrations"
spec:
type: Spec
connection_specification:
type: object
$schema: http://json-schema.org/draft-07/schema#
required:
- api_key
- to
- from
properties:
api_key:
type: string
title: Tyntec API Key
airbyte_secret: true
description: >-
Your Tyntec API Key. See <a
href="https://www.tyntec.com/docs/docs-center-sms-api-quick-start">here</a>
order: 0
to:
type: string
title: SMS Message Recipient Phone
description: The phone number of the SMS message recipient (international).
order: 1
from:
type: string
title: SMS Message Sender Phone
description: The phone number of the SMS message sender (international).
order: 2
message:
type: string
title: SMS Message Body
description: The content of the SMS message to be sent.
order: 3
additionalProperties: true
metadata:
autoImportSchema:
sms: false
messages: false
contacts: false
phones: false
registrations: false
schemas:
sms:
type: object
$schema: http://json-schema.org/draft-07/schema#
properties:
doneDate:
type:
- "null"
- string
errorCode:
type:
- "null"
- string
errorReason:
type:
- "null"
- string
from:
type:
- "null"
- string
href:
type:
- "null"
- string
mccmnc:
type:
- "null"
- string
overallPrice:
type:
- "null"
- string
parts:
type:
- "null"
- array
items:
type:
- "null"
- object
properties:
currency:
type:
- "null"
- string
deliveryState:
type:
- "null"
- string
doneDate:
type:
- "null"
- string
errorCode:
type:
- "null"
- string
partId:
type:
- "null"
- string
price:
type:
- "null"
- string
priceEffective:
type:
- "null"
- string
format: date-time
sendDate:
type:
- "null"
- string
statusText:
type:
- "null"
- string
priceEffective:
type:
- "null"
- string
format: date-time
reference:
type:
- "null"
- string
requestId:
type:
- "null"
- string
sentDate:
type:
- "null"
- string
size:
type:
- "null"
- integer
status:
type:
- "null"
- string
submitDate:
type:
- "null"
- string
format: date-time
to:
type:
- "null"
- string
ttid:
type:
- "null"
- string
additionalProperties: true
messages:
type: object
$schema: http://json-schema.org/draft-07/schema#
properties:
doneDate:
type:
- "null"
- string
errorCode:
type:
- "null"
- string
errorReason:
type:
- "null"
- string
from:
type:
- "null"
- string
href:
type:
- "null"
- string
mccmnc:
type:
- "null"
- string
overallPrice:
type:
- "null"
- string
parts:
type:
- "null"
- array
items:
type:
- "null"
- object
properties:
currency:
type:
- "null"
- string
deliveryState:
type:
- "null"
- string
doneDate:
type:
- "null"
- string
errorCode:
type:
- "null"
- string
partId:
type:
- "null"
- string
price:
type:
- "null"
- string
priceEffective:
type:
- "null"
- string
format: date-time
sendDate:
type:
- "null"
- string
statusText:
type:
- "null"
- string
priceEffective:
type:
- "null"
- string
format: date-time
reference:
type:
- "null"
- string
requestId:
type:
- "null"
- string
sentDate:
type:
- "null"
- string
size:
type:
- "null"
- integer
status:
type:
- "null"
- string
submitDate:
type:
- "null"
- string
format: date-time
to:
type:
- "null"
- string
ttid:
type:
- "null"
- string
additionalProperties: true
contacts:
type: object
$schema: http://json-schema.org/draft-07/schema#
properties:
contacts:
type:
- "null"
- array
items:
type:
- "null"
- object
properties:
companyAddress:
type:
- "null"
- string
companyName:
type:
- "null"
- string
contactEmail:
type:
- "null"
- string
contactName:
type:
- "null"
- string
contactPhone:
type:
- "null"
- string
contactTitle:
type:
- "null"
- string
friendlyName:
type:
- "null"
- string
size:
type:
- "null"
- integer
additionalProperties: true
phones:
type: object
$schema: http://json-schema.org/draft-07/schema#
properties:
provisioningRequests:
type:
- "null"
- array
items:
type:
- "null"
- object
properties:
accountId:
type:
- "null"
- string
contactId:
type:
- "null"
- string
friendlyName:
type:
- "null"
- string
requestId:
type:
- "null"
- string
status:
type:
- "null"
- string
size:
type:
- "null"
- integer
additionalProperties: true
registrations:
type: object
$schema: http://json-schema.org/draft-07/schema#
properties:
provisioningRequests:
type:
- "null"
- array
items:
type:
- "null"
- object
properties:
accountId:
type:
- "null"
- string
contactId:
type:
- "null"
- string
friendlyName:
type:
- "null"
- string
requestId:
type:
- "null"
- string
status:
type:
- "null"
- string
size:
type:
- "null"
- integer
additionalProperties: true

View File

@@ -1,38 +0,0 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"contacts": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"companyAddress": {
"type": ["null", "string"]
},
"companyName": {
"type": ["null", "string"]
},
"contactEmail": {
"type": ["null", "string"]
},
"contactName": {
"type": ["null", "string"]
},
"contactPhone": {
"type": ["null", "string"]
},
"contactTitle": {
"type": ["null", "string"]
},
"friendlyName": {
"type": ["null", "string"]
}
}
}
},
"size": {
"type": ["null", "integer"]
}
}
}

View File

@@ -1,92 +0,0 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"doneDate": {
"type": ["null", "string"]
},
"errorCode": {
"type": ["null", "string"]
},
"errorReason": {
"type": ["null", "string"]
},
"from": {
"type": ["null", "string"]
},
"href": {
"type": ["null", "string"]
},
"mccmnc": {
"type": ["null", "string"]
},
"parts": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"currency": {
"type": ["null", "string"]
},
"deliveryState": {
"type": ["null", "string"]
},
"doneDate": {
"type": ["null", "string"]
},
"errorCode": {
"type": ["null", "string"]
},
"partId": {
"type": ["null", "string"]
},
"price": {
"type": ["null", "string"]
},
"priceEffective": {
"type": ["null", "string"],
"format": "date-time"
},
"sendDate": {
"type": ["null", "string"]
},
"statusText": {
"type": ["null", "string"]
}
}
}
},
"overallPrice": {
"type": ["null", "string"]
},
"priceEffective": {
"type": ["null", "string"],
"format": "date-time"
},
"reference": {
"type": ["null", "string"]
},
"requestId": {
"type": ["null", "string"]
},
"sentDate": {
"type": ["null", "string"]
},
"size": {
"type": ["null", "integer"]
},
"status": {
"type": ["null", "string"]
},
"submitDate": {
"type": ["null", "string"],
"format": "date-time"
},
"to": {
"type": ["null", "string"]
},
"ttid": {
"type": ["null", "string"]
}
}
}

View File

@@ -1,32 +0,0 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"provisioningRequests": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"accountId": {
"type": ["null", "string"]
},
"contactId": {
"type": ["null", "string"]
},
"friendlyName": {
"type": ["null", "string"]
},
"requestId": {
"type": ["null", "string"]
},
"status": {
"type": ["null", "string"]
}
}
}
},
"size": {
"type": ["null", "integer"]
}
}
}

View File

@@ -1,32 +0,0 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"provisioningRequests": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"accountId": {
"type": ["null", "string"]
},
"contactId": {
"type": ["null", "string"]
},
"friendlyName": {
"type": ["null", "string"]
},
"requestId": {
"type": ["null", "string"]
},
"status": {
"type": ["null", "string"]
}
}
}
},
"size": {
"type": ["null", "integer"]
}
}
}

View File

@@ -1,92 +0,0 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"doneDate": {
"type": ["null", "string"]
},
"errorCode": {
"type": ["null", "string"]
},
"errorReason": {
"type": ["null", "string"]
},
"from": {
"type": ["null", "string"]
},
"href": {
"type": ["null", "string"]
},
"mccmnc": {
"type": ["null", "string"]
},
"parts": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"currency": {
"type": ["null", "string"]
},
"deliveryState": {
"type": ["null", "string"]
},
"doneDate": {
"type": ["null", "string"]
},
"errorCode": {
"type": ["null", "string"]
},
"partId": {
"type": ["null", "string"]
},
"price": {
"type": ["null", "string"]
},
"priceEffective": {
"type": ["null", "string"],
"format": "date-time"
},
"sendDate": {
"type": ["null", "string"]
},
"statusText": {
"type": ["null", "string"]
}
}
}
},
"overallPrice": {
"type": ["null", "string"]
},
"priceEffective": {
"type": ["null", "string"],
"format": "date-time"
},
"reference": {
"type": ["null", "string"]
},
"requestId": {
"type": ["null", "string"]
},
"sentDate": {
"type": ["null", "string"]
},
"size": {
"type": ["null", "integer"]
},
"status": {
"type": ["null", "string"]
},
"submitDate": {
"type": ["null", "string"],
"format": "date-time"
},
"to": {
"type": ["null", "string"]
},
"ttid": {
"type": ["null", "string"]
}
}
}

View File

@@ -1,32 +0,0 @@
documentationUrl: https://docs.airbyte.com/integrations/sources/tyntec-sms
connectionSpecification:
$schema: http://json-schema.org/draft-07/schema#
title: Tyntec Sms Spec
type: object
required:
- api_key
- to
- from
additionalProperties: true
properties:
api_key:
type: string
title: Tyntec API Key
description: Your Tyntec API Key. See <a href="https://www.tyntec.com/docs/docs-center-sms-api-quick-start">here</a>
order: 0
airbyte_secret: true
to:
type: string
title: SMS Message Recipient Phone
description: The phone number of the SMS message recipient (international).
order: 1
from:
type: string
title: SMS Message Sender Phone
description: The phone number of the SMS message sender (international).
order: 2
message:
type: string
title: SMS Message Body
description: The content of the SMS message to be sent.
order: 3

View File

@@ -65,6 +65,7 @@ The Tyntec SMS connector should not run into limitations under normal usage. Ple
| Version | Date | Pull Request | Subject |
| :------ | :--------- | :------------------------------------------------------- | :------------------------ |
| 0.1.3 | 2024-06-05 | [38838](https://github.com/airbytehq/airbyte/pull/38838) | Make compatible with builder |
| 0.1.2 | 2024-06-04 | [39043](https://github.com/airbytehq/airbyte/pull/39043) | [autopull] Upgrade base image to v1.2.1 |
| 0.1.1 | 2024-05-21 | [38500](https://github.com/airbytehq/airbyte/pull/38500) | [autopull] base image + poetry + up_to_date |
| 0.1.0 | 2022-11-02 | [18883](https://github.com/airbytehq/airbyte/pull/18883) | 🎉 New Source: Tyntec SMS |