@limrun/api 0.12.0 → 0.13.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.
- package/CHANGELOG.md +26 -0
- package/client.d.mts +10 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -4
- package/client.d.ts.map +1 -1
- package/client.js +8 -0
- package/client.js.map +1 -1
- package/client.mjs +8 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +55 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +55 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +115 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +109 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/android-instances-helpers.js +2 -2
- package/resources/android-instances-helpers.js.map +1 -1
- package/resources/android-instances-helpers.mjs +2 -2
- package/resources/android-instances-helpers.mjs.map +1 -1
- package/resources/android-instances.d.mts +18 -11
- package/resources/android-instances.d.mts.map +1 -1
- package/resources/android-instances.d.ts +18 -11
- package/resources/android-instances.d.ts.map +1 -1
- package/resources/android-instances.js +4 -3
- package/resources/android-instances.js.map +1 -1
- package/resources/android-instances.mjs +4 -3
- package/resources/android-instances.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/ios-instances.d.mts +18 -11
- package/resources/ios-instances.d.mts.map +1 -1
- package/resources/ios-instances.d.ts +18 -11
- package/resources/ios-instances.d.ts.map +1 -1
- package/resources/ios-instances.js +4 -3
- package/resources/ios-instances.js.map +1 -1
- package/resources/ios-instances.mjs +4 -3
- package/resources/ios-instances.mjs.map +1 -1
- package/src/client.ts +28 -4
- package/src/core/pagination.ts +167 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/android-instances-helpers.ts +2 -2
- package/src/resources/android-instances.ts +24 -16
- package/src/resources/index.ts +2 -2
- package/src/resources/ios-instances.ts +24 -16
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { Items, type ItemsParams, PagePromise } from '../core/pagination';
|
|
5
6
|
import { buildHeaders } from '../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../internal/request-options';
|
|
7
8
|
import { path } from '../internal/utils/path';
|
|
@@ -11,8 +12,8 @@ export class AndroidInstances extends APIResource {
|
|
|
11
12
|
* Create an Android instance
|
|
12
13
|
*/
|
|
13
14
|
create(params: AndroidInstanceCreateParams, options?: RequestOptions): APIPromise<AndroidInstance> {
|
|
14
|
-
const { wait, ...body } = params;
|
|
15
|
-
return this._client.post('/v1/android_instances', { query: { wait }, body, ...options });
|
|
15
|
+
const { reuseIfExists, wait, ...body } = params;
|
|
16
|
+
return this._client.post('/v1/android_instances', { query: { reuseIfExists, wait }, body, ...options });
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -21,8 +22,8 @@ export class AndroidInstances extends APIResource {
|
|
|
21
22
|
list(
|
|
22
23
|
query: AndroidInstanceListParams | null | undefined = {},
|
|
23
24
|
options?: RequestOptions,
|
|
24
|
-
):
|
|
25
|
-
return this._client.
|
|
25
|
+
): PagePromise<AndroidInstancesItems, AndroidInstance> {
|
|
26
|
+
return this._client.getAPIList('/v1/android_instances', Items<AndroidInstance>, { query, ...options });
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -43,6 +44,8 @@ export class AndroidInstances extends APIResource {
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
|
|
47
|
+
export type AndroidInstancesItems = Items<AndroidInstance>;
|
|
48
|
+
|
|
46
49
|
export interface AndroidInstance {
|
|
47
50
|
metadata: AndroidInstance.Metadata;
|
|
48
51
|
|
|
@@ -98,9 +101,13 @@ export namespace AndroidInstance {
|
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
|
|
101
|
-
export type AndroidInstanceListResponse = Array<AndroidInstance>;
|
|
102
|
-
|
|
103
104
|
export interface AndroidInstanceCreateParams {
|
|
105
|
+
/**
|
|
106
|
+
* Query param: If there is another instance with given labels and region, return
|
|
107
|
+
* that one instead of creating a new instance.
|
|
108
|
+
*/
|
|
109
|
+
reuseIfExists?: boolean;
|
|
110
|
+
|
|
104
111
|
/**
|
|
105
112
|
* Query param: Return after the instance is ready to connect.
|
|
106
113
|
*/
|
|
@@ -164,7 +171,9 @@ export namespace AndroidInstanceCreateParams {
|
|
|
164
171
|
export interface InitialAsset {
|
|
165
172
|
kind: 'App';
|
|
166
173
|
|
|
167
|
-
source: 'URL' | 'URLs' | 'AssetName' | 'AssetNames';
|
|
174
|
+
source: 'URL' | 'URLs' | 'AssetName' | 'AssetNames' | 'AssetIDs';
|
|
175
|
+
|
|
176
|
+
assetIds?: Array<string>;
|
|
168
177
|
|
|
169
178
|
assetName?: string;
|
|
170
179
|
|
|
@@ -177,33 +186,32 @@ export namespace AndroidInstanceCreateParams {
|
|
|
177
186
|
}
|
|
178
187
|
}
|
|
179
188
|
|
|
180
|
-
export interface AndroidInstanceListParams {
|
|
189
|
+
export interface AndroidInstanceListParams extends ItemsParams {
|
|
181
190
|
/**
|
|
182
191
|
* Labels filter to apply to Android instances to return. Expects a comma-separated
|
|
183
192
|
* list of key=value pairs (e.g., env=prod,region=us-west).
|
|
184
193
|
*/
|
|
185
194
|
labelSelector?: string;
|
|
186
195
|
|
|
187
|
-
/**
|
|
188
|
-
* Maximum number of instances to be returned. The default is 50.
|
|
189
|
-
*/
|
|
190
|
-
limit?: number;
|
|
191
|
-
|
|
192
196
|
/**
|
|
193
197
|
* Region where the instance is scheduled on.
|
|
194
198
|
*/
|
|
195
199
|
region?: string;
|
|
196
200
|
|
|
197
201
|
/**
|
|
198
|
-
* State filter to apply to Android instances to return.
|
|
202
|
+
* State filter to apply to Android instances to return. Each comma-separated state
|
|
203
|
+
* will be used as part of an OR clause, e.g. "assigned,ready" will return all
|
|
204
|
+
* instances that are either assigned or ready.
|
|
205
|
+
*
|
|
206
|
+
* Valid states: creating, assigned, ready, terminated, unknown
|
|
199
207
|
*/
|
|
200
|
-
state?:
|
|
208
|
+
state?: string;
|
|
201
209
|
}
|
|
202
210
|
|
|
203
211
|
export declare namespace AndroidInstances {
|
|
204
212
|
export {
|
|
205
213
|
type AndroidInstance as AndroidInstance,
|
|
206
|
-
type
|
|
214
|
+
type AndroidInstancesItems as AndroidInstancesItems,
|
|
207
215
|
type AndroidInstanceCreateParams as AndroidInstanceCreateParams,
|
|
208
216
|
type AndroidInstanceListParams as AndroidInstanceListParams,
|
|
209
217
|
};
|
package/src/resources/index.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
type AndroidInstance,
|
|
5
|
-
type AndroidInstanceListResponse,
|
|
6
5
|
type AndroidInstanceCreateParams,
|
|
7
6
|
type AndroidInstanceListParams,
|
|
7
|
+
type AndroidInstancesItems,
|
|
8
8
|
} from './android-instances';
|
|
9
9
|
export {
|
|
10
10
|
type Asset,
|
|
@@ -17,9 +17,9 @@ export {
|
|
|
17
17
|
export {
|
|
18
18
|
IosInstances,
|
|
19
19
|
type IosInstance,
|
|
20
|
-
type IosInstanceListResponse,
|
|
21
20
|
type IosInstanceCreateParams,
|
|
22
21
|
type IosInstanceListParams,
|
|
22
|
+
type IosInstancesItems,
|
|
23
23
|
} from './ios-instances';
|
|
24
24
|
|
|
25
25
|
export { AndroidInstances } from './android-instances-helpers';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { Items, type ItemsParams, PagePromise } from '../core/pagination';
|
|
5
6
|
import { buildHeaders } from '../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../internal/request-options';
|
|
7
8
|
import { path } from '../internal/utils/path';
|
|
@@ -11,8 +12,8 @@ export class IosInstances extends APIResource {
|
|
|
11
12
|
* Create an iOS instance
|
|
12
13
|
*/
|
|
13
14
|
create(params: IosInstanceCreateParams, options?: RequestOptions): APIPromise<IosInstance> {
|
|
14
|
-
const { wait, ...body } = params;
|
|
15
|
-
return this._client.post('/v1/ios_instances', { query: { wait }, body, ...options });
|
|
15
|
+
const { reuseIfExists, wait, ...body } = params;
|
|
16
|
+
return this._client.post('/v1/ios_instances', { query: { reuseIfExists, wait }, body, ...options });
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -21,8 +22,8 @@ export class IosInstances extends APIResource {
|
|
|
21
22
|
list(
|
|
22
23
|
query: IosInstanceListParams | null | undefined = {},
|
|
23
24
|
options?: RequestOptions,
|
|
24
|
-
):
|
|
25
|
-
return this._client.
|
|
25
|
+
): PagePromise<IosInstancesItems, IosInstance> {
|
|
26
|
+
return this._client.getAPIList('/v1/ios_instances', Items<IosInstance>, { query, ...options });
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -43,6 +44,8 @@ export class IosInstances extends APIResource {
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
|
|
47
|
+
export type IosInstancesItems = Items<IosInstance>;
|
|
48
|
+
|
|
46
49
|
export interface IosInstance {
|
|
47
50
|
metadata: IosInstance.Metadata;
|
|
48
51
|
|
|
@@ -98,9 +101,13 @@ export namespace IosInstance {
|
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
|
|
101
|
-
export type IosInstanceListResponse = Array<IosInstance>;
|
|
102
|
-
|
|
103
104
|
export interface IosInstanceCreateParams {
|
|
105
|
+
/**
|
|
106
|
+
* Query param: If there is another instance with given labels and region, return
|
|
107
|
+
* that one instead of creating a new instance.
|
|
108
|
+
*/
|
|
109
|
+
reuseIfExists?: boolean;
|
|
110
|
+
|
|
104
111
|
/**
|
|
105
112
|
* Query param: Return after the instance is ready to connect.
|
|
106
113
|
*/
|
|
@@ -159,7 +166,9 @@ export namespace IosInstanceCreateParams {
|
|
|
159
166
|
export interface InitialAsset {
|
|
160
167
|
kind: 'App';
|
|
161
168
|
|
|
162
|
-
source: 'URL' | 'AssetName';
|
|
169
|
+
source: 'URL' | 'AssetName' | 'AssetID';
|
|
170
|
+
|
|
171
|
+
assetId?: string;
|
|
163
172
|
|
|
164
173
|
assetName?: string;
|
|
165
174
|
|
|
@@ -174,33 +183,32 @@ export namespace IosInstanceCreateParams {
|
|
|
174
183
|
}
|
|
175
184
|
}
|
|
176
185
|
|
|
177
|
-
export interface IosInstanceListParams {
|
|
186
|
+
export interface IosInstanceListParams extends ItemsParams {
|
|
178
187
|
/**
|
|
179
188
|
* Labels filter to apply to instances to return. Expects a comma-separated list of
|
|
180
189
|
* key=value pairs (e.g., env=prod,region=us-west).
|
|
181
190
|
*/
|
|
182
191
|
labelSelector?: string;
|
|
183
192
|
|
|
184
|
-
/**
|
|
185
|
-
* Maximum number of items to be returned. The default is 50.
|
|
186
|
-
*/
|
|
187
|
-
limit?: number;
|
|
188
|
-
|
|
189
193
|
/**
|
|
190
194
|
* Region where the instance is scheduled on.
|
|
191
195
|
*/
|
|
192
196
|
region?: string;
|
|
193
197
|
|
|
194
198
|
/**
|
|
195
|
-
* State filter to apply to instances to return.
|
|
199
|
+
* State filter to apply to Android instances to return. Each comma-separated state
|
|
200
|
+
* will be used as part of an OR clause, e.g. "assigned,ready" will return all
|
|
201
|
+
* instances that are either assigned or ready.
|
|
202
|
+
*
|
|
203
|
+
* Valid states: creating, assigned, ready, terminated, unknown
|
|
196
204
|
*/
|
|
197
|
-
state?:
|
|
205
|
+
state?: string;
|
|
198
206
|
}
|
|
199
207
|
|
|
200
208
|
export declare namespace IosInstances {
|
|
201
209
|
export {
|
|
202
210
|
type IosInstance as IosInstance,
|
|
203
|
-
type
|
|
211
|
+
type IosInstancesItems as IosInstancesItems,
|
|
204
212
|
type IosInstanceCreateParams as IosInstanceCreateParams,
|
|
205
213
|
type IosInstanceListParams as IosInstanceListParams,
|
|
206
214
|
};
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.13.1'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.13.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.13.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.13.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|