@mobilerun/sdk 5.4.0 → 5.6.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 +17 -0
- package/client.d.mts +10 -13
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -13
- package/client.d.ts.map +1 -1
- package/client.js +1 -3
- package/client.js.map +1 -1
- package/client.mjs +2 -4
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/apps.d.mts +23 -12
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +23 -12
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +8 -3
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +8 -3
- package/resources/apps.mjs.map +1 -1
- package/resources/assistant/conversations.d.mts +33 -21
- package/resources/assistant/conversations.d.mts.map +1 -1
- package/resources/assistant/conversations.d.ts +33 -21
- package/resources/assistant/conversations.d.ts.map +1 -1
- package/resources/assistant/conversations.js +16 -15
- package/resources/assistant/conversations.js.map +1 -1
- package/resources/assistant/conversations.mjs +16 -15
- package/resources/assistant/conversations.mjs.map +1 -1
- package/resources/connect/connect.d.mts +2 -2
- package/resources/connect/connect.d.mts.map +1 -1
- package/resources/connect/connect.d.ts +2 -2
- package/resources/connect/connect.d.ts.map +1 -1
- package/resources/connect/connect.js.map +1 -1
- package/resources/connect/connect.mjs.map +1 -1
- package/resources/connect/index.d.mts +1 -1
- package/resources/connect/index.d.mts.map +1 -1
- package/resources/connect/index.d.ts +1 -1
- package/resources/connect/index.d.ts.map +1 -1
- package/resources/connect/index.js.map +1 -1
- package/resources/connect/index.mjs.map +1 -1
- package/resources/connect/proxies.d.mts +118 -19
- package/resources/connect/proxies.d.mts.map +1 -1
- package/resources/connect/proxies.d.ts +118 -19
- package/resources/connect/proxies.d.ts.map +1 -1
- package/resources/connect/proxies.js +19 -0
- package/resources/connect/proxies.js.map +1 -1
- package/resources/connect/proxies.mjs +19 -0
- package/resources/connect/proxies.mjs.map +1 -1
- package/resources/devices/apps.d.mts +37 -17
- package/resources/devices/apps.d.mts.map +1 -1
- package/resources/devices/apps.d.ts +37 -17
- package/resources/devices/apps.d.ts.map +1 -1
- package/resources/devices/apps.js +15 -14
- package/resources/devices/apps.js.map +1 -1
- package/resources/devices/apps.mjs +15 -14
- package/resources/devices/apps.mjs.map +1 -1
- package/resources/devices/browser.d.mts +9 -3
- package/resources/devices/browser.d.mts.map +1 -1
- package/resources/devices/browser.d.ts +9 -3
- package/resources/devices/browser.d.ts.map +1 -1
- package/resources/devices/browser.js +9 -3
- package/resources/devices/browser.js.map +1 -1
- package/resources/devices/browser.mjs +9 -3
- package/resources/devices/browser.mjs.map +1 -1
- package/resources/devices/devices.d.mts +81 -27
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +81 -27
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +24 -11
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +24 -11
- package/resources/devices/devices.mjs.map +1 -1
- package/resources/devices/index.d.mts +2 -1
- package/resources/devices/index.d.mts.map +1 -1
- package/resources/devices/index.d.ts +2 -1
- package/resources/devices/index.d.ts.map +1 -1
- package/resources/devices/index.js +3 -1
- package/resources/devices/index.js.map +1 -1
- package/resources/devices/index.mjs +1 -0
- package/resources/devices/index.mjs.map +1 -1
- package/resources/devices/keyboard.d.mts +9 -3
- package/resources/devices/keyboard.d.mts.map +1 -1
- package/resources/devices/keyboard.d.ts +9 -3
- package/resources/devices/keyboard.d.ts.map +1 -1
- package/resources/devices/keyboard.js +3 -3
- package/resources/devices/keyboard.mjs +3 -3
- package/resources/devices/recordings.d.mts +13 -0
- package/resources/devices/recordings.d.mts.map +1 -1
- package/resources/devices/recordings.d.ts +13 -0
- package/resources/devices/recordings.d.ts.map +1 -1
- package/resources/devices/traffic-sessions.d.mts +163 -0
- package/resources/devices/traffic-sessions.d.mts.map +1 -0
- package/resources/devices/traffic-sessions.d.ts +163 -0
- package/resources/devices/traffic-sessions.d.ts.map +1 -0
- package/resources/devices/traffic-sessions.js +37 -0
- package/resources/devices/traffic-sessions.js.map +1 -0
- package/resources/devices/traffic-sessions.mjs +33 -0
- package/resources/devices/traffic-sessions.mjs.map +1 -0
- package/resources/files.d.mts +77 -19
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +77 -19
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +2 -10
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +2 -10
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +5 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -2
- package/resources/index.mjs.map +1 -1
- package/resources/mailboxes/connections.d.mts +64 -0
- package/resources/mailboxes/connections.d.mts.map +1 -0
- package/resources/mailboxes/connections.d.ts +64 -0
- package/resources/mailboxes/connections.d.ts.map +1 -0
- package/resources/mailboxes/connections.js +42 -0
- package/resources/mailboxes/connections.js.map +1 -0
- package/resources/mailboxes/connections.mjs +38 -0
- package/resources/mailboxes/connections.mjs.map +1 -0
- package/resources/mailboxes/index.d.mts +2 -1
- package/resources/mailboxes/index.d.mts.map +1 -1
- package/resources/mailboxes/index.d.ts +2 -1
- package/resources/mailboxes/index.d.ts.map +1 -1
- package/resources/mailboxes/index.js +3 -1
- package/resources/mailboxes/index.js.map +1 -1
- package/resources/mailboxes/index.mjs +1 -0
- package/resources/mailboxes/index.mjs.map +1 -1
- package/resources/mailboxes/mailboxes.d.mts +107 -50
- package/resources/mailboxes/mailboxes.d.mts.map +1 -1
- package/resources/mailboxes/mailboxes.d.ts +107 -50
- package/resources/mailboxes/mailboxes.d.ts.map +1 -1
- package/resources/mailboxes/mailboxes.js +34 -24
- package/resources/mailboxes/mailboxes.js.map +1 -1
- package/resources/mailboxes/mailboxes.mjs +34 -24
- package/resources/mailboxes/mailboxes.mjs.map +1 -1
- package/resources/mailboxes/messages.d.mts +2 -2
- package/resources/mailboxes/messages.d.ts +2 -2
- package/resources/mailboxes/messages.js +2 -2
- package/resources/mailboxes/messages.mjs +2 -2
- package/resources/messages/conversations.d.mts +4 -15
- package/resources/messages/conversations.d.mts.map +1 -1
- package/resources/messages/conversations.d.ts +4 -15
- package/resources/messages/conversations.d.ts.map +1 -1
- package/resources/messages/conversations.js +4 -15
- package/resources/messages/conversations.js.map +1 -1
- package/resources/messages/conversations.mjs +4 -15
- package/resources/messages/conversations.mjs.map +1 -1
- package/resources/messages/index.d.mts +1 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +28 -5
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +28 -5
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +11 -4
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +11 -4
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/notifications.d.mts +27 -1
- package/resources/notifications.d.mts.map +1 -1
- package/resources/notifications.d.ts +27 -1
- package/resources/notifications.d.ts.map +1 -1
- package/resources/notifications.js +17 -0
- package/resources/notifications.js.map +1 -1
- package/resources/notifications.mjs +17 -0
- package/resources/notifications.mjs.map +1 -1
- package/resources/numbers/index.d.mts +2 -2
- package/resources/numbers/index.d.mts.map +1 -1
- package/resources/numbers/index.d.ts +2 -2
- package/resources/numbers/index.d.ts.map +1 -1
- package/resources/numbers/index.js.map +1 -1
- package/resources/numbers/index.mjs +1 -1
- package/resources/numbers/index.mjs.map +1 -1
- package/resources/numbers/messages.d.mts +60 -1
- package/resources/numbers/messages.d.mts.map +1 -1
- package/resources/numbers/messages.d.ts +60 -1
- package/resources/numbers/messages.d.ts.map +1 -1
- package/resources/numbers/messages.js +21 -0
- package/resources/numbers/messages.js.map +1 -1
- package/resources/numbers/messages.mjs +21 -0
- package/resources/numbers/messages.mjs.map +1 -1
- package/resources/numbers/numbers.d.mts +167 -46
- package/resources/numbers/numbers.d.mts.map +1 -1
- package/resources/numbers/numbers.d.ts +167 -46
- package/resources/numbers/numbers.d.ts.map +1 -1
- package/resources/numbers/numbers.js +25 -40
- package/resources/numbers/numbers.js.map +1 -1
- package/resources/numbers/numbers.mjs +26 -41
- package/resources/numbers/numbers.mjs.map +1 -1
- package/resources/store/apps.d.mts +23 -2
- package/resources/store/apps.d.mts.map +1 -1
- package/resources/store/apps.d.ts +23 -2
- package/resources/store/apps.d.ts.map +1 -1
- package/resources/tasks/tasks.d.mts +84 -75
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +84 -75
- package/resources/tasks/tasks.d.ts.map +1 -1
- package/resources/tasks/tasks.js +2 -10
- package/resources/tasks/tasks.js.map +1 -1
- package/resources/tasks/tasks.mjs +2 -10
- package/resources/tasks/tasks.mjs.map +1 -1
- package/resources/webhooks/deliveries.d.mts +22 -31
- package/resources/webhooks/deliveries.d.mts.map +1 -1
- package/resources/webhooks/deliveries.d.ts +22 -31
- package/resources/webhooks/deliveries.d.ts.map +1 -1
- package/resources/webhooks/deliveries.js +4 -30
- package/resources/webhooks/deliveries.js.map +1 -1
- package/resources/webhooks/deliveries.mjs +4 -30
- package/resources/webhooks/deliveries.mjs.map +1 -1
- package/resources/webhooks/index.d.mts +1 -0
- package/resources/webhooks/index.d.mts.map +1 -1
- package/resources/webhooks/index.d.ts +1 -0
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/index.js +3 -1
- package/resources/webhooks/index.js.map +1 -1
- package/resources/webhooks/index.mjs +1 -0
- package/resources/webhooks/index.mjs.map +1 -1
- package/resources/webhooks/integrations.d.mts +77 -0
- package/resources/webhooks/integrations.d.mts.map +1 -0
- package/resources/webhooks/integrations.d.ts +77 -0
- package/resources/webhooks/integrations.d.ts.map +1 -0
- package/resources/webhooks/integrations.js +26 -0
- package/resources/webhooks/integrations.js.map +1 -0
- package/resources/webhooks/integrations.mjs +22 -0
- package/resources/webhooks/integrations.mjs.map +1 -0
- package/resources/webhooks/webhooks.d.mts +280 -71
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +280 -71
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +27 -60
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +27 -60
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/resources/workflows/action-catalog.d.mts +7 -3
- package/resources/workflows/action-catalog.d.mts.map +1 -1
- package/resources/workflows/action-catalog.d.ts +7 -3
- package/resources/workflows/action-catalog.d.ts.map +1 -1
- package/resources/workflows/actions/actions.d.mts +9 -5
- package/resources/workflows/actions/actions.d.mts.map +1 -1
- package/resources/workflows/actions/actions.d.ts +9 -5
- package/resources/workflows/actions/actions.d.ts.map +1 -1
- package/resources/workflows/actions/actions.js +4 -0
- package/resources/workflows/actions/actions.js.map +1 -1
- package/resources/workflows/actions/actions.mjs +4 -0
- package/resources/workflows/actions/actions.mjs.map +1 -1
- package/resources/workflows/events.d.mts +66 -4
- package/resources/workflows/events.d.mts.map +1 -1
- package/resources/workflows/events.d.ts +66 -4
- package/resources/workflows/events.d.ts.map +1 -1
- package/resources/workflows/executions/executions.d.mts +334 -0
- package/resources/workflows/executions/executions.d.mts.map +1 -0
- package/resources/workflows/executions/executions.d.ts +334 -0
- package/resources/workflows/executions/executions.d.ts.map +1 -0
- package/resources/workflows/executions/executions.js +49 -0
- package/resources/workflows/executions/executions.js.map +1 -0
- package/resources/workflows/executions/executions.mjs +44 -0
- package/resources/workflows/executions/executions.mjs.map +1 -0
- package/resources/workflows/executions/index.d.mts +3 -0
- package/resources/workflows/executions/index.d.mts.map +1 -0
- package/resources/workflows/executions/index.d.ts +3 -0
- package/resources/workflows/executions/index.d.ts.map +1 -0
- package/resources/workflows/executions/index.js +9 -0
- package/resources/workflows/executions/index.js.map +1 -0
- package/resources/workflows/executions/index.mjs +4 -0
- package/resources/workflows/executions/index.mjs.map +1 -0
- package/resources/workflows/executions/screenshots.d.mts +18 -0
- package/resources/workflows/executions/screenshots.d.mts.map +1 -0
- package/resources/workflows/executions/screenshots.d.ts +18 -0
- package/resources/workflows/executions/screenshots.d.ts.map +1 -0
- package/resources/workflows/executions/screenshots.js +23 -0
- package/resources/workflows/executions/screenshots.js.map +1 -0
- package/resources/workflows/executions/screenshots.mjs +19 -0
- package/resources/workflows/executions/screenshots.mjs.map +1 -0
- package/resources/workflows/executions.d.mts +1 -190
- package/resources/workflows/executions.d.mts.map +1 -1
- package/resources/workflows/executions.d.ts +1 -190
- package/resources/workflows/executions.d.ts.map +1 -1
- package/resources/workflows/executions.js +2 -36
- package/resources/workflows/executions.js.map +1 -1
- package/resources/workflows/executions.mjs +1 -34
- package/resources/workflows/executions.mjs.map +1 -1
- package/resources/workflows/flows/actions.d.mts +58 -0
- package/resources/workflows/flows/actions.d.mts.map +1 -1
- package/resources/workflows/flows/actions.d.ts +58 -0
- package/resources/workflows/flows/actions.d.ts.map +1 -1
- package/resources/workflows/flows/actions.js +4 -0
- package/resources/workflows/flows/actions.js.map +1 -1
- package/resources/workflows/flows/actions.mjs +4 -0
- package/resources/workflows/flows/actions.mjs.map +1 -1
- package/resources/workflows/flows/flows.d.mts +666 -15
- package/resources/workflows/flows/flows.d.mts.map +1 -1
- package/resources/workflows/flows/flows.d.ts +666 -15
- package/resources/workflows/flows/flows.d.ts.map +1 -1
- package/resources/workflows/flows/flows.js +86 -1
- package/resources/workflows/flows/flows.js.map +1 -1
- package/resources/workflows/flows/flows.mjs +86 -1
- package/resources/workflows/flows/flows.mjs.map +1 -1
- package/resources/workflows/flows/index.d.mts +1 -1
- package/resources/workflows/flows/index.d.mts.map +1 -1
- package/resources/workflows/flows/index.d.ts +1 -1
- package/resources/workflows/flows/index.d.ts.map +1 -1
- package/resources/workflows/flows/index.js.map +1 -1
- package/resources/workflows/flows/index.mjs.map +1 -1
- package/resources/workflows/index.d.mts +2 -2
- package/resources/workflows/index.d.mts.map +1 -1
- package/resources/workflows/index.d.ts +2 -2
- package/resources/workflows/index.d.ts.map +1 -1
- package/resources/workflows/index.js +4 -4
- package/resources/workflows/index.js.map +1 -1
- package/resources/workflows/index.mjs +1 -1
- package/resources/workflows/index.mjs.map +1 -1
- package/resources/workflows/triggers.d.mts +118 -6
- package/resources/workflows/triggers.d.mts.map +1 -1
- package/resources/workflows/triggers.d.ts +118 -6
- package/resources/workflows/triggers.d.ts.map +1 -1
- package/resources/workflows/triggers.js +14 -0
- package/resources/workflows/triggers.js.map +1 -1
- package/resources/workflows/triggers.mjs +14 -0
- package/resources/workflows/triggers.mjs.map +1 -1
- package/resources/workflows/workflows.d.mts +4 -4
- package/resources/workflows/workflows.d.mts.map +1 -1
- package/resources/workflows/workflows.d.ts +4 -4
- package/resources/workflows/workflows.d.ts.map +1 -1
- package/resources/workflows/workflows.js +2 -2
- package/resources/workflows/workflows.js.map +1 -1
- package/resources/workflows/workflows.mjs +2 -2
- package/resources/workflows/workflows.mjs.map +1 -1
- package/src/client.ts +22 -42
- package/src/resources/apps.ts +24 -12
- package/src/resources/assistant/conversations.ts +50 -31
- package/src/resources/connect/connect.ts +6 -0
- package/src/resources/connect/index.ts +3 -0
- package/src/resources/connect/proxies.ts +146 -18
- package/src/resources/devices/apps.ts +41 -17
- package/src/resources/devices/browser.ts +9 -3
- package/src/resources/devices/devices.ts +138 -34
- package/src/resources/devices/index.ts +13 -0
- package/src/resources/devices/keyboard.ts +10 -3
- package/src/resources/devices/recordings.ts +14 -0
- package/src/resources/devices/traffic-sessions.ts +282 -0
- package/src/resources/files.ts +122 -29
- package/src/resources/index.ts +13 -20
- package/src/resources/mailboxes/connections.ts +91 -0
- package/src/resources/mailboxes/index.ts +7 -0
- package/src/resources/mailboxes/mailboxes.ts +190 -49
- package/src/resources/mailboxes/messages.ts +2 -2
- package/src/resources/messages/conversations.ts +4 -15
- package/src/resources/messages/index.ts +6 -1
- package/src/resources/messages/messages.ts +57 -5
- package/src/resources/notifications.ts +37 -0
- package/src/resources/numbers/index.ts +9 -1
- package/src/resources/numbers/messages.ts +92 -1
- package/src/resources/numbers/numbers.ts +197 -55
- package/src/resources/store/apps.ts +291 -2
- package/src/resources/tasks/tasks.ts +126 -93
- package/src/resources/webhooks/deliveries.ts +26 -31
- package/src/resources/webhooks/index.ts +6 -0
- package/src/resources/webhooks/integrations.ts +107 -0
- package/src/resources/webhooks/webhooks.ts +328 -71
- package/src/resources/workflows/action-catalog.ts +11 -3
- package/src/resources/workflows/actions/actions.ts +9 -5
- package/src/resources/workflows/events.ts +86 -4
- package/src/resources/workflows/executions/executions.ts +514 -0
- package/src/resources/workflows/executions/index.ts +12 -0
- package/src/resources/workflows/executions/screenshots.ts +34 -0
- package/src/resources/workflows/executions.ts +1 -296
- package/src/resources/workflows/flows/actions.ts +72 -0
- package/src/resources/workflows/flows/flows.ts +1058 -129
- package/src/resources/workflows/flows/index.ts +12 -0
- package/src/resources/workflows/index.ts +13 -1
- package/src/resources/workflows/triggers.ts +140 -6
- package/src/resources/workflows/workflows.ts +34 -10
- 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
- package/resources/esims/esims.d.mts +0 -566
- package/resources/esims/esims.d.mts.map +0 -1
- package/resources/esims/esims.d.ts +0 -566
- package/resources/esims/esims.d.ts.map +0 -1
- package/resources/esims/esims.js +0 -205
- package/resources/esims/esims.js.map +0 -1
- package/resources/esims/esims.mjs +0 -200
- package/resources/esims/esims.mjs.map +0 -1
- package/resources/esims/index.d.mts +0 -3
- package/resources/esims/index.d.mts.map +0 -1
- package/resources/esims/index.d.ts +0 -3
- package/resources/esims/index.d.ts.map +0 -1
- package/resources/esims/index.js +0 -9
- package/resources/esims/index.js.map +0 -1
- package/resources/esims/index.mjs +0 -4
- package/resources/esims/index.mjs.map +0 -1
- package/resources/esims/messages.d.mts +0 -106
- package/resources/esims/messages.d.mts.map +0 -1
- package/resources/esims/messages.d.ts +0 -106
- package/resources/esims/messages.d.ts.map +0 -1
- package/resources/esims/messages.js +0 -37
- package/resources/esims/messages.js.map +0 -1
- package/resources/esims/messages.mjs +0 -33
- package/resources/esims/messages.mjs.map +0 -1
- package/resources/esims.d.mts +0 -2
- package/resources/esims.d.mts.map +0 -1
- package/resources/esims.d.ts +0 -2
- package/resources/esims.d.ts.map +0 -1
- package/resources/esims.js +0 -6
- package/resources/esims.js.map +0 -1
- package/resources/esims.mjs +0 -3
- package/resources/esims.mjs.map +0 -1
- package/src/resources/esims/esims.ts +0 -1019
- package/src/resources/esims/index.ts +0 -28
- package/src/resources/esims/messages.ts +0 -187
- package/src/resources/esims.ts +0 -3
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as Shared from '../shared';
|
|
5
|
+
import * as ConnectionsAPI from './connections';
|
|
6
|
+
import {
|
|
7
|
+
ConnectionCreateParams,
|
|
8
|
+
ConnectionCreateResponse,
|
|
9
|
+
ConnectionRetrieveResponse,
|
|
10
|
+
Connections,
|
|
11
|
+
} from './connections';
|
|
5
12
|
import * as MessagesAPI from './messages';
|
|
6
13
|
import {
|
|
7
14
|
MessageListParams,
|
|
@@ -15,25 +22,25 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
15
22
|
import { path } from '../../internal/utils/path';
|
|
16
23
|
|
|
17
24
|
export class Mailboxes extends APIResource {
|
|
25
|
+
connections: ConnectionsAPI.Connections = new ConnectionsAPI.Connections(this._client);
|
|
18
26
|
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
19
27
|
|
|
20
28
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* already-held local part returns 409. 201 when the checkout URL is already
|
|
27
|
-
* persisted, otherwise 202 (poll GET for the URL).
|
|
29
|
+
* Creates a mailbox on the default domain or a connected custom domain. An
|
|
30
|
+
* optional `localPart` selects the address. Replaying the same Idempotency-Key
|
|
31
|
+
* (or, during migration, the deprecated `clientRequestId` body field) and payload
|
|
32
|
+
* returns the original mailbox. Poll the mailbox when a 202 response does not yet
|
|
33
|
+
* include a checkout URL.
|
|
28
34
|
*
|
|
29
35
|
* @example
|
|
30
36
|
* ```ts
|
|
31
|
-
* const mailbox = await client.mailboxes.create(
|
|
32
|
-
* clientRequestId: 'x',
|
|
33
|
-
* });
|
|
37
|
+
* const mailbox = await client.mailboxes.create();
|
|
34
38
|
* ```
|
|
35
39
|
*/
|
|
36
|
-
create(
|
|
40
|
+
create(
|
|
41
|
+
body: MailboxCreateParams | null | undefined = {},
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<MailboxCreateResponse> {
|
|
37
44
|
return this._client.post('/mailboxes', { body, ...options });
|
|
38
45
|
}
|
|
39
46
|
|
|
@@ -86,10 +93,9 @@ export class Mailboxes extends APIResource {
|
|
|
86
93
|
}
|
|
87
94
|
|
|
88
95
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* Idempotent.
|
|
96
|
+
* Cancels a pending mailbox or schedules an active paid mailbox for cancellation.
|
|
97
|
+
* Existing addresses and messages are retained. Repeating the request is safe. An
|
|
98
|
+
* external inbox (Gmail) cannot be cancelled here; disconnect the link instead.
|
|
93
99
|
*
|
|
94
100
|
* @example
|
|
95
101
|
* ```ts
|
|
@@ -103,8 +109,7 @@ export class Mailboxes extends APIResource {
|
|
|
103
109
|
}
|
|
104
110
|
|
|
105
111
|
/**
|
|
106
|
-
* Returns the
|
|
107
|
-
* available after local reservations.
|
|
112
|
+
* Returns the number of mailboxes currently available through included capacity.
|
|
108
113
|
*
|
|
109
114
|
* @example
|
|
110
115
|
* ```ts
|
|
@@ -116,9 +121,22 @@ export class Mailboxes extends APIResource {
|
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
124
|
+
* Removes only this mailbox link. The agent Composio connection stays in place.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```ts
|
|
128
|
+
* const response = await client.mailboxes.disconnect(
|
|
129
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
130
|
+
* );
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
disconnect(mailboxID: string, options?: RequestOptions): APIPromise<MailboxDisconnectResponse> {
|
|
134
|
+
return this._client.post(path`/mailboxes/${mailboxID}/disconnect`, options);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Returns the most likely recent OTP for the mailbox. Returns 204 when no matching
|
|
139
|
+
* code is available.
|
|
122
140
|
*
|
|
123
141
|
* @example
|
|
124
142
|
* ```ts
|
|
@@ -136,8 +154,8 @@ export class Mailboxes extends APIResource {
|
|
|
136
154
|
}
|
|
137
155
|
|
|
138
156
|
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
157
|
+
* Restarts an archived mailbox with the same address. Uses included capacity when
|
|
158
|
+
* available unless paid service is requested.
|
|
141
159
|
*
|
|
142
160
|
* @example
|
|
143
161
|
* ```ts
|
|
@@ -155,8 +173,8 @@ export class Mailboxes extends APIResource {
|
|
|
155
173
|
}
|
|
156
174
|
|
|
157
175
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
176
|
+
* Withdraws a scheduled cancellation. Only available while cancellation is
|
|
177
|
+
* pending.
|
|
160
178
|
*
|
|
161
179
|
* @example
|
|
162
180
|
* ```ts
|
|
@@ -180,7 +198,7 @@ export namespace MailboxCreateResponse {
|
|
|
180
198
|
|
|
181
199
|
address: string | null;
|
|
182
200
|
|
|
183
|
-
billingMode: 'rent' | 'included';
|
|
201
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
184
202
|
|
|
185
203
|
cancelAtPeriodEnd: boolean;
|
|
186
204
|
|
|
@@ -192,17 +210,24 @@ export namespace MailboxCreateResponse {
|
|
|
192
210
|
|
|
193
211
|
currentPeriodEnd: string | null;
|
|
194
212
|
|
|
213
|
+
domainId: string | null;
|
|
214
|
+
|
|
195
215
|
inboundMessages: Data.InboundMessages;
|
|
196
216
|
|
|
197
217
|
label: string | null;
|
|
198
218
|
|
|
219
|
+
provider: 'matix' | 'gmail';
|
|
220
|
+
|
|
199
221
|
status:
|
|
200
222
|
| 'provisioning'
|
|
201
223
|
| 'awaiting_payment'
|
|
202
224
|
| 'active'
|
|
203
225
|
| 'cancel_scheduled'
|
|
204
226
|
| 'archived'
|
|
205
|
-
| 'billing_error'
|
|
227
|
+
| 'billing_error'
|
|
228
|
+
| 'pending_connection'
|
|
229
|
+
| 'connection_expired'
|
|
230
|
+
| 'connection_removed';
|
|
206
231
|
}
|
|
207
232
|
|
|
208
233
|
export namespace Data {
|
|
@@ -228,7 +253,7 @@ export namespace MailboxRetrieveResponse {
|
|
|
228
253
|
|
|
229
254
|
address: string | null;
|
|
230
255
|
|
|
231
|
-
billingMode: 'rent' | 'included';
|
|
256
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
232
257
|
|
|
233
258
|
cancelAtPeriodEnd: boolean;
|
|
234
259
|
|
|
@@ -240,17 +265,24 @@ export namespace MailboxRetrieveResponse {
|
|
|
240
265
|
|
|
241
266
|
currentPeriodEnd: string | null;
|
|
242
267
|
|
|
268
|
+
domainId: string | null;
|
|
269
|
+
|
|
243
270
|
inboundMessages: Data.InboundMessages;
|
|
244
271
|
|
|
245
272
|
label: string | null;
|
|
246
273
|
|
|
274
|
+
provider: 'matix' | 'gmail';
|
|
275
|
+
|
|
247
276
|
status:
|
|
248
277
|
| 'provisioning'
|
|
249
278
|
| 'awaiting_payment'
|
|
250
279
|
| 'active'
|
|
251
280
|
| 'cancel_scheduled'
|
|
252
281
|
| 'archived'
|
|
253
|
-
| 'billing_error'
|
|
282
|
+
| 'billing_error'
|
|
283
|
+
| 'pending_connection'
|
|
284
|
+
| 'connection_expired'
|
|
285
|
+
| 'connection_removed';
|
|
254
286
|
}
|
|
255
287
|
|
|
256
288
|
export namespace Data {
|
|
@@ -276,7 +308,7 @@ export namespace MailboxUpdateResponse {
|
|
|
276
308
|
|
|
277
309
|
address: string | null;
|
|
278
310
|
|
|
279
|
-
billingMode: 'rent' | 'included';
|
|
311
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
280
312
|
|
|
281
313
|
cancelAtPeriodEnd: boolean;
|
|
282
314
|
|
|
@@ -288,17 +320,24 @@ export namespace MailboxUpdateResponse {
|
|
|
288
320
|
|
|
289
321
|
currentPeriodEnd: string | null;
|
|
290
322
|
|
|
323
|
+
domainId: string | null;
|
|
324
|
+
|
|
291
325
|
inboundMessages: Data.InboundMessages;
|
|
292
326
|
|
|
293
327
|
label: string | null;
|
|
294
328
|
|
|
329
|
+
provider: 'matix' | 'gmail';
|
|
330
|
+
|
|
295
331
|
status:
|
|
296
332
|
| 'provisioning'
|
|
297
333
|
| 'awaiting_payment'
|
|
298
334
|
| 'active'
|
|
299
335
|
| 'cancel_scheduled'
|
|
300
336
|
| 'archived'
|
|
301
|
-
| 'billing_error'
|
|
337
|
+
| 'billing_error'
|
|
338
|
+
| 'pending_connection'
|
|
339
|
+
| 'connection_expired'
|
|
340
|
+
| 'connection_removed';
|
|
302
341
|
}
|
|
303
342
|
|
|
304
343
|
export namespace Data {
|
|
@@ -326,7 +365,7 @@ export namespace MailboxListResponse {
|
|
|
326
365
|
|
|
327
366
|
address: string | null;
|
|
328
367
|
|
|
329
|
-
billingMode: 'rent' | 'included';
|
|
368
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
330
369
|
|
|
331
370
|
cancelAtPeriodEnd: boolean;
|
|
332
371
|
|
|
@@ -338,17 +377,24 @@ export namespace MailboxListResponse {
|
|
|
338
377
|
|
|
339
378
|
currentPeriodEnd: string | null;
|
|
340
379
|
|
|
380
|
+
domainId: string | null;
|
|
381
|
+
|
|
341
382
|
inboundMessages: Item.InboundMessages;
|
|
342
383
|
|
|
343
384
|
label: string | null;
|
|
344
385
|
|
|
386
|
+
provider: 'matix' | 'gmail';
|
|
387
|
+
|
|
345
388
|
status:
|
|
346
389
|
| 'provisioning'
|
|
347
390
|
| 'awaiting_payment'
|
|
348
391
|
| 'active'
|
|
349
392
|
| 'cancel_scheduled'
|
|
350
393
|
| 'archived'
|
|
351
|
-
| 'billing_error'
|
|
394
|
+
| 'billing_error'
|
|
395
|
+
| 'pending_connection'
|
|
396
|
+
| 'connection_expired'
|
|
397
|
+
| 'connection_removed';
|
|
352
398
|
}
|
|
353
399
|
|
|
354
400
|
export namespace Item {
|
|
@@ -374,7 +420,7 @@ export namespace MailboxDeleteResponse {
|
|
|
374
420
|
|
|
375
421
|
address: string | null;
|
|
376
422
|
|
|
377
|
-
billingMode: 'rent' | 'included';
|
|
423
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
378
424
|
|
|
379
425
|
cancelAtPeriodEnd: boolean;
|
|
380
426
|
|
|
@@ -386,17 +432,24 @@ export namespace MailboxDeleteResponse {
|
|
|
386
432
|
|
|
387
433
|
currentPeriodEnd: string | null;
|
|
388
434
|
|
|
435
|
+
domainId: string | null;
|
|
436
|
+
|
|
389
437
|
inboundMessages: Data.InboundMessages;
|
|
390
438
|
|
|
391
439
|
label: string | null;
|
|
392
440
|
|
|
441
|
+
provider: 'matix' | 'gmail';
|
|
442
|
+
|
|
393
443
|
status:
|
|
394
444
|
| 'provisioning'
|
|
395
445
|
| 'awaiting_payment'
|
|
396
446
|
| 'active'
|
|
397
447
|
| 'cancel_scheduled'
|
|
398
448
|
| 'archived'
|
|
399
|
-
| 'billing_error'
|
|
449
|
+
| 'billing_error'
|
|
450
|
+
| 'pending_connection'
|
|
451
|
+
| 'connection_expired'
|
|
452
|
+
| 'connection_removed';
|
|
400
453
|
}
|
|
401
454
|
|
|
402
455
|
export namespace Data {
|
|
@@ -418,7 +471,68 @@ export interface MailboxCapacityResponse {
|
|
|
418
471
|
|
|
419
472
|
export namespace MailboxCapacityResponse {
|
|
420
473
|
export interface Data {
|
|
474
|
+
included: number;
|
|
475
|
+
|
|
421
476
|
includedRemaining: number;
|
|
477
|
+
|
|
478
|
+
remaining: number;
|
|
479
|
+
|
|
480
|
+
status: 'available' | 'exhausted' | 'not_included';
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export interface MailboxDisconnectResponse {
|
|
485
|
+
data: MailboxDisconnectResponse.Data;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export namespace MailboxDisconnectResponse {
|
|
489
|
+
export interface Data {
|
|
490
|
+
id: string;
|
|
491
|
+
|
|
492
|
+
address: string | null;
|
|
493
|
+
|
|
494
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
495
|
+
|
|
496
|
+
cancelAtPeriodEnd: boolean;
|
|
497
|
+
|
|
498
|
+
checkoutExpiresAt: string | null;
|
|
499
|
+
|
|
500
|
+
checkoutUrl: string | null;
|
|
501
|
+
|
|
502
|
+
createdAt: string;
|
|
503
|
+
|
|
504
|
+
currentPeriodEnd: string | null;
|
|
505
|
+
|
|
506
|
+
domainId: string | null;
|
|
507
|
+
|
|
508
|
+
inboundMessages: Data.InboundMessages;
|
|
509
|
+
|
|
510
|
+
label: string | null;
|
|
511
|
+
|
|
512
|
+
provider: 'matix' | 'gmail';
|
|
513
|
+
|
|
514
|
+
status:
|
|
515
|
+
| 'provisioning'
|
|
516
|
+
| 'awaiting_payment'
|
|
517
|
+
| 'active'
|
|
518
|
+
| 'cancel_scheduled'
|
|
519
|
+
| 'archived'
|
|
520
|
+
| 'billing_error'
|
|
521
|
+
| 'pending_connection'
|
|
522
|
+
| 'connection_expired'
|
|
523
|
+
| 'connection_removed';
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export namespace Data {
|
|
527
|
+
export interface InboundMessages {
|
|
528
|
+
exhausted: boolean;
|
|
529
|
+
|
|
530
|
+
included: number;
|
|
531
|
+
|
|
532
|
+
resetsAt: string | null;
|
|
533
|
+
|
|
534
|
+
used: number;
|
|
535
|
+
}
|
|
422
536
|
}
|
|
423
537
|
}
|
|
424
538
|
|
|
@@ -429,7 +543,7 @@ export interface MailboxOtpResponse {
|
|
|
429
543
|
export namespace MailboxOtpResponse {
|
|
430
544
|
export interface Data {
|
|
431
545
|
/**
|
|
432
|
-
*
|
|
546
|
+
* OTP code as text to preserve leading zeros.
|
|
433
547
|
*/
|
|
434
548
|
code: string;
|
|
435
549
|
|
|
@@ -455,7 +569,7 @@ export namespace MailboxRestartResponse {
|
|
|
455
569
|
|
|
456
570
|
address: string | null;
|
|
457
571
|
|
|
458
|
-
billingMode: 'rent' | 'included';
|
|
572
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
459
573
|
|
|
460
574
|
cancelAtPeriodEnd: boolean;
|
|
461
575
|
|
|
@@ -467,17 +581,24 @@ export namespace MailboxRestartResponse {
|
|
|
467
581
|
|
|
468
582
|
currentPeriodEnd: string | null;
|
|
469
583
|
|
|
584
|
+
domainId: string | null;
|
|
585
|
+
|
|
470
586
|
inboundMessages: Data.InboundMessages;
|
|
471
587
|
|
|
472
588
|
label: string | null;
|
|
473
589
|
|
|
590
|
+
provider: 'matix' | 'gmail';
|
|
591
|
+
|
|
474
592
|
status:
|
|
475
593
|
| 'provisioning'
|
|
476
594
|
| 'awaiting_payment'
|
|
477
595
|
| 'active'
|
|
478
596
|
| 'cancel_scheduled'
|
|
479
597
|
| 'archived'
|
|
480
|
-
| 'billing_error'
|
|
598
|
+
| 'billing_error'
|
|
599
|
+
| 'pending_connection'
|
|
600
|
+
| 'connection_expired'
|
|
601
|
+
| 'connection_removed';
|
|
481
602
|
}
|
|
482
603
|
|
|
483
604
|
export namespace Data {
|
|
@@ -503,7 +624,7 @@ export namespace MailboxUncancelResponse {
|
|
|
503
624
|
|
|
504
625
|
address: string | null;
|
|
505
626
|
|
|
506
|
-
billingMode: 'rent' | 'included';
|
|
627
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
507
628
|
|
|
508
629
|
cancelAtPeriodEnd: boolean;
|
|
509
630
|
|
|
@@ -515,17 +636,24 @@ export namespace MailboxUncancelResponse {
|
|
|
515
636
|
|
|
516
637
|
currentPeriodEnd: string | null;
|
|
517
638
|
|
|
639
|
+
domainId: string | null;
|
|
640
|
+
|
|
518
641
|
inboundMessages: Data.InboundMessages;
|
|
519
642
|
|
|
520
643
|
label: string | null;
|
|
521
644
|
|
|
645
|
+
provider: 'matix' | 'gmail';
|
|
646
|
+
|
|
522
647
|
status:
|
|
523
648
|
| 'provisioning'
|
|
524
649
|
| 'awaiting_payment'
|
|
525
650
|
| 'active'
|
|
526
651
|
| 'cancel_scheduled'
|
|
527
652
|
| 'archived'
|
|
528
|
-
| 'billing_error'
|
|
653
|
+
| 'billing_error'
|
|
654
|
+
| 'pending_connection'
|
|
655
|
+
| 'connection_expired'
|
|
656
|
+
| 'connection_removed';
|
|
529
657
|
}
|
|
530
658
|
|
|
531
659
|
export namespace Data {
|
|
@@ -542,20 +670,23 @@ export namespace MailboxUncancelResponse {
|
|
|
542
670
|
}
|
|
543
671
|
|
|
544
672
|
export interface MailboxCreateParams {
|
|
545
|
-
|
|
673
|
+
/**
|
|
674
|
+
* included uses package capacity when available and otherwise starts paid
|
|
675
|
+
* checkout; included_only fails without creating a paid reservation when no
|
|
676
|
+
* included slot remains; rent always starts paid checkout.
|
|
677
|
+
*/
|
|
678
|
+
billingPreference?: 'included' | 'included_only' | 'rent';
|
|
546
679
|
|
|
547
680
|
/**
|
|
548
|
-
*
|
|
549
|
-
*
|
|
681
|
+
* Optional active custom mailbox domain owned by the caller. Omit to use the
|
|
682
|
+
* system domain.
|
|
550
683
|
*/
|
|
551
|
-
|
|
684
|
+
domainId?: string;
|
|
552
685
|
|
|
553
686
|
label?: string;
|
|
554
687
|
|
|
555
688
|
/**
|
|
556
|
-
* Optional
|
|
557
|
-
* lowercased before validation. Omit for a random, non-guessable mx\_-prefixed
|
|
558
|
-
* address.
|
|
689
|
+
* Optional mailbox name before the "@". Omit to generate a random address.
|
|
559
690
|
*/
|
|
560
691
|
localPart?: string;
|
|
561
692
|
}
|
|
@@ -582,12 +713,14 @@ export interface MailboxOtpParams {
|
|
|
582
713
|
|
|
583
714
|
export interface MailboxRestartParams {
|
|
584
715
|
/**
|
|
585
|
-
*
|
|
586
|
-
*
|
|
716
|
+
* included uses package capacity when available and otherwise starts paid
|
|
717
|
+
* checkout; included_only fails without creating a paid reservation when no
|
|
718
|
+
* included slot remains; rent always starts paid checkout.
|
|
587
719
|
*/
|
|
588
|
-
billingPreference?: 'included' | 'rent';
|
|
720
|
+
billingPreference?: 'included' | 'included_only' | 'rent';
|
|
589
721
|
}
|
|
590
722
|
|
|
723
|
+
Mailboxes.Connections = Connections;
|
|
591
724
|
Mailboxes.Messages = Messages;
|
|
592
725
|
|
|
593
726
|
export declare namespace Mailboxes {
|
|
@@ -598,6 +731,7 @@ export declare namespace Mailboxes {
|
|
|
598
731
|
type MailboxListResponse as MailboxListResponse,
|
|
599
732
|
type MailboxDeleteResponse as MailboxDeleteResponse,
|
|
600
733
|
type MailboxCapacityResponse as MailboxCapacityResponse,
|
|
734
|
+
type MailboxDisconnectResponse as MailboxDisconnectResponse,
|
|
601
735
|
type MailboxOtpResponse as MailboxOtpResponse,
|
|
602
736
|
type MailboxRestartResponse as MailboxRestartResponse,
|
|
603
737
|
type MailboxUncancelResponse as MailboxUncancelResponse,
|
|
@@ -608,6 +742,13 @@ export declare namespace Mailboxes {
|
|
|
608
742
|
type MailboxRestartParams as MailboxRestartParams,
|
|
609
743
|
};
|
|
610
744
|
|
|
745
|
+
export {
|
|
746
|
+
Connections as Connections,
|
|
747
|
+
type ConnectionCreateResponse as ConnectionCreateResponse,
|
|
748
|
+
type ConnectionRetrieveResponse as ConnectionRetrieveResponse,
|
|
749
|
+
type ConnectionCreateParams as ConnectionCreateParams,
|
|
750
|
+
};
|
|
751
|
+
|
|
611
752
|
export {
|
|
612
753
|
Messages as Messages,
|
|
613
754
|
type MessageRetrieveResponse as MessageRetrieveResponse,
|
|
@@ -27,8 +27,8 @@ export class Messages extends APIResource {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Lists messages
|
|
31
|
-
* filters
|
|
30
|
+
* Lists mailbox messages with cursor pagination and optional time, sender, and OTP
|
|
31
|
+
* filters.
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* ```ts
|
|
@@ -6,17 +6,8 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
6
6
|
|
|
7
7
|
export class Conversations extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Lists
|
|
10
|
-
*
|
|
11
|
-
* it was seen through. Optional `esimId` or `numberId` narrows to threads on one
|
|
12
|
-
* eSIM or number.
|
|
13
|
-
*
|
|
14
|
-
* Cursor-paginated via `limit` (default 20, max 100) and
|
|
15
|
-
* `cursorLastOccurredAt`/`cursorLastMessageId` (both required together, taken from
|
|
16
|
-
* a previous page's `nextCursor`). Pagination follows each thread's most recent
|
|
17
|
-
* activity rather than a fixed snapshot, so a thread with new activity can move
|
|
18
|
-
* ahead of an in-progress page fetch. Clients that need a stable ordering should
|
|
19
|
-
* snapshot their own view.
|
|
9
|
+
* Lists SMS conversations by recent activity. Use both cursor fields from
|
|
10
|
+
* `nextCursor` to fetch the next page.
|
|
20
11
|
*/
|
|
21
12
|
list(
|
|
22
13
|
query: ConversationListParams | null | undefined = {},
|
|
@@ -26,10 +17,8 @@ export class Conversations extends APIResource {
|
|
|
26
17
|
}
|
|
27
18
|
|
|
28
19
|
/**
|
|
29
|
-
* Marks
|
|
30
|
-
*
|
|
31
|
-
* conversation row's `lastMessage`. Idempotent: repeating the call with the same
|
|
32
|
-
* cursor updates 0 rows. Returns the number of rows updated.
|
|
20
|
+
* Marks inbound messages in a conversation as read through the supplied cursor.
|
|
21
|
+
* Repeating the request is safe.
|
|
33
22
|
*/
|
|
34
23
|
markRead(
|
|
35
24
|
body: ConversationMarkReadParams,
|
|
@@ -7,4 +7,9 @@ export {
|
|
|
7
7
|
type ConversationListParams,
|
|
8
8
|
type ConversationMarkReadParams,
|
|
9
9
|
} from './conversations';
|
|
10
|
-
export {
|
|
10
|
+
export {
|
|
11
|
+
Messages,
|
|
12
|
+
type MessageRetrieveResponse,
|
|
13
|
+
type MessageListResponse,
|
|
14
|
+
type MessageListParams,
|
|
15
|
+
} from './messages';
|
|
@@ -12,15 +12,23 @@ import {
|
|
|
12
12
|
} from './conversations';
|
|
13
13
|
import { APIPromise } from '../../core/api-promise';
|
|
14
14
|
import { RequestOptions } from '../../internal/request-options';
|
|
15
|
+
import { path } from '../../internal/utils/path';
|
|
15
16
|
|
|
16
17
|
export class Messages extends APIResource {
|
|
17
18
|
conversations: ConversationsAPI.Conversations = new ConversationsAPI.Conversations(this._client);
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
|
|
21
|
+
* Returns one message. For an outbound message that is not yet final, the status
|
|
22
|
+
* may be refreshed once (at most every 30 s) before it is returned; a failed
|
|
23
|
+
* refresh returns the stored message.
|
|
24
|
+
*/
|
|
25
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<MessageRetrieveResponse> {
|
|
26
|
+
return this._client.get(path`/numbers/messages/${id}`, options);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Lists SMS messages newest first, with filters for direction, eSIM, phone number,
|
|
31
|
+
* status, and conversation.
|
|
24
32
|
*/
|
|
25
33
|
list(
|
|
26
34
|
query: MessageListParams | null | undefined = {},
|
|
@@ -30,6 +38,46 @@ export class Messages extends APIResource {
|
|
|
30
38
|
}
|
|
31
39
|
}
|
|
32
40
|
|
|
41
|
+
export interface MessageRetrieveResponse {
|
|
42
|
+
data: MessageRetrieveResponse.Data;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export namespace MessageRetrieveResponse {
|
|
46
|
+
export interface Data {
|
|
47
|
+
id: string;
|
|
48
|
+
|
|
49
|
+
body: string | null;
|
|
50
|
+
|
|
51
|
+
createdAt: string;
|
|
52
|
+
|
|
53
|
+
deliveryStatus: string | null;
|
|
54
|
+
|
|
55
|
+
detectedSender: string | null;
|
|
56
|
+
|
|
57
|
+
direction: 'inbound' | 'outbound';
|
|
58
|
+
|
|
59
|
+
esimId: string | null;
|
|
60
|
+
|
|
61
|
+
occurredAt: string;
|
|
62
|
+
|
|
63
|
+
peerKey: string | null;
|
|
64
|
+
|
|
65
|
+
peerNumber: string | null;
|
|
66
|
+
|
|
67
|
+
providerCode: string | null;
|
|
68
|
+
|
|
69
|
+
status:
|
|
70
|
+
| 'received'
|
|
71
|
+
| 'queued'
|
|
72
|
+
| 'claimed'
|
|
73
|
+
| 'sending'
|
|
74
|
+
| 'sent'
|
|
75
|
+
| 'sent_unconfirmed'
|
|
76
|
+
| 'delivered'
|
|
77
|
+
| 'failed';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
33
81
|
export interface MessageListResponse {
|
|
34
82
|
items: Array<MessageListResponse.Item>;
|
|
35
83
|
|
|
@@ -102,7 +150,11 @@ export interface MessageListParams {
|
|
|
102
150
|
Messages.Conversations = Conversations;
|
|
103
151
|
|
|
104
152
|
export declare namespace Messages {
|
|
105
|
-
export {
|
|
153
|
+
export {
|
|
154
|
+
type MessageRetrieveResponse as MessageRetrieveResponse,
|
|
155
|
+
type MessageListResponse as MessageListResponse,
|
|
156
|
+
type MessageListParams as MessageListParams,
|
|
157
|
+
};
|
|
106
158
|
|
|
107
159
|
export {
|
|
108
160
|
Conversations as Conversations,
|