@bitbar/cloud-api-client 1.0.26 → 1.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.
@@ -1,10 +1,9 @@
1
1
  import { API } from '../API';
2
2
  import { APIList } from './APIList';
3
3
  import { CollectionQueryParams } from './models/HTTP';
4
- import { AppBansQueryParams, Property, PropertyData } from './models/Property';
4
+ import { Property, PropertyData } from './models/Property';
5
5
  export declare class APIListProperties extends APIList<Property, CollectionQueryParams, PropertyData> {
6
6
  constructor(parent: API);
7
- appBan(id: number): APIList<Property, AppBansQueryParams, AppBansQueryParams>;
8
7
  maintenance(): APIList<any, CollectionQueryParams, any>;
9
8
  }
10
9
  export default APIListProperties;
@@ -3,10 +3,17 @@ import { APIResource } from './APIResource';
3
3
  import { Account } from './models/Account';
4
4
  import { AccountConcurrencyStatusMap } from './models/AccountConcurrencyStatusMap';
5
5
  import { AccountPreferences } from './models/AccountPreference';
6
- import { NoQueryParams, SimpleCollectionResponse } from './models/HTTP';
6
+ import { CollectionBasicQueryParams, NoQueryParams, SimpleCollectionResponse } from './models/HTTP';
7
+ import { User, UserData } from './models/User';
8
+ import { APIList } from './APIList';
7
9
  export declare class APIResourceAccount extends APIResource<Account> {
8
10
  constructor(parent: API, id: number);
9
11
  concurrencyStatus(): APIResource<AccountConcurrencyStatusMap, NoQueryParams, void>;
10
12
  preferences(): APIResource<AccountPreferences, NoQueryParams, SimpleCollectionResponse<AccountPreferences>>;
13
+ users(): APIList<User, CollectionBasicQueryParams, UserData>;
14
+ removeUser(id: number): APIResource<User, NoQueryParams, void>;
15
+ disableUser(id: number): APIResource<User, NoQueryParams, void>;
16
+ enableUser(id: number): APIResource<User, NoQueryParams, void>;
17
+ resendActivation(id: number): APIResource<User, NoQueryParams, void>;
11
18
  }
12
19
  export default APIResourceAccount;
@@ -5,7 +5,7 @@ import { APIResource } from './APIResource';
5
5
  import { InputFileset } from './class/InputFileset';
6
6
  import { OutputFileset } from './class/OutputFileset';
7
7
  import { DeviceSessionCommon } from './interface/DeviceSessionCommon';
8
- import { DeviceSession, DeviceSessionCommand, DeviceSessionStep, SessionQueryParams, SessionRunStepQueryParams, SessionStepQueryParams } from './models/DeviceSession';
8
+ import { DeviceSession, DeviceSessionCommand, DeviceSessionRelease, DeviceSessionStep, SessionQueryParams, SessionRunStepQueryParams, SessionStepQueryParams } from './models/DeviceSession';
9
9
  import { CollectionBasicQueryParams, NoQueryParams } from './models/HTTP';
10
10
  import { Screenshot } from './models/Screenshot';
11
11
  import { TestCaseRun } from './models/TestCaseRun';
@@ -14,7 +14,7 @@ export declare class APIResourceDeviceSessionCommon extends APIResource<DeviceSe
14
14
  commands(): APIList<DeviceSessionCommand, import("./models/HTTP").CollectionQueryParams, any>;
15
15
  input(): InputFileset;
16
16
  output(): OutputFileset;
17
- release(): APIResource<DeviceSession, NoQueryParams, void>;
17
+ release(): APIResource<DeviceSession, NoQueryParams, DeviceSessionRelease>;
18
18
  screenshots(): APIList<Screenshot, SessionQueryParams | SessionRunStepQueryParams | SessionStepQueryParams, void>;
19
19
  screenshot(id: number): APIResource<any, import("./models/HTTP").QueryParams, import("./models/HTTP").QueryParams>;
20
20
  steps(): APIList<DeviceSessionStep, SessionRunStepQueryParams | SessionStepQueryParams | CollectionBasicQueryParams, void>;
@@ -43,6 +43,7 @@ export declare class APIResourceUser extends APIResource<User> {
43
43
  deviceGroup(id: number): APIResourceDeviceGroup;
44
44
  deviceSessions(): APIList<DeviceSession, DeviceSessionQueryParams, DeviceSessionData>;
45
45
  deviceSession(id: number): APIResourceDeviceSessionStandalone;
46
+ markAccountOwner(): APIResource<User, NoQueryParams, void>;
46
47
  projects(): APIList<Project, UserProjectQueryParams, UserProjectData>;
47
48
  project(id: number): APIResourceProject;
48
49
  files(): APIListFiles;
@@ -1,17 +1,12 @@
1
- import { APIList } from './APIList';
2
1
  import { APIResource } from './APIResource';
3
- import { APIResourceAdditionalUser } from './APIResourceAdditionalUser';
4
2
  import { APIResourceUser } from './APIResourceUser';
5
3
  import { Account } from './models/Account';
6
4
  import { AccountServicePayment } from './models/AccountServicePayment';
7
5
  import { BillingPeriodQueryParams } from './models/BillingPeriod';
8
- import { CollectionBasicQueryParams, NoQueryParams } from './models/HTTP';
9
- import { User, UserData } from './models/User';
6
+ import { NoQueryParams } from './models/HTTP';
10
7
  import { VisualTestAccess } from './models/VisualTest';
11
8
  export declare class APIUserResourceAccount extends APIResource<Account> {
12
9
  constructor(parent: APIResourceUser);
13
- additionalUsers(): APIList<User, CollectionBasicQueryParams, UserData>;
14
- additionalUser(id: number): APIResourceAdditionalUser;
15
10
  serviceBillingPeriod(id: number): APIResource<AccountServicePayment, BillingPeriodQueryParams, void>;
16
11
  visualTestAccess(): APIResource<VisualTestAccess, NoQueryParams, VisualTestAccess>;
17
12
  }
@@ -4,7 +4,5 @@ export declare type Account = {
4
4
  createTime: number;
5
5
  dedicatedDevicesCount: number;
6
6
  id: number;
7
- mainUserEmail: string;
8
- mainUserFirstName: string;
9
- mainUserLastName: string;
7
+ name: string;
10
8
  };
@@ -1,4 +1,14 @@
1
+ declare type ConcurrencyDetails = {
2
+ accountConcurrency: number;
3
+ runningSessions: number;
4
+ sessions: number;
5
+ unlimitedConcurrency: boolean;
6
+ usedBy: Array<string>;
7
+ waitingSessions: number;
8
+ };
1
9
  export declare type AccountConcurrencyStatusMap = {
2
10
  id: number;
3
- mainUserEmail: string;
11
+ AUTOMATIC: ConcurrencyDetails;
12
+ MANUAL: ConcurrencyDetails;
4
13
  };
14
+ export {};
@@ -33,6 +33,7 @@ export declare type ServicePaymentStatus = {
33
33
  };
34
34
  export declare type AccountService = {
35
35
  accountId: number;
36
+ accountName: string;
36
37
  activatedById: number;
37
38
  activatedByName: string;
38
39
  active: boolean;
@@ -57,7 +58,6 @@ export declare type AccountService = {
57
58
  total: number;
58
59
  unit: ServiceUnit;
59
60
  unitCount: number;
60
- userEmail: string;
61
61
  userId: number;
62
62
  vatRate: number;
63
63
  };
@@ -19,6 +19,7 @@ export declare enum DeviceState {
19
19
  }
20
20
  export declare type AdminDevice = {
21
21
  accountId: number;
22
+ accountName: string;
22
23
  cluster: unknown;
23
24
  comment: string;
24
25
  dedicationEndTime: number;
@@ -32,8 +33,6 @@ export declare type AdminDevice = {
32
33
  lastOnlineTime: number;
33
34
  location: string;
34
35
  locked: boolean;
35
- mainUserEmail: string;
36
- mainUserId: number;
37
36
  manufacturer: string;
38
37
  name: string;
39
38
  osType: OsType;
@@ -16,7 +16,6 @@ export declare type BillingPeriod = {
16
16
  endBillingPeriod: number;
17
17
  id: number;
18
18
  lastPaymentDate: number;
19
- mail: string;
20
19
  paid: boolean;
21
20
  paymentMethod: PaymentMethod;
22
21
  plan: string;
@@ -26,7 +25,6 @@ export declare type BillingPeriod = {
26
25
  subscriptionStart: number;
27
26
  totalPrice: number;
28
27
  usages: Array<BillingPeriodUsage>;
29
- userId: number;
30
28
  };
31
29
  export declare type BillingPeriodUsage = {
32
30
  billableSeconds: number;
@@ -35,6 +35,7 @@ export declare type SoftwareVersion = {
35
35
  };
36
36
  export declare type Device = {
37
37
  accountId: number;
38
+ accountName: string;
38
39
  available: boolean;
39
40
  browsers: CollectionResponse<Browser>;
40
41
  creditsPrice: number;
@@ -53,7 +54,6 @@ export declare type Device = {
53
54
  imageTop: number;
54
55
  imageWidth: number;
55
56
  locked: boolean;
56
- mainUserEmail: string;
57
57
  manufacturer: string;
58
58
  online: boolean;
59
59
  osType: OsType;
@@ -136,3 +136,6 @@ export interface SessionStepQueryParams extends SessionRunStepQueryParams {
136
136
  export interface TRunDeviceSessionQueryParams extends CollectionBasicQueryParams {
137
137
  projectId: number;
138
138
  }
139
+ export declare type DeviceSessionRelease = {
140
+ reason: string;
141
+ };
@@ -2,6 +2,7 @@ import { OsType } from './Enum';
2
2
  import { UserFile } from './UserFile';
3
3
  export declare type Framework = {
4
4
  accountId: number;
5
+ accountName: string;
5
6
  canRunFromUI: boolean;
6
7
  createTime: number;
7
8
  description: string;
@@ -11,7 +12,6 @@ export declare type Framework = {
11
12
  id: number;
12
13
  labelId: number;
13
14
  labelName: string;
14
- mainUserEmail: string;
15
15
  name: string;
16
16
  osType: OsType;
17
17
  queueWait: number;
@@ -1,4 +1,3 @@
1
- import { CollectionQueryParams } from './HTTP';
2
1
  export declare type Property = {
3
2
  description: string;
4
3
  fromTime: number;
@@ -11,7 +10,3 @@ export declare type Property = {
11
10
  value: string;
12
11
  };
13
12
  export declare type PropertyData = Pick<Property, 'description' | 'fromTime' | 'name' | 'toTime' | 'value'>;
14
- export interface AppBansQueryParams extends CollectionQueryParams {
15
- testRunId: number;
16
- }
17
- export declare type AppBansData = AppBansQueryParams;
@@ -1,3 +1,4 @@
1
+ import { Method } from 'axios';
1
2
  import { CollectionResponse } from './HTTP';
2
3
  export declare enum TestResult {
3
4
  PASSED = "PASSED",
@@ -5,18 +6,6 @@ export declare enum TestResult {
5
6
  SKIPPED = "SKIPPED",
6
7
  NOT_AVAILABLE = "NOT_AVAILABLE"
7
8
  }
8
- export declare enum TestStepType {
9
- ASSERTION = "ASSERTION",
10
- CLICK = "CLICK",
11
- CONFIG = "CONFIG",
12
- DRAG = "DRAG",
13
- INPUT = "INPUT",
14
- NAVIGATION = "NAVIGATION",
15
- OTHER = "OTHER",
16
- SCROLL = "SCROLL",
17
- UTIL = "UTIL",
18
- WAIT = "WAIT"
19
- }
20
9
  export declare type TestCaseRun = {
21
10
  className: string;
22
11
  createTime: number;
@@ -30,11 +19,12 @@ export declare type TestCaseRun = {
30
19
  suiteName: string;
31
20
  };
32
21
  export declare type TestCaseRunStep = {
33
- description: string;
34
22
  duration: number;
35
- errorMessage: string;
36
- fromActivity: string;
23
+ httpMethod: Uppercase<Method>;
37
24
  id: number;
38
- screenshots: any;
39
- type: TestStepType;
25
+ requestBody: string;
26
+ responseBody: string;
27
+ responseCode: number;
28
+ timestamp: number;
29
+ uri: string;
40
30
  };
@@ -27,12 +27,10 @@ export declare type User = {
27
27
  enabled: boolean;
28
28
  firstName: string;
29
29
  id: number;
30
- isMainUser: boolean;
30
+ isAccountOwner: boolean;
31
31
  lastLaunchedTestTime: number;
32
32
  lastLoginTime: number;
33
33
  lastName: string;
34
- mainUserEmail: string;
35
- mainUserId: number;
36
34
  mfaQRCodeUrl: string;
37
35
  mfaStatus: MfaStatus;
38
36
  organization: string;
@@ -2,7 +2,6 @@ import { APIResource as OriginAPIResource } from './APIResource';
2
2
  import { APIResourceAccessGroup as OriginAPIResourceAccessGroup } from './APIResourceAccessGroup';
3
3
  import { APIResourceAccount as OriginAPIResourceAccount } from './APIResourceAccount';
4
4
  import { APIResourceAccountService as OriginAPIResourceAccountService } from './APIResourceAccountService';
5
- import { APIResourceAdditionalUser as OriginAPIResourceAdditionalUser } from './APIResourceAdditionalUser';
6
5
  import { APIResourceBillingPeriod as OriginAPIResourceBillingPeriod } from './APIResourceBillingPeriod';
7
6
  import { APIResourceBroker as OriginAPIResourceBroker } from './APIResourceBroker';
8
7
  import { APIResourceChannel as OriginAPIResourceChannel } from './APIResourceChannel';
@@ -25,7 +24,6 @@ export declare type APIResource = InstanceType<typeof OriginAPIResource>;
25
24
  export declare type APIResourceAccessGroup = InstanceType<typeof OriginAPIResourceAccessGroup>;
26
25
  export declare type APIResourceAccount = InstanceType<typeof OriginAPIResourceAccount>;
27
26
  export declare type APIResourceAccountService = InstanceType<typeof OriginAPIResourceAccountService>;
28
- export declare type APIResourceAdditionalUser = InstanceType<typeof OriginAPIResourceAdditionalUser>;
29
27
  export declare type APIResourceBillingPeriod = InstanceType<typeof OriginAPIResourceBillingPeriod>;
30
28
  export declare type APIResourceBroker = InstanceType<typeof OriginAPIResourceBroker>;
31
29
  export declare type APIResourceChannel = InstanceType<typeof OriginAPIResourceChannel>;
@@ -1,4 +1,4 @@
1
- /* @bitbar/cloud-api-client v1.0.26 | Copyright 2024 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */
1
+ /* @bitbar/cloud-api-client v1.1.0 | Copyright 2024 (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('axios'), require('@bitbar/finka'), require('qs'), require('node-abort-controller')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'axios', '@bitbar/finka', 'qs', 'node-abort-controller'], factory) :
@@ -10,7 +10,7 @@
10
10
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
11
11
  var finka__default = /*#__PURE__*/_interopDefaultLegacy(finka);
12
12
 
13
- var version = "1.0.26";
13
+ var version = "1.1.0";
14
14
 
15
15
  /******************************************************************************
16
16
  Copyright (c) Microsoft Corporation.
@@ -1387,14 +1387,6 @@
1387
1387
  super(parent);
1388
1388
  this.push('properties');
1389
1389
  }
1390
- appBan(id) {
1391
- if (id == null) {
1392
- throw new Error('Resource ID cannot be null!');
1393
- }
1394
- return new APIList(this).push('app-bans').params({
1395
- testRunId: id
1396
- });
1397
- }
1398
1390
  maintenance() {
1399
1391
  return new APIList(this).params({
1400
1392
  filter: 'name_eq_CLOUD_HEADER_ANNOUNCEMENT',
@@ -1464,6 +1456,21 @@
1464
1456
  preferences() {
1465
1457
  return new APIResource(this).push('preferences');
1466
1458
  }
1459
+ users() {
1460
+ return new APIList(this).push('users');
1461
+ }
1462
+ removeUser(id) {
1463
+ return new APIResource(this).push('users', id);
1464
+ }
1465
+ disableUser(id) {
1466
+ return new APIResource(this).push('users', id, 'disable').post();
1467
+ }
1468
+ enableUser(id) {
1469
+ return new APIResource(this).push('users', id, 'enable').post();
1470
+ }
1471
+ resendActivation(id) {
1472
+ return new APIResource(this).push('users', id, 'resend-activation').post();
1473
+ }
1467
1474
  }
1468
1475
 
1469
1476
  class APIResourceBroker extends APIResource {
@@ -1623,30 +1630,11 @@
1623
1630
  }
1624
1631
  }
1625
1632
 
1626
- class APIResourceAdditionalUser extends APIResource {
1627
- constructor(parent, id) {
1628
- if (id == null) {
1629
- throw new Error('Resource ID cannot be null!');
1630
- }
1631
- super(parent);
1632
- this.push('additional-users', id);
1633
- }
1634
- resendActivation() {
1635
- return new APIResource(this).push('resend-activation');
1636
- }
1637
- }
1638
-
1639
1633
  class APIUserResourceAccount extends APIResource {
1640
1634
  constructor(parent) {
1641
1635
  super(parent);
1642
1636
  this.push('account');
1643
1637
  }
1644
- additionalUsers() {
1645
- return new APIList(this).push('additional-users');
1646
- }
1647
- additionalUser(id) {
1648
- return new APIResourceAdditionalUser(this, id);
1649
- }
1650
1638
  serviceBillingPeriod(id) {
1651
1639
  if (id == null) {
1652
1640
  throw new Error('Resource ID cannot be null!');
@@ -1713,6 +1701,9 @@
1713
1701
  deviceSession(id) {
1714
1702
  return new APIResourceDeviceSessionStandalone(this, id);
1715
1703
  }
1704
+ markAccountOwner() {
1705
+ return new APIResource(this).push('mark-account-owner').post();
1706
+ }
1716
1707
  projects() {
1717
1708
  return new APIList(this).push('projects');
1718
1709
  }
@@ -2228,19 +2219,6 @@
2228
2219
  TestResult["SKIPPED"] = "SKIPPED";
2229
2220
  TestResult["NOT_AVAILABLE"] = "NOT_AVAILABLE";
2230
2221
  })(exports.TestResult || (exports.TestResult = {}));
2231
- exports.TestStepType = void 0;
2232
- (function (TestStepType) {
2233
- TestStepType["ASSERTION"] = "ASSERTION";
2234
- TestStepType["CLICK"] = "CLICK";
2235
- TestStepType["CONFIG"] = "CONFIG";
2236
- TestStepType["DRAG"] = "DRAG";
2237
- TestStepType["INPUT"] = "INPUT";
2238
- TestStepType["NAVIGATION"] = "NAVIGATION";
2239
- TestStepType["OTHER"] = "OTHER";
2240
- TestStepType["SCROLL"] = "SCROLL";
2241
- TestStepType["UTIL"] = "UTIL";
2242
- TestStepType["WAIT"] = "WAIT";
2243
- })(exports.TestStepType || (exports.TestStepType = {}));
2244
2222
 
2245
2223
  exports.LimitationType = void 0;
2246
2224
  (function (LimitationType) {