@zavudev/sdk 0.60.2 → 0.61.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 +45 -0
- package/package.json +1 -1
- package/resources/balance.d.mts +4 -1
- package/resources/balance.d.mts.map +1 -1
- package/resources/balance.d.ts +4 -1
- package/resources/balance.d.ts.map +1 -1
- package/resources/balance.js +4 -1
- package/resources/balance.js.map +1 -1
- package/resources/balance.mjs +4 -1
- package/resources/balance.mjs.map +1 -1
- package/resources/messages.d.mts +23 -10
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +23 -10
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +23 -10
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +23 -10
- package/resources/messages.mjs.map +1 -1
- package/src/resources/balance.ts +4 -1
- package/src/resources/messages.ts +23 -10
- package/src/types.ts +114 -9
- package/src/version.ts +1 -1
- package/types.d.mts +110 -9
- package/types.d.mts.map +1 -1
- package/types.d.ts +110 -9
- package/types.d.ts.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.61.0 (unreleased)
|
|
4
|
+
|
|
5
|
+
### Documentation
|
|
6
|
+
|
|
7
|
+
* **10dlc:** `ein` on brands says it is checked against `country`: the 9-digit
|
|
8
|
+
EIN for a US brand, the tax id from the country's business register for a
|
|
9
|
+
brand outside the US.
|
|
10
|
+
* **messages:** the Free plan's monthly allowance on WhatsApp, Telegram,
|
|
11
|
+
Instagram and Messenger no longer stops a team that has added funds: past it,
|
|
12
|
+
each block of 1,000 messages is prepaid from the balance at $4, and
|
|
13
|
+
`a2p_limit_exceeded` means the balance cannot cover the next block. Free's
|
|
14
|
+
monthly email cap lifts the same way.
|
|
15
|
+
* **messages, calls:** `402 spend_cap_reached` documents the team's monthly
|
|
16
|
+
spend cap, set in the dashboard: reached, sends and calls that cost money are
|
|
17
|
+
refused until the 1st or until the cap is raised. Renewals are not counted.
|
|
18
|
+
A Free team that has added funds has no conversational daily ceiling.
|
|
19
|
+
* **messages:** at the allowance, incoming WhatsApp, Telegram, Instagram and
|
|
20
|
+
Messenger messages are held instead of refused, and delivered (with their
|
|
21
|
+
original `providerTimestamp`) once the team adds funds or moves to a paid
|
|
22
|
+
plan. Up to 1,000 per team, 30 days each.
|
|
23
|
+
* **messages:** on pay as you go, app messages stopped by the spend cap answer
|
|
24
|
+
`429 a2p_limit_exceeded` with `details.payAsYouGo.reason`
|
|
25
|
+
(`insufficient_balance` or `spend_cap_reached`); `402 spend_cap_reached` is
|
|
26
|
+
for SMS, voice, email and AI replies.
|
|
27
|
+
* **phone numbers:** `releaseAt` and the guide describe what happens when a
|
|
28
|
+
paid plan ends: the team keeps one number, billed from the balance, and the
|
|
29
|
+
others are released after 7 days. `isFreeEligible` depends on the account.
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **balance:** `GET /v1/balance` returns the team's `appMessages` (`used`,
|
|
34
|
+
`included`, `paused`), `heldInbound`, `payAsYouGo`, `spendCap` and
|
|
35
|
+
`spentThisMonth`, so an integration that only replies to webhooks can learn
|
|
36
|
+
that sending is paused and customers are waiting without sending anything.
|
|
37
|
+
* **messages:** sending on a channel the sender has not connected answers
|
|
38
|
+
`409 channel_not_connected` with `details.channel` (was `400
|
|
39
|
+
invalid_request`), the same code channel activation uses. `409` on
|
|
40
|
+
`POST /v1/messages` is now either that error or an idempotent replay.
|
|
41
|
+
* **messages:** `a2p_limit_exceeded` carries `details.heldInbound` (`count`,
|
|
42
|
+
`max`, `nextExpiresAt`) while incoming messages are on hold.
|
|
43
|
+
* **webhooks:** `message.inbound` carries `data.heldAt` on a message that was
|
|
44
|
+
held and delivered later.
|
|
45
|
+
* **phone numbers:** `releaseAt` on a number scheduled to go back to the
|
|
46
|
+
carrier.
|
|
47
|
+
|
|
3
48
|
## 0.60.2 (unreleased)
|
|
4
49
|
|
|
5
50
|
### Documentation
|
package/package.json
CHANGED
package/resources/balance.d.mts
CHANGED
|
@@ -7,7 +7,10 @@ export declare class Balance extends APIResource {
|
|
|
7
7
|
* Get balance
|
|
8
8
|
*
|
|
9
9
|
* Get balance for the API key's team. If the API key belongs to a sub-account,
|
|
10
|
-
* also includes the sub-account's total spending and credit limit.
|
|
10
|
+
* also includes the sub-account's total spending and credit limit. Also reports
|
|
11
|
+
* the team's app-message allowance, whether it is paused and why, pay as you go
|
|
12
|
+
* and the spend cap, and how many incoming messages are held: the way to learn
|
|
13
|
+
* that customers are writing without sending anything.
|
|
11
14
|
*
|
|
12
15
|
* `GET /v1/balance`
|
|
13
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balance.d.mts","sourceRoot":"","sources":["../src/resources/balance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAC7D,OAAO,KAAK,KAAK,CAAC,qBAAiB;AAEnC,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"balance.d.mts","sourceRoot":"","sources":["../src/resources/balance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAC7D,OAAO,KAAK,KAAK,CAAC,qBAAiB;AAEnC,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAGxE;AAED,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,eAAe,CAAC;AAExD,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,uBAAuB,IAAI,uBAAuB,EAAE,CAAC;CACpE"}
|
package/resources/balance.d.ts
CHANGED
|
@@ -7,7 +7,10 @@ export declare class Balance extends APIResource {
|
|
|
7
7
|
* Get balance
|
|
8
8
|
*
|
|
9
9
|
* Get balance for the API key's team. If the API key belongs to a sub-account,
|
|
10
|
-
* also includes the sub-account's total spending and credit limit.
|
|
10
|
+
* also includes the sub-account's total spending and credit limit. Also reports
|
|
11
|
+
* the team's app-message allowance, whether it is paused and why, pay as you go
|
|
12
|
+
* and the spend cap, and how many incoming messages are held: the way to learn
|
|
13
|
+
* that customers are writing without sending anything.
|
|
11
14
|
*
|
|
12
15
|
* `GET /v1/balance`
|
|
13
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../src/resources/balance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAC7D,OAAO,KAAK,KAAK,CAAC,oBAAiB;AAEnC,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../src/resources/balance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAC7D,OAAO,KAAK,KAAK,CAAC,oBAAiB;AAEnC,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAGxE;AAED,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,eAAe,CAAC;AAExD,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,uBAAuB,IAAI,uBAAuB,EAAE,CAAC;CACpE"}
|
package/resources/balance.js
CHANGED
|
@@ -8,7 +8,10 @@ class Balance extends resource_1.APIResource {
|
|
|
8
8
|
* Get balance
|
|
9
9
|
*
|
|
10
10
|
* Get balance for the API key's team. If the API key belongs to a sub-account,
|
|
11
|
-
* also includes the sub-account's total spending and credit limit.
|
|
11
|
+
* also includes the sub-account's total spending and credit limit. Also reports
|
|
12
|
+
* the team's app-message allowance, whether it is paused and why, pay as you go
|
|
13
|
+
* and the spend cap, and how many incoming messages are held: the way to learn
|
|
14
|
+
* that customers are writing without sending anything.
|
|
12
15
|
*
|
|
13
16
|
* `GET /v1/balance`
|
|
14
17
|
*/
|
package/resources/balance.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balance.js","sourceRoot":"","sources":["../src/resources/balance.ts"],"names":[],"mappings":";AAAA,6FAA6F;;;AAE7F,kDAA+C;AAK/C,MAAa,OAAQ,SAAQ,sBAAW;IACtC
|
|
1
|
+
{"version":3,"file":"balance.js","sourceRoot":"","sources":["../src/resources/balance.ts"],"names":[],"mappings":";AAAA,6FAA6F;;;AAE7F,kDAA+C;AAK/C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACF;AAfD,0BAeC"}
|
package/resources/balance.mjs
CHANGED
|
@@ -5,7 +5,10 @@ export class Balance extends APIResource {
|
|
|
5
5
|
* Get balance
|
|
6
6
|
*
|
|
7
7
|
* Get balance for the API key's team. If the API key belongs to a sub-account,
|
|
8
|
-
* also includes the sub-account's total spending and credit limit.
|
|
8
|
+
* also includes the sub-account's total spending and credit limit. Also reports
|
|
9
|
+
* the team's app-message allowance, whether it is paused and why, pay as you go
|
|
10
|
+
* and the spend cap, and how many incoming messages are held: the way to learn
|
|
11
|
+
* that customers are writing without sending anything.
|
|
9
12
|
*
|
|
10
13
|
* `GET /v1/balance`
|
|
11
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balance.mjs","sourceRoot":"","sources":["../src/resources/balance.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAK/C,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"balance.mjs","sourceRoot":"","sources":["../src/resources/balance.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAK/C,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACF"}
|
package/resources/messages.d.mts
CHANGED
|
@@ -61,19 +61,30 @@ export declare class Messages extends APIResource {
|
|
|
61
61
|
* them does, so a project that has sent 300 and received 1,700 has used the
|
|
62
62
|
* whole allowance. Messages you send from the WhatsApp Business App on your own
|
|
63
63
|
* phone under coexistence are mirrored into your inbox but never counted, and
|
|
64
|
-
* neither are failed sends.
|
|
64
|
+
* neither are failed sends. **Pay as you go:** a Free team that has added funds
|
|
65
|
+
* to its balance is not stopped at the allowance. Past it, each started block of
|
|
66
|
+
* 1,000 messages is prepaid from the balance at $4 ($0.004 a message, either
|
|
67
|
+
* direction); only when the balance cannot cover the next block does the rule
|
|
68
|
+
* below apply. Otherwise, over the allowance, sends return 429 with code
|
|
65
69
|
* `a2p_limit_exceeded` and upgrade details, **and inbound messages on those
|
|
66
|
-
* channels are
|
|
67
|
-
*
|
|
68
|
-
*
|
|
70
|
+
* channels are held**: kept, but not shown in the inbox and no `message.inbound`
|
|
71
|
+
* webhook until the team adds funds or moves to a paid plan (or, for a
|
|
72
|
+
* pay-as-you-go team stopped by its spend cap, raises the cap). Held messages
|
|
73
|
+
* are then delivered in arrival order with their original `providerTimestamp`,
|
|
74
|
+
* counted like any other, and an AI agent does not reply to them. Up to 1,000
|
|
75
|
+
* are held per team, each for 30 days; past either limit they are refused and
|
|
76
|
+
* not delivered later. The month resetting does not release them. The counter
|
|
77
|
+
* resets on the 1st of each month. Paid plans have no message caps
|
|
69
78
|
* - Email is billed from your prepaid balance in 1,000-message blocks: $0.40 per
|
|
70
79
|
* 1,000 transactional emails, $0.80 per 1,000 marketing (broadcast) emails. A
|
|
71
80
|
* block is charged when your monthly count crosses each 1,000 boundary, and at
|
|
72
81
|
* zero balance email sends return 402 with code `insufficient_balance`. Free
|
|
73
|
-
* teams start with $2 of credit and additionally cap at 3,000 emails/month
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
82
|
+
* teams start with $2 of credit and additionally cap at 3,000 emails/month
|
|
83
|
+
* (lifted once the team has added funds: past it, email keeps billing from the
|
|
84
|
+
* balance in the same blocks) and 100/day. Email broadcasts (marketing email)
|
|
85
|
+
* need a paid plan: Free cannot send them, see `POST
|
|
86
|
+
* /v1/broadcasts/{broadcastId}/send`. Teams on earlier plans keep their original
|
|
87
|
+
* email quotas instead
|
|
77
88
|
* - SMS and voice are billed per message from your balance on every plan
|
|
78
89
|
*
|
|
79
90
|
* **Daily limits:**
|
|
@@ -90,8 +101,10 @@ export declare class Messages extends APIResource {
|
|
|
90
101
|
* Past that floor: 200/day for SMS, or 10,000/day once identity or business
|
|
91
102
|
* verification is approved (or a higher limit agreed for your account); 50/day
|
|
92
103
|
* voice and 250/day conversational on Free. **Paid plans have no voice or
|
|
93
|
-
* conversational daily ceiling
|
|
94
|
-
*
|
|
104
|
+
* conversational daily ceiling**, and neither does a Free team that has added
|
|
105
|
+
* funds on conversational (voice keeps 50/day). Over a ceiling, sends return
|
|
106
|
+
* `429` with code `daily_limit_exceeded` and `details.limit`; the count resets
|
|
107
|
+
* at 00:00 UTC
|
|
95
108
|
* - The daily ceiling never reduces the monthly allowance: 100/day on the
|
|
96
109
|
* conversational group still reaches the 2,000 monthly A2P messages Free
|
|
97
110
|
* includes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,+BAA2B;AAEzD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,OAAO,KAAK,KAAK,CAAC,qBAAiB;AAEnC,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;IAIlF;;;;;;OAMG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,cAAc,EAAE,OAAO,CAAC;IAIvC;;;;;;;;;;;OAWG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,8BAA8B,CAAC;IAIxG;;;;;;;OAOG;IACH,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,eAAe,CAAC;IAY9B
|
|
1
|
+
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,O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AAI,OAAO,EACvB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
package/resources/messages.d.ts
CHANGED
|
@@ -61,19 +61,30 @@ export declare class Messages extends APIResource {
|
|
|
61
61
|
* them does, so a project that has sent 300 and received 1,700 has used the
|
|
62
62
|
* whole allowance. Messages you send from the WhatsApp Business App on your own
|
|
63
63
|
* phone under coexistence are mirrored into your inbox but never counted, and
|
|
64
|
-
* neither are failed sends.
|
|
64
|
+
* neither are failed sends. **Pay as you go:** a Free team that has added funds
|
|
65
|
+
* to its balance is not stopped at the allowance. Past it, each started block of
|
|
66
|
+
* 1,000 messages is prepaid from the balance at $4 ($0.004 a message, either
|
|
67
|
+
* direction); only when the balance cannot cover the next block does the rule
|
|
68
|
+
* below apply. Otherwise, over the allowance, sends return 429 with code
|
|
65
69
|
* `a2p_limit_exceeded` and upgrade details, **and inbound messages on those
|
|
66
|
-
* channels are
|
|
67
|
-
*
|
|
68
|
-
*
|
|
70
|
+
* channels are held**: kept, but not shown in the inbox and no `message.inbound`
|
|
71
|
+
* webhook until the team adds funds or moves to a paid plan (or, for a
|
|
72
|
+
* pay-as-you-go team stopped by its spend cap, raises the cap). Held messages
|
|
73
|
+
* are then delivered in arrival order with their original `providerTimestamp`,
|
|
74
|
+
* counted like any other, and an AI agent does not reply to them. Up to 1,000
|
|
75
|
+
* are held per team, each for 30 days; past either limit they are refused and
|
|
76
|
+
* not delivered later. The month resetting does not release them. The counter
|
|
77
|
+
* resets on the 1st of each month. Paid plans have no message caps
|
|
69
78
|
* - Email is billed from your prepaid balance in 1,000-message blocks: $0.40 per
|
|
70
79
|
* 1,000 transactional emails, $0.80 per 1,000 marketing (broadcast) emails. A
|
|
71
80
|
* block is charged when your monthly count crosses each 1,000 boundary, and at
|
|
72
81
|
* zero balance email sends return 402 with code `insufficient_balance`. Free
|
|
73
|
-
* teams start with $2 of credit and additionally cap at 3,000 emails/month
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
82
|
+
* teams start with $2 of credit and additionally cap at 3,000 emails/month
|
|
83
|
+
* (lifted once the team has added funds: past it, email keeps billing from the
|
|
84
|
+
* balance in the same blocks) and 100/day. Email broadcasts (marketing email)
|
|
85
|
+
* need a paid plan: Free cannot send them, see `POST
|
|
86
|
+
* /v1/broadcasts/{broadcastId}/send`. Teams on earlier plans keep their original
|
|
87
|
+
* email quotas instead
|
|
77
88
|
* - SMS and voice are billed per message from your balance on every plan
|
|
78
89
|
*
|
|
79
90
|
* **Daily limits:**
|
|
@@ -90,8 +101,10 @@ export declare class Messages extends APIResource {
|
|
|
90
101
|
* Past that floor: 200/day for SMS, or 10,000/day once identity or business
|
|
91
102
|
* verification is approved (or a higher limit agreed for your account); 50/day
|
|
92
103
|
* voice and 250/day conversational on Free. **Paid plans have no voice or
|
|
93
|
-
* conversational daily ceiling
|
|
94
|
-
*
|
|
104
|
+
* conversational daily ceiling**, and neither does a Free team that has added
|
|
105
|
+
* funds on conversational (voice keeps 50/day). Over a ceiling, sends return
|
|
106
|
+
* `429` with code `daily_limit_exceeded` and `details.limit`; the count resets
|
|
107
|
+
* at 00:00 UTC
|
|
95
108
|
* - The daily ceiling never reduces the monthly allowance: 100/day on the
|
|
96
109
|
* conversational group still reaches the 2,000 monthly A2P messages Free
|
|
97
110
|
* includes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],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AK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
package/resources/messages.js
CHANGED
|
@@ -80,19 +80,30 @@ class Messages extends resource_1.APIResource {
|
|
|
80
80
|
* them does, so a project that has sent 300 and received 1,700 has used the
|
|
81
81
|
* whole allowance. Messages you send from the WhatsApp Business App on your own
|
|
82
82
|
* phone under coexistence are mirrored into your inbox but never counted, and
|
|
83
|
-
* neither are failed sends.
|
|
83
|
+
* neither are failed sends. **Pay as you go:** a Free team that has added funds
|
|
84
|
+
* to its balance is not stopped at the allowance. Past it, each started block of
|
|
85
|
+
* 1,000 messages is prepaid from the balance at $4 ($0.004 a message, either
|
|
86
|
+
* direction); only when the balance cannot cover the next block does the rule
|
|
87
|
+
* below apply. Otherwise, over the allowance, sends return 429 with code
|
|
84
88
|
* `a2p_limit_exceeded` and upgrade details, **and inbound messages on those
|
|
85
|
-
* channels are
|
|
86
|
-
*
|
|
87
|
-
*
|
|
89
|
+
* channels are held**: kept, but not shown in the inbox and no `message.inbound`
|
|
90
|
+
* webhook until the team adds funds or moves to a paid plan (or, for a
|
|
91
|
+
* pay-as-you-go team stopped by its spend cap, raises the cap). Held messages
|
|
92
|
+
* are then delivered in arrival order with their original `providerTimestamp`,
|
|
93
|
+
* counted like any other, and an AI agent does not reply to them. Up to 1,000
|
|
94
|
+
* are held per team, each for 30 days; past either limit they are refused and
|
|
95
|
+
* not delivered later. The month resetting does not release them. The counter
|
|
96
|
+
* resets on the 1st of each month. Paid plans have no message caps
|
|
88
97
|
* - Email is billed from your prepaid balance in 1,000-message blocks: $0.40 per
|
|
89
98
|
* 1,000 transactional emails, $0.80 per 1,000 marketing (broadcast) emails. A
|
|
90
99
|
* block is charged when your monthly count crosses each 1,000 boundary, and at
|
|
91
100
|
* zero balance email sends return 402 with code `insufficient_balance`. Free
|
|
92
|
-
* teams start with $2 of credit and additionally cap at 3,000 emails/month
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
101
|
+
* teams start with $2 of credit and additionally cap at 3,000 emails/month
|
|
102
|
+
* (lifted once the team has added funds: past it, email keeps billing from the
|
|
103
|
+
* balance in the same blocks) and 100/day. Email broadcasts (marketing email)
|
|
104
|
+
* need a paid plan: Free cannot send them, see `POST
|
|
105
|
+
* /v1/broadcasts/{broadcastId}/send`. Teams on earlier plans keep their original
|
|
106
|
+
* email quotas instead
|
|
96
107
|
* - SMS and voice are billed per message from your balance on every plan
|
|
97
108
|
*
|
|
98
109
|
* **Daily limits:**
|
|
@@ -109,8 +120,10 @@ class Messages extends resource_1.APIResource {
|
|
|
109
120
|
* Past that floor: 200/day for SMS, or 10,000/day once identity or business
|
|
110
121
|
* verification is approved (or a higher limit agreed for your account); 50/day
|
|
111
122
|
* voice and 250/day conversational on Free. **Paid plans have no voice or
|
|
112
|
-
* conversational daily ceiling
|
|
113
|
-
*
|
|
123
|
+
* conversational daily ceiling**, and neither does a Free team that has added
|
|
124
|
+
* funds on conversational (voice keeps 50/day). Over a ceiling, sends return
|
|
125
|
+
* `429` with code `daily_limit_exceeded` and `details.limit`; the count resets
|
|
126
|
+
* at 00:00 UTC
|
|
114
127
|
* - The daily ceiling never reduces the monthly allowance: 100/day on the
|
|
115
128
|
* conversational group still reaches the 2,000 monthly A2P messages Free
|
|
116
129
|
* includes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,6FAA6F;;;AAE7F,kDAA+C;AAE/C,sDAAyD;AACzD,oDAAmD;AAEnD,oDAA8C;AAG9C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;OAIG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,EAAE,EAAE,OAAO,CA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,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACvE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,UAAU,CACR,SAAiB,EACjB,SAAqD,EAAE,EACvD,OAAwB;QAExB,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,SAAS,EAAE;YAC/D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACvE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA5ND,4BA4NC"}
|
package/resources/messages.mjs
CHANGED
|
@@ -77,19 +77,30 @@ export class Messages extends APIResource {
|
|
|
77
77
|
* them does, so a project that has sent 300 and received 1,700 has used the
|
|
78
78
|
* whole allowance. Messages you send from the WhatsApp Business App on your own
|
|
79
79
|
* phone under coexistence are mirrored into your inbox but never counted, and
|
|
80
|
-
* neither are failed sends.
|
|
80
|
+
* neither are failed sends. **Pay as you go:** a Free team that has added funds
|
|
81
|
+
* to its balance is not stopped at the allowance. Past it, each started block of
|
|
82
|
+
* 1,000 messages is prepaid from the balance at $4 ($0.004 a message, either
|
|
83
|
+
* direction); only when the balance cannot cover the next block does the rule
|
|
84
|
+
* below apply. Otherwise, over the allowance, sends return 429 with code
|
|
81
85
|
* `a2p_limit_exceeded` and upgrade details, **and inbound messages on those
|
|
82
|
-
* channels are
|
|
83
|
-
*
|
|
84
|
-
*
|
|
86
|
+
* channels are held**: kept, but not shown in the inbox and no `message.inbound`
|
|
87
|
+
* webhook until the team adds funds or moves to a paid plan (or, for a
|
|
88
|
+
* pay-as-you-go team stopped by its spend cap, raises the cap). Held messages
|
|
89
|
+
* are then delivered in arrival order with their original `providerTimestamp`,
|
|
90
|
+
* counted like any other, and an AI agent does not reply to them. Up to 1,000
|
|
91
|
+
* are held per team, each for 30 days; past either limit they are refused and
|
|
92
|
+
* not delivered later. The month resetting does not release them. The counter
|
|
93
|
+
* resets on the 1st of each month. Paid plans have no message caps
|
|
85
94
|
* - Email is billed from your prepaid balance in 1,000-message blocks: $0.40 per
|
|
86
95
|
* 1,000 transactional emails, $0.80 per 1,000 marketing (broadcast) emails. A
|
|
87
96
|
* block is charged when your monthly count crosses each 1,000 boundary, and at
|
|
88
97
|
* zero balance email sends return 402 with code `insufficient_balance`. Free
|
|
89
|
-
* teams start with $2 of credit and additionally cap at 3,000 emails/month
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
98
|
+
* teams start with $2 of credit and additionally cap at 3,000 emails/month
|
|
99
|
+
* (lifted once the team has added funds: past it, email keeps billing from the
|
|
100
|
+
* balance in the same blocks) and 100/day. Email broadcasts (marketing email)
|
|
101
|
+
* need a paid plan: Free cannot send them, see `POST
|
|
102
|
+
* /v1/broadcasts/{broadcastId}/send`. Teams on earlier plans keep their original
|
|
103
|
+
* email quotas instead
|
|
93
104
|
* - SMS and voice are billed per message from your balance on every plan
|
|
94
105
|
*
|
|
95
106
|
* **Daily limits:**
|
|
@@ -106,8 +117,10 @@ export class Messages extends APIResource {
|
|
|
106
117
|
* Past that floor: 200/day for SMS, or 10,000/day once identity or business
|
|
107
118
|
* verification is approved (or a higher limit agreed for your account); 50/day
|
|
108
119
|
* voice and 250/day conversational on Free. **Paid plans have no voice or
|
|
109
|
-
* conversational daily ceiling
|
|
110
|
-
*
|
|
120
|
+
* conversational daily ceiling**, and neither does a Free team that has added
|
|
121
|
+
* funds on conversational (voice keeps 50/day). Over a ceiling, sends return
|
|
122
|
+
* `429` with code `daily_limit_exceeded` and `details.limit`; the count resets
|
|
123
|
+
* at 00:00 UTC
|
|
111
124
|
* - The daily ceiling never reduces the monthly allowance: 100/day on the
|
|
112
125
|
* conversational group still reaches the 2,000 monthly A2P messages Free
|
|
113
126
|
* includes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,MAAM,EAAe,+BAA2B;AACzD,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAG9C,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;OAIG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,MAAe,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,eAAe,CAAC,SAAiB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,SAAS,cAAc,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CACH,SAAiB,EACjB,MAA0B,EAC1B,OA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I,EAAE,CAAC;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gBAAgB,SAAS,SAAS,EAAE;YAC/D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACvE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/src/resources/balance.ts
CHANGED
|
@@ -10,7 +10,10 @@ export class Balance extends APIResource {
|
|
|
10
10
|
* Get balance
|
|
11
11
|
*
|
|
12
12
|
* Get balance for the API key's team. If the API key belongs to a sub-account,
|
|
13
|
-
* also includes the sub-account's total spending and credit limit.
|
|
13
|
+
* also includes the sub-account's total spending and credit limit. Also reports
|
|
14
|
+
* the team's app-message allowance, whether it is paused and why, pay as you go
|
|
15
|
+
* and the spend cap, and how many incoming messages are held: the way to learn
|
|
16
|
+
* that customers are writing without sending anything.
|
|
14
17
|
*
|
|
15
18
|
* `GET /v1/balance`
|
|
16
19
|
*/
|
|
@@ -93,19 +93,30 @@ export class Messages extends APIResource {
|
|
|
93
93
|
* them does, so a project that has sent 300 and received 1,700 has used the
|
|
94
94
|
* whole allowance. Messages you send from the WhatsApp Business App on your own
|
|
95
95
|
* phone under coexistence are mirrored into your inbox but never counted, and
|
|
96
|
-
* neither are failed sends.
|
|
96
|
+
* neither are failed sends. **Pay as you go:** a Free team that has added funds
|
|
97
|
+
* to its balance is not stopped at the allowance. Past it, each started block of
|
|
98
|
+
* 1,000 messages is prepaid from the balance at $4 ($0.004 a message, either
|
|
99
|
+
* direction); only when the balance cannot cover the next block does the rule
|
|
100
|
+
* below apply. Otherwise, over the allowance, sends return 429 with code
|
|
97
101
|
* `a2p_limit_exceeded` and upgrade details, **and inbound messages on those
|
|
98
|
-
* channels are
|
|
99
|
-
*
|
|
100
|
-
*
|
|
102
|
+
* channels are held**: kept, but not shown in the inbox and no `message.inbound`
|
|
103
|
+
* webhook until the team adds funds or moves to a paid plan (or, for a
|
|
104
|
+
* pay-as-you-go team stopped by its spend cap, raises the cap). Held messages
|
|
105
|
+
* are then delivered in arrival order with their original `providerTimestamp`,
|
|
106
|
+
* counted like any other, and an AI agent does not reply to them. Up to 1,000
|
|
107
|
+
* are held per team, each for 30 days; past either limit they are refused and
|
|
108
|
+
* not delivered later. The month resetting does not release them. The counter
|
|
109
|
+
* resets on the 1st of each month. Paid plans have no message caps
|
|
101
110
|
* - Email is billed from your prepaid balance in 1,000-message blocks: $0.40 per
|
|
102
111
|
* 1,000 transactional emails, $0.80 per 1,000 marketing (broadcast) emails. A
|
|
103
112
|
* block is charged when your monthly count crosses each 1,000 boundary, and at
|
|
104
113
|
* zero balance email sends return 402 with code `insufficient_balance`. Free
|
|
105
|
-
* teams start with $2 of credit and additionally cap at 3,000 emails/month
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
114
|
+
* teams start with $2 of credit and additionally cap at 3,000 emails/month
|
|
115
|
+
* (lifted once the team has added funds: past it, email keeps billing from the
|
|
116
|
+
* balance in the same blocks) and 100/day. Email broadcasts (marketing email)
|
|
117
|
+
* need a paid plan: Free cannot send them, see `POST
|
|
118
|
+
* /v1/broadcasts/{broadcastId}/send`. Teams on earlier plans keep their original
|
|
119
|
+
* email quotas instead
|
|
109
120
|
* - SMS and voice are billed per message from your balance on every plan
|
|
110
121
|
*
|
|
111
122
|
* **Daily limits:**
|
|
@@ -122,8 +133,10 @@ export class Messages extends APIResource {
|
|
|
122
133
|
* Past that floor: 200/day for SMS, or 10,000/day once identity or business
|
|
123
134
|
* verification is approved (or a higher limit agreed for your account); 50/day
|
|
124
135
|
* voice and 250/day conversational on Free. **Paid plans have no voice or
|
|
125
|
-
* conversational daily ceiling
|
|
126
|
-
*
|
|
136
|
+
* conversational daily ceiling**, and neither does a Free team that has added
|
|
137
|
+
* funds on conversational (voice keeps 50/day). Over a ceiling, sends return
|
|
138
|
+
* `429` with code `daily_limit_exceeded` and `details.limit`; the count resets
|
|
139
|
+
* at 00:00 UTC
|
|
127
140
|
* - The daily ceiling never reduces the monthly allowance: 100/day on the
|
|
128
141
|
* conversational group still reaches the 2,000 monthly A2P messages Free
|
|
129
142
|
* includes
|