diff --git a/.npmignore b/.npmignore index 9ad259ee..abca4290 100644 --- a/.npmignore +++ b/.npmignore @@ -4,6 +4,7 @@ !/REACT_QUERY.md !/**/*.ts !/**/*.js +!/**/*.json !/**/*.map /.eslintrc.js diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ecda341e..b8eb98cc 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,20 @@ lockVersion: 2.0.0 id: 6bff3a53-3f0b-40b4-942f-ff70dc583ae5 management: - docChecksum: 685d8a1a91530f3244f57c461e7f19ec + docChecksum: 5711b967c5092d075f6b0b89bab0a96d docVersion: "1.0" - speakeasyVersion: 1.468.8 - generationVersion: 2.493.19 - releaseVersion: 0.0.1-alpha.198 - configChecksum: 395c82a58b4dc7b50b67c34441dc25a6 + speakeasyVersion: 1.468.9 + generationVersion: 2.493.21 + releaseVersion: 0.0.1-alpha.196 + configChecksum: 04791d768826e1ed506524af9c1c42c2 published: true features: typescript: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 + additionalProperties: 0.1.1 constsAndDefaults: 0.1.11 - core: 3.18.15 + core: 3.18.16 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 enumUnions: 0.1.0 @@ -118,8 +119,8 @@ generatedFiles: - docs/models/components/filtertopicsresponsedto.md - docs/models/components/getsubscriberpreferencesresponsedto.md - docs/models/components/gettopicresponsedto.md - - docs/models/components/idempotencybodydto.md - - docs/models/components/idempotencyresponse.md + - docs/models/components/idempotencybehaviorenum.md + - docs/models/components/idempotencytestingdto.md - docs/models/components/integrationresponsedto.md - docs/models/components/issues.md - docs/models/components/markallmessageasrequestdto.md @@ -226,11 +227,17 @@ generatedFiles: - docs/models/components/workflowresponse.md - docs/models/components/workflowresponsedata.md - docs/models/components/workflowtostepcontrolvaluesdto.md + - docs/models/errors/details.md - docs/models/errors/errordto.md - docs/models/errors/errors.md + - docs/models/errors/errort.md + - docs/models/errors/healthcontrollerhealthcheckresponsebody.md + - docs/models/errors/info.md - docs/models/errors/validationerrordto.md - docs/models/errors/value.md - docs/models/operations/channel.md + - docs/models/operations/details.md + - docs/models/operations/errort.md - docs/models/operations/eventscontrollerbroadcasteventtoallrequest.md - docs/models/operations/eventscontrollerbroadcasteventtoallresponse.md - docs/models/operations/eventscontrollercancelrequest.md @@ -239,6 +246,11 @@ generatedFiles: - docs/models/operations/eventscontrollertriggerbulkresponse.md - docs/models/operations/eventscontrollertriggerrequest.md - docs/models/operations/eventscontrollertriggerresponse.md + - docs/models/operations/healthcontrollerhealthcheckrequest.md + - docs/models/operations/healthcontrollerhealthcheckresponsebody.md + - docs/models/operations/healthcontrollertestidempotencyrequest.md + - docs/models/operations/healthcontrollertestidempotencyresponse.md + - docs/models/operations/info.md - docs/models/operations/integrationscontrollercreateintegrationrequest.md - docs/models/operations/integrationscontrollercreateintegrationresponse.md - docs/models/operations/integrationscontrollergetactiveintegrationsrequest.md @@ -312,13 +324,6 @@ generatedFiles: - docs/models/operations/subscriberscontrollerupdatesubscriberpreferenceresponse.md - docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md - docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md - - docs/models/operations/testapiratelimitbulkcontrollerglobalcategorynocostoverriderequest.md - - docs/models/operations/testapiratelimitbulkcontrollernocategorynocostoverriderequest.md - - docs/models/operations/testapiratelimitbulkcontrollernocategorysinglecostoverriderequest.md - - docs/models/operations/testingcontrolleridempotencygetrequest.md - - docs/models/operations/testingcontrolleridempotencygetresponse.md - - docs/models/operations/testingcontrolleridempotencyrequest.md - - docs/models/operations/testingcontrolleridempotencyresponse.md - docs/models/operations/topicscontrollerassignrequest.md - docs/models/operations/topicscontrollerassignresponse.md - docs/models/operations/topicscontrollercreatetopicrequest.md @@ -354,8 +359,8 @@ generatedFiles: - jsr.json - package.json - src/core.ts - - src/funcs/adminIdempotencyGet.ts - - src/funcs/adminIdempotencyPost.ts + - src/funcs/adminHealthControllerHealthCheck.ts + - src/funcs/adminTestIdempotency.ts - src/funcs/cancel.ts - src/funcs/integrationsCreate.ts - src/funcs/integrationsDelete.ts @@ -392,9 +397,6 @@ generatedFiles: - src/funcs/subscribersPropertiesUpdateOnlineFlag.ts - src/funcs/subscribersRetrieve.ts - src/funcs/subscribersUpdate.ts - - src/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.ts - - src/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.ts - - src/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.ts - src/funcs/topicsCreate.ts - src/funcs/topicsDelete.ts - src/funcs/topicsList.ts @@ -478,8 +480,8 @@ generatedFiles: - src/models/components/filtertopicsresponsedto.ts - src/models/components/getsubscriberpreferencesresponsedto.ts - src/models/components/gettopicresponsedto.ts - - src/models/components/idempotencybodydto.ts - - src/models/components/idempotencyresponse.ts + - src/models/components/idempotencybehaviorenum.ts + - src/models/components/idempotencytestingdto.ts - src/models/components/index.ts - src/models/components/integrationresponsedto.ts - src/models/components/markallmessageasrequestdto.ts @@ -547,6 +549,7 @@ generatedFiles: - src/models/components/workflowresponse.ts - src/models/components/workflowtostepcontrolvaluesdto.ts - src/models/errors/errordto.ts + - src/models/errors/healthcontrollerhealthcheck.ts - src/models/errors/httpclienterrors.ts - src/models/errors/index.ts - src/models/errors/sdkerror.ts @@ -556,6 +559,8 @@ generatedFiles: - src/models/operations/eventscontrollercancel.ts - src/models/operations/eventscontrollertrigger.ts - src/models/operations/eventscontrollertriggerbulk.ts + - src/models/operations/healthcontrollerhealthcheck.ts + - src/models/operations/healthcontrollertestidempotency.ts - src/models/operations/index.ts - src/models/operations/integrationscontrollercreateintegration.ts - src/models/operations/integrationscontrollergetactiveintegrations.ts @@ -592,11 +597,6 @@ generatedFiles: - src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts - src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts - src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts - - src/models/operations/testapiratelimitbulkcontrollerglobalcategorynocostoverride.ts - - src/models/operations/testapiratelimitbulkcontrollernocategorynocostoverride.ts - - src/models/operations/testapiratelimitbulkcontrollernocategorysinglecostoverride.ts - - src/models/operations/testingcontrolleridempotency.ts - - src/models/operations/testingcontrolleridempotencyget.ts - src/models/operations/topicscontrollerassign.ts - src/models/operations/topicscontrollercreatetopic.ts - src/models/operations/topicscontrollerdeletetopic.ts @@ -1727,6 +1727,26 @@ examples: 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"} "500": 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"} + HealthController_healthCheck: + speakeasy-default-health-controller-health-check: + responses: + "200": + application/json: {"status": "ok", "info": {"database": {"status": "up"}}, "details": {"database": {"status": "up"}}} + "503": + application/json: {"status": "error", "info": {"database": {"status": "up"}}, "error": {"redis": {"status": "down", "message": "Could not connect"}}, "details": {"database": {"status": "up"}, "redis": {"status": "down", "message": "Could not connect"}}} + HealthController_testIdempotency: + speakeasy-default-health-controller-test-idempotency: + requestBody: + application/json: {"expectedBehavior": "IMMEDIATE_EXCEPTION"} + responses: + "400": + 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"} + "414": + 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"} + "422": + 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 "}}} + "500": + 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"} generatedTests: EventsController_trigger: "2024-12-24T08:36:06+01:00" EventsController_triggerBulk: "2024-12-24T08:36:06+01:00" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 06a89332..e134ec0f 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false typescript: - version: 0.0.1-alpha.198 + version: 0.0.1-alpha.196 additionalDependencies: dependencies: {} devDependencies: {} @@ -38,7 +38,7 @@ typescript: inputModelSuffix: input maxMethodParams: 3 methodArguments: require-security-and-request - moduleFormat: dual + moduleFormat: commonjs outputModelSuffix: output packageName: '@novu/api' responseFormat: flat diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index e4dcf2e3..04160005 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.468.8 +speakeasyVersion: 1.468.9 sources: json-development: sourceNamespace: json-development - sourceRevisionDigest: sha256:cee5d8e4166a37120efd49290cd39e31f731a47e8ce6f2c8169d160e91448cd5 - sourceBlobDigest: sha256:fb483306ef3d46d0086280638a2af9803b7e79a6328622e5195b09b2861f8be8 + sourceRevisionDigest: sha256:294a81b97cf3083caf5fc94581ffeb3d817bd45b1250685ce352e6a6271f1132 + sourceBlobDigest: sha256:84c032851411dc3ed8d709a1d5a839167ddeb3b59c0e631d346946008b739b93 tags: - latest - "1.0" @@ -11,10 +11,10 @@ targets: my-first-target: source: json-development sourceNamespace: json-development - sourceRevisionDigest: sha256:cee5d8e4166a37120efd49290cd39e31f731a47e8ce6f2c8169d160e91448cd5 - sourceBlobDigest: sha256:fb483306ef3d46d0086280638a2af9803b7e79a6328622e5195b09b2861f8be8 + sourceRevisionDigest: sha256:294a81b97cf3083caf5fc94581ffeb3d817bd45b1250685ce352e6a6271f1132 + sourceBlobDigest: sha256:84c032851411dc3ed8d709a1d5a839167ddeb3b59c0e631d346946008b739b93 codeSamplesNamespace: code-samples-typescript - codeSamplesRevisionDigest: sha256:1bd212a85307028d47a77d2245e0e8612556943bc6d5d0391b1a56225ea875a5 + codeSamplesRevisionDigest: sha256:27a1f29679cda016118eb5a1829442c87ea5de15ff369dfb8512ac103d6653c0 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index e993de8a..841cd60a 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,6 @@ yarn add @novu/api zod # Note that Yarn does not install peer dependencies automatically. You will need # to install zod as shown above. ``` - -> [!NOTE] -> This package is published with CommonJS and ES Modules (ESM) support. @@ -221,8 +218,8 @@ run(); ### [admin](docs/sdks/admin/README.md) -* [idempotencyPost](docs/sdks/admin/README.md#idempotencypost) -* [idempotencyGet](docs/sdks/admin/README.md#idempotencyget) +* [healthControllerHealthCheck](docs/sdks/admin/README.md#healthcontrollerhealthcheck) +* [testIdempotency](docs/sdks/admin/README.md#testidempotency) ### [integrations](docs/sdks/integrations/README.md) @@ -259,9 +256,6 @@ run(); * [triggerBulk](docs/sdks/novu/README.md#triggerbulk) - Bulk trigger event * [triggerBroadcast](docs/sdks/novu/README.md#triggerbroadcast) - Broadcast event to all * [cancel](docs/sdks/novu/README.md#cancel) - Cancel triggered event -* [testApiRateLimitBulkControllerNoCategoryNoCostOverride](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorynocostoverride) -* [testApiRateLimitBulkControllerNoCategorySingleCostOverride](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorysinglecostoverride) -* [testApiRateLimitBulkControllerGlobalCategoryNoCostOverride](docs/sdks/novu/README.md#testapiratelimitbulkcontrollerglobalcategorynocostoverride) ### [subscribers](docs/sdks/subscribers/README.md) @@ -337,8 +331,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). Available standalone functions -- [`adminIdempotencyGet`](docs/sdks/admin/README.md#idempotencyget) -- [`adminIdempotencyPost`](docs/sdks/admin/README.md#idempotencypost) +- [`adminHealthControllerHealthCheck`](docs/sdks/admin/README.md#healthcontrollerhealthcheck) +- [`adminTestIdempotency`](docs/sdks/admin/README.md#testidempotency) - [`cancel`](docs/sdks/novu/README.md#cancel) - Cancel triggered event - [`integrationsCreate`](docs/sdks/integrations/README.md#create) - Create integration - [`integrationsDelete`](docs/sdks/integrations/README.md#delete) - Delete integration @@ -375,9 +369,6 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`subscribersPropertiesUpdateOnlineFlag`](docs/sdks/properties/README.md#updateonlineflag) - Update subscriber online status - [`subscribersRetrieve`](docs/sdks/subscribers/README.md#retrieve) - Get subscriber - [`subscribersUpdate`](docs/sdks/subscribers/README.md#update) - Update subscriber -- [`testApiRateLimitBulkControllerGlobalCategoryNoCostOverride`](docs/sdks/novu/README.md#testapiratelimitbulkcontrollerglobalcategorynocostoverride) -- [`testApiRateLimitBulkControllerNoCategoryNoCostOverride`](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorynocostoverride) -- [`testApiRateLimitBulkControllerNoCategorySingleCostOverride`](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorysinglecostoverride) - [`topicsCreate`](docs/sdks/topics/README.md#create) - Topic creation - [`topicsDelete`](docs/sdks/topics/README.md#delete) - Delete topic - [`topicsList`](docs/sdks/topics/README.md#list) - Get topic list filtered diff --git a/docs/models/components/activitiesresponsedto.md b/docs/models/components/activitiesresponsedto.md index fc96c051..42e3b05b 100644 --- a/docs/models/components/activitiesresponsedto.md +++ b/docs/models/components/activitiesresponsedto.md @@ -8,8 +8,8 @@ import { ActivitiesResponseDto } from "@novu/api/models/components"; let value: ActivitiesResponseDto = { hasMore: false, data: [], - pageSize: 1317.97, - page: 7163.27, + pageSize: 7163.27, + page: 2894.06, }; ``` diff --git a/docs/models/components/activitygraphstatesresponse.md b/docs/models/components/activitygraphstatesresponse.md index b92d403e..bc2d4108 100644 --- a/docs/models/components/activitygraphstatesresponse.md +++ b/docs/models/components/activitygraphstatesresponse.md @@ -7,12 +7,12 @@ import { ActivityGraphStatesResponse } from "@novu/api/models/components"; let value: ActivityGraphStatesResponse = { id: "", - count: 6532.01, + count: 6521.03, templates: [ "", ], channels: [ - "chat", + "sms", ], }; ``` diff --git a/docs/models/components/activitynotificationexecutiondetailresponsedto.md b/docs/models/components/activitynotificationexecutiondetailresponsedto.md index f2d0902e..0d564836 100644 --- a/docs/models/components/activitynotificationexecutiondetailresponsedto.md +++ b/docs/models/components/activitynotificationexecutiondetailresponsedto.md @@ -11,8 +11,8 @@ let value: ActivityNotificationExecutionDetailResponseDto = { detail: "", isRetry: false, isTest: false, - providerId: "mobishastra", - source: "Payload", + providerId: "forty-six-elks", + source: "Webhook", }; ``` diff --git a/docs/models/components/activitynotificationjobresponsedto.md b/docs/models/components/activitynotificationjobresponsedto.md index c8e3a09c..d678e0be 100644 --- a/docs/models/components/activitynotificationjobresponsedto.md +++ b/docs/models/components/activitynotificationjobresponsedto.md @@ -7,16 +7,16 @@ import { ActivityNotificationJobResponseDto } from "@novu/api/models/components" let value: ActivityNotificationJobResponseDto = { id: "", - type: "email", + type: "digest", executionDetails: [ { id: "", - status: "Pending", + status: "Success", detail: "", isRetry: false, isTest: false, - providerId: "mailgun", - source: "Webhook", + providerId: "pusher-beams", + source: "Credentials", }, ], step: { @@ -25,13 +25,13 @@ let value: ActivityNotificationJobResponseDto = { filters: [ { isNegated: false, - type: "BOOLEAN", - value: "OR", + type: "LIST", + value: "AND", children: [ { field: "", value: "", - operator: "SMALLER_EQUAL", + operator: "NOT_BETWEEN", on: "payload", }, ], @@ -39,7 +39,7 @@ let value: ActivityNotificationJobResponseDto = { ], templateId: "", }, - providerId: "getstream", + providerId: "novu-email", status: "", }; ``` diff --git a/docs/models/components/activitynotificationjobresponsedtotype.md b/docs/models/components/activitynotificationjobresponsedtotype.md index 85c37084..62361973 100644 --- a/docs/models/components/activitynotificationjobresponsedtotype.md +++ b/docs/models/components/activitynotificationjobresponsedtotype.md @@ -7,7 +7,7 @@ Type of the job ```typescript import { ActivityNotificationJobResponseDtoType } from "@novu/api/models/components"; -let value: ActivityNotificationJobResponseDtoType = "sms"; +let value: ActivityNotificationJobResponseDtoType = "email"; ``` ## Values diff --git a/docs/models/components/activitynotificationstepresponsedto.md b/docs/models/components/activitynotificationstepresponsedto.md index e5e27125..0f72558f 100644 --- a/docs/models/components/activitynotificationstepresponsedto.md +++ b/docs/models/components/activitynotificationstepresponsedto.md @@ -17,8 +17,8 @@ let value: ActivityNotificationStepResponseDto = { { field: "", value: "", - operator: "NOT_IN", - on: "subscriber", + operator: "SMALLER_EQUAL", + on: "payload", }, ], }, diff --git a/docs/models/components/activitystatsresponsedto.md b/docs/models/components/activitystatsresponsedto.md index cf16dc08..3e484d68 100644 --- a/docs/models/components/activitystatsresponsedto.md +++ b/docs/models/components/activitystatsresponsedto.md @@ -6,8 +6,8 @@ import { ActivityStatsResponseDto } from "@novu/api/models/components"; let value: ActivityStatsResponseDto = { - weeklySent: 5699.65, - monthlySent: 5908.73, + weeklySent: 5908.73, + monthlySent: 5743.25, }; ``` diff --git a/docs/models/components/actorfeeditemdto.md b/docs/models/components/actorfeeditemdto.md index 639d44a9..58d95aaf 100644 --- a/docs/models/components/actorfeeditemdto.md +++ b/docs/models/components/actorfeeditemdto.md @@ -7,7 +7,7 @@ import { ActorFeedItemDto } from "@novu/api/models/components"; let value: ActorFeedItemDto = { data: null, - type: "system_icon", + type: "system_custom", }; ``` diff --git a/docs/models/components/backoffunit.md b/docs/models/components/backoffunit.md index f52f9bed..93a46f30 100644 --- a/docs/models/components/backoffunit.md +++ b/docs/models/components/backoffunit.md @@ -5,7 +5,7 @@ ```typescript import { BackoffUnit } from "@novu/api/models/components"; -let value: BackoffUnit = "days"; +let value: BackoffUnit = "minutes"; ``` ## Values diff --git a/docs/models/components/builderfieldtypeenum.md b/docs/models/components/builderfieldtypeenum.md index a4dfca7b..83de6d1c 100644 --- a/docs/models/components/builderfieldtypeenum.md +++ b/docs/models/components/builderfieldtypeenum.md @@ -5,7 +5,7 @@ ```typescript import { BuilderFieldTypeEnum } from "@novu/api/models/components"; -let value: BuilderFieldTypeEnum = "GROUP"; +let value: BuilderFieldTypeEnum = "LIST"; ``` ## Values diff --git a/docs/models/components/bulktriggereventdto.md b/docs/models/components/bulktriggereventdto.md index cf497d08..421de231 100644 --- a/docs/models/components/bulktriggereventdto.md +++ b/docs/models/components/bulktriggereventdto.md @@ -23,9 +23,7 @@ let value: BulkTriggerEventDto = { }, }, }, - to: { - subscriberId: "", - }, + to: "SUBSCRIBER_ID", }, ], }; diff --git a/docs/models/components/buttontypeenum.md b/docs/models/components/buttontypeenum.md index d50b6bf0..28d3561a 100644 --- a/docs/models/components/buttontypeenum.md +++ b/docs/models/components/buttontypeenum.md @@ -7,7 +7,7 @@ Type of button for the action result ```typescript import { ButtonTypeEnum } from "@novu/api/models/components"; -let value: ButtonTypeEnum = "primary"; +let value: ButtonTypeEnum = "secondary"; ``` ## Values diff --git a/docs/models/components/channel.md b/docs/models/components/channel.md index 5fe1efd6..c4fbb153 100644 --- a/docs/models/components/channel.md +++ b/docs/models/components/channel.md @@ -7,7 +7,7 @@ The channel type for the integration, which defines how the integration communic ```typescript import { Channel } from "@novu/api/models/components"; -let value: Channel = "sms"; +let value: Channel = "push"; ``` ## Values diff --git a/docs/models/components/channelpreference.md b/docs/models/components/channelpreference.md index dbdd427e..ec6c3dad 100644 --- a/docs/models/components/channelpreference.md +++ b/docs/models/components/channelpreference.md @@ -6,7 +6,7 @@ import { ChannelPreference } from "@novu/api/models/components"; let value: ChannelPreference = { - type: "in_app", + type: "push", enabled: false, }; ``` diff --git a/docs/models/components/channels.md b/docs/models/components/channels.md index f6e5b156..c7e7f4fe 100644 --- a/docs/models/components/channels.md +++ b/docs/models/components/channels.md @@ -5,7 +5,7 @@ ```typescript import { Channels } from "@novu/api/models/components"; -let value: Channels = "sms"; +let value: Channels = "chat"; ``` ## Values diff --git a/docs/models/components/channelsettings.md b/docs/models/components/channelsettings.md index 504ccc27..6cfae243 100644 --- a/docs/models/components/channelsettings.md +++ b/docs/models/components/channelsettings.md @@ -6,7 +6,7 @@ import { ChannelSettings } from "@novu/api/models/components"; let value: ChannelSettings = { - providerId: "push-webhook", + providerId: "expo", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", diff --git a/docs/models/components/channelsettingsproviderid.md b/docs/models/components/channelsettingsproviderid.md index 577a4797..2a805115 100644 --- a/docs/models/components/channelsettingsproviderid.md +++ b/docs/models/components/channelsettingsproviderid.md @@ -7,7 +7,7 @@ The provider identifier for the credentials ```typescript import { ChannelSettingsProviderId } from "@novu/api/models/components"; -let value: ChannelSettingsProviderId = "discord"; +let value: ChannelSettingsProviderId = "push-webhook"; ``` ## Values diff --git a/docs/models/components/channeltypeenum.md b/docs/models/components/channeltypeenum.md index 4d178a3f..f859f329 100644 --- a/docs/models/components/channeltypeenum.md +++ b/docs/models/components/channeltypeenum.md @@ -7,7 +7,7 @@ Channel type through which the message is sent ```typescript import { ChannelTypeEnum } from "@novu/api/models/components"; -let value: ChannelTypeEnum = "email"; +let value: ChannelTypeEnum = "sms"; ``` ## Values diff --git a/docs/models/components/content.md b/docs/models/components/content.md index 17223e98..2ba684d8 100644 --- a/docs/models/components/content.md +++ b/docs/models/components/content.md @@ -9,7 +9,7 @@ Content of the message, can be an email block or a string ```typescript const value: components.EmailBlock = { - type: "text", + type: "button", content: "", }; ``` diff --git a/docs/models/components/createintegrationrequestdto.md b/docs/models/components/createintegrationrequestdto.md index 5ff93fdc..cf5a720b 100644 --- a/docs/models/components/createintegrationrequestdto.md +++ b/docs/models/components/createintegrationrequestdto.md @@ -7,7 +7,7 @@ import { CreateIntegrationRequestDto } from "@novu/api/models/components"; let value: CreateIntegrationRequestDto = { providerId: "", - channel: "sms", + channel: "push", }; ``` diff --git a/docs/models/components/createintegrationrequestdtochannel.md b/docs/models/components/createintegrationrequestdtochannel.md index 8b97a23d..6feb4600 100644 --- a/docs/models/components/createintegrationrequestdtochannel.md +++ b/docs/models/components/createintegrationrequestdtochannel.md @@ -7,7 +7,7 @@ The channel type for the integration ```typescript import { CreateIntegrationRequestDtoChannel } from "@novu/api/models/components"; -let value: CreateIntegrationRequestDtoChannel = "email"; +let value: CreateIntegrationRequestDtoChannel = "sms"; ``` ## Values diff --git a/docs/models/components/createsubscriberrequestdtodata.md b/docs/models/components/createsubscriberrequestdtodata.md index c38405d3..dcd7d52d 100644 --- a/docs/models/components/createsubscriberrequestdtodata.md +++ b/docs/models/components/createsubscriberrequestdtodata.md @@ -26,6 +26,6 @@ const value: boolean = false; ### `number` ```typescript -const value: number = 7142.42; +const value: number = 9988.48; ``` diff --git a/docs/models/components/data.md b/docs/models/components/data.md index 553d8c46..4931999e 100644 --- a/docs/models/components/data.md +++ b/docs/models/components/data.md @@ -26,6 +26,6 @@ const value: boolean = false; ### `number` ```typescript -const value: number = 5232.48; +const value: number = 2653.89; ``` diff --git a/docs/models/components/digestmetadatadto.md b/docs/models/components/digestmetadatadto.md index 93a9afe6..4f9ec612 100644 --- a/docs/models/components/digestmetadatadto.md +++ b/docs/models/components/digestmetadatadto.md @@ -6,7 +6,7 @@ import { DigestMetadataDto } from "@novu/api/models/components"; let value: DigestMetadataDto = { - type: "backoff", + type: "regular", }; ``` diff --git a/docs/models/components/digestregularmetadata.md b/docs/models/components/digestregularmetadata.md index 1b2d62fc..3a7ec949 100644 --- a/docs/models/components/digestregularmetadata.md +++ b/docs/models/components/digestregularmetadata.md @@ -6,7 +6,7 @@ import { DigestRegularMetadata } from "@novu/api/models/components"; let value: DigestRegularMetadata = { - type: "backoff", + type: "regular", }; ``` diff --git a/docs/models/components/digestregularmetadatatype.md b/docs/models/components/digestregularmetadatatype.md index 5ec02ff1..6830975b 100644 --- a/docs/models/components/digestregularmetadatatype.md +++ b/docs/models/components/digestregularmetadatatype.md @@ -5,7 +5,7 @@ ```typescript import { DigestRegularMetadataType } from "@novu/api/models/components"; -let value: DigestRegularMetadataType = "regular"; +let value: DigestRegularMetadataType = "backoff"; ``` ## Values diff --git a/docs/models/components/digestregularmetadataunit.md b/docs/models/components/digestregularmetadataunit.md index 54490fff..48903e27 100644 --- a/docs/models/components/digestregularmetadataunit.md +++ b/docs/models/components/digestregularmetadataunit.md @@ -5,7 +5,7 @@ ```typescript import { DigestRegularMetadataUnit } from "@novu/api/models/components"; -let value: DigestRegularMetadataUnit = "hours"; +let value: DigestRegularMetadataUnit = "minutes"; ``` ## Values diff --git a/docs/models/components/digesttimedmetadataunit.md b/docs/models/components/digesttimedmetadataunit.md index c4b76c9b..5964b2ee 100644 --- a/docs/models/components/digesttimedmetadataunit.md +++ b/docs/models/components/digesttimedmetadataunit.md @@ -5,7 +5,7 @@ ```typescript import { DigestTimedMetadataUnit } from "@novu/api/models/components"; -let value: DigestTimedMetadataUnit = "seconds"; +let value: DigestTimedMetadataUnit = "weeks"; ``` ## Values diff --git a/docs/models/components/digesttypeenum.md b/docs/models/components/digesttypeenum.md index e241c343..08b7d82a 100644 --- a/docs/models/components/digesttypeenum.md +++ b/docs/models/components/digesttypeenum.md @@ -7,7 +7,7 @@ The Digest Type ```typescript import { DigestTypeEnum } from "@novu/api/models/components"; -let value: DigestTypeEnum = "backoff"; +let value: DigestTypeEnum = "regular"; ``` ## Values diff --git a/docs/models/components/digestunitenum.md b/docs/models/components/digestunitenum.md index 9179c371..97be9d8e 100644 --- a/docs/models/components/digestunitenum.md +++ b/docs/models/components/digestunitenum.md @@ -7,7 +7,7 @@ Regular digest: Unit for backoff ```typescript import { DigestUnitEnum } from "@novu/api/models/components"; -let value: DigestUnitEnum = "days"; +let value: DigestUnitEnum = "hours"; ``` ## Values diff --git a/docs/models/components/emailblock.md b/docs/models/components/emailblock.md index f65cb431..28eaff93 100644 --- a/docs/models/components/emailblock.md +++ b/docs/models/components/emailblock.md @@ -6,7 +6,7 @@ import { EmailBlock } from "@novu/api/models/components"; let value: EmailBlock = { - type: "text", + type: "button", content: "", }; ``` diff --git a/docs/models/components/emailblockstyles.md b/docs/models/components/emailblockstyles.md index e5618047..dc24f40b 100644 --- a/docs/models/components/emailblockstyles.md +++ b/docs/models/components/emailblockstyles.md @@ -6,7 +6,7 @@ import { EmailBlockStyles } from "@novu/api/models/components"; let value: EmailBlockStyles = { - textAlign: "center", + textAlign: "right", }; ``` diff --git a/docs/models/components/emailblocktypeenum.md b/docs/models/components/emailblocktypeenum.md index 06d13938..20d3d37b 100644 --- a/docs/models/components/emailblocktypeenum.md +++ b/docs/models/components/emailblocktypeenum.md @@ -7,7 +7,7 @@ Type of the email block ```typescript import { EmailBlockTypeEnum } from "@novu/api/models/components"; -let value: EmailBlockTypeEnum = "text"; +let value: EmailBlockTypeEnum = "button"; ``` ## Values diff --git a/docs/models/components/executiondetailssourceenum.md b/docs/models/components/executiondetailssourceenum.md index a1e48fec..1042da34 100644 --- a/docs/models/components/executiondetailssourceenum.md +++ b/docs/models/components/executiondetailssourceenum.md @@ -7,7 +7,7 @@ Source of the execution detail ```typescript import { ExecutionDetailsSourceEnum } from "@novu/api/models/components"; -let value: ExecutionDetailsSourceEnum = "Webhook"; +let value: ExecutionDetailsSourceEnum = "Payload"; ``` ## Values diff --git a/docs/models/components/executiondetailsstatusenum.md b/docs/models/components/executiondetailsstatusenum.md index 5758ec52..fa81682d 100644 --- a/docs/models/components/executiondetailsstatusenum.md +++ b/docs/models/components/executiondetailsstatusenum.md @@ -7,7 +7,7 @@ Status of the execution detail ```typescript import { ExecutionDetailsStatusEnum } from "@novu/api/models/components"; -let value: ExecutionDetailsStatusEnum = "Pending"; +let value: ExecutionDetailsStatusEnum = "Failed"; ``` ## Values diff --git a/docs/models/components/feedresponsedto.md b/docs/models/components/feedresponsedto.md index 5d920a25..eef90a0e 100644 --- a/docs/models/components/feedresponsedto.md +++ b/docs/models/components/feedresponsedto.md @@ -30,7 +30,7 @@ let value: FeedResponseDto = { providerId: "provider_xyz", content: "This is a test notification content.", subject: "Test Notification Subject", - channel: "push", + channel: "sms", read: false, seen: true, deleted: false, diff --git a/docs/models/components/fieldfilterpartdto.md b/docs/models/components/fieldfilterpartdto.md index 89f543ef..7f3647a4 100644 --- a/docs/models/components/fieldfilterpartdto.md +++ b/docs/models/components/fieldfilterpartdto.md @@ -8,7 +8,7 @@ import { FieldFilterPartDto } from "@novu/api/models/components"; let value: FieldFilterPartDto = { field: "", value: "", - operator: "NOT_LIKE", + operator: "NOT_IN", on: "payload", }; ``` diff --git a/docs/models/components/idempotencybehaviorenum.md b/docs/models/components/idempotencybehaviorenum.md new file mode 100644 index 00000000..2898331e --- /dev/null +++ b/docs/models/components/idempotencybehaviorenum.md @@ -0,0 +1,17 @@ +# IdempotencyBehaviorEnum + +The expected behavior of the idempotency request + +## Example Usage + +```typescript +import { IdempotencyBehaviorEnum } from "@novu/api/models/components"; + +let value: IdempotencyBehaviorEnum = "IMMEDIATE_RESPONSE"; +``` + +## Values + +```typescript +"IMMEDIATE_RESPONSE" | "IMMEDIATE_EXCEPTION" | "DELAYED_RESPONSE" +``` \ No newline at end of file diff --git a/docs/models/components/idempotencybodydto.md b/docs/models/components/idempotencybodydto.md deleted file mode 100644 index 29a2a070..00000000 --- a/docs/models/components/idempotencybodydto.md +++ /dev/null @@ -1,17 +0,0 @@ -# IdempotencyBodyDto - -## Example Usage - -```typescript -import { IdempotencyBodyDto } from "@novu/api/models/components"; - -let value: IdempotencyBodyDto = { - data: 834.22, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `data` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/idempotencyresponse.md b/docs/models/components/idempotencyresponse.md deleted file mode 100644 index 26811d8e..00000000 --- a/docs/models/components/idempotencyresponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# IdempotencyResponse - -## Example Usage - -```typescript -import { IdempotencyResponse } from "@novu/api/models/components"; - -let value: IdempotencyResponse = { - number: 9037.2, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `number` | *number* | :heavy_check_mark: | A unique identifier for the idempotency response | \ No newline at end of file diff --git a/docs/models/components/idempotencytestingdto.md b/docs/models/components/idempotencytestingdto.md new file mode 100644 index 00000000..8ff01a20 --- /dev/null +++ b/docs/models/components/idempotencytestingdto.md @@ -0,0 +1,17 @@ +# IdempotencyTestingDto + +## Example Usage + +```typescript +import { IdempotencyTestingDto } from "@novu/api/models/components"; + +let value: IdempotencyTestingDto = { + expectedBehavior: "DELAYED_RESPONSE", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `expectedBehavior` | [components.IdempotencyBehaviorEnum](../../models/components/idempotencybehaviorenum.md) | :heavy_check_mark: | The expected behavior of the idempotency request | \ No newline at end of file diff --git a/docs/models/components/integrationresponsedto.md b/docs/models/components/integrationresponsedto.md index b9a1e42b..492e1ad4 100644 --- a/docs/models/components/integrationresponsedto.md +++ b/docs/models/components/integrationresponsedto.md @@ -11,7 +11,7 @@ let value: IntegrationResponseDto = { name: "", identifier: "", providerId: "", - channel: "push", + channel: "email", credentials: {}, active: false, deleted: false, diff --git a/docs/models/components/markallmessageasrequestdtomarkas.md b/docs/models/components/markallmessageasrequestdtomarkas.md index 098c111c..97406dde 100644 --- a/docs/models/components/markallmessageasrequestdtomarkas.md +++ b/docs/models/components/markallmessageasrequestdtomarkas.md @@ -7,7 +7,7 @@ Mark all subscriber messages as read, unread, seen or unseen ```typescript import { MarkAllMessageAsRequestDtoMarkAs } from "@novu/api/models/components"; -let value: MarkAllMessageAsRequestDtoMarkAs = "seen"; +let value: MarkAllMessageAsRequestDtoMarkAs = "read"; ``` ## Values diff --git a/docs/models/components/markas.md b/docs/models/components/markas.md index f5958046..45c389ae 100644 --- a/docs/models/components/markas.md +++ b/docs/models/components/markas.md @@ -5,7 +5,7 @@ ```typescript import { MarkAs } from "@novu/api/models/components"; -let value: MarkAs = "read"; +let value: MarkAs = "unseen"; ``` ## Values diff --git a/docs/models/components/markmessageactionasseendto.md b/docs/models/components/markmessageactionasseendto.md index 9bb6816f..862a243c 100644 --- a/docs/models/components/markmessageactionasseendto.md +++ b/docs/models/components/markmessageactionasseendto.md @@ -6,7 +6,7 @@ import { MarkMessageActionAsSeenDto } from "@novu/api/models/components"; let value: MarkMessageActionAsSeenDto = { - status: "done", + status: "pending", }; ``` diff --git a/docs/models/components/messageactionstatusenum.md b/docs/models/components/messageactionstatusenum.md index e6124d89..5a1dd1e4 100644 --- a/docs/models/components/messageactionstatusenum.md +++ b/docs/models/components/messageactionstatusenum.md @@ -7,7 +7,7 @@ Status of the message action ```typescript import { MessageActionStatusEnum } from "@novu/api/models/components"; -let value: MessageActionStatusEnum = "pending"; +let value: MessageActionStatusEnum = "done"; ``` ## Values diff --git a/docs/models/components/messagebutton.md b/docs/models/components/messagebutton.md index 9ec09b65..a1e7dd24 100644 --- a/docs/models/components/messagebutton.md +++ b/docs/models/components/messagebutton.md @@ -6,7 +6,7 @@ import { MessageButton } from "@novu/api/models/components"; let value: MessageButton = { - type: "secondary", + type: "primary", content: "", }; ``` diff --git a/docs/models/components/messagemarkasrequestdto.md b/docs/models/components/messagemarkasrequestdto.md index 63f87c5e..33bcd0bd 100644 --- a/docs/models/components/messagemarkasrequestdto.md +++ b/docs/models/components/messagemarkasrequestdto.md @@ -7,7 +7,7 @@ import { MessageMarkAsRequestDto } from "@novu/api/models/components"; let value: MessageMarkAsRequestDto = { messageId: "", - markAs: "seen", + markAs: "unseen", }; ``` diff --git a/docs/models/components/messageresponsedto.md b/docs/models/components/messageresponsedto.md index d3d2de6a..1a5c45f8 100644 --- a/docs/models/components/messageresponsedto.md +++ b/docs/models/components/messageresponsedto.md @@ -16,7 +16,7 @@ let value: MessageResponseDto = { subscriberId: "", channels: [ { - providerId: "slack", + providerId: "grafana-on-call", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -37,11 +37,14 @@ let value: MessageResponseDto = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1716826806204", - updatedAt: "1736987208779", + createdAt: "1728522433273", + updatedAt: "1736965880258", + }, + createdAt: "1721932861518", + content: { + type: "button", + content: "", }, - createdAt: "1710887051654", - content: "", transactionId: "", channel: "in_app", read: false, @@ -49,7 +52,7 @@ let value: MessageResponseDto = { cta: { data: {}, }, - status: "sent", + status: "warning", }; ``` diff --git a/docs/models/components/monthlytype.md b/docs/models/components/monthlytype.md index 3113ba7f..8b6ac551 100644 --- a/docs/models/components/monthlytype.md +++ b/docs/models/components/monthlytype.md @@ -5,7 +5,7 @@ ```typescript import { MonthlyType } from "@novu/api/models/components"; -let value: MonthlyType = "each"; +let value: MonthlyType = "on"; ``` ## Values diff --git a/docs/models/components/monthlytypeenum.md b/docs/models/components/monthlytypeenum.md index 88cd9608..dee9844d 100644 --- a/docs/models/components/monthlytypeenum.md +++ b/docs/models/components/monthlytypeenum.md @@ -7,7 +7,7 @@ Type of monthly schedule ```typescript import { MonthlyTypeEnum } from "@novu/api/models/components"; -let value: MonthlyTypeEnum = "each"; +let value: MonthlyTypeEnum = "on"; ``` ## Values diff --git a/docs/models/components/notificationfeeditemdto.md b/docs/models/components/notificationfeeditemdto.md index 57d285f8..24ef8bef 100644 --- a/docs/models/components/notificationfeeditemdto.md +++ b/docs/models/components/notificationfeeditemdto.md @@ -19,14 +19,14 @@ let value: NotificationFeedItemDto = { updatedAt: new Date("2024-12-10T10:10:59.639Z"), actor: { data: null, - type: "system_icon", + type: "user", }, transactionId: "transaction_123456", templateIdentifier: "template_abcdef", providerId: "provider_xyz", content: "This is a test notification content.", subject: "Test Notification Subject", - channel: "sms", + channel: "in_app", read: false, seen: true, deleted: false, diff --git a/docs/models/components/notificationstepdatametadata.md b/docs/models/components/notificationstepdatametadata.md index d9cdadba..c4503e84 100644 --- a/docs/models/components/notificationstepdatametadata.md +++ b/docs/models/components/notificationstepdatametadata.md @@ -9,7 +9,7 @@ Metadata associated with the workflow step. Can vary based on the type of step. ```typescript const value: components.DigestRegularMetadata = { - type: "regular", + type: "backoff", }; ``` diff --git a/docs/models/components/notificationstepdtometadata.md b/docs/models/components/notificationstepdtometadata.md index 777d4006..e11e5411 100644 --- a/docs/models/components/notificationstepdtometadata.md +++ b/docs/models/components/notificationstepdtometadata.md @@ -9,7 +9,7 @@ Metadata associated with the workflow step. Can vary based on the type of step. ```typescript const value: components.DigestRegularMetadata = { - type: "regular", + type: "backoff", }; ``` diff --git a/docs/models/components/notificationtriggervariableresponsetype.md b/docs/models/components/notificationtriggervariableresponsetype.md index 923c54e7..ef98ff5d 100644 --- a/docs/models/components/notificationtriggervariableresponsetype.md +++ b/docs/models/components/notificationtriggervariableresponsetype.md @@ -7,7 +7,7 @@ The type of the variable ```typescript import { NotificationTriggerVariableResponseType } from "@novu/api/models/components"; -let value: NotificationTriggerVariableResponseType = "Array"; +let value: NotificationTriggerVariableResponseType = "String"; ``` ## Values diff --git a/docs/models/components/on.md b/docs/models/components/on.md index 26cb236e..3f67d3c1 100644 --- a/docs/models/components/on.md +++ b/docs/models/components/on.md @@ -5,7 +5,7 @@ ```typescript import { On } from "@novu/api/models/components"; -let value: On = "subscriber"; +let value: On = "payload"; ``` ## Values diff --git a/docs/models/components/operator.md b/docs/models/components/operator.md index 1c7b6392..c3654027 100644 --- a/docs/models/components/operator.md +++ b/docs/models/components/operator.md @@ -5,7 +5,7 @@ ```typescript import { Operator } from "@novu/api/models/components"; -let value: Operator = "LIKE"; +let value: Operator = "NOT_EQUAL"; ``` ## Values diff --git a/docs/models/components/ordinal.md b/docs/models/components/ordinal.md index 76ebc0f5..ebaddb3c 100644 --- a/docs/models/components/ordinal.md +++ b/docs/models/components/ordinal.md @@ -5,7 +5,7 @@ ```typescript import { Ordinal } from "@novu/api/models/components"; -let value: Ordinal = "1"; +let value: Ordinal = "3"; ``` ## Values diff --git a/docs/models/components/ordinalenum.md b/docs/models/components/ordinalenum.md index acbe6e84..73a8faa2 100644 --- a/docs/models/components/ordinalenum.md +++ b/docs/models/components/ordinalenum.md @@ -7,7 +7,7 @@ Ordinal position for the digest ```typescript import { OrdinalEnum } from "@novu/api/models/components"; -let value: OrdinalEnum = "2"; +let value: OrdinalEnum = "4"; ``` ## Values diff --git a/docs/models/components/ordinalvalue.md b/docs/models/components/ordinalvalue.md index 7c5442e2..09c9d760 100644 --- a/docs/models/components/ordinalvalue.md +++ b/docs/models/components/ordinalvalue.md @@ -5,7 +5,7 @@ ```typescript import { OrdinalValue } from "@novu/api/models/components"; -let value: OrdinalValue = "thursday"; +let value: OrdinalValue = "tuesday"; ``` ## Values diff --git a/docs/models/components/ordinalvalueenum.md b/docs/models/components/ordinalvalueenum.md index b415b9eb..8184fe67 100644 --- a/docs/models/components/ordinalvalueenum.md +++ b/docs/models/components/ordinalvalueenum.md @@ -7,7 +7,7 @@ Value of the ordinal ```typescript import { OrdinalValueEnum } from "@novu/api/models/components"; -let value: OrdinalValueEnum = "wednesday"; +let value: OrdinalValueEnum = "weekend"; ``` ## Values diff --git a/docs/models/components/providerid.md b/docs/models/components/providerid.md index aa8991a1..89383a08 100644 --- a/docs/models/components/providerid.md +++ b/docs/models/components/providerid.md @@ -7,7 +7,7 @@ The ID of the chat or push provider. ```typescript import { ProviderId } from "@novu/api/models/components"; -let value: ProviderId = "discord"; +let value: ProviderId = "rocket-chat"; ``` ## Values diff --git a/docs/models/components/providersidenum.md b/docs/models/components/providersidenum.md index 167be2e1..565d9fbf 100644 --- a/docs/models/components/providersidenum.md +++ b/docs/models/components/providersidenum.md @@ -7,7 +7,7 @@ Provider ID of the job ```typescript import { ProvidersIdEnum } from "@novu/api/models/components"; -let value: ProvidersIdEnum = "novu-email"; +let value: ProvidersIdEnum = "novu-sms"; ``` ## Values diff --git a/docs/models/components/status.md b/docs/models/components/status.md index 0adde830..3c09a2a7 100644 --- a/docs/models/components/status.md +++ b/docs/models/components/status.md @@ -7,7 +7,7 @@ Status of the trigger ```typescript import { Status } from "@novu/api/models/components"; -let value: Status = "trigger_not_active"; +let value: Status = "error"; ``` ## Values diff --git a/docs/models/components/stepfilterdto.md b/docs/models/components/stepfilterdto.md index 466c341d..e4e5e3e8 100644 --- a/docs/models/components/stepfilterdto.md +++ b/docs/models/components/stepfilterdto.md @@ -7,14 +7,14 @@ import { StepFilterDto } from "@novu/api/models/components"; let value: StepFilterDto = { isNegated: false, - type: "NUMBER", + type: "MULTI_LIST", value: "OR", children: [ { field: "", value: "", - operator: "BETWEEN", - on: "subscriber", + operator: "EQUAL", + on: "payload", }, ], }; diff --git a/docs/models/components/steptypeenum.md b/docs/models/components/steptypeenum.md index 9dd2bfcc..45f6477a 100644 --- a/docs/models/components/steptypeenum.md +++ b/docs/models/components/steptypeenum.md @@ -7,7 +7,7 @@ Channels of the notification ```typescript import { StepTypeEnum } from "@novu/api/models/components"; -let value: StepTypeEnum = "email"; +let value: StepTypeEnum = "sms"; ``` ## Values diff --git a/docs/models/components/subscriberchanneldto.md b/docs/models/components/subscriberchanneldto.md index c29671a4..e75e432e 100644 --- a/docs/models/components/subscriberchanneldto.md +++ b/docs/models/components/subscriberchanneldto.md @@ -6,7 +6,7 @@ import { SubscriberChannelDto } from "@novu/api/models/components"; let value: SubscriberChannelDto = { - providerId: "whatsapp-business", + providerId: "discord", credentials: {}, }; ``` diff --git a/docs/models/components/subscriberresponsedto.md b/docs/models/components/subscriberresponsedto.md index 15e03393..7b797184 100644 --- a/docs/models/components/subscriberresponsedto.md +++ b/docs/models/components/subscriberresponsedto.md @@ -9,7 +9,7 @@ let value: SubscriberResponseDto = { subscriberId: "", channels: [ { - providerId: "push-webhook", + providerId: "one-signal", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -30,8 +30,8 @@ let value: SubscriberResponseDto = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1730898671049", - updatedAt: "1736984953486", + createdAt: "1727699281169", + updatedAt: "1736959711004", }; ``` diff --git a/docs/models/components/textalignenum.md b/docs/models/components/textalignenum.md index cffa8b9b..18e789e4 100644 --- a/docs/models/components/textalignenum.md +++ b/docs/models/components/textalignenum.md @@ -7,7 +7,7 @@ Text alignment for the email block ```typescript import { TextAlignEnum } from "@novu/api/models/components"; -let value: TextAlignEnum = "left"; +let value: TextAlignEnum = "right"; ``` ## Values diff --git a/docs/models/components/timedconfigweekdays.md b/docs/models/components/timedconfigweekdays.md index 6b8d5908..bde9e2cb 100644 --- a/docs/models/components/timedconfigweekdays.md +++ b/docs/models/components/timedconfigweekdays.md @@ -5,7 +5,7 @@ ```typescript import { TimedConfigWeekDays } from "@novu/api/models/components"; -let value: TimedConfigWeekDays = "thursday"; +let value: TimedConfigWeekDays = "wednesday"; ``` ## Values diff --git a/docs/models/components/to.md b/docs/models/components/to.md index 4c8fc02a..69b958ae 100644 --- a/docs/models/components/to.md +++ b/docs/models/components/to.md @@ -9,7 +9,9 @@ The recipients list of people who will receive the notification. ```typescript const value: components.One[] = [ - "SUBSCRIBER_ID", + { + subscriberId: "", + }, ]; ``` diff --git a/docs/models/components/triggereventrequestdto.md b/docs/models/components/triggereventrequestdto.md index de50a89d..2e4e0175 100644 --- a/docs/models/components/triggereventrequestdto.md +++ b/docs/models/components/triggereventrequestdto.md @@ -21,7 +21,9 @@ let value: TriggerEventRequestDto = { }, }, }, - to: "SUBSCRIBER_ID", + to: { + subscriberId: "", + }, }; ``` diff --git a/docs/models/components/triggereventresponsedto.md b/docs/models/components/triggereventresponsedto.md index a75df145..12d1942f 100644 --- a/docs/models/components/triggereventresponsedto.md +++ b/docs/models/components/triggereventresponsedto.md @@ -7,7 +7,7 @@ import { TriggerEventResponseDto } from "@novu/api/models/components"; let value: TriggerEventResponseDto = { acknowledged: false, - status: "no_workflow_active_steps_defined", + status: "trigger_not_active", }; ``` diff --git a/docs/models/components/triggerrecipientstypeenum.md b/docs/models/components/triggerrecipientstypeenum.md index 61422362..51c9abf9 100644 --- a/docs/models/components/triggerrecipientstypeenum.md +++ b/docs/models/components/triggerrecipientstypeenum.md @@ -5,7 +5,7 @@ ```typescript import { TriggerRecipientsTypeEnum } from "@novu/api/models/components"; -let value: TriggerRecipientsTypeEnum = "Subscriber"; +let value: TriggerRecipientsTypeEnum = "Topic"; ``` ## Values diff --git a/docs/models/components/triggerreservedvariableresponse.md b/docs/models/components/triggerreservedvariableresponse.md index e028f994..58bd48af 100644 --- a/docs/models/components/triggerreservedvariableresponse.md +++ b/docs/models/components/triggerreservedvariableresponse.md @@ -6,7 +6,7 @@ import { TriggerReservedVariableResponse } from "@novu/api/models/components"; let value: TriggerReservedVariableResponse = { - type: "tenant", + type: "actor", variables: [ "", ], diff --git a/docs/models/components/triggerreservedvariableresponsetype.md b/docs/models/components/triggerreservedvariableresponsetype.md index 115470c8..8e49b232 100644 --- a/docs/models/components/triggerreservedvariableresponsetype.md +++ b/docs/models/components/triggerreservedvariableresponsetype.md @@ -7,7 +7,7 @@ The type of the reserved variable ```typescript import { TriggerReservedVariableResponseType } from "@novu/api/models/components"; -let value: TriggerReservedVariableResponseType = "actor"; +let value: TriggerReservedVariableResponseType = "tenant"; ``` ## Values diff --git a/docs/models/components/unit.md b/docs/models/components/unit.md index dfda49c1..0aa5b453 100644 --- a/docs/models/components/unit.md +++ b/docs/models/components/unit.md @@ -7,7 +7,7 @@ Unit of the digest ```typescript import { Unit } from "@novu/api/models/components"; -let value: Unit = "hours"; +let value: Unit = "days"; ``` ## Values diff --git a/docs/models/components/unseencountresponse.md b/docs/models/components/unseencountresponse.md index f7b5c8f7..9048b014 100644 --- a/docs/models/components/unseencountresponse.md +++ b/docs/models/components/unseencountresponse.md @@ -6,7 +6,7 @@ import { UnseenCountResponse } from "@novu/api/models/components"; let value: UnseenCountResponse = { - count: 9755.22, + count: 8558.04, }; ``` diff --git a/docs/models/components/updatesubscriberchannelrequestdto.md b/docs/models/components/updatesubscriberchannelrequestdto.md index 187fa215..bc1efa95 100644 --- a/docs/models/components/updatesubscriberchannelrequestdto.md +++ b/docs/models/components/updatesubscriberchannelrequestdto.md @@ -6,7 +6,7 @@ import { UpdateSubscriberChannelRequestDto } from "@novu/api/models/components"; let value: UpdateSubscriberChannelRequestDto = { - providerId: "msteams", + providerId: "pushpad", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", diff --git a/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md b/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md index fbbaecca..830da1df 100644 --- a/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md +++ b/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md @@ -7,7 +7,7 @@ The provider identifier for the credentials ```typescript import { UpdateSubscriberChannelRequestDtoProviderId } from "@novu/api/models/components"; -let value: UpdateSubscriberChannelRequestDtoProviderId = "pusher-beams"; +let value: UpdateSubscriberChannelRequestDtoProviderId = "msteams"; ``` ## Values diff --git a/docs/models/components/value.md b/docs/models/components/value.md index b9f79c7e..b49c292d 100644 --- a/docs/models/components/value.md +++ b/docs/models/components/value.md @@ -5,7 +5,7 @@ ```typescript import { Value } from "@novu/api/models/components"; -let value: Value = "OR"; +let value: Value = "AND"; ``` ## Values diff --git a/docs/models/components/weekdays.md b/docs/models/components/weekdays.md index edb5e782..faebcd38 100644 --- a/docs/models/components/weekdays.md +++ b/docs/models/components/weekdays.md @@ -5,7 +5,7 @@ ```typescript import { WeekDays } from "@novu/api/models/components"; -let value: WeekDays = "monday"; +let value: WeekDays = "wednesday"; ``` ## Values diff --git a/docs/models/components/workflowresponse.md b/docs/models/components/workflowresponse.md index 8629f72b..4fc7dc59 100644 --- a/docs/models/components/workflowresponse.md +++ b/docs/models/components/workflowresponse.md @@ -7,7 +7,7 @@ import { WorkflowResponse } from "@novu/api/models/components"; let value: WorkflowResponse = { name: "", - description: "obedience finally less over how prejudge cutover for", + description: "overcooked what unless lest", active: false, draft: false, preferenceSettings: {}, diff --git a/docs/models/errors/details.md b/docs/models/errors/details.md new file mode 100644 index 00000000..ad5d7103 --- /dev/null +++ b/docs/models/errors/details.md @@ -0,0 +1,18 @@ +# Details + +## Example Usage + +```typescript +import { Details } from "@novu/api/models/errors"; + +let value: Details = { + status: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `status` | *string* | :heavy_check_mark: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/errort.md b/docs/models/errors/errort.md new file mode 100644 index 00000000..232eb7e5 --- /dev/null +++ b/docs/models/errors/errort.md @@ -0,0 +1,18 @@ +# ErrorT + +## Example Usage + +```typescript +import { ErrorT } from "@novu/api/models/errors"; + +let value: ErrorT = { + status: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `status` | *string* | :heavy_check_mark: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/healthcontrollerhealthcheckresponsebody.md b/docs/models/errors/healthcontrollerhealthcheckresponsebody.md new file mode 100644 index 00000000..4db6ae4b --- /dev/null +++ b/docs/models/errors/healthcontrollerhealthcheckresponsebody.md @@ -0,0 +1,20 @@ +# HealthControllerHealthCheckResponseBody + +The Health Check is not successful + +## Example Usage + +```typescript +import { HealthControllerHealthCheckResponseBody } from "@novu/api/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `status` | *string* | :heavy_minus_sign: | N/A | error | +| `info` | Record | :heavy_minus_sign: | N/A | {
"database": {
"status": "up"
}
} | +| `error` | Record | :heavy_minus_sign: | N/A | {
"redis": {
"status": "down",
"message": "Could not connect"
}
} | +| `details` | Record | :heavy_minus_sign: | N/A | {
"database": {
"status": "up"
},
"redis": {
"status": "down",
"message": "Could not connect"
}
} | \ No newline at end of file diff --git a/docs/models/errors/info.md b/docs/models/errors/info.md new file mode 100644 index 00000000..64933f07 --- /dev/null +++ b/docs/models/errors/info.md @@ -0,0 +1,18 @@ +# Info + +## Example Usage + +```typescript +import { Info } from "@novu/api/models/errors"; + +let value: Info = { + status: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `status` | *string* | :heavy_check_mark: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/value.md b/docs/models/errors/value.md index 500504ca..117114b4 100644 --- a/docs/models/errors/value.md +++ b/docs/models/errors/value.md @@ -12,7 +12,7 @@ const value: string = ""; ### `number` ```typescript -const value: number = 5521.93; +const value: number = 9473.71; ``` ### `boolean` diff --git a/docs/models/operations/details.md b/docs/models/operations/details.md new file mode 100644 index 00000000..f30d60bb --- /dev/null +++ b/docs/models/operations/details.md @@ -0,0 +1,18 @@ +# Details + +## Example Usage + +```typescript +import { Details } from "@novu/api/models/operations"; + +let value: Details = { + status: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `status` | *string* | :heavy_check_mark: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/errort.md b/docs/models/operations/errort.md new file mode 100644 index 00000000..681b86c0 --- /dev/null +++ b/docs/models/operations/errort.md @@ -0,0 +1,18 @@ +# ErrorT + +## Example Usage + +```typescript +import { ErrorT } from "@novu/api/models/operations"; + +let value: ErrorT = { + status: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `status` | *string* | :heavy_check_mark: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/testingcontrolleridempotencygetrequest.md b/docs/models/operations/healthcontrollerhealthcheckrequest.md similarity index 72% rename from docs/models/operations/testingcontrolleridempotencygetrequest.md rename to docs/models/operations/healthcontrollerhealthcheckrequest.md index a502fd6d..47242603 100644 --- a/docs/models/operations/testingcontrolleridempotencygetrequest.md +++ b/docs/models/operations/healthcontrollerhealthcheckrequest.md @@ -1,11 +1,11 @@ -# TestingControllerIdempotencyGetRequest +# HealthControllerHealthCheckRequest ## Example Usage ```typescript -import { TestingControllerIdempotencyGetRequest } from "@novu/api/models/operations"; +import { HealthControllerHealthCheckRequest } from "@novu/api/models/operations"; -let value: TestingControllerIdempotencyGetRequest = {}; +let value: HealthControllerHealthCheckRequest = {}; ``` ## Fields diff --git a/docs/models/operations/healthcontrollerhealthcheckresponsebody.md b/docs/models/operations/healthcontrollerhealthcheckresponsebody.md new file mode 100644 index 00000000..2fe4593a --- /dev/null +++ b/docs/models/operations/healthcontrollerhealthcheckresponsebody.md @@ -0,0 +1,35 @@ +# HealthControllerHealthCheckResponseBody + +The Health Check is successful + +## Example Usage + +```typescript +import { HealthControllerHealthCheckResponseBody } from "@novu/api/models/operations"; + +let value: HealthControllerHealthCheckResponseBody = { + status: "ok", + info: { + "database": { + status: "up", + additionalProperties: {}, + }, + }, + error: {}, + details: { + "database": { + status: "up", + additionalProperties: {}, + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `status` | *string* | :heavy_minus_sign: | N/A | ok | +| `info` | Record | :heavy_minus_sign: | N/A | {
"database": {
"status": "up"
}
} | +| `error` | Record | :heavy_minus_sign: | N/A | {} | +| `details` | Record | :heavy_minus_sign: | N/A | {
"database": {
"status": "up"
}
} | \ No newline at end of file diff --git a/docs/models/operations/healthcontrollertestidempotencyrequest.md b/docs/models/operations/healthcontrollertestidempotencyrequest.md new file mode 100644 index 00000000..a31cd5c7 --- /dev/null +++ b/docs/models/operations/healthcontrollertestidempotencyrequest.md @@ -0,0 +1,20 @@ +# HealthControllerTestIdempotencyRequest + +## Example Usage + +```typescript +import { HealthControllerTestIdempotencyRequest } from "@novu/api/models/operations"; + +let value: HealthControllerTestIdempotencyRequest = { + idempotencyTestingDto: { + expectedBehavior: "IMMEDIATE_EXCEPTION", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | +| `idempotencyTestingDto` | [components.IdempotencyTestingDto](../../models/components/idempotencytestingdto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/healthcontrollertestidempotencyresponse.md b/docs/models/operations/healthcontrollertestidempotencyresponse.md new file mode 100644 index 00000000..a2ee412c --- /dev/null +++ b/docs/models/operations/healthcontrollertestidempotencyresponse.md @@ -0,0 +1,21 @@ +# HealthControllerTestIdempotencyResponse + +## Example Usage + +```typescript +import { HealthControllerTestIdempotencyResponse } from "@novu/api/models/operations"; + +let value: HealthControllerTestIdempotencyResponse = { + headers: { + "key": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/info.md b/docs/models/operations/info.md new file mode 100644 index 00000000..fedf51f0 --- /dev/null +++ b/docs/models/operations/info.md @@ -0,0 +1,18 @@ +# Info + +## Example Usage + +```typescript +import { Info } from "@novu/api/models/operations"; + +let value: Info = { + status: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `status` | *string* | :heavy_check_mark: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/integrationscontrollercreateintegrationrequest.md b/docs/models/operations/integrationscontrollercreateintegrationrequest.md index 502b0c1d..8561c6b7 100644 --- a/docs/models/operations/integrationscontrollercreateintegrationrequest.md +++ b/docs/models/operations/integrationscontrollercreateintegrationrequest.md @@ -8,7 +8,7 @@ import { IntegrationsControllerCreateIntegrationRequest } from "@novu/api/models let value: IntegrationsControllerCreateIntegrationRequest = { createIntegrationRequestDto: { providerId: "", - channel: "sms", + channel: "push", }, }; ``` diff --git a/docs/models/operations/integrationscontrollercreateintegrationresponse.md b/docs/models/operations/integrationscontrollercreateintegrationresponse.md index 5a3caf52..2f08d7ca 100644 --- a/docs/models/operations/integrationscontrollercreateintegrationresponse.md +++ b/docs/models/operations/integrationscontrollercreateintegrationresponse.md @@ -17,7 +17,7 @@ let value: IntegrationsControllerCreateIntegrationResponse = { name: "", identifier: "", providerId: "", - channel: "push", + channel: "in_app", credentials: {}, active: false, deleted: false, diff --git a/docs/models/operations/integrationscontrollerremoveintegrationresponse.md b/docs/models/operations/integrationscontrollerremoveintegrationresponse.md index 263516cb..59780288 100644 --- a/docs/models/operations/integrationscontrollerremoveintegrationresponse.md +++ b/docs/models/operations/integrationscontrollerremoveintegrationresponse.md @@ -18,7 +18,7 @@ let value: IntegrationsControllerRemoveIntegrationResponse = { name: "", identifier: "", providerId: "", - channel: "in_app", + channel: "push", credentials: {}, active: false, deleted: false, diff --git a/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md b/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md index 1bc32d88..79c83b46 100644 --- a/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md +++ b/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md @@ -17,7 +17,7 @@ let value: IntegrationsControllerSetIntegrationAsPrimaryResponse = { name: "", identifier: "", providerId: "", - channel: "push", + channel: "chat", credentials: {}, active: false, deleted: false, diff --git a/docs/models/operations/messagescontrollergetmessagesresponse.md b/docs/models/operations/messagescontrollergetmessagesresponse.md index 9b266f35..64f71295 100644 --- a/docs/models/operations/messagescontrollergetmessagesresponse.md +++ b/docs/models/operations/messagescontrollergetmessagesresponse.md @@ -14,8 +14,8 @@ let value: MessagesControllerGetMessagesResponse = { result: { hasMore: false, data: [], - pageSize: 7392.64, - page: 391.87, + pageSize: 2828.07, + page: 1201.96, }, }; ``` diff --git a/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md b/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md index 92a7cc0b..f33bb93f 100644 --- a/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md +++ b/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md @@ -14,12 +14,12 @@ let value: NotificationsControllerGetActivityGraphStatsResponse = { result: [ { id: "", - count: 3834.41, + count: 7917.25, templates: [ "", ], channels: [ - "chat", + "sms", ], }, ], diff --git a/docs/models/operations/notificationscontrollergetactivitystatsresponse.md b/docs/models/operations/notificationscontrollergetactivitystatsresponse.md index b534339a..471cdc48 100644 --- a/docs/models/operations/notificationscontrollergetactivitystatsresponse.md +++ b/docs/models/operations/notificationscontrollergetactivitystatsresponse.md @@ -12,8 +12,8 @@ let value: NotificationsControllerGetActivityStatsResponse = { ], }, result: { - weeklySent: 8917.73, - monthlySent: 9636.63, + weeklySent: 9636.63, + monthlySent: 3834.41, }, }; ``` diff --git a/docs/models/operations/notificationscontrollerlistnotificationsresponse.md b/docs/models/operations/notificationscontrollerlistnotificationsresponse.md index 47225e1d..4571f865 100644 --- a/docs/models/operations/notificationscontrollerlistnotificationsresponse.md +++ b/docs/models/operations/notificationscontrollerlistnotificationsresponse.md @@ -14,8 +14,8 @@ let value: NotificationsControllerListNotificationsResponse = { result: { hasMore: false, data: [], - pageSize: 6458.94, - page: 4375.87, + pageSize: 4375.87, + page: 8917.73, }, }; ``` diff --git a/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md b/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md index 82ac2174..d6501d2c 100644 --- a/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md +++ b/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerCreateSubscriberResponse = { subscriberId: "", channels: [ { - providerId: "rocket-chat", + providerId: "getstream", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerCreateSubscriberResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1718551316471", - updatedAt: "1736946995286", + createdAt: "1713844476503", + updatedAt: "1737017944001", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollergetnotificationsfeedresponse.md b/docs/models/operations/subscriberscontrollergetnotificationsfeedresponse.md index aaebd64e..ff44c8d1 100644 --- a/docs/models/operations/subscriberscontrollergetnotificationsfeedresponse.md +++ b/docs/models/operations/subscriberscontrollergetnotificationsfeedresponse.md @@ -29,14 +29,14 @@ let value: SubscribersControllerGetNotificationsFeedResponse = { updatedAt: new Date("2024-12-10T10:10:59.639Z"), actor: { data: null, - type: "system_icon", + type: "user", }, transactionId: "transaction_123456", templateIdentifier: "template_abcdef", providerId: "provider_xyz", content: "This is a test notification content.", subject: "Test Notification Subject", - channel: "sms", + channel: "push", read: false, seen: true, deleted: false, diff --git a/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md b/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md index 7376a85c..acc12754 100644 --- a/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md +++ b/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md @@ -6,7 +6,7 @@ import { SubscribersControllerGetSubscriberPreferenceByLevelRequest } from "@novu/api/models/operations"; let value: SubscribersControllerGetSubscriberPreferenceByLevelRequest = { - preferenceLevel: "global", + preferenceLevel: "template", subscriberId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollergetsubscriberresponse.md b/docs/models/operations/subscriberscontrollergetsubscriberresponse.md index 2f8830b9..bc610faf 100644 --- a/docs/models/operations/subscriberscontrollergetsubscriberresponse.md +++ b/docs/models/operations/subscriberscontrollergetsubscriberresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerGetSubscriberResponse = { subscriberId: "", channels: [ { - providerId: "one-signal", + providerId: "getstream", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerGetSubscriberResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1719859694371", - updatedAt: "1736973250075", + createdAt: "1723427583436", + updatedAt: "1736952674412", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollergetunseencountresponse.md b/docs/models/operations/subscriberscontrollergetunseencountresponse.md index 963ba3fd..f6bca01d 100644 --- a/docs/models/operations/subscriberscontrollergetunseencountresponse.md +++ b/docs/models/operations/subscriberscontrollergetunseencountresponse.md @@ -12,7 +12,7 @@ let value: SubscribersControllerGetUnseenCountResponse = { ], }, result: { - count: 9883.74, + count: 1020.44, }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md b/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md index 2e5da03c..4b2b0c29 100644 --- a/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md +++ b/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md @@ -12,15 +12,15 @@ let value: SubscribersControllerListSubscribersResponse = { ], }, result: { - page: 7805.29, + page: 1182.74, hasMore: false, - pageSize: 1182.74, + pageSize: 6399.21, data: [ { subscriberId: "", channels: [ { - providerId: "fcm", + providerId: "msteams", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -41,8 +41,8 @@ let value: SubscribersControllerListSubscribersResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1709995327070", - updatedAt: "1737005756392", + createdAt: "1735292528996", + updatedAt: "1736996138145", }, ], }, diff --git a/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md b/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md index 8878663d..2d7a0049 100644 --- a/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md +++ b/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md @@ -6,15 +6,15 @@ import { SubscribersControllerListSubscribersResponseBody } from "@novu/api/models/operations"; let value: SubscribersControllerListSubscribersResponseBody = { - page: 7781.57, + page: 8700.13, hasMore: false, - pageSize: 8700.13, + pageSize: 9786.19, data: [ { subscriberId: "", channels: [ { - providerId: "pusher-beams", + providerId: "one-signal", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -35,8 +35,8 @@ let value: SubscribersControllerListSubscribersResponseBody = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1730676801620", - updatedAt: "1736964009293", + createdAt: "1720054663661", + updatedAt: "1737018487897", }, ], }; diff --git a/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md b/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md index 98d826c0..7f33f19d 100644 --- a/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md +++ b/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md @@ -10,7 +10,7 @@ let value: SubscribersControllerMarkActionAsSeenRequest = { type: "", subscriberId: "", markMessageActionAsSeenDto: { - status: "pending", + status: "done", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md b/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md index a2e622ea..6d41222e 100644 --- a/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md +++ b/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md @@ -22,7 +22,7 @@ let value: SubscribersControllerMarkActionAsSeenResponse = { subscriberId: "", channels: [ { - providerId: "one-signal", + providerId: "discord", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -43,13 +43,16 @@ let value: SubscribersControllerMarkActionAsSeenResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1708536723761", - updatedAt: "1736996535627", + createdAt: "1731926880981", + updatedAt: "1736959354022", + }, + createdAt: "1736295075931", + content: { + type: "text", + content: "", }, - createdAt: "1708505097320", - content: "", transactionId: "", - channel: "sms", + channel: "chat", read: false, seen: false, cta: { diff --git a/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md b/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md index 084e4272..298b3391 100644 --- a/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md +++ b/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md @@ -11,7 +11,7 @@ let value: SubscribersControllerMarkAllUnreadAsReadResponse = { "", ], }, - result: 1965.82, + result: 3687.25, }; ``` diff --git a/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md b/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md index ee6fe901..0733c846 100644 --- a/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md +++ b/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md @@ -23,7 +23,7 @@ let value: SubscribersControllerMarkMessagesAsResponse = { subscriberId: "", channels: [ { - providerId: "msteams", + providerId: "apns", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -44,22 +44,22 @@ let value: SubscribersControllerMarkMessagesAsResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1726070961511", - updatedAt: "1736946022153", + createdAt: "1713489254897", + updatedAt: "1736991339957", }, - createdAt: "1720180114078", + createdAt: "1713209656399", content: { type: "button", content: "", }, transactionId: "", - channel: "in_app", + channel: "chat", read: false, seen: false, cta: { data: {}, }, - status: "error", + status: "sent", }, ], }; diff --git a/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md b/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md index 89d55e7e..96fd0ee1 100644 --- a/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md +++ b/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md @@ -8,7 +8,7 @@ import { SubscribersControllerModifySubscriberChannelRequest } from "@novu/api/m let value: SubscribersControllerModifySubscriberChannelRequest = { subscriberId: "", updateSubscriberChannelRequestDto: { - providerId: "getstream", + providerId: "apns", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", diff --git a/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md b/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md index aea0828d..610335ab 100644 --- a/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md +++ b/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerModifySubscriberChannelResponse = { subscriberId: "", channels: [ { - providerId: "apns", + providerId: "discord", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerModifySubscriberChannelResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1707373808385", - updatedAt: "1736981745950", + createdAt: "1726528605545", + updatedAt: "1737008993514", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md index 5682230e..644cf8e1 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md @@ -8,7 +8,7 @@ import { SubscribersControllerUpdateSubscriberChannelRequest } from "@novu/api/m let value: SubscribersControllerUpdateSubscriberChannelRequest = { subscriberId: "", updateSubscriberChannelRequestDto: { - providerId: "fcm", + providerId: "pusher-beams", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md index 5e4d2c18..2594931d 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerUpdateSubscriberChannelResponse = { subscriberId: "", channels: [ { - providerId: "pusher-beams", + providerId: "apns", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberChannelResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1726976422238", - updatedAt: "1736955199090", + createdAt: "1716838891855", + updatedAt: "1736988810186", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md index dcc7f080..b247d382 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerUpdateSubscriberOnlineFlagResponse = { subscriberId: "", channels: [ { - providerId: "apns", + providerId: "mattermost", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberOnlineFlagResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1712109162214", - updatedAt: "1736935277082", + createdAt: "1709567270682", + updatedAt: "1736978303782", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md index 618c855e..71532322 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerUpdateSubscriberResponse = { subscriberId: "", channels: [ { - providerId: "slack", + providerId: "fcm", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1724952290373", - updatedAt: "1736977022413", + createdAt: "1724804501102", + updatedAt: "1737004353483", }, }; ``` diff --git a/docs/models/operations/testapiratelimitbulkcontrollerglobalcategorynocostoverriderequest.md b/docs/models/operations/testapiratelimitbulkcontrollerglobalcategorynocostoverriderequest.md deleted file mode 100644 index 344b9a86..00000000 --- a/docs/models/operations/testapiratelimitbulkcontrollerglobalcategorynocostoverriderequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest - -## Example Usage - -```typescript -import { TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest } from "@novu/api/models/operations"; - -let value: TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest = - {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/testapiratelimitbulkcontrollernocategorynocostoverriderequest.md b/docs/models/operations/testapiratelimitbulkcontrollernocategorynocostoverriderequest.md deleted file mode 100644 index 5f447083..00000000 --- a/docs/models/operations/testapiratelimitbulkcontrollernocategorynocostoverriderequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest - -## Example Usage - -```typescript -import { TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest } from "@novu/api/models/operations"; - -let value: TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/testapiratelimitbulkcontrollernocategorysinglecostoverriderequest.md b/docs/models/operations/testapiratelimitbulkcontrollernocategorysinglecostoverriderequest.md deleted file mode 100644 index 8de656f7..00000000 --- a/docs/models/operations/testapiratelimitbulkcontrollernocategorysinglecostoverriderequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest - -## Example Usage - -```typescript -import { TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest } from "@novu/api/models/operations"; - -let value: TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest = - {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/testingcontrolleridempotencygetresponse.md b/docs/models/operations/testingcontrolleridempotencygetresponse.md deleted file mode 100644 index 127969cf..00000000 --- a/docs/models/operations/testingcontrolleridempotencygetresponse.md +++ /dev/null @@ -1,25 +0,0 @@ -# TestingControllerIdempotencyGetResponse - -## Example Usage - -```typescript -import { TestingControllerIdempotencyGetResponse } from "@novu/api/models/operations"; - -let value: TestingControllerIdempotencyGetResponse = { - headers: { - "key": [ - "", - ], - }, - result: { - number: 1187.27, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `headers` | Record | :heavy_check_mark: | N/A | -| `result` | [components.IdempotencyResponse](../../models/components/idempotencyresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/testingcontrolleridempotencyrequest.md b/docs/models/operations/testingcontrolleridempotencyrequest.md deleted file mode 100644 index e250ce37..00000000 --- a/docs/models/operations/testingcontrolleridempotencyrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# TestingControllerIdempotencyRequest - -## Example Usage - -```typescript -import { TestingControllerIdempotencyRequest } from "@novu/api/models/operations"; - -let value: TestingControllerIdempotencyRequest = { - idempotencyBodyDto: { - data: 1201.96, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | -| `idempotencyBodyDto` | [components.IdempotencyBodyDto](../../models/components/idempotencybodydto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/testingcontrolleridempotencyresponse.md b/docs/models/operations/testingcontrolleridempotencyresponse.md deleted file mode 100644 index c8e193a2..00000000 --- a/docs/models/operations/testingcontrolleridempotencyresponse.md +++ /dev/null @@ -1,25 +0,0 @@ -# TestingControllerIdempotencyResponse - -## Example Usage - -```typescript -import { TestingControllerIdempotencyResponse } from "@novu/api/models/operations"; - -let value: TestingControllerIdempotencyResponse = { - headers: { - "key": [ - "", - ], - }, - result: { - number: 2961.4, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `headers` | Record | :heavy_check_mark: | N/A | -| `result` | [components.IdempotencyResponse](../../models/components/idempotencyresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/admin/README.md b/docs/sdks/admin/README.md index b33dbe63..0204ab54 100644 --- a/docs/sdks/admin/README.md +++ b/docs/sdks/admin/README.md @@ -8,10 +8,10 @@ testing ### Available Operations -* [idempotencyPost](#idempotencypost) -* [idempotencyGet](#idempotencyget) +* [healthControllerHealthCheck](#healthcontrollerhealthcheck) +* [testIdempotency](#testidempotency) -## idempotencyPost +## healthControllerHealthCheck ### Example Usage @@ -23,9 +23,7 @@ const novu = new Novu({ }); async function run() { - const result = await novu.admin.idempotencyPost({ - data: 6704.42, - }); + const result = await novu.admin.healthControllerHealthCheck(); // Handle the result console.log(result); @@ -40,7 +38,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { adminIdempotencyPost } from "@novu/api/funcs/adminIdempotencyPost.js"; +import { adminHealthControllerHealthCheck } from "@novu/api/funcs/adminHealthControllerHealthCheck.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -49,9 +47,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await adminIdempotencyPost(novu, { - data: 6704.42, - }); + const res = await adminHealthControllerHealthCheck(novu); if (!res.ok) { throw res.error; @@ -70,7 +66,6 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `idempotencyBodyDto` | [components.IdempotencyBodyDto](../../models/components/idempotencybodydto.md) | :heavy_check_mark: | N/A | | `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | @@ -78,19 +73,16 @@ run(); ### Response -**Promise\<[operations.TestingControllerIdempotencyResponse](../../models/operations/testingcontrolleridempotencyresponse.md)\>** +**Promise\<[operations.HealthControllerHealthCheckResponseBody](../../models/operations/healthcontrollerhealthcheckresponsebody.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | -| errors.ErrorDto | 414 | application/json | -| errors.ValidationErrorDto | 422 | application/json | -| errors.ErrorDto | 500 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| errors.HealthControllerHealthCheckResponseBody | 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## idempotencyGet +## testIdempotency ### Example Usage @@ -102,7 +94,9 @@ const novu = new Novu({ }); async function run() { - const result = await novu.admin.idempotencyGet(); + const result = await novu.admin.testIdempotency({ + expectedBehavior: "IMMEDIATE_EXCEPTION", + }); // Handle the result console.log(result); @@ -117,7 +111,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { adminIdempotencyGet } from "@novu/api/funcs/adminIdempotencyGet.js"; +import { adminTestIdempotency } from "@novu/api/funcs/adminTestIdempotency.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -126,7 +120,9 @@ const novu = new NovuCore({ }); async function run() { - const res = await adminIdempotencyGet(novu); + const res = await adminTestIdempotency(novu, { + expectedBehavior: "IMMEDIATE_EXCEPTION", + }); if (!res.ok) { throw res.error; @@ -145,6 +141,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `idempotencyTestingDto` | [components.IdempotencyTestingDto](../../models/components/idempotencytestingdto.md) | :heavy_check_mark: | N/A | | `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | @@ -152,7 +149,7 @@ run(); ### Response -**Promise\<[operations.TestingControllerIdempotencyGetResponse](../../models/operations/testingcontrolleridempotencygetresponse.md)\>** +**Promise\<[operations.HealthControllerTestIdempotencyResponse](../../models/operations/healthcontrollertestidempotencyresponse.md)\>** ### Errors diff --git a/docs/sdks/novu/README.md b/docs/sdks/novu/README.md index 1a753542..126f4de1 100644 --- a/docs/sdks/novu/README.md +++ b/docs/sdks/novu/README.md @@ -13,9 +13,6 @@ Novu Documentation * [triggerBulk](#triggerbulk) - Bulk trigger event * [triggerBroadcast](#triggerbroadcast) - Broadcast event to all * [cancel](#cancel) - Cancel triggered event -* [testApiRateLimitBulkControllerNoCategoryNoCostOverride](#testapiratelimitbulkcontrollernocategorynocostoverride) -* [testApiRateLimitBulkControllerNoCategorySingleCostOverride](#testapiratelimitbulkcontrollernocategorysinglecostoverride) -* [testApiRateLimitBulkControllerGlobalCategoryNoCostOverride](#testapiratelimitbulkcontrollerglobalcategorynocostoverride) ## trigger @@ -442,214 +439,4 @@ run(); | errors.ErrorDto | 414 | application/json | | errors.ValidationErrorDto | 422 | application/json | | errors.ErrorDto | 500 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## testApiRateLimitBulkControllerNoCategoryNoCostOverride - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.testApiRateLimitBulkControllerNoCategoryNoCostOverride(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { NovuCore } from "@novu/api/core.js"; -import { testApiRateLimitBulkControllerNoCategoryNoCostOverride } from "@novu/api/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.js"; - -// Use `NovuCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const novu = new NovuCore({ - apiKey: "", -}); - -async function run() { - const res = await testApiRateLimitBulkControllerNoCategoryNoCostOverride(novu); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[boolean](../../models/.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## testApiRateLimitBulkControllerNoCategorySingleCostOverride - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.testApiRateLimitBulkControllerNoCategorySingleCostOverride(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { NovuCore } from "@novu/api/core.js"; -import { testApiRateLimitBulkControllerNoCategorySingleCostOverride } from "@novu/api/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.js"; - -// Use `NovuCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const novu = new NovuCore({ - apiKey: "", -}); - -async function run() { - const res = await testApiRateLimitBulkControllerNoCategorySingleCostOverride(novu); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[boolean](../../models/.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## testApiRateLimitBulkControllerGlobalCategoryNoCostOverride - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.testApiRateLimitBulkControllerGlobalCategoryNoCostOverride(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { NovuCore } from "@novu/api/core.js"; -import { testApiRateLimitBulkControllerGlobalCategoryNoCostOverride } from "@novu/api/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.js"; - -// Use `NovuCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const novu = new NovuCore({ - apiKey: "", -}); - -async function run() { - const res = await testApiRateLimitBulkControllerGlobalCategoryNoCostOverride(novu); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[boolean](../../models/.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/jsr.json b/jsr.json index 0421761f..99e87244 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.198", + "version": "0.0.1-alpha.196", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index a59d8f88..0b64c7cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,18 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.198", + "version": "0.0.1-alpha.196", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@novu/api", - "version": "0.0.1-alpha.198", + "version": "0.0.1-alpha.196", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", "eslint": "^8.57.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", - "tshy": "^1.16.2", "typescript": "^5.4.5", "zod": "^3.23.4" }, @@ -156,50 +155,6 @@ "deprecated": "Use @eslint/object-schema instead", "dev": true }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -235,16 +190,6 @@ "node": ">= 8" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -503,19 +448,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -666,18 +598,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -743,42 +663,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -949,18 +833,6 @@ "node": ">=6.0.0" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, "node_modules/enhanced-resolve": { "version": "5.17.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", @@ -1561,42 +1433,12 @@ "is-callable": "^1.1.3" } }, - "node_modules/foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -1985,18 +1827,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -2076,15 +1906,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -2242,21 +2063,6 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2342,12 +2148,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2394,30 +2194,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "dev": true, - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -2430,15 +2206,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -2580,12 +2347,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2631,22 +2392,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -2668,18 +2413,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/polite-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/polite-json/-/polite-json-5.0.0.tgz", - "integrity": "sha512-OLS/0XeUAcE8a2fdwemNja+udKgXNnY6yKVIXqAD2zVRx1KvY6Ato/rZ2vdzbxqYwPW0u6SCNC/bAMPNzpzxbw==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/possible-typed-array-names": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", @@ -2727,18 +2460,6 @@ } ] }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -2783,42 +2504,6 @@ "node": ">=4" } }, - "node_modules/resolve-import": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/resolve-import/-/resolve-import-1.4.6.tgz", - "integrity": "sha512-CIw9e64QcKcCFUj9+KxUCJPy8hYofv6eVfo3U9wdhCm2E4IjvFnZ6G4/yIC4yP3f11+h6uU5b3LdS7O64LgqrA==", - "dev": true, - "dependencies": { - "glob": "^10.3.3", - "walk-up-path": "^3.0.1" - }, - "engines": { - "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/resolve-import/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", @@ -2995,18 +2680,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -3016,71 +2689,6 @@ "node": ">=8" } }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/string.prototype.trim": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", @@ -3142,19 +2750,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -3200,62 +2795,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/sync-content": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/sync-content/-/sync-content-1.0.2.tgz", - "integrity": "sha512-znd3rYiiSxU3WteWyS9a6FXkTA/Wjk8WQsOyzHbineeL837dLn3DA4MRhsIX3qGcxDMH6+uuFV4axztssk7wEQ==", - "dev": true, - "dependencies": { - "glob": "^10.2.6", - "mkdirp": "^3.0.1", - "path-scurry": "^1.9.2", - "rimraf": "^5.0.1" - }, - "bin": { - "sync-content": "dist/mjs/bin.mjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sync-content/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sync-content/node_modules/rimraf": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", - "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", - "dev": true, - "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -3307,78 +2846,6 @@ "strip-bom": "^3.0.0" } }, - "node_modules/tshy": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/tshy/-/tshy-1.18.0.tgz", - "integrity": "sha512-FQudIujBazHRu7CVPHKQE9/Xq1Wc7lezxD/FCnTXx2PTcnoSN32DVpb/ZXvzV2NJBTDB3XKjqX8Cdm+2UK1DlQ==", - "dev": true, - "dependencies": { - "chalk": "^5.3.0", - "chokidar": "^3.6.0", - "foreground-child": "^3.1.1", - "minimatch": "^9.0.4", - "mkdirp": "^3.0.1", - "polite-json": "^5.0.0", - "resolve-import": "^1.4.5", - "rimraf": "^5.0.1", - "sync-content": "^1.0.2", - "typescript": "5", - "walk-up-path": "^3.0.1" - }, - "bin": { - "tshy": "dist/esm/index.js" - }, - "engines": { - "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1" - } - }, - "node_modules/tshy/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/tshy/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/tshy/node_modules/rimraf": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", - "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", - "dev": true, - "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -3513,12 +2980,6 @@ "punycode": "^2.1.0" } }, - "node_modules/walk-up-path": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", - "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==", - "dev": true - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3578,100 +3039,6 @@ "node": ">=0.10.0" } }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index f1767f4f..043eeb24 100644 --- a/package.json +++ b/package.json @@ -1,23 +1,12 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.198", + "version": "0.0.1-alpha.196", "author": "Novu", - "tshy": { - "exports": { - ".": "./src/index.ts", - "./package.json": "./package.json", - "./types": "./src/types/index.ts", - "./models/errors": "./src/models/errors/index.ts", - "./models/components": "./src/models/components/index.ts", - "./models/operations": "./src/models/operations/index.ts", - "./*.js": "./src/*.ts", - "./*": "./src/*.ts" - } - }, + "main": "./index.js", "sideEffects": false, "scripts": { "lint": "eslint --max-warnings=0 src", - "build": "tshy", + "build": "tsc", "prepublishOnly": "npm run build" }, "peerDependencies": { @@ -29,100 +18,10 @@ "eslint": "^8.57.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", - "tshy": "^1.16.2", "typescript": "^5.4.5", "zod": "^3.23.4" }, - "dependencies": {}, - "exports": { - ".": { - "import": { - "source": "./src/index.ts", - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "source": "./src/index.ts", - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - }, - "./package.json": "./package.json", - "./types": { - "import": { - "source": "./src/types/index.ts", - "types": "./dist/esm/types/index.d.ts", - "default": "./dist/esm/types/index.js" - }, - "require": { - "source": "./src/types/index.ts", - "types": "./dist/commonjs/types/index.d.ts", - "default": "./dist/commonjs/types/index.js" - } - }, - "./models/errors": { - "import": { - "source": "./src/models/errors/index.ts", - "types": "./dist/esm/models/errors/index.d.ts", - "default": "./dist/esm/models/errors/index.js" - }, - "require": { - "source": "./src/models/errors/index.ts", - "types": "./dist/commonjs/models/errors/index.d.ts", - "default": "./dist/commonjs/models/errors/index.js" - } - }, - "./models/components": { - "import": { - "source": "./src/models/components/index.ts", - "types": "./dist/esm/models/components/index.d.ts", - "default": "./dist/esm/models/components/index.js" - }, - "require": { - "source": "./src/models/components/index.ts", - "types": "./dist/commonjs/models/components/index.d.ts", - "default": "./dist/commonjs/models/components/index.js" - } - }, - "./models/operations": { - "import": { - "source": "./src/models/operations/index.ts", - "types": "./dist/esm/models/operations/index.d.ts", - "default": "./dist/esm/models/operations/index.js" - }, - "require": { - "source": "./src/models/operations/index.ts", - "types": "./dist/commonjs/models/operations/index.d.ts", - "default": "./dist/commonjs/models/operations/index.js" - } - }, - "./*.js": { - "import": { - "source": "./src/*.ts", - "types": "./dist/esm/*.d.ts", - "default": "./dist/esm/*.js" - }, - "require": { - "source": "./src/*.ts", - "types": "./dist/commonjs/*.d.ts", - "default": "./dist/commonjs/*.js" - } - }, - "./*": { - "import": { - "source": "./src/*.ts", - "types": "./dist/esm/*.d.ts", - "default": "./dist/esm/*.js" - }, - "require": { - "source": "./src/*.ts", - "types": "./dist/commonjs/*.d.ts", - "default": "./dist/commonjs/*.js" - } - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "type": "module", - "module": "./dist/esm/index.js" + "dependencies": { + + } } diff --git a/sources/code-samples.yaml b/sources/code-samples.yaml index 8d76bdf2..d134d678 100644 --- a/sources/code-samples.yaml +++ b/sources/code-samples.yaml @@ -27,6 +27,18 @@ actions: - "lang": "typescript" "label": "TypeScript" "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.cancel(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/health-check"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TypeScript" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.admin.healthControllerHealthCheck();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/health-check/test-idempotency"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TypeScript" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.admin.testIdempotency({\n expectedBehavior: \"IMMEDIATE_EXCEPTION\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/integrations"]["get"] update: "x-codeSamples": @@ -111,24 +123,6 @@ actions: - "lang": "typescript" "label": "TypeScript" "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - - target: $["paths"]["/v1/rate-limiting-trigger-bulk/global-category-no-cost-override"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "TypeScript" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.testApiRateLimitBulkControllerGlobalCategoryNoCostOverride();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - - target: $["paths"]["/v1/rate-limiting-trigger-bulk/no-category-no-cost-override"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "TypeScript" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.testApiRateLimitBulkControllerNoCategoryNoCostOverride();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - - target: $["paths"]["/v1/rate-limiting-trigger-bulk/no-category-single-cost-override"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "TypeScript" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.testApiRateLimitBulkControllerNoCategorySingleCostOverride();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers"]["get"] update: "x-codeSamples": @@ -255,18 +249,6 @@ actions: - "lang": "typescript" "label": "TypeScript" "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.preferences.update({\n subscriberId: \"\",\n workflowId: \"\",\n updateSubscriberPreferenceRequestDto: {},\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - - target: $["paths"]["/v1/testing/idempotency"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "TypeScript" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.admin.idempotencyGet();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - - target: $["paths"]["/v1/testing/idempotency"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "TypeScript" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.admin.idempotencyPost({\n data: 3087.15,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/topics"]["get"] update: "x-codeSamples": diff --git a/sources/json-development.json b/sources/json-development.json index 01099739..b299388c 100644 --- a/sources/json-development.json +++ b/sources/json-development.json @@ -1,16 +1,188 @@ { "openapi": "3.0.0", "paths": { - "/v1/events/trigger": { - "post": { - "operationId": "EventsController_trigger", - "x-speakeasy-group": "", - "x-speakeasy-usage-example": { - "title": "Trigger Notification Event" + "/v1/health-check": { + "get": { + "operationId": "HealthController_healthCheck", + "parameters": [ + { + "name": "idempotency-key", + "in": "header", + "description": "A header for idempotency purposes", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The Health Check is successful", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "example": "ok" + }, + "info": { + "type": "object", + "example": { + "database": { + "status": "up" + } + }, + "additionalProperties": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string" + } + }, + "additionalProperties": true + }, + "nullable": true + }, + "error": { + "type": "object", + "example": {}, + "additionalProperties": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string" + } + }, + "additionalProperties": true + }, + "nullable": true + }, + "details": { + "type": "object", + "example": { + "database": { + "status": "up" + } + }, + "additionalProperties": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string" + } + }, + "additionalProperties": true + } + } + } + } + } + } + }, + "503": { + "description": "The Health Check is not successful", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "example": "error" + }, + "info": { + "type": "object", + "example": { + "database": { + "status": "up" + } + }, + "additionalProperties": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string" + } + }, + "additionalProperties": true + }, + "nullable": true + }, + "error": { + "type": "object", + "example": { + "redis": { + "status": "down", + "message": "Could not connect" + } + }, + "additionalProperties": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string" + } + }, + "additionalProperties": true + }, + "nullable": true + }, + "details": { + "type": "object", + "example": { + "database": { + "status": "up" + }, + "redis": { + "status": "down", + "message": "Could not connect" + } + }, + "additionalProperties": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string" + } + }, + "additionalProperties": true + } + } + } + } + } + } + } }, - "x-speakeasy-name-override": "trigger", - "summary": "Trigger event", - "description": "\n Trigger event is the main (and only) way to send notifications to subscribers. \n The trigger identifier is used to match the particular workflow associated with it. \n Additional information can be passed according the body interface below.\n ", + "tags": [ + "Admin" + ] + } + }, + "/v1/health-check/test-idempotency": { + "post": { + "operationId": "HealthController_testIdempotency", + "x-speakeasy-name-override": "testIdempotency", "parameters": [ { "name": "idempotency-key", @@ -27,45 +199,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TriggerEventRequestDto" + "$ref": "#/components/schemas/IdempotencyTestingDto" } } } }, "responses": { - "201": { - "description": "Created", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerEventResponseDto" - } - } - } - }, "400": { "description": "Bad Request", "headers": { @@ -482,7 +621,7 @@ } }, "tags": [ - "Events" + "Admin" ], "security": [ { @@ -491,16 +630,16 @@ ] } }, - "/v1/events/trigger/bulk": { + "/v1/events/trigger": { "post": { - "operationId": "EventsController_triggerBulk", + "operationId": "EventsController_trigger", "x-speakeasy-group": "", "x-speakeasy-usage-example": { - "title": "Trigger Notification Events in Bulk" + "title": "Trigger Notification Event" }, - "x-speakeasy-name-override": "triggerBulk", - "summary": "Bulk trigger event", - "description": "\n Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.\n The bulk API is limited to 100 events per request.\n ", + "x-speakeasy-name-override": "trigger", + "summary": "Trigger event", + "description": "\n Trigger event is the main (and only) way to send notifications to subscribers. \n The trigger identifier is used to match the particular workflow associated with it. \n Additional information can be passed according the body interface below.\n ", "parameters": [ { "name": "idempotency-key", @@ -517,7 +656,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkTriggerEventDto" + "$ref": "#/components/schemas/TriggerEventRequestDto" } } } @@ -551,10 +690,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TriggerEventResponseDto" - } + "$ref": "#/components/schemas/TriggerEventResponseDto" } } } @@ -984,16 +1120,16 @@ ] } }, - "/v1/events/trigger/broadcast": { + "/v1/events/trigger/bulk": { "post": { - "operationId": "EventsController_broadcastEventToAll", + "operationId": "EventsController_triggerBulk", "x-speakeasy-group": "", "x-speakeasy-usage-example": { - "title": "Broadcast Event to All" + "title": "Trigger Notification Events in Bulk" }, - "x-speakeasy-name-override": "triggerBroadcast", - "summary": "Broadcast event to all", - "description": "Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.\n In the future could be used to trigger events to a subset of subscribers based on defined filters.", + "x-speakeasy-name-override": "triggerBulk", + "summary": "Bulk trigger event", + "description": "\n Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.\n The bulk API is limited to 100 events per request.\n ", "parameters": [ { "name": "idempotency-key", @@ -1010,47 +1146,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TriggerEventToAllRequestDto" + "$ref": "#/components/schemas/BulkTriggerEventDto" } } } }, "responses": { - "200": { - "description": "OK", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerEventResponseDto" - } - } - } - }, "201": { - "description": "Broadcast request has been registered successfully ", + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -1077,7 +1180,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TriggerEventResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/TriggerEventResponseDto" + } } } } @@ -1507,25 +1613,17 @@ ] } }, - "/v1/events/trigger/{transactionId}": { - "delete": { - "operationId": "EventsController_cancel", + "/v1/events/trigger/broadcast": { + "post": { + "operationId": "EventsController_broadcastEventToAll", "x-speakeasy-group": "", "x-speakeasy-usage-example": { - "title": "Cancel Triggered Event" + "title": "Broadcast Event to All" }, - "x-speakeasy-name-override": "cancel", - "summary": "Cancel triggered event", - "description": "\n Using a previously generated transactionId during the event trigger,\n will cancel any active or pending workflows. This is useful to cancel active digests, delays etc...\n ", + "x-speakeasy-name-override": "triggerBroadcast", + "summary": "Broadcast event to all", + "description": "Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.\n In the future could be used to trigger events to a subset of subscribers based on defined filters.", "parameters": [ - { - "name": "transactionId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, { "name": "idempotency-key", "in": "header", @@ -1536,8 +1634,19 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerEventToAllRequestDto" + } + } + } + }, "responses": { "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -1561,17 +1670,16 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DataBooleanDto" + "$ref": "#/components/schemas/TriggerEventResponseDto" } } } }, - "400": { - "description": "Bad Request", + "201": { + "description": "Broadcast request has been registered successfully ", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -1598,13 +1706,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorDto" + "$ref": "#/components/schemas/TriggerEventResponseDto" } } } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -1636,8 +1744,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -1669,544 +1777,8 @@ } } }, - "404": { - "description": "Not Found", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "405": { - "description": "Method Not Allowed", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "409": { - "description": "Conflict", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "413": { - "description": "Payload Too Large", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "414": { - "description": "URI Too Long", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorDto" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Events" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/notifications": { - "get": { - "operationId": "NotificationsController_listNotifications", - "summary": "Get notifications", - "parameters": [ - { - "name": "channels", - "required": false, - "in": "query", - "description": "Array of channel types", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChannelTypeEnum" - } - } - }, - { - "name": "templates", - "required": false, - "in": "query", - "description": "Array of template IDs or a single template ID", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "emails", - "required": false, - "in": "query", - "description": "Array of email addresses or a single email address", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "search", - "required": false, - "in": "query", - "deprecated": true, - "description": "Search term (deprecated)", - "schema": { - "type": "string" - } - }, - { - "name": "subscriberIds", - "required": false, - "in": "query", - "description": "Array of subscriber IDs or a single subscriber ID", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "page", - "required": false, - "in": "query", - "description": "Page number for pagination", - "schema": { - "default": 0, - "type": "number" - } - }, - { - "name": "transactionId", - "required": false, - "in": "query", - "description": "Transaction ID for filtering", - "schema": { - "type": "string" - } - }, - { - "name": "after", - "required": false, - "in": "query", - "description": "Date filter for records after this timestamp", - "schema": { - "type": "string" - } - }, - { - "name": "before", - "required": false, - "in": "query", - "description": "Date filter for records before this timestamp", - "schema": { - "type": "string" - } - }, - { - "name": "idempotency-key", - "in": "header", - "description": "A header for idempotency purposes", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivitiesResponseDto" - } - } - } - }, - "400": { - "description": "Bad Request", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "401": { - "description": "Unauthorized", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "403": { - "description": "Forbidden", + "403": { + "description": "Forbidden", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -2555,7 +2127,7 @@ } }, "tags": [ - "Notifications" + "Events" ], "security": [ { @@ -2564,12 +2136,25 @@ ] } }, - "/v1/notifications/stats": { - "get": { - "operationId": "NotificationsController_getActivityStats", - "x-speakeasy-group": "Notifications.Stats", - "summary": "Get notification statistics", + "/v1/events/trigger/{transactionId}": { + "delete": { + "operationId": "EventsController_cancel", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Cancel Triggered Event" + }, + "x-speakeasy-name-override": "cancel", + "summary": "Cancel triggered event", + "description": "\n Using a previously generated transactionId during the event trigger,\n will cancel any active or pending workflows. This is useful to cancel active digests, delays etc...\n ", "parameters": [ + { + "name": "transactionId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, { "name": "idempotency-key", "in": "header", @@ -2582,7 +2167,6 @@ ], "responses": { "200": { - "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -2606,10 +2190,11 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivityStatsResponseDto" + "$ref": "#/components/schemas/DataBooleanDto" } } } @@ -3030,7 +2615,7 @@ } }, "tags": [ - "Notifications" + "Events" ], "security": [ { @@ -3039,21 +2624,106 @@ ] } }, - "/v1/notifications/graph/stats": { + "/v1/notifications": { "get": { - "operationId": "NotificationsController_getActivityGraphStats", - "x-speakeasy-name-override": "graph", - "x-speakeasy-group": "Notifications.Stats", - "summary": "Get notification graph statistics", + "operationId": "NotificationsController_listNotifications", + "summary": "Get notifications", "parameters": [ { - "name": "days", + "name": "channels", + "required": false, + "in": "query", + "description": "Array of channel types", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelTypeEnum" + } + } + }, + { + "name": "templates", + "required": false, + "in": "query", + "description": "Array of template IDs or a single template ID", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "emails", + "required": false, + "in": "query", + "description": "Array of email addresses or a single email address", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "search", + "required": false, + "in": "query", + "deprecated": true, + "description": "Search term (deprecated)", + "schema": { + "type": "string" + } + }, + { + "name": "subscriberIds", + "required": false, + "in": "query", + "description": "Array of subscriber IDs or a single subscriber ID", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "page", "required": false, "in": "query", + "description": "Page number for pagination", "schema": { + "default": 0, "type": "number" } }, + { + "name": "transactionId", + "required": false, + "in": "query", + "description": "Transaction ID for filtering", + "schema": { + "type": "string" + } + }, + { + "name": "after", + "required": false, + "in": "query", + "description": "Date filter for records after this timestamp", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "required": false, + "in": "query", + "description": "Date filter for records before this timestamp", + "schema": { + "type": "string" + } + }, { "name": "idempotency-key", "in": "header", @@ -3066,7 +2736,6 @@ ], "responses": { "200": { - "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -3090,13 +2759,11 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActivityGraphStatesResponse" - } + "$ref": "#/components/schemas/ActivitiesResponseDto" } } } @@ -3526,19 +3193,12 @@ ] } }, - "/v1/notifications/{notificationId}": { + "/v1/notifications/stats": { "get": { - "operationId": "NotificationsController_getNotification", - "summary": "Get notification", + "operationId": "NotificationsController_getActivityStats", + "x-speakeasy-group": "Notifications.Stats", + "summary": "Get notification statistics", "parameters": [ - { - "name": "notificationId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, { "name": "idempotency-key", "in": "header", @@ -3578,7 +3238,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivityNotificationResponseDto" + "$ref": "#/components/schemas/ActivityStatsResponseDto" } } } @@ -4008,12 +3668,21 @@ ] } }, - "/v1/integrations": { + "/v1/notifications/graph/stats": { "get": { - "operationId": "IntegrationsController_listIntegrations", - "summary": "Get integrations", - "description": "Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", + "operationId": "NotificationsController_getActivityGraphStats", + "x-speakeasy-name-override": "graph", + "x-speakeasy-group": "Notifications.Stats", + "summary": "Get notification graph statistics", "parameters": [ + { + "name": "days", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, { "name": "idempotency-key", "in": "header", @@ -4026,7 +3695,7 @@ ], "responses": { "200": { - "description": "The list of integrations belonging to the organization that are successfully returned.", + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -4055,7 +3724,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/IntegrationResponseDto" + "$ref": "#/components/schemas/ActivityGraphStatesResponse" } } } @@ -4477,19 +4146,28 @@ } }, "tags": [ - "Integrations" + "Notifications" ], "security": [ { "api-key": [] } ] - }, - "post": { - "operationId": "IntegrationsController_createIntegration", - "summary": "Create integration", - "description": "Create an integration for the current environment the user is based on the API key provided", + } + }, + "/v1/notifications/{notificationId}": { + "get": { + "operationId": "NotificationsController_getNotification", + "summary": "Get notification", "parameters": [ + { + "name": "notificationId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, { "name": "idempotency-key", "in": "header", @@ -4500,19 +4178,9 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateIntegrationRequestDto" - } - } - } - }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -4539,7 +4207,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationResponseDto" + "$ref": "#/components/schemas/ActivityNotificationResponseDto" } } } @@ -4960,7 +4628,7 @@ } }, "tags": [ - "Integrations" + "Notifications" ], "security": [ { @@ -4969,12 +4637,11 @@ ] } }, - "/v1/integrations/active": { + "/v1/integrations": { "get": { - "operationId": "IntegrationsController_getActiveIntegrations", - "x-speakeasy-name-override": "listActive", - "summary": "Get active integrations", - "description": "Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", + "operationId": "IntegrationsController_listIntegrations", + "summary": "Get integrations", + "description": "Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", "parameters": [ { "name": "idempotency-key", @@ -4988,7 +4655,7 @@ ], "responses": { "200": { - "description": "The list of active integrations belonging to the organization that are successfully returned.", + "description": "The list of integrations belonging to the organization that are successfully returned.", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -5436,33 +5103,22 @@ } } } - } - }, - "tags": [ - "Integrations" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/integrations/webhook/provider/{providerOrIntegrationId}/status": { - "get": { - "operationId": "IntegrationsController_getWebhookSupportStatus", - "x-speakeasy-group": "Integrations.Webhooks", - "summary": "Get webhook support status for provider", - "description": "Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value", - "parameters": [ - { - "name": "providerOrIntegrationId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, + } + }, + "tags": [ + "Integrations" + ], + "security": [ + { + "api-key": [] + } + ] + }, + "post": { + "operationId": "IntegrationsController_createIntegration", + "summary": "Create integration", + "description": "Create an integration for the current environment the user is based on the API key provided", + "parameters": [ { "name": "idempotency-key", "in": "header", @@ -5473,9 +5129,19 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationRequestDto" + } + } + } + }, "responses": { - "200": { - "description": "The status of the webhook for the provider requested", + "201": { + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -5502,7 +5168,7 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/IntegrationResponseDto" } } } @@ -5932,19 +5598,13 @@ ] } }, - "/v1/integrations/{integrationId}": { - "put": { - "operationId": "IntegrationsController_updateIntegrationById", - "summary": "Update integration", + "/v1/integrations/active": { + "get": { + "operationId": "IntegrationsController_getActiveIntegrations", + "x-speakeasy-name-override": "listActive", + "summary": "Get active integrations", + "description": "Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", "parameters": [ - { - "name": "integrationId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, { "name": "idempotency-key", "in": "header", @@ -5955,19 +5615,9 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateIntegrationRequestDto" - } - } - } - }, "responses": { "200": { - "description": "OK", + "description": "The list of active integrations belonging to the organization that are successfully returned.", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -5994,7 +5644,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } } } } @@ -6099,7 +5752,7 @@ } }, "404": { - "description": "The integration with the integrationId provided does not exist in the database.", + "description": "Not Found", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -6122,6 +5775,13 @@ "Idempotency-Replay": { "$ref": "#/components/headers/Idempotency-Replay" } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } } }, "405": { @@ -6415,13 +6075,17 @@ "api-key": [] } ] - }, - "delete": { - "operationId": "IntegrationsController_removeIntegration", - "summary": "Delete integration", + } + }, + "/v1/integrations/webhook/provider/{providerOrIntegrationId}/status": { + "get": { + "operationId": "IntegrationsController_getWebhookSupportStatus", + "x-speakeasy-group": "Integrations.Webhooks", + "summary": "Get webhook support status for provider", + "description": "Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value", "parameters": [ { - "name": "integrationId", + "name": "providerOrIntegrationId", "required": true, "in": "path", "schema": { @@ -6440,7 +6104,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "The status of the webhook for the provider requested", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -6467,10 +6131,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IntegrationResponseDto" - } + "type": "boolean" } } } @@ -6900,11 +6561,10 @@ ] } }, - "/v1/integrations/{integrationId}/set-primary": { - "post": { - "operationId": "IntegrationsController_setIntegrationAsPrimary", - "x-speakeasy-name-override": "setAsPrimary", - "summary": "Set integration as primary", + "/v1/integrations/{integrationId}": { + "put": { + "operationId": "IntegrationsController_updateIntegrationById", + "summary": "Update integration", "parameters": [ { "name": "integrationId", @@ -6924,6 +6584,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIntegrationRequestDto" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -7374,48 +7044,17 @@ "api-key": [] } ] - } - }, - "/v1/subscribers": { - "get": { - "operationId": "SubscribersController_listSubscribers", - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.data.resultArray" - } - }, - "summary": "Get subscribers", - "description": "Returns a list of subscribers, could paginated using the `page` and `limit` query parameter", + }, + "delete": { + "operationId": "IntegrationsController_removeIntegration", + "summary": "Delete integration", "parameters": [ { - "name": "page", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", + "name": "integrationId", + "required": true, + "in": "path", "schema": { - "maximum": 100, - "default": 10, - "type": "number" + "type": "string" } }, { @@ -7430,6 +7069,7 @@ ], "responses": { "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -7453,25 +7093,13 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginatedResponseDto" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubscriberResponseDto" - } - } - } - } - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } } } } @@ -7892,19 +7520,29 @@ } }, "tags": [ - "Subscribers" + "Integrations" ], "security": [ { "api-key": [] } ] - }, + } + }, + "/v1/integrations/{integrationId}/set-primary": { "post": { - "operationId": "SubscribersController_createSubscriber", - "summary": "Create subscriber", - "description": "Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity.", + "operationId": "IntegrationsController_setIntegrationAsPrimary", + "x-speakeasy-name-override": "setAsPrimary", + "summary": "Set integration as primary", "parameters": [ + { + "name": "integrationId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, { "name": "idempotency-key", "in": "header", @@ -7915,19 +7553,9 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateSubscriberRequestDto" - } - } - } - }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -7954,7 +7582,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "$ref": "#/components/schemas/IntegrationResponseDto" } } } @@ -8059,7 +7687,7 @@ } }, "404": { - "description": "Not Found", + "description": "The integration with the integrationId provided does not exist in the database.", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -8082,13 +7710,6 @@ "Idempotency-Replay": { "$ref": "#/components/headers/Idempotency-Replay" } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } } }, "405": { @@ -8374,37 +7995,56 @@ } } }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/subscribers/{subscriberId}": { - "get": { - "operationId": "SubscribersController_getSubscriber", - "summary": "Get subscriber", - "description": "Get subscriber by your internal id used to identify the subscriber", + "tags": [ + "Integrations" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers": { + "get": { + "operationId": "SubscribersController_listSubscribers", + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "limit", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data.resultArray" + } + }, + "summary": "Get subscribers", + "description": "Returns a list of subscribers, could paginated using the `page` and `limit` query parameter", "parameters": [ { - "name": "subscriberId", - "required": true, - "in": "path", + "name": "page", + "required": false, + "in": "query", "schema": { - "type": "string" + "type": "number" } }, { - "name": "includeTopics", + "name": "limit", "required": false, "in": "query", - "description": "Includes the topics associated with the subscriber", "schema": { - "type": "boolean" + "maximum": 100, + "default": 10, + "type": "number" } }, { @@ -8419,7 +8059,6 @@ ], "responses": { "200": { - "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -8443,10 +8082,25 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "allOf": [ + { + "$ref": "#/components/schemas/PaginatedResponseDto" + }, + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } + } + ] } } } @@ -8875,19 +8529,11 @@ } ] }, - "put": { - "operationId": "SubscribersController_updateSubscriber", - "summary": "Update subscriber", - "description": "Used to update the subscriber entity with new information", + "post": { + "operationId": "SubscribersController_createSubscriber", + "summary": "Create subscriber", + "description": "Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity.", "parameters": [ - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, { "name": "idempotency-key", "in": "header", @@ -8903,14 +8549,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberRequestDto" + "$ref": "#/components/schemas/CreateSubscriberRequestDto" } } } }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -9365,11 +9011,13 @@ "api-key": [] } ] - }, - "delete": { - "operationId": "SubscribersController_removeSubscriber", - "summary": "Delete subscriber", - "description": "Deletes a subscriber entity from the Novu platform", + } + }, + "/v1/subscribers/{subscriberId}": { + "get": { + "operationId": "SubscribersController_getSubscriber", + "summary": "Get subscriber", + "description": "Get subscriber by your internal id used to identify the subscriber", "parameters": [ { "name": "subscriberId", @@ -9379,6 +9027,15 @@ "type": "string" } }, + { + "name": "includeTopics", + "required": false, + "in": "query", + "description": "Includes the topics associated with the subscriber", + "schema": { + "type": "boolean" + } + }, { "name": "idempotency-key", "in": "header", @@ -9418,7 +9075,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteSubscriberResponseDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } @@ -9846,15 +9503,20 @@ "api-key": [] } ] - } - }, - "/v1/subscribers/bulk": { - "post": { - "operationId": "SubscribersController_bulkCreateSubscribers", - "x-speakeasy-name-override": "createBulk", - "summary": "Bulk create subscribers", - "description": "\n Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.\n The bulk API is limited to 500 subscribers per request.\n ", + }, + "put": { + "operationId": "SubscribersController_updateSubscriber", + "summary": "Update subscriber", + "description": "Used to update the subscriber entity with new information", "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, { "name": "idempotency-key", "in": "header", @@ -9870,14 +9532,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkSubscriberCreateDto" + "$ref": "#/components/schemas/UpdateSubscriberRequestDto" } } } }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -9904,7 +9566,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkCreateSubscriberResponseDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } @@ -10332,14 +9994,11 @@ "api-key": [] } ] - } - }, - "/v1/subscribers/{subscriberId}/credentials": { - "put": { - "operationId": "SubscribersController_updateSubscriberChannel", - "x-speakeasy-group": "Subscribers.Credentials", - "summary": "Update subscriber credentials", - "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.", + }, + "delete": { + "operationId": "SubscribersController_removeSubscriber", + "summary": "Delete subscriber", + "description": "Deletes a subscriber entity from the Novu platform", "parameters": [ { "name": "subscriberId", @@ -10359,16 +10018,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -10398,7 +10047,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "$ref": "#/components/schemas/DeleteSubscriberResponseDto" } } } @@ -10826,22 +10475,15 @@ "api-key": [] } ] - }, - "patch": { - "operationId": "SubscribersController_modifySubscriberChannel", - "x-speakeasy-name-override": "append", - "x-speakeasy-group": "Subscribers.Credentials", - "summary": "Modify subscriber credentials", - "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.\n This endpoint appends provided credentials and deviceTokens to the existing ones.", + } + }, + "/v1/subscribers/bulk": { + "post": { + "operationId": "SubscribersController_bulkCreateSubscribers", + "x-speakeasy-name-override": "createBulk", + "summary": "Bulk create subscribers", + "description": "\n Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.\n The bulk API is limited to 500 subscribers per request.\n ", "parameters": [ - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, { "name": "idempotency-key", "in": "header", @@ -10857,14 +10499,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" + "$ref": "#/components/schemas/BulkSubscriberCreateDto" } } } }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -10891,7 +10533,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "$ref": "#/components/schemas/BulkCreateSubscriberResponseDto" } } } @@ -11321,12 +10963,12 @@ ] } }, - "/v1/subscribers/{subscriberId}/credentials/{providerId}": { - "delete": { - "operationId": "SubscribersController_deleteSubscriberCredentials", + "/v1/subscribers/{subscriberId}/credentials": { + "put": { + "operationId": "SubscribersController_updateSubscriberChannel", "x-speakeasy-group": "Subscribers.Credentials", - "summary": "Delete subscriber credentials by providerId", - "description": "Delete subscriber credentials such as slack and expo tokens.", + "summary": "Update subscriber credentials", + "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.", "parameters": [ { "name": "subscriberId", @@ -11336,14 +10978,6 @@ "type": "string" } }, - { - "name": "providerId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, { "name": "idempotency-key", "in": "header", @@ -11354,8 +10988,19 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" + } + } + } + }, "responses": { - "204": { + "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -11379,7 +11024,13 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } }, "400": { "description": "Bad Request", @@ -11804,15 +11455,13 @@ "api-key": [] } ] - } - }, - "/v1/subscribers/{subscriberId}/online-status": { + }, "patch": { - "operationId": "SubscribersController_updateSubscriberOnlineFlag", - "x-speakeasy-name-override": "updateOnlineFlag", - "x-speakeasy-group": "Subscribers.properties", - "summary": "Update subscriber online status", - "description": "Used to update the subscriber isOnline flag.", + "operationId": "SubscribersController_modifySubscriberChannel", + "x-speakeasy-name-override": "append", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Modify subscriber credentials", + "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.\n This endpoint appends provided credentials and deviceTokens to the existing ones.", "parameters": [ { "name": "subscriberId", @@ -11837,7 +11486,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberOnlineFlagRequestDto" + "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" } } } @@ -12301,12 +11950,12 @@ ] } }, - "/v1/subscribers/{subscriberId}/preferences": { - "get": { - "operationId": "SubscribersController_listSubscriberPreferences", - "x-speakeasy-name-override": "list", - "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Get subscriber preferences", + "/v1/subscribers/{subscriberId}/credentials/{providerId}": { + "delete": { + "operationId": "SubscribersController_deleteSubscriberCredentials", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Delete subscriber credentials by providerId", + "description": "Delete subscriber credentials such as slack and expo tokens.", "parameters": [ { "name": "subscriberId", @@ -12317,12 +11966,11 @@ } }, { - "name": "includeInactiveChannels", - "required": false, - "in": "query", - "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", + "name": "providerId", + "required": true, + "in": "path", "schema": { - "type": "boolean" + "type": "string" } }, { @@ -12336,8 +11984,7 @@ } ], "responses": { - "200": { - "description": "OK", + "204": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -12361,16 +12008,7 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" - } - } - } - } + "description": "" }, "400": { "description": "Bad Request", @@ -12795,12 +12433,15 @@ "api-key": [] } ] - }, + } + }, + "/v1/subscribers/{subscriberId}/online-status": { "patch": { - "operationId": "SubscribersController_updateSubscriberGlobalPreferences", - "x-speakeasy-name-override": "updateGlobal", - "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Update subscriber global preferences", + "operationId": "SubscribersController_updateSubscriberOnlineFlag", + "x-speakeasy-name-override": "updateOnlineFlag", + "x-speakeasy-group": "Subscribers.properties", + "summary": "Update subscriber online status", + "description": "Used to update the subscriber isOnline flag.", "parameters": [ { "name": "subscriberId", @@ -12825,7 +12466,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto" + "$ref": "#/components/schemas/UpdateSubscriberOnlineFlagRequestDto" } } } @@ -12859,7 +12500,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceGlobalResponseDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } @@ -13289,42 +12930,28 @@ ] } }, - "/v1/subscribers/{subscriberId}/preferences/{parameter}": { + "/v1/subscribers/{subscriberId}/preferences": { "get": { - "operationId": "SubscribersController_getSubscriberPreferenceByLevel", - "x-speakeasy-name-override": "retrieveByLevel", + "operationId": "SubscribersController_listSubscriberPreferences", + "x-speakeasy-name-override": "list", "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Get subscriber preferences by level", + "summary": "Get subscriber preferences", "parameters": [ { - "name": "includeInactiveChannels", - "required": false, - "in": "query", - "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", - "schema": { - "type": "boolean" - } - }, - { - "name": "parameter", + "name": "subscriberId", "required": true, "in": "path", - "description": "the preferences level to be retrieved (template / global) ", - "x-speakeasy-name-override": "preferenceLevel", "schema": { - "enum": [ - "global", - "template" - ], "type": "string" } }, { - "name": "subscriberId", - "required": true, - "in": "path", + "name": "includeInactiveChannels", + "required": false, + "in": "query", + "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", "schema": { - "type": "string" + "type": "boolean" } }, { @@ -13368,7 +12995,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/GetSubscriberPreferencesResponseDto" + "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" } } } @@ -13799,9 +13426,10 @@ ] }, "patch": { - "operationId": "SubscribersController_updateSubscriberPreference", + "operationId": "SubscribersController_updateSubscriberGlobalPreferences", + "x-speakeasy-name-override": "updateGlobal", "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Update subscriber preference", + "summary": "Update subscriber global preferences", "parameters": [ { "name": "subscriberId", @@ -13811,15 +13439,6 @@ "type": "string" } }, - { - "name": "parameter", - "required": true, - "in": "path", - "x-speakeasy-name-override": "workflowId", - "schema": { - "type": "string" - } - }, { "name": "idempotency-key", "in": "header", @@ -13835,7 +13454,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceRequestDto" + "$ref": "#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto" } } } @@ -13869,7 +13488,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" + "$ref": "#/components/schemas/UpdateSubscriberPreferenceGlobalResponseDto" } } } @@ -14299,61 +13918,40 @@ ] } }, - "/v1/subscribers/{subscriberId}/notifications/feed": { + "/v1/subscribers/{subscriberId}/preferences/{parameter}": { "get": { - "operationId": "SubscribersController_getNotificationsFeed", - "x-speakeasy-name-override": "feed", - "x-speakeasy-group": "Subscribers.Notifications", - "summary": "Get in-app notification feed for a particular subscriber", + "operationId": "SubscribersController_getSubscriberPreferenceByLevel", + "x-speakeasy-name-override": "retrieveByLevel", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Get subscriber preferences by level", "parameters": [ { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "maximum": 100, - "default": 10, - "type": "number" - } - }, - { - "name": "read", + "name": "includeInactiveChannels", "required": false, "in": "query", + "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", "schema": { "type": "boolean" } }, { - "name": "seen", - "required": false, - "in": "query", + "name": "parameter", + "required": true, + "in": "path", + "description": "the preferences level to be retrieved (template / global) ", + "x-speakeasy-name-override": "preferenceLevel", "schema": { - "type": "boolean" + "enum": [ + "global", + "template" + ], + "type": "string" } }, { - "name": "payload", - "required": false, - "in": "query", - "description": "Base64 encoded string of the partial payload JSON object", - "example": "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", + "name": "subscriberId", + "required": true, + "in": "path", "schema": { "type": "string" } @@ -14397,7 +13995,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/GetSubscriberPreferencesResponseDto" + } } } } @@ -14825,14 +14426,11 @@ "api-key": [] } ] - } - }, - "/v1/subscribers/{subscriberId}/notifications/unseen": { - "get": { - "operationId": "SubscribersController_getUnseenCount", - "x-speakeasy-name-override": "unseenCount", - "x-speakeasy-group": "Subscribers.Notifications", - "summary": "Get the unseen in-app notifications count for subscribers feed", + }, + "patch": { + "operationId": "SubscribersController_updateSubscriberPreference", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Update subscriber preference", "parameters": [ { "name": "subscriberId", @@ -14843,23 +14441,12 @@ } }, { - "name": "seen", - "required": false, - "in": "query", - "description": "Indicates whether to count seen notifications.", - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "description": "The maximum number of notifications to return.", + "name": "parameter", + "required": true, + "in": "path", + "x-speakeasy-name-override": "workflowId", "schema": { - "default": 100, - "type": "number" + "type": "string" } }, { @@ -14872,6 +14459,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberPreferenceRequestDto" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -14901,7 +14498,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnseenCountResponse" + "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" } } } @@ -15331,17 +14928,61 @@ ] } }, - "/v1/subscribers/{subscriberId}/messages/mark-as": { - "post": { - "operationId": "SubscribersController_markMessagesAs", - "x-speakeasy-name-override": "markAllAs", - "x-speakeasy-group": "Subscribers.Messages", - "summary": "Mark a subscriber messages as seen, read, unseen or unread", + "/v1/subscribers/{subscriberId}/notifications/feed": { + "get": { + "operationId": "SubscribersController_getNotificationsFeed", + "x-speakeasy-name-override": "feed", + "x-speakeasy-group": "Subscribers.Notifications", + "summary": "Get in-app notification feed for a particular subscriber", "parameters": [ { - "name": "subscriberId", - "required": true, - "in": "path", + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "maximum": 100, + "default": 10, + "type": "number" + } + }, + { + "name": "read", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "seen", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "payload", + "required": false, + "in": "query", + "description": "Base64 encoded string of the partial payload JSON object", + "example": "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", "schema": { "type": "string" } @@ -15356,19 +14997,9 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageMarkAsRequestDto" - } - } - } - }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -15395,10 +15026,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessageResponseDto" - } + "$ref": "#/components/schemas/FeedResponseDto" } } } @@ -15828,12 +15456,12 @@ ] } }, - "/v1/subscribers/{subscriberId}/messages/mark-all": { - "post": { - "operationId": "SubscribersController_markAllUnreadAsRead", - "x-speakeasy-name-override": "markAll", - "x-speakeasy-group": "Subscribers.Messages", - "summary": "Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.", + "/v1/subscribers/{subscriberId}/notifications/unseen": { + "get": { + "operationId": "SubscribersController_getUnseenCount", + "x-speakeasy-name-override": "unseenCount", + "x-speakeasy-group": "Subscribers.Notifications", + "summary": "Get the unseen in-app notifications count for subscribers feed", "parameters": [ { "name": "subscriberId", @@ -15843,6 +15471,26 @@ "type": "string" } }, + { + "name": "seen", + "required": false, + "in": "query", + "description": "Indicates whether to count seen notifications.", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "The maximum number of notifications to return.", + "schema": { + "default": 100, + "type": "number" + } + }, { "name": "idempotency-key", "in": "header", @@ -15853,18 +15501,9 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MarkAllMessageAsRequestDto" - } - } - } - }, "responses": { - "201": { + "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -15888,11 +15527,10 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", "content": { "application/json": { "schema": { - "type": "number" + "$ref": "#/components/schemas/UnseenCountResponse" } } } @@ -16322,27 +15960,13 @@ ] } }, - "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}": { + "/v1/subscribers/{subscriberId}/messages/mark-as": { "post": { - "operationId": "SubscribersController_markActionAsSeen", - "x-speakeasy-name-override": "updateAsSeen", + "operationId": "SubscribersController_markMessagesAs", + "x-speakeasy-name-override": "markAllAs", "x-speakeasy-group": "Subscribers.Messages", - "summary": "Mark message action as seen", + "summary": "Mark a subscriber messages as seen, read, unseen or unread", "parameters": [ - { - "name": "messageId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "required": true, - "in": "path", - "schema": {} - }, { "name": "subscriberId", "required": true, @@ -16366,7 +15990,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MarkMessageActionAsSeenDto" + "$ref": "#/components/schemas/MessageMarkAsRequestDto" } } } @@ -16400,7 +16024,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageResponseDto" + } } } } @@ -16830,12 +16457,12 @@ ] } }, - "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback": { - "get": { - "operationId": "SubscribersController_chatOauthCallback", - "x-speakeasy-name-override": "chatAccessOauthCallBack", - "x-speakeasy-group": "Subscribers.Authentication", - "summary": "Handle providers oauth redirect", + "/v1/subscribers/{subscriberId}/messages/mark-all": { + "post": { + "operationId": "SubscribersController_markAllUnreadAsRead", + "x-speakeasy-name-override": "markAll", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.", "parameters": [ { "name": "subscriberId", @@ -16845,48 +16472,6 @@ "type": "string" } }, - { - "name": "providerId", - "required": true, - "in": "path", - "schema": {} - }, - { - "name": "hmacHash", - "required": true, - "in": "query", - "description": "HMAC hash for the request", - "schema": { - "type": "string" - } - }, - { - "name": "environmentId", - "required": true, - "in": "query", - "description": "The ID of the environment, must be a valid MongoDB ID", - "schema": { - "type": "string" - } - }, - { - "name": "integrationIdentifier", - "required": false, - "in": "query", - "description": "Optional integration identifier", - "schema": { - "type": "string" - } - }, - { - "name": "code", - "required": true, - "in": "query", - "description": "Optional authorization code returned from the OAuth provider", - "schema": { - "type": "string" - } - }, { "name": "idempotency-key", "in": "header", @@ -16897,42 +16482,18 @@ } } ], - "responses": { - "200": { - "description": "Returns plain text response.", - "content": { - "text/html": { - "schema": { - "type": "string" - } - } - }, - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MarkAllMessageAsRequestDto" } } - }, - "302": { - "description": "Redirects to the specified URL.", + } + }, + "responses": { + "201": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -16954,19 +16515,13 @@ }, "Idempotency-Replay": { "$ref": "#/components/headers/Idempotency-Replay" - }, - "Location": { - "description": "The URL to redirect to.", - "schema": { - "type": "string", - "example": "https://www.novu.co" - } } }, + "description": "", "content": { "application/json": { "schema": { - "type": "string" + "type": "number" } } } @@ -17396,15 +16951,15 @@ ] } }, - "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth": { - "get": { - "operationId": "SubscribersController_chatAccessOauth", - "x-speakeasy-name-override": "chatAccessOauth", - "x-speakeasy-group": "Subscribers.Authentication", - "summary": "Handle chat oauth", + "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}": { + "post": { + "operationId": "SubscribersController_markActionAsSeen", + "x-speakeasy-name-override": "updateAsSeen", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Mark message action as seen", "parameters": [ { - "name": "subscriberId", + "name": "messageId", "required": true, "in": "path", "schema": { @@ -17412,34 +16967,15 @@ } }, { - "name": "providerId", + "name": "type", "required": true, "in": "path", "schema": {} }, { - "name": "hmacHash", - "required": true, - "in": "query", - "description": "HMAC hash for the request", - "schema": { - "type": "string" - } - }, - { - "name": "environmentId", + "name": "subscriberId", "required": true, - "in": "query", - "description": "The ID of the environment, must be a valid MongoDB ID", - "schema": { - "type": "string" - } - }, - { - "name": "integrationIdentifier", - "required": false, - "in": "query", - "description": "Optional integration identifier", + "in": "path", "schema": { "type": "string" } @@ -17453,10 +16989,50 @@ "type": "string" } } - ], + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MarkMessageActionAsSeenDto" + } + } + } + }, "responses": { - "200": { - "description": "" + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageResponseDto" + } + } + } }, "400": { "description": "Bad Request", @@ -17883,55 +17459,61 @@ ] } }, - "/v1/messages": { + "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback": { "get": { - "operationId": "MessagesController_getMessages", - "summary": "Get messages", - "description": "Returns a list of messages, could paginate using the `page` query parameter", + "operationId": "SubscribersController_chatOauthCallback", + "x-speakeasy-name-override": "chatAccessOauthCallBack", + "x-speakeasy-group": "Subscribers.Authentication", + "summary": "Handle providers oauth redirect", "parameters": [ { - "name": "channel", - "required": false, - "in": "query", + "name": "subscriberId", + "required": true, + "in": "path", "schema": { - "$ref": "#/components/schemas/ChannelTypeEnum" + "type": "string" } }, { - "name": "subscriberId", - "required": false, + "name": "providerId", + "required": true, + "in": "path", + "schema": {} + }, + { + "name": "hmacHash", + "required": true, "in": "query", + "description": "HMAC hash for the request", "schema": { "type": "string" } }, { - "name": "transactionId", - "required": false, + "name": "environmentId", + "required": true, "in": "query", + "description": "The ID of the environment, must be a valid MongoDB ID", "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } }, { - "name": "page", + "name": "integrationIdentifier", "required": false, "in": "query", + "description": "Optional integration identifier", "schema": { - "default": 0, - "type": "number" + "type": "string" } }, { - "name": "limit", - "required": false, + "name": "code", + "required": true, "in": "query", + "description": "Optional authorization code returned from the OAuth provider", "schema": { - "default": 10, - "type": "number" + "type": "string" } }, { @@ -17946,6 +17528,40 @@ ], "responses": { "200": { + "description": "Returns plain text response.", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + }, + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, + "302": { + "description": "Redirects to the specified URL.", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -17967,13 +17583,19 @@ }, "Idempotency-Replay": { "$ref": "#/components/headers/Idempotency-Replay" + }, + "Location": { + "description": "The URL to redirect to.", + "schema": { + "type": "string", + "example": "https://www.novu.co" + } } }, - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivitiesResponseDto" + "type": "string" } } } @@ -18394,7 +18016,7 @@ } }, "tags": [ - "Messages" + "Subscribers" ], "security": [ { @@ -18403,16 +18025,50 @@ ] } }, - "/v1/messages/{messageId}": { - "delete": { - "operationId": "MessagesController_deleteMessage", - "summary": "Delete message", - "description": "Deletes a message entity from the Novu platform", + "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth": { + "get": { + "operationId": "SubscribersController_chatAccessOauth", + "x-speakeasy-name-override": "chatAccessOauth", + "x-speakeasy-group": "Subscribers.Authentication", + "summary": "Handle chat oauth", "parameters": [ { - "name": "messageId", + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "providerId", "required": true, "in": "path", + "schema": {} + }, + { + "name": "hmacHash", + "required": true, + "in": "query", + "description": "HMAC hash for the request", + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "required": true, + "in": "query", + "description": "The ID of the environment, must be a valid MongoDB ID", + "schema": { + "type": "string" + } + }, + { + "name": "integrationIdentifier", + "required": false, + "in": "query", + "description": "Optional integration identifier", "schema": { "type": "string" } @@ -18429,37 +18085,7 @@ ], "responses": { "200": { - "description": "OK", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteMessageResponseDto" - } - } - } + "description": "" }, "400": { "description": "Bad Request", @@ -18877,7 +18503,7 @@ } }, "tags": [ - "Messages" + "Subscribers" ], "security": [ { @@ -18886,35 +18512,55 @@ ] } }, - "/v1/messages/transaction/{transactionId}": { - "delete": { - "operationId": "MessagesController_deleteMessagesByTransactionId", - "x-speakeasy-name-override": "deleteByTransactionId", - "summary": "Delete messages by transactionId", - "description": "Deletes messages entity from the Novu platform using TransactionId of message", + "/v1/messages": { + "get": { + "operationId": "MessagesController_getMessages", + "summary": "Get messages", + "description": "Returns a list of messages, could paginate using the `page` query parameter", "parameters": [ { "name": "channel", "required": false, "in": "query", - "description": "The channel of the message to be deleted", "schema": { - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ], - "type": "string" + "$ref": "#/components/schemas/ChannelTypeEnum" + } + }, + { + "name": "subscriberId", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "transactionId", + "required": false, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "default": 0, + "type": "number" } }, { - "name": "transactionId", - "required": true, - "in": "path", + "name": "limit", + "required": false, + "in": "query", "schema": { - "type": "string" + "default": 10, + "type": "number" } }, { @@ -18928,7 +18574,7 @@ } ], "responses": { - "204": { + "200": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -18952,7 +18598,14 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivitiesResponseDto" + } + } + } }, "400": { "description": "Bad Request", @@ -19379,12 +19032,20 @@ ] } }, - "/v1/topics": { - "post": { - "operationId": "TopicsController_createTopic", - "summary": "Topic creation", - "description": "Create a topic", + "/v1/messages/{messageId}": { + "delete": { + "operationId": "MessagesController_deleteMessage", + "summary": "Delete message", + "description": "Deletes a message entity from the Novu platform", "parameters": [ + { + "name": "messageId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, { "name": "idempotency-key", "in": "header", @@ -19395,19 +19056,9 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTopicRequestDto" - } - } - } - }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -19434,7 +19085,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTopicResponseDto" + "$ref": "#/components/schemas/DeleteMessageResponseDto" } } } @@ -19855,49 +19506,42 @@ } }, "tags": [ - "Topics" + "Messages" ], "security": [ { "api-key": [] } ] - }, - "get": { - "operationId": "TopicsController_listTopics", - "summary": "Get topic list filtered ", - "description": "Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter", + } + }, + "/v1/messages/transaction/{transactionId}": { + "delete": { + "operationId": "MessagesController_deleteMessagesByTransactionId", + "x-speakeasy-name-override": "deleteByTransactionId", + "summary": "Delete messages by transactionId", + "description": "Deletes messages entity from the Novu platform using TransactionId of message", "parameters": [ { - "name": "page", - "required": false, - "in": "query", - "example": 0, - "description": "The page number to retrieve (starts from 0)", - "schema": { - "format": "int64", - "default": 0, - "type": "integer" - } - }, - { - "name": "pageSize", + "name": "channel", "required": false, "in": "query", - "example": 10, - "description": "The number of items to return per page (default: 10)", + "description": "The channel of the message to be deleted", "schema": { - "format": "int64", - "default": 10, - "type": "integer" + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ], + "type": "string" } }, { - "name": "key", - "required": false, - "in": "query", - "example": "exampleKey", - "description": "A filter key to apply to the results", + "name": "transactionId", + "required": true, + "in": "path", "schema": { "type": "string" } @@ -19913,7 +19557,7 @@ } ], "responses": { - "200": { + "204": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -19937,14 +19581,7 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FilterTopicsResponseDto" - } - } - } + "description": "" }, "400": { "description": "Bad Request", @@ -20362,7 +19999,7 @@ } }, "tags": [ - "Topics" + "Messages" ], "security": [ { @@ -20371,23 +20008,12 @@ ] } }, - "/v1/topics/{topicKey}/subscribers": { + "/v1/topics": { "post": { - "operationId": "TopicsController_assign", - "x-speakeasy-name-override": "assign", - "x-speakeasy-group": "Topics.Subscribers", - "summary": "Subscribers addition", - "description": "Add subscribers to a topic by key", + "operationId": "TopicsController_createTopic", + "summary": "Topic creation", + "description": "Create a topic", "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "description": "The topic key", - "schema": { - "type": "string" - } - }, { "name": "idempotency-key", "in": "header", @@ -20403,13 +20029,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddSubscribersRequestDto" + "$ref": "#/components/schemas/CreateTopicRequestDto" } } } }, "responses": { - "200": { + "201": { + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -20433,11 +20060,10 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssignSubscriberToTopicDto" + "$ref": "#/components/schemas/CreateTopicResponseDto" } } } @@ -20865,29 +20491,42 @@ "api-key": [] } ] - } - }, - "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}": { + }, "get": { - "operationId": "TopicsController_getTopicSubscriber", - "x-speakeasy-group": "Topics.Subscribers", - "summary": "Check topic subscriber", - "description": "Check if a subscriber belongs to a certain topic", + "operationId": "TopicsController_listTopics", + "summary": "Get topic list filtered ", + "description": "Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter", "parameters": [ { - "name": "externalSubscriberId", - "required": true, - "in": "path", - "description": "The external subscriber id", + "name": "page", + "required": false, + "in": "query", + "example": 0, + "description": "The page number to retrieve (starts from 0)", "schema": { - "type": "string" + "format": "int64", + "default": 0, + "type": "integer" } }, { - "name": "topicKey", - "required": true, - "in": "path", - "description": "The topic key", + "name": "pageSize", + "required": false, + "in": "query", + "example": 10, + "description": "The number of items to return per page (default: 10)", + "schema": { + "format": "int64", + "default": 10, + "type": "integer" + } + }, + { + "name": "key", + "required": false, + "in": "query", + "example": "exampleKey", + "description": "A filter key to apply to the results", "schema": { "type": "string" } @@ -20931,7 +20570,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TopicSubscriberDto" + "$ref": "#/components/schemas/FilterTopicsResponseDto" } } } @@ -21361,13 +21000,13 @@ ] } }, - "/v1/topics/{topicKey}/subscribers/removal": { + "/v1/topics/{topicKey}/subscribers": { "post": { - "operationId": "TopicsController_removeSubscribers", - "x-speakeasy-name-override": "remove", + "operationId": "TopicsController_assign", + "x-speakeasy-name-override": "assign", "x-speakeasy-group": "Topics.Subscribers", - "summary": "Subscribers removal", - "description": "Remove subscribers from a topic", + "summary": "Subscribers addition", + "description": "Add subscribers to a topic by key", "parameters": [ { "name": "topicKey", @@ -21393,13 +21032,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RemoveSubscribersRequestDto" + "$ref": "#/components/schemas/AddSubscribersRequestDto" } } } }, "responses": { - "204": { + "200": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -21423,7 +21062,14 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignSubscriberToTopicDto" + } + } + } }, "400": { "description": "Bad Request", @@ -21850,12 +21496,22 @@ ] } }, - "/v1/topics/{topicKey}": { - "delete": { - "operationId": "TopicsController_deleteTopic", - "summary": "Delete topic", - "description": "Delete a topic by its topic key if it has no subscribers", + "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}": { + "get": { + "operationId": "TopicsController_getTopicSubscriber", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Check topic subscriber", + "description": "Check if a subscriber belongs to a certain topic", "parameters": [ + { + "name": "externalSubscriberId", + "required": true, + "in": "path", + "description": "The external subscriber id", + "schema": { + "type": "string" + } + }, { "name": "topicKey", "required": true, @@ -21876,8 +21532,7 @@ } ], "responses": { - "204": { - "description": "The topic has been deleted correctly", + "200": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -21900,6 +21555,14 @@ "Idempotency-Replay": { "$ref": "#/components/headers/Idempotency-Replay" } + }, + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopicSubscriberDto" + } + } } }, "400": { @@ -22325,11 +21988,15 @@ "api-key": [] } ] - }, - "get": { - "operationId": "TopicsController_getTopic", - "summary": "Get topic", - "description": "Get a topic by its topic key", + } + }, + "/v1/topics/{topicKey}/subscribers/removal": { + "post": { + "operationId": "TopicsController_removeSubscribers", + "x-speakeasy-name-override": "remove", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Subscribers removal", + "description": "Remove subscribers from a topic", "parameters": [ { "name": "topicKey", @@ -22350,9 +22017,18 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveSubscribersRequestDto" + } + } + } + }, "responses": { - "200": { - "description": "OK", + "204": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -22376,13 +22052,7 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTopicResponseDto" - } - } - } + "description": "" }, "400": { "description": "Bad Request", @@ -22807,12 +22477,13 @@ "api-key": [] } ] - }, - "patch": { - "operationId": "TopicsController_renameTopic", - "x-speakeasy-name-override": "rename", - "summary": "Rename a topic", - "description": "Rename a topic by providing a new name", + } + }, + "/v1/topics/{topicKey}": { + "delete": { + "operationId": "TopicsController_deleteTopic", + "summary": "Delete topic", + "description": "Delete a topic by its topic key if it has no subscribers", "parameters": [ { "name": "topicKey", @@ -22833,19 +22504,9 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RenameTopicRequestDto" - } - } - } - }, "responses": { - "200": { - "description": "OK", + "204": { + "description": "The topic has been deleted correctly", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -22868,13 +22529,6 @@ "Idempotency-Replay": { "$ref": "#/components/headers/Idempotency-Replay" } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RenameTopicResponseDto" - } - } } }, "400": { @@ -23300,13 +22954,21 @@ "api-key": [] } ] - } - }, - "/v1/testing/idempotency": { - "post": { - "operationId": "TestingController_idempotency", - "x-speakeasy-name-override": "idempotencyPost", + }, + "get": { + "operationId": "TopicsController_getTopic", + "summary": "Get topic", + "description": "Get a topic by its topic key", "parameters": [ + { + "name": "topicKey", + "required": true, + "in": "path", + "description": "The topic key", + "schema": { + "type": "string" + } + }, { "name": "idempotency-key", "in": "header", @@ -23317,18 +22979,9 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IdempotencyBodyDto" - } - } - } - }, "responses": { - "201": { + "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -23352,11 +23005,10 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IdempotencyResponse" + "$ref": "#/components/schemas/GetTopicResponseDto" } } } @@ -23777,7 +23429,7 @@ } }, "tags": [ - "Admin" + "Topics" ], "security": [ { @@ -23785,10 +23437,21 @@ } ] }, - "get": { - "operationId": "TestingController_idempotencyGet", - "x-speakeasy-name-override": "idempotencyGet", + "patch": { + "operationId": "TopicsController_renameTopic", + "x-speakeasy-name-override": "rename", + "summary": "Rename a topic", + "description": "Rename a topic by providing a new name", "parameters": [ + { + "name": "topicKey", + "required": true, + "in": "path", + "description": "The topic key", + "schema": { + "type": "string" + } + }, { "name": "idempotency-key", "in": "header", @@ -23799,8 +23462,19 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RenameTopicRequestDto" + } + } + } + }, "responses": { "200": { + "description": "OK", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -23824,11 +23498,10 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IdempotencyResponse" + "$ref": "#/components/schemas/RenameTopicResponseDto" } } } @@ -24249,107 +23922,8 @@ } }, "tags": [ - "Admin" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/rate-limiting-trigger-bulk/no-category-no-cost-override": { - "get": { - "operationId": "TestApiRateLimitBulkController_noCategoryNoCostOverride", - "parameters": [ - { - "name": "idempotency-key", - "in": "header", - "description": "A header for idempotency purposes", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - } - }, - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/rate-limiting-trigger-bulk/no-category-single-cost-override": { - "get": { - "operationId": "TestApiRateLimitBulkController_noCategorySingleCostOverride", - "parameters": [ - { - "name": "idempotency-key", - "in": "header", - "description": "A header for idempotency purposes", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - } - }, - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/rate-limiting-trigger-bulk/global-category-no-cost-override": { - "get": { - "operationId": "TestApiRateLimitBulkController_globalCategoryNoCostOverride", - "parameters": [ - { - "name": "idempotency-key", - "in": "header", - "description": "A header for idempotency purposes", - "required": false, - "schema": { - "type": "string" - } - } + "Topics" ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - } - }, "security": [ { "api-key": [] @@ -24695,6 +24269,26 @@ "errors" ] }, + "IdempotencyBehaviorEnum": { + "type": "string", + "description": "The expected behavior of the idempotency request", + "enum": [ + "IMMEDIATE_RESPONSE", + "IMMEDIATE_EXCEPTION", + "DELAYED_RESPONSE" + ] + }, + "IdempotencyTestingDto": { + "type": "object", + "properties": { + "expectedBehavior": { + "$ref": "#/components/schemas/IdempotencyBehaviorEnum" + } + }, + "required": [ + "expectedBehavior" + ] + }, "TriggerEventResponseDto": { "type": "object", "properties": { @@ -28605,29 +28199,6 @@ "GeneratePreviewResponseDto": { "type": "object", "properties": {} - }, - "IdempotencyBodyDto": { - "type": "object", - "properties": { - "data": { - "type": "number" - } - }, - "required": [ - "data" - ] - }, - "IdempotencyResponse": { - "type": "object", - "properties": { - "number": { - "type": "number", - "description": "A unique identifier for the idempotency response" - } - }, - "required": [ - "number" - ] } }, "headers": { diff --git a/src/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.ts b/src/funcs/adminHealthControllerHealthCheck.ts similarity index 76% rename from src/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.ts rename to src/funcs/adminHealthControllerHealthCheck.ts index 4d1c96cf..3af4f81d 100644 --- a/src/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.ts +++ b/src/funcs/adminHealthControllerHealthCheck.ts @@ -2,7 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -18,18 +17,20 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -export async function testApiRateLimitBulkControllerNoCategorySingleCostOverride( +export async function adminHealthControllerHealthCheck( client: NovuCore, idempotencyKey?: string | undefined, options?: RequestOptions, ): Promise< Result< - boolean, + operations.HealthControllerHealthCheckResponseBody, + | errors.HealthControllerHealthCheckResponseBody | SDKError | SDKValidationError | UnexpectedClientError @@ -39,18 +40,14 @@ export async function testApiRateLimitBulkControllerNoCategorySingleCostOverride | ConnectionError > > { - const input: - operations.TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest = - { - idempotencyKey: idempotencyKey, - }; + const input: operations.HealthControllerHealthCheckRequest = { + idempotencyKey: idempotencyKey, + }; const parsed = safeParse( input, (value) => - operations - .TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$outboundSchema - .parse(value), + operations.HealthControllerHealthCheckRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { @@ -59,9 +56,7 @@ export async function testApiRateLimitBulkControllerNoCategorySingleCostOverride const payload = parsed.value; const body = null; - const path = pathToFunc( - "/v1/rate-limiting-trigger-bulk/no-category-single-cost-override", - )(); + const path = pathToFunc("/v1/health-check")(); const headers = new Headers(compactMap({ Accept: "application/json", @@ -77,7 +72,7 @@ export async function testApiRateLimitBulkControllerNoCategorySingleCostOverride const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "TestApiRateLimitBulkController_noCategorySingleCostOverride", + operationID: "HealthController_healthCheck", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -115,7 +110,7 @@ export async function testApiRateLimitBulkControllerNoCategorySingleCostOverride const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + errorCodes: ["4XX", "503", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -124,8 +119,13 @@ export async function testApiRateLimitBulkControllerNoCategorySingleCostOverride } const response = doResult.value; + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + const [result] = await M.match< - boolean, + operations.HealthControllerHealthCheckResponseBody, + | errors.HealthControllerHealthCheckResponseBody | SDKError | SDKValidationError | UnexpectedClientError @@ -134,10 +134,17 @@ export async function testApiRateLimitBulkControllerNoCategorySingleCostOverride | RequestTimeoutError | ConnectionError >( - M.json(200, z.boolean()), + M.json( + 200, + operations.HealthControllerHealthCheckResponseBody$inboundSchema, + ), + M.jsonErr( + 503, + errors.HealthControllerHealthCheckResponseBody$inboundSchema, + ), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, { extraFields: responseFields }); if (!result.ok) { return result; } diff --git a/src/funcs/adminIdempotencyGet.ts b/src/funcs/adminIdempotencyGet.ts deleted file mode 100644 index 19397115..00000000 --- a/src/funcs/adminIdempotencyGet.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKError } from "../models/errors/sdkerror.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -export async function adminIdempotencyGet( - client: NovuCore, - idempotencyKey?: string | undefined, - options?: RequestOptions, -): Promise< - Result< - operations.TestingControllerIdempotencyGetResponse, - | errors.ErrorDto - | errors.ErrorDto - | errors.ValidationErrorDto - | errors.ErrorDto - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input: operations.TestingControllerIdempotencyGetRequest = { - idempotencyKey: idempotencyKey, - }; - - const parsed = safeParse( - input, - (value) => - operations.TestingControllerIdempotencyGetRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/testing/idempotency")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - "idempotency-key": encodeSimple( - "idempotency-key", - payload["idempotency-key"], - { explode: false, charEncoding: "none" }, - ), - })); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "TestingController_idempotencyGet", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 1000, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - operations.TestingControllerIdempotencyGetResponse, - | errors.ErrorDto - | errors.ErrorDto - | errors.ValidationErrorDto - | errors.ErrorDto - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - operations.TestingControllerIdempotencyGetResponse$inboundSchema, - { hdrs: true, key: "Result" }, - ), - M.jsonErr( - [400, 401, 403, 404, 405, 409, 413, 415], - errors.ErrorDto$inboundSchema, - { hdrs: true }, - ), - M.jsonErr(414, errors.ErrorDto$inboundSchema), - M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }), - M.fail(429), - M.jsonErr(500, errors.ErrorDto$inboundSchema, { hdrs: true }), - M.fail(503), - M.fail("4XX"), - M.fail("5XX"), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/adminIdempotencyPost.ts b/src/funcs/adminTestIdempotency.ts similarity index 85% rename from src/funcs/adminIdempotencyPost.ts rename to src/funcs/adminTestIdempotency.ts index 405fcbe7..031e118d 100644 --- a/src/funcs/adminIdempotencyPost.ts +++ b/src/funcs/adminTestIdempotency.ts @@ -24,14 +24,14 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -export async function adminIdempotencyPost( +export async function adminTestIdempotency( client: NovuCore, - idempotencyBodyDto: components.IdempotencyBodyDto, + idempotencyTestingDto: components.IdempotencyTestingDto, idempotencyKey?: string | undefined, options?: RequestOptions, ): Promise< Result< - operations.TestingControllerIdempotencyResponse, + operations.HealthControllerTestIdempotencyResponse | undefined, | errors.ErrorDto | errors.ErrorDto | errors.ValidationErrorDto @@ -45,15 +45,15 @@ export async function adminIdempotencyPost( | ConnectionError > > { - const input: operations.TestingControllerIdempotencyRequest = { - idempotencyBodyDto: idempotencyBodyDto, + const input: operations.HealthControllerTestIdempotencyRequest = { + idempotencyTestingDto: idempotencyTestingDto, idempotencyKey: idempotencyKey, }; const parsed = safeParse( input, (value) => - operations.TestingControllerIdempotencyRequest$outboundSchema.parse( + operations.HealthControllerTestIdempotencyRequest$outboundSchema.parse( value, ), "Input validation failed", @@ -62,11 +62,11 @@ export async function adminIdempotencyPost( return parsed; } const payload = parsed.value; - const body = encodeJSON("body", payload.IdempotencyBodyDto, { + const body = encodeJSON("body", payload.IdempotencyTestingDto, { explode: true, }); - const path = pathToFunc("/v1/testing/idempotency")(); + const path = pathToFunc("/v1/health-check/test-idempotency")(); const headers = new Headers(compactMap({ "Content-Type": "application/json", @@ -83,7 +83,7 @@ export async function adminIdempotencyPost( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "TestingController_idempotency", + operationID: "HealthController_testIdempotency", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -151,7 +151,7 @@ export async function adminIdempotencyPost( }; const [result] = await M.match< - operations.TestingControllerIdempotencyResponse, + operations.HealthControllerTestIdempotencyResponse | undefined, | errors.ErrorDto | errors.ErrorDto | errors.ValidationErrorDto @@ -164,10 +164,6 @@ export async function adminIdempotencyPost( | RequestTimeoutError | ConnectionError >( - M.json(201, operations.TestingControllerIdempotencyResponse$inboundSchema, { - hdrs: true, - key: "Result", - }), M.jsonErr( [400, 401, 403, 404, 405, 409, 413, 415], errors.ErrorDto$inboundSchema, @@ -178,6 +174,11 @@ export async function adminIdempotencyPost( M.fail(429), M.jsonErr(500, errors.ErrorDto$inboundSchema, { hdrs: true }), M.fail(503), + M.nil( + "2XX", + operations.HealthControllerTestIdempotencyResponse$inboundSchema + .optional(), + ), M.fail("4XX"), M.fail("5XX"), )(response, { extraFields: responseFields }); diff --git a/src/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.ts b/src/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.ts deleted file mode 100644 index 0f741e54..00000000 --- a/src/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { NovuCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import { SDKError } from "../models/errors/sdkerror.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -export async function testApiRateLimitBulkControllerGlobalCategoryNoCostOverride( - client: NovuCore, - idempotencyKey?: string | undefined, - options?: RequestOptions, -): Promise< - Result< - boolean, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input: - operations.TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest = - { - idempotencyKey: idempotencyKey, - }; - - const parsed = safeParse( - input, - (value) => - operations - .TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc( - "/v1/rate-limiting-trigger-bulk/global-category-no-cost-override", - )(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - "idempotency-key": encodeSimple( - "idempotency-key", - payload["idempotency-key"], - { explode: false, charEncoding: "none" }, - ), - })); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "TestApiRateLimitBulkController_globalCategoryNoCostOverride", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 1000, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result] = await M.match< - boolean, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, z.boolean()), - M.fail("4XX"), - M.fail("5XX"), - )(response); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.ts b/src/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.ts deleted file mode 100644 index 037a0797..00000000 --- a/src/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.ts +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { NovuCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import { SDKError } from "../models/errors/sdkerror.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -export async function testApiRateLimitBulkControllerNoCategoryNoCostOverride( - client: NovuCore, - idempotencyKey?: string | undefined, - options?: RequestOptions, -): Promise< - Result< - boolean, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input: - operations.TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest = { - idempotencyKey: idempotencyKey, - }; - - const parsed = safeParse( - input, - (value) => - operations - .TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc( - "/v1/rate-limiting-trigger-bulk/no-category-no-cost-override", - )(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - "idempotency-key": encodeSimple( - "idempotency-key", - payload["idempotency-key"], - { explode: false, charEncoding: "none" }, - ), - })); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "TestApiRateLimitBulkController_noCategoryNoCostOverride", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 1000, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - } - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result] = await M.match< - boolean, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, z.boolean()), - M.fail("4XX"), - M.fail("5XX"), - )(response); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/lib/config.ts b/src/lib/config.ts index 9dcb852e..982e53ff 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.198", - genVersion: "2.493.19", - userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.198 2.493.19 1.0 @novu/api", + sdkVersion: "0.0.1-alpha.196", + genVersion: "2.493.21", + userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.196 2.493.21 1.0 @novu/api", } as const; diff --git a/src/models/components/idempotencybehaviorenum.ts b/src/models/components/idempotencybehaviorenum.ts new file mode 100644 index 00000000..9373d988 --- /dev/null +++ b/src/models/components/idempotencybehaviorenum.ts @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The expected behavior of the idempotency request + */ +export const IdempotencyBehaviorEnum = { + ImmediateResponse: "IMMEDIATE_RESPONSE", + ImmediateException: "IMMEDIATE_EXCEPTION", + DelayedResponse: "DELAYED_RESPONSE", +} as const; +/** + * The expected behavior of the idempotency request + */ +export type IdempotencyBehaviorEnum = ClosedEnum< + typeof IdempotencyBehaviorEnum +>; + +/** @internal */ +export const IdempotencyBehaviorEnum$inboundSchema: z.ZodNativeEnum< + typeof IdempotencyBehaviorEnum +> = z.nativeEnum(IdempotencyBehaviorEnum); + +/** @internal */ +export const IdempotencyBehaviorEnum$outboundSchema: z.ZodNativeEnum< + typeof IdempotencyBehaviorEnum +> = IdempotencyBehaviorEnum$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IdempotencyBehaviorEnum$ { + /** @deprecated use `IdempotencyBehaviorEnum$inboundSchema` instead. */ + export const inboundSchema = IdempotencyBehaviorEnum$inboundSchema; + /** @deprecated use `IdempotencyBehaviorEnum$outboundSchema` instead. */ + export const outboundSchema = IdempotencyBehaviorEnum$outboundSchema; +} diff --git a/src/models/components/idempotencybodydto.ts b/src/models/components/idempotencybodydto.ts deleted file mode 100644 index fd964d60..00000000 --- a/src/models/components/idempotencybodydto.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type IdempotencyBodyDto = { - data: number; -}; - -/** @internal */ -export const IdempotencyBodyDto$inboundSchema: z.ZodType< - IdempotencyBodyDto, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.number(), -}); - -/** @internal */ -export type IdempotencyBodyDto$Outbound = { - data: number; -}; - -/** @internal */ -export const IdempotencyBodyDto$outboundSchema: z.ZodType< - IdempotencyBodyDto$Outbound, - z.ZodTypeDef, - IdempotencyBodyDto -> = z.object({ - data: z.number(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IdempotencyBodyDto$ { - /** @deprecated use `IdempotencyBodyDto$inboundSchema` instead. */ - export const inboundSchema = IdempotencyBodyDto$inboundSchema; - /** @deprecated use `IdempotencyBodyDto$outboundSchema` instead. */ - export const outboundSchema = IdempotencyBodyDto$outboundSchema; - /** @deprecated use `IdempotencyBodyDto$Outbound` instead. */ - export type Outbound = IdempotencyBodyDto$Outbound; -} - -export function idempotencyBodyDtoToJSON( - idempotencyBodyDto: IdempotencyBodyDto, -): string { - return JSON.stringify( - IdempotencyBodyDto$outboundSchema.parse(idempotencyBodyDto), - ); -} - -export function idempotencyBodyDtoFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => IdempotencyBodyDto$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'IdempotencyBodyDto' from JSON`, - ); -} diff --git a/src/models/components/idempotencyresponse.ts b/src/models/components/idempotencyresponse.ts deleted file mode 100644 index a8680630..00000000 --- a/src/models/components/idempotencyresponse.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type IdempotencyResponse = { - /** - * A unique identifier for the idempotency response - */ - number: number; -}; - -/** @internal */ -export const IdempotencyResponse$inboundSchema: z.ZodType< - IdempotencyResponse, - z.ZodTypeDef, - unknown -> = z.object({ - number: z.number(), -}); - -/** @internal */ -export type IdempotencyResponse$Outbound = { - number: number; -}; - -/** @internal */ -export const IdempotencyResponse$outboundSchema: z.ZodType< - IdempotencyResponse$Outbound, - z.ZodTypeDef, - IdempotencyResponse -> = z.object({ - number: z.number(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IdempotencyResponse$ { - /** @deprecated use `IdempotencyResponse$inboundSchema` instead. */ - export const inboundSchema = IdempotencyResponse$inboundSchema; - /** @deprecated use `IdempotencyResponse$outboundSchema` instead. */ - export const outboundSchema = IdempotencyResponse$outboundSchema; - /** @deprecated use `IdempotencyResponse$Outbound` instead. */ - export type Outbound = IdempotencyResponse$Outbound; -} - -export function idempotencyResponseToJSON( - idempotencyResponse: IdempotencyResponse, -): string { - return JSON.stringify( - IdempotencyResponse$outboundSchema.parse(idempotencyResponse), - ); -} - -export function idempotencyResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => IdempotencyResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'IdempotencyResponse' from JSON`, - ); -} diff --git a/src/models/components/idempotencytestingdto.ts b/src/models/components/idempotencytestingdto.ts new file mode 100644 index 00000000..f3d3945c --- /dev/null +++ b/src/models/components/idempotencytestingdto.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + IdempotencyBehaviorEnum, + IdempotencyBehaviorEnum$inboundSchema, + IdempotencyBehaviorEnum$outboundSchema, +} from "./idempotencybehaviorenum.js"; + +export type IdempotencyTestingDto = { + /** + * The expected behavior of the idempotency request + */ + expectedBehavior: IdempotencyBehaviorEnum; +}; + +/** @internal */ +export const IdempotencyTestingDto$inboundSchema: z.ZodType< + IdempotencyTestingDto, + z.ZodTypeDef, + unknown +> = z.object({ + expectedBehavior: IdempotencyBehaviorEnum$inboundSchema, +}); + +/** @internal */ +export type IdempotencyTestingDto$Outbound = { + expectedBehavior: string; +}; + +/** @internal */ +export const IdempotencyTestingDto$outboundSchema: z.ZodType< + IdempotencyTestingDto$Outbound, + z.ZodTypeDef, + IdempotencyTestingDto +> = z.object({ + expectedBehavior: IdempotencyBehaviorEnum$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IdempotencyTestingDto$ { + /** @deprecated use `IdempotencyTestingDto$inboundSchema` instead. */ + export const inboundSchema = IdempotencyTestingDto$inboundSchema; + /** @deprecated use `IdempotencyTestingDto$outboundSchema` instead. */ + export const outboundSchema = IdempotencyTestingDto$outboundSchema; + /** @deprecated use `IdempotencyTestingDto$Outbound` instead. */ + export type Outbound = IdempotencyTestingDto$Outbound; +} + +export function idempotencyTestingDtoToJSON( + idempotencyTestingDto: IdempotencyTestingDto, +): string { + return JSON.stringify( + IdempotencyTestingDto$outboundSchema.parse(idempotencyTestingDto), + ); +} + +export function idempotencyTestingDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IdempotencyTestingDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IdempotencyTestingDto' from JSON`, + ); +} diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 7d96ae88..293024b2 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -55,8 +55,8 @@ export * from "./fieldfilterpartdto.js"; export * from "./filtertopicsresponsedto.js"; export * from "./getsubscriberpreferencesresponsedto.js"; export * from "./gettopicresponsedto.js"; -export * from "./idempotencybodydto.js"; -export * from "./idempotencyresponse.js"; +export * from "./idempotencybehaviorenum.js"; +export * from "./idempotencytestingdto.js"; export * from "./integrationresponsedto.js"; export * from "./markallmessageasrequestdto.js"; export * from "./markmessageactionasseendto.js"; diff --git a/src/models/errors/healthcontrollerhealthcheck.ts b/src/models/errors/healthcontrollerhealthcheck.ts new file mode 100644 index 00000000..3ec9da54 --- /dev/null +++ b/src/models/errors/healthcontrollerhealthcheck.ts @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { + collectExtraKeys as collectExtraKeys$, + safeParse, +} from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; + +export type Info = { + status: string; + additionalProperties: { [k: string]: any }; +}; + +export type ErrorT = { + status: string; + additionalProperties: { [k: string]: any }; +}; + +export type Details = { + status: string; + additionalProperties: { [k: string]: any }; +}; + +/** + * The Health Check is not successful + */ +export type HealthControllerHealthCheckResponseBodyData = { + status?: string | undefined; + info?: { [k: string]: Info } | null | undefined; + error?: { [k: string]: ErrorT } | null | undefined; + details?: { [k: string]: Details } | undefined; +}; + +/** + * The Health Check is not successful + */ +export class HealthControllerHealthCheckResponseBody extends Error { + status?: string | undefined; + info?: { [k: string]: Info } | null | undefined; + error?: { [k: string]: ErrorT } | null | undefined; + details?: { [k: string]: Details } | undefined; + + /** The original data that was passed to this error instance. */ + data$: HealthControllerHealthCheckResponseBodyData; + + constructor(err: HealthControllerHealthCheckResponseBodyData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + if (err.status != null) this.status = err.status; + if (err.info != null) this.info = err.info; + if (err.error != null) this.error = err.error; + if (err.details != null) this.details = err.details; + + this.name = "HealthControllerHealthCheckResponseBody"; + } +} + +/** @internal */ +export const Info$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string(), + }).catchall(z.any()), + "additionalProperties", + ); + +/** @internal */ +export type Info$Outbound = { + status: string; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const Info$outboundSchema: z.ZodType = + z.object({ + status: z.string(), + additionalProperties: z.record(z.any()), + }).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Info$ { + /** @deprecated use `Info$inboundSchema` instead. */ + export const inboundSchema = Info$inboundSchema; + /** @deprecated use `Info$outboundSchema` instead. */ + export const outboundSchema = Info$outboundSchema; + /** @deprecated use `Info$Outbound` instead. */ + export type Outbound = Info$Outbound; +} + +export function infoToJSON(info: Info): string { + return JSON.stringify(Info$outboundSchema.parse(info)); +} + +export function infoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Info$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Info' from JSON`, + ); +} + +/** @internal */ +export const ErrorT$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string(), + }).catchall(z.any()), + "additionalProperties", + ); + +/** @internal */ +export type ErrorT$Outbound = { + status: string; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const ErrorT$outboundSchema: z.ZodType< + ErrorT$Outbound, + z.ZodTypeDef, + ErrorT +> = z.object({ + status: z.string(), + additionalProperties: z.record(z.any()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ErrorT$ { + /** @deprecated use `ErrorT$inboundSchema` instead. */ + export const inboundSchema = ErrorT$inboundSchema; + /** @deprecated use `ErrorT$outboundSchema` instead. */ + export const outboundSchema = ErrorT$outboundSchema; + /** @deprecated use `ErrorT$Outbound` instead. */ + export type Outbound = ErrorT$Outbound; +} + +export function errorToJSON(errorT: ErrorT): string { + return JSON.stringify(ErrorT$outboundSchema.parse(errorT)); +} + +export function errorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ErrorT$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ErrorT' from JSON`, + ); +} + +/** @internal */ +export const Details$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string(), + }).catchall(z.any()), + "additionalProperties", + ); + +/** @internal */ +export type Details$Outbound = { + status: string; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const Details$outboundSchema: z.ZodType< + Details$Outbound, + z.ZodTypeDef, + Details +> = z.object({ + status: z.string(), + additionalProperties: z.record(z.any()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Details$ { + /** @deprecated use `Details$inboundSchema` instead. */ + export const inboundSchema = Details$inboundSchema; + /** @deprecated use `Details$outboundSchema` instead. */ + export const outboundSchema = Details$outboundSchema; + /** @deprecated use `Details$Outbound` instead. */ + export type Outbound = Details$Outbound; +} + +export function detailsToJSON(details: Details): string { + return JSON.stringify(Details$outboundSchema.parse(details)); +} + +export function detailsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Details$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Details' from JSON`, + ); +} + +/** @internal */ +export const HealthControllerHealthCheckResponseBody$inboundSchema: z.ZodType< + HealthControllerHealthCheckResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => Info$inboundSchema))).optional(), + error: z.nullable(z.record(z.lazy(() => ErrorT$inboundSchema))).optional(), + details: z.record(z.lazy(() => Details$inboundSchema)).optional(), +}) + .transform((v) => { + return new HealthControllerHealthCheckResponseBody(v); + }); + +/** @internal */ +export type HealthControllerHealthCheckResponseBody$Outbound = { + status?: string | undefined; + info?: { [k: string]: Info$Outbound } | null | undefined; + error?: { [k: string]: ErrorT$Outbound } | null | undefined; + details?: { [k: string]: Details$Outbound } | undefined; +}; + +/** @internal */ +export const HealthControllerHealthCheckResponseBody$outboundSchema: z.ZodType< + HealthControllerHealthCheckResponseBody$Outbound, + z.ZodTypeDef, + HealthControllerHealthCheckResponseBody +> = z.instanceof(HealthControllerHealthCheckResponseBody) + .transform(v => v.data$) + .pipe(z.object({ + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => Info$outboundSchema))).optional(), + error: z.nullable(z.record(z.lazy(() => ErrorT$outboundSchema))).optional(), + details: z.record(z.lazy(() => Details$outboundSchema)).optional(), + })); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HealthControllerHealthCheckResponseBody$ { + /** @deprecated use `HealthControllerHealthCheckResponseBody$inboundSchema` instead. */ + export const inboundSchema = + HealthControllerHealthCheckResponseBody$inboundSchema; + /** @deprecated use `HealthControllerHealthCheckResponseBody$outboundSchema` instead. */ + export const outboundSchema = + HealthControllerHealthCheckResponseBody$outboundSchema; + /** @deprecated use `HealthControllerHealthCheckResponseBody$Outbound` instead. */ + export type Outbound = HealthControllerHealthCheckResponseBody$Outbound; +} diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index 465171e1..aca45b4f 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -3,6 +3,7 @@ */ export * from "./errordto.js"; +export * from "./healthcontrollerhealthcheck.js"; export * from "./httpclienterrors.js"; export * from "./sdkerror.js"; export * from "./sdkvalidationerror.js"; diff --git a/src/models/operations/healthcontrollerhealthcheck.ts b/src/models/operations/healthcontrollerhealthcheck.ts new file mode 100644 index 00000000..f5b2daf3 --- /dev/null +++ b/src/models/operations/healthcontrollerhealthcheck.ts @@ -0,0 +1,358 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { + collectExtraKeys as collectExtraKeys$, + safeParse, +} from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type HealthControllerHealthCheckRequest = { + /** + * A header for idempotency purposes + */ + idempotencyKey?: string | undefined; +}; + +export type Info = { + status: string; + additionalProperties: { [k: string]: any }; +}; + +export type ErrorT = { + status: string; + additionalProperties: { [k: string]: any }; +}; + +export type Details = { + status: string; + additionalProperties: { [k: string]: any }; +}; + +/** + * The Health Check is successful + */ +export type HealthControllerHealthCheckResponseBody = { + status?: string | undefined; + info?: { [k: string]: Info } | null | undefined; + error?: { [k: string]: ErrorT } | null | undefined; + details?: { [k: string]: Details } | undefined; +}; + +/** @internal */ +export const HealthControllerHealthCheckRequest$inboundSchema: z.ZodType< + HealthControllerHealthCheckRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "idempotency-key": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "idempotency-key": "idempotencyKey", + }); +}); + +/** @internal */ +export type HealthControllerHealthCheckRequest$Outbound = { + "idempotency-key"?: string | undefined; +}; + +/** @internal */ +export const HealthControllerHealthCheckRequest$outboundSchema: z.ZodType< + HealthControllerHealthCheckRequest$Outbound, + z.ZodTypeDef, + HealthControllerHealthCheckRequest +> = z.object({ + idempotencyKey: z.string().optional(), +}).transform((v) => { + return remap$(v, { + idempotencyKey: "idempotency-key", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HealthControllerHealthCheckRequest$ { + /** @deprecated use `HealthControllerHealthCheckRequest$inboundSchema` instead. */ + export const inboundSchema = HealthControllerHealthCheckRequest$inboundSchema; + /** @deprecated use `HealthControllerHealthCheckRequest$outboundSchema` instead. */ + export const outboundSchema = + HealthControllerHealthCheckRequest$outboundSchema; + /** @deprecated use `HealthControllerHealthCheckRequest$Outbound` instead. */ + export type Outbound = HealthControllerHealthCheckRequest$Outbound; +} + +export function healthControllerHealthCheckRequestToJSON( + healthControllerHealthCheckRequest: HealthControllerHealthCheckRequest, +): string { + return JSON.stringify( + HealthControllerHealthCheckRequest$outboundSchema.parse( + healthControllerHealthCheckRequest, + ), + ); +} + +export function healthControllerHealthCheckRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + HealthControllerHealthCheckRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'HealthControllerHealthCheckRequest' from JSON`, + ); +} + +/** @internal */ +export const Info$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string(), + }).catchall(z.any()), + "additionalProperties", + ); + +/** @internal */ +export type Info$Outbound = { + status: string; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const Info$outboundSchema: z.ZodType = + z.object({ + status: z.string(), + additionalProperties: z.record(z.any()), + }).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Info$ { + /** @deprecated use `Info$inboundSchema` instead. */ + export const inboundSchema = Info$inboundSchema; + /** @deprecated use `Info$outboundSchema` instead. */ + export const outboundSchema = Info$outboundSchema; + /** @deprecated use `Info$Outbound` instead. */ + export type Outbound = Info$Outbound; +} + +export function infoToJSON(info: Info): string { + return JSON.stringify(Info$outboundSchema.parse(info)); +} + +export function infoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Info$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Info' from JSON`, + ); +} + +/** @internal */ +export const ErrorT$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string(), + }).catchall(z.any()), + "additionalProperties", + ); + +/** @internal */ +export type ErrorT$Outbound = { + status: string; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const ErrorT$outboundSchema: z.ZodType< + ErrorT$Outbound, + z.ZodTypeDef, + ErrorT +> = z.object({ + status: z.string(), + additionalProperties: z.record(z.any()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ErrorT$ { + /** @deprecated use `ErrorT$inboundSchema` instead. */ + export const inboundSchema = ErrorT$inboundSchema; + /** @deprecated use `ErrorT$outboundSchema` instead. */ + export const outboundSchema = ErrorT$outboundSchema; + /** @deprecated use `ErrorT$Outbound` instead. */ + export type Outbound = ErrorT$Outbound; +} + +export function errorToJSON(errorT: ErrorT): string { + return JSON.stringify(ErrorT$outboundSchema.parse(errorT)); +} + +export function errorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ErrorT$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ErrorT' from JSON`, + ); +} + +/** @internal */ +export const Details$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string(), + }).catchall(z.any()), + "additionalProperties", + ); + +/** @internal */ +export type Details$Outbound = { + status: string; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const Details$outboundSchema: z.ZodType< + Details$Outbound, + z.ZodTypeDef, + Details +> = z.object({ + status: z.string(), + additionalProperties: z.record(z.any()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Details$ { + /** @deprecated use `Details$inboundSchema` instead. */ + export const inboundSchema = Details$inboundSchema; + /** @deprecated use `Details$outboundSchema` instead. */ + export const outboundSchema = Details$outboundSchema; + /** @deprecated use `Details$Outbound` instead. */ + export type Outbound = Details$Outbound; +} + +export function detailsToJSON(details: Details): string { + return JSON.stringify(Details$outboundSchema.parse(details)); +} + +export function detailsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Details$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Details' from JSON`, + ); +} + +/** @internal */ +export const HealthControllerHealthCheckResponseBody$inboundSchema: z.ZodType< + HealthControllerHealthCheckResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => Info$inboundSchema))).optional(), + error: z.nullable(z.record(z.lazy(() => ErrorT$inboundSchema))).optional(), + details: z.record(z.lazy(() => Details$inboundSchema)).optional(), +}); + +/** @internal */ +export type HealthControllerHealthCheckResponseBody$Outbound = { + status?: string | undefined; + info?: { [k: string]: Info$Outbound } | null | undefined; + error?: { [k: string]: ErrorT$Outbound } | null | undefined; + details?: { [k: string]: Details$Outbound } | undefined; +}; + +/** @internal */ +export const HealthControllerHealthCheckResponseBody$outboundSchema: z.ZodType< + HealthControllerHealthCheckResponseBody$Outbound, + z.ZodTypeDef, + HealthControllerHealthCheckResponseBody +> = z.object({ + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => Info$outboundSchema))).optional(), + error: z.nullable(z.record(z.lazy(() => ErrorT$outboundSchema))).optional(), + details: z.record(z.lazy(() => Details$outboundSchema)).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HealthControllerHealthCheckResponseBody$ { + /** @deprecated use `HealthControllerHealthCheckResponseBody$inboundSchema` instead. */ + export const inboundSchema = + HealthControllerHealthCheckResponseBody$inboundSchema; + /** @deprecated use `HealthControllerHealthCheckResponseBody$outboundSchema` instead. */ + export const outboundSchema = + HealthControllerHealthCheckResponseBody$outboundSchema; + /** @deprecated use `HealthControllerHealthCheckResponseBody$Outbound` instead. */ + export type Outbound = HealthControllerHealthCheckResponseBody$Outbound; +} + +export function healthControllerHealthCheckResponseBodyToJSON( + healthControllerHealthCheckResponseBody: + HealthControllerHealthCheckResponseBody, +): string { + return JSON.stringify( + HealthControllerHealthCheckResponseBody$outboundSchema.parse( + healthControllerHealthCheckResponseBody, + ), + ); +} + +export function healthControllerHealthCheckResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + HealthControllerHealthCheckResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + HealthControllerHealthCheckResponseBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'HealthControllerHealthCheckResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/healthcontrollertestidempotency.ts b/src/models/operations/healthcontrollertestidempotency.ts new file mode 100644 index 00000000..5df06183 --- /dev/null +++ b/src/models/operations/healthcontrollertestidempotency.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type HealthControllerTestIdempotencyRequest = { + /** + * A header for idempotency purposes + */ + idempotencyKey?: string | undefined; + idempotencyTestingDto: components.IdempotencyTestingDto; +}; + +export type HealthControllerTestIdempotencyResponse = { + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const HealthControllerTestIdempotencyRequest$inboundSchema: z.ZodType< + HealthControllerTestIdempotencyRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "idempotency-key": z.string().optional(), + IdempotencyTestingDto: components.IdempotencyTestingDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "idempotency-key": "idempotencyKey", + "IdempotencyTestingDto": "idempotencyTestingDto", + }); +}); + +/** @internal */ +export type HealthControllerTestIdempotencyRequest$Outbound = { + "idempotency-key"?: string | undefined; + IdempotencyTestingDto: components.IdempotencyTestingDto$Outbound; +}; + +/** @internal */ +export const HealthControllerTestIdempotencyRequest$outboundSchema: z.ZodType< + HealthControllerTestIdempotencyRequest$Outbound, + z.ZodTypeDef, + HealthControllerTestIdempotencyRequest +> = z.object({ + idempotencyKey: z.string().optional(), + idempotencyTestingDto: components.IdempotencyTestingDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + idempotencyKey: "idempotency-key", + idempotencyTestingDto: "IdempotencyTestingDto", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HealthControllerTestIdempotencyRequest$ { + /** @deprecated use `HealthControllerTestIdempotencyRequest$inboundSchema` instead. */ + export const inboundSchema = + HealthControllerTestIdempotencyRequest$inboundSchema; + /** @deprecated use `HealthControllerTestIdempotencyRequest$outboundSchema` instead. */ + export const outboundSchema = + HealthControllerTestIdempotencyRequest$outboundSchema; + /** @deprecated use `HealthControllerTestIdempotencyRequest$Outbound` instead. */ + export type Outbound = HealthControllerTestIdempotencyRequest$Outbound; +} + +export function healthControllerTestIdempotencyRequestToJSON( + healthControllerTestIdempotencyRequest: + HealthControllerTestIdempotencyRequest, +): string { + return JSON.stringify( + HealthControllerTestIdempotencyRequest$outboundSchema.parse( + healthControllerTestIdempotencyRequest, + ), + ); +} + +export function healthControllerTestIdempotencyRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + HealthControllerTestIdempotencyRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'HealthControllerTestIdempotencyRequest' from JSON`, + ); +} + +/** @internal */ +export const HealthControllerTestIdempotencyResponse$inboundSchema: z.ZodType< + HealthControllerTestIdempotencyResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + }); +}); + +/** @internal */ +export type HealthControllerTestIdempotencyResponse$Outbound = { + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const HealthControllerTestIdempotencyResponse$outboundSchema: z.ZodType< + HealthControllerTestIdempotencyResponse$Outbound, + z.ZodTypeDef, + HealthControllerTestIdempotencyResponse +> = z.object({ + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + headers: "Headers", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HealthControllerTestIdempotencyResponse$ { + /** @deprecated use `HealthControllerTestIdempotencyResponse$inboundSchema` instead. */ + export const inboundSchema = + HealthControllerTestIdempotencyResponse$inboundSchema; + /** @deprecated use `HealthControllerTestIdempotencyResponse$outboundSchema` instead. */ + export const outboundSchema = + HealthControllerTestIdempotencyResponse$outboundSchema; + /** @deprecated use `HealthControllerTestIdempotencyResponse$Outbound` instead. */ + export type Outbound = HealthControllerTestIdempotencyResponse$Outbound; +} + +export function healthControllerTestIdempotencyResponseToJSON( + healthControllerTestIdempotencyResponse: + HealthControllerTestIdempotencyResponse, +): string { + return JSON.stringify( + HealthControllerTestIdempotencyResponse$outboundSchema.parse( + healthControllerTestIdempotencyResponse, + ), + ); +} + +export function healthControllerTestIdempotencyResponseFromJSON( + jsonString: string, +): SafeParseResult< + HealthControllerTestIdempotencyResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + HealthControllerTestIdempotencyResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'HealthControllerTestIdempotencyResponse' from JSON`, + ); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 6c5ece90..e88b85c8 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -6,6 +6,8 @@ export * from "./eventscontrollerbroadcasteventtoall.js"; export * from "./eventscontrollercancel.js"; export * from "./eventscontrollertrigger.js"; export * from "./eventscontrollertriggerbulk.js"; +export * from "./healthcontrollerhealthcheck.js"; +export * from "./healthcontrollertestidempotency.js"; export * from "./integrationscontrollercreateintegration.js"; export * from "./integrationscontrollergetactiveintegrations.js"; export * from "./integrationscontrollergetwebhooksupportstatus.js"; @@ -41,11 +43,6 @@ export * from "./subscriberscontrollerupdatesubscriberchannel.js"; export * from "./subscriberscontrollerupdatesubscriberglobalpreferences.js"; export * from "./subscriberscontrollerupdatesubscriberonlineflag.js"; export * from "./subscriberscontrollerupdatesubscriberpreference.js"; -export * from "./testapiratelimitbulkcontrollerglobalcategorynocostoverride.js"; -export * from "./testapiratelimitbulkcontrollernocategorynocostoverride.js"; -export * from "./testapiratelimitbulkcontrollernocategorysinglecostoverride.js"; -export * from "./testingcontrolleridempotency.js"; -export * from "./testingcontrolleridempotencyget.js"; export * from "./topicscontrollerassign.js"; export * from "./topicscontrollercreatetopic.js"; export * from "./topicscontrollerdeletetopic.js"; diff --git a/src/models/operations/testapiratelimitbulkcontrollerglobalcategorynocostoverride.ts b/src/models/operations/testapiratelimitbulkcontrollerglobalcategorynocostoverride.ts deleted file mode 100644 index 0b9dcdff..00000000 --- a/src/models/operations/testapiratelimitbulkcontrollerglobalcategorynocostoverride.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest = - { - /** - * A header for idempotency purposes - */ - idempotencyKey?: string | undefined; - }; - -/** @internal */ -export const TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$inboundSchema: - z.ZodType< - TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest, - z.ZodTypeDef, - unknown - > = z.object({ - "idempotency-key": z.string().optional(), - }).transform((v) => { - return remap$(v, { - "idempotency-key": "idempotencyKey", - }); - }); - -/** @internal */ -export type TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$Outbound = - { - "idempotency-key"?: string | undefined; - }; - -/** @internal */ -export const TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$outboundSchema: - z.ZodType< - TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$Outbound, - z.ZodTypeDef, - TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest - > = z.object({ - idempotencyKey: z.string().optional(), - }).transform((v) => { - return remap$(v, { - idempotencyKey: "idempotency-key", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$ { - /** @deprecated use `TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$inboundSchema` instead. */ - export const inboundSchema = - TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$inboundSchema; - /** @deprecated use `TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$outboundSchema` instead. */ - export const outboundSchema = - TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$outboundSchema; - /** @deprecated use `TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$Outbound` instead. */ - export type Outbound = - TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$Outbound; -} - -export function testApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequestToJSON( - testApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest: - TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest, -): string { - return JSON.stringify( - TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$outboundSchema - .parse(testApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest), - ); -} - -export function testApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequestFromJSON( - jsonString: string, -): SafeParseResult< - TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'TestApiRateLimitBulkControllerGlobalCategoryNoCostOverrideRequest' from JSON`, - ); -} diff --git a/src/models/operations/testapiratelimitbulkcontrollernocategorynocostoverride.ts b/src/models/operations/testapiratelimitbulkcontrollernocategorynocostoverride.ts deleted file mode 100644 index a54c2fe9..00000000 --- a/src/models/operations/testapiratelimitbulkcontrollernocategorynocostoverride.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest = { - /** - * A header for idempotency purposes - */ - idempotencyKey?: string | undefined; -}; - -/** @internal */ -export const TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$inboundSchema: - z.ZodType< - TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest, - z.ZodTypeDef, - unknown - > = z.object({ - "idempotency-key": z.string().optional(), - }).transform((v) => { - return remap$(v, { - "idempotency-key": "idempotencyKey", - }); - }); - -/** @internal */ -export type TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$Outbound = - { - "idempotency-key"?: string | undefined; - }; - -/** @internal */ -export const TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$outboundSchema: - z.ZodType< - TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$Outbound, - z.ZodTypeDef, - TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest - > = z.object({ - idempotencyKey: z.string().optional(), - }).transform((v) => { - return remap$(v, { - idempotencyKey: "idempotency-key", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$ { - /** @deprecated use `TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$inboundSchema` instead. */ - export const inboundSchema = - TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$inboundSchema; - /** @deprecated use `TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$outboundSchema` instead. */ - export const outboundSchema = - TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$outboundSchema; - /** @deprecated use `TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$Outbound` instead. */ - export type Outbound = - TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$Outbound; -} - -export function testApiRateLimitBulkControllerNoCategoryNoCostOverrideRequestToJSON( - testApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest: - TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest, -): string { - return JSON.stringify( - TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$outboundSchema - .parse(testApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest), - ); -} - -export function testApiRateLimitBulkControllerNoCategoryNoCostOverrideRequestFromJSON( - jsonString: string, -): SafeParseResult< - TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'TestApiRateLimitBulkControllerNoCategoryNoCostOverrideRequest' from JSON`, - ); -} diff --git a/src/models/operations/testapiratelimitbulkcontrollernocategorysinglecostoverride.ts b/src/models/operations/testapiratelimitbulkcontrollernocategorysinglecostoverride.ts deleted file mode 100644 index 4740fdb1..00000000 --- a/src/models/operations/testapiratelimitbulkcontrollernocategorysinglecostoverride.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest = - { - /** - * A header for idempotency purposes - */ - idempotencyKey?: string | undefined; - }; - -/** @internal */ -export const TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$inboundSchema: - z.ZodType< - TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest, - z.ZodTypeDef, - unknown - > = z.object({ - "idempotency-key": z.string().optional(), - }).transform((v) => { - return remap$(v, { - "idempotency-key": "idempotencyKey", - }); - }); - -/** @internal */ -export type TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$Outbound = - { - "idempotency-key"?: string | undefined; - }; - -/** @internal */ -export const TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$outboundSchema: - z.ZodType< - TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$Outbound, - z.ZodTypeDef, - TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest - > = z.object({ - idempotencyKey: z.string().optional(), - }).transform((v) => { - return remap$(v, { - idempotencyKey: "idempotency-key", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$ { - /** @deprecated use `TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$inboundSchema` instead. */ - export const inboundSchema = - TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$inboundSchema; - /** @deprecated use `TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$outboundSchema` instead. */ - export const outboundSchema = - TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$outboundSchema; - /** @deprecated use `TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$Outbound` instead. */ - export type Outbound = - TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$Outbound; -} - -export function testApiRateLimitBulkControllerNoCategorySingleCostOverrideRequestToJSON( - testApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest: - TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest, -): string { - return JSON.stringify( - TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$outboundSchema - .parse(testApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest), - ); -} - -export function testApiRateLimitBulkControllerNoCategorySingleCostOverrideRequestFromJSON( - jsonString: string, -): SafeParseResult< - TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'TestApiRateLimitBulkControllerNoCategorySingleCostOverrideRequest' from JSON`, - ); -} diff --git a/src/models/operations/testingcontrolleridempotency.ts b/src/models/operations/testingcontrolleridempotency.ts deleted file mode 100644 index e1d54c1d..00000000 --- a/src/models/operations/testingcontrolleridempotency.ts +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type TestingControllerIdempotencyRequest = { - /** - * A header for idempotency purposes - */ - idempotencyKey?: string | undefined; - idempotencyBodyDto: components.IdempotencyBodyDto; -}; - -export type TestingControllerIdempotencyResponse = { - headers: { [k: string]: Array }; - result: components.IdempotencyResponse; -}; - -/** @internal */ -export const TestingControllerIdempotencyRequest$inboundSchema: z.ZodType< - TestingControllerIdempotencyRequest, - z.ZodTypeDef, - unknown -> = z.object({ - "idempotency-key": z.string().optional(), - IdempotencyBodyDto: components.IdempotencyBodyDto$inboundSchema, -}).transform((v) => { - return remap$(v, { - "idempotency-key": "idempotencyKey", - "IdempotencyBodyDto": "idempotencyBodyDto", - }); -}); - -/** @internal */ -export type TestingControllerIdempotencyRequest$Outbound = { - "idempotency-key"?: string | undefined; - IdempotencyBodyDto: components.IdempotencyBodyDto$Outbound; -}; - -/** @internal */ -export const TestingControllerIdempotencyRequest$outboundSchema: z.ZodType< - TestingControllerIdempotencyRequest$Outbound, - z.ZodTypeDef, - TestingControllerIdempotencyRequest -> = z.object({ - idempotencyKey: z.string().optional(), - idempotencyBodyDto: components.IdempotencyBodyDto$outboundSchema, -}).transform((v) => { - return remap$(v, { - idempotencyKey: "idempotency-key", - idempotencyBodyDto: "IdempotencyBodyDto", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TestingControllerIdempotencyRequest$ { - /** @deprecated use `TestingControllerIdempotencyRequest$inboundSchema` instead. */ - export const inboundSchema = - TestingControllerIdempotencyRequest$inboundSchema; - /** @deprecated use `TestingControllerIdempotencyRequest$outboundSchema` instead. */ - export const outboundSchema = - TestingControllerIdempotencyRequest$outboundSchema; - /** @deprecated use `TestingControllerIdempotencyRequest$Outbound` instead. */ - export type Outbound = TestingControllerIdempotencyRequest$Outbound; -} - -export function testingControllerIdempotencyRequestToJSON( - testingControllerIdempotencyRequest: TestingControllerIdempotencyRequest, -): string { - return JSON.stringify( - TestingControllerIdempotencyRequest$outboundSchema.parse( - testingControllerIdempotencyRequest, - ), - ); -} - -export function testingControllerIdempotencyRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - TestingControllerIdempotencyRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TestingControllerIdempotencyRequest' from JSON`, - ); -} - -/** @internal */ -export const TestingControllerIdempotencyResponse$inboundSchema: z.ZodType< - TestingControllerIdempotencyResponse, - z.ZodTypeDef, - unknown -> = z.object({ - Headers: z.record(z.array(z.string())), - Result: components.IdempotencyResponse$inboundSchema, -}).transform((v) => { - return remap$(v, { - "Headers": "headers", - "Result": "result", - }); -}); - -/** @internal */ -export type TestingControllerIdempotencyResponse$Outbound = { - Headers: { [k: string]: Array }; - Result: components.IdempotencyResponse$Outbound; -}; - -/** @internal */ -export const TestingControllerIdempotencyResponse$outboundSchema: z.ZodType< - TestingControllerIdempotencyResponse$Outbound, - z.ZodTypeDef, - TestingControllerIdempotencyResponse -> = z.object({ - headers: z.record(z.array(z.string())), - result: components.IdempotencyResponse$outboundSchema, -}).transform((v) => { - return remap$(v, { - headers: "Headers", - result: "Result", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TestingControllerIdempotencyResponse$ { - /** @deprecated use `TestingControllerIdempotencyResponse$inboundSchema` instead. */ - export const inboundSchema = - TestingControllerIdempotencyResponse$inboundSchema; - /** @deprecated use `TestingControllerIdempotencyResponse$outboundSchema` instead. */ - export const outboundSchema = - TestingControllerIdempotencyResponse$outboundSchema; - /** @deprecated use `TestingControllerIdempotencyResponse$Outbound` instead. */ - export type Outbound = TestingControllerIdempotencyResponse$Outbound; -} - -export function testingControllerIdempotencyResponseToJSON( - testingControllerIdempotencyResponse: TestingControllerIdempotencyResponse, -): string { - return JSON.stringify( - TestingControllerIdempotencyResponse$outboundSchema.parse( - testingControllerIdempotencyResponse, - ), - ); -} - -export function testingControllerIdempotencyResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - TestingControllerIdempotencyResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TestingControllerIdempotencyResponse' from JSON`, - ); -} diff --git a/src/models/operations/testingcontrolleridempotencyget.ts b/src/models/operations/testingcontrolleridempotencyget.ts deleted file mode 100644 index 205224bd..00000000 --- a/src/models/operations/testingcontrolleridempotencyget.ts +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type TestingControllerIdempotencyGetRequest = { - /** - * A header for idempotency purposes - */ - idempotencyKey?: string | undefined; -}; - -export type TestingControllerIdempotencyGetResponse = { - headers: { [k: string]: Array }; - result: components.IdempotencyResponse; -}; - -/** @internal */ -export const TestingControllerIdempotencyGetRequest$inboundSchema: z.ZodType< - TestingControllerIdempotencyGetRequest, - z.ZodTypeDef, - unknown -> = z.object({ - "idempotency-key": z.string().optional(), -}).transform((v) => { - return remap$(v, { - "idempotency-key": "idempotencyKey", - }); -}); - -/** @internal */ -export type TestingControllerIdempotencyGetRequest$Outbound = { - "idempotency-key"?: string | undefined; -}; - -/** @internal */ -export const TestingControllerIdempotencyGetRequest$outboundSchema: z.ZodType< - TestingControllerIdempotencyGetRequest$Outbound, - z.ZodTypeDef, - TestingControllerIdempotencyGetRequest -> = z.object({ - idempotencyKey: z.string().optional(), -}).transform((v) => { - return remap$(v, { - idempotencyKey: "idempotency-key", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TestingControllerIdempotencyGetRequest$ { - /** @deprecated use `TestingControllerIdempotencyGetRequest$inboundSchema` instead. */ - export const inboundSchema = - TestingControllerIdempotencyGetRequest$inboundSchema; - /** @deprecated use `TestingControllerIdempotencyGetRequest$outboundSchema` instead. */ - export const outboundSchema = - TestingControllerIdempotencyGetRequest$outboundSchema; - /** @deprecated use `TestingControllerIdempotencyGetRequest$Outbound` instead. */ - export type Outbound = TestingControllerIdempotencyGetRequest$Outbound; -} - -export function testingControllerIdempotencyGetRequestToJSON( - testingControllerIdempotencyGetRequest: - TestingControllerIdempotencyGetRequest, -): string { - return JSON.stringify( - TestingControllerIdempotencyGetRequest$outboundSchema.parse( - testingControllerIdempotencyGetRequest, - ), - ); -} - -export function testingControllerIdempotencyGetRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - TestingControllerIdempotencyGetRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TestingControllerIdempotencyGetRequest' from JSON`, - ); -} - -/** @internal */ -export const TestingControllerIdempotencyGetResponse$inboundSchema: z.ZodType< - TestingControllerIdempotencyGetResponse, - z.ZodTypeDef, - unknown -> = z.object({ - Headers: z.record(z.array(z.string())), - Result: components.IdempotencyResponse$inboundSchema, -}).transform((v) => { - return remap$(v, { - "Headers": "headers", - "Result": "result", - }); -}); - -/** @internal */ -export type TestingControllerIdempotencyGetResponse$Outbound = { - Headers: { [k: string]: Array }; - Result: components.IdempotencyResponse$Outbound; -}; - -/** @internal */ -export const TestingControllerIdempotencyGetResponse$outboundSchema: z.ZodType< - TestingControllerIdempotencyGetResponse$Outbound, - z.ZodTypeDef, - TestingControllerIdempotencyGetResponse -> = z.object({ - headers: z.record(z.array(z.string())), - result: components.IdempotencyResponse$outboundSchema, -}).transform((v) => { - return remap$(v, { - headers: "Headers", - result: "Result", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TestingControllerIdempotencyGetResponse$ { - /** @deprecated use `TestingControllerIdempotencyGetResponse$inboundSchema` instead. */ - export const inboundSchema = - TestingControllerIdempotencyGetResponse$inboundSchema; - /** @deprecated use `TestingControllerIdempotencyGetResponse$outboundSchema` instead. */ - export const outboundSchema = - TestingControllerIdempotencyGetResponse$outboundSchema; - /** @deprecated use `TestingControllerIdempotencyGetResponse$Outbound` instead. */ - export type Outbound = TestingControllerIdempotencyGetResponse$Outbound; -} - -export function testingControllerIdempotencyGetResponseToJSON( - testingControllerIdempotencyGetResponse: - TestingControllerIdempotencyGetResponse, -): string { - return JSON.stringify( - TestingControllerIdempotencyGetResponse$outboundSchema.parse( - testingControllerIdempotencyGetResponse, - ), - ); -} - -export function testingControllerIdempotencyGetResponseFromJSON( - jsonString: string, -): SafeParseResult< - TestingControllerIdempotencyGetResponse, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - TestingControllerIdempotencyGetResponse$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'TestingControllerIdempotencyGetResponse' from JSON`, - ); -} diff --git a/src/sdk/admin.ts b/src/sdk/admin.ts index eec80647..05b5d9c6 100644 --- a/src/sdk/admin.ts +++ b/src/sdk/admin.ts @@ -2,33 +2,33 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { adminIdempotencyGet } from "../funcs/adminIdempotencyGet.js"; -import { adminIdempotencyPost } from "../funcs/adminIdempotencyPost.js"; +import { adminHealthControllerHealthCheck } from "../funcs/adminHealthControllerHealthCheck.js"; +import { adminTestIdempotency } from "../funcs/adminTestIdempotency.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Admin extends ClientSDK { - async idempotencyPost( - idempotencyBodyDto: components.IdempotencyBodyDto, + async healthControllerHealthCheck( idempotencyKey?: string | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(adminIdempotencyPost( + ): Promise { + return unwrapAsync(adminHealthControllerHealthCheck( this, - idempotencyBodyDto, idempotencyKey, options, )); } - async idempotencyGet( + async testIdempotency( + idempotencyTestingDto: components.IdempotencyTestingDto, idempotencyKey?: string | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(adminIdempotencyGet( + ): Promise { + return unwrapAsync(adminTestIdempotency( this, + idempotencyTestingDto, idempotencyKey, options, )); diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 743ee6bb..e33ccbec 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -3,9 +3,6 @@ */ import { cancel } from "../funcs/cancel.js"; -import { testApiRateLimitBulkControllerGlobalCategoryNoCostOverride } from "../funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.js"; -import { testApiRateLimitBulkControllerNoCategoryNoCostOverride } from "../funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.js"; -import { testApiRateLimitBulkControllerNoCategorySingleCostOverride } from "../funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.js"; import { trigger } from "../funcs/trigger.js"; import { triggerBroadcast } from "../funcs/triggerBroadcast.js"; import { triggerBulk } from "../funcs/triggerBulk.js"; @@ -21,6 +18,11 @@ import { Subscribers } from "./subscribers.js"; import { Topics } from "./topics.js"; export class Novu extends ClientSDK { + private _admin?: Admin; + get admin(): Admin { + return (this._admin ??= new Admin(this._options)); + } + private _notifications?: Notifications; get notifications(): Notifications { return (this._notifications ??= new Notifications(this._options)); @@ -46,11 +48,6 @@ export class Novu extends ClientSDK { return (this._topics ??= new Topics(this._options)); } - private _admin?: Admin; - get admin(): Admin { - return (this._admin ??= new Admin(this._options)); - } - /** * Trigger event * @@ -134,41 +131,4 @@ export class Novu extends ClientSDK { options, )); } - - async testApiRateLimitBulkControllerNoCategoryNoCostOverride( - idempotencyKey?: string | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(testApiRateLimitBulkControllerNoCategoryNoCostOverride( - this, - idempotencyKey, - options, - )); - } - - async testApiRateLimitBulkControllerNoCategorySingleCostOverride( - idempotencyKey?: string | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync( - testApiRateLimitBulkControllerNoCategorySingleCostOverride( - this, - idempotencyKey, - options, - ), - ); - } - - async testApiRateLimitBulkControllerGlobalCategoryNoCostOverride( - idempotencyKey?: string | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync( - testApiRateLimitBulkControllerGlobalCategoryNoCostOverride( - this, - idempotencyKey, - options, - ), - ); - } }