@kryshtop/bstack 1.0.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/LICENSE +21 -0
- package/README.md +324 -0
- package/dist/api/http/BrowserStackHttpClient.d.ts +30 -0
- package/dist/api/http/BrowserStackHttpClient.js +111 -0
- package/dist/api/http/BrowserStackHttpClient.js.map +1 -0
- package/dist/api/http/errors.d.ts +11 -0
- package/dist/api/http/errors.js +31 -0
- package/dist/api/http/errors.js.map +1 -0
- package/dist/api/http/multipart.d.ts +13 -0
- package/dist/api/http/multipart.js +28 -0
- package/dist/api/http/multipart.js.map +1 -0
- package/dist/api/normalizers/common.d.ts +7 -0
- package/dist/api/normalizers/common.js +106 -0
- package/dist/api/normalizers/common.js.map +1 -0
- package/dist/api/registry/EndpointRegistry.d.ts +10 -0
- package/dist/api/registry/EndpointRegistry.js +34 -0
- package/dist/api/registry/EndpointRegistry.js.map +1 -0
- package/dist/api/registry/definitions.d.ts +2 -0
- package/dist/api/registry/definitions.js +510 -0
- package/dist/api/registry/definitions.js.map +1 -0
- package/dist/api/registry/types.d.ts +23 -0
- package/dist/api/registry/types.js +2 -0
- package/dist/api/registry/types.js.map +1 -0
- package/dist/auth/AuthService.d.ts +24 -0
- package/dist/auth/AuthService.js +100 -0
- package/dist/auth/AuthService.js.map +1 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +4 -0
- package/dist/bin.js.map +1 -0
- package/dist/cli/context.d.ts +39 -0
- package/dist/cli/context.js +117 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/output.d.ts +29 -0
- package/dist/cli/output.js +143 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/program.d.ts +4 -0
- package/dist/cli/program.js +60 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/cli/runCli.d.ts +1 -0
- package/dist/cli/runCli.js +31 -0
- package/dist/cli/runCli.js.map +1 -0
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.js +73 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/explorer.d.ts +3 -0
- package/dist/commands/explorer.js +86 -0
- package/dist/commands/explorer.js.map +1 -0
- package/dist/commands/framework.d.ts +3 -0
- package/dist/commands/framework.js +474 -0
- package/dist/commands/framework.js.map +1 -0
- package/dist/config/paths.d.ts +5 -0
- package/dist/config/paths.js +22 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/menus/interactiveMenu.d.ts +2 -0
- package/dist/menus/interactiveMenu.js +1106 -0
- package/dist/menus/interactiveMenu.js.map +1 -0
- package/dist/menus/screenModel.d.ts +12 -0
- package/dist/menus/screenModel.js +152 -0
- package/dist/menus/screenModel.js.map +1 -0
- package/dist/prompts/authPrompts.d.ts +10 -0
- package/dist/prompts/authPrompts.js +46 -0
- package/dist/prompts/authPrompts.js.map +1 -0
- package/dist/services/ResourceService.d.ts +25 -0
- package/dist/services/ResourceService.js +80 -0
- package/dist/services/ResourceService.js.map +1 -0
- package/dist/services/frameworkConfigs.d.ts +16 -0
- package/dist/services/frameworkConfigs.js +108 -0
- package/dist/services/frameworkConfigs.js.map +1 -0
- package/dist/storage/CredentialStore.d.ts +11 -0
- package/dist/storage/CredentialStore.js +2 -0
- package/dist/storage/CredentialStore.js.map +1 -0
- package/dist/storage/FileCredentialStores.d.ts +18 -0
- package/dist/storage/FileCredentialStores.js +74 -0
- package/dist/storage/FileCredentialStores.js.map +1 -0
- package/dist/storage/FileStorage.d.ts +3 -0
- package/dist/storage/FileStorage.js +18 -0
- package/dist/storage/FileStorage.js.map +1 -0
- package/dist/storage/KeytarCredentialStore.d.ts +9 -0
- package/dist/storage/KeytarCredentialStore.js +40 -0
- package/dist/storage/KeytarCredentialStore.js.map +1 -0
- package/dist/storage/SessionRepository.d.ts +28 -0
- package/dist/storage/SessionRepository.js +151 -0
- package/dist/storage/SessionRepository.js.map +1 -0
- package/dist/types/domain.d.ts +85 -0
- package/dist/types/domain.js +2 -0
- package/dist/types/domain.js.map +1 -0
- package/dist/utils/constants.d.ts +10 -0
- package/dist/utils/constants.js +11 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/errors.d.ts +2 -0
- package/dist/utils/errors.js +12 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/files.d.ts +4 -0
- package/dist/utils/files.js +28 -0
- package/dist/utils/files.js.map +1 -0
- package/dist/utils/json.d.ts +2 -0
- package/dist/utils/json.js +10 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/mask.d.ts +2 -0
- package/dist/utils/mask.js +10 -0
- package/dist/utils/mask.js.map +1 -0
- package/dist/utils/query.d.ts +1 -0
- package/dist/utils/query.js +17 -0
- package/dist/utils/query.js.map +1 -0
- package/package.json +92 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export function normalizeArtifact(input) {
|
|
2
|
+
const record = asRecord(input);
|
|
3
|
+
const nested = maybeNestedArtifact(record);
|
|
4
|
+
return {
|
|
5
|
+
id: asString(nested.app_id) ??
|
|
6
|
+
asString(nested.test_suite_id) ??
|
|
7
|
+
asString(nested.test_package_id) ??
|
|
8
|
+
asString(nested.media_id),
|
|
9
|
+
url: asString(nested.app_url) ??
|
|
10
|
+
asString(nested.test_suite_url) ??
|
|
11
|
+
asString(nested.test_package_url) ??
|
|
12
|
+
asString(nested.media_url),
|
|
13
|
+
name: asString(nested.app_name) ??
|
|
14
|
+
asString(nested.test_suite_name) ??
|
|
15
|
+
asString(nested.test_package_name) ??
|
|
16
|
+
asString(nested.media_name),
|
|
17
|
+
version: asString(nested.app_version),
|
|
18
|
+
uploadedAt: asString(nested.uploaded_at),
|
|
19
|
+
expiry: asString(nested.expiry),
|
|
20
|
+
customId: asString(nested.custom_id),
|
|
21
|
+
shareableId: asString(nested.shareable_id),
|
|
22
|
+
framework: asString(nested.framework),
|
|
23
|
+
raw: input,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export function normalizeBuildSummary(input) {
|
|
27
|
+
const record = asRecord(input);
|
|
28
|
+
const nested = (asRecord(record.automation_build) || record);
|
|
29
|
+
return {
|
|
30
|
+
id: asString(nested.hashed_id) ?? asString(nested.id) ?? 'unknown-build',
|
|
31
|
+
name: asString(nested.name),
|
|
32
|
+
project: asString(nested.project_name) ?? asString(nested.project),
|
|
33
|
+
status: asString(nested.status),
|
|
34
|
+
duration: asNumber(nested.duration) ?? asString(nested.duration),
|
|
35
|
+
startTime: asString(nested.start_time) ?? asString(nested.created_at),
|
|
36
|
+
browserUrl: asString(nested.browser_url) ?? asString(nested.public_url),
|
|
37
|
+
raw: input,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function normalizeSessionSummary(input) {
|
|
41
|
+
const record = asRecord(input);
|
|
42
|
+
const nested = (asRecord(record.automation_session) || record);
|
|
43
|
+
return {
|
|
44
|
+
id: asString(nested.hashed_id) ?? asString(nested.id) ?? 'unknown-session',
|
|
45
|
+
name: asString(nested.name),
|
|
46
|
+
status: asString(nested.status),
|
|
47
|
+
device: asString(nested.device),
|
|
48
|
+
os: asString(nested.os),
|
|
49
|
+
osVersion: asString(nested.os_version),
|
|
50
|
+
browserUrl: asString(nested.browser_url) ?? asString(nested.logs),
|
|
51
|
+
publicUrl: asString(nested.public_url),
|
|
52
|
+
buildId: asString(nested.build_hashed_id) ?? asString(nested.build_id),
|
|
53
|
+
buildName: asString(nested.build_name),
|
|
54
|
+
raw: input,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export function normalizeArtifactCollection(input) {
|
|
58
|
+
if (Array.isArray(input)) {
|
|
59
|
+
return input.map(normalizeArtifact);
|
|
60
|
+
}
|
|
61
|
+
const record = asRecord(input);
|
|
62
|
+
for (const key of ['apps', 'test_suites', 'test_packages', 'media_files']) {
|
|
63
|
+
const value = record[key];
|
|
64
|
+
if (Array.isArray(value)) {
|
|
65
|
+
return value.map(normalizeArtifact);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (record.app || record.test_suite || record.test_package) {
|
|
69
|
+
return [normalizeArtifact(record.app ?? record.test_suite ?? record.test_package)];
|
|
70
|
+
}
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
export function normalizeBuildCollection(input) {
|
|
74
|
+
if (!Array.isArray(input)) {
|
|
75
|
+
return [];
|
|
76
|
+
}
|
|
77
|
+
return input.map(normalizeBuildSummary);
|
|
78
|
+
}
|
|
79
|
+
export function normalizeSessionCollection(input) {
|
|
80
|
+
if (!Array.isArray(input)) {
|
|
81
|
+
return [];
|
|
82
|
+
}
|
|
83
|
+
return input.map(normalizeSessionSummary);
|
|
84
|
+
}
|
|
85
|
+
function maybeNestedArtifact(record) {
|
|
86
|
+
return (asOptionalRecord(record.app) ??
|
|
87
|
+
asOptionalRecord(record.test_suite) ??
|
|
88
|
+
asOptionalRecord(record.test_package) ??
|
|
89
|
+
asOptionalRecord(record.media_file) ??
|
|
90
|
+
record);
|
|
91
|
+
}
|
|
92
|
+
function asRecord(value) {
|
|
93
|
+
return value !== null && typeof value === 'object' ? value : {};
|
|
94
|
+
}
|
|
95
|
+
function asOptionalRecord(value) {
|
|
96
|
+
return value !== null && typeof value === 'object'
|
|
97
|
+
? value
|
|
98
|
+
: undefined;
|
|
99
|
+
}
|
|
100
|
+
function asString(value) {
|
|
101
|
+
return typeof value === 'string' ? value : undefined;
|
|
102
|
+
}
|
|
103
|
+
function asNumber(value) {
|
|
104
|
+
return typeof value === 'number' ? value : undefined;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/api/normalizers/common.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,MAAM,GAAG,mBAAmB,CAAC,MAA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type { EndpointDefinition, ResolvedEndpoint } from './types.js';
|
|
3
|
+
export declare class EndpointRegistry {
|
|
4
|
+
private readonly definitions;
|
|
5
|
+
constructor(definitions: EndpointDefinition[]);
|
|
6
|
+
list(): EndpointDefinition[];
|
|
7
|
+
listByFramework(framework: FrameworkKey): EndpointDefinition[];
|
|
8
|
+
find(framework: FrameworkKey, resource: ResourceKey, operation: OperationKey): EndpointDefinition;
|
|
9
|
+
resolve(framework: FrameworkKey, resource: ResourceKey, operation: OperationKey, params: Record<string, string | number | undefined>): ResolvedEndpoint;
|
|
10
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export class EndpointRegistry {
|
|
2
|
+
definitions;
|
|
3
|
+
constructor(definitions) {
|
|
4
|
+
this.definitions = definitions;
|
|
5
|
+
}
|
|
6
|
+
list() {
|
|
7
|
+
return [...this.definitions];
|
|
8
|
+
}
|
|
9
|
+
listByFramework(framework) {
|
|
10
|
+
return this.definitions.filter((definition) => definition.framework === framework);
|
|
11
|
+
}
|
|
12
|
+
find(framework, resource, operation) {
|
|
13
|
+
const found = this.definitions.find((definition) => definition.framework === framework &&
|
|
14
|
+
definition.resource === resource &&
|
|
15
|
+
definition.operation === operation);
|
|
16
|
+
if (!found) {
|
|
17
|
+
throw new Error(`Unsupported operation: ${framework} ${resource} ${operation}`);
|
|
18
|
+
}
|
|
19
|
+
return found;
|
|
20
|
+
}
|
|
21
|
+
resolve(framework, resource, operation, params) {
|
|
22
|
+
const definition = this.find(framework, resource, operation);
|
|
23
|
+
let path = definition.pathTemplate;
|
|
24
|
+
for (const pathParam of definition.pathParams ?? []) {
|
|
25
|
+
const value = params[pathParam];
|
|
26
|
+
if (!value) {
|
|
27
|
+
throw new Error(`Missing required path parameter: ${pathParam}`);
|
|
28
|
+
}
|
|
29
|
+
path = path.replaceAll(`{${pathParam}}`, encodeURIComponent(String(value)));
|
|
30
|
+
}
|
|
31
|
+
return { definition, path };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=EndpointRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EndpointRegistry.js","sourceRoot":"","sources":["../../../src/api/registry/EndpointRegistry.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,gBAAgB;IACS;IAApC,YAAoC,WAAiC;QAAjC,gBAAW,GAAX,WAAW,CAAsB;IAAG,CAAC;IAElE,IAAI;QACT,OAAO,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/B,CAAC;IAEM,eAAe,CAAC,SAAuB;QAC5C,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;IACrF,CAAC;IAEM,IAAI,CACT,SAAuB,EACvB,QAAqB,EACrB,SAAuB;QAEvB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CACjC,CAAC,UAAU,EAAE,EAAE,CACb,UAAU,CAAC,SAAS,KAAK,SAAS;YAClC,UAAU,CAAC,QAAQ,KAAK,QAAQ;YAChC,UAAU,CAAC,SAAS,KAAK,SAAS,CACrC,CAAC;QAEF,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,0BAA0B,SAAS,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC,CAAC;QAClF,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,OAAO,CACZ,SAAuB,EACvB,QAAqB,EACrB,SAAuB,EACvB,MAAmD;QAEnD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAC7D,IAAI,IAAI,GAAG,UAAU,CAAC,YAAY,CAAC;QAEnC,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;YACpD,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;YAChC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,IAAI,KAAK,CAAC,oCAAoC,SAAS,EAAE,CAAC,CAAC;YACnE,CAAC;YAED,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,SAAS,GAAG,EAAE,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC9E,CAAC;QAED,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
function defineEndpoint(definition) {
|
|
2
|
+
return definition;
|
|
3
|
+
}
|
|
4
|
+
export const endpointDefinitions = [
|
|
5
|
+
defineEndpoint({
|
|
6
|
+
id: 'auth-validate',
|
|
7
|
+
framework: 'auth',
|
|
8
|
+
resource: 'auth',
|
|
9
|
+
operation: 'validate',
|
|
10
|
+
label: 'Validate credentials',
|
|
11
|
+
method: 'GET',
|
|
12
|
+
pathTemplate: '/app-automate/plan.json',
|
|
13
|
+
description: 'Validate credentials and fetch current plan summary.',
|
|
14
|
+
requestKind: 'json',
|
|
15
|
+
}),
|
|
16
|
+
defineEndpoint({
|
|
17
|
+
id: 'auth-usage',
|
|
18
|
+
framework: 'auth',
|
|
19
|
+
resource: 'plan',
|
|
20
|
+
operation: 'usage',
|
|
21
|
+
label: 'Usage details',
|
|
22
|
+
method: 'GET',
|
|
23
|
+
pathTemplate: '/app-automate/current_parallel_queue_usage',
|
|
24
|
+
description: 'Fetch real-time queue and parallel usage details.',
|
|
25
|
+
requestKind: 'json',
|
|
26
|
+
}),
|
|
27
|
+
defineEndpoint({
|
|
28
|
+
id: 'appium-apps-upload',
|
|
29
|
+
framework: 'appium',
|
|
30
|
+
resource: 'apps',
|
|
31
|
+
operation: 'upload',
|
|
32
|
+
label: 'Upload app',
|
|
33
|
+
method: 'POST',
|
|
34
|
+
pathTemplate: '/app-automate/upload',
|
|
35
|
+
description: 'Upload an Appium app from file system or URL.',
|
|
36
|
+
requestKind: 'multipart',
|
|
37
|
+
upload: { fileFieldName: 'file', urlFieldName: 'url' },
|
|
38
|
+
}),
|
|
39
|
+
defineEndpoint({
|
|
40
|
+
id: 'appium-apps-list',
|
|
41
|
+
framework: 'appium',
|
|
42
|
+
resource: 'apps',
|
|
43
|
+
operation: 'list',
|
|
44
|
+
label: 'List apps',
|
|
45
|
+
method: 'GET',
|
|
46
|
+
pathTemplate: '/app-automate/recent_apps',
|
|
47
|
+
description: 'List recently uploaded Appium apps.',
|
|
48
|
+
requestKind: 'json',
|
|
49
|
+
queryParams: ['custom_id'],
|
|
50
|
+
}),
|
|
51
|
+
defineEndpoint({
|
|
52
|
+
id: 'appium-apps-list-group',
|
|
53
|
+
framework: 'appium',
|
|
54
|
+
resource: 'apps',
|
|
55
|
+
operation: 'list-group',
|
|
56
|
+
label: 'List group apps',
|
|
57
|
+
method: 'GET',
|
|
58
|
+
pathTemplate: '/app-automate/recent_group_apps',
|
|
59
|
+
description: 'List recently uploaded Appium apps for the current group.',
|
|
60
|
+
requestKind: 'json',
|
|
61
|
+
queryParams: ['limit'],
|
|
62
|
+
}),
|
|
63
|
+
defineEndpoint({
|
|
64
|
+
id: 'appium-apps-delete',
|
|
65
|
+
framework: 'appium',
|
|
66
|
+
resource: 'apps',
|
|
67
|
+
operation: 'delete',
|
|
68
|
+
label: 'Delete app',
|
|
69
|
+
method: 'DELETE',
|
|
70
|
+
pathTemplate: '/app-automate/app/delete/{appID}',
|
|
71
|
+
description: 'Delete an uploaded Appium app.',
|
|
72
|
+
requestKind: 'json',
|
|
73
|
+
pathParams: ['appID'],
|
|
74
|
+
}),
|
|
75
|
+
defineEndpoint({
|
|
76
|
+
id: 'appium-builds-list',
|
|
77
|
+
framework: 'appium',
|
|
78
|
+
resource: 'builds',
|
|
79
|
+
operation: 'list',
|
|
80
|
+
label: 'List builds',
|
|
81
|
+
method: 'GET',
|
|
82
|
+
pathTemplate: '/app-automate/builds.json',
|
|
83
|
+
description: 'List recent Appium builds.',
|
|
84
|
+
requestKind: 'json',
|
|
85
|
+
queryParams: ['limit', 'offset', 'status', 'projectId'],
|
|
86
|
+
}),
|
|
87
|
+
defineEndpoint({
|
|
88
|
+
id: 'appium-builds-get',
|
|
89
|
+
framework: 'appium',
|
|
90
|
+
resource: 'builds',
|
|
91
|
+
operation: 'get',
|
|
92
|
+
label: 'Get build details',
|
|
93
|
+
method: 'GET',
|
|
94
|
+
pathTemplate: '/app-automate/builds/{buildID}/sessions.json',
|
|
95
|
+
description: 'Get Appium build details and included sessions.',
|
|
96
|
+
requestKind: 'json',
|
|
97
|
+
pathParams: ['buildID'],
|
|
98
|
+
}),
|
|
99
|
+
defineEndpoint({
|
|
100
|
+
id: 'appium-sessions-list',
|
|
101
|
+
framework: 'appium',
|
|
102
|
+
resource: 'sessions',
|
|
103
|
+
operation: 'list',
|
|
104
|
+
label: 'List sessions',
|
|
105
|
+
method: 'GET',
|
|
106
|
+
pathTemplate: '/app-automate/builds/{buildID}/sessions.json',
|
|
107
|
+
description: 'List Appium sessions under a build.',
|
|
108
|
+
requestKind: 'json',
|
|
109
|
+
pathParams: ['buildID'],
|
|
110
|
+
queryParams: ['limit', 'offset', 'status'],
|
|
111
|
+
}),
|
|
112
|
+
defineEndpoint({
|
|
113
|
+
id: 'appium-sessions-get',
|
|
114
|
+
framework: 'appium',
|
|
115
|
+
resource: 'sessions',
|
|
116
|
+
operation: 'get',
|
|
117
|
+
label: 'Get session details',
|
|
118
|
+
method: 'GET',
|
|
119
|
+
pathTemplate: '/app-automate/sessions/{sessionID}.json',
|
|
120
|
+
description: 'Get Appium session details.',
|
|
121
|
+
requestKind: 'json',
|
|
122
|
+
pathParams: ['sessionID'],
|
|
123
|
+
}),
|
|
124
|
+
defineEndpoint({
|
|
125
|
+
id: 'appium-sessions-update-status',
|
|
126
|
+
framework: 'appium',
|
|
127
|
+
resource: 'sessions',
|
|
128
|
+
operation: 'update-status',
|
|
129
|
+
label: 'Update session status',
|
|
130
|
+
method: 'PUT',
|
|
131
|
+
pathTemplate: '/app-automate/sessions/{sessionID}.json',
|
|
132
|
+
description: 'Update Appium session status and reason.',
|
|
133
|
+
requestKind: 'json',
|
|
134
|
+
pathParams: ['sessionID'],
|
|
135
|
+
}),
|
|
136
|
+
...defineV2ArtifactEndpoints('maestro', '/app-automate/maestro/v2', true),
|
|
137
|
+
...defineV2BuildEndpoints('maestro', '/app-automate/maestro/v2'),
|
|
138
|
+
...defineV2ArtifactEndpoints('espresso', '/app-automate/espresso/v2', true),
|
|
139
|
+
...defineV2BuildEndpoints('espresso', '/app-automate/espresso/v2'),
|
|
140
|
+
...defineV2ArtifactEndpoints('flutter-android', '/app-automate/flutter-integration-tests/v2/android', true),
|
|
141
|
+
...defineV2BuildEndpoints('flutter-android', '/app-automate/flutter-integration-tests/v2/android'),
|
|
142
|
+
...defineFlutterIosEndpoints(),
|
|
143
|
+
...defineDetoxEndpoints(),
|
|
144
|
+
...defineV2ArtifactEndpoints('xcuitest', '/app-automate/xcuitest/v2', true),
|
|
145
|
+
...defineV2BuildEndpoints('xcuitest', '/app-automate/xcuitest/v2'),
|
|
146
|
+
...defineMediaEndpoints(),
|
|
147
|
+
];
|
|
148
|
+
function defineV2ArtifactEndpoints(framework, basePath, includeApps) {
|
|
149
|
+
const endpoints = [];
|
|
150
|
+
if (includeApps) {
|
|
151
|
+
endpoints.push(defineEndpoint({
|
|
152
|
+
id: `${framework}-apps-upload`,
|
|
153
|
+
framework,
|
|
154
|
+
resource: 'apps',
|
|
155
|
+
operation: 'upload',
|
|
156
|
+
label: 'Upload app',
|
|
157
|
+
method: 'POST',
|
|
158
|
+
pathTemplate: `${basePath}/app`,
|
|
159
|
+
description: `Upload an app for ${framework}.`,
|
|
160
|
+
requestKind: 'multipart',
|
|
161
|
+
upload: { fileFieldName: 'file', urlFieldName: 'url' },
|
|
162
|
+
}), defineEndpoint({
|
|
163
|
+
id: `${framework}-apps-list`,
|
|
164
|
+
framework,
|
|
165
|
+
resource: 'apps',
|
|
166
|
+
operation: 'list',
|
|
167
|
+
label: 'List apps',
|
|
168
|
+
method: 'GET',
|
|
169
|
+
pathTemplate: `${basePath}/apps`,
|
|
170
|
+
description: `List apps for ${framework}.`,
|
|
171
|
+
requestKind: 'json',
|
|
172
|
+
queryParams: ['custom_id', 'scope', 'limit'],
|
|
173
|
+
}), defineEndpoint({
|
|
174
|
+
id: `${framework}-apps-get`,
|
|
175
|
+
framework,
|
|
176
|
+
resource: 'apps',
|
|
177
|
+
operation: 'get',
|
|
178
|
+
label: 'Get app details',
|
|
179
|
+
method: 'GET',
|
|
180
|
+
pathTemplate: `${basePath}/apps/{appId}`,
|
|
181
|
+
description: `Get app details for ${framework}.`,
|
|
182
|
+
requestKind: 'json',
|
|
183
|
+
pathParams: ['appId'],
|
|
184
|
+
}), defineEndpoint({
|
|
185
|
+
id: `${framework}-apps-delete`,
|
|
186
|
+
framework,
|
|
187
|
+
resource: 'apps',
|
|
188
|
+
operation: 'delete',
|
|
189
|
+
label: 'Delete app',
|
|
190
|
+
method: 'DELETE',
|
|
191
|
+
pathTemplate: `${basePath}/apps/{appId}`,
|
|
192
|
+
description: `Delete an uploaded app for ${framework}.`,
|
|
193
|
+
requestKind: 'json',
|
|
194
|
+
pathParams: ['appId'],
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
endpoints.push(defineEndpoint({
|
|
198
|
+
id: `${framework}-tests-upload`,
|
|
199
|
+
framework,
|
|
200
|
+
resource: 'test-suites',
|
|
201
|
+
operation: 'upload',
|
|
202
|
+
label: 'Upload test suite',
|
|
203
|
+
method: 'POST',
|
|
204
|
+
pathTemplate: `${basePath}/test-suite`,
|
|
205
|
+
description: `Upload a test suite for ${framework}.`,
|
|
206
|
+
requestKind: 'multipart',
|
|
207
|
+
upload: { fileFieldName: 'file', urlFieldName: 'url' },
|
|
208
|
+
}), defineEndpoint({
|
|
209
|
+
id: `${framework}-tests-list`,
|
|
210
|
+
framework,
|
|
211
|
+
resource: 'test-suites',
|
|
212
|
+
operation: 'list',
|
|
213
|
+
label: 'List test suites',
|
|
214
|
+
method: 'GET',
|
|
215
|
+
pathTemplate: `${basePath}/test-suites`,
|
|
216
|
+
description: `List test suites for ${framework}.`,
|
|
217
|
+
requestKind: 'json',
|
|
218
|
+
queryParams: ['custom_id', 'scope', 'limit'],
|
|
219
|
+
}), defineEndpoint({
|
|
220
|
+
id: `${framework}-tests-get`,
|
|
221
|
+
framework,
|
|
222
|
+
resource: 'test-suites',
|
|
223
|
+
operation: 'get',
|
|
224
|
+
label: 'Get test suite details',
|
|
225
|
+
method: 'GET',
|
|
226
|
+
pathTemplate: `${basePath}/test-suites/{testSuiteId}`,
|
|
227
|
+
description: `Get test suite details for ${framework}.`,
|
|
228
|
+
requestKind: 'json',
|
|
229
|
+
pathParams: ['testSuiteId'],
|
|
230
|
+
}), defineEndpoint({
|
|
231
|
+
id: `${framework}-tests-delete`,
|
|
232
|
+
framework,
|
|
233
|
+
resource: 'test-suites',
|
|
234
|
+
operation: 'delete',
|
|
235
|
+
label: 'Delete test suite',
|
|
236
|
+
method: 'DELETE',
|
|
237
|
+
pathTemplate: `${basePath}/test-suites/{testSuiteId}`,
|
|
238
|
+
description: `Delete a test suite for ${framework}.`,
|
|
239
|
+
requestKind: 'json',
|
|
240
|
+
pathParams: ['testSuiteId'],
|
|
241
|
+
}));
|
|
242
|
+
return endpoints;
|
|
243
|
+
}
|
|
244
|
+
function defineV2BuildEndpoints(framework, basePath) {
|
|
245
|
+
return [
|
|
246
|
+
defineEndpoint({
|
|
247
|
+
id: `${framework}-builds-run`,
|
|
248
|
+
framework,
|
|
249
|
+
resource: 'builds',
|
|
250
|
+
operation: 'run',
|
|
251
|
+
label: 'Execute build',
|
|
252
|
+
method: 'POST',
|
|
253
|
+
pathTemplate: `${basePath}/build`,
|
|
254
|
+
description: `Execute a ${framework} build.`,
|
|
255
|
+
requestKind: 'json',
|
|
256
|
+
}),
|
|
257
|
+
defineEndpoint({
|
|
258
|
+
id: `${framework}-builds-list`,
|
|
259
|
+
framework,
|
|
260
|
+
resource: 'builds',
|
|
261
|
+
operation: 'list',
|
|
262
|
+
label: 'List builds',
|
|
263
|
+
method: 'GET',
|
|
264
|
+
pathTemplate: `${basePath}/builds`,
|
|
265
|
+
description: `List recent ${framework} builds.`,
|
|
266
|
+
requestKind: 'json',
|
|
267
|
+
queryParams: ['project'],
|
|
268
|
+
}),
|
|
269
|
+
defineEndpoint({
|
|
270
|
+
id: `${framework}-builds-get`,
|
|
271
|
+
framework,
|
|
272
|
+
resource: 'builds',
|
|
273
|
+
operation: 'get',
|
|
274
|
+
label: 'Get build status',
|
|
275
|
+
method: 'GET',
|
|
276
|
+
pathTemplate: `${basePath}/builds/{buildId}`,
|
|
277
|
+
description: `Get ${framework} build status.`,
|
|
278
|
+
requestKind: 'json',
|
|
279
|
+
pathParams: ['buildId'],
|
|
280
|
+
}),
|
|
281
|
+
defineEndpoint({
|
|
282
|
+
id: `${framework}-builds-stop`,
|
|
283
|
+
framework,
|
|
284
|
+
resource: 'builds',
|
|
285
|
+
operation: 'stop',
|
|
286
|
+
label: 'Stop build',
|
|
287
|
+
method: 'POST',
|
|
288
|
+
pathTemplate: `${basePath}/builds/{buildId}/stop`,
|
|
289
|
+
description: `Stop a running ${framework} build.`,
|
|
290
|
+
requestKind: 'json',
|
|
291
|
+
pathParams: ['buildId'],
|
|
292
|
+
}),
|
|
293
|
+
defineEndpoint({
|
|
294
|
+
id: `${framework}-sessions-get`,
|
|
295
|
+
framework,
|
|
296
|
+
resource: 'sessions',
|
|
297
|
+
operation: 'get',
|
|
298
|
+
label: 'Get session details',
|
|
299
|
+
method: 'GET',
|
|
300
|
+
pathTemplate: `${basePath}/builds/{buildId}/sessions/{sessionId}`,
|
|
301
|
+
description: `Get ${framework} session details.`,
|
|
302
|
+
requestKind: 'json',
|
|
303
|
+
pathParams: ['buildId', 'sessionId'],
|
|
304
|
+
}),
|
|
305
|
+
];
|
|
306
|
+
}
|
|
307
|
+
function defineFlutterIosEndpoints() {
|
|
308
|
+
return [
|
|
309
|
+
defineEndpoint({
|
|
310
|
+
id: 'flutter-ios-packages-upload',
|
|
311
|
+
framework: 'flutter-ios',
|
|
312
|
+
resource: 'test-packages',
|
|
313
|
+
operation: 'upload',
|
|
314
|
+
label: 'Upload test package',
|
|
315
|
+
method: 'POST',
|
|
316
|
+
pathTemplate: '/app-automate/flutter-integration-tests/v2/ios/test-package',
|
|
317
|
+
description: 'Upload a Flutter iOS test package.',
|
|
318
|
+
requestKind: 'multipart',
|
|
319
|
+
upload: { fileFieldName: 'file' },
|
|
320
|
+
}),
|
|
321
|
+
defineEndpoint({
|
|
322
|
+
id: 'flutter-ios-packages-list',
|
|
323
|
+
framework: 'flutter-ios',
|
|
324
|
+
resource: 'test-packages',
|
|
325
|
+
operation: 'list',
|
|
326
|
+
label: 'List test packages',
|
|
327
|
+
method: 'GET',
|
|
328
|
+
pathTemplate: '/app-automate/flutter-integration-tests/v2/ios/test-packages',
|
|
329
|
+
description: 'List Flutter iOS test packages.',
|
|
330
|
+
requestKind: 'json',
|
|
331
|
+
queryParams: ['custom_id', 'scope', 'limit'],
|
|
332
|
+
}),
|
|
333
|
+
defineEndpoint({
|
|
334
|
+
id: 'flutter-ios-packages-get',
|
|
335
|
+
framework: 'flutter-ios',
|
|
336
|
+
resource: 'test-packages',
|
|
337
|
+
operation: 'get',
|
|
338
|
+
label: 'Get test package details',
|
|
339
|
+
method: 'GET',
|
|
340
|
+
pathTemplate: '/app-automate/flutter-integration-tests/v2/ios/test-packages/{testPackageId}',
|
|
341
|
+
description: 'Get Flutter iOS test package details.',
|
|
342
|
+
requestKind: 'json',
|
|
343
|
+
pathParams: ['testPackageId'],
|
|
344
|
+
}),
|
|
345
|
+
defineEndpoint({
|
|
346
|
+
id: 'flutter-ios-packages-delete',
|
|
347
|
+
framework: 'flutter-ios',
|
|
348
|
+
resource: 'test-packages',
|
|
349
|
+
operation: 'delete',
|
|
350
|
+
label: 'Delete test package',
|
|
351
|
+
method: 'DELETE',
|
|
352
|
+
pathTemplate: '/app-automate/flutter-integration-tests/v2/ios/test-packages/{testPackageId}',
|
|
353
|
+
description: 'Delete a Flutter iOS test package.',
|
|
354
|
+
requestKind: 'json',
|
|
355
|
+
pathParams: ['testPackageId'],
|
|
356
|
+
}),
|
|
357
|
+
defineEndpoint({
|
|
358
|
+
id: 'flutter-ios-builds-run',
|
|
359
|
+
framework: 'flutter-ios',
|
|
360
|
+
resource: 'builds',
|
|
361
|
+
operation: 'run',
|
|
362
|
+
label: 'Execute build',
|
|
363
|
+
method: 'POST',
|
|
364
|
+
pathTemplate: '/app-automate/flutter-integration-tests/v2/ios/build',
|
|
365
|
+
description: 'Execute a Flutter iOS build.',
|
|
366
|
+
requestKind: 'json',
|
|
367
|
+
}),
|
|
368
|
+
defineEndpoint({
|
|
369
|
+
id: 'flutter-ios-builds-list',
|
|
370
|
+
framework: 'flutter-ios',
|
|
371
|
+
resource: 'builds',
|
|
372
|
+
operation: 'list',
|
|
373
|
+
label: 'List builds',
|
|
374
|
+
method: 'GET',
|
|
375
|
+
pathTemplate: '/app-automate/flutter-integration-tests/v2/ios/builds',
|
|
376
|
+
description: 'List Flutter iOS builds.',
|
|
377
|
+
requestKind: 'json',
|
|
378
|
+
queryParams: ['project'],
|
|
379
|
+
}),
|
|
380
|
+
defineEndpoint({
|
|
381
|
+
id: 'flutter-ios-builds-get',
|
|
382
|
+
framework: 'flutter-ios',
|
|
383
|
+
resource: 'builds',
|
|
384
|
+
operation: 'get',
|
|
385
|
+
label: 'Get build status',
|
|
386
|
+
method: 'GET',
|
|
387
|
+
pathTemplate: '/app-automate/flutter-integration-tests/v2/ios/builds/{buildId}',
|
|
388
|
+
description: 'Get Flutter iOS build status.',
|
|
389
|
+
requestKind: 'json',
|
|
390
|
+
pathParams: ['buildId'],
|
|
391
|
+
}),
|
|
392
|
+
defineEndpoint({
|
|
393
|
+
id: 'flutter-ios-builds-stop',
|
|
394
|
+
framework: 'flutter-ios',
|
|
395
|
+
resource: 'builds',
|
|
396
|
+
operation: 'stop',
|
|
397
|
+
label: 'Stop build',
|
|
398
|
+
method: 'POST',
|
|
399
|
+
pathTemplate: '/app-automate/flutter-integration-tests/v2/ios/builds/{buildId}/stop',
|
|
400
|
+
description: 'Stop a Flutter iOS build.',
|
|
401
|
+
requestKind: 'json',
|
|
402
|
+
pathParams: ['buildId'],
|
|
403
|
+
}),
|
|
404
|
+
defineEndpoint({
|
|
405
|
+
id: 'flutter-ios-sessions-get',
|
|
406
|
+
framework: 'flutter-ios',
|
|
407
|
+
resource: 'sessions',
|
|
408
|
+
operation: 'get',
|
|
409
|
+
label: 'Get session details',
|
|
410
|
+
method: 'GET',
|
|
411
|
+
pathTemplate: '/app-automate/flutter-integration-tests/v2/ios/builds/{buildId}/sessions/{sessionId}',
|
|
412
|
+
description: 'Get Flutter iOS session details.',
|
|
413
|
+
requestKind: 'json',
|
|
414
|
+
pathParams: ['buildId', 'sessionId'],
|
|
415
|
+
}),
|
|
416
|
+
];
|
|
417
|
+
}
|
|
418
|
+
function defineDetoxEndpoints() {
|
|
419
|
+
return [
|
|
420
|
+
defineEndpoint({
|
|
421
|
+
id: 'detox-android-apps-upload',
|
|
422
|
+
framework: 'detox-android',
|
|
423
|
+
resource: 'apps',
|
|
424
|
+
operation: 'upload',
|
|
425
|
+
label: 'Upload app',
|
|
426
|
+
method: 'POST',
|
|
427
|
+
pathTemplate: '/app-automate/detox/v2/android/app',
|
|
428
|
+
description: 'Upload a Detox Android app.',
|
|
429
|
+
requestKind: 'multipart',
|
|
430
|
+
upload: { fileFieldName: 'file', urlFieldName: 'url' },
|
|
431
|
+
}),
|
|
432
|
+
defineEndpoint({
|
|
433
|
+
id: 'detox-android-app-client-upload',
|
|
434
|
+
framework: 'detox-android',
|
|
435
|
+
resource: 'app-client',
|
|
436
|
+
operation: 'upload',
|
|
437
|
+
label: 'Upload app client',
|
|
438
|
+
method: 'POST',
|
|
439
|
+
pathTemplate: '/app-automate/detox/v2/android/app-client',
|
|
440
|
+
description: 'Upload a Detox Android app client bundle.',
|
|
441
|
+
requestKind: 'multipart',
|
|
442
|
+
upload: { fileFieldName: 'file', urlFieldName: 'url' },
|
|
443
|
+
}),
|
|
444
|
+
defineEndpoint({
|
|
445
|
+
id: 'detox-android-sessions-get',
|
|
446
|
+
framework: 'detox-android',
|
|
447
|
+
resource: 'sessions',
|
|
448
|
+
operation: 'get',
|
|
449
|
+
label: 'Get session details',
|
|
450
|
+
method: 'GET',
|
|
451
|
+
pathTemplate: '/app-automate/detox/v2/android/sessions/{sessionID}.json',
|
|
452
|
+
description: 'Get Detox Android session details.',
|
|
453
|
+
requestKind: 'json',
|
|
454
|
+
pathParams: ['sessionID'],
|
|
455
|
+
}),
|
|
456
|
+
];
|
|
457
|
+
}
|
|
458
|
+
function defineMediaEndpoints() {
|
|
459
|
+
return [
|
|
460
|
+
defineEndpoint({
|
|
461
|
+
id: 'media-upload',
|
|
462
|
+
framework: 'media',
|
|
463
|
+
resource: 'media',
|
|
464
|
+
operation: 'upload',
|
|
465
|
+
label: 'Upload media',
|
|
466
|
+
method: 'POST',
|
|
467
|
+
pathTemplate: '/app-automate/upload-media',
|
|
468
|
+
description: 'Upload media for App Automate tests.',
|
|
469
|
+
requestKind: 'multipart',
|
|
470
|
+
upload: { fileFieldName: 'file' },
|
|
471
|
+
}),
|
|
472
|
+
defineEndpoint({
|
|
473
|
+
id: 'media-list',
|
|
474
|
+
framework: 'media',
|
|
475
|
+
resource: 'media',
|
|
476
|
+
operation: 'list',
|
|
477
|
+
label: 'List media',
|
|
478
|
+
method: 'GET',
|
|
479
|
+
pathTemplate: '/app-automate/recent_media_files',
|
|
480
|
+
description: 'List recently uploaded media files.',
|
|
481
|
+
requestKind: 'json',
|
|
482
|
+
queryParams: ['custom_id'],
|
|
483
|
+
}),
|
|
484
|
+
defineEndpoint({
|
|
485
|
+
id: 'media-list-group',
|
|
486
|
+
framework: 'media',
|
|
487
|
+
resource: 'media',
|
|
488
|
+
operation: 'list-group',
|
|
489
|
+
label: 'List group media',
|
|
490
|
+
method: 'GET',
|
|
491
|
+
pathTemplate: '/app-automate/recent_group_media',
|
|
492
|
+
description: 'List recently uploaded group media files.',
|
|
493
|
+
requestKind: 'json',
|
|
494
|
+
queryParams: ['limit'],
|
|
495
|
+
}),
|
|
496
|
+
defineEndpoint({
|
|
497
|
+
id: 'media-delete',
|
|
498
|
+
framework: 'media',
|
|
499
|
+
resource: 'media',
|
|
500
|
+
operation: 'delete',
|
|
501
|
+
label: 'Delete media',
|
|
502
|
+
method: 'DELETE',
|
|
503
|
+
pathTemplate: '/app-automate/custom_media/delete/{media_id}',
|
|
504
|
+
description: 'Delete an uploaded media file.',
|
|
505
|
+
requestKind: 'json',
|
|
506
|
+
pathParams: ['media_id'],
|
|
507
|
+
}),
|
|
508
|
+
];
|
|
509
|
+
}
|
|
510
|
+
//# sourceMappingURL=definitions.js.map
|