@attlaz/client 1.80.0 → 1.82.0
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.js +7 -11
- package/dist/Http/OAuthClientOptions.d.ts +2 -2
- package/dist/Http/OAuthClientOptions.js +4 -1
- package/dist/Http/Transport/OAuthClient.d.ts +17 -1
- package/dist/Http/Transport/OAuthClient.js +59 -21
- package/dist/Model/AccessToken/UserAccessToken.d.ts +3 -2
- package/dist/Model/AccessToken/UserAccessToken.js +1 -1
- package/dist/Model/Adapter/AdapterCategory.d.ts +2 -1
- package/dist/Model/Adapter/AdapterConfiguration.d.ts +2 -1
- package/dist/Model/Adapter/AdapterConnectionEvent.d.ts +2 -1
- package/dist/Model/ApiRecord.d.ts +6 -1
- package/dist/Model/Collections/CollectionRecord.d.ts +2 -1
- package/dist/Model/Config.d.ts +2 -1
- package/dist/Model/Configuration/Configuration.d.ts +3 -2
- package/dist/Model/Deployment/CodeSourceBuildStrategy.d.ts +2 -1
- package/dist/Model/Deployment/CodeSourceRunStrategy.d.ts +3 -2
- package/dist/Model/Deployment/SourcesAccountRepository.d.ts +2 -1
- package/dist/Model/Deployment/SourcesAccountRepositoryBranch.d.ts +2 -1
- package/dist/Model/Flow/FlowRunStats.d.ts +2 -1
- package/dist/Model/Flow/FlowRunSummary.d.ts +2 -1
- package/dist/Model/Flow/FlowSummary.d.ts +2 -1
- package/dist/Model/HealthAlert/HealthAlert.d.ts +2 -1
- package/dist/Model/Inbox/InboxMessage.d.ts +2 -1
- package/dist/Model/Infrastructure/RunnerPool.d.ts +2 -1
- package/dist/Model/Log/Log.d.ts +2 -1
- package/dist/Model/Log/LogStreamInformation.d.ts +2 -1
- package/dist/Model/Messaging/Channel/Channel.d.ts +2 -1
- package/dist/Model/Messaging/ChannelHistory.d.ts +2 -1
- package/dist/Model/Project/PlatformLanguage.d.ts +2 -1
- package/dist/Model/Search/SearchResult.d.ts +2 -1
- package/dist/Model/Storage/StorageItem.d.ts +2 -1
- package/dist/Model/Storage/StorageItemInformation.d.ts +2 -1
- package/dist/Model/User/User.d.ts +2 -1
- package/dist/Model/User/UserAuthProvider.d.ts +2 -1
- package/dist/Model/Worker/Platform.d.ts +2 -1
- package/dist/Model/Worker/PlatformImage.d.ts +2 -1
- package/dist/Model/Workspace/WorkspaceMemberInvite2.d.ts +2 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/Client.js
CHANGED
|
@@ -83,7 +83,9 @@ export class Client {
|
|
|
83
83
|
}
|
|
84
84
|
const options = new OAuthClientOptions(this.apiEndpoint);
|
|
85
85
|
this.httpClient = new OAuthClient(options);
|
|
86
|
-
|
|
86
|
+
// An empty string is not a token — treat it as "no token" so callers like `new Client('')`
|
|
87
|
+
// (public/credentials clients that set the real token later) don't carry a bogus empty token.
|
|
88
|
+
if (token !== null && token !== '') {
|
|
87
89
|
const clientToken = new OAuthClientToken(token, 'Bearer', '', '');
|
|
88
90
|
this.httpClient.setToken(clientToken);
|
|
89
91
|
}
|
|
@@ -99,22 +101,16 @@ export class Client {
|
|
|
99
101
|
return client;
|
|
100
102
|
}
|
|
101
103
|
setClientCredentials(clientId, clientSecret = '') {
|
|
102
|
-
|
|
103
|
-
//
|
|
104
|
-
|
|
105
|
-
// TODO: do we need to create a new oauth client, or can we update with these credentials?
|
|
106
|
-
this.httpClient = new OAuthClient(options);
|
|
107
|
-
this.transport = this.httpClient;
|
|
104
|
+
// Store the credentials in place; the token (if any) is preserved and used while valid. When
|
|
105
|
+
// no valid token exists, the client mints one from these credentials on the next request.
|
|
106
|
+
this.httpClient.setClientCredentials(clientId, clientSecret, ['all']);
|
|
108
107
|
}
|
|
109
108
|
/**
|
|
110
109
|
* Configure this client as a public OAuth client (no client_secret).
|
|
111
110
|
* Used for SPAs and other public clients that cannot keep a secret.
|
|
112
111
|
*/
|
|
113
112
|
setPublicClient(clientId) {
|
|
114
|
-
|
|
115
|
-
options.scopes = ['all'];
|
|
116
|
-
this.httpClient = new OAuthClient(options);
|
|
117
|
-
this.transport = this.httpClient;
|
|
113
|
+
this.httpClient.setClientCredentials(clientId, null, ['all']);
|
|
118
114
|
}
|
|
119
115
|
setVersion(version) {
|
|
120
116
|
this.httpClient.setVersion(version);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare class OAuthClientOptions {
|
|
2
2
|
apiEndpoint: string;
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
clientId: string | null;
|
|
4
|
+
clientSecret: string | null;
|
|
5
5
|
accessTokenUri: string;
|
|
6
6
|
authorizationUri: string;
|
|
7
7
|
redirectUri: string;
|
|
@@ -7,7 +7,10 @@ export class OAuthClientOptions {
|
|
|
7
7
|
redirectUri = 'https://example.com/auth/github/callback';
|
|
8
8
|
scopes = [];
|
|
9
9
|
state = '';
|
|
10
|
-
constructor(apiEndpoint,
|
|
10
|
+
constructor(apiEndpoint,
|
|
11
|
+
// Mutable so client credentials can be updated in place (see OAuthClient.setClientCredentials)
|
|
12
|
+
// without recreating the client and losing its token.
|
|
13
|
+
clientId = null, clientSecret = null) {
|
|
11
14
|
this.apiEndpoint = apiEndpoint;
|
|
12
15
|
this.clientId = clientId;
|
|
13
16
|
this.clientSecret = clientSecret;
|
|
@@ -7,13 +7,29 @@ export declare class OAuthClient implements ITransport {
|
|
|
7
7
|
private readonly options;
|
|
8
8
|
private debug;
|
|
9
9
|
private oauthClientToken;
|
|
10
|
-
private
|
|
10
|
+
private tokenAcquisitionPromise;
|
|
11
11
|
private version;
|
|
12
12
|
private parseErrorHandler;
|
|
13
13
|
constructor(options: OAuthClientOptions);
|
|
14
14
|
authenticate(username: string, password: string): Promise<boolean>;
|
|
15
15
|
authenticate(): Promise<boolean>;
|
|
16
16
|
refreshToken(): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Update the client credentials in place — without recreating the client or touching the current
|
|
19
|
+
* token. Mirrors the PHP client: token and credentials are independent. A valid token keeps being
|
|
20
|
+
* used; the credentials are only the fallback to mint/renew a token when none is valid.
|
|
21
|
+
*/
|
|
22
|
+
setClientCredentials(clientId: string | null, clientSecret: string | null, scopes?: string[]): void;
|
|
23
|
+
/**
|
|
24
|
+
* Ensure a usable access token exists before a signed request. Token-first with credentials as a
|
|
25
|
+
* fallback (mirrors the PHP client's lazy authenticate()): a valid token is left untouched; an
|
|
26
|
+
* expired token carrying a refresh_token is refreshed; otherwise, if confidential client
|
|
27
|
+
* credentials are configured, a token is minted via the client_credentials grant. Single-flighted
|
|
28
|
+
* so concurrent requests share one acquisition.
|
|
29
|
+
*/
|
|
30
|
+
private ensureAccessToken;
|
|
31
|
+
private acquireToken;
|
|
32
|
+
private static hasRefreshToken;
|
|
17
33
|
private isPublicClient;
|
|
18
34
|
/**
|
|
19
35
|
* Performs an OAuth token request (password, client_credentials or refresh_token grant) and
|
|
@@ -9,7 +9,9 @@ export class OAuthClient {
|
|
|
9
9
|
options;
|
|
10
10
|
debug = false;
|
|
11
11
|
oauthClientToken = null;
|
|
12
|
-
|
|
12
|
+
// Single-flight guard for token acquisition (initial client-credentials auth or refresh), so
|
|
13
|
+
// concurrent requests share one in-flight acquisition instead of each hitting the token endpoint.
|
|
14
|
+
tokenAcquisitionPromise = null;
|
|
13
15
|
version = null;
|
|
14
16
|
parseErrorHandler = null;
|
|
15
17
|
constructor(options) {
|
|
@@ -93,6 +95,58 @@ export class OAuthClient {
|
|
|
93
95
|
throw ClientError.fromError(e);
|
|
94
96
|
}
|
|
95
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Update the client credentials in place — without recreating the client or touching the current
|
|
100
|
+
* token. Mirrors the PHP client: token and credentials are independent. A valid token keeps being
|
|
101
|
+
* used; the credentials are only the fallback to mint/renew a token when none is valid.
|
|
102
|
+
*/
|
|
103
|
+
setClientCredentials(clientId, clientSecret, scopes = ['all']) {
|
|
104
|
+
this.options.clientId = clientId;
|
|
105
|
+
this.options.clientSecret = clientSecret;
|
|
106
|
+
this.options.scopes = scopes;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Ensure a usable access token exists before a signed request. Token-first with credentials as a
|
|
110
|
+
* fallback (mirrors the PHP client's lazy authenticate()): a valid token is left untouched; an
|
|
111
|
+
* expired token carrying a refresh_token is refreshed; otherwise, if confidential client
|
|
112
|
+
* credentials are configured, a token is minted via the client_credentials grant. Single-flighted
|
|
113
|
+
* so concurrent requests share one acquisition.
|
|
114
|
+
*/
|
|
115
|
+
async ensureAccessToken() {
|
|
116
|
+
if (this.oauthClientToken !== null && !OAuthClientToken.isExpired(this.oauthClientToken)) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (this.tokenAcquisitionPromise === null) {
|
|
120
|
+
this.tokenAcquisitionPromise = this.acquireToken();
|
|
121
|
+
try {
|
|
122
|
+
await this.tokenAcquisitionPromise;
|
|
123
|
+
}
|
|
124
|
+
finally {
|
|
125
|
+
// Always clear, even on failure, so one failed acquisition doesn't poison every later
|
|
126
|
+
// request with the same rejected promise.
|
|
127
|
+
this.tokenAcquisitionPromise = null;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
await this.tokenAcquisitionPromise;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
async acquireToken() {
|
|
135
|
+
// Expired token that carries a refresh_token → refresh grant (keeps the existing session).
|
|
136
|
+
if (this.oauthClientToken !== null && OAuthClientToken.isExpired(this.oauthClientToken) && OAuthClient.hasRefreshToken(this.oauthClientToken)) {
|
|
137
|
+
await this.refreshToken();
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
// No usable token (missing, or expired without a refresh_token): mint one from client
|
|
141
|
+
// credentials if we have them. Public clients (no secret) can't use the client_credentials
|
|
142
|
+
// grant, so they fall through and the caller gets a 401 — they must obtain a token another way.
|
|
143
|
+
if (this.options.clientId !== null && !this.isPublicClient()) {
|
|
144
|
+
await this.authenticate();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
static hasRefreshToken(token) {
|
|
148
|
+
return token.refresh_token !== undefined && token.refresh_token !== null && token.refresh_token !== '';
|
|
149
|
+
}
|
|
96
150
|
isPublicClient() {
|
|
97
151
|
return this.options.clientSecret === null || this.options.clientSecret === '';
|
|
98
152
|
}
|
|
@@ -141,29 +195,13 @@ export class OAuthClient {
|
|
|
141
195
|
}
|
|
142
196
|
async request(action, parameters = null, method = 'GET', signWithOauthToken = true) {
|
|
143
197
|
if (signWithOauthToken) {
|
|
144
|
-
//
|
|
145
|
-
//
|
|
146
|
-
// a rejected refresh.
|
|
198
|
+
// Token-first, credentials-as-fallback (mirrors the PHP client): use a valid token as-is,
|
|
199
|
+
// otherwise refresh or mint one from client credentials. Only when nothing is available do
|
|
200
|
+
// we 401 — the same sign-out path consumers already handle for a rejected refresh.
|
|
201
|
+
await this.ensureAccessToken();
|
|
147
202
|
if (this.oauthClientToken === null) {
|
|
148
203
|
throw new ClientError('Unable to perform request, access token not provided', HttpStatus.HTTP_UNAUTHORIZED);
|
|
149
204
|
}
|
|
150
|
-
if (OAuthClientToken.isExpired(this.oauthClientToken)) {
|
|
151
|
-
if (this.refreshTokenPromise === null) {
|
|
152
|
-
this.refreshTokenPromise = this.refreshToken();
|
|
153
|
-
try {
|
|
154
|
-
await this.refreshTokenPromise;
|
|
155
|
-
}
|
|
156
|
-
finally {
|
|
157
|
-
// Always clear, even on failure, so a single failed refresh doesn't
|
|
158
|
-
// poison every later request with the same rejected promise (e.g.
|
|
159
|
-
// after the user re-authenticates).
|
|
160
|
-
this.refreshTokenPromise = null;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
await this.refreshTokenPromise;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
205
|
}
|
|
168
206
|
const requestData = this.createRequestData(action, parameters, method, signWithOauthToken);
|
|
169
207
|
if (this.debug) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
2
2
|
import { State } from '../State.js';
|
|
3
|
+
import { StateAware } from '../StateAware.js';
|
|
3
4
|
export declare class UserAccessToken implements StateAware {
|
|
4
5
|
id: string;
|
|
5
6
|
userId: string;
|
|
@@ -11,5 +12,5 @@ export declare class UserAccessToken implements StateAware {
|
|
|
11
12
|
lastUsedAt: Date | null;
|
|
12
13
|
expiresAt: Date | null;
|
|
13
14
|
state: State;
|
|
14
|
-
static parse(rawUser:
|
|
15
|
+
static parse(rawUser: ApiRecord): UserAccessToken;
|
|
15
16
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DataValueValue } from '../DataValue.js';
|
|
2
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
2
3
|
export declare class AdapterConfiguration {
|
|
3
4
|
id: string;
|
|
4
5
|
key: string;
|
|
@@ -8,5 +9,5 @@ export declare class AdapterConfiguration {
|
|
|
8
9
|
description: string;
|
|
9
10
|
default: DataValueValue | null;
|
|
10
11
|
validation: string[];
|
|
11
|
-
static parse(rawAdapterConfiguration:
|
|
12
|
+
static parse(rawAdapterConfiguration: ApiRecord): AdapterConfiguration;
|
|
12
13
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { DataValueCollection } from '../DataValueCollection.js';
|
|
2
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
2
3
|
export declare class AdapterConnectionEvent {
|
|
3
4
|
id: string;
|
|
4
5
|
adapterConnection: string;
|
|
5
6
|
type: string;
|
|
6
7
|
time: Date;
|
|
7
8
|
data: DataValueCollection;
|
|
8
|
-
static parse(rawAdapterConnection:
|
|
9
|
+
static parse(rawAdapterConnection: ApiRecord): AdapterConnectionEvent;
|
|
9
10
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
export declare class CollectionRecord {
|
|
2
3
|
id: string;
|
|
3
4
|
collection: string;
|
|
4
5
|
properties: Record<string, unknown>;
|
|
5
|
-
static parse(raw:
|
|
6
|
+
static parse(raw: ApiRecord): CollectionRecord;
|
|
6
7
|
}
|
package/dist/Model/Config.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { State } from './State.js';
|
|
2
|
+
import { ApiRecord } from './ApiRecord.js';
|
|
2
3
|
/**
|
|
3
4
|
* @deprecated
|
|
4
5
|
*/
|
|
@@ -13,5 +14,5 @@ export declare class Config {
|
|
|
13
14
|
inheritable: boolean;
|
|
14
15
|
sensitive: boolean;
|
|
15
16
|
state: State;
|
|
16
|
-
static parse(rawConfig:
|
|
17
|
+
static parse(rawConfig: ApiRecord): Config;
|
|
17
18
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
2
2
|
import { DataValueValue } from '../DataValue.js';
|
|
3
|
+
import { State } from '../State.js';
|
|
3
4
|
export declare class Configuration {
|
|
4
5
|
id: string;
|
|
5
6
|
path: string;
|
|
6
7
|
value: DataValueValue;
|
|
7
8
|
state: State;
|
|
8
9
|
scope: string;
|
|
9
|
-
static parse(rawConfig:
|
|
10
|
+
static parse(rawConfig: ApiRecord): Configuration;
|
|
10
11
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
import { DataValueCollection } from '../DataValueCollection.js';
|
|
2
3
|
import { State } from '../State.js';
|
|
3
4
|
import { StateAware } from '../StateAware.js';
|
|
@@ -8,5 +9,5 @@ export declare class CodeSourceBuildStrategy implements StateAware {
|
|
|
8
9
|
languageId: string;
|
|
9
10
|
state: State;
|
|
10
11
|
data: DataValueCollection;
|
|
11
|
-
static parse(raw:
|
|
12
|
+
static parse(raw: ApiRecord): CodeSourceBuildStrategy;
|
|
12
13
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
import { DataValueCollection } from '../DataValueCollection.js';
|
|
2
|
-
import { StateAware } from '../StateAware.js';
|
|
3
3
|
import { State } from '../State.js';
|
|
4
|
+
import { StateAware } from '../StateAware.js';
|
|
4
5
|
export declare class CodeSourceRunStrategy implements StateAware {
|
|
5
6
|
id: string;
|
|
6
7
|
name: string;
|
|
@@ -8,5 +9,5 @@ export declare class CodeSourceRunStrategy implements StateAware {
|
|
|
8
9
|
languageId: string;
|
|
9
10
|
state: State;
|
|
10
11
|
data: DataValueCollection;
|
|
11
|
-
static parse(raw:
|
|
12
|
+
static parse(raw: ApiRecord): CodeSourceRunStrategy;
|
|
12
13
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
export declare class SourcesAccountRepository {
|
|
2
3
|
key: string;
|
|
3
4
|
name: string;
|
|
4
5
|
url: string;
|
|
5
6
|
description: string;
|
|
6
|
-
static parse(rawSourcesAccountRepository:
|
|
7
|
+
static parse(rawSourcesAccountRepository: ApiRecord): SourcesAccountRepository;
|
|
7
8
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
export declare class FlowRunStats {
|
|
2
3
|
flowRunId: string;
|
|
3
4
|
time: Date;
|
|
@@ -9,5 +10,5 @@ export declare class FlowRunStats {
|
|
|
9
10
|
networkInbound: number | null;
|
|
10
11
|
fileRead: number | null;
|
|
11
12
|
fileWrite: number | null;
|
|
12
|
-
static parse(raw:
|
|
13
|
+
static parse(raw: ApiRecord): FlowRunStats;
|
|
13
14
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FlowRunStatus } from './FlowRunStatus.js';
|
|
2
2
|
import { FlowRun } from './FlowRun.js';
|
|
3
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
3
4
|
export declare class FlowRunSummary extends FlowRun {
|
|
4
5
|
time: Date;
|
|
5
6
|
runDuration: number;
|
|
@@ -13,5 +14,5 @@ export declare class FlowRunSummary extends FlowRun {
|
|
|
13
14
|
cpuMaximum: number | null;
|
|
14
15
|
memoryAverage: number | null;
|
|
15
16
|
memoryMaximum: number | null;
|
|
16
|
-
static parse(rawFlowRunSummary:
|
|
17
|
+
static parse(rawFlowRunSummary: ApiRecord): FlowRunSummary;
|
|
17
18
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
import { Flow } from './Flow.js';
|
|
2
3
|
import { FlowRunStatus } from './FlowRunStatus.js';
|
|
3
4
|
export declare class FlowSummary extends Flow {
|
|
@@ -7,5 +8,5 @@ export declare class FlowSummary extends Flow {
|
|
|
7
8
|
averageRunDuration: number | null;
|
|
8
9
|
averagePendingDuration: number | null;
|
|
9
10
|
runCount: number;
|
|
10
|
-
static parse(rawFlowSummary:
|
|
11
|
+
static parse(rawFlowSummary: ApiRecord): FlowSummary;
|
|
11
12
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
import { DataValueCollection } from '../DataValueCollection.js';
|
|
2
3
|
import { HealthAlertSeverity } from './HealthAlertSeverity.js';
|
|
3
4
|
import { HealthAlertStatus } from './HealthAlertStatus.js';
|
|
@@ -13,5 +14,5 @@ export declare class HealthAlert {
|
|
|
13
14
|
updated: Date;
|
|
14
15
|
data: DataValueCollection;
|
|
15
16
|
constructor(healthTestType: HealthTestType, status: HealthAlertStatus);
|
|
16
|
-
static parse(raw:
|
|
17
|
+
static parse(raw: ApiRecord): HealthAlert;
|
|
17
18
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
export declare class InboxMessage {
|
|
2
3
|
id: string;
|
|
3
4
|
userId: string;
|
|
@@ -6,5 +7,5 @@ export declare class InboxMessage {
|
|
|
6
7
|
body: string;
|
|
7
8
|
time: Date;
|
|
8
9
|
acknowledged: boolean;
|
|
9
|
-
static parse(rawNotification:
|
|
10
|
+
static parse(rawNotification: ApiRecord): InboxMessage;
|
|
10
11
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
import { State } from '../State.js';
|
|
2
3
|
export declare class RunnerPool {
|
|
3
4
|
id: string;
|
|
@@ -8,7 +9,7 @@ export declare class RunnerPool {
|
|
|
8
9
|
type: QueueSpecificationType;
|
|
9
10
|
configuration: RunnerPoolConfiguration;
|
|
10
11
|
state: State;
|
|
11
|
-
static parse(raw:
|
|
12
|
+
static parse(raw: ApiRecord): RunnerPool;
|
|
12
13
|
/**
|
|
13
14
|
* Coerce a raw wire value into a ResolvedValue<T> envelope. Accepts `{value, source}`
|
|
14
15
|
* as-is; falls back to `{value: defaultValue, source: null}` when the input is null,
|
package/dist/Model/Log/Log.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
import { DataValueCollection } from '../DataValueCollection.js';
|
|
2
3
|
import { LogLevel } from './LogLevel.js';
|
|
3
4
|
import { LogStatus } from './LogStatus.js';
|
|
@@ -13,5 +14,5 @@ export declare class Log {
|
|
|
13
14
|
tags: DataValueCollection;
|
|
14
15
|
_version: string;
|
|
15
16
|
constructor(logStream: LogStreamId, message: string, level: LogLevel, date: Date);
|
|
16
|
-
static parse(rawLog:
|
|
17
|
+
static parse(rawLog: ApiRecord): Log;
|
|
17
18
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LogLevel } from './LogLevel.js';
|
|
2
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
2
3
|
import { DataValueValue } from '../DataValue.js';
|
|
3
4
|
import { LogStreamId } from './LogStreamId.js';
|
|
4
5
|
export declare class LogStreamInformation {
|
|
@@ -14,5 +15,5 @@ export declare class LogStreamInformation {
|
|
|
14
15
|
count: number;
|
|
15
16
|
}[];
|
|
16
17
|
}[];
|
|
17
|
-
static parse(raw:
|
|
18
|
+
static parse(raw: ApiRecord): LogStreamInformation;
|
|
18
19
|
}
|
|
@@ -2,6 +2,7 @@ import { State } from '../../State.js';
|
|
|
2
2
|
import { StateAware } from '../../StateAware.js';
|
|
3
3
|
import { MetaDataAware } from '../../../Core/MetaDataAware.js';
|
|
4
4
|
import { ChannelType } from './ChannelType.js';
|
|
5
|
+
import { ApiRecord } from '../../ApiRecord.js';
|
|
5
6
|
export declare class Channel extends MetaDataAware implements StateAware {
|
|
6
7
|
id: string;
|
|
7
8
|
ownerId: string;
|
|
@@ -12,5 +13,5 @@ export declare class Channel extends MetaDataAware implements StateAware {
|
|
|
12
13
|
isPrivate: boolean;
|
|
13
14
|
singleUse: boolean;
|
|
14
15
|
constructor(id: string, ownerId: string, name: string, type: ChannelType, data: any);
|
|
15
|
-
static parse(rawChannel:
|
|
16
|
+
static parse(rawChannel: ApiRecord): Channel;
|
|
16
17
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
export declare class ChannelHistory {
|
|
2
3
|
id: string;
|
|
3
4
|
subscriberId: string;
|
|
@@ -6,5 +7,5 @@ export declare class ChannelHistory {
|
|
|
6
7
|
message: unknown;
|
|
7
8
|
result: unknown;
|
|
8
9
|
status: string;
|
|
9
|
-
static parse(rawChannelHistory:
|
|
10
|
+
static parse(rawChannelHistory: ApiRecord): ChannelHistory;
|
|
10
11
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { State } from '../State.js';
|
|
2
2
|
import { StateAware } from '../StateAware.js';
|
|
3
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
3
4
|
export declare class PlatformLanguage implements StateAware {
|
|
4
5
|
id: string;
|
|
5
6
|
key: string;
|
|
@@ -7,5 +8,5 @@ export declare class PlatformLanguage implements StateAware {
|
|
|
7
8
|
description: string;
|
|
8
9
|
state: State;
|
|
9
10
|
constructor(id: string, name: string);
|
|
10
|
-
static parse(rawLanguage:
|
|
11
|
+
static parse(rawLanguage: ApiRecord): PlatformLanguage;
|
|
11
12
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Adapter } from '../Adapter/Adapter.js';
|
|
2
2
|
import { AdapterConnection } from '../Adapter/AdapterConnection.js';
|
|
3
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
3
4
|
import { CodeSource } from '../Deployment/CodeSource.js';
|
|
4
5
|
import { CodeSourceAccount } from '../Deployment/CodeSourceAccount.js';
|
|
5
6
|
import { EntityType } from '../EntityType.js';
|
|
@@ -19,5 +20,5 @@ export declare class SearchResult {
|
|
|
19
20
|
description: string;
|
|
20
21
|
entity: Workspace | WorkspaceMember | Project | ProjectEnvironment | Flow | FlowRun | Trigger | Channel | Subscriber | Adapter | AdapterConnection | CodeSourceAccount | CodeSource | CodeDeploy;
|
|
21
22
|
score: number;
|
|
22
|
-
static parse(rawResult:
|
|
23
|
+
static parse(rawResult: ApiRecord): SearchResult;
|
|
23
24
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
export declare class StorageItem {
|
|
2
3
|
key: string;
|
|
3
4
|
bytes: number;
|
|
@@ -5,5 +6,5 @@ export declare class StorageItem {
|
|
|
5
6
|
updated: Date | null;
|
|
6
7
|
expiration: Date | null;
|
|
7
8
|
value: string | number | boolean | null | any;
|
|
8
|
-
static parse(raw:
|
|
9
|
+
static parse(raw: ApiRecord): StorageItem;
|
|
9
10
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
1
2
|
export declare class StorageItemInformation {
|
|
2
3
|
key: string;
|
|
3
4
|
bytes: number;
|
|
4
5
|
created: Date | null;
|
|
5
6
|
updated: Date | null;
|
|
6
7
|
expiration: Date | null;
|
|
7
|
-
static parse(raw:
|
|
8
|
+
static parse(raw: ApiRecord): StorageItemInformation;
|
|
8
9
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StateAware } from '../StateAware.js';
|
|
2
2
|
import { State } from '../State.js';
|
|
3
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
3
4
|
export declare class User implements StateAware {
|
|
4
5
|
id: string;
|
|
5
6
|
name: string;
|
|
@@ -14,5 +15,5 @@ export declare class User implements StateAware {
|
|
|
14
15
|
number_format: string | null;
|
|
15
16
|
picture: string;
|
|
16
17
|
state: State;
|
|
17
|
-
static parse(rawUser:
|
|
18
|
+
static parse(rawUser: ApiRecord): User;
|
|
18
19
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { State } from '../State.js';
|
|
2
2
|
import { StateAware } from '../StateAware.js';
|
|
3
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
3
4
|
export declare class UserAuthProvider implements StateAware {
|
|
4
5
|
id: string;
|
|
5
6
|
userId: string;
|
|
@@ -8,5 +9,5 @@ export declare class UserAuthProvider implements StateAware {
|
|
|
8
9
|
providerUserEmail: string;
|
|
9
10
|
lastUsed: Date | null;
|
|
10
11
|
state: State;
|
|
11
|
-
static parse(raw:
|
|
12
|
+
static parse(raw: ApiRecord): UserAuthProvider;
|
|
12
13
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { State } from '../State.js';
|
|
2
2
|
import { StateAware } from '../StateAware.js';
|
|
3
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
3
4
|
export declare class Platform implements StateAware {
|
|
4
5
|
id: string;
|
|
5
6
|
name: string;
|
|
@@ -9,5 +10,5 @@ export declare class Platform implements StateAware {
|
|
|
9
10
|
endOfLife: Date;
|
|
10
11
|
activeImage: string | null;
|
|
11
12
|
state: State;
|
|
12
|
-
static parse(raw:
|
|
13
|
+
static parse(raw: ApiRecord): Platform;
|
|
13
14
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { State } from '../State.js';
|
|
2
2
|
import { StateAware } from '../StateAware.js';
|
|
3
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
3
4
|
export declare class PlatformImage implements StateAware {
|
|
4
5
|
id: string;
|
|
5
6
|
platformId: string;
|
|
@@ -9,5 +10,5 @@ export declare class PlatformImage implements StateAware {
|
|
|
9
10
|
languageVersion: string;
|
|
10
11
|
buildDate: Date;
|
|
11
12
|
state: State;
|
|
12
|
-
static parse(raw:
|
|
13
|
+
static parse(raw: ApiRecord): PlatformImage;
|
|
13
14
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { WorkspaceMemberInviteState } from './WorkspaceMemberInviteState.js';
|
|
2
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
2
3
|
export declare class WorkspaceMemberInvite2 {
|
|
3
4
|
code: string;
|
|
4
5
|
email: string | null;
|
|
@@ -6,5 +7,5 @@ export declare class WorkspaceMemberInvite2 {
|
|
|
6
7
|
inviterEmail: string | null;
|
|
7
8
|
workspaceName: string | null;
|
|
8
9
|
state: WorkspaceMemberInviteState;
|
|
9
|
-
static parse(rawInvite:
|
|
10
|
+
static parse(rawInvite: ApiRecord): WorkspaceMemberInvite2;
|
|
10
11
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.82.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.82.0";
|