@limrun/api 0.76.0-rc.1 → 0.77.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 (107) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/client.d.mts +1 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +1 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +1 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -3
  9. package/client.mjs.map +1 -1
  10. package/exec-client.d.mts +2 -0
  11. package/exec-client.d.mts.map +1 -1
  12. package/exec-client.d.ts +2 -0
  13. package/exec-client.d.ts.map +1 -1
  14. package/exec-client.js.map +1 -1
  15. package/exec-client.mjs.map +1 -1
  16. package/folder-sync.d.mts.map +1 -1
  17. package/folder-sync.d.ts.map +1 -1
  18. package/folder-sync.js +91 -62
  19. package/folder-sync.js.map +1 -1
  20. package/folder-sync.mjs +91 -62
  21. package/folder-sync.mjs.map +1 -1
  22. package/index.d.mts +2 -0
  23. package/index.d.mts.map +1 -1
  24. package/index.d.ts +2 -0
  25. package/index.d.ts.map +1 -1
  26. package/index.js +7 -2
  27. package/index.js.map +1 -1
  28. package/index.mjs +2 -0
  29. package/index.mjs.map +1 -1
  30. package/ios-argent.d.mts +63 -0
  31. package/ios-argent.d.mts.map +1 -0
  32. package/ios-argent.d.ts +63 -0
  33. package/ios-argent.d.ts.map +1 -0
  34. package/ios-argent.js +690 -0
  35. package/ios-argent.js.map +1 -0
  36. package/ios-argent.mjs +683 -0
  37. package/ios-argent.mjs.map +1 -0
  38. package/ios-client.d.mts +57 -3
  39. package/ios-client.d.mts.map +1 -1
  40. package/ios-client.d.ts +57 -3
  41. package/ios-client.d.ts.map +1 -1
  42. package/ios-client.js +21 -0
  43. package/ios-client.js.map +1 -1
  44. package/ios-client.mjs +21 -0
  45. package/ios-client.mjs.map +1 -1
  46. package/package.json +11 -1
  47. package/resources/analytics.d.mts +2 -22
  48. package/resources/analytics.d.mts.map +1 -1
  49. package/resources/analytics.d.ts +2 -22
  50. package/resources/analytics.d.ts.map +1 -1
  51. package/resources/analytics.js.map +1 -1
  52. package/resources/analytics.mjs.map +1 -1
  53. package/resources/index.d.mts +1 -1
  54. package/resources/index.d.mts.map +1 -1
  55. package/resources/index.d.ts +1 -1
  56. package/resources/index.d.ts.map +1 -1
  57. package/resources/index.js +3 -3
  58. package/resources/index.js.map +1 -1
  59. package/resources/index.mjs +1 -1
  60. package/resources/index.mjs.map +1 -1
  61. package/resources/ios-instances.d.mts +5 -4
  62. package/resources/ios-instances.d.mts.map +1 -1
  63. package/resources/ios-instances.d.ts +5 -4
  64. package/resources/ios-instances.d.ts.map +1 -1
  65. package/resources/support-tickets.d.mts +21 -0
  66. package/resources/support-tickets.d.mts.map +1 -0
  67. package/resources/support-tickets.d.ts +21 -0
  68. package/resources/support-tickets.d.ts.map +1 -0
  69. package/resources/support-tickets.js +19 -0
  70. package/resources/support-tickets.js.map +1 -0
  71. package/resources/support-tickets.mjs +15 -0
  72. package/resources/support-tickets.mjs.map +1 -0
  73. package/resources/xcode-instances-helpers.d.mts +2 -0
  74. package/resources/xcode-instances-helpers.d.mts.map +1 -1
  75. package/resources/xcode-instances-helpers.d.ts +2 -0
  76. package/resources/xcode-instances-helpers.d.ts.map +1 -1
  77. package/resources/xcode-instances-helpers.js.map +1 -1
  78. package/resources/xcode-instances-helpers.mjs.map +1 -1
  79. package/src/client.ts +1 -19
  80. package/src/exec-client.ts +2 -0
  81. package/src/folder-sync.ts +95 -68
  82. package/src/index.ts +12 -0
  83. package/src/ios-argent.ts +789 -0
  84. package/src/ios-client.ts +119 -5
  85. package/src/resources/analytics.ts +2 -22
  86. package/src/resources/index.ts +1 -8
  87. package/src/resources/ios-instances.ts +13 -4
  88. package/src/resources/support-tickets.ts +36 -0
  89. package/src/resources/xcode-instances-helpers.ts +2 -0
  90. package/src/version.ts +1 -1
  91. package/version.d.mts +1 -1
  92. package/version.d.mts.map +1 -1
  93. package/version.d.ts +1 -1
  94. package/version.d.ts.map +1 -1
  95. package/version.js +1 -1
  96. package/version.js.map +1 -1
  97. package/version.mjs +1 -1
  98. package/version.mjs.map +1 -1
  99. package/resources/macos-instances.d.mts +0 -224
  100. package/resources/macos-instances.d.mts.map +0 -1
  101. package/resources/macos-instances.d.ts +0 -224
  102. package/resources/macos-instances.d.ts.map +0 -1
  103. package/resources/macos-instances.js +0 -51
  104. package/resources/macos-instances.js.map +0 -1
  105. package/resources/macos-instances.mjs +0 -47
  106. package/resources/macos-instances.mjs.map +0 -1
  107. package/src/resources/macos-instances.ts +0 -296
package/src/ios-client.ts CHANGED
@@ -675,7 +675,7 @@ export type PerformAction =
675
675
  }
676
676
  | { type: 'toggleKeyboard' }
677
677
  | { type: 'openUrl'; url: string }
678
- | { type: 'setOrientation'; orientation: 'Portrait' | 'Landscape' }
678
+ | { type: 'setOrientation'; orientation: DeviceOrientation }
679
679
  | { type: 'wait'; durationMs: number }
680
680
  | {
681
681
  type: 'touchDown';
@@ -713,7 +713,61 @@ export type PerformAction =
713
713
  | {
714
714
  type: 'buttonUp';
715
715
  button: 'home' | 'lock' | 'side' | 'applePay' | 'softwareKeyboard' | 'volumeUp' | 'volumeDown' | string;
716
- };
716
+ }
717
+ /**
718
+ * Press or release any HID usage by page and usage, such as page `0x0C`
719
+ * usage `0x6F` for Brightness Increment. Page `7` usages are keyboard keys.
720
+ * Simulators on Xcode before 27 accept only keyboard usages and the
721
+ * Consumer usages of the buttons above.
722
+ */
723
+ | { type: 'usageDown'; usagePage: number; usage: number }
724
+ | { type: 'usageUp'; usagePage: number; usage: number };
725
+
726
+ /**
727
+ * A device orientation. `deviceInfo` reports the same names in camelCase.
728
+ * `Landscape` is the older name of `LandscapeRight`.
729
+ */
730
+ export type DeviceOrientation =
731
+ | 'Portrait'
732
+ | 'PortraitUpsideDown'
733
+ | 'LandscapeLeft'
734
+ | 'LandscapeRight'
735
+ | 'Landscape';
736
+
737
+ /**
738
+ * A privacy service for {@link InstanceClient.setPermission}. Location goes
739
+ * through `simctl privacy` instead.
740
+ */
741
+ export type PrivacyService =
742
+ | 'calendar'
743
+ | 'camera'
744
+ | 'contacts'
745
+ | 'faceid'
746
+ | 'health'
747
+ | 'homekit'
748
+ | 'medialibrary'
749
+ | 'microphone'
750
+ | 'motion'
751
+ | 'notifications'
752
+ | 'photos'
753
+ | 'reminders'
754
+ | 'siri'
755
+ | 'speech'
756
+ | 'usertracking';
757
+
758
+ /**
759
+ * A privacy decision. `limited` applies only to `photos` and `critical`
760
+ * (critical alerts allowed too) only to `notifications`. `unset` removes the
761
+ * decision, so the app asks again.
762
+ */
763
+ export type PermissionStatus = 'granted' | 'denied' | 'limited' | 'critical' | 'unset';
764
+
765
+ /** System services {@link InstanceClient.restartServices} can restart. */
766
+ export type RestartableService =
767
+ | 'com.apple.SpringBoard'
768
+ | 'com.apple.locationd'
769
+ | 'com.apple.tccd'
770
+ | 'com.apple.akd';
717
771
 
718
772
  /**
719
773
  * Per-action result in a `performActions` batch. `type` identifies which
@@ -961,11 +1015,39 @@ export type InstanceClient = {
961
1015
  */
962
1016
  restoreKeychain: (options: { url: string }) => Promise<KeychainRestoreResult>;
963
1017
 
1018
+ /**
1019
+ * Wipe the simulator keychain. The CA certificates Limrun and you installed
1020
+ * are put back.
1021
+ */
1022
+ resetKeychain: () => Promise<void>;
1023
+
1024
+ /**
1025
+ * Set an app's privacy permission without a prompt. Setting `notifications`
1026
+ * restarts SpringBoard, which terminates every running app.
1027
+ */
1028
+ setPermission: (bundleId: string, service: PrivacyService, status: PermissionStatus) => Promise<void>;
1029
+
1030
+ /**
1031
+ * Read an app's privacy permission. `unset` means the app has not asked yet.
1032
+ * The `notifications` permission cannot be read.
1033
+ */
1034
+ getPermission: (
1035
+ bundleId: string,
1036
+ service: Exclude<PrivacyService, 'notifications'>,
1037
+ ) => Promise<PermissionStatus>;
1038
+
1039
+ /**
1040
+ * Restart system services, for example so system prompts pick up a new
1041
+ * language. Restarting SpringBoard terminates every running app; the call
1042
+ * returns once SpringBoard is back.
1043
+ */
1044
+ restartServices: (services: RestartableService[]) => Promise<void>;
1045
+
964
1046
  /**
965
1047
  * Set the device orientation
966
- * @param orientation The orientation to set ("Portrait" or "Landscape")
1048
+ * @param orientation The orientation to set
967
1049
  */
968
- setOrientation: (orientation: 'Portrait' | 'Landscape') => Promise<void>;
1050
+ setOrientation: (orientation: DeviceOrientation) => Promise<void>;
969
1051
  /** Returns null for a simulator without a hinge. */
970
1052
  getFoldState: () => Promise<FoldState | null>;
971
1053
  /** Capture an upright Duo display. A powered-off display returns its native black image. */
@@ -2333,6 +2415,10 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
2333
2415
  bundleId: msg.bundleId || '',
2334
2416
  }),
2335
2417
  keychainExportResult: () => undefined,
2418
+ resetKeychainResult: () => undefined,
2419
+ setPermissionResult: () => undefined,
2420
+ getPermissionResult: (msg) => (msg as unknown as { status: PermissionStatus }).status,
2421
+ restartServicesResult: () => undefined,
2336
2422
  keychainImportResult: (msg): KeychainRestoreResult => ({
2337
2423
  durationMs: msg.durationMs ?? 0,
2338
2424
  }),
@@ -2575,6 +2661,10 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
2575
2661
  installApp,
2576
2662
  saveKeychain,
2577
2663
  restoreKeychain,
2664
+ resetKeychain,
2665
+ setPermission,
2666
+ getPermission,
2667
+ restartServices,
2578
2668
  setOrientation,
2579
2669
  getFoldState,
2580
2670
  screenshotDisplay,
@@ -3032,10 +3122,34 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
3032
3122
  return sendRequest('setHingeAngle', { angleDegrees });
3033
3123
  };
3034
3124
 
3035
- const setOrientation = (orientation: 'Portrait' | 'Landscape'): Promise<void> => {
3125
+ const setOrientation = (orientation: DeviceOrientation): Promise<void> => {
3036
3126
  return sendRequest<void>('setOrientation', { orientation });
3037
3127
  };
3038
3128
 
3129
+ const resetKeychain = (): Promise<void> => {
3130
+ return sendRequest<void>('resetKeychain', {}, undefined, 120_000);
3131
+ };
3132
+
3133
+ const setPermission = (
3134
+ bundleId: string,
3135
+ service: PrivacyService,
3136
+ status: PermissionStatus,
3137
+ ): Promise<void> => {
3138
+ // A notifications change waits for SpringBoard to restart.
3139
+ return sendRequest<void>('setPermission', { bundleId, service, status }, undefined, 60_000);
3140
+ };
3141
+
3142
+ const getPermission = (
3143
+ bundleId: string,
3144
+ service: Exclude<PrivacyService, 'notifications'>,
3145
+ ): Promise<PermissionStatus> => {
3146
+ return sendRequest<PermissionStatus>('getPermission', { bundleId, service });
3147
+ };
3148
+
3149
+ const restartServices = (services: RestartableService[]): Promise<void> => {
3150
+ return sendRequest<void>('restartServices', { services }, undefined, 60_000);
3151
+ };
3152
+
3039
3153
  const scroll = (
3040
3154
  direction: 'up' | 'down' | 'left' | 'right',
3041
3155
  pixels: number,
@@ -86,7 +86,7 @@ export namespace AnalyticsInstancesResponse {
86
86
  /**
87
87
  * Platform name.
88
88
  */
89
- platform: 'android' | 'ios' | 'xcode' | 'gradle' | 'macos';
89
+ platform: 'android' | 'ios' | 'xcode' | 'gradle';
90
90
 
91
91
  /**
92
92
  * Actual runtime minutes before platform multiplier
@@ -225,11 +225,6 @@ export namespace AnalyticsResponse {
225
225
  */
226
226
  ios: { [key: string]: Series.Ios };
227
227
 
228
- /**
229
- * Map of region to analytics stats for macOS. Absent from servers that predate it.
230
- */
231
- macos?: { [key: string]: Series.Macos };
232
-
233
228
  /**
234
229
  * RFC3339 timestamp for the start of the bucket in the requested timezone,
235
230
  * including the local offset
@@ -336,11 +331,6 @@ export namespace AnalyticsResponse {
336
331
  wallclockMinutes?: number;
337
332
  }
338
333
 
339
- /**
340
- * Analytics for macOS instances in a region, the same shape as Gradle's.
341
- */
342
- export type Macos = Gradle;
343
-
344
334
  /**
345
335
  * Complete analytics for a specific region including billing breakdown
346
336
  */
@@ -627,7 +617,7 @@ export namespace AnalyticsResponse {
627
617
  /**
628
618
  * Platform name.
629
619
  */
630
- platform: 'android' | 'ios' | 'xcode' | 'gradle' | 'macos';
620
+ platform: 'android' | 'ios' | 'xcode' | 'gradle';
631
621
 
632
622
  /**
633
623
  * Actual runtime minutes before platform multiplier
@@ -742,11 +732,6 @@ export namespace AnalyticsResponse {
742
732
  */
743
733
  ios: { [key: string]: Summary.Ios };
744
734
 
745
- /**
746
- * Map of region to analytics stats for macOS. Absent from servers that predate it.
747
- */
748
- macos?: { [key: string]: Summary.Macos };
749
-
750
735
  /**
751
736
  * Map of region to analytics stats for Xcode
752
737
  */
@@ -842,11 +827,6 @@ export namespace AnalyticsResponse {
842
827
  wallclockMinutes?: number;
843
828
  }
844
829
 
845
- /**
846
- * Analytics for macOS instances in a region, the same shape as Gradle's.
847
- */
848
- export type Macos = Gradle;
849
-
850
830
  /**
851
831
  * Complete analytics for a specific region including billing breakdown
852
832
  */
@@ -11,6 +11,7 @@ export {
11
11
  type SnapshotListParams,
12
12
  } from './snapshots';
13
13
 
14
+ export { SupportTickets, type SupportTicket, type SupportTicketCreateParams } from './support-tickets';
14
15
  export {
15
16
  Analytics,
16
17
  type AnalyticsInstancesResponse,
@@ -44,14 +45,6 @@ export {
44
45
  type GradleInstanceListParams,
45
46
  type GradleInstancesItems,
46
47
  } from './gradle-instances';
47
- export {
48
- MacosInstances,
49
- type MacosInstance,
50
- type MacosInstanceUpdateParams,
51
- type MacosInstanceCreateParams,
52
- type MacosInstanceListParams,
53
- type MacosInstancesItems,
54
- } from './macos-instances';
55
48
  export {
56
49
  type IosInstance,
57
50
  type IosInstanceUpdateParams,
@@ -260,11 +260,20 @@ export namespace IosInstanceCreateParams {
260
260
 
261
261
  /**
262
262
  * The Apple Simulator model. iphone-se is an iPhone SE (3rd generation) and
263
- * iphone-17e an iPhone 17e, for testing smaller screens. iPhone Duo requires
263
+ * iphone-17e an iPhone 17e, for testing smaller screens. For large App Store
264
+ * screenshots, choose iphone-16-pro-max or ipad-pro-13. iPhone Duo requires
264
265
  * Xcode 27.1. See the OSVersion clue for the iOS versions each model runs.
265
266
  * Default is iphone.
266
267
  */
267
- model?: 'iphone' | 'iphone-se' | 'iphone-17e' | 'iphone-duo' | 'ipad' | 'watch';
268
+ model?:
269
+ | 'iphone'
270
+ | 'iphone-se'
271
+ | 'iphone-17e'
272
+ | 'iphone-16-pro-max'
273
+ | 'ipad-pro-13'
274
+ | 'iphone-duo'
275
+ | 'ipad'
276
+ | 'watch';
268
277
 
269
278
  /**
270
279
  * Where the instance will be created. If not given, the region is decided based on
@@ -318,8 +327,8 @@ export namespace IosInstanceCreateParams {
318
327
 
319
328
  /**
320
329
  * The major version of iOS, "26" or "27". iphone and ipad run both; iphone-se,
321
- * iphone-17e and iphone-duo run 27; watch runs 26. Default is 26, or 27 on the
322
- * models that run only 27.
330
+ * iphone-17e, iphone-duo, iphone-16-pro-max and ipad-pro-13 run 27; watch runs 26.
331
+ * Default is 26, or 27 on the models that run only 27.
323
332
  */
324
333
  osVersion?: string;
325
334
  }
@@ -0,0 +1,36 @@
1
+ import { APIPromise } from '../core/api-promise';
2
+ import { APIResource } from '../core/resource';
3
+ import { buildHeaders } from '../internal/headers';
4
+ import { RequestOptions } from '../internal/request-options';
5
+ import { path } from '../internal/utils/path';
6
+ import { uuid4 } from '../internal/utils/uuid';
7
+
8
+ export interface SupportTicketCreateParams {
9
+ kind: 'ticket' | 'feedback';
10
+ subject: string;
11
+ message: string;
12
+ }
13
+
14
+ export interface SupportTicket {
15
+ id: string;
16
+ organizationId: string;
17
+ kind: string;
18
+ status: string;
19
+ subject: string;
20
+ createdAt: string;
21
+ }
22
+
23
+ export class SupportTickets extends APIResource {
24
+ /** Opens a ticket. Pass the same idempotencyKey when retrying the same event. */
25
+ create(
26
+ organizationId: string,
27
+ body: SupportTicketCreateParams,
28
+ options?: RequestOptions,
29
+ ): APIPromise<SupportTicket> {
30
+ return this._client.post(path`/v1/organizations/${organizationId}/support_tickets`, {
31
+ ...options,
32
+ body,
33
+ headers: buildHeaders([{ 'Idempotency-Key': options?.idempotencyKey ?? uuid4() }, options?.headers]),
34
+ });
35
+ }
36
+ }
@@ -125,6 +125,8 @@ export type XcodeProjectConfig = {
125
125
  * discovery picks the wrong bundle.
126
126
  */
127
127
  artifactName?: string;
128
+ /** Recompile from a clean build folder for this invocation. */
129
+ clean?: boolean;
128
130
  /**
129
131
  * xcodebuild action. 'build' (default) produces one .app; with a simulator
130
132
  * attached it is installed there. 'build-for-testing' compiles the scheme's
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.76.0-rc.1'; // x-release-please-version
1
+ export const VERSION = '0.77.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.76.0-rc.1";
1
+ export declare const VERSION = "0.77.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"}
1
+ {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.76.0-rc.1";
1
+ export declare const VERSION = "0.77.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.76.0-rc.1'; // x-release-please-version
4
+ exports.VERSION = '0.77.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,aAAa,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.76.0-rc.1'; // x-release-please-version
1
+ export const VERSION = '0.77.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
package/version.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
@@ -1,224 +0,0 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { Items, type ItemsParams, PagePromise } from "../core/pagination.mjs";
4
- import { RequestOptions } from "../internal/request-options.mjs";
5
- /** A macOS virtual machine, streamed to the browser like a simulator. */
6
- export declare class MacosInstances extends APIResource {
7
- /**
8
- * Create a macOS instance
9
- */
10
- create(params: MacosInstanceCreateParams, options?: RequestOptions): APIPromise<MacosInstance>;
11
- /**
12
- * List macOS instances
13
- */
14
- list(query?: MacosInstanceListParams | null | undefined, options?: RequestOptions): PagePromise<MacosInstancesItems, MacosInstance>;
15
- /**
16
- * Delete macOS instance with given ID
17
- */
18
- delete(id: string, options?: RequestOptions): APIPromise<void>;
19
- /** Update a live instance's labels or role using the ETag returned by get().withResponse(). */
20
- update(id: string, params: MacosInstanceUpdateParams, options?: RequestOptions): APIPromise<void>;
21
- /**
22
- * Get macOS instance with given ID
23
- */
24
- get(id: string, options?: RequestOptions): APIPromise<MacosInstance>;
25
- }
26
- export type MacosInstancesItems = Items<MacosInstance>;
27
- export interface MacosInstance {
28
- metadata: MacosInstance.Metadata;
29
- spec: MacosInstance.Spec;
30
- status: MacosInstance.Status;
31
- }
32
- export declare namespace MacosInstance {
33
- interface Metadata {
34
- id: string;
35
- createdAt: string;
36
- organizationId: string;
37
- displayName?: string;
38
- labels?: {
39
- [key: string]: string;
40
- };
41
- /**
42
- * Immutable name that works like a folder path. Absent for an instance created
43
- * before names existed.
44
- */
45
- name?: string;
46
- /** Time of the controller's termination event. Physical cleanup may follow. */
47
- terminatedAt?: string;
48
- /**
49
- * Billing cutoff for a deletion requested while the region is unavailable.
50
- * Absent for normal regional deletions.
51
- */
52
- terminatingAt?: string;
53
- }
54
- interface Spec {
55
- inactivityTimeout: string;
56
- region: string;
57
- /** Maximum runtime regardless of activity. */
58
- hardTimeout?: string;
59
- /** Current effective permissions. Present on live GETs; historical records may omit it. */
60
- role?: {
61
- permissions: string[];
62
- };
63
- }
64
- interface Status {
65
- state: 'unknown' | 'creating' | 'assigned' | 'ready' | 'terminating' | 'terminated';
66
- apiUrl?: string;
67
- /** The screen-streaming WebSocket. Pass it to RemoteControl from @limrun/ui. */
68
- endpointWebSocketUrl?: string;
69
- errorMessage?: string;
70
- /**
71
- * A control token for this instance. Grants runtime access and reads, but cannot
72
- * create, update, or delete instance records.
73
- */
74
- token?: string;
75
- /**
76
- * A signed token that grants only streaming on this instance: it opens the
77
- * screen-streaming WebSocket and nothing else, so a browser can hold it while
78
- * `token` stays on your backend. Create, get and list return it to callers with
79
- * full control of the instance; get and list only while the instance runs.
80
- */
81
- streamToken?: string;
82
- /**
83
- * Machine-readable reason for instance termination. Present when state is
84
- * "terminating" or "terminated". New values may be added over time, so treat any
85
- * unrecognized value as "Unknown". Known values:
86
- *
87
- * - "UserRequested": terminated by a delete request to the API.
88
- * - "InactivityTimeout": the timeout given in spec.inactivityTimeout elapsed.
89
- * - "HardTimeout": the timeout given in spec.hardTimeout elapsed.
90
- * - "CapacityTimeout": no instance was free when it was created, and none freed
91
- * up before its wait for capacity ended.
92
- * - "Unknown": terminated for a cause the platform did not attribute, including
93
- * instances that failed to get ready during creation. See errorMessage for
94
- * details when available.
95
- */
96
- terminationReason?: string;
97
- }
98
- }
99
- export interface MacosInstanceUpdateParams {
100
- /** Quoted ETag from a live GET. A concurrent change returns HTTP 412. */
101
- ifMatch: string;
102
- /** Replaces all customer labels. Use {} to clear them. Omission preserves labels. */
103
- metadata?: {
104
- labels: {
105
- [key: string]: string;
106
- };
107
- };
108
- spec?: {
109
- role?: {
110
- /** Replaces the complete list. Use [] to remove delegated permissions. */
111
- permissions: string[];
112
- };
113
- };
114
- }
115
- export interface MacosInstanceCreateParams {
116
- /**
117
- * Query param: If there is another instance with given labels and region, return
118
- * that one instead of creating a new instance. Reusing it requires control
119
- * permission on that instance.
120
- */
121
- reuseIfExists?: boolean;
122
- /**
123
- * Query param: Return after the instance is ready to connect.
124
- */
125
- wait?: boolean;
126
- /**
127
- * Body param
128
- */
129
- metadata?: MacosInstanceCreateParams.Metadata;
130
- /**
131
- * Body param
132
- */
133
- spec?: MacosInstanceCreateParams.Spec;
134
- }
135
- export declare namespace MacosInstanceCreateParams {
136
- interface Metadata {
137
- displayName?: string;
138
- labels?: {
139
- [key: string]: string;
140
- };
141
- /**
142
- * Immutable name that works like a folder path, for example u/u123/preview. A
143
- * permission can target the name or a folder it lies in. Without one, the
144
- * instance is named after its ID inside the caller's default folder.
145
- */
146
- name?: string;
147
- }
148
- interface Spec {
149
- /**
150
- * ClientLocation takes precedence over ClientIP regardless of clue order. Without
151
- * either clue, routing uses Cloudflare visitor coordinates, then its client IP.
152
- */
153
- clues?: Array<Spec.Clue>;
154
- /**
155
- * Maximum runtime regardless of activity. Omit to use the organization's macOS
156
- * default. Set to "0" to disable the hard timeout.
157
- */
158
- hardTimeout?: string;
159
- /**
160
- * After how long without input or API calls the instance is terminated, counted
161
- * from when it becomes ready. Example values 1m, 10m, 3h. Omitting it, or passing
162
- * a non-positive duration, uses the organization's macOS default.
163
- */
164
- inactivityTimeout?: string;
165
- /**
166
- * Restricts scheduling to regions in the given jurisdiction. Unlike region, this
167
- * is a hard constraint: the request never overflows to a region outside the
168
- * jurisdiction and fails when no region in the jurisdiction has capacity.
169
- */
170
- jurisdiction?: 'us' | 'eu' | 'as';
171
- /**
172
- * @deprecated A region is only a preference, not a hard pin; use jurisdiction to
173
- * constrain where the instance runs.
174
- */
175
- region?: string;
176
- /** Inline instance role. Omit for the organization's compatibility default. */
177
- role?: {
178
- /** Asset permissions delegated by the creator. An empty array grants nothing. */
179
- permissions: Array<string>;
180
- };
181
- }
182
- namespace Spec {
183
- interface Clue {
184
- kind: 'ClientIP' | 'ClientLocation';
185
- clientIp?: string;
186
- /**
187
- * Required for ClientLocation. Both coordinates must be finite and within their
188
- * ranges. This location takes precedence over ClientIP.
189
- */
190
- clientLocation?: Clue.ClientLocation;
191
- }
192
- namespace Clue {
193
- interface ClientLocation {
194
- /**
195
- * Latitude in decimal degrees, from -90 to 90 inclusive. Zero is valid.
196
- */
197
- latitude: number;
198
- /**
199
- * Longitude in decimal degrees, from -180 to 180 inclusive. Zero is valid.
200
- */
201
- longitude: number;
202
- }
203
- }
204
- }
205
- }
206
- export interface MacosInstanceListParams extends ItemsParams {
207
- /**
208
- * Labels filter to apply to instances to return. Expects a comma-separated list of
209
- * key=value pairs (e.g., env=prod,region=us-west).
210
- */
211
- labelSelector?: string;
212
- /**
213
- * State filter to apply to macOS instances to return. Each comma-separated state
214
- * will be used as part of an OR clause, e.g. "assigned,ready" will return all
215
- * instances that are either assigned or ready.
216
- *
217
- * Valid states: creating, assigned, ready, terminating, terminated, unknown
218
- */
219
- state?: string;
220
- }
221
- export declare namespace MacosInstances {
222
- export { type MacosInstance as MacosInstance, type MacosInstancesItems as MacosInstancesItems, type MacosInstanceUpdateParams as MacosInstanceUpdateParams, type MacosInstanceCreateParams as MacosInstanceCreateParams, type MacosInstanceListParams as MacosInstanceListParams, };
223
- }
224
- //# sourceMappingURL=macos-instances.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"macos-instances.d.mts","sourceRoot":"","sources":["../src/resources/macos-instances.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,WAAW,EAAE,+BAA2B;AAE1E,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,yEAAyE;AACzE,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;IAK9F;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,uBAAuB,GAAG,IAAI,GAAG,SAAc,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mBAAmB,EAAE,aAAa,CAAC;IAIlD;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAO9D,+FAA+F;IAC/F,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IASjG;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;CAGrE;AAED,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AAEvD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,aAAa,CAAC,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