@limrun/api 0.75.0 → 0.76.0-rc.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 (44) hide show
  1. package/client.d.mts +3 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +3 -0
  4. package/client.d.ts.map +1 -1
  5. package/client.js +3 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +3 -0
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/analytics.d.mts +22 -2
  11. package/resources/analytics.d.mts.map +1 -1
  12. package/resources/analytics.d.ts +22 -2
  13. package/resources/analytics.d.ts.map +1 -1
  14. package/resources/analytics.js.map +1 -1
  15. package/resources/analytics.mjs.map +1 -1
  16. package/resources/index.d.mts +1 -0
  17. package/resources/index.d.mts.map +1 -1
  18. package/resources/index.d.ts +1 -0
  19. package/resources/index.d.ts.map +1 -1
  20. package/resources/index.js +3 -1
  21. package/resources/index.js.map +1 -1
  22. package/resources/index.mjs +1 -0
  23. package/resources/index.mjs.map +1 -1
  24. package/resources/macos-instances.d.mts +224 -0
  25. package/resources/macos-instances.d.mts.map +1 -0
  26. package/resources/macos-instances.d.ts +224 -0
  27. package/resources/macos-instances.d.ts.map +1 -0
  28. package/resources/macos-instances.js +51 -0
  29. package/resources/macos-instances.js.map +1 -0
  30. package/resources/macos-instances.mjs +47 -0
  31. package/resources/macos-instances.mjs.map +1 -0
  32. package/src/client.ts +19 -0
  33. package/src/resources/analytics.ts +22 -2
  34. package/src/resources/index.ts +8 -0
  35. package/src/resources/macos-instances.ts +296 -0
  36. package/src/version.ts +1 -1
  37. package/version.d.mts +1 -1
  38. package/version.d.mts.map +1 -1
  39. package/version.d.ts +1 -1
  40. package/version.d.ts.map +1 -1
  41. package/version.js +1 -1
  42. package/version.js.map +1 -1
  43. package/version.mjs +1 -1
  44. package/version.mjs.map +1 -1
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ // Hand-written following the Stainless resource pattern; a future generation
3
+ // from the OpenAPI spec reconciles with this file.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.MacosInstances = void 0;
6
+ const resource_1 = require("../core/resource.js");
7
+ const pagination_1 = require("../core/pagination.js");
8
+ const headers_1 = require("../internal/headers.js");
9
+ const path_1 = require("../internal/utils/path.js");
10
+ /** A macOS virtual machine, streamed to the browser like a simulator. */
11
+ class MacosInstances extends resource_1.APIResource {
12
+ /**
13
+ * Create a macOS instance
14
+ */
15
+ create(params, options) {
16
+ const { reuseIfExists, wait, ...body } = params;
17
+ return this._client.post('/v1/macos_instances', { query: { reuseIfExists, wait }, body, ...options });
18
+ }
19
+ /**
20
+ * List macOS instances
21
+ */
22
+ list(query = {}, options) {
23
+ return this._client.getAPIList('/v1/macos_instances', (pagination_1.Items), { query, ...options });
24
+ }
25
+ /**
26
+ * Delete macOS instance with given ID
27
+ */
28
+ delete(id, options) {
29
+ return this._client.delete((0, path_1.path) `/v1/macos_instances/${id}`, {
30
+ ...options,
31
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
32
+ });
33
+ }
34
+ /** Update a live instance's labels or role using the ETag returned by get().withResponse(). */
35
+ update(id, params, options) {
36
+ const { ifMatch, ...body } = params;
37
+ return this._client.patch((0, path_1.path) `/v1/macos_instances/${id}`, {
38
+ ...options,
39
+ body,
40
+ headers: (0, headers_1.buildHeaders)([options?.headers, { 'If-Match': ifMatch, Accept: '*/*' }]),
41
+ });
42
+ }
43
+ /**
44
+ * Get macOS instance with given ID
45
+ */
46
+ get(id, options) {
47
+ return this._client.get((0, path_1.path) `/v1/macos_instances/${id}`, options);
48
+ }
49
+ }
50
+ exports.MacosInstances = MacosInstances;
51
+ //# sourceMappingURL=macos-instances.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macos-instances.js","sourceRoot":"","sources":["../src/resources/macos-instances.ts"],"names":[],"mappings":";AAAA,6EAA6E;AAC7E,mDAAmD;;;AAEnD,kDAA+C;AAE/C,sDAA0E;AAC1E,oDAAmD;AAEnD,oDAA8C;AAE9C,yEAAyE;AACzE,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;OAEG;IACH,MAAM,CAAC,MAAiC,EAAE,OAAwB;QAChE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAA,kBAAoB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,uBAAuB,EAAE,EAAE,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED,+FAA+F;IAC/F,MAAM,CAAC,EAAU,EAAE,MAAiC,EAAE,OAAwB;QAC5E,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,uBAAuB,EAAE,EAAE,EAAE;YACzD,GAAG,OAAO;YACV,IAAI;YACJ,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;SAClF,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,EAAU,EAAE,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uBAAuB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AA7CD,wCA6CC"}
@@ -0,0 +1,47 @@
1
+ // Hand-written following the Stainless resource pattern; a future generation
2
+ // from the OpenAPI spec reconciles with this file.
3
+ import { APIResource } from "../core/resource.mjs";
4
+ import { Items } from "../core/pagination.mjs";
5
+ import { buildHeaders } from "../internal/headers.mjs";
6
+ import { path } from "../internal/utils/path.mjs";
7
+ /** A macOS virtual machine, streamed to the browser like a simulator. */
8
+ export class MacosInstances extends APIResource {
9
+ /**
10
+ * Create a macOS instance
11
+ */
12
+ create(params, options) {
13
+ const { reuseIfExists, wait, ...body } = params;
14
+ return this._client.post('/v1/macos_instances', { query: { reuseIfExists, wait }, body, ...options });
15
+ }
16
+ /**
17
+ * List macOS instances
18
+ */
19
+ list(query = {}, options) {
20
+ return this._client.getAPIList('/v1/macos_instances', (Items), { query, ...options });
21
+ }
22
+ /**
23
+ * Delete macOS instance with given ID
24
+ */
25
+ delete(id, options) {
26
+ return this._client.delete(path `/v1/macos_instances/${id}`, {
27
+ ...options,
28
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
29
+ });
30
+ }
31
+ /** Update a live instance's labels or role using the ETag returned by get().withResponse(). */
32
+ update(id, params, options) {
33
+ const { ifMatch, ...body } = params;
34
+ return this._client.patch(path `/v1/macos_instances/${id}`, {
35
+ ...options,
36
+ body,
37
+ headers: buildHeaders([options?.headers, { 'If-Match': ifMatch, Accept: '*/*' }]),
38
+ });
39
+ }
40
+ /**
41
+ * Get macOS instance with given ID
42
+ */
43
+ get(id, options) {
44
+ return this._client.get(path `/v1/macos_instances/${id}`, options);
45
+ }
46
+ }
47
+ //# sourceMappingURL=macos-instances.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macos-instances.mjs","sourceRoot":"","sources":["../src/resources/macos-instances.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,mDAAmD;AAEnD,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,KAAK,EAAiC,+BAA2B;AAC1E,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,yEAAyE;AACzE,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CAAC,MAAiC,EAAE,OAAwB;QAChE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAA,KAAoB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,uBAAuB,EAAE,EAAE,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED,+FAA+F;IAC/F,MAAM,CAAC,EAAU,EAAE,MAAiC,EAAE,OAAwB;QAC5E,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,uBAAuB,EAAE,EAAE,EAAE;YACzD,GAAG,OAAO;YACV,IAAI;YACJ,OAAO,EAAE,YAAY,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;SAClF,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,EAAU,EAAE,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -52,6 +52,14 @@ import {
52
52
  GradleInstances,
53
53
  GradleInstancesItems,
54
54
  } from './resources/gradle-instances';
55
+ import {
56
+ MacosInstance,
57
+ MacosInstanceUpdateParams,
58
+ MacosInstanceCreateParams,
59
+ MacosInstanceListParams,
60
+ MacosInstances,
61
+ MacosInstancesItems,
62
+ } from './resources/macos-instances';
55
63
  import {
56
64
  IosInstance,
57
65
  IosInstanceUpdateParams,
@@ -883,6 +891,7 @@ export class Limrun {
883
891
  iosSnapshots: API.IOSSnapshots = new API.IOSSnapshots(this);
884
892
  gradleSnapshots: API.GradleSnapshots = new API.GradleSnapshots(this);
885
893
  gradleInstances: API.GradleInstances = new API.GradleInstances(this);
894
+ macosInstances: API.MacosInstances = new API.MacosInstances(this);
886
895
  analytics: API.Analytics = new API.Analytics(this);
887
896
  accessTokens: API.AccessTokens = new API.AccessTokens(this);
888
897
  /** @deprecated Use accessTokens. */
@@ -894,6 +903,7 @@ Limrun.Assets = Assets;
894
903
  Limrun.IosInstances = IosInstances;
895
904
  Limrun.XcodeInstances = XcodeInstances;
896
905
  Limrun.GradleInstances = GradleInstances;
906
+ Limrun.MacosInstances = MacosInstances;
897
907
  Limrun.Analytics = Analytics;
898
908
  Limrun.AccessTokens = AccessTokens;
899
909
  Limrun.ScopedTokens = ScopedTokens;
@@ -970,6 +980,15 @@ export declare namespace Limrun {
970
980
  type GradleInstanceListParams as GradleInstanceListParams,
971
981
  };
972
982
 
983
+ export {
984
+ MacosInstances as MacosInstances,
985
+ type MacosInstance as MacosInstance,
986
+ type MacosInstancesItems as MacosInstancesItems,
987
+ type MacosInstanceUpdateParams as MacosInstanceUpdateParams,
988
+ type MacosInstanceCreateParams as MacosInstanceCreateParams,
989
+ type MacosInstanceListParams as MacosInstanceListParams,
990
+ };
991
+
973
992
  export {
974
993
  Analytics as Analytics,
975
994
  type AnalyticsInstancesResponse as AnalyticsInstancesResponse,
@@ -86,7 +86,7 @@ export namespace AnalyticsInstancesResponse {
86
86
  /**
87
87
  * Platform name.
88
88
  */
89
- platform: 'android' | 'ios' | 'xcode' | 'gradle';
89
+ platform: 'android' | 'ios' | 'xcode' | 'gradle' | 'macos';
90
90
 
91
91
  /**
92
92
  * Actual runtime minutes before platform multiplier
@@ -225,6 +225,11 @@ 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
+
228
233
  /**
229
234
  * RFC3339 timestamp for the start of the bucket in the requested timezone,
230
235
  * including the local offset
@@ -331,6 +336,11 @@ export namespace AnalyticsResponse {
331
336
  wallclockMinutes?: number;
332
337
  }
333
338
 
339
+ /**
340
+ * Analytics for macOS instances in a region, the same shape as Gradle's.
341
+ */
342
+ export type Macos = Gradle;
343
+
334
344
  /**
335
345
  * Complete analytics for a specific region including billing breakdown
336
346
  */
@@ -617,7 +627,7 @@ export namespace AnalyticsResponse {
617
627
  /**
618
628
  * Platform name.
619
629
  */
620
- platform: 'android' | 'ios' | 'xcode' | 'gradle';
630
+ platform: 'android' | 'ios' | 'xcode' | 'gradle' | 'macos';
621
631
 
622
632
  /**
623
633
  * Actual runtime minutes before platform multiplier
@@ -732,6 +742,11 @@ export namespace AnalyticsResponse {
732
742
  */
733
743
  ios: { [key: string]: Summary.Ios };
734
744
 
745
+ /**
746
+ * Map of region to analytics stats for macOS. Absent from servers that predate it.
747
+ */
748
+ macos?: { [key: string]: Summary.Macos };
749
+
735
750
  /**
736
751
  * Map of region to analytics stats for Xcode
737
752
  */
@@ -827,6 +842,11 @@ export namespace AnalyticsResponse {
827
842
  wallclockMinutes?: number;
828
843
  }
829
844
 
845
+ /**
846
+ * Analytics for macOS instances in a region, the same shape as Gradle's.
847
+ */
848
+ export type Macos = Gradle;
849
+
830
850
  /**
831
851
  * Complete analytics for a specific region including billing breakdown
832
852
  */
@@ -44,6 +44,14 @@ export {
44
44
  type GradleInstanceListParams,
45
45
  type GradleInstancesItems,
46
46
  } 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';
47
55
  export {
48
56
  type IosInstance,
49
57
  type IosInstanceUpdateParams,
@@ -0,0 +1,296 @@
1
+ // Hand-written following the Stainless resource pattern; a future generation
2
+ // from the OpenAPI spec reconciles with this file.
3
+
4
+ import { APIResource } from '../core/resource';
5
+ import { APIPromise } from '../core/api-promise';
6
+ import { Items, type ItemsParams, PagePromise } from '../core/pagination';
7
+ import { buildHeaders } from '../internal/headers';
8
+ import { RequestOptions } from '../internal/request-options';
9
+ import { path } from '../internal/utils/path';
10
+
11
+ /** A macOS virtual machine, streamed to the browser like a simulator. */
12
+ export class MacosInstances extends APIResource {
13
+ /**
14
+ * Create a macOS instance
15
+ */
16
+ create(params: MacosInstanceCreateParams, options?: RequestOptions): APIPromise<MacosInstance> {
17
+ const { reuseIfExists, wait, ...body } = params;
18
+ return this._client.post('/v1/macos_instances', { query: { reuseIfExists, wait }, body, ...options });
19
+ }
20
+
21
+ /**
22
+ * List macOS instances
23
+ */
24
+ list(
25
+ query: MacosInstanceListParams | null | undefined = {},
26
+ options?: RequestOptions,
27
+ ): PagePromise<MacosInstancesItems, MacosInstance> {
28
+ return this._client.getAPIList('/v1/macos_instances', Items<MacosInstance>, { query, ...options });
29
+ }
30
+
31
+ /**
32
+ * Delete macOS instance with given ID
33
+ */
34
+ delete(id: string, options?: RequestOptions): APIPromise<void> {
35
+ return this._client.delete(path`/v1/macos_instances/${id}`, {
36
+ ...options,
37
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
38
+ });
39
+ }
40
+
41
+ /** Update a live instance's labels or role using the ETag returned by get().withResponse(). */
42
+ update(id: string, params: MacosInstanceUpdateParams, options?: RequestOptions): APIPromise<void> {
43
+ const { ifMatch, ...body } = params;
44
+ return this._client.patch(path`/v1/macos_instances/${id}`, {
45
+ ...options,
46
+ body,
47
+ headers: buildHeaders([options?.headers, { 'If-Match': ifMatch, Accept: '*/*' }]),
48
+ });
49
+ }
50
+
51
+ /**
52
+ * Get macOS instance with given ID
53
+ */
54
+ get(id: string, options?: RequestOptions): APIPromise<MacosInstance> {
55
+ return this._client.get(path`/v1/macos_instances/${id}`, options);
56
+ }
57
+ }
58
+
59
+ export type MacosInstancesItems = Items<MacosInstance>;
60
+
61
+ export interface MacosInstance {
62
+ metadata: MacosInstance.Metadata;
63
+
64
+ spec: MacosInstance.Spec;
65
+
66
+ status: MacosInstance.Status;
67
+ }
68
+
69
+ export namespace MacosInstance {
70
+ export interface Metadata {
71
+ id: string;
72
+
73
+ createdAt: string;
74
+
75
+ organizationId: string;
76
+
77
+ displayName?: string;
78
+
79
+ labels?: { [key: string]: string };
80
+
81
+ /**
82
+ * Immutable name that works like a folder path. Absent for an instance created
83
+ * before names existed.
84
+ */
85
+ name?: string;
86
+
87
+ /** Time of the controller's termination event. Physical cleanup may follow. */
88
+ terminatedAt?: string;
89
+
90
+ /**
91
+ * Billing cutoff for a deletion requested while the region is unavailable.
92
+ * Absent for normal regional deletions.
93
+ */
94
+ terminatingAt?: string;
95
+ }
96
+
97
+ export interface Spec {
98
+ inactivityTimeout: string;
99
+
100
+ region: string;
101
+
102
+ /** Maximum runtime regardless of activity. */
103
+ hardTimeout?: string;
104
+
105
+ /** Current effective permissions. Present on live GETs; historical records may omit it. */
106
+ role?: { permissions: string[] };
107
+ }
108
+
109
+ export interface Status {
110
+ state: 'unknown' | 'creating' | 'assigned' | 'ready' | 'terminating' | 'terminated';
111
+
112
+ apiUrl?: string;
113
+
114
+ /** The screen-streaming WebSocket. Pass it to RemoteControl from @limrun/ui. */
115
+ endpointWebSocketUrl?: string;
116
+
117
+ errorMessage?: string;
118
+
119
+ /**
120
+ * A control token for this instance. Grants runtime access and reads, but cannot
121
+ * create, update, or delete instance records.
122
+ */
123
+ token?: string;
124
+
125
+ /**
126
+ * A signed token that grants only streaming on this instance: it opens the
127
+ * screen-streaming WebSocket and nothing else, so a browser can hold it while
128
+ * `token` stays on your backend. Create, get and list return it to callers with
129
+ * full control of the instance; get and list only while the instance runs.
130
+ */
131
+ streamToken?: string;
132
+
133
+ /**
134
+ * Machine-readable reason for instance termination. Present when state is
135
+ * "terminating" or "terminated". New values may be added over time, so treat any
136
+ * unrecognized value as "Unknown". Known values:
137
+ *
138
+ * - "UserRequested": terminated by a delete request to the API.
139
+ * - "InactivityTimeout": the timeout given in spec.inactivityTimeout elapsed.
140
+ * - "HardTimeout": the timeout given in spec.hardTimeout elapsed.
141
+ * - "CapacityTimeout": no instance was free when it was created, and none freed
142
+ * up before its wait for capacity ended.
143
+ * - "Unknown": terminated for a cause the platform did not attribute, including
144
+ * instances that failed to get ready during creation. See errorMessage for
145
+ * details when available.
146
+ */
147
+ terminationReason?: string;
148
+ }
149
+ }
150
+
151
+ export interface MacosInstanceUpdateParams {
152
+ /** Quoted ETag from a live GET. A concurrent change returns HTTP 412. */
153
+ ifMatch: string;
154
+ /** Replaces all customer labels. Use {} to clear them. Omission preserves labels. */
155
+ metadata?: { labels: { [key: string]: string } };
156
+ spec?: {
157
+ role?: {
158
+ /** Replaces the complete list. Use [] to remove delegated permissions. */
159
+ permissions: string[];
160
+ };
161
+ };
162
+ }
163
+
164
+ export interface MacosInstanceCreateParams {
165
+ /**
166
+ * Query param: If there is another instance with given labels and region, return
167
+ * that one instead of creating a new instance. Reusing it requires control
168
+ * permission on that instance.
169
+ */
170
+ reuseIfExists?: boolean;
171
+
172
+ /**
173
+ * Query param: Return after the instance is ready to connect.
174
+ */
175
+ wait?: boolean;
176
+
177
+ /**
178
+ * Body param
179
+ */
180
+ metadata?: MacosInstanceCreateParams.Metadata;
181
+
182
+ /**
183
+ * Body param
184
+ */
185
+ spec?: MacosInstanceCreateParams.Spec;
186
+ }
187
+
188
+ export namespace MacosInstanceCreateParams {
189
+ export interface Metadata {
190
+ displayName?: string;
191
+
192
+ labels?: { [key: string]: string };
193
+
194
+ /**
195
+ * Immutable name that works like a folder path, for example u/u123/preview. A
196
+ * permission can target the name or a folder it lies in. Without one, the
197
+ * instance is named after its ID inside the caller's default folder.
198
+ */
199
+ name?: string;
200
+ }
201
+
202
+ export interface Spec {
203
+ /**
204
+ * ClientLocation takes precedence over ClientIP regardless of clue order. Without
205
+ * either clue, routing uses Cloudflare visitor coordinates, then its client IP.
206
+ */
207
+ clues?: Array<Spec.Clue>;
208
+
209
+ /**
210
+ * Maximum runtime regardless of activity. Omit to use the organization's macOS
211
+ * default. Set to "0" to disable the hard timeout.
212
+ */
213
+ hardTimeout?: string;
214
+
215
+ /**
216
+ * After how long without input or API calls the instance is terminated, counted
217
+ * from when it becomes ready. Example values 1m, 10m, 3h. Omitting it, or passing
218
+ * a non-positive duration, uses the organization's macOS default.
219
+ */
220
+ inactivityTimeout?: string;
221
+
222
+ /**
223
+ * Restricts scheduling to regions in the given jurisdiction. Unlike region, this
224
+ * is a hard constraint: the request never overflows to a region outside the
225
+ * jurisdiction and fails when no region in the jurisdiction has capacity.
226
+ */
227
+ jurisdiction?: 'us' | 'eu' | 'as';
228
+
229
+ /**
230
+ * @deprecated A region is only a preference, not a hard pin; use jurisdiction to
231
+ * constrain where the instance runs.
232
+ */
233
+ region?: string;
234
+
235
+ /** Inline instance role. Omit for the organization's compatibility default. */
236
+ role?: {
237
+ /** Asset permissions delegated by the creator. An empty array grants nothing. */
238
+ permissions: Array<string>;
239
+ };
240
+ }
241
+
242
+ export namespace Spec {
243
+ export interface Clue {
244
+ kind: 'ClientIP' | 'ClientLocation';
245
+
246
+ clientIp?: string;
247
+
248
+ /**
249
+ * Required for ClientLocation. Both coordinates must be finite and within their
250
+ * ranges. This location takes precedence over ClientIP.
251
+ */
252
+ clientLocation?: Clue.ClientLocation;
253
+ }
254
+
255
+ export namespace Clue {
256
+ export interface ClientLocation {
257
+ /**
258
+ * Latitude in decimal degrees, from -90 to 90 inclusive. Zero is valid.
259
+ */
260
+ latitude: number;
261
+
262
+ /**
263
+ * Longitude in decimal degrees, from -180 to 180 inclusive. Zero is valid.
264
+ */
265
+ longitude: number;
266
+ }
267
+ }
268
+ }
269
+ }
270
+
271
+ export interface MacosInstanceListParams extends ItemsParams {
272
+ /**
273
+ * Labels filter to apply to instances to return. Expects a comma-separated list of
274
+ * key=value pairs (e.g., env=prod,region=us-west).
275
+ */
276
+ labelSelector?: string;
277
+
278
+ /**
279
+ * State filter to apply to macOS instances to return. Each comma-separated state
280
+ * will be used as part of an OR clause, e.g. "assigned,ready" will return all
281
+ * instances that are either assigned or ready.
282
+ *
283
+ * Valid states: creating, assigned, ready, terminating, terminated, unknown
284
+ */
285
+ state?: string;
286
+ }
287
+
288
+ export declare namespace MacosInstances {
289
+ export {
290
+ type MacosInstance as MacosInstance,
291
+ type MacosInstancesItems as MacosInstancesItems,
292
+ type MacosInstanceUpdateParams as MacosInstanceUpdateParams,
293
+ type MacosInstanceCreateParams as MacosInstanceCreateParams,
294
+ type MacosInstanceListParams as MacosInstanceListParams,
295
+ };
296
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.75.0'; // x-release-please-version
1
+ export const VERSION = '0.76.0-rc.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.75.0";
1
+ export declare const VERSION = "0.76.0-rc.1";
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,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"}
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.75.0";
1
+ export declare const VERSION = "0.76.0-rc.1";
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,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,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.75.0'; // x-release-please-version
4
+ exports.VERSION = '0.76.0-rc.1'; // 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,QAAQ,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,aAAa,CAAC,CAAC,2BAA2B"}
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.75.0'; // x-release-please-version
1
+ export const VERSION = '0.76.0-rc.1'; // 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,QAAQ,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,2BAA2B"}