@prismatic-io/components-whatsapp 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,581 @@
1
+ //#region node_modules/axios/index.d.ts
2
+ type UppercaseMethod = 'GET' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH' | 'PURGE' | 'LINK' | 'UNLINK' | 'QUERY';
3
+ type Method = (UppercaseMethod | Lowercase<UppercaseMethod>) & {};
4
+ type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream' | 'formdata';
5
+ //#endregion
6
+ //#region npm-dist/.entry.d.ts
7
+ declare const _default: import("@prismatic-io/spectral").CallableComponent<{
8
+ key: "whatsapp";
9
+ public: true;
10
+ documentationUrl: "https://prismatic.io/docs/components/whatsapp/";
11
+ display: {
12
+ label: string;
13
+ description: string;
14
+ iconPath: string;
15
+ category: "Application Connectors";
16
+ };
17
+ actions: {
18
+ sendMessage: import("@prismatic-io/spectral").ActionDefinition<{
19
+ connection: {
20
+ label: string;
21
+ type: "connection";
22
+ required: true;
23
+ comments: string;
24
+ };
25
+ phoneNumberId: {
26
+ label: string;
27
+ type: "string";
28
+ required: true;
29
+ comments: string;
30
+ placeholder: string;
31
+ example: string;
32
+ clean: (value: unknown, defaultValue?: string) => string;
33
+ };
34
+ to: {
35
+ label: string;
36
+ type: "string";
37
+ required: true;
38
+ comments: string;
39
+ placeholder: string;
40
+ example: string;
41
+ clean: (value: unknown, defaultValue?: string) => string;
42
+ };
43
+ type: {
44
+ label: string;
45
+ type: "string";
46
+ required: false;
47
+ comments: string;
48
+ placeholder: string;
49
+ default: string;
50
+ example: string;
51
+ model: {
52
+ label: string;
53
+ value: string;
54
+ }[];
55
+ clean: (value: unknown) => string | undefined;
56
+ };
57
+ audio: {
58
+ label: string;
59
+ type: "code";
60
+ language: "json";
61
+ required: false;
62
+ comments: string;
63
+ example: string;
64
+ clean: (value: unknown) => object | undefined;
65
+ };
66
+ contacts: {
67
+ label: string;
68
+ type: "code";
69
+ language: "json";
70
+ required: false;
71
+ comments: string;
72
+ example: string;
73
+ clean: (value: unknown) => any[] | undefined;
74
+ };
75
+ document: {
76
+ label: string;
77
+ type: "code";
78
+ language: "json";
79
+ required: false;
80
+ comments: string;
81
+ example: string;
82
+ clean: (value: unknown) => object | undefined;
83
+ };
84
+ sticker: {
85
+ label: string;
86
+ type: "code";
87
+ language: "json";
88
+ required: false;
89
+ comments: string;
90
+ example: string;
91
+ clean: (value: unknown) => object | undefined;
92
+ };
93
+ template: {
94
+ label: string;
95
+ type: "code";
96
+ language: "json";
97
+ required: false;
98
+ comments: string;
99
+ example: string;
100
+ clean: (value: unknown) => object | undefined;
101
+ };
102
+ text: {
103
+ label: string;
104
+ type: "code";
105
+ language: "json";
106
+ required: false;
107
+ comments: string;
108
+ example: string;
109
+ clean: (value: unknown) => object | undefined;
110
+ };
111
+ image: {
112
+ label: string;
113
+ type: "code";
114
+ language: "json";
115
+ required: false;
116
+ comments: string;
117
+ example: string;
118
+ clean: (value: unknown) => object | undefined;
119
+ };
120
+ reaction: {
121
+ label: string;
122
+ type: "code";
123
+ language: "json";
124
+ required: false;
125
+ comments: string;
126
+ example: string;
127
+ clean: (value: unknown) => object | undefined;
128
+ };
129
+ interactive: {
130
+ label: string;
131
+ type: "code";
132
+ language: "json";
133
+ required: false;
134
+ comments: string;
135
+ example: string;
136
+ clean: (value: unknown) => object | undefined;
137
+ };
138
+ location: {
139
+ label: string;
140
+ type: "code";
141
+ language: "json";
142
+ required: false;
143
+ comments: string;
144
+ example: string;
145
+ clean: (value: unknown) => object | undefined;
146
+ };
147
+ previewUrl: {
148
+ label: string;
149
+ type: "boolean";
150
+ required: false;
151
+ default: string;
152
+ comments: string;
153
+ clean: (value: unknown, defaultValue?: boolean) => boolean;
154
+ };
155
+ bizOpaqueCallbackData: {
156
+ label: string;
157
+ type: "string";
158
+ required: false;
159
+ comments: string;
160
+ placeholder: string;
161
+ example: string;
162
+ clean: (value: unknown) => string | undefined;
163
+ };
164
+ contextInput: {
165
+ label: string;
166
+ type: "code";
167
+ language: "json";
168
+ required: false;
169
+ comments: string;
170
+ example: string;
171
+ clean: (value: unknown) => object | undefined;
172
+ };
173
+ status: {
174
+ label: string;
175
+ type: "string";
176
+ required: false;
177
+ comments: string;
178
+ placeholder: string;
179
+ example: string;
180
+ clean: (value: unknown) => string | undefined;
181
+ };
182
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
183
+ data: any;
184
+ }>;
185
+ requestVerificationCode: import("@prismatic-io/spectral").ActionDefinition<{
186
+ connection: {
187
+ label: string;
188
+ type: "connection";
189
+ required: true;
190
+ comments: string;
191
+ };
192
+ phoneNumberId: {
193
+ label: string;
194
+ comments: string;
195
+ type: "string";
196
+ placeholder: string;
197
+ required: true;
198
+ example: string;
199
+ clean: (value: unknown, defaultValue?: string) => string;
200
+ };
201
+ codeMethod: {
202
+ label: string;
203
+ comments: string;
204
+ placeholder: string;
205
+ type: "string";
206
+ required: true;
207
+ model: {
208
+ label: string;
209
+ value: string;
210
+ }[];
211
+ example: string;
212
+ clean: (value: unknown, defaultValue?: string) => string;
213
+ };
214
+ language: {
215
+ label: string;
216
+ comments: string;
217
+ default: string;
218
+ placeholder: string;
219
+ type: "string";
220
+ required: true;
221
+ model: {
222
+ label: string;
223
+ value: string;
224
+ }[];
225
+ clean: (value: unknown, defaultValue?: string) => string;
226
+ };
227
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
228
+ data: any;
229
+ }>;
230
+ registerPhoneNumber: import("@prismatic-io/spectral").ActionDefinition<{
231
+ connection: {
232
+ label: string;
233
+ type: "connection";
234
+ required: true;
235
+ comments: string;
236
+ };
237
+ phoneNumberId: {
238
+ label: string;
239
+ comments: string;
240
+ type: "string";
241
+ required: true;
242
+ placeholder: string;
243
+ example: string;
244
+ clean: (value: unknown, defaultValue?: string) => string;
245
+ };
246
+ pin: {
247
+ label: string;
248
+ comments: string;
249
+ type: "string";
250
+ required: true;
251
+ placeholder: string;
252
+ example: string;
253
+ clean: (value: unknown, defaultValue?: string) => string;
254
+ };
255
+ dataLocalizationRegion: {
256
+ label: string;
257
+ comments: string;
258
+ type: "string";
259
+ required: false;
260
+ example: string;
261
+ placeholder: string;
262
+ model: {
263
+ label: string;
264
+ value: string;
265
+ }[];
266
+ clean: (value: unknown) => string | undefined;
267
+ };
268
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
269
+ data: any;
270
+ }>;
271
+ uploadMedia: import("@prismatic-io/spectral").ActionDefinition<{
272
+ connection: {
273
+ label: string;
274
+ type: "connection";
275
+ required: true;
276
+ comments: string;
277
+ };
278
+ phoneNumberId: {
279
+ label: string;
280
+ comments: string;
281
+ type: "string";
282
+ required: true;
283
+ example: string;
284
+ placeholder: string;
285
+ clean: (value: unknown, defaultValue?: string) => string;
286
+ };
287
+ file: {
288
+ label: string;
289
+ comments: string;
290
+ type: "data";
291
+ required: true;
292
+ clean: (value: unknown) => import("@prismatic-io/spectral").DataPayload;
293
+ };
294
+ filename: {
295
+ label: string;
296
+ comments: string;
297
+ type: "string";
298
+ required: false;
299
+ example: string;
300
+ placeholder: string;
301
+ clean: (value: unknown, defaultValue?: string) => string;
302
+ };
303
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
304
+ data: any;
305
+ }>;
306
+ getMedia: import("@prismatic-io/spectral").ActionDefinition<{
307
+ connection: {
308
+ label: string;
309
+ type: "connection";
310
+ required: true;
311
+ comments: string;
312
+ };
313
+ mediaId: {
314
+ label: string;
315
+ comments: string;
316
+ type: "string";
317
+ required: true;
318
+ placeholder: string;
319
+ example: string;
320
+ clean: (value: unknown, defaultValue?: string) => string;
321
+ };
322
+ phoneNumberId: {
323
+ label: string;
324
+ comments: string;
325
+ type: "string";
326
+ required: false;
327
+ placeholder: string;
328
+ example: string;
329
+ clean: (value: unknown) => string | undefined;
330
+ };
331
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
332
+ data: any;
333
+ }>;
334
+ deleteMedia: import("@prismatic-io/spectral").ActionDefinition<{
335
+ connection: {
336
+ label: string;
337
+ type: "connection";
338
+ required: true;
339
+ comments: string;
340
+ };
341
+ mediaId: {
342
+ label: string;
343
+ comments: string;
344
+ type: "string";
345
+ required: true;
346
+ example: string;
347
+ placeholder: string;
348
+ clean: (value: unknown, defaultValue?: string) => string;
349
+ };
350
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
351
+ data: any;
352
+ }>;
353
+ getMediafromURL: import("@prismatic-io/spectral").ActionDefinition<{
354
+ connection: {
355
+ label: string;
356
+ type: "connection";
357
+ required: true;
358
+ comments: string;
359
+ };
360
+ url: {
361
+ label: string;
362
+ comments: string;
363
+ type: "string";
364
+ placeholder: string;
365
+ example: string;
366
+ required: true;
367
+ clean: (value: unknown, defaultValue?: string) => string;
368
+ };
369
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
370
+ data: any;
371
+ }>;
372
+ rawRequest: import("@prismatic-io/spectral").ActionDefinition<{
373
+ url: {
374
+ comments: string;
375
+ example: string;
376
+ placeholder: string;
377
+ label: string;
378
+ type: "string";
379
+ required: true;
380
+ clean: (value: unknown) => string;
381
+ };
382
+ method: {
383
+ label: string;
384
+ type: "string";
385
+ required: true;
386
+ model: {
387
+ label: Method;
388
+ value: Method;
389
+ }[];
390
+ comments: string;
391
+ clean: (value: unknown) => string;
392
+ };
393
+ data: {
394
+ label: string;
395
+ placeholder: string;
396
+ type: "string";
397
+ required: false;
398
+ comments: string;
399
+ example: string;
400
+ };
401
+ formData: {
402
+ label: string;
403
+ placeholder: string;
404
+ type: "string";
405
+ collection: "keyvaluelist";
406
+ required: false;
407
+ comments: string;
408
+ example: string;
409
+ };
410
+ fileData: {
411
+ label: string;
412
+ placeholder: string;
413
+ type: "string";
414
+ collection: "keyvaluelist";
415
+ required: false;
416
+ comments: string;
417
+ example: string;
418
+ };
419
+ fileDataFileNames: {
420
+ label: string;
421
+ placeholder: string;
422
+ type: "string";
423
+ collection: "keyvaluelist";
424
+ required: false;
425
+ comments: string;
426
+ clean: (values: any) => Record<string, string> | undefined;
427
+ };
428
+ queryParams: {
429
+ label: string;
430
+ placeholder: string;
431
+ type: "string";
432
+ collection: "keyvaluelist";
433
+ required: false;
434
+ comments: string;
435
+ };
436
+ headers: {
437
+ label: string;
438
+ placeholder: string;
439
+ type: "string";
440
+ collection: "keyvaluelist";
441
+ required: false;
442
+ comments: string;
443
+ example: string;
444
+ };
445
+ responseType: {
446
+ label: string;
447
+ placeholder: string;
448
+ type: "string";
449
+ default: string;
450
+ required: true;
451
+ comments: string;
452
+ model: {
453
+ label: ResponseType;
454
+ value: ResponseType;
455
+ }[];
456
+ clean: (value: unknown) => ResponseType;
457
+ };
458
+ timeout: {
459
+ label: string;
460
+ type: "string";
461
+ required: false;
462
+ comments: string;
463
+ example: string;
464
+ clean: (value: unknown) => number;
465
+ };
466
+ debugRequest: {
467
+ label: string;
468
+ type: "boolean";
469
+ required: false;
470
+ comments: string;
471
+ clean: (value: unknown) => boolean;
472
+ };
473
+ retryDelayMS: {
474
+ label: string;
475
+ placeholder: string;
476
+ type: "string";
477
+ required: false;
478
+ comments: string;
479
+ default: string;
480
+ clean: (value: unknown) => number;
481
+ };
482
+ retryAllErrors: {
483
+ label: string;
484
+ type: "boolean";
485
+ default: string;
486
+ required: false;
487
+ comments: string;
488
+ clean: (value: unknown) => boolean;
489
+ };
490
+ maxRetries: {
491
+ label: string;
492
+ placeholder: string;
493
+ type: "string";
494
+ required: false;
495
+ comments: string;
496
+ default: string;
497
+ clean: (value: unknown) => number;
498
+ };
499
+ useExponentialBackoff: {
500
+ label: string;
501
+ type: "boolean";
502
+ default: string;
503
+ required: false;
504
+ comments: string;
505
+ clean: (value: unknown) => boolean;
506
+ };
507
+ connection: {
508
+ label: string;
509
+ type: "connection";
510
+ required: true;
511
+ comments: string;
512
+ };
513
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
514
+ data: any;
515
+ }>;
516
+ };
517
+ hooks: {
518
+ error: (error: unknown) => unknown;
519
+ };
520
+ triggers: {
521
+ webhook: import("@prismatic-io/spectral").TriggerDefinition<{
522
+ verifyToken: {
523
+ label: string;
524
+ comments: string;
525
+ type: "string";
526
+ required: true;
527
+ example: string;
528
+ placeholder: string;
529
+ clean: (value: unknown, defaultValue?: string) => string;
530
+ };
531
+ appSecret: {
532
+ label: string;
533
+ comments: string;
534
+ type: "password";
535
+ required: true;
536
+ example: string;
537
+ placeholder: string;
538
+ clean: (value: unknown, defaultValue?: string) => string;
539
+ };
540
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, true, {
541
+ payload: import("@prismatic-io/spectral").TriggerPayload;
542
+ branch: string;
543
+ }, import("@prismatic-io/spectral").Inputs>;
544
+ };
545
+ connections: import("@prismatic-io/spectral").KeyedConnection<{
546
+ key: "whatsapp-access-token";
547
+ display: {
548
+ label: string;
549
+ description: string;
550
+ };
551
+ inputs: {
552
+ accessToken: {
553
+ label: string;
554
+ placeholder: string;
555
+ type: "password";
556
+ required: true;
557
+ comments: string;
558
+ };
559
+ };
560
+ }, "whatsapp-access-token">[];
561
+ dataSources: {
562
+ selectPhone: import("@prismatic-io/spectral").DataSourceDefinition<{
563
+ connection: {
564
+ label: string;
565
+ type: "connection";
566
+ required: true;
567
+ comments: string;
568
+ };
569
+ whatsappBusinessAccountId: {
570
+ label: string;
571
+ comments: string;
572
+ type: "string";
573
+ required: true;
574
+ example: string;
575
+ placeholder: string;
576
+ clean: (value: unknown, defaultValue?: string) => string;
577
+ };
578
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, "picklist">;
579
+ };
580
+ }>;
581
+ export = _default;
package/package.json CHANGED
@@ -1,6 +1,52 @@
1
1
  {
2
2
  "name": "@prismatic-io/components-whatsapp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.1",
4
+ "main": "./npm-dist/index.cjs",
5
+ "types": "./npm-dist/index.d.cts",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./npm-dist/index.d.cts",
9
+ "default": "./npm-dist/index.cjs"
10
+ }
11
+ },
12
+ "description": "Send messages, manage media, and register phone numbers with the WhatsApp Business API",
13
+ "license": "Apache-2.0",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/prismatic-io/components.git",
17
+ "directory": "components/whatsapp"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "files": [
23
+ "npm-dist",
24
+ "dist"
25
+ ],
26
+ "prismatic": {
27
+ "component": "./dist/index.js"
28
+ },
29
+ "scripts": {
30
+ "lint": "biome lint --write .",
31
+ "format": "biome format --write .",
32
+ "build": "npm run format && npm run lint && tsdown",
33
+ "typecheck": "tsc --noEmit",
34
+ "generate:manifest": "npm run build && npx @prismatic-io/spectral component-manifest",
35
+ "generate:manifest:dev": "npm run build && npx @prismatic-io/spectral component-manifest --skip-signature-verify",
36
+ "test": "echo 'no tests'",
37
+ "prepare": "npm run build",
38
+ "publish:platform": "npm run build && prism components:publish"
39
+ },
40
+ "peerDependencies": {
41
+ "@prismatic-io/spectral": "^10.38.5"
42
+ },
43
+ "dependencies": {},
44
+ "devDependencies": {
45
+ "@biomejs/biome": "2.5.1",
46
+ "@types/node": "^26.6.4",
47
+ "tsdown": "0.22.3",
48
+ "typescript": "6.0.3",
49
+ "vitest": "4.1.9",
50
+ "@prismatic-io/spectral": "^10.38.5"
51
+ }
52
+ }