@zavudev/sdk 0.45.0 → 0.47.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 +23 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +9 -1
- package/client.js.map +1 -1
- package/client.mjs +9 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/broadcasts/broadcasts.d.mts +1 -1
- package/resources/broadcasts/broadcasts.d.mts.map +1 -1
- package/resources/broadcasts/broadcasts.d.ts +1 -1
- package/resources/broadcasts/broadcasts.d.ts.map +1 -1
- package/resources/broadcasts/broadcasts.js.map +1 -1
- package/resources/broadcasts/broadcasts.mjs.map +1 -1
- package/resources/contacts/channels.d.mts +1 -1
- package/resources/contacts/channels.d.mts.map +1 -1
- package/resources/contacts/channels.d.ts +1 -1
- package/resources/contacts/channels.d.ts.map +1 -1
- package/resources/contacts/contacts.d.mts +4 -4
- package/resources/contacts/contacts.d.mts.map +1 -1
- package/resources/contacts/contacts.d.ts +4 -4
- package/resources/contacts/contacts.d.ts.map +1 -1
- package/resources/invitations.d.mts +24 -3
- package/resources/invitations.d.mts.map +1 -1
- package/resources/invitations.d.ts +24 -3
- package/resources/invitations.d.ts.map +1 -1
- package/resources/invitations.js +12 -3
- package/resources/invitations.js.map +1 -1
- package/resources/invitations.mjs +12 -3
- package/resources/invitations.mjs.map +1 -1
- package/resources/messages.d.mts +6 -3
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +6 -3
- package/resources/messages.d.ts.map +1 -1
- package/resources/senders/senders.d.mts +6 -1
- package/resources/senders/senders.d.mts.map +1 -1
- package/resources/senders/senders.d.ts +6 -1
- package/resources/senders/senders.d.ts.map +1 -1
- package/resources/senders/senders.js.map +1 -1
- package/resources/senders/senders.mjs.map +1 -1
- package/src/client.ts +9 -1
- package/src/resources/broadcasts/broadcasts.ts +1 -0
- package/src/resources/contacts/channels.ts +1 -1
- package/src/resources/contacts/contacts.ts +4 -4
- package/src/resources/invitations.ts +26 -3
- package/src/resources/messages.ts +6 -2
- package/src/resources/senders/senders.ts +6 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -8,9 +8,18 @@ import { path } from '../internal/utils/path';
|
|
|
8
8
|
|
|
9
9
|
export class Invitations extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Create a partner invitation link for a client to connect
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* Create a partner invitation link for a client to connect WhatsApp. The client
|
|
12
|
+
* opens the returned `url` and connects. Set `connectionType` to choose how they
|
|
13
|
+
* connect:
|
|
14
|
+
*
|
|
15
|
+
* - `whatsapp_waba` (default): the client completes Meta's embedded signup,
|
|
16
|
+
* linking an official WhatsApp Business Account.
|
|
17
|
+
* - `whatsapp_alt`: the client links their number by scanning a QR code. Requires
|
|
18
|
+
* the WhatsApp Alternative feature to be enabled for your team (otherwise
|
|
19
|
+
* returns 400).
|
|
20
|
+
*
|
|
21
|
+
* Either way, the resulting sender is created in your project when the client
|
|
22
|
+
* completes the flow, and the invitation transitions to `completed`.
|
|
14
23
|
*
|
|
15
24
|
* @example
|
|
16
25
|
* ```ts
|
|
@@ -108,6 +117,12 @@ export interface Invitation {
|
|
|
108
117
|
|
|
109
118
|
completedAt?: string | null;
|
|
110
119
|
|
|
120
|
+
/**
|
|
121
|
+
* How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
|
|
122
|
+
* embedded signup) or `whatsapp_alt` (QR-linked).
|
|
123
|
+
*/
|
|
124
|
+
connectionType?: 'whatsapp_waba' | 'whatsapp_alt';
|
|
125
|
+
|
|
111
126
|
/**
|
|
112
127
|
* ID of a pre-assigned Zavu phone number for WhatsApp registration.
|
|
113
128
|
*/
|
|
@@ -156,6 +171,14 @@ export interface InvitationCreateParams {
|
|
|
156
171
|
*/
|
|
157
172
|
clientPhone?: string;
|
|
158
173
|
|
|
174
|
+
/**
|
|
175
|
+
* How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
|
|
176
|
+
* signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
|
|
177
|
+
* number by scanning a QR code — available only to teams with the WhatsApp
|
|
178
|
+
* Alternative feature enabled.
|
|
179
|
+
*/
|
|
180
|
+
connectionType?: 'whatsapp_waba' | 'whatsapp_alt';
|
|
181
|
+
|
|
159
182
|
/**
|
|
160
183
|
* Number of days until the invitation expires.
|
|
161
184
|
*/
|
|
@@ -150,6 +150,7 @@ export type Channel =
|
|
|
150
150
|
| 'telegram'
|
|
151
151
|
| 'email'
|
|
152
152
|
| 'instagram'
|
|
153
|
+
| 'messenger'
|
|
153
154
|
| 'voice';
|
|
154
155
|
|
|
155
156
|
export interface Message {
|
|
@@ -486,8 +487,11 @@ export interface MessageReactParams {
|
|
|
486
487
|
|
|
487
488
|
export interface MessageSendParams {
|
|
488
489
|
/**
|
|
489
|
-
* Body param: Recipient phone number in E.164 format, email address,
|
|
490
|
-
*
|
|
490
|
+
* Body param: Recipient phone number in E.164 format, email address, WhatsApp
|
|
491
|
+
* business-scoped user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat
|
|
492
|
+
* ID (for Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent
|
|
493
|
+
* via the `recipient` field; use it to message a contact who adopted a username
|
|
494
|
+
* and whose phone number is hidden.
|
|
491
495
|
*/
|
|
492
496
|
to: string;
|
|
493
497
|
|
|
@@ -312,7 +312,12 @@ export interface SenderWebhook {
|
|
|
312
312
|
* delivered as `message.inbound` with `messageType='reaction'`. When the contact
|
|
313
313
|
* replied to (quoted) an earlier message, `data.content` carries the reply
|
|
314
314
|
* context: `replyToMessageId`, `replyToProviderMessageId`, `replyToFrom`,
|
|
315
|
-
* `replyToText`, and `replyToMessageType`.
|
|
315
|
+
* `replyToText`, and `replyToMessageType`. `data.providerTimestamp` is the
|
|
316
|
+
* provider's original receive time in Unix milliseconds (the moment the channel
|
|
317
|
+
* received the message from the contact — WhatsApp, Telegram, Instagram,
|
|
318
|
+
* Messenger; `null` for SMS and email). Compare it against the top-level
|
|
319
|
+
* `timestamp` (when Zavu dispatched the webhook) to detect and ignore delayed
|
|
320
|
+
* deliveries.
|
|
316
321
|
* - `message.unsupported`: Received a message type that is not supported
|
|
317
322
|
*
|
|
318
323
|
* **Broadcast events:**
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.47.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.47.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.47.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.47.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|