@novu/api 3.16.0 → 3.17.0
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/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- 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/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 +20 -0
- package/models/components/credentialsdto.d.ts.map +1 -1
- package/models/components/credentialsdto.js +8 -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 +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- 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/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/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/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/chatorpushproviderenum.ts +1 -0
- package/src/models/components/createtelegramchatendpointdto.ts +149 -0
- package/src/models/components/credentialsdto.ts +28 -0
- package/src/models/components/getchannelconnectionresponsedto.ts +3 -0
- package/src/models/components/getchannelendpointresponsedto.ts +30 -2
- package/src/models/components/index.ts +2 -0
- package/src/models/components/msteamschannelendpointdto.ts +21 -0
- package/src/models/components/msteamsuserendpointdto.ts +20 -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/operations/channelendpointscontrollercreatechannelendpoint.ts +10 -4
- 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
|
@@ -61,6 +61,22 @@ export type CredentialsDto = {
|
|
|
61
61
|
outboundIntegrationId?: string | undefined;
|
|
62
62
|
useFromAddressOverride?: boolean | undefined;
|
|
63
63
|
fromAddressOverride?: string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Agent default shared inbox slug prefix used in `{emailSlugPrefix}-{agentId}@<shared-domain>`. Only meaningful on the NovuAgent email integration.
|
|
66
|
+
*/
|
|
67
|
+
emailSlugPrefix?: string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Claude Managed Agents: ID of the Anthropic environment tied to this integration. Hydrated by the API at integration provisioning time.
|
|
70
|
+
*/
|
|
71
|
+
externalEnvironmentId?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* 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.
|
|
74
|
+
*/
|
|
75
|
+
externalVaultId?: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* 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_…`).
|
|
78
|
+
*/
|
|
79
|
+
externalWorkspaceId?: string | undefined;
|
|
64
80
|
};
|
|
65
81
|
|
|
66
82
|
/** @internal */
|
|
@@ -148,6 +164,10 @@ export const CredentialsDto$inboundSchema: z.ZodType<
|
|
|
148
164
|
outboundIntegrationId: z.string().optional(),
|
|
149
165
|
useFromAddressOverride: z.boolean().optional(),
|
|
150
166
|
fromAddressOverride: z.string().optional(),
|
|
167
|
+
emailSlugPrefix: z.string().optional(),
|
|
168
|
+
externalEnvironmentId: z.string().optional(),
|
|
169
|
+
externalVaultId: z.string().optional(),
|
|
170
|
+
externalWorkspaceId: z.string().optional(),
|
|
151
171
|
}).transform((v) => {
|
|
152
172
|
return remap$(v, {
|
|
153
173
|
"AppIOBaseUrl": "appIOBaseUrl",
|
|
@@ -205,6 +225,10 @@ export type CredentialsDto$Outbound = {
|
|
|
205
225
|
outboundIntegrationId?: string | undefined;
|
|
206
226
|
useFromAddressOverride?: boolean | undefined;
|
|
207
227
|
fromAddressOverride?: string | undefined;
|
|
228
|
+
emailSlugPrefix?: string | undefined;
|
|
229
|
+
externalEnvironmentId?: string | undefined;
|
|
230
|
+
externalVaultId?: string | undefined;
|
|
231
|
+
externalWorkspaceId?: string | undefined;
|
|
208
232
|
};
|
|
209
233
|
|
|
210
234
|
/** @internal */
|
|
@@ -263,6 +287,10 @@ export const CredentialsDto$outboundSchema: z.ZodType<
|
|
|
263
287
|
outboundIntegrationId: z.string().optional(),
|
|
264
288
|
useFromAddressOverride: z.boolean().optional(),
|
|
265
289
|
fromAddressOverride: z.string().optional(),
|
|
290
|
+
emailSlugPrefix: z.string().optional(),
|
|
291
|
+
externalEnvironmentId: z.string().optional(),
|
|
292
|
+
externalVaultId: z.string().optional(),
|
|
293
|
+
externalWorkspaceId: z.string().optional(),
|
|
266
294
|
}).transform((v) => {
|
|
267
295
|
return remap$(v, {
|
|
268
296
|
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(),
|
|
@@ -56,6 +56,7 @@ export * from "./createslackchannelendpointdto.js";
|
|
|
56
56
|
export * from "./createslackuserendpointdto.js";
|
|
57
57
|
export * from "./createsubscriberrequestdto.js";
|
|
58
58
|
export * from "./createsubscriptionsresponsedto.js";
|
|
59
|
+
export * from "./createtelegramchatendpointdto.js";
|
|
59
60
|
export * from "./createtopicsubscriptionsrequestdto.js";
|
|
60
61
|
export * from "./createtranslationrequestdto.js";
|
|
61
62
|
export * from "./createupdatetopicrequestdto.js";
|
|
@@ -284,6 +285,7 @@ export * from "./syncactionenum.js";
|
|
|
284
285
|
export * from "./syncedworkflowdto.js";
|
|
285
286
|
export * from "./syncresultdto.js";
|
|
286
287
|
export * from "./syncworkflowdto.js";
|
|
288
|
+
export * from "./telegramchatendpointdto.js";
|
|
287
289
|
export * from "./tenantpayloaddto.js";
|
|
288
290
|
export * from "./testdomainrouteagentresultdto.js";
|
|
289
291
|
export * from "./testdomainroutedto.js";
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
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";
|
|
6
9
|
|
|
7
10
|
export type MsTeamsChannelEndpointDto = {
|
|
8
11
|
/**
|
|
@@ -15,6 +18,15 @@ export type MsTeamsChannelEndpointDto = {
|
|
|
15
18
|
channelId: string;
|
|
16
19
|
};
|
|
17
20
|
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const MsTeamsChannelEndpointDto$inboundSchema: z.ZodType<
|
|
23
|
+
MsTeamsChannelEndpointDto,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
teamId: z.string(),
|
|
28
|
+
channelId: z.string(),
|
|
29
|
+
});
|
|
18
30
|
/** @internal */
|
|
19
31
|
export type MsTeamsChannelEndpointDto$Outbound = {
|
|
20
32
|
teamId: string;
|
|
@@ -38,3 +50,12 @@ export function msTeamsChannelEndpointDtoToJSON(
|
|
|
38
50
|
MsTeamsChannelEndpointDto$outboundSchema.parse(msTeamsChannelEndpointDto),
|
|
39
51
|
);
|
|
40
52
|
}
|
|
53
|
+
export function msTeamsChannelEndpointDtoFromJSON(
|
|
54
|
+
jsonString: string,
|
|
55
|
+
): SafeParseResult<MsTeamsChannelEndpointDto, SDKValidationError> {
|
|
56
|
+
return safeParse(
|
|
57
|
+
jsonString,
|
|
58
|
+
(x) => MsTeamsChannelEndpointDto$inboundSchema.parse(JSON.parse(x)),
|
|
59
|
+
`Failed to parse 'MsTeamsChannelEndpointDto' from JSON`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
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";
|
|
6
9
|
|
|
7
10
|
export type MsTeamsUserEndpointDto = {
|
|
8
11
|
/**
|
|
@@ -11,6 +14,14 @@ export type MsTeamsUserEndpointDto = {
|
|
|
11
14
|
userId: string;
|
|
12
15
|
};
|
|
13
16
|
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const MsTeamsUserEndpointDto$inboundSchema: z.ZodType<
|
|
19
|
+
MsTeamsUserEndpointDto,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
userId: z.string(),
|
|
24
|
+
});
|
|
14
25
|
/** @internal */
|
|
15
26
|
export type MsTeamsUserEndpointDto$Outbound = {
|
|
16
27
|
userId: string;
|
|
@@ -32,3 +43,12 @@ export function msTeamsUserEndpointDtoToJSON(
|
|
|
32
43
|
MsTeamsUserEndpointDto$outboundSchema.parse(msTeamsUserEndpointDto),
|
|
33
44
|
);
|
|
34
45
|
}
|
|
46
|
+
export function msTeamsUserEndpointDtoFromJSON(
|
|
47
|
+
jsonString: string,
|
|
48
|
+
): SafeParseResult<MsTeamsUserEndpointDto, SDKValidationError> {
|
|
49
|
+
return safeParse(
|
|
50
|
+
jsonString,
|
|
51
|
+
(x) => MsTeamsUserEndpointDto$inboundSchema.parse(JSON.parse(x)),
|
|
52
|
+
`Failed to parse 'MsTeamsUserEndpointDto' from JSON`,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -89,7 +89,10 @@ export const ProvidersIdEnum = {
|
|
|
89
89
|
WhatsappBusiness: "whatsapp-business",
|
|
90
90
|
ChatWebhook: "chat-webhook",
|
|
91
91
|
NovuSlack: "novu-slack",
|
|
92
|
+
Telegram: "telegram",
|
|
92
93
|
Anthropic: "anthropic",
|
|
94
|
+
NovuAnthropic: "novu-anthropic",
|
|
95
|
+
AnthropicAws: "anthropic-aws",
|
|
93
96
|
} as const;
|
|
94
97
|
/**
|
|
95
98
|
* Provider ID of the job
|
|
@@ -0,0 +1,54 @@
|
|
|
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 TelegramChatEndpointDto = {
|
|
11
|
+
/**
|
|
12
|
+
* Telegram chat ID
|
|
13
|
+
*/
|
|
14
|
+
chatId: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const TelegramChatEndpointDto$inboundSchema: z.ZodType<
|
|
19
|
+
TelegramChatEndpointDto,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
chatId: z.string(),
|
|
24
|
+
});
|
|
25
|
+
/** @internal */
|
|
26
|
+
export type TelegramChatEndpointDto$Outbound = {
|
|
27
|
+
chatId: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const TelegramChatEndpointDto$outboundSchema: z.ZodType<
|
|
32
|
+
TelegramChatEndpointDto$Outbound,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
TelegramChatEndpointDto
|
|
35
|
+
> = z.object({
|
|
36
|
+
chatId: z.string(),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function telegramChatEndpointDtoToJSON(
|
|
40
|
+
telegramChatEndpointDto: TelegramChatEndpointDto,
|
|
41
|
+
): string {
|
|
42
|
+
return JSON.stringify(
|
|
43
|
+
TelegramChatEndpointDto$outboundSchema.parse(telegramChatEndpointDto),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
export function telegramChatEndpointDtoFromJSON(
|
|
47
|
+
jsonString: string,
|
|
48
|
+
): SafeParseResult<TelegramChatEndpointDto, SDKValidationError> {
|
|
49
|
+
return safeParse(
|
|
50
|
+
jsonString,
|
|
51
|
+
(x) => TelegramChatEndpointDto$inboundSchema.parse(JSON.parse(x)),
|
|
52
|
+
`Failed to parse 'TelegramChatEndpointDto' from JSON`,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -18,7 +18,8 @@ export type ChannelEndpointsControllerCreateChannelEndpointRequestBody =
|
|
|
18
18
|
| components.CreateWebhookEndpointDto
|
|
19
19
|
| components.CreatePhoneEndpointDto
|
|
20
20
|
| components.CreateMsTeamsChannelEndpointDto
|
|
21
|
-
| components.CreateMsTeamsUserEndpointDto
|
|
21
|
+
| components.CreateMsTeamsUserEndpointDto
|
|
22
|
+
| components.CreateTelegramChatEndpointDto;
|
|
22
23
|
|
|
23
24
|
export type ChannelEndpointsControllerCreateChannelEndpointRequest = {
|
|
24
25
|
/**
|
|
@@ -34,7 +35,8 @@ export type ChannelEndpointsControllerCreateChannelEndpointRequest = {
|
|
|
34
35
|
| components.CreateWebhookEndpointDto
|
|
35
36
|
| components.CreatePhoneEndpointDto
|
|
36
37
|
| components.CreateMsTeamsChannelEndpointDto
|
|
37
|
-
| components.CreateMsTeamsUserEndpointDto
|
|
38
|
+
| components.CreateMsTeamsUserEndpointDto
|
|
39
|
+
| components.CreateTelegramChatEndpointDto;
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
export type ChannelEndpointsControllerCreateChannelEndpointResponse = {
|
|
@@ -49,7 +51,8 @@ export type ChannelEndpointsControllerCreateChannelEndpointRequestBody$Outbound
|
|
|
49
51
|
| components.CreateWebhookEndpointDto$Outbound
|
|
50
52
|
| components.CreatePhoneEndpointDto$Outbound
|
|
51
53
|
| components.CreateMsTeamsChannelEndpointDto$Outbound
|
|
52
|
-
| components.CreateMsTeamsUserEndpointDto$Outbound
|
|
54
|
+
| components.CreateMsTeamsUserEndpointDto$Outbound
|
|
55
|
+
| components.CreateTelegramChatEndpointDto$Outbound;
|
|
53
56
|
|
|
54
57
|
/** @internal */
|
|
55
58
|
export const ChannelEndpointsControllerCreateChannelEndpointRequestBody$outboundSchema:
|
|
@@ -64,6 +67,7 @@ export const ChannelEndpointsControllerCreateChannelEndpointRequestBody$outbound
|
|
|
64
67
|
components.CreatePhoneEndpointDto$outboundSchema,
|
|
65
68
|
components.CreateMsTeamsChannelEndpointDto$outboundSchema,
|
|
66
69
|
components.CreateMsTeamsUserEndpointDto$outboundSchema,
|
|
70
|
+
components.CreateTelegramChatEndpointDto$outboundSchema,
|
|
67
71
|
]);
|
|
68
72
|
|
|
69
73
|
export function channelEndpointsControllerCreateChannelEndpointRequestBodyToJSON(
|
|
@@ -85,7 +89,8 @@ export type ChannelEndpointsControllerCreateChannelEndpointRequest$Outbound = {
|
|
|
85
89
|
| components.CreateWebhookEndpointDto$Outbound
|
|
86
90
|
| components.CreatePhoneEndpointDto$Outbound
|
|
87
91
|
| components.CreateMsTeamsChannelEndpointDto$Outbound
|
|
88
|
-
| components.CreateMsTeamsUserEndpointDto$Outbound
|
|
92
|
+
| components.CreateMsTeamsUserEndpointDto$Outbound
|
|
93
|
+
| components.CreateTelegramChatEndpointDto$Outbound;
|
|
89
94
|
};
|
|
90
95
|
|
|
91
96
|
/** @internal */
|
|
@@ -103,6 +108,7 @@ export const ChannelEndpointsControllerCreateChannelEndpointRequest$outboundSche
|
|
|
103
108
|
components.CreatePhoneEndpointDto$outboundSchema,
|
|
104
109
|
components.CreateMsTeamsChannelEndpointDto$outboundSchema,
|
|
105
110
|
components.CreateMsTeamsUserEndpointDto$outboundSchema,
|
|
111
|
+
components.CreateTelegramChatEndpointDto$outboundSchema,
|
|
106
112
|
]),
|
|
107
113
|
}).transform((v) => {
|
|
108
114
|
return remap$(v, {
|
package/src/types/async.ts
CHANGED
|
@@ -21,16 +21,17 @@ export type APICall =
|
|
|
21
21
|
|
|
22
22
|
export class APIPromise<T> implements Promise<T> {
|
|
23
23
|
readonly #promise: Promise<[T, APICall]>;
|
|
24
|
-
|
|
24
|
+
#unwrapped: Promise<T> | null;
|
|
25
25
|
|
|
26
26
|
readonly [Symbol.toStringTag] = "APIPromise";
|
|
27
27
|
|
|
28
28
|
constructor(p: [T, APICall] | Promise<[T, APICall]>) {
|
|
29
29
|
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
30
|
-
this.#unwrapped =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
this.#unwrapped = p instanceof Promise ? null : Promise.resolve(p[0]);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#getUnwrapped(): Promise<T> {
|
|
34
|
+
return (this.#unwrapped ??= this.#promise.then(([value]) => value));
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
then<TResult1 = T, TResult2 = never>(
|
|
@@ -55,11 +56,11 @@ export class APIPromise<T> implements Promise<T> {
|
|
|
55
56
|
| null
|
|
56
57
|
| undefined,
|
|
57
58
|
): Promise<T | TResult> {
|
|
58
|
-
return this.#
|
|
59
|
+
return this.#getUnwrapped().catch(onrejected);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
finally(onfinally?: (() => void) | null | undefined): Promise<T> {
|
|
62
|
-
return this.#
|
|
63
|
+
return this.#getUnwrapped().finally(onfinally);
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
$inspect(): Promise<[T, APICall]> {
|
package/types/async.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GACf;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GACD;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEN,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,OAAO,CAAC,CAAC,CAAC;;IAI9C,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB;gBAEjC,CAAC,EAAE,CAAC,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CAAC,GACjD,IAAI,GACJ,SAAS,GACZ,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC;IAIvB,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhE,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;CAGlC"}
|
package/types/async.js
CHANGED
|
@@ -13,32 +13,33 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _APIPromise_promise, _APIPromise_unwrapped, _a;
|
|
16
|
+
var _APIPromise_instances, _APIPromise_promise, _APIPromise_unwrapped, _APIPromise_getUnwrapped, _a;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.APIPromise = void 0;
|
|
19
19
|
class APIPromise {
|
|
20
20
|
constructor(p) {
|
|
21
|
+
_APIPromise_instances.add(this);
|
|
21
22
|
_APIPromise_promise.set(this, void 0);
|
|
22
23
|
_APIPromise_unwrapped.set(this, void 0);
|
|
23
24
|
this[_a] = "APIPromise";
|
|
24
25
|
__classPrivateFieldSet(this, _APIPromise_promise, p instanceof Promise ? p : Promise.resolve(p), "f");
|
|
25
|
-
__classPrivateFieldSet(this, _APIPromise_unwrapped, p instanceof Promise
|
|
26
|
-
? __classPrivateFieldGet(this, _APIPromise_promise, "f").then(([value]) => value)
|
|
27
|
-
: Promise.resolve(p[0]), "f");
|
|
26
|
+
__classPrivateFieldSet(this, _APIPromise_unwrapped, p instanceof Promise ? null : Promise.resolve(p[0]), "f");
|
|
28
27
|
}
|
|
29
28
|
then(onfulfilled, onrejected) {
|
|
30
29
|
return __classPrivateFieldGet(this, _APIPromise_promise, "f").then(onfulfilled ? ([value]) => onfulfilled(value) : void 0, onrejected);
|
|
31
30
|
}
|
|
32
31
|
catch(onrejected) {
|
|
33
|
-
return __classPrivateFieldGet(this,
|
|
32
|
+
return __classPrivateFieldGet(this, _APIPromise_instances, "m", _APIPromise_getUnwrapped).call(this).catch(onrejected);
|
|
34
33
|
}
|
|
35
34
|
finally(onfinally) {
|
|
36
|
-
return __classPrivateFieldGet(this,
|
|
35
|
+
return __classPrivateFieldGet(this, _APIPromise_instances, "m", _APIPromise_getUnwrapped).call(this).finally(onfinally);
|
|
37
36
|
}
|
|
38
37
|
$inspect() {
|
|
39
38
|
return __classPrivateFieldGet(this, _APIPromise_promise, "f");
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
exports.APIPromise = APIPromise;
|
|
43
|
-
_APIPromise_promise = new WeakMap(), _APIPromise_unwrapped = new WeakMap(), _a = Symbol.toStringTag
|
|
42
|
+
_APIPromise_promise = new WeakMap(), _APIPromise_unwrapped = new WeakMap(), _APIPromise_instances = new WeakSet(), _a = Symbol.toStringTag, _APIPromise_getUnwrapped = function _APIPromise_getUnwrapped() {
|
|
43
|
+
return (__classPrivateFieldSet(this, _APIPromise_unwrapped, __classPrivateFieldGet(this, _APIPromise_unwrapped, "f") ?? __classPrivateFieldGet(this, _APIPromise_promise, "f").then(([value]) => value), "f"));
|
|
44
|
+
};
|
|
44
45
|
//# sourceMappingURL=async.js.map
|
package/types/async.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.js","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;AAmBH,MAAa,UAAU;IAMrB,YAAY,CAAuC
|
|
1
|
+
{"version":3,"file":"async.js","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;AAmBH,MAAa,UAAU;IAMrB,YAAY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