@novu/api 3.16.0 → 3.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -14
- package/funcs/integrationsCreate.d.ts +1 -1
- package/funcs/integrationsCreate.js +1 -1
- package/funcs/integrationsCreateMobileLink.d.ts +19 -0
- package/funcs/integrationsCreateMobileLink.d.ts.map +1 -0
- package/funcs/integrationsCreateMobileLink.js +141 -0
- package/funcs/integrationsCreateMobileLink.js.map +1 -0
- package/funcs/integrationsDelete.d.ts +1 -1
- package/funcs/integrationsDelete.js +1 -1
- package/funcs/integrationsIntegrationsControllerAutoConfigureIntegration.d.ts +1 -1
- package/funcs/integrationsIntegrationsControllerAutoConfigureIntegration.js +1 -1
- package/funcs/integrationsIntegrationsControllerConfigureIntegrationWebhook.d.ts +18 -0
- package/funcs/integrationsIntegrationsControllerConfigureIntegrationWebhook.d.ts.map +1 -0
- package/funcs/integrationsIntegrationsControllerConfigureIntegrationWebhook.js +139 -0
- package/funcs/integrationsIntegrationsControllerConfigureIntegrationWebhook.js.map +1 -0
- package/funcs/integrationsLinkChannelEndpoint.d.ts +19 -0
- package/funcs/integrationsLinkChannelEndpoint.d.ts.map +1 -0
- package/funcs/integrationsLinkChannelEndpoint.js +138 -0
- package/funcs/integrationsLinkChannelEndpoint.js.map +1 -0
- package/funcs/integrationsList.d.ts +1 -1
- package/funcs/integrationsList.js +1 -1
- package/funcs/integrationsListActive.d.ts +1 -1
- package/funcs/integrationsListActive.js +1 -1
- package/funcs/integrationsSetAsPrimary.d.ts +1 -0
- package/funcs/integrationsSetAsPrimary.d.ts.map +1 -1
- package/funcs/integrationsSetAsPrimary.js +1 -0
- package/funcs/integrationsSetAsPrimary.js.map +1 -1
- package/funcs/integrationsUpdate.d.ts +1 -1
- package/funcs/integrationsUpdate.js +1 -1
- package/funcs/subscribersMessagesMarkAll.d.ts +3 -1
- package/funcs/subscribersMessagesMarkAll.d.ts.map +1 -1
- package/funcs/subscribersMessagesMarkAll.js +3 -1
- package/funcs/subscribersMessagesMarkAll.js.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.d.ts +4 -2
- package/funcs/subscribersMessagesMarkAllAs.d.ts.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.js +4 -2
- package/funcs/subscribersMessagesMarkAllAs.js.map +1 -1
- package/funcs/subscribersMessagesUpdateAsSeen.d.ts +3 -1
- package/funcs/subscribersMessagesUpdateAsSeen.d.ts.map +1 -1
- package/funcs/subscribersMessagesUpdateAsSeen.js +3 -1
- package/funcs/subscribersMessagesUpdateAsSeen.js.map +1 -1
- package/funcs/subscribersNotificationsFeed.d.ts +3 -1
- package/funcs/subscribersNotificationsFeed.d.ts.map +1 -1
- package/funcs/subscribersNotificationsFeed.js +3 -1
- package/funcs/subscribersNotificationsFeed.js.map +1 -1
- package/funcs/subscribersNotificationsUnseenCount.d.ts +3 -1
- package/funcs/subscribersNotificationsUnseenCount.d.ts.map +1 -1
- package/funcs/subscribersNotificationsUnseenCount.js +3 -1
- package/funcs/subscribersNotificationsUnseenCount.js.map +1 -1
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/encodings.js +12 -12
- package/lib/encodings.js.map +1 -1
- package/lib/matchers.js +3 -3
- package/lib/matchers.js.map +1 -1
- package/lib/primitives.d.ts +1 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +18 -0
- package/lib/primitives.js.map +1 -1
- package/lib/retries.js +7 -0
- package/lib/retries.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +50 -16
- package/lib/sdks.js.map +1 -1
- package/models/components/chatorpushproviderenum.d.ts +1 -0
- package/models/components/chatorpushproviderenum.d.ts.map +1 -1
- package/models/components/chatorpushproviderenum.js +1 -0
- package/models/components/chatorpushproviderenum.js.map +1 -1
- package/models/components/configuretelegramwebhookresponsedto.d.ts +21 -0
- package/models/components/configuretelegramwebhookresponsedto.d.ts.map +1 -0
- package/models/components/configuretelegramwebhookresponsedto.js +52 -0
- package/models/components/configuretelegramwebhookresponsedto.js.map +1 -0
- package/models/components/createtelegramchatendpointdto.d.ts +75 -0
- package/models/components/createtelegramchatendpointdto.d.ts.map +1 -0
- package/models/components/createtelegramchatendpointdto.js +77 -0
- package/models/components/createtelegramchatendpointdto.js.map +1 -0
- package/models/components/credentialsdto.d.ts +22 -0
- package/models/components/credentialsdto.d.ts.map +1 -1
- package/models/components/credentialsdto.js +10 -0
- package/models/components/credentialsdto.js.map +1 -1
- package/models/components/getchannelconnectionresponsedto.d.ts +3 -0
- package/models/components/getchannelconnectionresponsedto.d.ts.map +1 -1
- package/models/components/getchannelconnectionresponsedto.js +3 -0
- package/models/components/getchannelconnectionresponsedto.js.map +1 -1
- package/models/components/getchannelendpointresponsedto.d.ts +9 -2
- package/models/components/getchannelendpointresponsedto.d.ts.map +1 -1
- package/models/components/getchannelendpointresponsedto.js +13 -0
- package/models/components/getchannelendpointresponsedto.js.map +1 -1
- package/models/components/index.d.ts +7 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +7 -0
- package/models/components/index.js.map +1 -1
- package/models/components/issueintegrationmobilelinkrequestdto.d.ts +15 -0
- package/models/components/issueintegrationmobilelinkrequestdto.d.ts.map +1 -0
- package/models/components/issueintegrationmobilelinkrequestdto.js +49 -0
- package/models/components/issueintegrationmobilelinkrequestdto.js.map +1 -0
- package/models/components/issuetelegrammobilelinkresponsedto.d.ts +21 -0
- package/models/components/issuetelegrammobilelinkresponsedto.d.ts.map +1 -0
- package/models/components/issuetelegrammobilelinkresponsedto.js +52 -0
- package/models/components/issuetelegrammobilelinkresponsedto.js.map +1 -0
- package/models/components/linkchannelendpointrequestdto.d.ts +20 -0
- package/models/components/linkchannelendpointrequestdto.d.ts.map +1 -0
- package/models/components/linkchannelendpointrequestdto.js +50 -0
- package/models/components/linkchannelendpointrequestdto.js.map +1 -0
- package/models/components/linkchannelendpointresponsedto.d.ts +19 -0
- package/models/components/linkchannelendpointresponsedto.d.ts.map +1 -0
- package/models/components/linkchannelendpointresponsedto.js +51 -0
- package/models/components/linkchannelendpointresponsedto.js.map +1 -0
- package/models/components/msteamschannelendpointdto.d.ts +5 -0
- package/models/components/msteamschannelendpointdto.d.ts.map +1 -1
- package/models/components/msteamschannelendpointdto.js +11 -1
- package/models/components/msteamschannelendpointdto.js.map +1 -1
- package/models/components/msteamsuserendpointdto.d.ts +5 -0
- package/models/components/msteamsuserendpointdto.d.ts.map +1 -1
- package/models/components/msteamsuserendpointdto.js +10 -1
- package/models/components/msteamsuserendpointdto.js.map +1 -1
- package/models/components/previewpayloaddto.d.ts +5 -0
- package/models/components/previewpayloaddto.d.ts.map +1 -1
- package/models/components/previewpayloaddto.js +2 -0
- package/models/components/previewpayloaddto.js.map +1 -1
- package/models/components/providersidenum.d.ts +3 -0
- package/models/components/providersidenum.d.ts.map +1 -1
- package/models/components/providersidenum.js +3 -0
- package/models/components/providersidenum.js.map +1 -1
- package/models/components/subscriberchanneldto.d.ts +1 -0
- package/models/components/subscriberchanneldto.d.ts.map +1 -1
- package/models/components/subscriberchanneldto.js +1 -0
- package/models/components/subscriberchanneldto.js.map +1 -1
- package/models/components/telegramchatendpointdto.d.ts +20 -0
- package/models/components/telegramchatendpointdto.d.ts.map +1 -0
- package/models/components/telegramchatendpointdto.js +58 -0
- package/models/components/telegramchatendpointdto.js.map +1 -0
- package/models/components/updateworkflowdto.d.ts +5 -4
- package/models/components/updateworkflowdto.d.ts.map +1 -1
- package/models/components/updateworkflowdto.js +3 -0
- package/models/components/updateworkflowdto.js.map +1 -1
- package/models/operations/channelendpointscontrollercreatechannelendpoint.d.ts +4 -4
- package/models/operations/channelendpointscontrollercreatechannelendpoint.d.ts.map +1 -1
- package/models/operations/channelendpointscontrollercreatechannelendpoint.js +2 -0
- package/models/operations/channelendpointscontrollercreatechannelendpoint.js.map +1 -1
- package/models/operations/index.d.ts +3 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/integrationscontrollerconfigureintegrationwebhook.d.ts +29 -0
- package/models/operations/integrationscontrollerconfigureintegrationwebhook.d.ts.map +1 -0
- package/models/operations/integrationscontrollerconfigureintegrationwebhook.js +73 -0
- package/models/operations/integrationscontrollerconfigureintegrationwebhook.js.map +1 -0
- package/models/operations/integrationscontrollercreateintegrationmobilelink.d.ts +31 -0
- package/models/operations/integrationscontrollercreateintegrationmobilelink.d.ts.map +1 -0
- package/models/operations/integrationscontrollercreateintegrationmobilelink.js +75 -0
- package/models/operations/integrationscontrollercreateintegrationmobilelink.js.map +1 -0
- package/models/operations/integrationscontrollerlinkchannelendpoint.d.ts +29 -0
- package/models/operations/integrationscontrollerlinkchannelendpoint.d.ts.map +1 -0
- package/models/operations/integrationscontrollerlinkchannelendpoint.js +72 -0
- package/models/operations/integrationscontrollerlinkchannelendpoint.js.map +1 -0
- package/package.json +1 -1
- package/sdk/integrations.d.ts +28 -6
- package/sdk/integrations.d.ts.map +1 -1
- package/sdk/integrations.js +37 -6
- package/sdk/integrations.js.map +1 -1
- package/sdk/novumessages.d.ts +10 -4
- package/sdk/novumessages.d.ts.map +1 -1
- package/sdk/novumessages.js +10 -4
- package/sdk/novumessages.js.map +1 -1
- package/sdk/novunotifications.d.ts +6 -2
- package/sdk/novunotifications.d.ts.map +1 -1
- package/sdk/novunotifications.js +6 -2
- package/sdk/novunotifications.js.map +1 -1
- package/src/funcs/integrationsCreate.ts +1 -1
- package/src/funcs/integrationsCreateMobileLink.ts +236 -0
- package/src/funcs/integrationsDelete.ts +1 -1
- package/src/funcs/integrationsIntegrationsControllerAutoConfigureIntegration.ts +1 -1
- package/src/funcs/integrationsIntegrationsControllerConfigureIntegrationWebhook.ts +223 -0
- package/src/funcs/integrationsLinkChannelEndpoint.ts +216 -0
- package/src/funcs/integrationsList.ts +1 -1
- package/src/funcs/integrationsListActive.ts +1 -1
- package/src/funcs/integrationsSetAsPrimary.ts +1 -0
- package/src/funcs/integrationsUpdate.ts +1 -1
- package/src/funcs/subscribersMessagesMarkAll.ts +3 -1
- package/src/funcs/subscribersMessagesMarkAllAs.ts +4 -2
- package/src/funcs/subscribersMessagesUpdateAsSeen.ts +3 -1
- package/src/funcs/subscribersNotificationsFeed.ts +3 -1
- package/src/funcs/subscribersNotificationsUnseenCount.ts +3 -1
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +1 -1
- package/src/lib/matchers.ts +1 -1
- package/src/lib/primitives.ts +16 -0
- package/src/lib/retries.ts +8 -0
- package/src/lib/sdks.ts +54 -17
- package/src/models/components/chatorpushproviderenum.ts +1 -0
- package/src/models/components/configuretelegramwebhookresponsedto.ts +45 -0
- package/src/models/components/createtelegramchatendpointdto.ts +149 -0
- package/src/models/components/credentialsdto.ts +32 -0
- package/src/models/components/getchannelconnectionresponsedto.ts +3 -0
- package/src/models/components/getchannelendpointresponsedto.ts +30 -2
- package/src/models/components/index.ts +7 -0
- package/src/models/components/issueintegrationmobilelinkrequestdto.ts +36 -0
- package/src/models/components/issuetelegrammobilelinkresponsedto.ts +45 -0
- package/src/models/components/linkchannelendpointrequestdto.ts +42 -0
- package/src/models/components/linkchannelendpointresponsedto.ts +39 -0
- package/src/models/components/msteamschannelendpointdto.ts +21 -0
- package/src/models/components/msteamsuserendpointdto.ts +20 -0
- package/src/models/components/previewpayloaddto.ts +7 -0
- package/src/models/components/providersidenum.ts +3 -0
- package/src/models/components/subscriberchanneldto.ts +1 -0
- package/src/models/components/telegramchatendpointdto.ts +54 -0
- package/src/models/components/updateworkflowdto.ts +11 -0
- package/src/models/operations/channelendpointscontrollercreatechannelendpoint.ts +10 -4
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/integrationscontrollerconfigureintegrationwebhook.ts +86 -0
- package/src/models/operations/integrationscontrollercreateintegrationmobilelink.ts +94 -0
- package/src/models/operations/integrationscontrollerlinkchannelendpoint.ts +90 -0
- package/src/sdk/integrations.ts +76 -6
- package/src/sdk/novumessages.ts +10 -4
- package/src/sdk/novunotifications.ts +6 -2
- package/src/types/async.ts +8 -7
- package/types/async.d.ts.map +1 -1
- package/types/async.js +8 -7
- package/types/async.js.map +1 -1
- package/lib/dlv.d.ts +0 -14
- package/lib/dlv.d.ts.map +0 -1
- package/lib/dlv.js +0 -49
- package/lib/dlv.js.map +0 -1
- package/lib/is-plain-object.d.ts +0 -2
- package/lib/is-plain-object.d.ts.map +0 -1
- package/lib/is-plain-object.js +0 -41
- package/lib/is-plain-object.js.map +0 -1
- package/src/lib/dlv.ts +0 -53
- package/src/lib/is-plain-object.ts +0 -43
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* List active integrations
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* List all the active integrations created in the organization
|
|
33
|
+
* List all the active integrations created in the organization. Only integration metadata is returned, credentials field is returned as an empty object.
|
|
34
34
|
*/
|
|
35
35
|
export function integrationsListActive(
|
|
36
36
|
client: NovuCore,
|
|
@@ -33,6 +33,7 @@ import { Result } from "../types/fp.js";
|
|
|
33
33
|
* Update an integration as **primary** by its unique key identifier **integrationId**.
|
|
34
34
|
* This API will set the integration as primary for that channel in the current environment.
|
|
35
35
|
* Primary integration is used to deliver notification for sms and email channels in the workflow.
|
|
36
|
+
* Only integration metadata is returned, credentials field is returned as an empty object.
|
|
36
37
|
*/
|
|
37
38
|
export function integrationsSetAsPrimary(
|
|
38
39
|
client: NovuCore,
|
|
@@ -32,7 +32,7 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
34
|
* Update an integration by its unique key identifier **integrationId**.
|
|
35
|
-
* Each provider supports different credentials, check the provider documentation for more details.
|
|
35
|
+
* Each provider supports different credentials, check the provider documentation for more details. Only integration metadata is returned, credentials field is returned as an empty object.
|
|
36
36
|
*/
|
|
37
37
|
export function integrationsUpdate(
|
|
38
38
|
client: NovuCore,
|
|
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* Update all notifications state
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Update all subscriber in-app
|
|
34
|
+
* This API is deprecated, use v2 API instead. Update all subscriber in-app notifications state such as read, unread, seen or unseen by **subscriberId**.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
35
37
|
*/
|
|
36
38
|
export function subscribersMessagesMarkAll(
|
|
37
39
|
client: NovuCore,
|
|
@@ -31,8 +31,10 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* Update notifications state
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Update subscriber's multiple in-app
|
|
35
|
-
* **messageId** is of type mongodbId of notifications
|
|
34
|
+
* This API is deprecated, use v2 API instead. Update subscriber's multiple in-app notifications state such as seen, read, unseen or unread by **subscriberId**.
|
|
35
|
+
* **messageId** is of type mongodbId of notifications.
|
|
36
|
+
*
|
|
37
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
36
38
|
*/
|
|
37
39
|
export function subscribersMessagesMarkAllAs(
|
|
38
40
|
client: NovuCore,
|
|
@@ -30,8 +30,10 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Update notification action status
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Update in-app
|
|
33
|
+
* This API is deprecated, use v2 API instead. Update in-app notification's action status by its unique key identifier **messageId** and type field **type**.
|
|
34
34
|
* **type** field can be **primary** or **secondary**
|
|
35
|
+
*
|
|
36
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
35
37
|
*/
|
|
36
38
|
export function subscribersMessagesUpdateAsSeen(
|
|
37
39
|
client: NovuCore,
|
|
@@ -30,7 +30,9 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Retrieve subscriber notifications
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve subscriber in-app
|
|
33
|
+
* This API is deprecated, use v2 API instead. Retrieve subscriber in-app notifications by its unique key identifier **subscriberId**.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
34
36
|
*/
|
|
35
37
|
export function subscribersNotificationsFeed(
|
|
36
38
|
client: NovuCore,
|
|
@@ -30,7 +30,9 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Retrieve unseen notifications count
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieve unseen in-app
|
|
33
|
+
* This API is deprecated, use v2 API instead. Retrieve unseen in-app notifications count for a subscriber by its unique key identifier **subscriberId**.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
34
36
|
*/
|
|
35
37
|
export function subscribersNotificationsUnseenCount(
|
|
36
38
|
client: NovuCore,
|
package/src/hooks/types.ts
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -58,8 +58,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
|
|
59
59
|
export const SDK_METADATA = {
|
|
60
60
|
language: "typescript",
|
|
61
|
-
openapiDocVersion: "3.
|
|
62
|
-
sdkVersion: "3.
|
|
63
|
-
genVersion: "2.
|
|
64
|
-
userAgent: "speakeasy-sdk/typescript 3.
|
|
61
|
+
openapiDocVersion: "3.17.1",
|
|
62
|
+
sdkVersion: "3.17.1",
|
|
63
|
+
genVersion: "2.916.2",
|
|
64
|
+
userAgent: "speakeasy-sdk/typescript 3.17.1 2.916.2 3.17.1 @novu/api",
|
|
65
65
|
} as const;
|
package/src/lib/encodings.ts
CHANGED
package/src/lib/matchers.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { ResponseValidationError } from "../models/errors/responsevalidationerro
|
|
|
6
6
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
7
7
|
import { ERR, OK, Result } from "../types/fp.js";
|
|
8
8
|
import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js";
|
|
9
|
-
import { isPlainObject } from "./
|
|
9
|
+
import { isPlainObject } from "./primitives.js";
|
|
10
10
|
|
|
11
11
|
export type Encoding =
|
|
12
12
|
| "jsonl"
|
package/src/lib/primitives.ts
CHANGED
|
@@ -148,3 +148,19 @@ export function allRequired<V extends Record<string, unknown>>(
|
|
|
148
148
|
|
|
149
149
|
return v as ReturnType<typeof allRequired<V>>;
|
|
150
150
|
}
|
|
151
|
+
|
|
152
|
+
export function isPlainObject(
|
|
153
|
+
value: unknown,
|
|
154
|
+
): value is Record<string, unknown> {
|
|
155
|
+
if (value === null || typeof value !== "object") return false;
|
|
156
|
+
if (Object.prototype.toString.call(value) !== "[object Object]") return false;
|
|
157
|
+
const proto = Object.getPrototypeOf(value);
|
|
158
|
+
if (proto === null || proto === Object.prototype) return true;
|
|
159
|
+
// cross-realm plain objects (vm contexts, iframes) inherit from a
|
|
160
|
+
// different realm's Object.prototype, which itself has a null prototype
|
|
161
|
+
try {
|
|
162
|
+
return Object.getPrototypeOf(proto) === null;
|
|
163
|
+
} catch {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
}
|
package/src/lib/retries.ts
CHANGED
|
@@ -194,6 +194,14 @@ async function retryBackoff(
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
function retryIntervalFromResponse(res: Response): number {
|
|
197
|
+
const retryAfterMsVal = res.headers.get("retry-after-ms");
|
|
198
|
+
if (retryAfterMsVal) {
|
|
199
|
+
const parsedMs = Number(retryAfterMsVal);
|
|
200
|
+
if (Number.isFinite(parsedMs) && parsedMs >= 0) {
|
|
201
|
+
return parsedMs;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
197
205
|
const retryVal = res.headers.get("retry-after") || "";
|
|
198
206
|
if (!retryVal) {
|
|
199
207
|
return 0;
|
package/src/lib/sdks.ts
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
matchContentType,
|
|
24
24
|
} from "./http.js";
|
|
25
25
|
import { Logger } from "./logger.js";
|
|
26
|
+
import { combineSignals } from "./primitives.js";
|
|
26
27
|
import { retry, RetryConfig } from "./retries.js";
|
|
27
28
|
import { SecurityState } from "./security.js";
|
|
28
29
|
|
|
@@ -128,27 +129,55 @@ export class ClientSDK {
|
|
|
128
129
|
if (path) {
|
|
129
130
|
baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
|
|
130
131
|
reqURL = new URL(path, baseURL);
|
|
132
|
+
if (!reqURL.search && baseURL.search) {
|
|
133
|
+
reqURL.search = baseURL.search;
|
|
134
|
+
}
|
|
131
135
|
} else {
|
|
132
136
|
reqURL = baseURL;
|
|
133
137
|
}
|
|
134
138
|
reqURL.hash = "";
|
|
135
139
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (typeof q !== "undefined") {
|
|
142
|
-
secQuery.push(q);
|
|
140
|
+
// Appends already-encoded query pairs to a query string, replacing any
|
|
141
|
+
// existing pairs with the same key so later sources take precedence.
|
|
142
|
+
const mergeQuery = (current: string, additions: string): string => {
|
|
143
|
+
if (!additions) {
|
|
144
|
+
return current;
|
|
143
145
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
const additionKeys = new Set(
|
|
147
|
+
additions
|
|
148
|
+
.split("&")
|
|
149
|
+
.filter((pair) => pair !== "")
|
|
150
|
+
.map((pair) => pair.split("=")[0] ?? ""),
|
|
151
|
+
);
|
|
152
|
+
const kept = current.split("&").filter((pair) => {
|
|
153
|
+
return pair !== "" && !additionKeys.has(pair.split("=")[0] ?? "");
|
|
154
|
+
});
|
|
155
|
+
return [...kept, additions].join("&");
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const encodeQueryRecord = (record: Record<string, unknown>): string => {
|
|
159
|
+
return Object.entries(record)
|
|
160
|
+
.map(([k, v]) => {
|
|
161
|
+
if (v == null) {
|
|
162
|
+
return undefined;
|
|
163
|
+
}
|
|
164
|
+
const value = v;
|
|
165
|
+
return encodeForm(k, value, {
|
|
166
|
+
explode: Array.isArray(value),
|
|
167
|
+
charEncoding: "percent",
|
|
168
|
+
});
|
|
169
|
+
})
|
|
170
|
+
.filter((pair): pair is string => typeof pair !== "undefined")
|
|
171
|
+
.join("&");
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const finalQuery = [
|
|
175
|
+
query || "",
|
|
176
|
+
encodeQueryRecord(security?.queryParams || {}),
|
|
177
|
+
].reduce(mergeQuery, reqURL.search.slice(1));
|
|
148
178
|
|
|
149
179
|
if (finalQuery) {
|
|
150
|
-
|
|
151
|
-
reqURL.search = `?${q}`;
|
|
180
|
+
reqURL.search = `?${finalQuery}`;
|
|
152
181
|
}
|
|
153
182
|
|
|
154
183
|
const headers = new Headers(opHeaders);
|
|
@@ -194,9 +223,8 @@ export class ClientSDK {
|
|
|
194
223
|
...options?.fetchOptions,
|
|
195
224
|
...options,
|
|
196
225
|
};
|
|
197
|
-
if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) {
|
|
198
|
-
|
|
199
|
-
fetchOptions.signal = timeoutSignal;
|
|
226
|
+
if (!fetchOptions?.signal && conf.timeoutMs != null && conf.timeoutMs > 0) {
|
|
227
|
+
context.timeoutMs = conf.timeoutMs;
|
|
200
228
|
}
|
|
201
229
|
|
|
202
230
|
if (conf.body instanceof ReadableStream) {
|
|
@@ -243,10 +271,19 @@ export class ClientSDK {
|
|
|
243
271
|
>
|
|
244
272
|
> {
|
|
245
273
|
const { context, isErrorStatusCode } = options;
|
|
274
|
+
const timeoutMs = context.timeoutMs;
|
|
246
275
|
|
|
247
276
|
return retry(
|
|
248
277
|
async () => {
|
|
249
|
-
const
|
|
278
|
+
const cloned = request.clone();
|
|
279
|
+
let attempt = cloned;
|
|
280
|
+
if (timeoutMs != null && timeoutMs > 0) {
|
|
281
|
+
const timeoutSignal = AbortSignal.timeout(timeoutMs);
|
|
282
|
+
const combined = combineSignals(cloned.signal, timeoutSignal)
|
|
283
|
+
?? timeoutSignal;
|
|
284
|
+
attempt = new Request(cloned, { signal: combined });
|
|
285
|
+
}
|
|
286
|
+
const req = await this.#hooks.beforeRequest(context, attempt);
|
|
250
287
|
await logRequest(this.#logger, req).catch((e) =>
|
|
251
288
|
this.#logger?.log("Failed to log request:", e)
|
|
252
289
|
);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type ConfigureTelegramWebhookResponseDto = {
|
|
11
|
+
/**
|
|
12
|
+
* URL Novu registered with Telegram for incoming updates
|
|
13
|
+
*/
|
|
14
|
+
webhookUrl: string;
|
|
15
|
+
/**
|
|
16
|
+
* ISO-8601 timestamp the webhook was configured at
|
|
17
|
+
*/
|
|
18
|
+
configuredAt: string;
|
|
19
|
+
/**
|
|
20
|
+
* Resolved bot username from getMe
|
|
21
|
+
*/
|
|
22
|
+
botUsername: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ConfigureTelegramWebhookResponseDto$inboundSchema: z.ZodType<
|
|
27
|
+
ConfigureTelegramWebhookResponseDto,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
webhookUrl: z.string(),
|
|
32
|
+
configuredAt: z.string(),
|
|
33
|
+
botUsername: z.string(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export function configureTelegramWebhookResponseDtoFromJSON(
|
|
37
|
+
jsonString: string,
|
|
38
|
+
): SafeParseResult<ConfigureTelegramWebhookResponseDto, SDKValidationError> {
|
|
39
|
+
return safeParse(
|
|
40
|
+
jsonString,
|
|
41
|
+
(x) =>
|
|
42
|
+
ConfigureTelegramWebhookResponseDto$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'ConfigureTelegramWebhookResponseDto' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import {
|
|
7
|
+
TelegramChatEndpointDto,
|
|
8
|
+
TelegramChatEndpointDto$Outbound,
|
|
9
|
+
TelegramChatEndpointDto$outboundSchema,
|
|
10
|
+
} from "./telegramchatendpointdto.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Rich context object with id and optional data
|
|
14
|
+
*/
|
|
15
|
+
export type CreateTelegramChatEndpointDtoContext2 = {
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional additional context data
|
|
19
|
+
*/
|
|
20
|
+
data?: { [k: string]: any } | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type CreateTelegramChatEndpointDtoContext =
|
|
24
|
+
| CreateTelegramChatEndpointDtoContext2
|
|
25
|
+
| string;
|
|
26
|
+
|
|
27
|
+
export type CreateTelegramChatEndpointDto = {
|
|
28
|
+
/**
|
|
29
|
+
* The unique identifier for the channel endpoint. If not provided, one will be generated automatically.
|
|
30
|
+
*/
|
|
31
|
+
identifier?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The subscriber ID to which the channel endpoint is linked
|
|
34
|
+
*/
|
|
35
|
+
subscriberId: string;
|
|
36
|
+
context?:
|
|
37
|
+
| { [k: string]: CreateTelegramChatEndpointDtoContext2 | string }
|
|
38
|
+
| undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The identifier of the integration to use for this channel endpoint.
|
|
41
|
+
*/
|
|
42
|
+
integrationIdentifier: string;
|
|
43
|
+
/**
|
|
44
|
+
* The identifier of the channel connection to use for this channel endpoint.
|
|
45
|
+
*/
|
|
46
|
+
connectionIdentifier?: string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Type of channel endpoint
|
|
49
|
+
*/
|
|
50
|
+
type: "telegram_chat";
|
|
51
|
+
/**
|
|
52
|
+
* Telegram chat endpoint data
|
|
53
|
+
*/
|
|
54
|
+
endpoint: TelegramChatEndpointDto;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export type CreateTelegramChatEndpointDtoContext2$Outbound = {
|
|
59
|
+
id: string;
|
|
60
|
+
data?: { [k: string]: any } | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const CreateTelegramChatEndpointDtoContext2$outboundSchema: z.ZodType<
|
|
65
|
+
CreateTelegramChatEndpointDtoContext2$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
CreateTelegramChatEndpointDtoContext2
|
|
68
|
+
> = z.object({
|
|
69
|
+
id: z.string(),
|
|
70
|
+
data: z.record(z.any()).optional(),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export function createTelegramChatEndpointDtoContext2ToJSON(
|
|
74
|
+
createTelegramChatEndpointDtoContext2: CreateTelegramChatEndpointDtoContext2,
|
|
75
|
+
): string {
|
|
76
|
+
return JSON.stringify(
|
|
77
|
+
CreateTelegramChatEndpointDtoContext2$outboundSchema.parse(
|
|
78
|
+
createTelegramChatEndpointDtoContext2,
|
|
79
|
+
),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export type CreateTelegramChatEndpointDtoContext$Outbound =
|
|
85
|
+
| CreateTelegramChatEndpointDtoContext2$Outbound
|
|
86
|
+
| string;
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const CreateTelegramChatEndpointDtoContext$outboundSchema: z.ZodType<
|
|
90
|
+
CreateTelegramChatEndpointDtoContext$Outbound,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
CreateTelegramChatEndpointDtoContext
|
|
93
|
+
> = z.union([
|
|
94
|
+
z.lazy(() => CreateTelegramChatEndpointDtoContext2$outboundSchema),
|
|
95
|
+
z.string(),
|
|
96
|
+
]);
|
|
97
|
+
|
|
98
|
+
export function createTelegramChatEndpointDtoContextToJSON(
|
|
99
|
+
createTelegramChatEndpointDtoContext: CreateTelegramChatEndpointDtoContext,
|
|
100
|
+
): string {
|
|
101
|
+
return JSON.stringify(
|
|
102
|
+
CreateTelegramChatEndpointDtoContext$outboundSchema.parse(
|
|
103
|
+
createTelegramChatEndpointDtoContext,
|
|
104
|
+
),
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export type CreateTelegramChatEndpointDto$Outbound = {
|
|
110
|
+
identifier?: string | undefined;
|
|
111
|
+
subscriberId: string;
|
|
112
|
+
context?: {
|
|
113
|
+
[k: string]: CreateTelegramChatEndpointDtoContext2$Outbound | string;
|
|
114
|
+
} | undefined;
|
|
115
|
+
integrationIdentifier: string;
|
|
116
|
+
connectionIdentifier?: string | undefined;
|
|
117
|
+
type: "telegram_chat";
|
|
118
|
+
endpoint: TelegramChatEndpointDto$Outbound;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const CreateTelegramChatEndpointDto$outboundSchema: z.ZodType<
|
|
123
|
+
CreateTelegramChatEndpointDto$Outbound,
|
|
124
|
+
z.ZodTypeDef,
|
|
125
|
+
CreateTelegramChatEndpointDto
|
|
126
|
+
> = z.object({
|
|
127
|
+
identifier: z.string().optional(),
|
|
128
|
+
subscriberId: z.string(),
|
|
129
|
+
context: z.record(
|
|
130
|
+
z.union([
|
|
131
|
+
z.lazy(() => CreateTelegramChatEndpointDtoContext2$outboundSchema),
|
|
132
|
+
z.string(),
|
|
133
|
+
]),
|
|
134
|
+
).optional(),
|
|
135
|
+
integrationIdentifier: z.string(),
|
|
136
|
+
connectionIdentifier: z.string().optional(),
|
|
137
|
+
type: z.literal("telegram_chat"),
|
|
138
|
+
endpoint: TelegramChatEndpointDto$outboundSchema,
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export function createTelegramChatEndpointDtoToJSON(
|
|
142
|
+
createTelegramChatEndpointDto: CreateTelegramChatEndpointDto,
|
|
143
|
+
): string {
|
|
144
|
+
return JSON.stringify(
|
|
145
|
+
CreateTelegramChatEndpointDto$outboundSchema.parse(
|
|
146
|
+
createTelegramChatEndpointDto,
|
|
147
|
+
),
|
|
148
|
+
);
|
|
149
|
+
}
|
|
@@ -59,8 +59,25 @@ export type CredentialsDto = {
|
|
|
59
59
|
appIOBaseUrl?: string | undefined;
|
|
60
60
|
signingSecret?: string | undefined;
|
|
61
61
|
outboundIntegrationId?: string | undefined;
|
|
62
|
+
outboundConnectedAt?: string | undefined;
|
|
62
63
|
useFromAddressOverride?: boolean | undefined;
|
|
63
64
|
fromAddressOverride?: string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Agent default shared inbox slug prefix used in `{emailSlugPrefix}-{agentId}@<shared-domain>`. Only meaningful on the NovuAgent email integration.
|
|
67
|
+
*/
|
|
68
|
+
emailSlugPrefix?: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Claude Managed Agents: ID of the Anthropic environment tied to this integration. Hydrated by the API at integration provisioning time.
|
|
71
|
+
*/
|
|
72
|
+
externalEnvironmentId?: string | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Claude Managed Agents: ID of the Anthropic vault (`vlt_…`) tied to this integration. Hydrated by the API at integration provisioning time and used to push OAuth-completed MCP credentials to the per-vault credentials API.
|
|
75
|
+
*/
|
|
76
|
+
externalVaultId?: string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Claude Managed Agents: id of the Anthropic workspace used in console deep links. Defaults to `'default'` (the Default Workspace). Set this when the API key is scoped to a custom workspace (e.g. `wrkspc_…`).
|
|
79
|
+
*/
|
|
80
|
+
externalWorkspaceId?: string | undefined;
|
|
64
81
|
};
|
|
65
82
|
|
|
66
83
|
/** @internal */
|
|
@@ -146,8 +163,13 @@ export const CredentialsDto$inboundSchema: z.ZodType<
|
|
|
146
163
|
AppIOBaseUrl: z.string().optional(),
|
|
147
164
|
signingSecret: z.string().optional(),
|
|
148
165
|
outboundIntegrationId: z.string().optional(),
|
|
166
|
+
outboundConnectedAt: z.string().optional(),
|
|
149
167
|
useFromAddressOverride: z.boolean().optional(),
|
|
150
168
|
fromAddressOverride: z.string().optional(),
|
|
169
|
+
emailSlugPrefix: z.string().optional(),
|
|
170
|
+
externalEnvironmentId: z.string().optional(),
|
|
171
|
+
externalVaultId: z.string().optional(),
|
|
172
|
+
externalWorkspaceId: z.string().optional(),
|
|
151
173
|
}).transform((v) => {
|
|
152
174
|
return remap$(v, {
|
|
153
175
|
"AppIOBaseUrl": "appIOBaseUrl",
|
|
@@ -203,8 +225,13 @@ export type CredentialsDto$Outbound = {
|
|
|
203
225
|
AppIOBaseUrl?: string | undefined;
|
|
204
226
|
signingSecret?: string | undefined;
|
|
205
227
|
outboundIntegrationId?: string | undefined;
|
|
228
|
+
outboundConnectedAt?: string | undefined;
|
|
206
229
|
useFromAddressOverride?: boolean | undefined;
|
|
207
230
|
fromAddressOverride?: string | undefined;
|
|
231
|
+
emailSlugPrefix?: string | undefined;
|
|
232
|
+
externalEnvironmentId?: string | undefined;
|
|
233
|
+
externalVaultId?: string | undefined;
|
|
234
|
+
externalWorkspaceId?: string | undefined;
|
|
208
235
|
};
|
|
209
236
|
|
|
210
237
|
/** @internal */
|
|
@@ -261,8 +288,13 @@ export const CredentialsDto$outboundSchema: z.ZodType<
|
|
|
261
288
|
appIOBaseUrl: z.string().optional(),
|
|
262
289
|
signingSecret: z.string().optional(),
|
|
263
290
|
outboundIntegrationId: z.string().optional(),
|
|
291
|
+
outboundConnectedAt: z.string().optional(),
|
|
264
292
|
useFromAddressOverride: z.boolean().optional(),
|
|
265
293
|
fromAddressOverride: z.string().optional(),
|
|
294
|
+
emailSlugPrefix: z.string().optional(),
|
|
295
|
+
externalEnvironmentId: z.string().optional(),
|
|
296
|
+
externalVaultId: z.string().optional(),
|
|
297
|
+
externalWorkspaceId: z.string().optional(),
|
|
266
298
|
}).transform((v) => {
|
|
267
299
|
return remap$(v, {
|
|
268
300
|
appIOBaseUrl: "AppIOBaseUrl",
|
|
@@ -109,7 +109,10 @@ export const ProviderId = {
|
|
|
109
109
|
WhatsappBusiness: "whatsapp-business",
|
|
110
110
|
ChatWebhook: "chat-webhook",
|
|
111
111
|
NovuSlack: "novu-slack",
|
|
112
|
+
Telegram: "telegram",
|
|
112
113
|
Anthropic: "anthropic",
|
|
114
|
+
NovuAnthropic: "novu-anthropic",
|
|
115
|
+
AnthropicAws: "anthropic-aws",
|
|
113
116
|
} as const;
|
|
114
117
|
/**
|
|
115
118
|
* The provider identifier (e.g., sendgrid, twilio, slack, etc.).
|
|
@@ -7,6 +7,14 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
MsTeamsChannelEndpointDto,
|
|
12
|
+
MsTeamsChannelEndpointDto$inboundSchema,
|
|
13
|
+
} from "./msteamschannelendpointdto.js";
|
|
14
|
+
import {
|
|
15
|
+
MsTeamsUserEndpointDto,
|
|
16
|
+
MsTeamsUserEndpointDto$inboundSchema,
|
|
17
|
+
} from "./msteamsuserendpointdto.js";
|
|
10
18
|
import {
|
|
11
19
|
PhoneEndpointDto,
|
|
12
20
|
PhoneEndpointDto$inboundSchema,
|
|
@@ -19,6 +27,10 @@ import {
|
|
|
19
27
|
SlackUserEndpointDto,
|
|
20
28
|
SlackUserEndpointDto$inboundSchema,
|
|
21
29
|
} from "./slackuserendpointdto.js";
|
|
30
|
+
import {
|
|
31
|
+
TelegramChatEndpointDto,
|
|
32
|
+
TelegramChatEndpointDto$inboundSchema,
|
|
33
|
+
} from "./telegramchatendpointdto.js";
|
|
22
34
|
import {
|
|
23
35
|
WebhookEndpointDto,
|
|
24
36
|
WebhookEndpointDto$inboundSchema,
|
|
@@ -125,7 +137,10 @@ export const GetChannelEndpointResponseDtoProviderId = {
|
|
|
125
137
|
WhatsappBusiness: "whatsapp-business",
|
|
126
138
|
ChatWebhook: "chat-webhook",
|
|
127
139
|
NovuSlack: "novu-slack",
|
|
140
|
+
Telegram: "telegram",
|
|
128
141
|
Anthropic: "anthropic",
|
|
142
|
+
NovuAnthropic: "novu-anthropic",
|
|
143
|
+
AnthropicAws: "anthropic-aws",
|
|
129
144
|
} as const;
|
|
130
145
|
/**
|
|
131
146
|
* The provider identifier (e.g., sendgrid, twilio, slack, etc.).
|
|
@@ -144,6 +159,7 @@ export const GetChannelEndpointResponseDtoType = {
|
|
|
144
159
|
Phone: "phone",
|
|
145
160
|
MsTeamsChannel: "ms_teams_channel",
|
|
146
161
|
MsTeamsUser: "ms_teams_user",
|
|
162
|
+
TelegramChat: "telegram_chat",
|
|
147
163
|
} as const;
|
|
148
164
|
/**
|
|
149
165
|
* Type of channel endpoint
|
|
@@ -156,10 +172,13 @@ export type GetChannelEndpointResponseDtoType = ClosedEnum<
|
|
|
156
172
|
* Endpoint data specific to the channel type
|
|
157
173
|
*/
|
|
158
174
|
export type Endpoint =
|
|
175
|
+
| MsTeamsChannelEndpointDto
|
|
159
176
|
| SlackChannelEndpointDto
|
|
160
177
|
| SlackUserEndpointDto
|
|
161
178
|
| WebhookEndpointDto
|
|
162
|
-
| PhoneEndpointDto
|
|
179
|
+
| PhoneEndpointDto
|
|
180
|
+
| MsTeamsUserEndpointDto
|
|
181
|
+
| TelegramChatEndpointDto;
|
|
163
182
|
|
|
164
183
|
export type GetChannelEndpointResponseDto = {
|
|
165
184
|
/**
|
|
@@ -198,10 +217,13 @@ export type GetChannelEndpointResponseDto = {
|
|
|
198
217
|
* Endpoint data specific to the channel type
|
|
199
218
|
*/
|
|
200
219
|
endpoint:
|
|
220
|
+
| MsTeamsChannelEndpointDto
|
|
201
221
|
| SlackChannelEndpointDto
|
|
202
222
|
| SlackUserEndpointDto
|
|
203
223
|
| WebhookEndpointDto
|
|
204
|
-
| PhoneEndpointDto
|
|
224
|
+
| PhoneEndpointDto
|
|
225
|
+
| MsTeamsUserEndpointDto
|
|
226
|
+
| TelegramChatEndpointDto;
|
|
205
227
|
/**
|
|
206
228
|
* The timestamp indicating when the channel endpoint was created, in ISO 8601 format.
|
|
207
229
|
*/
|
|
@@ -234,10 +256,13 @@ export const Endpoint$inboundSchema: z.ZodType<
|
|
|
234
256
|
z.ZodTypeDef,
|
|
235
257
|
unknown
|
|
236
258
|
> = z.union([
|
|
259
|
+
MsTeamsChannelEndpointDto$inboundSchema,
|
|
237
260
|
SlackChannelEndpointDto$inboundSchema,
|
|
238
261
|
SlackUserEndpointDto$inboundSchema,
|
|
239
262
|
WebhookEndpointDto$inboundSchema,
|
|
240
263
|
PhoneEndpointDto$inboundSchema,
|
|
264
|
+
MsTeamsUserEndpointDto$inboundSchema,
|
|
265
|
+
TelegramChatEndpointDto$inboundSchema,
|
|
241
266
|
]);
|
|
242
267
|
|
|
243
268
|
export function endpointFromJSON(
|
|
@@ -265,10 +290,13 @@ export const GetChannelEndpointResponseDto$inboundSchema: z.ZodType<
|
|
|
265
290
|
contextKeys: z.array(z.string()),
|
|
266
291
|
type: GetChannelEndpointResponseDtoType$inboundSchema,
|
|
267
292
|
endpoint: z.union([
|
|
293
|
+
MsTeamsChannelEndpointDto$inboundSchema,
|
|
268
294
|
SlackChannelEndpointDto$inboundSchema,
|
|
269
295
|
SlackUserEndpointDto$inboundSchema,
|
|
270
296
|
WebhookEndpointDto$inboundSchema,
|
|
271
297
|
PhoneEndpointDto$inboundSchema,
|
|
298
|
+
MsTeamsUserEndpointDto$inboundSchema,
|
|
299
|
+
TelegramChatEndpointDto$inboundSchema,
|
|
272
300
|
]),
|
|
273
301
|
createdAt: z.string(),
|
|
274
302
|
updatedAt: z.string(),
|