Skip to content

Commit 678e397

Browse files
authored
Merge pull request #461 from piotrsapiejewskismartbear/master
SDCB-12198 add reason to session release call
2 parents e6037f6 + 8881209 commit 678e397

12 files changed

+38
-16
lines changed

dist/api/APIResourceDeviceSessionCommon.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { APIResource } from './APIResource';
55
import { InputFileset } from './class/InputFileset';
66
import { OutputFileset } from './class/OutputFileset';
77
import { DeviceSessionCommon } from './interface/DeviceSessionCommon';
8-
import { DeviceSession, DeviceSessionCommand, DeviceSessionRelease, DeviceSessionStep, SessionQueryParams, SessionRunStepQueryParams, SessionStepQueryParams } from './models/DeviceSession';
8+
import { DeviceSession, DeviceSessionCommand, DeviceSessionStep, SessionQueryParams, SessionRunStepQueryParams, SessionStepQueryParams } from './models/DeviceSession';
99
import { CollectionBasicQueryParams, NoQueryParams } from './models/HTTP';
1010
import { Screenshot } from './models/Screenshot';
1111
import { TestCaseRun } from './models/TestCaseRun';
@@ -14,7 +14,7 @@ export declare class APIResourceDeviceSessionCommon extends APIResource<DeviceSe
1414
commands(): APIList<DeviceSessionCommand, import("./models/HTTP").CollectionQueryParams, any>;
1515
input(): InputFileset;
1616
output(): OutputFileset;
17-
release(): APIResource<DeviceSession, NoQueryParams, DeviceSessionRelease>;
17+
release(): APIResource<DeviceSession, NoQueryParams, void>;
1818
screenshots(): APIList<Screenshot, SessionQueryParams | SessionRunStepQueryParams | SessionStepQueryParams, void>;
1919
screenshot(id: number): APIResource<any, import("./models/HTTP").QueryParams, import("./models/HTTP").QueryParams>;
2020
steps(): APIList<DeviceSessionStep, SessionRunStepQueryParams | SessionStepQueryParams | CollectionBasicQueryParams, void>;

dist/api/models/DeviceSession.d.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ export interface SessionStepQueryParams extends SessionRunStepQueryParams {
136136
export interface TRunDeviceSessionQueryParams extends CollectionBasicQueryParams {
137137
projectId: number;
138138
}
139+
export declare enum SessionReleaseReason {
140+
INACTIVITY = "INACTIVITY",
141+
TIMEOUT = "TIMEOUT",
142+
USER_ACTION = "USER_ACTION",
143+
CHANGE_DEVICE = "CHANGE_DEVICE",
144+
WEBSOCKET_CLOSED = "WEBSOCKET_CLOSED"
145+
}
139146
export declare type DeviceSessionRelease = {
140-
reason: string;
147+
reason: SessionReleaseReason;
141148
};

dist/api/models/Framework.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export declare type Framework = {
2626
skipQueue: boolean;
2727
type: string;
2828
};
29-
export declare type FrameworkData = Omit<Framework, 'createTime' | 'id' | 'labelName' | 'mainUserEmail' | 'sampleApp' | 'sampleTest'> & {
29+
export declare type FrameworkData = Omit<Framework, 'createTime' | 'id' | 'labelName' | 'accountName' | 'sampleApp' | 'sampleTest'> & {
3030
addLabelToDevices: boolean;
3131
roleIds: Array<number>;
3232
sampleAppId: number;

dist/bitbar-cloud-api-client.js

+10-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bitbar-cloud-api-client.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bitbar-cloud-api-client.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bitbar-cloud-api-client.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bitbar/cloud-api-client",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Bitbar Cloud API Client for JavaScript",
55
"main": "dist/bitbar-cloud-api-client.min.js",
66
"types": "dist/index.d.ts",

src/api/APIResourceDeviceSessionCommon.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {DeviceSessionCommon} from './interface/DeviceSessionCommon';
88
import {
99
DeviceSession,
1010
DeviceSessionCommand,
11-
DeviceSessionRelease,
1211
DeviceSessionStep,
1312
SessionQueryParams,
1413
SessionRunStepQueryParams,
@@ -49,7 +48,7 @@ export class APIResourceDeviceSessionCommon extends APIResource<DeviceSession> i
4948

5049
// /device-sessions/{id}/release
5150
release() {
52-
return new APIResource<DeviceSession, NoQueryParams, DeviceSessionRelease>(this).push('release').post();
51+
return new APIResource<DeviceSession, NoQueryParams, void>(this).push('release').post();
5352
}
5453

5554
// /device-sessions/{id}/screenshots

src/api/models/DeviceSession.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ export interface TRunDeviceSessionQueryParams extends CollectionBasicQueryParams
151151
projectId: number;
152152
}
153153

154+
export enum SessionReleaseReason {
155+
INACTIVITY = 'INACTIVITY',
156+
TIMEOUT = 'TIMEOUT',
157+
USER_ACTION = 'USER_ACTION',
158+
CHANGE_DEVICE = 'CHANGE_DEVICE',
159+
WEBSOCKET_CLOSED = 'WEBSOCKET_CLOSED'
160+
}
161+
154162
export type DeviceSessionRelease = {
155-
reason: string;
163+
reason: SessionReleaseReason;
156164
}

src/api/models/Framework.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type Framework = {
2828
type: string;
2929
}
3030

31-
export type FrameworkData = Omit<Framework, 'createTime' | 'id' | 'labelName' | 'mainUserEmail' | 'sampleApp' |
31+
export type FrameworkData = Omit<Framework, 'createTime' | 'id' | 'labelName' | 'accountName' | 'sampleApp' |
3232
'sampleTest'> & {
3333
addLabelToDevices: boolean;
3434
roleIds: Array<number>;

0 commit comments

Comments
 (0)