attlaz-client 1.40.2 → 1.41.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 +25 -24
- package/dist/Client.js +28 -25
- package/dist/Http/OAuthClient.d.ts +4 -2
- package/dist/Http/OAuthClient.js +9 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/Client.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
+
import { OAuthClient } from './Http/OAuthClient.js';
|
|
1
2
|
import { OAuthClientToken } from './Http/OAuthClientToken.js';
|
|
2
|
-
import {
|
|
3
|
+
import { AccessTokenEndpoint } from './Service/AccessTokenEndpoint.js';
|
|
4
|
+
import { AdapterConnectionEndpoint } from './Service/AdapterConnectionEndpoint.js';
|
|
3
5
|
import { AdapterEndpoint } from './Service/AdapterEndpoint.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
|
|
9
|
-
import { UserEndpoint } from './Service/UserEndpoint.js';
|
|
6
|
+
import { ChannelEndpoint } from './Service/ChannelEndpoint.js';
|
|
7
|
+
import { CodeDeployEndpoint } from './Service/CodeDeployEndpoint.js';
|
|
8
|
+
import { CodeSourceStrategiesEndpoint } from './Service/CodeSourceStrategiesEndpoint.js';
|
|
9
|
+
import { CollectionsEndpoint } from './Service/CollectionsEndpoint.js';
|
|
10
10
|
import { ConfigEndpoint } from './Service/ConfigEndpoint.js';
|
|
11
|
-
import {
|
|
11
|
+
import { ConfigurationEndpoint } from './Service/ConfigurationEndpoint.js';
|
|
12
|
+
import { FirewallEndpoint } from './Service/FirewallEndpoint.js';
|
|
12
13
|
import { FlowEndpoint } from './Service/FlowEndpoint.js';
|
|
13
|
-
import { WorkspaceMemberEndpoint } from './Service/WorkspaceMemberEndpoint.js';
|
|
14
|
-
import { StorageEndpoint } from './Service/StorageEndpoint.js';
|
|
15
|
-
import { InboxEndpoint } from './Service/InboxEndpoint.js';
|
|
16
|
-
import { CodeDeployEndpoint } from './Service/CodeDeployEndpoint.js';
|
|
17
|
-
import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint.js';
|
|
18
|
-
import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint.js';
|
|
19
|
-
import { ChannelEndpoint } from './Service/ChannelEndpoint.js';
|
|
20
|
-
import { HealthAlertEndpoint } from './Service/HealthAlertEndpoint.js';
|
|
21
14
|
import { FlowRunEndpoint } from './Service/FlowRunEndpoint.js';
|
|
15
|
+
import { FlowRunRequestEndpoint } from './Service/FlowRunRequestEndpoint.js';
|
|
16
|
+
import { FlowRunStatsEndpoint } from './Service/FlowRunStatsEndpoint.js';
|
|
17
|
+
import { HealthAlertEndpoint } from './Service/HealthAlertEndpoint.js';
|
|
18
|
+
import { InboxEndpoint } from './Service/InboxEndpoint.js';
|
|
22
19
|
import { LogEndpoint } from './Service/LogEndpoint.js';
|
|
23
|
-
import { TriggerEndpoint } from './Service/TriggerEndpoint.js';
|
|
24
20
|
import { PlatformEndpoint } from './Service/PlatformEndpoint.js';
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
21
|
+
import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint.js';
|
|
22
|
+
import { ProjectEndpoint } from './Service/ProjectEndpoint.js';
|
|
23
|
+
import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
|
|
24
|
+
import { RunnerEndpoint } from './Service/RunnerEndpoint.js';
|
|
28
25
|
import { SearchEndpoint } from './Service/SearchEndpoint.js';
|
|
26
|
+
import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint.js';
|
|
27
|
+
import { StorageEndpoint } from './Service/StorageEndpoint.js';
|
|
28
|
+
import { SubscriberEndpoint } from './Service/SubscriberEndpoint.js';
|
|
29
|
+
import { TriggerEndpoint } from './Service/TriggerEndpoint.js';
|
|
29
30
|
import { UserActionEndpoint } from './Service/UserActionEndpoint.js';
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { ConfigurationEndpoint } from './Service/ConfigurationEndpoint.js';
|
|
31
|
+
import { UserEndpoint } from './Service/UserEndpoint.js';
|
|
32
|
+
import { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
|
|
33
|
+
import { WorkspaceMemberEndpoint } from './Service/WorkspaceMemberEndpoint.js';
|
|
34
34
|
export declare class Client {
|
|
35
35
|
private readonly endpoints;
|
|
36
36
|
private httpClient;
|
|
@@ -41,6 +41,7 @@ export declare class Client {
|
|
|
41
41
|
apiEndpoint: string | undefined;
|
|
42
42
|
});
|
|
43
43
|
setClientCredentials(clientId: string, clientSecret?: string): void;
|
|
44
|
+
setVersion(version: string | null): void;
|
|
44
45
|
getHttpClient(): OAuthClient;
|
|
45
46
|
authenticate(): Promise<boolean>;
|
|
46
47
|
authenticate(username: string, password: string): Promise<boolean>;
|
package/dist/Client.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
+
import { OAuthClient } from './Http/OAuthClient.js';
|
|
2
|
+
import { OAuthClientOptions } from './Http/OAuthClientOptions.js';
|
|
1
3
|
import { OAuthClientToken } from './Http/OAuthClientToken.js';
|
|
2
|
-
import {
|
|
4
|
+
import { AccessTokenEndpoint } from './Service/AccessTokenEndpoint.js';
|
|
5
|
+
import { AdapterConnectionEndpoint } from './Service/AdapterConnectionEndpoint.js';
|
|
3
6
|
import { AdapterEndpoint } from './Service/AdapterEndpoint.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
|
|
9
|
-
import { UserEndpoint } from './Service/UserEndpoint.js';
|
|
7
|
+
import { ChannelEndpoint } from './Service/ChannelEndpoint.js';
|
|
8
|
+
import { CodeDeployEndpoint } from './Service/CodeDeployEndpoint.js';
|
|
9
|
+
import { CodeSourceStrategiesEndpoint } from './Service/CodeSourceStrategiesEndpoint.js';
|
|
10
|
+
import { CollectionsEndpoint } from './Service/CollectionsEndpoint.js';
|
|
10
11
|
import { ConfigEndpoint } from './Service/ConfigEndpoint.js';
|
|
11
|
-
import {
|
|
12
|
+
import { ConfigurationEndpoint } from './Service/ConfigurationEndpoint.js';
|
|
13
|
+
import { FirewallEndpoint } from './Service/FirewallEndpoint.js';
|
|
12
14
|
import { FlowEndpoint } from './Service/FlowEndpoint.js';
|
|
13
|
-
import { WorkspaceMemberEndpoint } from './Service/WorkspaceMemberEndpoint.js';
|
|
14
|
-
import { StorageEndpoint } from './Service/StorageEndpoint.js';
|
|
15
|
-
import { InboxEndpoint } from './Service/InboxEndpoint.js';
|
|
16
|
-
import { CodeDeployEndpoint } from './Service/CodeDeployEndpoint.js';
|
|
17
|
-
import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint.js';
|
|
18
|
-
import { OAuthClientOptions } from './Http/OAuthClientOptions.js';
|
|
19
|
-
import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint.js';
|
|
20
|
-
import { ChannelEndpoint } from './Service/ChannelEndpoint.js';
|
|
21
|
-
import { HealthAlertEndpoint } from './Service/HealthAlertEndpoint.js';
|
|
22
15
|
import { FlowRunEndpoint } from './Service/FlowRunEndpoint.js';
|
|
16
|
+
import { FlowRunRequestEndpoint } from './Service/FlowRunRequestEndpoint.js';
|
|
17
|
+
import { FlowRunStatsEndpoint } from './Service/FlowRunStatsEndpoint.js';
|
|
18
|
+
import { HealthAlertEndpoint } from './Service/HealthAlertEndpoint.js';
|
|
19
|
+
import { InboxEndpoint } from './Service/InboxEndpoint.js';
|
|
23
20
|
import { LogEndpoint } from './Service/LogEndpoint.js';
|
|
24
|
-
import { TriggerEndpoint } from './Service/TriggerEndpoint.js';
|
|
25
21
|
import { PlatformEndpoint } from './Service/PlatformEndpoint.js';
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
22
|
+
import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint.js';
|
|
23
|
+
import { ProjectEndpoint } from './Service/ProjectEndpoint.js';
|
|
24
|
+
import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
|
|
25
|
+
import { RunnerEndpoint } from './Service/RunnerEndpoint.js';
|
|
29
26
|
import { SearchEndpoint } from './Service/SearchEndpoint.js';
|
|
27
|
+
import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint.js';
|
|
28
|
+
import { StorageEndpoint } from './Service/StorageEndpoint.js';
|
|
29
|
+
import { SubscriberEndpoint } from './Service/SubscriberEndpoint.js';
|
|
30
|
+
import { TriggerEndpoint } from './Service/TriggerEndpoint.js';
|
|
30
31
|
import { UserActionEndpoint } from './Service/UserActionEndpoint.js';
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
32
|
+
import { UserEndpoint } from './Service/UserEndpoint.js';
|
|
33
|
+
import { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
|
|
34
|
+
import { WorkspaceMemberEndpoint } from './Service/WorkspaceMemberEndpoint.js';
|
|
33
35
|
import { VERSION } from './version.js';
|
|
34
|
-
import { CollectionsEndpoint } from './Service/CollectionsEndpoint.js';
|
|
35
|
-
import { ConfigurationEndpoint } from './Service/ConfigurationEndpoint.js';
|
|
36
36
|
export class Client {
|
|
37
37
|
endpoints;
|
|
38
38
|
httpClient;
|
|
@@ -94,6 +94,9 @@ export class Client {
|
|
|
94
94
|
// TODO: do we need to create a new oauth client, or can we update with these credentials?
|
|
95
95
|
this.httpClient = new OAuthClient(options);
|
|
96
96
|
}
|
|
97
|
+
setVersion(version) {
|
|
98
|
+
this.httpClient.setVersion(version);
|
|
99
|
+
}
|
|
97
100
|
getHttpClient() {
|
|
98
101
|
return this.httpClient;
|
|
99
102
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { Headers } from './Data/Headers.js';
|
|
2
|
+
import { Parameters } from './Data/Parameters.js';
|
|
1
3
|
import { OAuthClientOptions } from './OAuthClientOptions.js';
|
|
2
4
|
import { OAuthClientToken } from './OAuthClientToken.js';
|
|
3
|
-
import { Parameters } from './Data/Parameters.js';
|
|
4
|
-
import { Headers } from './Data/Headers.js';
|
|
5
5
|
export declare class OAuthClient {
|
|
6
6
|
private readonly options;
|
|
7
7
|
private debug;
|
|
8
8
|
private axiosInstance;
|
|
9
9
|
private oathClientToken;
|
|
10
10
|
private refreshTokenPromise;
|
|
11
|
+
private version;
|
|
11
12
|
constructor(options: OAuthClientOptions);
|
|
12
13
|
authenticate(username: string, password: string): Promise<boolean>;
|
|
13
14
|
authenticate(): Promise<boolean>;
|
|
@@ -26,6 +27,7 @@ export declare class OAuthClient {
|
|
|
26
27
|
getDefaultHeaders(): Headers;
|
|
27
28
|
private initDefaultHeaders;
|
|
28
29
|
addDefaultHeader(header: string, value: string): void;
|
|
30
|
+
setVersion(version: string | null): void;
|
|
29
31
|
private isNodeEnvironment;
|
|
30
32
|
private tokenToOauthClientToken;
|
|
31
33
|
private getApiEndpointUrl;
|
package/dist/Http/OAuthClient.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { clientCredentials, ownerCredentials, refreshToken } from 'axios-oauth-client';
|
|
2
1
|
import axios from 'axios';
|
|
3
|
-
import {
|
|
2
|
+
import { clientCredentials, ownerCredentials, refreshToken } from 'axios-oauth-client';
|
|
4
3
|
import { JsonSerializable } from '../Model/JsonSerializable.js';
|
|
4
|
+
import { VERSION } from '../version.js';
|
|
5
5
|
import { ClientError } from './ClientError.js';
|
|
6
6
|
import { HttpClient } from './HttpClient.js';
|
|
7
7
|
import { HttpClientRequest } from './HttpClientRequest.js';
|
|
@@ -12,6 +12,7 @@ export class OAuthClient {
|
|
|
12
12
|
axiosInstance = null;
|
|
13
13
|
oathClientToken = null;
|
|
14
14
|
refreshTokenPromise = null;
|
|
15
|
+
version = null;
|
|
15
16
|
constructor(options) {
|
|
16
17
|
this.options = options;
|
|
17
18
|
this.initDefaultHeaders();
|
|
@@ -174,6 +175,9 @@ export class OAuthClient {
|
|
|
174
175
|
addDefaultHeader(header, value) {
|
|
175
176
|
this.defaultHeaders[header] = value;
|
|
176
177
|
}
|
|
178
|
+
setVersion(version) {
|
|
179
|
+
this.version = version;
|
|
180
|
+
}
|
|
177
181
|
isNodeEnvironment() {
|
|
178
182
|
return typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
|
|
179
183
|
}
|
|
@@ -202,6 +206,9 @@ export class OAuthClient {
|
|
|
202
206
|
const url = this.getApiEndpointUrl(action);
|
|
203
207
|
let requestData = new HttpClientRequest(url, method);
|
|
204
208
|
requestData.headers = this.getDefaultHeaders();
|
|
209
|
+
if (this.version !== null) {
|
|
210
|
+
requestData.setHeader('Attlaz-API-Version', this.version);
|
|
211
|
+
}
|
|
205
212
|
if ((method === 'POST' || method === 'DELETE' || method === 'PUT') && parameters !== null && parameters !== undefined) {
|
|
206
213
|
if (typeof parameters === 'object') {
|
|
207
214
|
requestData.body = JsonSerializable.stringify(parameters);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.41.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.41.0";
|