@vitrina/api 14.22.0 → 14.24.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/dist/index.d.cts +470 -0
- package/dist/index.d.ts +470 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -174606,6 +174606,476 @@ interface paths {
|
|
|
174606
174606
|
patch?: never;
|
|
174607
174607
|
trace?: never;
|
|
174608
174608
|
};
|
|
174609
|
+
"/whatsapp-templates/readiness": {
|
|
174610
|
+
parameters: {
|
|
174611
|
+
query?: never;
|
|
174612
|
+
header?: never;
|
|
174613
|
+
path?: never;
|
|
174614
|
+
cookie?: never;
|
|
174615
|
+
};
|
|
174616
|
+
/**
|
|
174617
|
+
* Are the workspace’s WhatsApp templates ready?
|
|
174618
|
+
* @description Per ENABLED feature (first touch, and each feature as it joins the pack registry) and per connected number: the templates it needs, with counts of `required`, `approved`, `pending`, `rejected`, `missing` and `blocked` (paused or disabled by Meta), and the rejection reason where there is one. A feature that is off answers `status: "not_needed"` with a `reason` and is left out of the totals. Reads only: nothing is sent to Meta. `ready` is true when every required template is approved. Use `POST /whatsapp-templates/readiness/retry` to resubmit.
|
|
174619
|
+
*/
|
|
174620
|
+
get: {
|
|
174621
|
+
parameters: {
|
|
174622
|
+
query?: {
|
|
174623
|
+
/** @description A feature pack id from the readiness answer, e.g. `first_touch`. */
|
|
174624
|
+
pack?: string;
|
|
174625
|
+
/** @description Only this WhatsApp number. */
|
|
174626
|
+
messaging_account_id?: string;
|
|
174627
|
+
};
|
|
174628
|
+
header?: never;
|
|
174629
|
+
path?: never;
|
|
174630
|
+
cookie?: never;
|
|
174631
|
+
};
|
|
174632
|
+
requestBody?: never;
|
|
174633
|
+
responses: {
|
|
174634
|
+
/** @description The readiness report */
|
|
174635
|
+
200: {
|
|
174636
|
+
headers: {
|
|
174637
|
+
[name: string]: unknown;
|
|
174638
|
+
};
|
|
174639
|
+
content: {
|
|
174640
|
+
/**
|
|
174641
|
+
* @example {
|
|
174642
|
+
* "data": {
|
|
174643
|
+
* "ready": false,
|
|
174644
|
+
* "counts": {
|
|
174645
|
+
* "required": 2,
|
|
174646
|
+
* "approved": 1,
|
|
174647
|
+
* "pending": 0,
|
|
174648
|
+
* "rejected": 1,
|
|
174649
|
+
* "missing": 0,
|
|
174650
|
+
* "blocked": 0
|
|
174651
|
+
* },
|
|
174652
|
+
* "packs": [
|
|
174653
|
+
* {
|
|
174654
|
+
* "pack": "first_touch",
|
|
174655
|
+
* "feature": "First reply to a new customer",
|
|
174656
|
+
* "audience": "customer",
|
|
174657
|
+
* "status": "enabled",
|
|
174658
|
+
* "reason": null,
|
|
174659
|
+
* "ready": false,
|
|
174660
|
+
* "counts": {
|
|
174661
|
+
* "required": 2,
|
|
174662
|
+
* "approved": 1,
|
|
174663
|
+
* "pending": 0,
|
|
174664
|
+
* "rejected": 1,
|
|
174665
|
+
* "missing": 0,
|
|
174666
|
+
* "blocked": 0
|
|
174667
|
+
* },
|
|
174668
|
+
* "numbers": [
|
|
174669
|
+
* {
|
|
174670
|
+
* "messaging_account_id": "0199a3c2-7b10-7000-8000-0000000000a1",
|
|
174671
|
+
* "counts": {
|
|
174672
|
+
* "required": 2,
|
|
174673
|
+
* "approved": 1,
|
|
174674
|
+
* "pending": 0,
|
|
174675
|
+
* "rejected": 1,
|
|
174676
|
+
* "missing": 0,
|
|
174677
|
+
* "blocked": 0
|
|
174678
|
+
* },
|
|
174679
|
+
* "templates": [
|
|
174680
|
+
* {
|
|
174681
|
+
* "entry": "website_named",
|
|
174682
|
+
* "name": "first_touch_website_named",
|
|
174683
|
+
* "language": "es",
|
|
174684
|
+
* "state": "approved",
|
|
174685
|
+
* "status": "APPROVED",
|
|
174686
|
+
* "rejection_reason": null,
|
|
174687
|
+
* "error": null
|
|
174688
|
+
* },
|
|
174689
|
+
* {
|
|
174690
|
+
* "entry": "portal_named",
|
|
174691
|
+
* "name": "first_touch_portal_named",
|
|
174692
|
+
* "language": "es",
|
|
174693
|
+
* "state": "rejected",
|
|
174694
|
+
* "status": "REJECTED",
|
|
174695
|
+
* "rejection_reason": "INVALID_FORMAT",
|
|
174696
|
+
* "error": null
|
|
174697
|
+
* }
|
|
174698
|
+
* ]
|
|
174699
|
+
* }
|
|
174700
|
+
* ]
|
|
174701
|
+
* }
|
|
174702
|
+
* ]
|
|
174703
|
+
* }
|
|
174704
|
+
* }
|
|
174705
|
+
*/
|
|
174706
|
+
"application/json": {
|
|
174707
|
+
data: {
|
|
174708
|
+
ready: boolean;
|
|
174709
|
+
counts: {
|
|
174710
|
+
required: number;
|
|
174711
|
+
approved: number;
|
|
174712
|
+
pending: number;
|
|
174713
|
+
rejected: number;
|
|
174714
|
+
missing: number;
|
|
174715
|
+
blocked: number;
|
|
174716
|
+
};
|
|
174717
|
+
packs: {
|
|
174718
|
+
/** @description A feature pack id from the readiness answer, e.g. `first_touch`. */
|
|
174719
|
+
pack: string;
|
|
174720
|
+
feature: string;
|
|
174721
|
+
/** @enum {string} */
|
|
174722
|
+
audience: "customer" | "staff";
|
|
174723
|
+
/** @enum {string} */
|
|
174724
|
+
status: "enabled" | "not_needed" | "unavailable";
|
|
174725
|
+
reason: string | null;
|
|
174726
|
+
ready: boolean;
|
|
174727
|
+
counts: {
|
|
174728
|
+
required: number;
|
|
174729
|
+
approved: number;
|
|
174730
|
+
pending: number;
|
|
174731
|
+
rejected: number;
|
|
174732
|
+
missing: number;
|
|
174733
|
+
blocked: number;
|
|
174734
|
+
};
|
|
174735
|
+
numbers: {
|
|
174736
|
+
/** Format: uuid */
|
|
174737
|
+
messaging_account_id: string;
|
|
174738
|
+
counts: {
|
|
174739
|
+
required: number;
|
|
174740
|
+
approved: number;
|
|
174741
|
+
pending: number;
|
|
174742
|
+
rejected: number;
|
|
174743
|
+
missing: number;
|
|
174744
|
+
blocked: number;
|
|
174745
|
+
};
|
|
174746
|
+
templates: {
|
|
174747
|
+
entry: string;
|
|
174748
|
+
name: string;
|
|
174749
|
+
language: string;
|
|
174750
|
+
/** @enum {string} */
|
|
174751
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
174752
|
+
/** @enum {string|null} */
|
|
174753
|
+
status: "PENDING" | "APPROVED" | "REJECTED" | "IN_APPEAL" | "PAUSED" | "DISABLED" | null;
|
|
174754
|
+
rejection_reason: string | null;
|
|
174755
|
+
error: string | null;
|
|
174756
|
+
}[];
|
|
174757
|
+
}[];
|
|
174758
|
+
}[];
|
|
174759
|
+
};
|
|
174760
|
+
meta?: {
|
|
174761
|
+
[key: string]: unknown;
|
|
174762
|
+
};
|
|
174763
|
+
};
|
|
174764
|
+
};
|
|
174765
|
+
};
|
|
174766
|
+
/** @description Validation error */
|
|
174767
|
+
400: {
|
|
174768
|
+
headers: {
|
|
174769
|
+
[name: string]: unknown;
|
|
174770
|
+
};
|
|
174771
|
+
content: {
|
|
174772
|
+
"application/json": components["schemas"]["Error"];
|
|
174773
|
+
};
|
|
174774
|
+
};
|
|
174775
|
+
/** @description Unauthorized */
|
|
174776
|
+
401: {
|
|
174777
|
+
headers: {
|
|
174778
|
+
[name: string]: unknown;
|
|
174779
|
+
};
|
|
174780
|
+
content: {
|
|
174781
|
+
"application/json": components["schemas"]["Error"];
|
|
174782
|
+
};
|
|
174783
|
+
};
|
|
174784
|
+
/** @description Forbidden */
|
|
174785
|
+
403: {
|
|
174786
|
+
headers: {
|
|
174787
|
+
[name: string]: unknown;
|
|
174788
|
+
};
|
|
174789
|
+
content: {
|
|
174790
|
+
"application/json": components["schemas"]["Error"];
|
|
174791
|
+
};
|
|
174792
|
+
};
|
|
174793
|
+
/** @description Not found */
|
|
174794
|
+
404: {
|
|
174795
|
+
headers: {
|
|
174796
|
+
[name: string]: unknown;
|
|
174797
|
+
};
|
|
174798
|
+
content: {
|
|
174799
|
+
"application/json": components["schemas"]["Error"];
|
|
174800
|
+
};
|
|
174801
|
+
};
|
|
174802
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
174803
|
+
409: {
|
|
174804
|
+
headers: {
|
|
174805
|
+
[name: string]: unknown;
|
|
174806
|
+
};
|
|
174807
|
+
content: {
|
|
174808
|
+
"application/json": components["schemas"]["Error"];
|
|
174809
|
+
};
|
|
174810
|
+
};
|
|
174811
|
+
/** @description Rate limited */
|
|
174812
|
+
429: {
|
|
174813
|
+
headers: {
|
|
174814
|
+
[name: string]: unknown;
|
|
174815
|
+
};
|
|
174816
|
+
content: {
|
|
174817
|
+
"application/json": components["schemas"]["Error"];
|
|
174818
|
+
};
|
|
174819
|
+
};
|
|
174820
|
+
};
|
|
174821
|
+
};
|
|
174822
|
+
put?: never;
|
|
174823
|
+
post?: never;
|
|
174824
|
+
delete?: never;
|
|
174825
|
+
options?: never;
|
|
174826
|
+
head?: never;
|
|
174827
|
+
patch?: never;
|
|
174828
|
+
trace?: never;
|
|
174829
|
+
};
|
|
174830
|
+
"/whatsapp-templates/readiness/retry": {
|
|
174831
|
+
parameters: {
|
|
174832
|
+
query?: never;
|
|
174833
|
+
header?: never;
|
|
174834
|
+
path?: never;
|
|
174835
|
+
cookie?: never;
|
|
174836
|
+
};
|
|
174837
|
+
get?: never;
|
|
174838
|
+
put?: never;
|
|
174839
|
+
/**
|
|
174840
|
+
* Resubmit missing or rejected feature templates
|
|
174841
|
+
* @description Resubmits through the template pack: a MISSING template is submitted as is; a REJECTED one goes to Meta under a new versioned name (`<name>_r2`, `_r3`, …) because Meta refuses to reuse a rejected name. Approved and pending templates are left alone. Answers what was done per template plus the pack’s readiness afterwards (submitted ones are `pending` until Meta decides).
|
|
174842
|
+
*/
|
|
174843
|
+
post: {
|
|
174844
|
+
parameters: {
|
|
174845
|
+
query?: never;
|
|
174846
|
+
header?: {
|
|
174847
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
174848
|
+
"Idempotency-Key"?: string;
|
|
174849
|
+
};
|
|
174850
|
+
path?: never;
|
|
174851
|
+
cookie?: never;
|
|
174852
|
+
};
|
|
174853
|
+
requestBody?: {
|
|
174854
|
+
content: {
|
|
174855
|
+
/**
|
|
174856
|
+
* @example {
|
|
174857
|
+
* "pack": "first_touch"
|
|
174858
|
+
* }
|
|
174859
|
+
*/
|
|
174860
|
+
"application/json": {
|
|
174861
|
+
/** @description A feature pack id from the readiness answer, e.g. `first_touch`. */
|
|
174862
|
+
pack: string;
|
|
174863
|
+
/** @description One template of the pack (its `entry` key from the readiness answer). Omit to retry every missing or rejected template of the pack. */
|
|
174864
|
+
entry?: string;
|
|
174865
|
+
/**
|
|
174866
|
+
* Format: uuid
|
|
174867
|
+
* @description Only this WhatsApp number. Omit for every number.
|
|
174868
|
+
*/
|
|
174869
|
+
messaging_account_id?: string;
|
|
174870
|
+
};
|
|
174871
|
+
};
|
|
174872
|
+
};
|
|
174873
|
+
responses: {
|
|
174874
|
+
/** @description What was resubmitted */
|
|
174875
|
+
200: {
|
|
174876
|
+
headers: {
|
|
174877
|
+
[name: string]: unknown;
|
|
174878
|
+
};
|
|
174879
|
+
content: {
|
|
174880
|
+
/**
|
|
174881
|
+
* @example {
|
|
174882
|
+
* "data": {
|
|
174883
|
+
* "results": [
|
|
174884
|
+
* {
|
|
174885
|
+
* "pack": "first_touch",
|
|
174886
|
+
* "entry": "portal_named",
|
|
174887
|
+
* "messaging_account_id": "0199a3c2-7b10-7000-8000-0000000000a1",
|
|
174888
|
+
* "name": "first_touch_portal_named_r2",
|
|
174889
|
+
* "language": "es",
|
|
174890
|
+
* "action": "submitted",
|
|
174891
|
+
* "state": "pending",
|
|
174892
|
+
* "status": "PENDING",
|
|
174893
|
+
* "rejection_reason": null,
|
|
174894
|
+
* "error": null
|
|
174895
|
+
* }
|
|
174896
|
+
* ],
|
|
174897
|
+
* "readiness": {
|
|
174898
|
+
* "pack": "first_touch",
|
|
174899
|
+
* "feature": "First reply to a new customer",
|
|
174900
|
+
* "audience": "customer",
|
|
174901
|
+
* "status": "enabled",
|
|
174902
|
+
* "reason": null,
|
|
174903
|
+
* "ready": false,
|
|
174904
|
+
* "counts": {
|
|
174905
|
+
* "required": 2,
|
|
174906
|
+
* "approved": 1,
|
|
174907
|
+
* "pending": 0,
|
|
174908
|
+
* "rejected": 1,
|
|
174909
|
+
* "missing": 0,
|
|
174910
|
+
* "blocked": 0
|
|
174911
|
+
* },
|
|
174912
|
+
* "numbers": [
|
|
174913
|
+
* {
|
|
174914
|
+
* "messaging_account_id": "0199a3c2-7b10-7000-8000-0000000000a1",
|
|
174915
|
+
* "counts": {
|
|
174916
|
+
* "required": 2,
|
|
174917
|
+
* "approved": 1,
|
|
174918
|
+
* "pending": 0,
|
|
174919
|
+
* "rejected": 1,
|
|
174920
|
+
* "missing": 0,
|
|
174921
|
+
* "blocked": 0
|
|
174922
|
+
* },
|
|
174923
|
+
* "templates": [
|
|
174924
|
+
* {
|
|
174925
|
+
* "entry": "website_named",
|
|
174926
|
+
* "name": "first_touch_website_named",
|
|
174927
|
+
* "language": "es",
|
|
174928
|
+
* "state": "approved",
|
|
174929
|
+
* "status": "APPROVED",
|
|
174930
|
+
* "rejection_reason": null,
|
|
174931
|
+
* "error": null
|
|
174932
|
+
* },
|
|
174933
|
+
* {
|
|
174934
|
+
* "entry": "portal_named",
|
|
174935
|
+
* "name": "first_touch_portal_named",
|
|
174936
|
+
* "language": "es",
|
|
174937
|
+
* "state": "rejected",
|
|
174938
|
+
* "status": "REJECTED",
|
|
174939
|
+
* "rejection_reason": "INVALID_FORMAT",
|
|
174940
|
+
* "error": null
|
|
174941
|
+
* }
|
|
174942
|
+
* ]
|
|
174943
|
+
* }
|
|
174944
|
+
* ]
|
|
174945
|
+
* }
|
|
174946
|
+
* }
|
|
174947
|
+
* }
|
|
174948
|
+
*/
|
|
174949
|
+
"application/json": {
|
|
174950
|
+
data: {
|
|
174951
|
+
results: {
|
|
174952
|
+
entry: string;
|
|
174953
|
+
name: string;
|
|
174954
|
+
language: string;
|
|
174955
|
+
/** @enum {string} */
|
|
174956
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
174957
|
+
/** @enum {string|null} */
|
|
174958
|
+
status: "PENDING" | "APPROVED" | "REJECTED" | "IN_APPEAL" | "PAUSED" | "DISABLED" | null;
|
|
174959
|
+
rejection_reason: string | null;
|
|
174960
|
+
error: string | null;
|
|
174961
|
+
/** @description A feature pack id from the readiness answer, e.g. `first_touch`. */
|
|
174962
|
+
pack: string;
|
|
174963
|
+
/** Format: uuid */
|
|
174964
|
+
messaging_account_id: string;
|
|
174965
|
+
/** @enum {string} */
|
|
174966
|
+
action: "submitted" | "exists" | "failed" | "would_submit";
|
|
174967
|
+
}[];
|
|
174968
|
+
readiness: {
|
|
174969
|
+
/** @description A feature pack id from the readiness answer, e.g. `first_touch`. */
|
|
174970
|
+
pack: string;
|
|
174971
|
+
feature: string;
|
|
174972
|
+
/** @enum {string} */
|
|
174973
|
+
audience: "customer" | "staff";
|
|
174974
|
+
/** @enum {string} */
|
|
174975
|
+
status: "enabled" | "not_needed" | "unavailable";
|
|
174976
|
+
reason: string | null;
|
|
174977
|
+
ready: boolean;
|
|
174978
|
+
counts: {
|
|
174979
|
+
required: number;
|
|
174980
|
+
approved: number;
|
|
174981
|
+
pending: number;
|
|
174982
|
+
rejected: number;
|
|
174983
|
+
missing: number;
|
|
174984
|
+
blocked: number;
|
|
174985
|
+
};
|
|
174986
|
+
numbers: {
|
|
174987
|
+
/** Format: uuid */
|
|
174988
|
+
messaging_account_id: string;
|
|
174989
|
+
counts: {
|
|
174990
|
+
required: number;
|
|
174991
|
+
approved: number;
|
|
174992
|
+
pending: number;
|
|
174993
|
+
rejected: number;
|
|
174994
|
+
missing: number;
|
|
174995
|
+
blocked: number;
|
|
174996
|
+
};
|
|
174997
|
+
templates: {
|
|
174998
|
+
entry: string;
|
|
174999
|
+
name: string;
|
|
175000
|
+
language: string;
|
|
175001
|
+
/** @enum {string} */
|
|
175002
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
175003
|
+
/** @enum {string|null} */
|
|
175004
|
+
status: "PENDING" | "APPROVED" | "REJECTED" | "IN_APPEAL" | "PAUSED" | "DISABLED" | null;
|
|
175005
|
+
rejection_reason: string | null;
|
|
175006
|
+
error: string | null;
|
|
175007
|
+
}[];
|
|
175008
|
+
}[];
|
|
175009
|
+
};
|
|
175010
|
+
};
|
|
175011
|
+
meta?: {
|
|
175012
|
+
[key: string]: unknown;
|
|
175013
|
+
};
|
|
175014
|
+
};
|
|
175015
|
+
};
|
|
175016
|
+
};
|
|
175017
|
+
/** @description Validation error */
|
|
175018
|
+
400: {
|
|
175019
|
+
headers: {
|
|
175020
|
+
[name: string]: unknown;
|
|
175021
|
+
};
|
|
175022
|
+
content: {
|
|
175023
|
+
"application/json": components["schemas"]["Error"];
|
|
175024
|
+
};
|
|
175025
|
+
};
|
|
175026
|
+
/** @description Unauthorized */
|
|
175027
|
+
401: {
|
|
175028
|
+
headers: {
|
|
175029
|
+
[name: string]: unknown;
|
|
175030
|
+
};
|
|
175031
|
+
content: {
|
|
175032
|
+
"application/json": components["schemas"]["Error"];
|
|
175033
|
+
};
|
|
175034
|
+
};
|
|
175035
|
+
/** @description Forbidden */
|
|
175036
|
+
403: {
|
|
175037
|
+
headers: {
|
|
175038
|
+
[name: string]: unknown;
|
|
175039
|
+
};
|
|
175040
|
+
content: {
|
|
175041
|
+
"application/json": components["schemas"]["Error"];
|
|
175042
|
+
};
|
|
175043
|
+
};
|
|
175044
|
+
/** @description Not found */
|
|
175045
|
+
404: {
|
|
175046
|
+
headers: {
|
|
175047
|
+
[name: string]: unknown;
|
|
175048
|
+
};
|
|
175049
|
+
content: {
|
|
175050
|
+
"application/json": components["schemas"]["Error"];
|
|
175051
|
+
};
|
|
175052
|
+
};
|
|
175053
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
175054
|
+
409: {
|
|
175055
|
+
headers: {
|
|
175056
|
+
[name: string]: unknown;
|
|
175057
|
+
};
|
|
175058
|
+
content: {
|
|
175059
|
+
"application/json": components["schemas"]["Error"];
|
|
175060
|
+
};
|
|
175061
|
+
};
|
|
175062
|
+
/** @description Rate limited */
|
|
175063
|
+
429: {
|
|
175064
|
+
headers: {
|
|
175065
|
+
[name: string]: unknown;
|
|
175066
|
+
};
|
|
175067
|
+
content: {
|
|
175068
|
+
"application/json": components["schemas"]["Error"];
|
|
175069
|
+
};
|
|
175070
|
+
};
|
|
175071
|
+
};
|
|
175072
|
+
};
|
|
175073
|
+
delete?: never;
|
|
175074
|
+
options?: never;
|
|
175075
|
+
head?: never;
|
|
175076
|
+
patch?: never;
|
|
175077
|
+
trace?: never;
|
|
175078
|
+
};
|
|
174609
175079
|
"/whatsapp-templates/sync": {
|
|
174610
175080
|
parameters: {
|
|
174611
175081
|
query?: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -174606,6 +174606,476 @@ interface paths {
|
|
|
174606
174606
|
patch?: never;
|
|
174607
174607
|
trace?: never;
|
|
174608
174608
|
};
|
|
174609
|
+
"/whatsapp-templates/readiness": {
|
|
174610
|
+
parameters: {
|
|
174611
|
+
query?: never;
|
|
174612
|
+
header?: never;
|
|
174613
|
+
path?: never;
|
|
174614
|
+
cookie?: never;
|
|
174615
|
+
};
|
|
174616
|
+
/**
|
|
174617
|
+
* Are the workspace’s WhatsApp templates ready?
|
|
174618
|
+
* @description Per ENABLED feature (first touch, and each feature as it joins the pack registry) and per connected number: the templates it needs, with counts of `required`, `approved`, `pending`, `rejected`, `missing` and `blocked` (paused or disabled by Meta), and the rejection reason where there is one. A feature that is off answers `status: "not_needed"` with a `reason` and is left out of the totals. Reads only: nothing is sent to Meta. `ready` is true when every required template is approved. Use `POST /whatsapp-templates/readiness/retry` to resubmit.
|
|
174619
|
+
*/
|
|
174620
|
+
get: {
|
|
174621
|
+
parameters: {
|
|
174622
|
+
query?: {
|
|
174623
|
+
/** @description A feature pack id from the readiness answer, e.g. `first_touch`. */
|
|
174624
|
+
pack?: string;
|
|
174625
|
+
/** @description Only this WhatsApp number. */
|
|
174626
|
+
messaging_account_id?: string;
|
|
174627
|
+
};
|
|
174628
|
+
header?: never;
|
|
174629
|
+
path?: never;
|
|
174630
|
+
cookie?: never;
|
|
174631
|
+
};
|
|
174632
|
+
requestBody?: never;
|
|
174633
|
+
responses: {
|
|
174634
|
+
/** @description The readiness report */
|
|
174635
|
+
200: {
|
|
174636
|
+
headers: {
|
|
174637
|
+
[name: string]: unknown;
|
|
174638
|
+
};
|
|
174639
|
+
content: {
|
|
174640
|
+
/**
|
|
174641
|
+
* @example {
|
|
174642
|
+
* "data": {
|
|
174643
|
+
* "ready": false,
|
|
174644
|
+
* "counts": {
|
|
174645
|
+
* "required": 2,
|
|
174646
|
+
* "approved": 1,
|
|
174647
|
+
* "pending": 0,
|
|
174648
|
+
* "rejected": 1,
|
|
174649
|
+
* "missing": 0,
|
|
174650
|
+
* "blocked": 0
|
|
174651
|
+
* },
|
|
174652
|
+
* "packs": [
|
|
174653
|
+
* {
|
|
174654
|
+
* "pack": "first_touch",
|
|
174655
|
+
* "feature": "First reply to a new customer",
|
|
174656
|
+
* "audience": "customer",
|
|
174657
|
+
* "status": "enabled",
|
|
174658
|
+
* "reason": null,
|
|
174659
|
+
* "ready": false,
|
|
174660
|
+
* "counts": {
|
|
174661
|
+
* "required": 2,
|
|
174662
|
+
* "approved": 1,
|
|
174663
|
+
* "pending": 0,
|
|
174664
|
+
* "rejected": 1,
|
|
174665
|
+
* "missing": 0,
|
|
174666
|
+
* "blocked": 0
|
|
174667
|
+
* },
|
|
174668
|
+
* "numbers": [
|
|
174669
|
+
* {
|
|
174670
|
+
* "messaging_account_id": "0199a3c2-7b10-7000-8000-0000000000a1",
|
|
174671
|
+
* "counts": {
|
|
174672
|
+
* "required": 2,
|
|
174673
|
+
* "approved": 1,
|
|
174674
|
+
* "pending": 0,
|
|
174675
|
+
* "rejected": 1,
|
|
174676
|
+
* "missing": 0,
|
|
174677
|
+
* "blocked": 0
|
|
174678
|
+
* },
|
|
174679
|
+
* "templates": [
|
|
174680
|
+
* {
|
|
174681
|
+
* "entry": "website_named",
|
|
174682
|
+
* "name": "first_touch_website_named",
|
|
174683
|
+
* "language": "es",
|
|
174684
|
+
* "state": "approved",
|
|
174685
|
+
* "status": "APPROVED",
|
|
174686
|
+
* "rejection_reason": null,
|
|
174687
|
+
* "error": null
|
|
174688
|
+
* },
|
|
174689
|
+
* {
|
|
174690
|
+
* "entry": "portal_named",
|
|
174691
|
+
* "name": "first_touch_portal_named",
|
|
174692
|
+
* "language": "es",
|
|
174693
|
+
* "state": "rejected",
|
|
174694
|
+
* "status": "REJECTED",
|
|
174695
|
+
* "rejection_reason": "INVALID_FORMAT",
|
|
174696
|
+
* "error": null
|
|
174697
|
+
* }
|
|
174698
|
+
* ]
|
|
174699
|
+
* }
|
|
174700
|
+
* ]
|
|
174701
|
+
* }
|
|
174702
|
+
* ]
|
|
174703
|
+
* }
|
|
174704
|
+
* }
|
|
174705
|
+
*/
|
|
174706
|
+
"application/json": {
|
|
174707
|
+
data: {
|
|
174708
|
+
ready: boolean;
|
|
174709
|
+
counts: {
|
|
174710
|
+
required: number;
|
|
174711
|
+
approved: number;
|
|
174712
|
+
pending: number;
|
|
174713
|
+
rejected: number;
|
|
174714
|
+
missing: number;
|
|
174715
|
+
blocked: number;
|
|
174716
|
+
};
|
|
174717
|
+
packs: {
|
|
174718
|
+
/** @description A feature pack id from the readiness answer, e.g. `first_touch`. */
|
|
174719
|
+
pack: string;
|
|
174720
|
+
feature: string;
|
|
174721
|
+
/** @enum {string} */
|
|
174722
|
+
audience: "customer" | "staff";
|
|
174723
|
+
/** @enum {string} */
|
|
174724
|
+
status: "enabled" | "not_needed" | "unavailable";
|
|
174725
|
+
reason: string | null;
|
|
174726
|
+
ready: boolean;
|
|
174727
|
+
counts: {
|
|
174728
|
+
required: number;
|
|
174729
|
+
approved: number;
|
|
174730
|
+
pending: number;
|
|
174731
|
+
rejected: number;
|
|
174732
|
+
missing: number;
|
|
174733
|
+
blocked: number;
|
|
174734
|
+
};
|
|
174735
|
+
numbers: {
|
|
174736
|
+
/** Format: uuid */
|
|
174737
|
+
messaging_account_id: string;
|
|
174738
|
+
counts: {
|
|
174739
|
+
required: number;
|
|
174740
|
+
approved: number;
|
|
174741
|
+
pending: number;
|
|
174742
|
+
rejected: number;
|
|
174743
|
+
missing: number;
|
|
174744
|
+
blocked: number;
|
|
174745
|
+
};
|
|
174746
|
+
templates: {
|
|
174747
|
+
entry: string;
|
|
174748
|
+
name: string;
|
|
174749
|
+
language: string;
|
|
174750
|
+
/** @enum {string} */
|
|
174751
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
174752
|
+
/** @enum {string|null} */
|
|
174753
|
+
status: "PENDING" | "APPROVED" | "REJECTED" | "IN_APPEAL" | "PAUSED" | "DISABLED" | null;
|
|
174754
|
+
rejection_reason: string | null;
|
|
174755
|
+
error: string | null;
|
|
174756
|
+
}[];
|
|
174757
|
+
}[];
|
|
174758
|
+
}[];
|
|
174759
|
+
};
|
|
174760
|
+
meta?: {
|
|
174761
|
+
[key: string]: unknown;
|
|
174762
|
+
};
|
|
174763
|
+
};
|
|
174764
|
+
};
|
|
174765
|
+
};
|
|
174766
|
+
/** @description Validation error */
|
|
174767
|
+
400: {
|
|
174768
|
+
headers: {
|
|
174769
|
+
[name: string]: unknown;
|
|
174770
|
+
};
|
|
174771
|
+
content: {
|
|
174772
|
+
"application/json": components["schemas"]["Error"];
|
|
174773
|
+
};
|
|
174774
|
+
};
|
|
174775
|
+
/** @description Unauthorized */
|
|
174776
|
+
401: {
|
|
174777
|
+
headers: {
|
|
174778
|
+
[name: string]: unknown;
|
|
174779
|
+
};
|
|
174780
|
+
content: {
|
|
174781
|
+
"application/json": components["schemas"]["Error"];
|
|
174782
|
+
};
|
|
174783
|
+
};
|
|
174784
|
+
/** @description Forbidden */
|
|
174785
|
+
403: {
|
|
174786
|
+
headers: {
|
|
174787
|
+
[name: string]: unknown;
|
|
174788
|
+
};
|
|
174789
|
+
content: {
|
|
174790
|
+
"application/json": components["schemas"]["Error"];
|
|
174791
|
+
};
|
|
174792
|
+
};
|
|
174793
|
+
/** @description Not found */
|
|
174794
|
+
404: {
|
|
174795
|
+
headers: {
|
|
174796
|
+
[name: string]: unknown;
|
|
174797
|
+
};
|
|
174798
|
+
content: {
|
|
174799
|
+
"application/json": components["schemas"]["Error"];
|
|
174800
|
+
};
|
|
174801
|
+
};
|
|
174802
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
174803
|
+
409: {
|
|
174804
|
+
headers: {
|
|
174805
|
+
[name: string]: unknown;
|
|
174806
|
+
};
|
|
174807
|
+
content: {
|
|
174808
|
+
"application/json": components["schemas"]["Error"];
|
|
174809
|
+
};
|
|
174810
|
+
};
|
|
174811
|
+
/** @description Rate limited */
|
|
174812
|
+
429: {
|
|
174813
|
+
headers: {
|
|
174814
|
+
[name: string]: unknown;
|
|
174815
|
+
};
|
|
174816
|
+
content: {
|
|
174817
|
+
"application/json": components["schemas"]["Error"];
|
|
174818
|
+
};
|
|
174819
|
+
};
|
|
174820
|
+
};
|
|
174821
|
+
};
|
|
174822
|
+
put?: never;
|
|
174823
|
+
post?: never;
|
|
174824
|
+
delete?: never;
|
|
174825
|
+
options?: never;
|
|
174826
|
+
head?: never;
|
|
174827
|
+
patch?: never;
|
|
174828
|
+
trace?: never;
|
|
174829
|
+
};
|
|
174830
|
+
"/whatsapp-templates/readiness/retry": {
|
|
174831
|
+
parameters: {
|
|
174832
|
+
query?: never;
|
|
174833
|
+
header?: never;
|
|
174834
|
+
path?: never;
|
|
174835
|
+
cookie?: never;
|
|
174836
|
+
};
|
|
174837
|
+
get?: never;
|
|
174838
|
+
put?: never;
|
|
174839
|
+
/**
|
|
174840
|
+
* Resubmit missing or rejected feature templates
|
|
174841
|
+
* @description Resubmits through the template pack: a MISSING template is submitted as is; a REJECTED one goes to Meta under a new versioned name (`<name>_r2`, `_r3`, …) because Meta refuses to reuse a rejected name. Approved and pending templates are left alone. Answers what was done per template plus the pack’s readiness afterwards (submitted ones are `pending` until Meta decides).
|
|
174842
|
+
*/
|
|
174843
|
+
post: {
|
|
174844
|
+
parameters: {
|
|
174845
|
+
query?: never;
|
|
174846
|
+
header?: {
|
|
174847
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
174848
|
+
"Idempotency-Key"?: string;
|
|
174849
|
+
};
|
|
174850
|
+
path?: never;
|
|
174851
|
+
cookie?: never;
|
|
174852
|
+
};
|
|
174853
|
+
requestBody?: {
|
|
174854
|
+
content: {
|
|
174855
|
+
/**
|
|
174856
|
+
* @example {
|
|
174857
|
+
* "pack": "first_touch"
|
|
174858
|
+
* }
|
|
174859
|
+
*/
|
|
174860
|
+
"application/json": {
|
|
174861
|
+
/** @description A feature pack id from the readiness answer, e.g. `first_touch`. */
|
|
174862
|
+
pack: string;
|
|
174863
|
+
/** @description One template of the pack (its `entry` key from the readiness answer). Omit to retry every missing or rejected template of the pack. */
|
|
174864
|
+
entry?: string;
|
|
174865
|
+
/**
|
|
174866
|
+
* Format: uuid
|
|
174867
|
+
* @description Only this WhatsApp number. Omit for every number.
|
|
174868
|
+
*/
|
|
174869
|
+
messaging_account_id?: string;
|
|
174870
|
+
};
|
|
174871
|
+
};
|
|
174872
|
+
};
|
|
174873
|
+
responses: {
|
|
174874
|
+
/** @description What was resubmitted */
|
|
174875
|
+
200: {
|
|
174876
|
+
headers: {
|
|
174877
|
+
[name: string]: unknown;
|
|
174878
|
+
};
|
|
174879
|
+
content: {
|
|
174880
|
+
/**
|
|
174881
|
+
* @example {
|
|
174882
|
+
* "data": {
|
|
174883
|
+
* "results": [
|
|
174884
|
+
* {
|
|
174885
|
+
* "pack": "first_touch",
|
|
174886
|
+
* "entry": "portal_named",
|
|
174887
|
+
* "messaging_account_id": "0199a3c2-7b10-7000-8000-0000000000a1",
|
|
174888
|
+
* "name": "first_touch_portal_named_r2",
|
|
174889
|
+
* "language": "es",
|
|
174890
|
+
* "action": "submitted",
|
|
174891
|
+
* "state": "pending",
|
|
174892
|
+
* "status": "PENDING",
|
|
174893
|
+
* "rejection_reason": null,
|
|
174894
|
+
* "error": null
|
|
174895
|
+
* }
|
|
174896
|
+
* ],
|
|
174897
|
+
* "readiness": {
|
|
174898
|
+
* "pack": "first_touch",
|
|
174899
|
+
* "feature": "First reply to a new customer",
|
|
174900
|
+
* "audience": "customer",
|
|
174901
|
+
* "status": "enabled",
|
|
174902
|
+
* "reason": null,
|
|
174903
|
+
* "ready": false,
|
|
174904
|
+
* "counts": {
|
|
174905
|
+
* "required": 2,
|
|
174906
|
+
* "approved": 1,
|
|
174907
|
+
* "pending": 0,
|
|
174908
|
+
* "rejected": 1,
|
|
174909
|
+
* "missing": 0,
|
|
174910
|
+
* "blocked": 0
|
|
174911
|
+
* },
|
|
174912
|
+
* "numbers": [
|
|
174913
|
+
* {
|
|
174914
|
+
* "messaging_account_id": "0199a3c2-7b10-7000-8000-0000000000a1",
|
|
174915
|
+
* "counts": {
|
|
174916
|
+
* "required": 2,
|
|
174917
|
+
* "approved": 1,
|
|
174918
|
+
* "pending": 0,
|
|
174919
|
+
* "rejected": 1,
|
|
174920
|
+
* "missing": 0,
|
|
174921
|
+
* "blocked": 0
|
|
174922
|
+
* },
|
|
174923
|
+
* "templates": [
|
|
174924
|
+
* {
|
|
174925
|
+
* "entry": "website_named",
|
|
174926
|
+
* "name": "first_touch_website_named",
|
|
174927
|
+
* "language": "es",
|
|
174928
|
+
* "state": "approved",
|
|
174929
|
+
* "status": "APPROVED",
|
|
174930
|
+
* "rejection_reason": null,
|
|
174931
|
+
* "error": null
|
|
174932
|
+
* },
|
|
174933
|
+
* {
|
|
174934
|
+
* "entry": "portal_named",
|
|
174935
|
+
* "name": "first_touch_portal_named",
|
|
174936
|
+
* "language": "es",
|
|
174937
|
+
* "state": "rejected",
|
|
174938
|
+
* "status": "REJECTED",
|
|
174939
|
+
* "rejection_reason": "INVALID_FORMAT",
|
|
174940
|
+
* "error": null
|
|
174941
|
+
* }
|
|
174942
|
+
* ]
|
|
174943
|
+
* }
|
|
174944
|
+
* ]
|
|
174945
|
+
* }
|
|
174946
|
+
* }
|
|
174947
|
+
* }
|
|
174948
|
+
*/
|
|
174949
|
+
"application/json": {
|
|
174950
|
+
data: {
|
|
174951
|
+
results: {
|
|
174952
|
+
entry: string;
|
|
174953
|
+
name: string;
|
|
174954
|
+
language: string;
|
|
174955
|
+
/** @enum {string} */
|
|
174956
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
174957
|
+
/** @enum {string|null} */
|
|
174958
|
+
status: "PENDING" | "APPROVED" | "REJECTED" | "IN_APPEAL" | "PAUSED" | "DISABLED" | null;
|
|
174959
|
+
rejection_reason: string | null;
|
|
174960
|
+
error: string | null;
|
|
174961
|
+
/** @description A feature pack id from the readiness answer, e.g. `first_touch`. */
|
|
174962
|
+
pack: string;
|
|
174963
|
+
/** Format: uuid */
|
|
174964
|
+
messaging_account_id: string;
|
|
174965
|
+
/** @enum {string} */
|
|
174966
|
+
action: "submitted" | "exists" | "failed" | "would_submit";
|
|
174967
|
+
}[];
|
|
174968
|
+
readiness: {
|
|
174969
|
+
/** @description A feature pack id from the readiness answer, e.g. `first_touch`. */
|
|
174970
|
+
pack: string;
|
|
174971
|
+
feature: string;
|
|
174972
|
+
/** @enum {string} */
|
|
174973
|
+
audience: "customer" | "staff";
|
|
174974
|
+
/** @enum {string} */
|
|
174975
|
+
status: "enabled" | "not_needed" | "unavailable";
|
|
174976
|
+
reason: string | null;
|
|
174977
|
+
ready: boolean;
|
|
174978
|
+
counts: {
|
|
174979
|
+
required: number;
|
|
174980
|
+
approved: number;
|
|
174981
|
+
pending: number;
|
|
174982
|
+
rejected: number;
|
|
174983
|
+
missing: number;
|
|
174984
|
+
blocked: number;
|
|
174985
|
+
};
|
|
174986
|
+
numbers: {
|
|
174987
|
+
/** Format: uuid */
|
|
174988
|
+
messaging_account_id: string;
|
|
174989
|
+
counts: {
|
|
174990
|
+
required: number;
|
|
174991
|
+
approved: number;
|
|
174992
|
+
pending: number;
|
|
174993
|
+
rejected: number;
|
|
174994
|
+
missing: number;
|
|
174995
|
+
blocked: number;
|
|
174996
|
+
};
|
|
174997
|
+
templates: {
|
|
174998
|
+
entry: string;
|
|
174999
|
+
name: string;
|
|
175000
|
+
language: string;
|
|
175001
|
+
/** @enum {string} */
|
|
175002
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
175003
|
+
/** @enum {string|null} */
|
|
175004
|
+
status: "PENDING" | "APPROVED" | "REJECTED" | "IN_APPEAL" | "PAUSED" | "DISABLED" | null;
|
|
175005
|
+
rejection_reason: string | null;
|
|
175006
|
+
error: string | null;
|
|
175007
|
+
}[];
|
|
175008
|
+
}[];
|
|
175009
|
+
};
|
|
175010
|
+
};
|
|
175011
|
+
meta?: {
|
|
175012
|
+
[key: string]: unknown;
|
|
175013
|
+
};
|
|
175014
|
+
};
|
|
175015
|
+
};
|
|
175016
|
+
};
|
|
175017
|
+
/** @description Validation error */
|
|
175018
|
+
400: {
|
|
175019
|
+
headers: {
|
|
175020
|
+
[name: string]: unknown;
|
|
175021
|
+
};
|
|
175022
|
+
content: {
|
|
175023
|
+
"application/json": components["schemas"]["Error"];
|
|
175024
|
+
};
|
|
175025
|
+
};
|
|
175026
|
+
/** @description Unauthorized */
|
|
175027
|
+
401: {
|
|
175028
|
+
headers: {
|
|
175029
|
+
[name: string]: unknown;
|
|
175030
|
+
};
|
|
175031
|
+
content: {
|
|
175032
|
+
"application/json": components["schemas"]["Error"];
|
|
175033
|
+
};
|
|
175034
|
+
};
|
|
175035
|
+
/** @description Forbidden */
|
|
175036
|
+
403: {
|
|
175037
|
+
headers: {
|
|
175038
|
+
[name: string]: unknown;
|
|
175039
|
+
};
|
|
175040
|
+
content: {
|
|
175041
|
+
"application/json": components["schemas"]["Error"];
|
|
175042
|
+
};
|
|
175043
|
+
};
|
|
175044
|
+
/** @description Not found */
|
|
175045
|
+
404: {
|
|
175046
|
+
headers: {
|
|
175047
|
+
[name: string]: unknown;
|
|
175048
|
+
};
|
|
175049
|
+
content: {
|
|
175050
|
+
"application/json": components["schemas"]["Error"];
|
|
175051
|
+
};
|
|
175052
|
+
};
|
|
175053
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
175054
|
+
409: {
|
|
175055
|
+
headers: {
|
|
175056
|
+
[name: string]: unknown;
|
|
175057
|
+
};
|
|
175058
|
+
content: {
|
|
175059
|
+
"application/json": components["schemas"]["Error"];
|
|
175060
|
+
};
|
|
175061
|
+
};
|
|
175062
|
+
/** @description Rate limited */
|
|
175063
|
+
429: {
|
|
175064
|
+
headers: {
|
|
175065
|
+
[name: string]: unknown;
|
|
175066
|
+
};
|
|
175067
|
+
content: {
|
|
175068
|
+
"application/json": components["schemas"]["Error"];
|
|
175069
|
+
};
|
|
175070
|
+
};
|
|
175071
|
+
};
|
|
175072
|
+
};
|
|
175073
|
+
delete?: never;
|
|
175074
|
+
options?: never;
|
|
175075
|
+
head?: never;
|
|
175076
|
+
patch?: never;
|
|
175077
|
+
trace?: never;
|
|
175078
|
+
};
|
|
174609
175079
|
"/whatsapp-templates/sync": {
|
|
174610
175080
|
parameters: {
|
|
174611
175081
|
query?: never;
|
package/package.json
CHANGED