Skip to content

Commit 1c95f57

Browse files
github-actions[bot]speakeasybotspeakeasy-github[bot]
authored
chore: 🐝 Update SDK - Generate 1.3.0 (#71)
* ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.555.2 * empty commit to trigger [run-tests] workflow --------- Co-authored-by: speakeasybot <[email protected]> Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
1 parent 88b3928 commit 1c95f57

File tree

193 files changed

+1934
-2658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+1934
-2658
lines changed

.speakeasy/gen.lock

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 6bff3a53-3f0b-40b4-942f-ff70dc583ae5
33
management:
4-
docChecksum: 0e9e41da21a589fdd78ae920c178c818
4+
docChecksum: f6ceb2d06219b4f2a3f002e288ec903e
55
docVersion: 2.2.0
6-
speakeasyVersion: 1.552.0
7-
generationVersion: 2.610.0
8-
releaseVersion: 1.2.0
9-
configChecksum: c2dbf44ab9aac08c0a7d6e1ada37dfc7
6+
speakeasyVersion: 1.555.2
7+
generationVersion: 2.620.2
8+
releaseVersion: 1.3.0
9+
configChecksum: ec446caf88e3f645ecd883ff146f3e02
1010
repoURL: https://github.com/novuhq/novu-ts.git
1111
installationURL: https://github.com/novuhq/novu-ts
1212
published: true
@@ -15,7 +15,7 @@ features:
1515
additionalDependencies: 0.1.0
1616
additionalProperties: 0.1.1
1717
constsAndDefaults: 0.1.11
18-
core: 3.21.9
18+
core: 3.21.10
1919
defaultEnabledRetries: 0.1.0
2020
deprecations: 2.81.1
2121
enumUnions: 0.1.0
@@ -32,7 +32,7 @@ features:
3232
nullables: 0.1.1
3333
responseFormat: 0.2.3
3434
retries: 2.83.0
35-
sdkHooks: 0.2.0
35+
sdkHooks: 0.3.0
3636
unions: 2.85.8
3737
generatedFiles:
3838
- .gitattributes
@@ -169,6 +169,8 @@ generatedFiles:
169169
- docs/models/components/patchsubscriberpreferencesdto.md
170170
- docs/models/components/patchsubscriberrequestdto.md
171171
- docs/models/components/payload.md
172+
- docs/models/components/payloadvalidationerrordto.md
173+
- docs/models/components/payloadvalidationerrordtovalue.md
172174
- docs/models/components/preferenceoverridesourceenum.md
173175
- docs/models/components/providerid.md
174176
- docs/models/components/providersidenum.md
@@ -222,6 +224,8 @@ generatedFiles:
222224
- docs/models/components/updatesubscriberonlineflagrequestdto.md
223225
- docs/models/components/updatetopicrequestdto.md
224226
- docs/models/components/value.md
227+
- docs/models/components/value4.md
228+
- docs/models/components/value5.md
225229
- docs/models/components/weekdays.md
226230
- docs/models/components/workflowintegrationstatus.md
227231
- docs/models/components/workfloworiginenum.md
@@ -233,6 +237,11 @@ generatedFiles:
233237
- docs/models/errors/message.md
234238
- docs/models/errors/message4.md
235239
- docs/models/errors/message5.md
240+
- docs/models/errors/messagepayloadvalidationexceptiondto4.md
241+
- docs/models/errors/messagepayloadvalidationexceptiondto5.md
242+
- docs/models/errors/payloadvalidationexceptiondto.md
243+
- docs/models/errors/payloadvalidationexceptiondtomessage.md
244+
- docs/models/errors/schema.md
236245
- docs/models/errors/validationerrordto.md
237246
- docs/models/errors/validationerrordtomessage.md
238247
- docs/models/operations/channel.md
@@ -541,6 +550,7 @@ generatedFiles:
541550
- src/models/components/patchpreferencechannelsdto.ts
542551
- src/models/components/patchsubscriberpreferencesdto.ts
543552
- src/models/components/patchsubscriberrequestdto.ts
553+
- src/models/components/payloadvalidationerrordto.ts
544554
- src/models/components/preferenceoverridesourceenum.ts
545555
- src/models/components/providersidenum.ts
546556
- src/models/components/removesubscriberresponsedto.ts
@@ -585,6 +595,7 @@ generatedFiles:
585595
- src/models/errors/errordto.ts
586596
- src/models/errors/httpclienterrors.ts
587597
- src/models/errors/index.ts
598+
- src/models/errors/payloadvalidationexceptiondto.ts
588599
- src/models/errors/sdkerror.ts
589600
- src/models/errors/sdkvalidationerror.ts
590601
- src/models/errors/validationerrordto.ts
@@ -667,11 +678,13 @@ examples:
667678
"414":
668679
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
669680
"400":
670-
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
681+
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "type": "PAYLOAD_VALIDATION_ERROR", "errors": [{"field": "user.name", "message": "must have required property 'name'", "value": "{\"age\":25}", "schemaPath": "#/required"}], "schema": {}}
671682
"422":
672683
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"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": null}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}}
673684
"500":
674685
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
686+
"401":
687+
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
675688
EventsController_cancel:
676689
speakeasy-default-events-controller-cancel:
677690
parameters:
@@ -698,11 +711,13 @@ examples:
698711
"414":
699712
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
700713
"400":
701-
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
714+
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "type": "PAYLOAD_VALIDATION_ERROR", "errors": [{"field": "user.name", "message": "must have required property 'name'", "value": [{"age": 25}], "schemaPath": "#/required"}], "schema": {}}
702715
"422":
703716
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"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": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}}
704717
"500":
705718
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
719+
"401":
720+
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
706721
EventsController_triggerBulk:
707722
speakeasy-default-events-controller-trigger-bulk:
708723
requestBody:
@@ -713,11 +728,13 @@ examples:
713728
"414":
714729
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
715730
"400":
716-
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
731+
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "type": "PAYLOAD_VALIDATION_ERROR", "errors": [{"field": "user.name", "message": "must have required property 'name'", "value": [{"age": 25}], "schemaPath": "#/required"}], "schema": {}}
717732
"422":
718733
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"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": null}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}}
719734
"500":
720735
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
736+
"401":
737+
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
721738
SubscribersController_searchSubscribers:
722739
speakeasy-default-subscribers-controller-search-subscribers:
723740
responses:

.speakeasy/gen.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ generation:
44
maintainOpenAPIOrder: true
55
usageSnippets:
66
optionalPropertyRendering: withExample
7+
sdkInitStyle: constructor
78
useClassNamesForArrayFields: true
89
fixes:
910
nameResolutionDec2023: true
@@ -16,7 +17,7 @@ generation:
1617
oAuth2ClientCredentialsEnabled: false
1718
oAuth2PasswordEnabled: false
1819
typescript:
19-
version: 1.2.0
20+
version: 1.3.0
2021
additionalDependencies:
2122
dependencies: {}
2223
devDependencies: {}

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.552.0
1+
speakeasyVersion: 1.555.2
22
sources:
33
json-development:
44
sourceNamespace: json-development
5-
sourceRevisionDigest: sha256:fc95cc83c3fed6a5bde88b06a4f70f727c98125212767bf12b4a3fca52032962
6-
sourceBlobDigest: sha256:e48c74ed888d731c621891613e46b8d41dbae23a15214fe57f58cdfa797c841b
5+
sourceRevisionDigest: sha256:67ef1f8688b0f6cdc89675cecc2f9b369e3e9a76dc327c98191b137157307a99
6+
sourceBlobDigest: sha256:984f580d26ec8b89369e00f478b28313381548c52dceb7153e486117d8a5ffba
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1748523689
9+
- speakeasy-sdk-regen-1748996438
1010
- 2.2.0
1111
targets:
1212
my-first-target:
1313
source: json-development
1414
sourceNamespace: json-development
15-
sourceRevisionDigest: sha256:fc95cc83c3fed6a5bde88b06a4f70f727c98125212767bf12b4a3fca52032962
16-
sourceBlobDigest: sha256:e48c74ed888d731c621891613e46b8d41dbae23a15214fe57f58cdfa797c841b
15+
sourceRevisionDigest: sha256:67ef1f8688b0f6cdc89675cecc2f9b369e3e9a76dc327c98191b137157307a99
16+
sourceBlobDigest: sha256:984f580d26ec8b89369e00f478b28313381548c52dceb7153e486117d8a5ffba
1717
codeSamplesNamespace: code-samples-typescript
18-
codeSamplesRevisionDigest: sha256:e85ecb9e1b00d6da132265f67202e6fbc06ce2fbbb674bfc7c0d9ff61a7673e2
18+
codeSamplesRevisionDigest: sha256:2af163e4f094722b4596d41cb247ecae94e39aeaadba7449a1b648c89000b92b
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

FUNCTIONS.md

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ specific category of applications.
2121
```typescript
2222
import { NovuCore } from "@novu/api/core.js";
2323
import { trigger } from "@novu/api/funcs/trigger.js";
24-
import { SDKValidationError } from "@novu/api/models/errors/sdkvalidationerror.js";
2524

2625
// Use `NovuCore` for best tree-shaking performance.
2726
// You can create one instance of it to use across an application.
@@ -41,28 +40,12 @@ async function run() {
4140
overrides: {},
4241
to: "SUBSCRIBER_ID",
4342
});
44-
45-
switch (true) {
46-
case res.ok:
47-
// The success case will be handled outside of the switch block
48-
break;
49-
case res.error instanceof SDKValidationError:
50-
// Pretty-print validation errors.
51-
return console.log(res.error.pretty());
52-
case res.error instanceof Error:
53-
return console.log(res.error);
54-
default:
55-
// TypeScript's type checking will fail on the following line if the above
56-
// cases were not exhaustive.
57-
res.error satisfies never;
58-
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
43+
if (res.ok) {
44+
const { value: result } = res;
45+
console.log(result);
46+
} else {
47+
console.log("trigger failed:", res.error);
5948
}
60-
61-
62-
const { value: result } = res;
63-
64-
// Handle the result
65-
console.log(result);
6649
}
6750

6851
run();

0 commit comments

Comments
 (0)