@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
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as Shared from "../shared.js";
|
|
3
3
|
import * as MessagesAPI from "./messages.js";
|
|
4
|
-
import { MessageListParams, MessageListResponse, Messages } from "./messages.js";
|
|
4
|
+
import { MessageListParams, MessageListResponse, MessageSendParams, MessageSendResponse, Messages } from "./messages.js";
|
|
5
5
|
import { APIPromise } from "../../core/api-promise.js";
|
|
6
6
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
7
|
export declare class Numbers extends APIResource {
|
|
8
8
|
messages: MessagesAPI.Messages;
|
|
9
9
|
/**
|
|
10
|
-
* Starts a
|
|
11
|
-
*
|
|
12
|
-
* its business state. `purpose` and `country` are mutually exclusive.
|
|
10
|
+
* Starts a phone-number purchase. Poll the returned phone number for status
|
|
11
|
+
* updates. `purpose` and `country` cannot be combined.
|
|
13
12
|
*
|
|
14
13
|
* @example
|
|
15
14
|
* ```ts
|
|
16
15
|
* const number = await client.numbers.create();
|
|
17
16
|
* ```
|
|
18
17
|
*/
|
|
19
|
-
create(
|
|
18
|
+
create(body?: NumberCreateParams | null | undefined, options?: RequestOptions): APIPromise<NumberCreateResponse>;
|
|
20
19
|
/**
|
|
21
20
|
* Retrieves a single phone number.
|
|
22
21
|
*
|
|
@@ -29,11 +28,8 @@ export declare class Numbers extends APIResource {
|
|
|
29
28
|
*/
|
|
30
29
|
retrieve(id: string, options?: RequestOptions): APIPromise<NumberRetrieveResponse>;
|
|
31
30
|
/**
|
|
32
|
-
* Updates the
|
|
33
|
-
*
|
|
34
|
-
* capped at 100 characters, is display-only, and never affects routing. It also
|
|
35
|
-
* seeds the billing entity name when set at purchase time; a later change here
|
|
36
|
-
* does not rename the already-created billing entity.
|
|
31
|
+
* Updates the display label. Omitting `label` leaves it unchanged; null or an
|
|
32
|
+
* empty string clears it.
|
|
37
33
|
*
|
|
38
34
|
* @example
|
|
39
35
|
* ```ts
|
|
@@ -44,8 +40,7 @@ export declare class Numbers extends APIResource {
|
|
|
44
40
|
*/
|
|
45
41
|
update(id: string, body?: NumberUpdateParams | null | undefined, options?: RequestOptions): APIPromise<NumberUpdateResponse>;
|
|
46
42
|
/**
|
|
47
|
-
* Lists
|
|
48
|
-
* provisioned (`mobilerun`) numbers.
|
|
43
|
+
* Lists the caller's phone numbers.
|
|
49
44
|
*
|
|
50
45
|
* @example
|
|
51
46
|
* ```ts
|
|
@@ -54,23 +49,9 @@ export declare class Numbers extends APIResource {
|
|
|
54
49
|
*/
|
|
55
50
|
list(query?: NumberListParams | null | undefined, options?: RequestOptions): APIPromise<NumberListResponse>;
|
|
56
51
|
/**
|
|
57
|
-
* Cancels a
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* being processed, the checkout is closed immediately and the number is retired.
|
|
61
|
-
* - If the number is on the standard paid plan and already paid and in service,
|
|
62
|
-
* cancellation is scheduled for the end of the current billing period rather
|
|
63
|
-
* than taking effect immediately. The number stays usable through the period
|
|
64
|
-
* already paid for, with no partial refund. Calling this again while a
|
|
65
|
-
* cancellation is already scheduled is a no-op that returns the same result. The
|
|
66
|
-
* response's `state` reflects this as `cancel_scheduled` with
|
|
67
|
-
* `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
|
|
68
|
-
* confirms the cancellation.
|
|
69
|
-
*
|
|
70
|
-
* Any other state (already refunding, a permanent billing failure, a payment
|
|
71
|
-
* currently being processed, an included-plan number, or a non-hosted/BYO number)
|
|
72
|
-
* returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
|
|
73
|
-
* owned by the caller.
|
|
52
|
+
* Cancels a pending purchase or schedules cancellation of an active paid phone
|
|
53
|
+
* number. Repeating a scheduled cancellation is safe. Returns 409 when
|
|
54
|
+
* cancellation is not available.
|
|
74
55
|
*
|
|
75
56
|
* @example
|
|
76
57
|
* ```ts
|
|
@@ -81,8 +62,19 @@ export declare class Numbers extends APIResource {
|
|
|
81
62
|
*/
|
|
82
63
|
delete(id: string, options?: RequestOptions): APIPromise<NumberDeleteResponse>;
|
|
83
64
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
65
|
+
* Returns included phone capacity for a country. Creating a phone is
|
|
66
|
+
* authoritative.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const response = await client.numbers.capacity({
|
|
71
|
+
* country: 'de',
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
capacity(query: NumberCapacityParams, options?: RequestOptions): APIPromise<NumberCapacityResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Lists available countries and current phone-number availability.
|
|
86
78
|
*
|
|
87
79
|
* @example
|
|
88
80
|
* ```ts
|
|
@@ -116,8 +108,18 @@ export interface NumberRetrieveResponse {
|
|
|
116
108
|
export declare namespace NumberRetrieveResponse {
|
|
117
109
|
interface Data {
|
|
118
110
|
id: string;
|
|
111
|
+
/**
|
|
112
|
+
* Actions currently available for this phone number.
|
|
113
|
+
*/
|
|
114
|
+
actions: Data.Actions;
|
|
119
115
|
cancelAtPeriodEnd: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* @deprecated Deprecated: use `actions.cancel`
|
|
118
|
+
*/
|
|
120
119
|
cancellable: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated Deprecated: use `actions.send`
|
|
122
|
+
*/
|
|
121
123
|
canSend: boolean;
|
|
122
124
|
capabilities: Array<'sms' | 'voice'> | null;
|
|
123
125
|
checkoutUrl: string | null;
|
|
@@ -130,6 +132,24 @@ export declare namespace NumberRetrieveResponse {
|
|
|
130
132
|
state: 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed';
|
|
131
133
|
updatedAt: string | null;
|
|
132
134
|
}
|
|
135
|
+
namespace Data {
|
|
136
|
+
/**
|
|
137
|
+
* Actions currently available for this phone number.
|
|
138
|
+
*/
|
|
139
|
+
interface Actions {
|
|
140
|
+
/**
|
|
141
|
+
* True when DELETE /numbers/phones/{id} would currently succeed.
|
|
142
|
+
*/
|
|
143
|
+
cancel: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* True when this number passes the send gate of POST
|
|
146
|
+
* /numbers/phones/{id}/messages: self-service sending is switched on and the
|
|
147
|
+
* number is active and able to send SMS. Daily and burst limits and recipient/body
|
|
148
|
+
* checks still apply; the send endpoint stays the final judge.
|
|
149
|
+
*/
|
|
150
|
+
send: boolean;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
133
153
|
}
|
|
134
154
|
export interface NumberUpdateResponse {
|
|
135
155
|
data: NumberUpdateResponse.Data;
|
|
@@ -137,8 +157,18 @@ export interface NumberUpdateResponse {
|
|
|
137
157
|
export declare namespace NumberUpdateResponse {
|
|
138
158
|
interface Data {
|
|
139
159
|
id: string;
|
|
160
|
+
/**
|
|
161
|
+
* Actions currently available for this phone number.
|
|
162
|
+
*/
|
|
163
|
+
actions: Data.Actions;
|
|
140
164
|
cancelAtPeriodEnd: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* @deprecated Deprecated: use `actions.cancel`
|
|
167
|
+
*/
|
|
141
168
|
cancellable: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* @deprecated Deprecated: use `actions.send`
|
|
171
|
+
*/
|
|
142
172
|
canSend: boolean;
|
|
143
173
|
capabilities: Array<'sms' | 'voice'> | null;
|
|
144
174
|
checkoutUrl: string | null;
|
|
@@ -151,6 +181,24 @@ export declare namespace NumberUpdateResponse {
|
|
|
151
181
|
state: 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed';
|
|
152
182
|
updatedAt: string | null;
|
|
153
183
|
}
|
|
184
|
+
namespace Data {
|
|
185
|
+
/**
|
|
186
|
+
* Actions currently available for this phone number.
|
|
187
|
+
*/
|
|
188
|
+
interface Actions {
|
|
189
|
+
/**
|
|
190
|
+
* True when DELETE /numbers/phones/{id} would currently succeed.
|
|
191
|
+
*/
|
|
192
|
+
cancel: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* True when this number passes the send gate of POST
|
|
195
|
+
* /numbers/phones/{id}/messages: self-service sending is switched on and the
|
|
196
|
+
* number is active and able to send SMS. Daily and burst limits and recipient/body
|
|
197
|
+
* checks still apply; the send endpoint stays the final judge.
|
|
198
|
+
*/
|
|
199
|
+
send: boolean;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
154
202
|
}
|
|
155
203
|
export interface NumberListResponse {
|
|
156
204
|
items: Array<NumberListResponse.Item>;
|
|
@@ -159,8 +207,18 @@ export interface NumberListResponse {
|
|
|
159
207
|
export declare namespace NumberListResponse {
|
|
160
208
|
interface Item {
|
|
161
209
|
id: string;
|
|
210
|
+
/**
|
|
211
|
+
* Actions currently available for this phone number.
|
|
212
|
+
*/
|
|
213
|
+
actions: Item.Actions;
|
|
162
214
|
cancelAtPeriodEnd: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* @deprecated Deprecated: use `actions.cancel`
|
|
217
|
+
*/
|
|
163
218
|
cancellable: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* @deprecated Deprecated: use `actions.send`
|
|
221
|
+
*/
|
|
164
222
|
canSend: boolean;
|
|
165
223
|
capabilities: Array<'sms' | 'voice'> | null;
|
|
166
224
|
checkoutUrl: string | null;
|
|
@@ -173,6 +231,24 @@ export declare namespace NumberListResponse {
|
|
|
173
231
|
state: 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed';
|
|
174
232
|
updatedAt: string | null;
|
|
175
233
|
}
|
|
234
|
+
namespace Item {
|
|
235
|
+
/**
|
|
236
|
+
* Actions currently available for this phone number.
|
|
237
|
+
*/
|
|
238
|
+
interface Actions {
|
|
239
|
+
/**
|
|
240
|
+
* True when DELETE /numbers/phones/{id} would currently succeed.
|
|
241
|
+
*/
|
|
242
|
+
cancel: boolean;
|
|
243
|
+
/**
|
|
244
|
+
* True when this number passes the send gate of POST
|
|
245
|
+
* /numbers/phones/{id}/messages: self-service sending is switched on and the
|
|
246
|
+
* number is active and able to send SMS. Daily and burst limits and recipient/body
|
|
247
|
+
* checks still apply; the send endpoint stays the final judge.
|
|
248
|
+
*/
|
|
249
|
+
send: boolean;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
176
252
|
}
|
|
177
253
|
export interface NumberDeleteResponse {
|
|
178
254
|
data: NumberDeleteResponse.Data;
|
|
@@ -180,8 +256,18 @@ export interface NumberDeleteResponse {
|
|
|
180
256
|
export declare namespace NumberDeleteResponse {
|
|
181
257
|
interface Data {
|
|
182
258
|
id: string;
|
|
259
|
+
/**
|
|
260
|
+
* Actions currently available for this phone number.
|
|
261
|
+
*/
|
|
262
|
+
actions: Data.Actions;
|
|
183
263
|
cancelAtPeriodEnd: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* @deprecated Deprecated: use `actions.cancel`
|
|
266
|
+
*/
|
|
184
267
|
cancellable: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* @deprecated Deprecated: use `actions.send`
|
|
270
|
+
*/
|
|
185
271
|
canSend: boolean;
|
|
186
272
|
capabilities: Array<'sms' | 'voice'> | null;
|
|
187
273
|
checkoutUrl: string | null;
|
|
@@ -194,6 +280,39 @@ export declare namespace NumberDeleteResponse {
|
|
|
194
280
|
state: 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed';
|
|
195
281
|
updatedAt: string | null;
|
|
196
282
|
}
|
|
283
|
+
namespace Data {
|
|
284
|
+
/**
|
|
285
|
+
* Actions currently available for this phone number.
|
|
286
|
+
*/
|
|
287
|
+
interface Actions {
|
|
288
|
+
/**
|
|
289
|
+
* True when DELETE /numbers/phones/{id} would currently succeed.
|
|
290
|
+
*/
|
|
291
|
+
cancel: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* True when this number passes the send gate of POST
|
|
294
|
+
* /numbers/phones/{id}/messages: self-service sending is switched on and the
|
|
295
|
+
* number is active and able to send SMS. Daily and burst limits and recipient/body
|
|
296
|
+
* checks still apply; the send endpoint stays the final judge.
|
|
297
|
+
*/
|
|
298
|
+
send: boolean;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
export interface NumberCapacityResponse {
|
|
303
|
+
data: NumberCapacityResponse.Data;
|
|
304
|
+
}
|
|
305
|
+
export declare namespace NumberCapacityResponse {
|
|
306
|
+
interface Data {
|
|
307
|
+
included: number;
|
|
308
|
+
/**
|
|
309
|
+
* @deprecated Deprecated — always equal to `remaining`. Migrate to `remaining`;
|
|
310
|
+
* this field will be removed in a future revision.
|
|
311
|
+
*/
|
|
312
|
+
includedRemaining: number;
|
|
313
|
+
remaining: number;
|
|
314
|
+
status: 'available' | 'exhausted' | 'not_included';
|
|
315
|
+
}
|
|
197
316
|
}
|
|
198
317
|
export interface NumberCountriesResponse {
|
|
199
318
|
data: NumberCountriesResponse.Data;
|
|
@@ -227,29 +346,25 @@ export declare namespace NumberPurposesResponse {
|
|
|
227
346
|
}
|
|
228
347
|
export interface NumberCreateParams {
|
|
229
348
|
/**
|
|
230
|
-
*
|
|
231
|
-
* checkout (
|
|
349
|
+
* Use included capacity when available, require included capacity without paid
|
|
350
|
+
* fallback (included_only), or start a paid checkout (rent).
|
|
232
351
|
*/
|
|
233
|
-
billingPreference?: 'included' | 'rent';
|
|
352
|
+
billingPreference?: 'included' | 'included_only' | 'rent';
|
|
234
353
|
/**
|
|
235
|
-
*
|
|
236
|
-
*
|
|
354
|
+
* Optional ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.
|
|
355
|
+
* Cannot be combined with `purpose`.
|
|
237
356
|
*/
|
|
238
357
|
country?: string;
|
|
239
358
|
/**
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
359
|
+
* User-defined display label — NFC-normalized, up to 100 GRAPHEMES (not UTF-16
|
|
360
|
+
* code units; an emoji/flag may span several). Display-only, never used for
|
|
361
|
+
* routing. Also seeds the billing entity name at purchase.
|
|
243
362
|
*/
|
|
244
363
|
label?: string | null;
|
|
245
364
|
/**
|
|
246
|
-
*
|
|
365
|
+
* Optional purpose from GET /numbers/phones/purposes.
|
|
247
366
|
*/
|
|
248
367
|
purpose?: string;
|
|
249
|
-
/**
|
|
250
|
-
* Header param: Optional request idempotency key.
|
|
251
|
-
*/
|
|
252
|
-
'Idempotency-Key'?: string;
|
|
253
368
|
}
|
|
254
369
|
export interface NumberUpdateParams {
|
|
255
370
|
/**
|
|
@@ -263,8 +378,14 @@ export interface NumberListParams {
|
|
|
263
378
|
page?: number;
|
|
264
379
|
pageSize?: number;
|
|
265
380
|
}
|
|
381
|
+
export interface NumberCapacityParams {
|
|
382
|
+
/**
|
|
383
|
+
* ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.
|
|
384
|
+
*/
|
|
385
|
+
country: string;
|
|
386
|
+
}
|
|
266
387
|
export declare namespace Numbers {
|
|
267
|
-
export { type NumberCreateResponse as NumberCreateResponse, type NumberRetrieveResponse as NumberRetrieveResponse, type NumberUpdateResponse as NumberUpdateResponse, type NumberListResponse as NumberListResponse, type NumberDeleteResponse as NumberDeleteResponse, type NumberCountriesResponse as NumberCountriesResponse, type NumberPurposesResponse as NumberPurposesResponse, type NumberCreateParams as NumberCreateParams, type NumberUpdateParams as NumberUpdateParams, type NumberListParams as NumberListParams, };
|
|
268
|
-
export { Messages as Messages, type MessageListResponse as MessageListResponse, type MessageListParams as MessageListParams, };
|
|
388
|
+
export { type NumberCreateResponse as NumberCreateResponse, type NumberRetrieveResponse as NumberRetrieveResponse, type NumberUpdateResponse as NumberUpdateResponse, type NumberListResponse as NumberListResponse, type NumberDeleteResponse as NumberDeleteResponse, type NumberCapacityResponse as NumberCapacityResponse, type NumberCountriesResponse as NumberCountriesResponse, type NumberPurposesResponse as NumberPurposesResponse, type NumberCreateParams as NumberCreateParams, type NumberUpdateParams as NumberUpdateParams, type NumberListParams as NumberListParams, type NumberCapacityParams as NumberCapacityParams, };
|
|
389
|
+
export { Messages as Messages, type MessageListResponse as MessageListResponse, type MessageSendResponse as MessageSendResponse, type MessageListParams as MessageListParams, type MessageSendParams as MessageSendParams, };
|
|
269
390
|
}
|
|
270
391
|
//# sourceMappingURL=numbers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACT,sBAAmB;AACpB,OAAO,EAAE,UAAU,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kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -6,7 +6,6 @@ const tslib_1 = require("../../internal/tslib.js");
|
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
|
7
7
|
const MessagesAPI = tslib_1.__importStar(require("./messages.js"));
|
|
8
8
|
const messages_1 = require("./messages.js");
|
|
9
|
-
const headers_1 = require("../../internal/headers.js");
|
|
10
9
|
const path_1 = require("../../internal/utils/path.js");
|
|
11
10
|
class Numbers extends resource_1.APIResource {
|
|
12
11
|
constructor() {
|
|
@@ -14,25 +13,16 @@ class Numbers extends resource_1.APIResource {
|
|
|
14
13
|
this.messages = new MessagesAPI.Messages(this._client);
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
17
|
-
* Starts a
|
|
18
|
-
*
|
|
19
|
-
* its business state. `purpose` and `country` are mutually exclusive.
|
|
16
|
+
* Starts a phone-number purchase. Poll the returned phone number for status
|
|
17
|
+
* updates. `purpose` and `country` cannot be combined.
|
|
20
18
|
*
|
|
21
19
|
* @example
|
|
22
20
|
* ```ts
|
|
23
21
|
* const number = await client.numbers.create();
|
|
24
22
|
* ```
|
|
25
23
|
*/
|
|
26
|
-
create(
|
|
27
|
-
|
|
28
|
-
return this._client.post('/numbers/phones', {
|
|
29
|
-
body,
|
|
30
|
-
...options,
|
|
31
|
-
headers: (0, headers_1.buildHeaders)([
|
|
32
|
-
{ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
|
|
33
|
-
options?.headers,
|
|
34
|
-
]),
|
|
35
|
-
});
|
|
24
|
+
create(body = {}, options) {
|
|
25
|
+
return this._client.post('/numbers/phones', { body, ...options });
|
|
36
26
|
}
|
|
37
27
|
/**
|
|
38
28
|
* Retrieves a single phone number.
|
|
@@ -48,11 +38,8 @@ class Numbers extends resource_1.APIResource {
|
|
|
48
38
|
return this._client.get((0, path_1.path) `/numbers/phones/${id}`, options);
|
|
49
39
|
}
|
|
50
40
|
/**
|
|
51
|
-
* Updates the
|
|
52
|
-
*
|
|
53
|
-
* capped at 100 characters, is display-only, and never affects routing. It also
|
|
54
|
-
* seeds the billing entity name when set at purchase time; a later change here
|
|
55
|
-
* does not rename the already-created billing entity.
|
|
41
|
+
* Updates the display label. Omitting `label` leaves it unchanged; null or an
|
|
42
|
+
* empty string clears it.
|
|
56
43
|
*
|
|
57
44
|
* @example
|
|
58
45
|
* ```ts
|
|
@@ -65,8 +52,7 @@ class Numbers extends resource_1.APIResource {
|
|
|
65
52
|
return this._client.patch((0, path_1.path) `/numbers/phones/${id}`, { body, ...options });
|
|
66
53
|
}
|
|
67
54
|
/**
|
|
68
|
-
* Lists
|
|
69
|
-
* provisioned (`mobilerun`) numbers.
|
|
55
|
+
* Lists the caller's phone numbers.
|
|
70
56
|
*
|
|
71
57
|
* @example
|
|
72
58
|
* ```ts
|
|
@@ -77,23 +63,9 @@ class Numbers extends resource_1.APIResource {
|
|
|
77
63
|
return this._client.get('/numbers/phones', { query, ...options });
|
|
78
64
|
}
|
|
79
65
|
/**
|
|
80
|
-
* Cancels a
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* being processed, the checkout is closed immediately and the number is retired.
|
|
84
|
-
* - If the number is on the standard paid plan and already paid and in service,
|
|
85
|
-
* cancellation is scheduled for the end of the current billing period rather
|
|
86
|
-
* than taking effect immediately. The number stays usable through the period
|
|
87
|
-
* already paid for, with no partial refund. Calling this again while a
|
|
88
|
-
* cancellation is already scheduled is a no-op that returns the same result. The
|
|
89
|
-
* response's `state` reflects this as `cancel_scheduled` with
|
|
90
|
-
* `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
|
|
91
|
-
* confirms the cancellation.
|
|
92
|
-
*
|
|
93
|
-
* Any other state (already refunding, a permanent billing failure, a payment
|
|
94
|
-
* currently being processed, an included-plan number, or a non-hosted/BYO number)
|
|
95
|
-
* returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
|
|
96
|
-
* owned by the caller.
|
|
66
|
+
* Cancels a pending purchase or schedules cancellation of an active paid phone
|
|
67
|
+
* number. Repeating a scheduled cancellation is safe. Returns 409 when
|
|
68
|
+
* cancellation is not available.
|
|
97
69
|
*
|
|
98
70
|
* @example
|
|
99
71
|
* ```ts
|
|
@@ -106,8 +78,21 @@ class Numbers extends resource_1.APIResource {
|
|
|
106
78
|
return this._client.delete((0, path_1.path) `/numbers/phones/${id}`, options);
|
|
107
79
|
}
|
|
108
80
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
81
|
+
* Returns included phone capacity for a country. Creating a phone is
|
|
82
|
+
* authoritative.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* const response = await client.numbers.capacity({
|
|
87
|
+
* country: 'de',
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
capacity(query, options) {
|
|
92
|
+
return this._client.get('/numbers/phones/capacity', { query, ...options });
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Lists available countries and current phone-number availability.
|
|
111
96
|
*
|
|
112
97
|
* @example
|
|
113
98
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.js","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,mEAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"numbers.js","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":";AA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OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,OAAwB;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AAzHD,0BAyHC;AA0YD,OAAO,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import * as MessagesAPI from "./messages.mjs";
|
|
4
|
-
import { Messages } from "./messages.mjs";
|
|
5
|
-
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
|
+
import { Messages, } from "./messages.mjs";
|
|
6
5
|
import { path } from "../../internal/utils/path.mjs";
|
|
7
6
|
export class Numbers extends APIResource {
|
|
8
7
|
constructor() {
|
|
@@ -10,25 +9,16 @@ export class Numbers extends APIResource {
|
|
|
10
9
|
this.messages = new MessagesAPI.Messages(this._client);
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
13
|
-
* Starts a
|
|
14
|
-
*
|
|
15
|
-
* its business state. `purpose` and `country` are mutually exclusive.
|
|
12
|
+
* Starts a phone-number purchase. Poll the returned phone number for status
|
|
13
|
+
* updates. `purpose` and `country` cannot be combined.
|
|
16
14
|
*
|
|
17
15
|
* @example
|
|
18
16
|
* ```ts
|
|
19
17
|
* const number = await client.numbers.create();
|
|
20
18
|
* ```
|
|
21
19
|
*/
|
|
22
|
-
create(
|
|
23
|
-
|
|
24
|
-
return this._client.post('/numbers/phones', {
|
|
25
|
-
body,
|
|
26
|
-
...options,
|
|
27
|
-
headers: buildHeaders([
|
|
28
|
-
{ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
|
|
29
|
-
options?.headers,
|
|
30
|
-
]),
|
|
31
|
-
});
|
|
20
|
+
create(body = {}, options) {
|
|
21
|
+
return this._client.post('/numbers/phones', { body, ...options });
|
|
32
22
|
}
|
|
33
23
|
/**
|
|
34
24
|
* Retrieves a single phone number.
|
|
@@ -44,11 +34,8 @@ export class Numbers extends APIResource {
|
|
|
44
34
|
return this._client.get(path `/numbers/phones/${id}`, options);
|
|
45
35
|
}
|
|
46
36
|
/**
|
|
47
|
-
* Updates the
|
|
48
|
-
*
|
|
49
|
-
* capped at 100 characters, is display-only, and never affects routing. It also
|
|
50
|
-
* seeds the billing entity name when set at purchase time; a later change here
|
|
51
|
-
* does not rename the already-created billing entity.
|
|
37
|
+
* Updates the display label. Omitting `label` leaves it unchanged; null or an
|
|
38
|
+
* empty string clears it.
|
|
52
39
|
*
|
|
53
40
|
* @example
|
|
54
41
|
* ```ts
|
|
@@ -61,8 +48,7 @@ export class Numbers extends APIResource {
|
|
|
61
48
|
return this._client.patch(path `/numbers/phones/${id}`, { body, ...options });
|
|
62
49
|
}
|
|
63
50
|
/**
|
|
64
|
-
* Lists
|
|
65
|
-
* provisioned (`mobilerun`) numbers.
|
|
51
|
+
* Lists the caller's phone numbers.
|
|
66
52
|
*
|
|
67
53
|
* @example
|
|
68
54
|
* ```ts
|
|
@@ -73,23 +59,9 @@ export class Numbers extends APIResource {
|
|
|
73
59
|
return this._client.get('/numbers/phones', { query, ...options });
|
|
74
60
|
}
|
|
75
61
|
/**
|
|
76
|
-
* Cancels a
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* being processed, the checkout is closed immediately and the number is retired.
|
|
80
|
-
* - If the number is on the standard paid plan and already paid and in service,
|
|
81
|
-
* cancellation is scheduled for the end of the current billing period rather
|
|
82
|
-
* than taking effect immediately. The number stays usable through the period
|
|
83
|
-
* already paid for, with no partial refund. Calling this again while a
|
|
84
|
-
* cancellation is already scheduled is a no-op that returns the same result. The
|
|
85
|
-
* response's `state` reflects this as `cancel_scheduled` with
|
|
86
|
-
* `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
|
|
87
|
-
* confirms the cancellation.
|
|
88
|
-
*
|
|
89
|
-
* Any other state (already refunding, a permanent billing failure, a payment
|
|
90
|
-
* currently being processed, an included-plan number, or a non-hosted/BYO number)
|
|
91
|
-
* returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
|
|
92
|
-
* owned by the caller.
|
|
62
|
+
* Cancels a pending purchase or schedules cancellation of an active paid phone
|
|
63
|
+
* number. Repeating a scheduled cancellation is safe. Returns 409 when
|
|
64
|
+
* cancellation is not available.
|
|
93
65
|
*
|
|
94
66
|
* @example
|
|
95
67
|
* ```ts
|
|
@@ -102,8 +74,21 @@ export class Numbers extends APIResource {
|
|
|
102
74
|
return this._client.delete(path `/numbers/phones/${id}`, options);
|
|
103
75
|
}
|
|
104
76
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
77
|
+
* Returns included phone capacity for a country. Creating a phone is
|
|
78
|
+
* authoritative.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const response = await client.numbers.capacity({
|
|
83
|
+
* country: 'de',
|
|
84
|
+
* });
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
capacity(query, options) {
|
|
88
|
+
return this._client.get('/numbers/phones/capacity', { query, ...options });
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Lists available countries and current phone-number availability.
|
|
107
92
|
*
|
|
108
93
|
* @example
|
|
109
94
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.mjs","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings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