@mobilerun/sdk 1.0.0 → 2.1.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.
- package/CHANGELOG.md +142 -0
- package/LICENSE +1 -1
- package/README.md +9 -0
- package/client.d.mts +13 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +13 -9
- package/client.d.ts.map +1 -1
- package/client.js +23 -17
- package/client.js.map +1 -1
- package/client.mjs +24 -18
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/apps.d.mts +20 -7
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +20 -7
- package/resources/apps.d.ts.map +1 -1
- package/resources/credentials/credentials.d.mts +18 -3
- package/resources/credentials/credentials.d.mts.map +1 -1
- package/resources/credentials/credentials.d.ts +18 -3
- package/resources/credentials/credentials.d.ts.map +1 -1
- package/resources/credentials/credentials.js +2 -2
- package/resources/credentials/credentials.js.map +1 -1
- package/resources/credentials/credentials.mjs +2 -2
- package/resources/credentials/credentials.mjs.map +1 -1
- package/resources/credentials/index.d.mts +1 -1
- package/resources/credentials/index.d.mts.map +1 -1
- package/resources/credentials/index.d.ts +1 -1
- package/resources/credentials/index.d.ts.map +1 -1
- package/resources/credentials/index.js.map +1 -1
- package/resources/credentials/index.mjs.map +1 -1
- package/resources/credentials/packages/credentials/fields.d.mts +6 -6
- package/resources/credentials/packages/credentials/fields.d.ts +6 -6
- package/resources/devices/actions.d.mts +71 -0
- package/resources/devices/actions.d.mts.map +1 -0
- package/resources/devices/actions.d.ts +71 -0
- package/resources/devices/actions.d.ts.map +1 -0
- package/resources/devices/actions.js +68 -0
- package/resources/devices/actions.js.map +1 -0
- package/resources/devices/actions.mjs +64 -0
- package/resources/devices/actions.mjs.map +1 -0
- package/resources/devices/apps.d.mts +93 -0
- package/resources/devices/apps.d.mts.map +1 -0
- package/resources/devices/apps.d.ts +93 -0
- package/resources/devices/apps.d.ts.map +1 -0
- package/resources/devices/apps.js +105 -0
- package/resources/devices/apps.js.map +1 -0
- package/resources/devices/apps.mjs +101 -0
- package/resources/devices/apps.mjs.map +1 -0
- package/resources/devices/devices.d.mts +154 -0
- package/resources/devices/devices.d.mts.map +1 -0
- package/resources/devices/devices.d.ts +154 -0
- package/resources/devices/devices.d.ts.map +1 -0
- package/resources/devices/devices.js +80 -0
- package/resources/devices/devices.js.map +1 -0
- package/resources/devices/devices.mjs +75 -0
- package/resources/devices/devices.mjs.map +1 -0
- package/resources/devices/index.d.mts +8 -0
- package/resources/devices/index.d.mts.map +1 -0
- package/resources/devices/index.d.ts +8 -0
- package/resources/devices/index.d.ts.map +1 -0
- package/resources/devices/index.js +19 -0
- package/resources/devices/index.js.map +1 -0
- package/resources/devices/index.mjs +9 -0
- package/resources/devices/index.mjs.map +1 -0
- package/resources/devices/keyboard.d.mts +48 -0
- package/resources/devices/keyboard.d.mts.map +1 -0
- package/resources/devices/keyboard.d.ts +48 -0
- package/resources/devices/keyboard.d.ts.map +1 -0
- package/resources/devices/keyboard.js +67 -0
- package/resources/devices/keyboard.js.map +1 -0
- package/resources/devices/keyboard.mjs +63 -0
- package/resources/devices/keyboard.mjs.map +1 -0
- package/resources/devices/packages.d.mts +24 -0
- package/resources/devices/packages.d.mts.map +1 -0
- package/resources/devices/packages.d.ts +24 -0
- package/resources/devices/packages.d.ts.map +1 -0
- package/resources/devices/packages.js +29 -0
- package/resources/devices/packages.js.map +1 -0
- package/resources/devices/packages.mjs +25 -0
- package/resources/devices/packages.mjs.map +1 -0
- package/resources/devices/state.d.mts +99 -0
- package/resources/devices/state.d.mts.map +1 -0
- package/resources/devices/state.d.ts +99 -0
- package/resources/devices/state.d.ts.map +1 -0
- package/resources/devices/state.js +64 -0
- package/resources/devices/state.js.map +1 -0
- package/resources/devices/state.mjs +60 -0
- package/resources/devices/state.mjs.map +1 -0
- package/resources/devices/tasks.d.mts +42 -0
- package/resources/devices/tasks.d.mts.map +1 -0
- package/resources/devices/tasks.d.ts +42 -0
- package/resources/devices/tasks.d.ts.map +1 -0
- package/resources/devices/tasks.js +16 -0
- package/resources/devices/tasks.js.map +1 -0
- package/resources/devices/tasks.mjs +12 -0
- package/resources/devices/tasks.mjs.map +1 -0
- package/resources/devices.d.mts +2 -0
- package/resources/devices.d.mts.map +1 -0
- package/resources/devices.d.ts +2 -0
- package/resources/devices.d.ts.map +1 -0
- package/resources/devices.js +6 -0
- package/resources/devices.js.map +1 -0
- package/resources/devices.mjs +3 -0
- package/resources/devices.mjs.map +1 -0
- package/resources/hooks.d.mts +22 -3
- package/resources/hooks.d.mts.map +1 -1
- package/resources/hooks.d.ts +22 -3
- package/resources/hooks.d.ts.map +1 -1
- package/resources/hooks.js +11 -4
- package/resources/hooks.js.map +1 -1
- package/resources/hooks.mjs +11 -4
- package/resources/hooks.mjs.map +1 -1
- package/resources/index.d.mts +5 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/models.d.mts +28 -0
- package/resources/models.d.mts.map +1 -0
- package/resources/models.d.ts +28 -0
- package/resources/models.d.ts.map +1 -0
- package/resources/models.js +15 -0
- package/resources/models.js.map +1 -0
- package/resources/models.mjs +11 -0
- package/resources/models.mjs.map +1 -0
- package/resources/tasks/index.d.mts +1 -1
- package/resources/tasks/index.d.mts.map +1 -1
- package/resources/tasks/index.d.ts +1 -1
- package/resources/tasks/index.d.ts.map +1 -1
- package/resources/tasks/index.js.map +1 -1
- package/resources/tasks/index.mjs.map +1 -1
- package/resources/tasks/screenshots.d.mts +2 -2
- package/resources/tasks/screenshots.d.ts +2 -2
- package/resources/tasks/screenshots.js +2 -2
- package/resources/tasks/screenshots.mjs +2 -2
- package/resources/tasks/tasks.d.mts +158 -424
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +158 -424
- package/resources/tasks/tasks.d.ts.map +1 -1
- package/resources/tasks/tasks.js +12 -10
- package/resources/tasks/tasks.js.map +1 -1
- package/resources/tasks/tasks.mjs +12 -10
- package/resources/tasks/tasks.mjs.map +1 -1
- package/resources/tasks/ui-states.d.mts +2 -2
- package/resources/tasks/ui-states.d.ts +2 -2
- package/resources/tasks/ui-states.js +2 -2
- package/resources/tasks/ui-states.mjs +2 -2
- package/src/client.ts +60 -26
- package/src/internal/parse.ts +6 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/resources/apps.ts +31 -9
- package/src/resources/credentials/credentials.ts +34 -4
- package/src/resources/credentials/index.ts +1 -1
- package/src/resources/credentials/packages/credentials/fields.ts +6 -6
- package/src/resources/devices/actions.ts +138 -0
- package/src/resources/devices/apps.ts +204 -0
- package/src/resources/devices/devices.ts +303 -0
- package/src/resources/devices/index.ts +38 -0
- package/src/resources/devices/keyboard.ts +113 -0
- package/src/resources/devices/packages.ts +50 -0
- package/src/resources/devices/state.ts +201 -0
- package/src/resources/devices/tasks.ts +68 -0
- package/src/resources/devices.ts +3 -0
- package/src/resources/hooks.ts +36 -4
- package/src/resources/index.ts +17 -3
- package/src/resources/models.ts +39 -0
- package/src/resources/tasks/index.ts +0 -2
- package/src/resources/tasks/screenshots.ts +2 -2
- package/src/resources/tasks/tasks.ts +176 -554
- package/src/resources/tasks/ui-states.ts +2 -2
- 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
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class Packages extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List packages
|
|
7
|
+
*/
|
|
8
|
+
list(deviceID: string, params?: PackageListParams | null | undefined, options?: RequestOptions): APIPromise<PackageListResponse | null>;
|
|
9
|
+
}
|
|
10
|
+
export type PackageListResponse = Array<string>;
|
|
11
|
+
export interface PackageListParams {
|
|
12
|
+
/**
|
|
13
|
+
* Query param
|
|
14
|
+
*/
|
|
15
|
+
includeSystemPackages?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Header param
|
|
18
|
+
*/
|
|
19
|
+
'X-Device-Display-ID'?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace Packages {
|
|
22
|
+
export { type PackageListResponse as PackageListResponse, type PackageListParams as PackageListParams };
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=packages.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packages.d.mts","sourceRoot":"","sources":["../../src/resources/devices/packages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,GAAG,IAAI,CAAC;CAe1C;AAED,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class Packages extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List packages
|
|
7
|
+
*/
|
|
8
|
+
list(deviceID: string, params?: PackageListParams | null | undefined, options?: RequestOptions): APIPromise<PackageListResponse | null>;
|
|
9
|
+
}
|
|
10
|
+
export type PackageListResponse = Array<string>;
|
|
11
|
+
export interface PackageListParams {
|
|
12
|
+
/**
|
|
13
|
+
* Query param
|
|
14
|
+
*/
|
|
15
|
+
includeSystemPackages?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Header param
|
|
18
|
+
*/
|
|
19
|
+
'X-Device-Display-ID'?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace Packages {
|
|
22
|
+
export { type PackageListResponse as PackageListResponse, type PackageListParams as PackageListParams };
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=packages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packages.d.ts","sourceRoot":"","sources":["../../src/resources/devices/packages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,GAAG,IAAI,CAAC;CAe1C;AAED,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Packages = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
class Packages extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List packages
|
|
11
|
+
*/
|
|
12
|
+
list(deviceID, params = {}, options) {
|
|
13
|
+
const { 'X-Device-Display-ID': xDeviceDisplayID, ...query } = params ?? {};
|
|
14
|
+
return this._client.get((0, path_1.path) `/devices/${deviceID}/packages`, {
|
|
15
|
+
query,
|
|
16
|
+
...options,
|
|
17
|
+
headers: (0, headers_1.buildHeaders)([
|
|
18
|
+
{
|
|
19
|
+
...(xDeviceDisplayID?.toString() != null ?
|
|
20
|
+
{ 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
|
|
21
|
+
: undefined),
|
|
22
|
+
},
|
|
23
|
+
options?.headers,
|
|
24
|
+
]),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Packages = Packages;
|
|
29
|
+
//# sourceMappingURL=packages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packages.js","sourceRoot":"","sources":["../../src/resources/devices/packages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;OAEG;IACH,IAAI,CACF,QAAgB,EAChB,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,WAAW,EAAE;YAC3D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBACxC,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;wBACzD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAvBD,4BAuBC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
export class Packages extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List packages
|
|
8
|
+
*/
|
|
9
|
+
list(deviceID, params = {}, options) {
|
|
10
|
+
const { 'X-Device-Display-ID': xDeviceDisplayID, ...query } = params ?? {};
|
|
11
|
+
return this._client.get(path `/devices/${deviceID}/packages`, {
|
|
12
|
+
query,
|
|
13
|
+
...options,
|
|
14
|
+
headers: buildHeaders([
|
|
15
|
+
{
|
|
16
|
+
...(xDeviceDisplayID?.toString() != null ?
|
|
17
|
+
{ 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
|
|
18
|
+
: undefined),
|
|
19
|
+
},
|
|
20
|
+
options?.headers,
|
|
21
|
+
]),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=packages.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packages.mjs","sourceRoot":"","sources":["../../src/resources/devices/packages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,IAAI,CACF,QAAgB,EAChB,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,WAAW,EAAE;YAC3D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBACxC,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;wBACzD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class State extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Take screenshot
|
|
7
|
+
*/
|
|
8
|
+
screenshot(deviceID: string, params?: StateScreenshotParams | null | undefined, options?: RequestOptions): APIPromise<string>;
|
|
9
|
+
/**
|
|
10
|
+
* Device time
|
|
11
|
+
*/
|
|
12
|
+
time(deviceID: string, params?: StateTimeParams | null | undefined, options?: RequestOptions): APIPromise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* UI state
|
|
15
|
+
*/
|
|
16
|
+
ui(deviceID: string, params?: StateUiParams | null | undefined, options?: RequestOptions): APIPromise<StateUiResponse>;
|
|
17
|
+
}
|
|
18
|
+
export type StateScreenshotResponse = string;
|
|
19
|
+
export type StateTimeResponse = string;
|
|
20
|
+
export interface StateUiResponse {
|
|
21
|
+
a11y_tree: unknown;
|
|
22
|
+
device_context: StateUiResponse.DeviceContext;
|
|
23
|
+
phone_state: StateUiResponse.PhoneState;
|
|
24
|
+
/**
|
|
25
|
+
* A URL to the JSON Schema for this object.
|
|
26
|
+
*/
|
|
27
|
+
$schema?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace StateUiResponse {
|
|
30
|
+
interface DeviceContext {
|
|
31
|
+
display_metrics: DeviceContext.DisplayMetrics;
|
|
32
|
+
filtering_params: DeviceContext.FilteringParams;
|
|
33
|
+
screen_bounds: DeviceContext.ScreenBounds;
|
|
34
|
+
screenSize: DeviceContext.ScreenSize;
|
|
35
|
+
}
|
|
36
|
+
namespace DeviceContext {
|
|
37
|
+
interface DisplayMetrics {
|
|
38
|
+
density: number;
|
|
39
|
+
densityDpi: number;
|
|
40
|
+
heightPixels: number;
|
|
41
|
+
scaledDensity: number;
|
|
42
|
+
widthPixels: number;
|
|
43
|
+
}
|
|
44
|
+
interface FilteringParams {
|
|
45
|
+
min_element_size: number;
|
|
46
|
+
overlay_offset: number;
|
|
47
|
+
}
|
|
48
|
+
interface ScreenBounds {
|
|
49
|
+
height: number;
|
|
50
|
+
width: number;
|
|
51
|
+
}
|
|
52
|
+
interface ScreenSize {
|
|
53
|
+
height: number;
|
|
54
|
+
width: number;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
interface PhoneState {
|
|
58
|
+
isEditable: boolean;
|
|
59
|
+
keyboardVisible: boolean;
|
|
60
|
+
activityName?: string;
|
|
61
|
+
currentApp?: string;
|
|
62
|
+
focusedElement?: PhoneState.FocusedElement;
|
|
63
|
+
packageName?: string;
|
|
64
|
+
}
|
|
65
|
+
namespace PhoneState {
|
|
66
|
+
interface FocusedElement {
|
|
67
|
+
className?: string;
|
|
68
|
+
resourceId?: string;
|
|
69
|
+
text?: string;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export interface StateScreenshotParams {
|
|
74
|
+
/**
|
|
75
|
+
* Query param
|
|
76
|
+
*/
|
|
77
|
+
hideOverlay?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Header param
|
|
80
|
+
*/
|
|
81
|
+
'X-Device-Display-ID'?: number;
|
|
82
|
+
}
|
|
83
|
+
export interface StateTimeParams {
|
|
84
|
+
'X-Device-Display-ID'?: number;
|
|
85
|
+
}
|
|
86
|
+
export interface StateUiParams {
|
|
87
|
+
/**
|
|
88
|
+
* Query param
|
|
89
|
+
*/
|
|
90
|
+
filter?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Header param
|
|
93
|
+
*/
|
|
94
|
+
'X-Device-Display-ID'?: number;
|
|
95
|
+
}
|
|
96
|
+
export declare namespace State {
|
|
97
|
+
export { type StateScreenshotResponse as StateScreenshotResponse, type StateTimeResponse as StateTimeResponse, type StateUiResponse as StateUiResponse, type StateScreenshotParams as StateScreenshotParams, type StateTimeParams as StateTimeParams, type StateUiParams as StateUiParams, };
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=state.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.mts","sourceRoot":"","sources":["../../src/resources/devices/state.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,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|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class State extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Take screenshot
|
|
7
|
+
*/
|
|
8
|
+
screenshot(deviceID: string, params?: StateScreenshotParams | null | undefined, options?: RequestOptions): APIPromise<string>;
|
|
9
|
+
/**
|
|
10
|
+
* Device time
|
|
11
|
+
*/
|
|
12
|
+
time(deviceID: string, params?: StateTimeParams | null | undefined, options?: RequestOptions): APIPromise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* UI state
|
|
15
|
+
*/
|
|
16
|
+
ui(deviceID: string, params?: StateUiParams | null | undefined, options?: RequestOptions): APIPromise<StateUiResponse>;
|
|
17
|
+
}
|
|
18
|
+
export type StateScreenshotResponse = string;
|
|
19
|
+
export type StateTimeResponse = string;
|
|
20
|
+
export interface StateUiResponse {
|
|
21
|
+
a11y_tree: unknown;
|
|
22
|
+
device_context: StateUiResponse.DeviceContext;
|
|
23
|
+
phone_state: StateUiResponse.PhoneState;
|
|
24
|
+
/**
|
|
25
|
+
* A URL to the JSON Schema for this object.
|
|
26
|
+
*/
|
|
27
|
+
$schema?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace StateUiResponse {
|
|
30
|
+
interface DeviceContext {
|
|
31
|
+
display_metrics: DeviceContext.DisplayMetrics;
|
|
32
|
+
filtering_params: DeviceContext.FilteringParams;
|
|
33
|
+
screen_bounds: DeviceContext.ScreenBounds;
|
|
34
|
+
screenSize: DeviceContext.ScreenSize;
|
|
35
|
+
}
|
|
36
|
+
namespace DeviceContext {
|
|
37
|
+
interface DisplayMetrics {
|
|
38
|
+
density: number;
|
|
39
|
+
densityDpi: number;
|
|
40
|
+
heightPixels: number;
|
|
41
|
+
scaledDensity: number;
|
|
42
|
+
widthPixels: number;
|
|
43
|
+
}
|
|
44
|
+
interface FilteringParams {
|
|
45
|
+
min_element_size: number;
|
|
46
|
+
overlay_offset: number;
|
|
47
|
+
}
|
|
48
|
+
interface ScreenBounds {
|
|
49
|
+
height: number;
|
|
50
|
+
width: number;
|
|
51
|
+
}
|
|
52
|
+
interface ScreenSize {
|
|
53
|
+
height: number;
|
|
54
|
+
width: number;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
interface PhoneState {
|
|
58
|
+
isEditable: boolean;
|
|
59
|
+
keyboardVisible: boolean;
|
|
60
|
+
activityName?: string;
|
|
61
|
+
currentApp?: string;
|
|
62
|
+
focusedElement?: PhoneState.FocusedElement;
|
|
63
|
+
packageName?: string;
|
|
64
|
+
}
|
|
65
|
+
namespace PhoneState {
|
|
66
|
+
interface FocusedElement {
|
|
67
|
+
className?: string;
|
|
68
|
+
resourceId?: string;
|
|
69
|
+
text?: string;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export interface StateScreenshotParams {
|
|
74
|
+
/**
|
|
75
|
+
* Query param
|
|
76
|
+
*/
|
|
77
|
+
hideOverlay?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Header param
|
|
80
|
+
*/
|
|
81
|
+
'X-Device-Display-ID'?: number;
|
|
82
|
+
}
|
|
83
|
+
export interface StateTimeParams {
|
|
84
|
+
'X-Device-Display-ID'?: number;
|
|
85
|
+
}
|
|
86
|
+
export interface StateUiParams {
|
|
87
|
+
/**
|
|
88
|
+
* Query param
|
|
89
|
+
*/
|
|
90
|
+
filter?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Header param
|
|
93
|
+
*/
|
|
94
|
+
'X-Device-Display-ID'?: number;
|
|
95
|
+
}
|
|
96
|
+
export declare namespace State {
|
|
97
|
+
export { type StateScreenshotResponse as StateScreenshotResponse, type StateTimeResponse as StateTimeResponse, type StateUiResponse as StateUiResponse, type StateScreenshotParams as StateScreenshotParams, type StateTimeParams as StateTimeParams, type StateUiParams as StateUiParams, };
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state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,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.State = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
class State extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Take screenshot
|
|
11
|
+
*/
|
|
12
|
+
screenshot(deviceID, params = {}, options) {
|
|
13
|
+
const { 'X-Device-Display-ID': xDeviceDisplayID, ...query } = params ?? {};
|
|
14
|
+
return this._client.get((0, path_1.path) `/devices/${deviceID}/screenshot`, {
|
|
15
|
+
query,
|
|
16
|
+
...options,
|
|
17
|
+
headers: (0, headers_1.buildHeaders)([
|
|
18
|
+
{
|
|
19
|
+
...(xDeviceDisplayID?.toString() != null ?
|
|
20
|
+
{ 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
|
|
21
|
+
: undefined),
|
|
22
|
+
},
|
|
23
|
+
options?.headers,
|
|
24
|
+
]),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Device time
|
|
29
|
+
*/
|
|
30
|
+
time(deviceID, params = {}, options) {
|
|
31
|
+
const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
|
|
32
|
+
return this._client.get((0, path_1.path) `/devices/${deviceID}/time`, {
|
|
33
|
+
...options,
|
|
34
|
+
headers: (0, headers_1.buildHeaders)([
|
|
35
|
+
{
|
|
36
|
+
...(xDeviceDisplayID?.toString() != null ?
|
|
37
|
+
{ 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
|
|
38
|
+
: undefined),
|
|
39
|
+
},
|
|
40
|
+
options?.headers,
|
|
41
|
+
]),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* UI state
|
|
46
|
+
*/
|
|
47
|
+
ui(deviceID, params = {}, options) {
|
|
48
|
+
const { 'X-Device-Display-ID': xDeviceDisplayID, ...query } = params ?? {};
|
|
49
|
+
return this._client.get((0, path_1.path) `/devices/${deviceID}/ui-state`, {
|
|
50
|
+
query,
|
|
51
|
+
...options,
|
|
52
|
+
headers: (0, headers_1.buildHeaders)([
|
|
53
|
+
{
|
|
54
|
+
...(xDeviceDisplayID?.toString() != null ?
|
|
55
|
+
{ 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
|
|
56
|
+
: undefined),
|
|
57
|
+
},
|
|
58
|
+
options?.headers,
|
|
59
|
+
]),
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.State = State;
|
|
64
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../src/resources/devices/state.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,UAAU,CACR,QAAgB,EAChB,SAAmD,EAAE,EACrD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,aAAa,EAAE;YAC7D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CA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S,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AApED,sBAoEC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
export class State extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Take screenshot
|
|
8
|
+
*/
|
|
9
|
+
screenshot(deviceID, params = {}, options) {
|
|
10
|
+
const { 'X-Device-Display-ID': xDeviceDisplayID, ...query } = params ?? {};
|
|
11
|
+
return this._client.get(path `/devices/${deviceID}/screenshot`, {
|
|
12
|
+
query,
|
|
13
|
+
...options,
|
|
14
|
+
headers: buildHeaders([
|
|
15
|
+
{
|
|
16
|
+
...(xDeviceDisplayID?.toString() != null ?
|
|
17
|
+
{ 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
|
|
18
|
+
: undefined),
|
|
19
|
+
},
|
|
20
|
+
options?.headers,
|
|
21
|
+
]),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Device time
|
|
26
|
+
*/
|
|
27
|
+
time(deviceID, params = {}, options) {
|
|
28
|
+
const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
|
|
29
|
+
return this._client.get(path `/devices/${deviceID}/time`, {
|
|
30
|
+
...options,
|
|
31
|
+
headers: buildHeaders([
|
|
32
|
+
{
|
|
33
|
+
...(xDeviceDisplayID?.toString() != null ?
|
|
34
|
+
{ 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
|
|
35
|
+
: undefined),
|
|
36
|
+
},
|
|
37
|
+
options?.headers,
|
|
38
|
+
]),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* UI state
|
|
43
|
+
*/
|
|
44
|
+
ui(deviceID, params = {}, options) {
|
|
45
|
+
const { 'X-Device-Display-ID': xDeviceDisplayID, ...query } = params ?? {};
|
|
46
|
+
return this._client.get(path `/devices/${deviceID}/ui-state`, {
|
|
47
|
+
query,
|
|
48
|
+
...options,
|
|
49
|
+
headers: buildHeaders([
|
|
50
|
+
{
|
|
51
|
+
...(xDeviceDisplayID?.toString() != null ?
|
|
52
|
+
{ 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
|
|
53
|
+
: undefined),
|
|
54
|
+
},
|
|
55
|
+
options?.headers,
|
|
56
|
+
]),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=state.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.mjs","sourceRoot":"","sources":["../../src/resources/devices/state.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,UAAU,CACR,QAAgB,EAChB,SAAmD,EAAE,EACrD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,aAAa,EAAE;YAC7D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBACxC,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;wBACzD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAgB,EAChB,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,OAAO,EAAE;YACvD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBACxC,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;wBACzD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,EAAE,CACA,QAAgB,EAChB,SAA2C,EAAE,EAC7C,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,WAAW,EAAE;YAC3D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBACxC,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;wBACzD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class Tasks extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List tasks for a device
|
|
7
|
+
*/
|
|
8
|
+
list(deviceID: string, query?: TaskListParams | null | undefined, options?: RequestOptions): APIPromise<TaskListResponse>;
|
|
9
|
+
}
|
|
10
|
+
export interface TaskListResponse {
|
|
11
|
+
items: Array<TaskListResponse.Item> | null;
|
|
12
|
+
pagination: TaskListResponse.Pagination;
|
|
13
|
+
/**
|
|
14
|
+
* A URL to the JSON Schema for this object.
|
|
15
|
+
*/
|
|
16
|
+
$schema?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace TaskListResponse {
|
|
19
|
+
interface Item {
|
|
20
|
+
createdAt: string;
|
|
21
|
+
taskId: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}
|
|
24
|
+
interface Pagination {
|
|
25
|
+
hasNext: boolean;
|
|
26
|
+
hasPrev: boolean;
|
|
27
|
+
page: number;
|
|
28
|
+
pages: number;
|
|
29
|
+
pageSize: number;
|
|
30
|
+
total: number;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export interface TaskListParams {
|
|
34
|
+
orderBy?: 'id' | 'createdAt' | 'updatedAt' | 'assignedAt';
|
|
35
|
+
orderByDirection?: 'asc' | 'desc';
|
|
36
|
+
page?: number;
|
|
37
|
+
pageSize?: number;
|
|
38
|
+
}
|
|
39
|
+
export declare namespace Tasks {
|
|
40
|
+
export { type TaskListResponse as TaskListResponse, type TaskListParams as TaskListParams };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=tasks.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.d.mts","sourceRoot":"","sources":["../../src/resources/devices/tasks.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;CAGhC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAE3C,UAAU,EAAE,gBAAgB,CAAC,UAAU,CAAC;IAExC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,IAAI;QACnB,SAAS,EAAE,MAAM,CAAC;QAElB,MAAM,EAAE,MAAM,CAAC;QAEf,SAAS,EAAE,MAAM,CAAC;KACnB;IAED,UAAiB,UAAU;QACzB,OAAO,EAAE,OAAO,CAAC;QAEjB,OAAO,EAAE,OAAO,CAAC;QAEjB,IAAI,EAAE,MAAM,CAAC;QAEb,KAAK,EAAE,MAAM,CAAC;QAEd,QAAQ,EAAE,MAAM,CAAC;QAEjB,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,CAAC;IAE1D,gBAAgB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAElC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,cAAc,IAAI,cAAc,EAAE,CAAC;CAC7F"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class Tasks extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List tasks for a device
|
|
7
|
+
*/
|
|
8
|
+
list(deviceID: string, query?: TaskListParams | null | undefined, options?: RequestOptions): APIPromise<TaskListResponse>;
|
|
9
|
+
}
|
|
10
|
+
export interface TaskListResponse {
|
|
11
|
+
items: Array<TaskListResponse.Item> | null;
|
|
12
|
+
pagination: TaskListResponse.Pagination;
|
|
13
|
+
/**
|
|
14
|
+
* A URL to the JSON Schema for this object.
|
|
15
|
+
*/
|
|
16
|
+
$schema?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace TaskListResponse {
|
|
19
|
+
interface Item {
|
|
20
|
+
createdAt: string;
|
|
21
|
+
taskId: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}
|
|
24
|
+
interface Pagination {
|
|
25
|
+
hasNext: boolean;
|
|
26
|
+
hasPrev: boolean;
|
|
27
|
+
page: number;
|
|
28
|
+
pages: number;
|
|
29
|
+
pageSize: number;
|
|
30
|
+
total: number;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export interface TaskListParams {
|
|
34
|
+
orderBy?: 'id' | 'createdAt' | 'updatedAt' | 'assignedAt';
|
|
35
|
+
orderByDirection?: 'asc' | 'desc';
|
|
36
|
+
page?: number;
|
|
37
|
+
pageSize?: number;
|
|
38
|
+
}
|
|
39
|
+
export declare namespace Tasks {
|
|
40
|
+
export { type TaskListResponse as TaskListResponse, type TaskListParams as TaskListParams };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/resources/devices/tasks.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;CAGhC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAE3C,UAAU,EAAE,gBAAgB,CAAC,UAAU,CAAC;IAExC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,IAAI;QACnB,SAAS,EAAE,MAAM,CAAC;QAElB,MAAM,EAAE,MAAM,CAAC;QAEf,SAAS,EAAE,MAAM,CAAC;KACnB;IAED,UAAiB,UAAU;QACzB,OAAO,EAAE,OAAO,CAAC;QAEjB,OAAO,EAAE,OAAO,CAAC;QAEjB,IAAI,EAAE,MAAM,CAAC;QAEb,KAAK,EAAE,MAAM,CAAC;QAEd,QAAQ,EAAE,MAAM,CAAC;QAEjB,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,CAAC;IAE1D,gBAAgB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAElC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,cAAc,IAAI,cAAc,EAAE,CAAC;CAC7F"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Tasks = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
class Tasks extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* List tasks for a device
|
|
10
|
+
*/
|
|
11
|
+
list(deviceID, query = {}, options) {
|
|
12
|
+
return this._client.get((0, path_1.path) `/devices/${deviceID}/tasks`, { query, ...options });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Tasks = Tasks;
|
|
16
|
+
//# sourceMappingURL=tasks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/resources/devices/tasks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,IAAI,CACF,QAAgB,EAChB,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;CACF;AAXD,sBAWC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
export class Tasks extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List tasks for a device
|
|
7
|
+
*/
|
|
8
|
+
list(deviceID, query = {}, options) {
|
|
9
|
+
return this._client.get(path `/devices/${deviceID}/tasks`, { query, ...options });
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=tasks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.mjs","sourceRoot":"","sources":["../../src/resources/devices/tasks.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,IAAI,CACF,QAAgB,EAChB,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devices.d.mts","sourceRoot":"","sources":["../src/resources/devices.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../src/resources/devices.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./devices/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=devices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devices.js","sourceRoot":"","sources":["../src/resources/devices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6DAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devices.mjs","sourceRoot":"","sources":["../src/resources/devices.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|