@mobilerun/sdk 5.2.1 → 5.3.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 (238) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +10 -7
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +10 -7
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -3
  9. package/client.mjs.map +1 -1
  10. package/core/streaming.d.mts +33 -0
  11. package/core/streaming.d.mts.map +1 -0
  12. package/core/streaming.d.ts +33 -0
  13. package/core/streaming.d.ts.map +1 -0
  14. package/core/streaming.js +263 -0
  15. package/core/streaming.js.map +1 -0
  16. package/core/streaming.mjs +258 -0
  17. package/core/streaming.mjs.map +1 -0
  18. package/internal/decoders/line.d.mts +17 -0
  19. package/internal/decoders/line.d.mts.map +1 -0
  20. package/internal/decoders/line.d.ts +17 -0
  21. package/internal/decoders/line.d.ts.map +1 -0
  22. package/internal/decoders/line.js +113 -0
  23. package/internal/decoders/line.js.map +1 -0
  24. package/internal/decoders/line.mjs +108 -0
  25. package/internal/decoders/line.mjs.map +1 -0
  26. package/internal/parse.d.mts.map +1 -1
  27. package/internal/parse.d.ts.map +1 -1
  28. package/internal/parse.js +10 -0
  29. package/internal/parse.js.map +1 -1
  30. package/internal/parse.mjs +10 -0
  31. package/internal/parse.mjs.map +1 -1
  32. package/internal/request-options.d.mts +2 -0
  33. package/internal/request-options.d.mts.map +1 -1
  34. package/internal/request-options.d.ts +2 -0
  35. package/internal/request-options.d.ts.map +1 -1
  36. package/internal/request-options.js.map +1 -1
  37. package/internal/request-options.mjs.map +1 -1
  38. package/internal/tslib.js +18 -18
  39. package/package.json +11 -1
  40. package/resources/apps.d.mts +2 -2
  41. package/resources/apps.d.mts.map +1 -1
  42. package/resources/apps.d.ts +2 -2
  43. package/resources/apps.d.ts.map +1 -1
  44. package/resources/assistant/assistant.d.mts +10 -0
  45. package/resources/assistant/assistant.d.mts.map +1 -0
  46. package/resources/assistant/assistant.d.ts +10 -0
  47. package/resources/assistant/assistant.d.ts.map +1 -0
  48. package/resources/assistant/assistant.js +17 -0
  49. package/resources/assistant/assistant.js.map +1 -0
  50. package/resources/assistant/assistant.mjs +12 -0
  51. package/resources/assistant/assistant.mjs.map +1 -0
  52. package/resources/assistant/conversations.d.mts +295 -0
  53. package/resources/assistant/conversations.d.mts.map +1 -0
  54. package/resources/assistant/conversations.d.ts +295 -0
  55. package/resources/assistant/conversations.d.ts.map +1 -0
  56. package/resources/assistant/conversations.js +109 -0
  57. package/resources/assistant/conversations.js.map +1 -0
  58. package/resources/assistant/conversations.mjs +105 -0
  59. package/resources/assistant/conversations.mjs.map +1 -0
  60. package/resources/assistant/index.d.mts +3 -0
  61. package/resources/assistant/index.d.mts.map +1 -0
  62. package/resources/assistant/index.d.ts +3 -0
  63. package/resources/assistant/index.d.ts.map +1 -0
  64. package/resources/assistant/index.js +9 -0
  65. package/resources/assistant/index.js.map +1 -0
  66. package/resources/assistant/index.mjs +4 -0
  67. package/resources/assistant/index.mjs.map +1 -0
  68. package/resources/assistant.d.mts +2 -0
  69. package/resources/assistant.d.mts.map +1 -0
  70. package/resources/assistant.d.ts +2 -0
  71. package/resources/assistant.d.ts.map +1 -0
  72. package/resources/assistant.js +6 -0
  73. package/resources/assistant.js.map +1 -0
  74. package/resources/assistant.mjs +3 -0
  75. package/resources/assistant.mjs.map +1 -0
  76. package/resources/devices/clipboard.d.mts +40 -0
  77. package/resources/devices/clipboard.d.mts.map +1 -0
  78. package/resources/devices/clipboard.d.ts +40 -0
  79. package/resources/devices/clipboard.d.ts.map +1 -0
  80. package/resources/devices/clipboard.js +50 -0
  81. package/resources/devices/clipboard.js.map +1 -0
  82. package/resources/devices/clipboard.mjs +46 -0
  83. package/resources/devices/clipboard.mjs.map +1 -0
  84. package/resources/devices/devices.d.mts +5 -0
  85. package/resources/devices/devices.d.mts.map +1 -1
  86. package/resources/devices/devices.d.ts +5 -0
  87. package/resources/devices/devices.d.ts.map +1 -1
  88. package/resources/devices/devices.js +4 -0
  89. package/resources/devices/devices.js.map +1 -1
  90. package/resources/devices/devices.mjs +4 -0
  91. package/resources/devices/devices.mjs.map +1 -1
  92. package/resources/devices/index.d.mts +1 -0
  93. package/resources/devices/index.d.mts.map +1 -1
  94. package/resources/devices/index.d.ts +1 -0
  95. package/resources/devices/index.d.ts.map +1 -1
  96. package/resources/devices/index.js +3 -1
  97. package/resources/devices/index.js.map +1 -1
  98. package/resources/devices/index.mjs +1 -0
  99. package/resources/devices/index.mjs.map +1 -1
  100. package/resources/esims/esims.d.mts +45 -45
  101. package/resources/esims/esims.d.mts.map +1 -1
  102. package/resources/esims/esims.d.ts +45 -45
  103. package/resources/esims/esims.d.ts.map +1 -1
  104. package/resources/esims/esims.js +3 -3
  105. package/resources/esims/esims.js.map +1 -1
  106. package/resources/esims/esims.mjs +3 -3
  107. package/resources/esims/esims.mjs.map +1 -1
  108. package/resources/esims/index.d.mts +1 -1
  109. package/resources/esims/index.d.mts.map +1 -1
  110. package/resources/esims/index.d.ts +1 -1
  111. package/resources/esims/index.d.ts.map +1 -1
  112. package/resources/esims/index.js.map +1 -1
  113. package/resources/esims/index.mjs.map +1 -1
  114. package/resources/esims/messages.d.mts +15 -20
  115. package/resources/esims/messages.d.mts.map +1 -1
  116. package/resources/esims/messages.d.ts +15 -20
  117. package/resources/esims/messages.d.ts.map +1 -1
  118. package/resources/files.d.mts +126 -0
  119. package/resources/files.d.mts.map +1 -0
  120. package/resources/files.d.ts +126 -0
  121. package/resources/files.d.ts.map +1 -0
  122. package/resources/files.js +68 -0
  123. package/resources/files.js.map +1 -0
  124. package/resources/files.mjs +64 -0
  125. package/resources/files.mjs.map +1 -0
  126. package/resources/index.d.mts +4 -3
  127. package/resources/index.d.mts.map +1 -1
  128. package/resources/index.d.ts +4 -3
  129. package/resources/index.d.ts.map +1 -1
  130. package/resources/index.js +5 -3
  131. package/resources/index.js.map +1 -1
  132. package/resources/index.mjs +2 -1
  133. package/resources/index.mjs.map +1 -1
  134. package/resources/messages/conversations.d.mts +18 -23
  135. package/resources/messages/conversations.d.mts.map +1 -1
  136. package/resources/messages/conversations.d.ts +18 -23
  137. package/resources/messages/conversations.d.ts.map +1 -1
  138. package/resources/messages/messages.d.mts +15 -20
  139. package/resources/messages/messages.d.mts.map +1 -1
  140. package/resources/messages/messages.d.ts +15 -20
  141. package/resources/messages/messages.d.ts.map +1 -1
  142. package/resources/messages/messages.js.map +1 -1
  143. package/resources/messages/messages.mjs.map +1 -1
  144. package/resources/models.d.mts +20 -5
  145. package/resources/models.d.mts.map +1 -1
  146. package/resources/models.d.ts +20 -5
  147. package/resources/models.d.ts.map +1 -1
  148. package/resources/models.js +1 -1
  149. package/resources/models.mjs +1 -1
  150. package/resources/numbers/index.d.mts +1 -1
  151. package/resources/numbers/index.d.mts.map +1 -1
  152. package/resources/numbers/index.d.ts +1 -1
  153. package/resources/numbers/index.d.ts.map +1 -1
  154. package/resources/numbers/index.js.map +1 -1
  155. package/resources/numbers/index.mjs.map +1 -1
  156. package/resources/numbers/messages.d.mts +15 -27
  157. package/resources/numbers/messages.d.mts.map +1 -1
  158. package/resources/numbers/messages.d.ts +15 -27
  159. package/resources/numbers/messages.d.ts.map +1 -1
  160. package/resources/numbers/messages.js.map +1 -1
  161. package/resources/numbers/messages.mjs.map +1 -1
  162. package/resources/numbers/numbers.d.mts +70 -22
  163. package/resources/numbers/numbers.d.mts.map +1 -1
  164. package/resources/numbers/numbers.d.ts +70 -22
  165. package/resources/numbers/numbers.d.ts.map +1 -1
  166. package/resources/numbers/numbers.js +17 -0
  167. package/resources/numbers/numbers.js.map +1 -1
  168. package/resources/numbers/numbers.mjs +17 -0
  169. package/resources/numbers/numbers.mjs.map +1 -1
  170. package/resources/store/apps.d.mts +2 -2
  171. package/resources/store/apps.d.mts.map +1 -1
  172. package/resources/store/apps.d.ts +2 -2
  173. package/resources/store/apps.d.ts.map +1 -1
  174. package/resources/workflows/events.d.mts +1 -0
  175. package/resources/workflows/events.d.mts.map +1 -1
  176. package/resources/workflows/events.d.ts +1 -0
  177. package/resources/workflows/events.d.ts.map +1 -1
  178. package/resources/workflows/executions.d.mts +21 -0
  179. package/resources/workflows/executions.d.mts.map +1 -1
  180. package/resources/workflows/executions.d.ts +21 -0
  181. package/resources/workflows/executions.d.ts.map +1 -1
  182. package/resources/workflows/flows/flows.d.mts +8 -0
  183. package/resources/workflows/flows/flows.d.mts.map +1 -1
  184. package/resources/workflows/flows/flows.d.ts +8 -0
  185. package/resources/workflows/flows/flows.d.ts.map +1 -1
  186. package/resources/workflows/flows/flows.js.map +1 -1
  187. package/resources/workflows/flows/flows.mjs.map +1 -1
  188. package/src/client.ts +37 -4
  189. package/src/core/streaming.ts +315 -0
  190. package/src/internal/decoders/line.ts +135 -0
  191. package/src/internal/parse.ts +14 -0
  192. package/src/internal/request-options.ts +2 -0
  193. package/src/resources/apps.ts +2 -2
  194. package/src/resources/assistant/assistant.ts +59 -0
  195. package/src/resources/assistant/conversations.ts +524 -0
  196. package/src/resources/assistant/index.ts +26 -0
  197. package/src/resources/assistant.ts +3 -0
  198. package/src/resources/devices/clipboard.ts +87 -0
  199. package/src/resources/devices/devices.ts +13 -0
  200. package/src/resources/devices/index.ts +6 -0
  201. package/src/resources/esims/esims.ts +63 -57
  202. package/src/resources/esims/index.ts +1 -0
  203. package/src/resources/esims/messages.ts +24 -30
  204. package/src/resources/files.ts +225 -0
  205. package/src/resources/index.ts +16 -1
  206. package/src/resources/messages/conversations.ts +28 -34
  207. package/src/resources/messages/messages.ts +24 -30
  208. package/src/resources/models.ts +22 -7
  209. package/src/resources/numbers/index.ts +2 -0
  210. package/src/resources/numbers/messages.ts +24 -43
  211. package/src/resources/numbers/numbers.ts +97 -21
  212. package/src/resources/store/apps.ts +2 -2
  213. package/src/resources/workflows/events.ts +2 -0
  214. package/src/resources/workflows/executions.ts +27 -0
  215. package/src/resources/workflows/flows/flows.ts +16 -0
  216. package/src/streaming.ts +2 -0
  217. package/src/version.ts +1 -1
  218. package/streaming.d.mts +3 -0
  219. package/streaming.d.mts.map +1 -0
  220. package/streaming.d.ts +3 -0
  221. package/streaming.d.ts.map +1 -0
  222. package/streaming.js +6 -0
  223. package/streaming.js.map +1 -0
  224. package/streaming.mjs +3 -0
  225. package/streaming.mjs.map +1 -0
  226. package/version.d.mts +1 -1
  227. package/version.d.ts +1 -1
  228. package/version.js +1 -1
  229. package/version.mjs +1 -1
  230. package/resources/agents.d.mts +0 -27
  231. package/resources/agents.d.mts.map +0 -1
  232. package/resources/agents.d.ts +0 -27
  233. package/resources/agents.d.ts.map +0 -1
  234. package/resources/agents.js +0 -15
  235. package/resources/agents.js.map +0 -1
  236. package/resources/agents.mjs +0 -11
  237. package/resources/agents.mjs.map +0 -1
  238. package/src/resources/agents.ts +0 -42
@@ -221,15 +221,18 @@ export class Esims extends APIResource {
221
221
  /**
222
222
  * Returns a lightweight list (id, msisdn, carrierName, status, masked iccid) for
223
223
  * use in a message filter dropdown. Unlike `GET /esims`, this includes all
224
- * statuses, including retired eSIMs, and is not paginated.
224
+ * statuses, including retired eSIMs.
225
225
  *
226
226
  * @example
227
227
  * ```ts
228
228
  * const response = await client.esims.selector();
229
229
  * ```
230
230
  */
231
- selector(options?: RequestOptions): APIPromise<EsimSelectorResponse> {
232
- return this._client.get('/numbers/esims/selector', options);
231
+ selector(
232
+ query: EsimSelectorParams | null | undefined = {},
233
+ options?: RequestOptions,
234
+ ): APIPromise<EsimSelectorResponse> {
235
+ return this._client.get('/numbers/esims/selector', { query, ...options });
233
236
  }
234
237
  }
235
238
 
@@ -405,67 +408,61 @@ export namespace EsimUpdateResponse {
405
408
  }
406
409
 
407
410
  export interface EsimListResponse {
408
- data: EsimListResponse.Data;
411
+ items: Array<EsimListResponse.Item>;
412
+
413
+ pagination: Shared.Pagination;
409
414
  }
410
415
 
411
416
  export namespace EsimListResponse {
412
- export interface Data {
413
- items: Array<Data.Item>;
414
-
415
- pagination: Shared.Pagination;
416
- }
417
-
418
- export namespace Data {
419
- export interface Item {
420
- id: string;
417
+ export interface Item {
418
+ id: string;
421
419
 
422
- carrierName: string | null;
420
+ carrierName: string | null;
423
421
 
424
- countryCode: string | null;
422
+ countryCode: string | null;
425
423
 
426
- createdAt: string | null;
424
+ createdAt: string | null;
427
425
 
428
- createdBy: string | null;
426
+ createdBy: string | null;
429
427
 
430
- deviceId: string | null;
428
+ deviceId: string | null;
431
429
 
432
- deviceUuid: string | null;
430
+ deviceUuid: string | null;
433
431
 
434
- iccid: string | null;
432
+ iccid: string | null;
435
433
 
436
- msisdn: string | null;
434
+ msisdn: string | null;
437
435
 
438
- name: string | null;
436
+ name: string | null;
439
437
 
440
- networkStatus: 'degraded' | null;
438
+ networkStatus: 'degraded' | null;
441
439
 
442
- source: 'stocked' | 'byo';
440
+ source: 'stocked' | 'byo';
443
441
 
444
- status: 'in_stock' | 'owned' | 'installing' | 'installed' | 'install_failed' | 'retired';
442
+ status: 'in_stock' | 'owned' | 'installing' | 'installed' | 'install_failed' | 'retired';
445
443
 
446
- subscriptionId: number | null;
444
+ subscriptionId: number | null;
447
445
 
448
- updatedAt: string | null;
446
+ updatedAt: string | null;
449
447
 
450
- cancellationScheduled?: boolean;
448
+ cancellationScheduled?: boolean;
451
449
 
452
- checkoutUrl?: string | null;
450
+ checkoutUrl?: string | null;
453
451
 
454
- currentPeriodEnd?: string | null;
452
+ currentPeriodEnd?: string | null;
455
453
 
456
- exempt?: boolean;
454
+ exempt?: boolean;
457
455
 
458
- rentStatus?:
459
- | 'not_applicable'
460
- | 'exempt'
461
- | 'inactive'
462
- | 'awaiting_payment'
463
- | 'active'
464
- | 'cancel_pending'
465
- | 'refund_pending'
466
- | 'retiring'
467
- | 'billing_error';
468
- }
456
+ rentStatus?:
457
+ | 'not_applicable'
458
+ | 'exempt'
459
+ | 'inactive'
460
+ | 'awaiting_payment'
461
+ | 'active'
462
+ | 'cancel_pending'
463
+ | 'refund_pending'
464
+ | 'retiring'
465
+ | 'billing_error';
469
466
  }
470
467
  }
471
468
 
@@ -859,30 +856,26 @@ export namespace EsimInstallStatusResponse {
859
856
  }
860
857
 
861
858
  export interface EsimSelectorResponse {
862
- data: EsimSelectorResponse.Data;
859
+ items: Array<EsimSelectorResponse.Item>;
860
+
861
+ pagination: Shared.Pagination;
863
862
  }
864
863
 
865
864
  export namespace EsimSelectorResponse {
866
- export interface Data {
867
- items: Array<Data.Item>;
868
- }
869
-
870
- export namespace Data {
871
- export interface Item {
872
- id: string;
865
+ export interface Item {
866
+ id: string;
873
867
 
874
- carrierName: string | null;
868
+ carrierName: string | null;
875
869
 
876
- iccid: string | null;
870
+ iccid: string | null;
877
871
 
878
- msisdn: string | null;
872
+ msisdn: string | null;
879
873
 
880
- name: string | null;
874
+ name: string | null;
881
875
 
882
- source: 'stocked' | 'byo';
876
+ source: 'stocked' | 'byo';
883
877
 
884
- status: 'in_stock' | 'owned' | 'installing' | 'installed' | 'install_failed' | 'retired';
885
- }
878
+ status: 'in_stock' | 'owned' | 'installing' | 'installed' | 'install_failed' | 'retired';
886
879
  }
887
880
  }
888
881
 
@@ -892,6 +885,12 @@ export interface EsimCreateParams {
892
885
  * instead of buying again
893
886
  */
894
887
  idempotencyKey?: string;
888
+
889
+ /**
890
+ * Optional user-defined display label — NFC-normalized, up to 15 GRAPHEMES. Omit
891
+ * or null for no label.
892
+ */
893
+ name?: string | null;
895
894
  }
896
895
 
897
896
  export interface EsimUpdateParams {
@@ -982,6 +981,12 @@ export interface EsimInstallParams {
982
981
  deviceId?: string;
983
982
  }
984
983
 
984
+ export interface EsimSelectorParams {
985
+ page?: number;
986
+
987
+ pageSize?: number;
988
+ }
989
+
985
990
  Esims.Messages = Messages;
986
991
 
987
992
  export declare namespace Esims {
@@ -1001,6 +1006,7 @@ export declare namespace Esims {
1001
1006
  type EsimListParams as EsimListParams,
1002
1007
  type EsimImportParams as EsimImportParams,
1003
1008
  type EsimInstallParams as EsimInstallParams,
1009
+ type EsimSelectorParams as EsimSelectorParams,
1004
1010
  };
1005
1011
 
1006
1012
  export {
@@ -17,6 +17,7 @@ export {
17
17
  type EsimListParams,
18
18
  type EsimImportParams,
19
19
  type EsimInstallParams,
20
+ type EsimSelectorParams,
20
21
  } from './esims';
21
22
  export {
22
23
  Messages,
@@ -42,50 +42,44 @@ export class Messages extends APIResource {
42
42
  }
43
43
 
44
44
  export interface MessageListResponse {
45
- data: MessageListResponse.Data;
45
+ items: Array<MessageListResponse.Item>;
46
+
47
+ pagination: Shared.Pagination;
46
48
  }
47
49
 
48
50
  export namespace MessageListResponse {
49
- export interface Data {
50
- items: Array<Data.Item>;
51
-
52
- pagination: Shared.Pagination;
53
- }
54
-
55
- export namespace Data {
56
- export interface Item {
57
- id: string;
51
+ export interface Item {
52
+ id: string;
58
53
 
59
- body: string | null;
54
+ body: string | null;
60
55
 
61
- createdAt: string;
56
+ createdAt: string;
62
57
 
63
- deliveryStatus: string | null;
58
+ deliveryStatus: string | null;
64
59
 
65
- detectedSender: string | null;
60
+ detectedSender: string | null;
66
61
 
67
- direction: 'inbound' | 'outbound';
62
+ direction: 'inbound' | 'outbound';
68
63
 
69
- esimId: string | null;
64
+ esimId: string | null;
70
65
 
71
- occurredAt: string;
66
+ occurredAt: string;
72
67
 
73
- peerKey: string | null;
68
+ peerKey: string | null;
74
69
 
75
- peerNumber: string | null;
70
+ peerNumber: string | null;
76
71
 
77
- providerCode: string | null;
72
+ providerCode: string | null;
78
73
 
79
- status:
80
- | 'received'
81
- | 'queued'
82
- | 'claimed'
83
- | 'sending'
84
- | 'sent'
85
- | 'sent_unconfirmed'
86
- | 'delivered'
87
- | 'failed';
88
- }
74
+ status:
75
+ | 'received'
76
+ | 'queued'
77
+ | 'claimed'
78
+ | 'sending'
79
+ | 'sent'
80
+ | 'sent_unconfirmed'
81
+ | 'delivered'
82
+ | 'failed';
89
83
  }
90
84
  }
91
85
 
@@ -0,0 +1,225 @@
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 { buildHeaders } from '../internal/headers';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class Files extends APIResource {
10
+ /**
11
+ * Partial update of `displayName` and/or `enabled`. Only files with `zone=skills`
12
+ * are mutable; other zones return 422 `unsupported_zone`.
13
+ */
14
+ update(
15
+ fileID: string,
16
+ body: FileUpdateParams | null | undefined = {},
17
+ options?: RequestOptions,
18
+ ): APIPromise<FileUpdateResponse> {
19
+ return this._client.patch(path`/agents/files/${fileID}`, { body, ...options });
20
+ }
21
+
22
+ /**
23
+ * List the user's ready files, optionally filtered by zone
24
+ */
25
+ list(
26
+ query: FileListParams | null | undefined = {},
27
+ options?: RequestOptions,
28
+ ): APIPromise<FileListResponse> {
29
+ return this._client.get('/agents/files', { query, ...options });
30
+ }
31
+
32
+ /**
33
+ * Hard-delete a file
34
+ */
35
+ delete(fileID: string, options?: RequestOptions): APIPromise<FileDeleteResponse> {
36
+ return this._client.delete(path`/agents/files/${fileID}`, options);
37
+ }
38
+
39
+ /**
40
+ * Soft-cancels an in-flight upload before confirm. Only acts on `pending` rows —
41
+ * refuses to touch `ready` to avoid wiping confirmed files. Idempotent:
42
+ * `{ cancelled: false }` if the row exists but is no longer pending.
43
+ */
44
+ cancelPending(fileID: string, options?: RequestOptions): APIPromise<FileCancelPendingResponse> {
45
+ return this._client.delete(path`/agents/files/${fileID}/pending`, options);
46
+ }
47
+
48
+ /**
49
+ * Confirm a file upload by server-side HEAD validation
50
+ */
51
+ confirm(fileID: string, options?: RequestOptions): APIPromise<FileConfirmResponse> {
52
+ return this._client.post(path`/agents/files/${fileID}/confirm`, options);
53
+ }
54
+
55
+ /**
56
+ * Redirects to a short-lived presigned download URL. Missing, non-ready, and files
57
+ * owned by another tenant all return the same 404 response.
58
+ */
59
+ download(fileID: string, options?: RequestOptions): APIPromise<void> {
60
+ return this._client.get(path`/agents/files/${fileID}/download`, {
61
+ ...options,
62
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
63
+ });
64
+ }
65
+
66
+ /**
67
+ * Mint a presigned PUT URL for a user file upload
68
+ */
69
+ uploadURL(params: FileUploadURLParams, options?: RequestOptions): APIPromise<FileUploadURLResponse> {
70
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
71
+ return this._client.post('/agents/files/upload-url', {
72
+ body,
73
+ ...options,
74
+ headers: buildHeaders([
75
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
76
+ options?.headers,
77
+ ]),
78
+ });
79
+ }
80
+ }
81
+
82
+ export interface FileUpdateResponse {
83
+ createdAt: string;
84
+
85
+ createdBy: 'user' | 'agent' | 'workflow';
86
+
87
+ displayName: string | null;
88
+
89
+ enabled: boolean;
90
+
91
+ fileId: string;
92
+
93
+ filename: string;
94
+
95
+ mimeType: string;
96
+
97
+ sizeBytes: number;
98
+
99
+ zone: 'user' | 'agent' | 'workflow' | 'skills';
100
+ }
101
+
102
+ export interface FileListResponse {
103
+ files: Array<FileListResponse.File>;
104
+
105
+ quota: FileListResponse.Quota;
106
+ }
107
+
108
+ export namespace FileListResponse {
109
+ export interface File {
110
+ createdAt: string;
111
+
112
+ createdBy: 'user' | 'agent' | 'workflow';
113
+
114
+ displayName: string | null;
115
+
116
+ enabled: boolean;
117
+
118
+ fileId: string;
119
+
120
+ filename: string;
121
+
122
+ mimeType: string;
123
+
124
+ sizeBytes: number;
125
+
126
+ zone: 'user' | 'agent' | 'workflow' | 'skills';
127
+ }
128
+
129
+ export interface Quota {
130
+ currentBytes: number;
131
+
132
+ quotaBytes: number;
133
+ }
134
+ }
135
+
136
+ export interface FileDeleteResponse {
137
+ ok: true;
138
+ }
139
+
140
+ export interface FileCancelPendingResponse {
141
+ cancelled: boolean;
142
+ }
143
+
144
+ export interface FileConfirmResponse {
145
+ actualSizeBytes: number;
146
+
147
+ createdAt: string;
148
+
149
+ createdBy: 'user' | 'agent' | 'workflow';
150
+
151
+ displayName: string | null;
152
+
153
+ enabled: boolean;
154
+
155
+ fileId: string;
156
+
157
+ filename: string;
158
+
159
+ mimeType: string;
160
+
161
+ sizeBytes: number;
162
+
163
+ state: 'ready';
164
+
165
+ zone: 'user' | 'agent' | 'workflow' | 'skills';
166
+ }
167
+
168
+ export interface FileUploadURLResponse {
169
+ expiresAt: string;
170
+
171
+ fileId: string;
172
+
173
+ putUrl: string;
174
+ }
175
+
176
+ export interface FileUpdateParams {
177
+ displayName?: string | null;
178
+
179
+ enabled?: boolean;
180
+ }
181
+
182
+ export interface FileListParams {
183
+ zone?: 'user' | 'agent' | 'workflow' | 'skills';
184
+ }
185
+
186
+ export interface FileUploadURLParams {
187
+ /**
188
+ * Body param
189
+ */
190
+ filename: string;
191
+
192
+ /**
193
+ * Body param
194
+ */
195
+ mimeType: string;
196
+
197
+ /**
198
+ * Body param
199
+ */
200
+ sizeBytes: number;
201
+
202
+ /**
203
+ * Body param
204
+ */
205
+ zone?: 'user' | 'skills';
206
+
207
+ /**
208
+ * Header param
209
+ */
210
+ 'Idempotency-Key'?: string;
211
+ }
212
+
213
+ export declare namespace Files {
214
+ export {
215
+ type FileUpdateResponse as FileUpdateResponse,
216
+ type FileListResponse as FileListResponse,
217
+ type FileDeleteResponse as FileDeleteResponse,
218
+ type FileCancelPendingResponse as FileCancelPendingResponse,
219
+ type FileConfirmResponse as FileConfirmResponse,
220
+ type FileUploadURLResponse as FileUploadURLResponse,
221
+ type FileUpdateParams as FileUpdateParams,
222
+ type FileListParams as FileListParams,
223
+ type FileUploadURLParams as FileUploadURLParams,
224
+ };
225
+ }
@@ -1,7 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export * from './shared';
4
- export { Agents, type AgentListResponse } from './agents';
5
4
  export {
6
5
  AppEvents,
7
6
  type AppEventRetrieveResponse,
@@ -21,6 +20,7 @@ export {
21
20
  type AppListParams,
22
21
  type AppCreateSignedUploadURLParams,
23
22
  } from './apps';
23
+ export { Assistant } from './assistant/assistant';
24
24
  export {
25
25
  Carriers,
26
26
  type CarrierCreateResponse,
@@ -73,7 +73,20 @@ export {
73
73
  type EsimListParams,
74
74
  type EsimImportParams,
75
75
  type EsimInstallParams,
76
+ type EsimSelectorParams,
76
77
  } from './esims/esims';
78
+ export {
79
+ Files,
80
+ type FileUpdateResponse,
81
+ type FileListResponse,
82
+ type FileDeleteResponse,
83
+ type FileCancelPendingResponse,
84
+ type FileConfirmResponse,
85
+ type FileUploadURLResponse,
86
+ type FileUpdateParams,
87
+ type FileListParams,
88
+ type FileUploadURLParams,
89
+ } from './files';
77
90
  export { Messages, type MessageListResponse, type MessageListParams } from './messages/messages';
78
91
  export { Models, type ModelListResponse } from './models';
79
92
  export {
@@ -87,11 +100,13 @@ export {
87
100
  Numbers,
88
101
  type NumberCreateResponse,
89
102
  type NumberRetrieveResponse,
103
+ type NumberUpdateResponse,
90
104
  type NumberListResponse,
91
105
  type NumberDeleteResponse,
92
106
  type NumberCountriesResponse,
93
107
  type NumberPurposesResponse,
94
108
  type NumberCreateParams,
109
+ type NumberUpdateParams,
95
110
  type NumberListParams,
96
111
  } from './numbers/numbers';
97
112
  export {
@@ -40,54 +40,48 @@ export class Conversations extends APIResource {
40
40
  }
41
41
 
42
42
  export interface ConversationListResponse {
43
- data: ConversationListResponse.Data;
43
+ items: Array<ConversationListResponse.Item>;
44
+
45
+ nextCursor: ConversationListResponse.NextCursor | null;
44
46
  }
45
47
 
46
48
  export namespace ConversationListResponse {
47
- export interface Data {
48
- items: Array<Data.Item>;
49
-
50
- nextCursor: Data.NextCursor | null;
51
- }
52
-
53
- export namespace Data {
54
- export interface Item {
55
- esimIds: Array<string>;
49
+ export interface Item {
50
+ esimIds: Array<string>;
56
51
 
57
- lastMessage: Item.LastMessage;
52
+ lastMessage: Item.LastMessage;
58
53
 
59
- peerKey: string;
54
+ peerKey: string;
60
55
 
61
- unreadCount: number;
62
- }
56
+ unreadCount: number;
57
+ }
63
58
 
64
- export namespace Item {
65
- export interface LastMessage {
66
- id: string;
59
+ export namespace Item {
60
+ export interface LastMessage {
61
+ id: string;
67
62
 
68
- body: string | null;
63
+ body: string | null;
69
64
 
70
- direction: 'inbound' | 'outbound';
65
+ direction: 'inbound' | 'outbound';
71
66
 
72
- occurredAt: string;
67
+ occurredAt: string;
73
68
 
74
- status:
75
- | 'received'
76
- | 'queued'
77
- | 'claimed'
78
- | 'sending'
79
- | 'sent'
80
- | 'sent_unconfirmed'
81
- | 'delivered'
82
- | 'failed';
83
- }
69
+ status:
70
+ | 'received'
71
+ | 'queued'
72
+ | 'claimed'
73
+ | 'sending'
74
+ | 'sent'
75
+ | 'sent_unconfirmed'
76
+ | 'delivered'
77
+ | 'failed';
84
78
  }
79
+ }
85
80
 
86
- export interface NextCursor {
87
- lastMessageId: string;
81
+ export interface NextCursor {
82
+ lastMessageId: string;
88
83
 
89
- lastOccurredAt: string;
90
- }
84
+ lastOccurredAt: string;
91
85
  }
92
86
  }
93
87