Skip to content

Rename LAML bin to CXML Script #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 44 additions & 44 deletions api/signalwire-rest/fabric-api/_spec_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -7447,26 +7447,26 @@ paths:
- Not Found
tags:
- External SWML Handler
/resources/laml_bins/{id}/addresses:
/resources/cxml_scripts/{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:
Expand Down Expand Up @@ -7540,15 +7540,15 @@ paths:
type: string
format: uri
example: /public/reception?channel=messaging
/resources/laml_bins:
/resources/cxml_scripts:
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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -7638,7 +7638,7 @@ paths:
encoding="UTF-8"?><Response></Response>
responses:
'200':
description: A LaML Bin
description: A cXML Script
content:
application/json:
schema:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
- 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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -7844,7 +7844,7 @@ paths:
properties:
name:
type: string
example: My Laml Bin
example: My cXML Script
- type: object
properties:
contents:
Expand All @@ -7856,7 +7856,7 @@ paths:
- play: say:Hello from SignalWire!
responses:
'200':
description: A LAML Bin
description: A cXML Script
content:
application/json:
schema:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions api/signalwire-rest/fabric-api/cxml-webhook-addresses/main.tsp
Original file line number Diff line number Diff line change
@@ -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/cxml_webhooks/{cxml_webhook_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;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -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
cxml_webhook_id: uuid
}

model ExternalLAMLHandlerAddress {
model CXMLWebhookAddress {
@doc("Unique ID of the Fabric Address.")
@example("691af061-cd86-4893-a605-173f47afc4c2")
id: uuid;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
model CXMLWebhookAddressListResponse {
data: CXMLWebhookAddress[];
links: CXMLWebhookAddressPaginationResponse;
}

model CXMLWebhookAddressPaginationResponse {
@doc("Link of the current page")
@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/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/cxml_webhooks/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca")
next: url;
}
58 changes: 58 additions & 0 deletions api/signalwire-rest/fabric-api/cxml-webhooks/main.tsp
Original file line number Diff line number Diff line change
@@ -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/cxml_webhooks")
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 cxml_webhook: CXMLWebhookResponse;
} |
StatusCode401 |
StatusCode404;

@summary("Create cXML Webhook")
@doc("Creates an cXML Webhook")
@post create(...CXMLWebhookCreateRequest):
{ @statusCode statusCode: 201; @body cxml_webhook: CXMLWebhookResponse; } |
StatusCode401 |
StatusCode404 |
CXMLWebhookCreateStatusCode422;

@summary("Update cXML Webhook")
@doc("Updates an cXML Webhook by ID")
@patch update(...CXMLWebhookID, ...CXMLWebhookUpdateRequest): {
@statusCode statusCode: 200; @body cxml_webhook: CXMLWebhookResponse;
} |
StatusCode401 |
StatusCode404 |
CXMLWebhookUpdateStatusCode422;

@summary("Delete cXML Webhook")
@doc("Deletes an cXML Webhook by ID")
@delete delete(...CXMLWebhookID):
{ @statusCode statusCode: 204; } |
StatusCode401 |
StatusCode404;
}
}

Loading