@zavudev/sdk 0.31.0 → 0.43.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 +197 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +36 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +36 -6
- package/client.d.ts.map +1 -1
- package/client.js +42 -1
- package/client.js.map +1 -1
- package/client.mjs +42 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +10 -10
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +10 -10
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.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/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/addresses.d.mts.map +1 -1
- package/resources/addresses.d.ts.map +1 -1
- package/resources/addresses.mjs.map +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 +43 -2
- package/resources/broadcasts/broadcasts.d.mts.map +1 -1
- package/resources/broadcasts/broadcasts.d.ts +43 -2
- 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/contacts.d.mts +9 -1
- package/resources/broadcasts/contacts.d.mts.map +1 -1
- package/resources/broadcasts/contacts.d.ts +9 -1
- package/resources/broadcasts/contacts.d.ts.map +1 -1
- package/resources/broadcasts/contacts.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/broadcasts.d.mts.map +1 -1
- package/resources/broadcasts.d.ts.map +1 -1
- package/resources/broadcasts.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 +276 -0
- package/resources/contacts/contacts.d.mts.map +1 -0
- package/resources/contacts/contacts.d.ts +276 -0
- package/resources/contacts/contacts.d.ts.map +1 -0
- package/resources/contacts/contacts.js +137 -0
- package/resources/contacts/contacts.js.map +1 -0
- package/resources/contacts/contacts.mjs +132 -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/functions/functions.d.mts +420 -0
- package/resources/functions/functions.d.mts.map +1 -0
- package/resources/functions/functions.d.ts +420 -0
- package/resources/functions/functions.d.ts.map +1 -0
- package/resources/functions/functions.js +129 -0
- package/resources/functions/functions.js.map +1 -0
- package/resources/functions/functions.mjs +124 -0
- package/resources/functions/functions.mjs.map +1 -0
- package/resources/functions/index.d.mts +3 -0
- package/resources/functions/index.d.mts.map +1 -0
- package/resources/functions/index.d.ts +3 -0
- package/resources/functions/index.d.ts.map +1 -0
- package/resources/functions/index.js +9 -0
- package/resources/functions/index.js.map +1 -0
- package/resources/functions/index.mjs +4 -0
- package/resources/functions/index.mjs.map +1 -0
- package/resources/functions/secrets.d.mts +78 -0
- package/resources/functions/secrets.d.mts.map +1 -0
- package/resources/functions/secrets.d.ts +78 -0
- package/resources/functions/secrets.d.ts.map +1 -0
- package/resources/functions/secrets.js +61 -0
- package/resources/functions/secrets.js.map +1 -0
- package/resources/functions/secrets.mjs +57 -0
- package/resources/functions/secrets.mjs.map +1 -0
- package/resources/functions.d.mts +2 -0
- package/resources/functions.d.mts.map +1 -0
- package/resources/functions.d.ts +2 -0
- package/resources/functions.d.ts.map +1 -0
- package/resources/functions.js +6 -0
- package/resources/functions.js.map +1 -0
- package/resources/functions.mjs +3 -0
- package/resources/functions.mjs.map +1 -0
- package/resources/index.d.mts +13 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +13 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +22 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +11 -1
- package/resources/index.mjs.map +1 -1
- package/resources/introspect.d.mts.map +1 -1
- package/resources/introspect.d.ts.map +1 -1
- package/resources/introspect.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/me.d.mts +34 -0
- package/resources/me.d.mts.map +1 -0
- package/resources/me.d.ts +34 -0
- package/resources/me.d.ts.map +1 -0
- package/resources/me.js +16 -0
- package/resources/me.js.map +1 -0
- package/resources/me.mjs +12 -0
- package/resources/me.mjs.map +1 -0
- package/resources/messages.d.mts +112 -7
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +112 -7
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +24 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +24 -0
- package/resources/messages.mjs.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/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers.mjs.map +1 -1
- 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/regulatory-documents.d.mts.map +1 -1
- package/resources/regulatory-documents.d.ts.map +1 -1
- package/resources/regulatory-documents.mjs.map +1 -1
- package/resources/senders/agent/agent.d.mts +6 -6
- package/resources/senders/agent/agent.d.mts.map +1 -1
- package/resources/senders/agent/agent.d.ts +6 -6
- 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 +1 -1
- package/resources/senders/agent/agent.mjs.map +1 -1
- package/resources/senders/agent/executions.d.mts +22 -1
- package/resources/senders/agent/executions.d.mts.map +1 -1
- package/resources/senders/agent/executions.d.ts +22 -1
- package/resources/senders/agent/executions.d.ts.map +1 -1
- package/resources/senders/agent/executions.js +17 -0
- package/resources/senders/agent/executions.js.map +1 -1
- package/resources/senders/agent/executions.mjs +17 -0
- package/resources/senders/agent/executions.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/flows.mjs.map +1 -1
- package/resources/senders/agent/index.d.mts +3 -3
- package/resources/senders/agent/index.d.mts.map +1 -1
- package/resources/senders/agent/index.d.ts +3 -3
- 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 +1 -1
- package/resources/senders/agent/index.mjs.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.d.mts.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.d.ts.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.mjs.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.d.mts.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.d.ts.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.mjs.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.d.mts.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.d.ts.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.mjs.map +1 -1
- package/resources/senders/agent/knowledge-bases.d.mts.map +1 -1
- package/resources/senders/agent/knowledge-bases.d.ts.map +1 -1
- package/resources/senders/agent/knowledge-bases.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/agent/tools.mjs.map +1 -1
- package/resources/senders/agent.d.mts.map +1 -1
- package/resources/senders/agent.d.ts.map +1 -1
- package/resources/senders/agent.mjs.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 +24 -1
- package/resources/senders/senders.d.mts.map +1 -1
- package/resources/senders/senders.d.ts +24 -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/senders.d.mts.map +1 -1
- package/resources/senders.d.ts.map +1 -1
- package/resources/senders.mjs.map +1 -1
- package/resources/sub-accounts/api-keys.d.mts +88 -0
- package/resources/sub-accounts/api-keys.d.mts.map +1 -0
- package/resources/sub-accounts/api-keys.d.ts +88 -0
- package/resources/sub-accounts/api-keys.d.ts.map +1 -0
- package/resources/sub-accounts/api-keys.js +56 -0
- package/resources/sub-accounts/api-keys.js.map +1 -0
- package/resources/sub-accounts/api-keys.mjs +52 -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 +174 -0
- package/resources/sub-accounts/sub-accounts.d.mts.map +1 -0
- package/resources/sub-accounts/sub-accounts.d.ts +174 -0
- package/resources/sub-accounts/sub-accounts.d.ts.map +1 -0
- package/resources/sub-accounts/sub-accounts.js +100 -0
- package/resources/sub-accounts/sub-accounts.js.map +1 -0
- package/resources/sub-accounts/sub-accounts.mjs +95 -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 +58 -2
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +58 -2
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.mjs.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/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +182 -6
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/env.ts +2 -2
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/balance.ts +43 -0
- package/src/resources/broadcasts/broadcasts.ts +50 -1
- package/src/resources/broadcasts/contacts.ts +8 -1
- package/src/resources/broadcasts/index.ts +2 -0
- package/src/resources/contacts/channels.ts +177 -0
- package/src/resources/contacts/contacts.ts +380 -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/functions/functions.ts +562 -0
- package/src/resources/functions/index.ts +23 -0
- package/src/resources/functions/secrets.ts +112 -0
- package/src/resources/functions.ts +3 -0
- package/src/resources/index.ts +68 -1
- package/src/resources/invitations.ts +188 -0
- package/src/resources/me.ts +49 -0
- package/src/resources/messages.ts +140 -4
- 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 +18 -2
- package/src/resources/senders/agent/executions.ts +36 -1
- package/src/resources/senders/agent/flows.ts +44 -126
- package/src/resources/senders/agent/index.ts +9 -1
- package/src/resources/senders/agent/tools.ts +13 -50
- package/src/resources/senders/index.ts +9 -0
- package/src/resources/senders/senders.ts +47 -1
- package/src/resources/senders/whatsapp-sync.ts +175 -0
- package/src/resources/sub-accounts/api-keys.ts +129 -0
- package/src/resources/sub-accounts/index.ts +22 -0
- package/src/resources/sub-accounts/sub-accounts.ts +252 -0
- package/src/resources/sub-accounts.ts +3 -0
- package/src/resources/templates.ts +69 -2
- package/src/resources/urls.ts +125 -0
- package/src/resources/usage.ts +48 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/messages.d.mts
CHANGED
|
@@ -67,6 +67,21 @@ export declare class Messages extends APIResource {
|
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
69
|
send(params: MessageSendParams, options?: RequestOptions): APIPromise<MessageResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Mark an inbound WhatsApp message as read and display a typing indicator to the
|
|
72
|
+
* user while you prepare a response. The indicator is automatically dismissed when
|
|
73
|
+
* you send a reply, or after 25 seconds — whichever comes first. Only valid for
|
|
74
|
+
* inbound WhatsApp messages. Use this when a reply will take more than a couple of
|
|
75
|
+
* seconds (LLM agent, tool call, lookup) to improve the recipient's experience.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const response = await client.messages.showTyping(
|
|
80
|
+
* 'messageId',
|
|
81
|
+
* );
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
showTyping(messageID: string, params?: MessageShowTypingParams | null | undefined, options?: RequestOptions): APIPromise<MessageShowTypingResponse>;
|
|
70
85
|
}
|
|
71
86
|
export type MessagesCursor = Cursor<Message>;
|
|
72
87
|
/**
|
|
@@ -132,6 +147,29 @@ export interface MessageContent {
|
|
|
132
147
|
* Contact cards for contact messages.
|
|
133
148
|
*/
|
|
134
149
|
contacts?: Array<MessageContent.Contact>;
|
|
150
|
+
/**
|
|
151
|
+
* Button label for cta_url messages.
|
|
152
|
+
*/
|
|
153
|
+
ctaDisplayText?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Public HTTPS URL of the header media when ctaHeaderType is 'image', 'video', or
|
|
156
|
+
* 'document'. WhatsApp fetches this URL — it must be publicly reachable and return
|
|
157
|
+
* the declared content type.
|
|
158
|
+
*/
|
|
159
|
+
ctaHeaderMediaUrl?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Header text when ctaHeaderType is 'text'.
|
|
162
|
+
*/
|
|
163
|
+
ctaHeaderText?: string;
|
|
164
|
+
/**
|
|
165
|
+
* Optional header type for cta_url messages.
|
|
166
|
+
*/
|
|
167
|
+
ctaHeaderType?: 'text' | 'image' | 'video' | 'document';
|
|
168
|
+
/**
|
|
169
|
+
* Destination URL opened in the device's default browser when the button is
|
|
170
|
+
* tapped. Used with messageType=cta_url. WhatsApp requires HTTPS in production.
|
|
171
|
+
*/
|
|
172
|
+
ctaUrl?: string;
|
|
135
173
|
/**
|
|
136
174
|
* Emoji for reaction messages.
|
|
137
175
|
*/
|
|
@@ -140,6 +178,10 @@ export interface MessageContent {
|
|
|
140
178
|
* Filename for documents.
|
|
141
179
|
*/
|
|
142
180
|
filename?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Optional footer text for cta_url messages.
|
|
183
|
+
*/
|
|
184
|
+
footerText?: string;
|
|
143
185
|
/**
|
|
144
186
|
* Latitude for location messages.
|
|
145
187
|
*/
|
|
@@ -180,12 +222,32 @@ export interface MessageContent {
|
|
|
180
222
|
* Sections for list messages.
|
|
181
223
|
*/
|
|
182
224
|
sections?: Array<MessageContent.Section>;
|
|
225
|
+
/**
|
|
226
|
+
* Variables for dynamic button placeholders (URL buttons and OTP buttons). Keys
|
|
227
|
+
* are the button index (0, 1, 2) in the template's `buttons` array — not the
|
|
228
|
+
* placeholder name. Values substitute the `{{1}}` placeholder inside that button's
|
|
229
|
+
* URL.
|
|
230
|
+
*
|
|
231
|
+
* **WhatsApp constraints:**
|
|
232
|
+
*
|
|
233
|
+
* - URL buttons only accept `{{1}}` — positional, numeric, no whitespace, no name.
|
|
234
|
+
* Named placeholders like `{{token}}` are stored as literal URL text by Meta and
|
|
235
|
+
* cannot be substituted.
|
|
236
|
+
* - At most one placeholder per URL button.
|
|
237
|
+
* - A template may have at most three buttons.
|
|
238
|
+
* - Static URL buttons (no placeholder) and `quick_reply` buttons are not included
|
|
239
|
+
* here.
|
|
240
|
+
*/
|
|
241
|
+
templateButtonVariables?: {
|
|
242
|
+
[key: string]: string;
|
|
243
|
+
};
|
|
183
244
|
/**
|
|
184
245
|
* Template ID for template messages.
|
|
185
246
|
*/
|
|
186
247
|
templateId?: string;
|
|
187
248
|
/**
|
|
188
|
-
* Variables for
|
|
249
|
+
* Variables for body placeholders. Keys are positions (1, 2, 3, ...) matching the
|
|
250
|
+
* order placeholders appear in the template body.
|
|
189
251
|
*/
|
|
190
252
|
templateVariables?: {
|
|
191
253
|
[key: string]: string;
|
|
@@ -215,12 +277,15 @@ export declare namespace MessageContent {
|
|
|
215
277
|
export interface MessageResponse {
|
|
216
278
|
message: Message;
|
|
217
279
|
}
|
|
218
|
-
export type MessageStatus = 'queued' | 'sending' | 'sent' | 'delivered' | 'failed' | 'received' | 'pending_url_verification';
|
|
280
|
+
export type MessageStatus = 'queued' | 'sending' | 'sent' | 'delivered' | 'read' | 'failed' | 'received' | 'pending_url_verification';
|
|
219
281
|
/**
|
|
220
282
|
* Type of message. Non-text types are supported by WhatsApp and Telegram (varies
|
|
221
283
|
* by type).
|
|
222
284
|
*/
|
|
223
|
-
export type MessageType = 'text' | 'image' | 'video' | 'audio' | 'document' | 'sticker' | 'location' | 'contact' | 'buttons' | 'list' | 'reaction' | 'template';
|
|
285
|
+
export type MessageType = 'text' | 'image' | 'video' | 'audio' | 'document' | 'sticker' | 'location' | 'contact' | 'buttons' | 'list' | 'cta_url' | 'reaction' | 'template';
|
|
286
|
+
export interface MessageShowTypingResponse {
|
|
287
|
+
success: boolean;
|
|
288
|
+
}
|
|
224
289
|
export interface MessageListParams extends CursorParams {
|
|
225
290
|
/**
|
|
226
291
|
* Delivery channel. Use 'auto' for intelligent routing.
|
|
@@ -247,9 +312,14 @@ export interface MessageSendParams {
|
|
|
247
312
|
*/
|
|
248
313
|
to: string;
|
|
249
314
|
/**
|
|
250
|
-
* Body param:
|
|
251
|
-
*
|
|
252
|
-
|
|
315
|
+
* Body param: Email attachments. Only supported when channel is 'email'. Maximum
|
|
316
|
+
* 40MB total size.
|
|
317
|
+
*/
|
|
318
|
+
attachments?: Array<MessageSendParams.Attachment>;
|
|
319
|
+
/**
|
|
320
|
+
* Body param: Delivery channel. Use 'auto' for intelligent routing. If omitted,
|
|
321
|
+
* channel is auto-selected based on sender capabilities and recipient type. For
|
|
322
|
+
* email recipients, defaults to 'email'.
|
|
253
323
|
*/
|
|
254
324
|
channel?: Channel;
|
|
255
325
|
/**
|
|
@@ -304,7 +374,42 @@ export interface MessageSendParams {
|
|
|
304
374
|
*/
|
|
305
375
|
'Zavu-Sender'?: string;
|
|
306
376
|
}
|
|
377
|
+
export declare namespace MessageSendParams {
|
|
378
|
+
/**
|
|
379
|
+
* Email attachment. Provide either `content` (base64) or `path` (URL), not both.
|
|
380
|
+
*/
|
|
381
|
+
interface Attachment {
|
|
382
|
+
/**
|
|
383
|
+
* Name of the attached file.
|
|
384
|
+
*/
|
|
385
|
+
filename: string;
|
|
386
|
+
/**
|
|
387
|
+
* Content of the attached file as a Base64-encoded string.
|
|
388
|
+
*/
|
|
389
|
+
content?: string;
|
|
390
|
+
/**
|
|
391
|
+
* Content ID for inline images. Reference in HTML as
|
|
392
|
+
* `<img src="cid:your_content_id">`.
|
|
393
|
+
*/
|
|
394
|
+
content_id?: string;
|
|
395
|
+
/**
|
|
396
|
+
* MIME type of the attachment. If not set, will be derived from the filename.
|
|
397
|
+
*/
|
|
398
|
+
content_type?: string;
|
|
399
|
+
/**
|
|
400
|
+
* URL where the attachment file is hosted. The server will fetch the file.
|
|
401
|
+
*/
|
|
402
|
+
path?: string;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
export interface MessageShowTypingParams {
|
|
406
|
+
/**
|
|
407
|
+
* Optional sender profile ID. If omitted, the project's default sender will be
|
|
408
|
+
* used.
|
|
409
|
+
*/
|
|
410
|
+
'Zavu-Sender'?: string;
|
|
411
|
+
}
|
|
307
412
|
export declare namespace Messages {
|
|
308
|
-
export { type Channel as Channel, type Message as Message, type MessageContent as MessageContent, type MessageResponse as MessageResponse, type MessageStatus as MessageStatus, type MessageType as MessageType, type MessagesCursor as MessagesCursor, type MessageListParams as MessageListParams, type MessageReactParams as MessageReactParams, type MessageSendParams as MessageSendParams, };
|
|
413
|
+
export { type Channel as Channel, type Message as Message, type MessageContent as MessageContent, type MessageResponse as MessageResponse, type MessageStatus as MessageStatus, type MessageType as MessageType, type MessageShowTypingResponse as MessageShowTypingResponse, type MessagesCursor as MessagesCursor, type MessageListParams as MessageListParams, type MessageReactParams as MessageReactParams, type MessageSendParams as MessageSendParams, type MessageShowTypingParams as MessageShowTypingParams, };
|
|
309
414
|
}
|
|
310
415
|
//# sourceMappingURL=messages.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,+BAA2B;AAE5E,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;IAIlF;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,cAAc,EAAE,OAAO,CAAC;IAIvC;;;;;;;;;;;OAWG;IACH,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU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E,MAAM,CAAC;QAEjB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
package/resources/messages.d.ts
CHANGED
|
@@ -67,6 +67,21 @@ export declare class Messages extends APIResource {
|
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
69
|
send(params: MessageSendParams, options?: RequestOptions): APIPromise<MessageResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Mark an inbound WhatsApp message as read and display a typing indicator to the
|
|
72
|
+
* user while you prepare a response. The indicator is automatically dismissed when
|
|
73
|
+
* you send a reply, or after 25 seconds — whichever comes first. Only valid for
|
|
74
|
+
* inbound WhatsApp messages. Use this when a reply will take more than a couple of
|
|
75
|
+
* seconds (LLM agent, tool call, lookup) to improve the recipient's experience.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const response = await client.messages.showTyping(
|
|
80
|
+
* 'messageId',
|
|
81
|
+
* );
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
showTyping(messageID: string, params?: MessageShowTypingParams | null | undefined, options?: RequestOptions): APIPromise<MessageShowTypingResponse>;
|
|
70
85
|
}
|
|
71
86
|
export type MessagesCursor = Cursor<Message>;
|
|
72
87
|
/**
|
|
@@ -132,6 +147,29 @@ export interface MessageContent {
|
|
|
132
147
|
* Contact cards for contact messages.
|
|
133
148
|
*/
|
|
134
149
|
contacts?: Array<MessageContent.Contact>;
|
|
150
|
+
/**
|
|
151
|
+
* Button label for cta_url messages.
|
|
152
|
+
*/
|
|
153
|
+
ctaDisplayText?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Public HTTPS URL of the header media when ctaHeaderType is 'image', 'video', or
|
|
156
|
+
* 'document'. WhatsApp fetches this URL — it must be publicly reachable and return
|
|
157
|
+
* the declared content type.
|
|
158
|
+
*/
|
|
159
|
+
ctaHeaderMediaUrl?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Header text when ctaHeaderType is 'text'.
|
|
162
|
+
*/
|
|
163
|
+
ctaHeaderText?: string;
|
|
164
|
+
/**
|
|
165
|
+
* Optional header type for cta_url messages.
|
|
166
|
+
*/
|
|
167
|
+
ctaHeaderType?: 'text' | 'image' | 'video' | 'document';
|
|
168
|
+
/**
|
|
169
|
+
* Destination URL opened in the device's default browser when the button is
|
|
170
|
+
* tapped. Used with messageType=cta_url. WhatsApp requires HTTPS in production.
|
|
171
|
+
*/
|
|
172
|
+
ctaUrl?: string;
|
|
135
173
|
/**
|
|
136
174
|
* Emoji for reaction messages.
|
|
137
175
|
*/
|
|
@@ -140,6 +178,10 @@ export interface MessageContent {
|
|
|
140
178
|
* Filename for documents.
|
|
141
179
|
*/
|
|
142
180
|
filename?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Optional footer text for cta_url messages.
|
|
183
|
+
*/
|
|
184
|
+
footerText?: string;
|
|
143
185
|
/**
|
|
144
186
|
* Latitude for location messages.
|
|
145
187
|
*/
|
|
@@ -180,12 +222,32 @@ export interface MessageContent {
|
|
|
180
222
|
* Sections for list messages.
|
|
181
223
|
*/
|
|
182
224
|
sections?: Array<MessageContent.Section>;
|
|
225
|
+
/**
|
|
226
|
+
* Variables for dynamic button placeholders (URL buttons and OTP buttons). Keys
|
|
227
|
+
* are the button index (0, 1, 2) in the template's `buttons` array — not the
|
|
228
|
+
* placeholder name. Values substitute the `{{1}}` placeholder inside that button's
|
|
229
|
+
* URL.
|
|
230
|
+
*
|
|
231
|
+
* **WhatsApp constraints:**
|
|
232
|
+
*
|
|
233
|
+
* - URL buttons only accept `{{1}}` — positional, numeric, no whitespace, no name.
|
|
234
|
+
* Named placeholders like `{{token}}` are stored as literal URL text by Meta and
|
|
235
|
+
* cannot be substituted.
|
|
236
|
+
* - At most one placeholder per URL button.
|
|
237
|
+
* - A template may have at most three buttons.
|
|
238
|
+
* - Static URL buttons (no placeholder) and `quick_reply` buttons are not included
|
|
239
|
+
* here.
|
|
240
|
+
*/
|
|
241
|
+
templateButtonVariables?: {
|
|
242
|
+
[key: string]: string;
|
|
243
|
+
};
|
|
183
244
|
/**
|
|
184
245
|
* Template ID for template messages.
|
|
185
246
|
*/
|
|
186
247
|
templateId?: string;
|
|
187
248
|
/**
|
|
188
|
-
* Variables for
|
|
249
|
+
* Variables for body placeholders. Keys are positions (1, 2, 3, ...) matching the
|
|
250
|
+
* order placeholders appear in the template body.
|
|
189
251
|
*/
|
|
190
252
|
templateVariables?: {
|
|
191
253
|
[key: string]: string;
|
|
@@ -215,12 +277,15 @@ export declare namespace MessageContent {
|
|
|
215
277
|
export interface MessageResponse {
|
|
216
278
|
message: Message;
|
|
217
279
|
}
|
|
218
|
-
export type MessageStatus = 'queued' | 'sending' | 'sent' | 'delivered' | 'failed' | 'received' | 'pending_url_verification';
|
|
280
|
+
export type MessageStatus = 'queued' | 'sending' | 'sent' | 'delivered' | 'read' | 'failed' | 'received' | 'pending_url_verification';
|
|
219
281
|
/**
|
|
220
282
|
* Type of message. Non-text types are supported by WhatsApp and Telegram (varies
|
|
221
283
|
* by type).
|
|
222
284
|
*/
|
|
223
|
-
export type MessageType = 'text' | 'image' | 'video' | 'audio' | 'document' | 'sticker' | 'location' | 'contact' | 'buttons' | 'list' | 'reaction' | 'template';
|
|
285
|
+
export type MessageType = 'text' | 'image' | 'video' | 'audio' | 'document' | 'sticker' | 'location' | 'contact' | 'buttons' | 'list' | 'cta_url' | 'reaction' | 'template';
|
|
286
|
+
export interface MessageShowTypingResponse {
|
|
287
|
+
success: boolean;
|
|
288
|
+
}
|
|
224
289
|
export interface MessageListParams extends CursorParams {
|
|
225
290
|
/**
|
|
226
291
|
* Delivery channel. Use 'auto' for intelligent routing.
|
|
@@ -247,9 +312,14 @@ export interface MessageSendParams {
|
|
|
247
312
|
*/
|
|
248
313
|
to: string;
|
|
249
314
|
/**
|
|
250
|
-
* Body param:
|
|
251
|
-
*
|
|
252
|
-
|
|
315
|
+
* Body param: Email attachments. Only supported when channel is 'email'. Maximum
|
|
316
|
+
* 40MB total size.
|
|
317
|
+
*/
|
|
318
|
+
attachments?: Array<MessageSendParams.Attachment>;
|
|
319
|
+
/**
|
|
320
|
+
* Body param: Delivery channel. Use 'auto' for intelligent routing. If omitted,
|
|
321
|
+
* channel is auto-selected based on sender capabilities and recipient type. For
|
|
322
|
+
* email recipients, defaults to 'email'.
|
|
253
323
|
*/
|
|
254
324
|
channel?: Channel;
|
|
255
325
|
/**
|
|
@@ -304,7 +374,42 @@ export interface MessageSendParams {
|
|
|
304
374
|
*/
|
|
305
375
|
'Zavu-Sender'?: string;
|
|
306
376
|
}
|
|
377
|
+
export declare namespace MessageSendParams {
|
|
378
|
+
/**
|
|
379
|
+
* Email attachment. Provide either `content` (base64) or `path` (URL), not both.
|
|
380
|
+
*/
|
|
381
|
+
interface Attachment {
|
|
382
|
+
/**
|
|
383
|
+
* Name of the attached file.
|
|
384
|
+
*/
|
|
385
|
+
filename: string;
|
|
386
|
+
/**
|
|
387
|
+
* Content of the attached file as a Base64-encoded string.
|
|
388
|
+
*/
|
|
389
|
+
content?: string;
|
|
390
|
+
/**
|
|
391
|
+
* Content ID for inline images. Reference in HTML as
|
|
392
|
+
* `<img src="cid:your_content_id">`.
|
|
393
|
+
*/
|
|
394
|
+
content_id?: string;
|
|
395
|
+
/**
|
|
396
|
+
* MIME type of the attachment. If not set, will be derived from the filename.
|
|
397
|
+
*/
|
|
398
|
+
content_type?: string;
|
|
399
|
+
/**
|
|
400
|
+
* URL where the attachment file is hosted. The server will fetch the file.
|
|
401
|
+
*/
|
|
402
|
+
path?: string;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
export interface MessageShowTypingParams {
|
|
406
|
+
/**
|
|
407
|
+
* Optional sender profile ID. If omitted, the project's default sender will be
|
|
408
|
+
* used.
|
|
409
|
+
*/
|
|
410
|
+
'Zavu-Sender'?: string;
|
|
411
|
+
}
|
|
307
412
|
export declare namespace Messages {
|
|
308
|
-
export { type Channel as Channel, type Message as Message, type MessageContent as MessageContent, type MessageResponse as MessageResponse, type MessageStatus as MessageStatus, type MessageType as MessageType, type MessagesCursor as MessagesCursor, type MessageListParams as MessageListParams, type MessageReactParams as MessageReactParams, type MessageSendParams as MessageSendParams, };
|
|
413
|
+
export { type Channel as Channel, type Message as Message, type MessageContent as MessageContent, type MessageResponse as MessageResponse, type MessageStatus as MessageStatus, type MessageType as MessageType, type MessageShowTypingResponse as MessageShowTypingResponse, type MessagesCursor as MessagesCursor, type MessageListParams as MessageListParams, type MessageReactParams as MessageReactParams, type MessageSendParams as MessageSendParams, type MessageShowTypingParams as MessageShowTypingParams, };
|
|
309
414
|
}
|
|
310
415
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"messages.d.ts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BAAyB,EAC3D,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
package/resources/messages.js
CHANGED
|
@@ -95,6 +95,30 @@ class Messages extends resource_1.APIResource {
|
|
|
95
95
|
]),
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Mark an inbound WhatsApp message as read and display a typing indicator to the
|
|
100
|
+
* user while you prepare a response. The indicator is automatically dismissed when
|
|
101
|
+
* you send a reply, or after 25 seconds — whichever comes first. Only valid for
|
|
102
|
+
* inbound WhatsApp messages. Use this when a reply will take more than a couple of
|
|
103
|
+
* seconds (LLM agent, tool call, lookup) to improve the recipient's experience.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* const response = await client.messages.showTyping(
|
|
108
|
+
* 'messageId',
|
|
109
|
+
* );
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
showTyping(messageID, params = {}, options) {
|
|
113
|
+
const { 'Zavu-Sender': zavuSender } = params ?? {};
|
|
114
|
+
return this._client.post((0, path_1.path) `/v1/messages/${messageID}/typing`, {
|
|
115
|
+
...options,
|
|
116
|
+
headers: (0, headers_1.buildHeaders)([
|
|
117
|
+
{ ...(zavuSender != null ? { 'Zavu-Sender': zavuSender } : undefined) },
|
|
118
|
+
options?.headers,
|
|
119
|
+
]),
|
|
120
|
+
});
|
|
121
|
+
}
|
|
98
122
|
}
|
|
99
123
|
exports.Messages = Messages;
|
|
100
124
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDA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BACvE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,IAAI,CAAC,MAAyB,EAAE,OAAwB;QACtD,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACvE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,CACR,SAAiB,EACjB,SAAqD,EAAE,EACvD,OAAwB;QAExB,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,SAAS,EAAE;YAC/D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACvE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAhID,4BAgIC"}
|
package/resources/messages.mjs
CHANGED
|
@@ -92,5 +92,29 @@ export class Messages extends APIResource {
|
|
|
92
92
|
]),
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Mark an inbound WhatsApp message as read and display a typing indicator to the
|
|
97
|
+
* user while you prepare a response. The indicator is automatically dismissed when
|
|
98
|
+
* you send a reply, or after 25 seconds — whichever comes first. Only valid for
|
|
99
|
+
* inbound WhatsApp messages. Use this when a reply will take more than a couple of
|
|
100
|
+
* seconds (LLM agent, tool call, lookup) to improve the recipient's experience.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* const response = await client.messages.showTyping(
|
|
105
|
+
* 'messageId',
|
|
106
|
+
* );
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
showTyping(messageID, params = {}, options) {
|
|
110
|
+
const { 'Zavu-Sender': zavuSender } = params ?? {};
|
|
111
|
+
return this._client.post(path `/v1/messages/${messageID}/typing`, {
|
|
112
|
+
...options,
|
|
113
|
+
headers: buildHeaders([
|
|
114
|
+
{ ...(zavuSender != null ? { 'Zavu-Sender': zavuSender } : undefined) },
|
|
115
|
+
options?.headers,
|
|
116
|
+
]),
|
|
117
|
+
});
|
|
118
|
+
}
|
|
95
119
|
}
|
|
96
120
|
//# sourceMappingURL=messages.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,MAAM,EAAkC,+BAA2B;AAC5E,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,SAAS,EAAE,EAAE,OAAO,CAAC,C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