Created
March 23, 2023 22:59
-
-
Save danielgross/0e7a00ea882797acd92ae6779126abe3 to your computer and use it in GitHub Desktop.
Revisions
-
danielgross created this gist
Mar 23, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ { "schema_version": "v1", "name_for_model": "twilio", "name_for_human": "Twilio Plugin", "description_for_model": "Plugin for integrating the Twilio API to send SMS messages and make phone calls. Use it whenever a user wants to send a text message or make a call using their Twilio account.", "description_for_human": "Send text messages and make phone calls with Twilio.", "auth": { "type": "user_http", "authorization_type": "basic" }, "api": { "type": "openapi", "url": "https://your-app-url.com/.well-known/twilio.yaml", "has_user_authentication": true }, "logo_url": "https://your-app-url.com/.well-known/logo.png", "contact_email": "[email protected]", "legal_info_url": "[email protected]" } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,158 @@ openapi: 3.0.2 info: title: Twilio API description: A Twilio API for sending SMS and making calls. version: 1.0.0 servers: - url: https://api.twilio.com/2010-04-01 paths: /Accounts/{accountSid}/Messages: post: summary: Send SMS description: Send an SMS message to a specified phone number. operationId: send_sms parameters: - in: path name: accountSid schema: type: string required: true description: The account SID to send the message from. requestBody: content: application/x-www-form-urlencoded: schema: $ref: "#/components/schemas/SendSMSRequest" required: true responses: "201": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/SendSMSResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" security: - HTTPBasic: [] /Accounts/{accountSid}/Calls: post: summary: Make call description: Make a call to a specified phone number. operationId: make_call parameters: - in: path name: accountSid schema: type: string required: true description: The account SID to make the call from. requestBody: content: application/x-www-form-urlencoded: schema: $ref: "#/components/schemas/MakeCallRequest" required: true responses: "201": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/MakeCallResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" security: - HTTPBasic: [] components: schemas: SendSMSRequest: title: SendSMSRequest type: object properties: To: title: To type: string description: The phone number to send the SMS to. From: title: From type: string description: The phone number to send the SMS from. Body: title: Body type: string description: The body of the SMS message. SendSMSResponse: title: SendSMSResponse type: object properties: sid: title: Sid type: string description: The SID of the sent SMS message. MakeCallRequest: title: MakeCallRequest type: object properties: To: title: To type: string description: The phone number to call. From: title: From type: string description: The phone number to make the call from. Url: title: Url type: string description: The URL to fetch TwiML instructions from when the call connects. MakeCallResponse: title: MakeCallResponse type: object properties: sid: title: Sid type: string description: The SID of the created call. HTTPValidationError: title: HTTPValidationError type: object properties: detail: title: Detail type: array items: $ref: "#/components/schemas/ValidationError" ValidationError: title: ValidationError required: - loc - msg - type type: object properties: loc: title: Location type: array items: anyOf: - type: string - type: integer msg: title: Message type: string type: title: Error Type type: string securitySchemes: HTTPBasic: type: http scheme: basic