@wats/graph 0.3.26 → 0.3.27
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 +1 -1
- package/dist/endpoints/businessManagement.d.ts +372 -1
- package/dist/endpoints/businessManagement.js +775 -5
- package/dist/endpoints/calling.d.ts +41 -1
- package/dist/endpoints/calling.js +100 -2
- package/dist/endpoints/flows/dataChannel.d.ts +139 -0
- package/dist/endpoints/flows/dataChannel.js +252 -0
- package/dist/endpoints/flows/flowDsl.d.ts +306 -0
- package/dist/endpoints/flows/flowDsl.js +610 -0
- package/dist/endpoints/flows/flowMediaUpload.d.ts +102 -0
- package/dist/endpoints/flows/flowMediaUpload.js +188 -0
- package/dist/endpoints/flows/index.d.ts +9 -1
- package/dist/endpoints/flows/index.js +70 -0
- package/dist/endpoints/flows/metricsMigration.d.ts +36 -0
- package/dist/endpoints/flows/metricsMigration.js +207 -0
- package/dist/endpoints/flows/types.d.ts +145 -0
- package/dist/endpoints/flows/types.js +14 -0
- package/dist/endpoints/flows.d.ts +2 -2
- package/dist/endpoints/flows.js +49 -1
- package/dist/endpoints/messages/builders-interactive.d.ts +9 -1
- package/dist/endpoints/messages/builders-interactive.js +49 -0
- package/dist/endpoints/messages/builders-template.d.ts +2 -1
- package/dist/endpoints/messages/builders-template.js +53 -2
- package/dist/endpoints/messages/deepLinks.d.ts +12 -0
- package/dist/endpoints/messages/deepLinks.js +38 -0
- package/dist/endpoints/messages/index.d.ts +4 -3
- package/dist/endpoints/messages/index.js +13 -2
- package/dist/endpoints/messages/types.d.ts +26 -3
- package/dist/endpoints/messages/validation.d.ts +7 -0
- package/dist/endpoints/messages/validation.js +12 -0
- package/dist/endpoints/oauth.d.ts +57 -0
- package/dist/endpoints/oauth.js +116 -0
- package/dist/endpoints/templates/advanced.d.ts +280 -0
- package/dist/endpoints/templates/advanced.js +519 -0
- package/dist/endpoints/templates/builders.js +21 -1
- package/dist/endpoints/templates/index.d.ts +2 -0
- package/dist/endpoints/templates/index.js +15 -0
- package/dist/endpoints/templates/shared.js +7 -1
- package/dist/endpoints/templates/types.d.ts +17 -2
- package/dist/endpoints/templates.d.ts +2 -1
- package/dist/endpoints/templates.js +14 -1
- package/dist/endpoints/wabaEndpoints.d.ts +4 -4
- package/dist/endpoints/wabaEndpoints.js +56 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/nodeMedia.d.ts +57 -0
- package/dist/nodeMedia.js +178 -0
- package/dist/subclients/phoneNumberClient.d.ts +92 -2
- package/dist/subclients/phoneNumberClient.js +133 -1
- package/dist/subclients/wabaClient.d.ts +82 -2
- package/dist/subclients/wabaClient.js +102 -2
- package/package.json +9 -11
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import type { FlowJson } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Maximum nesting depth of control-flow components (If / Switch) inside a
|
|
4
|
+
* single component subtree. Finite cap so the DSL cannot emit pathologically
|
|
5
|
+
* nested conditional trees that would later blow the FlowJSON depth budget.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FLOW_DSL_MAX_CONTROL_DEPTH = 5;
|
|
8
|
+
type WireObject = Record<string, unknown>;
|
|
9
|
+
export interface FlowJsonProps {
|
|
10
|
+
readonly version: string;
|
|
11
|
+
readonly screens: readonly unknown[];
|
|
12
|
+
readonly dataApiVersion?: string;
|
|
13
|
+
readonly routingModel?: Record<string, readonly string[]>;
|
|
14
|
+
readonly dataChannelUri?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function flowJson(props: FlowJsonProps): FlowJson;
|
|
17
|
+
export interface ScreenProps {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly layout: unknown;
|
|
20
|
+
readonly title?: string;
|
|
21
|
+
readonly data?: Record<string, unknown>;
|
|
22
|
+
readonly terminal?: boolean;
|
|
23
|
+
readonly success?: boolean;
|
|
24
|
+
readonly refreshOnBack?: boolean;
|
|
25
|
+
readonly sensitive?: readonly string[];
|
|
26
|
+
}
|
|
27
|
+
export declare function screen(props: ScreenProps): WireObject;
|
|
28
|
+
export declare function singleColumnLayout(children: readonly unknown[]): WireObject;
|
|
29
|
+
export interface FormProps {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly children: readonly unknown[];
|
|
32
|
+
readonly initValues?: Record<string, unknown>;
|
|
33
|
+
readonly errorMessages?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
export declare function form(props: FormProps): WireObject;
|
|
36
|
+
export declare function textHeading(props: {
|
|
37
|
+
text: string;
|
|
38
|
+
visible?: boolean;
|
|
39
|
+
}): WireObject;
|
|
40
|
+
export declare function textSubheading(props: {
|
|
41
|
+
text: string;
|
|
42
|
+
visible?: boolean;
|
|
43
|
+
}): WireObject;
|
|
44
|
+
export declare function textBody(props: {
|
|
45
|
+
text: string | readonly string[];
|
|
46
|
+
markdown?: boolean;
|
|
47
|
+
fontWeight?: string;
|
|
48
|
+
strikethrough?: boolean;
|
|
49
|
+
visible?: boolean;
|
|
50
|
+
}): WireObject;
|
|
51
|
+
export declare function textCaption(props: {
|
|
52
|
+
text: string | readonly string[];
|
|
53
|
+
markdown?: boolean;
|
|
54
|
+
fontWeight?: string;
|
|
55
|
+
strikethrough?: boolean;
|
|
56
|
+
visible?: boolean;
|
|
57
|
+
}): WireObject;
|
|
58
|
+
export declare function richText(props: {
|
|
59
|
+
text: string | readonly string[];
|
|
60
|
+
visible?: boolean;
|
|
61
|
+
}): WireObject;
|
|
62
|
+
export declare function textInput(props: {
|
|
63
|
+
name: string;
|
|
64
|
+
label: string;
|
|
65
|
+
inputType?: string;
|
|
66
|
+
labelVariant?: string;
|
|
67
|
+
pattern?: string;
|
|
68
|
+
required?: boolean;
|
|
69
|
+
minChars?: number;
|
|
70
|
+
maxChars?: number;
|
|
71
|
+
helperText?: string;
|
|
72
|
+
enabled?: boolean;
|
|
73
|
+
visible?: boolean;
|
|
74
|
+
initValue?: string;
|
|
75
|
+
errorMessage?: string;
|
|
76
|
+
}): WireObject;
|
|
77
|
+
export declare function textArea(props: {
|
|
78
|
+
name: string;
|
|
79
|
+
label: string;
|
|
80
|
+
labelVariant?: string;
|
|
81
|
+
required?: boolean;
|
|
82
|
+
maxLength?: number;
|
|
83
|
+
helperText?: string;
|
|
84
|
+
enabled?: boolean;
|
|
85
|
+
visible?: boolean;
|
|
86
|
+
initValue?: string;
|
|
87
|
+
errorMessage?: string;
|
|
88
|
+
}): WireObject;
|
|
89
|
+
export declare function checkboxGroup(props: {
|
|
90
|
+
name: string;
|
|
91
|
+
dataSource: unknown;
|
|
92
|
+
label?: string;
|
|
93
|
+
description?: string;
|
|
94
|
+
minSelectedItems?: number;
|
|
95
|
+
maxSelectedItems?: number;
|
|
96
|
+
required?: boolean;
|
|
97
|
+
visible?: boolean;
|
|
98
|
+
enabled?: boolean;
|
|
99
|
+
initValue?: readonly string[];
|
|
100
|
+
mediaSize?: string;
|
|
101
|
+
onSelectAction?: unknown;
|
|
102
|
+
onUnselectAction?: unknown;
|
|
103
|
+
}): WireObject;
|
|
104
|
+
export declare function radioButtonsGroup(props: {
|
|
105
|
+
name: string;
|
|
106
|
+
dataSource: unknown;
|
|
107
|
+
label?: string;
|
|
108
|
+
description?: string;
|
|
109
|
+
required?: boolean;
|
|
110
|
+
visible?: boolean;
|
|
111
|
+
enabled?: boolean;
|
|
112
|
+
initValue?: string;
|
|
113
|
+
mediaSize?: string;
|
|
114
|
+
onSelectAction?: unknown;
|
|
115
|
+
onUnselectAction?: unknown;
|
|
116
|
+
}): WireObject;
|
|
117
|
+
export declare function dropdown(props: {
|
|
118
|
+
name: string;
|
|
119
|
+
label: string;
|
|
120
|
+
dataSource: unknown;
|
|
121
|
+
enabled?: boolean;
|
|
122
|
+
required?: boolean;
|
|
123
|
+
visible?: boolean;
|
|
124
|
+
initValue?: string;
|
|
125
|
+
onSelectAction?: unknown;
|
|
126
|
+
onUnselectAction?: unknown;
|
|
127
|
+
}): WireObject;
|
|
128
|
+
export declare function chipsSelector(props: {
|
|
129
|
+
name: string;
|
|
130
|
+
dataSource: unknown;
|
|
131
|
+
label: string;
|
|
132
|
+
description?: string;
|
|
133
|
+
minSelectedItems?: number;
|
|
134
|
+
maxSelectedItems?: number;
|
|
135
|
+
required?: boolean;
|
|
136
|
+
visible?: boolean;
|
|
137
|
+
enabled?: boolean;
|
|
138
|
+
initValue?: readonly string[];
|
|
139
|
+
onSelectAction?: unknown;
|
|
140
|
+
onUnselectAction?: unknown;
|
|
141
|
+
}): WireObject;
|
|
142
|
+
export declare function footer(props: {
|
|
143
|
+
label: string;
|
|
144
|
+
onClickAction: unknown;
|
|
145
|
+
leftCaption?: string;
|
|
146
|
+
centerCaption?: string;
|
|
147
|
+
rightCaption?: string;
|
|
148
|
+
enabled?: boolean;
|
|
149
|
+
}): WireObject;
|
|
150
|
+
export declare function optIn(props: {
|
|
151
|
+
name: string;
|
|
152
|
+
label: string;
|
|
153
|
+
required?: boolean;
|
|
154
|
+
visible?: boolean;
|
|
155
|
+
initValue?: boolean;
|
|
156
|
+
onClickAction?: unknown;
|
|
157
|
+
onSelectAction?: unknown;
|
|
158
|
+
onUnselectAction?: unknown;
|
|
159
|
+
}): WireObject;
|
|
160
|
+
export declare function embeddedLink(props: {
|
|
161
|
+
text: string;
|
|
162
|
+
onClickAction: unknown;
|
|
163
|
+
visible?: boolean;
|
|
164
|
+
}): WireObject;
|
|
165
|
+
export interface NavigationItemProps {
|
|
166
|
+
readonly id: string;
|
|
167
|
+
readonly mainContent: Record<string, unknown>;
|
|
168
|
+
readonly start?: Record<string, unknown>;
|
|
169
|
+
readonly end?: Record<string, unknown>;
|
|
170
|
+
readonly badge?: string;
|
|
171
|
+
readonly tags?: readonly string[];
|
|
172
|
+
readonly onClickAction?: unknown;
|
|
173
|
+
}
|
|
174
|
+
export declare function navigationItem(props: NavigationItemProps): WireObject;
|
|
175
|
+
export declare function navigationList(props: {
|
|
176
|
+
name: string;
|
|
177
|
+
listItems: readonly unknown[];
|
|
178
|
+
label?: string;
|
|
179
|
+
description?: string;
|
|
180
|
+
mediaSize?: string;
|
|
181
|
+
onClickAction?: unknown;
|
|
182
|
+
}): WireObject;
|
|
183
|
+
export declare function datePicker(props: {
|
|
184
|
+
name: string;
|
|
185
|
+
label: string;
|
|
186
|
+
minDate?: string;
|
|
187
|
+
maxDate?: string;
|
|
188
|
+
unavailableDates?: readonly string[];
|
|
189
|
+
helperText?: string;
|
|
190
|
+
enabled?: boolean;
|
|
191
|
+
required?: boolean;
|
|
192
|
+
visible?: boolean;
|
|
193
|
+
initValue?: string;
|
|
194
|
+
errorMessage?: string;
|
|
195
|
+
onSelectAction?: unknown;
|
|
196
|
+
}): WireObject;
|
|
197
|
+
export declare function calendarPicker(props: {
|
|
198
|
+
name: string;
|
|
199
|
+
label: string;
|
|
200
|
+
title?: string;
|
|
201
|
+
description?: string;
|
|
202
|
+
mode?: string;
|
|
203
|
+
minDate?: string;
|
|
204
|
+
maxDate?: string;
|
|
205
|
+
unavailableDates?: readonly string[];
|
|
206
|
+
minDays?: number;
|
|
207
|
+
maxDays?: number;
|
|
208
|
+
includeDays?: readonly string[];
|
|
209
|
+
helperText?: string;
|
|
210
|
+
enabled?: boolean;
|
|
211
|
+
required?: boolean;
|
|
212
|
+
visible?: boolean;
|
|
213
|
+
initValue?: unknown;
|
|
214
|
+
errorMessage?: string;
|
|
215
|
+
onSelectAction?: unknown;
|
|
216
|
+
}): WireObject;
|
|
217
|
+
export declare function image(props: {
|
|
218
|
+
src: string;
|
|
219
|
+
aspectRatio: number;
|
|
220
|
+
width?: number;
|
|
221
|
+
height?: number;
|
|
222
|
+
scaleType?: string;
|
|
223
|
+
altText?: string;
|
|
224
|
+
visible?: boolean;
|
|
225
|
+
}): WireObject;
|
|
226
|
+
export interface ImageCarouselItemProps {
|
|
227
|
+
readonly src: string;
|
|
228
|
+
readonly altText: string;
|
|
229
|
+
}
|
|
230
|
+
export declare function imageCarouselItem(props: ImageCarouselItemProps): WireObject;
|
|
231
|
+
export declare function imageCarousel(props: {
|
|
232
|
+
images: readonly unknown[];
|
|
233
|
+
aspectRatio?: string;
|
|
234
|
+
scaleType?: string;
|
|
235
|
+
visible?: boolean;
|
|
236
|
+
}): WireObject;
|
|
237
|
+
export declare function photoPicker(props: {
|
|
238
|
+
name: string;
|
|
239
|
+
label: string;
|
|
240
|
+
description?: string;
|
|
241
|
+
photoSource?: string;
|
|
242
|
+
maxFileSizeKb?: number;
|
|
243
|
+
minUploadedPhotos?: number;
|
|
244
|
+
maxUploadedPhotos?: number;
|
|
245
|
+
enabled?: boolean;
|
|
246
|
+
visible?: boolean;
|
|
247
|
+
errorMessage?: string;
|
|
248
|
+
}): WireObject;
|
|
249
|
+
export declare function documentPicker(props: {
|
|
250
|
+
name: string;
|
|
251
|
+
label: string;
|
|
252
|
+
description?: string;
|
|
253
|
+
maxFileSizeKb?: number;
|
|
254
|
+
minUploadedDocuments?: number;
|
|
255
|
+
maxUploadedDocuments?: number;
|
|
256
|
+
allowedMimeTypes?: readonly string[];
|
|
257
|
+
enabled?: boolean;
|
|
258
|
+
visible?: boolean;
|
|
259
|
+
errorMessage?: string;
|
|
260
|
+
}): WireObject;
|
|
261
|
+
export interface IfProps {
|
|
262
|
+
readonly condition: string;
|
|
263
|
+
readonly then: readonly unknown[];
|
|
264
|
+
readonly else?: readonly unknown[];
|
|
265
|
+
readonly else_?: readonly unknown[];
|
|
266
|
+
}
|
|
267
|
+
/** If component. `else_` (Python-style) and `else` are both accepted. */
|
|
268
|
+
export declare function ifComponent(props: IfProps): WireObject;
|
|
269
|
+
export interface SwitchProps {
|
|
270
|
+
readonly value: string;
|
|
271
|
+
readonly cases: Record<string, readonly unknown[]>;
|
|
272
|
+
}
|
|
273
|
+
export declare function switchComponent(props: SwitchProps): WireObject;
|
|
274
|
+
export declare function dataSource(props: {
|
|
275
|
+
id: string;
|
|
276
|
+
title: string;
|
|
277
|
+
onSelectAction?: unknown;
|
|
278
|
+
onUnselectAction?: unknown;
|
|
279
|
+
description?: string;
|
|
280
|
+
metadata?: Record<string, unknown>;
|
|
281
|
+
enabled?: boolean;
|
|
282
|
+
image?: string;
|
|
283
|
+
altText?: string;
|
|
284
|
+
color?: string;
|
|
285
|
+
}): WireObject;
|
|
286
|
+
export declare function dataExchangeAction(props?: {
|
|
287
|
+
payload?: Record<string, unknown>;
|
|
288
|
+
}): WireObject;
|
|
289
|
+
export interface NavigateActionProps {
|
|
290
|
+
readonly next: {
|
|
291
|
+
readonly name: string;
|
|
292
|
+
readonly type?: string;
|
|
293
|
+
};
|
|
294
|
+
readonly payload?: Record<string, unknown>;
|
|
295
|
+
}
|
|
296
|
+
export declare function navigateAction(props: NavigateActionProps): WireObject;
|
|
297
|
+
export declare function completeAction(props?: {
|
|
298
|
+
payload?: Record<string, unknown>;
|
|
299
|
+
}): WireObject;
|
|
300
|
+
export declare function updateDataAction(props: {
|
|
301
|
+
payload: Record<string, unknown>;
|
|
302
|
+
}): WireObject;
|
|
303
|
+
export declare function openUrlAction(props: {
|
|
304
|
+
url: string;
|
|
305
|
+
}): WireObject;
|
|
306
|
+
export {};
|