attlaz-client 1.47.0 → 1.47.1
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.
package/dist/Client.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { PlatformEndpoint } from './Service/PlatformEndpoint.js';
|
|
|
21
21
|
import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint.js';
|
|
22
22
|
import { ProjectEndpoint } from './Service/ProjectEndpoint.js';
|
|
23
23
|
import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
|
|
24
|
+
import { ProviderTokenEndpoint } from './Service/ProviderTokenEndpoint.js';
|
|
24
25
|
import { RunnerEndpoint } from './Service/RunnerEndpoint.js';
|
|
25
26
|
import { RunnerPoolEndpoint } from './Service/RunnerPoolEndpoint.js';
|
|
26
27
|
import { SearchEndpoint } from './Service/SearchEndpoint.js';
|
|
@@ -84,6 +85,7 @@ export declare class Client {
|
|
|
84
85
|
getAccessTokenEndpoint(): AccessTokenEndpoint;
|
|
85
86
|
getCollectionsEndpoint(): CollectionsEndpoint;
|
|
86
87
|
getRunnerPoolEndpoint(): RunnerPoolEndpoint;
|
|
88
|
+
getProviderTokenEndpoint(): ProviderTokenEndpoint;
|
|
87
89
|
getFirewallEndpoint(): FirewallEndpoint;
|
|
88
90
|
private getEndpoint;
|
|
89
91
|
getVersion(): string;
|
package/dist/Client.js
CHANGED
|
@@ -22,6 +22,7 @@ import { PlatformEndpoint } from './Service/PlatformEndpoint.js';
|
|
|
22
22
|
import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint.js';
|
|
23
23
|
import { ProjectEndpoint } from './Service/ProjectEndpoint.js';
|
|
24
24
|
import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
|
|
25
|
+
import { ProviderTokenEndpoint } from './Service/ProviderTokenEndpoint.js';
|
|
25
26
|
import { RunnerEndpoint } from './Service/RunnerEndpoint.js';
|
|
26
27
|
import { RunnerPoolEndpoint } from './Service/RunnerPoolEndpoint.js';
|
|
27
28
|
import { SearchEndpoint } from './Service/SearchEndpoint.js';
|
|
@@ -69,7 +70,8 @@ export class Client {
|
|
|
69
70
|
WorkspaceEndpoint,
|
|
70
71
|
WorkspaceMemberEndpoint,
|
|
71
72
|
CollectionsEndpoint,
|
|
72
|
-
|
|
73
|
+
RunnerPoolEndpoint,
|
|
74
|
+
ProviderTokenEndpoint,
|
|
73
75
|
};
|
|
74
76
|
apiEndpoint = 'https://api.attlaz.com';
|
|
75
77
|
parseConfig(config) {
|
|
@@ -220,7 +222,10 @@ export class Client {
|
|
|
220
222
|
return this.getEndpoint('collections', this.Store.CollectionsEndpoint);
|
|
221
223
|
}
|
|
222
224
|
getRunnerPoolEndpoint() {
|
|
223
|
-
return this.getEndpoint('runner_pool', this.Store.
|
|
225
|
+
return this.getEndpoint('runner_pool', this.Store.RunnerPoolEndpoint);
|
|
226
|
+
}
|
|
227
|
+
getProviderTokenEndpoint() {
|
|
228
|
+
return this.getEndpoint('provider_token', this.Store.ProviderTokenEndpoint);
|
|
224
229
|
}
|
|
225
230
|
// TODO: this should be in a separate API?
|
|
226
231
|
getFirewallEndpoint() {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ProviderToken } from '../Model/ProviderToken.js';
|
|
2
|
+
import { Endpoint } from './Endpoint.js';
|
|
3
|
+
export declare class ProviderTokenEndpoint extends Endpoint {
|
|
4
|
+
getProviderToken(providerTokenId: string): Promise<ProviderToken | null>;
|
|
5
|
+
getProviderTokenAccessToken(providerTokenId: string): Promise<ProviderToken | null>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { QueryString } from '../Http/Data/QueryString.js';
|
|
2
|
+
import { ProviderToken } from '../Model/ProviderToken.js';
|
|
3
|
+
import { Endpoint } from './Endpoint.js';
|
|
4
|
+
export class ProviderTokenEndpoint extends Endpoint {
|
|
5
|
+
async getProviderToken(providerTokenId) {
|
|
6
|
+
const queryString = new QueryString('/provider-tokens/' + providerTokenId);
|
|
7
|
+
const result = await this.requestObject(queryString, null, ProviderToken.parse);
|
|
8
|
+
return result.getData();
|
|
9
|
+
}
|
|
10
|
+
async getProviderTokenAccessToken(providerTokenId) {
|
|
11
|
+
// TODO: further implement this
|
|
12
|
+
const queryString = new QueryString('/provider-tokens/' + providerTokenId + '/access-token');
|
|
13
|
+
const result = await this.requestObject(queryString, null, ProviderToken.parse);
|
|
14
|
+
return result.getData();
|
|
15
|
+
}
|
|
16
|
+
}
|