@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
|
@@ -30,3 +30,12 @@ export {
|
|
|
30
30
|
type SenderUploadProfilePictureParams,
|
|
31
31
|
type SendersCursor,
|
|
32
32
|
} from './senders';
|
|
33
|
+
export {
|
|
34
|
+
WhatsappSync,
|
|
35
|
+
type WhatsAppSyncContacts,
|
|
36
|
+
type WhatsAppSyncHistory,
|
|
37
|
+
type WhatsAppSyncStatus,
|
|
38
|
+
type WhatsappSyncRetrieveResponse,
|
|
39
|
+
type WhatsappSyncStartContactsSyncResponse,
|
|
40
|
+
type WhatsappSyncStartHistorySyncResponse,
|
|
41
|
+
} from './whatsapp-sync';
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as WhatsappSyncAPI from './whatsapp-sync';
|
|
5
|
+
import {
|
|
6
|
+
WhatsAppSyncContacts,
|
|
7
|
+
WhatsAppSyncHistory,
|
|
8
|
+
WhatsAppSyncStatus,
|
|
9
|
+
WhatsappSync,
|
|
10
|
+
WhatsappSyncRetrieveResponse,
|
|
11
|
+
WhatsappSyncStartContactsSyncResponse,
|
|
12
|
+
WhatsappSyncStartHistorySyncResponse,
|
|
13
|
+
} from './whatsapp-sync';
|
|
4
14
|
import * as AgentAPI from './agent/agent';
|
|
5
15
|
import {
|
|
6
16
|
Agent,
|
|
@@ -21,6 +31,7 @@ import { path } from '../../internal/utils/path';
|
|
|
21
31
|
|
|
22
32
|
export class Senders extends APIResource {
|
|
23
33
|
agent: AgentAPI.AgentResource = new AgentAPI.AgentResource(this._client);
|
|
34
|
+
whatsappSync: WhatsappSyncAPI.WhatsappSync = new WhatsappSyncAPI.WhatsappSync(this._client);
|
|
24
35
|
|
|
25
36
|
/**
|
|
26
37
|
* Create sender
|
|
@@ -291,6 +302,8 @@ export interface SenderWebhook {
|
|
|
291
302
|
* - `message.sent`: Message accepted by the provider. `data.status` = `sent`
|
|
292
303
|
* - `message.delivered`: Message delivered to recipient. `data.status` =
|
|
293
304
|
* `delivered`
|
|
305
|
+
* - `message.read`: Message was read by the recipient (WhatsApp only).
|
|
306
|
+
* `data.status` = `read`
|
|
294
307
|
* - `message.failed`: Message failed to send. `data.status` = `failed`
|
|
295
308
|
*
|
|
296
309
|
* **Inbound events:**
|
|
@@ -299,20 +312,33 @@ export interface SenderWebhook {
|
|
|
299
312
|
* delivered as `message.inbound` with `messageType='reaction'`
|
|
300
313
|
* - `message.unsupported`: Received a message type that is not supported
|
|
301
314
|
*
|
|
315
|
+
* **Broadcast events:**
|
|
316
|
+
*
|
|
317
|
+
* - `broadcast.status_changed`: Broadcast status changed (pending_review,
|
|
318
|
+
* approved, rejected, sending, completed, cancelled)
|
|
319
|
+
*
|
|
302
320
|
* **Other events:**
|
|
303
321
|
*
|
|
304
322
|
* - `conversation.new`: New conversation started with a contact
|
|
305
323
|
* - `template.status_changed`: WhatsApp template approval status changed
|
|
324
|
+
*
|
|
325
|
+
* **Partner events:**
|
|
326
|
+
*
|
|
327
|
+
* - `invitation.status_changed`: A partner invitation status changed (pending,
|
|
328
|
+
* in_progress, completed, cancelled)
|
|
306
329
|
*/
|
|
307
330
|
export type WebhookEvent =
|
|
308
331
|
| 'message.queued'
|
|
309
332
|
| 'message.sent'
|
|
310
333
|
| 'message.delivered'
|
|
334
|
+
| 'message.read'
|
|
311
335
|
| 'message.failed'
|
|
312
336
|
| 'message.inbound'
|
|
313
337
|
| 'message.unsupported'
|
|
338
|
+
| 'broadcast.status_changed'
|
|
314
339
|
| 'conversation.new'
|
|
315
|
-
| 'template.status_changed'
|
|
340
|
+
| 'template.status_changed'
|
|
341
|
+
| 'invitation.status_changed';
|
|
316
342
|
|
|
317
343
|
export interface WebhookSecretResponse {
|
|
318
344
|
/**
|
|
@@ -501,6 +527,7 @@ export interface SenderUploadProfilePictureParams {
|
|
|
501
527
|
}
|
|
502
528
|
|
|
503
529
|
Senders.AgentResource = AgentResource;
|
|
530
|
+
Senders.WhatsappSync = WhatsappSync;
|
|
504
531
|
|
|
505
532
|
export declare namespace Senders {
|
|
506
533
|
export {
|
|
@@ -532,4 +559,14 @@ export declare namespace Senders {
|
|
|
532
559
|
type AgentCreateParams as AgentCreateParams,
|
|
533
560
|
type AgentUpdateParams as AgentUpdateParams,
|
|
534
561
|
};
|
|
562
|
+
|
|
563
|
+
export {
|
|
564
|
+
WhatsappSync as WhatsappSync,
|
|
565
|
+
type WhatsAppSyncContacts as WhatsAppSyncContacts,
|
|
566
|
+
type WhatsAppSyncHistory as WhatsAppSyncHistory,
|
|
567
|
+
type WhatsAppSyncStatus as WhatsAppSyncStatus,
|
|
568
|
+
type WhatsappSyncRetrieveResponse as WhatsappSyncRetrieveResponse,
|
|
569
|
+
type WhatsappSyncStartContactsSyncResponse as WhatsappSyncStartContactsSyncResponse,
|
|
570
|
+
type WhatsappSyncStartHistorySyncResponse as WhatsappSyncStartHistorySyncResponse,
|
|
571
|
+
};
|
|
535
572
|
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class WhatsappSync extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get the current sync status for a sender's WhatsApp coexistence account. Only
|
|
11
|
+
* available for senders connected in coexistence mode (WhatsApp Business App +
|
|
12
|
+
* Cloud API).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const whatsappSync =
|
|
17
|
+
* await client.senders.whatsappSync.retrieve('senderId');
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
retrieve(senderID: string, options?: RequestOptions): APIPromise<WhatsappSyncRetrieveResponse> {
|
|
21
|
+
return this._client.get(path`/v1/senders/${senderID}/whatsapp-sync`, options);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Initiate contact names sync from the WhatsApp Business App. This imports contact
|
|
26
|
+
* names stored in the app to Zavu. Only available for coexistence accounts with
|
|
27
|
+
* active status.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response =
|
|
32
|
+
* await client.senders.whatsappSync.startContactsSync(
|
|
33
|
+
* 'senderId',
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
startContactsSync(
|
|
38
|
+
senderID: string,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<WhatsappSyncStartContactsSyncResponse> {
|
|
41
|
+
return this._client.post(path`/v1/senders/${senderID}/whatsapp-sync/contacts`, options);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Initiate message history sync from the WhatsApp Business App. This sends a
|
|
46
|
+
* request to the account owner to approve sharing their conversation history. Only
|
|
47
|
+
* available for coexistence accounts with active status.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const response =
|
|
52
|
+
* await client.senders.whatsappSync.startHistorySync(
|
|
53
|
+
* 'senderId',
|
|
54
|
+
* );
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
startHistorySync(
|
|
58
|
+
senderID: string,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): APIPromise<WhatsappSyncStartHistorySyncResponse> {
|
|
61
|
+
return this._client.post(path`/v1/senders/${senderID}/whatsapp-sync/history`, options);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Contacts sync status details.
|
|
67
|
+
*/
|
|
68
|
+
export interface WhatsAppSyncContacts {
|
|
69
|
+
/**
|
|
70
|
+
* Whether contacts sync can be initiated.
|
|
71
|
+
*/
|
|
72
|
+
canSync: boolean;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Status of WhatsApp contacts sync.
|
|
76
|
+
*/
|
|
77
|
+
status: 'not_requested' | 'pending' | 'syncing' | 'completed';
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* When the sync was last requested.
|
|
81
|
+
*/
|
|
82
|
+
requestedAt?: string | null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* History sync status details.
|
|
87
|
+
*/
|
|
88
|
+
export interface WhatsAppSyncHistory {
|
|
89
|
+
/**
|
|
90
|
+
* Whether history sync can be initiated.
|
|
91
|
+
*/
|
|
92
|
+
canSync: boolean;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Status of WhatsApp message history sync.
|
|
96
|
+
*/
|
|
97
|
+
status: 'not_requested' | 'pending' | 'syncing' | 'completed' | 'rejected';
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* When the sync was completed.
|
|
101
|
+
*/
|
|
102
|
+
completedAt?: string | null;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* When the sync was last requested.
|
|
106
|
+
*/
|
|
107
|
+
requestedAt?: string | null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* WhatsApp coexistence sync status.
|
|
112
|
+
*/
|
|
113
|
+
export interface WhatsAppSyncStatus {
|
|
114
|
+
/**
|
|
115
|
+
* Contacts sync status details.
|
|
116
|
+
*/
|
|
117
|
+
contacts: WhatsAppSyncContacts;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* History sync status details.
|
|
121
|
+
*/
|
|
122
|
+
history: WhatsAppSyncHistory;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Whether the account is in coexistence mode.
|
|
126
|
+
*/
|
|
127
|
+
isCoexistence: boolean;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* WhatsApp account status.
|
|
131
|
+
*/
|
|
132
|
+
status: 'pending_verification' | 'pending_registration' | 'active' | 'disconnected' | 'error';
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface WhatsappSyncRetrieveResponse {
|
|
136
|
+
/**
|
|
137
|
+
* WhatsApp coexistence sync status.
|
|
138
|
+
*/
|
|
139
|
+
sync: WhatsAppSyncStatus;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface WhatsappSyncStartContactsSyncResponse {
|
|
143
|
+
/**
|
|
144
|
+
* Success message.
|
|
145
|
+
*/
|
|
146
|
+
message: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* WhatsApp coexistence sync status.
|
|
150
|
+
*/
|
|
151
|
+
sync: WhatsAppSyncStatus;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface WhatsappSyncStartHistorySyncResponse {
|
|
155
|
+
/**
|
|
156
|
+
* Success message.
|
|
157
|
+
*/
|
|
158
|
+
message: string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* WhatsApp coexistence sync status.
|
|
162
|
+
*/
|
|
163
|
+
sync: WhatsAppSyncStatus;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export declare namespace WhatsappSync {
|
|
167
|
+
export {
|
|
168
|
+
type WhatsAppSyncContacts as WhatsAppSyncContacts,
|
|
169
|
+
type WhatsAppSyncHistory as WhatsAppSyncHistory,
|
|
170
|
+
type WhatsAppSyncStatus as WhatsAppSyncStatus,
|
|
171
|
+
type WhatsappSyncRetrieveResponse as WhatsappSyncRetrieveResponse,
|
|
172
|
+
type WhatsappSyncStartContactsSyncResponse as WhatsappSyncStartContactsSyncResponse,
|
|
173
|
+
type WhatsappSyncStartHistorySyncResponse as WhatsappSyncStartHistorySyncResponse,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class APIKeys extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create sub-account API key
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const apiKey = await client.subAccounts.apiKeys.create(
|
|
16
|
+
* 'id',
|
|
17
|
+
* { name: 'Production Key', environment: 'live' },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
create(id: string, body: APIKeyCreateParams, options?: RequestOptions): APIPromise<APIKeyCreateResponse> {
|
|
22
|
+
return this._client.post(path`/v1/sub-accounts/${id}/api-keys`, { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List sub-account API keys
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const apiKeys = await client.subAccounts.apiKeys.list('id');
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
list(id: string, options?: RequestOptions): APIPromise<APIKeyListResponse> {
|
|
34
|
+
return this._client.get(path`/v1/sub-accounts/${id}/api-keys`, options);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Revoke sub-account API key
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* await client.subAccounts.apiKeys.revoke('keyId', {
|
|
43
|
+
* id: 'id',
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
revoke(keyID: string, params: APIKeyRevokeParams, options?: RequestOptions): APIPromise<void> {
|
|
48
|
+
const { id } = params;
|
|
49
|
+
return this._client.delete(path`/v1/sub-accounts/${id}/api-keys/${keyID}`, {
|
|
50
|
+
...options,
|
|
51
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface APIKeyCreateResponse {
|
|
57
|
+
apiKey: APIKeyCreateResponse.APIKey;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export namespace APIKeyCreateResponse {
|
|
61
|
+
export interface APIKey {
|
|
62
|
+
id: string;
|
|
63
|
+
|
|
64
|
+
environment: 'live' | 'test';
|
|
65
|
+
|
|
66
|
+
key: string;
|
|
67
|
+
|
|
68
|
+
name: string;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface APIKeyListResponse {
|
|
73
|
+
items: Array<APIKeyListResponse.Item>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export namespace APIKeyListResponse {
|
|
77
|
+
export interface Item {
|
|
78
|
+
id: string;
|
|
79
|
+
|
|
80
|
+
createdAt: number;
|
|
81
|
+
|
|
82
|
+
environment: 'live' | 'test';
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* First characters of the key for identification.
|
|
86
|
+
*/
|
|
87
|
+
keyPrefix: string;
|
|
88
|
+
|
|
89
|
+
name: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Full API key. Only returned on creation.
|
|
93
|
+
*/
|
|
94
|
+
key?: string;
|
|
95
|
+
|
|
96
|
+
lastUsedAt?: number | null;
|
|
97
|
+
|
|
98
|
+
permissions?: Array<string>;
|
|
99
|
+
|
|
100
|
+
revokedAt?: number | null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface APIKeyCreateParams {
|
|
105
|
+
name: string;
|
|
106
|
+
|
|
107
|
+
environment?: 'live' | 'test';
|
|
108
|
+
|
|
109
|
+
permissions?: Array<string>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface APIKeyRevokeParams {
|
|
113
|
+
/**
|
|
114
|
+
* Sub-account ID.
|
|
115
|
+
*/
|
|
116
|
+
id: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export declare namespace APIKeys {
|
|
120
|
+
export {
|
|
121
|
+
type APIKeyCreateResponse as APIKeyCreateResponse,
|
|
122
|
+
type APIKeyListResponse as APIKeyListResponse,
|
|
123
|
+
type APIKeyCreateParams as APIKeyCreateParams,
|
|
124
|
+
type APIKeyRevokeParams as APIKeyRevokeParams,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
APIKeys,
|
|
5
|
+
type APIKeyCreateResponse,
|
|
6
|
+
type APIKeyListResponse,
|
|
7
|
+
type APIKeyCreateParams,
|
|
8
|
+
type APIKeyRevokeParams,
|
|
9
|
+
} from './api-keys';
|
|
10
|
+
export {
|
|
11
|
+
SubAccounts,
|
|
12
|
+
type SubAccount,
|
|
13
|
+
type SubAccountCreateResponse,
|
|
14
|
+
type SubAccountRetrieveResponse,
|
|
15
|
+
type SubAccountUpdateResponse,
|
|
16
|
+
type SubAccountDeactivateResponse,
|
|
17
|
+
type SubAccountGetBalanceResponse,
|
|
18
|
+
type SubAccountCreateParams,
|
|
19
|
+
type SubAccountUpdateParams,
|
|
20
|
+
type SubAccountListParams,
|
|
21
|
+
type SubAccountsCursor,
|
|
22
|
+
} from './sub-accounts';
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as APIKeysAPI from './api-keys';
|
|
5
|
+
import {
|
|
6
|
+
APIKeyCreateParams,
|
|
7
|
+
APIKeyCreateResponse,
|
|
8
|
+
APIKeyListResponse,
|
|
9
|
+
APIKeyRevokeParams,
|
|
10
|
+
APIKeys,
|
|
11
|
+
} from './api-keys';
|
|
12
|
+
import { APIPromise } from '../../core/api-promise';
|
|
13
|
+
import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
|
|
14
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
15
|
+
import { path } from '../../internal/utils/path';
|
|
16
|
+
|
|
17
|
+
export class SubAccounts extends APIResource {
|
|
18
|
+
apiKeys: APIKeysAPI.APIKeys = new APIKeysAPI.APIKeys(this._client);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Create a new sub-account (project) with its own API key. All charges are billed
|
|
22
|
+
* to the parent team's balance. Use creditLimit to set a spending cap. The
|
|
23
|
+
* sub-account's API key is returned only in the creation response.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const subAccount = await client.subAccounts.create({
|
|
28
|
+
* name: 'Client ABC',
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
create(body: SubAccountCreateParams, options?: RequestOptions): APIPromise<SubAccountCreateResponse> {
|
|
33
|
+
return this._client.post('/v1/sub-accounts', { body, ...options });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Get sub-account
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const subAccount = await client.subAccounts.retrieve('id');
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<SubAccountRetrieveResponse> {
|
|
45
|
+
return this._client.get(path`/v1/sub-accounts/${id}`, options);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Update sub-account
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const subAccount = await client.subAccounts.update('id');
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
update(
|
|
57
|
+
id: string,
|
|
58
|
+
body: SubAccountUpdateParams,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): APIPromise<SubAccountUpdateResponse> {
|
|
61
|
+
return this._client.patch(path`/v1/sub-accounts/${id}`, { body, ...options });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* List sub-accounts for this team.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* // Automatically fetches more pages as needed.
|
|
70
|
+
* for await (const subAccount of client.subAccounts.list()) {
|
|
71
|
+
* // ...
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
list(
|
|
76
|
+
query: SubAccountListParams | null | undefined = {},
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): PagePromise<SubAccountsCursor, SubAccount> {
|
|
79
|
+
return this._client.getAPIList('/v1/sub-accounts', Cursor<SubAccount>, { query, ...options });
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Deactivate a sub-account. Remaining balance is returned to the parent team and
|
|
84
|
+
* all API keys are revoked.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* const response = await client.subAccounts.deactivate('id');
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
deactivate(id: string, options?: RequestOptions): APIPromise<SubAccountDeactivateResponse> {
|
|
92
|
+
return this._client.delete(path`/v1/sub-accounts/${id}`, options);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Get spending information for a sub-account. Returns the parent team's balance,
|
|
97
|
+
* the sub-account's total spending, and its credit limit (spending cap).
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* const response = await client.subAccounts.getBalance('id');
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
getBalance(id: string, options?: RequestOptions): APIPromise<SubAccountGetBalanceResponse> {
|
|
105
|
+
return this._client.get(path`/v1/sub-accounts/${id}/balance`, options);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type SubAccountsCursor = Cursor<SubAccount>;
|
|
110
|
+
|
|
111
|
+
export interface SubAccount {
|
|
112
|
+
id: string;
|
|
113
|
+
|
|
114
|
+
createdAt: string;
|
|
115
|
+
|
|
116
|
+
name: string;
|
|
117
|
+
|
|
118
|
+
status: 'active' | 'inactive';
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Total amount spent by this sub-account in cents.
|
|
122
|
+
*/
|
|
123
|
+
totalSpent: number;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* API key for the sub-account. Only returned on creation.
|
|
127
|
+
*/
|
|
128
|
+
apiKey?: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Spending cap in cents. When reached, messages from this sub-account will be
|
|
132
|
+
* blocked.
|
|
133
|
+
*/
|
|
134
|
+
creditLimit?: number | null;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* External reference ID set by the parent account.
|
|
138
|
+
*/
|
|
139
|
+
externalId?: string | null;
|
|
140
|
+
|
|
141
|
+
metadata?: { [key: string]: unknown } | null;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface SubAccountCreateResponse {
|
|
145
|
+
subAccount: SubAccount;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface SubAccountRetrieveResponse {
|
|
149
|
+
subAccount: SubAccount;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface SubAccountUpdateResponse {
|
|
153
|
+
subAccount: SubAccount;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface SubAccountDeactivateResponse {
|
|
157
|
+
/**
|
|
158
|
+
* Number of API keys revoked.
|
|
159
|
+
*/
|
|
160
|
+
keysRevoked: number;
|
|
161
|
+
|
|
162
|
+
message: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface SubAccountGetBalanceResponse {
|
|
166
|
+
/**
|
|
167
|
+
* Team balance in cents. All charges are billed to the parent team.
|
|
168
|
+
*/
|
|
169
|
+
balance: number;
|
|
170
|
+
|
|
171
|
+
currency: string;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Spending cap in cents (only for sub-accounts).
|
|
175
|
+
*/
|
|
176
|
+
creditLimit?: number | null;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Whether this API key belongs to a sub-account.
|
|
180
|
+
*/
|
|
181
|
+
isSubAccount?: boolean;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Total amount spent by this sub-account in cents (only for sub-accounts).
|
|
185
|
+
*/
|
|
186
|
+
totalSpent?: number | null;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface SubAccountCreateParams {
|
|
190
|
+
/**
|
|
191
|
+
* Name of the sub-account.
|
|
192
|
+
*/
|
|
193
|
+
name: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Spending cap in cents. When reached, messages from this sub-account will be
|
|
197
|
+
* blocked. Omit or set to 0 for no limit.
|
|
198
|
+
*/
|
|
199
|
+
creditLimit?: number;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* External reference ID for your own tracking.
|
|
203
|
+
*/
|
|
204
|
+
externalId?: string;
|
|
205
|
+
|
|
206
|
+
metadata?: { [key: string]: unknown };
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface SubAccountUpdateParams {
|
|
210
|
+
creditLimit?: number | null;
|
|
211
|
+
|
|
212
|
+
externalId?: string;
|
|
213
|
+
|
|
214
|
+
metadata?: { [key: string]: unknown };
|
|
215
|
+
|
|
216
|
+
name?: string;
|
|
217
|
+
|
|
218
|
+
status?: 'active' | 'inactive';
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export interface SubAccountListParams extends CursorParams {}
|
|
222
|
+
|
|
223
|
+
SubAccounts.APIKeys = APIKeys;
|
|
224
|
+
|
|
225
|
+
export declare namespace SubAccounts {
|
|
226
|
+
export {
|
|
227
|
+
type SubAccount as SubAccount,
|
|
228
|
+
type SubAccountCreateResponse as SubAccountCreateResponse,
|
|
229
|
+
type SubAccountRetrieveResponse as SubAccountRetrieveResponse,
|
|
230
|
+
type SubAccountUpdateResponse as SubAccountUpdateResponse,
|
|
231
|
+
type SubAccountDeactivateResponse as SubAccountDeactivateResponse,
|
|
232
|
+
type SubAccountGetBalanceResponse as SubAccountGetBalanceResponse,
|
|
233
|
+
type SubAccountsCursor as SubAccountsCursor,
|
|
234
|
+
type SubAccountCreateParams as SubAccountCreateParams,
|
|
235
|
+
type SubAccountUpdateParams as SubAccountUpdateParams,
|
|
236
|
+
type SubAccountListParams as SubAccountListParams,
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
export {
|
|
240
|
+
APIKeys as APIKeys,
|
|
241
|
+
type APIKeyCreateResponse as APIKeyCreateResponse,
|
|
242
|
+
type APIKeyListResponse as APIKeyListResponse,
|
|
243
|
+
type APIKeyCreateParams as APIKeyCreateParams,
|
|
244
|
+
type APIKeyRevokeParams as APIKeyRevokeParams,
|
|
245
|
+
};
|
|
246
|
+
}
|