@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
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
|
+
}
|
|
@@ -59,6 +59,7 @@ 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;
|
|
64
65
|
/**
|
|
@@ -162,6 +163,7 @@ export const CredentialsDto$inboundSchema: z.ZodType<
|
|
|
162
163
|
AppIOBaseUrl: z.string().optional(),
|
|
163
164
|
signingSecret: z.string().optional(),
|
|
164
165
|
outboundIntegrationId: z.string().optional(),
|
|
166
|
+
outboundConnectedAt: z.string().optional(),
|
|
165
167
|
useFromAddressOverride: z.boolean().optional(),
|
|
166
168
|
fromAddressOverride: z.string().optional(),
|
|
167
169
|
emailSlugPrefix: z.string().optional(),
|
|
@@ -223,6 +225,7 @@ export type CredentialsDto$Outbound = {
|
|
|
223
225
|
AppIOBaseUrl?: string | undefined;
|
|
224
226
|
signingSecret?: string | undefined;
|
|
225
227
|
outboundIntegrationId?: string | undefined;
|
|
228
|
+
outboundConnectedAt?: string | undefined;
|
|
226
229
|
useFromAddressOverride?: boolean | undefined;
|
|
227
230
|
fromAddressOverride?: string | undefined;
|
|
228
231
|
emailSlugPrefix?: string | undefined;
|
|
@@ -285,6 +288,7 @@ export const CredentialsDto$outboundSchema: z.ZodType<
|
|
|
285
288
|
appIOBaseUrl: z.string().optional(),
|
|
286
289
|
signingSecret: z.string().optional(),
|
|
287
290
|
outboundIntegrationId: z.string().optional(),
|
|
291
|
+
outboundConnectedAt: z.string().optional(),
|
|
288
292
|
useFromAddressOverride: z.boolean().optional(),
|
|
289
293
|
fromAddressOverride: z.string().optional(),
|
|
290
294
|
emailSlugPrefix: z.string().optional(),
|
|
@@ -37,6 +37,7 @@ export * from "./chatrenderoutput.js";
|
|
|
37
37
|
export * from "./chatstepresponsedto.js";
|
|
38
38
|
export * from "./chatstepupsertdto.js";
|
|
39
39
|
export * from "./configurationsdto.js";
|
|
40
|
+
export * from "./configuretelegramwebhookresponsedto.js";
|
|
40
41
|
export * from "./constraintvalidation.js";
|
|
41
42
|
export * from "./contentissueenum.js";
|
|
42
43
|
export * from "./controlsmetadatadto.js";
|
|
@@ -168,6 +169,8 @@ export * from "./inboxnotificationdto.js";
|
|
|
168
169
|
export * from "./inboxsubscriberresponsedto.js";
|
|
169
170
|
export * from "./integrationissueenum.js";
|
|
170
171
|
export * from "./integrationresponsedto.js";
|
|
172
|
+
export * from "./issueintegrationmobilelinkrequestdto.js";
|
|
173
|
+
export * from "./issuetelegrammobilelinkresponsedto.js";
|
|
171
174
|
export * from "./layoutcontrolsdto.js";
|
|
172
175
|
export * from "./layoutcontrolvaluesdto.js";
|
|
173
176
|
export * from "./layoutcreationsourceenum.js";
|
|
@@ -175,6 +178,8 @@ export * from "./layoutpreviewpayloaddto.js";
|
|
|
175
178
|
export * from "./layoutpreviewrequestdto.js";
|
|
176
179
|
export * from "./layoutresponsedto.js";
|
|
177
180
|
export * from "./layoutresponsedtosortfield.js";
|
|
181
|
+
export * from "./linkchannelendpointrequestdto.js";
|
|
182
|
+
export * from "./linkchannelendpointresponsedto.js";
|
|
178
183
|
export * from "./listchannelconnectionsresponsedto.js";
|
|
179
184
|
export * from "./listchannelendpointsresponsedto.js";
|
|
180
185
|
export * from "./listcontextsresponsedto.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type IssueIntegrationMobileLinkRequestDto = {
|
|
8
|
+
/**
|
|
9
|
+
* Optional subscriber to link via `/start` deep link after mobile setup completes. When provided, the consume response may include a ready-to-open Telegram deep link.
|
|
10
|
+
*/
|
|
11
|
+
subscriberId?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type IssueIntegrationMobileLinkRequestDto$Outbound = {
|
|
16
|
+
subscriberId?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const IssueIntegrationMobileLinkRequestDto$outboundSchema: z.ZodType<
|
|
21
|
+
IssueIntegrationMobileLinkRequestDto$Outbound,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
IssueIntegrationMobileLinkRequestDto
|
|
24
|
+
> = z.object({
|
|
25
|
+
subscriberId: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function issueIntegrationMobileLinkRequestDtoToJSON(
|
|
29
|
+
issueIntegrationMobileLinkRequestDto: IssueIntegrationMobileLinkRequestDto,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
IssueIntegrationMobileLinkRequestDto$outboundSchema.parse(
|
|
33
|
+
issueIntegrationMobileLinkRequestDto,
|
|
34
|
+
),
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -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 IssueTelegramMobileLinkResponseDto = {
|
|
11
|
+
/**
|
|
12
|
+
* Opaque, single-use token identifying this Telegram mobile-setup session
|
|
13
|
+
*/
|
|
14
|
+
token: string;
|
|
15
|
+
/**
|
|
16
|
+
* Absolute URL the user can open on a mobile device to complete Telegram setup
|
|
17
|
+
*/
|
|
18
|
+
url: string;
|
|
19
|
+
/**
|
|
20
|
+
* ISO-8601 timestamp at which the token expires
|
|
21
|
+
*/
|
|
22
|
+
expiresAt: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const IssueTelegramMobileLinkResponseDto$inboundSchema: z.ZodType<
|
|
27
|
+
IssueTelegramMobileLinkResponseDto,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
token: z.string(),
|
|
32
|
+
url: z.string(),
|
|
33
|
+
expiresAt: z.string(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export function issueTelegramMobileLinkResponseDtoFromJSON(
|
|
37
|
+
jsonString: string,
|
|
38
|
+
): SafeParseResult<IssueTelegramMobileLinkResponseDto, SDKValidationError> {
|
|
39
|
+
return safeParse(
|
|
40
|
+
jsonString,
|
|
41
|
+
(x) =>
|
|
42
|
+
IssueTelegramMobileLinkResponseDto$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'IssueTelegramMobileLinkResponseDto' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type LinkChannelEndpointRequestDto = {
|
|
8
|
+
/**
|
|
9
|
+
* Integration identifier for the chat provider integration
|
|
10
|
+
*/
|
|
11
|
+
integrationIdentifier: string;
|
|
12
|
+
/**
|
|
13
|
+
* External subscriber identifier to link to their chat identity
|
|
14
|
+
*/
|
|
15
|
+
subscriberId: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export type LinkChannelEndpointRequestDto$Outbound = {
|
|
20
|
+
integrationIdentifier: string;
|
|
21
|
+
subscriberId: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const LinkChannelEndpointRequestDto$outboundSchema: z.ZodType<
|
|
26
|
+
LinkChannelEndpointRequestDto$Outbound,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
LinkChannelEndpointRequestDto
|
|
29
|
+
> = z.object({
|
|
30
|
+
integrationIdentifier: z.string(),
|
|
31
|
+
subscriberId: z.string(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function linkChannelEndpointRequestDtoToJSON(
|
|
35
|
+
linkChannelEndpointRequestDto: LinkChannelEndpointRequestDto,
|
|
36
|
+
): string {
|
|
37
|
+
return JSON.stringify(
|
|
38
|
+
LinkChannelEndpointRequestDto$outboundSchema.parse(
|
|
39
|
+
linkChannelEndpointRequestDto,
|
|
40
|
+
),
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 LinkChannelEndpointResponseDto = {
|
|
11
|
+
/**
|
|
12
|
+
* URL the subscriber opens to link their chat identity (OAuth URL or deep link)
|
|
13
|
+
*/
|
|
14
|
+
url: string;
|
|
15
|
+
/**
|
|
16
|
+
* Provider-specific metadata returned alongside the link URL
|
|
17
|
+
*/
|
|
18
|
+
providerMetadata?: { [k: string]: any } | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const LinkChannelEndpointResponseDto$inboundSchema: z.ZodType<
|
|
23
|
+
LinkChannelEndpointResponseDto,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
url: z.string(),
|
|
28
|
+
providerMetadata: z.record(z.any()).optional(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function linkChannelEndpointResponseDtoFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<LinkChannelEndpointResponseDto, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) => LinkChannelEndpointResponseDto$inboundSchema.parse(JSON.parse(x)),
|
|
37
|
+
`Failed to parse 'LinkChannelEndpointResponseDto' from JSON`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -31,6 +31,10 @@ export type PreviewPayloadDto = {
|
|
|
31
31
|
* Partial subscriber information
|
|
32
32
|
*/
|
|
33
33
|
subscriber?: SubscriberResponseDtoOptional | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Partial actor information
|
|
36
|
+
*/
|
|
37
|
+
actor?: SubscriberResponseDtoOptional | undefined;
|
|
34
38
|
/**
|
|
35
39
|
* Payload data
|
|
36
40
|
*/
|
|
@@ -136,6 +140,7 @@ export const PreviewPayloadDto$inboundSchema: z.ZodType<
|
|
|
136
140
|
unknown
|
|
137
141
|
> = z.object({
|
|
138
142
|
subscriber: SubscriberResponseDtoOptional$inboundSchema.optional(),
|
|
143
|
+
actor: SubscriberResponseDtoOptional$inboundSchema.optional(),
|
|
139
144
|
payload: z.record(z.any()).optional(),
|
|
140
145
|
steps: z.record(z.any()).optional(),
|
|
141
146
|
context: z.record(
|
|
@@ -149,6 +154,7 @@ export const PreviewPayloadDto$inboundSchema: z.ZodType<
|
|
|
149
154
|
/** @internal */
|
|
150
155
|
export type PreviewPayloadDto$Outbound = {
|
|
151
156
|
subscriber?: SubscriberResponseDtoOptional$Outbound | undefined;
|
|
157
|
+
actor?: SubscriberResponseDtoOptional$Outbound | undefined;
|
|
152
158
|
payload?: { [k: string]: any } | undefined;
|
|
153
159
|
steps?: { [k: string]: any } | undefined;
|
|
154
160
|
context?:
|
|
@@ -164,6 +170,7 @@ export const PreviewPayloadDto$outboundSchema: z.ZodType<
|
|
|
164
170
|
PreviewPayloadDto
|
|
165
171
|
> = z.object({
|
|
166
172
|
subscriber: SubscriberResponseDtoOptional$outboundSchema.optional(),
|
|
173
|
+
actor: SubscriberResponseDtoOptional$outboundSchema.optional(),
|
|
167
174
|
payload: z.record(z.any()).optional(),
|
|
168
175
|
steps: z.record(z.any()).optional(),
|
|
169
176
|
context: z.record(
|
|
@@ -61,6 +61,11 @@ import {
|
|
|
61
61
|
SmsStepUpsertDto$Outbound,
|
|
62
62
|
SmsStepUpsertDto$outboundSchema,
|
|
63
63
|
} from "./smsstepupsertdto.js";
|
|
64
|
+
import {
|
|
65
|
+
ThrottleStepUpsertDto,
|
|
66
|
+
ThrottleStepUpsertDto$Outbound,
|
|
67
|
+
ThrottleStepUpsertDto$outboundSchema,
|
|
68
|
+
} from "./throttlestepupsertdto.js";
|
|
64
69
|
|
|
65
70
|
export type UpdateWorkflowDtoSteps =
|
|
66
71
|
| InAppStepUpsertDto
|
|
@@ -70,6 +75,7 @@ export type UpdateWorkflowDtoSteps =
|
|
|
70
75
|
| ChatStepUpsertDto
|
|
71
76
|
| DelayStepUpsertDto
|
|
72
77
|
| DigestStepUpsertDto
|
|
78
|
+
| ThrottleStepUpsertDto
|
|
73
79
|
| CustomStepUpsertDto
|
|
74
80
|
| HttpRequestStepUpsertDto;
|
|
75
81
|
|
|
@@ -117,6 +123,7 @@ export type UpdateWorkflowDto = {
|
|
|
117
123
|
| ChatStepUpsertDto
|
|
118
124
|
| DelayStepUpsertDto
|
|
119
125
|
| DigestStepUpsertDto
|
|
126
|
+
| ThrottleStepUpsertDto
|
|
120
127
|
| CustomStepUpsertDto
|
|
121
128
|
| HttpRequestStepUpsertDto
|
|
122
129
|
>;
|
|
@@ -143,6 +150,7 @@ export type UpdateWorkflowDtoSteps$Outbound =
|
|
|
143
150
|
| ChatStepUpsertDto$Outbound
|
|
144
151
|
| DelayStepUpsertDto$Outbound
|
|
145
152
|
| DigestStepUpsertDto$Outbound
|
|
153
|
+
| ThrottleStepUpsertDto$Outbound
|
|
146
154
|
| CustomStepUpsertDto$Outbound
|
|
147
155
|
| HttpRequestStepUpsertDto$Outbound;
|
|
148
156
|
|
|
@@ -159,6 +167,7 @@ export const UpdateWorkflowDtoSteps$outboundSchema: z.ZodType<
|
|
|
159
167
|
ChatStepUpsertDto$outboundSchema,
|
|
160
168
|
DelayStepUpsertDto$outboundSchema,
|
|
161
169
|
DigestStepUpsertDto$outboundSchema,
|
|
170
|
+
ThrottleStepUpsertDto$outboundSchema,
|
|
162
171
|
CustomStepUpsertDto$outboundSchema,
|
|
163
172
|
HttpRequestStepUpsertDto$outboundSchema,
|
|
164
173
|
]);
|
|
@@ -189,6 +198,7 @@ export type UpdateWorkflowDto$Outbound = {
|
|
|
189
198
|
| ChatStepUpsertDto$Outbound
|
|
190
199
|
| DelayStepUpsertDto$Outbound
|
|
191
200
|
| DigestStepUpsertDto$Outbound
|
|
201
|
+
| ThrottleStepUpsertDto$Outbound
|
|
192
202
|
| CustomStepUpsertDto$Outbound
|
|
193
203
|
| HttpRequestStepUpsertDto$Outbound
|
|
194
204
|
>;
|
|
@@ -220,6 +230,7 @@ export const UpdateWorkflowDto$outboundSchema: z.ZodType<
|
|
|
220
230
|
ChatStepUpsertDto$outboundSchema,
|
|
221
231
|
DelayStepUpsertDto$outboundSchema,
|
|
222
232
|
DigestStepUpsertDto$outboundSchema,
|
|
233
|
+
ThrottleStepUpsertDto$outboundSchema,
|
|
223
234
|
CustomStepUpsertDto$outboundSchema,
|
|
224
235
|
HttpRequestStepUpsertDto$outboundSchema,
|
|
225
236
|
]),
|
|
@@ -51,11 +51,14 @@ export * from "./eventscontrollertrigger.js";
|
|
|
51
51
|
export * from "./eventscontrollertriggerbulk.js";
|
|
52
52
|
export * from "./inboundwebhookscontrollerhandlewebhook.js";
|
|
53
53
|
export * from "./integrationscontrollerautoconfigureintegration.js";
|
|
54
|
+
export * from "./integrationscontrollerconfigureintegrationwebhook.js";
|
|
54
55
|
export * from "./integrationscontrollercreateintegration.js";
|
|
56
|
+
export * from "./integrationscontrollercreateintegrationmobilelink.js";
|
|
55
57
|
export * from "./integrationscontrollergenerateconnectoauthurl.js";
|
|
56
58
|
export * from "./integrationscontrollergeneratelinkuseroauthurl.js";
|
|
57
59
|
export * from "./integrationscontrollergetactiveintegrations.js";
|
|
58
60
|
export * from "./integrationscontrollergetchatoauthurl.js";
|
|
61
|
+
export * from "./integrationscontrollerlinkchannelendpoint.js";
|
|
59
62
|
export * from "./integrationscontrollerlistintegrations.js";
|
|
60
63
|
export * from "./integrationscontrollerremoveintegration.js";
|
|
61
64
|
export * from "./integrationscontrollersetintegrationasprimary.js";
|
|
@@ -0,0 +1,86 @@
|
|
|
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 IntegrationsControllerConfigureIntegrationWebhookRequest = {
|
|
13
|
+
integrationIdentifier: string;
|
|
14
|
+
/**
|
|
15
|
+
* A header for idempotency purposes
|
|
16
|
+
*/
|
|
17
|
+
idempotencyKey?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type IntegrationsControllerConfigureIntegrationWebhookResponse = {
|
|
21
|
+
headers: { [k: string]: Array<string> };
|
|
22
|
+
result: components.ConfigureTelegramWebhookResponseDto;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export type IntegrationsControllerConfigureIntegrationWebhookRequest$Outbound =
|
|
27
|
+
{
|
|
28
|
+
integrationIdentifier: string;
|
|
29
|
+
"idempotency-key"?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const IntegrationsControllerConfigureIntegrationWebhookRequest$outboundSchema:
|
|
34
|
+
z.ZodType<
|
|
35
|
+
IntegrationsControllerConfigureIntegrationWebhookRequest$Outbound,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
IntegrationsControllerConfigureIntegrationWebhookRequest
|
|
38
|
+
> = z.object({
|
|
39
|
+
integrationIdentifier: z.string(),
|
|
40
|
+
idempotencyKey: z.string().optional(),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
idempotencyKey: "idempotency-key",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function integrationsControllerConfigureIntegrationWebhookRequestToJSON(
|
|
48
|
+
integrationsControllerConfigureIntegrationWebhookRequest:
|
|
49
|
+
IntegrationsControllerConfigureIntegrationWebhookRequest,
|
|
50
|
+
): string {
|
|
51
|
+
return JSON.stringify(
|
|
52
|
+
IntegrationsControllerConfigureIntegrationWebhookRequest$outboundSchema
|
|
53
|
+
.parse(integrationsControllerConfigureIntegrationWebhookRequest),
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const IntegrationsControllerConfigureIntegrationWebhookResponse$inboundSchema:
|
|
59
|
+
z.ZodType<
|
|
60
|
+
IntegrationsControllerConfigureIntegrationWebhookResponse,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
unknown
|
|
63
|
+
> = z.object({
|
|
64
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
65
|
+
Result: components.ConfigureTelegramWebhookResponseDto$inboundSchema,
|
|
66
|
+
}).transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
"Headers": "headers",
|
|
69
|
+
"Result": "result",
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export function integrationsControllerConfigureIntegrationWebhookResponseFromJSON(
|
|
74
|
+
jsonString: string,
|
|
75
|
+
): SafeParseResult<
|
|
76
|
+
IntegrationsControllerConfigureIntegrationWebhookResponse,
|
|
77
|
+
SDKValidationError
|
|
78
|
+
> {
|
|
79
|
+
return safeParse(
|
|
80
|
+
jsonString,
|
|
81
|
+
(x) =>
|
|
82
|
+
IntegrationsControllerConfigureIntegrationWebhookResponse$inboundSchema
|
|
83
|
+
.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'IntegrationsControllerConfigureIntegrationWebhookResponse' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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 IntegrationsControllerCreateIntegrationMobileLinkRequest = {
|
|
13
|
+
integrationIdentifier: string;
|
|
14
|
+
/**
|
|
15
|
+
* A header for idempotency purposes
|
|
16
|
+
*/
|
|
17
|
+
idempotencyKey?: string | undefined;
|
|
18
|
+
issueIntegrationMobileLinkRequestDto:
|
|
19
|
+
components.IssueIntegrationMobileLinkRequestDto;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type IntegrationsControllerCreateIntegrationMobileLinkResponse = {
|
|
23
|
+
headers: { [k: string]: Array<string> };
|
|
24
|
+
result: components.IssueTelegramMobileLinkResponseDto;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type IntegrationsControllerCreateIntegrationMobileLinkRequest$Outbound =
|
|
29
|
+
{
|
|
30
|
+
integrationIdentifier: string;
|
|
31
|
+
"idempotency-key"?: string | undefined;
|
|
32
|
+
IssueIntegrationMobileLinkRequestDto:
|
|
33
|
+
components.IssueIntegrationMobileLinkRequestDto$Outbound;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const IntegrationsControllerCreateIntegrationMobileLinkRequest$outboundSchema:
|
|
38
|
+
z.ZodType<
|
|
39
|
+
IntegrationsControllerCreateIntegrationMobileLinkRequest$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
IntegrationsControllerCreateIntegrationMobileLinkRequest
|
|
42
|
+
> = z.object({
|
|
43
|
+
integrationIdentifier: z.string(),
|
|
44
|
+
idempotencyKey: z.string().optional(),
|
|
45
|
+
issueIntegrationMobileLinkRequestDto:
|
|
46
|
+
components.IssueIntegrationMobileLinkRequestDto$outboundSchema,
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
idempotencyKey: "idempotency-key",
|
|
50
|
+
issueIntegrationMobileLinkRequestDto:
|
|
51
|
+
"IssueIntegrationMobileLinkRequestDto",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function integrationsControllerCreateIntegrationMobileLinkRequestToJSON(
|
|
56
|
+
integrationsControllerCreateIntegrationMobileLinkRequest:
|
|
57
|
+
IntegrationsControllerCreateIntegrationMobileLinkRequest,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
IntegrationsControllerCreateIntegrationMobileLinkRequest$outboundSchema
|
|
61
|
+
.parse(integrationsControllerCreateIntegrationMobileLinkRequest),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const IntegrationsControllerCreateIntegrationMobileLinkResponse$inboundSchema:
|
|
67
|
+
z.ZodType<
|
|
68
|
+
IntegrationsControllerCreateIntegrationMobileLinkResponse,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
unknown
|
|
71
|
+
> = z.object({
|
|
72
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
73
|
+
Result: components.IssueTelegramMobileLinkResponseDto$inboundSchema,
|
|
74
|
+
}).transform((v) => {
|
|
75
|
+
return remap$(v, {
|
|
76
|
+
"Headers": "headers",
|
|
77
|
+
"Result": "result",
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export function integrationsControllerCreateIntegrationMobileLinkResponseFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<
|
|
84
|
+
IntegrationsControllerCreateIntegrationMobileLinkResponse,
|
|
85
|
+
SDKValidationError
|
|
86
|
+
> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) =>
|
|
90
|
+
IntegrationsControllerCreateIntegrationMobileLinkResponse$inboundSchema
|
|
91
|
+
.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'IntegrationsControllerCreateIntegrationMobileLinkResponse' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|