@mobilerun/sdk 5.3.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.
Files changed (274) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +5 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/apps.d.mts +10 -2
  12. package/resources/apps.d.mts.map +1 -1
  13. package/resources/apps.d.ts +10 -2
  14. package/resources/apps.d.ts.map +1 -1
  15. package/resources/apps.js +3 -1
  16. package/resources/apps.js.map +1 -1
  17. package/resources/apps.mjs +3 -1
  18. package/resources/apps.mjs.map +1 -1
  19. package/resources/assistant/conversations.d.mts +26 -4
  20. package/resources/assistant/conversations.d.mts.map +1 -1
  21. package/resources/assistant/conversations.d.ts +26 -4
  22. package/resources/assistant/conversations.d.ts.map +1 -1
  23. package/resources/assistant/conversations.js +12 -4
  24. package/resources/assistant/conversations.js.map +1 -1
  25. package/resources/assistant/conversations.mjs +12 -4
  26. package/resources/assistant/conversations.mjs.map +1 -1
  27. package/resources/connect/proxies.d.mts +36 -20
  28. package/resources/connect/proxies.d.mts.map +1 -1
  29. package/resources/connect/proxies.d.ts +36 -20
  30. package/resources/connect/proxies.d.ts.map +1 -1
  31. package/resources/connect/proxies.js +10 -2
  32. package/resources/connect/proxies.js.map +1 -1
  33. package/resources/connect/proxies.mjs +10 -2
  34. package/resources/connect/proxies.mjs.map +1 -1
  35. package/resources/devices/apps.d.mts +37 -17
  36. package/resources/devices/apps.d.mts.map +1 -1
  37. package/resources/devices/apps.d.ts +37 -17
  38. package/resources/devices/apps.d.ts.map +1 -1
  39. package/resources/devices/apps.js +15 -14
  40. package/resources/devices/apps.js.map +1 -1
  41. package/resources/devices/apps.mjs +15 -14
  42. package/resources/devices/apps.mjs.map +1 -1
  43. package/resources/devices/devices.d.mts +29 -4
  44. package/resources/devices/devices.d.mts.map +1 -1
  45. package/resources/devices/devices.d.ts +29 -4
  46. package/resources/devices/devices.d.ts.map +1 -1
  47. package/resources/devices/devices.js +7 -4
  48. package/resources/devices/devices.js.map +1 -1
  49. package/resources/devices/devices.mjs +7 -4
  50. package/resources/devices/devices.mjs.map +1 -1
  51. package/resources/devices/index.d.mts +1 -0
  52. package/resources/devices/index.d.mts.map +1 -1
  53. package/resources/devices/index.d.ts +1 -0
  54. package/resources/devices/index.d.ts.map +1 -1
  55. package/resources/devices/index.js +3 -1
  56. package/resources/devices/index.js.map +1 -1
  57. package/resources/devices/index.mjs +1 -0
  58. package/resources/devices/index.mjs.map +1 -1
  59. package/resources/devices/keyboard.d.mts +9 -3
  60. package/resources/devices/keyboard.d.mts.map +1 -1
  61. package/resources/devices/keyboard.d.ts +9 -3
  62. package/resources/devices/keyboard.d.ts.map +1 -1
  63. package/resources/devices/keyboard.js +3 -3
  64. package/resources/devices/keyboard.mjs +3 -3
  65. package/resources/devices/recordings.d.mts +11 -0
  66. package/resources/devices/recordings.d.mts.map +1 -1
  67. package/resources/devices/recordings.d.ts +11 -0
  68. package/resources/devices/recordings.d.ts.map +1 -1
  69. package/resources/devices/traffic-sessions.d.mts +173 -0
  70. package/resources/devices/traffic-sessions.d.mts.map +1 -0
  71. package/resources/devices/traffic-sessions.d.ts +173 -0
  72. package/resources/devices/traffic-sessions.d.ts.map +1 -0
  73. package/resources/devices/traffic-sessions.js +43 -0
  74. package/resources/devices/traffic-sessions.js.map +1 -0
  75. package/resources/devices/traffic-sessions.mjs +39 -0
  76. package/resources/devices/traffic-sessions.mjs.map +1 -0
  77. package/resources/files.d.mts +72 -0
  78. package/resources/files.d.mts.map +1 -1
  79. package/resources/files.d.ts +72 -0
  80. package/resources/files.d.ts.map +1 -1
  81. package/resources/index.d.mts +2 -2
  82. package/resources/index.d.mts.map +1 -1
  83. package/resources/index.d.ts +2 -2
  84. package/resources/index.d.ts.map +1 -1
  85. package/resources/index.js +3 -3
  86. package/resources/index.js.map +1 -1
  87. package/resources/index.mjs +1 -1
  88. package/resources/index.mjs.map +1 -1
  89. package/resources/mailboxes/index.d.mts +3 -0
  90. package/resources/mailboxes/index.d.mts.map +1 -0
  91. package/resources/mailboxes/index.d.ts +3 -0
  92. package/resources/mailboxes/index.d.ts.map +1 -0
  93. package/resources/{esims → mailboxes}/index.js +3 -3
  94. package/resources/mailboxes/index.js.map +1 -0
  95. package/resources/{esims → mailboxes}/index.mjs +1 -1
  96. package/resources/mailboxes/index.mjs.map +1 -0
  97. package/resources/mailboxes/mailboxes.d.mts +374 -0
  98. package/resources/mailboxes/mailboxes.d.mts.map +1 -0
  99. package/resources/mailboxes/mailboxes.d.ts +374 -0
  100. package/resources/mailboxes/mailboxes.d.ts.map +1 -0
  101. package/resources/mailboxes/mailboxes.js +139 -0
  102. package/resources/mailboxes/mailboxes.js.map +1 -0
  103. package/resources/mailboxes/mailboxes.mjs +134 -0
  104. package/resources/mailboxes/mailboxes.mjs.map +1 -0
  105. package/resources/mailboxes/messages.d.mts +82 -0
  106. package/resources/mailboxes/messages.d.mts.map +1 -0
  107. package/resources/mailboxes/messages.d.ts +82 -0
  108. package/resources/mailboxes/messages.d.ts.map +1 -0
  109. package/resources/mailboxes/messages.js +39 -0
  110. package/resources/mailboxes/messages.js.map +1 -0
  111. package/resources/mailboxes/messages.mjs +35 -0
  112. package/resources/mailboxes/messages.mjs.map +1 -0
  113. package/resources/mailboxes.d.mts +2 -0
  114. package/resources/mailboxes.d.mts.map +1 -0
  115. package/resources/mailboxes.d.ts +2 -0
  116. package/resources/mailboxes.d.ts.map +1 -0
  117. package/resources/{esims.js → mailboxes.js} +2 -2
  118. package/resources/mailboxes.js.map +1 -0
  119. package/resources/{esims.mjs → mailboxes.mjs} +2 -2
  120. package/resources/mailboxes.mjs.map +1 -0
  121. package/resources/messages/conversations.d.mts +4 -15
  122. package/resources/messages/conversations.d.mts.map +1 -1
  123. package/resources/messages/conversations.d.ts +4 -15
  124. package/resources/messages/conversations.d.ts.map +1 -1
  125. package/resources/messages/conversations.js +4 -15
  126. package/resources/messages/conversations.js.map +1 -1
  127. package/resources/messages/conversations.mjs +4 -15
  128. package/resources/messages/conversations.mjs.map +1 -1
  129. package/resources/messages/messages.d.mts +2 -4
  130. package/resources/messages/messages.d.mts.map +1 -1
  131. package/resources/messages/messages.d.ts +2 -4
  132. package/resources/messages/messages.d.ts.map +1 -1
  133. package/resources/messages/messages.js +2 -4
  134. package/resources/messages/messages.js.map +1 -1
  135. package/resources/messages/messages.mjs +2 -4
  136. package/resources/messages/messages.mjs.map +1 -1
  137. package/resources/numbers/index.d.mts +1 -1
  138. package/resources/numbers/index.d.mts.map +1 -1
  139. package/resources/numbers/index.d.ts +1 -1
  140. package/resources/numbers/index.d.ts.map +1 -1
  141. package/resources/numbers/index.js.map +1 -1
  142. package/resources/numbers/index.mjs.map +1 -1
  143. package/resources/numbers/numbers.d.mts +48 -35
  144. package/resources/numbers/numbers.d.mts.map +1 -1
  145. package/resources/numbers/numbers.d.ts +48 -35
  146. package/resources/numbers/numbers.d.ts.map +1 -1
  147. package/resources/numbers/numbers.js +23 -29
  148. package/resources/numbers/numbers.js.map +1 -1
  149. package/resources/numbers/numbers.mjs +23 -29
  150. package/resources/numbers/numbers.mjs.map +1 -1
  151. package/resources/tasks/tasks.d.mts +80 -32
  152. package/resources/tasks/tasks.d.mts.map +1 -1
  153. package/resources/tasks/tasks.d.ts +80 -32
  154. package/resources/tasks/tasks.d.ts.map +1 -1
  155. package/resources/tasks/tasks.js.map +1 -1
  156. package/resources/tasks/tasks.mjs.map +1 -1
  157. package/resources/webhooks/webhooks.d.mts +1 -0
  158. package/resources/webhooks/webhooks.d.mts.map +1 -1
  159. package/resources/webhooks/webhooks.d.ts +1 -0
  160. package/resources/webhooks/webhooks.d.ts.map +1 -1
  161. package/resources/webhooks/webhooks.js.map +1 -1
  162. package/resources/webhooks/webhooks.mjs.map +1 -1
  163. package/resources/workflows/events.d.mts +18 -0
  164. package/resources/workflows/events.d.mts.map +1 -1
  165. package/resources/workflows/events.d.ts +18 -0
  166. package/resources/workflows/events.d.ts.map +1 -1
  167. package/resources/workflows/executions.d.mts +84 -5
  168. package/resources/workflows/executions.d.mts.map +1 -1
  169. package/resources/workflows/executions.d.ts +84 -5
  170. package/resources/workflows/executions.d.ts.map +1 -1
  171. package/resources/workflows/executions.js +3 -2
  172. package/resources/workflows/executions.js.map +1 -1
  173. package/resources/workflows/executions.mjs +3 -2
  174. package/resources/workflows/executions.mjs.map +1 -1
  175. package/resources/workflows/flows/actions.d.mts +19 -0
  176. package/resources/workflows/flows/actions.d.mts.map +1 -1
  177. package/resources/workflows/flows/actions.d.ts +19 -0
  178. package/resources/workflows/flows/actions.d.ts.map +1 -1
  179. package/resources/workflows/flows/flows.d.mts +142 -2
  180. package/resources/workflows/flows/flows.d.mts.map +1 -1
  181. package/resources/workflows/flows/flows.d.ts +142 -2
  182. package/resources/workflows/flows/flows.d.ts.map +1 -1
  183. package/resources/workflows/flows/flows.js +11 -1
  184. package/resources/workflows/flows/flows.js.map +1 -1
  185. package/resources/workflows/flows/flows.mjs +11 -1
  186. package/resources/workflows/flows/flows.mjs.map +1 -1
  187. package/resources/workflows/flows/index.d.mts +1 -1
  188. package/resources/workflows/flows/index.d.mts.map +1 -1
  189. package/resources/workflows/flows/index.d.ts +1 -1
  190. package/resources/workflows/flows/index.d.ts.map +1 -1
  191. package/resources/workflows/flows/index.js.map +1 -1
  192. package/resources/workflows/flows/index.mjs.map +1 -1
  193. package/resources/workflows/index.d.mts +1 -1
  194. package/resources/workflows/index.d.mts.map +1 -1
  195. package/resources/workflows/index.d.ts +1 -1
  196. package/resources/workflows/index.d.ts.map +1 -1
  197. package/resources/workflows/index.js.map +1 -1
  198. package/resources/workflows/index.mjs.map +1 -1
  199. package/resources/workflows/triggers.d.mts +17 -3
  200. package/resources/workflows/triggers.d.mts.map +1 -1
  201. package/resources/workflows/triggers.d.ts +17 -3
  202. package/resources/workflows/triggers.d.ts.map +1 -1
  203. package/resources/workflows/workflows.d.mts +2 -2
  204. package/resources/workflows/workflows.d.mts.map +1 -1
  205. package/resources/workflows/workflows.d.ts +2 -2
  206. package/resources/workflows/workflows.d.ts.map +1 -1
  207. package/resources/workflows/workflows.js.map +1 -1
  208. package/resources/workflows/workflows.mjs.map +1 -1
  209. package/src/client.ts +40 -40
  210. package/src/resources/apps.ts +11 -2
  211. package/src/resources/assistant/conversations.ts +38 -4
  212. package/src/resources/connect/proxies.ts +49 -21
  213. package/src/resources/devices/apps.ts +41 -17
  214. package/src/resources/devices/devices.ts +58 -4
  215. package/src/resources/devices/index.ts +11 -0
  216. package/src/resources/devices/keyboard.ts +10 -3
  217. package/src/resources/devices/recordings.ts +12 -0
  218. package/src/resources/devices/traffic-sessions.ts +299 -0
  219. package/src/resources/files.ts +114 -0
  220. package/src/resources/index.ts +19 -19
  221. package/src/resources/mailboxes/index.ts +26 -0
  222. package/src/resources/mailboxes/mailboxes.ts +637 -0
  223. package/src/resources/mailboxes/messages.ts +134 -0
  224. package/src/resources/{esims.ts → mailboxes.ts} +1 -1
  225. package/src/resources/messages/conversations.ts +4 -15
  226. package/src/resources/messages/messages.ts +2 -4
  227. package/src/resources/numbers/index.ts +2 -0
  228. package/src/resources/numbers/numbers.ts +58 -34
  229. package/src/resources/tasks/tasks.ts +120 -40
  230. package/src/resources/webhooks/webhooks.ts +2 -0
  231. package/src/resources/workflows/events.ts +24 -0
  232. package/src/resources/workflows/executions.ts +121 -5
  233. package/src/resources/workflows/flows/actions.ts +26 -0
  234. package/src/resources/workflows/flows/flows.ts +182 -1
  235. package/src/resources/workflows/flows/index.ts +1 -0
  236. package/src/resources/workflows/index.ts +1 -0
  237. package/src/resources/workflows/triggers.ts +19 -3
  238. package/src/resources/workflows/workflows.ts +2 -0
  239. package/src/version.ts +1 -1
  240. package/version.d.mts +1 -1
  241. package/version.d.ts +1 -1
  242. package/version.js +1 -1
  243. package/version.mjs +1 -1
  244. package/resources/esims/esims.d.mts +0 -566
  245. package/resources/esims/esims.d.mts.map +0 -1
  246. package/resources/esims/esims.d.ts +0 -566
  247. package/resources/esims/esims.d.ts.map +0 -1
  248. package/resources/esims/esims.js +0 -205
  249. package/resources/esims/esims.js.map +0 -1
  250. package/resources/esims/esims.mjs +0 -200
  251. package/resources/esims/esims.mjs.map +0 -1
  252. package/resources/esims/index.d.mts +0 -3
  253. package/resources/esims/index.d.mts.map +0 -1
  254. package/resources/esims/index.d.ts +0 -3
  255. package/resources/esims/index.d.ts.map +0 -1
  256. package/resources/esims/index.js.map +0 -1
  257. package/resources/esims/index.mjs.map +0 -1
  258. package/resources/esims/messages.d.mts +0 -106
  259. package/resources/esims/messages.d.mts.map +0 -1
  260. package/resources/esims/messages.d.ts +0 -106
  261. package/resources/esims/messages.d.ts.map +0 -1
  262. package/resources/esims/messages.js +0 -37
  263. package/resources/esims/messages.js.map +0 -1
  264. package/resources/esims/messages.mjs +0 -33
  265. package/resources/esims/messages.mjs.map +0 -1
  266. package/resources/esims.d.mts +0 -2
  267. package/resources/esims.d.mts.map +0 -1
  268. package/resources/esims.d.ts +0 -2
  269. package/resources/esims.d.ts.map +0 -1
  270. package/resources/esims.js.map +0 -1
  271. package/resources/esims.mjs.map +0 -1
  272. package/src/resources/esims/esims.ts +0 -1019
  273. package/src/resources/esims/index.ts +0 -28
  274. package/src/resources/esims/messages.ts +0 -187
@@ -0,0 +1,134 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class Messages extends APIResource {
9
+ /**
10
+ * Get a mailbox message
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const message = await client.mailboxes.messages.retrieve(
15
+ * 'x',
16
+ * { mailboxId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
17
+ * );
18
+ * ```
19
+ */
20
+ retrieve(
21
+ messageID: string,
22
+ params: MessageRetrieveParams,
23
+ options?: RequestOptions,
24
+ ): APIPromise<MessageRetrieveResponse> {
25
+ const { mailboxId } = params;
26
+ return this._client.get(path`/mailboxes/${mailboxId}/messages/${messageID}`, options);
27
+ }
28
+
29
+ /**
30
+ * Lists mailbox messages with cursor pagination and optional time, sender, and OTP
31
+ * filters.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const messages = await client.mailboxes.messages.list(
36
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
37
+ * );
38
+ * ```
39
+ */
40
+ list(
41
+ mailboxID: string,
42
+ query: MessageListParams | null | undefined = {},
43
+ options?: RequestOptions,
44
+ ): APIPromise<MessageListResponse> {
45
+ return this._client.get(path`/mailboxes/${mailboxID}/messages`, { query, ...options });
46
+ }
47
+ }
48
+
49
+ export interface MessageRetrieveResponse {
50
+ data: MessageRetrieveResponse.Data;
51
+ }
52
+
53
+ export namespace MessageRetrieveResponse {
54
+ export interface Data {
55
+ id: string;
56
+
57
+ attachmentCount: number;
58
+
59
+ attachments: Array<Data.Attachment>;
60
+
61
+ fromAddress: string | null;
62
+
63
+ fromName: string | null;
64
+
65
+ hasOtp: boolean;
66
+
67
+ mailboxId: string;
68
+
69
+ receivedAt: string;
70
+
71
+ subject: string | null;
72
+
73
+ textBody: string | null;
74
+ }
75
+
76
+ export namespace Data {
77
+ export interface Attachment {
78
+ contentType: string | null;
79
+
80
+ name: string | null;
81
+
82
+ size: number;
83
+ }
84
+ }
85
+ }
86
+
87
+ export interface MessageListResponse {
88
+ items: Array<MessageListResponse.Item>;
89
+
90
+ nextCursor: string | null;
91
+ }
92
+
93
+ export namespace MessageListResponse {
94
+ export interface Item {
95
+ id: string;
96
+
97
+ fromAddress: string | null;
98
+
99
+ hasOtp: boolean;
100
+
101
+ mailboxId: string;
102
+
103
+ preview: string | null;
104
+
105
+ receivedAt: string;
106
+
107
+ subject: string | null;
108
+ }
109
+ }
110
+
111
+ export interface MessageRetrieveParams {
112
+ mailboxId: string;
113
+ }
114
+
115
+ export interface MessageListParams {
116
+ after?: string;
117
+
118
+ cursor?: string;
119
+
120
+ hasOtp?: 'true' | 'false';
121
+
122
+ limit?: number;
123
+
124
+ sender?: string;
125
+ }
126
+
127
+ export declare namespace Messages {
128
+ export {
129
+ type MessageRetrieveResponse as MessageRetrieveResponse,
130
+ type MessageListResponse as MessageListResponse,
131
+ type MessageRetrieveParams as MessageRetrieveParams,
132
+ type MessageListParams as MessageListParams,
133
+ };
134
+ }
@@ -1,3 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export * from './esims/index';
3
+ export * from './mailboxes/index';
@@ -6,17 +6,8 @@ import { RequestOptions } from '../../internal/request-options';
6
6
 
7
7
  export class Conversations extends APIResource {
8
8
  /**
9
- * Lists the caller's own SMS conversations, one row per thread. Each row includes
10
- * the most recent message in the thread, its unread inbound count, and the eSIMs
11
- * it was seen through. Optional `esimId` or `numberId` narrows to threads on one
12
- * eSIM or number.
13
- *
14
- * Cursor-paginated via `limit` (default 20, max 100) and
15
- * `cursorLastOccurredAt`/`cursorLastMessageId` (both required together, taken from
16
- * a previous page's `nextCursor`). Pagination follows each thread's most recent
17
- * activity rather than a fixed snapshot, so a thread with new activity can move
18
- * ahead of an in-progress page fetch. Clients that need a stable ordering should
19
- * snapshot their own view.
9
+ * Lists SMS conversations by recent activity. Use both cursor fields from
10
+ * `nextCursor` to fetch the next page.
20
11
  */
21
12
  list(
22
13
  query: ConversationListParams | null | undefined = {},
@@ -26,10 +17,8 @@ export class Conversations extends APIResource {
26
17
  }
27
18
 
28
19
  /**
29
- * Marks the caller's own inbound messages in a conversation thread as read, up to
30
- * and including the given `(upToOccurredAt, upToMessageId)` cursor — typically a
31
- * conversation row's `lastMessage`. Idempotent: repeating the call with the same
32
- * cursor updates 0 rows. Returns the number of rows updated.
20
+ * Marks inbound messages in a conversation as read through the supplied cursor.
21
+ * Repeating the request is safe.
33
22
  */
34
23
  markRead(
35
24
  body: ConversationMarkReadParams,
@@ -17,10 +17,8 @@ export class Messages extends APIResource {
17
17
  conversations: ConversationsAPI.Conversations = new ConversationsAPI.Conversations(this._client);
18
18
 
19
19
  /**
20
- * Lists the caller's own SMS messages, newest first. Supports filtering by
21
- * direction, esimId, numberId, status, peerNumber (substring search, min 3
22
- * characters), and peerKey (exact thread match). Each row includes its canonical
23
- * thread key (`peerKey`).
20
+ * Lists SMS messages newest first, with filters for direction, eSIM, phone number,
21
+ * status, and conversation.
24
22
  */
25
23
  list(
26
24
  query: MessageListParams | null | undefined = {},
@@ -8,9 +8,11 @@ export {
8
8
  type NumberUpdateResponse,
9
9
  type NumberListResponse,
10
10
  type NumberDeleteResponse,
11
+ type NumberCapacityResponse,
11
12
  type NumberCountriesResponse,
12
13
  type NumberPurposesResponse,
13
14
  type NumberCreateParams,
14
15
  type NumberUpdateParams,
15
16
  type NumberListParams,
17
+ type NumberCapacityParams,
16
18
  } from './numbers';
@@ -13,9 +13,8 @@ export class Numbers extends APIResource {
13
13
  messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
14
14
 
15
15
  /**
16
- * Starts a Mobilerun Phone purchase for the authenticated owner. Accepted requests
17
- * always return the same asynchronous envelope; poll GET /numbers/phones/{id} for
18
- * 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.
19
18
  *
20
19
  * @example
21
20
  * ```ts
@@ -52,11 +51,8 @@ export class Numbers extends APIResource {
52
51
  }
53
52
 
54
53
  /**
55
- * Updates the phone number's user-defined display label. Omitting `label` leaves
56
- * it unchanged; setting it to null or an empty string clears it. The label is
57
- * capped at 100 characters, is display-only, and never affects routing. It also
58
- * seeds the billing entity name when set at purchase time; a later change here
59
- * does not rename the already-created billing entity.
54
+ * Updates the display label. Omitting `label` leaves it unchanged; null or an
55
+ * empty string clears it.
60
56
  *
61
57
  * @example
62
58
  * ```ts
@@ -74,8 +70,7 @@ export class Numbers extends APIResource {
74
70
  }
75
71
 
76
72
  /**
77
- * Lists phone numbers owned by the authenticated user — both BYO (`user`) and
78
- * provisioned (`mobilerun`) numbers.
73
+ * Lists the caller's phone numbers.
79
74
  *
80
75
  * @example
81
76
  * ```ts
@@ -90,23 +85,9 @@ export class Numbers extends APIResource {
90
85
  }
91
86
 
92
87
  /**
93
- * Cancels a Mobilerun Phone. The outcome depends on the number's current state:
94
- *
95
- * - If the number is still awaiting payment and no payment for it is currently
96
- * being processed, the checkout is closed immediately and the number is retired.
97
- * - If the number is on the standard paid plan and already paid and in service,
98
- * cancellation is scheduled for the end of the current billing period rather
99
- * than taking effect immediately. The number stays usable through the period
100
- * already paid for, with no partial refund. Calling this again while a
101
- * cancellation is already scheduled is a no-op that returns the same result. The
102
- * response's `state` reflects this as `cancel_scheduled` with
103
- * `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
104
- * confirms the cancellation.
105
- *
106
- * Any other state (already refunding, a permanent billing failure, a payment
107
- * currently being processed, an included-plan number, or a non-hosted/BYO number)
108
- * returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
109
- * owned by the caller.
88
+ * Cancels a pending purchase or schedules cancellation of an active paid phone
89
+ * number. Repeating a scheduled cancellation is safe. Returns 409 when
90
+ * cancellation is not available.
110
91
  *
111
92
  * @example
112
93
  * ```ts
@@ -120,8 +101,22 @@ export class Numbers extends APIResource {
120
101
  }
121
102
 
122
103
  /**
123
- * Lists the countries currently offered for a dedicated Mobilerun Phone, with live
124
- * stock status. Pass `country` as the `country` field on POST /numbers/phones.
104
+ * Returns included phone capacity for a country. Creating a phone is
105
+ * authoritative.
106
+ *
107
+ * @example
108
+ * ```ts
109
+ * const response = await client.numbers.capacity({
110
+ * country: 'de',
111
+ * });
112
+ * ```
113
+ */
114
+ capacity(query: NumberCapacityParams, options?: RequestOptions): APIPromise<NumberCapacityResponse> {
115
+ return this._client.get('/numbers/phones/capacity', { query, ...options });
116
+ }
117
+
118
+ /**
119
+ * Lists available countries and current phone-number availability.
125
120
  *
126
121
  * @example
127
122
  * ```ts
@@ -305,6 +300,26 @@ export namespace NumberDeleteResponse {
305
300
  }
306
301
  }
307
302
 
303
+ export interface NumberCapacityResponse {
304
+ data: NumberCapacityResponse.Data;
305
+ }
306
+
307
+ export namespace NumberCapacityResponse {
308
+ export interface Data {
309
+ included: number;
310
+
311
+ /**
312
+ * @deprecated Deprecated — always equal to `remaining`. Migrate to `remaining`;
313
+ * this field will be removed in a future revision.
314
+ */
315
+ includedRemaining: number;
316
+
317
+ remaining: number;
318
+
319
+ status: 'available' | 'exhausted' | 'not_included';
320
+ }
321
+ }
322
+
308
323
  export interface NumberCountriesResponse {
309
324
  data: NumberCountriesResponse.Data;
310
325
  }
@@ -347,14 +362,14 @@ export namespace NumberPurposesResponse {
347
362
 
348
363
  export interface NumberCreateParams {
349
364
  /**
350
- * Body param: Prefer a free package seat ('included', default) or force the paid
351
- * checkout ('rent')
365
+ * Body param: Use included capacity when available, require included capacity
366
+ * without paid fallback (included_only), or start a paid checkout (rent).
352
367
  */
353
- billingPreference?: 'included' | 'rent';
368
+ billingPreference?: 'included' | 'included_only' | 'rent';
354
369
 
355
370
  /**
356
371
  * Body param: Optional ISO 3166-1 alpha-2 country code from GET
357
- * /numbers/countries. Cannot be combined with `purpose`.
372
+ * /numbers/phones/countries. Cannot be combined with `purpose`.
358
373
  */
359
374
  country?: string;
360
375
 
@@ -366,7 +381,7 @@ export interface NumberCreateParams {
366
381
  label?: string | null;
367
382
 
368
383
  /**
369
- * Body param: Optional Mobilerun Phone purpose slug from GET /numbers/purposes.
384
+ * Body param: Optional purpose from GET /numbers/phones/purposes.
370
385
  */
371
386
  purpose?: string;
372
387
 
@@ -391,6 +406,13 @@ export interface NumberListParams {
391
406
  pageSize?: number;
392
407
  }
393
408
 
409
+ export interface NumberCapacityParams {
410
+ /**
411
+ * ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.
412
+ */
413
+ country: string;
414
+ }
415
+
394
416
  Numbers.Messages = Messages;
395
417
 
396
418
  export declare namespace Numbers {
@@ -400,11 +422,13 @@ export declare namespace Numbers {
400
422
  type NumberUpdateResponse as NumberUpdateResponse,
401
423
  type NumberListResponse as NumberListResponse,
402
424
  type NumberDeleteResponse as NumberDeleteResponse,
425
+ type NumberCapacityResponse as NumberCapacityResponse,
403
426
  type NumberCountriesResponse as NumberCountriesResponse,
404
427
  type NumberPurposesResponse as NumberPurposesResponse,
405
428
  type NumberCreateParams as NumberCreateParams,
406
429
  type NumberUpdateParams as NumberUpdateParams,
407
430
  type NumberListParams as NumberListParams,
431
+ type NumberCapacityParams as NumberCapacityParams,
408
432
  };
409
433
 
410
434
  export {
@@ -134,7 +134,15 @@ export namespace TaskRetrieveResponse {
134
134
 
135
135
  ownerId: string;
136
136
 
137
- status: 'queued' | 'created' | 'running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
137
+ status:
138
+ | 'prepared'
139
+ | 'queued'
140
+ | 'created'
141
+ | 'running'
142
+ | 'cancelling'
143
+ | 'completed'
144
+ | 'failed'
145
+ | 'cancelled';
138
146
 
139
147
  task: string;
140
148
 
@@ -147,8 +155,6 @@ export namespace TaskRetrieveResponse {
147
155
 
148
156
  accessibility?: boolean;
149
157
 
150
- agentId?: number;
151
-
152
158
  apps?: Array<string>;
153
159
 
154
160
  cancelRequestedAt?: string | null;
@@ -175,11 +181,6 @@ export namespace TaskRetrieveResponse {
175
181
 
176
182
  maxSteps?: number;
177
183
 
178
- /**
179
- * Memory namespace for cross-task personalization
180
- */
181
- memoryNamespace?: string;
182
-
183
184
  message?: string | null;
184
185
 
185
186
  output?: { [key: string]: unknown } | null;
@@ -188,6 +189,22 @@ export namespace TaskRetrieveResponse {
188
189
 
189
190
  reasoning?: boolean;
190
191
 
192
+ recordingDeviceId?: string | null;
193
+
194
+ /**
195
+ * Record device video for the whole task and persist a retrievable reference
196
+ */
197
+ recordingEnabled?: boolean;
198
+
199
+ recordingId?: string | null;
200
+
201
+ /**
202
+ * Where the task came from: 'api' for tasks created via POST /tasks, 'agent' for
203
+ * tasks spawned by an agent step. Agent tasks are readable (status, trajectory,
204
+ * media) but not controllable via this API.
205
+ */
206
+ source?: 'api' | 'agent';
207
+
191
208
  stealth?: boolean;
192
209
 
193
210
  steps?: number | null;
@@ -201,6 +218,10 @@ export namespace TaskRetrieveResponse {
201
218
 
202
219
  succeeded?: boolean | null;
203
220
 
221
+ /**
222
+ * @deprecated Deprecated and ignored. Sampling behavior is controlled by the model
223
+ * provider.
224
+ */
204
225
  temperature?: number;
205
226
 
206
227
  updatedAt?: string;
@@ -249,7 +270,15 @@ export namespace TaskListResponse {
249
270
 
250
271
  ownerId: string;
251
272
 
252
- status: 'queued' | 'created' | 'running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
273
+ status:
274
+ | 'prepared'
275
+ | 'queued'
276
+ | 'created'
277
+ | 'running'
278
+ | 'cancelling'
279
+ | 'completed'
280
+ | 'failed'
281
+ | 'cancelled';
253
282
 
254
283
  task: string;
255
284
 
@@ -262,8 +291,6 @@ export namespace TaskListResponse {
262
291
 
263
292
  accessibility?: boolean;
264
293
 
265
- agentId?: number;
266
-
267
294
  apps?: Array<string>;
268
295
 
269
296
  cancelRequestedAt?: string | null;
@@ -290,11 +317,6 @@ export namespace TaskListResponse {
290
317
 
291
318
  maxSteps?: number;
292
319
 
293
- /**
294
- * Memory namespace for cross-task personalization
295
- */
296
- memoryNamespace?: string;
297
-
298
320
  message?: string | null;
299
321
 
300
322
  output?: { [key: string]: unknown } | null;
@@ -303,6 +325,22 @@ export namespace TaskListResponse {
303
325
 
304
326
  reasoning?: boolean;
305
327
 
328
+ recordingDeviceId?: string | null;
329
+
330
+ /**
331
+ * Record device video for the whole task and persist a retrievable reference
332
+ */
333
+ recordingEnabled?: boolean;
334
+
335
+ recordingId?: string | null;
336
+
337
+ /**
338
+ * Where the task came from: 'api' for tasks created via POST /tasks, 'agent' for
339
+ * tasks spawned by an agent step. Agent tasks are readable (status, trajectory,
340
+ * media) but not controllable via this API.
341
+ */
342
+ source?: 'api' | 'agent';
343
+
306
344
  stealth?: boolean;
307
345
 
308
346
  steps?: number | null;
@@ -316,6 +354,10 @@ export namespace TaskListResponse {
316
354
 
317
355
  succeeded?: boolean | null;
318
356
 
357
+ /**
358
+ * @deprecated Deprecated and ignored. Sampling behavior is controlled by the model
359
+ * provider.
360
+ */
319
361
  temperature?: number;
320
362
 
321
363
  updatedAt?: string;
@@ -338,7 +380,7 @@ export interface TaskGetStatusResponse {
338
380
  /**
339
381
  * The status of the task
340
382
  */
341
- status: 'queued' | 'created' | 'running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
383
+ status: 'prepared' | 'queued' | 'created' | 'running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
342
384
 
343
385
  /**
344
386
  * Execution metadata for abnormal terminal outcomes
@@ -360,6 +402,16 @@ export interface TaskGetStatusResponse {
360
402
  */
361
403
  output?: { [key: string]: unknown } | null;
362
404
 
405
+ /**
406
+ * Device ID associated with recordingId
407
+ */
408
+ recordingDeviceId?: string | null;
409
+
410
+ /**
411
+ * ID of the task's whole-task video recording, if recordingEnabled was set
412
+ */
413
+ recordingId?: string | null;
414
+
363
415
  /**
364
416
  * Number of steps taken
365
417
  */
@@ -1060,7 +1112,7 @@ export interface TaskRunResponse {
1060
1112
  /**
1061
1113
  * The status of the task (queued or created)
1062
1114
  */
1063
- status: 'queued' | 'created' | 'running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
1115
+ status: 'prepared' | 'queued' | 'created' | 'running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
1064
1116
 
1065
1117
  /**
1066
1118
  * The URL of the stream (null when queued)
@@ -1108,7 +1160,21 @@ export interface TaskListParams {
1108
1160
  */
1109
1161
  query?: string | null;
1110
1162
 
1111
- status?: 'queued' | 'created' | 'running' | 'cancelling' | 'completed' | 'failed' | 'cancelled' | null;
1163
+ /**
1164
+ * Only tasks created via the API ('api') or spawned by an agent step ('agent').
1165
+ */
1166
+ source?: 'api' | 'agent' | null;
1167
+
1168
+ status?:
1169
+ | 'prepared'
1170
+ | 'queued'
1171
+ | 'created'
1172
+ | 'running'
1173
+ | 'cancelling'
1174
+ | 'completed'
1175
+ | 'failed'
1176
+ | 'cancelled'
1177
+ | null;
1112
1178
  }
1113
1179
 
1114
1180
  export interface TaskRunParams {
@@ -1127,11 +1193,6 @@ export interface TaskRunParams {
1127
1193
  */
1128
1194
  accessibility?: boolean;
1129
1195
 
1130
- /**
1131
- * Body param
1132
- */
1133
- agentId?: number;
1134
-
1135
1196
  /**
1136
1197
  * Body param
1137
1198
  */
@@ -1153,7 +1214,7 @@ export interface TaskRunParams {
1153
1214
  displayId?: number;
1154
1215
 
1155
1216
  /**
1156
- * Body param
1217
+ * Body param: Maximum agent execution time in seconds (1–2700).
1157
1218
  */
1158
1219
  executionTimeout?: number;
1159
1220
 
@@ -1164,7 +1225,7 @@ export interface TaskRunParams {
1164
1225
 
1165
1226
  /**
1166
1227
  * Body param: The LLM model identifier to use for the task (e.g.
1167
- * 'google/gemini-3.5-flash')
1228
+ * 'openai/gpt-5.6-luna')
1168
1229
  */
1169
1230
  llmModel?: string;
1170
1231
 
@@ -1173,11 +1234,6 @@ export interface TaskRunParams {
1173
1234
  */
1174
1235
  maxSteps?: number;
1175
1236
 
1176
- /**
1177
- * Body param: Memory namespace for cross-task personalization
1178
- */
1179
- memoryNamespace?: string;
1180
-
1181
1237
  /**
1182
1238
  * Body param
1183
1239
  */
@@ -1188,6 +1244,12 @@ export interface TaskRunParams {
1188
1244
  */
1189
1245
  reasoning?: boolean;
1190
1246
 
1247
+ /**
1248
+ * Body param: Record device video for the whole task and persist a retrievable
1249
+ * reference
1250
+ */
1251
+ recordingEnabled?: boolean;
1252
+
1191
1253
  /**
1192
1254
  * Body param
1193
1255
  */
@@ -1200,7 +1262,14 @@ export interface TaskRunParams {
1200
1262
  subagentModel?: string;
1201
1263
 
1202
1264
  /**
1203
- * Body param
1265
+ * Body param: Optional custom behavioral overlay applied on top of the agent's
1266
+ * default system prompts. Never echoed back in responses or errors.
1267
+ */
1268
+ systemPrompt?: string | null;
1269
+
1270
+ /**
1271
+ * @deprecated Body param: Deprecated and ignored. Sampling behavior is controlled
1272
+ * by the model provider.
1204
1273
  */
1205
1274
  temperature?: number;
1206
1275
 
@@ -1238,8 +1307,6 @@ export interface TaskRunStreamedParams {
1238
1307
 
1239
1308
  accessibility?: boolean;
1240
1309
 
1241
- agentId?: number;
1242
-
1243
1310
  apps?: Array<string>;
1244
1311
 
1245
1312
  continueOnFailure?: boolean;
@@ -1251,26 +1318,29 @@ export interface TaskRunStreamedParams {
1251
1318
  */
1252
1319
  displayId?: number;
1253
1320
 
1321
+ /**
1322
+ * Maximum agent execution time in seconds (1–2700).
1323
+ */
1254
1324
  executionTimeout?: number;
1255
1325
 
1256
1326
  files?: Array<string>;
1257
1327
 
1258
1328
  /**
1259
- * The LLM model identifier to use for the task (e.g. 'google/gemini-3.5-flash')
1329
+ * The LLM model identifier to use for the task (e.g. 'openai/gpt-5.6-luna')
1260
1330
  */
1261
1331
  llmModel?: string;
1262
1332
 
1263
1333
  maxSteps?: number;
1264
1334
 
1265
- /**
1266
- * Memory namespace for cross-task personalization
1267
- */
1268
- memoryNamespace?: string;
1269
-
1270
1335
  outputSchema?: { [key: string]: unknown } | null;
1271
1336
 
1272
1337
  reasoning?: boolean;
1273
1338
 
1339
+ /**
1340
+ * Record device video for the whole task and persist a retrievable reference
1341
+ */
1342
+ recordingEnabled?: boolean;
1343
+
1274
1344
  stealth?: boolean;
1275
1345
 
1276
1346
  /**
@@ -1278,6 +1348,16 @@ export interface TaskRunStreamedParams {
1278
1348
  */
1279
1349
  subagentModel?: string;
1280
1350
 
1351
+ /**
1352
+ * Optional custom behavioral overlay applied on top of the agent's default system
1353
+ * prompts. Never echoed back in responses or errors.
1354
+ */
1355
+ systemPrompt?: string | null;
1356
+
1357
+ /**
1358
+ * @deprecated Deprecated and ignored. Sampling behavior is controlled by the model
1359
+ * provider.
1360
+ */
1281
1361
  temperature?: number;
1282
1362
 
1283
1363
  vision?: boolean;
@@ -370,6 +370,8 @@ export namespace WebhookEventTypesResponse {
370
370
  toast: boolean;
371
371
 
372
372
  webhook: boolean;
373
+
374
+ agent?: boolean;
373
375
  }
374
376
  }
375
377
  }