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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 8 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 10 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 2 deletions
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

0 commit comments

Comments
 (0)