@attlaz/client 1.119.0 → 1.120.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.d.ts +3 -2
- package/dist/Client.js +3 -4
- package/dist/Model/ApiInformation.d.ts +0 -11
- package/dist/index.d.ts +1 -1
- 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,7 +1,7 @@
|
|
|
1
1
|
import { OAuthClientToken } from './Http/OAuthClientToken.js';
|
|
2
2
|
import { ITransport, ParseErrorHandler } from './Http/Transport/ITransport.js';
|
|
3
3
|
import { OAuthClient, TokenChangeHandler } from './Http/Transport/OAuthClient.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ApiInfo } from './Model/ApiInformation.js';
|
|
5
5
|
import { AccessTokenEndpoint } from './Service/AccessTokenEndpoint.js';
|
|
6
6
|
import { AdapterConnectionEndpoint } from './Service/AdapterConnectionEndpoint.js';
|
|
7
7
|
import { ConnectionBundleEndpoint } from './Service/ConnectionBundleEndpoint.js';
|
|
@@ -112,7 +112,8 @@ export declare class Client {
|
|
|
112
112
|
* rejected. Pass null to stop observing. OAuth-only; a custom transport has no token.
|
|
113
113
|
*/
|
|
114
114
|
setTokenChangeHandler(handler: TokenChangeHandler | null): void;
|
|
115
|
-
|
|
115
|
+
/** The gateway first, then every API it routes to. A non-administrator is shown the gateway alone. */
|
|
116
|
+
getApiInformation(): Promise<ApiInfo[]>;
|
|
116
117
|
getAdapterEndpoint(): AdapterEndpoint;
|
|
117
118
|
getAdapterConnectionEndpoint(): AdapterConnectionEndpoint;
|
|
118
119
|
getConnectionBundleEndpoint(): ConnectionBundleEndpoint;
|
package/dist/Client.js
CHANGED
|
@@ -211,14 +211,13 @@ export class Client {
|
|
|
211
211
|
setTokenChangeHandler(handler) {
|
|
212
212
|
this.httpClient.setTokenChangeHandler(handler);
|
|
213
213
|
}
|
|
214
|
+
/** The gateway first, then every API it routes to. A non-administrator is shown the gateway alone. */
|
|
214
215
|
async getApiInformation() {
|
|
215
216
|
const result = await this.httpClient.request('/system/info', null, 'GET', true);
|
|
216
|
-
|
|
217
|
-
const gateway = result.apis?.[0];
|
|
218
|
-
if (gateway === undefined || gateway.version === null) {
|
|
217
|
+
if (result.apis === undefined || result.apis.length === 0) {
|
|
219
218
|
throw new Error('Unable to get API information: invalid response');
|
|
220
219
|
}
|
|
221
|
-
return
|
|
220
|
+
return result.apis;
|
|
222
221
|
}
|
|
223
222
|
/* Endpoints */
|
|
224
223
|
getAdapterEndpoint() {
|
|
@@ -16,14 +16,3 @@ export type ApiInfo = {
|
|
|
16
16
|
}[];
|
|
17
17
|
error: string | null;
|
|
18
18
|
};
|
|
19
|
-
/**
|
|
20
|
-
* What the endpoint is running.
|
|
21
|
-
*
|
|
22
|
-
* `apis` lists the gateway first, then every API it routes to — but only an administrator is shown
|
|
23
|
-
* more than the gateway, so a normal caller gets a single entry.
|
|
24
|
-
*/
|
|
25
|
-
export type ApiInformation = {
|
|
26
|
-
/** The gateway's version — what `version` meant before `apis` existed. */
|
|
27
|
-
version: string;
|
|
28
|
-
apis: ApiInfo[];
|
|
29
|
-
};
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type { TokenChangeHandler } from './Http/Transport/OAuthClient.js';
|
|
|
15
15
|
export { OAuthClientOptions } from './Http/OAuthClientOptions.js';
|
|
16
16
|
export { OAuthClientToken } from './Http/OAuthClientToken.js';
|
|
17
17
|
export { ClientError } from './Http/ClientError.js';
|
|
18
|
-
export { ApiInfo
|
|
18
|
+
export { ApiInfo } from './Model/ApiInformation.js';
|
|
19
19
|
export { ApiError } from './Model/Error/ApiError.js';
|
|
20
20
|
export type { ParseErrorHandler } from './Http/Transport/ITransport.js';
|
|
21
21
|
export { HttpStatus } from './Http/HttpStatus.js';
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.119.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.119.0";
|