attlaz-client 1.12.1 → 1.12.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.
- package/dist/{Model/Error → Http}/ClientError.js +16 -13
- package/dist/Http/Data/QueryString.d.ts +2 -2
- package/dist/Http/HttpClient.js +1 -1
- package/dist/Http/OAuthClient.js +1 -1
- package/dist/Service/ChannelEndpoint.d.ts +1 -1
- package/dist/Service/ChannelEndpoint.js +1 -1
- package/dist/Service/FlowRunEndpoint.js +0 -5
- package/dist/Service/ProjectEndpoint.d.ts +1 -1
- package/dist/Service/SourcesAccountEndpoint.d.ts +1 -1
- package/dist/Service/SourcesAccountEndpoint.js +1 -1
- package/dist/Service/WorkspaceMemberEndpoint.d.ts +1 -1
- package/dist/Service/WorkspaceMemberEndpoint.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- /package/dist/{Model/Error → Http}/ClientError.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpClient } from '
|
|
1
|
+
import { HttpClient } from './HttpClient.js';
|
|
2
2
|
export class ClientError {
|
|
3
3
|
code;
|
|
4
4
|
name;
|
|
@@ -12,7 +12,6 @@ export class ClientError {
|
|
|
12
12
|
this.code = code;
|
|
13
13
|
}
|
|
14
14
|
static fromError(error) {
|
|
15
|
-
console.log(error);
|
|
16
15
|
if (error.body !== undefined && error.body !== null && error.body.error !== undefined && error.body.error !== null) {
|
|
17
16
|
error = error.body.error;
|
|
18
17
|
}
|
|
@@ -31,17 +30,21 @@ export class ClientError {
|
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
else if (error.code !== null && error.code !== undefined) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
switch (error.code) {
|
|
34
|
+
case 'EUNAVAILABLE':
|
|
35
|
+
clientError.code = HttpClient.HTTP_UNAVAILABLE;
|
|
36
|
+
break;
|
|
37
|
+
case 'EAUTH':
|
|
38
|
+
clientError.code = HttpClient.HTTP_UNAUTHORIZED;
|
|
39
|
+
break;
|
|
40
|
+
case 'ESTATUS':
|
|
41
|
+
if (error.message === 'HTTP status 503') {
|
|
42
|
+
clientError.code = HttpClient.HTTP_UNAVAILABLE;
|
|
43
|
+
}
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
console.warn('[Client error] Error code `' + error.code + '` not recognised');
|
|
47
|
+
clientError.code = error.code;
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
clientError.name = error.name;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CursorPagination } from '../../Model/Pagination/CursorPagination';
|
|
2
|
-
import { State } from '../../Model/State';
|
|
1
|
+
import { CursorPagination } from '../../Model/Pagination/CursorPagination.js';
|
|
2
|
+
import { State } from '../../Model/State.js';
|
|
3
3
|
export declare class QueryString {
|
|
4
4
|
private readonly command;
|
|
5
5
|
private parameters;
|
package/dist/Http/HttpClient.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fetch } from 'popsicle';
|
|
2
2
|
import { HttpClientResponse } from './HttpClientResponse.js';
|
|
3
|
-
import { ClientError } from '../Model/Error/ClientError.js';
|
|
4
3
|
import { VERSION } from '../version.js';
|
|
4
|
+
import { ClientError } from './ClientError.js';
|
|
5
5
|
export class HttpClient {
|
|
6
6
|
static HTTP_BAD_REQUEST = 400;
|
|
7
7
|
static HTTP_UNAUTHORIZED = 401;
|
package/dist/Http/OAuthClient.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ClientOAuth2 from 'client-oauth2';
|
|
2
|
-
import { ClientError } from '
|
|
2
|
+
import { ClientError } from './ClientError.js';
|
|
3
3
|
import { HttpClient } from './HttpClient.js';
|
|
4
4
|
import { HttpClientRequest } from './HttpClientRequest.js';
|
|
5
5
|
import { OAuthClientToken } from './OAuthClientToken.js';
|
|
@@ -2,7 +2,7 @@ import { Endpoint } from './Endpoint.js';
|
|
|
2
2
|
import { Channel } from '../Model/Messaging/Channel/Channel.js';
|
|
3
3
|
import { ChannelHistory } from '../Model/Messaging/ChannelHistory.js';
|
|
4
4
|
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
5
|
-
import { CursorPagination } from '../Model/Pagination/CursorPagination';
|
|
5
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
6
6
|
export declare class ChannelEndpoint extends Endpoint {
|
|
7
7
|
getById(channelId: string): Promise<Channel | null>;
|
|
8
8
|
getByWorkspace(workspaceId: string, pagination?: CursorPagination | null): Promise<CollectionResult<Channel>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Endpoint } from './Endpoint.js';
|
|
2
2
|
import { Channel } from '../Model/Messaging/Channel/Channel.js';
|
|
3
3
|
import { ChannelHistory } from '../Model/Messaging/ChannelHistory.js';
|
|
4
|
-
import { QueryString } from '../Http/Data/QueryString';
|
|
4
|
+
import { QueryString } from '../Http/Data/QueryString.js';
|
|
5
5
|
export class ChannelEndpoint extends Endpoint {
|
|
6
6
|
async getById(channelId) {
|
|
7
7
|
try {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Endpoint } from './Endpoint.js';
|
|
2
|
-
import { ClientError } from '../Model/Error/ClientError.js';
|
|
3
|
-
import { HttpClient } from '../Http/HttpClient.js';
|
|
4
2
|
import { FlowRun } from '../Model/Flow/FlowRun.js';
|
|
5
3
|
import { FlowRunSummary } from '../Model/Flow/FlowRunSummary.js';
|
|
6
4
|
import { FlowRunHistory } from '../Model/Flow/FlowRunHistory.js';
|
|
@@ -54,9 +52,6 @@ export class FlowRunEndpoint extends Endpoint {
|
|
|
54
52
|
return result.getData();
|
|
55
53
|
}
|
|
56
54
|
catch (error) {
|
|
57
|
-
if (error instanceof ClientError && error.code === HttpClient.HTTP_NOTFOUND) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
55
|
if (this.httpClient.isDebugEnabled()) {
|
|
61
56
|
console.error('Failed to load flow runs: ' + error);
|
|
62
57
|
}
|
|
@@ -2,7 +2,7 @@ import { Endpoint } from './Endpoint.js';
|
|
|
2
2
|
import { Project } from '../Model/Project/Project.js';
|
|
3
3
|
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
4
4
|
import { State } from '../Model/State.js';
|
|
5
|
-
import { CursorPagination } from '../Model/Pagination/CursorPagination';
|
|
5
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
6
6
|
export declare class ProjectEndpoint extends Endpoint {
|
|
7
7
|
getAll(): Promise<CollectionResult<Project>>;
|
|
8
8
|
getByWorkspace(workspaceId: string, pagination?: CursorPagination | null, states?: State[] | null): Promise<CollectionResult<Project>>;
|
|
@@ -4,7 +4,7 @@ import { CodeSource } from '../Model/Deployment/CodeSource.js';
|
|
|
4
4
|
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
5
5
|
import { SourcesAccountRepository } from '../Model/Deployment/SourcesAccountRepository.js';
|
|
6
6
|
import { SourcesAccountRepositoryBranch } from '../Model/Deployment/SourcesAccountRepositoryBranch.js';
|
|
7
|
-
import { CursorPagination } from '../Model/Pagination/CursorPagination';
|
|
7
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
8
8
|
export declare class SourcesAccountEndpoint extends Endpoint {
|
|
9
9
|
getAllCodeSources(workspaceId: string, pagination?: CursorPagination | null): Promise<CollectionResult<CodeSource>>;
|
|
10
10
|
getAllCodeSourceAccounts(workspaceId: string, pagination?: CursorPagination | null): Promise<CollectionResult<CodeSourceAccount>>;
|
|
@@ -5,7 +5,7 @@ import { CodeSource } from '../Model/Deployment/CodeSource.js';
|
|
|
5
5
|
import { HttpClient } from '../Http/HttpClient.js';
|
|
6
6
|
import { SourcesAccountRepository } from '../Model/Deployment/SourcesAccountRepository.js';
|
|
7
7
|
import { SourcesAccountRepositoryBranch } from '../Model/Deployment/SourcesAccountRepositoryBranch.js';
|
|
8
|
-
import { QueryString } from '../Http/Data/QueryString';
|
|
8
|
+
import { QueryString } from '../Http/Data/QueryString.js';
|
|
9
9
|
export class SourcesAccountEndpoint extends Endpoint {
|
|
10
10
|
async getAllCodeSources(workspaceId, pagination = null) {
|
|
11
11
|
const queryString = new QueryString('workspaces/' + workspaceId + '/codesources');
|
|
@@ -4,7 +4,7 @@ import { WorkspaceMember } from '../Model/Workspace/WorkspaceMember.js';
|
|
|
4
4
|
import { WorkspaceMemberInvite } from '../Model/Workspace/WorkspaceMemberInvite.js';
|
|
5
5
|
import { WorkspaceMemberInvite2 } from '../Model/Workspace/WorkspaceMemberInvite2.js';
|
|
6
6
|
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
7
|
-
import { CursorPagination } from '../Model/Pagination/CursorPagination';
|
|
7
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
8
8
|
export declare class WorkspaceMemberEndpoint extends Endpoint {
|
|
9
9
|
getByWorkspace(workspaceId: string, pagination?: CursorPagination | null): Promise<CollectionResult<WorkspaceMember>>;
|
|
10
10
|
invite(workspaceId: string, invites: WorkspaceMemberInvite[]): Promise<boolean>;
|
|
@@ -7,7 +7,7 @@ import { WorkspaceMember } from '../Model/Workspace/WorkspaceMember.js';
|
|
|
7
7
|
import { WorkspaceMemberRole } from '../Model/Workspace/WorkspaceMemberRole.js';
|
|
8
8
|
import { WorkspaceMemberInviteState } from '../Model/Workspace/WorkspaceMemberInviteState.js';
|
|
9
9
|
import { WorkspaceMemberInvite2 } from '../Model/Workspace/WorkspaceMemberInvite2.js';
|
|
10
|
-
import { QueryString } from '../Http/Data/QueryString';
|
|
10
|
+
import { QueryString } from '../Http/Data/QueryString.js';
|
|
11
11
|
export class WorkspaceMemberEndpoint extends Endpoint {
|
|
12
12
|
async getByWorkspace(workspaceId, pagination = null) {
|
|
13
13
|
const queryString = new QueryString('workspaces/' + workspaceId + '/members');
|
package/dist/index.d.ts
CHANGED
|
@@ -7,13 +7,13 @@ export { HttpClientResponse } from './Http/HttpClientResponse.js';
|
|
|
7
7
|
export { OAuthClient } from './Http/OAuthClient.js';
|
|
8
8
|
export { OAuthClientOptions } from './Http/OAuthClientOptions.js';
|
|
9
9
|
export { OAuthClientToken } from './Http/OAuthClientToken.js';
|
|
10
|
+
export { ClientError } from './Http/ClientError.js';
|
|
10
11
|
/**
|
|
11
12
|
* Models
|
|
12
13
|
*/
|
|
13
14
|
export { Adapter } from './Model/Adapter/Adapter.js';
|
|
14
15
|
export { AdapterConfiguration } from './Model/Adapter/AdapterConfiguration.js';
|
|
15
16
|
export { AdapterConnection } from './Model/Adapter/AdapterConnection.js';
|
|
16
|
-
export { ClientError } from './Model/Error/ClientError.js';
|
|
17
17
|
export { EventType } from './Model/Event/EventType.js';
|
|
18
18
|
export { HealthAlert } from './Model/HealthAlert/HealthAlert.js';
|
|
19
19
|
export { HealthAlertStatus } from './Model/HealthAlert/HealthAlertStatus.js';
|
package/dist/index.js
CHANGED
|
@@ -7,13 +7,13 @@ export { HttpClientResponse } from './Http/HttpClientResponse.js';
|
|
|
7
7
|
export { OAuthClient } from './Http/OAuthClient.js';
|
|
8
8
|
export { OAuthClientOptions } from './Http/OAuthClientOptions.js';
|
|
9
9
|
export { OAuthClientToken } from './Http/OAuthClientToken.js';
|
|
10
|
+
export { ClientError } from './Http/ClientError.js';
|
|
10
11
|
/**
|
|
11
12
|
* Models
|
|
12
13
|
*/
|
|
13
14
|
export { Adapter } from './Model/Adapter/Adapter.js';
|
|
14
15
|
export { AdapterConfiguration } from './Model/Adapter/AdapterConfiguration.js';
|
|
15
16
|
export { AdapterConnection } from './Model/Adapter/AdapterConnection.js';
|
|
16
|
-
export { ClientError } from './Model/Error/ClientError.js';
|
|
17
17
|
export { EventType } from './Model/Event/EventType.js';
|
|
18
18
|
export { HealthAlert } from './Model/HealthAlert/HealthAlert.js';
|
|
19
19
|
export { HealthAlertStatus } from './Model/HealthAlert/HealthAlertStatus.js';
|
package/dist/main.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.12.2";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.12.2";
|
package/package.json
CHANGED
|
File without changes
|