@zavudev/sdk 0.30.0 → 0.38.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 +124 -0
- package/client.d.mts +28 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +28 -4
- package/client.d.ts.map +1 -1
- package/client.js +25 -1
- package/client.js.map +1 -1
- package/client.mjs +25 -1
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/balance.d.mts +33 -0
- package/resources/balance.d.mts.map +1 -0
- package/resources/balance.d.ts +33 -0
- package/resources/balance.d.ts.map +1 -0
- package/resources/balance.js +16 -0
- package/resources/balance.js.map +1 -0
- package/resources/balance.mjs +12 -0
- package/resources/balance.mjs.map +1 -0
- package/resources/broadcasts/broadcasts.d.mts +31 -1
- package/resources/broadcasts/broadcasts.d.mts.map +1 -1
- package/resources/broadcasts/broadcasts.d.ts +31 -1
- package/resources/broadcasts/broadcasts.d.ts.map +1 -1
- package/resources/broadcasts/broadcasts.js +28 -0
- package/resources/broadcasts/broadcasts.js.map +1 -1
- package/resources/broadcasts/broadcasts.mjs +28 -0
- package/resources/broadcasts/broadcasts.mjs.map +1 -1
- package/resources/broadcasts/index.d.mts +1 -1
- package/resources/broadcasts/index.d.mts.map +1 -1
- package/resources/broadcasts/index.d.ts +1 -1
- package/resources/broadcasts/index.d.ts.map +1 -1
- package/resources/broadcasts/index.js.map +1 -1
- package/resources/broadcasts/index.mjs.map +1 -1
- package/resources/contacts/channels.d.mts +127 -0
- package/resources/contacts/channels.d.mts.map +1 -0
- package/resources/contacts/channels.d.ts +127 -0
- package/resources/contacts/channels.d.ts.map +1 -0
- package/resources/contacts/channels.js +76 -0
- package/resources/contacts/channels.js.map +1 -0
- package/resources/contacts/channels.mjs +72 -0
- package/resources/contacts/channels.mjs.map +1 -0
- package/resources/contacts/contacts.d.mts +262 -0
- package/resources/contacts/contacts.d.mts.map +1 -0
- package/resources/contacts/contacts.d.ts +262 -0
- package/resources/contacts/contacts.d.ts.map +1 -0
- package/resources/contacts/contacts.js +118 -0
- package/resources/contacts/contacts.js.map +1 -0
- package/resources/contacts/contacts.mjs +113 -0
- package/resources/contacts/contacts.mjs.map +1 -0
- package/resources/contacts/index.d.mts +3 -0
- package/resources/contacts/index.d.mts.map +1 -0
- package/resources/contacts/index.d.ts +3 -0
- package/resources/contacts/index.d.ts.map +1 -0
- package/resources/contacts/index.js +9 -0
- package/resources/contacts/index.js.map +1 -0
- package/resources/contacts/index.mjs +4 -0
- package/resources/contacts/index.mjs.map +1 -0
- package/resources/contacts.d.mts +1 -144
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +1 -144
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +2 -31
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +1 -29
- package/resources/contacts.mjs.map +1 -1
- package/resources/exports.d.mts +101 -0
- package/resources/exports.d.mts.map +1 -0
- package/resources/exports.d.ts +101 -0
- package/resources/exports.d.ts.map +1 -0
- package/resources/exports.js +53 -0
- package/resources/exports.js.map +1 -0
- package/resources/exports.mjs +49 -0
- package/resources/exports.mjs.map +1 -0
- package/resources/index.d.mts +10 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +10 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +18 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +9 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invitations.d.mts +133 -0
- package/resources/invitations.d.mts.map +1 -0
- package/resources/invitations.d.ts +133 -0
- package/resources/invitations.d.ts.map +1 -0
- package/resources/invitations.js +67 -0
- package/resources/invitations.js.map +1 -0
- package/resources/invitations.mjs +63 -0
- package/resources/invitations.mjs.map +1 -0
- package/resources/messages.d.mts +37 -4
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +37 -4
- package/resources/messages.d.ts.map +1 -1
- package/resources/number-10dlc/brands.d.mts +258 -0
- package/resources/number-10dlc/brands.d.mts.map +1 -0
- package/resources/number-10dlc/brands.d.ts +258 -0
- package/resources/number-10dlc/brands.d.ts.map +1 -0
- package/resources/number-10dlc/brands.js +132 -0
- package/resources/number-10dlc/brands.js.map +1 -0
- package/resources/number-10dlc/brands.mjs +128 -0
- package/resources/number-10dlc/brands.mjs.map +1 -0
- package/resources/number-10dlc/campaigns/campaigns.d.mts +223 -0
- package/resources/number-10dlc/campaigns/campaigns.d.mts.map +1 -0
- package/resources/number-10dlc/campaigns/campaigns.d.ts +223 -0
- package/resources/number-10dlc/campaigns/campaigns.d.ts.map +1 -0
- package/resources/number-10dlc/campaigns/campaigns.js +133 -0
- package/resources/number-10dlc/campaigns/campaigns.js.map +1 -0
- package/resources/number-10dlc/campaigns/campaigns.mjs +128 -0
- package/resources/number-10dlc/campaigns/campaigns.mjs.map +1 -0
- package/resources/number-10dlc/campaigns/index.d.mts +3 -0
- package/resources/number-10dlc/campaigns/index.d.mts.map +1 -0
- package/resources/number-10dlc/campaigns/index.d.ts +3 -0
- package/resources/number-10dlc/campaigns/index.d.ts.map +1 -0
- package/resources/number-10dlc/campaigns/index.js +9 -0
- package/resources/number-10dlc/campaigns/index.js.map +1 -0
- package/resources/number-10dlc/campaigns/index.mjs +4 -0
- package/resources/number-10dlc/campaigns/index.mjs.map +1 -0
- package/resources/number-10dlc/campaigns/phone-numbers.d.mts +79 -0
- package/resources/number-10dlc/campaigns/phone-numbers.d.mts.map +1 -0
- package/resources/number-10dlc/campaigns/phone-numbers.d.ts +79 -0
- package/resources/number-10dlc/campaigns/phone-numbers.d.ts.map +1 -0
- package/resources/number-10dlc/campaigns/phone-numbers.js +59 -0
- package/resources/number-10dlc/campaigns/phone-numbers.js.map +1 -0
- package/resources/number-10dlc/campaigns/phone-numbers.mjs +55 -0
- package/resources/number-10dlc/campaigns/phone-numbers.mjs.map +1 -0
- package/resources/number-10dlc/campaigns.d.mts +2 -0
- package/resources/number-10dlc/campaigns.d.mts.map +1 -0
- package/resources/number-10dlc/campaigns.d.ts +2 -0
- package/resources/number-10dlc/campaigns.d.ts.map +1 -0
- package/resources/number-10dlc/campaigns.js +6 -0
- package/resources/number-10dlc/campaigns.js.map +1 -0
- package/resources/number-10dlc/campaigns.mjs +3 -0
- package/resources/number-10dlc/campaigns.mjs.map +1 -0
- package/resources/number-10dlc/index.d.mts +4 -0
- package/resources/number-10dlc/index.d.mts.map +1 -0
- package/resources/number-10dlc/index.d.ts +4 -0
- package/resources/number-10dlc/index.d.ts.map +1 -0
- package/resources/number-10dlc/index.js +11 -0
- package/resources/number-10dlc/index.js.map +1 -0
- package/resources/number-10dlc/index.mjs +5 -0
- package/resources/number-10dlc/index.mjs.map +1 -0
- package/resources/number-10dlc/number-10dlc.d.mts +14 -0
- package/resources/number-10dlc/number-10dlc.d.mts.map +1 -0
- package/resources/number-10dlc/number-10dlc.d.ts +14 -0
- package/resources/number-10dlc/number-10dlc.d.ts.map +1 -0
- package/resources/number-10dlc/number-10dlc.js +21 -0
- package/resources/number-10dlc/number-10dlc.js.map +1 -0
- package/resources/number-10dlc/number-10dlc.mjs +16 -0
- package/resources/number-10dlc/number-10dlc.mjs.map +1 -0
- package/resources/number-10dlc.d.mts +2 -0
- package/resources/number-10dlc.d.mts.map +1 -0
- package/resources/number-10dlc.d.ts +2 -0
- package/resources/number-10dlc.d.ts.map +1 -0
- package/resources/number-10dlc.js +6 -0
- package/resources/number-10dlc.js.map +1 -0
- package/resources/number-10dlc.mjs +3 -0
- package/resources/number-10dlc.mjs.map +1 -0
- package/resources/plan.d.mts +43 -0
- package/resources/plan.d.mts.map +1 -0
- package/resources/plan.d.ts +43 -0
- package/resources/plan.d.ts.map +1 -0
- package/resources/plan.js +16 -0
- package/resources/plan.js.map +1 -0
- package/resources/plan.mjs +12 -0
- package/resources/plan.mjs.map +1 -0
- package/resources/senders/agent/agent.d.mts +4 -4
- package/resources/senders/agent/agent.d.mts.map +1 -1
- package/resources/senders/agent/agent.d.ts +4 -4
- package/resources/senders/agent/agent.d.ts.map +1 -1
- package/resources/senders/agent/agent.js.map +1 -1
- package/resources/senders/agent/agent.mjs.map +1 -1
- package/resources/senders/agent/flows.d.mts +40 -114
- package/resources/senders/agent/flows.d.mts.map +1 -1
- package/resources/senders/agent/flows.d.ts +40 -114
- package/resources/senders/agent/flows.d.ts.map +1 -1
- package/resources/senders/agent/index.d.mts +2 -2
- package/resources/senders/agent/index.d.mts.map +1 -1
- package/resources/senders/agent/index.d.ts +2 -2
- package/resources/senders/agent/index.d.ts.map +1 -1
- package/resources/senders/agent/index.js.map +1 -1
- package/resources/senders/agent/index.mjs.map +1 -1
- package/resources/senders/agent/tools.d.mts +15 -47
- package/resources/senders/agent/tools.d.mts.map +1 -1
- package/resources/senders/agent/tools.d.ts +15 -47
- package/resources/senders/agent/tools.d.ts.map +1 -1
- package/resources/senders/index.d.mts +1 -0
- package/resources/senders/index.d.mts.map +1 -1
- package/resources/senders/index.d.ts +1 -0
- package/resources/senders/index.d.ts.map +1 -1
- package/resources/senders/index.js +3 -1
- package/resources/senders/index.js.map +1 -1
- package/resources/senders/index.mjs +1 -0
- package/resources/senders/index.mjs.map +1 -1
- package/resources/senders/senders.d.mts +17 -1
- package/resources/senders/senders.d.mts.map +1 -1
- package/resources/senders/senders.d.ts +17 -1
- package/resources/senders/senders.d.ts.map +1 -1
- package/resources/senders/senders.js +4 -0
- package/resources/senders/senders.js.map +1 -1
- package/resources/senders/senders.mjs +4 -0
- package/resources/senders/senders.mjs.map +1 -1
- package/resources/senders/whatsapp-sync.d.mts +134 -0
- package/resources/senders/whatsapp-sync.d.mts.map +1 -0
- package/resources/senders/whatsapp-sync.d.ts +134 -0
- package/resources/senders/whatsapp-sync.d.ts.map +1 -0
- package/resources/senders/whatsapp-sync.js +56 -0
- package/resources/senders/whatsapp-sync.js.map +1 -0
- package/resources/senders/whatsapp-sync.mjs +52 -0
- package/resources/senders/whatsapp-sync.mjs.map +1 -0
- package/resources/sub-accounts/api-keys.d.mts +85 -0
- package/resources/sub-accounts/api-keys.d.mts.map +1 -0
- package/resources/sub-accounts/api-keys.d.ts +85 -0
- package/resources/sub-accounts/api-keys.d.ts.map +1 -0
- package/resources/sub-accounts/api-keys.js +53 -0
- package/resources/sub-accounts/api-keys.js.map +1 -0
- package/resources/sub-accounts/api-keys.mjs +49 -0
- package/resources/sub-accounts/api-keys.mjs.map +1 -0
- package/resources/sub-accounts/index.d.mts +3 -0
- package/resources/sub-accounts/index.d.mts.map +1 -0
- package/resources/sub-accounts/index.d.ts +3 -0
- package/resources/sub-accounts/index.d.ts.map +1 -0
- package/resources/sub-accounts/index.js +9 -0
- package/resources/sub-accounts/index.js.map +1 -0
- package/resources/sub-accounts/index.mjs +4 -0
- package/resources/sub-accounts/index.mjs.map +1 -0
- package/resources/sub-accounts/sub-accounts.d.mts +168 -0
- package/resources/sub-accounts/sub-accounts.d.mts.map +1 -0
- package/resources/sub-accounts/sub-accounts.d.ts +168 -0
- package/resources/sub-accounts/sub-accounts.d.ts.map +1 -0
- package/resources/sub-accounts/sub-accounts.js +94 -0
- package/resources/sub-accounts/sub-accounts.js.map +1 -0
- package/resources/sub-accounts/sub-accounts.mjs +89 -0
- package/resources/sub-accounts/sub-accounts.mjs.map +1 -0
- package/resources/sub-accounts.d.mts +2 -0
- package/resources/sub-accounts.d.mts.map +1 -0
- package/resources/sub-accounts.d.ts +2 -0
- package/resources/sub-accounts.d.ts.map +1 -0
- package/resources/sub-accounts.js +6 -0
- package/resources/sub-accounts.js.map +1 -0
- package/resources/sub-accounts.mjs +3 -0
- package/resources/sub-accounts.mjs.map +1 -0
- package/resources/templates.d.mts +42 -2
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +42 -2
- package/resources/templates.d.ts.map +1 -1
- package/resources/urls.d.mts +88 -0
- package/resources/urls.d.mts.map +1 -0
- package/resources/urls.d.ts +88 -0
- package/resources/urls.d.ts.map +1 -0
- package/resources/urls.js +55 -0
- package/resources/urls.js.map +1 -0
- package/resources/urls.mjs +51 -0
- package/resources/urls.mjs.map +1 -0
- package/resources/usage.d.mts +36 -0
- package/resources/usage.d.mts.map +1 -0
- package/resources/usage.d.ts +36 -0
- package/resources/usage.d.ts.map +1 -0
- package/resources/usage.js +16 -0
- package/resources/usage.js.map +1 -0
- package/resources/usage.mjs +12 -0
- package/resources/usage.mjs.map +1 -0
- package/src/client.ts +130 -6
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/balance.ts +43 -0
- package/src/resources/broadcasts/broadcasts.ts +40 -0
- package/src/resources/broadcasts/index.ts +2 -0
- package/src/resources/contacts/channels.ts +177 -0
- package/src/resources/contacts/contacts.ts +360 -0
- package/src/resources/contacts/index.ts +22 -0
- package/src/resources/contacts.ts +1 -196
- package/src/resources/exports.ts +141 -0
- package/src/resources/index.ts +51 -1
- package/src/resources/invitations.ts +188 -0
- package/src/resources/messages.ts +43 -3
- package/src/resources/number-10dlc/brands.ts +377 -0
- package/src/resources/number-10dlc/campaigns/campaigns.ts +349 -0
- package/src/resources/number-10dlc/campaigns/index.ts +23 -0
- package/src/resources/number-10dlc/campaigns/phone-numbers.ts +123 -0
- package/src/resources/number-10dlc/campaigns.ts +3 -0
- package/src/resources/number-10dlc/index.ts +30 -0
- package/src/resources/number-10dlc/number-10dlc.ts +71 -0
- package/src/resources/number-10dlc.ts +3 -0
- package/src/resources/plan.ts +62 -0
- package/src/resources/senders/agent/agent.ts +6 -0
- package/src/resources/senders/agent/flows.ts +44 -126
- package/src/resources/senders/agent/index.ts +3 -0
- package/src/resources/senders/agent/tools.ts +13 -50
- package/src/resources/senders/index.ts +9 -0
- package/src/resources/senders/senders.ts +38 -1
- package/src/resources/senders/whatsapp-sync.ts +175 -0
- package/src/resources/sub-accounts/api-keys.ts +126 -0
- package/src/resources/sub-accounts/index.ts +22 -0
- package/src/resources/sub-accounts/sub-accounts.ts +246 -0
- package/src/resources/sub-accounts.ts +3 -0
- package/src/resources/templates.ts +51 -2
- package/src/resources/urls.ts +125 -0
- package/src/resources/usage.ts +48 -0
- 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
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as WhatsappSyncAPI from "./whatsapp-sync.mjs";
|
|
3
|
+
import { WhatsAppSyncContacts, WhatsAppSyncHistory, WhatsAppSyncStatus, WhatsappSync, WhatsappSyncRetrieveResponse, WhatsappSyncStartContactsSyncResponse, WhatsappSyncStartHistorySyncResponse } from "./whatsapp-sync.mjs";
|
|
2
4
|
import * as AgentAPI from "./agent/agent.mjs";
|
|
3
5
|
import { Agent, AgentCreateParams, AgentExecution, AgentExecutionStatus, AgentProvider, AgentResource, AgentResponse, AgentStats, AgentUpdateParams } from "./agent/agent.mjs";
|
|
4
6
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
@@ -6,6 +8,7 @@ import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.mj
|
|
|
6
8
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
7
9
|
export declare class Senders extends APIResource {
|
|
8
10
|
agent: AgentAPI.AgentResource;
|
|
11
|
+
whatsappSync: WhatsappSyncAPI.WhatsappSync;
|
|
9
12
|
/**
|
|
10
13
|
* Create sender
|
|
11
14
|
*
|
|
@@ -214,6 +217,8 @@ export interface SenderWebhook {
|
|
|
214
217
|
* - `message.sent`: Message accepted by the provider. `data.status` = `sent`
|
|
215
218
|
* - `message.delivered`: Message delivered to recipient. `data.status` =
|
|
216
219
|
* `delivered`
|
|
220
|
+
* - `message.read`: Message was read by the recipient (WhatsApp only).
|
|
221
|
+
* `data.status` = `read`
|
|
217
222
|
* - `message.failed`: Message failed to send. `data.status` = `failed`
|
|
218
223
|
*
|
|
219
224
|
* **Inbound events:**
|
|
@@ -222,12 +227,22 @@ export interface SenderWebhook {
|
|
|
222
227
|
* delivered as `message.inbound` with `messageType='reaction'`
|
|
223
228
|
* - `message.unsupported`: Received a message type that is not supported
|
|
224
229
|
*
|
|
230
|
+
* **Broadcast events:**
|
|
231
|
+
*
|
|
232
|
+
* - `broadcast.status_changed`: Broadcast status changed (pending_review,
|
|
233
|
+
* approved, rejected, sending, completed, cancelled)
|
|
234
|
+
*
|
|
225
235
|
* **Other events:**
|
|
226
236
|
*
|
|
227
237
|
* - `conversation.new`: New conversation started with a contact
|
|
228
238
|
* - `template.status_changed`: WhatsApp template approval status changed
|
|
239
|
+
*
|
|
240
|
+
* **Partner events:**
|
|
241
|
+
*
|
|
242
|
+
* - `invitation.status_changed`: A partner invitation status changed (pending,
|
|
243
|
+
* in_progress, completed, cancelled)
|
|
229
244
|
*/
|
|
230
|
-
export type WebhookEvent = 'message.queued' | 'message.sent' | 'message.delivered' | 'message.failed' | 'message.inbound' | 'message.unsupported' | 'conversation.new' | 'template.status_changed';
|
|
245
|
+
export type WebhookEvent = 'message.queued' | 'message.sent' | 'message.delivered' | 'message.read' | 'message.failed' | 'message.inbound' | 'message.unsupported' | 'broadcast.status_changed' | 'conversation.new' | 'template.status_changed' | 'invitation.status_changed';
|
|
231
246
|
export interface WebhookSecretResponse {
|
|
232
247
|
/**
|
|
233
248
|
* The new webhook secret.
|
|
@@ -365,5 +380,6 @@ export interface SenderUploadProfilePictureParams {
|
|
|
365
380
|
export declare namespace Senders {
|
|
366
381
|
export { type Sender as Sender, type SenderWebhook as SenderWebhook, type WebhookEvent as WebhookEvent, type WebhookSecretResponse as WebhookSecretResponse, type WhatsappBusinessProfile as WhatsappBusinessProfile, type WhatsappBusinessProfileResponse as WhatsappBusinessProfileResponse, type WhatsappBusinessProfileVertical as WhatsappBusinessProfileVertical, type SenderUpdateProfileResponse as SenderUpdateProfileResponse, type SenderUploadProfilePictureResponse as SenderUploadProfilePictureResponse, type SendersCursor as SendersCursor, type SenderCreateParams as SenderCreateParams, type SenderUpdateParams as SenderUpdateParams, type SenderListParams as SenderListParams, type SenderUpdateProfileParams as SenderUpdateProfileParams, type SenderUploadProfilePictureParams as SenderUploadProfilePictureParams, };
|
|
367
382
|
export { AgentResource as AgentResource, type Agent as Agent, type AgentExecution as AgentExecution, type AgentExecutionStatus as AgentExecutionStatus, type AgentProvider as AgentProvider, type AgentResponse as AgentResponse, type AgentStats as AgentStats, type AgentCreateParams as AgentCreateParams, type AgentUpdateParams as AgentUpdateParams, };
|
|
383
|
+
export { WhatsappSync as WhatsappSync, type WhatsAppSyncContacts as WhatsAppSyncContacts, type WhatsAppSyncHistory as WhatsAppSyncHistory, type WhatsAppSyncStatus as WhatsAppSyncStatus, type WhatsappSyncRetrieveResponse as WhatsappSyncRetrieveResponse, type WhatsappSyncStartContactsSyncResponse as WhatsappSyncStartContactsSyncResponse, type WhatsappSyncStartHistorySyncResponse as WhatsappSyncStartHistorySyncResponse, };
|
|
368
384
|
}
|
|
369
385
|
//# sourceMappingURL=senders.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"senders.d.mts","sourceRoot":"","sources":["../../src/resources/senders/senders.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EACL,KAAK,EACL,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,iBAAiB,EAClB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAE1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAA4C;
|
|
1
|
+
{"version":3,"file":"senders.d.mts","sourceRoot":"","sources":["../../src/resources/senders/senders.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EACL,oBAAoB,EACpB,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oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,oCAAoC,IAAI,oCAAoC,GAClF,CAAC;CACH"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as WhatsappSyncAPI from "./whatsapp-sync.js";
|
|
3
|
+
import { WhatsAppSyncContacts, WhatsAppSyncHistory, WhatsAppSyncStatus, WhatsappSync, WhatsappSyncRetrieveResponse, WhatsappSyncStartContactsSyncResponse, WhatsappSyncStartHistorySyncResponse } from "./whatsapp-sync.js";
|
|
2
4
|
import * as AgentAPI from "./agent/agent.js";
|
|
3
5
|
import { Agent, AgentCreateParams, AgentExecution, AgentExecutionStatus, AgentProvider, AgentResource, AgentResponse, AgentStats, AgentUpdateParams } from "./agent/agent.js";
|
|
4
6
|
import { APIPromise } from "../../core/api-promise.js";
|
|
@@ -6,6 +8,7 @@ import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.js
|
|
|
6
8
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
9
|
export declare class Senders extends APIResource {
|
|
8
10
|
agent: AgentAPI.AgentResource;
|
|
11
|
+
whatsappSync: WhatsappSyncAPI.WhatsappSync;
|
|
9
12
|
/**
|
|
10
13
|
* Create sender
|
|
11
14
|
*
|
|
@@ -214,6 +217,8 @@ export interface SenderWebhook {
|
|
|
214
217
|
* - `message.sent`: Message accepted by the provider. `data.status` = `sent`
|
|
215
218
|
* - `message.delivered`: Message delivered to recipient. `data.status` =
|
|
216
219
|
* `delivered`
|
|
220
|
+
* - `message.read`: Message was read by the recipient (WhatsApp only).
|
|
221
|
+
* `data.status` = `read`
|
|
217
222
|
* - `message.failed`: Message failed to send. `data.status` = `failed`
|
|
218
223
|
*
|
|
219
224
|
* **Inbound events:**
|
|
@@ -222,12 +227,22 @@ export interface SenderWebhook {
|
|
|
222
227
|
* delivered as `message.inbound` with `messageType='reaction'`
|
|
223
228
|
* - `message.unsupported`: Received a message type that is not supported
|
|
224
229
|
*
|
|
230
|
+
* **Broadcast events:**
|
|
231
|
+
*
|
|
232
|
+
* - `broadcast.status_changed`: Broadcast status changed (pending_review,
|
|
233
|
+
* approved, rejected, sending, completed, cancelled)
|
|
234
|
+
*
|
|
225
235
|
* **Other events:**
|
|
226
236
|
*
|
|
227
237
|
* - `conversation.new`: New conversation started with a contact
|
|
228
238
|
* - `template.status_changed`: WhatsApp template approval status changed
|
|
239
|
+
*
|
|
240
|
+
* **Partner events:**
|
|
241
|
+
*
|
|
242
|
+
* - `invitation.status_changed`: A partner invitation status changed (pending,
|
|
243
|
+
* in_progress, completed, cancelled)
|
|
229
244
|
*/
|
|
230
|
-
export type WebhookEvent = 'message.queued' | 'message.sent' | 'message.delivered' | 'message.failed' | 'message.inbound' | 'message.unsupported' | 'conversation.new' | 'template.status_changed';
|
|
245
|
+
export type WebhookEvent = 'message.queued' | 'message.sent' | 'message.delivered' | 'message.read' | 'message.failed' | 'message.inbound' | 'message.unsupported' | 'broadcast.status_changed' | 'conversation.new' | 'template.status_changed' | 'invitation.status_changed';
|
|
231
246
|
export interface WebhookSecretResponse {
|
|
232
247
|
/**
|
|
233
248
|
* The new webhook secret.
|
|
@@ -365,5 +380,6 @@ export interface SenderUploadProfilePictureParams {
|
|
|
365
380
|
export declare namespace Senders {
|
|
366
381
|
export { type Sender as Sender, type SenderWebhook as SenderWebhook, type WebhookEvent as WebhookEvent, type WebhookSecretResponse as WebhookSecretResponse, type WhatsappBusinessProfile as WhatsappBusinessProfile, type WhatsappBusinessProfileResponse as WhatsappBusinessProfileResponse, type WhatsappBusinessProfileVertical as WhatsappBusinessProfileVertical, type SenderUpdateProfileResponse as SenderUpdateProfileResponse, type SenderUploadProfilePictureResponse as SenderUploadProfilePictureResponse, type SendersCursor as SendersCursor, type SenderCreateParams as SenderCreateParams, type SenderUpdateParams as SenderUpdateParams, type SenderListParams as SenderListParams, type SenderUpdateProfileParams as SenderUpdateProfileParams, type SenderUploadProfilePictureParams as SenderUploadProfilePictureParams, };
|
|
367
382
|
export { AgentResource as AgentResource, type Agent as Agent, type AgentExecution as AgentExecution, type AgentExecutionStatus as AgentExecutionStatus, type AgentProvider as AgentProvider, type AgentResponse as AgentResponse, type AgentStats as AgentStats, type AgentCreateParams as AgentCreateParams, type AgentUpdateParams as AgentUpdateParams, };
|
|
383
|
+
export { WhatsappSync as WhatsappSync, type WhatsAppSyncContacts as WhatsAppSyncContacts, type WhatsAppSyncHistory as WhatsAppSyncHistory, type WhatsAppSyncStatus as WhatsAppSyncStatus, type WhatsappSyncRetrieveResponse as WhatsappSyncRetrieveResponse, type WhatsappSyncStartContactsSyncResponse as WhatsappSyncStartContactsSyncResponse, type WhatsappSyncStartHistorySyncResponse as WhatsappSyncStartHistorySyncResponse, };
|
|
368
384
|
}
|
|
369
385
|
//# sourceMappingURL=senders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"senders.d.ts","sourceRoot":"","sources":["../../src/resources/senders/senders.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EACL,KAAK,EACL,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,iBAAiB,EAClB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAE1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAA4C;
|
|
1
|
+
{"version":3,"file":"senders.d.ts","sourceRoot":"","sources":["../../src/resources/senders/senders.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EACL,oBAAoB,EAC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AI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,oCAAoC,IAAI,oCAAoC,GAClF,CAAC;CACH"}
|
|
@@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Senders = void 0;
|
|
5
5
|
const tslib_1 = require("../../internal/tslib.js");
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const WhatsappSyncAPI = tslib_1.__importStar(require("./whatsapp-sync.js"));
|
|
8
|
+
const whatsapp_sync_1 = require("./whatsapp-sync.js");
|
|
7
9
|
const AgentAPI = tslib_1.__importStar(require("./agent/agent.js"));
|
|
8
10
|
const agent_1 = require("./agent/agent.js");
|
|
9
11
|
const pagination_1 = require("../../core/pagination.js");
|
|
@@ -13,6 +15,7 @@ class Senders extends resource_1.APIResource {
|
|
|
13
15
|
constructor() {
|
|
14
16
|
super(...arguments);
|
|
15
17
|
this.agent = new AgentAPI.AgentResource(this._client);
|
|
18
|
+
this.whatsappSync = new WhatsappSyncAPI.WhatsappSync(this._client);
|
|
16
19
|
}
|
|
17
20
|
/**
|
|
18
21
|
* Create sender
|
|
@@ -147,4 +150,5 @@ class Senders extends resource_1.APIResource {
|
|
|
147
150
|
}
|
|
148
151
|
exports.Senders = Senders;
|
|
149
152
|
Senders.AgentResource = agent_1.AgentResource;
|
|
153
|
+
Senders.WhatsappSync = whatsapp_sync_1.WhatsappSync;
|
|
150
154
|
//# sourceMappingURL=senders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"senders.js","sourceRoot":"","sources":["../../src/resources/senders/senders.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,mEAA0C;AAC1C,4CAUuB;AAEvB,yDAA+E;AAC/E,uDAAsD;A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OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;CACF;AAzJD,0BAyJC;AAwVD,OAAO,CAAC,aAAa,GAAG,qBAAa,CAAC;AACtC,OAAO,CAAC,YAAY,GAAG,4BAAY,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as WhatsappSyncAPI from "./whatsapp-sync.mjs";
|
|
4
|
+
import { WhatsappSync, } from "./whatsapp-sync.mjs";
|
|
3
5
|
import * as AgentAPI from "./agent/agent.mjs";
|
|
4
6
|
import { AgentResource, } from "./agent/agent.mjs";
|
|
5
7
|
import { Cursor } from "../../core/pagination.mjs";
|
|
@@ -9,6 +11,7 @@ export class Senders extends APIResource {
|
|
|
9
11
|
constructor() {
|
|
10
12
|
super(...arguments);
|
|
11
13
|
this.agent = new AgentAPI.AgentResource(this._client);
|
|
14
|
+
this.whatsappSync = new WhatsappSyncAPI.WhatsappSync(this._client);
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
14
17
|
* Create sender
|
|
@@ -142,4 +145,5 @@ export class Senders extends APIResource {
|
|
|
142
145
|
}
|
|
143
146
|
}
|
|
144
147
|
Senders.AgentResource = AgentResource;
|
|
148
|
+
Senders.WhatsappSync = WhatsappSync;
|
|
145
149
|
//# sourceMappingURL=senders.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"senders.mjs","sourceRoot":"","sources":["../../src/resources/senders/senders.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAML,aAAa,GAId;OAEM,EAAE,MAAM,EAAkC;OAC1C,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,UAAK,GAA2B,IAAI,QAAQ,CAAC,aAAa,C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AAO,CAAC,YAAY,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class WhatsappSync extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get the current sync status for a sender's WhatsApp coexistence account. Only
|
|
7
|
+
* available for senders connected in coexistence mode (WhatsApp Business App +
|
|
8
|
+
* Cloud API).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const whatsappSync =
|
|
13
|
+
* await client.senders.whatsappSync.retrieve('senderId');
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
retrieve(senderID: string, options?: RequestOptions): APIPromise<WhatsappSyncRetrieveResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Initiate contact names sync from the WhatsApp Business App. This imports contact
|
|
19
|
+
* names stored in the app to Zavu. Only available for coexistence accounts with
|
|
20
|
+
* active status.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response =
|
|
25
|
+
* await client.senders.whatsappSync.startContactsSync(
|
|
26
|
+
* 'senderId',
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
startContactsSync(senderID: string, options?: RequestOptions): APIPromise<WhatsappSyncStartContactsSyncResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Initiate message history sync from the WhatsApp Business App. This sends a
|
|
33
|
+
* request to the account owner to approve sharing their conversation history. Only
|
|
34
|
+
* available for coexistence accounts with active status.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const response =
|
|
39
|
+
* await client.senders.whatsappSync.startHistorySync(
|
|
40
|
+
* 'senderId',
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
startHistorySync(senderID: string, options?: RequestOptions): APIPromise<WhatsappSyncStartHistorySyncResponse>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Contacts sync status details.
|
|
48
|
+
*/
|
|
49
|
+
export interface WhatsAppSyncContacts {
|
|
50
|
+
/**
|
|
51
|
+
* Whether contacts sync can be initiated.
|
|
52
|
+
*/
|
|
53
|
+
canSync: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Status of WhatsApp contacts sync.
|
|
56
|
+
*/
|
|
57
|
+
status: 'not_requested' | 'pending' | 'syncing' | 'completed';
|
|
58
|
+
/**
|
|
59
|
+
* When the sync was last requested.
|
|
60
|
+
*/
|
|
61
|
+
requestedAt?: string | null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* History sync status details.
|
|
65
|
+
*/
|
|
66
|
+
export interface WhatsAppSyncHistory {
|
|
67
|
+
/**
|
|
68
|
+
* Whether history sync can be initiated.
|
|
69
|
+
*/
|
|
70
|
+
canSync: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Status of WhatsApp message history sync.
|
|
73
|
+
*/
|
|
74
|
+
status: 'not_requested' | 'pending' | 'syncing' | 'completed' | 'rejected';
|
|
75
|
+
/**
|
|
76
|
+
* When the sync was completed.
|
|
77
|
+
*/
|
|
78
|
+
completedAt?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* When the sync was last requested.
|
|
81
|
+
*/
|
|
82
|
+
requestedAt?: string | null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* WhatsApp coexistence sync status.
|
|
86
|
+
*/
|
|
87
|
+
export interface WhatsAppSyncStatus {
|
|
88
|
+
/**
|
|
89
|
+
* Contacts sync status details.
|
|
90
|
+
*/
|
|
91
|
+
contacts: WhatsAppSyncContacts;
|
|
92
|
+
/**
|
|
93
|
+
* History sync status details.
|
|
94
|
+
*/
|
|
95
|
+
history: WhatsAppSyncHistory;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the account is in coexistence mode.
|
|
98
|
+
*/
|
|
99
|
+
isCoexistence: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* WhatsApp account status.
|
|
102
|
+
*/
|
|
103
|
+
status: 'pending_verification' | 'pending_registration' | 'active' | 'disconnected' | 'error';
|
|
104
|
+
}
|
|
105
|
+
export interface WhatsappSyncRetrieveResponse {
|
|
106
|
+
/**
|
|
107
|
+
* WhatsApp coexistence sync status.
|
|
108
|
+
*/
|
|
109
|
+
sync: WhatsAppSyncStatus;
|
|
110
|
+
}
|
|
111
|
+
export interface WhatsappSyncStartContactsSyncResponse {
|
|
112
|
+
/**
|
|
113
|
+
* Success message.
|
|
114
|
+
*/
|
|
115
|
+
message: string;
|
|
116
|
+
/**
|
|
117
|
+
* WhatsApp coexistence sync status.
|
|
118
|
+
*/
|
|
119
|
+
sync: WhatsAppSyncStatus;
|
|
120
|
+
}
|
|
121
|
+
export interface WhatsappSyncStartHistorySyncResponse {
|
|
122
|
+
/**
|
|
123
|
+
* Success message.
|
|
124
|
+
*/
|
|
125
|
+
message: string;
|
|
126
|
+
/**
|
|
127
|
+
* WhatsApp coexistence sync status.
|
|
128
|
+
*/
|
|
129
|
+
sync: WhatsAppSyncStatus;
|
|
130
|
+
}
|
|
131
|
+
export declare namespace WhatsappSync {
|
|
132
|
+
export { type WhatsAppSyncContacts as WhatsAppSyncContacts, type WhatsAppSyncHistory as WhatsAppSyncHistory, type WhatsAppSyncStatus as WhatsAppSyncStatus, type WhatsappSyncRetrieveResponse as WhatsappSyncRetrieveResponse, type WhatsappSyncStartContactsSyncResponse as WhatsappSyncStartContactsSyncResponse, type WhatsappSyncStartHistorySyncResponse as WhatsappSyncStartHistorySyncResponse, };
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=whatsapp-sync.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp-sync.d.mts","sourceRoot":"","sources":["../../src/resources/senders/whatsapp-sync.ts"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,sBAAsB,GAAG,sBAAsB,GAAG,QAAQ,GAAG,cAAc,GAAG,OAAO,CAAC;CAC/F;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,WAAW,qCAAqC;IACpD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,WAAW,oCAAoC;IACnD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,oCAAoC,IAAI,oCAAoC,GAClF,CAAC;CACH"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class WhatsappSync extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get the current sync status for a sender's WhatsApp coexistence account. Only
|
|
7
|
+
* available for senders connected in coexistence mode (WhatsApp Business App +
|
|
8
|
+
* Cloud API).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const whatsappSync =
|
|
13
|
+
* await client.senders.whatsappSync.retrieve('senderId');
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
retrieve(senderID: string, options?: RequestOptions): APIPromise<WhatsappSyncRetrieveResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Initiate contact names sync from the WhatsApp Business App. This imports contact
|
|
19
|
+
* names stored in the app to Zavu. Only available for coexistence accounts with
|
|
20
|
+
* active status.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response =
|
|
25
|
+
* await client.senders.whatsappSync.startContactsSync(
|
|
26
|
+
* 'senderId',
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
startContactsSync(senderID: string, options?: RequestOptions): APIPromise<WhatsappSyncStartContactsSyncResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Initiate message history sync from the WhatsApp Business App. This sends a
|
|
33
|
+
* request to the account owner to approve sharing their conversation history. Only
|
|
34
|
+
* available for coexistence accounts with active status.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const response =
|
|
39
|
+
* await client.senders.whatsappSync.startHistorySync(
|
|
40
|
+
* 'senderId',
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
startHistorySync(senderID: string, options?: RequestOptions): APIPromise<WhatsappSyncStartHistorySyncResponse>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Contacts sync status details.
|
|
48
|
+
*/
|
|
49
|
+
export interface WhatsAppSyncContacts {
|
|
50
|
+
/**
|
|
51
|
+
* Whether contacts sync can be initiated.
|
|
52
|
+
*/
|
|
53
|
+
canSync: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Status of WhatsApp contacts sync.
|
|
56
|
+
*/
|
|
57
|
+
status: 'not_requested' | 'pending' | 'syncing' | 'completed';
|
|
58
|
+
/**
|
|
59
|
+
* When the sync was last requested.
|
|
60
|
+
*/
|
|
61
|
+
requestedAt?: string | null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* History sync status details.
|
|
65
|
+
*/
|
|
66
|
+
export interface WhatsAppSyncHistory {
|
|
67
|
+
/**
|
|
68
|
+
* Whether history sync can be initiated.
|
|
69
|
+
*/
|
|
70
|
+
canSync: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Status of WhatsApp message history sync.
|
|
73
|
+
*/
|
|
74
|
+
status: 'not_requested' | 'pending' | 'syncing' | 'completed' | 'rejected';
|
|
75
|
+
/**
|
|
76
|
+
* When the sync was completed.
|
|
77
|
+
*/
|
|
78
|
+
completedAt?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* When the sync was last requested.
|
|
81
|
+
*/
|
|
82
|
+
requestedAt?: string | null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* WhatsApp coexistence sync status.
|
|
86
|
+
*/
|
|
87
|
+
export interface WhatsAppSyncStatus {
|
|
88
|
+
/**
|
|
89
|
+
* Contacts sync status details.
|
|
90
|
+
*/
|
|
91
|
+
contacts: WhatsAppSyncContacts;
|
|
92
|
+
/**
|
|
93
|
+
* History sync status details.
|
|
94
|
+
*/
|
|
95
|
+
history: WhatsAppSyncHistory;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the account is in coexistence mode.
|
|
98
|
+
*/
|
|
99
|
+
isCoexistence: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* WhatsApp account status.
|
|
102
|
+
*/
|
|
103
|
+
status: 'pending_verification' | 'pending_registration' | 'active' | 'disconnected' | 'error';
|
|
104
|
+
}
|
|
105
|
+
export interface WhatsappSyncRetrieveResponse {
|
|
106
|
+
/**
|
|
107
|
+
* WhatsApp coexistence sync status.
|
|
108
|
+
*/
|
|
109
|
+
sync: WhatsAppSyncStatus;
|
|
110
|
+
}
|
|
111
|
+
export interface WhatsappSyncStartContactsSyncResponse {
|
|
112
|
+
/**
|
|
113
|
+
* Success message.
|
|
114
|
+
*/
|
|
115
|
+
message: string;
|
|
116
|
+
/**
|
|
117
|
+
* WhatsApp coexistence sync status.
|
|
118
|
+
*/
|
|
119
|
+
sync: WhatsAppSyncStatus;
|
|
120
|
+
}
|
|
121
|
+
export interface WhatsappSyncStartHistorySyncResponse {
|
|
122
|
+
/**
|
|
123
|
+
* Success message.
|
|
124
|
+
*/
|
|
125
|
+
message: string;
|
|
126
|
+
/**
|
|
127
|
+
* WhatsApp coexistence sync status.
|
|
128
|
+
*/
|
|
129
|
+
sync: WhatsAppSyncStatus;
|
|
130
|
+
}
|
|
131
|
+
export declare namespace WhatsappSync {
|
|
132
|
+
export { type WhatsAppSyncContacts as WhatsAppSyncContacts, type WhatsAppSyncHistory as WhatsAppSyncHistory, type WhatsAppSyncStatus as WhatsAppSyncStatus, type WhatsappSyncRetrieveResponse as WhatsappSyncRetrieveResponse, type WhatsappSyncStartContactsSyncResponse as WhatsappSyncStartContactsSyncResponse, type WhatsappSyncStartHistorySyncResponse as WhatsappSyncStartHistorySyncResponse, };
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=whatsapp-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp-sync.d.ts","sourceRoot":"","sources":["../../src/resources/senders/whatsapp-sync.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;IAI9F;;;;;;;;;;;;OAYG;IACH,iBAAiB,CACf,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qCAAqC,CAAC;IAIpD;;;;;;;;;;;;OAYG;IACH,gBAAgB,CACd,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oCAAoC,CAAC;CAGpD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,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CAAqC,IAAI,qCAAqC,EACnF,KAAK,oCAAoC,IAAI,oCAAoC,GAClF,CAAC;CACH"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.WhatsappSync = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
class WhatsappSync extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get the current sync status for a sender's WhatsApp coexistence account. Only
|
|
10
|
+
* available for senders connected in coexistence mode (WhatsApp Business App +
|
|
11
|
+
* Cloud API).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const whatsappSync =
|
|
16
|
+
* await client.senders.whatsappSync.retrieve('senderId');
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
retrieve(senderID, options) {
|
|
20
|
+
return this._client.get((0, path_1.path) `/v1/senders/${senderID}/whatsapp-sync`, options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Initiate contact names sync from the WhatsApp Business App. This imports contact
|
|
24
|
+
* names stored in the app to Zavu. Only available for coexistence accounts with
|
|
25
|
+
* active status.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response =
|
|
30
|
+
* await client.senders.whatsappSync.startContactsSync(
|
|
31
|
+
* 'senderId',
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
startContactsSync(senderID, options) {
|
|
36
|
+
return this._client.post((0, path_1.path) `/v1/senders/${senderID}/whatsapp-sync/contacts`, options);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Initiate message history sync from the WhatsApp Business App. This sends a
|
|
40
|
+
* request to the account owner to approve sharing their conversation history. Only
|
|
41
|
+
* available for coexistence accounts with active status.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const response =
|
|
46
|
+
* await client.senders.whatsappSync.startHistorySync(
|
|
47
|
+
* 'senderId',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
startHistorySync(senderID, options) {
|
|
52
|
+
return this._client.post((0, path_1.path) `/v1/senders/${senderID}/whatsapp-sync/history`, options);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.WhatsappSync = WhatsappSync;
|
|
56
|
+
//# sourceMappingURL=whatsapp-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp-sync.js","sourceRoot":"","sources":["../../src/resources/senders/whatsapp-sync.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,iBAAiB,CACf,QAAgB,EAChB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,gBAAgB,CACd,QAAgB,EAChB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,wBAAwB,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;CACF;AAvDD,oCAuDC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
export class WhatsappSync extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get the current sync status for a sender's WhatsApp coexistence account. Only
|
|
7
|
+
* available for senders connected in coexistence mode (WhatsApp Business App +
|
|
8
|
+
* Cloud API).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const whatsappSync =
|
|
13
|
+
* await client.senders.whatsappSync.retrieve('senderId');
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
retrieve(senderID, options) {
|
|
17
|
+
return this._client.get(path `/v1/senders/${senderID}/whatsapp-sync`, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Initiate contact names sync from the WhatsApp Business App. This imports contact
|
|
21
|
+
* names stored in the app to Zavu. Only available for coexistence accounts with
|
|
22
|
+
* active status.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const response =
|
|
27
|
+
* await client.senders.whatsappSync.startContactsSync(
|
|
28
|
+
* 'senderId',
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
startContactsSync(senderID, options) {
|
|
33
|
+
return this._client.post(path `/v1/senders/${senderID}/whatsapp-sync/contacts`, options);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Initiate message history sync from the WhatsApp Business App. This sends a
|
|
37
|
+
* request to the account owner to approve sharing their conversation history. Only
|
|
38
|
+
* available for coexistence accounts with active status.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response =
|
|
43
|
+
* await client.senders.whatsappSync.startHistorySync(
|
|
44
|
+
* 'senderId',
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
startHistorySync(senderID, options) {
|
|
49
|
+
return this._client.post(path `/v1/senders/${senderID}/whatsapp-sync/history`, options);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=whatsapp-sync.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp-sync.mjs","sourceRoot":"","sources":["../../src/resources/senders/whatsapp-sync.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,QAAQ,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,iBAAiB,CACf,QAAgB,EAChB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,eAAe,QAAQ,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,gBAAgB,CACd,QAAgB,EAChB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,eAAe,QAAQ,wBAAwB,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;CACF"}
|