attlaz-client 1.47.0 → 1.47.2
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 +2 -0
- package/dist/Client.js +7 -2
- package/dist/Model/{ProviderToken.d.ts → ProviderToken/ProviderToken.d.ts} +2 -2
- package/dist/Model/ProviderToken/ProviderToken.js +12 -0
- package/dist/Model/ProviderToken/ProviderTokenAccessToken.d.ts +5 -0
- package/dist/Model/ProviderToken/ProviderTokenAccessToken.js +8 -0
- package/dist/Service/ProviderTokenEndpoint.d.ts +7 -0
- package/dist/Service/ProviderTokenEndpoint.js +16 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Model/ProviderToken.js +0 -24
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() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiRecord } from '
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
2
2
|
export declare class ProviderToken {
|
|
3
3
|
id: string;
|
|
4
4
|
state: string;
|
|
@@ -7,5 +7,5 @@ export declare class ProviderToken {
|
|
|
7
7
|
id: string;
|
|
8
8
|
icon: string | null;
|
|
9
9
|
} | null;
|
|
10
|
-
static parse(
|
|
10
|
+
static parse(rawToken: ApiRecord): ProviderToken;
|
|
11
11
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProviderToken } from '../Model/ProviderToken/ProviderToken.js';
|
|
2
|
+
import { ProviderTokenAccessToken } from '../Model/ProviderToken/ProviderTokenAccessToken.js';
|
|
3
|
+
import { Endpoint } from './Endpoint.js';
|
|
4
|
+
export declare class ProviderTokenEndpoint extends Endpoint {
|
|
5
|
+
getProviderToken(providerTokenId: string): Promise<ProviderToken | null>;
|
|
6
|
+
getProviderTokenAccessToken(providerTokenId: string): Promise<ProviderTokenAccessToken | null>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { QueryString } from '../Http/Data/QueryString.js';
|
|
2
|
+
import { ProviderToken } from '../Model/ProviderToken/ProviderToken.js';
|
|
3
|
+
import { ProviderTokenAccessToken } from '../Model/ProviderToken/ProviderTokenAccessToken.js';
|
|
4
|
+
import { Endpoint } from './Endpoint.js';
|
|
5
|
+
export class ProviderTokenEndpoint extends Endpoint {
|
|
6
|
+
async getProviderToken(providerTokenId) {
|
|
7
|
+
const queryString = new QueryString('/provider-tokens/' + providerTokenId);
|
|
8
|
+
const result = await this.requestObject(queryString, null, ProviderToken.parse);
|
|
9
|
+
return result.getData();
|
|
10
|
+
}
|
|
11
|
+
async getProviderTokenAccessToken(providerTokenId) {
|
|
12
|
+
const queryString = new QueryString('/provider-tokens/' + providerTokenId + '/access-token');
|
|
13
|
+
const result = await this.requestObject(queryString, null, ProviderTokenAccessToken.parse);
|
|
14
|
+
return result.getData();
|
|
15
|
+
}
|
|
16
|
+
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.47.
|
|
1
|
+
export declare const VERSION = "1.47.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.47.
|
|
1
|
+
export const VERSION = "1.47.1";
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export class ProviderToken {
|
|
2
|
-
id;
|
|
3
|
-
state;
|
|
4
|
-
details;
|
|
5
|
-
static parse(rawAdapter) {
|
|
6
|
-
// const adapter: Adapter = MetaDataWithIconAware.parseMetaData(new Adapter(), rawAdapter);
|
|
7
|
-
//
|
|
8
|
-
// // adapter.id = rawAdapter.id as string;
|
|
9
|
-
// // adapter.name = rawAdapter.name as string;
|
|
10
|
-
// // adapter.description = rawAdapter.description as string;
|
|
11
|
-
// adapter.vendor = rawAdapter.vendor as string;
|
|
12
|
-
//
|
|
13
|
-
// adapter.longDescription = rawAdapter.long_description as string | null;
|
|
14
|
-
// adapter.capabilities = rawAdapter.capabilities as unknown as string[];
|
|
15
|
-
//
|
|
16
|
-
// // adapter.icon = rawAdapter.icon as string;
|
|
17
|
-
// adapter.logo = MetaDataWithIconAware.parseIcon(rawAdapter.logo);
|
|
18
|
-
// adapter.type = rawAdapter.type as string;
|
|
19
|
-
// adapter.categoryIds = rawAdapter.categories as unknown as string[];
|
|
20
|
-
// adapter.docs = rawAdapter.docs as string | null;
|
|
21
|
-
// adapter.website = rawAdapter.website as string | null;
|
|
22
|
-
return rawAdapter;
|
|
23
|
-
}
|
|
24
|
-
}
|