@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.
- package/CHANGELOG.md +65 -0
- package/README.md +153 -2
- package/dist/admin/index.cjs.map +1 -1
- package/dist/admin/index.d.cts +1 -1
- package/dist/admin/index.d.ts +1 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/{api.d-BXINTQo6.d.cts → api.d-K2ywQhc9.d.cts} +1143 -0
- package/dist/{api.d-BXINTQo6.d.ts → api.d-K2ywQhc9.d.ts} +1143 -0
- package/dist/index.cjs +242 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +167 -16
- package/dist/index.d.ts +167 -16
- package/dist/index.js +242 -2
- package/dist/index.js.map +1 -1
- package/dist/test/index.cjs +239 -0
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.d.cts +563 -0
- package/dist/test/index.d.ts +563 -0
- package/dist/test/index.js +239 -0
- package/dist/test/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -2215,6 +2215,19 @@ interface paths {
|
|
|
2215
2215
|
};
|
|
2216
2216
|
filename: string;
|
|
2217
2217
|
caption?: string;
|
|
2218
|
+
} | {
|
|
2219
|
+
/** @enum {string} */
|
|
2220
|
+
type: "interactive_buttons";
|
|
2221
|
+
/** @description Body text shown above the buttons (1024 char max). */
|
|
2222
|
+
body: string;
|
|
2223
|
+
/** @description Optional text header (60 char max). */
|
|
2224
|
+
header?: string;
|
|
2225
|
+
buttons: {
|
|
2226
|
+
/** @description Postback ID returned when tapped. */
|
|
2227
|
+
id: string;
|
|
2228
|
+
/** @description Button label (20 char max). */
|
|
2229
|
+
title: string;
|
|
2230
|
+
}[];
|
|
2218
2231
|
} | {
|
|
2219
2232
|
/** @enum {string} */
|
|
2220
2233
|
type: "quick_replies";
|
|
@@ -2457,6 +2470,1136 @@ interface paths {
|
|
|
2457
2470
|
patch?: never;
|
|
2458
2471
|
trace?: never;
|
|
2459
2472
|
};
|
|
2473
|
+
"/api/v1/connections": {
|
|
2474
|
+
parameters: {
|
|
2475
|
+
query?: never;
|
|
2476
|
+
header?: never;
|
|
2477
|
+
path?: never;
|
|
2478
|
+
cookie?: never;
|
|
2479
|
+
};
|
|
2480
|
+
/**
|
|
2481
|
+
* List authorized data connections
|
|
2482
|
+
* @description Returns the WhatsApp + Instagram connections this API key is authorized to act on. For OAuth-flow-minted keys, restricted to the active `oauth_app_authorizations` set. For direct admin keys, returns every connection on the profile.
|
|
2483
|
+
*/
|
|
2484
|
+
get: {
|
|
2485
|
+
parameters: {
|
|
2486
|
+
query?: {
|
|
2487
|
+
/** @description Filter by channel; omit for both. */
|
|
2488
|
+
channel?: "whatsapp" | "instagram";
|
|
2489
|
+
};
|
|
2490
|
+
header?: never;
|
|
2491
|
+
path?: never;
|
|
2492
|
+
cookie?: never;
|
|
2493
|
+
};
|
|
2494
|
+
requestBody?: never;
|
|
2495
|
+
responses: {
|
|
2496
|
+
/** @description Connections list */
|
|
2497
|
+
200: {
|
|
2498
|
+
headers: {
|
|
2499
|
+
[name: string]: unknown;
|
|
2500
|
+
};
|
|
2501
|
+
content: {
|
|
2502
|
+
"application/json": {
|
|
2503
|
+
data: {
|
|
2504
|
+
/** Format: uuid */
|
|
2505
|
+
id: string;
|
|
2506
|
+
/** @enum {string} */
|
|
2507
|
+
channel: "whatsapp" | "instagram";
|
|
2508
|
+
status: string;
|
|
2509
|
+
/** @description Human-readable connection label (WA: phone number; IG: @username). */
|
|
2510
|
+
display_name: string | null;
|
|
2511
|
+
/** @description WA phone_number_id or IG ig_business_account_id. */
|
|
2512
|
+
external_id: string | null;
|
|
2513
|
+
/** @description Instagram only: 'fb_login' or 'ig_login'. */
|
|
2514
|
+
provider_subtype: string | null;
|
|
2515
|
+
authorized_at: string | null;
|
|
2516
|
+
created_at: string;
|
|
2517
|
+
}[];
|
|
2518
|
+
meta: components["schemas"]["Meta"];
|
|
2519
|
+
};
|
|
2520
|
+
};
|
|
2521
|
+
};
|
|
2522
|
+
};
|
|
2523
|
+
};
|
|
2524
|
+
put?: never;
|
|
2525
|
+
post?: never;
|
|
2526
|
+
delete?: never;
|
|
2527
|
+
options?: never;
|
|
2528
|
+
head?: never;
|
|
2529
|
+
patch?: never;
|
|
2530
|
+
trace?: never;
|
|
2531
|
+
};
|
|
2532
|
+
"/api/v1/connections/{id}": {
|
|
2533
|
+
parameters: {
|
|
2534
|
+
query?: never;
|
|
2535
|
+
header?: never;
|
|
2536
|
+
path?: never;
|
|
2537
|
+
cookie?: never;
|
|
2538
|
+
};
|
|
2539
|
+
/**
|
|
2540
|
+
* Get a single connection
|
|
2541
|
+
* @description Returns one connection by id. 404 if not found or not authorized.
|
|
2542
|
+
*/
|
|
2543
|
+
get: {
|
|
2544
|
+
parameters: {
|
|
2545
|
+
query?: never;
|
|
2546
|
+
header?: never;
|
|
2547
|
+
path: {
|
|
2548
|
+
id: string;
|
|
2549
|
+
};
|
|
2550
|
+
cookie?: never;
|
|
2551
|
+
};
|
|
2552
|
+
requestBody?: never;
|
|
2553
|
+
responses: {
|
|
2554
|
+
/** @description Connection */
|
|
2555
|
+
200: {
|
|
2556
|
+
headers: {
|
|
2557
|
+
[name: string]: unknown;
|
|
2558
|
+
};
|
|
2559
|
+
content: {
|
|
2560
|
+
"application/json": {
|
|
2561
|
+
data: {
|
|
2562
|
+
/** Format: uuid */
|
|
2563
|
+
id: string;
|
|
2564
|
+
/** @enum {string} */
|
|
2565
|
+
channel: "whatsapp" | "instagram";
|
|
2566
|
+
status: string;
|
|
2567
|
+
/** @description Human-readable connection label (WA: phone number; IG: @username). */
|
|
2568
|
+
display_name: string | null;
|
|
2569
|
+
/** @description WA phone_number_id or IG ig_business_account_id. */
|
|
2570
|
+
external_id: string | null;
|
|
2571
|
+
/** @description Instagram only: 'fb_login' or 'ig_login'. */
|
|
2572
|
+
provider_subtype: string | null;
|
|
2573
|
+
authorized_at: string | null;
|
|
2574
|
+
created_at: string;
|
|
2575
|
+
};
|
|
2576
|
+
meta: components["schemas"]["Meta"];
|
|
2577
|
+
};
|
|
2578
|
+
};
|
|
2579
|
+
};
|
|
2580
|
+
/** @description Connection not found or not authorized */
|
|
2581
|
+
404: {
|
|
2582
|
+
headers: {
|
|
2583
|
+
[name: string]: unknown;
|
|
2584
|
+
};
|
|
2585
|
+
content: {
|
|
2586
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2587
|
+
};
|
|
2588
|
+
};
|
|
2589
|
+
};
|
|
2590
|
+
};
|
|
2591
|
+
put?: never;
|
|
2592
|
+
post?: never;
|
|
2593
|
+
/**
|
|
2594
|
+
* Revoke this OAuth app's authorization for a connection
|
|
2595
|
+
* @description Marks the `oauth_app_authorizations` row as revoked. Does NOT disconnect the underlying `data_connection` — other OAuth apps (or the workspace UI) continue to use it. OAuth-flow keys for the affected connection start failing with 403 immediately after this call. Direct admin keys do not have an `oauth_app_authorizations` row and reject this call with 400.
|
|
2596
|
+
*/
|
|
2597
|
+
delete: {
|
|
2598
|
+
parameters: {
|
|
2599
|
+
query?: never;
|
|
2600
|
+
header?: never;
|
|
2601
|
+
path: {
|
|
2602
|
+
id: string;
|
|
2603
|
+
};
|
|
2604
|
+
cookie?: never;
|
|
2605
|
+
};
|
|
2606
|
+
requestBody?: never;
|
|
2607
|
+
responses: {
|
|
2608
|
+
/** @description Authorization revoked */
|
|
2609
|
+
204: {
|
|
2610
|
+
headers: {
|
|
2611
|
+
[name: string]: unknown;
|
|
2612
|
+
};
|
|
2613
|
+
content?: never;
|
|
2614
|
+
};
|
|
2615
|
+
/** @description Direct admin keys cannot self-revoke */
|
|
2616
|
+
400: {
|
|
2617
|
+
headers: {
|
|
2618
|
+
[name: string]: unknown;
|
|
2619
|
+
};
|
|
2620
|
+
content: {
|
|
2621
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2622
|
+
};
|
|
2623
|
+
};
|
|
2624
|
+
/** @description Authorization or connection not found */
|
|
2625
|
+
404: {
|
|
2626
|
+
headers: {
|
|
2627
|
+
[name: string]: unknown;
|
|
2628
|
+
};
|
|
2629
|
+
content: {
|
|
2630
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2631
|
+
};
|
|
2632
|
+
};
|
|
2633
|
+
};
|
|
2634
|
+
};
|
|
2635
|
+
options?: never;
|
|
2636
|
+
head?: never;
|
|
2637
|
+
patch?: never;
|
|
2638
|
+
trace?: never;
|
|
2639
|
+
};
|
|
2640
|
+
"/api/v1/whatsapp/templates": {
|
|
2641
|
+
parameters: {
|
|
2642
|
+
query?: never;
|
|
2643
|
+
header?: never;
|
|
2644
|
+
path?: never;
|
|
2645
|
+
cookie?: never;
|
|
2646
|
+
};
|
|
2647
|
+
/**
|
|
2648
|
+
* List WhatsApp message templates
|
|
2649
|
+
* @description Returns up to 100 templates from the WABA, all statuses. Newly created templates may take minutes to hours to leave `PENDING`. Templates can be sent via `POST /api/v1/messages` with `content.type='template'` only when `status='APPROVED'`.
|
|
2650
|
+
*/
|
|
2651
|
+
get: {
|
|
2652
|
+
parameters: {
|
|
2653
|
+
query: {
|
|
2654
|
+
connection_id: string;
|
|
2655
|
+
};
|
|
2656
|
+
header?: never;
|
|
2657
|
+
path?: never;
|
|
2658
|
+
cookie?: never;
|
|
2659
|
+
};
|
|
2660
|
+
requestBody?: never;
|
|
2661
|
+
responses: {
|
|
2662
|
+
/** @description Templates list */
|
|
2663
|
+
200: {
|
|
2664
|
+
headers: {
|
|
2665
|
+
[name: string]: unknown;
|
|
2666
|
+
};
|
|
2667
|
+
content: {
|
|
2668
|
+
"application/json": {
|
|
2669
|
+
data: {
|
|
2670
|
+
id?: string;
|
|
2671
|
+
name: string;
|
|
2672
|
+
language: string;
|
|
2673
|
+
category: string;
|
|
2674
|
+
/** @description One of APPROVED, PENDING, REJECTED, IN_APPEAL, PAUSED, DISABLED. */
|
|
2675
|
+
status: string;
|
|
2676
|
+
components?: {
|
|
2677
|
+
[key: string]: unknown;
|
|
2678
|
+
}[];
|
|
2679
|
+
}[];
|
|
2680
|
+
meta: components["schemas"]["Meta"];
|
|
2681
|
+
};
|
|
2682
|
+
};
|
|
2683
|
+
};
|
|
2684
|
+
/** @description Missing scope or unauthorized connection */
|
|
2685
|
+
403: {
|
|
2686
|
+
headers: {
|
|
2687
|
+
[name: string]: unknown;
|
|
2688
|
+
};
|
|
2689
|
+
content: {
|
|
2690
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2691
|
+
};
|
|
2692
|
+
};
|
|
2693
|
+
/** @description Connection not found */
|
|
2694
|
+
404: {
|
|
2695
|
+
headers: {
|
|
2696
|
+
[name: string]: unknown;
|
|
2697
|
+
};
|
|
2698
|
+
content: {
|
|
2699
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2700
|
+
};
|
|
2701
|
+
};
|
|
2702
|
+
};
|
|
2703
|
+
};
|
|
2704
|
+
put?: never;
|
|
2705
|
+
/**
|
|
2706
|
+
* Create a WhatsApp message template
|
|
2707
|
+
* @description Submits a new template for Meta review. Returns immediately with `status: PENDING`. Use `GET /api/v1/whatsapp/templates` to poll the approval status. Body text supports `{{param_name}}` placeholders — when provided, the SDK auto-generates the required `body_text_named_params` example block and sets `parameter_format=NAMED` on the Meta payload.
|
|
2708
|
+
*/
|
|
2709
|
+
post: {
|
|
2710
|
+
parameters: {
|
|
2711
|
+
query?: never;
|
|
2712
|
+
header?: never;
|
|
2713
|
+
path?: never;
|
|
2714
|
+
cookie?: never;
|
|
2715
|
+
};
|
|
2716
|
+
requestBody?: {
|
|
2717
|
+
content: {
|
|
2718
|
+
"application/json": {
|
|
2719
|
+
/** Format: uuid */
|
|
2720
|
+
connection_id: string;
|
|
2721
|
+
/** @description Lowercase letters, digits and underscores only. */
|
|
2722
|
+
name: string;
|
|
2723
|
+
/** @enum {string} */
|
|
2724
|
+
category: "AUTHENTICATION" | "MARKETING" | "UTILITY";
|
|
2725
|
+
/** @description BCP-47 (e.g. 'en_US', 'es'). */
|
|
2726
|
+
language: string;
|
|
2727
|
+
/** @description `{{param_name}}` placeholders auto-generate a NAMED `example` block. */
|
|
2728
|
+
body_text: string;
|
|
2729
|
+
header_text?: string;
|
|
2730
|
+
footer_text?: string;
|
|
2731
|
+
};
|
|
2732
|
+
};
|
|
2733
|
+
};
|
|
2734
|
+
responses: {
|
|
2735
|
+
/** @description Template submitted */
|
|
2736
|
+
201: {
|
|
2737
|
+
headers: {
|
|
2738
|
+
[name: string]: unknown;
|
|
2739
|
+
};
|
|
2740
|
+
content: {
|
|
2741
|
+
"application/json": {
|
|
2742
|
+
data: {
|
|
2743
|
+
id: string;
|
|
2744
|
+
status: string;
|
|
2745
|
+
};
|
|
2746
|
+
meta: components["schemas"]["Meta"];
|
|
2747
|
+
};
|
|
2748
|
+
};
|
|
2749
|
+
};
|
|
2750
|
+
/** @description Missing scope or unauthorized connection */
|
|
2751
|
+
403: {
|
|
2752
|
+
headers: {
|
|
2753
|
+
[name: string]: unknown;
|
|
2754
|
+
};
|
|
2755
|
+
content: {
|
|
2756
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2757
|
+
};
|
|
2758
|
+
};
|
|
2759
|
+
/** @description Validation error */
|
|
2760
|
+
422: {
|
|
2761
|
+
headers: {
|
|
2762
|
+
[name: string]: unknown;
|
|
2763
|
+
};
|
|
2764
|
+
content: {
|
|
2765
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2766
|
+
};
|
|
2767
|
+
};
|
|
2768
|
+
/** @description Upstream Meta template create failed */
|
|
2769
|
+
502: {
|
|
2770
|
+
headers: {
|
|
2771
|
+
[name: string]: unknown;
|
|
2772
|
+
};
|
|
2773
|
+
content: {
|
|
2774
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2775
|
+
};
|
|
2776
|
+
};
|
|
2777
|
+
};
|
|
2778
|
+
};
|
|
2779
|
+
delete?: never;
|
|
2780
|
+
options?: never;
|
|
2781
|
+
head?: never;
|
|
2782
|
+
patch?: never;
|
|
2783
|
+
trace?: never;
|
|
2784
|
+
};
|
|
2785
|
+
"/api/v1/whatsapp/templates/{name}": {
|
|
2786
|
+
parameters: {
|
|
2787
|
+
query?: never;
|
|
2788
|
+
header?: never;
|
|
2789
|
+
path?: never;
|
|
2790
|
+
cookie?: never;
|
|
2791
|
+
};
|
|
2792
|
+
get?: never;
|
|
2793
|
+
put?: never;
|
|
2794
|
+
post?: never;
|
|
2795
|
+
/**
|
|
2796
|
+
* Delete a WhatsApp message template by name
|
|
2797
|
+
* @description Deletes the template at Meta. Cannot be undone.
|
|
2798
|
+
*/
|
|
2799
|
+
delete: {
|
|
2800
|
+
parameters: {
|
|
2801
|
+
query: {
|
|
2802
|
+
connection_id: string;
|
|
2803
|
+
};
|
|
2804
|
+
header?: never;
|
|
2805
|
+
path: {
|
|
2806
|
+
/** @description Template name. Must match `^[a-z0-9_]+$`. */
|
|
2807
|
+
name: string;
|
|
2808
|
+
};
|
|
2809
|
+
cookie?: never;
|
|
2810
|
+
};
|
|
2811
|
+
requestBody?: never;
|
|
2812
|
+
responses: {
|
|
2813
|
+
/** @description Template deleted */
|
|
2814
|
+
204: {
|
|
2815
|
+
headers: {
|
|
2816
|
+
[name: string]: unknown;
|
|
2817
|
+
};
|
|
2818
|
+
content?: never;
|
|
2819
|
+
};
|
|
2820
|
+
/** @description Missing scope or unauthorized connection */
|
|
2821
|
+
403: {
|
|
2822
|
+
headers: {
|
|
2823
|
+
[name: string]: unknown;
|
|
2824
|
+
};
|
|
2825
|
+
content: {
|
|
2826
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2827
|
+
};
|
|
2828
|
+
};
|
|
2829
|
+
/** @description Invalid template name */
|
|
2830
|
+
422: {
|
|
2831
|
+
headers: {
|
|
2832
|
+
[name: string]: unknown;
|
|
2833
|
+
};
|
|
2834
|
+
content: {
|
|
2835
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2836
|
+
};
|
|
2837
|
+
};
|
|
2838
|
+
/** @description Upstream Meta template delete failed */
|
|
2839
|
+
502: {
|
|
2840
|
+
headers: {
|
|
2841
|
+
[name: string]: unknown;
|
|
2842
|
+
};
|
|
2843
|
+
content: {
|
|
2844
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2845
|
+
};
|
|
2846
|
+
};
|
|
2847
|
+
};
|
|
2848
|
+
};
|
|
2849
|
+
options?: never;
|
|
2850
|
+
head?: never;
|
|
2851
|
+
patch?: never;
|
|
2852
|
+
trace?: never;
|
|
2853
|
+
};
|
|
2854
|
+
"/api/v1/whatsapp/broadcasts": {
|
|
2855
|
+
parameters: {
|
|
2856
|
+
query?: never;
|
|
2857
|
+
header?: never;
|
|
2858
|
+
path?: never;
|
|
2859
|
+
cookie?: never;
|
|
2860
|
+
};
|
|
2861
|
+
/**
|
|
2862
|
+
* List broadcasts
|
|
2863
|
+
* @description Returns up to 50 most-recent broadcasts for the connection, newest first.
|
|
2864
|
+
*/
|
|
2865
|
+
get: {
|
|
2866
|
+
parameters: {
|
|
2867
|
+
query: {
|
|
2868
|
+
connection_id: string;
|
|
2869
|
+
};
|
|
2870
|
+
header?: never;
|
|
2871
|
+
path?: never;
|
|
2872
|
+
cookie?: never;
|
|
2873
|
+
};
|
|
2874
|
+
requestBody?: never;
|
|
2875
|
+
responses: {
|
|
2876
|
+
/** @description Broadcasts list */
|
|
2877
|
+
200: {
|
|
2878
|
+
headers: {
|
|
2879
|
+
[name: string]: unknown;
|
|
2880
|
+
};
|
|
2881
|
+
content: {
|
|
2882
|
+
"application/json": {
|
|
2883
|
+
data: {
|
|
2884
|
+
/** Format: uuid */
|
|
2885
|
+
id: string;
|
|
2886
|
+
name: string | null;
|
|
2887
|
+
template_name: string;
|
|
2888
|
+
template_language: string;
|
|
2889
|
+
/** @enum {string} */
|
|
2890
|
+
status: "draft" | "sending" | "completed" | "cancelled" | "failed";
|
|
2891
|
+
total_recipients: number;
|
|
2892
|
+
sent_count: number;
|
|
2893
|
+
delivered_count: number;
|
|
2894
|
+
read_count: number;
|
|
2895
|
+
failed_count: number;
|
|
2896
|
+
started_at: string | null;
|
|
2897
|
+
completed_at: string | null;
|
|
2898
|
+
created_at: string;
|
|
2899
|
+
}[];
|
|
2900
|
+
meta: components["schemas"]["Meta"];
|
|
2901
|
+
};
|
|
2902
|
+
};
|
|
2903
|
+
};
|
|
2904
|
+
};
|
|
2905
|
+
};
|
|
2906
|
+
put?: never;
|
|
2907
|
+
/**
|
|
2908
|
+
* Create a broadcast
|
|
2909
|
+
* @description Creates a `draft` broadcast row + recipient rows. Does NOT start sending — call `POST /api/v1/whatsapp/broadcasts/{id}/send` to dispatch. Recipients are capped at 1,000 per broadcast (matches the internal UI cap).
|
|
2910
|
+
*/
|
|
2911
|
+
post: {
|
|
2912
|
+
parameters: {
|
|
2913
|
+
query?: never;
|
|
2914
|
+
header?: never;
|
|
2915
|
+
path?: never;
|
|
2916
|
+
cookie?: never;
|
|
2917
|
+
};
|
|
2918
|
+
requestBody?: {
|
|
2919
|
+
content: {
|
|
2920
|
+
"application/json": {
|
|
2921
|
+
/** Format: uuid */
|
|
2922
|
+
connection_id: string;
|
|
2923
|
+
template_name: string;
|
|
2924
|
+
template_language: string;
|
|
2925
|
+
template_components?: {
|
|
2926
|
+
[key: string]: unknown;
|
|
2927
|
+
}[];
|
|
2928
|
+
recipients: {
|
|
2929
|
+
phone_number: string;
|
|
2930
|
+
template_params?: {
|
|
2931
|
+
[key: string]: unknown;
|
|
2932
|
+
};
|
|
2933
|
+
}[];
|
|
2934
|
+
name?: string;
|
|
2935
|
+
};
|
|
2936
|
+
};
|
|
2937
|
+
};
|
|
2938
|
+
responses: {
|
|
2939
|
+
/** @description Broadcast created */
|
|
2940
|
+
201: {
|
|
2941
|
+
headers: {
|
|
2942
|
+
[name: string]: unknown;
|
|
2943
|
+
};
|
|
2944
|
+
content: {
|
|
2945
|
+
"application/json": {
|
|
2946
|
+
data: {
|
|
2947
|
+
/** Format: uuid */
|
|
2948
|
+
id: string;
|
|
2949
|
+
name: string | null;
|
|
2950
|
+
template_name: string;
|
|
2951
|
+
template_language: string;
|
|
2952
|
+
/** @enum {string} */
|
|
2953
|
+
status: "draft" | "sending" | "completed" | "cancelled" | "failed";
|
|
2954
|
+
total_recipients: number;
|
|
2955
|
+
sent_count: number;
|
|
2956
|
+
delivered_count: number;
|
|
2957
|
+
read_count: number;
|
|
2958
|
+
failed_count: number;
|
|
2959
|
+
started_at: string | null;
|
|
2960
|
+
completed_at: string | null;
|
|
2961
|
+
created_at: string;
|
|
2962
|
+
};
|
|
2963
|
+
meta: components["schemas"]["Meta"];
|
|
2964
|
+
};
|
|
2965
|
+
};
|
|
2966
|
+
};
|
|
2967
|
+
/** @description Validation error */
|
|
2968
|
+
422: {
|
|
2969
|
+
headers: {
|
|
2970
|
+
[name: string]: unknown;
|
|
2971
|
+
};
|
|
2972
|
+
content: {
|
|
2973
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2974
|
+
};
|
|
2975
|
+
};
|
|
2976
|
+
};
|
|
2977
|
+
};
|
|
2978
|
+
delete?: never;
|
|
2979
|
+
options?: never;
|
|
2980
|
+
head?: never;
|
|
2981
|
+
patch?: never;
|
|
2982
|
+
trace?: never;
|
|
2983
|
+
};
|
|
2984
|
+
"/api/v1/whatsapp/broadcasts/{id}": {
|
|
2985
|
+
parameters: {
|
|
2986
|
+
query?: never;
|
|
2987
|
+
header?: never;
|
|
2988
|
+
path?: never;
|
|
2989
|
+
cookie?: never;
|
|
2990
|
+
};
|
|
2991
|
+
/**
|
|
2992
|
+
* Get a broadcast + recipients
|
|
2993
|
+
* @description Returns the broadcast row plus up to 200 recipients with delivery state.
|
|
2994
|
+
*/
|
|
2995
|
+
get: {
|
|
2996
|
+
parameters: {
|
|
2997
|
+
query?: never;
|
|
2998
|
+
header?: never;
|
|
2999
|
+
path: {
|
|
3000
|
+
id: string;
|
|
3001
|
+
};
|
|
3002
|
+
cookie?: never;
|
|
3003
|
+
};
|
|
3004
|
+
requestBody?: never;
|
|
3005
|
+
responses: {
|
|
3006
|
+
/** @description Broadcast detail */
|
|
3007
|
+
200: {
|
|
3008
|
+
headers: {
|
|
3009
|
+
[name: string]: unknown;
|
|
3010
|
+
};
|
|
3011
|
+
content: {
|
|
3012
|
+
"application/json": {
|
|
3013
|
+
data: {
|
|
3014
|
+
/** Format: uuid */
|
|
3015
|
+
id: string;
|
|
3016
|
+
name: string | null;
|
|
3017
|
+
template_name: string;
|
|
3018
|
+
template_language: string;
|
|
3019
|
+
/** @enum {string} */
|
|
3020
|
+
status: "draft" | "sending" | "completed" | "cancelled" | "failed";
|
|
3021
|
+
total_recipients: number;
|
|
3022
|
+
sent_count: number;
|
|
3023
|
+
delivered_count: number;
|
|
3024
|
+
read_count: number;
|
|
3025
|
+
failed_count: number;
|
|
3026
|
+
started_at: string | null;
|
|
3027
|
+
completed_at: string | null;
|
|
3028
|
+
created_at: string;
|
|
3029
|
+
recipients: {
|
|
3030
|
+
/** Format: uuid */
|
|
3031
|
+
id: string;
|
|
3032
|
+
phone_number: string;
|
|
3033
|
+
template_params: {
|
|
3034
|
+
[key: string]: unknown;
|
|
3035
|
+
} | null;
|
|
3036
|
+
/** @enum {string} */
|
|
3037
|
+
status: "pending" | "sent" | "delivered" | "read" | "failed" | "cancelled";
|
|
3038
|
+
wamid: string | null;
|
|
3039
|
+
error_message: string | null;
|
|
3040
|
+
/** @description Stable machine-readable reason code from the Meta classifier (e.g. 'meta_131050' = recipient stopped marketing). Useful for de-duping permanently-failed recipients on the next broadcast create. */
|
|
3041
|
+
error_reason_code: string | null;
|
|
3042
|
+
sent_at: string | null;
|
|
3043
|
+
}[];
|
|
3044
|
+
};
|
|
3045
|
+
meta: components["schemas"]["Meta"];
|
|
3046
|
+
};
|
|
3047
|
+
};
|
|
3048
|
+
};
|
|
3049
|
+
/** @description Broadcast not found */
|
|
3050
|
+
404: {
|
|
3051
|
+
headers: {
|
|
3052
|
+
[name: string]: unknown;
|
|
3053
|
+
};
|
|
3054
|
+
content: {
|
|
3055
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3056
|
+
};
|
|
3057
|
+
};
|
|
3058
|
+
};
|
|
3059
|
+
};
|
|
3060
|
+
put?: never;
|
|
3061
|
+
post?: never;
|
|
3062
|
+
delete?: never;
|
|
3063
|
+
options?: never;
|
|
3064
|
+
head?: never;
|
|
3065
|
+
/**
|
|
3066
|
+
* Cancel a broadcast
|
|
3067
|
+
* @description Marks an in-flight broadcast as `cancelled`. Recipients not yet sent stay `pending` permanently. Already-sent messages are NOT recalled.
|
|
3068
|
+
*/
|
|
3069
|
+
patch: {
|
|
3070
|
+
parameters: {
|
|
3071
|
+
query?: never;
|
|
3072
|
+
header?: never;
|
|
3073
|
+
path: {
|
|
3074
|
+
id: string;
|
|
3075
|
+
};
|
|
3076
|
+
cookie?: never;
|
|
3077
|
+
};
|
|
3078
|
+
requestBody?: {
|
|
3079
|
+
content: {
|
|
3080
|
+
"application/json": {
|
|
3081
|
+
/** @enum {string} */
|
|
3082
|
+
status: "cancelled";
|
|
3083
|
+
};
|
|
3084
|
+
};
|
|
3085
|
+
};
|
|
3086
|
+
responses: {
|
|
3087
|
+
/** @description Broadcast cancelled */
|
|
3088
|
+
200: {
|
|
3089
|
+
headers: {
|
|
3090
|
+
[name: string]: unknown;
|
|
3091
|
+
};
|
|
3092
|
+
content: {
|
|
3093
|
+
"application/json": {
|
|
3094
|
+
data: {
|
|
3095
|
+
/** Format: uuid */
|
|
3096
|
+
id: string;
|
|
3097
|
+
name: string | null;
|
|
3098
|
+
template_name: string;
|
|
3099
|
+
template_language: string;
|
|
3100
|
+
/** @enum {string} */
|
|
3101
|
+
status: "draft" | "sending" | "completed" | "cancelled" | "failed";
|
|
3102
|
+
total_recipients: number;
|
|
3103
|
+
sent_count: number;
|
|
3104
|
+
delivered_count: number;
|
|
3105
|
+
read_count: number;
|
|
3106
|
+
failed_count: number;
|
|
3107
|
+
started_at: string | null;
|
|
3108
|
+
completed_at: string | null;
|
|
3109
|
+
created_at: string;
|
|
3110
|
+
};
|
|
3111
|
+
meta: components["schemas"]["Meta"];
|
|
3112
|
+
};
|
|
3113
|
+
};
|
|
3114
|
+
};
|
|
3115
|
+
/** @description Broadcast not found */
|
|
3116
|
+
404: {
|
|
3117
|
+
headers: {
|
|
3118
|
+
[name: string]: unknown;
|
|
3119
|
+
};
|
|
3120
|
+
content: {
|
|
3121
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3122
|
+
};
|
|
3123
|
+
};
|
|
3124
|
+
/** @description Broadcast is not in a cancellable status */
|
|
3125
|
+
409: {
|
|
3126
|
+
headers: {
|
|
3127
|
+
[name: string]: unknown;
|
|
3128
|
+
};
|
|
3129
|
+
content: {
|
|
3130
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3131
|
+
};
|
|
3132
|
+
};
|
|
3133
|
+
};
|
|
3134
|
+
};
|
|
3135
|
+
trace?: never;
|
|
3136
|
+
};
|
|
3137
|
+
"/api/v1/whatsapp/broadcasts/{id}/send": {
|
|
3138
|
+
parameters: {
|
|
3139
|
+
query?: never;
|
|
3140
|
+
header?: never;
|
|
3141
|
+
path?: never;
|
|
3142
|
+
cookie?: never;
|
|
3143
|
+
};
|
|
3144
|
+
get?: never;
|
|
3145
|
+
put?: never;
|
|
3146
|
+
/**
|
|
3147
|
+
* Start sending a broadcast
|
|
3148
|
+
* @description Transitions the broadcast to `sending` and iterates recipients with a 100ms inter-send pacing. Per-recipient sends call the WhatsApp Cloud API; failures mark the recipient `failed` without aborting the run. **Long-running**: this endpoint blocks until all recipients have been attempted. For broadcasts over a few hundred recipients prefer to leave the connection open longer than your client's default timeout.
|
|
3149
|
+
*/
|
|
3150
|
+
post: {
|
|
3151
|
+
parameters: {
|
|
3152
|
+
query?: never;
|
|
3153
|
+
header?: never;
|
|
3154
|
+
path: {
|
|
3155
|
+
id: string;
|
|
3156
|
+
};
|
|
3157
|
+
cookie?: never;
|
|
3158
|
+
};
|
|
3159
|
+
requestBody?: never;
|
|
3160
|
+
responses: {
|
|
3161
|
+
/** @description Broadcast send completed */
|
|
3162
|
+
200: {
|
|
3163
|
+
headers: {
|
|
3164
|
+
[name: string]: unknown;
|
|
3165
|
+
};
|
|
3166
|
+
content: {
|
|
3167
|
+
"application/json": {
|
|
3168
|
+
data: {
|
|
3169
|
+
/** Format: uuid */
|
|
3170
|
+
id: string;
|
|
3171
|
+
name: string | null;
|
|
3172
|
+
template_name: string;
|
|
3173
|
+
template_language: string;
|
|
3174
|
+
/** @enum {string} */
|
|
3175
|
+
status: "draft" | "sending" | "completed" | "cancelled" | "failed";
|
|
3176
|
+
total_recipients: number;
|
|
3177
|
+
sent_count: number;
|
|
3178
|
+
delivered_count: number;
|
|
3179
|
+
read_count: number;
|
|
3180
|
+
failed_count: number;
|
|
3181
|
+
started_at: string | null;
|
|
3182
|
+
completed_at: string | null;
|
|
3183
|
+
created_at: string;
|
|
3184
|
+
};
|
|
3185
|
+
meta: components["schemas"]["Meta"];
|
|
3186
|
+
};
|
|
3187
|
+
};
|
|
3188
|
+
};
|
|
3189
|
+
/** @description Broadcast not found */
|
|
3190
|
+
404: {
|
|
3191
|
+
headers: {
|
|
3192
|
+
[name: string]: unknown;
|
|
3193
|
+
};
|
|
3194
|
+
content: {
|
|
3195
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3196
|
+
};
|
|
3197
|
+
};
|
|
3198
|
+
/** @description Broadcast is not in a sendable status */
|
|
3199
|
+
409: {
|
|
3200
|
+
headers: {
|
|
3201
|
+
[name: string]: unknown;
|
|
3202
|
+
};
|
|
3203
|
+
content: {
|
|
3204
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3205
|
+
};
|
|
3206
|
+
};
|
|
3207
|
+
};
|
|
3208
|
+
};
|
|
3209
|
+
delete?: never;
|
|
3210
|
+
options?: never;
|
|
3211
|
+
head?: never;
|
|
3212
|
+
patch?: never;
|
|
3213
|
+
trace?: never;
|
|
3214
|
+
};
|
|
3215
|
+
"/api/v1/instagram/triggers": {
|
|
3216
|
+
parameters: {
|
|
3217
|
+
query?: never;
|
|
3218
|
+
header?: never;
|
|
3219
|
+
path?: never;
|
|
3220
|
+
cookie?: never;
|
|
3221
|
+
};
|
|
3222
|
+
/**
|
|
3223
|
+
* List comment-to-DM triggers
|
|
3224
|
+
* @description Returns every trigger for the Instagram account behind the supplied `connection_id`, oldest first. Triggers fire on inbound comments where the comment text matches `keyword` per `keyword_match_mode`; the matching commenter receives `opening_message` as a DM and (optionally) `public_comment_reply` as a public reply.
|
|
3225
|
+
*/
|
|
3226
|
+
get: {
|
|
3227
|
+
parameters: {
|
|
3228
|
+
query: {
|
|
3229
|
+
connection_id: string;
|
|
3230
|
+
};
|
|
3231
|
+
header?: never;
|
|
3232
|
+
path?: never;
|
|
3233
|
+
cookie?: never;
|
|
3234
|
+
};
|
|
3235
|
+
requestBody?: never;
|
|
3236
|
+
responses: {
|
|
3237
|
+
/** @description Triggers list */
|
|
3238
|
+
200: {
|
|
3239
|
+
headers: {
|
|
3240
|
+
[name: string]: unknown;
|
|
3241
|
+
};
|
|
3242
|
+
content: {
|
|
3243
|
+
"application/json": {
|
|
3244
|
+
data: {
|
|
3245
|
+
/** Format: uuid */
|
|
3246
|
+
id: string;
|
|
3247
|
+
/** Format: uuid */
|
|
3248
|
+
connection_id: string;
|
|
3249
|
+
keyword: string;
|
|
3250
|
+
/** @enum {string} */
|
|
3251
|
+
keyword_match_mode: "contains" | "exact" | "regex";
|
|
3252
|
+
case_sensitive: boolean;
|
|
3253
|
+
post_id_allowlist: string[] | null;
|
|
3254
|
+
opening_message: string;
|
|
3255
|
+
public_comment_reply: string | null;
|
|
3256
|
+
agent_context_hint: string | null;
|
|
3257
|
+
enabled: boolean;
|
|
3258
|
+
trigger_count: number;
|
|
3259
|
+
last_triggered_at: string | null;
|
|
3260
|
+
created_at: string;
|
|
3261
|
+
updated_at: string;
|
|
3262
|
+
}[];
|
|
3263
|
+
meta: components["schemas"]["Meta"];
|
|
3264
|
+
};
|
|
3265
|
+
};
|
|
3266
|
+
};
|
|
3267
|
+
};
|
|
3268
|
+
};
|
|
3269
|
+
put?: never;
|
|
3270
|
+
/**
|
|
3271
|
+
* Create a comment-to-DM trigger
|
|
3272
|
+
* @description Inserts a new trigger row. Each (ig_account, keyword) is unique — duplicates 409.
|
|
3273
|
+
*/
|
|
3274
|
+
post: {
|
|
3275
|
+
parameters: {
|
|
3276
|
+
query?: never;
|
|
3277
|
+
header?: never;
|
|
3278
|
+
path?: never;
|
|
3279
|
+
cookie?: never;
|
|
3280
|
+
};
|
|
3281
|
+
requestBody?: {
|
|
3282
|
+
content: {
|
|
3283
|
+
"application/json": {
|
|
3284
|
+
/** Format: uuid */
|
|
3285
|
+
connection_id: string;
|
|
3286
|
+
keyword: string;
|
|
3287
|
+
/**
|
|
3288
|
+
* @default contains
|
|
3289
|
+
* @enum {string}
|
|
3290
|
+
*/
|
|
3291
|
+
keyword_match_mode?: "contains" | "exact" | "regex";
|
|
3292
|
+
/** @default false */
|
|
3293
|
+
case_sensitive?: boolean;
|
|
3294
|
+
post_id_allowlist?: string[] | null;
|
|
3295
|
+
opening_message: string;
|
|
3296
|
+
public_comment_reply?: string | null;
|
|
3297
|
+
agent_context_hint?: string | null;
|
|
3298
|
+
/** @default true */
|
|
3299
|
+
enabled?: boolean;
|
|
3300
|
+
};
|
|
3301
|
+
};
|
|
3302
|
+
};
|
|
3303
|
+
responses: {
|
|
3304
|
+
/** @description Trigger created */
|
|
3305
|
+
201: {
|
|
3306
|
+
headers: {
|
|
3307
|
+
[name: string]: unknown;
|
|
3308
|
+
};
|
|
3309
|
+
content: {
|
|
3310
|
+
"application/json": {
|
|
3311
|
+
data: {
|
|
3312
|
+
/** Format: uuid */
|
|
3313
|
+
id: string;
|
|
3314
|
+
/** Format: uuid */
|
|
3315
|
+
connection_id: string;
|
|
3316
|
+
keyword: string;
|
|
3317
|
+
/** @enum {string} */
|
|
3318
|
+
keyword_match_mode: "contains" | "exact" | "regex";
|
|
3319
|
+
case_sensitive: boolean;
|
|
3320
|
+
post_id_allowlist: string[] | null;
|
|
3321
|
+
opening_message: string;
|
|
3322
|
+
public_comment_reply: string | null;
|
|
3323
|
+
agent_context_hint: string | null;
|
|
3324
|
+
enabled: boolean;
|
|
3325
|
+
trigger_count: number;
|
|
3326
|
+
last_triggered_at: string | null;
|
|
3327
|
+
created_at: string;
|
|
3328
|
+
updated_at: string;
|
|
3329
|
+
};
|
|
3330
|
+
meta: components["schemas"]["Meta"];
|
|
3331
|
+
};
|
|
3332
|
+
};
|
|
3333
|
+
};
|
|
3334
|
+
/** @description A trigger with this keyword already exists */
|
|
3335
|
+
409: {
|
|
3336
|
+
headers: {
|
|
3337
|
+
[name: string]: unknown;
|
|
3338
|
+
};
|
|
3339
|
+
content: {
|
|
3340
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3341
|
+
};
|
|
3342
|
+
};
|
|
3343
|
+
/** @description Validation error */
|
|
3344
|
+
422: {
|
|
3345
|
+
headers: {
|
|
3346
|
+
[name: string]: unknown;
|
|
3347
|
+
};
|
|
3348
|
+
content: {
|
|
3349
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3350
|
+
};
|
|
3351
|
+
};
|
|
3352
|
+
};
|
|
3353
|
+
};
|
|
3354
|
+
delete?: never;
|
|
3355
|
+
options?: never;
|
|
3356
|
+
head?: never;
|
|
3357
|
+
patch?: never;
|
|
3358
|
+
trace?: never;
|
|
3359
|
+
};
|
|
3360
|
+
"/api/v1/instagram/triggers/{id}": {
|
|
3361
|
+
parameters: {
|
|
3362
|
+
query?: never;
|
|
3363
|
+
header?: never;
|
|
3364
|
+
path?: never;
|
|
3365
|
+
cookie?: never;
|
|
3366
|
+
};
|
|
3367
|
+
get?: never;
|
|
3368
|
+
put?: never;
|
|
3369
|
+
post?: never;
|
|
3370
|
+
/**
|
|
3371
|
+
* Delete a comment-to-DM trigger
|
|
3372
|
+
* @description Hard-deletes the trigger row. Existing claim ledger rows expire naturally.
|
|
3373
|
+
*/
|
|
3374
|
+
delete: {
|
|
3375
|
+
parameters: {
|
|
3376
|
+
query?: never;
|
|
3377
|
+
header?: never;
|
|
3378
|
+
path: {
|
|
3379
|
+
id: string;
|
|
3380
|
+
};
|
|
3381
|
+
cookie?: never;
|
|
3382
|
+
};
|
|
3383
|
+
requestBody?: never;
|
|
3384
|
+
responses: {
|
|
3385
|
+
/** @description Trigger deleted */
|
|
3386
|
+
204: {
|
|
3387
|
+
headers: {
|
|
3388
|
+
[name: string]: unknown;
|
|
3389
|
+
};
|
|
3390
|
+
content?: never;
|
|
3391
|
+
};
|
|
3392
|
+
/** @description Trigger not found */
|
|
3393
|
+
404: {
|
|
3394
|
+
headers: {
|
|
3395
|
+
[name: string]: unknown;
|
|
3396
|
+
};
|
|
3397
|
+
content: {
|
|
3398
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3399
|
+
};
|
|
3400
|
+
};
|
|
3401
|
+
};
|
|
3402
|
+
};
|
|
3403
|
+
options?: never;
|
|
3404
|
+
head?: never;
|
|
3405
|
+
/**
|
|
3406
|
+
* Update a comment-to-DM trigger
|
|
3407
|
+
* @description Partial update. Any field from the create body is acceptable.
|
|
3408
|
+
*/
|
|
3409
|
+
patch: {
|
|
3410
|
+
parameters: {
|
|
3411
|
+
query?: never;
|
|
3412
|
+
header?: never;
|
|
3413
|
+
path: {
|
|
3414
|
+
id: string;
|
|
3415
|
+
};
|
|
3416
|
+
cookie?: never;
|
|
3417
|
+
};
|
|
3418
|
+
requestBody?: {
|
|
3419
|
+
content: {
|
|
3420
|
+
"application/json": {
|
|
3421
|
+
keyword?: string;
|
|
3422
|
+
/**
|
|
3423
|
+
* @default contains
|
|
3424
|
+
* @enum {string}
|
|
3425
|
+
*/
|
|
3426
|
+
keyword_match_mode?: "contains" | "exact" | "regex";
|
|
3427
|
+
/** @default false */
|
|
3428
|
+
case_sensitive?: boolean;
|
|
3429
|
+
post_id_allowlist?: string[] | null;
|
|
3430
|
+
opening_message?: string;
|
|
3431
|
+
public_comment_reply?: string | null;
|
|
3432
|
+
agent_context_hint?: string | null;
|
|
3433
|
+
/** @default true */
|
|
3434
|
+
enabled?: boolean;
|
|
3435
|
+
};
|
|
3436
|
+
};
|
|
3437
|
+
};
|
|
3438
|
+
responses: {
|
|
3439
|
+
/** @description Trigger updated */
|
|
3440
|
+
200: {
|
|
3441
|
+
headers: {
|
|
3442
|
+
[name: string]: unknown;
|
|
3443
|
+
};
|
|
3444
|
+
content: {
|
|
3445
|
+
"application/json": {
|
|
3446
|
+
data: {
|
|
3447
|
+
/** Format: uuid */
|
|
3448
|
+
id: string;
|
|
3449
|
+
/** Format: uuid */
|
|
3450
|
+
connection_id: string;
|
|
3451
|
+
keyword: string;
|
|
3452
|
+
/** @enum {string} */
|
|
3453
|
+
keyword_match_mode: "contains" | "exact" | "regex";
|
|
3454
|
+
case_sensitive: boolean;
|
|
3455
|
+
post_id_allowlist: string[] | null;
|
|
3456
|
+
opening_message: string;
|
|
3457
|
+
public_comment_reply: string | null;
|
|
3458
|
+
agent_context_hint: string | null;
|
|
3459
|
+
enabled: boolean;
|
|
3460
|
+
trigger_count: number;
|
|
3461
|
+
last_triggered_at: string | null;
|
|
3462
|
+
created_at: string;
|
|
3463
|
+
updated_at: string;
|
|
3464
|
+
};
|
|
3465
|
+
meta: components["schemas"]["Meta"];
|
|
3466
|
+
};
|
|
3467
|
+
};
|
|
3468
|
+
};
|
|
3469
|
+
/** @description Trigger not found */
|
|
3470
|
+
404: {
|
|
3471
|
+
headers: {
|
|
3472
|
+
[name: string]: unknown;
|
|
3473
|
+
};
|
|
3474
|
+
content: {
|
|
3475
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3476
|
+
};
|
|
3477
|
+
};
|
|
3478
|
+
};
|
|
3479
|
+
};
|
|
3480
|
+
trace?: never;
|
|
3481
|
+
};
|
|
3482
|
+
"/api/v1/instagram/triggers/{id}/test-dm": {
|
|
3483
|
+
parameters: {
|
|
3484
|
+
query?: never;
|
|
3485
|
+
header?: never;
|
|
3486
|
+
path?: never;
|
|
3487
|
+
cookie?: never;
|
|
3488
|
+
};
|
|
3489
|
+
get?: never;
|
|
3490
|
+
put?: never;
|
|
3491
|
+
/**
|
|
3492
|
+
* Send the trigger's opening_message as a DM to a test IGSID
|
|
3493
|
+
* @description Uses the HUMAN_AGENT message tag — recipient must have DMed the IG account within the past 7 days, otherwise Meta rejects the send. Intended for QA without polluting the comment trigger's `trigger_count`.
|
|
3494
|
+
*/
|
|
3495
|
+
post: {
|
|
3496
|
+
parameters: {
|
|
3497
|
+
query?: never;
|
|
3498
|
+
header?: never;
|
|
3499
|
+
path: {
|
|
3500
|
+
id: string;
|
|
3501
|
+
};
|
|
3502
|
+
cookie?: never;
|
|
3503
|
+
};
|
|
3504
|
+
requestBody?: {
|
|
3505
|
+
content: {
|
|
3506
|
+
"application/json": {
|
|
3507
|
+
recipient_igsid: string;
|
|
3508
|
+
};
|
|
3509
|
+
};
|
|
3510
|
+
};
|
|
3511
|
+
responses: {
|
|
3512
|
+
/** @description Test DM sent */
|
|
3513
|
+
200: {
|
|
3514
|
+
headers: {
|
|
3515
|
+
[name: string]: unknown;
|
|
3516
|
+
};
|
|
3517
|
+
content: {
|
|
3518
|
+
"application/json": {
|
|
3519
|
+
data: {
|
|
3520
|
+
provider_message_id: string;
|
|
3521
|
+
};
|
|
3522
|
+
meta: components["schemas"]["Meta"];
|
|
3523
|
+
};
|
|
3524
|
+
};
|
|
3525
|
+
};
|
|
3526
|
+
/** @description Trigger not found */
|
|
3527
|
+
404: {
|
|
3528
|
+
headers: {
|
|
3529
|
+
[name: string]: unknown;
|
|
3530
|
+
};
|
|
3531
|
+
content: {
|
|
3532
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3533
|
+
};
|
|
3534
|
+
};
|
|
3535
|
+
/** @description Meta rejected the send (recipient outside 7-day window) */
|
|
3536
|
+
502: {
|
|
3537
|
+
headers: {
|
|
3538
|
+
[name: string]: unknown;
|
|
3539
|
+
};
|
|
3540
|
+
content: {
|
|
3541
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3542
|
+
};
|
|
3543
|
+
};
|
|
3544
|
+
};
|
|
3545
|
+
};
|
|
3546
|
+
delete?: never;
|
|
3547
|
+
options?: never;
|
|
3548
|
+
head?: never;
|
|
3549
|
+
patch?: never;
|
|
3550
|
+
trace?: never;
|
|
3551
|
+
};
|
|
3552
|
+
"/api/v1/instagram/triggers/resume": {
|
|
3553
|
+
parameters: {
|
|
3554
|
+
query?: never;
|
|
3555
|
+
header?: never;
|
|
3556
|
+
path?: never;
|
|
3557
|
+
cookie?: never;
|
|
3558
|
+
};
|
|
3559
|
+
get?: never;
|
|
3560
|
+
put?: never;
|
|
3561
|
+
/**
|
|
3562
|
+
* Manually clear a tripped comment-to-DM circuit
|
|
3563
|
+
* @description Clears the per-account `comment_to_dm_paused_until` and the Redis tripped flag, re-enabling trigger fires. The breaker normally clears itself once spam-pattern signals subside; this endpoint exists for ops intervention.
|
|
3564
|
+
*/
|
|
3565
|
+
post: {
|
|
3566
|
+
parameters: {
|
|
3567
|
+
query?: never;
|
|
3568
|
+
header?: never;
|
|
3569
|
+
path?: never;
|
|
3570
|
+
cookie?: never;
|
|
3571
|
+
};
|
|
3572
|
+
requestBody?: {
|
|
3573
|
+
content: {
|
|
3574
|
+
"application/json": {
|
|
3575
|
+
/** Format: uuid */
|
|
3576
|
+
connection_id: string;
|
|
3577
|
+
};
|
|
3578
|
+
};
|
|
3579
|
+
};
|
|
3580
|
+
responses: {
|
|
3581
|
+
/** @description Circuit cleared */
|
|
3582
|
+
200: {
|
|
3583
|
+
headers: {
|
|
3584
|
+
[name: string]: unknown;
|
|
3585
|
+
};
|
|
3586
|
+
content: {
|
|
3587
|
+
"application/json": {
|
|
3588
|
+
data: {
|
|
3589
|
+
resumed: boolean;
|
|
3590
|
+
};
|
|
3591
|
+
meta: components["schemas"]["Meta"];
|
|
3592
|
+
};
|
|
3593
|
+
};
|
|
3594
|
+
};
|
|
3595
|
+
};
|
|
3596
|
+
};
|
|
3597
|
+
delete?: never;
|
|
3598
|
+
options?: never;
|
|
3599
|
+
head?: never;
|
|
3600
|
+
patch?: never;
|
|
3601
|
+
trace?: never;
|
|
3602
|
+
};
|
|
2460
3603
|
"/api/v1/webhooks/subscriptions": {
|
|
2461
3604
|
parameters: {
|
|
2462
3605
|
query?: never;
|