@mobilerun/sdk 6.1.0 → 6.1.1

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 (275) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agents/agents.d.mts +307 -0
  12. package/resources/agents/agents.d.mts.map +1 -0
  13. package/resources/agents/agents.d.ts +307 -0
  14. package/resources/agents/agents.d.ts.map +1 -0
  15. package/resources/agents/agents.js +56 -0
  16. package/resources/agents/agents.js.map +1 -0
  17. package/resources/agents/agents.mjs +51 -0
  18. package/resources/agents/agents.mjs.map +1 -0
  19. package/resources/agents/conversations.d.mts +110 -0
  20. package/resources/agents/conversations.d.mts.map +1 -0
  21. package/resources/agents/conversations.d.ts +110 -0
  22. package/resources/agents/conversations.d.ts.map +1 -0
  23. package/resources/agents/conversations.js +24 -0
  24. package/resources/agents/conversations.js.map +1 -0
  25. package/resources/agents/conversations.mjs +20 -0
  26. package/resources/agents/conversations.mjs.map +1 -0
  27. package/resources/agents/files.d.mts +64 -0
  28. package/resources/agents/files.d.mts.map +1 -0
  29. package/resources/agents/files.d.ts +64 -0
  30. package/resources/agents/files.d.ts.map +1 -0
  31. package/resources/agents/files.js +16 -0
  32. package/resources/agents/files.js.map +1 -0
  33. package/resources/agents/files.mjs +12 -0
  34. package/resources/agents/files.mjs.map +1 -0
  35. package/resources/agents/index.d.mts +7 -0
  36. package/resources/agents/index.d.mts.map +1 -0
  37. package/resources/agents/index.d.ts +7 -0
  38. package/resources/agents/index.d.ts.map +1 -0
  39. package/resources/agents/index.js +17 -0
  40. package/resources/agents/index.js.map +1 -0
  41. package/resources/agents/index.mjs +8 -0
  42. package/resources/agents/index.mjs.map +1 -0
  43. package/resources/agents/profile.d.mts +156 -0
  44. package/resources/agents/profile.d.mts.map +1 -0
  45. package/resources/agents/profile.d.ts +156 -0
  46. package/resources/agents/profile.d.ts.map +1 -0
  47. package/resources/agents/profile.js +19 -0
  48. package/resources/agents/profile.js.map +1 -0
  49. package/resources/agents/profile.mjs +15 -0
  50. package/resources/agents/profile.mjs.map +1 -0
  51. package/resources/agents/requests.d.mts +295 -0
  52. package/resources/agents/requests.d.mts.map +1 -0
  53. package/resources/agents/requests.d.ts +295 -0
  54. package/resources/agents/requests.d.ts.map +1 -0
  55. package/resources/agents/requests.js +42 -0
  56. package/resources/agents/requests.js.map +1 -0
  57. package/resources/agents/requests.mjs +38 -0
  58. package/resources/agents/requests.mjs.map +1 -0
  59. package/resources/agents/routines.d.mts +95 -0
  60. package/resources/agents/routines.d.mts.map +1 -0
  61. package/resources/agents/routines.d.ts +95 -0
  62. package/resources/agents/routines.d.ts.map +1 -0
  63. package/resources/agents/routines.js +26 -0
  64. package/resources/agents/routines.js.map +1 -0
  65. package/resources/agents/routines.mjs +22 -0
  66. package/resources/agents/routines.mjs.map +1 -0
  67. package/resources/agents.d.mts +2 -0
  68. package/resources/agents.d.mts.map +1 -0
  69. package/resources/agents.d.ts +2 -0
  70. package/resources/agents.d.ts.map +1 -0
  71. package/resources/agents.js +6 -0
  72. package/resources/agents.js.map +1 -0
  73. package/resources/agents.mjs +3 -0
  74. package/resources/agents.mjs.map +1 -0
  75. package/resources/assistant/conversations.d.mts +114 -38
  76. package/resources/assistant/conversations.d.mts.map +1 -1
  77. package/resources/assistant/conversations.d.ts +114 -38
  78. package/resources/assistant/conversations.d.ts.map +1 -1
  79. package/resources/assistant/conversations.js +20 -19
  80. package/resources/assistant/conversations.js.map +1 -1
  81. package/resources/assistant/conversations.mjs +20 -19
  82. package/resources/assistant/conversations.mjs.map +1 -1
  83. package/resources/devices/actions.d.mts +3 -4
  84. package/resources/devices/actions.d.mts.map +1 -1
  85. package/resources/devices/actions.d.ts +3 -4
  86. package/resources/devices/actions.d.ts.map +1 -1
  87. package/resources/devices/actions.js +3 -4
  88. package/resources/devices/actions.js.map +1 -1
  89. package/resources/devices/actions.mjs +3 -4
  90. package/resources/devices/actions.mjs.map +1 -1
  91. package/resources/devices/devices.d.mts +9 -0
  92. package/resources/devices/devices.d.mts.map +1 -1
  93. package/resources/devices/devices.d.ts +9 -0
  94. package/resources/devices/devices.d.ts.map +1 -1
  95. package/resources/devices/devices.js +8 -0
  96. package/resources/devices/devices.js.map +1 -1
  97. package/resources/devices/devices.mjs +8 -0
  98. package/resources/devices/devices.mjs.map +1 -1
  99. package/resources/devices/index.d.mts +2 -0
  100. package/resources/devices/index.d.mts.map +1 -1
  101. package/resources/devices/index.d.ts +2 -0
  102. package/resources/devices/index.d.ts.map +1 -1
  103. package/resources/devices/index.js +5 -1
  104. package/resources/devices/index.js.map +1 -1
  105. package/resources/devices/index.mjs +2 -0
  106. package/resources/devices/index.mjs.map +1 -1
  107. package/resources/devices/number-bindings.d.mts +40 -0
  108. package/resources/devices/number-bindings.d.mts.map +1 -0
  109. package/resources/devices/number-bindings.d.ts +40 -0
  110. package/resources/devices/number-bindings.d.ts.map +1 -0
  111. package/resources/devices/number-bindings.js +15 -0
  112. package/resources/devices/number-bindings.js.map +1 -0
  113. package/resources/devices/number-bindings.mjs +11 -0
  114. package/resources/devices/number-bindings.mjs.map +1 -0
  115. package/resources/devices/number.d.mts +141 -0
  116. package/resources/devices/number.d.mts.map +1 -0
  117. package/resources/devices/number.d.ts +141 -0
  118. package/resources/devices/number.d.ts.map +1 -0
  119. package/resources/devices/number.js +68 -0
  120. package/resources/devices/number.js.map +1 -0
  121. package/resources/devices/number.mjs +64 -0
  122. package/resources/devices/number.mjs.map +1 -0
  123. package/resources/files.d.mts +13 -7
  124. package/resources/files.d.mts.map +1 -1
  125. package/resources/files.d.ts +13 -7
  126. package/resources/files.d.ts.map +1 -1
  127. package/resources/files.js +9 -7
  128. package/resources/files.js.map +1 -1
  129. package/resources/files.mjs +9 -7
  130. package/resources/files.mjs.map +1 -1
  131. package/resources/index.d.mts +1 -0
  132. package/resources/index.d.mts.map +1 -1
  133. package/resources/index.d.ts +1 -0
  134. package/resources/index.d.ts.map +1 -1
  135. package/resources/index.js +3 -1
  136. package/resources/index.js.map +1 -1
  137. package/resources/index.mjs +1 -0
  138. package/resources/index.mjs.map +1 -1
  139. package/resources/numbers/messages.d.mts +2 -1
  140. package/resources/numbers/messages.d.mts.map +1 -1
  141. package/resources/numbers/messages.d.ts +2 -1
  142. package/resources/numbers/messages.d.ts.map +1 -1
  143. package/resources/numbers/messages.js +2 -1
  144. package/resources/numbers/messages.js.map +1 -1
  145. package/resources/numbers/messages.mjs +2 -1
  146. package/resources/numbers/messages.mjs.map +1 -1
  147. package/resources/numbers/numbers.d.mts +48 -0
  148. package/resources/numbers/numbers.d.mts.map +1 -1
  149. package/resources/numbers/numbers.d.ts +48 -0
  150. package/resources/numbers/numbers.d.ts.map +1 -1
  151. package/resources/numbers/numbers.js.map +1 -1
  152. package/resources/numbers/numbers.mjs.map +1 -1
  153. package/resources/tasks/tasks.d.mts +24 -5
  154. package/resources/tasks/tasks.d.mts.map +1 -1
  155. package/resources/tasks/tasks.d.ts +24 -5
  156. package/resources/tasks/tasks.d.ts.map +1 -1
  157. package/resources/tasks/tasks.js.map +1 -1
  158. package/resources/tasks/tasks.mjs.map +1 -1
  159. package/resources/workflows/action-catalog.d.mts +56 -8
  160. package/resources/workflows/action-catalog.d.mts.map +1 -1
  161. package/resources/workflows/action-catalog.d.ts +56 -8
  162. package/resources/workflows/action-catalog.d.ts.map +1 -1
  163. package/resources/workflows/action-catalog.js +7 -5
  164. package/resources/workflows/action-catalog.js.map +1 -1
  165. package/resources/workflows/action-catalog.mjs +7 -5
  166. package/resources/workflows/action-catalog.mjs.map +1 -1
  167. package/resources/workflows/actions/actions.d.mts +22 -10
  168. package/resources/workflows/actions/actions.d.mts.map +1 -1
  169. package/resources/workflows/actions/actions.d.ts +22 -10
  170. package/resources/workflows/actions/actions.d.ts.map +1 -1
  171. package/resources/workflows/actions/actions.js +7 -5
  172. package/resources/workflows/actions/actions.js.map +1 -1
  173. package/resources/workflows/actions/actions.mjs +7 -5
  174. package/resources/workflows/actions/actions.mjs.map +1 -1
  175. package/resources/workflows/actions/index.d.mts +1 -1
  176. package/resources/workflows/actions/index.d.mts.map +1 -1
  177. package/resources/workflows/actions/index.d.ts +1 -1
  178. package/resources/workflows/actions/index.d.ts.map +1 -1
  179. package/resources/workflows/actions/index.js.map +1 -1
  180. package/resources/workflows/actions/index.mjs.map +1 -1
  181. package/resources/workflows/actions/services.d.mts +1 -1
  182. package/resources/workflows/actions/services.d.mts.map +1 -1
  183. package/resources/workflows/actions/services.d.ts +1 -1
  184. package/resources/workflows/actions/services.d.ts.map +1 -1
  185. package/resources/workflows/events.d.mts +25 -3
  186. package/resources/workflows/events.d.mts.map +1 -1
  187. package/resources/workflows/events.d.ts +25 -3
  188. package/resources/workflows/events.d.ts.map +1 -1
  189. package/resources/workflows/executions/executions.d.mts +16 -0
  190. package/resources/workflows/executions/executions.d.mts.map +1 -1
  191. package/resources/workflows/executions/executions.d.ts +16 -0
  192. package/resources/workflows/executions/executions.d.ts.map +1 -1
  193. package/resources/workflows/executions/executions.js.map +1 -1
  194. package/resources/workflows/executions/executions.mjs.map +1 -1
  195. package/resources/workflows/flows/flows.d.mts +547 -102
  196. package/resources/workflows/flows/flows.d.mts.map +1 -1
  197. package/resources/workflows/flows/flows.d.ts +547 -102
  198. package/resources/workflows/flows/flows.d.ts.map +1 -1
  199. package/resources/workflows/flows/flows.js +15 -2
  200. package/resources/workflows/flows/flows.js.map +1 -1
  201. package/resources/workflows/flows/flows.mjs +15 -2
  202. package/resources/workflows/flows/flows.mjs.map +1 -1
  203. package/resources/workflows/flows/index.d.mts +2 -1
  204. package/resources/workflows/flows/index.d.mts.map +1 -1
  205. package/resources/workflows/flows/index.d.ts +2 -1
  206. package/resources/workflows/flows/index.d.ts.map +1 -1
  207. package/resources/workflows/flows/index.js +3 -1
  208. package/resources/workflows/flows/index.js.map +1 -1
  209. package/resources/workflows/flows/index.mjs +1 -0
  210. package/resources/workflows/flows/index.mjs.map +1 -1
  211. package/resources/workflows/flows/state.d.mts +65 -0
  212. package/resources/workflows/flows/state.d.mts.map +1 -0
  213. package/resources/workflows/flows/state.d.ts +65 -0
  214. package/resources/workflows/flows/state.d.ts.map +1 -0
  215. package/resources/workflows/flows/state.js +33 -0
  216. package/resources/workflows/flows/state.js.map +1 -0
  217. package/resources/workflows/flows/state.mjs +29 -0
  218. package/resources/workflows/flows/state.mjs.map +1 -0
  219. package/resources/workflows/index.d.mts +3 -3
  220. package/resources/workflows/index.d.mts.map +1 -1
  221. package/resources/workflows/index.d.ts +3 -3
  222. package/resources/workflows/index.d.ts.map +1 -1
  223. package/resources/workflows/index.js.map +1 -1
  224. package/resources/workflows/index.mjs.map +1 -1
  225. package/resources/workflows/triggers.d.mts +40 -5
  226. package/resources/workflows/triggers.d.mts.map +1 -1
  227. package/resources/workflows/triggers.d.ts +40 -5
  228. package/resources/workflows/triggers.d.ts.map +1 -1
  229. package/resources/workflows/triggers.js +12 -3
  230. package/resources/workflows/triggers.js.map +1 -1
  231. package/resources/workflows/triggers.mjs +12 -3
  232. package/resources/workflows/triggers.mjs.map +1 -1
  233. package/resources/workflows/workflows.d.mts +6 -6
  234. package/resources/workflows/workflows.d.mts.map +1 -1
  235. package/resources/workflows/workflows.d.ts +6 -6
  236. package/resources/workflows/workflows.d.ts.map +1 -1
  237. package/resources/workflows/workflows.js.map +1 -1
  238. package/resources/workflows/workflows.mjs.map +1 -1
  239. package/src/client.ts +17 -0
  240. package/src/resources/agents/agents.ts +475 -0
  241. package/src/resources/agents/conversations.ts +205 -0
  242. package/src/resources/agents/files.ts +105 -0
  243. package/src/resources/agents/index.ts +34 -0
  244. package/src/resources/agents/profile.ts +225 -0
  245. package/src/resources/agents/requests.ts +495 -0
  246. package/src/resources/agents/routines.ts +156 -0
  247. package/src/resources/agents.ts +3 -0
  248. package/src/resources/assistant/conversations.ts +146 -39
  249. package/src/resources/devices/actions.ts +3 -4
  250. package/src/resources/devices/devices.ts +38 -0
  251. package/src/resources/devices/index.ts +14 -0
  252. package/src/resources/devices/number-bindings.ts +62 -0
  253. package/src/resources/devices/number.ts +261 -0
  254. package/src/resources/files.ts +17 -7
  255. package/src/resources/index.ts +7 -0
  256. package/src/resources/numbers/messages.ts +2 -1
  257. package/src/resources/numbers/numbers.ts +64 -0
  258. package/src/resources/tasks/tasks.ts +26 -5
  259. package/src/resources/workflows/action-catalog.ts +69 -8
  260. package/src/resources/workflows/actions/actions.ts +29 -10
  261. package/src/resources/workflows/actions/index.ts +1 -0
  262. package/src/resources/workflows/actions/services.ts +1 -1
  263. package/src/resources/workflows/events.ts +32 -2
  264. package/src/resources/workflows/executions/executions.ts +26 -0
  265. package/src/resources/workflows/flows/flows.ts +707 -97
  266. package/src/resources/workflows/flows/index.ts +10 -0
  267. package/src/resources/workflows/flows/state.ts +103 -0
  268. package/src/resources/workflows/index.ts +4 -0
  269. package/src/resources/workflows/triggers.ts +34 -5
  270. package/src/resources/workflows/workflows.ts +8 -0
  271. package/src/version.ts +1 -1
  272. package/version.d.mts +1 -1
  273. package/version.d.ts +1 -1
  274. package/version.js +1 -1
  275. package/version.mjs +1 -1
@@ -0,0 +1,261 @@
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 Number extends APIResource {
10
+ /**
11
+ * Returns the cloud number bound to the device and the SIM line the device
12
+ * presents (carrier, number).
13
+ */
14
+ retrieve(
15
+ deviceID: string,
16
+ params: NumberRetrieveParams | null | undefined = {},
17
+ options?: RequestOptions,
18
+ ): APIPromise<NumberRetrieveResponse> {
19
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
20
+ return this._client.get(path`/devices/${deviceID}/number`, {
21
+ ...options,
22
+ headers: buildHeaders([
23
+ {
24
+ ...(xDeviceDisplayID?.toString() != null ?
25
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
26
+ : undefined),
27
+ },
28
+ options?.headers,
29
+ ]),
30
+ });
31
+ }
32
+
33
+ /**
34
+ * Binds one of your cloud numbers to the device. The device's SIM shows the number
35
+ * and every SMS it receives is delivered into the device's messages app. Available
36
+ * on devices whose capabilities report telephony. A number can be bound to one
37
+ * device, and a device holds one number; unbind first to move it.
38
+ */
39
+ bind(deviceID: string, params: NumberBindParams, options?: RequestOptions): APIPromise<NumberBindResponse> {
40
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
41
+ return this._client.post(path`/devices/${deviceID}/number`, {
42
+ body,
43
+ ...options,
44
+ headers: buildHeaders([
45
+ {
46
+ ...(xDeviceDisplayID?.toString() != null ?
47
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
48
+ : undefined),
49
+ },
50
+ options?.headers,
51
+ ]),
52
+ });
53
+ }
54
+
55
+ /**
56
+ * Releases the number bound to the device. The device returns to its own default
57
+ * line; SMS to the number stop reaching the device.
58
+ */
59
+ unbind(
60
+ deviceID: string,
61
+ params: NumberUnbindParams | null | undefined = {},
62
+ options?: RequestOptions,
63
+ ): APIPromise<NumberUnbindResponse> {
64
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
65
+ return this._client.delete(path`/devices/${deviceID}/number`, {
66
+ ...options,
67
+ headers: buildHeaders([
68
+ {
69
+ ...(xDeviceDisplayID?.toString() != null ?
70
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
71
+ : undefined),
72
+ },
73
+ options?.headers,
74
+ ]),
75
+ });
76
+ }
77
+ }
78
+
79
+ export interface NumberRetrieveResponse {
80
+ binding: NumberRetrieveResponse.Binding;
81
+
82
+ line: NumberRetrieveResponse.Line;
83
+
84
+ /**
85
+ * A URL to the JSON Schema for this object.
86
+ */
87
+ $schema?: string;
88
+ }
89
+
90
+ export namespace NumberRetrieveResponse {
91
+ export interface Binding {
92
+ boundAt: string;
93
+
94
+ numberId: string;
95
+
96
+ phoneNumber: string;
97
+ }
98
+
99
+ export interface Line {
100
+ carrier: Line.Carrier;
101
+
102
+ defaultNumber: boolean;
103
+
104
+ kind: 'simulated' | 'uicc' | 'esim' | 'unknown';
105
+
106
+ lineId: string;
107
+
108
+ numberSource: 'backend_default' | 'caller' | 'unknown';
109
+
110
+ state: 'pending' | 'active' | 'inactive' | 'failed' | 'unknown';
111
+
112
+ iccid?: string;
113
+
114
+ phoneNumber?: string;
115
+ }
116
+
117
+ export namespace Line {
118
+ export interface Carrier {
119
+ countryIso: string;
120
+
121
+ mcc: string;
122
+
123
+ mnc: string;
124
+
125
+ name: string;
126
+ }
127
+ }
128
+ }
129
+
130
+ export interface NumberBindResponse {
131
+ binding: NumberBindResponse.Binding;
132
+
133
+ line: NumberBindResponse.Line;
134
+
135
+ /**
136
+ * A URL to the JSON Schema for this object.
137
+ */
138
+ $schema?: string;
139
+ }
140
+
141
+ export namespace NumberBindResponse {
142
+ export interface Binding {
143
+ boundAt: string;
144
+
145
+ numberId: string;
146
+
147
+ phoneNumber: string;
148
+ }
149
+
150
+ export interface Line {
151
+ carrier: Line.Carrier;
152
+
153
+ defaultNumber: boolean;
154
+
155
+ kind: 'simulated' | 'uicc' | 'esim' | 'unknown';
156
+
157
+ lineId: string;
158
+
159
+ numberSource: 'backend_default' | 'caller' | 'unknown';
160
+
161
+ state: 'pending' | 'active' | 'inactive' | 'failed' | 'unknown';
162
+
163
+ iccid?: string;
164
+
165
+ phoneNumber?: string;
166
+ }
167
+
168
+ export namespace Line {
169
+ export interface Carrier {
170
+ countryIso: string;
171
+
172
+ mcc: string;
173
+
174
+ mnc: string;
175
+
176
+ name: string;
177
+ }
178
+ }
179
+ }
180
+
181
+ export interface NumberUnbindResponse {
182
+ binding: NumberUnbindResponse.Binding;
183
+
184
+ line: NumberUnbindResponse.Line;
185
+
186
+ /**
187
+ * A URL to the JSON Schema for this object.
188
+ */
189
+ $schema?: string;
190
+ }
191
+
192
+ export namespace NumberUnbindResponse {
193
+ export interface Binding {
194
+ boundAt: string;
195
+
196
+ numberId: string;
197
+
198
+ phoneNumber: string;
199
+ }
200
+
201
+ export interface Line {
202
+ carrier: Line.Carrier;
203
+
204
+ defaultNumber: boolean;
205
+
206
+ kind: 'simulated' | 'uicc' | 'esim' | 'unknown';
207
+
208
+ lineId: string;
209
+
210
+ numberSource: 'backend_default' | 'caller' | 'unknown';
211
+
212
+ state: 'pending' | 'active' | 'inactive' | 'failed' | 'unknown';
213
+
214
+ iccid?: string;
215
+
216
+ phoneNumber?: string;
217
+ }
218
+
219
+ export namespace Line {
220
+ export interface Carrier {
221
+ countryIso: string;
222
+
223
+ mcc: string;
224
+
225
+ mnc: string;
226
+
227
+ name: string;
228
+ }
229
+ }
230
+ }
231
+
232
+ export interface NumberRetrieveParams {
233
+ 'X-Device-Display-ID'?: number;
234
+ }
235
+
236
+ export interface NumberBindParams {
237
+ /**
238
+ * Body param: The cloud number's id.
239
+ */
240
+ numberId: string;
241
+
242
+ /**
243
+ * Header param
244
+ */
245
+ 'X-Device-Display-ID'?: number;
246
+ }
247
+
248
+ export interface NumberUnbindParams {
249
+ 'X-Device-Display-ID'?: number;
250
+ }
251
+
252
+ export declare namespace Number {
253
+ export {
254
+ type NumberRetrieveResponse as NumberRetrieveResponse,
255
+ type NumberBindResponse as NumberBindResponse,
256
+ type NumberUnbindResponse as NumberUnbindResponse,
257
+ type NumberRetrieveParams as NumberRetrieveParams,
258
+ type NumberBindParams as NumberBindParams,
259
+ type NumberUnbindParams as NumberUnbindParams,
260
+ };
261
+ }
@@ -20,7 +20,7 @@ export class Files extends APIResource {
20
20
  }
21
21
 
22
22
  /**
23
- * List the user's ready files, optionally filtered by zone
23
+ * List the user's ready files, optionally filtered by zone.
24
24
  */
25
25
  list(
26
26
  query: FileListParams | null | undefined = {},
@@ -30,23 +30,25 @@ export class Files extends APIResource {
30
30
  }
31
31
 
32
32
  /**
33
- * Hard-delete a file
33
+ * Hard-delete a file.
34
34
  */
35
35
  delete(fileID: string, options?: RequestOptions): APIPromise<FileDeleteResponse> {
36
36
  return this._client.delete(path`/agents/files/${fileID}`, options);
37
37
  }
38
38
 
39
39
  /**
40
- * Soft-cancels an in-flight upload before confirm. Only acts on `pending` uploads
41
- * — refuses to touch `ready` files, so confirmed files are never removed.
42
- * Idempotent: `{ cancelled: false }` if the file exists but is no longer pending.
40
+ * Soft-cancels an in-flight upload before confirm, transitioning it to expired and
41
+ * deleting the underlying object. Only acts on `pending` uploads — refuses to
42
+ * touch `ready` files, so confirmed files are never removed. Idempotent:
43
+ * `{ cancelled: false }` if the file exists but is no longer pending.
43
44
  */
44
45
  cancelPending(fileID: string, options?: RequestOptions): APIPromise<FileCancelPendingResponse> {
45
46
  return this._client.delete(path`/agents/files/${fileID}/pending`, options);
46
47
  }
47
48
 
48
49
  /**
49
- * Confirm a file upload by server-side HEAD validation
50
+ * Confirm a file upload after validating the stored object with a server-side HEAD
51
+ * request.
50
52
  */
51
53
  confirm(fileID: string, options?: RequestOptions): APIPromise<FileConfirmResponse> {
52
54
  return this._client.post(path`/agents/files/${fileID}/confirm`, options);
@@ -64,7 +66,7 @@ export class Files extends APIResource {
64
66
  }
65
67
 
66
68
  /**
67
- * Mint a presigned PUT URL for a user file upload
69
+ * Mint a presigned PUT URL and a fileId for uploading a user file.
68
70
  */
69
71
  uploadURL(body: FileUploadURLParams, options?: RequestOptions): APIPromise<FileUploadURLResponse> {
70
72
  return this._client.post('/agents/files/upload-url', { body, ...options });
@@ -90,6 +92,8 @@ export interface FileUpdateResponse {
90
92
 
91
93
  zone: 'user' | 'agent' | 'workflow' | 'skills';
92
94
 
95
+ agentId?: string;
96
+
93
97
  collectionStatus?: FileUpdateResponse.UnionMember0 | FileUpdateResponse.UnionMember1;
94
98
  }
95
99
 
@@ -155,6 +159,8 @@ export namespace FileListResponse {
155
159
 
156
160
  zone: 'user' | 'agent' | 'workflow' | 'skills';
157
161
 
162
+ agentId?: string;
163
+
158
164
  collectionStatus?: File.UnionMember0 | File.UnionMember1;
159
165
  }
160
166
 
@@ -236,6 +242,8 @@ export interface FileConfirmResponse {
236
242
 
237
243
  zone: 'user' | 'agent' | 'workflow' | 'skills';
238
244
 
245
+ agentId?: string;
246
+
239
247
  collectionStatus?: FileConfirmResponse.UnionMember0 | FileConfirmResponse.UnionMember1;
240
248
  }
241
249
 
@@ -300,6 +308,8 @@ export interface FileUploadURLParams {
300
308
 
301
309
  sizeBytes: number;
302
310
 
311
+ chatSessionId?: string;
312
+
303
313
  zone?: 'user' | 'skills';
304
314
  }
305
315
 
@@ -1,6 +1,13 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export * from './shared';
4
+ export {
5
+ Agents,
6
+ type AgentCreateResponse,
7
+ type AgentListResponse,
8
+ type AgentModelProfilesResponse,
9
+ type AgentCreateParams,
10
+ } from './agents/agents';
4
11
  export {
5
12
  Apps,
6
13
  type AppRetrieveResponse,
@@ -37,7 +37,8 @@ export class Messages extends APIResource {
37
37
  * rate_limited: too many sends by the owner in a short window; 429
38
38
  * number_rate_limited: too many outbound sends from this number in the configured
39
39
  * window (all sends from this number count, including those made on your behalf).
40
- * 403 send_disabled: self-service SMS send is switched off.
40
+ * 403 send_disabled: self-service SMS send is switched off;
41
+ * outbound_sms_not_granted: outbound SMS requires an admin grant.
41
42
  *
42
43
  * @example
43
44
  * ```ts
@@ -177,6 +177,11 @@ export namespace NumberRetrieveResponse {
177
177
 
178
178
  currentPeriodEnd: string | null;
179
179
 
180
+ /**
181
+ * The device this number is bound to, or null.
182
+ */
183
+ deviceBinding: Data.DeviceBinding | null;
184
+
180
185
  /**
181
186
  * Why setup failed. Null unless state is failed, and null when the failure has no
182
187
  * classified reason. out_of_stock: no number is currently available for the
@@ -220,6 +225,17 @@ export namespace NumberRetrieveResponse {
220
225
  send: boolean;
221
226
  }
222
227
 
228
+ /**
229
+ * The device this number is bound to, or null.
230
+ */
231
+ export interface DeviceBinding {
232
+ boundAt: string;
233
+
234
+ deviceId: string;
235
+
236
+ deviceType: string | null;
237
+ }
238
+
223
239
  /**
224
240
  * What this line supports in principle, per channel. Use `actions` for what you
225
241
  * can do right now.
@@ -282,6 +298,11 @@ export namespace NumberUpdateResponse {
282
298
 
283
299
  currentPeriodEnd: string | null;
284
300
 
301
+ /**
302
+ * The device this number is bound to, or null.
303
+ */
304
+ deviceBinding: Data.DeviceBinding | null;
305
+
285
306
  /**
286
307
  * Why setup failed. Null unless state is failed, and null when the failure has no
287
308
  * classified reason. out_of_stock: no number is currently available for the
@@ -325,6 +346,17 @@ export namespace NumberUpdateResponse {
325
346
  send: boolean;
326
347
  }
327
348
 
349
+ /**
350
+ * The device this number is bound to, or null.
351
+ */
352
+ export interface DeviceBinding {
353
+ boundAt: string;
354
+
355
+ deviceId: string;
356
+
357
+ deviceType: string | null;
358
+ }
359
+
328
360
  /**
329
361
  * What this line supports in principle, per channel. Use `actions` for what you
330
362
  * can do right now.
@@ -389,6 +421,11 @@ export namespace NumberListResponse {
389
421
 
390
422
  currentPeriodEnd: string | null;
391
423
 
424
+ /**
425
+ * The device this number is bound to, or null.
426
+ */
427
+ deviceBinding: Item.DeviceBinding | null;
428
+
392
429
  /**
393
430
  * Why setup failed. Null unless state is failed, and null when the failure has no
394
431
  * classified reason. out_of_stock: no number is currently available for the
@@ -432,6 +469,17 @@ export namespace NumberListResponse {
432
469
  send: boolean;
433
470
  }
434
471
 
472
+ /**
473
+ * The device this number is bound to, or null.
474
+ */
475
+ export interface DeviceBinding {
476
+ boundAt: string;
477
+
478
+ deviceId: string;
479
+
480
+ deviceType: string | null;
481
+ }
482
+
435
483
  /**
436
484
  * What this line supports in principle, per channel. Use `actions` for what you
437
485
  * can do right now.
@@ -494,6 +542,11 @@ export namespace NumberDeleteResponse {
494
542
 
495
543
  currentPeriodEnd: string | null;
496
544
 
545
+ /**
546
+ * The device this number is bound to, or null.
547
+ */
548
+ deviceBinding: Data.DeviceBinding | null;
549
+
497
550
  /**
498
551
  * Why setup failed. Null unless state is failed, and null when the failure has no
499
552
  * classified reason. out_of_stock: no number is currently available for the
@@ -537,6 +590,17 @@ export namespace NumberDeleteResponse {
537
590
  send: boolean;
538
591
  }
539
592
 
593
+ /**
594
+ * The device this number is bound to, or null.
595
+ */
596
+ export interface DeviceBinding {
597
+ boundAt: string;
598
+
599
+ deviceId: string;
600
+
601
+ deviceType: string | null;
602
+ }
603
+
540
604
  /**
541
605
  * What this line supports in principle, per channel. Use `actions` for what you
542
606
  * can do right now.
@@ -198,8 +198,10 @@ export namespace TaskRetrieveResponse {
198
198
 
199
199
  /**
200
200
  * Where the task came from: 'api' for tasks created via POST /tasks, 'agent' for
201
- * tasks spawned by an agent step. Agent tasks are readable (status, trajectory,
202
- * media) but not controllable via this API.
201
+ * tasks spawned by an agent step or created with internal=true. 'source'
202
+ * classifies visibility only: tasks created with internal=true stay controllable
203
+ * via this API, while tasks spawned by an agent step are readable (status,
204
+ * trajectory, media) but not controllable.
203
205
  */
204
206
  source?: 'api' | 'agent';
205
207
 
@@ -344,8 +346,10 @@ export namespace TaskListResponse {
344
346
 
345
347
  /**
346
348
  * Where the task came from: 'api' for tasks created via POST /tasks, 'agent' for
347
- * tasks spawned by an agent step. Agent tasks are readable (status, trajectory,
348
- * media) but not controllable via this API.
349
+ * tasks spawned by an agent step or created with internal=true. 'source'
350
+ * classifies visibility only: tasks created with internal=true stay controllable
351
+ * via this API, while tasks spawned by an agent step are readable (status,
352
+ * trajectory, media) but not controllable.
349
353
  */
350
354
  source?: 'api' | 'agent';
351
355
 
@@ -1044,7 +1048,8 @@ export interface TaskListParams {
1044
1048
  query?: string | null;
1045
1049
 
1046
1050
  /**
1047
- * Only tasks created via the API ('api') or spawned by an agent step ('agent').
1051
+ * Only tasks created via the API ('api') or tasks spawned by an agent step or
1052
+ * created with internal=true ('agent').
1048
1053
  */
1049
1054
  source?: 'api' | 'agent' | null;
1050
1055
 
@@ -1094,6 +1099,14 @@ export interface TaskRunParams {
1094
1099
  */
1095
1100
  humanize?: boolean;
1096
1101
 
1102
+ /**
1103
+ * Mark a task started by an agent or worker on the user's behalf. It is listed as
1104
+ * source='agent' (excluded from source='api' lists) and its events carry
1105
+ * internal=true so user-facing notifications and webhooks skip it. It is still
1106
+ * billed, controllable and retrievable by id.
1107
+ */
1108
+ internal?: boolean;
1109
+
1097
1110
  /**
1098
1111
  * The LLM model identifier to use for the task (e.g.
1099
1112
  * 'mobilerun/mobile-agent-fast'). When omitted with reasoning=false, the fast-mode
@@ -1182,6 +1195,14 @@ export interface TaskRunStreamedParams {
1182
1195
  */
1183
1196
  humanize?: boolean;
1184
1197
 
1198
+ /**
1199
+ * Mark a task started by an agent or worker on the user's behalf. It is listed as
1200
+ * source='agent' (excluded from source='api' lists) and its events carry
1201
+ * internal=true so user-facing notifications and webhooks skip it. It is still
1202
+ * billed, controllable and retrievable by id.
1203
+ */
1204
+ internal?: boolean;
1205
+
1185
1206
  /**
1186
1207
  * The LLM model identifier to use for the task (e.g.
1187
1208
  * 'mobilerun/mobile-agent-fast'). When omitted with reasoning=false, the fast-mode
@@ -9,16 +9,22 @@ import { path } from '../../internal/utils/path';
9
9
  export class ActionCatalog extends APIResource {
10
10
  /**
11
11
  * Fetch a single action catalog entry by its ID, including its service, method,
12
- * and parameter schema. Returns 404 if no entry matches.
12
+ * parameter schema, and `deviceFree` eligibility. Supports
13
+ * `profile=agent_routine`; returns 404 if no entry matches or the entry is outside
14
+ * that profile.
13
15
  */
14
- retrieve(catalogEntryID: string, options?: RequestOptions): APIPromise<ActionCatalogRetrieveResponse> {
15
- return this._client.get(path`/action-catalog/${catalogEntryID}`, options);
16
+ retrieve(
17
+ catalogEntryID: string,
18
+ query: ActionCatalogRetrieveParams | null | undefined = {},
19
+ options?: RequestOptions,
20
+ ): APIPromise<ActionCatalogRetrieveResponse> {
21
+ return this._client.get(path`/action-catalog/${catalogEntryID}`, { query, ...options });
16
22
  }
17
23
 
18
24
  /**
19
25
  * Return a paginated list of catalog entries — the service/method templates that
20
- * actions are created from, each carrying its parameter schema. Supports filtering
21
- * by `service`.
26
+ * actions are created from, each carrying its parameter schema and `deviceFree`
27
+ * eligibility. Supports filtering by `service` and `profile=agent_routine`.
22
28
  */
23
29
  list(
24
30
  query: ActionCatalogListParams | null | undefined = {},
@@ -40,16 +46,37 @@ export namespace ActionCatalogRetrieveResponse {
40
46
 
41
47
  description: string | null;
42
48
 
49
+ /**
50
+ * True when this step itself runs without a device; only such steps may appear in
51
+ * a device-free flow. Not the same as cloudRoutine: a device-free step can still
52
+ * be device-routine-only (see cloudRoutineReason).
53
+ */
54
+ deviceFree: boolean;
55
+
43
56
  method: string;
44
57
 
45
58
  name: string;
46
59
 
47
60
  provider: 'mobilerun' | 'oneDrive' | 'googleDrive';
48
61
 
49
- service: 'tasks_api' | 'devices_api' | 'agents_api' | 'webhooks' | 'integrations_api';
62
+ service: 'tasks_api' | 'devices_api' | 'agents_api' | 'webhooks' | 'integrations_api' | 'triggers_api';
50
63
 
51
64
  updatedAt: string | null;
52
65
 
66
+ /**
67
+ * True when this step is allowed in a cloud agent routine. Present only for
68
+ * profile=agent_routine. False does not mean the step needs a device; read
69
+ * cloudRoutineReason.
70
+ */
71
+ cloudRoutine?: boolean;
72
+
73
+ /**
74
+ * Why cloudRoutine is false: needs_device (the step needs a device),
75
+ * device_routine_only (allowed only in device routines; the step itself does not
76
+ * need a device). Present only when cloudRoutine is false.
77
+ */
78
+ cloudRoutineReason?: 'needs_device' | 'device_routine_only';
79
+
53
80
  outputSchema?: unknown;
54
81
 
55
82
  paramsSchema?: unknown;
@@ -70,34 +97,68 @@ export namespace ActionCatalogListResponse {
70
97
 
71
98
  description: string | null;
72
99
 
100
+ /**
101
+ * True when this step itself runs without a device; only such steps may appear in
102
+ * a device-free flow. Not the same as cloudRoutine: a device-free step can still
103
+ * be device-routine-only (see cloudRoutineReason).
104
+ */
105
+ deviceFree: boolean;
106
+
73
107
  method: string;
74
108
 
75
109
  name: string;
76
110
 
77
111
  provider: 'mobilerun' | 'oneDrive' | 'googleDrive';
78
112
 
79
- service: 'tasks_api' | 'devices_api' | 'agents_api' | 'webhooks' | 'integrations_api';
113
+ service: 'tasks_api' | 'devices_api' | 'agents_api' | 'webhooks' | 'integrations_api' | 'triggers_api';
80
114
 
81
115
  updatedAt: string | null;
82
116
 
117
+ /**
118
+ * True when this step is allowed in a cloud agent routine. Present only for
119
+ * profile=agent_routine. False does not mean the step needs a device; read
120
+ * cloudRoutineReason.
121
+ */
122
+ cloudRoutine?: boolean;
123
+
124
+ /**
125
+ * Why cloudRoutine is false: needs_device (the step needs a device),
126
+ * device_routine_only (allowed only in device routines; the step itself does not
127
+ * need a device). Present only when cloudRoutine is false.
128
+ */
129
+ cloudRoutineReason?: 'needs_device' | 'device_routine_only';
130
+
83
131
  outputSchema?: unknown;
84
132
 
85
133
  paramsSchema?: unknown;
86
134
  }
87
135
  }
88
136
 
137
+ export interface ActionCatalogRetrieveParams {
138
+ /**
139
+ * Restrict reads to the agent routine step surface.
140
+ */
141
+ profile?: 'agent_routine';
142
+ }
143
+
89
144
  export interface ActionCatalogListParams {
90
145
  page?: number;
91
146
 
92
147
  pageSize?: number;
93
148
 
94
- service?: 'tasks_api' | 'devices_api' | 'agents_api' | 'webhooks' | 'integrations_api';
149
+ /**
150
+ * Restrict reads to the agent routine step surface.
151
+ */
152
+ profile?: 'agent_routine';
153
+
154
+ service?: 'tasks_api' | 'devices_api' | 'agents_api' | 'webhooks' | 'integrations_api' | 'triggers_api';
95
155
  }
96
156
 
97
157
  export declare namespace ActionCatalog {
98
158
  export {
99
159
  type ActionCatalogRetrieveResponse as ActionCatalogRetrieveResponse,
100
160
  type ActionCatalogListResponse as ActionCatalogListResponse,
161
+ type ActionCatalogRetrieveParams as ActionCatalogRetrieveParams,
101
162
  type ActionCatalogListParams as ActionCatalogListParams,
102
163
  };
103
164
  }