From b45e4f54b502a4b420b3a644a28a5be4c669a21e Mon Sep 17 00:00:00 2001 From: Devon White Date: Mon, 18 Aug 2025 13:27:03 -0400 Subject: [PATCH 1/6] PubSub TypeSpec conversion --- specs/package.json | 3 +- specs/signalwire-rest/pubsub-api/main.tsp | 38 ++++ specs/signalwire-rest/pubsub-api/tags.tsp | 11 ++ .../pubsub-api/tokens/main.tsp | 39 ++++ .../pubsub-api/tokens/models/core.tsp | 5 + .../pubsub-api/tokens/models/requests.tsp | 53 +++++ .../pubsub-api/tokens/models/responses.tsp | 27 +++ .../@typespec/openapi3/openapi.yaml | 181 ++++++++++++++++++ .../docusaurus-plugin-openapi-docs.ts | 2 +- website/provisioning/nginx/redirects.map | 5 + 10 files changed, 362 insertions(+), 2 deletions(-) create mode 100644 specs/signalwire-rest/pubsub-api/main.tsp create mode 100644 specs/signalwire-rest/pubsub-api/tags.tsp create mode 100644 specs/signalwire-rest/pubsub-api/tokens/main.tsp create mode 100644 specs/signalwire-rest/pubsub-api/tokens/models/core.tsp create mode 100644 specs/signalwire-rest/pubsub-api/tokens/models/requests.tsp create mode 100644 specs/signalwire-rest/pubsub-api/tokens/models/responses.tsp create mode 100644 specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml diff --git a/specs/package.json b/specs/package.json index 3df0fe9dd..dc8fc6694 100644 --- a/specs/package.json +++ b/specs/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "scripts": { - "build": "yarn build:calling-api && yarn build:chat-api && yarn build:datasphere-api && yarn build:fabric-api && yarn build:logs-api && yarn build:fax-api && yarn build:message-api && yarn build:voice-api", + "build": "yarn build:calling-api && yarn build:chat-api && yarn build:datasphere-api && yarn build:fabric-api && yarn build:logs-api && yarn build:fax-api && yarn build:message-api && yarn build:voice-api && yarn build:pubsub-api", "build:calling-api": "cd ./signalwire-rest/calling-api && tsp compile . && cd ../../", "build:chat-api": "cd ./signalwire-rest/chat-api && tsp compile . && cd ../../", "build:datasphere-api": "cd ./signalwire-rest/datasphere-api && tsp compile . && cd ../../", @@ -12,6 +12,7 @@ "build:fax-api": "cd ./signalwire-rest/fax-api && tsp compile . && cd ../../", "build:message-api": "cd ./signalwire-rest/message-api && tsp compile . && cd ../../", "build:voice-api": "cd ./signalwire-rest/voice-api && tsp compile . && cd ../../", + "build:pubsub-api": "cd ./signalwire-rest/pubsub-api && tsp compile . && cd ../../", "clean": "echo 'Skipping clean step'", "prebuild": "yarn clean", "format": "tsp format **/*.tsp", diff --git a/specs/signalwire-rest/pubsub-api/main.tsp b/specs/signalwire-rest/pubsub-api/main.tsp new file mode 100644 index 000000000..27bfbfd66 --- /dev/null +++ b/specs/signalwire-rest/pubsub-api/main.tsp @@ -0,0 +1,38 @@ +import "@typespec/http"; +import "@typespec/openapi"; +import "../types"; +import "./tokens"; +import "../_globally_shared/const.tsp"; +import "./tags.tsp"; + +using TypeSpec.Http; +using TypeSpec.OpenAPI; +using Types.StatusCodes; + +@tagMetadata(TOKENS_TAG, TOKENS_TAG_METADATA) +@externalDocs( + "https://developer.signalwire.com", + "Find more information about this and other SignalWire APIs." +) +@info(#{ + title: "PubSub API", + version: "1.0.0", + contact: CONTACT_INFO, + license: LICENSE_INFO, + termsOfService: TERMS_OF_SERVICE, +}) +@service(#{ title: "PubSub API" }) +@server( + "https://{space_name}.${SERVER_URL}/pubsub", + "Endpoint", + { + @doc(SERVER_URL_DESCRIPTION) + @example("example") + space_name: string = "{Your_Space_Name}", + } +) +@useAuth(BasicAuth) +@doc(""" + An API to use PubSub channels in your own application. + """) +namespace PubSubAPI; \ No newline at end of file diff --git a/specs/signalwire-rest/pubsub-api/tags.tsp b/specs/signalwire-rest/pubsub-api/tags.tsp new file mode 100644 index 000000000..3cf52dee5 --- /dev/null +++ b/specs/signalwire-rest/pubsub-api/tags.tsp @@ -0,0 +1,11 @@ +import "@typespec/openapi3"; + +const TOKENS_TAG = "Tokens"; + +const TOKENS_TAG_METADATA = #{ + description: "Endpoints related to creating & managing PubSub Tokens", + externalDocs: #{ + url: "https://developer.signalwire.com/rest/signalwire-rest/endpoints/pubsub/tokens", + description: "Developer documentation on PubSub API endpoints", + }, +}; \ No newline at end of file diff --git a/specs/signalwire-rest/pubsub-api/tokens/main.tsp b/specs/signalwire-rest/pubsub-api/tokens/main.tsp new file mode 100644 index 000000000..c31ad78a3 --- /dev/null +++ b/specs/signalwire-rest/pubsub-api/tokens/main.tsp @@ -0,0 +1,39 @@ +import "@typespec/http"; +import "../../types"; +import "./models/core.tsp"; +import "./models/requests.tsp"; +import "./models/responses.tsp"; +import "../tags.tsp"; + +using TypeSpec.Http; +using Types.StatusCodes; + +@route("/tokens") +namespace PubSubAPI.Tokens { + @tag(TOKENS_TAG) + @friendlyName("Tokens") + interface PubSubTokens { + @summary("Generate a new PubSub Token") + @doc(""" + Generate a PubSub Token to be used to authenticate clients to the PubSub Service. + + + #### Permissions + + The API token must include the following scopes: _PubSub_. + """) + @post + create(@body request: NewPubSubToken): + | { + @statusCode _: 200; + @doc("OK") + @body token: PubSubToken; + } + | StatusCode401 + | { + @statusCode _: 422; + @doc("Unprocessable Entity. You may have specified invalid parameters.") + @body error: PubSubToken422Error; + }; + } +} \ No newline at end of file diff --git a/specs/signalwire-rest/pubsub-api/tokens/models/core.tsp b/specs/signalwire-rest/pubsub-api/tokens/models/core.tsp new file mode 100644 index 000000000..9d7d8ae59 --- /dev/null +++ b/specs/signalwire-rest/pubsub-api/tokens/models/core.tsp @@ -0,0 +1,5 @@ +model PubSubToken { + @doc("A PubSub Token to be used to authenticate clients to the PubSub Service.") + @example("eyJ0eXAiOiJWUlQiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2MjIxMjAxMjMsI...wMCwicnNlIjo5MDB9-BqG-DqC5LhpsdMWEFjhVkTBpQ") + token: string; +} \ No newline at end of file diff --git a/specs/signalwire-rest/pubsub-api/tokens/models/requests.tsp b/specs/signalwire-rest/pubsub-api/tokens/models/requests.tsp new file mode 100644 index 000000000..d981eb77e --- /dev/null +++ b/specs/signalwire-rest/pubsub-api/tokens/models/requests.tsp @@ -0,0 +1,53 @@ +/* Model is used to work-around a bug in the rest api plugin, not a TypeSpec issue. Duplicate description must be present and usage of a model is required. +Otherwise the property will render a additionalProperty with the exact same description as the top level property holding additionalProperties. */ +@doc("An arbitrary JSON object available to store stateful application information in. Must be valid JSON and have a maximum size of 2,000 characters.") +@example(#{ + display_name: "Joe", + an_array: #["foo", "bar", "baz"], +}) +model PubSubState is Record; + +model NewPubSubToken { + @minValue(1) + @maxValue(43200) + @example(15) + @doc("The maximum time, in minutes, that the access token will be valid for. Between 1 and 43,200 (30 days).") + ttl: integer; + + channels: PubSubChannels; + + @doc("The unique identifier of the member. Up to 250 characters. If not specified, a random UUID will be generated.") + @example("John Doe") + @maxLength(250) + member_id?: string; + + /* Model is used to work-around a bug in the rest api plugin, not a TypeSpec issue. Duplicate description must be present and usage of a model is required. + Otherwise the property will render a additionalProperty with the exact same description as the top level property holding additionalProperties. */ + @doc("An arbitrary JSON object available to store stateful application information in. Must be valid JSON and have a maximum size of 2,000 characters.") + state?: PubSubState; +} + +@doc(""" + Each channel with `write` and `read` objects with boolean as values. Max of 500 channels inside main `channels`. + Either `read`, `write`, or both are required inside each channel and default to false. + Each channel name can be up to 250 characters. Must be valid JSON. + """) +@example(#{ + channela: #{ read: true, write: false }, + channelb: #{ read: true }, +}) +model PubSubChannels { + ...PubSubPermissions; +} + +@doc("PubSub Permissions for a channel.") +model PubSubPermissions + is Record<{ + @doc("Gives the token read access to the channel.") + @example(true) + read?: boolean; + + @doc("Gives the token write access to the channel.") + @example(false) + write?: boolean; + }>; \ No newline at end of file diff --git a/specs/signalwire-rest/pubsub-api/tokens/models/responses.tsp b/specs/signalwire-rest/pubsub-api/tokens/models/responses.tsp new file mode 100644 index 000000000..e27f81749 --- /dev/null +++ b/specs/signalwire-rest/pubsub-api/tokens/models/responses.tsp @@ -0,0 +1,27 @@ +import "@typespec/http"; +import "../../../types/status-codes"; + +using TypeSpec.Http; + +model PubSubToken422Error { + @doc("Error type.") + @example("validation_error") + type: string; + + @doc("Error code.") + @example("not_a_valid_json") + code: string; + + @doc("Error details.") + @example("Permissions must be valid JSON") + message: string; + + @doc("Request parameter associated with this error.") + @example("permissions") + attribute: string; + + @doc("Link to developer resource for this error.") + @format("uri") + @example("https://developer.signalwire.com/rest/overview/error-codes/#not_a_valid_json") + url: string; +} \ No newline at end of file diff --git a/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml b/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml new file mode 100644 index 000000000..b7f52f4b7 --- /dev/null +++ b/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml @@ -0,0 +1,181 @@ +openapi: 3.0.0 +info: + title: PubSub API + version: 1.0.0 + contact: + name: SignalWire + url: https://support.signalwire.com/portal/en/newticket?departmentId=1029313000000006907&layoutId=1029313000000074011 + email: support@signalwire.com + license: + name: MIT + url: https://github.com/signalwire/docs/blob/main/LICENSE + termsOfService: https://signalwire.com/legal/signalwire-cloud-agreement + description: An API to use PubSub channels in your own application. +externalDocs: + url: https://developer.signalwire.com + description: Find more information about this and other SignalWire APIs. +tags: + - name: Tokens + description: Endpoints related to creating & managing PubSub Tokens + externalDocs: + url: https://developer.signalwire.com/rest/signalwire-rest/endpoints/pubsub + description: Developer documentation on PubSub API endpoints +paths: + /tokens: + post: + operationId: PubSubTokens_create + summary: Generate a new PubSub Token + description: |- + Generate a PubSub Token to be used to authenticate clients to the PubSub Service. + + + #### Permissions + + The API token must include the following scopes: _PubSub_. + parameters: [] + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/PubSubToken' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + $ref: '#/components/schemas/Types.StatusCodes.StatusCode401' + '422': + description: Client error + content: + application/json: + schema: + $ref: '#/components/schemas/PubSubToken422Error' + tags: + - Tokens + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NewPubSubToken' +security: + - BasicAuth: [] +components: + schemas: + NewPubSubToken: + type: object + required: + - ttl + - channels + properties: + ttl: + type: integer + minimum: 1 + maximum: 43200 + description: The maximum time, in minutes, that the access token will be valid for. Between 1 and 43,200 (30 days). + example: 15 + channels: + $ref: '#/components/schemas/PubSubChannels' + member_id: + type: string + maxLength: 250 + description: The unique identifier of the member. Up to 250 characters. If not specified, a random UUID will be generated. + example: John Doe + state: + allOf: + - $ref: '#/components/schemas/PubSubState' + description: An arbitrary JSON object available to store stateful application information in. Must be valid JSON and have a maximum size of 2,000 characters. + PubSubChannels: + type: object + additionalProperties: + type: object + properties: + read: + type: boolean + description: Gives the token read access to the channel. + example: true + write: + type: boolean + description: Gives the token write access to the channel. + example: false + description: |- + Each channel with `write` and `read` objects with boolean as values. Max of 500 channels inside main `channels`. + Either `read`, `write`, or both are required inside each channel and default to false. + Each channel name can be up to 250 characters. Must be valid JSON. + example: + channela: + read: true + write: false + channelb: + read: true + PubSubState: + type: object + additionalProperties: {} + description: An arbitrary JSON object available to store stateful application information in. Must be valid JSON and have a maximum size of 2,000 characters. + example: + display_name: Joe + an_array: + - foo + - bar + - baz + PubSubToken: + type: object + required: + - token + properties: + token: + type: string + description: A PubSub Token to be used to authenticate clients to the PubSub Service. + example: eyJ0eXAiOiJWUlQiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2MjIxMjAxMjMsI...wMCwicnNlIjo5MDB9-BqG-DqC5LhpsdMWEFjhVkTBpQ + PubSubToken422Error: + type: object + required: + - type + - code + - message + - attribute + - url + properties: + type: + type: string + description: Error type. + example: validation_error + code: + type: string + description: Error code. + example: not_a_valid_json + message: + type: string + description: Error details. + example: Permissions must be valid JSON + attribute: + type: string + description: Request parameter associated with this error. + example: permissions + url: + type: string + format: uri + description: Link to developer resource for this error. + example: https://developer.signalwire.com/rest/overview/error-codes/#not_a_valid_json + Types.StatusCodes.StatusCode401: + type: object + required: + - error + properties: + error: + type: string + enum: + - Unauthorized + securitySchemes: + BasicAuth: + type: http + scheme: Basic +servers: + - url: https://{space_name}.signalwire.com/api/pubsub + description: Endpoint + variables: + space_name: + default: '{Your_Space_Name}' + description: The domain of the users SignalWire space. diff --git a/website/config/pluginsConfig/docusaurus-plugin-openapi-docs.ts b/website/config/pluginsConfig/docusaurus-plugin-openapi-docs.ts index 0db0e675d..b5fdf970c 100644 --- a/website/config/pluginsConfig/docusaurus-plugin-openapi-docs.ts +++ b/website/config/pluginsConfig/docusaurus-plugin-openapi-docs.ts @@ -96,7 +96,7 @@ export const openapiPlugin: PluginConfig = [ }, }, signalwirePubSubApi: { - specPath: "../specs/signalwire-rest/pubsub-api/_spec_.yaml", + specPath: "../specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml", outputDir: "docs/main/rest/signalwire-rest/endpoints/pubsub", maskCredentials: false, sidebarOptions: { diff --git a/website/provisioning/nginx/redirects.map b/website/provisioning/nginx/redirects.map index 6d0f928d8..0b182dc9a 100644 --- a/website/provisioning/nginx/redirects.map +++ b/website/provisioning/nginx/redirects.map @@ -1660,3 +1660,8 @@ /rest/signalwire-rest/endpoints/messaging/list-logs/ /rest/signalwire-rest/endpoints/messaging/logs-list; /rest/signalwire-rest/endpoints/messaging/get-log /rest/signalwire-rest/endpoints/messaging/logs-retrieve; /rest/signalwire-rest/endpoints/messaging/get-log/ /rest/signalwire-rest/endpoints/messaging/logs-retrieve; + + +# PubSub TypeSpec conversion - 8/18/25 +/rest/signalwire-rest/endpoints/pubsub/create-token /rest/signalwire-rest/endpoints/pubsub/pub-sub-tokens-create; +/rest/signalwire-rest/endpoints/pubsub/create-token/ /rest/signalwire-rest/endpoints/pubsub/pub-sub-tokens-create; From 4037d94c0fe74e4191cd67a831a011b029e9966f Mon Sep 17 00:00:00 2001 From: Devon White Date: Mon, 18 Aug 2025 13:50:35 -0400 Subject: [PATCH 2/6] Fix link --- website/docs/main/home/messaging/chat/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/main/home/messaging/chat/index.mdx b/website/docs/main/home/messaging/chat/index.mdx index 590830585..6c4154fd9 100644 --- a/website/docs/main/home/messaging/chat/index.mdx +++ b/website/docs/main/home/messaging/chat/index.mdx @@ -20,7 +20,7 @@ The most basic chat functionality is provided in a **PubSub** environment, which } > Create PubSub Tokens From fe32940180fc7cd46f69fcec30b868655814cc7b Mon Sep 17 00:00:00 2001 From: Devon White Date: Mon, 18 Aug 2025 13:55:43 -0400 Subject: [PATCH 3/6] add 500 internal error response --- .../signalwire-rest/pubsub-api/tokens/main.tsp | 3 ++- .../tsp-output/@typespec/openapi3/openapi.yaml | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/specs/signalwire-rest/pubsub-api/tokens/main.tsp b/specs/signalwire-rest/pubsub-api/tokens/main.tsp index c31ad78a3..f2be0f471 100644 --- a/specs/signalwire-rest/pubsub-api/tokens/main.tsp +++ b/specs/signalwire-rest/pubsub-api/tokens/main.tsp @@ -34,6 +34,7 @@ namespace PubSubAPI.Tokens { @statusCode _: 422; @doc("Unprocessable Entity. You may have specified invalid parameters.") @body error: PubSubToken422Error; - }; + } + | StatusCode500; } } \ No newline at end of file diff --git a/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml b/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml index b7f52f4b7..1bd1b7aff 100644 --- a/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml +++ b/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml @@ -18,7 +18,7 @@ tags: - name: Tokens description: Endpoints related to creating & managing PubSub Tokens externalDocs: - url: https://developer.signalwire.com/rest/signalwire-rest/endpoints/pubsub + url: https://developer.signalwire.com/rest/signalwire-rest/endpoints/pubsub/tokens description: Developer documentation on PubSub API endpoints paths: /tokens: @@ -52,6 +52,12 @@ paths: application/json: schema: $ref: '#/components/schemas/PubSubToken422Error' + '500': + description: Server error + content: + application/json: + schema: + $ref: '#/components/schemas/Types.StatusCodes.StatusCode500' tags: - Tokens requestBody: @@ -168,6 +174,15 @@ components: type: string enum: - Unauthorized + Types.StatusCodes.StatusCode500: + type: object + required: + - error + properties: + error: + type: string + enum: + - Internal Server Error securitySchemes: BasicAuth: type: http From f8444614f1edad59e6785c7ca2ef8595481a6a6f Mon Sep 17 00:00:00 2001 From: Devon White Date: Tue, 19 Aug 2025 08:31:06 -0400 Subject: [PATCH 4/6] - Upgraded TypeSpec - Added operationID - Removed Redirects (not needed since operationID is manually set) --- specs/package.json | 10 ++-- .../pubsub-api/tokens/main.tsp | 3 + .../@typespec/openapi3/openapi.yaml | 2 +- website/provisioning/nginx/redirects.map | 4 -- yarn.lock | 59 +++++++++---------- 5 files changed, 36 insertions(+), 42 deletions(-) diff --git a/specs/package.json b/specs/package.json index dc8fc6694..a54de7ef2 100644 --- a/specs/package.json +++ b/specs/package.json @@ -19,11 +19,11 @@ "format:check": "tsp format --check **/*.tsp" }, "dependencies": { - "@typespec/compiler": "1.2.1", - "@typespec/http": "1.2.1", - "@typespec/openapi": "1.2.1", - "@typespec/openapi3": "1.2.1", - "@typespec/rest": "0.72.1" + "@typespec/compiler": "1.3.0", + "@typespec/http": "1.3.0", + "@typespec/openapi": "1.3.0", + "@typespec/openapi3": "1.3.0", + "@typespec/rest": "0.73.0" }, "devDependencies": { "typescript": "^5.5.4" diff --git a/specs/signalwire-rest/pubsub-api/tokens/main.tsp b/specs/signalwire-rest/pubsub-api/tokens/main.tsp index f2be0f471..cc671317f 100644 --- a/specs/signalwire-rest/pubsub-api/tokens/main.tsp +++ b/specs/signalwire-rest/pubsub-api/tokens/main.tsp @@ -1,4 +1,5 @@ import "@typespec/http"; +import "@typespec/openapi"; import "../../types"; import "./models/core.tsp"; import "./models/requests.tsp"; @@ -6,6 +7,7 @@ import "./models/responses.tsp"; import "../tags.tsp"; using TypeSpec.Http; +using TypeSpec.OpenAPI; using Types.StatusCodes; @route("/tokens") @@ -23,6 +25,7 @@ namespace PubSubAPI.Tokens { The API token must include the following scopes: _PubSub_. """) @post + @operationId("create_token") create(@body request: NewPubSubToken): | { @statusCode _: 200; diff --git a/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml b/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml index 1bd1b7aff..8140335db 100644 --- a/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml +++ b/specs/signalwire-rest/pubsub-api/tsp-output/@typespec/openapi3/openapi.yaml @@ -23,7 +23,7 @@ tags: paths: /tokens: post: - operationId: PubSubTokens_create + operationId: create_token summary: Generate a new PubSub Token description: |- Generate a PubSub Token to be used to authenticate clients to the PubSub Service. diff --git a/website/provisioning/nginx/redirects.map b/website/provisioning/nginx/redirects.map index 0b182dc9a..6fe44aecb 100644 --- a/website/provisioning/nginx/redirects.map +++ b/website/provisioning/nginx/redirects.map @@ -1661,7 +1661,3 @@ /rest/signalwire-rest/endpoints/messaging/get-log /rest/signalwire-rest/endpoints/messaging/logs-retrieve; /rest/signalwire-rest/endpoints/messaging/get-log/ /rest/signalwire-rest/endpoints/messaging/logs-retrieve; - -# PubSub TypeSpec conversion - 8/18/25 -/rest/signalwire-rest/endpoints/pubsub/create-token /rest/signalwire-rest/endpoints/pubsub/pub-sub-tokens-create; -/rest/signalwire-rest/endpoints/pubsub/create-token/ /rest/signalwire-rest/endpoints/pubsub/pub-sub-tokens-create; diff --git a/yarn.lock b/yarn.lock index 23c570128..3ecb4d041 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3916,15 +3916,15 @@ dependencies: "@types/yargs-parser" "*" -"@typespec/asset-emitter@^0.72.1": - version "0.72.1" - resolved "https://registry.npmjs.org/@typespec/asset-emitter/-/asset-emitter-0.72.1.tgz" - integrity sha512-lk41TinsVknczgl64OrEVQ+S6K5WiLAzDgIclaOVKu0ld1vNADz9grqwOtnTiYCz0pWRyZE+xhrq/9XkszU3lg== +"@typespec/asset-emitter@^0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@typespec/asset-emitter/-/asset-emitter-0.73.0.tgz#c8913e0cefd4bed4e18af181a2ed786d916d64d2" + integrity sha512-SigCa9k8gS+AiHE7Ky/kcwyqFM5kuJ0wXT+Dy89Jbd+wwrYu+mKXyXbScrTdc+MBzut+rFltFENgEYXsSvA/mA== -"@typespec/compiler@1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.2.1.tgz" - integrity sha512-lUdHCRBPtianNN6QKt0G9qyyuSu7azbqKcYNimNLYQwrEIDcgSfQAUnoja9s+gtzCQQRzfbUZ8WLBC2b9cC81Q== +"@typespec/compiler@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@typespec/compiler/-/compiler-1.3.0.tgz#cd53eb3b55c4471145f250de48227c3b5e1ec07a" + integrity sha512-OqpoNP3C2y8riA6C5RofPMvmj9jNiGyyhde0tM2ZE7IBOv7BBaTDqw4CJD22YnC8JEilRfPmvdVCViNrPHEjrA== dependencies: "@babel/code-frame" "~7.27.1" "@inquirer/prompts" "^7.4.0" @@ -3935,7 +3935,7 @@ is-unicode-supported "^2.1.0" mustache "~4.2.0" picocolors "~1.1.1" - prettier "~3.5.3" + prettier "~3.6.2" semver "^7.7.1" tar "^7.4.3" temporal-polyfill "^0.3.0" @@ -3944,30 +3944,30 @@ yaml "~2.8.0" yargs "~18.0.0" -"@typespec/http@1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@typespec/http/-/http-1.2.1.tgz" - integrity sha512-HEPHgVFO2oQL6uZCtpqnRYVZizfSu9BO6vAgdRl1FYJWD2G0f/A4/hK6LEgpyZP44k39M1xMSqVrll2KZ5zpnw== +"@typespec/http@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@typespec/http/-/http-1.3.0.tgz#64ea5be5bd298d89556c1d4feca6cfdcb868652c" + integrity sha512-4W3KsmBHZGgECVbvyh7S7KQG06948XyVVzae+UbVDDxoUj/x4Ry0AXw3q4HmzB2BVhxw6JBrwBuVa5mxjVMzdw== -"@typespec/openapi3@1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-1.2.1.tgz" - integrity sha512-PG4+yDTm1YI1rrxFAS3B8WZc6S66pl2WPK+9pP/5b0He9NkFmA53BIodgXpV2QuhvChCbEjr/CDa94ufv8+cKw== +"@typespec/openapi3@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@typespec/openapi3/-/openapi3-1.3.0.tgz#34fe25ae0731e8275c890b91d4789bced62d299f" + integrity sha512-ZG+swQYtdBgyTUbwPI03YQJpPUYhORtbcx6mIFNsKhsTRRC2UDq63jUNCIFCTYI6DJPzkVpra56YPNCXmQLZMg== dependencies: "@apidevtools/swagger-parser" "~12.0.0" - "@typespec/asset-emitter" "^0.72.1" + "@typespec/asset-emitter" "^0.73.0" openapi-types "~12.1.3" yaml "~2.8.0" -"@typespec/openapi@1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.2.1.tgz" - integrity sha512-PSoM6c5M7epiFdFDPL4zIJKRPUgJepMtOtO1vVOSIFuz26DcFQpc8xzBy7LBsRneSfp8b6XbsiaNXNcBP/9A1w== +"@typespec/openapi@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@typespec/openapi/-/openapi-1.3.0.tgz#afecef61fe9d2231e713f11ce5bb556c60d01670" + integrity sha512-BSeshjCZQodVGyVHn7ytcUeIcUGjqbG2Ac0NLOQaaKnISVrhTWNcgo5aFTqxAa24ZL/EuhqlSauLyYce2EV9fw== -"@typespec/rest@0.72.1": - version "0.72.1" - resolved "https://registry.npmjs.org/@typespec/rest/-/rest-0.72.1.tgz" - integrity sha512-w0C91JhrVos8mAdd3OVwrcS6aSjuKlw7LtoazHenAmou/zSACKZbH4g6ko1BY8fv5lgl+q7VZ3/52uEWHOTxpw== +"@typespec/rest@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@typespec/rest/-/rest-0.73.0.tgz#ac8c759b510e0e2dd7803295a0a137448ea7c5a5" + integrity sha512-28hgFGvreBg34Xuguw+E++pQC/kbRxy1Bpx/9nU7x87Ly6ykns3lpx74gjY9ByE8VYKVbXtC7lzdnp19DRSjIQ== "@ungap/structured-clone@^1.0.0": version "1.3.0" @@ -10356,16 +10356,11 @@ prebuild-install@^7.1.3: tar-fs "^2.0.0" tunnel-agent "^0.6.0" -prettier@^3.3.3: +prettier@^3.3.3, prettier@~3.6.2: version "3.6.2" resolved "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz" integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== -prettier@~3.5.3: - version "3.5.3" - resolved "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz" - integrity sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw== - pretty-error@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz" From e9829a919055c5e8ee9facba014016b3532299bb Mon Sep 17 00:00:00 2001 From: Devon White Date: Tue, 19 Aug 2025 13:06:06 -0400 Subject: [PATCH 5/6] fix link --- website/docs/main/home/messaging/chat/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/main/home/messaging/chat/index.mdx b/website/docs/main/home/messaging/chat/index.mdx index 6c4154fd9..590830585 100644 --- a/website/docs/main/home/messaging/chat/index.mdx +++ b/website/docs/main/home/messaging/chat/index.mdx @@ -20,7 +20,7 @@ The most basic chat functionality is provided in a **PubSub** environment, which } > Create PubSub Tokens From 07089e09cba9277389832a3ab58a1b0dc6ba80e1 Mon Sep 17 00:00:00 2001 From: hey-august Date: Wed, 20 Aug 2025 15:07:52 -0400 Subject: [PATCH 6/6] Grammar --- specs/signalwire-rest/pubsub-api/tokens/models/requests.tsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/signalwire-rest/pubsub-api/tokens/models/requests.tsp b/specs/signalwire-rest/pubsub-api/tokens/models/requests.tsp index d981eb77e..d105bac5f 100644 --- a/specs/signalwire-rest/pubsub-api/tokens/models/requests.tsp +++ b/specs/signalwire-rest/pubsub-api/tokens/models/requests.tsp @@ -11,7 +11,7 @@ model NewPubSubToken { @minValue(1) @maxValue(43200) @example(15) - @doc("The maximum time, in minutes, that the access token will be valid for. Between 1 and 43,200 (30 days).") + @doc("The maximum time, in minutes, for which the access token will be valid. Between 1 and 43,200 (30 days).") ttl: integer; channels: PubSubChannels; @@ -50,4 +50,4 @@ model PubSubPermissions @doc("Gives the token write access to the channel.") @example(false) write?: boolean; - }>; \ No newline at end of file + }>;