@bitbar/cloud-api-client 1.5.14 → 1.5.15

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/dist/API.d.ts CHANGED
@@ -42,7 +42,7 @@ export declare class API {
42
42
  deviceGroup(id: number): APIResourceDeviceGroup;
43
43
  deviceGroups(): APIList<any, CollectionQueryParams, any>;
44
44
  devices(): APIListDevices;
45
- deviceSession(id: number): APIResourceDeviceSession;
45
+ deviceSession(id: number): APIResourceDeviceSession<import("./models").SessionQueryParams>;
46
46
  deviceSessions(): APIList<any, CollectionQueryParams, any>;
47
47
  deviceStatistics(): APIList<any, CollectionQueryParams, any>;
48
48
  enums(): APIResource<any, import("./api/models/HTTP").QueryParams, import("./api/models/HTTP").QueryParams>;
@@ -4,7 +4,8 @@ import { APIEntity } from './APIEntity';
4
4
  import { APIOrder, CollectionBasicQueryParams, CollectionQueryParams, CollectionResponse, NoQueryParams, SimpleCollectionResponse } from './models/HTTP';
5
5
  export declare const DEFAULT_LIMIT: number;
6
6
  export declare const DEFAULT_OFFSET: number;
7
- export declare class APIList<RESPONSE = any, QUERY_PARAMS extends CollectionBasicQueryParams | CollectionQueryParams | NoQueryParams = CollectionQueryParams, DATA = any> extends APIEntity<CollectionResponse<RESPONSE> | SimpleCollectionResponse<RESPONSE>, QUERY_PARAMS, DATA> {
7
+ export type APIListQuery = CollectionBasicQueryParams | CollectionQueryParams | NoQueryParams;
8
+ export declare class APIList<RESPONSE = any, QUERY_PARAMS extends APIListQuery = CollectionQueryParams, DATA = any> extends APIEntity<CollectionResponse<RESPONSE> | SimpleCollectionResponse<RESPONSE>, QUERY_PARAMS, DATA> {
8
9
  create(data: DATA): Promise<AxiosResponse<RESPONSE>>;
9
10
  sort(name: string, order?: APIOrder): this;
10
11
  limit(limit?: number): this;
@@ -1,9 +1,9 @@
1
+ import { NoData } from './models/HTTP';
2
+ import { TestCaseRun } from './models/TestCaseRun';
3
+ import APIList, { APIListQuery } from './APIList';
1
4
  import { SessionQueryParams } from './models/DeviceSession';
2
- import { NoData, NoQueryParams } from './models/HTTP';
3
- import APIList from './APIList';
4
5
  import APIResourceDeviceSessionCommon from './APIResourceDeviceSessionCommon';
5
- import { TestCaseRun } from './models/TestCaseRun';
6
- export declare class APIListTestCaseRuns extends APIList<TestCaseRun, SessionQueryParams | NoQueryParams, NoData> {
6
+ export declare class APIListTestCaseRuns<Q extends APIListQuery = SessionQueryParams> extends APIList<TestCaseRun, Q, NoData> {
7
7
  constructor(parent: APIResourceDeviceSessionCommon);
8
8
  }
9
9
  export default APIListTestCaseRuns;
@@ -1,9 +1,11 @@
1
1
  import { APIResource } from './APIResource';
2
2
  import { APIResourceDeviceSessionCommon } from './APIResourceDeviceSessionCommon';
3
- import { DeviceSession } from './interface/DeviceSession';
4
- import { DeviceSession as DeviceSessionModel } from './models/DeviceSession';
5
- export declare class APIResourceDeviceSession extends APIResourceDeviceSessionCommon implements DeviceSession {
3
+ import { DeviceSession as DeviceSessionModel, SessionQueryParams } from './models/DeviceSession';
4
+ import APIListTestCaseRuns from './APIListTestCaseRuns';
5
+ import { APIListQuery } from './APIList';
6
+ export declare class APIResourceDeviceSession<QUERY_PARAMS extends APIListQuery = SessionQueryParams> extends APIResourceDeviceSessionCommon {
6
7
  abort(): APIResource<DeviceSessionModel, import("..").QueryParams, import("..").QueryParams>;
7
8
  retry(): APIResource<DeviceSessionModel, import("..").QueryParams, import("..").QueryParams>;
9
+ testCaseRuns(): APIListTestCaseRuns<QUERY_PARAMS>;
8
10
  }
9
11
  export default APIResourceDeviceSession;
@@ -8,7 +8,6 @@ import { DeviceSessionCommon } from './interface/DeviceSessionCommon';
8
8
  import { DeviceSession, DeviceSessionCommand, DeviceSessionStep, SessionRunStepQueryParams, SessionStepQueryParams } from './models/DeviceSession';
9
9
  import { CollectionBasicQueryParams, NoQueryParams } from './models/HTTP';
10
10
  import APIListScreenshots from './APIListScreenshots';
11
- import APIListTestCaseRuns from './APIListTestCaseRuns';
12
11
  export declare class APIResourceDeviceSessionCommon extends APIResource<DeviceSession> implements DeviceSessionCommon {
13
12
  constructor(parent: APIEntity<any> | API, id: number);
14
13
  commands(): APIList<DeviceSessionCommand, import("./models/HTTP").CollectionQueryParams, any>;
@@ -17,10 +16,9 @@ export declare class APIResourceDeviceSessionCommon extends APIResource<DeviceSe
17
16
  release(): APIResource<DeviceSession, NoQueryParams, void>;
18
17
  screenshots(): APIListScreenshots;
19
18
  screenshot(id: number): APIResource<any, import("./models/HTTP").QueryParams, import("./models/HTTP").QueryParams>;
20
- steps(): APIList<DeviceSessionStep, SessionRunStepQueryParams | SessionStepQueryParams | CollectionBasicQueryParams, void>;
19
+ steps(): APIList<DeviceSessionStep, CollectionBasicQueryParams | SessionRunStepQueryParams | SessionStepQueryParams, void>;
21
20
  step(id: number | 'current'): APIResource<DeviceSessionStep, NoQueryParams, void>;
22
21
  currentStep(): APIResource<DeviceSessionStep, NoQueryParams, void>;
23
- testCaseRuns(): APIListTestCaseRuns;
24
22
  connections(): APIList<any, import("./models/HTTP").CollectionQueryParams, any>;
25
23
  logs(): APIResource<any, import("./models/HTTP").QueryParams, import("./models/HTTP").QueryParams>;
26
24
  clusterLogs(): APIResource<any, import("./models/HTTP").QueryParams, import("./models/HTTP").QueryParams>;
@@ -1,6 +1,7 @@
1
1
  import { APIResourceDeviceSession } from './APIResourceDeviceSession';
2
2
  import { APIResourceRunCommon } from './APIResourceRunCommon';
3
+ import { CollectionQueryParams } from './models/HTTP';
3
4
  export declare class APIResourceRun extends APIResourceRunCommon {
4
- deviceSession(id: number): APIResourceDeviceSession;
5
+ deviceSession(id: number): APIResourceDeviceSession<CollectionQueryParams>;
5
6
  }
6
7
  export default APIResourceRun;
@@ -1,9 +1,8 @@
1
1
  import { APIList } from '../APIList';
2
2
  import { APIResource } from '../APIResource';
3
- import { DeviceSessionCommand, DeviceSessionStep, SessionQueryParams } from '../models/DeviceSession';
3
+ import { DeviceSessionCommand, DeviceSessionStep } from '../models/DeviceSession';
4
4
  import { NoData, NoQueryParams } from '../models/HTTP';
5
5
  import { Screenshot } from '../models/Screenshot';
6
- import { TestCaseRun } from '../models/TestCaseRun';
7
6
  import { DeviceSessionBase } from './DeviceSessionBase';
8
7
  export interface DeviceSessionCommon extends DeviceSessionBase {
9
8
  commands(): APIList<DeviceSessionCommand>;
@@ -12,6 +11,5 @@ export interface DeviceSessionCommon extends DeviceSessionBase {
12
11
  steps(): APIList<DeviceSessionStep>;
13
12
  step(id: number | 'current'): APIResource<DeviceSessionStep, NoQueryParams, NoData>;
14
13
  currentStep(): APIResource<DeviceSessionStep, NoQueryParams, NoData>;
15
- testCaseRuns(): APIList<TestCaseRun, SessionQueryParams | NoQueryParams, NoData>;
16
14
  }
17
15
  export default DeviceSessionCommon;
@@ -4,6 +4,7 @@ import { APIListDevices as OriginAPIListDevices } from './APIListDevices';
4
4
  import { APIListFiles as OriginAPIListFiles } from './APIListFiles';
5
5
  import { APIListOutputFiles as OriginAPIListOutputFiles } from './APIListOutputFiles';
6
6
  import { APIListScreenshots as OriginAPIListScreenshots } from './APIListScreenshots';
7
+ import { APIListTestCaseRuns as OriginAPIListTestCaseRuns } from './APIListTestCaseRuns';
7
8
  import { APIListTestRunDeviceSessions as OriginAPIListTestRunDeviceSessions } from './APIListTestRunDeviceSessions';
8
9
  import { APIListNotifications as OriginAPIListNotifications } from './APIListNotifications';
9
10
  import { APIListProperties as OriginAPIListProperties } from './APIListProperties';
@@ -17,6 +18,7 @@ export type APIListDevices = InstanceType<typeof OriginAPIListDevices>;
17
18
  export type APIListFiles = InstanceType<typeof OriginAPIListFiles>;
18
19
  export type APIListOutputFiles = InstanceType<typeof OriginAPIListOutputFiles>;
19
20
  export type APIListScreenshots = InstanceType<typeof OriginAPIListScreenshots>;
21
+ export type APIListTestCaseRuns = InstanceType<typeof OriginAPIListTestCaseRuns>;
20
22
  export type APIListTestRunDeviceSessions = InstanceType<typeof OriginAPIListTestRunDeviceSessions>;
21
23
  export type APIListNotifications = InstanceType<typeof OriginAPIListNotifications>;
22
24
  export type APIListProperties = InstanceType<typeof OriginAPIListProperties>;
@@ -1,11 +1,11 @@
1
- /* @bitbar/cloud-api-client v1.5.14 | Copyright 2025 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */
1
+ /* @bitbar/cloud-api-client v1.5.15 | Copyright 2025 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@bitbar/finka'), require('qs'), require('node-abort-controller')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', '@bitbar/finka', 'qs', 'node-abort-controller'], factory) :
5
5
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["bitbar-cloud-api-client"] = {}, global["@bitbar/finka"], global.qs, global["node-abort-controller"]));
6
6
  })(this, (function (exports, finka, qs, nodeAbortController) { 'use strict';
7
7
 
8
- var version = "1.5.14";
8
+ var version = "1.5.15";
9
9
 
10
10
  /******************************************************************************
11
11
  Copyright (c) Microsoft Corporation.
@@ -693,13 +693,6 @@
693
693
  }
694
694
  }
695
695
 
696
- class APIListTestCaseRuns extends APIList {
697
- constructor(parent) {
698
- super(parent);
699
- this.push('test-case-runs');
700
- }
701
- }
702
-
703
696
  class APIResourceDeviceSessionCommon extends APIResource {
704
697
  constructor(parent, id) {
705
698
  if (id == null) {
@@ -741,9 +734,6 @@
741
734
  currentStep() {
742
735
  return this.step('current');
743
736
  }
744
- testCaseRuns() {
745
- return new APIListTestCaseRuns(this);
746
- }
747
737
  connections() {
748
738
  return new APIList(this).push('connections');
749
739
  }
@@ -1057,6 +1047,13 @@
1057
1047
  }
1058
1048
  }
1059
1049
 
1050
+ class APIListTestCaseRuns extends APIList {
1051
+ constructor(parent) {
1052
+ super(parent);
1053
+ this.push('test-case-runs');
1054
+ }
1055
+ }
1056
+
1060
1057
  class APIResourceDeviceSession extends APIResourceDeviceSessionCommon {
1061
1058
  abort() {
1062
1059
  return new APIResource(this).push('abort').post();
@@ -1064,6 +1061,9 @@
1064
1061
  retry() {
1065
1062
  return new APIResource(this).push('retry').post();
1066
1063
  }
1064
+ testCaseRuns() {
1065
+ return new APIListTestCaseRuns(this);
1066
+ }
1067
1067
  }
1068
1068
 
1069
1069
  class APIListTestRunDeviceSessions extends APIList {