@limrun/api 0.77.0 → 0.77.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 (42) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +26 -1
  3. package/client.d.mts +3 -0
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +3 -0
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -0
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/analytics.d.mts +22 -2
  13. package/resources/analytics.d.mts.map +1 -1
  14. package/resources/analytics.d.ts +22 -2
  15. package/resources/analytics.d.ts.map +1 -1
  16. package/resources/analytics.js.map +1 -1
  17. package/resources/analytics.mjs.map +1 -1
  18. package/resources/index.d.mts +1 -0
  19. package/resources/index.d.mts.map +1 -1
  20. package/resources/index.d.ts +1 -0
  21. package/resources/index.d.ts.map +1 -1
  22. package/resources/index.js +3 -1
  23. package/resources/index.js.map +1 -1
  24. package/resources/index.mjs +1 -0
  25. package/resources/index.mjs.map +1 -1
  26. package/resources/macos-instances.d.mts +224 -0
  27. package/resources/macos-instances.d.mts.map +1 -0
  28. package/resources/macos-instances.d.ts +224 -0
  29. package/resources/macos-instances.d.ts.map +1 -0
  30. package/resources/macos-instances.js +51 -0
  31. package/resources/macos-instances.js.map +1 -0
  32. package/resources/macos-instances.mjs +47 -0
  33. package/resources/macos-instances.mjs.map +1 -0
  34. package/src/client.ts +19 -0
  35. package/src/resources/analytics.ts +22 -2
  36. package/src/resources/index.ts +8 -0
  37. package/src/resources/macos-instances.ts +296 -0
  38. package/src/version.ts +1 -1
  39. package/version.d.mts +1 -1
  40. package/version.d.ts +1 -1
  41. package/version.js +1 -1
  42. package/version.mjs +1 -1
@@ -0,0 +1,224 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { Items, type ItemsParams, PagePromise } from "../core/pagination.js";
4
+ import { RequestOptions } from "../internal/request-options.js";
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.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macos-instances.d.ts","sourceRoot":"","sources":["../src/resources/macos-instances.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,WAAW,EAAE,8BAA2B;AAE1E,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,yEAAyE;AACzE,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,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BAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
@@ -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,
@@ -884,6 +892,7 @@ export class Limrun {
884
892
  gradleSnapshots: API.GradleSnapshots = new API.GradleSnapshots(this);
885
893
  gradleInstances: API.GradleInstances = new API.GradleInstances(this);
886
894
  supportTickets: API.SupportTickets = new API.SupportTickets(this);
895
+ macosInstances: API.MacosInstances = new API.MacosInstances(this);
887
896
  analytics: API.Analytics = new API.Analytics(this);
888
897
  accessTokens: API.AccessTokens = new API.AccessTokens(this);
889
898
  /** @deprecated Use accessTokens. */
@@ -895,6 +904,7 @@ Limrun.Assets = Assets;
895
904
  Limrun.IosInstances = IosInstances;
896
905
  Limrun.XcodeInstances = XcodeInstances;
897
906
  Limrun.GradleInstances = GradleInstances;
907
+ Limrun.MacosInstances = MacosInstances;
898
908
  Limrun.Analytics = Analytics;
899
909
  Limrun.AccessTokens = AccessTokens;
900
910
  Limrun.ScopedTokens = ScopedTokens;
@@ -971,6 +981,15 @@ export declare namespace Limrun {
971
981
  type GradleInstanceListParams as GradleInstanceListParams,
972
982
  };
973
983
 
984
+ export {
985
+ MacosInstances as MacosInstances,
986
+ type MacosInstance as MacosInstance,
987
+ type MacosInstancesItems as MacosInstancesItems,
988
+ type MacosInstanceUpdateParams as MacosInstanceUpdateParams,
989
+ type MacosInstanceCreateParams as MacosInstanceCreateParams,
990
+ type MacosInstanceListParams as MacosInstanceListParams,
991
+ };
992
+
974
993
  export {
975
994
  Analytics as Analytics,
976
995
  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
  */
@@ -45,6 +45,14 @@ export {
45
45
  type GradleInstanceListParams,
46
46
  type GradleInstancesItems,
47
47
  } from './gradle-instances';
48
+ export {
49
+ MacosInstances,
50
+ type MacosInstance,
51
+ type MacosInstanceUpdateParams,
52
+ type MacosInstanceCreateParams,
53
+ type MacosInstanceListParams,
54
+ type MacosInstancesItems,
55
+ } from './macos-instances';
48
56
  export {
49
57
  type IosInstance,
50
58
  type IosInstanceUpdateParams,