@mobilerun/sdk 5.4.0 → 5.5.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 +8 -0
- package/client.d.mts +2 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -5
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/apps.d.mts +10 -2
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +10 -2
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +3 -1
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +3 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/assistant/conversations.d.mts +26 -4
- package/resources/assistant/conversations.d.mts.map +1 -1
- package/resources/assistant/conversations.d.ts +26 -4
- package/resources/assistant/conversations.d.ts.map +1 -1
- package/resources/assistant/conversations.js +12 -4
- package/resources/assistant/conversations.js.map +1 -1
- package/resources/assistant/conversations.mjs +12 -4
- package/resources/assistant/conversations.mjs.map +1 -1
- package/resources/connect/proxies.d.mts +36 -20
- package/resources/connect/proxies.d.mts.map +1 -1
- package/resources/connect/proxies.d.ts +36 -20
- package/resources/connect/proxies.d.ts.map +1 -1
- package/resources/connect/proxies.js +10 -2
- package/resources/connect/proxies.js.map +1 -1
- package/resources/connect/proxies.mjs +10 -2
- 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/devices.d.mts +29 -4
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +29 -4
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +7 -4
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +7 -4
- package/resources/devices/devices.mjs.map +1 -1
- package/resources/devices/index.d.mts +1 -0
- package/resources/devices/index.d.mts.map +1 -1
- package/resources/devices/index.d.ts +1 -0
- 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 +11 -0
- package/resources/devices/recordings.d.mts.map +1 -1
- package/resources/devices/recordings.d.ts +11 -0
- package/resources/devices/recordings.d.ts.map +1 -1
- package/resources/devices/traffic-sessions.d.mts +173 -0
- package/resources/devices/traffic-sessions.d.mts.map +1 -0
- package/resources/devices/traffic-sessions.d.ts +173 -0
- package/resources/devices/traffic-sessions.d.ts.map +1 -0
- package/resources/devices/traffic-sessions.js +43 -0
- package/resources/devices/traffic-sessions.js.map +1 -0
- package/resources/devices/traffic-sessions.mjs +39 -0
- package/resources/devices/traffic-sessions.mjs.map +1 -0
- package/resources/files.d.mts +72 -0
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +72 -0
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.mts +1 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -2
- 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 +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mailboxes/mailboxes.d.mts +45 -37
- package/resources/mailboxes/mailboxes.d.mts.map +1 -1
- package/resources/mailboxes/mailboxes.d.ts +45 -37
- package/resources/mailboxes/mailboxes.d.ts.map +1 -1
- package/resources/mailboxes/mailboxes.js +13 -20
- package/resources/mailboxes/mailboxes.js.map +1 -1
- package/resources/mailboxes/mailboxes.mjs +13 -20
- 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/messages.d.mts +2 -4
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +2 -4
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +2 -4
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +2 -4
- package/resources/messages/messages.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.map +1 -1
- package/resources/numbers/numbers.d.mts +48 -35
- package/resources/numbers/numbers.d.mts.map +1 -1
- package/resources/numbers/numbers.d.ts +48 -35
- package/resources/numbers/numbers.d.ts.map +1 -1
- package/resources/numbers/numbers.js +23 -29
- package/resources/numbers/numbers.js.map +1 -1
- package/resources/numbers/numbers.mjs +23 -29
- package/resources/numbers/numbers.mjs.map +1 -1
- package/resources/tasks/tasks.d.mts +80 -32
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +80 -32
- package/resources/tasks/tasks.d.ts.map +1 -1
- package/resources/tasks/tasks.js.map +1 -1
- package/resources/tasks/tasks.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +1 -0
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +1 -0
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/resources/workflows/events.d.mts +18 -0
- package/resources/workflows/events.d.mts.map +1 -1
- package/resources/workflows/events.d.ts +18 -0
- package/resources/workflows/events.d.ts.map +1 -1
- package/resources/workflows/executions.d.mts +84 -5
- package/resources/workflows/executions.d.mts.map +1 -1
- package/resources/workflows/executions.d.ts +84 -5
- package/resources/workflows/executions.d.ts.map +1 -1
- package/resources/workflows/executions.js +3 -2
- package/resources/workflows/executions.js.map +1 -1
- package/resources/workflows/executions.mjs +3 -2
- package/resources/workflows/executions.mjs.map +1 -1
- package/resources/workflows/flows/actions.d.mts +19 -0
- package/resources/workflows/flows/actions.d.mts.map +1 -1
- package/resources/workflows/flows/actions.d.ts +19 -0
- package/resources/workflows/flows/actions.d.ts.map +1 -1
- package/resources/workflows/flows/flows.d.mts +142 -2
- package/resources/workflows/flows/flows.d.mts.map +1 -1
- package/resources/workflows/flows/flows.d.ts +142 -2
- package/resources/workflows/flows/flows.d.ts.map +1 -1
- package/resources/workflows/flows/flows.js +11 -1
- package/resources/workflows/flows/flows.js.map +1 -1
- package/resources/workflows/flows/flows.mjs +11 -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 +1 -1
- package/resources/workflows/index.d.mts.map +1 -1
- package/resources/workflows/index.d.ts +1 -1
- package/resources/workflows/index.d.ts.map +1 -1
- package/resources/workflows/index.js.map +1 -1
- package/resources/workflows/index.mjs.map +1 -1
- package/resources/workflows/triggers.d.mts +17 -3
- package/resources/workflows/triggers.d.mts.map +1 -1
- package/resources/workflows/triggers.d.ts +17 -3
- package/resources/workflows/triggers.d.ts.map +1 -1
- package/resources/workflows/workflows.d.mts +2 -2
- package/resources/workflows/workflows.d.mts.map +1 -1
- package/resources/workflows/workflows.d.ts +2 -2
- package/resources/workflows/workflows.d.ts.map +1 -1
- package/resources/workflows/workflows.js.map +1 -1
- package/resources/workflows/workflows.mjs.map +1 -1
- package/src/client.ts +4 -41
- package/src/resources/apps.ts +11 -2
- package/src/resources/assistant/conversations.ts +38 -4
- package/src/resources/connect/proxies.ts +49 -21
- package/src/resources/devices/apps.ts +41 -17
- package/src/resources/devices/devices.ts +58 -4
- package/src/resources/devices/index.ts +11 -0
- package/src/resources/devices/keyboard.ts +10 -3
- package/src/resources/devices/recordings.ts +12 -0
- package/src/resources/devices/traffic-sessions.ts +299 -0
- package/src/resources/files.ts +114 -0
- package/src/resources/index.ts +2 -19
- package/src/resources/mailboxes/mailboxes.ts +56 -37
- package/src/resources/mailboxes/messages.ts +2 -2
- package/src/resources/messages/conversations.ts +4 -15
- package/src/resources/messages/messages.ts +2 -4
- package/src/resources/numbers/index.ts +2 -0
- package/src/resources/numbers/numbers.ts +58 -34
- package/src/resources/tasks/tasks.ts +120 -40
- package/src/resources/webhooks/webhooks.ts +2 -0
- package/src/resources/workflows/events.ts +24 -0
- package/src/resources/workflows/executions.ts +121 -5
- package/src/resources/workflows/flows/actions.ts +26 -0
- package/src/resources/workflows/flows/flows.ts +182 -1
- package/src/resources/workflows/flows/index.ts +1 -0
- package/src/resources/workflows/index.ts +1 -0
- package/src/resources/workflows/triggers.ts +19 -3
- package/src/resources/workflows/workflows.ts +2 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- 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,26 +2,15 @@
|
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
export class Conversations extends APIResource {
|
|
4
4
|
/**
|
|
5
|
-
* Lists
|
|
6
|
-
*
|
|
7
|
-
* it was seen through. Optional `esimId` or `numberId` narrows to threads on one
|
|
8
|
-
* eSIM or number.
|
|
9
|
-
*
|
|
10
|
-
* Cursor-paginated via `limit` (default 20, max 100) and
|
|
11
|
-
* `cursorLastOccurredAt`/`cursorLastMessageId` (both required together, taken from
|
|
12
|
-
* a previous page's `nextCursor`). Pagination follows each thread's most recent
|
|
13
|
-
* activity rather than a fixed snapshot, so a thread with new activity can move
|
|
14
|
-
* ahead of an in-progress page fetch. Clients that need a stable ordering should
|
|
15
|
-
* snapshot their own view.
|
|
5
|
+
* Lists SMS conversations by recent activity. Use both cursor fields from
|
|
6
|
+
* `nextCursor` to fetch the next page.
|
|
16
7
|
*/
|
|
17
8
|
list(query = {}, options) {
|
|
18
9
|
return this._client.get('/numbers/messages/conversations', { query, ...options });
|
|
19
10
|
}
|
|
20
11
|
/**
|
|
21
|
-
* Marks
|
|
22
|
-
*
|
|
23
|
-
* conversation row's `lastMessage`. Idempotent: repeating the call with the same
|
|
24
|
-
* cursor updates 0 rows. Returns the number of rows updated.
|
|
12
|
+
* Marks inbound messages in a conversation as read through the supplied cursor.
|
|
13
|
+
* Repeating the request is safe.
|
|
25
14
|
*/
|
|
26
15
|
markRead(body, options) {
|
|
27
16
|
return this._client.post('/numbers/messages/conversations/read', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.mjs","sourceRoot":"","sources":["../../src/resources/messages/conversations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"conversations.mjs","sourceRoot":"","sources":["../../src/resources/messages/conversations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;OAGG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iCAAiC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sCAAsC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;CACF"}
|
|
@@ -7,10 +7,8 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
7
7
|
export declare class Messages extends APIResource {
|
|
8
8
|
conversations: ConversationsAPI.Conversations;
|
|
9
9
|
/**
|
|
10
|
-
* Lists
|
|
11
|
-
*
|
|
12
|
-
* characters), and peerKey (exact thread match). Each row includes its canonical
|
|
13
|
-
* thread key (`peerKey`).
|
|
10
|
+
* Lists SMS messages newest first, with filters for direction, eSIM, phone number,
|
|
11
|
+
* status, and conversation.
|
|
14
12
|
*/
|
|
15
13
|
list(query?: MessageListParams | null | undefined, options?: RequestOptions): APIPromise<MessageListResponse>;
|
|
16
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,gBAAgB,4BAAwB;AACpD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,aAAa,EACd,4BAAwB;AACzB,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE,qBAAa,QAAS,SAAQ,WAAW;IACvC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;IAEjG
|
|
1
|
+
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,gBAAgB,4BAAwB;AACpD,OAAO,EACL,sBA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AAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EACH,KAAK,GACL,UAAU,GACV,QAAQ,GACR,SAAS,GACT,SAAS,GACT,MAAM,GACN,kBAAkB,GAClB,WAAW,GACX,QAAQ,CAAC;CACd;AAID,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;IAExG,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
|
@@ -7,10 +7,8 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
7
7
|
export declare class Messages extends APIResource {
|
|
8
8
|
conversations: ConversationsAPI.Conversations;
|
|
9
9
|
/**
|
|
10
|
-
* Lists
|
|
11
|
-
*
|
|
12
|
-
* characters), and peerKey (exact thread match). Each row includes its canonical
|
|
13
|
-
* thread key (`peerKey`).
|
|
10
|
+
* Lists SMS messages newest first, with filters for direction, eSIM, phone number,
|
|
11
|
+
* status, and conversation.
|
|
14
12
|
*/
|
|
15
13
|
list(query?: MessageListParams | null | undefined, options?: RequestOptions): APIPromise<MessageListResponse>;
|
|
16
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM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|
this.conversations = new ConversationsAPI.Conversations(this._client);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Lists
|
|
16
|
-
*
|
|
17
|
-
* characters), and peerKey (exact thread match). Each row includes its canonical
|
|
18
|
-
* thread key (`peerKey`).
|
|
15
|
+
* Lists SMS messages newest first, with filters for direction, eSIM, phone number,
|
|
16
|
+
* status, and conversation.
|
|
19
17
|
*/
|
|
20
18
|
list(query = {}, options) {
|
|
21
19
|
return this._client.get('/numbers/messages', { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6EAAoD;AACpD,sDAMyB;AAIzB,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6EAAoD;AACpD,sDAMyB;AAIzB,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAYnG,CAAC;IAVC;;;OAGG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF;AAbD,4BAaC;AAuED,QAAQ,CAAC,aAAa,GAAG,6BAAa,CAAC"}
|
|
@@ -8,10 +8,8 @@ export class Messages extends APIResource {
|
|
|
8
8
|
this.conversations = new ConversationsAPI.Conversations(this._client);
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* Lists
|
|
12
|
-
*
|
|
13
|
-
* characters), and peerKey (exact thread match). Each row includes its canonical
|
|
14
|
-
* thread key (`peerKey`).
|
|
11
|
+
* Lists SMS messages newest first, with filters for direction, eSIM, phone number,
|
|
12
|
+
* status, and conversation.
|
|
15
13
|
*/
|
|
16
14
|
list(query = {}, options) {
|
|
17
15
|
return this._client.get('/numbers/messages', { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,gBAAgB,4BAAwB;AACpD,OAAO,EAKL,aAAa,GACd,4BAAwB;AAIzB,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,gBAAgB,4BAAwB;AACpD,OAAO,EAKL,aAAa,GACd,4BAAwB;AAIzB,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAYnG,CAAC;IAVC;;;OAGG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF;AAuED,QAAQ,CAAC,aAAa,GAAG,aAAa,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Messages, type MessageListResponse, type MessageListParams } from "./messages.mjs";
|
|
2
|
-
export { Numbers, type NumberCreateResponse, type NumberRetrieveResponse, type NumberUpdateResponse, type NumberListResponse, type NumberDeleteResponse, type NumberCountriesResponse, type NumberPurposesResponse, type NumberCreateParams, type NumberUpdateParams, type NumberListParams, } from "./numbers.mjs";
|
|
2
|
+
export { Numbers, type NumberCreateResponse, type NumberRetrieveResponse, type NumberUpdateResponse, type NumberListResponse, type NumberDeleteResponse, type NumberCapacityResponse, type NumberCountriesResponse, type NumberPurposesResponse, type NumberCreateParams, type NumberUpdateParams, type NumberListParams, type NumberCapacityParams, } from "./numbers.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/numbers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,uBAAmB;AACxF,OAAO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/numbers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,uBAAmB;AACxF,OAAO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,sBAAkB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Messages, type MessageListResponse, type MessageListParams } from "./messages.js";
|
|
2
|
-
export { Numbers, type NumberCreateResponse, type NumberRetrieveResponse, type NumberUpdateResponse, type NumberListResponse, type NumberDeleteResponse, type NumberCountriesResponse, type NumberPurposesResponse, type NumberCreateParams, type NumberUpdateParams, type NumberListParams, } from "./numbers.js";
|
|
2
|
+
export { Numbers, type NumberCreateResponse, type NumberRetrieveResponse, type NumberUpdateResponse, type NumberListResponse, type NumberDeleteResponse, type NumberCapacityResponse, type NumberCountriesResponse, type NumberPurposesResponse, type NumberCreateParams, type NumberUpdateParams, type NumberListParams, type NumberCapacityParams, } from "./numbers.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/numbers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,sBAAmB;AACxF,OAAO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/numbers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,sBAAmB;AACxF,OAAO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,qBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/numbers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAAwF;AAA/E,oGAAA,QAAQ,OAAA;AACjB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/numbers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAAwF;AAA/E,oGAAA,QAAQ,OAAA;AACjB,wCAcmB;AAbjB,kGAAA,OAAO,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/numbers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,QAAQ,EAAoD,uBAAmB;AACxF,OAAO,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/numbers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,QAAQ,EAAoD,uBAAmB;AACxF,OAAO,EACL,OAAO,GAaR,sBAAkB"}
|
|
@@ -7,9 +7,8 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
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
|
|
@@ -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
|
|
@@ -195,6 +187,21 @@ export declare namespace NumberDeleteResponse {
|
|
|
195
187
|
updatedAt: string | null;
|
|
196
188
|
}
|
|
197
189
|
}
|
|
190
|
+
export interface NumberCapacityResponse {
|
|
191
|
+
data: NumberCapacityResponse.Data;
|
|
192
|
+
}
|
|
193
|
+
export declare namespace NumberCapacityResponse {
|
|
194
|
+
interface Data {
|
|
195
|
+
included: number;
|
|
196
|
+
/**
|
|
197
|
+
* @deprecated Deprecated — always equal to `remaining`. Migrate to `remaining`;
|
|
198
|
+
* this field will be removed in a future revision.
|
|
199
|
+
*/
|
|
200
|
+
includedRemaining: number;
|
|
201
|
+
remaining: number;
|
|
202
|
+
status: 'available' | 'exhausted' | 'not_included';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
198
205
|
export interface NumberCountriesResponse {
|
|
199
206
|
data: NumberCountriesResponse.Data;
|
|
200
207
|
}
|
|
@@ -227,13 +234,13 @@ export declare namespace NumberPurposesResponse {
|
|
|
227
234
|
}
|
|
228
235
|
export interface NumberCreateParams {
|
|
229
236
|
/**
|
|
230
|
-
* Body param:
|
|
231
|
-
* checkout (
|
|
237
|
+
* Body param: Use included capacity when available, require included capacity
|
|
238
|
+
* without paid fallback (included_only), or start a paid checkout (rent).
|
|
232
239
|
*/
|
|
233
|
-
billingPreference?: 'included' | 'rent';
|
|
240
|
+
billingPreference?: 'included' | 'included_only' | 'rent';
|
|
234
241
|
/**
|
|
235
242
|
* Body param: Optional ISO 3166-1 alpha-2 country code from GET
|
|
236
|
-
* /numbers/countries. Cannot be combined with `purpose`.
|
|
243
|
+
* /numbers/phones/countries. Cannot be combined with `purpose`.
|
|
237
244
|
*/
|
|
238
245
|
country?: string;
|
|
239
246
|
/**
|
|
@@ -243,7 +250,7 @@ export interface NumberCreateParams {
|
|
|
243
250
|
*/
|
|
244
251
|
label?: string | null;
|
|
245
252
|
/**
|
|
246
|
-
* Body param: Optional
|
|
253
|
+
* Body param: Optional purpose from GET /numbers/phones/purposes.
|
|
247
254
|
*/
|
|
248
255
|
purpose?: string;
|
|
249
256
|
/**
|
|
@@ -263,8 +270,14 @@ export interface NumberListParams {
|
|
|
263
270
|
page?: number;
|
|
264
271
|
pageSize?: number;
|
|
265
272
|
}
|
|
273
|
+
export interface NumberCapacityParams {
|
|
274
|
+
/**
|
|
275
|
+
* ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.
|
|
276
|
+
*/
|
|
277
|
+
country: string;
|
|
278
|
+
}
|
|
266
279
|
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, };
|
|
280
|
+
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, };
|
|
268
281
|
export { Messages as Messages, type MessageListResponse as MessageListResponse, type MessageListParams as MessageListParams, };
|
|
269
282
|
}
|
|
270
283
|
//# sourceMappingURL=numbers.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.d.mts","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,uBAAmB;AAC9E,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,OAAQ,SAAQ,WAAW;IACtC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE
|
|
1
|
+
{"version":3,"file":"numbers.d.mts","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":"AAEA,O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CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,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,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -7,9 +7,8 @@ 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
|
|
@@ -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
|
|
@@ -195,6 +187,21 @@ export declare namespace NumberDeleteResponse {
|
|
|
195
187
|
updatedAt: string | null;
|
|
196
188
|
}
|
|
197
189
|
}
|
|
190
|
+
export interface NumberCapacityResponse {
|
|
191
|
+
data: NumberCapacityResponse.Data;
|
|
192
|
+
}
|
|
193
|
+
export declare namespace NumberCapacityResponse {
|
|
194
|
+
interface Data {
|
|
195
|
+
included: number;
|
|
196
|
+
/**
|
|
197
|
+
* @deprecated Deprecated — always equal to `remaining`. Migrate to `remaining`;
|
|
198
|
+
* this field will be removed in a future revision.
|
|
199
|
+
*/
|
|
200
|
+
includedRemaining: number;
|
|
201
|
+
remaining: number;
|
|
202
|
+
status: 'available' | 'exhausted' | 'not_included';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
198
205
|
export interface NumberCountriesResponse {
|
|
199
206
|
data: NumberCountriesResponse.Data;
|
|
200
207
|
}
|
|
@@ -227,13 +234,13 @@ export declare namespace NumberPurposesResponse {
|
|
|
227
234
|
}
|
|
228
235
|
export interface NumberCreateParams {
|
|
229
236
|
/**
|
|
230
|
-
* Body param:
|
|
231
|
-
* checkout (
|
|
237
|
+
* Body param: Use included capacity when available, require included capacity
|
|
238
|
+
* without paid fallback (included_only), or start a paid checkout (rent).
|
|
232
239
|
*/
|
|
233
|
-
billingPreference?: 'included' | 'rent';
|
|
240
|
+
billingPreference?: 'included' | 'included_only' | 'rent';
|
|
234
241
|
/**
|
|
235
242
|
* Body param: Optional ISO 3166-1 alpha-2 country code from GET
|
|
236
|
-
* /numbers/countries. Cannot be combined with `purpose`.
|
|
243
|
+
* /numbers/phones/countries. Cannot be combined with `purpose`.
|
|
237
244
|
*/
|
|
238
245
|
country?: string;
|
|
239
246
|
/**
|
|
@@ -243,7 +250,7 @@ export interface NumberCreateParams {
|
|
|
243
250
|
*/
|
|
244
251
|
label?: string | null;
|
|
245
252
|
/**
|
|
246
|
-
* Body param: Optional
|
|
253
|
+
* Body param: Optional purpose from GET /numbers/phones/purposes.
|
|
247
254
|
*/
|
|
248
255
|
purpose?: string;
|
|
249
256
|
/**
|
|
@@ -263,8 +270,14 @@ export interface NumberListParams {
|
|
|
263
270
|
page?: number;
|
|
264
271
|
pageSize?: number;
|
|
265
272
|
}
|
|
273
|
+
export interface NumberCapacityParams {
|
|
274
|
+
/**
|
|
275
|
+
* ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.
|
|
276
|
+
*/
|
|
277
|
+
country: string;
|
|
278
|
+
}
|
|
266
279
|
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, };
|
|
280
|
+
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, };
|
|
268
281
|
export { Messages as Messages, type MessageListResponse as MessageListResponse, type MessageListParams as MessageListParams, };
|
|
269
282
|
}
|
|
270
283
|
//# 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,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,sBAAmB;AAC9E,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,OAAQ,SAAQ,WAAW;IACtC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE
|
|
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,E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;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,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,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -14,9 +14,8 @@ class Numbers extends resource_1.APIResource {
|
|
|
14
14
|
this.messages = new MessagesAPI.Messages(this._client);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Starts a
|
|
18
|
-
*
|
|
19
|
-
* its business state. `purpose` and `country` are mutually exclusive.
|
|
17
|
+
* Starts a phone-number purchase. Poll the returned phone number for status
|
|
18
|
+
* updates. `purpose` and `country` cannot be combined.
|
|
20
19
|
*
|
|
21
20
|
* @example
|
|
22
21
|
* ```ts
|
|
@@ -48,11 +47,8 @@ class Numbers extends resource_1.APIResource {
|
|
|
48
47
|
return this._client.get((0, path_1.path) `/numbers/phones/${id}`, options);
|
|
49
48
|
}
|
|
50
49
|
/**
|
|
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.
|
|
50
|
+
* Updates the display label. Omitting `label` leaves it unchanged; null or an
|
|
51
|
+
* empty string clears it.
|
|
56
52
|
*
|
|
57
53
|
* @example
|
|
58
54
|
* ```ts
|
|
@@ -65,8 +61,7 @@ class Numbers extends resource_1.APIResource {
|
|
|
65
61
|
return this._client.patch((0, path_1.path) `/numbers/phones/${id}`, { body, ...options });
|
|
66
62
|
}
|
|
67
63
|
/**
|
|
68
|
-
* Lists
|
|
69
|
-
* provisioned (`mobilerun`) numbers.
|
|
64
|
+
* Lists the caller's phone numbers.
|
|
70
65
|
*
|
|
71
66
|
* @example
|
|
72
67
|
* ```ts
|
|
@@ -77,23 +72,9 @@ class Numbers extends resource_1.APIResource {
|
|
|
77
72
|
return this._client.get('/numbers/phones', { query, ...options });
|
|
78
73
|
}
|
|
79
74
|
/**
|
|
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.
|
|
75
|
+
* Cancels a pending purchase or schedules cancellation of an active paid phone
|
|
76
|
+
* number. Repeating a scheduled cancellation is safe. Returns 409 when
|
|
77
|
+
* cancellation is not available.
|
|
97
78
|
*
|
|
98
79
|
* @example
|
|
99
80
|
* ```ts
|
|
@@ -106,8 +87,21 @@ class Numbers extends resource_1.APIResource {
|
|
|
106
87
|
return this._client.delete((0, path_1.path) `/numbers/phones/${id}`, options);
|
|
107
88
|
}
|
|
108
89
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
90
|
+
* Returns included phone capacity for a country. Creating a phone is
|
|
91
|
+
* authoritative.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const response = await client.numbers.capacity({
|
|
96
|
+
* country: 'de',
|
|
97
|
+
* });
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
capacity(query, options) {
|
|
101
|
+
return this._client.get('/numbers/phones/capacity', { query, ...options });
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Lists available countries and current phone-number availability.
|
|
111
105
|
*
|
|
112
106
|
* @example
|
|
113
107
|
* ```ts
|