attlaz-client 1.47.2 → 1.47.3

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.
@@ -4,4 +4,5 @@ import { Endpoint } from './Endpoint.js';
4
4
  export declare class ProviderTokenEndpoint extends Endpoint {
5
5
  getProviderToken(providerTokenId: string): Promise<ProviderToken | null>;
6
6
  getProviderTokenAccessToken(providerTokenId: string): Promise<ProviderTokenAccessToken | null>;
7
+ revokeProviderToken(providerTokenId: string): Promise<boolean>;
7
8
  }
@@ -13,4 +13,22 @@ export class ProviderTokenEndpoint extends Endpoint {
13
13
  const result = await this.requestObject(queryString, null, ProviderTokenAccessToken.parse);
14
14
  return result.getData();
15
15
  }
16
+ async revokeProviderToken(providerTokenId) {
17
+ const queryString = new QueryString('/provider-tokens/' + providerTokenId);
18
+ try {
19
+ const parser = (raw) => ({ deleted: raw.deleted });
20
+ const result = await this.requestObject(queryString, null, parser, 'DELETE');
21
+ const re = result.getData();
22
+ if (re === null) {
23
+ throw new Error('Unable to revoke provider token: wrong response from API');
24
+ }
25
+ return re.deleted;
26
+ }
27
+ catch (e) {
28
+ if (this.httpClient.isDebugEnabled()) {
29
+ console.error('Failed to revoke provider token: ', e);
30
+ }
31
+ throw e;
32
+ }
33
+ }
16
34
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.47.1";
1
+ export declare const VERSION = "1.47.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.47.1";
1
+ export const VERSION = "1.47.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.47.2",
3
+ "version": "1.47.3",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",