@mobilerun/sdk 2.1.0 → 3.0.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 (247) hide show
  1. package/CHANGELOG.md +253 -0
  2. package/README.md +44 -0
  3. package/client.d.mts +32 -3
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +32 -3
  6. package/client.d.ts.map +1 -1
  7. package/client.js +29 -7
  8. package/client.js.map +1 -1
  9. package/client.mjs +29 -7
  10. package/client.mjs.map +1 -1
  11. package/internal/tslib.js +6 -6
  12. package/internal/utils/query.d.mts +2 -0
  13. package/internal/utils/query.d.mts.map +1 -0
  14. package/internal/utils/query.d.ts +2 -0
  15. package/internal/utils/query.d.ts.map +1 -0
  16. package/internal/utils/query.js +10 -0
  17. package/internal/utils/query.js.map +1 -0
  18. package/internal/utils/query.mjs +6 -0
  19. package/internal/utils/query.mjs.map +1 -0
  20. package/internal/utils.d.mts +1 -0
  21. package/internal/utils.d.ts +1 -0
  22. package/internal/utils.js +1 -0
  23. package/internal/utils.js.map +1 -1
  24. package/internal/utils.mjs +1 -0
  25. package/package.json +7 -1
  26. package/resources/agents.d.mts +29 -0
  27. package/resources/agents.d.mts.map +1 -0
  28. package/resources/agents.d.ts +29 -0
  29. package/resources/agents.d.ts.map +1 -0
  30. package/resources/agents.js +18 -0
  31. package/resources/agents.js.map +1 -0
  32. package/resources/agents.mjs +14 -0
  33. package/resources/agents.mjs.map +1 -0
  34. package/resources/apps.d.mts +10 -12
  35. package/resources/apps.d.mts.map +1 -1
  36. package/resources/apps.d.ts +10 -12
  37. package/resources/apps.d.ts.map +1 -1
  38. package/resources/apps.js.map +1 -1
  39. package/resources/apps.mjs.map +1 -1
  40. package/resources/carriers.d.mts +233 -0
  41. package/resources/carriers.d.mts.map +1 -0
  42. package/resources/carriers.d.ts +233 -0
  43. package/resources/carriers.d.ts.map +1 -0
  44. package/resources/carriers.js +46 -0
  45. package/resources/carriers.js.map +1 -0
  46. package/resources/carriers.mjs +42 -0
  47. package/resources/carriers.mjs.map +1 -0
  48. package/resources/credentials/credentials.d.mts +4 -13
  49. package/resources/credentials/credentials.d.mts.map +1 -1
  50. package/resources/credentials/credentials.d.ts +4 -13
  51. package/resources/credentials/credentials.d.ts.map +1 -1
  52. package/resources/credentials/credentials.js.map +1 -1
  53. package/resources/credentials/credentials.mjs.map +1 -1
  54. package/resources/devices/actions.d.mts +37 -1
  55. package/resources/devices/actions.d.mts.map +1 -1
  56. package/resources/devices/actions.d.ts +37 -1
  57. package/resources/devices/actions.d.ts.map +1 -1
  58. package/resources/devices/actions.js +36 -0
  59. package/resources/devices/actions.js.map +1 -1
  60. package/resources/devices/actions.mjs +36 -0
  61. package/resources/devices/actions.mjs.map +1 -1
  62. package/resources/devices/apps.d.mts +4 -0
  63. package/resources/devices/apps.d.mts.map +1 -1
  64. package/resources/devices/apps.d.ts +4 -0
  65. package/resources/devices/apps.d.ts.map +1 -1
  66. package/resources/devices/devices.d.mts +40 -38
  67. package/resources/devices/devices.d.mts.map +1 -1
  68. package/resources/devices/devices.d.ts +40 -38
  69. package/resources/devices/devices.d.ts.map +1 -1
  70. package/resources/devices/devices.js +22 -2
  71. package/resources/devices/devices.js.map +1 -1
  72. package/resources/devices/devices.mjs +23 -3
  73. package/resources/devices/devices.mjs.map +1 -1
  74. package/resources/devices/files.d.mts +108 -0
  75. package/resources/devices/files.d.mts.map +1 -0
  76. package/resources/devices/files.d.ts +108 -0
  77. package/resources/devices/files.d.ts.map +1 -0
  78. package/resources/devices/files.js +87 -0
  79. package/resources/devices/files.js.map +1 -0
  80. package/resources/devices/files.mjs +83 -0
  81. package/resources/devices/files.mjs.map +1 -0
  82. package/resources/devices/index.d.mts +7 -2
  83. package/resources/devices/index.d.mts.map +1 -1
  84. package/resources/devices/index.d.ts +7 -2
  85. package/resources/devices/index.d.ts.map +1 -1
  86. package/resources/devices/index.js +11 -1
  87. package/resources/devices/index.js.map +1 -1
  88. package/resources/devices/index.mjs +6 -1
  89. package/resources/devices/index.mjs.map +1 -1
  90. package/resources/devices/keyboard.d.mts +10 -2
  91. package/resources/devices/keyboard.d.mts.map +1 -1
  92. package/resources/devices/keyboard.d.ts +10 -2
  93. package/resources/devices/keyboard.d.ts.map +1 -1
  94. package/resources/devices/location.d.mts +42 -0
  95. package/resources/devices/location.d.mts.map +1 -0
  96. package/resources/devices/location.d.ts +42 -0
  97. package/resources/devices/location.d.ts.map +1 -0
  98. package/resources/devices/location.js +47 -0
  99. package/resources/devices/location.js.map +1 -0
  100. package/resources/devices/location.mjs +43 -0
  101. package/resources/devices/location.mjs.map +1 -0
  102. package/resources/devices/packages.d.mts +4 -0
  103. package/resources/devices/packages.d.mts.map +1 -1
  104. package/resources/devices/packages.d.ts +4 -0
  105. package/resources/devices/packages.d.ts.map +1 -1
  106. package/resources/devices/profile.d.mts +23 -0
  107. package/resources/devices/profile.d.mts.map +1 -0
  108. package/resources/devices/profile.d.ts +23 -0
  109. package/resources/devices/profile.d.ts.map +1 -0
  110. package/resources/devices/profile.js +30 -0
  111. package/resources/devices/profile.js.map +1 -0
  112. package/resources/devices/profile.mjs +26 -0
  113. package/resources/devices/profile.mjs.map +1 -0
  114. package/resources/devices/proxy.d.mts +61 -0
  115. package/resources/devices/proxy.d.mts.map +1 -0
  116. package/resources/devices/proxy.d.ts +61 -0
  117. package/resources/devices/proxy.d.ts.map +1 -0
  118. package/resources/devices/proxy.js +48 -0
  119. package/resources/devices/proxy.js.map +1 -0
  120. package/resources/devices/proxy.mjs +44 -0
  121. package/resources/devices/proxy.mjs.map +1 -0
  122. package/resources/devices/state.d.mts +8 -19
  123. package/resources/devices/state.d.mts.map +1 -1
  124. package/resources/devices/state.d.ts +8 -19
  125. package/resources/devices/state.d.ts.map +1 -1
  126. package/resources/devices/state.js +0 -17
  127. package/resources/devices/state.js.map +1 -1
  128. package/resources/devices/state.mjs +0 -17
  129. package/resources/devices/state.mjs.map +1 -1
  130. package/resources/devices/tasks.d.mts +2 -9
  131. package/resources/devices/tasks.d.mts.map +1 -1
  132. package/resources/devices/tasks.d.ts +2 -9
  133. package/resources/devices/tasks.d.ts.map +1 -1
  134. package/resources/devices/tasks.js.map +1 -1
  135. package/resources/devices/tasks.mjs.map +1 -1
  136. package/resources/devices/time.d.mts +59 -0
  137. package/resources/devices/time.d.mts.map +1 -0
  138. package/resources/devices/time.d.ts +59 -0
  139. package/resources/devices/time.d.ts.map +1 -0
  140. package/resources/devices/time.js +83 -0
  141. package/resources/devices/time.js.map +1 -0
  142. package/resources/devices/time.mjs +79 -0
  143. package/resources/devices/time.mjs.map +1 -0
  144. package/resources/hooks.d.mts +5 -30
  145. package/resources/hooks.d.mts.map +1 -1
  146. package/resources/hooks.d.ts +5 -30
  147. package/resources/hooks.d.ts.map +1 -1
  148. package/resources/hooks.js +3 -0
  149. package/resources/hooks.js.map +1 -1
  150. package/resources/hooks.mjs +3 -0
  151. package/resources/hooks.mjs.map +1 -1
  152. package/resources/index.d.mts +6 -1
  153. package/resources/index.d.mts.map +1 -1
  154. package/resources/index.d.ts +6 -1
  155. package/resources/index.d.ts.map +1 -1
  156. package/resources/index.js +11 -1
  157. package/resources/index.js.map +1 -1
  158. package/resources/index.mjs +5 -0
  159. package/resources/index.mjs.map +1 -1
  160. package/resources/profiles.d.mts +84 -0
  161. package/resources/profiles.d.mts.map +1 -0
  162. package/resources/profiles.d.ts +84 -0
  163. package/resources/profiles.d.ts.map +1 -0
  164. package/resources/profiles.js +40 -0
  165. package/resources/profiles.js.map +1 -0
  166. package/resources/profiles.mjs +36 -0
  167. package/resources/profiles.mjs.map +1 -0
  168. package/resources/proxies.d.mts +72 -0
  169. package/resources/proxies.d.mts.map +1 -0
  170. package/resources/proxies.d.ts +72 -0
  171. package/resources/proxies.d.ts.map +1 -0
  172. package/resources/proxies.js +40 -0
  173. package/resources/proxies.js.map +1 -0
  174. package/resources/proxies.mjs +36 -0
  175. package/resources/proxies.mjs.map +1 -0
  176. package/resources/shared.d.mts +95 -0
  177. package/resources/shared.d.mts.map +1 -0
  178. package/resources/shared.d.ts +95 -0
  179. package/resources/shared.d.ts.map +1 -0
  180. package/resources/shared.js +4 -0
  181. package/resources/shared.js.map +1 -0
  182. package/resources/shared.mjs +3 -0
  183. package/resources/shared.mjs.map +1 -0
  184. package/resources/tasks/index.d.mts +1 -1
  185. package/resources/tasks/index.d.mts.map +1 -1
  186. package/resources/tasks/index.d.ts +1 -1
  187. package/resources/tasks/index.d.ts.map +1 -1
  188. package/resources/tasks/index.js.map +1 -1
  189. package/resources/tasks/index.mjs.map +1 -1
  190. package/resources/tasks/screenshots.d.mts +3 -0
  191. package/resources/tasks/screenshots.d.mts.map +1 -1
  192. package/resources/tasks/screenshots.d.ts +3 -0
  193. package/resources/tasks/screenshots.d.ts.map +1 -1
  194. package/resources/tasks/screenshots.js +3 -0
  195. package/resources/tasks/screenshots.js.map +1 -1
  196. package/resources/tasks/screenshots.mjs +3 -0
  197. package/resources/tasks/screenshots.mjs.map +1 -1
  198. package/resources/tasks/tasks.d.mts +105 -106
  199. package/resources/tasks/tasks.d.mts.map +1 -1
  200. package/resources/tasks/tasks.d.ts +105 -106
  201. package/resources/tasks/tasks.d.ts.map +1 -1
  202. package/resources/tasks/tasks.js +11 -5
  203. package/resources/tasks/tasks.js.map +1 -1
  204. package/resources/tasks/tasks.mjs +11 -5
  205. package/resources/tasks/tasks.mjs.map +1 -1
  206. package/resources/tasks/ui-states.d.mts +3 -0
  207. package/resources/tasks/ui-states.d.mts.map +1 -1
  208. package/resources/tasks/ui-states.d.ts +3 -0
  209. package/resources/tasks/ui-states.d.ts.map +1 -1
  210. package/resources/tasks/ui-states.js +3 -0
  211. package/resources/tasks/ui-states.js.map +1 -1
  212. package/resources/tasks/ui-states.mjs +3 -0
  213. package/resources/tasks/ui-states.mjs.map +1 -1
  214. package/src/client.ts +113 -10
  215. package/src/internal/utils/query.ts +7 -0
  216. package/src/internal/utils.ts +1 -0
  217. package/src/resources/agents.ts +43 -0
  218. package/src/resources/apps.ts +11 -19
  219. package/src/resources/carriers.ts +327 -0
  220. package/src/resources/credentials/credentials.ts +4 -19
  221. package/src/resources/devices/actions.ts +84 -0
  222. package/src/resources/devices/apps.ts +5 -0
  223. package/src/resources/devices/devices.ts +107 -61
  224. package/src/resources/devices/files.ts +221 -0
  225. package/src/resources/devices/index.ts +37 -3
  226. package/src/resources/devices/keyboard.ts +12 -2
  227. package/src/resources/devices/location.ts +91 -0
  228. package/src/resources/devices/packages.ts +5 -0
  229. package/src/resources/devices/profile.ts +45 -0
  230. package/src/resources/devices/proxy.ts +115 -0
  231. package/src/resources/devices/state.ts +10 -44
  232. package/src/resources/devices/tasks.ts +2 -15
  233. package/src/resources/devices/time.ts +147 -0
  234. package/src/resources/hooks.ts +5 -36
  235. package/src/resources/index.ts +37 -0
  236. package/src/resources/profiles.ts +133 -0
  237. package/src/resources/proxies.ts +130 -0
  238. package/src/resources/shared.ts +149 -0
  239. package/src/resources/tasks/index.ts +5 -0
  240. package/src/resources/tasks/screenshots.ts +3 -0
  241. package/src/resources/tasks/tasks.ts +134 -130
  242. package/src/resources/tasks/ui-states.ts +3 -0
  243. package/src/version.ts +1 -1
  244. package/version.d.mts +1 -1
  245. package/version.d.ts +1 -1
  246. package/version.js +1 -1
  247. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -11,13 +11,24 @@ import type { APIResponseProps } from './internal/parse';
11
11
  import { getPlatformHeaders } from './internal/detect-platform';
12
12
  import * as Shims from './internal/shims';
13
13
  import * as Opts from './internal/request-options';
14
- import * as qs from './internal/qs';
14
+ import { stringifyQuery } from './internal/utils/query';
15
15
  import { VERSION } from './version';
16
16
  import * as Errors from './core/error';
17
17
  import * as Uploads from './core/uploads';
18
18
  import * as API from './resources/index';
19
19
  import { APIPromise } from './core/api-promise';
20
+ import { AgentListResponse, Agents } from './resources/agents';
20
21
  import { AppListParams, AppListResponse, Apps } from './resources/apps';
22
+ import {
23
+ Carrier,
24
+ CarrierCreateParams,
25
+ CarrierDeleteResponse,
26
+ CarrierListParams,
27
+ CarrierListResponse,
28
+ CarrierLookupParams,
29
+ CarrierUpdateParams,
30
+ Carriers,
31
+ } from './resources/carriers';
21
32
  import {
22
33
  HookGetSampleDataResponse,
23
34
  HookListParams,
@@ -33,6 +44,26 @@ import {
33
44
  Hooks,
34
45
  } from './resources/hooks';
35
46
  import { ModelListResponse, Models } from './resources/models';
47
+ import {
48
+ Profile,
49
+ ProfileCreateParams,
50
+ ProfileDeleteResponse,
51
+ ProfileListParams,
52
+ ProfileListResponse,
53
+ ProfileUpdateParams,
54
+ Profiles,
55
+ } from './resources/profiles';
56
+ import {
57
+ Proxies,
58
+ ProxyConfig,
59
+ ProxyCreateParams,
60
+ ProxyCreateResponse,
61
+ ProxyDeleteResponse,
62
+ ProxyListResponse,
63
+ ProxyRetrieveResponse,
64
+ ProxyUpdateParams,
65
+ ProxyUpdateResponse,
66
+ } from './resources/proxies';
36
67
  import {
37
68
  CredentialListParams,
38
69
  CredentialListResponse,
@@ -48,6 +79,7 @@ import {
48
79
  Devices,
49
80
  } from './resources/devices/devices';
50
81
  import {
82
+ PackageCredentials,
51
83
  Task,
52
84
  TaskGetStatusResponse,
53
85
  TaskGetTrajectoryResponse,
@@ -57,9 +89,13 @@ import {
57
89
  TaskRunParams,
58
90
  TaskRunResponse,
59
91
  TaskRunStreamedParams,
92
+ TaskRunStreamedResponse,
93
+ TaskSendMessageParams,
94
+ TaskSendMessageResponse,
60
95
  TaskStatus,
61
96
  TaskStopResponse,
62
97
  Tasks,
98
+ UsageResult,
63
99
  } from './resources/tasks/tasks';
64
100
  import { type Fetch } from './internal/builtin-types';
65
101
  import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
@@ -260,8 +296,8 @@ export class Mobilerun {
260
296
  return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
261
297
  }
262
298
 
263
- protected stringifyQuery(query: Record<string, unknown>): string {
264
- return qs.stringify(query, { arrayFormat: 'comma' });
299
+ protected stringifyQuery(query: object | Record<string, unknown>): string {
300
+ return stringifyQuery(query);
265
301
  }
266
302
 
267
303
  private getUserAgent(): string {
@@ -293,12 +329,13 @@ export class Mobilerun {
293
329
  : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
294
330
 
295
331
  const defaultQuery = this.defaultQuery();
296
- if (!isEmptyObj(defaultQuery)) {
297
- query = { ...defaultQuery, ...query };
332
+ const pathQuery = Object.fromEntries(url.searchParams);
333
+ if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
334
+ query = { ...pathQuery, ...defaultQuery, ...query };
298
335
  }
299
336
 
300
337
  if (typeof query === 'object' && query && !Array.isArray(query)) {
301
- url.search = this.stringifyQuery(query as Record<string, unknown>);
338
+ url.search = this.stringifyQuery(query);
302
339
  }
303
340
 
304
341
  return url.toString();
@@ -603,9 +640,9 @@ export class Mobilerun {
603
640
  }
604
641
  }
605
642
 
606
- // If the API asks us to wait a certain amount of time (and it's a reasonable amount),
607
- // just do what it says, but otherwise calculate a default
608
- if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
643
+ // If the API asks us to wait a certain amount of time, just do what it
644
+ // says, but otherwise calculate a default
645
+ if (timeoutMillis === undefined) {
609
646
  const maxRetries = options.maxRetries ?? this.maxRetries;
610
647
  timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
611
648
  }
@@ -737,7 +774,7 @@ export class Mobilerun {
737
774
  ) {
738
775
  return {
739
776
  bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
740
- body: this.stringifyQuery(body as Record<string, unknown>),
777
+ body: this.stringifyQuery(body),
741
778
  };
742
779
  } else {
743
780
  return this.#encoder({ body, headers });
@@ -763,15 +800,32 @@ export class Mobilerun {
763
800
 
764
801
  static toFile = Uploads.toFile;
765
802
 
803
+ /**
804
+ * Tasks API
805
+ */
766
806
  tasks: API.Tasks = new API.Tasks(this);
807
+ /**
808
+ * Agents API
809
+ */
810
+ agents: API.Agents = new API.Agents(this);
811
+ proxies: API.Proxies = new API.Proxies(this);
812
+ carriers: API.Carriers = new API.Carriers(this);
813
+ profiles: API.Profiles = new API.Profiles(this);
767
814
  devices: API.Devices = new API.Devices(this);
768
815
  apps: API.Apps = new API.Apps(this);
769
816
  credentials: API.Credentials = new API.Credentials(this);
817
+ /**
818
+ * Webhooks API
819
+ */
770
820
  hooks: API.Hooks = new API.Hooks(this);
771
821
  models: API.Models = new API.Models(this);
772
822
  }
773
823
 
774
824
  Mobilerun.Tasks = Tasks;
825
+ Mobilerun.Agents = Agents;
826
+ Mobilerun.Proxies = Proxies;
827
+ Mobilerun.Carriers = Carriers;
828
+ Mobilerun.Profiles = Profiles;
775
829
  Mobilerun.Devices = Devices;
776
830
  Mobilerun.Apps = Apps;
777
831
  Mobilerun.Credentials = Credentials;
@@ -783,17 +837,57 @@ export declare namespace Mobilerun {
783
837
 
784
838
  export {
785
839
  Tasks as Tasks,
840
+ type PackageCredentials as PackageCredentials,
786
841
  type Task as Task,
787
842
  type TaskStatus as TaskStatus,
843
+ type UsageResult as UsageResult,
788
844
  type TaskRetrieveResponse as TaskRetrieveResponse,
789
845
  type TaskListResponse as TaskListResponse,
790
846
  type TaskGetStatusResponse as TaskGetStatusResponse,
791
847
  type TaskGetTrajectoryResponse as TaskGetTrajectoryResponse,
792
848
  type TaskRunResponse as TaskRunResponse,
849
+ type TaskRunStreamedResponse as TaskRunStreamedResponse,
850
+ type TaskSendMessageResponse as TaskSendMessageResponse,
793
851
  type TaskStopResponse as TaskStopResponse,
794
852
  type TaskListParams as TaskListParams,
795
853
  type TaskRunParams as TaskRunParams,
796
854
  type TaskRunStreamedParams as TaskRunStreamedParams,
855
+ type TaskSendMessageParams as TaskSendMessageParams,
856
+ };
857
+
858
+ export { Agents as Agents, type AgentListResponse as AgentListResponse };
859
+
860
+ export {
861
+ Proxies as Proxies,
862
+ type ProxyConfig as ProxyConfig,
863
+ type ProxyCreateResponse as ProxyCreateResponse,
864
+ type ProxyRetrieveResponse as ProxyRetrieveResponse,
865
+ type ProxyUpdateResponse as ProxyUpdateResponse,
866
+ type ProxyListResponse as ProxyListResponse,
867
+ type ProxyDeleteResponse as ProxyDeleteResponse,
868
+ type ProxyCreateParams as ProxyCreateParams,
869
+ type ProxyUpdateParams as ProxyUpdateParams,
870
+ };
871
+
872
+ export {
873
+ Carriers as Carriers,
874
+ type Carrier as Carrier,
875
+ type CarrierListResponse as CarrierListResponse,
876
+ type CarrierDeleteResponse as CarrierDeleteResponse,
877
+ type CarrierCreateParams as CarrierCreateParams,
878
+ type CarrierUpdateParams as CarrierUpdateParams,
879
+ type CarrierListParams as CarrierListParams,
880
+ type CarrierLookupParams as CarrierLookupParams,
881
+ };
882
+
883
+ export {
884
+ Profiles as Profiles,
885
+ type Profile as Profile,
886
+ type ProfileListResponse as ProfileListResponse,
887
+ type ProfileDeleteResponse as ProfileDeleteResponse,
888
+ type ProfileCreateParams as ProfileCreateParams,
889
+ type ProfileUpdateParams as ProfileUpdateParams,
890
+ type ProfileListParams as ProfileListParams,
797
891
  };
798
892
 
799
893
  export {
@@ -830,4 +924,13 @@ export declare namespace Mobilerun {
830
924
  };
831
925
 
832
926
  export { Models as Models, type ModelListResponse as ModelListResponse };
927
+
928
+ export type Config = API.Config;
929
+ export type DeviceCarrier = API.DeviceCarrier;
930
+ export type DeviceIdentifiers = API.DeviceIdentifiers;
931
+ export type DeviceSpec = API.DeviceSpec;
932
+ export type Meta = API.Meta;
933
+ export type Pagination = API.Pagination;
934
+ export type PaginationMeta = API.PaginationMeta;
935
+ export type PermissionSet = API.PermissionSet;
833
936
  }
@@ -0,0 +1,7 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import * as qs from '../qs/stringify';
4
+
5
+ export function stringifyQuery(query: object | Record<string, unknown>) {
6
+ return qs.stringify(query, { arrayFormat: 'comma' });
7
+ }
@@ -6,3 +6,4 @@ export * from './utils/env';
6
6
  export * from './utils/log';
7
7
  export * from './utils/uuid';
8
8
  export * from './utils/sleep';
9
+ export * from './utils/query';
@@ -0,0 +1,43 @@
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
+
7
+ /**
8
+ * Agents API
9
+ */
10
+ export class Agents extends APIResource {
11
+ /**
12
+ * List all available agents with their default configurations.
13
+ */
14
+ list(options?: RequestOptions): APIPromise<AgentListResponse> {
15
+ return this._client.get('/agents', options);
16
+ }
17
+ }
18
+
19
+ export type AgentListResponse = Array<AgentListResponse.AgentListResponseItem>;
20
+
21
+ export namespace AgentListResponse {
22
+ export interface AgentListResponseItem {
23
+ id: number;
24
+
25
+ description: string | null;
26
+
27
+ icon: string;
28
+
29
+ llmModel: string;
30
+
31
+ maxSteps: number;
32
+
33
+ name: string;
34
+
35
+ reasoning: boolean;
36
+
37
+ vision: boolean;
38
+ }
39
+ }
40
+
41
+ export declare namespace Agents {
42
+ export { type AgentListResponse as AgentListResponse };
43
+ }
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
+ import * as Shared from './shared';
4
5
  import { APIPromise } from '../core/api-promise';
5
6
  import { RequestOptions } from '../internal/request-options';
6
7
 
@@ -18,7 +19,7 @@ export interface AppListResponse {
18
19
 
19
20
  items: Array<AppListResponse.Item>;
20
21
 
21
- pagination: AppListResponse.Pagination;
22
+ pagination: Shared.Pagination;
22
23
  }
23
24
 
24
25
  export namespace AppListResponse {
@@ -291,8 +292,7 @@ export namespace AppListResponse {
291
292
  | 'YE'
292
293
  | 'ZM'
293
294
  | 'ZW'
294
- | 'AX'
295
- | null;
295
+ | 'AX';
296
296
 
297
297
  createdAt: string | null;
298
298
 
@@ -302,7 +302,7 @@ export namespace AppListResponse {
302
302
 
303
303
  displayName: string;
304
304
 
305
- externalIds: Array<string> | null;
305
+ expectedFiles: string | number | boolean | { [key: string]: unknown } | Array<unknown> | null;
306
306
 
307
307
  iconURL: string;
308
308
 
@@ -320,30 +320,22 @@ export namespace AppListResponse {
320
320
 
321
321
  source: 'uploaded' | 'store';
322
322
 
323
+ status: 'queued' | 'available' | 'failed';
324
+
325
+ stealthTier: 'tier1' | 'tier2' | 'tier3' | null;
326
+
323
327
  targetSdk: number | null;
324
328
 
329
+ type: 'android' | 'ios';
330
+
325
331
  updatedAt: string | null;
326
332
 
327
333
  userId: string | null;
328
334
 
329
- versionCode: number | null;
335
+ versionCode: number;
330
336
 
331
337
  versionName: string;
332
338
  }
333
-
334
- export interface Pagination {
335
- hasNext: boolean;
336
-
337
- hasPrev: boolean;
338
-
339
- page: number;
340
-
341
- pages: number;
342
-
343
- pageSize: number;
344
-
345
- total: number;
346
- }
347
339
  }
348
340
 
349
341
  export interface AppListParams {
@@ -0,0 +1,327 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as Shared from './shared';
5
+ import { APIPromise } from '../core/api-promise';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class Carriers extends APIResource {
10
+ /**
11
+ * Create a new carrier
12
+ */
13
+ create(body: CarrierCreateParams, options?: RequestOptions): APIPromise<Carrier> {
14
+ return this._client.post('/carriers', { body, ...options });
15
+ }
16
+
17
+ /**
18
+ * Get carrier by ID
19
+ */
20
+ retrieve(carrierID: number, options?: RequestOptions): APIPromise<Carrier> {
21
+ return this._client.get(path`/carriers/${carrierID}`, options);
22
+ }
23
+
24
+ /**
25
+ * Update a carrier
26
+ */
27
+ update(carrierID: number, body: CarrierUpdateParams, options?: RequestOptions): APIPromise<Carrier> {
28
+ return this._client.patch(path`/carriers/${carrierID}`, { body, ...options });
29
+ }
30
+
31
+ /**
32
+ * List carriers with pagination
33
+ */
34
+ list(
35
+ query: CarrierListParams | null | undefined = {},
36
+ options?: RequestOptions,
37
+ ): APIPromise<CarrierListResponse> {
38
+ return this._client.get('/carriers', { query, ...options });
39
+ }
40
+
41
+ /**
42
+ * Delete a carrier
43
+ */
44
+ delete(carrierID: number, options?: RequestOptions): APIPromise<CarrierDeleteResponse> {
45
+ return this._client.delete(path`/carriers/${carrierID}`, options);
46
+ }
47
+
48
+ /**
49
+ * Get carrier by MCC and MNC
50
+ */
51
+ lookup(query: CarrierLookupParams, options?: RequestOptions): APIPromise<Carrier> {
52
+ return this._client.get('/carriers/lookup', { query, ...options });
53
+ }
54
+ }
55
+
56
+ export interface Carrier {
57
+ id: number;
58
+
59
+ company: string;
60
+
61
+ country: string;
62
+
63
+ country_code: string;
64
+
65
+ country_iso: string;
66
+
67
+ created_at: string;
68
+
69
+ detail_url: string;
70
+
71
+ gsm_bands: string;
72
+
73
+ lte_bands: string;
74
+
75
+ mcc: string;
76
+
77
+ mnc: string;
78
+
79
+ mobile_prefix: string;
80
+
81
+ nsn_size: string;
82
+
83
+ number_format: string;
84
+
85
+ operator: string;
86
+
87
+ protocols: string;
88
+
89
+ umts_bands: string;
90
+
91
+ website: string;
92
+
93
+ /**
94
+ * A URL to the JSON Schema for this object.
95
+ */
96
+ $schema?: string;
97
+ }
98
+
99
+ export interface CarrierListResponse {
100
+ items: Array<Carrier> | null;
101
+
102
+ pagination: Shared.Meta;
103
+
104
+ /**
105
+ * A URL to the JSON Schema for this object.
106
+ */
107
+ $schema?: string;
108
+ }
109
+
110
+ export interface CarrierDeleteResponse {
111
+ message: string;
112
+
113
+ /**
114
+ * A URL to the JSON Schema for this object.
115
+ */
116
+ $schema?: string;
117
+ }
118
+
119
+ export interface CarrierCreateParams {
120
+ /**
121
+ * Country name
122
+ */
123
+ country: string;
124
+
125
+ /**
126
+ * Mobile Country Code
127
+ */
128
+ mcc: string;
129
+
130
+ /**
131
+ * Mobile Network Code
132
+ */
133
+ mnc: string;
134
+
135
+ /**
136
+ * Operator name
137
+ */
138
+ operator: string;
139
+
140
+ /**
141
+ * Company name
142
+ */
143
+ company?: string;
144
+
145
+ /**
146
+ * Country dialing code (e.g., +1)
147
+ */
148
+ country_code?: string;
149
+
150
+ /**
151
+ * ISO country code
152
+ */
153
+ country_iso?: string;
154
+
155
+ /**
156
+ * URL to carrier details page
157
+ */
158
+ detail_url?: string;
159
+
160
+ /**
161
+ * Supported GSM bands
162
+ */
163
+ gsm_bands?: string;
164
+
165
+ /**
166
+ * Supported LTE bands
167
+ */
168
+ lte_bands?: string;
169
+
170
+ /**
171
+ * Mobile number prefix
172
+ */
173
+ mobile_prefix?: string;
174
+
175
+ /**
176
+ * National Significant Number size
177
+ */
178
+ nsn_size?: string;
179
+
180
+ /**
181
+ * Phone number format
182
+ */
183
+ number_format?: string;
184
+
185
+ /**
186
+ * Supported protocols (comma-separated)
187
+ */
188
+ protocols?: string;
189
+
190
+ /**
191
+ * Supported UMTS bands
192
+ */
193
+ umts_bands?: string;
194
+
195
+ /**
196
+ * Company website
197
+ */
198
+ website?: string;
199
+ }
200
+
201
+ export interface CarrierUpdateParams {
202
+ /**
203
+ * Company name
204
+ */
205
+ company?: string;
206
+
207
+ /**
208
+ * Country name
209
+ */
210
+ country?: string;
211
+
212
+ /**
213
+ * Country dialing code
214
+ */
215
+ country_code?: string;
216
+
217
+ /**
218
+ * ISO country code
219
+ */
220
+ country_iso?: string;
221
+
222
+ /**
223
+ * URL to carrier details
224
+ */
225
+ detail_url?: string;
226
+
227
+ /**
228
+ * Supported GSM bands
229
+ */
230
+ gsm_bands?: string;
231
+
232
+ /**
233
+ * Supported LTE bands
234
+ */
235
+ lte_bands?: string;
236
+
237
+ /**
238
+ * Mobile number prefix
239
+ */
240
+ mobile_prefix?: string;
241
+
242
+ /**
243
+ * NSN size
244
+ */
245
+ nsn_size?: string;
246
+
247
+ /**
248
+ * Phone number format
249
+ */
250
+ number_format?: string;
251
+
252
+ /**
253
+ * Operator name
254
+ */
255
+ operator?: string;
256
+
257
+ /**
258
+ * Supported protocols
259
+ */
260
+ protocols?: string;
261
+
262
+ /**
263
+ * Supported UMTS bands
264
+ */
265
+ umts_bands?: string;
266
+
267
+ /**
268
+ * Company website
269
+ */
270
+ website?: string;
271
+ }
272
+
273
+ export interface CarrierListParams {
274
+ /**
275
+ * Filter by country name
276
+ */
277
+ country?: string;
278
+
279
+ /**
280
+ * Filter by country ISO code
281
+ */
282
+ countryISO?: string;
283
+
284
+ /**
285
+ * Field to order by
286
+ */
287
+ orderBy?: 'id' | 'mcc' | 'mnc' | 'operator' | 'country' | 'country_iso';
288
+
289
+ /**
290
+ * Order direction
291
+ */
292
+ orderDir?: 'asc' | 'desc';
293
+
294
+ /**
295
+ * Page number
296
+ */
297
+ page?: number;
298
+
299
+ /**
300
+ * Items per page
301
+ */
302
+ pageSize?: number;
303
+ }
304
+
305
+ export interface CarrierLookupParams {
306
+ /**
307
+ * Mobile Country Code
308
+ */
309
+ mcc: string;
310
+
311
+ /**
312
+ * Mobile Network Code
313
+ */
314
+ mnc: string;
315
+ }
316
+
317
+ export declare namespace Carriers {
318
+ export {
319
+ type Carrier as Carrier,
320
+ type CarrierListResponse as CarrierListResponse,
321
+ type CarrierDeleteResponse as CarrierDeleteResponse,
322
+ type CarrierCreateParams as CarrierCreateParams,
323
+ type CarrierUpdateParams as CarrierUpdateParams,
324
+ type CarrierListParams as CarrierListParams,
325
+ type CarrierLookupParams as CarrierLookupParams,
326
+ };
327
+ }