From a05236ac3931a8bbfb7b26dda1c990aed6645688 Mon Sep 17 00:00:00 2001 From: diego-signalwire Date: Mon, 7 Apr 2025 11:27:11 -0300 Subject: [PATCH 1/4] Rename LAML bin to CXML Script --- api/signalwire-rest/fabric-api/_spec_.yaml | 82 +++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/api/signalwire-rest/fabric-api/_spec_.yaml b/api/signalwire-rest/fabric-api/_spec_.yaml index cb2e211f..3b65a85b 100644 --- a/api/signalwire-rest/fabric-api/_spec_.yaml +++ b/api/signalwire-rest/fabric-api/_spec_.yaml @@ -3901,7 +3901,7 @@ tags: - name: Fabric Address - name: FreeSWITCH Connectors - name: LAML Applications - - name: LAML Bins + - name: CXML Scripts - name: Relay Applications - name: Resources - name: SIP Endpoints @@ -7450,23 +7450,23 @@ paths: /resources/laml_bins/{id}/addresses: get: tags: - - LAML Bins - summary: List LAML Bin Addresses + - CXML Scripts + summary: List CXML Script Addresses description: | - Returns a list of LAML Bin addresses. - operationId: listLamlBinAddresses + Returns a list of CXML Script addresses. + operationId: listCxmlScriptAddresses parameters: - name: id in: path required: true - description: The ID of the LAML Bin + description: The ID of the CXML Script schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A list of LAML Bin addresses + description: A list of CXML Script addresses content: application/json: schema: @@ -7543,12 +7543,12 @@ paths: /resources/laml_bins: get: tags: - - LAML Bins - summary: List LAML Bins - operationId: listLamlBins + - CXML Scripts + summary: List CXML Scripts + operationId: listCxmlScripts responses: '200': - description: A list of LAML Bins + description: A list of CXML Scripts content: application/json: schema: @@ -7585,7 +7585,7 @@ paths: id: type: string format: uuid - description: A unique identifier for the LAML Bin + description: A unique identifier for the CXML Script - type: object properties: contents: @@ -7614,12 +7614,12 @@ paths: https://example.signalwire.com/laml-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e display_name: type: string - example: My Laml Bin + example: My CXML Script post: tags: - - LAML Bins - summary: Create LaML Bin - operationId: LamlBin_create + - CXML Scripts + summary: Create CXML Script + operationId: CxmlScript_create requestBody: required: true content: @@ -7638,7 +7638,7 @@ paths: encoding="UTF-8"?> responses: '200': - description: A LaML Bin + description: A CXML Script content: application/json: schema: @@ -7673,7 +7673,7 @@ paths: id: type: string format: uuid - description: A unique identifier for the LAML Bin + description: A unique identifier for the CXML Script - type: object properties: contents: @@ -7702,7 +7702,7 @@ paths: https://example.signalwire.com/laml-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e display_name: type: string - example: My Laml Bin + example: My CXML Script '422': description: Unprocessable Entity content: @@ -7735,23 +7735,23 @@ paths: /resources/laml_bins/{id}: get: tags: - - LAML Bins - summary: Get LAML Bin + - CXML Scripts + summary: Get CXML Script description: | - Returns a LAML Bin by ID. - operationId: getLamlBin + Returns a CXML Script by ID. + operationId: getCxmlScript parameters: - name: id in: path required: true - description: The ID of the LAML Bin + description: The ID of the CXML Script schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A LAML Bin + description: A CXML Script content: application/json: schema: @@ -7786,7 +7786,7 @@ paths: id: type: string format: uuid - description: A unique identifier for the LAML Bin + description: A unique identifier for the CXML Script - type: object properties: contents: @@ -7817,19 +7817,19 @@ paths: https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e display_name: type: string - example: My Laml Bin + example: My CXML Script put: tags: - - LAML Bins - summary: Update LAML Bin + - CXML Scripts + summary: Update CXML Script description: | - Updates a LAML Bin by ID. - operationId: updateLamlBin + Updates a CXML Script by ID. + operationId: updateCxmlScript parameters: - name: id in: path required: true - description: The ID of the LAML Bin + description: The ID of the CXML Script schema: type: string format: uuid @@ -7844,7 +7844,7 @@ paths: properties: name: type: string - example: My Laml Bin + example: My CXML Script - type: object properties: contents: @@ -7856,7 +7856,7 @@ paths: - play: say:Hello from SignalWire! responses: '200': - description: A LAML Bin + description: A CXML Script content: application/json: schema: @@ -7891,7 +7891,7 @@ paths: id: type: string format: uuid - description: A unique identifier for the LAML Bin + description: A unique identifier for the CXML Script - type: object properties: contents: @@ -7922,7 +7922,7 @@ paths: https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e display_name: type: string - example: My Laml Bin + example: My CXML Script '422': description: Unprocessable Entity content: @@ -7954,16 +7954,16 @@ paths: url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter delete: tags: - - LAML Bins - summary: Delete LAML Bin + - CXML Scripts + summary: Delete CXML Script description: | - Deletes a LAML Bin by ID. - operationId: deleteLamlBin + Deletes a CXML Script by ID. + operationId: deleteCxmlScript parameters: - name: id in: path required: true - description: The ID of the LAML Bin + description: The ID of the CXML Script schema: type: string format: uuid From 0d62badff02efab9e5951ce7134d091786a71739 Mon Sep 17 00:00:00 2001 From: diego-signalwire Date: Tue, 8 Apr 2025 15:13:39 -0300 Subject: [PATCH 2/4] rename external_laml_handler to cxml_webhook --- .../cxml-webhook-addresses/main.tsp | 23 + .../models/core.tsp | 6 +- .../models/enums.tsp | 0 .../models/responses.tsp | 8 +- .../fabric-api/cxml-webhooks/main.tsp | 58 + .../fabric-api/cxml-webhooks/models/core.tsp | 48 + .../models/enums.tsp | 0 .../models/errors.tsp | 4 +- .../cxml-webhooks/models/requests.tsp | 67 + .../models/responses.tsp | 18 +- .../@typespec/openapi3/openapi.yaml | 76 + .../external-laml-handler-addresses/main.tsp | 23 - .../fabric-api/external-laml-handler/main.tsp | 58 - .../external-laml-handler/models/core.tsp | 48 - .../external-laml-handler/models/requests.tsp | 67 - api/signalwire-rest/fabric-api/main.tsp | 4 +- .../@typespec/openapi3/openapi.yaml | 1868 ++++++++--------- 17 files changed, 1226 insertions(+), 1150 deletions(-) create mode 100644 api/signalwire-rest/fabric-api/cxml-webhook-addresses/main.tsp rename api/signalwire-rest/fabric-api/{external-laml-handler-addresses => cxml-webhook-addresses}/models/core.tsp (89%) rename api/signalwire-rest/fabric-api/{external-laml-handler-addresses => cxml-webhook-addresses}/models/enums.tsp (100%) rename api/signalwire-rest/fabric-api/{external-laml-handler-addresses => cxml-webhook-addresses}/models/responses.tsp (78%) create mode 100644 api/signalwire-rest/fabric-api/cxml-webhooks/main.tsp create mode 100644 api/signalwire-rest/fabric-api/cxml-webhooks/models/core.tsp rename api/signalwire-rest/fabric-api/{external-laml-handler => cxml-webhooks}/models/enums.tsp (100%) rename api/signalwire-rest/fabric-api/{external-laml-handler => cxml-webhooks}/models/errors.tsp (70%) create mode 100644 api/signalwire-rest/fabric-api/cxml-webhooks/models/requests.tsp rename api/signalwire-rest/fabric-api/{external-laml-handler => cxml-webhooks}/models/responses.tsp (74%) create mode 100644 api/signalwire-rest/fabric-api/cxml-webhooks/tsp-output/@typespec/openapi3/openapi.yaml delete mode 100644 api/signalwire-rest/fabric-api/external-laml-handler-addresses/main.tsp delete mode 100644 api/signalwire-rest/fabric-api/external-laml-handler/main.tsp delete mode 100644 api/signalwire-rest/fabric-api/external-laml-handler/models/core.tsp delete mode 100644 api/signalwire-rest/fabric-api/external-laml-handler/models/requests.tsp diff --git a/api/signalwire-rest/fabric-api/cxml-webhook-addresses/main.tsp b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/main.tsp new file mode 100644 index 00000000..658957a9 --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/main.tsp @@ -0,0 +1,23 @@ +import "@typespec/http"; +import "@typespec/openapi"; +import "./models/core.tsp"; +import "./models/responses.tsp"; +import "../../types"; + +using TypeSpec.Http; +using Types.StatusCodes; + +@route("/resources/external_laml_handlers/{external_laml_handler_id}/addresses") +namespace FabricAPI.CXMLWebhookAddresses { + @tag("cXML Webhook") + @friendlyName("cXML Webhooks") + interface CXMLWebhookAddresses { + @summary("List cXML Webhook Addresses") + @doc("A list of cXML Webhook Addresses") + list(...CXMLWebhookIDPath): + CXMLWebhookAddressListResponse | + StatusCode401 | + StatusCode404; + } +} + diff --git a/api/signalwire-rest/fabric-api/external-laml-handler-addresses/models/core.tsp b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/core.tsp similarity index 89% rename from api/signalwire-rest/fabric-api/external-laml-handler-addresses/models/core.tsp rename to api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/core.tsp index fd9c70e2..9d0b4a45 100644 --- a/api/signalwire-rest/fabric-api/external-laml-handler-addresses/models/core.tsp +++ b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/core.tsp @@ -5,13 +5,13 @@ import "../../../types"; using TypeSpec.Http; using TypeSpec.OpenAPI; -model ExternalLAMLHandlerIDPath { - @doc("Unique ID of a External LAML Handler.") +model CXMLWebhookIDPath { + @doc("Unique ID of a CXML Webhook.") @path external_laml_handler_id: uuid } -model ExternalLAMLHandlerAddress { +model CXMLWebhookAddress { @doc("Unique ID of the Fabric Address.") @example("691af061-cd86-4893-a605-173f47afc4c2") id: uuid; diff --git a/api/signalwire-rest/fabric-api/external-laml-handler-addresses/models/enums.tsp b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/enums.tsp similarity index 100% rename from api/signalwire-rest/fabric-api/external-laml-handler-addresses/models/enums.tsp rename to api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/enums.tsp diff --git a/api/signalwire-rest/fabric-api/external-laml-handler-addresses/models/responses.tsp b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/responses.tsp similarity index 78% rename from api/signalwire-rest/fabric-api/external-laml-handler-addresses/models/responses.tsp rename to api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/responses.tsp index 8f4fe3b7..bcddbcc3 100644 --- a/api/signalwire-rest/fabric-api/external-laml-handler-addresses/models/responses.tsp +++ b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/responses.tsp @@ -1,9 +1,9 @@ -model ExternalLAMLHandlerAddressListResponse { - data: ExternalLAMLHandlerAddress[]; - links: ExternalLAMLHandlerAddressPaginationResponse; +model CXMLWebhookAddressListResponse { + data: CXMLWebhookAddress[]; + links: CXMLWebhookAddressPaginationResponse; } -model ExternalLAMLHandlerAddressPaginationResponse { +model CXMLWebhookAddressPaginationResponse { @doc("Link of the current page") @example("https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50") self: url; diff --git a/api/signalwire-rest/fabric-api/cxml-webhooks/main.tsp b/api/signalwire-rest/fabric-api/cxml-webhooks/main.tsp new file mode 100644 index 00000000..3556546d --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-webhooks/main.tsp @@ -0,0 +1,58 @@ +import "@typespec/http"; +import "@typespec/openapi"; +import "./models/core.tsp"; +import "./models/requests.tsp"; +import "./models/responses.tsp"; +import "./models/errors.tsp"; +import "../../types"; + +using TypeSpec.Http; +using Types.StatusCodes; + +@route("/resources/external_laml_handlers") +namespace FabricAPI.CXMLWebhooks { + @tag("cXML Webhook") + @friendlyName("cXML Webhooks") + interface CXMLWebhooks { + @summary("List cXML Webhooks") + @doc("A list of cXML Webhooks") + list(): + CXMLWebhookListResponse | + StatusCode401 | + StatusCode404; + + @summary("Get cXML Webhook") + @doc("Returns an cXML Webhook by ID") + read(...CXMLWebhookID): { + @statusCode statusCode: 200; + @body external_laml_handler: CXMLWebhookResponse; + } | + StatusCode401 | + StatusCode404; + + @summary("Create cXML Webhook") + @doc("Creates an cXML Webhook") + @post create(...CXMLWebhookCreateRequest): + { @statusCode statusCode: 201; @body external_laml_handler: CXMLWebhookResponse; } | + StatusCode401 | + StatusCode404 | + CXMLWebhookCreateStatusCode422; + + @summary("Update cXML Webhook") + @doc("Updates an cXML Webhook by ID") + @patch update(...CXMLWebhookID, ...CXMLWebhookUpdateRequest): { + @statusCode statusCode: 200; @body external_laml_handler: CXMLWebhookResponse; + } | + StatusCode401 | + StatusCode404 | + CXMLWebhookUpdateStatusCode422; + + @summary("Delete cXML Webhook") + @doc("Deletes an cXML Webhook by ID") + @delete delete(...CXMLWebhookID): + { @statusCode statusCode: 204; } | + StatusCode401 | + StatusCode404; + } +} + diff --git a/api/signalwire-rest/fabric-api/cxml-webhooks/models/core.tsp b/api/signalwire-rest/fabric-api/cxml-webhooks/models/core.tsp new file mode 100644 index 00000000..60ee2699 --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-webhooks/models/core.tsp @@ -0,0 +1,48 @@ +import "./enums.tsp"; +import "../../../types"; + +using TypeSpec.Http; + +model CXMLWebhookID { + @doc("Unique ID of a CXML Webhook.") + @path + id: uuid +} + +model CXMLWebhook { + @doc("Unique ID of the CXML Webhook.") + @example("a87db7ed-8ebe-42e4-829f-8ba5a4152f54") + id: uuid; + + @doc("Name of the CXML Webhook.") + @example("My CXML Webhook") + name: string; + + @doc("Used for of the CXML Webhook.") + @example(UsedForType.Calling) + used_for: UsedForType; + + @doc("Primary request url of the CXML Webhook.") + @example("https://primary.com") + primary_request_url: string; + + @doc("Primary request method of the CXML Webhook.") + @example(UrlMethodType.Get) + primary_request_method: UrlMethodType; + + @doc("Fallback request url of the CXML Webhook.") + @example("https://fallback.com") + fallback_request_url: string; + + @doc("Fallback request method of the CXML Webhook.") + @example(UrlMethodType.Get) + fallback_request_method: UrlMethodType; + + @doc("Status callback url of the CXML Webhook.") + @example("https://callback.com") + status_callback_url: string; + + @doc("Status callback method of the CXML Webhook.") + @example(UrlMethodType.Post) + status_callback_method: UrlMethodType; +} diff --git a/api/signalwire-rest/fabric-api/external-laml-handler/models/enums.tsp b/api/signalwire-rest/fabric-api/cxml-webhooks/models/enums.tsp similarity index 100% rename from api/signalwire-rest/fabric-api/external-laml-handler/models/enums.tsp rename to api/signalwire-rest/fabric-api/cxml-webhooks/models/enums.tsp diff --git a/api/signalwire-rest/fabric-api/external-laml-handler/models/errors.tsp b/api/signalwire-rest/fabric-api/cxml-webhooks/models/errors.tsp similarity index 70% rename from api/signalwire-rest/fabric-api/external-laml-handler/models/errors.tsp rename to api/signalwire-rest/fabric-api/cxml-webhooks/models/errors.tsp index 0bc31862..797111b1 100644 --- a/api/signalwire-rest/fabric-api/external-laml-handler/models/errors.tsp +++ b/api/signalwire-rest/fabric-api/cxml-webhooks/models/errors.tsp @@ -11,6 +11,6 @@ using Types.StatusCodes; url: "https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#http_url_required" }], }) - model ExternalLamlHandlerCreateStatusCode422 is StatusCode422; + model CXMLWebhookCreateStatusCode422 is StatusCode422; - model ExternalLamlHandlerUpdateStatusCode422 is ExternalLamlHandlerCreateStatusCode422; + model CXMLWebhookUpdateStatusCode422 is CXMLWebhookCreateStatusCode422; diff --git a/api/signalwire-rest/fabric-api/cxml-webhooks/models/requests.tsp b/api/signalwire-rest/fabric-api/cxml-webhooks/models/requests.tsp new file mode 100644 index 00000000..4030752e --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-webhooks/models/requests.tsp @@ -0,0 +1,67 @@ +model CXMLWebhookCreateRequest { + @doc("Name of the CXML Webhook.") + @example("My CXML Webhook") + name?: string; + + @doc("Used for of the CXML Webhook.") + @example("calling") + used_for?: "calling" | "messaging" = "calling"; + + @doc("Primary request url of the CXML Webhook.") + @example("https://primary.com") + primary_request_url: string; + + @doc("Primary request method of the CXML Webhook.") + @example("GET") + primary_request_method?: "GET" | "POST" = "POST"; + + @doc("Fallback request url of the CXML Webhook.") + @example("https://fallback.com") + fallback_request_url?: string; + + @doc("Fallback request method of the CXML Webhook.") + @example("GET") + fallback_request_method?: "GET" | "POST" = "POST"; + + @doc("Status callback url of the CXML Webhook.") + @example("https://callback.com") + status_callback_url?: string; + + @doc("Status callback method of the CXML Webhook.") + @example("POST") + status_callback_method?: "GET" | "POST" = "POST"; +} + +model CXMLWebhookUpdateRequest { + @doc("Name of the CXML Webhook.") + @example("My CXML Webhook") + name?: string; + + @doc("Used for of the CXML Webhook.") + @example("calling") + used_for?: "calling" | "messaging" = "calling"; + + @doc("Primary request url of the CXML Webhook.") + @example("https://primary.com") + primary_request_url?: string; + + @doc("Primary request method of the CXML Webhook.") + @example("GET") + primary_request_method?: "GET" | "POST" = "POST"; + + @doc("Fallback request url of the CXML Webhook.") + @example("https://fallback.com") + fallback_request_url?: string; + + @doc("Fallback request method of the CXML Webhook.") + @example("GET") + fallback_request_method?: "GET" | "POST" = "POST"; + + @doc("Status callback url of the CXML Webhook.") + @example("https://callback.com") + status_callback_url?: string; + + @doc("Status callback method of the CXML Webhook.") + @example("POST") + status_callback_method?: "GET" | "POST" = "POST"; +} diff --git a/api/signalwire-rest/fabric-api/external-laml-handler/models/responses.tsp b/api/signalwire-rest/fabric-api/cxml-webhooks/models/responses.tsp similarity index 74% rename from api/signalwire-rest/fabric-api/external-laml-handler/models/responses.tsp rename to api/signalwire-rest/fabric-api/cxml-webhooks/models/responses.tsp index ae5ca4a2..4c8c6c19 100644 --- a/api/signalwire-rest/fabric-api/external-laml-handler/models/responses.tsp +++ b/api/signalwire-rest/fabric-api/cxml-webhooks/models/responses.tsp @@ -1,6 +1,6 @@ -model ExternalLAMLHandlerResponse { - @doc("Unique ID of the ExternalLAMLHandler.") +model CXMLWebhookResponse { + @doc("Unique ID of the CXMLWebhook.") @example("a87db7ed-8ebe-42e4-829f-8ba5a4152f54") id: uuid; @@ -8,7 +8,7 @@ model ExternalLAMLHandlerResponse { @example("99151cf8-9548-4860-ba70-a8de824f3312") project_id: uuid; - @doc("Display name of the ExternalLAMLHandler Fabric Resource") + @doc("Display name of the CXMLWebhook Fabric Resource") @example("Booking Assistant") display_name: string; @@ -24,16 +24,16 @@ model ExternalLAMLHandlerResponse { @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) updated_at: utcDateTime; - @doc("ExternalLAMLHandler data.") - external_laml_handler: ExternalLAMLHandler; + @doc("CXMLWebhook data.") + external_laml_handler: CXMLWebhook; } -model ExternalLAMLHandlerListResponse { - data: ExternalLAMLHandlerResponse[]; - links: ExternalLAMLHandlerPaginationResponse; +model CXMLWebhookListResponse { + data: CXMLWebhookResponse[]; + links: CXMLWebhookPaginationResponse; } -model ExternalLAMLHandlerPaginationResponse { +model CXMLWebhookPaginationResponse { @doc("Link of the current page") @example("https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=0&page_size=50") self: url; diff --git a/api/signalwire-rest/fabric-api/cxml-webhooks/tsp-output/@typespec/openapi3/openapi.yaml b/api/signalwire-rest/fabric-api/cxml-webhooks/tsp-output/@typespec/openapi3/openapi.yaml new file mode 100644 index 00000000..a39a801c --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-webhooks/tsp-output/@typespec/openapi3/openapi.yaml @@ -0,0 +1,76 @@ +openapi: 3.0.0 +info: + title: (title) + version: 0.0.0 +tags: [] +paths: {} +components: + schemas: + AddressChannel: + anyOf: + - $ref: '#/components/schemas/AudioChannel' + - $ref: '#/components/schemas/MessagingChannel' + - $ref: '#/components/schemas/VideoChannel' + AudioChannel: + type: object + required: + - audio + properties: + audio: + type: string + example: /external/resource_name?channel=audio + description: Audio Channel of Fabric Address + CXMLWebhookID: + type: object + required: + - id + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + description: Unique ID of a CXML Webhook. + DisplayTypes: + type: string + enum: + - app + - room + - call + - subscriber + description: DisplayTypes + HandleCallsUsing: + type: string + enum: + - script + - external_url + description: Indicates whether the call will be handled by a script or an external url. + MessagingChannel: + type: object + required: + - messaging + properties: + messaging: + type: string + example: /external/resource_name?channel=messaging + description: Messaging Channel of Fabric Address + StatusCode403: + type: object + required: + - error + properties: + error: + type: string + enum: + - Forbidden + VideoChannel: + type: object + required: + - video + properties: + video: + type: string + example: /external/resource_name?channel=video + description: Video Channel of Fabric Address + uuid: + type: string + format: uuid + description: Universal Unique Identifier. diff --git a/api/signalwire-rest/fabric-api/external-laml-handler-addresses/main.tsp b/api/signalwire-rest/fabric-api/external-laml-handler-addresses/main.tsp deleted file mode 100644 index fc55fd1c..00000000 --- a/api/signalwire-rest/fabric-api/external-laml-handler-addresses/main.tsp +++ /dev/null @@ -1,23 +0,0 @@ -import "@typespec/http"; -import "@typespec/openapi"; -import "./models/core.tsp"; -import "./models/responses.tsp"; -import "../../types"; - -using TypeSpec.Http; -using Types.StatusCodes; - -@route("/resources/external_laml_handlers/{external_laml_handler_id}/addresses") -namespace FabricAPI.ExternalLAMLHandlerAddresses { - @tag("External LAML Handler") - @friendlyName("External LAML Handlers") - interface ExternalLAMLHandlerAddresses { - @summary("List External LAML Handler Addresses") - @doc("A list of External LAML Handler Addresses") - list(...ExternalLAMLHandlerIDPath): - ExternalLAMLHandlerAddressListResponse | - StatusCode401 | - StatusCode404; - } -} - diff --git a/api/signalwire-rest/fabric-api/external-laml-handler/main.tsp b/api/signalwire-rest/fabric-api/external-laml-handler/main.tsp deleted file mode 100644 index a8f2d410..00000000 --- a/api/signalwire-rest/fabric-api/external-laml-handler/main.tsp +++ /dev/null @@ -1,58 +0,0 @@ -import "@typespec/http"; -import "@typespec/openapi"; -import "./models/core.tsp"; -import "./models/requests.tsp"; -import "./models/responses.tsp"; -import "./models/errors.tsp"; -import "../../types"; - -using TypeSpec.Http; -using Types.StatusCodes; - -@route("/resources/external_laml_handlers") -namespace FabricAPI.ExternalLAMLHandlers { - @tag("External LAML Handler") - @friendlyName("External LAML Handlers") - interface ExternalLAMLHandlers { - @summary("List External LAML Handlers") - @doc("A list of External LAML Handlers") - list(): - ExternalLAMLHandlerListResponse | - StatusCode401 | - StatusCode404; - - @summary("Get External LAML Handler") - @doc("Returns an External LAML Handler by ID") - read(...ExternalLAMLHandlerID): { - @statusCode statusCode: 200; - @body external_laml_handler: ExternalLAMLHandlerResponse; - } | - StatusCode401 | - StatusCode404; - - @summary("Create External LAML Handler") - @doc("Creates an External LAML Handler") - @post create(...ExternalLAMLHandlerCreateRequest): - { @statusCode statusCode: 201; @body external_laml_handler: ExternalLAMLHandlerResponse; } | - StatusCode401 | - StatusCode404 | - ExternalLamlHandlerCreateStatusCode422; - - @summary("Update External LAML Handler") - @doc("Updates an External LAML Handler by ID") - @patch update(...ExternalLAMLHandlerID, ...ExternalLAMLHandlerUpdateRequest): { - @statusCode statusCode: 200; @body external_laml_handler: ExternalLAMLHandlerResponse; - } | - StatusCode401 | - StatusCode404 | - ExternalLamlHandlerUpdateStatusCode422; - - @summary("Delete External LAML Handler") - @doc("Deletes an External LAML Handler by ID") - @delete delete(...ExternalLAMLHandlerID): - { @statusCode statusCode: 204; } | - StatusCode401 | - StatusCode404; - } -} - diff --git a/api/signalwire-rest/fabric-api/external-laml-handler/models/core.tsp b/api/signalwire-rest/fabric-api/external-laml-handler/models/core.tsp deleted file mode 100644 index 32db0de4..00000000 --- a/api/signalwire-rest/fabric-api/external-laml-handler/models/core.tsp +++ /dev/null @@ -1,48 +0,0 @@ -import "./enums.tsp"; -import "../../../types"; - -using TypeSpec.Http; - -model ExternalLAMLHandlerID { - @doc("Unique ID of a External LAML Handler.") - @path - id: uuid -} - -model ExternalLAMLHandler { - @doc("Unique ID of the External LAML Handler.") - @example("a87db7ed-8ebe-42e4-829f-8ba5a4152f54") - id: uuid; - - @doc("Name of the External LAML Handler.") - @example("My External LAML Handler") - name: string; - - @doc("Used for of the External LAML Handler.") - @example(UsedForType.Calling) - used_for: UsedForType; - - @doc("Primary request url of the External LAML Handler.") - @example("https://primary.com") - primary_request_url: string; - - @doc("Primary request method of the External LAML Handler.") - @example(UrlMethodType.Get) - primary_request_method: UrlMethodType; - - @doc("Fallback request url of the External LAML Handler.") - @example("https://fallback.com") - fallback_request_url: string; - - @doc("Fallback request method of the External LAML Handler.") - @example(UrlMethodType.Get) - fallback_request_method: UrlMethodType; - - @doc("Status callback url of the External LAML Handler.") - @example("https://callback.com") - status_callback_url: string; - - @doc("Status callback method of the External LAML Handler.") - @example(UrlMethodType.Post) - status_callback_method: UrlMethodType; -} diff --git a/api/signalwire-rest/fabric-api/external-laml-handler/models/requests.tsp b/api/signalwire-rest/fabric-api/external-laml-handler/models/requests.tsp deleted file mode 100644 index 4d9e31a2..00000000 --- a/api/signalwire-rest/fabric-api/external-laml-handler/models/requests.tsp +++ /dev/null @@ -1,67 +0,0 @@ -model ExternalLAMLHandlerCreateRequest { - @doc("Name of the External LAML Handler.") - @example("My External LAML Handler") - name?: string; - - @doc("Used for of the External LAML Handler.") - @example("calling") - used_for?: "calling" | "messaging" = "calling"; - - @doc("Primary request url of the External LAML Handler.") - @example("https://primary.com") - primary_request_url: string; - - @doc("Primary request method of the External LAML Handler.") - @example("GET") - primary_request_method?: "GET" | "POST" = "POST"; - - @doc("Fallback request url of the External LAML Handler.") - @example("https://fallback.com") - fallback_request_url?: string; - - @doc("Fallback request method of the External LAML Handler.") - @example("GET") - fallback_request_method?: "GET" | "POST" = "POST"; - - @doc("Status callback url of the External LAML Handler.") - @example("https://callback.com") - status_callback_url?: string; - - @doc("Status callback method of the External LAML Handler.") - @example("POST") - status_callback_method?: "GET" | "POST" = "POST"; -} - -model ExternalLAMLHandlerUpdateRequest { - @doc("Name of the External LAML Handler.") - @example("My External LAML Handler") - name?: string; - - @doc("Used for of the External LAML Handler.") - @example("calling") - used_for?: "calling" | "messaging" = "calling"; - - @doc("Primary request url of the External LAML Handler.") - @example("https://primary.com") - primary_request_url?: string; - - @doc("Primary request method of the External LAML Handler.") - @example("GET") - primary_request_method?: "GET" | "POST" = "POST"; - - @doc("Fallback request url of the External LAML Handler.") - @example("https://fallback.com") - fallback_request_url?: string; - - @doc("Fallback request method of the External LAML Handler.") - @example("GET") - fallback_request_method?: "GET" | "POST" = "POST"; - - @doc("Status callback url of the External LAML Handler.") - @example("https://callback.com") - status_callback_url?: string; - - @doc("Status callback method of the External LAML Handler.") - @example("POST") - status_callback_method?: "GET" | "POST" = "POST"; -} diff --git a/api/signalwire-rest/fabric-api/main.tsp b/api/signalwire-rest/fabric-api/main.tsp index 8e20e2f7..1339ed01 100644 --- a/api/signalwire-rest/fabric-api/main.tsp +++ b/api/signalwire-rest/fabric-api/main.tsp @@ -4,15 +4,15 @@ import "./addresses"; import "./subscribers"; import "./subscriber-guest-token"; import "./subscriber-invite-token"; -import "./external-laml-handler"; -import "./external-laml-handler-addresses"; import "./external-swml-handler"; import "./external-swml-handler-addresses"; import "./ai-agent"; import "./ai-agent-addresses"; +import "./cxml-webhooks"; import "./cxml-application"; import "./cxml-application-addresses"; import "./embeds-tokens"; +import "./cxml-webhook-addresses"; using TypeSpec.Http; diff --git a/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml b/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml index 66d205ba..49276f34 100644 --- a/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml +++ b/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml @@ -8,10 +8,10 @@ tags: - name: 'Subscribers: SIP Endpoints' - name: Subscribers - name: 'Subscribers: Tokens' - - name: External LAML Handler - name: External SWML Handler - name: 'AI Agents: Custom' - name: AI Agent + - name: cXML Webhook - name: cXML Application - name: Embeds Tokens paths: @@ -588,9 +588,9 @@ paths: - cXML Application /resources/external_laml_handlers: get: - operationId: ExternalLAMLHandlers_list - summary: List External LAML Handlers - description: A list of External LAML Handlers + operationId: CXMLWebhooks_list + summary: List cXML Webhooks + description: A list of cXML Webhooks parameters: [] responses: '200': @@ -598,7 +598,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerListResponse' + $ref: '#/components/schemas/CXMLWebhookListResponse' '401': description: Access is unauthorized. content: @@ -616,11 +616,11 @@ paths: enum: - Not Found tags: - - External LAML Handler + - cXML Webhook post: - operationId: ExternalLAMLHandlers_create - summary: Create External LAML Handler - description: Creates an External LAML Handler + operationId: CXMLWebhooks_create + summary: Create cXML Webhook + description: Creates an cXML Webhook parameters: [] responses: '201': @@ -628,7 +628,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerResponse' + $ref: '#/components/schemas/CXMLWebhookResponse' '401': description: Access is unauthorized. content: @@ -650,29 +650,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLamlHandlerCreateStatusCode422' + $ref: '#/components/schemas/CXMLWebhookCreateStatusCode422' tags: - - External LAML Handler + - cXML Webhook requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerCreateRequest' + $ref: '#/components/schemas/CXMLWebhookCreateRequest' /resources/external_laml_handlers/{external_laml_handler_id}/addresses: get: - operationId: ExternalLAMLHandlerAddresses_list - summary: List External LAML Handler Addresses - description: A list of External LAML Handler Addresses + operationId: CXMLWebhookAddresses_list + summary: List cXML Webhook Addresses + description: A list of cXML Webhook Addresses parameters: - - $ref: '#/components/parameters/ExternalLAMLHandlerIDPath' + - $ref: '#/components/parameters/CXMLWebhookIDPath' responses: '200': description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerAddressListResponse' + $ref: '#/components/schemas/CXMLWebhookAddressListResponse' '401': description: Access is unauthorized. content: @@ -690,21 +690,21 @@ paths: enum: - Not Found tags: - - External LAML Handler + - cXML Webhook /resources/external_laml_handlers/{id}: get: - operationId: ExternalLAMLHandlers_read - summary: Get External LAML Handler - description: Returns an External LAML Handler by ID + operationId: CXMLWebhooks_read + summary: Get cXML Webhook + description: Returns an cXML Webhook by ID parameters: - - $ref: '#/components/parameters/ExternalLAMLHandlerID' + - $ref: '#/components/parameters/CXMLWebhookID' responses: '200': description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerResponse' + $ref: '#/components/schemas/CXMLWebhookResponse' '401': description: Access is unauthorized. content: @@ -722,20 +722,20 @@ paths: enum: - Not Found tags: - - External LAML Handler + - cXML Webhook patch: - operationId: ExternalLAMLHandlers_update - summary: Update External LAML Handler - description: Updates an External LAML Handler by ID + operationId: CXMLWebhooks_update + summary: Update cXML Webhook + description: Updates an cXML Webhook by ID parameters: - - $ref: '#/components/parameters/ExternalLAMLHandlerID' + - $ref: '#/components/parameters/CXMLWebhookID' responses: '200': description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerResponse' + $ref: '#/components/schemas/CXMLWebhookResponse' '401': description: Access is unauthorized. content: @@ -757,21 +757,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLamlHandlerUpdateStatusCode422' + $ref: '#/components/schemas/CXMLWebhookUpdateStatusCode422' tags: - - External LAML Handler + - cXML Webhook requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerUpdateRequest' + $ref: '#/components/schemas/CXMLWebhookUpdateRequest' delete: - operationId: ExternalLAMLHandlers_delete - summary: Delete External LAML Handler - description: Deletes an External LAML Handler by ID + operationId: CXMLWebhooks_delete + summary: Delete cXML Webhook + description: Deletes an cXML Webhook by ID parameters: - - $ref: '#/components/parameters/ExternalLAMLHandlerID' + - $ref: '#/components/parameters/CXMLWebhookID' responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' @@ -792,7 +792,7 @@ paths: enum: - Not Found tags: - - External LAML Handler + - cXML Webhook /resources/external_swml_handlers: get: operationId: ExternalSWMLHandlers_list @@ -1487,32 +1487,32 @@ components: description: Unique ID of an AI Agent. schema: $ref: '#/components/schemas/uuid' - CxmlApplicationID: + CXMLWebhookID: name: id in: path required: true - description: Unique ID of a cXML Application. + description: Unique ID of a CXML Webhook. schema: $ref: '#/components/schemas/uuid' - CxmlApplicationIDPath: - name: cxml_application_id + CXMLWebhookIDPath: + name: external_laml_handler_id in: path required: true - description: Unique ID of a cXML Application. + description: Unique ID of a CXML Webhook. schema: $ref: '#/components/schemas/uuid' - ExternalLAMLHandlerID: + CxmlApplicationID: name: id in: path required: true - description: Unique ID of a External LAML Handler. + description: Unique ID of a cXML Application. schema: $ref: '#/components/schemas/uuid' - ExternalLAMLHandlerIDPath: - name: external_laml_handler_id + CxmlApplicationIDPath: + name: cxml_application_id in: path required: true - description: Unique ID of a External LAML Handler. + description: Unique ID of a cXML Application. schema: $ref: '#/components/schemas/uuid' ExternalSWMLHandlerID: @@ -1580,34 +1580,34 @@ components: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Fabric Address. example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Unique ID of the Fabric Address. resource_id: allOf: - $ref: '#/components/schemas/uuid' - description: Fabric resource ID that the Fabric Address belongs to. example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Fabric resource ID that the Fabric Address belongs to. name: type: string - description: Name of the Fabric Address. example: justice-league + description: Name of the Fabric Address. display_name: type: string - description: Display name of the Fabric Address. example: Justice League + description: Display name of the Fabric Address. type: allOf: - $ref: '#/components/schemas/DisplayTypes' - description: Type of the Fabric Address. example: app + description: Type of the Fabric Address. cover_url: type: string - description: Cover url of the Fabric Address. example: https://coverurl.com + description: Cover url of the Fabric Address. preview_url: type: string - description: Preview url of the Fabric Address. example: https://previewurl.com + description: Preview url of the Fabric Address. channel: allOf: - $ref: '#/components/schemas/AddressChannel' @@ -1634,18 +1634,18 @@ components: self: type: string format: uri - description: Link of the current page example: https://{space_name}.signalwire.com/api/fabric/resources/ai_agents/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + description: Link of the current page first: type: string format: uri - description: Link to the first page example: https://{space_name}.signalwire.com/api/fabric/resources/ai_agents/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + description: Link to the first page next: type: string format: uri - description: Link to the next page example: https://{space_name}.signalwire.com/api/fabric/resources/ai_agents/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page AIAgentCreateRequest: type: object required: @@ -1653,8 +1653,8 @@ components: properties: name: type: string - description: Name of the AI Agent. example: My AI Agent + description: Name of the AI Agent. prompt: allOf: - $ref: '#/components/schemas/AIPrompt' @@ -1676,10 +1676,10 @@ components: type: array items: type: string - description: An array of hints (as strings) to provide context to the dialogue. example: - One Hint - Two Hint + description: An array of hints (as strings) to provide context to the dialogue. languages: type: array items: @@ -1727,18 +1727,18 @@ components: self: type: string format: uri - description: Link of the current page example: https://{space_name}.signalwire.com/api/fabric/resources/ai_agents?page_number=0&page_size=50 + description: Link of the current page first: type: string format: uri - description: Link to the first page example: https://{space_name}.signalwire.com/api/fabric/resources/ai_agents?page_number=0&page_size=50 + description: Link to the first page next: type: string format: uri - description: Link to the next page example: https://{space_name}.signalwire.com/api/fabric/resources/ai_agents?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page AIAgentResponse: type: object required: @@ -1753,31 +1753,31 @@ components: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the AIAgent. example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the AIAgent. project_id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Project. example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. display_name: type: string - description: Display name of the AIAgent Fabric Resource example: Booking Assistant + description: Display name of the AIAgent Fabric Resource type: type: string - description: Type of the Fabric Resource example: external_laml_handler + description: Type of the Fabric Resource created_at: type: string format: date-time + example: 2024-10-17T14:14:53Z description: Date and time when the resource was created. - example: '2024-10-17T14:14:53Z' updated_at: type: string format: date-time + example: 2024-10-17T14:14:53Z description: Date and time when the resource was updated. - example: '2024-10-17T14:14:53Z' ai_agent: allOf: - $ref: '#/components/schemas/AIAgentWithID' @@ -1787,8 +1787,8 @@ components: properties: name: type: string - description: Name of the AI Agent. example: My AI Agent + description: Name of the AI Agent. prompt: allOf: - $ref: '#/components/schemas/AIPromptUpdate' @@ -1810,10 +1810,10 @@ components: type: array items: type: string - description: An array of hints (as strings) to provide context to the dialogue. example: - One Hint - Two Hint + description: An array of hints (as strings) to provide context to the dialogue. languages: type: array items: @@ -1851,8 +1851,8 @@ components: description: Unique ID of an AI Agent. name: type: string - description: Name of the AI Agent. example: My AI Agent + description: Name of the AI Agent. prompt: allOf: - $ref: '#/components/schemas/AIPrompt' @@ -1874,10 +1874,10 @@ components: type: array items: type: string - description: An array of hints (as strings) to provide context to the dialogue. example: - One Hint - Two Hint + description: An array of hints (as strings) to provide context to the dialogue. languages: type: array items: @@ -1909,18 +1909,18 @@ components: description: Amount of time, in ms, to wait before prompting the user to respond. Allowed values from `10,000` - `600,000`. Set to `0` to disable. attention_timeout_prompt: type: string - description: A custom prompt that is fed into the AI when the attention_timeout is reached. example: Ask if the user would like you to repeat yourself, or if they need more time to respond. + description: A custom prompt that is fed into the AI when the attention_timeout is reached. background_file: type: string format: uri - description: URL of audio file to play in the background while AI plays in foreground. example: https://cdn.signalwire.com/default-music/welcome.mp3 + description: URL of audio file to play in the background while AI plays in foreground. background_file_loops: type: integer nullable: true - description: Maximum number of times to loop playing the background file. `undefined` means loop indefinitely. example: 5 + description: Maximum number of times to loop playing the background file. `undefined` means loop indefinitely. background_file_volume: type: integer minimum: -50 @@ -1928,10 +1928,10 @@ components: description: Defines background_file volume within a range of `-50` to `50`. barge_match_string: type: string + example: Cancel order description: |- Takes a string, including a regular expression, defining barge behavior. For example, this param can direct the AI to stop when the word 'hippopotomus' is input. - example: Cancel order barge_min_words: type: integer minimum: 1 @@ -1939,12 +1939,12 @@ components: description: Defines the number of words that must be input before triggering barge behavior, in a range of `1-99`. conscience: type: string - description: Sets the prompt which binds the agent to its purpose. example: Place an order + description: Sets the prompt which binds the agent to its purpose. conversation_id: type: string - description: Used by `check_for_input` and `save_conversation` to identify an individual conversation. example: Conversation ID + description: Used by `check_for_input` and `save_conversation` to identify an individual conversation. debug_webhook_level: type: integer minimum: 0 @@ -1953,8 +1953,8 @@ components: debug_webhook_url: type: string format: uri - description: Each interaction between the AI and end user is posted in real time to the established URL. example: https://example.com + description: Each interaction between the AI and end user is posted in real time to the established URL. direction: type: array items: @@ -1962,8 +1962,8 @@ components: description: Forces the direction of the call to the assistant. Valid values are `inbound` and `outbound`. digit_termiantors: type: string - description: "DTMF digit, as a string, to signal the end of input (ex: '#')" example: '#' + description: "DTMF digit, as a string, to signal the end of input (ex: '#')" digit_timeout: type: integer minimum: 250 @@ -1988,8 +1988,8 @@ components: hold_music: type: string format: uri - description: A URL for the hold music to play, accepting WAV, mp3, and FreeSWITCH tone_stream. example: https://cdn.signalwire.com/default-music/welcome.mp3 + description: A URL for the hold music to play, accepting WAV, mp3, and FreeSWITCH tone_stream. hold_on_process: type: boolean description: Enables hold music during SWAIG processing. @@ -2008,15 +2008,15 @@ components: description: When enabled, barges agent upon any sound interruption longer than 1 second. interrupt_prompt: type: string - description: Provide a prompt for the agent to handle crosstalk. example: Inform user that you can't hear anything + description: Provide a prompt for the agent to handle crosstalk. languages_enabled: type: boolean description: Allows multilingualism when `true`. local_tz: type: string - description: The local timezone setting for the AI. Value should use `IANA TZ ID` example: America/Ensenada + description: The local timezone setting for the AI. Value should use `IANA TZ ID` outbound_attention_timeout: type: integer minimum: 10000 @@ -2054,8 +2054,8 @@ components: properties: text: type: string - description: The instructions to send to the agent. example: Your name is Franklin and you are taking orders for Franklin's Pizza. Begin by greeting the caller, and ask if they'd like to place an order for pickup or delivery. + description: The instructions to send to the agent. temperature: type: number minimum: 0 @@ -2089,8 +2089,8 @@ components: properties: text: type: string - description: The instructions to send to the agent. example: Your name is Franklin and you are taking orders for Franklin's Pizza. Begin by greeting the caller, and ask if they'd like to place an order for pickup or delivery. + description: The instructions to send to the agent. temperature: type: number minimum: 0 @@ -2126,8 +2126,8 @@ components: properties: text: type: string - description: The instructions to send to the agent. example: Your name is Franklin and you are taking orders for Franklin's Pizza. Begin by greeting the caller, and ask if they'd like to place an order for pickup or delivery. + description: The instructions to send to the agent. temperature: type: number minimum: 0 @@ -2168,8 +2168,8 @@ components: properties: text: type: string - description: The instructions to send to the agent. example: Your name is Franklin and you are taking orders for Franklin's Pizza. Begin by greeting the caller, and ask if they'd like to place an order for pickup or delivery. + description: The instructions to send to the agent. temperature: type: number minimum: 0 @@ -2254,8 +2254,8 @@ components: properties: description: type: string - description: A description of the property. example: Property description + description: A description of the property. nullable: type: boolean description: Whether the property can be null. @@ -2281,8 +2281,8 @@ components: properties: audio: type: string - description: Audio Channel of Fabric Address example: /external/resource_name?channel=audio + description: Audio Channel of Fabric Address BooleanProperty: type: object required: @@ -2290,8 +2290,8 @@ components: properties: description: type: string - description: A description of the property. example: Property description + description: A description of the property. nullable: type: boolean description: Whether the property can be null. @@ -2305,342 +2305,120 @@ components: description: The default boolean value description: Base interface for all property types title: Boolean Function Property - CallHandlerPassthroughType: - type: string - enum: - - default - - passthrough - - block-pstn - description: Call handler of the Sip Endpoint. - CallHandlerType: - type: string - enum: - - default - - passthrough - - block-pstn - - relay_script - - laml_webhook - - laml_application - - dialogflow - - relay_context - - relay_connector - - video_room - - ai_agent - - call_flow - description: Call handler of the Sip Endpoint. - CipherType: - type: string - enum: - - AEAD_AES_256_GCM_8 - - AES_256_CM_HMAC_SHA1_80 - - AES_CM_128_HMAC_SHA1_80 - - AES_256_CM_HMAC_SHA1_32 - - AES_CM_128_HMAC_SHA1_32 - description: Ciphers - CodecType: - type: string - enum: - - OPUS - - G722 - - PCMU - - PCMA - - G729 - - VP8 - - H264 - description: Codecs - ConstProperty: - type: object - required: - - const - properties: - const: - description: A constant value that can be passed to the function. - title: Const Property - ContextSteps: + CXMLWebhook: type: object required: - - steps + - id + - name + - used_for + - primary_request_url + - primary_request_method + - fallback_request_url + - fallback_request_method + - status_callback_url + - status_callback_method properties: - steps: - type: array - items: - $ref: '#/components/schemas/ContextStepsParams' - description: An array of objects that define the steps in the context. These steps are used to define the flow of the conversation. - title: steps - title: ContextSteps object - ContextStepsEnd: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the CXML Webhook. + name: + type: string + example: My CXML Webhook + description: Name of the CXML Webhook. + used_for: + allOf: + - $ref: '#/components/schemas/UsedForType' + example: calling + description: Used for of the CXML Webhook. + primary_request_url: + type: string + example: https://primary.com + description: Primary request url of the CXML Webhook. + primary_request_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Primary request method of the CXML Webhook. + fallback_request_url: + type: string + example: https://fallback.com + description: Fallback request url of the CXML Webhook. + fallback_request_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Fallback request method of the CXML Webhook. + status_callback_url: + type: string + example: https://callback.com + description: Status callback url of the CXML Webhook. + status_callback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: POST + description: Status callback method of the CXML Webhook. + CXMLWebhookAddress: type: object required: + - id + - resource_id - name - - text + - display_name + - type + - cover_url + - preview_url + - channel properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Unique ID of the Fabric Address. + resource_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Fabric resource ID that the Fabric Address belongs to. name: type: string - description: The name of the step. The name must be unique within the context. The name is used for referencing the step in the context. - example: Take Pizza order - text: + example: justice-league + description: Name of the Fabric Address. + display_name: type: string - description: The prompt or instructions given to the AI at this step. - example: Your name is Franklin and you are taking orders for Franklin's Pizza. - step_criteria: + example: Justice League + description: Display name of the Fabric Address. + type: + allOf: + - $ref: '#/components/schemas/DisplayTypes' + example: app + description: Type of the Fabric Address. + cover_url: type: string - description: |- - The conditions that must be met for the conversation to proceed to the next step. - If a condition is not met, the conversation will not proceed to the next step. - It's **highly** recommended you create a custom criteria for the step to get the intended behavior. - example: Customer wants to order Pizza - functions: + example: https://coverurl.com + description: Cover url of the Fabric Address. + preview_url: + type: string + example: https://previewurl.com + description: Preview url of the Fabric Address. + channel: + allOf: + - $ref: '#/components/schemas/AddressChannel' + description: Channels of the Fabric Address. + CXMLWebhookAddressListResponse: + type: object + required: + - data + - links + properties: + data: type: array items: - type: string - description: An array of SWAIG.functions that can be executed from this step. - example: - - Take Order - - Confirm Order - - Confirm Address - valid_contexts: - type: array - items: - type: string - description: An array of valid contexts that the conversation can transition to from this step. - example: - - Place Order - - Confirm Order - skip_user_turn: - type: boolean - description: A boolean value that, when true, will skip the user's turn to respond in the conversation and proceed to the next step. - end: - type: boolean - description: A boolean value that, when true, will end the contexts conversation and transition to a normal interaction. - title: ContextStepsEnd object - ContextStepsParams: - anyOf: - - $ref: '#/components/schemas/ContextStepsEnd' - - $ref: '#/components/schemas/ContextStepsValidSteps' - title: ContextStepsParams union - ContextStepsUpdate: - type: object - properties: - steps: - type: array - items: - $ref: '#/components/schemas/ContextStepsParams' - description: An array of objects that define the steps in the context. These steps are used to define the flow of the conversation. - title: steps - title: ContextSteps object - ContextStepsValidSteps: - type: object - required: - - name - - text - properties: - name: - type: string - description: The name of the step. The name must be unique within the context. The name is used for referencing the step in the context. - example: Take Pizza order - text: - type: string - description: The prompt or instructions given to the AI at this step. - example: Your name is Franklin and you are taking orders for Franklin's Pizza. - step_criteria: - type: string - description: |- - The conditions that must be met for the conversation to proceed to the next step. - If a condition is not met, the conversation will not proceed to the next step. - It's **highly** recommended you create a custom criteria for the step to get the intended behavior. - example: Customer wants to order Pizza - functions: - type: array - items: - type: string - description: An array of SWAIG.functions that can be executed from this step. - example: - - Take Order - - Confirm Order - - Confirm Address - valid_contexts: - type: array - items: - type: string - description: An array of valid contexts that the conversation can transition to from this step. - example: - - Place Order - - Confirm Order - skip_user_turn: - type: boolean - description: A boolean value that, when true, will skip the user's turn to respond in the conversation and proceed to the next step. - valid_steps: - type: array - items: - type: string - description: |- - An array of valid steps that the conversation can proceed to from this step. - If the array is empty, or the `valid_steps` key is not present, the conversation will proceed to the next step in the context. - example: - - get order - - confirm order - title: ContextStepsValidSteps object - ContextSwitchAction: - type: object - required: - - context_switch - properties: - context_switch: - type: object - properties: - system_prompt: - type: string - description: The instructions to send to the agent. Default is not set. - consolidate: - type: boolean - description: Whether to consolidate the context. Default is `false`. - user_prompt: - type: string - description: |- - A string serving as simulated user input for the AI Agent. - During a context_switch in the AI's prompt, the user_prompt offers the AI pre-established context or guidance. - Default is not set - required: - - system_prompt - description: A JSON object containing the context to switch to. Default is not set. - title: context_switch - title: ContextSwitchAction object - Contexts: - type: object - required: - - default - properties: - default: - allOf: - - $ref: '#/components/schemas/ContextSteps' - description: The default context to use at the beginning of the conversation. Additional context steps can be defined as any other key in the object. - additionalProperties: - $ref: '#/components/schemas/ContextSteps' - title: contexts - ContextsUpdate: - type: object - properties: - default: - allOf: - - $ref: '#/components/schemas/ContextStepsUpdate' - description: The default context to use at the beginning of the conversation. Additional context steps can be defined as any other key in the object. - additionalProperties: - $ref: '#/components/schemas/ContextStepsUpdate' - title: contexts - CxmlApplication: - type: object - required: - - id - - name - - handle_calls_using - - call_handler_url - - call_handler_method - - call_handler_fallback_url - - call_handler_fallback_method - - call_status_callback_url - - call_status_callback_method - properties: - id: - allOf: - - $ref: '#/components/schemas/uuid' - description: Unique ID of the cXML Application. - example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 - name: - type: string - description: Name of the cXML Application. - example: My cXML Application - handle_calls_using: - allOf: - - $ref: '#/components/schemas/HandleCallsUsing' - description: Indicates whether the call will be handled by a script or an external URL. - example: script - call_handler_url: - type: string - description: Call handler URL - example: https://example.com/cxml - call_handler_method: - allOf: - - $ref: '#/components/schemas/UrlMethodType' - description: Call handler URL method - example: GET - call_handler_fallback_url: - type: string - description: Call handler callback URL. - example: https://example.com/cxml - call_handler_fallback_method: - allOf: - - $ref: '#/components/schemas/UrlMethodType' - description: Call handler fallback method. - example: GET - call_status_callback_url: - type: string - description: Call status callback URL - example: https://callback.com - call_status_callback_method: - allOf: - - $ref: '#/components/schemas/UrlMethodType' - description: Call status callback method. - example: POST - CxmlApplicationAddress: - type: object - required: - - id - - resource_id - - name - - display_name - - type - - cover_url - - preview_url - - channel - properties: - id: - allOf: - - $ref: '#/components/schemas/uuid' - description: Unique ID of the Fabric Address. - example: 691af061-cd86-4893-a605-173f47afc4c2 - resource_id: - allOf: - - $ref: '#/components/schemas/uuid' - description: Fabric resource ID that the Fabric Address belongs to. - example: 691af061-cd86-4893-a605-173f47afc4c2 - name: - type: string - description: Name of the Fabric Address. - example: justice-league - display_name: - type: string - description: Display name of the Fabric Address. - example: Justice League - type: - allOf: - - $ref: '#/components/schemas/DisplayTypes' - description: Type of the Fabric Address. - example: app - cover_url: - type: string - description: Cover url of the Fabric Address. - example: https://coverurl.com - preview_url: - type: string - description: Preview url of the Fabric Address. - example: https://previewurl.com - channel: - allOf: - - $ref: '#/components/schemas/AddressChannel' - description: Channels of the Fabric Address. - CxmlApplicationAddressListResponse: - type: object - required: - - data - - links - properties: - data: - type: array - items: - $ref: '#/components/schemas/CxmlApplicationAddress' + $ref: '#/components/schemas/CXMLWebhookAddress' links: - $ref: '#/components/schemas/CxmlApplicationAddressPaginationResponse' - CxmlApplicationAddressPaginationResponse: + $ref: '#/components/schemas/CXMLWebhookAddressPaginationResponse' + CXMLWebhookAddressPaginationResponse: type: object required: - self @@ -2650,71 +2428,72 @@ components: self: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 description: Link of the current page - example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 first: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 description: Link to the first page - example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 next: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca description: Link to the next page - example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca - CxmlApplicationCreateRequest: + CXMLWebhookCreateRequest: type: object required: - - name + - primary_request_url properties: name: type: string - description: Name of the cXML Application. - example: My cXML Application - handle_calls_using: - allOf: - - $ref: '#/components/schemas/HandleCallsUsing' - description: Indicates whether the call will be handled by a script or an external URL. - example: script - call_handler_url: + example: My CXML Webhook + description: Name of the CXML Webhook. + used_for: type: string - description: Call handler URL - example: https://example.com/cxml - call_handler_method: - allOf: - - $ref: '#/components/schemas/UrlMethodType' - description: Call handler URL method + enum: + - calling + - messaging + example: calling + description: Used for of the CXML Webhook. + default: calling + primary_request_url: + type: string + example: https://primary.com + description: Primary request url of the CXML Webhook. + primary_request_method: + type: string + enum: + - GET + - POST example: GET + description: Primary request method of the CXML Webhook. default: POST - call_handler_fallback_url: + fallback_request_url: type: string - description: Call handler callback URL. - example: https://example.com/cxml - call_handler_fallback_method: - allOf: - - $ref: '#/components/schemas/UrlMethodType' - description: Call handler fallback method. + example: https://fallback.com + description: Fallback request url of the CXML Webhook. + fallback_request_method: + type: string + enum: + - GET + - POST example: GET + description: Fallback request method of the CXML Webhook. default: POST - call_status_callback_url: + status_callback_url: type: string - description: Call status callback URL example: https://callback.com - call_status_callback_method: - allOf: - - $ref: '#/components/schemas/UrlMethodType' - description: Call status callback method. - example: GET - default: POST - call_handler_script: + description: Status callback url of the CXML Webhook. + status_callback_method: type: string - description: Script to handle to call. - example: |- - - - https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3 - - CxmlApplicationCreateStatusCode422: + enum: + - GET + - POST + example: POST + description: Status callback method of the CXML Webhook. + default: POST + CXMLWebhookCreateStatusCode422: type: object required: - errors @@ -2726,11 +2505,11 @@ components: example: errors: - type: validation_error - code: missing_required_parameter - message: Name is required - attribute: name - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#missing_required_parameter - CxmlApplicationListResponse: + code: http_url_required + message: This value must be an HTTP or HTTPS URL. + attribute: status_callback_url + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#http_url_required + CXMLWebhookListResponse: type: object required: - data @@ -2739,10 +2518,10 @@ components: data: type: array items: - $ref: '#/components/schemas/CxmlApplicationResponse' + $ref: '#/components/schemas/CXMLWebhookResponse' links: - $ref: '#/components/schemas/CxmlApplicationPaginationResponse' - CxmlApplicationPaginationResponse: + $ref: '#/components/schemas/CXMLWebhookPaginationResponse' + CXMLWebhookPaginationResponse: type: object required: - self @@ -2752,19 +2531,19 @@ components: self: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=0&page_size=50 description: Link of the current page - example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=0&page_size=50 first: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=0&page_size=50 description: Link to the first page - example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=0&page_size=50 next: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca description: Link to the next page - example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca - CxmlApplicationResponse: + CXMLWebhookResponse: type: object required: - id @@ -2773,91 +2552,92 @@ components: - type - created_at - updated_at - - cxml_application + - external_laml_handler properties: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the cXML Application. example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the CXMLWebhook. project_id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Project. example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. display_name: type: string - description: Display name of the cXML Application Fabric Resource example: Booking Assistant + description: Display name of the CXMLWebhook Fabric Resource type: type: string + example: external_laml_handler description: Type of the Fabric Resource - example: cxml_application created_at: type: string format: date-time + example: 2024-10-17T14:14:53Z description: Date and time when the resource was created. - example: '2024-10-17T14:14:53Z' updated_at: type: string format: date-time + example: 2024-10-17T14:14:53Z description: Date and time when the resource was updated. - example: '2024-10-17T14:14:53Z' - cxml_application: + external_laml_handler: allOf: - - $ref: '#/components/schemas/CxmlApplication' - description: cXML Application data. - CxmlApplicationUpdateRequest: + - $ref: '#/components/schemas/CXMLWebhook' + description: CXMLWebhook data. + CXMLWebhookUpdateRequest: type: object properties: name: type: string - description: Name of the cXML Application. - example: My cXML Application - handle_calls_using: - allOf: - - $ref: '#/components/schemas/HandleCallsUsing' - description: Indicates whether the call will be handled by a script or an external URL. - example: script - call_handler_url: + example: My CXML Webhook + description: Name of the CXML Webhook. + used_for: type: string - description: Call handler URL - example: https://example.com/cxml - call_handler_method: - allOf: - - $ref: '#/components/schemas/UrlMethodType' - description: Call handler URL method + enum: + - calling + - messaging + example: calling + description: Used for of the CXML Webhook. + default: calling + primary_request_url: + type: string + example: https://primary.com + description: Primary request url of the CXML Webhook. + primary_request_method: + type: string + enum: + - GET + - POST example: GET + description: Primary request method of the CXML Webhook. default: POST - call_handler_fallback_url: + fallback_request_url: type: string - description: Call handler callback URL. - example: https://example.com/cxml - call_handler_fallback_method: - allOf: - - $ref: '#/components/schemas/UrlMethodType' - description: Call handler fallback method. + example: https://fallback.com + description: Fallback request url of the CXML Webhook. + fallback_request_method: + type: string + enum: + - GET + - POST example: GET + description: Fallback request method of the CXML Webhook. default: POST - call_status_callback_url: + status_callback_url: type: string - description: Call status callback URL example: https://callback.com - call_status_callback_method: - allOf: - - $ref: '#/components/schemas/UrlMethodType' - description: Call status callback method. - example: GET - default: POST - call_handler_script: + description: Status callback url of the CXML Webhook. + status_callback_method: type: string - description: Script to handle to call. - example: |- - - - https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3 - - CxmlApplicationUpdateStatusCode422: + enum: + - GET + - POST + example: POST + description: Status callback method of the CXML Webhook. + default: POST + CXMLWebhookUpdateStatusCode422: type: object required: - errors @@ -2869,150 +2649,287 @@ components: example: errors: - type: validation_error - code: missing_required_parameter - message: Name is required - attribute: name - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#missing_required_parameter - DataMap: - oneOf: - - $ref: '#/components/schemas/Output' - - $ref: '#/components/schemas/Expression' - - $ref: '#/components/schemas/Webhook' - title: DataMap union - Direction: + code: http_url_required + message: This value must be an HTTP or HTTPS URL. + attribute: status_callback_url + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#http_url_required + CallHandlerPassthroughType: type: string enum: - - inbound - - outbound - title: Direction enum - DisplayTypes: + - default + - passthrough + - block-pstn + description: Call handler of the Sip Endpoint. + CallHandlerType: type: string enum: - - app - - room - - call - - subscriber - description: DisplayTypes - EmbedsTokensRequest: + - default + - passthrough + - block-pstn + - relay_script + - laml_webhook + - laml_application + - dialogflow + - relay_context + - relay_connector + - video_room + - ai_agent + - call_flow + description: Call handler of the Sip Endpoint. + CipherType: + type: string + enum: + - AEAD_AES_256_GCM_8 + - AES_256_CM_HMAC_SHA1_80 + - AES_CM_128_HMAC_SHA1_80 + - AES_256_CM_HMAC_SHA1_32 + - AES_CM_128_HMAC_SHA1_32 + description: Ciphers + CodecType: + type: string + enum: + - OPUS + - G722 + - PCMU + - PCMA + - G729 + - VP8 + - H264 + description: Codecs + ConstProperty: type: object required: - - token + - const properties: - token: + const: + description: A constant value that can be passed to the function. + title: Const Property + ContextSteps: + type: object + required: + - steps + properties: + steps: + type: array + items: + $ref: '#/components/schemas/ContextStepsParams' + description: An array of objects that define the steps in the context. These steps are used to define the flow of the conversation. + title: steps + title: ContextSteps object + ContextStepsEnd: + type: object + required: + - name + - text + properties: + name: type: string - description: Click to Call Token - example: c2c_7acc0e5e968706a032983cd80cdca219 - EmbedsTokensResponse: + example: Take Pizza order + description: The name of the step. The name must be unique within the context. The name is used for referencing the step in the context. + text: + type: string + example: Your name is Franklin and you are taking orders for Franklin's Pizza. + description: The prompt or instructions given to the AI at this step. + step_criteria: + type: string + example: Customer wants to order Pizza + description: |- + The conditions that must be met for the conversation to proceed to the next step. + If a condition is not met, the conversation will not proceed to the next step. + It's **highly** recommended you create a custom criteria for the step to get the intended behavior. + functions: + type: array + items: + type: string + example: + - Take Order + - Confirm Order + - Confirm Address + description: An array of SWAIG.functions that can be executed from this step. + valid_contexts: + type: array + items: + type: string + example: + - Place Order + - Confirm Order + description: An array of valid contexts that the conversation can transition to from this step. + skip_user_turn: + type: boolean + description: A boolean value that, when true, will skip the user's turn to respond in the conversation and proceed to the next step. + end: + type: boolean + description: A boolean value that, when true, will end the contexts conversation and transition to a normal interaction. + title: ContextStepsEnd object + ContextStepsParams: + anyOf: + - $ref: '#/components/schemas/ContextStepsEnd' + - $ref: '#/components/schemas/ContextStepsValidSteps' + title: ContextStepsParams union + ContextStepsUpdate: + type: object + properties: + steps: + type: array + items: + $ref: '#/components/schemas/ContextStepsParams' + description: An array of objects that define the steps in the context. These steps are used to define the flow of the conversation. + title: steps + title: ContextSteps object + ContextStepsValidSteps: type: object required: - - token + - name + - text properties: - token: + name: type: string - description: Encrypted guest token. - example: eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwiY2giOiJwdWMubHZoLm1lIiwidHlwIjoiU0FUIn0.. - EncryptionType: - type: string - enum: - - default - - required - - optional - description: Encryption - Expression: + example: Take Pizza order + description: The name of the step. The name must be unique within the context. The name is used for referencing the step in the context. + text: + type: string + example: Your name is Franklin and you are taking orders for Franklin's Pizza. + description: The prompt or instructions given to the AI at this step. + step_criteria: + type: string + example: Customer wants to order Pizza + description: |- + The conditions that must be met for the conversation to proceed to the next step. + If a condition is not met, the conversation will not proceed to the next step. + It's **highly** recommended you create a custom criteria for the step to get the intended behavior. + functions: + type: array + items: + type: string + example: + - Take Order + - Confirm Order + - Confirm Address + description: An array of SWAIG.functions that can be executed from this step. + valid_contexts: + type: array + items: + type: string + example: + - Place Order + - Confirm Order + description: An array of valid contexts that the conversation can transition to from this step. + skip_user_turn: + type: boolean + description: A boolean value that, when true, will skip the user's turn to respond in the conversation and proceed to the next step. + valid_steps: + type: array + items: + type: string + example: + - get order + - confirm order + description: |- + An array of valid steps that the conversation can proceed to from this step. + If the array is empty, or the `valid_steps` key is not present, the conversation will proceed to the next step in the context. + title: ContextStepsValidSteps object + ContextSwitchAction: + type: object + required: + - context_switch + properties: + context_switch: + type: object + properties: + system_prompt: + type: string + description: The instructions to send to the agent. Default is not set. + consolidate: + type: boolean + description: Whether to consolidate the context. Default is `false`. + user_prompt: + type: string + description: |- + A string serving as simulated user input for the AI Agent. + During a context_switch in the AI's prompt, the user_prompt offers the AI pre-established context or guidance. + Default is not set + required: + - system_prompt + description: A JSON object containing the context to switch to. Default is not set. + title: context_switch + title: ContextSwitchAction object + Contexts: type: object required: - - expressions + - default properties: - expressions: - type: array - items: - type: object - properties: - string: - type: string - description: The actual input or value from the user or system. - example: I want a refund - pattern: - type: string - description: A regular expression pattern to validate or match the string. - output: - type: object - properties: - response: - type: string - description: A static response text or message returned to the AI agents context. - example: Order placed - action: - type: array - items: - $ref: '#/components/schemas/Action' - description: A list of actions to be performed upon matching. - required: - - response - description: An object that defines the `response` or `action` to be taken when the webhook is successfully triggered. - title: output - required: - - string - - pattern - - output - description: An array of objects that define patterns and corresponding actions. - title: expressions - title: Expression object - ExternalLAMLHandler: + default: + allOf: + - $ref: '#/components/schemas/ContextSteps' + description: The default context to use at the beginning of the conversation. Additional context steps can be defined as any other key in the object. + additionalProperties: + $ref: '#/components/schemas/ContextSteps' + title: contexts + ContextsUpdate: + type: object + properties: + default: + allOf: + - $ref: '#/components/schemas/ContextStepsUpdate' + description: The default context to use at the beginning of the conversation. Additional context steps can be defined as any other key in the object. + additionalProperties: + $ref: '#/components/schemas/ContextStepsUpdate' + title: contexts + CxmlApplication: type: object required: - id - name - - used_for - - primary_request_url - - primary_request_method - - fallback_request_url - - fallback_request_method - - status_callback_url - - status_callback_method + - handle_calls_using + - call_handler_url + - call_handler_method + - call_handler_fallback_url + - call_handler_fallback_method + - call_status_callback_url + - call_status_callback_method properties: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the External LAML Handler. example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the cXML Application. name: type: string - description: Name of the External LAML Handler. - example: My External LAML Handler - used_for: + example: My cXML Application + description: Name of the cXML Application. + handle_calls_using: allOf: - - $ref: '#/components/schemas/UsedForType' - description: Used for of the External LAML Handler. - example: calling - primary_request_url: + - $ref: '#/components/schemas/HandleCallsUsing' + example: script + description: Indicates whether the call will be handled by a script or an external URL. + call_handler_url: type: string - description: Primary request url of the External LAML Handler. - example: https://primary.com - primary_request_method: + example: https://example.com/cxml + description: Call handler URL + call_handler_method: allOf: - $ref: '#/components/schemas/UrlMethodType' - description: Primary request method of the External LAML Handler. example: GET - fallback_request_url: + description: Call handler URL method + call_handler_fallback_url: type: string - description: Fallback request url of the External LAML Handler. - example: https://fallback.com - fallback_request_method: + example: https://example.com/cxml + description: Call handler callback URL. + call_handler_fallback_method: allOf: - $ref: '#/components/schemas/UrlMethodType' - description: Fallback request method of the External LAML Handler. example: GET - status_callback_url: + description: Call handler fallback method. + call_status_callback_url: type: string - description: Status callback url of the External LAML Handler. example: https://callback.com - status_callback_method: + description: Call status callback URL + call_status_callback_method: allOf: - $ref: '#/components/schemas/UrlMethodType' - description: Status callback method of the External LAML Handler. example: POST - ExternalLAMLHandlerAddress: + description: Call status callback method. + CxmlApplicationAddress: type: object required: - id @@ -3027,39 +2944,39 @@ components: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Fabric Address. example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Unique ID of the Fabric Address. resource_id: allOf: - $ref: '#/components/schemas/uuid' - description: Fabric resource ID that the Fabric Address belongs to. example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Fabric resource ID that the Fabric Address belongs to. name: type: string - description: Name of the Fabric Address. example: justice-league + description: Name of the Fabric Address. display_name: type: string - description: Display name of the Fabric Address. example: Justice League + description: Display name of the Fabric Address. type: allOf: - $ref: '#/components/schemas/DisplayTypes' - description: Type of the Fabric Address. example: app + description: Type of the Fabric Address. cover_url: type: string - description: Cover url of the Fabric Address. example: https://coverurl.com + description: Cover url of the Fabric Address. preview_url: type: string - description: Preview url of the Fabric Address. example: https://previewurl.com + description: Preview url of the Fabric Address. channel: allOf: - $ref: '#/components/schemas/AddressChannel' description: Channels of the Fabric Address. - ExternalLAMLHandlerAddressListResponse: + CxmlApplicationAddressListResponse: type: object required: - data @@ -3068,10 +2985,10 @@ components: data: type: array items: - $ref: '#/components/schemas/ExternalLAMLHandlerAddress' + $ref: '#/components/schemas/CxmlApplicationAddress' links: - $ref: '#/components/schemas/ExternalLAMLHandlerAddressPaginationResponse' - ExternalLAMLHandlerAddressPaginationResponse: + $ref: '#/components/schemas/CxmlApplicationAddressPaginationResponse' + CxmlApplicationAddressPaginationResponse: type: object required: - self @@ -3081,72 +2998,87 @@ components: self: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 description: Link of the current page - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 first: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 description: Link to the first page - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 next: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca description: Link to the next page - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca - ExternalLAMLHandlerCreateRequest: + CxmlApplicationCreateRequest: type: object required: - - primary_request_url + - name properties: name: type: string - description: Name of the External LAML Handler. - example: My External LAML Handler - used_for: - type: string - enum: - - calling - - messaging - description: Used for of the External LAML Handler. - example: calling - default: calling - primary_request_url: - type: string - description: Primary request url of the External LAML Handler. - example: https://primary.com - primary_request_method: + example: My cXML Application + description: Name of the cXML Application. + handle_calls_using: + allOf: + - $ref: '#/components/schemas/HandleCallsUsing' + example: script + description: Indicates whether the call will be handled by a script or an external URL. + call_handler_url: type: string - enum: - - GET - - POST - description: Primary request method of the External LAML Handler. + example: https://example.com/cxml + description: Call handler URL + call_handler_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' example: GET + description: Call handler URL method default: POST - fallback_request_url: - type: string - description: Fallback request url of the External LAML Handler. - example: https://fallback.com - fallback_request_method: + call_handler_fallback_url: type: string - enum: - - GET - - POST - description: Fallback request method of the External LAML Handler. + example: https://example.com/cxml + description: Call handler callback URL. + call_handler_fallback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' example: GET + description: Call handler fallback method. default: POST - status_callback_url: + call_status_callback_url: type: string - description: Status callback url of the External LAML Handler. example: https://callback.com - status_callback_method: - type: string - enum: - - GET - - POST - description: Status callback method of the External LAML Handler. - example: POST + description: Call status callback URL + call_status_callback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call status callback method. default: POST - ExternalLAMLHandlerListResponse: + call_handler_script: + type: string + example: |- + + + https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3 + + description: Script to handle to call. + CxmlApplicationCreateStatusCode422: + type: object + required: + - errors + properties: + errors: + type: array + items: + $ref: '#/components/schemas/Types.StatusCodes.StatusCode422Error' + example: + errors: + - type: validation_error + code: missing_required_parameter + message: Name is required + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#missing_required_parameter + CxmlApplicationListResponse: type: object required: - data @@ -3155,10 +3087,10 @@ components: data: type: array items: - $ref: '#/components/schemas/ExternalLAMLHandlerResponse' + $ref: '#/components/schemas/CxmlApplicationResponse' links: - $ref: '#/components/schemas/ExternalLAMLHandlerPaginationResponse' - ExternalLAMLHandlerPaginationResponse: + $ref: '#/components/schemas/CxmlApplicationPaginationResponse' + CxmlApplicationPaginationResponse: type: object required: - self @@ -3168,19 +3100,19 @@ components: self: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=0&page_size=50 description: Link of the current page - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=0&page_size=50 first: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=0&page_size=50 description: Link to the first page - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=0&page_size=50 next: type: string format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca description: Link to the next page - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca - ExternalLAMLHandlerResponse: + CxmlApplicationResponse: type: object required: - id @@ -3189,92 +3121,91 @@ components: - type - created_at - updated_at - - external_laml_handler + - cxml_application properties: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the ExternalLAMLHandler. example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the cXML Application. project_id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Project. example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. display_name: type: string - description: Display name of the ExternalLAMLHandler Fabric Resource example: Booking Assistant + description: Display name of the cXML Application Fabric Resource type: type: string + example: cxml_application description: Type of the Fabric Resource - example: external_laml_handler created_at: type: string format: date-time + example: 2024-10-17T14:14:53Z description: Date and time when the resource was created. - example: '2024-10-17T14:14:53Z' updated_at: type: string format: date-time + example: 2024-10-17T14:14:53Z description: Date and time when the resource was updated. - example: '2024-10-17T14:14:53Z' - external_laml_handler: + cxml_application: allOf: - - $ref: '#/components/schemas/ExternalLAMLHandler' - description: ExternalLAMLHandler data. - ExternalLAMLHandlerUpdateRequest: + - $ref: '#/components/schemas/CxmlApplication' + description: cXML Application data. + CxmlApplicationUpdateRequest: type: object properties: name: type: string - description: Name of the External LAML Handler. - example: My External LAML Handler - used_for: - type: string - enum: - - calling - - messaging - description: Used for of the External LAML Handler. - example: calling - default: calling - primary_request_url: - type: string - description: Primary request url of the External LAML Handler. - example: https://primary.com - primary_request_method: + example: My cXML Application + description: Name of the cXML Application. + handle_calls_using: + allOf: + - $ref: '#/components/schemas/HandleCallsUsing' + example: script + description: Indicates whether the call will be handled by a script or an external URL. + call_handler_url: type: string - enum: - - GET - - POST - description: Primary request method of the External LAML Handler. + example: https://example.com/cxml + description: Call handler URL + call_handler_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' example: GET + description: Call handler URL method default: POST - fallback_request_url: - type: string - description: Fallback request url of the External LAML Handler. - example: https://fallback.com - fallback_request_method: + call_handler_fallback_url: type: string - enum: - - GET - - POST - description: Fallback request method of the External LAML Handler. + example: https://example.com/cxml + description: Call handler callback URL. + call_handler_fallback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' example: GET + description: Call handler fallback method. default: POST - status_callback_url: + call_status_callback_url: type: string - description: Status callback url of the External LAML Handler. example: https://callback.com - status_callback_method: - type: string - enum: - - GET - - POST - description: Status callback method of the External LAML Handler. - example: POST + description: Call status callback URL + call_status_callback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call status callback method. default: POST - ExternalLamlHandlerCreateStatusCode422: + call_handler_script: + type: string + example: |- + + + https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3 + + description: Script to handle to call. + CxmlApplicationUpdateStatusCode422: type: object required: - errors @@ -3286,26 +3217,95 @@ components: example: errors: - type: validation_error - code: http_url_required - message: This value must be an HTTP or HTTPS URL. - attribute: status_callback_url - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#http_url_required - ExternalLamlHandlerUpdateStatusCode422: + code: missing_required_parameter + message: Name is required + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#missing_required_parameter + DataMap: + oneOf: + - $ref: '#/components/schemas/Output' + - $ref: '#/components/schemas/Expression' + - $ref: '#/components/schemas/Webhook' + title: DataMap union + Direction: + type: string + enum: + - inbound + - outbound + title: Direction enum + DisplayTypes: + type: string + enum: + - app + - room + - call + - subscriber + description: DisplayTypes + EmbedsTokensRequest: type: object required: - - errors + - token properties: - errors: + token: + type: string + example: c2c_7acc0e5e968706a032983cd80cdca219 + description: Click to Call Token + EmbedsTokensResponse: + type: object + required: + - token + properties: + token: + type: string + example: eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwiY2giOiJwdWMubHZoLm1lIiwidHlwIjoiU0FUIn0.. + description: Encrypted guest token. + EncryptionType: + type: string + enum: + - default + - required + - optional + description: Encryption + Expression: + type: object + required: + - expressions + properties: + expressions: type: array items: - $ref: '#/components/schemas/Types.StatusCodes.StatusCode422Error' - example: - errors: - - type: validation_error - code: http_url_required - message: This value must be an HTTP or HTTPS URL. - attribute: status_callback_url - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#http_url_required + type: object + properties: + string: + type: string + example: I want a refund + description: The actual input or value from the user or system. + pattern: + type: string + description: A regular expression pattern to validate or match the string. + output: + type: object + properties: + response: + type: string + example: Order placed + description: A static response text or message returned to the AI agents context. + action: + type: array + items: + $ref: '#/components/schemas/Action' + description: A list of actions to be performed upon matching. + required: + - response + description: An object that defines the `response` or `action` to be taken when the webhook is successfully triggered. + title: output + required: + - string + - pattern + - output + description: An array of objects that define patterns and corresponding actions. + title: expressions + title: Expression object ExternalSWMLHandler: type: object required: @@ -3322,45 +3322,45 @@ components: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the External SWML Handler. example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the External SWML Handler. name: type: string - description: Name of the External SWML Handler. example: My External SWML Handler + description: Name of the External SWML Handler. used_for: type: string enum: - calling - description: Used for of the External SWML Handler. example: calling + description: Used for of the External SWML Handler. primary_request_url: type: string - description: Primary request url of the External SWML Handler. example: https://primary.com + description: Primary request url of the External SWML Handler. primary_request_method: allOf: - $ref: '#/components/schemas/UrlMethodType' - description: Primary request method of the External SWML Handler. example: GET + description: Primary request method of the External SWML Handler. fallback_request_url: type: string - description: Fallback request url of the External SWML Handler. example: https://fallback.com + description: Fallback request url of the External SWML Handler. fallback_request_method: allOf: - $ref: '#/components/schemas/UrlMethodType' - description: Fallback request method of the External SWML Handler. example: GET + description: Fallback request method of the External SWML Handler. status_callback_url: type: string - description: Status callback url of the External SWML Handler. example: https://callback.com + description: Status callback url of the External SWML Handler. status_callback_method: allOf: - $ref: '#/components/schemas/UrlMethodType' - description: Status callback method of the External SWML Handler. example: POST + description: Status callback method of the External SWML Handler. ExternalSWMLHandlerAddress: type: object required: @@ -3376,34 +3376,34 @@ components: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Fabric Address. example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Unique ID of the Fabric Address. resource_id: allOf: - $ref: '#/components/schemas/uuid' - description: Fabric resource ID that the Fabric Address belongs to. example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Fabric resource ID that the Fabric Address belongs to. name: type: string - description: Name of the Fabric Address. example: justice-league + description: Name of the Fabric Address. display_name: type: string - description: Display name of the Fabric Address. example: Justice League + description: Display name of the Fabric Address. type: allOf: - $ref: '#/components/schemas/DisplayTypes' - description: Type of the Fabric Address. example: app + description: Type of the Fabric Address. cover_url: type: string - description: Cover url of the Fabric Address. example: https://coverurl.com + description: Cover url of the Fabric Address. preview_url: type: string - description: Preview url of the Fabric Address. example: https://previewurl.com + description: Preview url of the Fabric Address. channel: allOf: - $ref: '#/components/schemas/AddressChannel' @@ -3430,18 +3430,18 @@ components: self: type: string format: uri - description: Link of the current page example: https://{space_name}.signalwire.com/api/fabric/resources/external_swml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + description: Link of the current page first: type: string format: uri - description: Link to the first page example: https://{space_name}.signalwire.com/api/fabric/resources/external_swml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + description: Link to the first page next: type: string format: uri - description: Link to the next page example: https://{space_name}.signalwire.com/api/fabric/resources/external_swml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page ExternalSWMLHandlerCreateRequest: type: object required: @@ -3449,50 +3449,50 @@ components: properties: name: type: string - description: Name of the External SWML Handler. example: My External SWML Handler + description: Name of the External SWML Handler. used_for: type: string enum: - calling - description: Used for of the External SWML Handler. example: calling + description: Used for of the External SWML Handler. default: calling primary_request_url: type: string - description: Primary request url of the External SWML Handler. example: https://primary.com + description: Primary request url of the External SWML Handler. primary_request_method: type: string enum: - GET - POST - description: Primary request method of the External SWML Handler. example: GET + description: Primary request method of the External SWML Handler. default: POST fallback_request_url: type: string - description: Fallback request url of the External SWML Handler. example: https://fallback.com + description: Fallback request url of the External SWML Handler. fallback_request_method: type: string enum: - GET - POST - description: Fallback request method of the External SWML Handler. example: GET + description: Fallback request method of the External SWML Handler. default: POST status_callback_url: type: string - description: Status callback url of the External SWML Handler. example: https://callback.com + description: Status callback url of the External SWML Handler. status_callback_method: type: string enum: - GET - POST - description: Status callback method of the External SWML Handler. example: POST + description: Status callback method of the External SWML Handler. default: POST ExternalSWMLHandlerListResponse: type: object @@ -3516,18 +3516,18 @@ components: self: type: string format: uri - description: Link of the current page example: https://{space_name}.signalwire.com/api/fabric/resources/external_swml_handlers?page_number=0&page_size=50 + description: Link of the current page first: type: string format: uri - description: Link to the first page example: https://{space_name}.signalwire.com/api/fabric/resources/external_swml_handlers?page_number=0&page_size=50 + description: Link to the first page next: type: string format: uri - description: Link to the next page example: https://{space_name}.signalwire.com/api/fabric/resources/external_swml_handlers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page ExternalSWMLHandlerResponse: type: object required: @@ -3542,31 +3542,31 @@ components: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the External SWML Handler. example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the External SWML Handler. project_id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Project. example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. display_name: type: string - description: Display name of the External SWML Handler Fabric Resource example: Booking Assistant + description: Display name of the External SWML Handler Fabric Resource type: type: string - description: Type of the Fabric Resource example: external_swml_handler + description: Type of the Fabric Resource created_at: type: string format: date-time + example: 2024-10-17T14:14:53Z description: Date and time when the resource was created. - example: '2024-10-17T14:14:53Z' updated_at: type: string format: date-time + example: 2024-10-17T14:14:53Z description: Date and time when the resource was updated. - example: '2024-10-17T14:14:53Z' external_swml_handler: allOf: - $ref: '#/components/schemas/ExternalSWMLHandler' @@ -3576,50 +3576,50 @@ components: properties: name: type: string - description: Name of the External SWML Handler. example: My External SWML Handler + description: Name of the External SWML Handler. used_for: type: string enum: - calling - description: Used for of the External SWML Handler. example: calling + description: Used for of the External SWML Handler. default: calling primary_request_url: type: string - description: Primary request url of the External SWML Handler. example: https://primary.com + description: Primary request url of the External SWML Handler. primary_request_method: type: string enum: - GET - POST - description: Primary request method of the External SWML Handler. example: GET + description: Primary request method of the External SWML Handler. default: POST fallback_request_url: type: string - description: Fallback request url of the External SWML Handler. example: https://fallback.com + description: Fallback request url of the External SWML Handler. fallback_request_method: type: string enum: - GET - POST - description: Fallback request method of the External SWML Handler. example: GET + description: Fallback request method of the External SWML Handler. default: POST status_callback_url: type: string - description: Status callback url of the External SWML Handler. example: https://callback.com + description: Status callback url of the External SWML Handler. status_callback_method: type: string enum: - GET - POST - description: Status callback method of the External SWML Handler. example: POST + description: Status callback method of the External SWML Handler. default: POST ExternalSwmlHandlerCreateStatusCode422: type: object @@ -3669,33 +3669,33 @@ components: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Fabric Address. example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Unique ID of the Fabric Address. name: type: string - description: Name of the Fabric Address. example: justice-league + description: Name of the Fabric Address. display_name: type: string - description: Display name of the Fabric Address. example: Justice League + description: Display name of the Fabric Address. type: allOf: - $ref: '#/components/schemas/DisplayTypes' - description: Type of the Fabric Address. example: app + description: Type of the Fabric Address. cover_url: type: string - description: Cover url of the Fabric Address. example: https://coverurl.com + description: Cover url of the Fabric Address. preview_url: type: string - description: Preview url of the Fabric Address. example: https://previewurl.com + description: Preview url of the Fabric Address. locked: type: boolean - description: Locks the Fabric Address. This is used to prevent the Fabric Address from accepting calls. example: true + description: Locks the Fabric Address. This is used to prevent the Fabric Address from accepting calls. channel: allOf: - $ref: '#/components/schemas/AddressChannel' @@ -3703,8 +3703,8 @@ components: created_at: type: string format: date-time - description: Fabric Address Creation Date. example: 2024-05-06T12:20-12Z + description: Fabric Address Creation Date. FabricAddressPaginationResponse: type: object required: @@ -3715,18 +3715,18 @@ components: self: type: string format: uri - description: Link of the current page example: https://{space_name}.signalwire.com/api/fabric/addresses?page_number=0&page_size=50 + description: Link of the current page first: type: string format: uri - description: Link to the first page example: https://{space_name}.signalwire.com/api/fabric/addresses?page_number=0&page_size=50 + description: Link to the first page next: type: string format: uri - description: Link to the next page example: https://{space_name}.signalwire.com/api/fabric/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page FabricAddressesResponse: type: object required: @@ -3764,10 +3764,10 @@ components: type: array items: type: string - description: An array of required property names from the `properties` object. example: - name1 - name2 + description: An array of required property names from the `properties` object. GuestTokenCreateStatusCode422: type: object required: @@ -3797,8 +3797,8 @@ components: properties: description: type: string - description: A description of the property. example: Property description + description: A description of the property. nullable: type: boolean description: Whether the property can be null. @@ -3811,15 +3811,15 @@ components: type: array items: type: integer - description: An array of integers that are the possible values example: - 1 - 2 - 3 + description: An array of integers that are the possible values default: type: integer - description: The default integer value example: 5 + description: The default integer value description: Base interface for all property types title: Integer Function Property InviteTokenCreateStatusCode422: @@ -3862,32 +3862,32 @@ components: properties: name: type: string - description: Name of the language ('French', 'English', etc). example: French + description: Name of the language ('French', 'English', etc). code: type: string - description: Language code. For example, 'fr-FR'. example: fr-FR + description: Language code. For example, 'fr-FR'. voice: type: string - description: Voice to use for the language. For example, 'fr-FR-Neural2-B'. example: fr-FR-Neural2-B + description: Voice to use for the language. For example, 'fr-FR-Neural2-B'. function_fillers: type: array items: type: string - description: An array of strings to be used as fillers in the conversation when calling a `swaig function`. This helps the AI break silence between responses. example: - great - ok + description: An array of strings to be used as fillers in the conversation when calling a `swaig function`. This helps the AI break silence between responses. speech_fillers: type: array items: type: string - description: An array of strings to be used as fillers in the conversation. This helps the AI break silence between responses. example: - umm - hmm + description: An array of strings to be used as fillers in the conversation. This helps the AI break silence between responses. title: LanguagesWithFillers MessagingChannel: type: object @@ -3896,8 +3896,8 @@ components: properties: messaging: type: string - description: Messaging Channel of Fabric Address example: /external/resource_name?channel=messaging + description: Messaging Channel of Fabric Address NullProperty: type: object required: @@ -3911,8 +3911,8 @@ components: description: The type of parameter(s) the AI is passing to the function. description: type: string - description: A description of the property. example: Property Description + description: A description of the property. title: Null Function Property NumberProperty: type: object @@ -3921,8 +3921,8 @@ components: properties: description: type: string - description: A description of the property. example: Property description + description: A description of the property. nullable: type: boolean description: Whether the property can be null. @@ -3937,17 +3937,17 @@ components: anyOf: - type: integer - type: number - description: An array of integers that are the possible values example: - 1 - 2 - 3 + description: An array of integers that are the possible values default: anyOf: - type: integer - type: number - description: The default integer value example: 3 + description: The default integer value description: Base interface for all property types title: Number Function Property ObjectProperty: @@ -3957,8 +3957,8 @@ components: properties: description: type: string - description: A description of the property. example: Property description + description: A description of the property. nullable: type: boolean description: Whether the property can be null. @@ -3980,10 +3980,10 @@ components: type: array items: type: string - description: Required property names example: - name1 - name2 + description: Required property names description: Base interface for all property types title: Object Function Property OneOfProperty: @@ -4007,8 +4007,8 @@ components: properties: response: type: string - description: A static response text or message returned to the AI agents context. example: Order placed + description: A static response text or message returned to the AI agents context. action: type: array items: @@ -4029,18 +4029,18 @@ components: self: type: string format: uri - description: Link of the current page example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers/d369a402-7b43-4512-8735-9d5e1f387814/sip_endpoints?page_number=0&page_size=50 + description: Link of the current page first: type: string format: uri - description: Link to the first page example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers/d369a402-7b43-4512-8735-9d5e1f387814/sip_endpoints?page_number=0&page_size=50 + description: Link to the first page next: type: string format: uri - description: Link to the next page example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers/d369a402-7b43-4512-8735-9d5e1f387814/sip_endpoints?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page PlaybackBGAction: type: object required: @@ -4052,8 +4052,8 @@ components: file: type: string format: uri - description: URL or filepath of the audio file to play. example: https://cdn.signalwire.com/default-music/welcome.mp3 + description: URL or filepath of the audio file to play. wait: type: boolean description: Whether to wait for the audio file to finish playing before continuing. Default is `false`. @@ -4070,12 +4070,12 @@ components: properties: replace: type: string - description: The expression to replace. example: pizza + description: The expression to replace. with: type: string - description: The phonetic spelling of the expression. example: pissa + description: The phonetic spelling of the expression. ignore_case: type: boolean description: Whether the pronunciation replacement should ignore case. @@ -4096,20 +4096,20 @@ components: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Sip Endpoint. example: acaa5c49-be5e-4477-bce0-48f4b23b7720 + description: Unique ID of the Sip Endpoint. username: type: string - description: Username of the Sip Endpoint. example: justice-league + description: Username of the Sip Endpoint. caller_id: type: string - description: Caller ID of the Sip Endpoint. example: call-id-123 + description: Caller ID of the Sip Endpoint. send_as: type: string - description: Purchased or verified number example: '+14632322867' + description: Purchased or verified number ciphers: type: array items: @@ -4123,18 +4123,18 @@ components: encryption: allOf: - $ref: '#/components/schemas/EncryptionType' - description: Encryption requirement of the Sip Endpoint. example: optional + description: Encryption requirement of the Sip Endpoint. call_handler: allOf: - $ref: '#/components/schemas/CallHandlerType' - description: Call handler of the Sip Endpoint. example: ai_agent + description: Call handler of the Sip Endpoint. calling_handler_resource_id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Calling Handler Resource. example: f7078ea7-dc79-4763-96f6-725bf5829097 + description: Unique ID of the Calling Handler Resource. SWAIG: type: object properties: @@ -4167,8 +4167,8 @@ components: properties: web_hook_url: type: string - description: Default URL to send status callbacks and reports to. Authentication can also be set in the url in the format of `username:password@url.` example: username:password@https://example.com + description: Default URL to send status callbacks and reports to. Authentication can also be set in the url in the format of `username:password@url.` title: defaults SWAIGFunction: type: object @@ -4178,12 +4178,12 @@ components: properties: function: type: string - description: A unique name for the function. For example, 'get_weather'. example: get_weather + description: A unique name for the function. For example, 'get_weather'. description: type: string - description: A description of the context and purpose of the function, to explain to the agent when to use it. example: Get the weather information + description: A description of the context and purpose of the function, to explain to the agent when to use it. parameters: allOf: - $ref: '#/components/schemas/FunctionParameters' @@ -4210,19 +4210,19 @@ components: perform actions based on the input, or connect to external APIs or services in a serverless fashion. web_hook_url: type: string - description: Function-specific URL to send status callbacks and reports to. Takes precedence over a default setting. Authentication can also be set in the url in the format of `username:password@url.` example: username:password:https://statuscallback.com + description: Function-specific URL to send status callbacks and reports to. Takes precedence over a default setting. Authentication can also be set in the url in the format of `username:password@url.` wait_file: type: string format: uri - description: A file to play while the function is running. `wait_file_loops` can specify the amount of times that files should continuously play. Default is not set. example: https://cdn.signalwire.com/default-music/welcome.mp3 + description: A file to play while the function is running. `wait_file_loops` can specify the amount of times that files should continuously play. Default is not set. wait_file_loops: anyOf: - type: integer - type: string - description: The number of times to loop playing the file. Default is not set. example: 5 + description: The number of times to loop playing the file. Default is not set. title: functions SWAIGIncludes: type: object @@ -4234,14 +4234,14 @@ components: type: array items: type: string - description: Remote functions to fetch and include in your AI application. example: - transfer call - notify kitchen + description: Remote functions to fetch and include in your AI application. url: type: string - description: URL to fetch remote functions and include in your AI application. Authentication can also be set in the url in the format of `username:password@url`. example: username:password@https://example.com + description: URL to fetch remote functions and include in your AI application. Authentication can also be set in the url in the format of `username:password@url`. meta_data: type: object additionalProperties: {} @@ -4260,9 +4260,9 @@ components: properties: say: type: string + example: Welcome to Franklin's Pizza. description: A message to be spoken by the AI agent. title: say - example: Welcome to Franklin's Pizza. title: SayAction object SchemaType: oneOf: @@ -4286,12 +4286,12 @@ components: set_global_data: type: object additionalProperties: {} - description: A JSON object containing any global data, as a key-value map. This action sets the data in the `global_meta_data` to be globally referenced. - title: set_global_data example: small_size: 8 Inch large_size: 12 Inch closed: Monday + description: A JSON object containing any global data, as a key-value map. This action sets the data in the `global_meta_data` to be globally referenced. + title: set_global_data title: SetGlobalDataAction object SetMetaDataAction: type: object @@ -4301,11 +4301,11 @@ components: set_meta_data: type: object additionalProperties: {} - description: A JSON object containing any metadata, as a key-value map. This action sets the data in the `meta_data` to be referenced locally in the function. - title: set_meta_data example: extra_cheese: Can't do extra_large_pizza: Only on Friday + description: A JSON object containing any metadata, as a key-value map. This action sets the data in the `meta_data` to be referenced locally in the function. + title: set_meta_data title: SetMetaDataAction object SipEndpointCreateStatusCode422: type: object @@ -4379,8 +4379,8 @@ components: properties: description: type: string - description: A description of the property. example: Property description + description: A description of the property. nullable: type: boolean description: Whether the property can be null. @@ -4393,19 +4393,19 @@ components: type: array items: type: string - description: An array of strings that are the possible values example: - value1 - value2 - value3 + description: An array of strings that are the possible values default: type: string - description: The default string value example: default value + description: The default string value pattern: type: string - description: Regular expression pattern example: ^[a-zA-Z0-9_.-]*$ + description: Regular expression pattern format: allOf: - $ref: '#/components/schemas/StringFormat' @@ -4428,44 +4428,44 @@ components: properties: id: type: string - description: Unique ID of the Subscriber. example: d369a402-7b43-4512-8735-9d5e1f387814 + description: Unique ID of the Subscriber. email: type: string - description: Email of the Subscriber. example: johndoe@example.com + description: Email of the Subscriber. first_name: type: string - description: First name of the Subscriber. example: John + description: First name of the Subscriber. last_name: type: string - description: Last name of the Subscriber. example: Doe + description: Last name of the Subscriber. display_name: type: string - description: Display name of the Subscriber. example: John Doe + description: Display name of the Subscriber. job_title: type: string - description: Job title of the Subscriber. example: Software Engineer + description: Job title of the Subscriber. timezone: type: string - description: Timezone of the Subscriber. example: America/New_York + description: Timezone of the Subscriber. country: type: string - description: Country of the Subscriber. example: United States + description: Country of the Subscriber. region: type: string - description: Region of the Subscriber. example: New York + description: Region of the Subscriber. company_name: type: string - description: Company name of the Subscriber. example: SignalWire + description: Company name of the Subscriber. SubscriberAddress: type: object required: @@ -4481,50 +4481,50 @@ components: id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of a Subscriber Address. example: acaa5c49-be5e-4477-bce0-48f4b23b7720 + description: Unique ID of a Subscriber Address. resource_id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of a Subscriber Address. example: acaa5c49-be5e-4477-bce0-48f4b23b7720 + description: Unique ID of a Subscriber Address. name: type: string - description: Name of the Subscriber Address. example: reception + description: Name of the Subscriber Address. display_name: type: string - description: Display Name of the Subscriber Address. example: Reception + description: Display Name of the Subscriber Address. type: type: string - description: Type of the Subscriber Address. example: room + description: Type of the Subscriber Address. cover_url: type: string format: uri - description: Cover URL of the Subscriber Address. example: https://example.com/cover.webp + description: Cover URL of the Subscriber Address. preview_url: type: string format: uri - description: Preview URL of the Subscriber Address. example: https://example.com/preview.webp + description: Preview URL of the Subscriber Address. channels: type: object properties: video: type: string - description: Video Channel of the Subscriber Address. example: /public/reception?channel=video + description: Video Channel of the Subscriber Address. audio: type: string - description: Audio Channel of the Subscriber Address. example: /public/reception?channel=audio + description: Audio Channel of the Subscriber Address. messaging: type: string - description: Messaging Channel of the Subscriber Address. example: /public/reception?channel=messaging + description: Messaging Channel of the Subscriber Address. required: - video - audio @@ -4539,18 +4539,18 @@ components: self: type: string format: uri - description: Link of the current page example: https://{space_name}.signalwire.com/api/fabric/resources/external_swml_handlers?page_number=0&page_size=50 + description: Link of the current page first: type: string format: uri - description: Link to the first page example: https://{space_name}.signalwire.com/api/fabric/resources/external_swml_handlers?page_number=0&page_size=50 + description: Link to the first page next: type: string format: uri - description: Link to the next page example: https://{space_name}.signalwire.com/api/fabric/resources/external_swml_handlers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page SubscriberAddressesResponse: type: object required: @@ -4592,8 +4592,8 @@ components: description: List of up to 10 UUIDs representing the allowed Fabric addresses. expire_at: type: integer - description: A unixtime (the number of seconds since 1970-01-01 00:00:00) at which the token should no longer be valid. Defaults to 'two hours from now' example: 1725513600 + description: A unixtime (the number of seconds since 1970-01-01 00:00:00) at which the token should no longer be valid. Defaults to 'two hours from now' SubscriberGuestTokenCreateResponse: type: object required: @@ -4601,8 +4601,8 @@ components: properties: token: type: string - description: Guest Token example: eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwiY2giOiJwdWMuc2lnbmFsd2lyZS5jb20iLCJ0eXAiOiJTQVQifQ..8O4EJs349q97jAcd.H4GNrC6gsWdz91ArWF9ce00Cm62iHfsrFRRUUGW3e96j9C3IphiJXvHYHTmD4qMt8czZ8cniF8c53vVAIZF-yBQibejiMxwnqW6KkLct2EJoPUf9g-wQwM0-lGGj9iPx_7yprkQekFK-7svkLcKlo1voZyavxIsWQlXByppmR_ospVx2u8jbAab0ZjKJNEnr1yPF9oNkyMAnkpkS8k8PwKaxUHBc5SGumKlexUjL3ixZDR6UOcbApVXxrB-DmQBs3otOT7hzME7oKvR-6Xy0XJ1pt4Of7MEzNBUK5Z5NMjtFiA8IqwDlNJz3I5gn8hbjSZwSMJHRJGx2DKpNKiu6fcd-3i2VwCpnKHaNUybMJ5gV3cTNfTFJQBSearCLv-7gMx6Gqy9FF_Hm2bGlfnjTQ9BCsCqXBkQ9EQD6yboi2uUhPyLmpzPqlrBc9ik0c3qR5ey5Jym_VnZXaT_S5NxjzIjLzvs33GOKiooGMsBWOm6mzTPcf398xaSErT4dF2wXwtZANou7Dt4BoTKa.DcLVYpma-iItaGhaOStu9A + description: Guest Token SubscriberInviteTokenCreateRequest: type: object required: @@ -4614,8 +4614,8 @@ components: description: Unique ID of a Subscriber Address expires_at: type: integer - description: A unixtime (the number of seconds since 1970-01-01 00:00:00) at which the token should no longer be valid. Defaults to 'two hours from now' example: 1725513600 + description: A unixtime (the number of seconds since 1970-01-01 00:00:00) at which the token should no longer be valid. Defaults to 'two hours from now' SubscriberInviteTokenCreateResponse: type: object required: @@ -4623,8 +4623,8 @@ components: properties: token: type: string - description: Invite Token example: eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwiY2giOiJwdWMuc2lnbmFsd2lyZS5jb20iLCJ0eXAiOiJTQVQifQ..8O4EJs349q97jAcd.H4GNrC6gsWdz91ArWF9ce00Cm62iHfsrFRRUUGW3e96j9C3IphiJXvHYHTmD4qMt8czZ8cniF8c53vVAIZF-yBQibejiMxwnqW6KkLct2EJoPUf9g-wQwM0-lGGj9iPx_7yprkQekFK-7svkLcKlo1voZyavxIsWQlXByppmR_ospVx2u8jbAab0ZjKJNEnr1yPF9oNkyMAnkpkS8k8PwKaxUHBc5SGumKlexUjL3ixZDR6UOcbApVXxrB-DmQBs3otOT7hzME7oKvR-6Xy0XJ1pt4Of7MEzNBUK5Z5NMjtFiA8IqwDlNJz3I5gn8hbjSZwSMJHRJGx2DKpNKiu6fcd-3i2VwCpnKHaNUybMJ5gV3cTNfTFJQBSearCLv-7gMx6Gqy9FF_Hm2bGlfnjTQ9BCsCqXBkQ9EQD6yboi2uUhPyLmpzPqlrBc9ik0c3qR5ey5Jym_VnZXaT_S5NxjzIjLzvs33GOKiooGMsBWOm6mzTPcf398xaSErT4dF2wXwtZANou7Dt4BoTKa.DcLVYpma-iItaGhaOStu9A + description: Invite Token SubscriberListResponse: type: object required: @@ -4647,18 +4647,18 @@ components: self: type: string format: uri - description: Link of the current page example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=0&page_size=50 + description: Link of the current page first: type: string format: uri - description: Link to the first page example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=0&page_size=50 + description: Link to the first page next: type: string format: uri - description: Link to the next page example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page SubscriberRequest: type: object required: @@ -4666,46 +4666,46 @@ components: properties: password: type: string + example: password123 minLength: 8 maxLength: 72 description: Password of the Subscriber. Defaults to a secure random password if not provided. - example: password123 email: type: string - description: Email of the Subscriber. example: johndoe@example.com + description: Email of the Subscriber. first_name: type: string - description: First name of the Subscriber. example: John + description: First name of the Subscriber. last_name: type: string - description: Last name of the Subscriber. example: Doe + description: Last name of the Subscriber. display_name: type: string - description: Display name of the Subscriber. example: John Doe + description: Display name of the Subscriber. job_title: type: string - description: Job title of the Subscriber. example: Software Engineer + description: Job title of the Subscriber. timezone: type: string - description: Timezone of the Subscriber. example: America/New_York + description: Timezone of the Subscriber. country: type: string - description: Country of the Subscriber. example: United States + description: Country of the Subscriber. region: type: string - description: Region of the Subscriber. example: New York + description: Region of the Subscriber. company_name: type: string - description: Company name of the Subscriber. example: SignalWire + description: Company name of the Subscriber. SubscriberResponse: type: object required: @@ -4719,16 +4719,16 @@ components: properties: id: type: string - description: Unique ID of the request. example: d369a402-7b43-4512-8735-9d5e1f387814 + description: Unique ID of the request. project_id: type: string - description: Unique ID of the project. example: d369a402-7b43-4512-8735-9d5e1f387814 + description: Unique ID of the project. display_name: type: string - description: Display name of the Subscriber. example: John Doe + description: Display name of the Subscriber. type: type: string enum: @@ -4737,13 +4737,13 @@ components: created_at: type: string format: date-time + example: 2024-10-17T14:14:53Z description: Date and time when the resource was created. - example: '2024-10-17T14:14:53Z' updated_at: type: string format: date-time + example: 2024-10-17T14:14:53Z description: Date and time when the resource was updated. - example: '2024-10-17T14:14:53Z' subscriber: allOf: - $ref: '#/components/schemas/Subscriber' @@ -4756,20 +4756,20 @@ components: properties: username: type: string - description: Username of the Sip Endpoint. example: justice-league + description: Username of the Sip Endpoint. password: type: string - description: Password of the Sip Endpoint. example: hack-me-if-you-can + description: Password of the Sip Endpoint. caller_id: type: string - description: Caller ID of the Sip Endpoint. example: call-id-123 + description: Caller ID of the Sip Endpoint. send_as: type: string - description: The Number to send as. example: '+14632322867' + description: The Number to send as. ciphers: type: array items: @@ -4783,28 +4783,28 @@ components: encryption: allOf: - $ref: '#/components/schemas/EncryptionType' - description: Encryption requirement of the Sip Endpoint. example: optional + description: Encryption requirement of the Sip Endpoint. default: default SubscriberSipEndpointBaseRequestUpdate: type: object properties: username: type: string - description: Username of the Sip Endpoint. example: justice-league + description: Username of the Sip Endpoint. password: type: string - description: Password of the Sip Endpoint. example: hack-me-if-you-can + description: Password of the Sip Endpoint. caller_id: type: string - description: Caller ID of the Sip Endpoint. example: call-id-123 + description: Caller ID of the Sip Endpoint. send_as: type: string - description: The Number to send as. example: '+14632322867' + description: The Number to send as. ciphers: type: array items: @@ -4818,8 +4818,8 @@ components: encryption: allOf: - $ref: '#/components/schemas/EncryptionType' - description: Encryption requirement of the Sip Endpoint. example: optional + description: Encryption requirement of the Sip Endpoint. default: default SubscriberSipEndpointCreateRequest: oneOf: @@ -4831,8 +4831,8 @@ components: call_handler: allOf: - $ref: '#/components/schemas/CallHandlerPassthroughType' - description: Call handler of the Sip Endpoint. example: block-pstn + description: Call handler of the Sip Endpoint. allOf: - $ref: '#/components/schemas/SubscriberSipEndpointBaseRequest' title: Create Subscriber SIP Endpoint with Call Handler @@ -4842,8 +4842,8 @@ components: call_handler: allOf: - $ref: '#/components/schemas/CallHandlerPassthroughType' - description: Call handler of the Sip Endpoint. example: block-pstn + description: Call handler of the Sip Endpoint. allOf: - $ref: '#/components/schemas/SubscriberSipEndpointBaseRequestUpdate' title: Create Subscriber SIP Endpoint with Call Handler @@ -4853,8 +4853,8 @@ components: calling_handler_resource_id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Calling Handler Resource. example: f7078ea7-dc79-4763-96f6-725bf5829097 + description: Unique ID of the Calling Handler Resource. allOf: - $ref: '#/components/schemas/SubscriberSipEndpointBaseRequest' title: Create Subscriber SIP Endpoint with Resource ID @@ -4864,8 +4864,8 @@ components: calling_handler_resource_id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Calling Handler Resource. example: f7078ea7-dc79-4763-96f6-725bf5829097 + description: Unique ID of the Calling Handler Resource. allOf: - $ref: '#/components/schemas/SubscriberSipEndpointBaseRequestUpdate' title: Create Subscriber SIP Endpoint with Resource ID @@ -4891,8 +4891,8 @@ components: call_handler: allOf: - $ref: '#/components/schemas/CallHandlerPassthroughType' - description: Call handler of the Sip Endpoint. example: block-pstn + description: Call handler of the Sip Endpoint. allOf: - $ref: '#/components/schemas/SubscriberSipEndpointBaseRequest' title: Update Subscriber SIP Endpoint with Call Handler @@ -4902,8 +4902,8 @@ components: call_handler: allOf: - $ref: '#/components/schemas/CallHandlerPassthroughType' - description: Call handler of the Sip Endpoint. example: block-pstn + description: Call handler of the Sip Endpoint. allOf: - $ref: '#/components/schemas/SubscriberSipEndpointBaseRequestUpdate' title: Update Subscriber SIP Endpoint with Call Handler @@ -4913,8 +4913,8 @@ components: calling_handler_resource_id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Calling Handler Resource. example: f7078ea7-dc79-4763-96f6-725bf5829097 + description: Unique ID of the Calling Handler Resource. allOf: - $ref: '#/components/schemas/SubscriberSipEndpointBaseRequest' title: Update Subscriber SIP Endpoint with Resource ID @@ -4924,8 +4924,8 @@ components: calling_handler_resource_id: allOf: - $ref: '#/components/schemas/uuid' - description: Unique ID of the Calling Handler Resource. example: f7078ea7-dc79-4763-96f6-725bf5829097 + description: Unique ID of the Calling Handler Resource. allOf: - $ref: '#/components/schemas/SubscriberSipEndpointBaseRequestUpdate' title: Update Subscriber SIP Endpoint with Resource ID @@ -4936,53 +4936,53 @@ components: properties: reference: type: string - description: A string that uniquely identifies the subscriber. Often it's an email, but can be any other string. example: john.doe@example.com + description: A string that uniquely identifies the subscriber. Often it's an email, but can be any other string. expire_at: type: integer - description: A unixtime (the number of seconds since 1970-01-01 00:00:00) at which the token should no longer be valid. Defaults to 'two hours from now' example: 1693823284 + description: A unixtime (the number of seconds since 1970-01-01 00:00:00) at which the token should no longer be valid. Defaults to 'two hours from now' application_id: allOf: - $ref: '#/components/schemas/uuid' - description: The ID of the application that the token is associated with. example: 123e4567-e89b-12d3-a456-426614174000 + description: The ID of the application that the token is associated with. password: type: string - description: Set or update the subscriber's password. Omit this field or pass an empty string if you don't want to update the password. example: password123 + description: Set or update the subscriber's password. Omit this field or pass an empty string if you don't want to update the password. first_name: type: string - description: Set or update the first name of the subscriber. example: John + description: Set or update the first name of the subscriber. last_name: type: string - description: Set or update the last name of the subscriber. example: Doe + description: Set or update the last name of the subscriber. display_name: type: string - description: Set or update the display name of the subscriber. example: John Doe + description: Set or update the display name of the subscriber. job_title: type: string - description: Set or update the job title of the subscriber. example: Software Engineer + description: Set or update the job title of the subscriber. time_zone: type: string - description: Set or update the time zone of the subscriber. example: America/New_York + description: Set or update the time zone of the subscriber. country: type: string - description: Set or update the country of the subscriber. example: US + description: Set or update the country of the subscriber. region: type: string - description: Set or update the region of the subscriber. example: CA + description: Set or update the region of the subscriber. company_name: type: string - description: Set or update the company name of the subscriber. example: SignalWire + description: Set or update the company name of the subscriber. SubscriberTokenResponse: type: object required: @@ -4992,13 +4992,13 @@ components: subscriber_id: allOf: - $ref: '#/components/schemas/uuid' - description: The ID of the subscriber that the token is associated with. example: 32d94154-9297-418c-9a85-4a69e0c67c30 + description: The ID of the subscriber that the token is associated with. token: allOf: - $ref: '#/components/schemas/uuid' - description: The token that is associated with the subscriber. example: eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwidHlwIjoiU0FUIn0..HahMYxqt4uI14qSH.daMTBR53lfEfEFiVAhr0pPSRqZhEod_YzavoG9-4ieiRQvl8GtP3FFNx0VLfkJqNcjUNbAaiKrEMnfOtCnQjiq1Kn0Iq90MYdM00QJ7cTaQ88vfbqdE92p-d4oDeg6z_vAsgrFgEobmrlDQndKxCWOD921iYxyLP0vqNaokN3kIM06iAWu_UpnTYEeR1l068xhK2xb6P9wbI2FDKFQoMgCdbjvABF7RRyaEzUoaQ5_Wj53YO6PFYuYcPbqMhdtvSSQiK3Nw6bFer2OfFs6s2RTukRGsocgC5Q7pwQwzYky-YgrPCb-pVAJajVSXUJrayvOi8-TeyCpICW4zTeJa5icZ380cWtafUH4rEB_FOJciJf0BCy48ajbz0NE121uBl2mqA1HE0_mQA53UqVjbrbE9hVOfnN4KpwOfULhIjx54tIekJQgG-aK2AYsLPCDNhuSpHvdwJcTM0Gzy3mS2veyaDV8q2qN5F_F9OThTQzcfy.AXzVNrJc_pGVPsticsVM0w + description: The token that is associated with the subscriber. SubscriberTokenStatusCode422: type: object required: @@ -5050,8 +5050,8 @@ components: - type: array items: type: string - description: The function names to toggle. example: Discount + description: The function names to toggle. required: - active - function @@ -5091,9 +5091,9 @@ components: anyOf: - type: string - type: object + example: closed description: The key of the global data to unset from the `global_meta_data`. You can also reset the `global_meta_data` by passing in a new object. title: unset_global_data - example: closed title: UnsetGlobalDataAction object UnsetMetaDataAction: type: object @@ -5104,9 +5104,9 @@ components: anyOf: - type: string - type: object + example: extra_cheese description: The key of the local data to unset from the `meta_data`. You can also reset the `meta_data` by passing in a new object. title: unset_meta_data - example: extra_cheese title: UnsetMetaDataAction object UrlMethodType: type: string @@ -5127,9 +5127,9 @@ components: properties: user_input: type: string + example: I want a tasty Pizza. description: Used to inject text into the users queue as if they input the data themselves. title: user_input - example: I want a tasty Pizza. title: UserInputAction object VideoChannel: type: object @@ -5138,8 +5138,8 @@ components: properties: video: type: string - description: Video Channel of Fabric Address example: /external/resource_name?channel=video + description: Video Channel of Fabric Address Webhook: type: object required: @@ -5161,27 +5161,27 @@ components: - type: array items: type: string - description: A string or array of strings that represent the keys to be used for error handling. This will match the key(s) in the response from the API call. example: failed + description: A string or array of strings that represent the keys to be used for error handling. This will match the key(s) in the response from the API call. url: type: string - description: The endpoint for the external service or API. example: https://example.com + description: The endpoint for the external service or API. foreach: type: object properties: input_key: type: string - description: The key to be used to access the current element in the array. example: success + description: The key to be used to access the current element in the array. output_key: type: string - description: The key that can be referenced in the output of the `foreach` iteration. The values that are stored from `append` will be stored in this key. example: deliverer + description: The key that can be referenced in the output of the `foreach` iteration. The values that are stored from `append` will be stored in this key. max: type: integer - description: The max amount of elements that are iterated over in the array. This will start at the beginning of the array. example: 5 + description: The max amount of elements that are iterated over in the array. This will start at the beginning of the array. append: type: string description: |- @@ -5225,8 +5225,8 @@ components: properties: response: type: string - description: A static response text or message returned to the AI agents context. example: Order placed + description: A static response text or message returned to the AI agents context. action: type: array items: From 15093790733937aea40d8e54c9f6c3cafd4eb844 Mon Sep 17 00:00:00 2001 From: diego-signalwire Date: Wed, 9 Apr 2025 13:08:33 -0300 Subject: [PATCH 3/4] rename routes --- api/signalwire-rest/fabric-api/_spec_.yaml | 76 +++++++++---------- .../cxml-webhook-addresses/main.tsp | 2 +- .../cxml-webhook-addresses/models/core.tsp | 2 +- .../models/responses.tsp | 6 +- .../fabric-api/cxml-webhooks/main.tsp | 8 +- .../cxml-webhooks/models/responses.tsp | 10 +-- .../@typespec/openapi3/openapi.yaml | 26 +++---- 7 files changed, 65 insertions(+), 65 deletions(-) diff --git a/api/signalwire-rest/fabric-api/_spec_.yaml b/api/signalwire-rest/fabric-api/_spec_.yaml index 3b65a85b..81ff3510 100644 --- a/api/signalwire-rest/fabric-api/_spec_.yaml +++ b/api/signalwire-rest/fabric-api/_spec_.yaml @@ -3901,7 +3901,7 @@ tags: - name: Fabric Address - name: FreeSWITCH Connectors - name: LAML Applications - - name: CXML Scripts + - name: cXML Scripts - name: Relay Applications - name: Resources - name: SIP Endpoints @@ -7447,26 +7447,26 @@ paths: - Not Found tags: - External SWML Handler - /resources/laml_bins/{id}/addresses: + /resources/cxml_scripts/{id}/addresses: get: tags: - - CXML Scripts - summary: List CXML Script Addresses + - cXML Scripts + summary: List cXML Script Addresses description: | - Returns a list of CXML Script addresses. + Returns a list of cXML Script addresses. operationId: listCxmlScriptAddresses parameters: - name: id in: path required: true - description: The ID of the CXML Script + description: The ID of the cXML Script schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A list of CXML Script addresses + description: A list of cXML Script addresses content: application/json: schema: @@ -7540,15 +7540,15 @@ paths: type: string format: uri example: /public/reception?channel=messaging - /resources/laml_bins: + /resources/cxml_scripts: get: tags: - - CXML Scripts - summary: List CXML Scripts + - cXML Scripts + summary: List cXML Scripts operationId: listCxmlScripts responses: '200': - description: A list of CXML Scripts + description: A list of cXML Scripts content: application/json: schema: @@ -7585,7 +7585,7 @@ paths: id: type: string format: uuid - description: A unique identifier for the CXML Script + description: A unique identifier for the cXML Script - type: object properties: contents: @@ -7614,11 +7614,11 @@ paths: https://example.signalwire.com/laml-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e display_name: type: string - example: My CXML Script + example: My cXML Script post: tags: - - CXML Scripts - summary: Create CXML Script + - cXML Scripts + summary: Create cXML Script operationId: CxmlScript_create requestBody: required: true @@ -7638,7 +7638,7 @@ paths: encoding="UTF-8"?> responses: '200': - description: A CXML Script + description: A cXML Script content: application/json: schema: @@ -7673,7 +7673,7 @@ paths: id: type: string format: uuid - description: A unique identifier for the CXML Script + description: A unique identifier for the cXML Script - type: object properties: contents: @@ -7702,7 +7702,7 @@ paths: https://example.signalwire.com/laml-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e display_name: type: string - example: My CXML Script + example: My cXML Script '422': description: Unprocessable Entity content: @@ -7732,26 +7732,26 @@ paths: message: Name must be present attribute: name url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - /resources/laml_bins/{id}: + /resources/cxml_scripts/{id}: get: tags: - - CXML Scripts - summary: Get CXML Script + - cXML Scripts + summary: Get cXML Script description: | - Returns a CXML Script by ID. + Returns a cXML Script by ID. operationId: getCxmlScript parameters: - name: id in: path required: true - description: The ID of the CXML Script + description: The ID of the cXML Script schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A CXML Script + description: A cXML Script content: application/json: schema: @@ -7786,7 +7786,7 @@ paths: id: type: string format: uuid - description: A unique identifier for the CXML Script + description: A unique identifier for the cXML Script - type: object properties: contents: @@ -7817,19 +7817,19 @@ paths: https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e display_name: type: string - example: My CXML Script + example: My cXML Script put: tags: - - CXML Scripts - summary: Update CXML Script + - cXML Scripts + summary: Update cXML Script description: | - Updates a CXML Script by ID. + Updates a cXML Script by ID. operationId: updateCxmlScript parameters: - name: id in: path required: true - description: The ID of the CXML Script + description: The ID of the cXML Script schema: type: string format: uuid @@ -7844,7 +7844,7 @@ paths: properties: name: type: string - example: My CXML Script + example: My cXML Script - type: object properties: contents: @@ -7856,7 +7856,7 @@ paths: - play: say:Hello from SignalWire! responses: '200': - description: A CXML Script + description: A cXML Script content: application/json: schema: @@ -7891,7 +7891,7 @@ paths: id: type: string format: uuid - description: A unique identifier for the CXML Script + description: A unique identifier for the cXML Script - type: object properties: contents: @@ -7922,7 +7922,7 @@ paths: https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e display_name: type: string - example: My CXML Script + example: My cXML Script '422': description: Unprocessable Entity content: @@ -7954,16 +7954,16 @@ paths: url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter delete: tags: - - CXML Scripts - summary: Delete CXML Script + - cXML Scripts + summary: Delete cXML Script description: | - Deletes a CXML Script by ID. + Deletes a cXML Script by ID. operationId: deleteCxmlScript parameters: - name: id in: path required: true - description: The ID of the CXML Script + description: The ID of the cXML Script schema: type: string format: uuid diff --git a/api/signalwire-rest/fabric-api/cxml-webhook-addresses/main.tsp b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/main.tsp index 658957a9..7f93c250 100644 --- a/api/signalwire-rest/fabric-api/cxml-webhook-addresses/main.tsp +++ b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/main.tsp @@ -7,7 +7,7 @@ import "../../types"; using TypeSpec.Http; using Types.StatusCodes; -@route("/resources/external_laml_handlers/{external_laml_handler_id}/addresses") +@route("/resources/cxml_webhooks/{cxml_webhook_id}/addresses") namespace FabricAPI.CXMLWebhookAddresses { @tag("cXML Webhook") @friendlyName("cXML Webhooks") diff --git a/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/core.tsp b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/core.tsp index 9d0b4a45..dd6f4258 100644 --- a/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/core.tsp +++ b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/core.tsp @@ -8,7 +8,7 @@ using TypeSpec.OpenAPI; model CXMLWebhookIDPath { @doc("Unique ID of a CXML Webhook.") @path - external_laml_handler_id: uuid + cxml_webhook_id: uuid } model CXMLWebhookAddress { diff --git a/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/responses.tsp b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/responses.tsp index bcddbcc3..5bae2200 100644 --- a/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/responses.tsp +++ b/api/signalwire-rest/fabric-api/cxml-webhook-addresses/models/responses.tsp @@ -5,14 +5,14 @@ model CXMLWebhookAddressListResponse { model CXMLWebhookAddressPaginationResponse { @doc("Link of the current page") - @example("https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50") self: url; @doc("Link to the first page") - @example("https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50") first: url; @doc("Link to the next page") - @example("https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca") next: url; } diff --git a/api/signalwire-rest/fabric-api/cxml-webhooks/main.tsp b/api/signalwire-rest/fabric-api/cxml-webhooks/main.tsp index 3556546d..39d7b8c2 100644 --- a/api/signalwire-rest/fabric-api/cxml-webhooks/main.tsp +++ b/api/signalwire-rest/fabric-api/cxml-webhooks/main.tsp @@ -9,7 +9,7 @@ import "../../types"; using TypeSpec.Http; using Types.StatusCodes; -@route("/resources/external_laml_handlers") +@route("/resources/cxml_webhooks") namespace FabricAPI.CXMLWebhooks { @tag("cXML Webhook") @friendlyName("cXML Webhooks") @@ -25,7 +25,7 @@ namespace FabricAPI.CXMLWebhooks { @doc("Returns an cXML Webhook by ID") read(...CXMLWebhookID): { @statusCode statusCode: 200; - @body external_laml_handler: CXMLWebhookResponse; + @body cxml_webhook: CXMLWebhookResponse; } | StatusCode401 | StatusCode404; @@ -33,7 +33,7 @@ namespace FabricAPI.CXMLWebhooks { @summary("Create cXML Webhook") @doc("Creates an cXML Webhook") @post create(...CXMLWebhookCreateRequest): - { @statusCode statusCode: 201; @body external_laml_handler: CXMLWebhookResponse; } | + { @statusCode statusCode: 201; @body cxml_webhook: CXMLWebhookResponse; } | StatusCode401 | StatusCode404 | CXMLWebhookCreateStatusCode422; @@ -41,7 +41,7 @@ namespace FabricAPI.CXMLWebhooks { @summary("Update cXML Webhook") @doc("Updates an cXML Webhook by ID") @patch update(...CXMLWebhookID, ...CXMLWebhookUpdateRequest): { - @statusCode statusCode: 200; @body external_laml_handler: CXMLWebhookResponse; + @statusCode statusCode: 200; @body cxml_webhook: CXMLWebhookResponse; } | StatusCode401 | StatusCode404 | diff --git a/api/signalwire-rest/fabric-api/cxml-webhooks/models/responses.tsp b/api/signalwire-rest/fabric-api/cxml-webhooks/models/responses.tsp index 4c8c6c19..1bbf8cfe 100644 --- a/api/signalwire-rest/fabric-api/cxml-webhooks/models/responses.tsp +++ b/api/signalwire-rest/fabric-api/cxml-webhooks/models/responses.tsp @@ -13,7 +13,7 @@ model CXMLWebhookResponse { display_name: string; @doc("Type of the Fabric Resource") - @example("external_laml_handler") + @example("cxml_webhook") type: string; @doc("Date and time when the resource was created.") @@ -25,7 +25,7 @@ model CXMLWebhookResponse { updated_at: utcDateTime; @doc("CXMLWebhook data.") - external_laml_handler: CXMLWebhook; + cxml_webhook: CXMLWebhook; } model CXMLWebhookListResponse { @@ -35,14 +35,14 @@ model CXMLWebhookListResponse { model CXMLWebhookPaginationResponse { @doc("Link of the current page") - @example("https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=0&page_size=50") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks?page_number=0&page_size=50") self: url; @doc("Link to the first page") - @example("https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=0&page_size=50") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks?page_number=0&page_size=50") first: url; @doc("Link to the next page") - @example("https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca") next: url; } diff --git a/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml b/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml index 49276f34..1ef456a2 100644 --- a/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml +++ b/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml @@ -586,7 +586,7 @@ paths: - Not Found tags: - cXML Application - /resources/external_laml_handlers: + /resources/cxml_webhooks: get: operationId: CXMLWebhooks_list summary: List cXML Webhooks @@ -659,7 +659,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CXMLWebhookCreateRequest' - /resources/external_laml_handlers/{external_laml_handler_id}/addresses: + /resources/cxml_webhooks/{cxml_webhook_id}/addresses: get: operationId: CXMLWebhookAddresses_list summary: List cXML Webhook Addresses @@ -691,7 +691,7 @@ paths: - Not Found tags: - cXML Webhook - /resources/external_laml_handlers/{id}: + /resources/cxml_webhooks/{id}: get: operationId: CXMLWebhooks_read summary: Get cXML Webhook @@ -1495,7 +1495,7 @@ components: schema: $ref: '#/components/schemas/uuid' CXMLWebhookIDPath: - name: external_laml_handler_id + name: cxml_webhook_id in: path required: true description: Unique ID of a CXML Webhook. @@ -2428,17 +2428,17 @@ components: self: type: string format: uri - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 description: Link of the current page first: type: string format: uri - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 description: Link to the first page next: type: string format: uri - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca description: Link to the next page CXMLWebhookCreateRequest: type: object @@ -2531,17 +2531,17 @@ components: self: type: string format: uri - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=0&page_size=50 + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks?page_number=0&page_size=50 description: Link of the current page first: type: string format: uri - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=0&page_size=50 + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks?page_number=0&page_size=50 description: Link to the first page next: type: string format: uri - example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca description: Link to the next page CXMLWebhookResponse: type: object @@ -2552,7 +2552,7 @@ components: - type - created_at - updated_at - - external_laml_handler + - cxml_webhook properties: id: allOf: @@ -2570,7 +2570,7 @@ components: description: Display name of the CXMLWebhook Fabric Resource type: type: string - example: external_laml_handler + example: cxml_webhook description: Type of the Fabric Resource created_at: type: string @@ -2582,7 +2582,7 @@ components: format: date-time example: 2024-10-17T14:14:53Z description: Date and time when the resource was updated. - external_laml_handler: + cxml_webhook: allOf: - $ref: '#/components/schemas/CXMLWebhook' description: CXMLWebhook data. From 7420f7af6cfd7619865d2f70ee7038d123a7ba4a Mon Sep 17 00:00:00 2001 From: diego-signalwire Date: Thu, 24 Apr 2025 15:47:19 -0300 Subject: [PATCH 4/4] updated _spec.yml --- api/signalwire-rest/fabric-api/_spec_.yaml | 444 ++++++++++++++++++--- 1 file changed, 396 insertions(+), 48 deletions(-) diff --git a/api/signalwire-rest/fabric-api/_spec_.yaml b/api/signalwire-rest/fabric-api/_spec_.yaml index 212ed609..57d7c616 100644 --- a/api/signalwire-rest/fabric-api/_spec_.yaml +++ b/api/signalwire-rest/fabric-api/_spec_.yaml @@ -61,11 +61,11 @@ components: description: Unique ID of a Sip Endpoint. schema: $ref: '#/components/schemas/uuid' - ExternalLAMLHandlerIDPath: - name: external_laml_handler_id + CXMLWebhookIDPath: + name: cxml_webhook_id in: path required: true - description: Unique ID of a External LAML Handler. + description: Unique ID of a CXML Webhook. schema: $ref: '#/components/schemas/uuid' ExternalSWMLHandlerIDPath: @@ -89,11 +89,11 @@ components: description: Unique ID of a Sip Endpoint. schema: $ref: "#/components/schemas/uuid" - ExternalLAMLHandlerID: + CXMLWebhookID: name: id in: path required: true - description: Unique ID of a External LAML Handler. + description: Unique ID of a CXML Webhook. schema: $ref: '#/components/schemas/uuid' ExternalSWMLHandlerID: @@ -3160,6 +3160,354 @@ components: allOf: - $ref: '#/components/schemas/SubscriberSipEndpointBaseRequest' title: Create Subscriber SIP Endpoint with Call Handler + CXMLWebhook: + type: object + required: + - id + - name + - used_for + - primary_request_url + - primary_request_method + - fallback_request_url + - fallback_request_method + - status_callback_url + - status_callback_method + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the CXML Webhook. + name: + type: string + example: My CXML Webhook + description: Name of the CXML Webhook. + used_for: + allOf: + - $ref: '#/components/schemas/UsedForType' + example: calling + description: Used for of the CXML Webhook. + primary_request_url: + type: string + example: https://primary.com + description: Primary request url of the CXML Webhook. + primary_request_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Primary request method of the CXML Webhook. + fallback_request_url: + type: string + example: https://fallback.com + description: Fallback request url of the CXML Webhook. + fallback_request_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Fallback request method of the CXML Webhook. + status_callback_url: + type: string + example: https://callback.com + description: Status callback url of the CXML Webhook. + status_callback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: POST + description: Status callback method of the CXML Webhook. + CXMLWebhookAddress: + type: object + required: + - id + - resource_id + - name + - display_name + - type + - cover_url + - preview_url + - channel + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Unique ID of the Fabric Address. + resource_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Fabric resource ID that the Fabric Address belongs to. + name: + type: string + example: justice-league + description: Name of the Fabric Address. + display_name: + type: string + example: Justice League + description: Display name of the Fabric Address. + type: + allOf: + - $ref: '#/components/schemas/DisplayTypes' + example: app + description: Type of the Fabric Address. + cover_url: + type: string + example: https://coverurl.com + description: Cover url of the Fabric Address. + preview_url: + type: string + example: https://previewurl.com + description: Preview url of the Fabric Address. + channel: + allOf: + - $ref: '#/components/schemas/AddressChannel' + description: Channels of the Fabric Address. + CXMLWebhookAddressListResponse: + type: object + required: + - data + - links + properties: + data: + type: array + items: + $ref: '#/components/schemas/CXMLWebhookAddress' + links: + $ref: '#/components/schemas/CXMLWebhookAddressPaginationResponse' + CXMLWebhookAddressPaginationResponse: + type: object + required: + - self + - first + - next + properties: + self: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + description: Link of the current page + first: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + description: Link to the first page + next: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page + CXMLWebhookCreateRequest: + type: object + required: + - primary_request_url + properties: + name: + type: string + example: My CXML Webhook + description: Name of the CXML Webhook. + used_for: + type: string + enum: + - calling + - messaging + example: calling + description: Used for of the CXML Webhook. + default: calling + primary_request_url: + type: string + example: https://primary.com + description: Primary request url of the CXML Webhook. + primary_request_method: + type: string + enum: + - GET + - POST + example: GET + description: Primary request method of the CXML Webhook. + default: POST + fallback_request_url: + type: string + example: https://fallback.com + description: Fallback request url of the CXML Webhook. + fallback_request_method: + type: string + enum: + - GET + - POST + example: GET + description: Fallback request method of the CXML Webhook. + default: POST + status_callback_url: + type: string + example: https://callback.com + description: Status callback url of the CXML Webhook. + status_callback_method: + type: string + enum: + - GET + - POST + example: POST + description: Status callback method of the CXML Webhook. + default: POST + CXMLWebhookCreateStatusCode422: + type: object + required: + - errors + properties: + errors: + type: array + items: + $ref: '#/components/schemas/Types.StatusCodes.StatusCode422Error' + example: + errors: + - type: validation_error + code: http_url_required + message: This value must be an HTTP or HTTPS URL. + attribute: status_callback_url + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#http_url_required + CXMLWebhookListResponse: + type: object + required: + - data + - links + properties: + data: + type: array + items: + $ref: '#/components/schemas/CXMLWebhookResponse' + links: + $ref: '#/components/schemas/CXMLWebhookPaginationResponse' + CXMLWebhookPaginationResponse: + type: object + required: + - self + - first + - next + properties: + self: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks?page_number=0&page_size=50 + description: Link of the current page + first: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks?page_number=0&page_size=50 + description: Link to the first page + next: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_webhooks?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page + CXMLWebhookResponse: + type: object + required: + - id + - project_id + - display_name + - type + - created_at + - updated_at + - cxml_webhook + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the CXMLWebhook. + project_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. + display_name: + type: string + example: Booking Assistant + description: Display name of the CXMLWebhook Fabric Resource + type: + type: string + example: cxml_webhook + description: Type of the Fabric Resource + created_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was created. + updated_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was updated. + cxml_webhook: + allOf: + - $ref: '#/components/schemas/CXMLWebhook' + description: CXMLWebhook data. + CXMLWebhookUpdateRequest: + type: object + properties: + name: + type: string + example: My CXML Webhook + description: Name of the CXML Webhook. + used_for: + type: string + enum: + - calling + - messaging + example: calling + description: Used for of the CXML Webhook. + default: calling + primary_request_url: + type: string + example: https://primary.com + description: Primary request url of the CXML Webhook. + primary_request_method: + type: string + enum: + - GET + - POST + example: GET + description: Primary request method of the CXML Webhook. + default: POST + fallback_request_url: + type: string + example: https://fallback.com + description: Fallback request url of the CXML Webhook. + fallback_request_method: + type: string + enum: + - GET + - POST + example: GET + description: Fallback request method of the CXML Webhook. + default: POST + status_callback_url: + type: string + example: https://callback.com + description: Status callback url of the CXML Webhook. + status_callback_method: + type: string + enum: + - GET + - POST + example: POST + description: Status callback method of the CXML Webhook. + default: POST + CXMLWebhookUpdateStatusCode422: + type: object + required: + - errors + properties: + errors: + type: array + items: + $ref: '#/components/schemas/Types.StatusCodes.StatusCode422Error' + example: + errors: + - type: validation_error + code: http_url_required + message: This value must be an HTTP or HTTPS URL. + attribute: status_callback_url + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#http_url_required CallHandlerPassthroughType: type: string enum: @@ -3589,12 +3937,12 @@ tags: - name: "AI Agents: Dialogflow" - name: Call Flows - name: Embeds Tokens - - name: External LAML Handler - name: External SWML Handler - name: Fabric Address - name: FreeSWITCH Connectors - name: LAML Applications - name: cXML Scripts + - name: cXML Webhook - name: Relay Applications - name: Resources - name: SIP Endpoints @@ -3693,19 +4041,19 @@ paths: application/json: schema: $ref: '#/components/schemas/SubscriberGuestTokenCreateRequest' - /resources/external_laml_handlers: + /resources/cxml_webhooks: get: - operationId: ExternalLAMLHandlers_list - summary: List External LAML Handlers - description: A list of External LAML Handlers - parameters: [ ] + operationId: CXMLWebhooks_list + summary: List cXML Webhooks + description: A list of cXML Webhooks + parameters: [] responses: '200': description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerListResponse' + $ref: '#/components/schemas/CXMLWebhookListResponse' '401': description: Access is unauthorized. content: @@ -3723,19 +4071,19 @@ paths: enum: - Not Found tags: - - External LAML Handler + - cXML Webhook post: - operationId: ExternalLAMLHandlers_create - summary: Create External LAML Handler - description: Creates an External LAML Handler - parameters: [ ] + operationId: CXMLWebhooks_create + summary: Create cXML Webhook + description: Creates an cXML Webhook + parameters: [] responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerResponse' + $ref: '#/components/schemas/CXMLWebhookResponse' '401': description: Access is unauthorized. content: @@ -3757,29 +4105,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLamlHandlerCreateStatusCode422' + $ref: '#/components/schemas/CXMLWebhookCreateStatusCode422' tags: - - External LAML Handler + - cXML Webhook requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerCreateRequest' - /resources/external_laml_handlers/{external_laml_handler_id}/addresses: + $ref: '#/components/schemas/CXMLWebhookCreateRequest' + /resources/cxml_webhooks/{cxml_webhook_id}/addresses: get: - operationId: ExternalLAMLHandlerAddresses_list - summary: List External LAML Handler Addresses - description: A list of External LAML Handler Addresses + operationId: CXMLWebhookAddresses_list + summary: List cXML Webhook Addresses + description: A list of cXML Webhook Addresses parameters: - - $ref: '#/components/parameters/ExternalLAMLHandlerIDPath' + - $ref: '#/components/parameters/CXMLWebhookIDPath' responses: '200': description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerAddressListResponse' + $ref: '#/components/schemas/CXMLWebhookAddressListResponse' '401': description: Access is unauthorized. content: @@ -3797,21 +4145,21 @@ paths: enum: - Not Found tags: - - External LAML Handler - /resources/external_laml_handlers/{id}: + - cXML Webhook + /resources/cxml_webhooks/{id}: get: - operationId: ExternalLAMLHandlers_read - summary: Get External LAML Handler - description: Returns an External LAML Handler by ID + operationId: CXMLWebhooks_read + summary: Get cXML Webhook + description: Returns an cXML Webhook by ID parameters: - - $ref: '#/components/parameters/ExternalLAMLHandlerID' + - $ref: '#/components/parameters/CXMLWebhookID' responses: '200': description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerResponse' + $ref: '#/components/schemas/CXMLWebhookResponse' '401': description: Access is unauthorized. content: @@ -3829,20 +4177,20 @@ paths: enum: - Not Found tags: - - External LAML Handler + - cXML Webhook patch: - operationId: ExternalLAMLHandlers_update - summary: Update External LAML Handler - description: Updates an External LAML Handler by ID + operationId: CXMLWebhooks_update + summary: Update cXML Webhook + description: Updates an cXML Webhook by ID parameters: - - $ref: '#/components/parameters/ExternalLAMLHandlerID' + - $ref: '#/components/parameters/CXMLWebhookID' responses: '200': description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerResponse' + $ref: '#/components/schemas/CXMLWebhookResponse' '401': description: Access is unauthorized. content: @@ -3864,21 +4212,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLamlHandlerUpdateStatusCode422' + $ref: '#/components/schemas/CXMLWebhookUpdateStatusCode422' tags: - - External LAML Handler + - cXML Webhook requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandlerUpdateRequest' + $ref: '#/components/schemas/CXMLWebhookUpdateRequest' delete: - operationId: ExternalLAMLHandlers_delete - summary: Delete External LAML Handler - description: Deletes an External LAML Handler by ID + operationId: CXMLWebhooks_delete + summary: Delete cXML Webhook + description: Deletes an cXML Webhook by ID parameters: - - $ref: '#/components/parameters/ExternalLAMLHandlerID' + - $ref: '#/components/parameters/CXMLWebhookID' responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' @@ -3899,7 +4247,7 @@ paths: enum: - Not Found tags: - - External LAML Handler + - cXML Webhook /addresses: get: operationId: FabricAddresses_list