@mobilerun/sdk 5.5.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 +9 -0
- package/client.d.mts +8 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -8
- package/client.d.ts.map +1 -1
- package/client.js +1 -0
- package/client.js.map +1 -1
- package/client.mjs +2 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/apps.d.mts +18 -15
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +18 -15
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +5 -2
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +5 -2
- package/resources/apps.mjs.map +1 -1
- package/resources/assistant/conversations.d.mts +7 -17
- package/resources/assistant/conversations.d.mts.map +1 -1
- package/resources/assistant/conversations.d.ts +7 -17
- package/resources/assistant/conversations.d.ts.map +1 -1
- package/resources/assistant/conversations.js +4 -11
- package/resources/assistant/conversations.js.map +1 -1
- package/resources/assistant/conversations.mjs +4 -11
- 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 +94 -11
- package/resources/connect/proxies.d.mts.map +1 -1
- package/resources/connect/proxies.d.ts +94 -11
- package/resources/connect/proxies.d.ts.map +1 -1
- package/resources/connect/proxies.js +21 -10
- package/resources/connect/proxies.js.map +1 -1
- package/resources/connect/proxies.mjs +21 -10
- package/resources/connect/proxies.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 +52 -23
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +52 -23
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +17 -7
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +17 -7
- package/resources/devices/devices.mjs.map +1 -1
- package/resources/devices/index.d.mts +1 -1
- package/resources/devices/index.d.mts.map +1 -1
- package/resources/devices/index.d.ts +1 -1
- package/resources/devices/index.d.ts.map +1 -1
- package/resources/devices/index.js.map +1 -1
- package/resources/devices/index.mjs.map +1 -1
- package/resources/devices/recordings.d.mts +4 -2
- package/resources/devices/recordings.d.mts.map +1 -1
- package/resources/devices/recordings.d.ts +4 -2
- package/resources/devices/recordings.d.ts.map +1 -1
- package/resources/devices/traffic-sessions.d.mts +1 -11
- package/resources/devices/traffic-sessions.d.mts.map +1 -1
- package/resources/devices/traffic-sessions.d.ts +1 -11
- package/resources/devices/traffic-sessions.d.ts.map +1 -1
- package/resources/devices/traffic-sessions.js +2 -8
- package/resources/devices/traffic-sessions.js.map +1 -1
- package/resources/devices/traffic-sessions.mjs +2 -8
- package/resources/devices/traffic-sessions.mjs.map +1 -1
- package/resources/files.d.mts +5 -19
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +5 -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 +4 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- 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 +73 -24
- package/resources/mailboxes/mailboxes.d.mts.map +1 -1
- package/resources/mailboxes/mailboxes.d.ts +73 -24
- package/resources/mailboxes/mailboxes.d.ts.map +1 -1
- package/resources/mailboxes/mailboxes.js +25 -8
- package/resources/mailboxes/mailboxes.js.map +1 -1
- package/resources/mailboxes/mailboxes.mjs +25 -8
- package/resources/mailboxes/mailboxes.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 +26 -1
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +26 -1
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +9 -0
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +9 -0
- 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 +1 -1
- package/resources/numbers/index.d.mts.map +1 -1
- package/resources/numbers/index.d.ts +1 -1
- 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 +123 -15
- package/resources/numbers/numbers.d.mts.map +1 -1
- package/resources/numbers/numbers.d.ts +123 -15
- package/resources/numbers/numbers.d.ts.map +1 -1
- package/resources/numbers/numbers.js +2 -11
- package/resources/numbers/numbers.js.map +1 -1
- package/resources/numbers/numbers.mjs +3 -12
- 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 +16 -55
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +16 -55
- 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 +279 -71
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +279 -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 +48 -4
- package/resources/workflows/events.d.mts.map +1 -1
- package/resources/workflows/events.d.ts +48 -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 -269
- package/resources/workflows/executions.d.mts.map +1 -1
- package/resources/workflows/executions.d.ts +1 -269
- package/resources/workflows/executions.d.ts.map +1 -1
- package/resources/workflows/executions.js +2 -37
- package/resources/workflows/executions.js.map +1 -1
- package/resources/workflows/executions.mjs +1 -35
- package/resources/workflows/executions.mjs.map +1 -1
- package/resources/workflows/flows/actions.d.mts +39 -0
- package/resources/workflows/flows/actions.d.mts.map +1 -1
- package/resources/workflows/flows/actions.d.ts +39 -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 +529 -18
- package/resources/workflows/flows/flows.d.mts.map +1 -1
- package/resources/workflows/flows/flows.d.ts +529 -18
- package/resources/workflows/flows/flows.d.ts.map +1 -1
- package/resources/workflows/flows/flows.js +75 -0
- package/resources/workflows/flows/flows.js.map +1 -1
- package/resources/workflows/flows/flows.mjs +75 -0
- 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 +107 -9
- package/resources/workflows/triggers.d.mts.map +1 -1
- package/resources/workflows/triggers.d.ts +107 -9
- 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 +18 -1
- package/src/resources/apps.ts +18 -15
- package/src/resources/assistant/conversations.ts +12 -27
- package/src/resources/connect/connect.ts +6 -0
- package/src/resources/connect/index.ts +3 -0
- package/src/resources/connect/proxies.ts +119 -19
- package/src/resources/devices/browser.ts +9 -3
- package/src/resources/devices/devices.ts +80 -30
- package/src/resources/devices/index.ts +2 -0
- package/src/resources/devices/recordings.ts +4 -2
- package/src/resources/devices/traffic-sessions.ts +2 -19
- package/src/resources/files.ts +8 -29
- package/src/resources/index.ts +11 -1
- package/src/resources/mailboxes/connections.ts +91 -0
- package/src/resources/mailboxes/index.ts +7 -0
- package/src/resources/mailboxes/mailboxes.ts +146 -24
- package/src/resources/messages/index.ts +6 -1
- package/src/resources/messages/messages.ts +55 -1
- package/src/resources/notifications.ts +37 -0
- package/src/resources/numbers/index.ts +7 -1
- package/src/resources/numbers/messages.ts +92 -1
- package/src/resources/numbers/numbers.ts +143 -25
- package/src/resources/store/apps.ts +291 -2
- package/src/resources/tasks/tasks.ts +18 -65
- 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 +326 -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 +62 -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 -412
- package/src/resources/workflows/flows/actions.ts +46 -0
- package/src/resources/workflows/flows/flows.ts +765 -17
- package/src/resources/workflows/flows/index.ts +11 -0
- package/src/resources/workflows/index.ts +12 -1
- package/src/resources/workflows/triggers.ts +128 -10
- package/src/resources/workflows/workflows.ts +32 -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
|
@@ -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,22 +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
29
|
* Creates a mailbox on the default domain or a connected custom domain. An
|
|
22
|
-
* optional `localPart` selects the address. Replaying the same
|
|
23
|
-
*
|
|
24
|
-
*
|
|
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.
|
|
25
34
|
*
|
|
26
35
|
* @example
|
|
27
36
|
* ```ts
|
|
28
|
-
* const mailbox = await client.mailboxes.create(
|
|
29
|
-
* clientRequestId: 'x',
|
|
30
|
-
* });
|
|
37
|
+
* const mailbox = await client.mailboxes.create();
|
|
31
38
|
* ```
|
|
32
39
|
*/
|
|
33
|
-
create(
|
|
40
|
+
create(
|
|
41
|
+
body: MailboxCreateParams | null | undefined = {},
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<MailboxCreateResponse> {
|
|
34
44
|
return this._client.post('/mailboxes', { body, ...options });
|
|
35
45
|
}
|
|
36
46
|
|
|
@@ -84,7 +94,8 @@ export class Mailboxes extends APIResource {
|
|
|
84
94
|
|
|
85
95
|
/**
|
|
86
96
|
* Cancels a pending mailbox or schedules an active paid mailbox for cancellation.
|
|
87
|
-
* Existing addresses and messages are retained. Repeating the request is safe.
|
|
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.
|
|
88
99
|
*
|
|
89
100
|
* @example
|
|
90
101
|
* ```ts
|
|
@@ -109,6 +120,20 @@ export class Mailboxes extends APIResource {
|
|
|
109
120
|
return this._client.get('/mailboxes/capacity', options);
|
|
110
121
|
}
|
|
111
122
|
|
|
123
|
+
/**
|
|
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
|
+
|
|
112
137
|
/**
|
|
113
138
|
* Returns the most likely recent OTP for the mailbox. Returns 204 when no matching
|
|
114
139
|
* code is available.
|
|
@@ -173,7 +198,7 @@ export namespace MailboxCreateResponse {
|
|
|
173
198
|
|
|
174
199
|
address: string | null;
|
|
175
200
|
|
|
176
|
-
billingMode: 'rent' | 'included' | 'domain';
|
|
201
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
177
202
|
|
|
178
203
|
cancelAtPeriodEnd: boolean;
|
|
179
204
|
|
|
@@ -191,13 +216,18 @@ export namespace MailboxCreateResponse {
|
|
|
191
216
|
|
|
192
217
|
label: string | null;
|
|
193
218
|
|
|
219
|
+
provider: 'matix' | 'gmail';
|
|
220
|
+
|
|
194
221
|
status:
|
|
195
222
|
| 'provisioning'
|
|
196
223
|
| 'awaiting_payment'
|
|
197
224
|
| 'active'
|
|
198
225
|
| 'cancel_scheduled'
|
|
199
226
|
| 'archived'
|
|
200
|
-
| 'billing_error'
|
|
227
|
+
| 'billing_error'
|
|
228
|
+
| 'pending_connection'
|
|
229
|
+
| 'connection_expired'
|
|
230
|
+
| 'connection_removed';
|
|
201
231
|
}
|
|
202
232
|
|
|
203
233
|
export namespace Data {
|
|
@@ -223,7 +253,7 @@ export namespace MailboxRetrieveResponse {
|
|
|
223
253
|
|
|
224
254
|
address: string | null;
|
|
225
255
|
|
|
226
|
-
billingMode: 'rent' | 'included' | 'domain';
|
|
256
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
227
257
|
|
|
228
258
|
cancelAtPeriodEnd: boolean;
|
|
229
259
|
|
|
@@ -241,13 +271,18 @@ export namespace MailboxRetrieveResponse {
|
|
|
241
271
|
|
|
242
272
|
label: string | null;
|
|
243
273
|
|
|
274
|
+
provider: 'matix' | 'gmail';
|
|
275
|
+
|
|
244
276
|
status:
|
|
245
277
|
| 'provisioning'
|
|
246
278
|
| 'awaiting_payment'
|
|
247
279
|
| 'active'
|
|
248
280
|
| 'cancel_scheduled'
|
|
249
281
|
| 'archived'
|
|
250
|
-
| 'billing_error'
|
|
282
|
+
| 'billing_error'
|
|
283
|
+
| 'pending_connection'
|
|
284
|
+
| 'connection_expired'
|
|
285
|
+
| 'connection_removed';
|
|
251
286
|
}
|
|
252
287
|
|
|
253
288
|
export namespace Data {
|
|
@@ -273,7 +308,7 @@ export namespace MailboxUpdateResponse {
|
|
|
273
308
|
|
|
274
309
|
address: string | null;
|
|
275
310
|
|
|
276
|
-
billingMode: 'rent' | 'included' | 'domain';
|
|
311
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
277
312
|
|
|
278
313
|
cancelAtPeriodEnd: boolean;
|
|
279
314
|
|
|
@@ -291,13 +326,18 @@ export namespace MailboxUpdateResponse {
|
|
|
291
326
|
|
|
292
327
|
label: string | null;
|
|
293
328
|
|
|
329
|
+
provider: 'matix' | 'gmail';
|
|
330
|
+
|
|
294
331
|
status:
|
|
295
332
|
| 'provisioning'
|
|
296
333
|
| 'awaiting_payment'
|
|
297
334
|
| 'active'
|
|
298
335
|
| 'cancel_scheduled'
|
|
299
336
|
| 'archived'
|
|
300
|
-
| 'billing_error'
|
|
337
|
+
| 'billing_error'
|
|
338
|
+
| 'pending_connection'
|
|
339
|
+
| 'connection_expired'
|
|
340
|
+
| 'connection_removed';
|
|
301
341
|
}
|
|
302
342
|
|
|
303
343
|
export namespace Data {
|
|
@@ -325,7 +365,7 @@ export namespace MailboxListResponse {
|
|
|
325
365
|
|
|
326
366
|
address: string | null;
|
|
327
367
|
|
|
328
|
-
billingMode: 'rent' | 'included' | 'domain';
|
|
368
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
329
369
|
|
|
330
370
|
cancelAtPeriodEnd: boolean;
|
|
331
371
|
|
|
@@ -343,13 +383,18 @@ export namespace MailboxListResponse {
|
|
|
343
383
|
|
|
344
384
|
label: string | null;
|
|
345
385
|
|
|
386
|
+
provider: 'matix' | 'gmail';
|
|
387
|
+
|
|
346
388
|
status:
|
|
347
389
|
| 'provisioning'
|
|
348
390
|
| 'awaiting_payment'
|
|
349
391
|
| 'active'
|
|
350
392
|
| 'cancel_scheduled'
|
|
351
393
|
| 'archived'
|
|
352
|
-
| 'billing_error'
|
|
394
|
+
| 'billing_error'
|
|
395
|
+
| 'pending_connection'
|
|
396
|
+
| 'connection_expired'
|
|
397
|
+
| 'connection_removed';
|
|
353
398
|
}
|
|
354
399
|
|
|
355
400
|
export namespace Item {
|
|
@@ -375,7 +420,7 @@ export namespace MailboxDeleteResponse {
|
|
|
375
420
|
|
|
376
421
|
address: string | null;
|
|
377
422
|
|
|
378
|
-
billingMode: 'rent' | 'included' | 'domain';
|
|
423
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
379
424
|
|
|
380
425
|
cancelAtPeriodEnd: boolean;
|
|
381
426
|
|
|
@@ -393,13 +438,18 @@ export namespace MailboxDeleteResponse {
|
|
|
393
438
|
|
|
394
439
|
label: string | null;
|
|
395
440
|
|
|
441
|
+
provider: 'matix' | 'gmail';
|
|
442
|
+
|
|
396
443
|
status:
|
|
397
444
|
| 'provisioning'
|
|
398
445
|
| 'awaiting_payment'
|
|
399
446
|
| 'active'
|
|
400
447
|
| 'cancel_scheduled'
|
|
401
448
|
| 'archived'
|
|
402
|
-
| 'billing_error'
|
|
449
|
+
| 'billing_error'
|
|
450
|
+
| 'pending_connection'
|
|
451
|
+
| 'connection_expired'
|
|
452
|
+
| 'connection_removed';
|
|
403
453
|
}
|
|
404
454
|
|
|
405
455
|
export namespace Data {
|
|
@@ -431,6 +481,61 @@ export namespace MailboxCapacityResponse {
|
|
|
431
481
|
}
|
|
432
482
|
}
|
|
433
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
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
434
539
|
export interface MailboxOtpResponse {
|
|
435
540
|
data: MailboxOtpResponse.Data;
|
|
436
541
|
}
|
|
@@ -464,7 +569,7 @@ export namespace MailboxRestartResponse {
|
|
|
464
569
|
|
|
465
570
|
address: string | null;
|
|
466
571
|
|
|
467
|
-
billingMode: 'rent' | 'included' | 'domain';
|
|
572
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
468
573
|
|
|
469
574
|
cancelAtPeriodEnd: boolean;
|
|
470
575
|
|
|
@@ -482,13 +587,18 @@ export namespace MailboxRestartResponse {
|
|
|
482
587
|
|
|
483
588
|
label: string | null;
|
|
484
589
|
|
|
590
|
+
provider: 'matix' | 'gmail';
|
|
591
|
+
|
|
485
592
|
status:
|
|
486
593
|
| 'provisioning'
|
|
487
594
|
| 'awaiting_payment'
|
|
488
595
|
| 'active'
|
|
489
596
|
| 'cancel_scheduled'
|
|
490
597
|
| 'archived'
|
|
491
|
-
| 'billing_error'
|
|
598
|
+
| 'billing_error'
|
|
599
|
+
| 'pending_connection'
|
|
600
|
+
| 'connection_expired'
|
|
601
|
+
| 'connection_removed';
|
|
492
602
|
}
|
|
493
603
|
|
|
494
604
|
export namespace Data {
|
|
@@ -514,7 +624,7 @@ export namespace MailboxUncancelResponse {
|
|
|
514
624
|
|
|
515
625
|
address: string | null;
|
|
516
626
|
|
|
517
|
-
billingMode: 'rent' | 'included' | 'domain';
|
|
627
|
+
billingMode: 'rent' | 'included' | 'domain' | 'external';
|
|
518
628
|
|
|
519
629
|
cancelAtPeriodEnd: boolean;
|
|
520
630
|
|
|
@@ -532,13 +642,18 @@ export namespace MailboxUncancelResponse {
|
|
|
532
642
|
|
|
533
643
|
label: string | null;
|
|
534
644
|
|
|
645
|
+
provider: 'matix' | 'gmail';
|
|
646
|
+
|
|
535
647
|
status:
|
|
536
648
|
| 'provisioning'
|
|
537
649
|
| 'awaiting_payment'
|
|
538
650
|
| 'active'
|
|
539
651
|
| 'cancel_scheduled'
|
|
540
652
|
| 'archived'
|
|
541
|
-
| 'billing_error'
|
|
653
|
+
| 'billing_error'
|
|
654
|
+
| 'pending_connection'
|
|
655
|
+
| 'connection_expired'
|
|
656
|
+
| 'connection_removed';
|
|
542
657
|
}
|
|
543
658
|
|
|
544
659
|
export namespace Data {
|
|
@@ -555,8 +670,6 @@ export namespace MailboxUncancelResponse {
|
|
|
555
670
|
}
|
|
556
671
|
|
|
557
672
|
export interface MailboxCreateParams {
|
|
558
|
-
clientRequestId: string;
|
|
559
|
-
|
|
560
673
|
/**
|
|
561
674
|
* included uses package capacity when available and otherwise starts paid
|
|
562
675
|
* checkout; included_only fails without creating a paid reservation when no
|
|
@@ -607,6 +720,7 @@ export interface MailboxRestartParams {
|
|
|
607
720
|
billingPreference?: 'included' | 'included_only' | 'rent';
|
|
608
721
|
}
|
|
609
722
|
|
|
723
|
+
Mailboxes.Connections = Connections;
|
|
610
724
|
Mailboxes.Messages = Messages;
|
|
611
725
|
|
|
612
726
|
export declare namespace Mailboxes {
|
|
@@ -617,6 +731,7 @@ export declare namespace Mailboxes {
|
|
|
617
731
|
type MailboxListResponse as MailboxListResponse,
|
|
618
732
|
type MailboxDeleteResponse as MailboxDeleteResponse,
|
|
619
733
|
type MailboxCapacityResponse as MailboxCapacityResponse,
|
|
734
|
+
type MailboxDisconnectResponse as MailboxDisconnectResponse,
|
|
620
735
|
type MailboxOtpResponse as MailboxOtpResponse,
|
|
621
736
|
type MailboxRestartResponse as MailboxRestartResponse,
|
|
622
737
|
type MailboxUncancelResponse as MailboxUncancelResponse,
|
|
@@ -627,6 +742,13 @@ export declare namespace Mailboxes {
|
|
|
627
742
|
type MailboxRestartParams as MailboxRestartParams,
|
|
628
743
|
};
|
|
629
744
|
|
|
745
|
+
export {
|
|
746
|
+
Connections as Connections,
|
|
747
|
+
type ConnectionCreateResponse as ConnectionCreateResponse,
|
|
748
|
+
type ConnectionRetrieveResponse as ConnectionRetrieveResponse,
|
|
749
|
+
type ConnectionCreateParams as ConnectionCreateParams,
|
|
750
|
+
};
|
|
751
|
+
|
|
630
752
|
export {
|
|
631
753
|
Messages as Messages,
|
|
632
754
|
type MessageRetrieveResponse as MessageRetrieveResponse,
|
|
@@ -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,10 +12,20 @@ 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
|
|
|
20
|
+
/**
|
|
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
|
+
|
|
19
29
|
/**
|
|
20
30
|
* Lists SMS messages newest first, with filters for direction, eSIM, phone number,
|
|
21
31
|
* status, and conversation.
|
|
@@ -28,6 +38,46 @@ export class Messages extends APIResource {
|
|
|
28
38
|
}
|
|
29
39
|
}
|
|
30
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
|
+
|
|
31
81
|
export interface MessageListResponse {
|
|
32
82
|
items: Array<MessageListResponse.Item>;
|
|
33
83
|
|
|
@@ -100,7 +150,11 @@ export interface MessageListParams {
|
|
|
100
150
|
Messages.Conversations = Conversations;
|
|
101
151
|
|
|
102
152
|
export declare namespace Messages {
|
|
103
|
-
export {
|
|
153
|
+
export {
|
|
154
|
+
type MessageRetrieveResponse as MessageRetrieveResponse,
|
|
155
|
+
type MessageListResponse as MessageListResponse,
|
|
156
|
+
type MessageListParams as MessageListParams,
|
|
157
|
+
};
|
|
104
158
|
|
|
105
159
|
export {
|
|
106
160
|
Conversations as Conversations,
|
|
@@ -5,6 +5,27 @@ import { APIPromise } from '../core/api-promise';
|
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
7
|
export class Notifications extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Replaces your muted event types with a server-computed preset: `recommended`
|
|
10
|
+
* mutes the mobilerun-default noisy lifecycle/progress events, `failures` mutes
|
|
11
|
+
* everything except failures/timeouts/invalid runs, and `everything` unmutes all.
|
|
12
|
+
* The response returns the muted types that were actually stored.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response =
|
|
17
|
+
* await client.notifications.applyPreferencesPreset({
|
|
18
|
+
* preset: 'recommended',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
applyPreferencesPreset(
|
|
23
|
+
body: NotificationApplyPreferencesPresetParams,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): APIPromise<NotificationApplyPreferencesPresetResponse> {
|
|
26
|
+
return this._client.post('/notifications/preferences/apply-preset', { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
|
|
8
29
|
/**
|
|
9
30
|
* Returns the catalog of notifiable event types grouped by source category. Each
|
|
10
31
|
* event lists its type identifier, label, and description, which can be referenced
|
|
@@ -58,6 +79,16 @@ export class Notifications extends APIResource {
|
|
|
58
79
|
}
|
|
59
80
|
}
|
|
60
81
|
|
|
82
|
+
export interface NotificationApplyPreferencesPresetResponse {
|
|
83
|
+
data: NotificationApplyPreferencesPresetResponse.Data;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export namespace NotificationApplyPreferencesPresetResponse {
|
|
87
|
+
export interface Data {
|
|
88
|
+
mutedTypes: Array<string>;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
61
92
|
export interface NotificationCatalogResponse {
|
|
62
93
|
data: Array<NotificationCatalogResponse.Data>;
|
|
63
94
|
}
|
|
@@ -104,15 +135,21 @@ export namespace NotificationUpdatePreferencesResponse {
|
|
|
104
135
|
}
|
|
105
136
|
}
|
|
106
137
|
|
|
138
|
+
export interface NotificationApplyPreferencesPresetParams {
|
|
139
|
+
preset: 'recommended' | 'failures' | 'everything';
|
|
140
|
+
}
|
|
141
|
+
|
|
107
142
|
export interface NotificationUpdatePreferencesParams {
|
|
108
143
|
mutedTypes: Array<string>;
|
|
109
144
|
}
|
|
110
145
|
|
|
111
146
|
export declare namespace Notifications {
|
|
112
147
|
export {
|
|
148
|
+
type NotificationApplyPreferencesPresetResponse as NotificationApplyPreferencesPresetResponse,
|
|
113
149
|
type NotificationCatalogResponse as NotificationCatalogResponse,
|
|
114
150
|
type NotificationGetPreferencesResponse as NotificationGetPreferencesResponse,
|
|
115
151
|
type NotificationUpdatePreferencesResponse as NotificationUpdatePreferencesResponse,
|
|
152
|
+
type NotificationApplyPreferencesPresetParams as NotificationApplyPreferencesPresetParams,
|
|
116
153
|
type NotificationUpdatePreferencesParams as NotificationUpdatePreferencesParams,
|
|
117
154
|
};
|
|
118
155
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export {
|
|
4
|
+
Messages,
|
|
5
|
+
type MessageListResponse,
|
|
6
|
+
type MessageSendResponse,
|
|
7
|
+
type MessageListParams,
|
|
8
|
+
type MessageSendParams,
|
|
9
|
+
} from './messages';
|
|
4
10
|
export {
|
|
5
11
|
Numbers,
|
|
6
12
|
type NumberCreateResponse,
|
|
@@ -26,6 +26,28 @@ export class Messages extends APIResource {
|
|
|
26
26
|
): APIPromise<MessageListResponse> {
|
|
27
27
|
return this._client.get(path`/numbers/phones/${id}/messages`, { query, ...options });
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Queues an SMS from one of the caller's numbers that can send. Same idempotency
|
|
32
|
+
* contract as the eSIM send: replaying an Idempotency-Key with the same payload
|
|
33
|
+
* returns the original message, reusing it with a different payload returns 422.
|
|
34
|
+
* 409 capability_unavailable: this number cannot send right now. 422
|
|
35
|
+
* invalid_recipient / unsupported_destination / body_too_long: the recipient or
|
|
36
|
+
* text does not fit the number. 429 daily_limit_reached: the rolling 24 h limit
|
|
37
|
+
* for the account is used up; 429 rate_limited: too many sends in a short window.
|
|
38
|
+
* 403 send_disabled: self-service SMS send is switched off.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response = await client.numbers.messages.send(
|
|
43
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
44
|
+
* { body: 'x', to: '+15551230001' },
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
send(id: string, body: MessageSendParams, options?: RequestOptions): APIPromise<MessageSendResponse> {
|
|
49
|
+
return this._client.post(path`/numbers/phones/${id}/messages`, { body, ...options });
|
|
50
|
+
}
|
|
29
51
|
}
|
|
30
52
|
|
|
31
53
|
export interface MessageListResponse {
|
|
@@ -68,6 +90,44 @@ export namespace MessageListResponse {
|
|
|
68
90
|
}
|
|
69
91
|
}
|
|
70
92
|
|
|
93
|
+
export interface MessageSendResponse {
|
|
94
|
+
data: MessageSendResponse.Data;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export namespace MessageSendResponse {
|
|
98
|
+
export interface Data {
|
|
99
|
+
id: string;
|
|
100
|
+
|
|
101
|
+
body: string | null;
|
|
102
|
+
|
|
103
|
+
createdAt: string;
|
|
104
|
+
|
|
105
|
+
deliveryStatus: string | null;
|
|
106
|
+
|
|
107
|
+
detectedSender: string | null;
|
|
108
|
+
|
|
109
|
+
direction: 'inbound' | 'outbound';
|
|
110
|
+
|
|
111
|
+
esimId: string | null;
|
|
112
|
+
|
|
113
|
+
occurredAt: string;
|
|
114
|
+
|
|
115
|
+
peerKey: string | null;
|
|
116
|
+
|
|
117
|
+
peerNumber: string | null;
|
|
118
|
+
|
|
119
|
+
status:
|
|
120
|
+
| 'received'
|
|
121
|
+
| 'queued'
|
|
122
|
+
| 'claimed'
|
|
123
|
+
| 'sending'
|
|
124
|
+
| 'sent'
|
|
125
|
+
| 'sent_unconfirmed'
|
|
126
|
+
| 'delivered'
|
|
127
|
+
| 'failed';
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
71
131
|
export interface MessageListParams {
|
|
72
132
|
direction?: 'all' | 'inbound' | 'outbound';
|
|
73
133
|
|
|
@@ -78,6 +138,37 @@ export interface MessageListParams {
|
|
|
78
138
|
since?: string;
|
|
79
139
|
}
|
|
80
140
|
|
|
141
|
+
export interface MessageSendParams {
|
|
142
|
+
/**
|
|
143
|
+
* SMS body text, up to 1600 characters (rejected with 400 beyond that, before
|
|
144
|
+
* hashing). A number's own limit may be lower and is answered 422 body_too_long.
|
|
145
|
+
*/
|
|
146
|
+
body: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Recipient phone number, as E.164 or a US 10/11-digit number. Destinations the
|
|
150
|
+
* number cannot send to are rejected with 422 unsupported_destination, non-numbers
|
|
151
|
+
* with 422 invalid_recipient.
|
|
152
|
+
*/
|
|
153
|
+
to: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @deprecated Deprecated: use the Idempotency-Key header instead. Optional
|
|
157
|
+
* idempotency key. Replaying the same key and payload returns the original send.
|
|
158
|
+
*/
|
|
159
|
+
clientRequestId?: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Request a delivery report. Defaults to false.
|
|
163
|
+
*/
|
|
164
|
+
deliveryReport?: boolean;
|
|
165
|
+
}
|
|
166
|
+
|
|
81
167
|
export declare namespace Messages {
|
|
82
|
-
export {
|
|
168
|
+
export {
|
|
169
|
+
type MessageListResponse as MessageListResponse,
|
|
170
|
+
type MessageSendResponse as MessageSendResponse,
|
|
171
|
+
type MessageListParams as MessageListParams,
|
|
172
|
+
type MessageSendParams as MessageSendParams,
|
|
173
|
+
};
|
|
83
174
|
}
|