@atribu/node 0.1.4 → 0.3.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,273 @@ 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
+ error_reason_code: null;
362
+ sent_at: null;
363
+ }[];
364
+ id: string;
365
+ name: string;
366
+ template_name: string;
367
+ template_language: string;
368
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
369
+ total_recipients: number;
370
+ sent_count: number;
371
+ delivered_count: number;
372
+ read_count: number;
373
+ failed_count: number;
374
+ started_at: null;
375
+ completed_at: null;
376
+ created_at: string;
377
+ };
378
+ meta: {
379
+ profile_id: string;
380
+ connection_id: string;
381
+ };
382
+ };
383
+ whatsappBroadcastUpdated(overrides?: {
384
+ status?: string;
385
+ }): {
386
+ data: {
387
+ id: string;
388
+ name: string;
389
+ template_name: string;
390
+ template_language: string;
391
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
392
+ total_recipients: number;
393
+ sent_count: number;
394
+ delivered_count: number;
395
+ read_count: number;
396
+ failed_count: number;
397
+ started_at: null;
398
+ completed_at: null;
399
+ created_at: string;
400
+ };
401
+ meta: {
402
+ profile_id: string;
403
+ connection_id: string;
404
+ };
405
+ };
406
+ instagramTrigger(overrides?: {
407
+ id?: string;
408
+ keyword?: string;
409
+ enabled?: boolean;
410
+ }): {
411
+ id: string;
412
+ connection_id: string;
413
+ keyword: string;
414
+ keyword_match_mode: "contains";
415
+ case_sensitive: boolean;
416
+ post_id_allowlist: null;
417
+ opening_message: string;
418
+ public_comment_reply: string;
419
+ agent_context_hint: null;
420
+ enabled: boolean;
421
+ trigger_count: number;
422
+ last_triggered_at: null;
423
+ created_at: string;
424
+ updated_at: string;
425
+ };
426
+ instagramTriggerList(overrides?: {
427
+ items?: number;
428
+ }): {
429
+ data: {
430
+ id: string;
431
+ connection_id: string;
432
+ keyword: string;
433
+ keyword_match_mode: "contains";
434
+ case_sensitive: boolean;
435
+ post_id_allowlist: null;
436
+ opening_message: string;
437
+ public_comment_reply: string;
438
+ agent_context_hint: null;
439
+ enabled: boolean;
440
+ trigger_count: number;
441
+ last_triggered_at: null;
442
+ created_at: string;
443
+ updated_at: string;
444
+ }[];
445
+ meta: {
446
+ profile_id: string;
447
+ connection_id: string;
448
+ };
449
+ };
450
+ instagramTriggerCreated(): {
451
+ data: {
452
+ id: string;
453
+ connection_id: string;
454
+ keyword: string;
455
+ keyword_match_mode: "contains";
456
+ case_sensitive: boolean;
457
+ post_id_allowlist: null;
458
+ opening_message: string;
459
+ public_comment_reply: string;
460
+ agent_context_hint: null;
461
+ enabled: boolean;
462
+ trigger_count: number;
463
+ last_triggered_at: null;
464
+ created_at: string;
465
+ updated_at: string;
466
+ };
467
+ meta: {
468
+ profile_id: string;
469
+ connection_id: string;
470
+ };
471
+ };
472
+ instagramTriggerTestDm(): {
473
+ data: {
474
+ provider_message_id: string;
475
+ };
476
+ meta: {
477
+ profile_id: string;
478
+ connection_id: string;
479
+ };
480
+ };
481
+ instagramTriggerResumed(): {
482
+ data: {
483
+ resumed: boolean;
484
+ };
485
+ meta: {
486
+ profile_id: string;
487
+ connection_id: string;
488
+ };
489
+ };
194
490
  };
195
491
  /** Combined export so consumers can `import { fixtures } from "@atribu/node/test"`. */
196
492
  declare const fixtures: {
@@ -314,6 +610,273 @@ declare const fixtures: {
314
610
  request_id: string;
315
611
  };
316
612
  };
613
+ connectionList(overrides?: {
614
+ items?: number;
615
+ }): {
616
+ data: {
617
+ id: string;
618
+ channel: "whatsapp";
619
+ status: string;
620
+ display_name: string;
621
+ external_id: string;
622
+ provider_subtype: null;
623
+ authorized_at: string;
624
+ created_at: string;
625
+ }[];
626
+ meta: {
627
+ profile_id: string;
628
+ };
629
+ };
630
+ connectionDetail(overrides?: {
631
+ id?: string;
632
+ channel?: "whatsapp" | "instagram";
633
+ }): {
634
+ data: {
635
+ id: string;
636
+ channel: "whatsapp" | "instagram";
637
+ status: string;
638
+ display_name: string;
639
+ external_id: string;
640
+ provider_subtype: null;
641
+ authorized_at: string;
642
+ created_at: string;
643
+ };
644
+ meta: {
645
+ profile_id: string;
646
+ };
647
+ };
648
+ whatsappTemplateList(overrides?: {
649
+ items?: number;
650
+ }): {
651
+ data: {
652
+ id: string;
653
+ name: string;
654
+ language: string;
655
+ category: string;
656
+ status: string;
657
+ components: {
658
+ type: string;
659
+ text: string;
660
+ }[];
661
+ }[];
662
+ meta: {
663
+ profile_id: string;
664
+ connection_id: string;
665
+ };
666
+ };
667
+ whatsappTemplateCreated(overrides?: {
668
+ id?: string;
669
+ status?: string;
670
+ }): {
671
+ data: {
672
+ id: string;
673
+ status: string;
674
+ };
675
+ meta: {
676
+ profile_id: string;
677
+ connection_id: string;
678
+ };
679
+ };
680
+ whatsappBroadcast(overrides?: {
681
+ id?: string;
682
+ status?: string;
683
+ }): {
684
+ id: string;
685
+ name: string;
686
+ template_name: string;
687
+ template_language: string;
688
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
689
+ total_recipients: number;
690
+ sent_count: number;
691
+ delivered_count: number;
692
+ read_count: number;
693
+ failed_count: number;
694
+ started_at: null;
695
+ completed_at: null;
696
+ created_at: string;
697
+ };
698
+ whatsappBroadcastList(overrides?: {
699
+ items?: number;
700
+ }): {
701
+ data: {
702
+ id: string;
703
+ name: string;
704
+ template_name: string;
705
+ template_language: string;
706
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
707
+ total_recipients: number;
708
+ sent_count: number;
709
+ delivered_count: number;
710
+ read_count: number;
711
+ failed_count: number;
712
+ started_at: null;
713
+ completed_at: null;
714
+ created_at: string;
715
+ }[];
716
+ meta: {
717
+ profile_id: string;
718
+ connection_id: string;
719
+ };
720
+ };
721
+ whatsappBroadcastCreated(): {
722
+ data: {
723
+ id: string;
724
+ name: string;
725
+ template_name: string;
726
+ template_language: string;
727
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
728
+ total_recipients: number;
729
+ sent_count: number;
730
+ delivered_count: number;
731
+ read_count: number;
732
+ failed_count: number;
733
+ started_at: null;
734
+ completed_at: null;
735
+ created_at: string;
736
+ };
737
+ meta: {
738
+ profile_id: string;
739
+ connection_id: string;
740
+ };
741
+ };
742
+ whatsappBroadcastDetail(): {
743
+ data: {
744
+ recipients: {
745
+ id: string;
746
+ phone_number: string;
747
+ template_params: null;
748
+ status: "pending";
749
+ wamid: null;
750
+ error_message: null;
751
+ error_reason_code: null;
752
+ sent_at: null;
753
+ }[];
754
+ id: string;
755
+ name: string;
756
+ template_name: string;
757
+ template_language: string;
758
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
759
+ total_recipients: number;
760
+ sent_count: number;
761
+ delivered_count: number;
762
+ read_count: number;
763
+ failed_count: number;
764
+ started_at: null;
765
+ completed_at: null;
766
+ created_at: string;
767
+ };
768
+ meta: {
769
+ profile_id: string;
770
+ connection_id: string;
771
+ };
772
+ };
773
+ whatsappBroadcastUpdated(overrides?: {
774
+ status?: string;
775
+ }): {
776
+ data: {
777
+ id: string;
778
+ name: string;
779
+ template_name: string;
780
+ template_language: string;
781
+ status: "draft" | "sending" | "completed" | "cancelled" | "failed";
782
+ total_recipients: number;
783
+ sent_count: number;
784
+ delivered_count: number;
785
+ read_count: number;
786
+ failed_count: number;
787
+ started_at: null;
788
+ completed_at: null;
789
+ created_at: string;
790
+ };
791
+ meta: {
792
+ profile_id: string;
793
+ connection_id: string;
794
+ };
795
+ };
796
+ instagramTrigger(overrides?: {
797
+ id?: string;
798
+ keyword?: string;
799
+ enabled?: boolean;
800
+ }): {
801
+ id: string;
802
+ connection_id: string;
803
+ keyword: string;
804
+ keyword_match_mode: "contains";
805
+ case_sensitive: boolean;
806
+ post_id_allowlist: null;
807
+ opening_message: string;
808
+ public_comment_reply: string;
809
+ agent_context_hint: null;
810
+ enabled: boolean;
811
+ trigger_count: number;
812
+ last_triggered_at: null;
813
+ created_at: string;
814
+ updated_at: string;
815
+ };
816
+ instagramTriggerList(overrides?: {
817
+ items?: number;
818
+ }): {
819
+ data: {
820
+ id: string;
821
+ connection_id: string;
822
+ keyword: string;
823
+ keyword_match_mode: "contains";
824
+ case_sensitive: boolean;
825
+ post_id_allowlist: null;
826
+ opening_message: string;
827
+ public_comment_reply: string;
828
+ agent_context_hint: null;
829
+ enabled: boolean;
830
+ trigger_count: number;
831
+ last_triggered_at: null;
832
+ created_at: string;
833
+ updated_at: string;
834
+ }[];
835
+ meta: {
836
+ profile_id: string;
837
+ connection_id: string;
838
+ };
839
+ };
840
+ instagramTriggerCreated(): {
841
+ data: {
842
+ id: string;
843
+ connection_id: string;
844
+ keyword: string;
845
+ keyword_match_mode: "contains";
846
+ case_sensitive: boolean;
847
+ post_id_allowlist: null;
848
+ opening_message: string;
849
+ public_comment_reply: string;
850
+ agent_context_hint: null;
851
+ enabled: boolean;
852
+ trigger_count: number;
853
+ last_triggered_at: null;
854
+ created_at: string;
855
+ updated_at: string;
856
+ };
857
+ meta: {
858
+ profile_id: string;
859
+ connection_id: string;
860
+ };
861
+ };
862
+ instagramTriggerTestDm(): {
863
+ data: {
864
+ provider_message_id: string;
865
+ };
866
+ meta: {
867
+ profile_id: string;
868
+ connection_id: string;
869
+ };
870
+ };
871
+ instagramTriggerResumed(): {
872
+ data: {
873
+ resumed: boolean;
874
+ };
875
+ meta: {
876
+ profile_id: string;
877
+ connection_id: string;
878
+ };
879
+ };
317
880
  };
318
881
  };
319
882
  type FixtureWebhookEvent = AtribuWebhookEvent;