@automagik/omni 2.260731.3 → 2.260803.2
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/db/drizzle/0046_whatsapp_flow_keys.sql +39 -0
- package/db/drizzle/meta/_journal.json +7 -0
- package/dist/index.js +274 -7
- package/dist/sdk/flow-builder.d.ts +125 -0
- package/dist/sdk/flow-builder.d.ts.map +1 -0
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +205 -1
- package/dist/sdk/types.generated.d.ts +975 -0
- package/dist/sdk/types.generated.d.ts.map +1 -1
- package/dist/server/index.js +4320 -2289
- package/package.json +1 -1
|
@@ -2151,6 +2151,162 @@ export interface paths {
|
|
|
2151
2151
|
patch?: never;
|
|
2152
2152
|
trace?: never;
|
|
2153
2153
|
};
|
|
2154
|
+
"/instances/{id}/whatsapp-flows": {
|
|
2155
|
+
parameters: {
|
|
2156
|
+
query?: never;
|
|
2157
|
+
header?: never;
|
|
2158
|
+
path?: never;
|
|
2159
|
+
cookie?: never;
|
|
2160
|
+
};
|
|
2161
|
+
/**
|
|
2162
|
+
* List flows
|
|
2163
|
+
* @description List the WABA's WhatsApp Flows with status and categories.
|
|
2164
|
+
*/
|
|
2165
|
+
get: operations["listWhatsappFlows"];
|
|
2166
|
+
put?: never;
|
|
2167
|
+
/**
|
|
2168
|
+
* Create flow
|
|
2169
|
+
* @description Create a flow (optionally dynamic/endpoint-backed). Flow JSON is validated locally before contacting Meta; Meta-side validation_errors are always returned.
|
|
2170
|
+
*/
|
|
2171
|
+
post: operations["createWhatsappFlow"];
|
|
2172
|
+
delete?: never;
|
|
2173
|
+
options?: never;
|
|
2174
|
+
head?: never;
|
|
2175
|
+
patch?: never;
|
|
2176
|
+
trace?: never;
|
|
2177
|
+
};
|
|
2178
|
+
"/instances/{id}/whatsapp-flows/{flowId}": {
|
|
2179
|
+
parameters: {
|
|
2180
|
+
query?: never;
|
|
2181
|
+
header?: never;
|
|
2182
|
+
path?: never;
|
|
2183
|
+
cookie?: never;
|
|
2184
|
+
};
|
|
2185
|
+
/**
|
|
2186
|
+
* Get flow
|
|
2187
|
+
* @description Status, categories, Meta validation errors, endpoint_uri and preview URL.
|
|
2188
|
+
*/
|
|
2189
|
+
get: operations["getWhatsappFlow"];
|
|
2190
|
+
/**
|
|
2191
|
+
* Update flow
|
|
2192
|
+
* @description Update screens (flowJson → asset upload) and/or properties (name, categories, dynamic → endpoint_uri).
|
|
2193
|
+
*/
|
|
2194
|
+
put: operations["updateWhatsappFlow"];
|
|
2195
|
+
post?: never;
|
|
2196
|
+
/**
|
|
2197
|
+
* Delete flow (draft only)
|
|
2198
|
+
* @description Deletes a DRAFT flow. Published flows must be deprecated instead.
|
|
2199
|
+
*/
|
|
2200
|
+
delete: operations["deleteWhatsappFlow"];
|
|
2201
|
+
options?: never;
|
|
2202
|
+
head?: never;
|
|
2203
|
+
patch?: never;
|
|
2204
|
+
trace?: never;
|
|
2205
|
+
};
|
|
2206
|
+
"/instances/{id}/whatsapp-flows/{flowId}/publish": {
|
|
2207
|
+
parameters: {
|
|
2208
|
+
query?: never;
|
|
2209
|
+
header?: never;
|
|
2210
|
+
path?: never;
|
|
2211
|
+
cookie?: never;
|
|
2212
|
+
};
|
|
2213
|
+
get?: never;
|
|
2214
|
+
put?: never;
|
|
2215
|
+
/**
|
|
2216
|
+
* Publish flow
|
|
2217
|
+
* @description Publish a draft flow (requires zero validation errors).
|
|
2218
|
+
*/
|
|
2219
|
+
post: operations["publishWhatsappFlow"];
|
|
2220
|
+
delete?: never;
|
|
2221
|
+
options?: never;
|
|
2222
|
+
head?: never;
|
|
2223
|
+
patch?: never;
|
|
2224
|
+
trace?: never;
|
|
2225
|
+
};
|
|
2226
|
+
"/instances/{id}/whatsapp-flows/{flowId}/deprecate": {
|
|
2227
|
+
parameters: {
|
|
2228
|
+
query?: never;
|
|
2229
|
+
header?: never;
|
|
2230
|
+
path?: never;
|
|
2231
|
+
cookie?: never;
|
|
2232
|
+
};
|
|
2233
|
+
get?: never;
|
|
2234
|
+
put?: never;
|
|
2235
|
+
/**
|
|
2236
|
+
* Deprecate flow
|
|
2237
|
+
* @description Retire a PUBLISHED flow.
|
|
2238
|
+
*/
|
|
2239
|
+
post: operations["deprecateWhatsappFlow"];
|
|
2240
|
+
delete?: never;
|
|
2241
|
+
options?: never;
|
|
2242
|
+
head?: never;
|
|
2243
|
+
patch?: never;
|
|
2244
|
+
trace?: never;
|
|
2245
|
+
};
|
|
2246
|
+
"/instances/{id}/whatsapp-flows/{flowId}/preview": {
|
|
2247
|
+
parameters: {
|
|
2248
|
+
query?: never;
|
|
2249
|
+
header?: never;
|
|
2250
|
+
path?: never;
|
|
2251
|
+
cookie?: never;
|
|
2252
|
+
};
|
|
2253
|
+
/**
|
|
2254
|
+
* Get flow preview URL
|
|
2255
|
+
* @description Browser preview URL for the flow (valid ~30 days).
|
|
2256
|
+
*/
|
|
2257
|
+
get: operations["getWhatsappFlowPreview"];
|
|
2258
|
+
put?: never;
|
|
2259
|
+
post?: never;
|
|
2260
|
+
delete?: never;
|
|
2261
|
+
options?: never;
|
|
2262
|
+
head?: never;
|
|
2263
|
+
patch?: never;
|
|
2264
|
+
trace?: never;
|
|
2265
|
+
};
|
|
2266
|
+
"/instances/{id}/whatsapp-flows/send": {
|
|
2267
|
+
parameters: {
|
|
2268
|
+
query?: never;
|
|
2269
|
+
header?: never;
|
|
2270
|
+
path?: never;
|
|
2271
|
+
cookie?: never;
|
|
2272
|
+
};
|
|
2273
|
+
get?: never;
|
|
2274
|
+
put?: never;
|
|
2275
|
+
/**
|
|
2276
|
+
* Send flow message
|
|
2277
|
+
* @description Send an interactive flow message through the channel plugin. Returns the flowToken echoed back on the completion webhook (nfm_reply). Use flowAction 'data_exchange' for endpoint-backed flows.
|
|
2278
|
+
*/
|
|
2279
|
+
post: operations["sendWhatsappFlow"];
|
|
2280
|
+
delete?: never;
|
|
2281
|
+
options?: never;
|
|
2282
|
+
head?: never;
|
|
2283
|
+
patch?: never;
|
|
2284
|
+
trace?: never;
|
|
2285
|
+
};
|
|
2286
|
+
"/instances/{id}/whatsapp-flows/keys": {
|
|
2287
|
+
parameters: {
|
|
2288
|
+
query?: never;
|
|
2289
|
+
header?: never;
|
|
2290
|
+
path?: never;
|
|
2291
|
+
cookie?: never;
|
|
2292
|
+
};
|
|
2293
|
+
/**
|
|
2294
|
+
* Data-endpoint key status
|
|
2295
|
+
* @description Local key presence + Meta-side signature status (MISMATCH explains 421 loops).
|
|
2296
|
+
*/
|
|
2297
|
+
get: operations["getWhatsappFlowKeysStatus"];
|
|
2298
|
+
put?: never;
|
|
2299
|
+
/**
|
|
2300
|
+
* Generate + register data-endpoint encryption keys
|
|
2301
|
+
* @description Generates a 2048-bit RSA keypair, registers the public key with Meta (whatsapp_business_encryption) and stores the private key sealed. Calling again rotates the key.
|
|
2302
|
+
*/
|
|
2303
|
+
post: operations["registerWhatsappFlowKeys"];
|
|
2304
|
+
delete?: never;
|
|
2305
|
+
options?: never;
|
|
2306
|
+
head?: never;
|
|
2307
|
+
patch?: never;
|
|
2308
|
+
trace?: never;
|
|
2309
|
+
};
|
|
2154
2310
|
"/platform/tenants": {
|
|
2155
2311
|
parameters: {
|
|
2156
2312
|
query?: never;
|
|
@@ -5103,6 +5259,108 @@ export interface components {
|
|
|
5103
5259
|
/** @description Voice session ID to leave */
|
|
5104
5260
|
sessionId: string;
|
|
5105
5261
|
};
|
|
5262
|
+
FlowSummary: {
|
|
5263
|
+
/** @description Meta flow id */
|
|
5264
|
+
id: string;
|
|
5265
|
+
name: string;
|
|
5266
|
+
/** @description DRAFT | PUBLISHED | DEPRECATED | BLOCKED | THROTTLED */
|
|
5267
|
+
status: string;
|
|
5268
|
+
categories: string[];
|
|
5269
|
+
};
|
|
5270
|
+
FlowDetail: {
|
|
5271
|
+
/** @description Meta flow id */
|
|
5272
|
+
id: string;
|
|
5273
|
+
name: string;
|
|
5274
|
+
/** @description DRAFT | PUBLISHED | DEPRECATED | BLOCKED | THROTTLED */
|
|
5275
|
+
status: string;
|
|
5276
|
+
categories: string[];
|
|
5277
|
+
/** @description Meta-side Flow JSON validation errors */
|
|
5278
|
+
validationErrors: {
|
|
5279
|
+
/** @description Error code (e.g. INVALID_PROPERTY_TYPE) */
|
|
5280
|
+
error: string;
|
|
5281
|
+
/** @description Error class (e.g. FLOW_JSON_ERROR) */
|
|
5282
|
+
error_type: string;
|
|
5283
|
+
/** @description Human-readable explanation */
|
|
5284
|
+
message: string;
|
|
5285
|
+
line_start?: number;
|
|
5286
|
+
line_end?: number;
|
|
5287
|
+
column_start?: number;
|
|
5288
|
+
column_end?: number;
|
|
5289
|
+
pointers?: {
|
|
5290
|
+
/** @description JSON path of the offending node */
|
|
5291
|
+
path: string;
|
|
5292
|
+
}[];
|
|
5293
|
+
}[];
|
|
5294
|
+
/** @description Registered data-exchange endpoint (dynamic flows) */
|
|
5295
|
+
endpointUri: string | null;
|
|
5296
|
+
/** @description Browser preview (valid ~30 days) */
|
|
5297
|
+
preview: {
|
|
5298
|
+
preview_url: string;
|
|
5299
|
+
expires_at: string;
|
|
5300
|
+
} | null;
|
|
5301
|
+
};
|
|
5302
|
+
FlowValidationError: {
|
|
5303
|
+
/** @description Error code (e.g. INVALID_PROPERTY_TYPE) */
|
|
5304
|
+
error: string;
|
|
5305
|
+
/** @description Error class (e.g. FLOW_JSON_ERROR) */
|
|
5306
|
+
error_type: string;
|
|
5307
|
+
/** @description Human-readable explanation */
|
|
5308
|
+
message: string;
|
|
5309
|
+
line_start?: number;
|
|
5310
|
+
line_end?: number;
|
|
5311
|
+
column_start?: number;
|
|
5312
|
+
column_end?: number;
|
|
5313
|
+
pointers?: {
|
|
5314
|
+
/** @description JSON path of the offending node */
|
|
5315
|
+
path: string;
|
|
5316
|
+
}[];
|
|
5317
|
+
};
|
|
5318
|
+
CreateFlowRequest: {
|
|
5319
|
+
/** @description Flow name (shown in WhatsApp Manager) */
|
|
5320
|
+
name: string;
|
|
5321
|
+
categories: ("SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER")[];
|
|
5322
|
+
/** @description Stringified Flow JSON (screens/layout) */
|
|
5323
|
+
flowJson?: string;
|
|
5324
|
+
/** @description Publish immediately (requires valid flowJson) */
|
|
5325
|
+
publish?: boolean;
|
|
5326
|
+
/** @description Endpoint-backed (data_exchange) flow: registers this omni install's flows-data URL as endpoint_uri. Requires META_FLOWS_PUBLIC_BASE_URL and Flow JSON with data_api_version '3.0'. */
|
|
5327
|
+
dynamic?: boolean;
|
|
5328
|
+
};
|
|
5329
|
+
UpdateFlowRequest: {
|
|
5330
|
+
name?: string;
|
|
5331
|
+
categories?: ("SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER")[];
|
|
5332
|
+
/** @description Replaces the flow screens (asset upload) */
|
|
5333
|
+
flowJson?: string;
|
|
5334
|
+
/** @description Point the flow at this install's data endpoint */
|
|
5335
|
+
dynamic?: boolean;
|
|
5336
|
+
};
|
|
5337
|
+
SendFlowRequest: {
|
|
5338
|
+
/** @description Recipient phone (E.164 or digits) */
|
|
5339
|
+
to: string;
|
|
5340
|
+
/** @description Meta flow id (exactly one of flowId/flowName) */
|
|
5341
|
+
flowId?: string;
|
|
5342
|
+
flowName?: string;
|
|
5343
|
+
/** @description Button label that opens the flow */
|
|
5344
|
+
cta: string;
|
|
5345
|
+
bodyText: string;
|
|
5346
|
+
headerText?: string;
|
|
5347
|
+
footerText?: string;
|
|
5348
|
+
/** @description Entry screen (navigate flows) */
|
|
5349
|
+
screen?: string;
|
|
5350
|
+
/** @description Prefill data for the first screen */
|
|
5351
|
+
data?: {
|
|
5352
|
+
[key: string]: unknown;
|
|
5353
|
+
};
|
|
5354
|
+
/** @description Correlation token; generated when omitted */
|
|
5355
|
+
flowToken?: string;
|
|
5356
|
+
/** @description Send an unpublished flow (mode: draft) */
|
|
5357
|
+
draft?: boolean;
|
|
5358
|
+
/**
|
|
5359
|
+
* @description 'data_exchange' opens the flow against the data endpoint (INIT decides screen 1)
|
|
5360
|
+
* @enum {string}
|
|
5361
|
+
*/
|
|
5362
|
+
flowAction?: "navigate" | "data_exchange";
|
|
5363
|
+
};
|
|
5106
5364
|
PlatformTenant: {
|
|
5107
5365
|
/**
|
|
5108
5366
|
* Format: uuid
|
|
@@ -17479,6 +17737,723 @@ export interface operations {
|
|
|
17479
17737
|
};
|
|
17480
17738
|
};
|
|
17481
17739
|
};
|
|
17740
|
+
listWhatsappFlows: {
|
|
17741
|
+
parameters: {
|
|
17742
|
+
query?: never;
|
|
17743
|
+
header?: never;
|
|
17744
|
+
path: {
|
|
17745
|
+
id: string;
|
|
17746
|
+
};
|
|
17747
|
+
cookie?: never;
|
|
17748
|
+
};
|
|
17749
|
+
requestBody?: never;
|
|
17750
|
+
responses: {
|
|
17751
|
+
/** @description Flows on the WABA */
|
|
17752
|
+
200: {
|
|
17753
|
+
headers: {
|
|
17754
|
+
[name: string]: unknown;
|
|
17755
|
+
};
|
|
17756
|
+
content: {
|
|
17757
|
+
"application/json": {
|
|
17758
|
+
items: {
|
|
17759
|
+
/** @description Meta flow id */
|
|
17760
|
+
id: string;
|
|
17761
|
+
name: string;
|
|
17762
|
+
/** @description DRAFT | PUBLISHED | DEPRECATED | BLOCKED | THROTTLED */
|
|
17763
|
+
status: string;
|
|
17764
|
+
categories: string[];
|
|
17765
|
+
}[];
|
|
17766
|
+
meta: {
|
|
17767
|
+
count: number;
|
|
17768
|
+
};
|
|
17769
|
+
};
|
|
17770
|
+
};
|
|
17771
|
+
};
|
|
17772
|
+
/** @description Not a whatsapp-cloud instance / not connected */
|
|
17773
|
+
400: {
|
|
17774
|
+
headers: {
|
|
17775
|
+
[name: string]: unknown;
|
|
17776
|
+
};
|
|
17777
|
+
content: {
|
|
17778
|
+
"application/json": {
|
|
17779
|
+
error: {
|
|
17780
|
+
/**
|
|
17781
|
+
* @description Error code
|
|
17782
|
+
* @example NOT_FOUND
|
|
17783
|
+
*/
|
|
17784
|
+
code: string;
|
|
17785
|
+
/** @description Human-readable error message */
|
|
17786
|
+
message: string;
|
|
17787
|
+
/** @description Additional error details */
|
|
17788
|
+
details?: unknown;
|
|
17789
|
+
};
|
|
17790
|
+
};
|
|
17791
|
+
};
|
|
17792
|
+
};
|
|
17793
|
+
};
|
|
17794
|
+
};
|
|
17795
|
+
createWhatsappFlow: {
|
|
17796
|
+
parameters: {
|
|
17797
|
+
query?: never;
|
|
17798
|
+
header?: never;
|
|
17799
|
+
path: {
|
|
17800
|
+
id: string;
|
|
17801
|
+
};
|
|
17802
|
+
cookie?: never;
|
|
17803
|
+
};
|
|
17804
|
+
requestBody?: {
|
|
17805
|
+
content: {
|
|
17806
|
+
"application/json": {
|
|
17807
|
+
/** @description Flow name (shown in WhatsApp Manager) */
|
|
17808
|
+
name: string;
|
|
17809
|
+
categories: ("SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER")[];
|
|
17810
|
+
/** @description Stringified Flow JSON (screens/layout) */
|
|
17811
|
+
flowJson?: string;
|
|
17812
|
+
/** @description Publish immediately (requires valid flowJson) */
|
|
17813
|
+
publish?: boolean;
|
|
17814
|
+
/** @description Endpoint-backed (data_exchange) flow: registers this omni install's flows-data URL as endpoint_uri. Requires META_FLOWS_PUBLIC_BASE_URL and Flow JSON with data_api_version '3.0'. */
|
|
17815
|
+
dynamic?: boolean;
|
|
17816
|
+
};
|
|
17817
|
+
};
|
|
17818
|
+
};
|
|
17819
|
+
responses: {
|
|
17820
|
+
/** @description Flow created */
|
|
17821
|
+
201: {
|
|
17822
|
+
headers: {
|
|
17823
|
+
[name: string]: unknown;
|
|
17824
|
+
};
|
|
17825
|
+
content: {
|
|
17826
|
+
"application/json": {
|
|
17827
|
+
data: {
|
|
17828
|
+
id: string;
|
|
17829
|
+
endpointUri: string | null;
|
|
17830
|
+
validationErrors: {
|
|
17831
|
+
/** @description Error code (e.g. INVALID_PROPERTY_TYPE) */
|
|
17832
|
+
error: string;
|
|
17833
|
+
/** @description Error class (e.g. FLOW_JSON_ERROR) */
|
|
17834
|
+
error_type: string;
|
|
17835
|
+
/** @description Human-readable explanation */
|
|
17836
|
+
message: string;
|
|
17837
|
+
line_start?: number;
|
|
17838
|
+
line_end?: number;
|
|
17839
|
+
column_start?: number;
|
|
17840
|
+
column_end?: number;
|
|
17841
|
+
pointers?: {
|
|
17842
|
+
/** @description JSON path of the offending node */
|
|
17843
|
+
path: string;
|
|
17844
|
+
}[];
|
|
17845
|
+
}[];
|
|
17846
|
+
};
|
|
17847
|
+
};
|
|
17848
|
+
};
|
|
17849
|
+
};
|
|
17850
|
+
/** @description Bad request / missing META_FLOWS_PUBLIC_BASE_URL */
|
|
17851
|
+
400: {
|
|
17852
|
+
headers: {
|
|
17853
|
+
[name: string]: unknown;
|
|
17854
|
+
};
|
|
17855
|
+
content: {
|
|
17856
|
+
"application/json": {
|
|
17857
|
+
error: {
|
|
17858
|
+
/**
|
|
17859
|
+
* @description Error code
|
|
17860
|
+
* @example NOT_FOUND
|
|
17861
|
+
*/
|
|
17862
|
+
code: string;
|
|
17863
|
+
/** @description Human-readable error message */
|
|
17864
|
+
message: string;
|
|
17865
|
+
/** @description Additional error details */
|
|
17866
|
+
details?: unknown;
|
|
17867
|
+
};
|
|
17868
|
+
};
|
|
17869
|
+
};
|
|
17870
|
+
};
|
|
17871
|
+
/** @description Flow JSON failed local validation */
|
|
17872
|
+
422: {
|
|
17873
|
+
headers: {
|
|
17874
|
+
[name: string]: unknown;
|
|
17875
|
+
};
|
|
17876
|
+
content: {
|
|
17877
|
+
"application/json": {
|
|
17878
|
+
error: {
|
|
17879
|
+
/**
|
|
17880
|
+
* @description Error code
|
|
17881
|
+
* @example NOT_FOUND
|
|
17882
|
+
*/
|
|
17883
|
+
code: string;
|
|
17884
|
+
/** @description Human-readable error message */
|
|
17885
|
+
message: string;
|
|
17886
|
+
/** @description Additional error details */
|
|
17887
|
+
details?: unknown;
|
|
17888
|
+
};
|
|
17889
|
+
};
|
|
17890
|
+
};
|
|
17891
|
+
};
|
|
17892
|
+
};
|
|
17893
|
+
};
|
|
17894
|
+
getWhatsappFlow: {
|
|
17895
|
+
parameters: {
|
|
17896
|
+
query?: never;
|
|
17897
|
+
header?: never;
|
|
17898
|
+
path: {
|
|
17899
|
+
id: string;
|
|
17900
|
+
flowId: string;
|
|
17901
|
+
};
|
|
17902
|
+
cookie?: never;
|
|
17903
|
+
};
|
|
17904
|
+
requestBody?: never;
|
|
17905
|
+
responses: {
|
|
17906
|
+
/** @description Flow detail */
|
|
17907
|
+
200: {
|
|
17908
|
+
headers: {
|
|
17909
|
+
[name: string]: unknown;
|
|
17910
|
+
};
|
|
17911
|
+
content: {
|
|
17912
|
+
"application/json": {
|
|
17913
|
+
data: {
|
|
17914
|
+
/** @description Meta flow id */
|
|
17915
|
+
id: string;
|
|
17916
|
+
name: string;
|
|
17917
|
+
/** @description DRAFT | PUBLISHED | DEPRECATED | BLOCKED | THROTTLED */
|
|
17918
|
+
status: string;
|
|
17919
|
+
categories: string[];
|
|
17920
|
+
/** @description Meta-side Flow JSON validation errors */
|
|
17921
|
+
validationErrors: {
|
|
17922
|
+
/** @description Error code (e.g. INVALID_PROPERTY_TYPE) */
|
|
17923
|
+
error: string;
|
|
17924
|
+
/** @description Error class (e.g. FLOW_JSON_ERROR) */
|
|
17925
|
+
error_type: string;
|
|
17926
|
+
/** @description Human-readable explanation */
|
|
17927
|
+
message: string;
|
|
17928
|
+
line_start?: number;
|
|
17929
|
+
line_end?: number;
|
|
17930
|
+
column_start?: number;
|
|
17931
|
+
column_end?: number;
|
|
17932
|
+
pointers?: {
|
|
17933
|
+
/** @description JSON path of the offending node */
|
|
17934
|
+
path: string;
|
|
17935
|
+
}[];
|
|
17936
|
+
}[];
|
|
17937
|
+
/** @description Registered data-exchange endpoint (dynamic flows) */
|
|
17938
|
+
endpointUri: string | null;
|
|
17939
|
+
/** @description Browser preview (valid ~30 days) */
|
|
17940
|
+
preview: {
|
|
17941
|
+
preview_url: string;
|
|
17942
|
+
expires_at: string;
|
|
17943
|
+
} | null;
|
|
17944
|
+
};
|
|
17945
|
+
};
|
|
17946
|
+
};
|
|
17947
|
+
};
|
|
17948
|
+
/** @description Channel guard failed */
|
|
17949
|
+
400: {
|
|
17950
|
+
headers: {
|
|
17951
|
+
[name: string]: unknown;
|
|
17952
|
+
};
|
|
17953
|
+
content: {
|
|
17954
|
+
"application/json": {
|
|
17955
|
+
error: {
|
|
17956
|
+
/**
|
|
17957
|
+
* @description Error code
|
|
17958
|
+
* @example NOT_FOUND
|
|
17959
|
+
*/
|
|
17960
|
+
code: string;
|
|
17961
|
+
/** @description Human-readable error message */
|
|
17962
|
+
message: string;
|
|
17963
|
+
/** @description Additional error details */
|
|
17964
|
+
details?: unknown;
|
|
17965
|
+
};
|
|
17966
|
+
};
|
|
17967
|
+
};
|
|
17968
|
+
};
|
|
17969
|
+
};
|
|
17970
|
+
};
|
|
17971
|
+
updateWhatsappFlow: {
|
|
17972
|
+
parameters: {
|
|
17973
|
+
query?: never;
|
|
17974
|
+
header?: never;
|
|
17975
|
+
path: {
|
|
17976
|
+
id: string;
|
|
17977
|
+
flowId: string;
|
|
17978
|
+
};
|
|
17979
|
+
cookie?: never;
|
|
17980
|
+
};
|
|
17981
|
+
requestBody?: {
|
|
17982
|
+
content: {
|
|
17983
|
+
"application/json": {
|
|
17984
|
+
name?: string;
|
|
17985
|
+
categories?: ("SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER")[];
|
|
17986
|
+
/** @description Replaces the flow screens (asset upload) */
|
|
17987
|
+
flowJson?: string;
|
|
17988
|
+
/** @description Point the flow at this install's data endpoint */
|
|
17989
|
+
dynamic?: boolean;
|
|
17990
|
+
};
|
|
17991
|
+
};
|
|
17992
|
+
};
|
|
17993
|
+
responses: {
|
|
17994
|
+
/** @description Flow updated */
|
|
17995
|
+
200: {
|
|
17996
|
+
headers: {
|
|
17997
|
+
[name: string]: unknown;
|
|
17998
|
+
};
|
|
17999
|
+
content: {
|
|
18000
|
+
"application/json": {
|
|
18001
|
+
data: {
|
|
18002
|
+
id: string;
|
|
18003
|
+
endpointUri: string | null;
|
|
18004
|
+
validationErrors: {
|
|
18005
|
+
/** @description Error code (e.g. INVALID_PROPERTY_TYPE) */
|
|
18006
|
+
error: string;
|
|
18007
|
+
/** @description Error class (e.g. FLOW_JSON_ERROR) */
|
|
18008
|
+
error_type: string;
|
|
18009
|
+
/** @description Human-readable explanation */
|
|
18010
|
+
message: string;
|
|
18011
|
+
line_start?: number;
|
|
18012
|
+
line_end?: number;
|
|
18013
|
+
column_start?: number;
|
|
18014
|
+
column_end?: number;
|
|
18015
|
+
pointers?: {
|
|
18016
|
+
/** @description JSON path of the offending node */
|
|
18017
|
+
path: string;
|
|
18018
|
+
}[];
|
|
18019
|
+
}[];
|
|
18020
|
+
};
|
|
18021
|
+
};
|
|
18022
|
+
};
|
|
18023
|
+
};
|
|
18024
|
+
/** @description Bad request */
|
|
18025
|
+
400: {
|
|
18026
|
+
headers: {
|
|
18027
|
+
[name: string]: unknown;
|
|
18028
|
+
};
|
|
18029
|
+
content: {
|
|
18030
|
+
"application/json": {
|
|
18031
|
+
error: {
|
|
18032
|
+
/**
|
|
18033
|
+
* @description Error code
|
|
18034
|
+
* @example NOT_FOUND
|
|
18035
|
+
*/
|
|
18036
|
+
code: string;
|
|
18037
|
+
/** @description Human-readable error message */
|
|
18038
|
+
message: string;
|
|
18039
|
+
/** @description Additional error details */
|
|
18040
|
+
details?: unknown;
|
|
18041
|
+
};
|
|
18042
|
+
};
|
|
18043
|
+
};
|
|
18044
|
+
};
|
|
18045
|
+
/** @description Flow JSON failed local validation */
|
|
18046
|
+
422: {
|
|
18047
|
+
headers: {
|
|
18048
|
+
[name: string]: unknown;
|
|
18049
|
+
};
|
|
18050
|
+
content: {
|
|
18051
|
+
"application/json": {
|
|
18052
|
+
error: {
|
|
18053
|
+
/**
|
|
18054
|
+
* @description Error code
|
|
18055
|
+
* @example NOT_FOUND
|
|
18056
|
+
*/
|
|
18057
|
+
code: string;
|
|
18058
|
+
/** @description Human-readable error message */
|
|
18059
|
+
message: string;
|
|
18060
|
+
/** @description Additional error details */
|
|
18061
|
+
details?: unknown;
|
|
18062
|
+
};
|
|
18063
|
+
};
|
|
18064
|
+
};
|
|
18065
|
+
};
|
|
18066
|
+
};
|
|
18067
|
+
};
|
|
18068
|
+
deleteWhatsappFlow: {
|
|
18069
|
+
parameters: {
|
|
18070
|
+
query?: never;
|
|
18071
|
+
header?: never;
|
|
18072
|
+
path: {
|
|
18073
|
+
id: string;
|
|
18074
|
+
flowId: string;
|
|
18075
|
+
};
|
|
18076
|
+
cookie?: never;
|
|
18077
|
+
};
|
|
18078
|
+
requestBody?: never;
|
|
18079
|
+
responses: {
|
|
18080
|
+
/** @description Deleted */
|
|
18081
|
+
200: {
|
|
18082
|
+
headers: {
|
|
18083
|
+
[name: string]: unknown;
|
|
18084
|
+
};
|
|
18085
|
+
content: {
|
|
18086
|
+
"application/json": {
|
|
18087
|
+
success: boolean;
|
|
18088
|
+
flowId: string;
|
|
18089
|
+
};
|
|
18090
|
+
};
|
|
18091
|
+
};
|
|
18092
|
+
/** @description Channel guard failed */
|
|
18093
|
+
400: {
|
|
18094
|
+
headers: {
|
|
18095
|
+
[name: string]: unknown;
|
|
18096
|
+
};
|
|
18097
|
+
content: {
|
|
18098
|
+
"application/json": {
|
|
18099
|
+
error: {
|
|
18100
|
+
/**
|
|
18101
|
+
* @description Error code
|
|
18102
|
+
* @example NOT_FOUND
|
|
18103
|
+
*/
|
|
18104
|
+
code: string;
|
|
18105
|
+
/** @description Human-readable error message */
|
|
18106
|
+
message: string;
|
|
18107
|
+
/** @description Additional error details */
|
|
18108
|
+
details?: unknown;
|
|
18109
|
+
};
|
|
18110
|
+
};
|
|
18111
|
+
};
|
|
18112
|
+
};
|
|
18113
|
+
};
|
|
18114
|
+
};
|
|
18115
|
+
publishWhatsappFlow: {
|
|
18116
|
+
parameters: {
|
|
18117
|
+
query?: never;
|
|
18118
|
+
header?: never;
|
|
18119
|
+
path: {
|
|
18120
|
+
id: string;
|
|
18121
|
+
flowId: string;
|
|
18122
|
+
};
|
|
18123
|
+
cookie?: never;
|
|
18124
|
+
};
|
|
18125
|
+
requestBody?: never;
|
|
18126
|
+
responses: {
|
|
18127
|
+
/** @description Published */
|
|
18128
|
+
200: {
|
|
18129
|
+
headers: {
|
|
18130
|
+
[name: string]: unknown;
|
|
18131
|
+
};
|
|
18132
|
+
content: {
|
|
18133
|
+
"application/json": {
|
|
18134
|
+
success: boolean;
|
|
18135
|
+
flowId: string;
|
|
18136
|
+
};
|
|
18137
|
+
};
|
|
18138
|
+
};
|
|
18139
|
+
/** @description Channel guard failed */
|
|
18140
|
+
400: {
|
|
18141
|
+
headers: {
|
|
18142
|
+
[name: string]: unknown;
|
|
18143
|
+
};
|
|
18144
|
+
content: {
|
|
18145
|
+
"application/json": {
|
|
18146
|
+
error: {
|
|
18147
|
+
/**
|
|
18148
|
+
* @description Error code
|
|
18149
|
+
* @example NOT_FOUND
|
|
18150
|
+
*/
|
|
18151
|
+
code: string;
|
|
18152
|
+
/** @description Human-readable error message */
|
|
18153
|
+
message: string;
|
|
18154
|
+
/** @description Additional error details */
|
|
18155
|
+
details?: unknown;
|
|
18156
|
+
};
|
|
18157
|
+
};
|
|
18158
|
+
};
|
|
18159
|
+
};
|
|
18160
|
+
};
|
|
18161
|
+
};
|
|
18162
|
+
deprecateWhatsappFlow: {
|
|
18163
|
+
parameters: {
|
|
18164
|
+
query?: never;
|
|
18165
|
+
header?: never;
|
|
18166
|
+
path: {
|
|
18167
|
+
id: string;
|
|
18168
|
+
flowId: string;
|
|
18169
|
+
};
|
|
18170
|
+
cookie?: never;
|
|
18171
|
+
};
|
|
18172
|
+
requestBody?: never;
|
|
18173
|
+
responses: {
|
|
18174
|
+
/** @description Deprecated */
|
|
18175
|
+
200: {
|
|
18176
|
+
headers: {
|
|
18177
|
+
[name: string]: unknown;
|
|
18178
|
+
};
|
|
18179
|
+
content: {
|
|
18180
|
+
"application/json": {
|
|
18181
|
+
success: boolean;
|
|
18182
|
+
flowId: string;
|
|
18183
|
+
};
|
|
18184
|
+
};
|
|
18185
|
+
};
|
|
18186
|
+
/** @description Channel guard failed */
|
|
18187
|
+
400: {
|
|
18188
|
+
headers: {
|
|
18189
|
+
[name: string]: unknown;
|
|
18190
|
+
};
|
|
18191
|
+
content: {
|
|
18192
|
+
"application/json": {
|
|
18193
|
+
error: {
|
|
18194
|
+
/**
|
|
18195
|
+
* @description Error code
|
|
18196
|
+
* @example NOT_FOUND
|
|
18197
|
+
*/
|
|
18198
|
+
code: string;
|
|
18199
|
+
/** @description Human-readable error message */
|
|
18200
|
+
message: string;
|
|
18201
|
+
/** @description Additional error details */
|
|
18202
|
+
details?: unknown;
|
|
18203
|
+
};
|
|
18204
|
+
};
|
|
18205
|
+
};
|
|
18206
|
+
};
|
|
18207
|
+
};
|
|
18208
|
+
};
|
|
18209
|
+
getWhatsappFlowPreview: {
|
|
18210
|
+
parameters: {
|
|
18211
|
+
query?: never;
|
|
18212
|
+
header?: never;
|
|
18213
|
+
path: {
|
|
18214
|
+
id: string;
|
|
18215
|
+
flowId: string;
|
|
18216
|
+
};
|
|
18217
|
+
cookie?: never;
|
|
18218
|
+
};
|
|
18219
|
+
requestBody?: never;
|
|
18220
|
+
responses: {
|
|
18221
|
+
/** @description Preview URL */
|
|
18222
|
+
200: {
|
|
18223
|
+
headers: {
|
|
18224
|
+
[name: string]: unknown;
|
|
18225
|
+
};
|
|
18226
|
+
content: {
|
|
18227
|
+
"application/json": {
|
|
18228
|
+
previewUrl: string;
|
|
18229
|
+
expiresAt: string;
|
|
18230
|
+
};
|
|
18231
|
+
};
|
|
18232
|
+
};
|
|
18233
|
+
/** @description No preview available */
|
|
18234
|
+
404: {
|
|
18235
|
+
headers: {
|
|
18236
|
+
[name: string]: unknown;
|
|
18237
|
+
};
|
|
18238
|
+
content: {
|
|
18239
|
+
"application/json": {
|
|
18240
|
+
error: {
|
|
18241
|
+
/**
|
|
18242
|
+
* @description Error code
|
|
18243
|
+
* @example NOT_FOUND
|
|
18244
|
+
*/
|
|
18245
|
+
code: string;
|
|
18246
|
+
/** @description Human-readable error message */
|
|
18247
|
+
message: string;
|
|
18248
|
+
/** @description Additional error details */
|
|
18249
|
+
details?: unknown;
|
|
18250
|
+
};
|
|
18251
|
+
};
|
|
18252
|
+
};
|
|
18253
|
+
};
|
|
18254
|
+
};
|
|
18255
|
+
};
|
|
18256
|
+
sendWhatsappFlow: {
|
|
18257
|
+
parameters: {
|
|
18258
|
+
query?: never;
|
|
18259
|
+
header?: never;
|
|
18260
|
+
path: {
|
|
18261
|
+
id: string;
|
|
18262
|
+
};
|
|
18263
|
+
cookie?: never;
|
|
18264
|
+
};
|
|
18265
|
+
requestBody?: {
|
|
18266
|
+
content: {
|
|
18267
|
+
"application/json": {
|
|
18268
|
+
/** @description Recipient phone (E.164 or digits) */
|
|
18269
|
+
to: string;
|
|
18270
|
+
/** @description Meta flow id (exactly one of flowId/flowName) */
|
|
18271
|
+
flowId?: string;
|
|
18272
|
+
flowName?: string;
|
|
18273
|
+
/** @description Button label that opens the flow */
|
|
18274
|
+
cta: string;
|
|
18275
|
+
bodyText: string;
|
|
18276
|
+
headerText?: string;
|
|
18277
|
+
footerText?: string;
|
|
18278
|
+
/** @description Entry screen (navigate flows) */
|
|
18279
|
+
screen?: string;
|
|
18280
|
+
/** @description Prefill data for the first screen */
|
|
18281
|
+
data?: {
|
|
18282
|
+
[key: string]: unknown;
|
|
18283
|
+
};
|
|
18284
|
+
/** @description Correlation token; generated when omitted */
|
|
18285
|
+
flowToken?: string;
|
|
18286
|
+
/** @description Send an unpublished flow (mode: draft) */
|
|
18287
|
+
draft?: boolean;
|
|
18288
|
+
/**
|
|
18289
|
+
* @description 'data_exchange' opens the flow against the data endpoint (INIT decides screen 1)
|
|
18290
|
+
* @enum {string}
|
|
18291
|
+
*/
|
|
18292
|
+
flowAction?: "navigate" | "data_exchange";
|
|
18293
|
+
};
|
|
18294
|
+
};
|
|
18295
|
+
};
|
|
18296
|
+
responses: {
|
|
18297
|
+
/** @description Flow message sent */
|
|
18298
|
+
201: {
|
|
18299
|
+
headers: {
|
|
18300
|
+
[name: string]: unknown;
|
|
18301
|
+
};
|
|
18302
|
+
content: {
|
|
18303
|
+
"application/json": {
|
|
18304
|
+
messageId?: string;
|
|
18305
|
+
flowToken: string;
|
|
18306
|
+
};
|
|
18307
|
+
};
|
|
18308
|
+
};
|
|
18309
|
+
/** @description Channel guard failed */
|
|
18310
|
+
400: {
|
|
18311
|
+
headers: {
|
|
18312
|
+
[name: string]: unknown;
|
|
18313
|
+
};
|
|
18314
|
+
content: {
|
|
18315
|
+
"application/json": {
|
|
18316
|
+
error: {
|
|
18317
|
+
/**
|
|
18318
|
+
* @description Error code
|
|
18319
|
+
* @example NOT_FOUND
|
|
18320
|
+
*/
|
|
18321
|
+
code: string;
|
|
18322
|
+
/** @description Human-readable error message */
|
|
18323
|
+
message: string;
|
|
18324
|
+
/** @description Additional error details */
|
|
18325
|
+
details?: unknown;
|
|
18326
|
+
};
|
|
18327
|
+
};
|
|
18328
|
+
};
|
|
18329
|
+
};
|
|
18330
|
+
/** @description Send failed */
|
|
18331
|
+
500: {
|
|
18332
|
+
headers: {
|
|
18333
|
+
[name: string]: unknown;
|
|
18334
|
+
};
|
|
18335
|
+
content: {
|
|
18336
|
+
"application/json": {
|
|
18337
|
+
error: {
|
|
18338
|
+
/**
|
|
18339
|
+
* @description Error code
|
|
18340
|
+
* @example NOT_FOUND
|
|
18341
|
+
*/
|
|
18342
|
+
code: string;
|
|
18343
|
+
/** @description Human-readable error message */
|
|
18344
|
+
message: string;
|
|
18345
|
+
/** @description Additional error details */
|
|
18346
|
+
details?: unknown;
|
|
18347
|
+
};
|
|
18348
|
+
};
|
|
18349
|
+
};
|
|
18350
|
+
};
|
|
18351
|
+
};
|
|
18352
|
+
};
|
|
18353
|
+
getWhatsappFlowKeysStatus: {
|
|
18354
|
+
parameters: {
|
|
18355
|
+
query?: never;
|
|
18356
|
+
header?: never;
|
|
18357
|
+
path: {
|
|
18358
|
+
id: string;
|
|
18359
|
+
};
|
|
18360
|
+
cookie?: never;
|
|
18361
|
+
};
|
|
18362
|
+
requestBody?: never;
|
|
18363
|
+
responses: {
|
|
18364
|
+
/** @description Key status */
|
|
18365
|
+
200: {
|
|
18366
|
+
headers: {
|
|
18367
|
+
[name: string]: unknown;
|
|
18368
|
+
};
|
|
18369
|
+
content: {
|
|
18370
|
+
"application/json": {
|
|
18371
|
+
data: {
|
|
18372
|
+
/** @description Private key stored for this instance */
|
|
18373
|
+
hasLocalKey: boolean;
|
|
18374
|
+
uploadedAt: string | null;
|
|
18375
|
+
/** @description Meta-side status: VALID | MISMATCH (MISMATCH → rotate via POST) */
|
|
18376
|
+
signatureStatus: string | null;
|
|
18377
|
+
endpointUri: string | null;
|
|
18378
|
+
};
|
|
18379
|
+
};
|
|
18380
|
+
};
|
|
18381
|
+
};
|
|
18382
|
+
/** @description Channel guard failed */
|
|
18383
|
+
400: {
|
|
18384
|
+
headers: {
|
|
18385
|
+
[name: string]: unknown;
|
|
18386
|
+
};
|
|
18387
|
+
content: {
|
|
18388
|
+
"application/json": {
|
|
18389
|
+
error: {
|
|
18390
|
+
/**
|
|
18391
|
+
* @description Error code
|
|
18392
|
+
* @example NOT_FOUND
|
|
18393
|
+
*/
|
|
18394
|
+
code: string;
|
|
18395
|
+
/** @description Human-readable error message */
|
|
18396
|
+
message: string;
|
|
18397
|
+
/** @description Additional error details */
|
|
18398
|
+
details?: unknown;
|
|
18399
|
+
};
|
|
18400
|
+
};
|
|
18401
|
+
};
|
|
18402
|
+
};
|
|
18403
|
+
};
|
|
18404
|
+
};
|
|
18405
|
+
registerWhatsappFlowKeys: {
|
|
18406
|
+
parameters: {
|
|
18407
|
+
query?: never;
|
|
18408
|
+
header?: never;
|
|
18409
|
+
path: {
|
|
18410
|
+
id: string;
|
|
18411
|
+
};
|
|
18412
|
+
cookie?: never;
|
|
18413
|
+
};
|
|
18414
|
+
requestBody?: never;
|
|
18415
|
+
responses: {
|
|
18416
|
+
/** @description Key registered */
|
|
18417
|
+
201: {
|
|
18418
|
+
headers: {
|
|
18419
|
+
[name: string]: unknown;
|
|
18420
|
+
};
|
|
18421
|
+
content: {
|
|
18422
|
+
"application/json": {
|
|
18423
|
+
data: {
|
|
18424
|
+
/** @description Private key stored for this instance */
|
|
18425
|
+
hasLocalKey: boolean;
|
|
18426
|
+
uploadedAt: string | null;
|
|
18427
|
+
/** @description Meta-side status: VALID | MISMATCH (MISMATCH → rotate via POST) */
|
|
18428
|
+
signatureStatus: string | null;
|
|
18429
|
+
endpointUri: string | null;
|
|
18430
|
+
};
|
|
18431
|
+
};
|
|
18432
|
+
};
|
|
18433
|
+
};
|
|
18434
|
+
/** @description Channel guard failed */
|
|
18435
|
+
400: {
|
|
18436
|
+
headers: {
|
|
18437
|
+
[name: string]: unknown;
|
|
18438
|
+
};
|
|
18439
|
+
content: {
|
|
18440
|
+
"application/json": {
|
|
18441
|
+
error: {
|
|
18442
|
+
/**
|
|
18443
|
+
* @description Error code
|
|
18444
|
+
* @example NOT_FOUND
|
|
18445
|
+
*/
|
|
18446
|
+
code: string;
|
|
18447
|
+
/** @description Human-readable error message */
|
|
18448
|
+
message: string;
|
|
18449
|
+
/** @description Additional error details */
|
|
18450
|
+
details?: unknown;
|
|
18451
|
+
};
|
|
18452
|
+
};
|
|
18453
|
+
};
|
|
18454
|
+
};
|
|
18455
|
+
};
|
|
18456
|
+
};
|
|
17482
18457
|
listPlatformTenants: {
|
|
17483
18458
|
parameters: {
|
|
17484
18459
|
query?: never;
|