Skip to content

Add status callback fields to CXML and SWML Scripts endpoints #387

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

Conversation

diego-signalwire
Copy link
Contributor

REST API Update Pull Request

Related Issue

https://github.com/signalwire/cloud-product/issues/15477
https://github.com/signalwire/cloud-product/issues/15251

Description

This PR adds status callback functionality to CXML Scripts and SWML Scripts endpoints in the Fabric API specification. The changes expose the ability to set status callback fields that were previously only
available through the Fabric UI.

CXML Scripts Changes:

  • Added status_callback_url and status_callback_method fields to POST and PUT request bodies
  • Updated response schemas to include both fields in the serialized response
  • Fields support both GET and POST methods for callbacks

SWML Scripts Changes:

  • Added status_callback_url field to POST and PUT request bodies (method selection not exposed)
  • Updated all response schemas (GET list, GET single, POST, PUT) to include both status_callback_url and status_callback_method fields
  • status_callback_method is always set to "POST" for SWML Scripts (matches existing internal behavior)

Type of Change

  • [] New endpoint
  • Update to existing endpoint

Checklist:

  • I have read and fully understand the process for updating the REST API
  • [] Mandatory fields are present in the TypeSpec files.
  • TypeSpec files successfully compiled OpenAPI spec files.
    • No new warnings were generated during the compilation process.
  • OpenAPI spec files were validated with a SWAGGER UI tool to ensure they are correct.
  • The DevEx team has been alerted with the new changed by including the team/developer-experience label in the PR.

Additional Notes

Add any other context about the pull request here.

Copy link

github-actions bot commented Jul 16, 2025

yarn run v1.22.22
$ /home/runner/work/docs/docs/node_modules/.bin/ts-node tools/scripts/generate-matrix.ts

OpenAPI Specification Analysis

Changes are compared to the main branch:

  • 🟢 Improvements (higher scores or fewer issues)
  • 🔴 Regressions (lower scores or more issues)
  • ⚪ No changes
Spec Docs Completeness SDK Gen Security Overall Warnings Errors Report
specs/compatibility-api/_spec_.yaml 72/100
(=) ⚪
69/100
(=) ⚪
79/100
(=) ⚪
39/100
(=) ⚪
65/100
(=) ⚪
448
(=) ⚪
360
(=) ⚪
View
specs/signalwire-rest/calling-api/tsp-output/@typespec/openapi3/openapi.yaml 98/100
(=) ⚪
95/100
(=) ⚪
100/100
(+3.0) 🟢
52/100
(=) ⚪
86/100
(=) ⚪
16
(-4) 🟢
5
(=) ⚪
View
specs/signalwire-rest/chat-api/tsp-output/@typespec/openapi3/openapi.yaml 98/100
(=) ⚪
95/100
(=) ⚪
100/100
(+3.0) 🟢
52/100
(=) ⚪
86/100
(=) ⚪
10
(-2) 🟢
3
(=) ⚪
View
specs/signalwire-rest/datasphere-api/tsp-output/@typespec/openapi3/openapi.yaml 97/100
(=) ⚪
94/100
(=) ⚪
100/100
(+4.0) 🟢
52/100
(=) ⚪
86/100
(+1.0) 🟢
49
(-16) 🟢
17
(=) ⚪
View
specs/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml 99/100
(+4.0) 🟢
99/100
(+7.0) 🟢
100/100
(+4.0) 🟢
84/100
(+32.0) 🟢
95/100
(+11.0) 🟢
557
(+232) 🔴
2
(-91) 🟢
View
specs/signalwire-rest/fax-api/_spec_.yaml 38/100
(=) ⚪
35/100
(=) ⚪
86/100
(=) ⚪
39/100
(=) ⚪
50/100
(=) ⚪
18
(=) ⚪
15
(=) ⚪
View
specs/signalwire-rest/logs-api/tsp-output/@typespec/openapi3/openapi.yaml 98/100
(=) ⚪
95/100
(=) ⚪
100/100
(+4.0) 🟢
52/100
(=) ⚪
86/100
(+1.0) 🟢
9
(-2) 🟢
4
(=) ⚪
View
specs/signalwire-rest/message-api/_spec_.yaml 53/100
(=) ⚪
50/100
(=) ⚪
86/100
(=) ⚪
38/100
(=) ⚪
57/100
(=) ⚪
18
(=) ⚪
11
(=) ⚪
View
specs/signalwire-rest/project-api/_spec_.yaml 76/100
(=) ⚪
73/100
(=) ⚪
69/100
(=) ⚪
36/100
(=) ⚪
64/100
(=) ⚪
21
(=) ⚪
14
(=) ⚪
View
specs/signalwire-rest/pubsub-api/_spec_.yaml 98/100
(=) ⚪
95/100
(=) ⚪
88/100
(=) ⚪
36/100
(=) ⚪
80/100
(=) ⚪
11
(=) ⚪
6
(=) ⚪
View
specs/signalwire-rest/space-api/_spec_.yaml 75/100
(=) ⚪
72/100
(=) ⚪
88/100
(=) ⚪
40/100
(=) ⚪
69/100
(=) ⚪
372
(=) ⚪
271
(=) ⚪
View
specs/signalwire-rest/video-api/_spec_.yaml 86/100
(=) ⚪
85/100
(=) ⚪
86/100
(=) ⚪
39/100
(=) ⚪
74/100
(=) ⚪
179
(=) ⚪
131
(=) ⚪
View
specs/signalwire-rest/voice-api/_spec_.yaml 53/100
(=) ⚪
50/100
(=) ⚪
86/100
(=) ⚪
38/100
(=) ⚪
57/100
(=) ⚪
18
(=) ⚪
11
(=) ⚪
View

Done in 160.30s.

Copy link
Contributor

@Devon-White Devon-White left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just made a few changes :)

@Devon-White Devon-White self-requested a review July 17, 2025 12:35
@Devon-White Devon-White merged commit 02d33a1 into Devon/fabric-typespec Jul 17, 2025
2 checks passed
@Devon-White Devon-White deleted the diego/15477/document-status-callback-url-on-typespec branch July 17, 2025 12:38
Devon-White added a commit that referenced this pull request Jul 17, 2025
* Initial push

* Convert all Fabric api spec to TypeSpec

* add newline

* Update main.tsp

* Update responses.tsp

* Update main.tsp

* Update core.tsp

* Update errors.tsp

* Update requests.tsp

* Push audit edits (in-progress)

* Update specs/signalwire-rest/fabric-api/dialogflow-agents/addresses/models/core.tsp

Co-authored-by: Cassie <58792902+cassieemb@users.noreply.github.com>

* Add enums for Ciphers, Codecs, and Encryption in globally_shared specs

- Introduced Ciphers enum with various AES cipher options.
- Added Codecs enum for audio and video codecs including PCMU, PCMA, G722, G729, OPUS, VP8, and H264.
- Created Encryption enum to define encryption requirements: Required, Optional, and Default.

* edits

* edits

* edits

* edits

* edits

* Add global constants and SIP endpoint enums

- Introduced a new constant for the server URL in const.tsp.
- Added an enumeration for CallHandlerType in enums.tsp, defining various call handling options.

- Add pagination response for many list endpoints

* Refactor API tags and documentation for SignalWire Fabric API

- Introduced a new tags.tsp file to centralize tag definitions and metadata for various API endpoints.
- Updated multiple API specifications to replace hardcoded tag strings with constants from the new tags.tsp file.
- Enhanced OpenAPI documentation by adding summaries and descriptions for various endpoints, improving clarity and usability.
- Added external documentation links for each tag to facilitate developer access to relevant resources.
- Ensured consistent naming conventions across all API tags to improve readability and maintainability.

* Fix bad summary

* Conference Room edits

* add missing fps property to conference rooms

* Add redirects

* Add status callback fields to CXML and SWML Scripts endpoints (#387)

* Add status callback fields to CXML and SWML Scripts endpoints

* Update core.tsp

* Update specs/signalwire-rest/fabric-api/cxml-scripts/models/requests.tsp

* Update specs/signalwire-rest/fabric-api/cxml-scripts/models/requests.tsp

* Update specs/signalwire-rest/fabric-api/swml-scripts/models/requests.tsp

* Update specs/signalwire-rest/fabric-api/swml-scripts/models/requests.tsp

---------

Co-authored-by: Devon <86693904+Devon-White@users.noreply.github.com>

* recompile spec after additions

* Update specs/signalwire-rest/fabric-api/cxml-applications/models/requests.tsp

Co-authored-by: Cassie <58792902+cassieemb@users.noreply.github.com>

* Update specs/signalwire-rest/fabric-api/cxml-applications/models/core.tsp

Co-authored-by: Cassie <58792902+cassieemb@users.noreply.github.com>

* Update specs/signalwire-rest/fabric-api/cxml-applications/models/core.tsp

Co-authored-by: Cassie <58792902+cassieemb@users.noreply.github.com>

* Update specs/signalwire-rest/fabric-api/cxml-applications/models/requests.tsp

Co-authored-by: Cassie <58792902+cassieemb@users.noreply.github.com>

* Update specs/signalwire-rest/fabric-api/cxml-applications/models/requests.tsp

Co-authored-by: Cassie <58792902+cassieemb@users.noreply.github.com>

* Update specs/signalwire-rest/fabric-api/cxml-applications/models/responses.tsp

Co-authored-by: Cassie <58792902+cassieemb@users.noreply.github.com>

* Update specs/signalwire-rest/fabric-api/cxml-applications/models/responses.tsp

Co-authored-by: Cassie <58792902+cassieemb@users.noreply.github.com>

* Ran TypeSpec formatter

* Ran formatter, and recompiled spec

---------

Co-authored-by: Cassie <58792902+cassieemb@users.noreply.github.com>
Co-authored-by: diego-signalwire <diego.oliveira@signalwire.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants