@novu/api 3.17.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/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/credentialsdto.d.ts +2 -0
- package/models/components/credentialsdto.d.ts.map +1 -1
- package/models/components/credentialsdto.js +2 -0
- package/models/components/credentialsdto.js.map +1 -1
- package/models/components/index.d.ts +5 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -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/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/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/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/configuretelegramwebhookresponsedto.ts +45 -0
- package/src/models/components/credentialsdto.ts +4 -0
- package/src/models/components/index.ts +5 -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/previewpayloaddto.ts +7 -0
- package/src/models/components/updateworkflowdto.ts +11 -0
- 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/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
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type IntegrationsControllerLinkChannelEndpointRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* A header for idempotency purposes
|
|
15
|
+
*/
|
|
16
|
+
idempotencyKey?: string | undefined;
|
|
17
|
+
linkChannelEndpointRequestDto: components.LinkChannelEndpointRequestDto;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type IntegrationsControllerLinkChannelEndpointResponse = {
|
|
21
|
+
headers: { [k: string]: Array<string> };
|
|
22
|
+
result: components.LinkChannelEndpointResponseDto;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export type IntegrationsControllerLinkChannelEndpointRequest$Outbound = {
|
|
27
|
+
"idempotency-key"?: string | undefined;
|
|
28
|
+
LinkChannelEndpointRequestDto:
|
|
29
|
+
components.LinkChannelEndpointRequestDto$Outbound;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const IntegrationsControllerLinkChannelEndpointRequest$outboundSchema:
|
|
34
|
+
z.ZodType<
|
|
35
|
+
IntegrationsControllerLinkChannelEndpointRequest$Outbound,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
IntegrationsControllerLinkChannelEndpointRequest
|
|
38
|
+
> = z.object({
|
|
39
|
+
idempotencyKey: z.string().optional(),
|
|
40
|
+
linkChannelEndpointRequestDto:
|
|
41
|
+
components.LinkChannelEndpointRequestDto$outboundSchema,
|
|
42
|
+
}).transform((v) => {
|
|
43
|
+
return remap$(v, {
|
|
44
|
+
idempotencyKey: "idempotency-key",
|
|
45
|
+
linkChannelEndpointRequestDto: "LinkChannelEndpointRequestDto",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function integrationsControllerLinkChannelEndpointRequestToJSON(
|
|
50
|
+
integrationsControllerLinkChannelEndpointRequest:
|
|
51
|
+
IntegrationsControllerLinkChannelEndpointRequest,
|
|
52
|
+
): string {
|
|
53
|
+
return JSON.stringify(
|
|
54
|
+
IntegrationsControllerLinkChannelEndpointRequest$outboundSchema.parse(
|
|
55
|
+
integrationsControllerLinkChannelEndpointRequest,
|
|
56
|
+
),
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const IntegrationsControllerLinkChannelEndpointResponse$inboundSchema:
|
|
62
|
+
z.ZodType<
|
|
63
|
+
IntegrationsControllerLinkChannelEndpointResponse,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
unknown
|
|
66
|
+
> = z.object({
|
|
67
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
68
|
+
Result: components.LinkChannelEndpointResponseDto$inboundSchema,
|
|
69
|
+
}).transform((v) => {
|
|
70
|
+
return remap$(v, {
|
|
71
|
+
"Headers": "headers",
|
|
72
|
+
"Result": "result",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function integrationsControllerLinkChannelEndpointResponseFromJSON(
|
|
77
|
+
jsonString: string,
|
|
78
|
+
): SafeParseResult<
|
|
79
|
+
IntegrationsControllerLinkChannelEndpointResponse,
|
|
80
|
+
SDKValidationError
|
|
81
|
+
> {
|
|
82
|
+
return safeParse(
|
|
83
|
+
jsonString,
|
|
84
|
+
(x) =>
|
|
85
|
+
IntegrationsControllerLinkChannelEndpointResponse$inboundSchema.parse(
|
|
86
|
+
JSON.parse(x),
|
|
87
|
+
),
|
|
88
|
+
`Failed to parse 'IntegrationsControllerLinkChannelEndpointResponse' from JSON`,
|
|
89
|
+
);
|
|
90
|
+
}
|
package/src/sdk/integrations.ts
CHANGED
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { integrationsCreate } from "../funcs/integrationsCreate.js";
|
|
6
|
+
import { integrationsCreateMobileLink } from "../funcs/integrationsCreateMobileLink.js";
|
|
6
7
|
import { integrationsDelete } from "../funcs/integrationsDelete.js";
|
|
7
8
|
import { integrationsGenerateChatOAuthUrl } from "../funcs/integrationsGenerateChatOAuthUrl.js";
|
|
8
9
|
import { integrationsGenerateConnectOAuthUrl } from "../funcs/integrationsGenerateConnectOAuthUrl.js";
|
|
9
10
|
import { integrationsGenerateLinkUserOAuthUrl } from "../funcs/integrationsGenerateLinkUserOAuthUrl.js";
|
|
10
11
|
import { integrationsIntegrationsControllerAutoConfigureIntegration } from "../funcs/integrationsIntegrationsControllerAutoConfigureIntegration.js";
|
|
12
|
+
import { integrationsIntegrationsControllerConfigureIntegrationWebhook } from "../funcs/integrationsIntegrationsControllerConfigureIntegrationWebhook.js";
|
|
13
|
+
import { integrationsLinkChannelEndpoint } from "../funcs/integrationsLinkChannelEndpoint.js";
|
|
11
14
|
import { integrationsList } from "../funcs/integrationsList.js";
|
|
12
15
|
import { integrationsListActive } from "../funcs/integrationsListActive.js";
|
|
13
16
|
import { integrationsSetAsPrimary } from "../funcs/integrationsSetAsPrimary.js";
|
|
@@ -22,7 +25,7 @@ export class Integrations extends ClientSDK {
|
|
|
22
25
|
* List all integrations
|
|
23
26
|
*
|
|
24
27
|
* @remarks
|
|
25
|
-
* List all the channels integrations created in the organization
|
|
28
|
+
* List all the channels integrations created in the organization. Only integration metadata is returned, credentials field is returned as an empty object.
|
|
26
29
|
*/
|
|
27
30
|
async list(
|
|
28
31
|
idempotencyKey?: string | undefined,
|
|
@@ -40,7 +43,7 @@ export class Integrations extends ClientSDK {
|
|
|
40
43
|
*
|
|
41
44
|
* @remarks
|
|
42
45
|
* Create an integration for the current environment the user is based on the API key provided.
|
|
43
|
-
* Each provider supports different credentials, check the provider documentation for more details.
|
|
46
|
+
* 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.
|
|
44
47
|
*/
|
|
45
48
|
async create(
|
|
46
49
|
createIntegrationRequestDto: components.CreateIntegrationRequestDto,
|
|
@@ -60,7 +63,7 @@ export class Integrations extends ClientSDK {
|
|
|
60
63
|
*
|
|
61
64
|
* @remarks
|
|
62
65
|
* Update an integration by its unique key identifier **integrationId**.
|
|
63
|
-
* Each provider supports different credentials, check the provider documentation for more details.
|
|
66
|
+
* 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.
|
|
64
67
|
*/
|
|
65
68
|
async update(
|
|
66
69
|
updateIntegrationRequestDto: components.UpdateIntegrationRequestDto,
|
|
@@ -82,7 +85,7 @@ export class Integrations extends ClientSDK {
|
|
|
82
85
|
*
|
|
83
86
|
* @remarks
|
|
84
87
|
* Delete an integration by its unique key identifier **integrationId**.
|
|
85
|
-
* This action is irreversible.
|
|
88
|
+
* This action is irreversible. Only integration metadata is returned, credentials field is returned as empty object.
|
|
86
89
|
*/
|
|
87
90
|
async delete(
|
|
88
91
|
integrationId: string,
|
|
@@ -102,7 +105,7 @@ export class Integrations extends ClientSDK {
|
|
|
102
105
|
*
|
|
103
106
|
* @remarks
|
|
104
107
|
* Auto-configure an integration by its unique key identifier **integrationId** for inbound webhook support.
|
|
105
|
-
* This will automatically generate required webhook signing keys and configure webhook endpoints.
|
|
108
|
+
* This will automatically generate required webhook signing keys and configure webhook endpoints. Only integration metadata is returned, credentials field is returned as an empty object.
|
|
106
109
|
*/
|
|
107
110
|
async integrationsControllerAutoConfigureIntegration(
|
|
108
111
|
integrationId: string,
|
|
@@ -128,6 +131,7 @@ export class Integrations extends ClientSDK {
|
|
|
128
131
|
* Update an integration as **primary** by its unique key identifier **integrationId**.
|
|
129
132
|
* This API will set the integration as primary for that channel in the current environment.
|
|
130
133
|
* Primary integration is used to deliver notification for sms and email channels in the workflow.
|
|
134
|
+
* Only integration metadata is returned, credentials field is returned as an empty object.
|
|
131
135
|
*/
|
|
132
136
|
async setAsPrimary(
|
|
133
137
|
integrationId: string,
|
|
@@ -142,11 +146,58 @@ export class Integrations extends ClientSDK {
|
|
|
142
146
|
));
|
|
143
147
|
}
|
|
144
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Issue a short-lived mobile setup link for an existing integration
|
|
151
|
+
*
|
|
152
|
+
* @remarks
|
|
153
|
+
* Returns an opaque, single-use setup token plus a mobile URL for configuring an existing chat integration. Telegram is the only supported provider initially.
|
|
154
|
+
*/
|
|
155
|
+
async createMobileLink(
|
|
156
|
+
issueIntegrationMobileLinkRequestDto:
|
|
157
|
+
components.IssueIntegrationMobileLinkRequestDto,
|
|
158
|
+
integrationIdentifier: string,
|
|
159
|
+
idempotencyKey?: string | undefined,
|
|
160
|
+
options?: RequestOptions,
|
|
161
|
+
): Promise<
|
|
162
|
+
operations.IntegrationsControllerCreateIntegrationMobileLinkResponse
|
|
163
|
+
> {
|
|
164
|
+
return unwrapAsync(integrationsCreateMobileLink(
|
|
165
|
+
this,
|
|
166
|
+
issueIntegrationMobileLinkRequestDto,
|
|
167
|
+
integrationIdentifier,
|
|
168
|
+
idempotencyKey,
|
|
169
|
+
options,
|
|
170
|
+
));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Configure a chat integration webhook
|
|
175
|
+
*
|
|
176
|
+
* @remarks
|
|
177
|
+
* Registers the Novu webhook URL with the chat provider for the specified integration. Telegram is the only supported provider initially.
|
|
178
|
+
*/
|
|
179
|
+
async integrationsControllerConfigureIntegrationWebhook(
|
|
180
|
+
integrationIdentifier: string,
|
|
181
|
+
idempotencyKey?: string | undefined,
|
|
182
|
+
options?: RequestOptions,
|
|
183
|
+
): Promise<
|
|
184
|
+
operations.IntegrationsControllerConfigureIntegrationWebhookResponse
|
|
185
|
+
> {
|
|
186
|
+
return unwrapAsync(
|
|
187
|
+
integrationsIntegrationsControllerConfigureIntegrationWebhook(
|
|
188
|
+
this,
|
|
189
|
+
integrationIdentifier,
|
|
190
|
+
idempotencyKey,
|
|
191
|
+
options,
|
|
192
|
+
),
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
145
196
|
/**
|
|
146
197
|
* List active integrations
|
|
147
198
|
*
|
|
148
199
|
* @remarks
|
|
149
|
-
* List all the active integrations created in the organization
|
|
200
|
+
* List all the active integrations created in the organization. Only integration metadata is returned, credentials field is returned as an empty object.
|
|
150
201
|
*/
|
|
151
202
|
async listActive(
|
|
152
203
|
idempotencyKey?: string | undefined,
|
|
@@ -180,6 +231,25 @@ export class Integrations extends ClientSDK {
|
|
|
180
231
|
));
|
|
181
232
|
}
|
|
182
233
|
|
|
234
|
+
/**
|
|
235
|
+
* Issue a URL to link a subscriber chat identity
|
|
236
|
+
*
|
|
237
|
+
* @remarks
|
|
238
|
+
* Returns a provider-specific URL the subscriber opens to link their chat identity. The integration provider is resolved from integrationIdentifier; Telegram returns a deep link.
|
|
239
|
+
*/
|
|
240
|
+
async linkChannelEndpoint(
|
|
241
|
+
linkChannelEndpointRequestDto: components.LinkChannelEndpointRequestDto,
|
|
242
|
+
idempotencyKey?: string | undefined,
|
|
243
|
+
options?: RequestOptions,
|
|
244
|
+
): Promise<operations.IntegrationsControllerLinkChannelEndpointResponse> {
|
|
245
|
+
return unwrapAsync(integrationsLinkChannelEndpoint(
|
|
246
|
+
this,
|
|
247
|
+
linkChannelEndpointRequestDto,
|
|
248
|
+
idempotencyKey,
|
|
249
|
+
options,
|
|
250
|
+
));
|
|
251
|
+
}
|
|
252
|
+
|
|
183
253
|
/**
|
|
184
254
|
* Generate OAuth URL to link a subscriber user identity
|
|
185
255
|
*
|
package/src/sdk/novumessages.ts
CHANGED
|
@@ -15,8 +15,10 @@ export class NovuMessages extends ClientSDK {
|
|
|
15
15
|
* Update notification action status
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* Update in-app
|
|
18
|
+
* 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**.
|
|
19
19
|
* **type** field can be **primary** or **secondary**
|
|
20
|
+
*
|
|
21
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
20
22
|
*/
|
|
21
23
|
async updateAsSeen(
|
|
22
24
|
request: operations.SubscribersV1ControllerMarkActionAsSeenRequest,
|
|
@@ -33,7 +35,9 @@ export class NovuMessages extends ClientSDK {
|
|
|
33
35
|
* Update all notifications state
|
|
34
36
|
*
|
|
35
37
|
* @remarks
|
|
36
|
-
* Update all subscriber in-app
|
|
38
|
+
* This API is deprecated, use v2 API instead. Update all subscriber in-app notifications state such as read, unread, seen or unseen by **subscriberId**.
|
|
39
|
+
*
|
|
40
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
37
41
|
*/
|
|
38
42
|
async markAll(
|
|
39
43
|
markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto,
|
|
@@ -54,8 +58,10 @@ export class NovuMessages extends ClientSDK {
|
|
|
54
58
|
* Update notifications state
|
|
55
59
|
*
|
|
56
60
|
* @remarks
|
|
57
|
-
* Update subscriber's multiple in-app
|
|
58
|
-
* **messageId** is of type mongodbId of notifications
|
|
61
|
+
* 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**.
|
|
62
|
+
* **messageId** is of type mongodbId of notifications.
|
|
63
|
+
*
|
|
64
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
59
65
|
*/
|
|
60
66
|
async markAllAs(
|
|
61
67
|
messageMarkAsRequestDto: components.MessageMarkAsRequestDto,
|
|
@@ -353,7 +353,9 @@ export class NovuNotifications extends ClientSDK {
|
|
|
353
353
|
* Retrieve subscriber notifications
|
|
354
354
|
*
|
|
355
355
|
* @remarks
|
|
356
|
-
* Retrieve subscriber in-app
|
|
356
|
+
* This API is deprecated, use v2 API instead. Retrieve subscriber in-app notifications by its unique key identifier **subscriberId**.
|
|
357
|
+
*
|
|
358
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
357
359
|
*/
|
|
358
360
|
async feed(
|
|
359
361
|
request: operations.SubscribersV1ControllerGetNotificationsFeedRequest,
|
|
@@ -370,7 +372,9 @@ export class NovuNotifications extends ClientSDK {
|
|
|
370
372
|
* Retrieve unseen notifications count
|
|
371
373
|
*
|
|
372
374
|
* @remarks
|
|
373
|
-
* Retrieve unseen in-app
|
|
375
|
+
* This API is deprecated, use v2 API instead. Retrieve unseen in-app notifications count for a subscriber by its unique key identifier **subscriberId**.
|
|
376
|
+
*
|
|
377
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
374
378
|
*/
|
|
375
379
|
async unseenCount(
|
|
376
380
|
request: operations.SubscribersV1ControllerGetUnseenCountRequest,
|
package/lib/dlv.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param obj The object to walk
|
|
3
|
-
* @param key The key path to walk the object with
|
|
4
|
-
* @param def A default value to return if the result is undefined
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* dlv(obj, "a.b.c.d")
|
|
8
|
-
* @example
|
|
9
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
10
|
-
* @example
|
|
11
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
12
|
-
*/
|
|
13
|
-
export declare function dlv<T = any>(obj: any, key: string | string[], def?: T, p?: number, undef?: never): T | undefined;
|
|
14
|
-
//# sourceMappingURL=dlv.d.ts.map
|
package/lib/dlv.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dlv.d.ts","sourceRoot":"","sources":["../src/lib/dlv.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;;GAWG;AACH,wBAAgB,GAAG,CAAC,CAAC,GAAG,GAAG,EACzB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EACtB,GAAG,CAAC,EAAE,CAAC,EACP,CAAC,CAAC,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,KAAK,GACZ,CAAC,GAAG,SAAS,CAOf"}
|
package/lib/dlv.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.dlv = dlv;
|
|
7
|
-
/*
|
|
8
|
-
MIT License
|
|
9
|
-
|
|
10
|
-
Copyright (c) 2024 Jason Miller <jason@developit.ca> (http://jasonformat.com)
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
13
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
14
|
-
the Software without restriction, including without limitation the rights to
|
|
15
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
16
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
17
|
-
subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
24
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
25
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
26
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
27
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* @param obj The object to walk
|
|
31
|
-
* @param key The key path to walk the object with
|
|
32
|
-
* @param def A default value to return if the result is undefined
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* dlv(obj, "a.b.c.d")
|
|
36
|
-
* @example
|
|
37
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
38
|
-
* @example
|
|
39
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
40
|
-
*/
|
|
41
|
-
function dlv(obj, key, def, p, undef) {
|
|
42
|
-
key = Array.isArray(key) ? key : key.split(".");
|
|
43
|
-
for (p = 0; p < key.length; p++) {
|
|
44
|
-
const k = key[p];
|
|
45
|
-
obj = k != null && obj ? obj[k] : undef;
|
|
46
|
-
}
|
|
47
|
-
return obj === undef ? def : obj;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=dlv.js.map
|
package/lib/dlv.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dlv.js","sourceRoot":"","sources":["../src/lib/dlv.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAqCH,kBAaC;AAhDD;;;;;;;;;;;;;;;;;;;;;EAqBE;AAEF;;;;;;;;;;;GAWG;AACH,SAAgB,GAAG,CACjB,GAAQ,EACR,GAAsB,EACtB,GAAO,EACP,CAAU,EACV,KAAa;IAEb,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACjB,GAAG,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1C,CAAC;IACD,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACnC,CAAC"}
|
package/lib/is-plain-object.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.d.ts","sourceRoot":"","sources":["../src/lib/is-plain-object.ts"],"names":[],"mappings":"AA6BA,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAa7D"}
|
package/lib/is-plain-object.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isPlainObject = isPlainObject;
|
|
7
|
-
/*
|
|
8
|
-
MIT License
|
|
9
|
-
|
|
10
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
13
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
14
|
-
the Software without restriction, including without limitation the rights to
|
|
15
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
16
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
17
|
-
subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
24
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
25
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
26
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
27
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
*/
|
|
29
|
-
// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js
|
|
30
|
-
function isPlainObject(value) {
|
|
31
|
-
if (typeof value !== "object" || value === null) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
const prototype = Object.getPrototypeOf(value);
|
|
35
|
-
return ((prototype === null ||
|
|
36
|
-
prototype === Object.prototype ||
|
|
37
|
-
Object.getPrototypeOf(prototype) === null) &&
|
|
38
|
-
!(Symbol.toStringTag in value) &&
|
|
39
|
-
!(Symbol.iterator in value));
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=is-plain-object.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.js","sourceRoot":"","sources":["../src/lib/is-plain-object.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA2BH,sCAaC;AAtCD;;;;;;;;;;;;;;;;;;;;;EAqBE;AAEF,iHAAiH;AAEjH,SAAgB,aAAa,CAAC,KAAc;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,CACL,CAAC,SAAS,KAAK,IAAI;QACjB,SAAS,KAAK,MAAM,CAAC,SAAS;QAC9B,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;QAC5C,CAAC,CAAC,MAAM,CAAC,WAAW,IAAI,KAAK,CAAC;QAC9B,CAAC,CAAC,MAAM,CAAC,QAAQ,IAAI,KAAK,CAAC,CAC5B,CAAC;AACJ,CAAC"}
|
package/src/lib/dlv.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
MIT License
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2024 Jason Miller <jason@developit.ca> (http://jasonformat.com)
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
12
|
-
the Software without restriction, including without limitation the rights to
|
|
13
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
14
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
15
|
-
subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
22
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
23
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
24
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
25
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param obj The object to walk
|
|
30
|
-
* @param key The key path to walk the object with
|
|
31
|
-
* @param def A default value to return if the result is undefined
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* dlv(obj, "a.b.c.d")
|
|
35
|
-
* @example
|
|
36
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
37
|
-
* @example
|
|
38
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
39
|
-
*/
|
|
40
|
-
export function dlv<T = any>(
|
|
41
|
-
obj: any,
|
|
42
|
-
key: string | string[],
|
|
43
|
-
def?: T,
|
|
44
|
-
p?: number,
|
|
45
|
-
undef?: never,
|
|
46
|
-
): T | undefined {
|
|
47
|
-
key = Array.isArray(key) ? key : key.split(".");
|
|
48
|
-
for (p = 0; p < key.length; p++) {
|
|
49
|
-
const k = key[p];
|
|
50
|
-
obj = k != null && obj ? obj[k] : undef;
|
|
51
|
-
}
|
|
52
|
-
return obj === undef ? def : obj;
|
|
53
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
MIT License
|
|
7
|
-
|
|
8
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
12
|
-
the Software without restriction, including without limitation the rights to
|
|
13
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
14
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
15
|
-
subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
22
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
23
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
24
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
25
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js
|
|
29
|
-
|
|
30
|
-
export function isPlainObject(value: unknown): value is object {
|
|
31
|
-
if (typeof value !== "object" || value === null) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const prototype = Object.getPrototypeOf(value);
|
|
36
|
-
return (
|
|
37
|
-
(prototype === null ||
|
|
38
|
-
prototype === Object.prototype ||
|
|
39
|
-
Object.getPrototypeOf(prototype) === null) &&
|
|
40
|
-
!(Symbol.toStringTag in value) &&
|
|
41
|
-
!(Symbol.iterator in value)
|
|
42
|
-
);
|
|
43
|
-
}
|