diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 96145205..87455e15 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,18 +1,17 @@ lockVersion: 2.0.0 id: 6bff3a53-3f0b-40b4-942f-ff70dc583ae5 management: - docChecksum: 72ee652703e7c5bf6e49092765924b4d + docChecksum: e13e9f257b632aa7d9006e0ca6bac271 docVersion: "1.0" speakeasyVersion: 1.469.0 generationVersion: 2.493.21 - releaseVersion: 0.0.5 - configChecksum: ff92708e8fbd60ee1e9fda95b454414a + releaseVersion: 0.1.0 + configChecksum: f2665e7189365830c6eac6afd60624cd published: true features: typescript: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 - additionalProperties: 0.1.1 constsAndDefaults: 0.1.11 core: 3.18.16 defaultEnabledRetries: 0.1.0 @@ -119,9 +118,6 @@ generatedFiles: - docs/models/components/filtertopicsresponsedto.md - docs/models/components/getsubscriberpreferencesresponsedto.md - docs/models/components/gettopicresponsedto.md - - docs/models/components/idempotencetestingresponse.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 @@ -228,17 +224,11 @@ 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 @@ -247,13 +237,6 @@ generatedFiles: - docs/models/operations/eventscontrollertriggerbulkresponse.md - docs/models/operations/eventscontrollertriggerrequest.md - docs/models/operations/eventscontrollertriggerresponse.md - - docs/models/operations/healthcontrollergeneraterandomnumberrequest.md - - docs/models/operations/healthcontrollergeneraterandomnumberresponse.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 @@ -362,8 +345,6 @@ generatedFiles: - package.json - src/core.ts - src/funcs/cancel.ts - - src/funcs/generateRandomNumber.ts - - src/funcs/healthControllerHealthCheck.ts - src/funcs/integrationsCreate.ts - src/funcs/integrationsDelete.ts - src/funcs/integrationsList.ts @@ -399,7 +380,6 @@ generatedFiles: - src/funcs/subscribersPropertiesUpdateOnlineFlag.ts - src/funcs/subscribersRetrieve.ts - src/funcs/subscribersUpdate.ts - - src/funcs/testIdempotency.ts - src/funcs/topicsCreate.ts - src/funcs/topicsDelete.ts - src/funcs/topicsList.ts @@ -483,9 +463,6 @@ generatedFiles: - src/models/components/filtertopicsresponsedto.ts - src/models/components/getsubscriberpreferencesresponsedto.ts - src/models/components/gettopicresponsedto.ts - - src/models/components/idempotencetestingresponse.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 @@ -553,7 +530,6 @@ 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 @@ -563,9 +539,6 @@ generatedFiles: - src/models/operations/eventscontrollercancel.ts - src/models/operations/eventscontrollertrigger.ts - src/models/operations/eventscontrollertriggerbulk.ts - - src/models/operations/healthcontrollergeneraterandomnumber.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 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index a3d0d4d6..25ce1bf6 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false typescript: - version: 0.0.5 + version: 0.1.0 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index e61537e7..ae4ebd60 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.469.0 sources: json-development: sourceNamespace: json-development - sourceRevisionDigest: sha256:aa51e11f7c7f58ba6c9aae991e0c9094ae43574b3b560d545234933069348dbb - sourceBlobDigest: sha256:d94a02331a5697ba9e62b4762064fc64b2245960b3eba89e2ab7f2cd75abd8dd + sourceRevisionDigest: sha256:f86a7c4644f11cb6d3c8f6f55be75b5176a72b6796ffb020f3f74e4f56ba39d4 + sourceBlobDigest: sha256:9f11c13a8f35483564a47ef29be554048b0cc6c518f6bc21ec2ce8995e9b59bb tags: - latest - "1.0" @@ -11,10 +11,10 @@ targets: my-first-target: source: json-development sourceNamespace: json-development - sourceRevisionDigest: sha256:aa51e11f7c7f58ba6c9aae991e0c9094ae43574b3b560d545234933069348dbb - sourceBlobDigest: sha256:d94a02331a5697ba9e62b4762064fc64b2245960b3eba89e2ab7f2cd75abd8dd + sourceRevisionDigest: sha256:f86a7c4644f11cb6d3c8f6f55be75b5176a72b6796ffb020f3f74e4f56ba39d4 + sourceBlobDigest: sha256:9f11c13a8f35483564a47ef29be554048b0cc6c518f6bc21ec2ce8995e9b59bb codeSamplesNamespace: code-samples-typescript - codeSamplesRevisionDigest: sha256:963f699df6bf82e256a5fcdfbafbc6dae6c910aafd770a105788de33f3e02018 + codeSamplesRevisionDigest: sha256:d2ee210eda22dfe3f16ea4c82effabf47936ef8afad1ff6403e12b0de808a03a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index dda5d49d..99c2f795 100644 --- a/README.md +++ b/README.md @@ -247,9 +247,6 @@ run(); ### [Novu SDK](docs/sdks/novu/README.md) -* [healthControllerHealthCheck](docs/sdks/novu/README.md#healthcontrollerhealthcheck) -* [testIdempotency](docs/sdks/novu/README.md#testidempotency) -* [generateRandomNumber](docs/sdks/novu/README.md#generaterandomnumber) * [trigger](docs/sdks/novu/README.md#trigger) - Trigger event * [triggerBulk](docs/sdks/novu/README.md#triggerbulk) - Bulk trigger event * [triggerBroadcast](docs/sdks/novu/README.md#triggerbroadcast) - Broadcast event to all @@ -330,8 +327,6 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). Available standalone functions - [`cancel`](docs/sdks/novu/README.md#cancel) - Cancel triggered event -- [`generateRandomNumber`](docs/sdks/novu/README.md#generaterandomnumber) -- [`healthControllerHealthCheck`](docs/sdks/novu/README.md#healthcontrollerhealthcheck) - [`integrationsCreate`](docs/sdks/integrations/README.md#create) - Create integration - [`integrationsDelete`](docs/sdks/integrations/README.md#delete) - Delete integration - [`integrationsList`](docs/sdks/integrations/README.md#list) - Get integrations @@ -367,7 +362,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 -- [`testIdempotency`](docs/sdks/novu/README.md#testidempotency) - [`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 @@ -419,20 +413,24 @@ run(); ## Error Handling -Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `healthControllerHealthCheck` method may throw the following errors: +Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `trigger` method may throw the following errors: -| Error Type | Status Code | Content Type | -| ---------------------------------------------- | ----------- | ---------------- | -| errors.HealthControllerHealthCheckResponseBody | 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| 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 | \*/\* | If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`. ```typescript import { Novu } from "@novu/api"; import { - HealthControllerHealthCheckResponseBody, + ErrorDto, SDKValidationError, + ValidationErrorDto, } from "@novu/api/models/errors"; const novu = new Novu({ @@ -442,7 +440,19 @@ const novu = new Novu({ async function run() { let result; try { - result = await novu.healthControllerHealthCheck(); + result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); @@ -456,8 +466,23 @@ async function run() { console.error(err.rawValue); return; } - case (err instanceof HealthControllerHealthCheckResponseBody): { - // Handle err.data$: HealthControllerHealthCheckResponseBodyData + case (err instanceof ErrorDto): { + // Handle err.data$: ErrorDtoData + console.error(err); + return; + } + case (err instanceof ErrorDto): { + // Handle err.data$: ErrorDtoData + console.error(err); + return; + } + case (err instanceof ValidationErrorDto): { + // Handle err.data$: ValidationErrorDtoData + console.error(err); + return; + } + case (err instanceof ErrorDto): { + // Handle err.data$: ErrorDtoData console.error(err); return; } @@ -509,7 +534,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.healthControllerHealthCheck(); + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); @@ -531,7 +568,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.healthControllerHealthCheck(); + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); @@ -611,7 +660,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.healthControllerHealthCheck(); + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); @@ -636,7 +697,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.healthControllerHealthCheck({ + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }, { retries: { strategy: "backoff", backoff: { @@ -676,7 +749,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.healthControllerHealthCheck(); + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); diff --git a/docs/models/components/activitiesresponsedto.md b/docs/models/components/activitiesresponsedto.md index 964e0dd9..6437259b 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: 8289.4, - page: 46.95, + pageSize: 6674.11, + page: 1317.97, }; ``` diff --git a/docs/models/components/activitygraphstatesresponse.md b/docs/models/components/activitygraphstatesresponse.md index 59a52ffc..7fb045d9 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: 8919.24, + count: 5743.25, templates: [ "", ], channels: [ - "push", + "chat", ], }; ``` diff --git a/docs/models/components/activitynotificationexecutiondetailresponsedto.md b/docs/models/components/activitynotificationexecutiondetailresponsedto.md index cd01f30c..f9592e2d 100644 --- a/docs/models/components/activitynotificationexecutiondetailresponsedto.md +++ b/docs/models/components/activitynotificationexecutiondetailresponsedto.md @@ -7,12 +7,12 @@ import { ActivityNotificationExecutionDetailResponseDto } from "@novu/api/models let value: ActivityNotificationExecutionDetailResponseDto = { id: "", - status: "Pending", + status: "ReadConfirmation", detail: "", isRetry: false, isTest: false, - providerId: "mailgun", - source: "Internal", + providerId: "ring-central", + source: "Payload", }; ``` diff --git a/docs/models/components/activitynotificationjobresponsedto.md b/docs/models/components/activitynotificationjobresponsedto.md index 6d4e2612..44d04927 100644 --- a/docs/models/components/activitynotificationjobresponsedto.md +++ b/docs/models/components/activitynotificationjobresponsedto.md @@ -11,11 +11,11 @@ let value: ActivityNotificationJobResponseDto = { executionDetails: [ { id: "", - status: "Queued", + status: "Warning", detail: "", isRetry: false, isTest: false, - providerId: "getstream", + providerId: "sendchamp", source: "Credentials", }, ], @@ -25,13 +25,13 @@ let value: ActivityNotificationJobResponseDto = { filters: [ { isNegated: false, - type: "STATEMENT", - value: "OR", + type: "MULTI_LIST", + value: "AND", children: [ { field: "", value: "", - operator: "NOT_IN", + operator: "BETWEEN", on: "subscriber", }, ], @@ -39,7 +39,7 @@ let value: ActivityNotificationJobResponseDto = { ], templateId: "", }, - providerId: "grafana-on-call", + providerId: "mobishastra", status: "", }; ``` diff --git a/docs/models/components/activitynotificationstepresponsedto.md b/docs/models/components/activitynotificationstepresponsedto.md index ec4b4940..9b94a8a4 100644 --- a/docs/models/components/activitynotificationstepresponsedto.md +++ b/docs/models/components/activitynotificationstepresponsedto.md @@ -11,13 +11,13 @@ let value: ActivityNotificationStepResponseDto = { filters: [ { isNegated: false, - type: "MULTI_LIST", + type: "TEXT", value: "OR", children: [ { field: "", value: "", - operator: "EQUAL", + operator: "NOT_IN", on: "payload", }, ], diff --git a/docs/models/components/activitystatsresponsedto.md b/docs/models/components/activitystatsresponsedto.md index fc458826..3a855ff3 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: 8965.47, - monthlySent: 3675.62, + weeklySent: 2982.82, + monthlySent: 5699.65, }; ``` diff --git a/docs/models/components/actorfeeditemdto.md b/docs/models/components/actorfeeditemdto.md index 639d44a9..ddc1d3dd 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: "user", }; ``` diff --git a/docs/models/components/actortypeenum.md b/docs/models/components/actortypeenum.md index 0e85f173..205981c7 100644 --- a/docs/models/components/actortypeenum.md +++ b/docs/models/components/actortypeenum.md @@ -7,7 +7,7 @@ The type of the actor, indicating the role in the notification process. ```typescript import { ActorTypeEnum } from "@novu/api/models/components"; -let value: ActorTypeEnum = "none"; +let value: ActorTypeEnum = "system_icon"; ``` ## Values diff --git a/docs/models/components/builderfieldtypeenum.md b/docs/models/components/builderfieldtypeenum.md index d5c3c737..686babac 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 = "NUMBER"; +let value: BuilderFieldTypeEnum = "STATEMENT"; ``` ## Values diff --git a/docs/models/components/bulktriggereventdto.md b/docs/models/components/bulktriggereventdto.md index 88890067..5f87a4a1 100644 --- a/docs/models/components/bulktriggereventdto.md +++ b/docs/models/components/bulktriggereventdto.md @@ -23,12 +23,10 @@ let value: BulkTriggerEventDto = { }, }, }, - to: [ - { - topicKey: "", - type: "Subscriber", - }, - ], + to: { + topicKey: "", + type: "Subscriber", + }, }, ], }; diff --git a/docs/models/components/buttontypeenum.md b/docs/models/components/buttontypeenum.md index 28d3561a..d50b6bf0 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 = "secondary"; +let value: ButtonTypeEnum = "primary"; ``` ## Values diff --git a/docs/models/components/channelsettings.md b/docs/models/components/channelsettings.md index 1ec83eec..ecf5782f 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: "fcm", + providerId: "discord", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", diff --git a/docs/models/components/channelsettingsproviderid.md b/docs/models/components/channelsettingsproviderid.md index 9ddfa7f7..1cc149e6 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 = "msteams"; +let value: ChannelSettingsProviderId = "apns"; ``` ## Values diff --git a/docs/models/components/channeltypeenum.md b/docs/models/components/channeltypeenum.md index f859f329..04d28d7f 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 = "sms"; +let value: ChannelTypeEnum = "in_app"; ``` ## Values diff --git a/docs/models/components/content.md b/docs/models/components/content.md index 2ba684d8..17223e98 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: "button", + type: "text", content: "", }; ``` diff --git a/docs/models/components/createintegrationrequestdto.md b/docs/models/components/createintegrationrequestdto.md index 8a32f099..4ba9f32b 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: "chat", + channel: "email", }; ``` diff --git a/docs/models/components/createsubscriberrequestdtodata.md b/docs/models/components/createsubscriberrequestdtodata.md index 9267e0ad..d960b20e 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 = 1238.2; +const value: number = 9194.83; ``` diff --git a/docs/models/components/data.md b/docs/models/components/data.md index 197e47f2..f661f949 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 = 3185.69; +const value: number = 5666.02; ``` diff --git a/docs/models/components/digestunitenum.md b/docs/models/components/digestunitenum.md index 9179c371..59cb7205 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 = "minutes"; ``` ## Values diff --git a/docs/models/components/emailblockstyles.md b/docs/models/components/emailblockstyles.md index 9b7b4d06..e5618047 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: "left", + textAlign: "center", }; ``` diff --git a/docs/models/components/executiondetailsstatusenum.md b/docs/models/components/executiondetailsstatusenum.md index 6114f4c0..391aae05 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 = "Warning"; +let value: ExecutionDetailsStatusEnum = "ReadConfirmation"; ``` ## Values diff --git a/docs/models/components/feedresponsedto.md b/docs/models/components/feedresponsedto.md index 45f916e9..903d9903 100644 --- a/docs/models/components/feedresponsedto.md +++ b/docs/models/components/feedresponsedto.md @@ -23,14 +23,14 @@ let value: FeedResponseDto = { updatedAt: new Date("2024-12-10T10:10:59.639Z"), actor: { data: null, - type: "user", + type: "none", }, transactionId: "transaction_123456", templateIdentifier: "template_abcdef", providerId: "provider_xyz", content: "This is a test notification content.", subject: "Test Notification Subject", - channel: "chat", + channel: "push", read: false, seen: true, deleted: false, diff --git a/docs/models/components/fieldfilterpartdto.md b/docs/models/components/fieldfilterpartdto.md index b646088f..b171cc50 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: "IN", + operator: "NOT_EQUAL", on: "payload", }; ``` diff --git a/docs/models/components/idempotencetestingresponse.md b/docs/models/components/idempotencetestingresponse.md deleted file mode 100644 index 809467ac..00000000 --- a/docs/models/components/idempotencetestingresponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# IdempotenceTestingResponse - -## Example Usage - -```typescript -import { IdempotenceTestingResponse } from "@novu/api/models/components"; - -let value: IdempotenceTestingResponse = { - number: 1, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `number` | *number* | :heavy_check_mark: | A unique number representing the idempotency response | 1 | \ No newline at end of file diff --git a/docs/models/components/idempotencybehaviorenum.md b/docs/models/components/idempotencybehaviorenum.md deleted file mode 100644 index 0b0e0bee..00000000 --- a/docs/models/components/idempotencybehaviorenum.md +++ /dev/null @@ -1,17 +0,0 @@ -# IdempotencyBehaviorEnum - -The expected behavior of the idempotency request - -## Example Usage - -```typescript -import { IdempotencyBehaviorEnum } from "@novu/api/models/components"; - -let value: IdempotencyBehaviorEnum = "IMMEDIATE_EXCEPTION"; -``` - -## Values - -```typescript -"IMMEDIATE_RESPONSE" | "IMMEDIATE_EXCEPTION" | "DELAYED_RESPONSE" -``` \ No newline at end of file diff --git a/docs/models/components/idempotencytestingdto.md b/docs/models/components/idempotencytestingdto.md deleted file mode 100644 index 204109c6..00000000 --- a/docs/models/components/idempotencytestingdto.md +++ /dev/null @@ -1,17 +0,0 @@ -# IdempotencyTestingDto - -## Example Usage - -```typescript -import { IdempotencyTestingDto } from "@novu/api/models/components"; - -let value: IdempotencyTestingDto = { - expectedBehavior: "IMMEDIATE_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 34e00a87..a995b6f5 100644 --- a/docs/models/components/integrationresponsedto.md +++ b/docs/models/components/integrationresponsedto.md @@ -11,7 +11,7 @@ let value: IntegrationResponseDto = { name: "", identifier: "", providerId: "", - channel: "in_app", + channel: "sms", credentials: {}, active: false, deleted: false, 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/messageresponsedto.md b/docs/models/components/messageresponsedto.md index 9eb64f99..1e4f02ca 100644 --- a/docs/models/components/messageresponsedto.md +++ b/docs/models/components/messageresponsedto.md @@ -16,7 +16,7 @@ let value: MessageResponseDto = { subscriberId: "", channels: [ { - providerId: "mattermost", + providerId: "pushpad", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -37,16 +37,16 @@ let value: MessageResponseDto = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1706143682582", - updatedAt: "1737077753979", + createdAt: "1705930183124", + updatedAt: "1737041469522", }, - createdAt: "1712621268029", + createdAt: "1728581749425", content: { type: "text", content: "", }, transactionId: "", - channel: "chat", + channel: "in_app", read: false, seen: false, cta: { diff --git a/docs/models/components/notificationfeeditemdto.md b/docs/models/components/notificationfeeditemdto.md index 39904652..0a22e0aa 100644 --- a/docs/models/components/notificationfeeditemdto.md +++ b/docs/models/components/notificationfeeditemdto.md @@ -26,7 +26,7 @@ let value: NotificationFeedItemDto = { 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/one.md b/docs/models/components/one.md index 52ede05b..7a11a647 100644 --- a/docs/models/components/one.md +++ b/docs/models/components/one.md @@ -16,7 +16,7 @@ const value: components.SubscriberPayloadDto = { ```typescript const value: components.TopicPayloadDto = { topicKey: "", - type: "Topic", + type: "Subscriber", }; ``` diff --git a/docs/models/components/operator.md b/docs/models/components/operator.md index 88100db6..fde4e931 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 = "NOT_BETWEEN"; +let value: Operator = "EQUAL"; ``` ## Values diff --git a/docs/models/components/ordinalvalueenum.md b/docs/models/components/ordinalvalueenum.md index 66f42e78..2d91bdca 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 = "tuesday"; +let value: OrdinalValueEnum = "sunday"; ``` ## Values diff --git a/docs/models/components/providerid.md b/docs/models/components/providerid.md index 98b78432..ad171b0c 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 = "apns"; +let value: ProviderId = "ryver"; ``` ## Values diff --git a/docs/models/components/providersidenum.md b/docs/models/components/providersidenum.md index 4b99dc6b..befb2549 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 = "infobip-sms"; +let value: ProvidersIdEnum = "getstream"; ``` ## Values diff --git a/docs/models/components/stepfilterdto.md b/docs/models/components/stepfilterdto.md index 6e67d738..42a21e8a 100644 --- a/docs/models/components/stepfilterdto.md +++ b/docs/models/components/stepfilterdto.md @@ -8,12 +8,12 @@ import { StepFilterDto } from "@novu/api/models/components"; let value: StepFilterDto = { isNegated: false, type: "GROUP", - value: "OR", + value: "AND", children: [ { field: "", value: "", - operator: "NOT_LIKE", + operator: "LIKE", on: "payload", }, ], diff --git a/docs/models/components/steptypeenum.md b/docs/models/components/steptypeenum.md index 67a908b6..123fb4d2 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 = "digest"; +let value: StepTypeEnum = "chat"; ``` ## Values diff --git a/docs/models/components/subscriberchanneldto.md b/docs/models/components/subscriberchanneldto.md index fe780ee5..67a4ab81 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: "msteams", + providerId: "rocket-chat", credentials: {}, }; ``` diff --git a/docs/models/components/subscriberresponsedto.md b/docs/models/components/subscriberresponsedto.md index 74cf1486..9dddda86 100644 --- a/docs/models/components/subscriberresponsedto.md +++ b/docs/models/components/subscriberresponsedto.md @@ -9,7 +9,7 @@ let value: SubscriberResponseDto = { subscriberId: "", channels: [ { - providerId: "pusher-beams", + providerId: "getstream", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -30,8 +30,8 @@ let value: SubscriberResponseDto = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1710272580777", - updatedAt: "1737084184415", + createdAt: "1733688461712", + updatedAt: "1737080022035", }; ``` diff --git a/docs/models/components/textalignenum.md b/docs/models/components/textalignenum.md index 758d2217..cffa8b9b 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 = "center"; +let value: TextAlignEnum = "left"; ``` ## Values diff --git a/docs/models/components/to.md b/docs/models/components/to.md index 69b958ae..dc45742d 100644 --- a/docs/models/components/to.md +++ b/docs/models/components/to.md @@ -34,7 +34,7 @@ const value: components.SubscriberPayloadDto = { ```typescript const value: components.TopicPayloadDto = { topicKey: "", - type: "Topic", + type: "Subscriber", }; ``` diff --git a/docs/models/components/topicpayloaddto.md b/docs/models/components/topicpayloaddto.md index 6b38a0a5..919e5d80 100644 --- a/docs/models/components/topicpayloaddto.md +++ b/docs/models/components/topicpayloaddto.md @@ -7,7 +7,7 @@ import { TopicPayloadDto } from "@novu/api/models/components"; let value: TopicPayloadDto = { topicKey: "", - type: "Topic", + type: "Subscriber", }; ``` diff --git a/docs/models/components/triggereventrequestdto.md b/docs/models/components/triggereventrequestdto.md index 068d79d4..13cddc14 100644 --- a/docs/models/components/triggereventrequestdto.md +++ b/docs/models/components/triggereventrequestdto.md @@ -22,10 +22,7 @@ let value: TriggerEventRequestDto = { }, }, to: [ - { - topicKey: "", - type: "Topic", - }, + "SUBSCRIBER_ID", ], }; ``` diff --git a/docs/models/components/triggereventresponsedto.md b/docs/models/components/triggereventresponsedto.md index d4e4ebaf..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: "processed", + 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/unseencountresponse.md b/docs/models/components/unseencountresponse.md index 2723c4c3..57144f54 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: 5210.37, + count: 8663.83, }; ``` diff --git a/docs/models/components/updatesubscriberchannelrequestdto.md b/docs/models/components/updatesubscriberchannelrequestdto.md index 0490d5bc..821c4dfd 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: "one-signal", + providerId: "pusher-beams", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", diff --git a/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md b/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md index 56633044..51ef2120 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 = "pushpad"; +let value: UpdateSubscriberChannelRequestDtoProviderId = "expo"; ``` ## Values diff --git a/docs/models/components/weekdays.md b/docs/models/components/weekdays.md index edb5e782..0552f810 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 = "friday"; ``` ## Values diff --git a/docs/models/components/workflowresponse.md b/docs/models/components/workflowresponse.md index 9755a8cf..8629f72b 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: "finally less over how prejudge cutover for", + description: "obedience finally less over how prejudge cutover for", active: false, draft: false, preferenceSettings: {}, diff --git a/docs/models/errors/details.md b/docs/models/errors/details.md deleted file mode 100644 index ad5d7103..00000000 --- a/docs/models/errors/details.md +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index 232eb7e5..00000000 --- a/docs/models/errors/errort.md +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index 4db6ae4b..00000000 --- a/docs/models/errors/healthcontrollerhealthcheckresponsebody.md +++ /dev/null @@ -1,20 +0,0 @@ -# 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 deleted file mode 100644 index 64933f07..00000000 --- a/docs/models/errors/info.md +++ /dev/null @@ -1,18 +0,0 @@ -# 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 58c31940..fd5d7a69 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 = 1187.27; +const value: number = 9037.2; ``` ### `boolean` diff --git a/docs/models/operations/details.md b/docs/models/operations/details.md deleted file mode 100644 index f30d60bb..00000000 --- a/docs/models/operations/details.md +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index 681b86c0..00000000 --- a/docs/models/operations/errort.md +++ /dev/null @@ -1,18 +0,0 @@ -# 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/eventscontrollerbroadcasteventtoallresponse.md b/docs/models/operations/eventscontrollerbroadcasteventtoallresponse.md index 9aef7532..437d8c79 100644 --- a/docs/models/operations/eventscontrollerbroadcasteventtoallresponse.md +++ b/docs/models/operations/eventscontrollerbroadcasteventtoallresponse.md @@ -13,7 +13,7 @@ let value: EventsControllerBroadcastEventToAllResponse = { }, result: { acknowledged: false, - status: "no_workflow_steps_defined", + status: "no_workflow_active_steps_defined", }, }; ``` diff --git a/docs/models/operations/eventscontrollertriggerbulkresponse.md b/docs/models/operations/eventscontrollertriggerbulkresponse.md index 37ad9c7a..41cd4091 100644 --- a/docs/models/operations/eventscontrollertriggerbulkresponse.md +++ b/docs/models/operations/eventscontrollertriggerbulkresponse.md @@ -14,7 +14,7 @@ let value: EventsControllerTriggerBulkResponse = { result: [ { acknowledged: false, - status: "no_workflow_active_steps_defined", + status: "no_workflow_steps_defined", }, ], }; diff --git a/docs/models/operations/eventscontrollertriggerresponse.md b/docs/models/operations/eventscontrollertriggerresponse.md index 0fd91b3a..897375f2 100644 --- a/docs/models/operations/eventscontrollertriggerresponse.md +++ b/docs/models/operations/eventscontrollertriggerresponse.md @@ -13,7 +13,7 @@ let value: EventsControllerTriggerResponse = { }, result: { acknowledged: false, - status: "no_workflow_steps_defined", + status: "processed", }, }; ``` diff --git a/docs/models/operations/healthcontrollergeneraterandomnumberrequest.md b/docs/models/operations/healthcontrollergeneraterandomnumberrequest.md deleted file mode 100644 index 172866cc..00000000 --- a/docs/models/operations/healthcontrollergeneraterandomnumberrequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# HealthControllerGenerateRandomNumberRequest - -## Example Usage - -```typescript -import { HealthControllerGenerateRandomNumberRequest } from "@novu/api/models/operations"; - -let value: HealthControllerGenerateRandomNumberRequest = {}; -``` - -## 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/healthcontrollergeneraterandomnumberresponse.md b/docs/models/operations/healthcontrollergeneraterandomnumberresponse.md deleted file mode 100644 index 923a79ee..00000000 --- a/docs/models/operations/healthcontrollergeneraterandomnumberresponse.md +++ /dev/null @@ -1,25 +0,0 @@ -# HealthControllerGenerateRandomNumberResponse - -## Example Usage - -```typescript -import { HealthControllerGenerateRandomNumberResponse } from "@novu/api/models/operations"; - -let value: HealthControllerGenerateRandomNumberResponse = { - headers: { - "key": [ - "", - ], - }, - result: { - number: 1, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `headers` | Record | :heavy_check_mark: | N/A | -| `result` | [components.IdempotenceTestingResponse](../../models/components/idempotencetestingresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/healthcontrollerhealthcheckrequest.md b/docs/models/operations/healthcontrollerhealthcheckrequest.md deleted file mode 100644 index 47242603..00000000 --- a/docs/models/operations/healthcontrollerhealthcheckrequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# HealthControllerHealthCheckRequest - -## Example Usage - -```typescript -import { HealthControllerHealthCheckRequest } from "@novu/api/models/operations"; - -let value: HealthControllerHealthCheckRequest = {}; -``` - -## 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/healthcontrollerhealthcheckresponsebody.md b/docs/models/operations/healthcontrollerhealthcheckresponsebody.md deleted file mode 100644 index 2fe4593a..00000000 --- a/docs/models/operations/healthcontrollerhealthcheckresponsebody.md +++ /dev/null @@ -1,35 +0,0 @@ -# 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 deleted file mode 100644 index a31cd5c7..00000000 --- a/docs/models/operations/healthcontrollertestidempotencyrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# 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 deleted file mode 100644 index 15a47f74..00000000 --- a/docs/models/operations/healthcontrollertestidempotencyresponse.md +++ /dev/null @@ -1,25 +0,0 @@ -# HealthControllerTestIdempotencyResponse - -## Example Usage - -```typescript -import { HealthControllerTestIdempotencyResponse } from "@novu/api/models/operations"; - -let value: HealthControllerTestIdempotencyResponse = { - headers: { - "key": [ - "", - ], - }, - result: { - number: 1, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `headers` | Record | :heavy_check_mark: | N/A | -| `result` | [components.IdempotenceTestingResponse](../../models/components/idempotencetestingresponse.md) | :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 deleted file mode 100644 index fedf51f0..00000000 --- a/docs/models/operations/info.md +++ /dev/null @@ -1,18 +0,0 @@ -# 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 8561c6b7..502b0c1d 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: "push", + channel: "sms", }, }; ``` diff --git a/docs/models/operations/integrationscontrollercreateintegrationresponse.md b/docs/models/operations/integrationscontrollercreateintegrationresponse.md index 2f08d7ca..5a3caf52 100644 --- a/docs/models/operations/integrationscontrollercreateintegrationresponse.md +++ b/docs/models/operations/integrationscontrollercreateintegrationresponse.md @@ -17,7 +17,7 @@ let value: IntegrationsControllerCreateIntegrationResponse = { name: "", identifier: "", providerId: "", - channel: "in_app", + channel: "push", credentials: {}, active: false, deleted: false, diff --git a/docs/models/operations/integrationscontrollerremoveintegrationresponse.md b/docs/models/operations/integrationscontrollerremoveintegrationresponse.md index 59780288..263516cb 100644 --- a/docs/models/operations/integrationscontrollerremoveintegrationresponse.md +++ b/docs/models/operations/integrationscontrollerremoveintegrationresponse.md @@ -18,7 +18,7 @@ let value: IntegrationsControllerRemoveIntegrationResponse = { name: "", identifier: "", providerId: "", - channel: "push", + channel: "in_app", credentials: {}, active: false, deleted: false, diff --git a/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md b/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md index 79c83b46..1bc32d88 100644 --- a/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md +++ b/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md @@ -17,7 +17,7 @@ let value: IntegrationsControllerSetIntegrationAsPrimaryResponse = { name: "", identifier: "", providerId: "", - channel: "chat", + channel: "push", credentials: {}, active: false, deleted: false, diff --git a/docs/models/operations/messagescontrollergetmessagesresponse.md b/docs/models/operations/messagescontrollergetmessagesresponse.md index 64f71295..9b266f35 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: 2828.07, - page: 1201.96, + pageSize: 7392.64, + page: 391.87, }, }; ``` diff --git a/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md b/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md index f33bb93f..92a7cc0b 100644 --- a/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md +++ b/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md @@ -14,12 +14,12 @@ let value: NotificationsControllerGetActivityGraphStatsResponse = { result: [ { id: "", - count: 7917.25, + count: 3834.41, templates: [ "", ], channels: [ - "sms", + "chat", ], }, ], diff --git a/docs/models/operations/notificationscontrollergetactivitystatsresponse.md b/docs/models/operations/notificationscontrollergetactivitystatsresponse.md index 471cdc48..b534339a 100644 --- a/docs/models/operations/notificationscontrollergetactivitystatsresponse.md +++ b/docs/models/operations/notificationscontrollergetactivitystatsresponse.md @@ -12,8 +12,8 @@ let value: NotificationsControllerGetActivityStatsResponse = { ], }, result: { - weeklySent: 9636.63, - monthlySent: 3834.41, + weeklySent: 8917.73, + monthlySent: 9636.63, }, }; ``` diff --git a/docs/models/operations/notificationscontrollerlistnotificationsresponse.md b/docs/models/operations/notificationscontrollerlistnotificationsresponse.md index 4571f865..47225e1d 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: 4375.87, - page: 8917.73, + pageSize: 6458.94, + page: 4375.87, }, }; ``` diff --git a/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md b/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md index 4e3825c3..a850cded 100644 --- a/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md +++ b/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerCreateSubscriberResponse = { subscriberId: "", channels: [ { - providerId: "getstream", + providerId: "rocket-chat", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerCreateSubscriberResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1713902604349", - updatedAt: "1737076071847", + createdAt: "1718637545842", + updatedAt: "1737033224657", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollergetnotificationsfeedresponse.md b/docs/models/operations/subscriberscontrollergetnotificationsfeedresponse.md index ff44c8d1..aaebd64e 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: "user", + type: "system_icon", }, transactionId: "transaction_123456", templateIdentifier: "template_abcdef", 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/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md b/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md index acc12754..7376a85c 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: "template", + preferenceLevel: "global", subscriberId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollergetsubscriberresponse.md b/docs/models/operations/subscriberscontrollergetsubscriberresponse.md index 228f8d9b..65afe002 100644 --- a/docs/models/operations/subscriberscontrollergetsubscriberresponse.md +++ b/docs/models/operations/subscriberscontrollergetsubscriberresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerGetSubscriberResponse = { subscriberId: "", channels: [ { - providerId: "getstream", + providerId: "one-signal", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerGetSubscriberResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1723485711278", - updatedAt: "1737010802254", + createdAt: "1719945923743", + updatedAt: "1737059479447", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollergetunseencountresponse.md b/docs/models/operations/subscriberscontrollergetunseencountresponse.md index f6bca01d..963ba3fd 100644 --- a/docs/models/operations/subscriberscontrollergetunseencountresponse.md +++ b/docs/models/operations/subscriberscontrollergetunseencountresponse.md @@ -12,7 +12,7 @@ let value: SubscribersControllerGetUnseenCountResponse = { ], }, result: { - count: 1020.44, + count: 9883.74, }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md b/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md index e24ede41..e10cab28 100644 --- a/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md +++ b/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md @@ -12,15 +12,15 @@ let value: SubscribersControllerListSubscribersResponse = { ], }, result: { - page: 1182.74, + page: 7805.29, hasMore: false, - pageSize: 6399.21, + pageSize: 1182.74, data: [ { subscriberId: "", channels: [ { - providerId: "msteams", + providerId: "fcm", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -41,8 +41,8 @@ let value: SubscribersControllerListSubscribersResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1735350656849", - updatedAt: "1737054265998", + createdAt: "1710081556439", + updatedAt: "1737091985761", }, ], }, diff --git a/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md b/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md index 8113c9d1..a46377cb 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: 8700.13, + page: 7781.57, hasMore: false, - pageSize: 9786.19, + pageSize: 8700.13, data: [ { subscriberId: "", channels: [ { - providerId: "one-signal", + providerId: "pusher-beams", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -35,8 +35,8 @@ let value: SubscribersControllerListSubscribersResponseBody = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1720112791527", - updatedAt: "1737076615762", + createdAt: "1730763030989", + updatedAt: "1737050238662", }, ], }; diff --git a/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md b/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md index 7f33f19d..98d826c0 100644 --- a/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md +++ b/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md @@ -10,7 +10,7 @@ let value: SubscribersControllerMarkActionAsSeenRequest = { type: "", subscriberId: "", markMessageActionAsSeenDto: { - status: "done", + status: "pending", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md b/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md index fae1b4d4..dbc07bb8 100644 --- a/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md +++ b/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md @@ -22,7 +22,7 @@ let value: SubscribersControllerMarkActionAsSeenResponse = { subscriberId: "", channels: [ { - providerId: "discord", + providerId: "one-signal", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -43,16 +43,13 @@ let value: SubscribersControllerMarkActionAsSeenResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1731985008686", - updatedAt: "1737017481727", - }, - createdAt: "1736353203634", - content: { - type: "text", - content: "", + createdAt: "1708622953211", + updatedAt: "1737082765077", }, + createdAt: "1708591326770", + content: "", transactionId: "", - channel: "chat", + channel: "sms", read: false, seen: false, cta: { diff --git a/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md b/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md index 298b3391..084e4272 100644 --- a/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md +++ b/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md @@ -11,7 +11,7 @@ let value: SubscribersControllerMarkAllUnreadAsReadResponse = { "", ], }, - result: 3687.25, + result: 1965.82, }; ``` diff --git a/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md b/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md index 477b69ec..04dfd059 100644 --- a/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md +++ b/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md @@ -23,7 +23,7 @@ let value: SubscribersControllerMarkMessagesAsResponse = { subscriberId: "", channels: [ { - providerId: "apns", + providerId: "msteams", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -44,22 +44,22 @@ let value: SubscribersControllerMarkMessagesAsResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1713547382628", - updatedAt: "1737049467688", + createdAt: "1726157190958", + updatedAt: "1737032251600", }, - createdAt: "1713267784129", + createdAt: "1720266343526", content: { type: "button", content: "", }, transactionId: "", - channel: "chat", + channel: "in_app", read: false, seen: false, cta: { data: {}, }, - status: "sent", + status: "error", }, ], }; diff --git a/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md b/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md index 96fd0ee1..89d55e7e 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: "apns", + providerId: "getstream", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", diff --git a/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md b/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md index 7fc0cd35..ba10c039 100644 --- a/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md +++ b/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerModifySubscriberChannelResponse = { subscriberId: "", channels: [ { - providerId: "discord", + providerId: "apns", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerModifySubscriberChannelResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1726586733333", - updatedAt: "1737067121302", + createdAt: "1707460037760", + updatedAt: "1737067975325", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md index 644cf8e1..5682230e 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: "pusher-beams", + providerId: "fcm", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md index c8c0ccda..9d05dbdf 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerUpdateSubscriberChannelResponse = { subscriberId: "", channels: [ { - providerId: "apns", + providerId: "pusher-beams", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberChannelResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1716897019648", - updatedAt: "1737046937980", + createdAt: "1727062651612", + updatedAt: "1737041428465", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md index 60bf2d0d..854e3abe 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerUpdateSubscriberOnlineFlagResponse = { subscriberId: "", channels: [ { - providerId: "mattermost", + providerId: "apns", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberOnlineFlagResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1709625398463", - updatedAt: "1737036431563", + createdAt: "1712195391616", + updatedAt: "1737021506484", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md index 6974ce74..22e3ecb1 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md @@ -15,7 +15,7 @@ let value: SubscribersControllerUpdateSubscriberResponse = { subscriberId: "", channels: [ { - providerId: "fcm", + providerId: "slack", credentials: { webhookUrl: "https://example.com/webhook", channel: "general", @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1724862628940", - updatedAt: "1737062481321", + createdAt: "1725038519746", + updatedAt: "1737063251786", }, }; ``` diff --git a/docs/sdks/novu/README.md b/docs/sdks/novu/README.md index e1dd949c..126f4de1 100644 --- a/docs/sdks/novu/README.md +++ b/docs/sdks/novu/README.md @@ -9,238 +9,11 @@ Novu Documentation ### Available Operations -* [healthControllerHealthCheck](#healthcontrollerhealthcheck) -* [testIdempotency](#testidempotency) -* [generateRandomNumber](#generaterandomnumber) * [trigger](#trigger) - Trigger event * [triggerBulk](#triggerbulk) - Bulk trigger event * [triggerBroadcast](#triggerbroadcast) - Broadcast event to all * [cancel](#cancel) - Cancel triggered event -## healthControllerHealthCheck - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.healthControllerHealthCheck(); - - // 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 { healthControllerHealthCheck } from "@novu/api/funcs/healthControllerHealthCheck.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 healthControllerHealthCheck(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\<[operations.HealthControllerHealthCheckResponseBody](../../models/operations/healthcontrollerhealthcheckresponsebody.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| errors.HealthControllerHealthCheckResponseBody | 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## testIdempotency - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.testIdempotency({ - expectedBehavior: "IMMEDIATE_EXCEPTION", - }); - - // 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 { testIdempotency } from "@novu/api/funcs/testIdempotency.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 testIdempotency(novu, { - expectedBehavior: "IMMEDIATE_EXCEPTION", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| 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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.HealthControllerTestIdempotencyResponse](../../models/operations/healthcontrollertestidempotencyresponse.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 | \*/\* | - -## generateRandomNumber - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.generateRandomNumber(); - - // 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 { generateRandomNumber } from "@novu/api/funcs/generateRandomNumber.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 generateRandomNumber(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\<[operations.HealthControllerGenerateRandomNumberResponse](../../models/operations/healthcontrollergeneraterandomnumberresponse.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 | \*/\* | - ## trigger diff --git a/jsr.json b/jsr.json index 60e30e2f..d41c861b 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@novu/api", - "version": "0.0.5", + "version": "0.1.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index a4a29aff..dc3e9216 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@novu/api", - "version": "0.0.5", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@novu/api", - "version": "0.0.5", + "version": "0.1.0", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index 09a9168f..26219d79 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@novu/api", - "version": "0.0.5", + "version": "0.1.0", "author": "Novu", "main": "./index.js", "sideEffects": false, diff --git a/sources/code-samples.yaml b/sources/code-samples.yaml index 62995622..429916e9 100644 --- a/sources/code-samples.yaml +++ b/sources/code-samples.yaml @@ -27,24 +27,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.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.healthControllerHealthCheck();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - - target: $["paths"]["/v1/health-check/test-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.generateRandomNumber();\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.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": diff --git a/sources/json-development.json b/sources/json-development.json index af433cc0..f300fb71 100644 --- a/sources/json-development.json +++ b/sources/json-development.json @@ -1,1134 +1,6 @@ { "openapi": "3.0.0", "paths": { - "/v1/health-check": { - "get": { - "operationId": "HealthController_healthCheck", - "x-ignore": true, - "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 - } - } - } - } - } - } - } - } - } - }, - "/v1/health-check/test-idempotency": { - "post": { - "operationId": "HealthController_testIdempotency", - "x-speakeasy-name-override": "testIdempotency", - "x-ignore": true, - "parameters": [ - { - "name": "idempotency-key", - "in": "header", - "description": "A header for idempotency purposes", - "required": false, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IdempotencyTestingDto" - } - } - } - }, - "responses": { - "201": { - "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/IdempotenceTestingResponse" - } - } - } - }, - "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", - "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" - } - } - } - }, - "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." - } - } - } - } - }, - "security": [ - { - "api-key": [] - } - ] - }, - "get": { - "operationId": "HealthController_generateRandomNumber", - "x-speakeasy-name-override": "generateRandomNumber", - "x-ignore": true, - "parameters": [ - { - "name": "idempotency-key", - "in": "header", - "description": "A header for idempotency purposes", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "201": { - "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/IdempotenceTestingResponse" - } - } - } - }, - "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", - "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" - } - } - } - }, - "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." - } - } - } - } - }, - "security": [ - { - "api-key": [] - } - ] - } - }, "/v1/events/trigger": { "post": { "operationId": "EventsController_trigger", @@ -24761,39 +23633,6 @@ "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" - ] - }, - "IdempotenceTestingResponse": { - "type": "object", - "properties": { - "number": { - "type": "number", - "description": "A unique number representing the idempotency response", - "example": 1 - } - }, - "required": [ - "number" - ] - }, "TriggerEventResponseDto": { "type": "object", "properties": { diff --git a/src/funcs/generateRandomNumber.ts b/src/funcs/generateRandomNumber.ts deleted file mode 100644 index aafe18af..00000000 --- a/src/funcs/generateRandomNumber.ts +++ /dev/null @@ -1,183 +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 generateRandomNumber( - client: NovuCore, - idempotencyKey?: string | undefined, - options?: RequestOptions, -): Promise< - Result< - operations.HealthControllerGenerateRandomNumberResponse, - | errors.ErrorDto - | errors.ErrorDto - | errors.ValidationErrorDto - | errors.ErrorDto - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input: operations.HealthControllerGenerateRandomNumberRequest = { - idempotencyKey: idempotencyKey, - }; - - const parsed = safeParse( - input, - (value) => - operations.HealthControllerGenerateRandomNumberRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/health-check/test-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: "HealthController_generateRandomNumber", - 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.HealthControllerGenerateRandomNumberResponse, - | errors.ErrorDto - | errors.ErrorDto - | errors.ValidationErrorDto - | errors.ErrorDto - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 201, - operations.HealthControllerGenerateRandomNumberResponse$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/healthControllerHealthCheck.ts b/src/funcs/healthControllerHealthCheck.ts deleted file mode 100644 index 2bcb8a9a..00000000 --- a/src/funcs/healthControllerHealthCheck.ts +++ /dev/null @@ -1,153 +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 healthControllerHealthCheck( - client: NovuCore, - idempotencyKey?: string | undefined, - options?: RequestOptions, -): Promise< - Result< - operations.HealthControllerHealthCheckResponseBody, - | errors.HealthControllerHealthCheckResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input: operations.HealthControllerHealthCheckRequest = { - idempotencyKey: idempotencyKey, - }; - - const parsed = safeParse( - input, - (value) => - operations.HealthControllerHealthCheckRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/health-check")(); - - 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: "HealthController_healthCheck", - 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", "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.HealthControllerHealthCheckResponseBody, - | errors.HealthControllerHealthCheckResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - operations.HealthControllerHealthCheckResponseBody$inboundSchema, - ), - M.jsonErr( - 503, - errors.HealthControllerHealthCheckResponseBody$inboundSchema, - ), - M.fail("4XX"), - M.fail("5XX"), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/testIdempotency.ts b/src/funcs/testIdempotency.ts deleted file mode 100644 index 7059b582..00000000 --- a/src/funcs/testIdempotency.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeJSON, 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 * as components from "../models/components/index.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 testIdempotency( - client: NovuCore, - idempotencyTestingDto: components.IdempotencyTestingDto, - idempotencyKey?: string | undefined, - options?: RequestOptions, -): Promise< - Result< - operations.HealthControllerTestIdempotencyResponse, - | errors.ErrorDto - | errors.ErrorDto - | errors.ValidationErrorDto - | errors.ErrorDto - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input: operations.HealthControllerTestIdempotencyRequest = { - idempotencyTestingDto: idempotencyTestingDto, - idempotencyKey: idempotencyKey, - }; - - const parsed = safeParse( - input, - (value) => - operations.HealthControllerTestIdempotencyRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.IdempotencyTestingDto, { - explode: true, - }); - - const path = pathToFunc("/v1/health-check/test-idempotency")(); - - const headers = new Headers(compactMap({ - "Content-Type": "application/json", - 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: "HealthController_testIdempotency", - 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: "POST", - 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.HealthControllerTestIdempotencyResponse, - | errors.ErrorDto - | errors.ErrorDto - | errors.ValidationErrorDto - | errors.ErrorDto - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 201, - operations.HealthControllerTestIdempotencyResponse$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/lib/config.ts b/src/lib/config.ts index 25c02074..caecc54d 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.5", + sdkVersion: "0.1.0", genVersion: "2.493.21", - userAgent: "speakeasy-sdk/typescript 0.0.5 2.493.21 1.0 @novu/api", + userAgent: "speakeasy-sdk/typescript 0.1.0 2.493.21 1.0 @novu/api", } as const; diff --git a/src/models/components/idempotencetestingresponse.ts b/src/models/components/idempotencetestingresponse.ts deleted file mode 100644 index bcccb1e5..00000000 --- a/src/models/components/idempotencetestingresponse.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 IdempotenceTestingResponse = { - /** - * A unique number representing the idempotency response - */ - number: number; -}; - -/** @internal */ -export const IdempotenceTestingResponse$inboundSchema: z.ZodType< - IdempotenceTestingResponse, - z.ZodTypeDef, - unknown -> = z.object({ - number: z.number(), -}); - -/** @internal */ -export type IdempotenceTestingResponse$Outbound = { - number: number; -}; - -/** @internal */ -export const IdempotenceTestingResponse$outboundSchema: z.ZodType< - IdempotenceTestingResponse$Outbound, - z.ZodTypeDef, - IdempotenceTestingResponse -> = 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 IdempotenceTestingResponse$ { - /** @deprecated use `IdempotenceTestingResponse$inboundSchema` instead. */ - export const inboundSchema = IdempotenceTestingResponse$inboundSchema; - /** @deprecated use `IdempotenceTestingResponse$outboundSchema` instead. */ - export const outboundSchema = IdempotenceTestingResponse$outboundSchema; - /** @deprecated use `IdempotenceTestingResponse$Outbound` instead. */ - export type Outbound = IdempotenceTestingResponse$Outbound; -} - -export function idempotenceTestingResponseToJSON( - idempotenceTestingResponse: IdempotenceTestingResponse, -): string { - return JSON.stringify( - IdempotenceTestingResponse$outboundSchema.parse(idempotenceTestingResponse), - ); -} - -export function idempotenceTestingResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => IdempotenceTestingResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'IdempotenceTestingResponse' from JSON`, - ); -} diff --git a/src/models/components/idempotencybehaviorenum.ts b/src/models/components/idempotencybehaviorenum.ts deleted file mode 100644 index 9373d988..00000000 --- a/src/models/components/idempotencybehaviorenum.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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/idempotencytestingdto.ts b/src/models/components/idempotencytestingdto.ts deleted file mode 100644 index f3d3945c..00000000 --- a/src/models/components/idempotencytestingdto.ts +++ /dev/null @@ -1,74 +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"; -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 7051589f..2b7d74d4 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -55,9 +55,6 @@ export * from "./fieldfilterpartdto.js"; export * from "./filtertopicsresponsedto.js"; export * from "./getsubscriberpreferencesresponsedto.js"; export * from "./gettopicresponsedto.js"; -export * from "./idempotencetestingresponse.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 deleted file mode 100644 index 3ec9da54..00000000 --- a/src/models/errors/healthcontrollerhealthcheck.ts +++ /dev/null @@ -1,291 +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 { - 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 aca45b4f..465171e1 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -3,7 +3,6 @@ */ 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/healthcontrollergeneraterandomnumber.ts b/src/models/operations/healthcontrollergeneraterandomnumber.ts deleted file mode 100644 index f6458927..00000000 --- a/src/models/operations/healthcontrollergeneraterandomnumber.ts +++ /dev/null @@ -1,177 +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 HealthControllerGenerateRandomNumberRequest = { - /** - * A header for idempotency purposes - */ - idempotencyKey?: string | undefined; -}; - -export type HealthControllerGenerateRandomNumberResponse = { - headers: { [k: string]: Array }; - result: components.IdempotenceTestingResponse; -}; - -/** @internal */ -export const HealthControllerGenerateRandomNumberRequest$inboundSchema: - z.ZodType< - HealthControllerGenerateRandomNumberRequest, - z.ZodTypeDef, - unknown - > = z.object({ - "idempotency-key": z.string().optional(), - }).transform((v) => { - return remap$(v, { - "idempotency-key": "idempotencyKey", - }); - }); - -/** @internal */ -export type HealthControllerGenerateRandomNumberRequest$Outbound = { - "idempotency-key"?: string | undefined; -}; - -/** @internal */ -export const HealthControllerGenerateRandomNumberRequest$outboundSchema: - z.ZodType< - HealthControllerGenerateRandomNumberRequest$Outbound, - z.ZodTypeDef, - HealthControllerGenerateRandomNumberRequest - > = 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 HealthControllerGenerateRandomNumberRequest$ { - /** @deprecated use `HealthControllerGenerateRandomNumberRequest$inboundSchema` instead. */ - export const inboundSchema = - HealthControllerGenerateRandomNumberRequest$inboundSchema; - /** @deprecated use `HealthControllerGenerateRandomNumberRequest$outboundSchema` instead. */ - export const outboundSchema = - HealthControllerGenerateRandomNumberRequest$outboundSchema; - /** @deprecated use `HealthControllerGenerateRandomNumberRequest$Outbound` instead. */ - export type Outbound = HealthControllerGenerateRandomNumberRequest$Outbound; -} - -export function healthControllerGenerateRandomNumberRequestToJSON( - healthControllerGenerateRandomNumberRequest: - HealthControllerGenerateRandomNumberRequest, -): string { - return JSON.stringify( - HealthControllerGenerateRandomNumberRequest$outboundSchema.parse( - healthControllerGenerateRandomNumberRequest, - ), - ); -} - -export function healthControllerGenerateRandomNumberRequestFromJSON( - jsonString: string, -): SafeParseResult< - HealthControllerGenerateRandomNumberRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - HealthControllerGenerateRandomNumberRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'HealthControllerGenerateRandomNumberRequest' from JSON`, - ); -} - -/** @internal */ -export const HealthControllerGenerateRandomNumberResponse$inboundSchema: - z.ZodType< - HealthControllerGenerateRandomNumberResponse, - z.ZodTypeDef, - unknown - > = z.object({ - Headers: z.record(z.array(z.string())), - Result: components.IdempotenceTestingResponse$inboundSchema, - }).transform((v) => { - return remap$(v, { - "Headers": "headers", - "Result": "result", - }); - }); - -/** @internal */ -export type HealthControllerGenerateRandomNumberResponse$Outbound = { - Headers: { [k: string]: Array }; - Result: components.IdempotenceTestingResponse$Outbound; -}; - -/** @internal */ -export const HealthControllerGenerateRandomNumberResponse$outboundSchema: - z.ZodType< - HealthControllerGenerateRandomNumberResponse$Outbound, - z.ZodTypeDef, - HealthControllerGenerateRandomNumberResponse - > = z.object({ - headers: z.record(z.array(z.string())), - result: components.IdempotenceTestingResponse$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 HealthControllerGenerateRandomNumberResponse$ { - /** @deprecated use `HealthControllerGenerateRandomNumberResponse$inboundSchema` instead. */ - export const inboundSchema = - HealthControllerGenerateRandomNumberResponse$inboundSchema; - /** @deprecated use `HealthControllerGenerateRandomNumberResponse$outboundSchema` instead. */ - export const outboundSchema = - HealthControllerGenerateRandomNumberResponse$outboundSchema; - /** @deprecated use `HealthControllerGenerateRandomNumberResponse$Outbound` instead. */ - export type Outbound = HealthControllerGenerateRandomNumberResponse$Outbound; -} - -export function healthControllerGenerateRandomNumberResponseToJSON( - healthControllerGenerateRandomNumberResponse: - HealthControllerGenerateRandomNumberResponse, -): string { - return JSON.stringify( - HealthControllerGenerateRandomNumberResponse$outboundSchema.parse( - healthControllerGenerateRandomNumberResponse, - ), - ); -} - -export function healthControllerGenerateRandomNumberResponseFromJSON( - jsonString: string, -): SafeParseResult< - HealthControllerGenerateRandomNumberResponse, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - HealthControllerGenerateRandomNumberResponse$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'HealthControllerGenerateRandomNumberResponse' from JSON`, - ); -} diff --git a/src/models/operations/healthcontrollerhealthcheck.ts b/src/models/operations/healthcontrollerhealthcheck.ts deleted file mode 100644 index f5b2daf3..00000000 --- a/src/models/operations/healthcontrollerhealthcheck.ts +++ /dev/null @@ -1,358 +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 { - 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 deleted file mode 100644 index be130eeb..00000000 --- a/src/models/operations/healthcontrollertestidempotency.ts +++ /dev/null @@ -1,174 +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 HealthControllerTestIdempotencyRequest = { - /** - * A header for idempotency purposes - */ - idempotencyKey?: string | undefined; - idempotencyTestingDto: components.IdempotencyTestingDto; -}; - -export type HealthControllerTestIdempotencyResponse = { - headers: { [k: string]: Array }; - result: components.IdempotenceTestingResponse; -}; - -/** @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())), - Result: components.IdempotenceTestingResponse$inboundSchema, -}).transform((v) => { - return remap$(v, { - "Headers": "headers", - "Result": "result", - }); -}); - -/** @internal */ -export type HealthControllerTestIdempotencyResponse$Outbound = { - Headers: { [k: string]: Array }; - Result: components.IdempotenceTestingResponse$Outbound; -}; - -/** @internal */ -export const HealthControllerTestIdempotencyResponse$outboundSchema: z.ZodType< - HealthControllerTestIdempotencyResponse$Outbound, - z.ZodTypeDef, - HealthControllerTestIdempotencyResponse -> = z.object({ - headers: z.record(z.array(z.string())), - result: components.IdempotenceTestingResponse$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 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 92e01d6c..41d6abdb 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -6,9 +6,6 @@ export * from "./eventscontrollerbroadcasteventtoall.js"; export * from "./eventscontrollercancel.js"; export * from "./eventscontrollertrigger.js"; export * from "./eventscontrollertriggerbulk.js"; -export * from "./healthcontrollergeneraterandomnumber.js"; -export * from "./healthcontrollerhealthcheck.js"; -export * from "./healthcontrollertestidempotency.js"; export * from "./integrationscontrollercreateintegration.js"; export * from "./integrationscontrollergetactiveintegrations.js"; export * from "./integrationscontrollergetwebhooksupportstatus.js"; diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index ace7d824..758be59c 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -3,9 +3,6 @@ */ import { cancel } from "../funcs/cancel.js"; -import { generateRandomNumber } from "../funcs/generateRandomNumber.js"; -import { healthControllerHealthCheck } from "../funcs/healthControllerHealthCheck.js"; -import { testIdempotency } from "../funcs/testIdempotency.js"; import { trigger } from "../funcs/trigger.js"; import { triggerBroadcast } from "../funcs/triggerBroadcast.js"; import { triggerBulk } from "../funcs/triggerBulk.js"; @@ -45,41 +42,6 @@ export class Novu extends ClientSDK { return (this._topics ??= new Topics(this._options)); } - async healthControllerHealthCheck( - idempotencyKey?: string | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(healthControllerHealthCheck( - this, - idempotencyKey, - options, - )); - } - - async testIdempotency( - idempotencyTestingDto: components.IdempotencyTestingDto, - idempotencyKey?: string | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(testIdempotency( - this, - idempotencyTestingDto, - idempotencyKey, - options, - )); - } - - async generateRandomNumber( - idempotencyKey?: string | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(generateRandomNumber( - this, - idempotencyKey, - options, - )); - } - /** * Trigger event *