@atribu/node 0.1.2 → 0.2.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.
@@ -32,6 +32,11 @@ interface MockOverrides {
32
32
  reply?: EndpointOverride;
33
33
  privateReply?: EndpointOverride;
34
34
  };
35
+ connections?: {
36
+ list?: EndpointOverride;
37
+ get?: EndpointOverride;
38
+ revoke?: EndpointOverride;
39
+ };
35
40
  webhooks?: {
36
41
  subscriptions?: {
37
42
  list?: EndpointOverride;
@@ -45,6 +50,30 @@ interface MockOverrides {
45
50
  replay?: EndpointOverride;
46
51
  };
47
52
  };
53
+ whatsapp?: {
54
+ templates?: {
55
+ list?: EndpointOverride;
56
+ create?: EndpointOverride;
57
+ delete?: EndpointOverride;
58
+ };
59
+ broadcasts?: {
60
+ list?: EndpointOverride;
61
+ create?: EndpointOverride;
62
+ get?: EndpointOverride;
63
+ cancel?: EndpointOverride;
64
+ send?: EndpointOverride;
65
+ };
66
+ };
67
+ instagram?: {
68
+ triggers?: {
69
+ list?: EndpointOverride;
70
+ create?: EndpointOverride;
71
+ update?: EndpointOverride;
72
+ delete?: EndpointOverride;
73
+ testDm?: EndpointOverride;
74
+ resume?: EndpointOverride;
75
+ };
76
+ };
48
77
  oauth?: {
49
78
  token?: EndpointOverride;
50
79
  revoke?: EndpointOverride;
@@ -191,6 +220,272 @@ declare const responseFixtures: {
191
220
  request_id: string;
192
221
  };
193
222
  };
223
+ connectionList(overrides?: {
224
+ items?: number;
225
+ }): {
226
+ data: {
227
+ id: string;
228
+ channel: "whatsapp";
229
+ status: string;
230
+ display_name: string;
231
+ external_id: string;
232
+ provider_subtype: null;
233
+ authorized_at: string;
234
+ created_at: string;
235
+ }[];
236
+ meta: {
237
+ profile_id: string;
238
+ };
239
+ };
240
+ connectionDetail(overrides?: {
241
+ id?: string;
242
+ channel?: "whatsapp" | "instagram";
243
+ }): {
244
+ data: {
245
+ id: string;
246
+ channel: "whatsapp" | "instagram";
247
+ status: string;
248
+ display_name: string;
249
+ external_id: string;
250
+ provider_subtype: null;
251
+ authorized_at: string;
252
+ created_at: string;
253
+ };
254
+ meta: {
255
+ profile_id: string;
256
+ };
257
+ };
258
+ whatsappTemplateList(overrides?: {
259
+ items?: number;
260
+ }): {
261
+ data: {
262
+ id: string;
263
+ name: string;
264
+ language: string;
265
+ category: string;
266
+ status: string;
267
+ components: {
268
+ type: string;
269
+ text: string;
270
+ }[];
271
+ }[];
272
+ meta: {
273
+ profile_id: string;
274
+ connection_id: string;
275
+ };
276
+ };
277
+ whatsappTemplateCreated(overrides?: {
278
+ id?: string;
279
+ status?: string;
280
+ }): {
281
+ data: {
282
+ id: string;
283
+ status: string;
284
+ };
285
+ meta: {
286
+ profile_id: string;
287
+ connection_id: string;
288
+ };
289
+ };
290
+ whatsappBroadcast(overrides?: {
291
+ id?: string;
292
+ status?: string;
293
+ }): {
294
+ id: string;
295
+ name: string;
296
+ template_name: string;
297
+ template_language: string;
298
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
299
+ total_recipients: number;
300
+ sent_count: number;
301
+ delivered_count: number;
302
+ read_count: number;
303
+ failed_count: number;
304
+ started_at: null;
305
+ completed_at: null;
306
+ created_at: string;
307
+ };
308
+ whatsappBroadcastList(overrides?: {
309
+ items?: number;
310
+ }): {
311
+ data: {
312
+ id: string;
313
+ name: string;
314
+ template_name: string;
315
+ template_language: string;
316
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
317
+ total_recipients: number;
318
+ sent_count: number;
319
+ delivered_count: number;
320
+ read_count: number;
321
+ failed_count: number;
322
+ started_at: null;
323
+ completed_at: null;
324
+ created_at: string;
325
+ }[];
326
+ meta: {
327
+ profile_id: string;
328
+ connection_id: string;
329
+ };
330
+ };
331
+ whatsappBroadcastCreated(): {
332
+ data: {
333
+ id: string;
334
+ name: string;
335
+ template_name: string;
336
+ template_language: string;
337
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
338
+ total_recipients: number;
339
+ sent_count: number;
340
+ delivered_count: number;
341
+ read_count: number;
342
+ failed_count: number;
343
+ started_at: null;
344
+ completed_at: null;
345
+ created_at: string;
346
+ };
347
+ meta: {
348
+ profile_id: string;
349
+ connection_id: string;
350
+ };
351
+ };
352
+ whatsappBroadcastDetail(): {
353
+ data: {
354
+ recipients: {
355
+ id: string;
356
+ phone_number: string;
357
+ template_params: null;
358
+ status: "pending";
359
+ wamid: null;
360
+ error_message: null;
361
+ sent_at: null;
362
+ }[];
363
+ id: string;
364
+ name: string;
365
+ template_name: string;
366
+ template_language: string;
367
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
368
+ total_recipients: number;
369
+ sent_count: number;
370
+ delivered_count: number;
371
+ read_count: number;
372
+ failed_count: number;
373
+ started_at: null;
374
+ completed_at: null;
375
+ created_at: string;
376
+ };
377
+ meta: {
378
+ profile_id: string;
379
+ connection_id: string;
380
+ };
381
+ };
382
+ whatsappBroadcastUpdated(overrides?: {
383
+ status?: string;
384
+ }): {
385
+ data: {
386
+ id: string;
387
+ name: string;
388
+ template_name: string;
389
+ template_language: string;
390
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
391
+ total_recipients: number;
392
+ sent_count: number;
393
+ delivered_count: number;
394
+ read_count: number;
395
+ failed_count: number;
396
+ started_at: null;
397
+ completed_at: null;
398
+ created_at: string;
399
+ };
400
+ meta: {
401
+ profile_id: string;
402
+ connection_id: string;
403
+ };
404
+ };
405
+ instagramTrigger(overrides?: {
406
+ id?: string;
407
+ keyword?: string;
408
+ enabled?: boolean;
409
+ }): {
410
+ id: string;
411
+ connection_id: string;
412
+ keyword: string;
413
+ keyword_match_mode: "contains";
414
+ case_sensitive: boolean;
415
+ post_id_allowlist: null;
416
+ opening_message: string;
417
+ public_comment_reply: string;
418
+ agent_context_hint: null;
419
+ enabled: boolean;
420
+ trigger_count: number;
421
+ last_triggered_at: null;
422
+ created_at: string;
423
+ updated_at: string;
424
+ };
425
+ instagramTriggerList(overrides?: {
426
+ items?: number;
427
+ }): {
428
+ data: {
429
+ id: string;
430
+ connection_id: string;
431
+ keyword: string;
432
+ keyword_match_mode: "contains";
433
+ case_sensitive: boolean;
434
+ post_id_allowlist: null;
435
+ opening_message: string;
436
+ public_comment_reply: string;
437
+ agent_context_hint: null;
438
+ enabled: boolean;
439
+ trigger_count: number;
440
+ last_triggered_at: null;
441
+ created_at: string;
442
+ updated_at: string;
443
+ }[];
444
+ meta: {
445
+ profile_id: string;
446
+ connection_id: string;
447
+ };
448
+ };
449
+ instagramTriggerCreated(): {
450
+ data: {
451
+ id: string;
452
+ connection_id: string;
453
+ keyword: string;
454
+ keyword_match_mode: "contains";
455
+ case_sensitive: boolean;
456
+ post_id_allowlist: null;
457
+ opening_message: string;
458
+ public_comment_reply: string;
459
+ agent_context_hint: null;
460
+ enabled: boolean;
461
+ trigger_count: number;
462
+ last_triggered_at: null;
463
+ created_at: string;
464
+ updated_at: string;
465
+ };
466
+ meta: {
467
+ profile_id: string;
468
+ connection_id: string;
469
+ };
470
+ };
471
+ instagramTriggerTestDm(): {
472
+ data: {
473
+ provider_message_id: string;
474
+ };
475
+ meta: {
476
+ profile_id: string;
477
+ connection_id: string;
478
+ };
479
+ };
480
+ instagramTriggerResumed(): {
481
+ data: {
482
+ resumed: boolean;
483
+ };
484
+ meta: {
485
+ profile_id: string;
486
+ connection_id: string;
487
+ };
488
+ };
194
489
  };
195
490
  /** Combined export so consumers can `import { fixtures } from "@atribu/node/test"`. */
196
491
  declare const fixtures: {
@@ -314,6 +609,272 @@ declare const fixtures: {
314
609
  request_id: string;
315
610
  };
316
611
  };
612
+ connectionList(overrides?: {
613
+ items?: number;
614
+ }): {
615
+ data: {
616
+ id: string;
617
+ channel: "whatsapp";
618
+ status: string;
619
+ display_name: string;
620
+ external_id: string;
621
+ provider_subtype: null;
622
+ authorized_at: string;
623
+ created_at: string;
624
+ }[];
625
+ meta: {
626
+ profile_id: string;
627
+ };
628
+ };
629
+ connectionDetail(overrides?: {
630
+ id?: string;
631
+ channel?: "whatsapp" | "instagram";
632
+ }): {
633
+ data: {
634
+ id: string;
635
+ channel: "whatsapp" | "instagram";
636
+ status: string;
637
+ display_name: string;
638
+ external_id: string;
639
+ provider_subtype: null;
640
+ authorized_at: string;
641
+ created_at: string;
642
+ };
643
+ meta: {
644
+ profile_id: string;
645
+ };
646
+ };
647
+ whatsappTemplateList(overrides?: {
648
+ items?: number;
649
+ }): {
650
+ data: {
651
+ id: string;
652
+ name: string;
653
+ language: string;
654
+ category: string;
655
+ status: string;
656
+ components: {
657
+ type: string;
658
+ text: string;
659
+ }[];
660
+ }[];
661
+ meta: {
662
+ profile_id: string;
663
+ connection_id: string;
664
+ };
665
+ };
666
+ whatsappTemplateCreated(overrides?: {
667
+ id?: string;
668
+ status?: string;
669
+ }): {
670
+ data: {
671
+ id: string;
672
+ status: string;
673
+ };
674
+ meta: {
675
+ profile_id: string;
676
+ connection_id: string;
677
+ };
678
+ };
679
+ whatsappBroadcast(overrides?: {
680
+ id?: string;
681
+ status?: string;
682
+ }): {
683
+ id: string;
684
+ name: string;
685
+ template_name: string;
686
+ template_language: string;
687
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
688
+ total_recipients: number;
689
+ sent_count: number;
690
+ delivered_count: number;
691
+ read_count: number;
692
+ failed_count: number;
693
+ started_at: null;
694
+ completed_at: null;
695
+ created_at: string;
696
+ };
697
+ whatsappBroadcastList(overrides?: {
698
+ items?: number;
699
+ }): {
700
+ data: {
701
+ id: string;
702
+ name: string;
703
+ template_name: string;
704
+ template_language: string;
705
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
706
+ total_recipients: number;
707
+ sent_count: number;
708
+ delivered_count: number;
709
+ read_count: number;
710
+ failed_count: number;
711
+ started_at: null;
712
+ completed_at: null;
713
+ created_at: string;
714
+ }[];
715
+ meta: {
716
+ profile_id: string;
717
+ connection_id: string;
718
+ };
719
+ };
720
+ whatsappBroadcastCreated(): {
721
+ data: {
722
+ id: string;
723
+ name: string;
724
+ template_name: string;
725
+ template_language: string;
726
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
727
+ total_recipients: number;
728
+ sent_count: number;
729
+ delivered_count: number;
730
+ read_count: number;
731
+ failed_count: number;
732
+ started_at: null;
733
+ completed_at: null;
734
+ created_at: string;
735
+ };
736
+ meta: {
737
+ profile_id: string;
738
+ connection_id: string;
739
+ };
740
+ };
741
+ whatsappBroadcastDetail(): {
742
+ data: {
743
+ recipients: {
744
+ id: string;
745
+ phone_number: string;
746
+ template_params: null;
747
+ status: "pending";
748
+ wamid: null;
749
+ error_message: null;
750
+ sent_at: null;
751
+ }[];
752
+ id: string;
753
+ name: string;
754
+ template_name: string;
755
+ template_language: string;
756
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
757
+ total_recipients: number;
758
+ sent_count: number;
759
+ delivered_count: number;
760
+ read_count: number;
761
+ failed_count: number;
762
+ started_at: null;
763
+ completed_at: null;
764
+ created_at: string;
765
+ };
766
+ meta: {
767
+ profile_id: string;
768
+ connection_id: string;
769
+ };
770
+ };
771
+ whatsappBroadcastUpdated(overrides?: {
772
+ status?: string;
773
+ }): {
774
+ data: {
775
+ id: string;
776
+ name: string;
777
+ template_name: string;
778
+ template_language: string;
779
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
780
+ total_recipients: number;
781
+ sent_count: number;
782
+ delivered_count: number;
783
+ read_count: number;
784
+ failed_count: number;
785
+ started_at: null;
786
+ completed_at: null;
787
+ created_at: string;
788
+ };
789
+ meta: {
790
+ profile_id: string;
791
+ connection_id: string;
792
+ };
793
+ };
794
+ instagramTrigger(overrides?: {
795
+ id?: string;
796
+ keyword?: string;
797
+ enabled?: boolean;
798
+ }): {
799
+ id: string;
800
+ connection_id: string;
801
+ keyword: string;
802
+ keyword_match_mode: "contains";
803
+ case_sensitive: boolean;
804
+ post_id_allowlist: null;
805
+ opening_message: string;
806
+ public_comment_reply: string;
807
+ agent_context_hint: null;
808
+ enabled: boolean;
809
+ trigger_count: number;
810
+ last_triggered_at: null;
811
+ created_at: string;
812
+ updated_at: string;
813
+ };
814
+ instagramTriggerList(overrides?: {
815
+ items?: number;
816
+ }): {
817
+ data: {
818
+ id: string;
819
+ connection_id: string;
820
+ keyword: string;
821
+ keyword_match_mode: "contains";
822
+ case_sensitive: boolean;
823
+ post_id_allowlist: null;
824
+ opening_message: string;
825
+ public_comment_reply: string;
826
+ agent_context_hint: null;
827
+ enabled: boolean;
828
+ trigger_count: number;
829
+ last_triggered_at: null;
830
+ created_at: string;
831
+ updated_at: string;
832
+ }[];
833
+ meta: {
834
+ profile_id: string;
835
+ connection_id: string;
836
+ };
837
+ };
838
+ instagramTriggerCreated(): {
839
+ data: {
840
+ id: string;
841
+ connection_id: string;
842
+ keyword: string;
843
+ keyword_match_mode: "contains";
844
+ case_sensitive: boolean;
845
+ post_id_allowlist: null;
846
+ opening_message: string;
847
+ public_comment_reply: string;
848
+ agent_context_hint: null;
849
+ enabled: boolean;
850
+ trigger_count: number;
851
+ last_triggered_at: null;
852
+ created_at: string;
853
+ updated_at: string;
854
+ };
855
+ meta: {
856
+ profile_id: string;
857
+ connection_id: string;
858
+ };
859
+ };
860
+ instagramTriggerTestDm(): {
861
+ data: {
862
+ provider_message_id: string;
863
+ };
864
+ meta: {
865
+ profile_id: string;
866
+ connection_id: string;
867
+ };
868
+ };
869
+ instagramTriggerResumed(): {
870
+ data: {
871
+ resumed: boolean;
872
+ };
873
+ meta: {
874
+ profile_id: string;
875
+ connection_id: string;
876
+ };
877
+ };
317
878
  };
318
879
  };
319
880
  type FixtureWebhookEvent = AtribuWebhookEvent;