From d2ef5924c4623cf4be4b4d311ab5c25062d6d5c0 Mon Sep 17 00:00:00 2001 From: GalTidhar <39020298+tatarco@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:23:46 +0100 Subject: [PATCH] relaunch (#33) --- .speakeasy/gen.lock | 7 +- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +-- .../components/activitiesresponsedto.md | 4 +- .../components/activitygraphstatesresponse.md | 4 +- .../activitygraphstatesresponsechannels.md | 2 +- .../components/activitystatsresponsedto.md | 4 +- docs/models/components/backoffunit.md | 2 +- .../components/bulksubscribercreatedto.md | 6 +- docs/models/components/bulktriggereventdto.md | 3 +- docs/models/components/channel.md | 2 +- docs/models/components/channelcredentials.md | 2 +- .../components/channelcredentialsdto.md | 8 +- docs/models/components/channelpreference.md | 2 +- .../components/channelpreferencetype.md | 2 +- docs/models/components/channels.md | 2 +- docs/models/components/channelsettings.md | 16 ++-- .../components/channelsettingsproviderid.md | 17 ---- .../components/createintegrationrequestdto.md | 2 +- .../createintegrationrequestdtochannel.md | 2 +- .../components/createsubscriberrequestdto.md | 16 ++-- .../createsubscriberrequestdtodata.md | 2 +- .../components/delayregularmetadataunit.md | 2 +- .../components/digestregularmetadatatype.md | 2 +- .../components/digesttimedmetadataunit.md | 2 +- docs/models/components/emailblockstyles.md | 2 +- docs/models/components/emailblocktype.md | 2 +- .../components/executiondetailsresponsedto.md | 6 +- docs/models/components/feedresponsedto.md | 4 +- docs/models/components/fieldfilterpart.md | 4 +- .../components/filtertopicsresponsedto.md | 6 +- .../components/integrationresponsedto.md | 2 +- .../integrationresponsedtochannel.md | 2 +- .../markallmessageasrequestdtomarkas.md | 2 +- docs/models/components/markas.md | 2 +- docs/models/components/messageactionstatus.md | 2 +- .../components/messagemarkasrequestdto.md | 2 +- docs/models/components/messageresponsedto.md | 9 +- .../components/messageresponsedtochannel.md | 2 +- .../components/messageresponsedtostatus.md | 2 +- docs/models/components/monthlytype.md | 2 +- docs/models/components/operator.md | 2 +- docs/models/components/ordinal.md | 2 +- docs/models/components/ordinalvalue.md | 2 +- docs/models/components/providerid.md | 11 ++- docs/models/components/source.md | 2 +- docs/models/components/status.md | 2 +- docs/models/components/stepfilter.md | 8 +- docs/models/components/stepfiltertype.md | 2 +- .../models/components/subscriberchanneldto.md | 8 +- .../models/components/subscriberpayloaddto.md | 16 ++-- docs/models/components/textalign.md | 2 +- docs/models/components/unit.md | 2 +- docs/models/components/unseencountresponse.md | 2 +- .../updatesubscriberchannelrequestdto.md | 4 +- ...tesubscriberchannelrequestdtoproviderid.md | 2 +- docs/models/components/value.md | 2 +- docs/models/components/weekdays.md | 2 +- docs/models/components/workflowresponse.md | 2 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- sources/json-development.json | 85 ++++++++++++++----- src/lib/config.ts | 4 +- .../components/bulksubscribercreatedto.ts | 3 + .../components/channelcredentialsdto.ts | 6 ++ src/models/components/channelsettings.ts | 32 +++---- .../components/createsubscriberrequestdto.ts | 22 ++++- src/models/components/subscriberchanneldto.ts | 63 +++----------- src/models/components/subscriberpayloaddto.ts | 22 ++++- 70 files changed, 265 insertions(+), 227 deletions(-) delete mode 100644 docs/models/components/channelsettingsproviderid.md diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index e98603fb..5e2e8322 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 6bff3a53-3f0b-40b4-942f-ff70dc583ae5 management: - docChecksum: a4c968a941c2a70a0b9dc69fc32824f6 + docChecksum: c80170a573b597fb86409c24caaf5768 docVersion: "1.0" speakeasyVersion: 1.451.1 generationVersion: 2.470.1 - releaseVersion: 0.0.1-alpha.49 - configChecksum: cd5955a27ad9c6d63f20386dd1c0d1ae + releaseVersion: 0.0.1-alpha.51 + configChecksum: ff1ed64ee49c5df31c8a02844f336ee5 published: true features: typescript: @@ -59,7 +59,6 @@ generatedFiles: - docs/models/components/channelpreferencetype.md - docs/models/components/channels.md - docs/models/components/channelsettings.md - - docs/models/components/channelsettingsproviderid.md - docs/models/components/content.md - docs/models/components/controls.md - docs/models/components/createintegrationrequestdto.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index cfdb7a61..db1e4d10 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false typescript: - version: 0.0.1-alpha.49 + version: 0.0.1-alpha.51 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 8dad8f8a..0d096f99 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.451.1 sources: json-development: sourceNamespace: json-development - sourceRevisionDigest: sha256:2a48dbb7b26846c65c91bcbbf6a00e2caae34bed35d6783113dbf8f9eafc6b26 - sourceBlobDigest: sha256:8bf9ac8f56e9b783c1d587a0283d6b4c3bed24c6ee63b181831b3a3440e96425 + sourceRevisionDigest: sha256:8f0009bb0f06e2d8e222d20dcad1c3d2f8ce41dcd3300740bb4314adcff38576 + sourceBlobDigest: sha256:431b08ef9d3ec5aefc9282bb31272647c54513deae9a753b411420340f106d4b tags: - latest - "1.0" @@ -11,10 +11,10 @@ targets: my-first-target: source: json-development sourceNamespace: json-development - sourceRevisionDigest: sha256:2a48dbb7b26846c65c91bcbbf6a00e2caae34bed35d6783113dbf8f9eafc6b26 - sourceBlobDigest: sha256:8bf9ac8f56e9b783c1d587a0283d6b4c3bed24c6ee63b181831b3a3440e96425 + sourceRevisionDigest: sha256:8f0009bb0f06e2d8e222d20dcad1c3d2f8ce41dcd3300740bb4314adcff38576 + sourceBlobDigest: sha256:431b08ef9d3ec5aefc9282bb31272647c54513deae9a753b411420340f106d4b codeSamplesNamespace: code-samples-typescript - codeSamplesRevisionDigest: sha256:615ee2362175484c0efe9e70554cef37f6c4602224846a2bc0a0893536a54b41 + codeSamplesRevisionDigest: sha256:1ed7a6887524cc5469aa86bb6ce08a216f8190679ac47debb608e29640b8141b workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/docs/models/components/activitiesresponsedto.md b/docs/models/components/activitiesresponsedto.md index 98f250a5..9f2b0b60 100644 --- a/docs/models/components/activitiesresponsedto.md +++ b/docs/models/components/activitiesresponsedto.md @@ -14,8 +14,8 @@ let value: ActivitiesResponseDto = { transactionId: "", }, ], - pageSize: 4686.51, - page: 9767.61, + pageSize: 9767.61, + page: 6048.46, }; ``` diff --git a/docs/models/components/activitygraphstatesresponse.md b/docs/models/components/activitygraphstatesresponse.md index 1f115618..8052d9e9 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: 1201.97, + count: 2961.40, templates: [ "", ], channels: [ - "email", + "in_app", ], }; ``` diff --git a/docs/models/components/activitygraphstatesresponsechannels.md b/docs/models/components/activitygraphstatesresponsechannels.md index 3ce2d26f..ad0da7ea 100644 --- a/docs/models/components/activitygraphstatesresponsechannels.md +++ b/docs/models/components/activitygraphstatesresponsechannels.md @@ -5,7 +5,7 @@ ```typescript import { ActivityGraphStatesResponseChannels } from "@novu/api/models/components"; -let value: ActivityGraphStatesResponseChannels = "email"; +let value: ActivityGraphStatesResponseChannels = "in_app"; ``` ## Values diff --git a/docs/models/components/activitystatsresponsedto.md b/docs/models/components/activitystatsresponsedto.md index 0f104ae0..46aee20a 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: 7392.64, - monthlySent: 391.88, + weeklySent: 391.88, + monthlySent: 2828.07, }; ``` diff --git a/docs/models/components/backoffunit.md b/docs/models/components/backoffunit.md index a7ea32ff..797a4899 100644 --- a/docs/models/components/backoffunit.md +++ b/docs/models/components/backoffunit.md @@ -5,7 +5,7 @@ ```typescript import { BackoffUnit } from "@novu/api/models/components"; -let value: BackoffUnit = "weeks"; +let value: BackoffUnit = "hours"; ``` ## Values diff --git a/docs/models/components/bulksubscribercreatedto.md b/docs/models/components/bulksubscribercreatedto.md index 497e5fb5..c81e7ebe 100644 --- a/docs/models/components/bulksubscribercreatedto.md +++ b/docs/models/components/bulksubscribercreatedto.md @@ -14,6 +14,6 @@ let value: BulkSubscriberCreateDto = { ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `subscribers` | *string*[] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `subscribers` | *string*[] | :heavy_check_mark: | An array of subscribers to be created in bulk. | \ No newline at end of file diff --git a/docs/models/components/bulktriggereventdto.md b/docs/models/components/bulktriggereventdto.md index 704b41db..352e94d5 100644 --- a/docs/models/components/bulktriggereventdto.md +++ b/docs/models/components/bulktriggereventdto.md @@ -18,7 +18,8 @@ let value: BulkTriggerEventDto = { overrides: {}, to: [ { - subscriberId: "", + topicKey: "", + type: "Topic", }, ], }, diff --git a/docs/models/components/channel.md b/docs/models/components/channel.md index f35f4ab0..0f6af4c2 100644 --- a/docs/models/components/channel.md +++ b/docs/models/components/channel.md @@ -5,7 +5,7 @@ ```typescript import { Channel } from "@novu/api/models/components"; -let value: Channel = "chat"; +let value: Channel = "delay"; ``` ## Values diff --git a/docs/models/components/channelcredentials.md b/docs/models/components/channelcredentials.md index 926b05d6..a4462dc6 100644 --- a/docs/models/components/channelcredentials.md +++ b/docs/models/components/channelcredentials.md @@ -6,7 +6,7 @@ import { ChannelCredentials } from "@novu/api/models/components"; let value: ChannelCredentials = { - webhookUrl: "https://remarkable-dream.net/", + webhookUrl: "https://finished-receptor.org", }; ``` diff --git a/docs/models/components/channelcredentialsdto.md b/docs/models/components/channelcredentialsdto.md index b96e5ed0..7ac42e14 100644 --- a/docs/models/components/channelcredentialsdto.md +++ b/docs/models/components/channelcredentialsdto.md @@ -10,7 +10,7 @@ let value: ChannelCredentialsDto = {}; ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `webhookUrl` | *string* | :heavy_minus_sign: | N/A | -| `deviceTokens` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `webhookUrl` | *string* | :heavy_minus_sign: | The URL for the webhook associated with the channel. | +| `deviceTokens` | *string*[] | :heavy_minus_sign: | An array of device tokens for push notifications. | \ No newline at end of file diff --git a/docs/models/components/channelpreference.md b/docs/models/components/channelpreference.md index ddd3acb6..b8b6c187 100644 --- a/docs/models/components/channelpreference.md +++ b/docs/models/components/channelpreference.md @@ -6,7 +6,7 @@ import { ChannelPreference } from "@novu/api/models/components"; let value: ChannelPreference = { - type: "push", + type: "chat", enabled: false, }; ``` diff --git a/docs/models/components/channelpreferencetype.md b/docs/models/components/channelpreferencetype.md index 3fe32c71..11daab10 100644 --- a/docs/models/components/channelpreferencetype.md +++ b/docs/models/components/channelpreferencetype.md @@ -7,7 +7,7 @@ The type of channel that is enabled or not ```typescript import { ChannelPreferenceType } from "@novu/api/models/components"; -let value: ChannelPreferenceType = "sms"; +let value: ChannelPreferenceType = "push"; ``` ## Values diff --git a/docs/models/components/channels.md b/docs/models/components/channels.md index 4f487bef..880793c2 100644 --- a/docs/models/components/channels.md +++ b/docs/models/components/channels.md @@ -5,7 +5,7 @@ ```typescript import { Channels } from "@novu/api/models/components"; -let value: Channels = "digest"; +let value: Channels = "trigger"; ``` ## Values diff --git a/docs/models/components/channelsettings.md b/docs/models/components/channelsettings.md index 114e35c6..ec7684c0 100644 --- a/docs/models/components/channelsettings.md +++ b/docs/models/components/channelsettings.md @@ -6,9 +6,9 @@ import { ChannelSettings } from "@novu/api/models/components"; let value: ChannelSettings = { - providerId: "ryver", + providerId: "mattermost", credentials: { - webhookUrl: "https://outrageous-agreement.net/", + webhookUrl: "https://ajar-solvency.com", }, integrationId: "", }; @@ -16,9 +16,9 @@ let value: ChannelSettings = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `providerId` | [components.ChannelSettingsProviderId](../../models/components/channelsettingsproviderid.md) | :heavy_check_mark: | The provider identifier for the credentials | -| `integrationIdentifier` | *string* | :heavy_minus_sign: | The integration identifier | -| `credentials` | [components.ChannelCredentials](../../models/components/channelcredentials.md) | :heavy_check_mark: | Credentials payload for the specified provider | -| `integrationId` | *string* | :heavy_check_mark: | Id of the integration that is used for this channel | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `providerId` | [components.ProviderId](../../models/components/providerid.md) | :heavy_check_mark: | The provider identifier for the credentials | +| `integrationIdentifier` | *string* | :heavy_minus_sign: | The integration identifier | +| `credentials` | [components.ChannelCredentials](../../models/components/channelcredentials.md) | :heavy_check_mark: | Credentials payload for the specified provider | +| `integrationId` | *string* | :heavy_check_mark: | Id of the integration that is used for this channel | \ No newline at end of file diff --git a/docs/models/components/channelsettingsproviderid.md b/docs/models/components/channelsettingsproviderid.md deleted file mode 100644 index d187df3d..00000000 --- a/docs/models/components/channelsettingsproviderid.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChannelSettingsProviderId - -The provider identifier for the credentials - -## Example Usage - -```typescript -import { ChannelSettingsProviderId } from "@novu/api/models/components"; - -let value: ChannelSettingsProviderId = "expo"; -``` - -## Values - -```typescript -"slack" | "discord" | "msteams" | "mattermost" | "ryver" | "zulip" | "grafana-on-call" | "getstream" | "rocket-chat" | "whatsapp-business" | "fcm" | "apns" | "expo" | "one-signal" | "pushpad" | "push-webhook" | "pusher-beams" -``` \ No newline at end of file diff --git a/docs/models/components/createintegrationrequestdto.md b/docs/models/components/createintegrationrequestdto.md index bd139130..65b94eb8 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: "in_app", + channel: "chat", }; ``` diff --git a/docs/models/components/createintegrationrequestdtochannel.md b/docs/models/components/createintegrationrequestdtochannel.md index 392c445a..c908a7b9 100644 --- a/docs/models/components/createintegrationrequestdtochannel.md +++ b/docs/models/components/createintegrationrequestdtochannel.md @@ -5,7 +5,7 @@ ```typescript import { CreateIntegrationRequestDtoChannel } from "@novu/api/models/components"; -let value: CreateIntegrationRequestDtoChannel = "chat"; +let value: CreateIntegrationRequestDtoChannel = "in_app"; ``` ## Values diff --git a/docs/models/components/createsubscriberrequestdto.md b/docs/models/components/createsubscriberrequestdto.md index 60446d12..6a32c0a9 100644 --- a/docs/models/components/createsubscriberrequestdto.md +++ b/docs/models/components/createsubscriberrequestdto.md @@ -15,11 +15,11 @@ let value: CreateSubscriberRequestDto = { | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | `subscriberId` | *string* | :heavy_check_mark: | The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems | -| `email` | *string* | :heavy_minus_sign: | N/A | -| `firstName` | *string* | :heavy_minus_sign: | N/A | -| `lastName` | *string* | :heavy_minus_sign: | N/A | -| `phone` | *string* | :heavy_minus_sign: | N/A | -| `avatar` | *string* | :heavy_minus_sign: | An http url to the profile image of your subscriber | -| `locale` | *string* | :heavy_minus_sign: | N/A | -| `data` | Record | :heavy_minus_sign: | An optional payload object that can contain any properties | -| `channels` | [components.SubscriberChannelDto](../../models/components/subscriberchanneldto.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `email` | *string* | :heavy_minus_sign: | The email address of the subscriber. | +| `firstName` | *string* | :heavy_minus_sign: | The first name of the subscriber. | +| `lastName` | *string* | :heavy_minus_sign: | The last name of the subscriber. | +| `phone` | *string* | :heavy_minus_sign: | The phone number of the subscriber. | +| `avatar` | *string* | :heavy_minus_sign: | An HTTP URL to the profile image of your subscriber. | +| `locale` | *string* | :heavy_minus_sign: | The locale of the subscriber. | +| `data` | Record | :heavy_minus_sign: | An optional payload object that can contain any properties. | +| `channels` | [components.SubscriberChannelDto](../../models/components/subscriberchanneldto.md)[] | :heavy_minus_sign: | An optional array of subscriber channels. | \ No newline at end of file diff --git a/docs/models/components/createsubscriberrequestdtodata.md b/docs/models/components/createsubscriberrequestdtodata.md index 093a1ed0..06ff9e32 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 = 9621.89; +const value: number = 2487.53; ``` diff --git a/docs/models/components/delayregularmetadataunit.md b/docs/models/components/delayregularmetadataunit.md index 579f0e83..8e7bc010 100644 --- a/docs/models/components/delayregularmetadataunit.md +++ b/docs/models/components/delayregularmetadataunit.md @@ -5,7 +5,7 @@ ```typescript import { DelayRegularMetadataUnit } from "@novu/api/models/components"; -let value: DelayRegularMetadataUnit = "hours"; +let value: DelayRegularMetadataUnit = "minutes"; ``` ## Values diff --git a/docs/models/components/digestregularmetadatatype.md b/docs/models/components/digestregularmetadatatype.md index 6830975b..5ec02ff1 100644 --- a/docs/models/components/digestregularmetadatatype.md +++ b/docs/models/components/digestregularmetadatatype.md @@ -5,7 +5,7 @@ ```typescript import { DigestRegularMetadataType } from "@novu/api/models/components"; -let value: DigestRegularMetadataType = "backoff"; +let value: DigestRegularMetadataType = "regular"; ``` ## Values diff --git a/docs/models/components/digesttimedmetadataunit.md b/docs/models/components/digesttimedmetadataunit.md index 6f392cc4..723eeed7 100644 --- a/docs/models/components/digesttimedmetadataunit.md +++ b/docs/models/components/digesttimedmetadataunit.md @@ -5,7 +5,7 @@ ```typescript import { DigestTimedMetadataUnit } from "@novu/api/models/components"; -let value: DigestTimedMetadataUnit = "hours"; +let value: DigestTimedMetadataUnit = "minutes"; ``` ## Values diff --git a/docs/models/components/emailblockstyles.md b/docs/models/components/emailblockstyles.md index 8ddbd4e2..265e7a28 100644 --- a/docs/models/components/emailblockstyles.md +++ b/docs/models/components/emailblockstyles.md @@ -6,7 +6,7 @@ import { EmailBlockStyles } from "@novu/api/models/components"; let value: EmailBlockStyles = { - textAlign: "center", + textAlign: "left", }; ``` diff --git a/docs/models/components/emailblocktype.md b/docs/models/components/emailblocktype.md index 63e25e19..92ba8c90 100644 --- a/docs/models/components/emailblocktype.md +++ b/docs/models/components/emailblocktype.md @@ -5,7 +5,7 @@ ```typescript import { EmailBlockType } from "@novu/api/models/components"; -let value: EmailBlockType = "text"; +let value: EmailBlockType = "button"; ``` ## Values diff --git a/docs/models/components/executiondetailsresponsedto.md b/docs/models/components/executiondetailsresponsedto.md index 20dc2997..62471cb7 100644 --- a/docs/models/components/executiondetailsresponsedto.md +++ b/docs/models/components/executiondetailsresponsedto.md @@ -13,10 +13,10 @@ let value: ExecutionDetailsResponseDto = { notificationTemplateId: "", subscriberId: "", transactionId: "", - channel: "delay", + channel: "in_app", detail: "", - source: "Credentials", - status: "ReadConfirmation", + source: "Webhook", + status: "Failed", isTest: false, isRetry: false, }; diff --git a/docs/models/components/feedresponsedto.md b/docs/models/components/feedresponsedto.md index c8a09ed7..17a22597 100644 --- a/docs/models/components/feedresponsedto.md +++ b/docs/models/components/feedresponsedto.md @@ -10,8 +10,8 @@ let value: FeedResponseDto = { data: [ "", ], - pageSize: 6994.79, - page: 2974.37, + pageSize: 2974.37, + page: 8137.98, }; ``` diff --git a/docs/models/components/fieldfilterpart.md b/docs/models/components/fieldfilterpart.md index c1c68277..c8c2e97b 100644 --- a/docs/models/components/fieldfilterpart.md +++ b/docs/models/components/fieldfilterpart.md @@ -8,8 +8,8 @@ import { FieldFilterPart } from "@novu/api/models/components"; let value: FieldFilterPart = { field: "", value: "", - operator: "IN", - on: "subscriber", + operator: "EQUAL", + on: "payload", }; ``` diff --git a/docs/models/components/filtertopicsresponsedto.md b/docs/models/components/filtertopicsresponsedto.md index 09083966..34dc2c79 100644 --- a/docs/models/components/filtertopicsresponsedto.md +++ b/docs/models/components/filtertopicsresponsedto.md @@ -17,9 +17,9 @@ let value: FilterTopicsResponseDto = { ], }, ], - page: 580.29, - pageSize: 4344.17, - totalCount: 3117.96, + page: 3117.96, + pageSize: 6963.43, + totalCount: 3777.52, }; ``` diff --git a/docs/models/components/integrationresponsedto.md b/docs/models/components/integrationresponsedto.md index 9caab798..6e1a89c8 100644 --- a/docs/models/components/integrationresponsedto.md +++ b/docs/models/components/integrationresponsedto.md @@ -11,7 +11,7 @@ let value: IntegrationResponseDto = { name: "", identifier: "", providerId: "", - channel: "email", + channel: "sms", credentials: {}, active: false, deleted: false, diff --git a/docs/models/components/integrationresponsedtochannel.md b/docs/models/components/integrationresponsedtochannel.md index ada44153..57607f6e 100644 --- a/docs/models/components/integrationresponsedtochannel.md +++ b/docs/models/components/integrationresponsedtochannel.md @@ -5,7 +5,7 @@ ```typescript import { IntegrationResponseDtoChannel } from "@novu/api/models/components"; -let value: IntegrationResponseDtoChannel = "in_app"; +let value: IntegrationResponseDtoChannel = "email"; ``` ## Values diff --git a/docs/models/components/markallmessageasrequestdtomarkas.md b/docs/models/components/markallmessageasrequestdtomarkas.md index e6c8a0f7..815bb15d 100644 --- a/docs/models/components/markallmessageasrequestdtomarkas.md +++ b/docs/models/components/markallmessageasrequestdtomarkas.md @@ -7,7 +7,7 @@ Mark all subscriber messages as read, unread, seen or unseen ```typescript import { MarkAllMessageAsRequestDtoMarkAs } from "@novu/api/models/components"; -let value: MarkAllMessageAsRequestDtoMarkAs = "unseen"; +let value: MarkAllMessageAsRequestDtoMarkAs = "unread"; ``` ## Values diff --git a/docs/models/components/markas.md b/docs/models/components/markas.md index 63197c56..45c389ae 100644 --- a/docs/models/components/markas.md +++ b/docs/models/components/markas.md @@ -5,7 +5,7 @@ ```typescript import { MarkAs } from "@novu/api/models/components"; -let value: MarkAs = "seen"; +let value: MarkAs = "unseen"; ``` ## Values diff --git a/docs/models/components/messageactionstatus.md b/docs/models/components/messageactionstatus.md index c039a55b..8429b4bd 100644 --- a/docs/models/components/messageactionstatus.md +++ b/docs/models/components/messageactionstatus.md @@ -5,7 +5,7 @@ ```typescript import { MessageActionStatus } from "@novu/api/models/components"; -let value: MessageActionStatus = "pending"; +let value: MessageActionStatus = "done"; ``` ## Values diff --git a/docs/models/components/messagemarkasrequestdto.md b/docs/models/components/messagemarkasrequestdto.md index 7a8a3575..b1acfe49 100644 --- a/docs/models/components/messagemarkasrequestdto.md +++ b/docs/models/components/messagemarkasrequestdto.md @@ -9,7 +9,7 @@ let value: MessageMarkAsRequestDto = { messageId: [ "", ], - markAs: "unread", + markAs: "unseen", }; ``` diff --git a/docs/models/components/messageresponsedto.md b/docs/models/components/messageresponsedto.md index 544b5ad3..16def5fa 100644 --- a/docs/models/components/messageresponsedto.md +++ b/docs/models/components/messageresponsedto.md @@ -13,15 +13,18 @@ let value: MessageResponseDto = { notificationId: "", subscriberId: "", createdAt: "", - content: "", + content: { + type: "text", + content: "", + }, transactionId: "", - channel: "sms", + channel: "in_app", read: false, seen: false, cta: { data: {}, }, - status: "error", + status: "sent", errorId: "", errorText: "", payload: {}, diff --git a/docs/models/components/messageresponsedtochannel.md b/docs/models/components/messageresponsedtochannel.md index 1e367bec..75481356 100644 --- a/docs/models/components/messageresponsedtochannel.md +++ b/docs/models/components/messageresponsedtochannel.md @@ -5,7 +5,7 @@ ```typescript import { MessageResponseDtoChannel } from "@novu/api/models/components"; -let value: MessageResponseDtoChannel = "sms"; +let value: MessageResponseDtoChannel = "push"; ``` ## Values diff --git a/docs/models/components/messageresponsedtostatus.md b/docs/models/components/messageresponsedtostatus.md index d2a8d2eb..6dfecfd1 100644 --- a/docs/models/components/messageresponsedtostatus.md +++ b/docs/models/components/messageresponsedtostatus.md @@ -5,7 +5,7 @@ ```typescript import { MessageResponseDtoStatus } from "@novu/api/models/components"; -let value: MessageResponseDtoStatus = "warning"; +let value: MessageResponseDtoStatus = "error"; ``` ## Values diff --git a/docs/models/components/monthlytype.md b/docs/models/components/monthlytype.md index 8b6ac551..3113ba7f 100644 --- a/docs/models/components/monthlytype.md +++ b/docs/models/components/monthlytype.md @@ -5,7 +5,7 @@ ```typescript import { MonthlyType } from "@novu/api/models/components"; -let value: MonthlyType = "on"; +let value: MonthlyType = "each"; ``` ## Values diff --git a/docs/models/components/operator.md b/docs/models/components/operator.md index 03cb6eec..4d9a5b40 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 = "SMALLER"; +let value: Operator = "NOT_IN"; ``` ## Values diff --git a/docs/models/components/ordinal.md b/docs/models/components/ordinal.md index d30ab30d..ae4e7742 100644 --- a/docs/models/components/ordinal.md +++ b/docs/models/components/ordinal.md @@ -5,7 +5,7 @@ ```typescript import { Ordinal } from "@novu/api/models/components"; -let value: Ordinal = "2"; +let value: Ordinal = "5"; ``` ## Values diff --git a/docs/models/components/ordinalvalue.md b/docs/models/components/ordinalvalue.md index 31c73e0b..1d189ed0 100644 --- a/docs/models/components/ordinalvalue.md +++ b/docs/models/components/ordinalvalue.md @@ -5,7 +5,7 @@ ```typescript import { OrdinalValue } from "@novu/api/models/components"; -let value: OrdinalValue = "saturday"; +let value: OrdinalValue = "monday"; ``` ## Values diff --git a/docs/models/components/providerid.md b/docs/models/components/providerid.md index e0e20cfa..d9bbdbd0 100644 --- a/docs/models/components/providerid.md +++ b/docs/models/components/providerid.md @@ -1,14 +1,17 @@ # ProviderId +The provider identifier for the credentials + ## Example Usage ```typescript import { ProviderId } from "@novu/api/models/components"; -let value: ProviderId = {}; +let value: ProviderId = "ryver"; ``` -## Fields +## Values -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file +```typescript +"slack" | "discord" | "msteams" | "mattermost" | "ryver" | "zulip" | "grafana-on-call" | "getstream" | "rocket-chat" | "whatsapp-business" | "fcm" | "apns" | "expo" | "one-signal" | "pushpad" | "push-webhook" | "pusher-beams" +``` \ No newline at end of file diff --git a/docs/models/components/source.md b/docs/models/components/source.md index 5c214fea..cc43d1f7 100644 --- a/docs/models/components/source.md +++ b/docs/models/components/source.md @@ -5,7 +5,7 @@ ```typescript import { Source } from "@novu/api/models/components"; -let value: Source = "Webhook"; +let value: Source = "Credentials"; ``` ## Values diff --git a/docs/models/components/status.md b/docs/models/components/status.md index b771c2d0..37cc848a 100644 --- a/docs/models/components/status.md +++ b/docs/models/components/status.md @@ -5,7 +5,7 @@ ```typescript import { Status } from "@novu/api/models/components"; -let value: Status = "Success"; +let value: Status = "ReadConfirmation"; ``` ## Values diff --git a/docs/models/components/stepfilter.md b/docs/models/components/stepfilter.md index ff241be2..92ed9d29 100644 --- a/docs/models/components/stepfilter.md +++ b/docs/models/components/stepfilter.md @@ -7,14 +7,14 @@ import { StepFilter } from "@novu/api/models/components"; let value: StepFilter = { isNegated: false, - type: "LIST", - value: "OR", + type: "STATEMENT", + value: "AND", children: [ { field: "", value: "", - operator: "SMALLER_EQUAL", - on: "payload", + operator: "ANY_IN", + on: "subscriber", }, ], }; diff --git a/docs/models/components/stepfiltertype.md b/docs/models/components/stepfiltertype.md index f2ba26af..ace94e10 100644 --- a/docs/models/components/stepfiltertype.md +++ b/docs/models/components/stepfiltertype.md @@ -5,7 +5,7 @@ ```typescript import { StepFilterType } from "@novu/api/models/components"; -let value: StepFilterType = "NUMBER"; +let value: StepFilterType = "BOOLEAN"; ``` ## Values diff --git a/docs/models/components/subscriberchanneldto.md b/docs/models/components/subscriberchanneldto.md index 5a66cbb9..57a55304 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: {}, + providerId: 1965.82, credentials: {}, }; ``` @@ -15,6 +15,6 @@ let value: SubscriberChannelDto = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `integrationIdentifier` | *string* | :heavy_minus_sign: | N/A | -| `providerId` | [components.ProviderId](../../models/components/providerid.md) | :heavy_check_mark: | N/A | -| `credentials` | [components.ChannelCredentialsDto](../../models/components/channelcredentialsdto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `providerId` | *number* | :heavy_check_mark: | The ID of the chat or push provider. | +| `integrationIdentifier` | *string* | :heavy_minus_sign: | An optional identifier for the integration. | +| `credentials` | [components.ChannelCredentialsDto](../../models/components/channelcredentialsdto.md) | :heavy_check_mark: | Credentials for the channel. | \ No newline at end of file diff --git a/docs/models/components/subscriberpayloaddto.md b/docs/models/components/subscriberpayloaddto.md index 20c99a07..e9f38255 100644 --- a/docs/models/components/subscriberpayloaddto.md +++ b/docs/models/components/subscriberpayloaddto.md @@ -15,11 +15,11 @@ let value: SubscriberPayloadDto = { | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | `subscriberId` | *string* | :heavy_check_mark: | The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems | -| `email` | *string* | :heavy_minus_sign: | N/A | -| `firstName` | *string* | :heavy_minus_sign: | N/A | -| `lastName` | *string* | :heavy_minus_sign: | N/A | -| `phone` | *string* | :heavy_minus_sign: | N/A | -| `avatar` | *string* | :heavy_minus_sign: | An http url to the profile image of your subscriber | -| `locale` | *string* | :heavy_minus_sign: | N/A | -| `data` | Record | :heavy_minus_sign: | An optional payload object that can contain any properties | -| `channels` | [components.SubscriberChannelDto](../../models/components/subscriberchanneldto.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `email` | *string* | :heavy_minus_sign: | The email address of the subscriber. | +| `firstName` | *string* | :heavy_minus_sign: | The first name of the subscriber. | +| `lastName` | *string* | :heavy_minus_sign: | The last name of the subscriber. | +| `phone` | *string* | :heavy_minus_sign: | The phone number of the subscriber. | +| `avatar` | *string* | :heavy_minus_sign: | An HTTP URL to the profile image of your subscriber. | +| `locale` | *string* | :heavy_minus_sign: | The locale of the subscriber. | +| `data` | Record | :heavy_minus_sign: | An optional payload object that can contain any properties. | +| `channels` | [components.SubscriberChannelDto](../../models/components/subscriberchanneldto.md)[] | :heavy_minus_sign: | An optional array of subscriber channels. | \ No newline at end of file diff --git a/docs/models/components/textalign.md b/docs/models/components/textalign.md index aa50769d..9cb7d4b0 100644 --- a/docs/models/components/textalign.md +++ b/docs/models/components/textalign.md @@ -5,7 +5,7 @@ ```typescript import { TextAlign } from "@novu/api/models/components"; -let value: TextAlign = "center"; +let value: TextAlign = "left"; ``` ## Values diff --git a/docs/models/components/unit.md b/docs/models/components/unit.md index 2d1fae4a..c493c406 100644 --- a/docs/models/components/unit.md +++ b/docs/models/components/unit.md @@ -5,7 +5,7 @@ ```typescript import { Unit } from "@novu/api/models/components"; -let value: Unit = "days"; +let value: Unit = "weeks"; ``` ## Values diff --git a/docs/models/components/unseencountresponse.md b/docs/models/components/unseencountresponse.md index 0c18cc03..16cb2413 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: 8137.98, + count: 3965.06, }; ``` diff --git a/docs/models/components/updatesubscriberchannelrequestdto.md b/docs/models/components/updatesubscriberchannelrequestdto.md index 45d6f666..9b5c281d 100644 --- a/docs/models/components/updatesubscriberchannelrequestdto.md +++ b/docs/models/components/updatesubscriberchannelrequestdto.md @@ -6,9 +6,9 @@ import { UpdateSubscriberChannelRequestDto } from "@novu/api/models/components"; let value: UpdateSubscriberChannelRequestDto = { - providerId: "whatsapp-business", + providerId: "fcm", credentials: { - webhookUrl: "https://old-fashioned-deck.org", + webhookUrl: "https://elliptical-valentine.info", }, }; ``` diff --git a/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md b/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md index 78e8a2e8..a5c1b48f 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 = "ryver"; +let value: UpdateSubscriberChannelRequestDtoProviderId = "whatsapp-business"; ``` ## Values diff --git a/docs/models/components/value.md b/docs/models/components/value.md index b49c292d..b9f79c7e 100644 --- a/docs/models/components/value.md +++ b/docs/models/components/value.md @@ -5,7 +5,7 @@ ```typescript import { Value } from "@novu/api/models/components"; -let value: Value = "AND"; +let value: Value = "OR"; ``` ## Values diff --git a/docs/models/components/weekdays.md b/docs/models/components/weekdays.md index 4a73d079..91b6e4d9 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 = "tuesday"; +let value: WeekDays = "sunday"; ``` ## Values diff --git a/docs/models/components/workflowresponse.md b/docs/models/components/workflowresponse.md index a0bbc1bd..69a9f435 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: "hidden remand whether seriously huzzah immediately geez", + description: "swat come metal within phooey presume obedience", active: false, draft: false, preferenceSettings: {}, diff --git a/jsr.json b/jsr.json index 643c3627..bab31186 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.49", + "version": "0.0.1-alpha.51", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index db0d700d..37c9aa7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.49", + "version": "0.0.1-alpha.51", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@novu/api", - "version": "0.0.1-alpha.49", + "version": "0.0.1-alpha.51", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index 1dbf264f..91cc948b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.49", + "version": "0.0.1-alpha.51", "author": "Novu", "main": "./index.js", "sideEffects": false, diff --git a/sources/json-development.json b/sources/json-development.json index 624ae04e..335abe12 100644 --- a/sources/json-development.json +++ b/sources/json-development.json @@ -10603,9 +10603,11 @@ "type": "object", "properties": { "webhookUrl": { - "type": "string" + "type": "string", + "description": "The URL for the webhook associated with the channel." }, "deviceTokens": { + "description": "An array of device tokens for push notifications.", "type": "array", "items": { "type": "string" @@ -10616,14 +10618,44 @@ "SubscriberChannelDto": { "type": "object", "properties": { - "integrationIdentifier": { - "type": "string" - }, "providerId": { - "type": "object" + "type": "number", + "description": "The ID of the chat or push provider.", + "enum": [ + { + "Slack": "slack", + "Discord": "discord", + "MsTeams": "msteams", + "Mattermost": "mattermost", + "Ryver": "ryver", + "Zulip": "zulip", + "GrafanaOnCall": "grafana-on-call", + "GetStream": "getstream", + "RocketChat": "rocket-chat", + "WhatsAppBusiness": "whatsapp-business" + }, + { + "FCM": "fcm", + "APNS": "apns", + "EXPO": "expo", + "OneSignal": "one-signal", + "Pushpad": "pushpad", + "PushWebhook": "push-webhook", + "PusherBeams": "pusher-beams" + } + ] + }, + "integrationIdentifier": { + "type": "string", + "description": "An optional identifier for the integration." }, "credentials": { - "$ref": "#/components/schemas/ChannelCredentialsDto" + "description": "Credentials for the channel.", + "allOf": [ + { + "$ref": "#/components/schemas/ChannelCredentialsDto" + } + ] } }, "required": [ @@ -10639,27 +10671,32 @@ "description": "The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems" }, "email": { - "type": "string" + "type": "string", + "description": "The email address of the subscriber." }, "firstName": { - "type": "string" + "type": "string", + "description": "The first name of the subscriber." }, "lastName": { - "type": "string" + "type": "string", + "description": "The last name of the subscriber." }, "phone": { - "type": "string" + "type": "string", + "description": "The phone number of the subscriber." }, "avatar": { "type": "string", - "description": "An http url to the profile image of your subscriber" + "description": "An HTTP URL to the profile image of your subscriber." }, "locale": { - "type": "string" + "type": "string", + "description": "The locale of the subscriber." }, "data": { "type": "object", - "description": "An optional payload object that can contain any properties", + "description": "An optional payload object that can contain any properties.", "additionalProperties": { "oneOf": [ { @@ -10681,6 +10718,7 @@ } }, "channels": { + "description": "An optional array of subscriber channels.", "type": "array", "items": { "$ref": "#/components/schemas/SubscriberChannelDto" @@ -11684,27 +11722,32 @@ "description": "The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems" }, "email": { - "type": "string" + "type": "string", + "description": "The email address of the subscriber." }, "firstName": { - "type": "string" + "type": "string", + "description": "The first name of the subscriber." }, "lastName": { - "type": "string" + "type": "string", + "description": "The last name of the subscriber." }, "phone": { - "type": "string" + "type": "string", + "description": "The phone number of the subscriber." }, "avatar": { "type": "string", - "description": "An http url to the profile image of your subscriber" + "description": "An HTTP URL to the profile image of your subscriber." }, "locale": { - "type": "string" + "type": "string", + "description": "The locale of the subscriber." }, "data": { "type": "object", - "description": "An optional payload object that can contain any properties", + "description": "An optional payload object that can contain any properties.", "additionalProperties": { "oneOf": [ { @@ -11726,6 +11769,7 @@ } }, "channels": { + "description": "An optional array of subscriber channels.", "type": "array", "items": { "$ref": "#/components/schemas/SubscriberChannelDto" @@ -11740,6 +11784,7 @@ "type": "object", "properties": { "subscribers": { + "description": "An array of subscribers to be created in bulk.", "type": "array", "items": { "type": "string" diff --git a/src/lib/config.ts b/src/lib/config.ts index d85ba2ce..8c84349f 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0", - sdkVersion: "0.0.1-alpha.49", + sdkVersion: "0.0.1-alpha.51", genVersion: "2.470.1", - userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.49 2.470.1 1.0 @novu/api", + userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.51 2.470.1 1.0 @novu/api", } as const; diff --git a/src/models/components/bulksubscribercreatedto.ts b/src/models/components/bulksubscribercreatedto.ts index 16b49fb2..b0e3835f 100644 --- a/src/models/components/bulksubscribercreatedto.ts +++ b/src/models/components/bulksubscribercreatedto.ts @@ -8,6 +8,9 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type BulkSubscriberCreateDto = { + /** + * An array of subscribers to be created in bulk. + */ subscribers: Array; }; diff --git a/src/models/components/channelcredentialsdto.ts b/src/models/components/channelcredentialsdto.ts index 5070632e..14216cc8 100644 --- a/src/models/components/channelcredentialsdto.ts +++ b/src/models/components/channelcredentialsdto.ts @@ -8,7 +8,13 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ChannelCredentialsDto = { + /** + * The URL for the webhook associated with the channel. + */ webhookUrl?: string | undefined; + /** + * An array of device tokens for push notifications. + */ deviceTokens?: Array | undefined; }; diff --git a/src/models/components/channelsettings.ts b/src/models/components/channelsettings.ts index 8d7f0dce..5be94479 100644 --- a/src/models/components/channelsettings.ts +++ b/src/models/components/channelsettings.ts @@ -18,7 +18,7 @@ import { /** * The provider identifier for the credentials */ -export const ChannelSettingsProviderId = { +export const ProviderId = { Slack: "slack", Discord: "discord", Msteams: "msteams", @@ -40,15 +40,13 @@ export const ChannelSettingsProviderId = { /** * The provider identifier for the credentials */ -export type ChannelSettingsProviderId = ClosedEnum< - typeof ChannelSettingsProviderId ->; +export type ProviderId = ClosedEnum; export type ChannelSettings = { /** * The provider identifier for the credentials */ - providerId: ChannelSettingsProviderId; + providerId: ProviderId; /** * The integration identifier */ @@ -64,24 +62,22 @@ export type ChannelSettings = { }; /** @internal */ -export const ChannelSettingsProviderId$inboundSchema: z.ZodNativeEnum< - typeof ChannelSettingsProviderId -> = z.nativeEnum(ChannelSettingsProviderId); +export const ProviderId$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ProviderId); /** @internal */ -export const ChannelSettingsProviderId$outboundSchema: z.ZodNativeEnum< - typeof ChannelSettingsProviderId -> = ChannelSettingsProviderId$inboundSchema; +export const ProviderId$outboundSchema: z.ZodNativeEnum = + ProviderId$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ChannelSettingsProviderId$ { - /** @deprecated use `ChannelSettingsProviderId$inboundSchema` instead. */ - export const inboundSchema = ChannelSettingsProviderId$inboundSchema; - /** @deprecated use `ChannelSettingsProviderId$outboundSchema` instead. */ - export const outboundSchema = ChannelSettingsProviderId$outboundSchema; +export namespace ProviderId$ { + /** @deprecated use `ProviderId$inboundSchema` instead. */ + export const inboundSchema = ProviderId$inboundSchema; + /** @deprecated use `ProviderId$outboundSchema` instead. */ + export const outboundSchema = ProviderId$outboundSchema; } /** @internal */ @@ -90,7 +86,7 @@ export const ChannelSettings$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - providerId: ChannelSettingsProviderId$inboundSchema, + providerId: ProviderId$inboundSchema, integrationIdentifier: z.string().optional(), credentials: ChannelCredentials$inboundSchema, _integrationId: z.string(), @@ -114,7 +110,7 @@ export const ChannelSettings$outboundSchema: z.ZodType< z.ZodTypeDef, ChannelSettings > = z.object({ - providerId: ChannelSettingsProviderId$outboundSchema, + providerId: ProviderId$outboundSchema, integrationIdentifier: z.string().optional(), credentials: ChannelCredentials$outboundSchema, integrationId: z.string(), diff --git a/src/models/components/createsubscriberrequestdto.ts b/src/models/components/createsubscriberrequestdto.ts index 714547a8..d3ab7fd9 100644 --- a/src/models/components/createsubscriberrequestdto.ts +++ b/src/models/components/createsubscriberrequestdto.ts @@ -24,19 +24,37 @@ export type CreateSubscriberRequestDto = { * The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems */ subscriberId: string; + /** + * The email address of the subscriber. + */ email?: string | undefined; + /** + * The first name of the subscriber. + */ firstName?: string | undefined; + /** + * The last name of the subscriber. + */ lastName?: string | undefined; + /** + * The phone number of the subscriber. + */ phone?: string | undefined; /** - * An http url to the profile image of your subscriber + * An HTTP URL to the profile image of your subscriber. */ avatar?: string | undefined; + /** + * The locale of the subscriber. + */ locale?: string | undefined; /** - * An optional payload object that can contain any properties + * An optional payload object that can contain any properties. */ data?: { [k: string]: string | Array | boolean | number } | undefined; + /** + * An optional array of subscriber channels. + */ channels?: Array | undefined; }; diff --git a/src/models/components/subscriberchanneldto.ts b/src/models/components/subscriberchanneldto.ts index 23a45a61..4c821e70 100644 --- a/src/models/components/subscriberchanneldto.ts +++ b/src/models/components/subscriberchanneldto.ts @@ -13,73 +13,36 @@ import { ChannelCredentialsDto$outboundSchema, } from "./channelcredentialsdto.js"; -export type ProviderId = {}; - export type SubscriberChannelDto = { + /** + * The ID of the chat or push provider. + */ + providerId: number; + /** + * An optional identifier for the integration. + */ integrationIdentifier?: string | undefined; - providerId: ProviderId; + /** + * Credentials for the channel. + */ credentials: ChannelCredentialsDto; }; -/** @internal */ -export const ProviderId$inboundSchema: z.ZodType< - ProviderId, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type ProviderId$Outbound = {}; - -/** @internal */ -export const ProviderId$outboundSchema: z.ZodType< - ProviderId$Outbound, - z.ZodTypeDef, - ProviderId -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ProviderId$ { - /** @deprecated use `ProviderId$inboundSchema` instead. */ - export const inboundSchema = ProviderId$inboundSchema; - /** @deprecated use `ProviderId$outboundSchema` instead. */ - export const outboundSchema = ProviderId$outboundSchema; - /** @deprecated use `ProviderId$Outbound` instead. */ - export type Outbound = ProviderId$Outbound; -} - -export function providerIdToJSON(providerId: ProviderId): string { - return JSON.stringify(ProviderId$outboundSchema.parse(providerId)); -} - -export function providerIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProviderId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProviderId' from JSON`, - ); -} - /** @internal */ export const SubscriberChannelDto$inboundSchema: z.ZodType< SubscriberChannelDto, z.ZodTypeDef, unknown > = z.object({ + providerId: z.number(), integrationIdentifier: z.string().optional(), - providerId: z.lazy(() => ProviderId$inboundSchema), credentials: ChannelCredentialsDto$inboundSchema, }); /** @internal */ export type SubscriberChannelDto$Outbound = { + providerId: number; integrationIdentifier?: string | undefined; - providerId: ProviderId$Outbound; credentials: ChannelCredentialsDto$Outbound; }; @@ -89,8 +52,8 @@ export const SubscriberChannelDto$outboundSchema: z.ZodType< z.ZodTypeDef, SubscriberChannelDto > = z.object({ + providerId: z.number(), integrationIdentifier: z.string().optional(), - providerId: z.lazy(() => ProviderId$outboundSchema), credentials: ChannelCredentialsDto$outboundSchema, }); diff --git a/src/models/components/subscriberpayloaddto.ts b/src/models/components/subscriberpayloaddto.ts index 080ea6c0..9f48163e 100644 --- a/src/models/components/subscriberpayloaddto.ts +++ b/src/models/components/subscriberpayloaddto.ts @@ -20,19 +20,37 @@ export type SubscriberPayloadDto = { * The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems */ subscriberId: string; + /** + * The email address of the subscriber. + */ email?: string | undefined; + /** + * The first name of the subscriber. + */ firstName?: string | undefined; + /** + * The last name of the subscriber. + */ lastName?: string | undefined; + /** + * The phone number of the subscriber. + */ phone?: string | undefined; /** - * An http url to the profile image of your subscriber + * An HTTP URL to the profile image of your subscriber. */ avatar?: string | undefined; + /** + * The locale of the subscriber. + */ locale?: string | undefined; /** - * An optional payload object that can contain any properties + * An optional payload object that can contain any properties. */ data?: { [k: string]: string | Array | boolean | number } | undefined; + /** + * An optional array of subscriber channels. + */ channels?: Array | undefined; };