@meetkai/mka1 0.49.11 → 0.49.12
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/bin/mcp-server.js +126 -30
- package/bin/mcp-server.js.map +17 -15
- package/dist/commonjs/funcs/agentConnectorsActivateAgentConnector.d.ts +1 -1
- package/dist/commonjs/funcs/agentConnectorsActivateAgentConnector.js +1 -1
- package/dist/commonjs/funcs/agentConnectorsCreateAgentConnector.d.ts +1 -1
- package/dist/commonjs/funcs/agentConnectorsCreateAgentConnector.js +1 -1
- package/dist/commonjs/funcs/agentConnectorsDeleteAgentConnector.d.ts +1 -1
- package/dist/commonjs/funcs/agentConnectorsDeleteAgentConnector.js +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/tools/agentConnectorsActivateAgentConnector.js +1 -1
- package/dist/commonjs/mcp-server/tools/agentConnectorsActivateAgentConnector.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/agentConnectorsCreateAgentConnector.js +1 -1
- package/dist/commonjs/mcp-server/tools/agentConnectorsCreateAgentConnector.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/agentConnectorsDeleteAgentConnector.js +1 -1
- package/dist/commonjs/mcp-server/tools/agentConnectorsDeleteAgentConnector.js.map +1 -1
- package/dist/commonjs/models/components/agentconnector.d.ts +3 -2
- package/dist/commonjs/models/components/agentconnector.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentconnector.js +1 -0
- package/dist/commonjs/models/components/agentconnector.js.map +1 -1
- package/dist/commonjs/models/components/createagentconnectorrequest.d.ts +4 -80
- package/dist/commonjs/models/components/createagentconnectorrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createagentconnectorrequest.js +13 -93
- package/dist/commonjs/models/components/createagentconnectorrequest.js.map +1 -1
- package/dist/commonjs/models/components/createtelegramagentconnectorrequest.d.ts +77 -0
- package/dist/commonjs/models/components/createtelegramagentconnectorrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/createtelegramagentconnectorrequest.js +133 -0
- package/dist/commonjs/models/components/createtelegramagentconnectorrequest.js.map +1 -0
- package/dist/commonjs/models/components/createwhatsappagentconnectorrequest.d.ts +99 -0
- package/dist/commonjs/models/components/createwhatsappagentconnectorrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/createwhatsappagentconnectorrequest.js +161 -0
- package/dist/commonjs/models/components/createwhatsappagentconnectorrequest.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/react-query/agentConnectorsActivateAgentConnector.d.ts +1 -1
- package/dist/commonjs/react-query/agentConnectorsActivateAgentConnector.js +1 -1
- package/dist/commonjs/react-query/agentConnectorsCreateAgentConnector.d.ts +1 -1
- package/dist/commonjs/react-query/agentConnectorsCreateAgentConnector.js +1 -1
- package/dist/commonjs/react-query/agentConnectorsDeleteAgentConnector.d.ts +1 -1
- package/dist/commonjs/react-query/agentConnectorsDeleteAgentConnector.js +1 -1
- package/dist/commonjs/sdk/agentconnectors.d.ts +3 -3
- package/dist/commonjs/sdk/agentconnectors.js +3 -3
- package/dist/esm/funcs/agentConnectorsActivateAgentConnector.d.ts +1 -1
- package/dist/esm/funcs/agentConnectorsActivateAgentConnector.js +1 -1
- package/dist/esm/funcs/agentConnectorsCreateAgentConnector.d.ts +1 -1
- package/dist/esm/funcs/agentConnectorsCreateAgentConnector.js +1 -1
- package/dist/esm/funcs/agentConnectorsDeleteAgentConnector.d.ts +1 -1
- package/dist/esm/funcs/agentConnectorsDeleteAgentConnector.js +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/tools/agentConnectorsActivateAgentConnector.js +1 -1
- package/dist/esm/mcp-server/tools/agentConnectorsActivateAgentConnector.js.map +1 -1
- package/dist/esm/mcp-server/tools/agentConnectorsCreateAgentConnector.js +1 -1
- package/dist/esm/mcp-server/tools/agentConnectorsCreateAgentConnector.js.map +1 -1
- package/dist/esm/mcp-server/tools/agentConnectorsDeleteAgentConnector.js +1 -1
- package/dist/esm/mcp-server/tools/agentConnectorsDeleteAgentConnector.js.map +1 -1
- package/dist/esm/models/components/agentconnector.d.ts +3 -2
- package/dist/esm/models/components/agentconnector.d.ts.map +1 -1
- package/dist/esm/models/components/agentconnector.js +1 -0
- package/dist/esm/models/components/agentconnector.js.map +1 -1
- package/dist/esm/models/components/createagentconnectorrequest.d.ts +4 -80
- package/dist/esm/models/components/createagentconnectorrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createagentconnectorrequest.js +12 -88
- package/dist/esm/models/components/createagentconnectorrequest.js.map +1 -1
- package/dist/esm/models/components/createtelegramagentconnectorrequest.d.ts +77 -0
- package/dist/esm/models/components/createtelegramagentconnectorrequest.d.ts.map +1 -0
- package/dist/esm/models/components/createtelegramagentconnectorrequest.js +91 -0
- package/dist/esm/models/components/createtelegramagentconnectorrequest.js.map +1 -0
- package/dist/esm/models/components/createwhatsappagentconnectorrequest.d.ts +99 -0
- package/dist/esm/models/components/createwhatsappagentconnectorrequest.d.ts.map +1 -0
- package/dist/esm/models/components/createwhatsappagentconnectorrequest.js +117 -0
- package/dist/esm/models/components/createwhatsappagentconnectorrequest.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/react-query/agentConnectorsActivateAgentConnector.d.ts +1 -1
- package/dist/esm/react-query/agentConnectorsActivateAgentConnector.js +1 -1
- package/dist/esm/react-query/agentConnectorsCreateAgentConnector.d.ts +1 -1
- package/dist/esm/react-query/agentConnectorsCreateAgentConnector.js +1 -1
- package/dist/esm/react-query/agentConnectorsDeleteAgentConnector.d.ts +1 -1
- package/dist/esm/react-query/agentConnectorsDeleteAgentConnector.js +1 -1
- package/dist/esm/sdk/agentconnectors.d.ts +3 -3
- package/dist/esm/sdk/agentconnectors.js +3 -3
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/agentConnectorsActivateAgentConnector.ts +1 -1
- package/src/funcs/agentConnectorsCreateAgentConnector.ts +1 -1
- package/src/funcs/agentConnectorsDeleteAgentConnector.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/agentConnectorsActivateAgentConnector.ts +1 -1
- package/src/mcp-server/tools/agentConnectorsCreateAgentConnector.ts +1 -1
- package/src/mcp-server/tools/agentConnectorsDeleteAgentConnector.ts +1 -1
- package/src/models/components/agentconnector.ts +3 -2
- package/src/models/components/createagentconnectorrequest.ts +27 -196
- package/src/models/components/createtelegramagentconnectorrequest.ts +225 -0
- package/src/models/components/createwhatsappagentconnectorrequest.ts +301 -0
- package/src/models/components/index.ts +2 -0
- package/src/react-query/agentConnectorsActivateAgentConnector.ts +1 -1
- package/src/react-query/agentConnectorsCreateAgentConnector.ts +1 -1
- package/src/react-query/agentConnectorsDeleteAgentConnector.ts +1 -1
- package/src/sdk/agentconnectors.ts +3 -3
|
@@ -0,0 +1,301 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type CreateWhatsAppAgentConnectorRequestCredentials = {
|
|
13
|
+
/**
|
|
14
|
+
* Long-lived Meta system-user access token with whatsapp_business_messaging and whatsapp_business_management permissions. It is encrypted at rest and never returned.
|
|
15
|
+
*/
|
|
16
|
+
accessToken: string;
|
|
17
|
+
/**
|
|
18
|
+
* Meta app secret used to authenticate webhook payloads. It is encrypted at rest and never returned.
|
|
19
|
+
*/
|
|
20
|
+
appSecret: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type Account = {
|
|
24
|
+
/**
|
|
25
|
+
* Meta app ID. It is used with the app secret to verify that the system-user token belongs to this app and has the required WhatsApp permissions.
|
|
26
|
+
*/
|
|
27
|
+
appId: string;
|
|
28
|
+
whatsappBusinessAccountId: string;
|
|
29
|
+
phoneNumberId: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const CreateWhatsAppAgentConnectorRequestMode = {
|
|
33
|
+
Allowlist: "allowlist",
|
|
34
|
+
} as const;
|
|
35
|
+
export type CreateWhatsAppAgentConnectorRequestMode = ClosedEnum<
|
|
36
|
+
typeof CreateWhatsAppAgentConnectorRequestMode
|
|
37
|
+
>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Exact WhatsApp sender IDs permitted to invoke the agent. These are digit strings without a leading plus sign.
|
|
41
|
+
*/
|
|
42
|
+
export type CreateWhatsAppAgentConnectorRequestAccess = {
|
|
43
|
+
mode: CreateWhatsAppAgentConnectorRequestMode;
|
|
44
|
+
userIds: Array<string>;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export type CreateWhatsAppAgentConnectorRequest = {
|
|
48
|
+
/**
|
|
49
|
+
* WhatsApp Cloud API connector with text, image, document, and native thumbs-reaction feedback support.
|
|
50
|
+
*/
|
|
51
|
+
provider: "whatsapp";
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
credentials: CreateWhatsAppAgentConnectorRequestCredentials;
|
|
54
|
+
account: Account;
|
|
55
|
+
/**
|
|
56
|
+
* Exact WhatsApp sender IDs permitted to invoke the agent. These are digit strings without a leading plus sign.
|
|
57
|
+
*/
|
|
58
|
+
access: CreateWhatsAppAgentConnectorRequestAccess;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const CreateWhatsAppAgentConnectorRequestCredentials$inboundSchema:
|
|
63
|
+
z.ZodType<
|
|
64
|
+
CreateWhatsAppAgentConnectorRequestCredentials,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
unknown
|
|
67
|
+
> = z.object({
|
|
68
|
+
access_token: z.string(),
|
|
69
|
+
app_secret: z.string(),
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
"access_token": "accessToken",
|
|
73
|
+
"app_secret": "appSecret",
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
/** @internal */
|
|
77
|
+
export type CreateWhatsAppAgentConnectorRequestCredentials$Outbound = {
|
|
78
|
+
access_token: string;
|
|
79
|
+
app_secret: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const CreateWhatsAppAgentConnectorRequestCredentials$outboundSchema:
|
|
84
|
+
z.ZodType<
|
|
85
|
+
CreateWhatsAppAgentConnectorRequestCredentials$Outbound,
|
|
86
|
+
z.ZodTypeDef,
|
|
87
|
+
CreateWhatsAppAgentConnectorRequestCredentials
|
|
88
|
+
> = z.object({
|
|
89
|
+
accessToken: z.string(),
|
|
90
|
+
appSecret: z.string(),
|
|
91
|
+
}).transform((v) => {
|
|
92
|
+
return remap$(v, {
|
|
93
|
+
accessToken: "access_token",
|
|
94
|
+
appSecret: "app_secret",
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export function createWhatsAppAgentConnectorRequestCredentialsToJSON(
|
|
99
|
+
createWhatsAppAgentConnectorRequestCredentials:
|
|
100
|
+
CreateWhatsAppAgentConnectorRequestCredentials,
|
|
101
|
+
): string {
|
|
102
|
+
return JSON.stringify(
|
|
103
|
+
CreateWhatsAppAgentConnectorRequestCredentials$outboundSchema.parse(
|
|
104
|
+
createWhatsAppAgentConnectorRequestCredentials,
|
|
105
|
+
),
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
export function createWhatsAppAgentConnectorRequestCredentialsFromJSON(
|
|
109
|
+
jsonString: string,
|
|
110
|
+
): SafeParseResult<
|
|
111
|
+
CreateWhatsAppAgentConnectorRequestCredentials,
|
|
112
|
+
SDKValidationError
|
|
113
|
+
> {
|
|
114
|
+
return safeParse(
|
|
115
|
+
jsonString,
|
|
116
|
+
(x) =>
|
|
117
|
+
CreateWhatsAppAgentConnectorRequestCredentials$inboundSchema.parse(
|
|
118
|
+
JSON.parse(x),
|
|
119
|
+
),
|
|
120
|
+
`Failed to parse 'CreateWhatsAppAgentConnectorRequestCredentials' from JSON`,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** @internal */
|
|
125
|
+
export const Account$inboundSchema: z.ZodType<Account, z.ZodTypeDef, unknown> =
|
|
126
|
+
z.object({
|
|
127
|
+
app_id: z.string(),
|
|
128
|
+
whatsapp_business_account_id: z.string(),
|
|
129
|
+
phone_number_id: z.string(),
|
|
130
|
+
}).transform((v) => {
|
|
131
|
+
return remap$(v, {
|
|
132
|
+
"app_id": "appId",
|
|
133
|
+
"whatsapp_business_account_id": "whatsappBusinessAccountId",
|
|
134
|
+
"phone_number_id": "phoneNumberId",
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
/** @internal */
|
|
138
|
+
export type Account$Outbound = {
|
|
139
|
+
app_id: string;
|
|
140
|
+
whatsapp_business_account_id: string;
|
|
141
|
+
phone_number_id: string;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export const Account$outboundSchema: z.ZodType<
|
|
146
|
+
Account$Outbound,
|
|
147
|
+
z.ZodTypeDef,
|
|
148
|
+
Account
|
|
149
|
+
> = z.object({
|
|
150
|
+
appId: z.string(),
|
|
151
|
+
whatsappBusinessAccountId: z.string(),
|
|
152
|
+
phoneNumberId: z.string(),
|
|
153
|
+
}).transform((v) => {
|
|
154
|
+
return remap$(v, {
|
|
155
|
+
appId: "app_id",
|
|
156
|
+
whatsappBusinessAccountId: "whatsapp_business_account_id",
|
|
157
|
+
phoneNumberId: "phone_number_id",
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
export function accountToJSON(account: Account): string {
|
|
162
|
+
return JSON.stringify(Account$outboundSchema.parse(account));
|
|
163
|
+
}
|
|
164
|
+
export function accountFromJSON(
|
|
165
|
+
jsonString: string,
|
|
166
|
+
): SafeParseResult<Account, SDKValidationError> {
|
|
167
|
+
return safeParse(
|
|
168
|
+
jsonString,
|
|
169
|
+
(x) => Account$inboundSchema.parse(JSON.parse(x)),
|
|
170
|
+
`Failed to parse 'Account' from JSON`,
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
export const CreateWhatsAppAgentConnectorRequestMode$inboundSchema:
|
|
176
|
+
z.ZodNativeEnum<typeof CreateWhatsAppAgentConnectorRequestMode> = z
|
|
177
|
+
.nativeEnum(CreateWhatsAppAgentConnectorRequestMode);
|
|
178
|
+
/** @internal */
|
|
179
|
+
export const CreateWhatsAppAgentConnectorRequestMode$outboundSchema:
|
|
180
|
+
z.ZodNativeEnum<typeof CreateWhatsAppAgentConnectorRequestMode> =
|
|
181
|
+
CreateWhatsAppAgentConnectorRequestMode$inboundSchema;
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export const CreateWhatsAppAgentConnectorRequestAccess$inboundSchema: z.ZodType<
|
|
185
|
+
CreateWhatsAppAgentConnectorRequestAccess,
|
|
186
|
+
z.ZodTypeDef,
|
|
187
|
+
unknown
|
|
188
|
+
> = z.object({
|
|
189
|
+
mode: CreateWhatsAppAgentConnectorRequestMode$inboundSchema,
|
|
190
|
+
user_ids: z.array(z.string()),
|
|
191
|
+
}).transform((v) => {
|
|
192
|
+
return remap$(v, {
|
|
193
|
+
"user_ids": "userIds",
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
/** @internal */
|
|
197
|
+
export type CreateWhatsAppAgentConnectorRequestAccess$Outbound = {
|
|
198
|
+
mode: string;
|
|
199
|
+
user_ids: Array<string>;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
/** @internal */
|
|
203
|
+
export const CreateWhatsAppAgentConnectorRequestAccess$outboundSchema:
|
|
204
|
+
z.ZodType<
|
|
205
|
+
CreateWhatsAppAgentConnectorRequestAccess$Outbound,
|
|
206
|
+
z.ZodTypeDef,
|
|
207
|
+
CreateWhatsAppAgentConnectorRequestAccess
|
|
208
|
+
> = z.object({
|
|
209
|
+
mode: CreateWhatsAppAgentConnectorRequestMode$outboundSchema,
|
|
210
|
+
userIds: z.array(z.string()),
|
|
211
|
+
}).transform((v) => {
|
|
212
|
+
return remap$(v, {
|
|
213
|
+
userIds: "user_ids",
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
export function createWhatsAppAgentConnectorRequestAccessToJSON(
|
|
218
|
+
createWhatsAppAgentConnectorRequestAccess:
|
|
219
|
+
CreateWhatsAppAgentConnectorRequestAccess,
|
|
220
|
+
): string {
|
|
221
|
+
return JSON.stringify(
|
|
222
|
+
CreateWhatsAppAgentConnectorRequestAccess$outboundSchema.parse(
|
|
223
|
+
createWhatsAppAgentConnectorRequestAccess,
|
|
224
|
+
),
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
export function createWhatsAppAgentConnectorRequestAccessFromJSON(
|
|
228
|
+
jsonString: string,
|
|
229
|
+
): SafeParseResult<
|
|
230
|
+
CreateWhatsAppAgentConnectorRequestAccess,
|
|
231
|
+
SDKValidationError
|
|
232
|
+
> {
|
|
233
|
+
return safeParse(
|
|
234
|
+
jsonString,
|
|
235
|
+
(x) =>
|
|
236
|
+
CreateWhatsAppAgentConnectorRequestAccess$inboundSchema.parse(
|
|
237
|
+
JSON.parse(x),
|
|
238
|
+
),
|
|
239
|
+
`Failed to parse 'CreateWhatsAppAgentConnectorRequestAccess' from JSON`,
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/** @internal */
|
|
244
|
+
export const CreateWhatsAppAgentConnectorRequest$inboundSchema: z.ZodType<
|
|
245
|
+
CreateWhatsAppAgentConnectorRequest,
|
|
246
|
+
z.ZodTypeDef,
|
|
247
|
+
unknown
|
|
248
|
+
> = z.object({
|
|
249
|
+
provider: z.literal("whatsapp"),
|
|
250
|
+
name: z.string().optional(),
|
|
251
|
+
credentials: z.lazy(() =>
|
|
252
|
+
CreateWhatsAppAgentConnectorRequestCredentials$inboundSchema
|
|
253
|
+
),
|
|
254
|
+
account: z.lazy(() => Account$inboundSchema),
|
|
255
|
+
access: z.lazy(() => CreateWhatsAppAgentConnectorRequestAccess$inboundSchema),
|
|
256
|
+
});
|
|
257
|
+
/** @internal */
|
|
258
|
+
export type CreateWhatsAppAgentConnectorRequest$Outbound = {
|
|
259
|
+
provider: "whatsapp";
|
|
260
|
+
name?: string | undefined;
|
|
261
|
+
credentials: CreateWhatsAppAgentConnectorRequestCredentials$Outbound;
|
|
262
|
+
account: Account$Outbound;
|
|
263
|
+
access: CreateWhatsAppAgentConnectorRequestAccess$Outbound;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
/** @internal */
|
|
267
|
+
export const CreateWhatsAppAgentConnectorRequest$outboundSchema: z.ZodType<
|
|
268
|
+
CreateWhatsAppAgentConnectorRequest$Outbound,
|
|
269
|
+
z.ZodTypeDef,
|
|
270
|
+
CreateWhatsAppAgentConnectorRequest
|
|
271
|
+
> = z.object({
|
|
272
|
+
provider: z.literal("whatsapp"),
|
|
273
|
+
name: z.string().optional(),
|
|
274
|
+
credentials: z.lazy(() =>
|
|
275
|
+
CreateWhatsAppAgentConnectorRequestCredentials$outboundSchema
|
|
276
|
+
),
|
|
277
|
+
account: z.lazy(() => Account$outboundSchema),
|
|
278
|
+
access: z.lazy(() =>
|
|
279
|
+
CreateWhatsAppAgentConnectorRequestAccess$outboundSchema
|
|
280
|
+
),
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
export function createWhatsAppAgentConnectorRequestToJSON(
|
|
284
|
+
createWhatsAppAgentConnectorRequest: CreateWhatsAppAgentConnectorRequest,
|
|
285
|
+
): string {
|
|
286
|
+
return JSON.stringify(
|
|
287
|
+
CreateWhatsAppAgentConnectorRequest$outboundSchema.parse(
|
|
288
|
+
createWhatsAppAgentConnectorRequest,
|
|
289
|
+
),
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
export function createWhatsAppAgentConnectorRequestFromJSON(
|
|
293
|
+
jsonString: string,
|
|
294
|
+
): SafeParseResult<CreateWhatsAppAgentConnectorRequest, SDKValidationError> {
|
|
295
|
+
return safeParse(
|
|
296
|
+
jsonString,
|
|
297
|
+
(x) =>
|
|
298
|
+
CreateWhatsAppAgentConnectorRequest$inboundSchema.parse(JSON.parse(x)),
|
|
299
|
+
`Failed to parse 'CreateWhatsAppAgentConnectorRequest' from JSON`,
|
|
300
|
+
);
|
|
301
|
+
}
|
|
@@ -100,10 +100,12 @@ export * from "./createpromptrequest.js";
|
|
|
100
100
|
export * from "./createpromptresponse.js";
|
|
101
101
|
export * from "./createsessionrequest.js";
|
|
102
102
|
export * from "./createsessionresponse.js";
|
|
103
|
+
export * from "./createtelegramagentconnectorrequest.js";
|
|
103
104
|
export * from "./createvectorstorefilebatchrequest.js";
|
|
104
105
|
export * from "./createvectorstorefilerequest.js";
|
|
105
106
|
export * from "./createvectorstorerequest.js";
|
|
106
107
|
export * from "./createversionresponse.js";
|
|
108
|
+
export * from "./createwhatsappagentconnectorrequest.js";
|
|
107
109
|
export * from "./customtoolcall.js";
|
|
108
110
|
export * from "./customtoolcalloutput.js";
|
|
109
111
|
export * from "./customtoolcalloutputwithid.js";
|
|
@@ -51,7 +51,7 @@ export type AgentConnectorsActivateAgentConnectorMutationError =
|
|
|
51
51
|
* Activate a connector
|
|
52
52
|
*
|
|
53
53
|
* @remarks
|
|
54
|
-
* Revalidates the stored
|
|
54
|
+
* Revalidates the stored provider credentials and registers the provider webhook. Use this to retry a connector left in an error state. API-key authentication with every listed scope is required; session authentication is rejected, and the key must belong to the connector's original user or service-account principal so existing conversations keep the same owner.
|
|
55
55
|
*/
|
|
56
56
|
export function useAgentConnectorsActivateAgentConnectorMutation(
|
|
57
57
|
options?: MutationHookOptions<
|
|
@@ -51,7 +51,7 @@ export type AgentConnectorsCreateAgentConnectorMutationError =
|
|
|
51
51
|
* Create a connector
|
|
52
52
|
*
|
|
53
53
|
* @remarks
|
|
54
|
-
* Connects the agent to a Telegram bot, validates the
|
|
54
|
+
* Connects the agent to a Telegram bot or WhatsApp Business phone number, validates the provider credentials, and registers the agent's webhook. Text, photos, and gateway-supported documents can invoke the agent; inbound media additionally requires write:files. Managed outbound files require read:files, and generated images require both file scopes so their transient provider URLs can be materialized before delivery. The optional write:feedback scope enables native thumbs reaction synchronization to gateway response feedback. These conditional scopes are deliberately not part of x-required-scopes because text-only connectors do not need them. An API key with every listed scope is required; its identity tuple and current scopes are stored as a non-widening ceiling, then revalidated with mk-authentication before every connector run; session and delegated end-user contexts are rejected. The required access policy controls which provider users or chats may invoke the agent.
|
|
55
55
|
*/
|
|
56
56
|
export function useAgentConnectorsCreateAgentConnectorMutation(
|
|
57
57
|
options?: MutationHookOptions<
|
|
@@ -51,7 +51,7 @@ export type AgentConnectorsDeleteAgentConnectorMutationError =
|
|
|
51
51
|
* Delete a connector
|
|
52
52
|
*
|
|
53
53
|
* @remarks
|
|
54
|
-
* Unregisters the provider webhook
|
|
54
|
+
* Unregisters the connector-specific provider webhook and deletes the stored connector credentials. Telegram pending updates are dropped; WhatsApp deletion clears only the phone-number callback and does not unsubscribe other numbers in the business account.
|
|
55
55
|
*/
|
|
56
56
|
export function useAgentConnectorsDeleteAgentConnectorMutation(
|
|
57
57
|
options?: MutationHookOptions<
|
|
@@ -34,7 +34,7 @@ export class AgentConnectors extends ClientSDK {
|
|
|
34
34
|
* Create a connector
|
|
35
35
|
*
|
|
36
36
|
* @remarks
|
|
37
|
-
* Connects the agent to a Telegram bot, validates the
|
|
37
|
+
* Connects the agent to a Telegram bot or WhatsApp Business phone number, validates the provider credentials, and registers the agent's webhook. Text, photos, and gateway-supported documents can invoke the agent; inbound media additionally requires write:files. Managed outbound files require read:files, and generated images require both file scopes so their transient provider URLs can be materialized before delivery. The optional write:feedback scope enables native thumbs reaction synchronization to gateway response feedback. These conditional scopes are deliberately not part of x-required-scopes because text-only connectors do not need them. An API key with every listed scope is required; its identity tuple and current scopes are stored as a non-widening ceiling, then revalidated with mk-authentication before every connector run; session and delegated end-user contexts are rejected. The required access policy controls which provider users or chats may invoke the agent.
|
|
38
38
|
*/
|
|
39
39
|
async createAgentConnector(
|
|
40
40
|
request: operations.CreateAgentConnectorRequest,
|
|
@@ -68,7 +68,7 @@ export class AgentConnectors extends ClientSDK {
|
|
|
68
68
|
* Delete a connector
|
|
69
69
|
*
|
|
70
70
|
* @remarks
|
|
71
|
-
* Unregisters the provider webhook
|
|
71
|
+
* Unregisters the connector-specific provider webhook and deletes the stored connector credentials. Telegram pending updates are dropped; WhatsApp deletion clears only the phone-number callback and does not unsubscribe other numbers in the business account.
|
|
72
72
|
*/
|
|
73
73
|
async deleteAgentConnector(
|
|
74
74
|
request: operations.DeleteAgentConnectorRequest,
|
|
@@ -85,7 +85,7 @@ export class AgentConnectors extends ClientSDK {
|
|
|
85
85
|
* Activate a connector
|
|
86
86
|
*
|
|
87
87
|
* @remarks
|
|
88
|
-
* Revalidates the stored
|
|
88
|
+
* Revalidates the stored provider credentials and registers the provider webhook. Use this to retry a connector left in an error state. API-key authentication with every listed scope is required; session authentication is rejected, and the key must belong to the connector's original user or service-account principal so existing conversations keep the same owner.
|
|
89
89
|
*/
|
|
90
90
|
async activateAgentConnector(
|
|
91
91
|
request: operations.ActivateAgentConnectorRequest,
|