diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 7dcd410a..3019cb39 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 6bff3a53-3f0b-40b4-942f-ff70dc583ae5 management: - docChecksum: 843ea7a66cc1d5083e5d95aefc6fb6ca + docChecksum: 807dca25f8934d3ee0ab0b92b6ecf1de docVersion: "1.0" - speakeasyVersion: 1.454.0 - generationVersion: 2.477.0 - releaseVersion: 0.0.1-alpha.100 - configChecksum: 5900b0139a40d98f7c398032da0f3d5c + speakeasyVersion: 1.454.2 + generationVersion: 2.477.4 + releaseVersion: 0.0.1-alpha.104 + configChecksum: daeeac7d01478c3524be0b5ac7a9b11d published: true features: typescript: @@ -559,7 +559,7 @@ examples: "404": application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": false}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} EventsController_triggerBulk: speakeasy-default-events-controller-trigger-bulk: requestBody: @@ -572,7 +572,7 @@ examples: "404": application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"]}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} EventsController_broadcastEventToAll: speakeasy-default-events-controller-broadcast-event-to-all: requestBody: @@ -725,7 +725,7 @@ examples: "404": application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "6384.24"}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} IntegrationsController_getActiveIntegrations: speakeasy-default-integrations-controller-get-active-integrations: responses: @@ -800,7 +800,7 @@ examples: "404": application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "6384.24"}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} SubscribersController_getSubscriber: speakeasy-default-subscribers-controller-get-subscriber: parameters: @@ -848,7 +848,7 @@ examples: "404": application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "9062.22"}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} SubscribersController_updateSubscriberChannel: speakeasy-default-subscribers-controller-update-subscriber-channel: parameters: @@ -889,7 +889,7 @@ examples: "404": application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": false}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} SubscribersController_updateSubscriberOnlineFlag: speakeasy-default-subscribers-controller-update-subscriber-online-flag: parameters: @@ -973,7 +973,7 @@ examples: "201": application/json: [] "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "5508.57"}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} SubscribersController_chatOauthCallback: speakeasy-default-subscribers-controller-chat-oauth-callback: parameters: @@ -1042,7 +1042,7 @@ examples: "201": application/json: "4603.37" "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "4603.37"}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "400": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} "404": @@ -1064,7 +1064,7 @@ examples: "404": application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"]}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} MessagesController_getMessages: speakeasy-default-messages-controller-get-messages: responses: @@ -1098,7 +1098,7 @@ examples: "404": application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"]}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} TopicsController_createTopic: speakeasy-default-topics-controller-create-topic: requestBody: @@ -1111,7 +1111,7 @@ examples: "404": application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "6384.24"}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} TopicsController_listTopics: speakeasy-default-topics-controller-list-topics: responses: @@ -1130,7 +1130,7 @@ examples: "400": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": false}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} TopicsController_getTopic: speakeasy-default-topics-controller-get-topic: parameters: @@ -1190,7 +1190,7 @@ examples: "404": application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": 17}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": false}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} TopicsController_assign: speakeasy-default-topics-controller-assign: parameters: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 593561a5..65a6dddc 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false typescript: - version: 0.0.1-alpha.100 + version: 0.0.1-alpha.104 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ae489fc7..4201bdd8 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.454.0 +speakeasyVersion: 1.454.2 sources: json-development: sourceNamespace: json-development - sourceRevisionDigest: sha256:294fea636b9043a239268abece5047b61e3ecb0feba55c5001158070307aa267 - sourceBlobDigest: sha256:24474dba5f53785030e6fbd5bd20447f8904211b67ee2bc2b77f716da10077dc + sourceRevisionDigest: sha256:d6ae711cc32325036df56c1cdcb3b883b2ae0408571690104d13c4f719e04f06 + sourceBlobDigest: sha256:b088cb8ed2917c095114cd71609109483bc853175e733c69c86ebc493778889b tags: - latest - "1.0" @@ -11,10 +11,10 @@ targets: my-first-target: source: json-development sourceNamespace: json-development - sourceRevisionDigest: sha256:294fea636b9043a239268abece5047b61e3ecb0feba55c5001158070307aa267 - sourceBlobDigest: sha256:24474dba5f53785030e6fbd5bd20447f8904211b67ee2bc2b77f716da10077dc + sourceRevisionDigest: sha256:d6ae711cc32325036df56c1cdcb3b883b2ae0408571690104d13c4f719e04f06 + sourceBlobDigest: sha256:b088cb8ed2917c095114cd71609109483bc853175e733c69c86ebc493778889b codeSamplesNamespace: code-samples-typescript - codeSamplesRevisionDigest: sha256:99fe230c3b134587b641733720e8fc3889fca2ba42164b7c4d4b206716399486 + codeSamplesRevisionDigest: sha256:f6e4ad28bb30a2ef69112abafd0be67fe66dbabd3601c996d509624acf744a8c workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 253d71b7..5ceea8cd 100644 --- a/README.md +++ b/README.md @@ -415,25 +415,15 @@ run(); ## Error Handling -All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`. - -If a HTTP request fails, an operation my also throw an error from the `models/errors/httpclienterrors.ts` module: - -| HTTP Client Error | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | -| RequestAbortedError | HTTP request was aborted by the client | -| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal | -| ConnectionError | HTTP client was unable to make a request to a server | -| InvalidRequestError | Any input used to create a request is invalid | -| UnexpectedClientError | Unrecognised or unexpected error | - -In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `trigger` method may throw the following errors: +Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `trigger` method may throw the following errors: | Error Type | Status Code | Content Type | | --------------- | ------------- | ---------------- | | errors.ErrorDto | 400, 404, 409 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`. + ```typescript import { Novu } from "@novu/api"; import { ErrorDto, SDKValidationError } from "@novu/api/models/errors"; @@ -463,8 +453,9 @@ async function run() { console.log(result); } catch (err) { switch (true) { + // The server response does not match the expected SDK schema case (err instanceof SDKValidationError): { - // Validation errors can be pretty-printed + // Pretty-print will provide a human-readable multi-line error message console.error(err.pretty()); // Raw value may also be inspected console.error(err.rawValue); @@ -476,6 +467,7 @@ async function run() { return; } default: { + // Other errors such as network errors, see HTTPClientErrors for more details throw err; } } @@ -486,7 +478,17 @@ run(); ``` -Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging. +Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging. + +In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module: + +| HTTP Client Error | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | +| RequestAbortedError | HTTP request was aborted by the client | +| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal | +| ConnectionError | HTTP client was unable to make a request to a server | +| InvalidRequestError | Any input used to create a request is invalid | +| UnexpectedClientError | Unrecognised or unexpected error | diff --git a/docs/models/components/errors.md b/docs/models/components/errors.md index 6aede440..6655f2b6 100644 --- a/docs/models/components/errors.md +++ b/docs/models/components/errors.md @@ -10,6 +10,7 @@ let value: Errors = { "Field is required", "Invalid format", ], + value: "xx xx xx ", }; ``` @@ -18,4 +19,4 @@ let value: Errors = { | Field | Type | Required | Description | | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | | `messages` | *string*[] | :heavy_check_mark: | N/A | -| `value` | *components.ValidationErrorDtoValue* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `value` | *components.ValidationErrorDtoValue* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/validationerrordto.md b/docs/models/components/validationerrordto.md index 03294868..aa5587a7 100644 --- a/docs/models/components/validationerrordto.md +++ b/docs/models/components/validationerrordto.md @@ -31,7 +31,13 @@ let value: ValidationErrorDto = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: 5232.48, }, @@ -41,12 +47,12 @@ let value: ValidationErrorDto = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `statusCode` | *number* | :heavy_check_mark: | HTTP status code of the error response. | 404 | -| `timestamp` | *string* | :heavy_check_mark: | Timestamp of when the error occurred. | 2024-12-12T13:00:00Z | -| `path` | *string* | :heavy_check_mark: | The path where the error occurred. | /api/v1/resource | -| `message` | *string* | :heavy_check_mark: | A detailed error message. | Resource not found. | -| `ctx` | Record | :heavy_minus_sign: | Optional context object for additional error details. | {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
} | -| `errorId` | *string* | :heavy_minus_sign: | Optional unique identifier for the error, useful for tracking using Sentry and
New Relic, only available for 500. | abc123 | -| `errors` | Record | :heavy_check_mark: | A record of validation errors keyed by field name | {
"fieldName1": {
"messages": [
"Field is required",
"Must be a valid email address"
],
"value": "invalidEmail"
},
"fieldName2": {
"messages": [
"Must be at least 18 years old"
],
"value": 17
},
"fieldName3": {
"messages": [
"Field cannot be null"
],
"value": null
}
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `statusCode` | *number* | :heavy_check_mark: | HTTP status code of the error response. | 404 | +| `timestamp` | *string* | :heavy_check_mark: | Timestamp of when the error occurred. | 2024-12-12T13:00:00Z | +| `path` | *string* | :heavy_check_mark: | The path where the error occurred. | /api/v1/resource | +| `message` | *string* | :heavy_check_mark: | A detailed error message. | Resource not found. | +| `ctx` | Record | :heavy_minus_sign: | Optional context object for additional error details. | {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
} | +| `errorId` | *string* | :heavy_minus_sign: | Optional unique identifier for the error, useful for tracking using Sentry and
New Relic, only available for 500. | abc123 | +| `errors` | Record | :heavy_check_mark: | A record of validation errors keyed by field name | {
"fieldName1": {
"messages": [
"Field is required",
"Must be a valid email address"
],
"value": "invalidEmail"
},
"fieldName2": {
"messages": [
"Must be at least 18 years old"
],
"value": 17
},
"fieldName3": {
"messages": [
"Must be a boolean value"
],
"value": true
},
"fieldName4": {
"messages": [
"Must be a valid object"
],
"value": {
"key": "value"
}
}
} | \ No newline at end of file diff --git a/docs/models/operations/eventscontrollertriggerbulkresponseresult.md b/docs/models/operations/eventscontrollertriggerbulkresponseresult.md index 7a65f1bd..74b7cc75 100644 --- a/docs/models/operations/eventscontrollertriggerbulkresponseresult.md +++ b/docs/models/operations/eventscontrollertriggerbulkresponseresult.md @@ -32,7 +32,13 @@ const value: components.ValidationErrorDto = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: 6458.94, }, diff --git a/docs/models/operations/eventscontrollertriggerresponseresult.md b/docs/models/operations/eventscontrollertriggerresponseresult.md index 90880714..c111e08b 100644 --- a/docs/models/operations/eventscontrollertriggerresponseresult.md +++ b/docs/models/operations/eventscontrollertriggerresponseresult.md @@ -32,7 +32,13 @@ const value: components.ValidationErrorDto = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: false, }, diff --git a/docs/models/operations/integrationscontrollercreateintegrationresponseresult.md b/docs/models/operations/integrationscontrollercreateintegrationresponseresult.md index aa71aa48..78a56638 100644 --- a/docs/models/operations/integrationscontrollercreateintegrationresponseresult.md +++ b/docs/models/operations/integrationscontrollercreateintegrationresponseresult.md @@ -32,7 +32,13 @@ const value: components.ValidationErrorDto = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: {}, }, diff --git a/docs/models/operations/messagescontrollerdeletemessagesbytransactionidresponse.md b/docs/models/operations/messagescontrollerdeletemessagesbytransactionidresponse.md index 04428ffb..934b66f3 100644 --- a/docs/models/operations/messagescontrollerdeletemessagesbytransactionidresponse.md +++ b/docs/models/operations/messagescontrollerdeletemessagesbytransactionidresponse.md @@ -37,7 +37,13 @@ let value: MessagesControllerDeleteMessagesByTransactionIdResponse = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: false, }, diff --git a/docs/models/operations/notificationscontrollerlistnotificationsrequest.md b/docs/models/operations/notificationscontrollerlistnotificationsrequest.md index 7b79882d..08ae3fca 100644 --- a/docs/models/operations/notificationscontrollerlistnotificationsrequest.md +++ b/docs/models/operations/notificationscontrollerlistnotificationsrequest.md @@ -18,4 +18,6 @@ let value: NotificationsControllerListNotificationsRequest = {}; | ~~`search`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | `subscriberIds` | *string*[] | :heavy_minus_sign: | N/A | | `page` | *number* | :heavy_minus_sign: | N/A | -| `transactionId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `transactionId` | *string* | :heavy_minus_sign: | N/A | +| `after` | *string* | :heavy_minus_sign: | N/A | +| `before` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerbulkcreatesubscribersresponse.md b/docs/models/operations/subscriberscontrollerbulkcreatesubscribersresponse.md index a43e6e10..ca7d3f02 100644 --- a/docs/models/operations/subscriberscontrollerbulkcreatesubscribersresponse.md +++ b/docs/models/operations/subscriberscontrollerbulkcreatesubscribersresponse.md @@ -37,7 +37,13 @@ let value: SubscribersControllerBulkCreateSubscribersResponse = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: "", }, diff --git a/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md b/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md index 5401d302..7b16c276 100644 --- a/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md +++ b/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md @@ -37,7 +37,13 @@ let value: SubscribersControllerCreateSubscriberResponse = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: false, }, diff --git a/docs/models/operations/subscriberscontrollercreatesubscriberresponseresult.md b/docs/models/operations/subscriberscontrollercreatesubscriberresponseresult.md index 0f3ee6f8..f7da188b 100644 --- a/docs/models/operations/subscriberscontrollercreatesubscriberresponseresult.md +++ b/docs/models/operations/subscriberscontrollercreatesubscriberresponseresult.md @@ -32,7 +32,13 @@ const value: components.ValidationErrorDto = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: 7742.34, }, diff --git a/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsresponse.md b/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsresponse.md index 3c5436a6..73714491 100644 --- a/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsresponse.md +++ b/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsresponse.md @@ -37,7 +37,13 @@ let value: SubscribersControllerDeleteSubscriberCredentialsResponse = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: false, }, diff --git a/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md b/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md index 140d6a69..5586b2e1 100644 --- a/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md +++ b/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md @@ -37,7 +37,13 @@ let value: SubscribersControllerMarkActionAsSeenResponse = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: {}, }, diff --git a/docs/models/operations/subscriberscontrollermarkactionasseenresponseresult.md b/docs/models/operations/subscriberscontrollermarkactionasseenresponseresult.md index e0ee20f9..0c8d26c3 100644 --- a/docs/models/operations/subscriberscontrollermarkactionasseenresponseresult.md +++ b/docs/models/operations/subscriberscontrollermarkactionasseenresponseresult.md @@ -32,7 +32,13 @@ const value: components.ValidationErrorDto = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: "", }, diff --git a/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md b/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md index 1c8c024c..3dca6026 100644 --- a/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md +++ b/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md @@ -37,7 +37,13 @@ let value: SubscribersControllerMarkAllUnreadAsReadResponse = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: false, }, diff --git a/docs/models/operations/subscriberscontrollermarkallunreadasreadresponseresult.md b/docs/models/operations/subscriberscontrollermarkallunreadasreadresponseresult.md index c97f4243..305e023b 100644 --- a/docs/models/operations/subscriberscontrollermarkallunreadasreadresponseresult.md +++ b/docs/models/operations/subscriberscontrollermarkallunreadasreadresponseresult.md @@ -32,7 +32,13 @@ const value: components.ValidationErrorDto = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: 2444.26, }, diff --git a/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md b/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md index 2d22a8b9..0cb49cd3 100644 --- a/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md +++ b/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md @@ -37,7 +37,13 @@ let value: SubscribersControllerMarkMessagesAsResponse = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: false, }, diff --git a/docs/models/operations/subscriberscontrollermarkmessagesasresponseresult.md b/docs/models/operations/subscriberscontrollermarkmessagesasresponseresult.md index fe3fbabc..edf88bc2 100644 --- a/docs/models/operations/subscriberscontrollermarkmessagesasresponseresult.md +++ b/docs/models/operations/subscriberscontrollermarkmessagesasresponseresult.md @@ -32,7 +32,13 @@ const value: components.ValidationErrorDto = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: "", }, diff --git a/docs/models/operations/topicscontrollercreatetopicresponse.md b/docs/models/operations/topicscontrollercreatetopicresponse.md index 9b9f3adf..fdc6795c 100644 --- a/docs/models/operations/topicscontrollercreatetopicresponse.md +++ b/docs/models/operations/topicscontrollercreatetopicresponse.md @@ -37,7 +37,13 @@ let value: TopicsControllerCreateTopicResponse = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: "", }, diff --git a/docs/models/operations/topicscontrollercreatetopicresponseresult.md b/docs/models/operations/topicscontrollercreatetopicresponseresult.md index 0d20b57a..4883798f 100644 --- a/docs/models/operations/topicscontrollercreatetopicresponseresult.md +++ b/docs/models/operations/topicscontrollercreatetopicresponseresult.md @@ -32,7 +32,13 @@ const value: components.ValidationErrorDto = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: "", }, diff --git a/docs/models/operations/topicscontrollerdeletetopicresponse.md b/docs/models/operations/topicscontrollerdeletetopicresponse.md index 29a4935f..3a7e1e6e 100644 --- a/docs/models/operations/topicscontrollerdeletetopicresponse.md +++ b/docs/models/operations/topicscontrollerdeletetopicresponse.md @@ -37,7 +37,13 @@ let value: TopicsControllerDeleteTopicResponse = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: 641.47, }, diff --git a/docs/models/operations/topicscontrollerremovesubscribersresponse.md b/docs/models/operations/topicscontrollerremovesubscribersresponse.md index f3c4ef07..e098fa7e 100644 --- a/docs/models/operations/topicscontrollerremovesubscribersresponse.md +++ b/docs/models/operations/topicscontrollerremovesubscribersresponse.md @@ -37,7 +37,13 @@ let value: TopicsControllerRemoveSubscribersResponse = { }, "fieldName3": { messages: [ - "Field cannot be null", + "Must be a boolean value", + ], + value: true, + }, + "fieldName4": { + messages: [ + "Must be a valid object", ], value: false, }, diff --git a/jsr.json b/jsr.json index 53c7ef67..5703cbd1 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.100", + "version": "0.0.1-alpha.104", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 3bc17806..7c9ccf5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.100", + "version": "0.0.1-alpha.104", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@novu/api", - "version": "0.0.1-alpha.100", + "version": "0.0.1-alpha.104", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index dd72ca70..a460e340 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.100", + "version": "0.0.1-alpha.104", "author": "Novu", "main": "./index.js", "sideEffects": false, diff --git a/sources/json-development.json b/sources/json-development.json index da03db39..19676ff7 100644 --- a/sources/json-development.json +++ b/sources/json-development.json @@ -1139,6 +1139,22 @@ "schema": { "type": "string" } + }, + { + "name": "after", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -12071,7 +12087,8 @@ "value": { "oneOf": [ { - "type": "string" + "type": "string", + "nullable": true }, { "type": "number" @@ -12086,13 +12103,15 @@ } }, "required": [ - "messages" + "messages", + "value" ], "example": { "messages": [ "Field is required", "Invalid format" - ] + ], + "value": "xx xx xx " } }, "example": { @@ -12111,9 +12130,17 @@ }, "fieldName3": { "messages": [ - "Field cannot be null" + "Must be a boolean value" ], - "value": null + "value": true + }, + "fieldName4": { + "messages": [ + "Must be a valid object" + ], + "value": { + "key": "value" + } } } } diff --git a/src/funcs/notificationsList.ts b/src/funcs/notificationsList.ts index 1310f7eb..832f23a8 100644 --- a/src/funcs/notificationsList.ts +++ b/src/funcs/notificationsList.ts @@ -58,6 +58,8 @@ export async function notificationsList( const path = pathToFunc("/v1/notifications")(); const query = encodeFormQuery({ + "after": payload.after, + "before": payload.before, "channels": payload.channels, "emails": payload.emails, "page": payload.page, diff --git a/src/lib/config.ts b/src/lib/config.ts index a4061d01..87e295e5 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0", - sdkVersion: "0.0.1-alpha.100", - genVersion: "2.477.0", - userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.100 2.477.0 1.0 @novu/api", + sdkVersion: "0.0.1-alpha.104", + genVersion: "2.477.4", + userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.104 2.477.4 1.0 @novu/api", } as const; diff --git a/src/models/components/validationerrordto.ts b/src/models/components/validationerrordto.ts index 578fbd79..b077d1f6 100644 --- a/src/models/components/validationerrordto.ts +++ b/src/models/components/validationerrordto.ts @@ -13,7 +13,7 @@ export type ValidationErrorDtoValue = Four | string | number | boolean; export type Errors = { messages: Array; - value?: Four | string | number | boolean | undefined; + value: Four | string | number | boolean | null; }; export type ValidationErrorDto = { @@ -154,18 +154,20 @@ export function validationErrorDtoValueFromJSON( export const Errors$inboundSchema: z.ZodType = z .object({ messages: z.array(z.string()), - value: z.union([ - z.lazy(() => Four$inboundSchema), - z.string(), - z.number(), - z.boolean(), - ]).optional(), + value: z.nullable( + z.union([ + z.lazy(() => Four$inboundSchema), + z.string(), + z.number(), + z.boolean(), + ]), + ), }); /** @internal */ export type Errors$Outbound = { messages: Array; - value?: Four$Outbound | string | number | boolean | undefined; + value: Four$Outbound | string | number | boolean | null; }; /** @internal */ @@ -175,12 +177,14 @@ export const Errors$outboundSchema: z.ZodType< Errors > = z.object({ messages: z.array(z.string()), - value: z.union([ - z.lazy(() => Four$outboundSchema), - z.string(), - z.number(), - z.boolean(), - ]).optional(), + value: z.nullable( + z.union([ + z.lazy(() => Four$outboundSchema), + z.string(), + z.number(), + z.boolean(), + ]), + ), }); /** diff --git a/src/models/operations/notificationscontrollerlistnotifications.ts b/src/models/operations/notificationscontrollerlistnotifications.ts index c15c67d6..bbe35478 100644 --- a/src/models/operations/notificationscontrollerlistnotifications.ts +++ b/src/models/operations/notificationscontrollerlistnotifications.ts @@ -30,6 +30,8 @@ export type NotificationsControllerListNotificationsRequest = { subscriberIds?: Array | undefined; page?: number | undefined; transactionId?: string | undefined; + after?: string | undefined; + before?: string | undefined; }; export type NotificationsControllerListNotificationsResponse = { @@ -70,6 +72,8 @@ export const NotificationsControllerListNotificationsRequest$inboundSchema: subscriberIds: z.array(z.string()).optional(), page: z.number().default(0), transactionId: z.string().optional(), + after: z.string().optional(), + before: z.string().optional(), }); /** @internal */ @@ -81,6 +85,8 @@ export type NotificationsControllerListNotificationsRequest$Outbound = { subscriberIds?: Array | undefined; page: number; transactionId?: string | undefined; + after?: string | undefined; + before?: string | undefined; }; /** @internal */ @@ -97,6 +103,8 @@ export const NotificationsControllerListNotificationsRequest$outboundSchema: subscriberIds: z.array(z.string()).optional(), page: z.number().default(0), transactionId: z.string().optional(), + after: z.string().optional(), + before: z.string().optional(), }); /**