@virusis/api-client 0.1.6 → 0.1.8

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.
@@ -5121,6 +5121,14 @@ export interface ITrialAuthClient extends IEntity {
5121
5121
  * @return OK
5122
5122
  */
5123
5123
  me(signal?: AbortSignal): Promise<any>;
5124
+ /**
5125
+ * @return OK
5126
+ */
5127
+ refresh(signal?: AbortSignal): Promise<any>;
5128
+ /**
5129
+ * @return OK
5130
+ */
5131
+ logout(signal?: AbortSignal): Promise<any>;
5124
5132
  }
5125
5133
  export declare class TrialAuthClient extends BaseApiClient implements ITrialAuthClient {
5126
5134
  private http;
@@ -5140,6 +5148,16 @@ export declare class TrialAuthClient extends BaseApiClient implements ITrialAuth
5140
5148
  */
5141
5149
  me(signal?: AbortSignal): Promise<any>;
5142
5150
  protected processMe(response: Response): Promise<any>;
5151
+ /**
5152
+ * @return OK
5153
+ */
5154
+ refresh(signal?: AbortSignal): Promise<any>;
5155
+ protected processRefresh(response: Response): Promise<any>;
5156
+ /**
5157
+ * @return OK
5158
+ */
5159
+ logout(signal?: AbortSignal): Promise<any>;
5160
+ protected processLogout(response: Response): Promise<any>;
5143
5161
  }
5144
5162
  export interface ITrialUserOperationClaimsClient extends IEntity {
5145
5163
  /**
@@ -18348,6 +18348,76 @@ export class TrialAuthClient extends BaseApiClient {
18348
18348
  }
18349
18349
  return Promise.resolve(null);
18350
18350
  }
18351
+ /**
18352
+ * @return OK
18353
+ */
18354
+ refresh(signal) {
18355
+ let url_ = this.baseUrl + "/api/TrialAuth/Refresh";
18356
+ url_ = url_.replace(/[?&]$/, "");
18357
+ let options_ = {
18358
+ method: "POST",
18359
+ signal,
18360
+ headers: {}
18361
+ };
18362
+ return this.http.fetch(url_, options_).then((_response) => {
18363
+ return this.processRefresh(_response);
18364
+ });
18365
+ }
18366
+ processRefresh(response) {
18367
+ const status = response.status;
18368
+ let _headers = {};
18369
+ if (response.headers && response.headers.forEach) {
18370
+ response.headers.forEach((v, k) => _headers[k] = v);
18371
+ }
18372
+ ;
18373
+ if (status === 200) {
18374
+ return response.text().then((_responseText) => {
18375
+ const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
18376
+ return result200;
18377
+ });
18378
+ }
18379
+ else if (status !== 200 && status !== 204) {
18380
+ return response.text().then((_responseText) => {
18381
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
18382
+ });
18383
+ }
18384
+ return Promise.resolve(null);
18385
+ }
18386
+ /**
18387
+ * @return OK
18388
+ */
18389
+ logout(signal) {
18390
+ let url_ = this.baseUrl + "/api/TrialAuth/Logout";
18391
+ url_ = url_.replace(/[?&]$/, "");
18392
+ let options_ = {
18393
+ method: "POST",
18394
+ signal,
18395
+ headers: {}
18396
+ };
18397
+ return this.http.fetch(url_, options_).then((_response) => {
18398
+ return this.processLogout(_response);
18399
+ });
18400
+ }
18401
+ processLogout(response) {
18402
+ const status = response.status;
18403
+ let _headers = {};
18404
+ if (response.headers && response.headers.forEach) {
18405
+ response.headers.forEach((v, k) => _headers[k] = v);
18406
+ }
18407
+ ;
18408
+ if (status === 200) {
18409
+ return response.text().then((_responseText) => {
18410
+ const result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
18411
+ return result200;
18412
+ });
18413
+ }
18414
+ else if (status !== 200 && status !== 204) {
18415
+ return response.text().then((_responseText) => {
18416
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
18417
+ });
18418
+ }
18419
+ return Promise.resolve(null);
18420
+ }
18351
18421
  }
18352
18422
  export class TrialUserOperationClaimsClient extends BaseApiClient {
18353
18423
  constructor(configuration, baseUrl, http) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virusis/api-client",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",