fusio-sdk 5.0.1 → 5.0.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.
@@ -9,5 +9,6 @@ export interface ConsumerPlan {
9
9
  description?: string;
10
10
  price?: number;
11
11
  points?: number;
12
+ period?: number;
12
13
  metadata?: CommonMetadata;
13
14
  }
@@ -6,6 +6,7 @@ import { TagAbstract } from "sdkgen-client";
6
6
  import { Passthru } from "./Passthru";
7
7
  import { SystemAbout } from "./SystemAbout";
8
8
  import { SystemHealthCheck } from "./SystemHealthCheck";
9
+ import { SystemOAuthConfiguration } from "./SystemOAuthConfiguration";
9
10
  import { SystemRoute } from "./SystemRoute";
10
11
  import { SystemSchema } from "./SystemSchema";
11
12
  export declare class SystemMetaTag extends TagAbstract {
@@ -20,6 +21,11 @@ export declare class SystemMetaTag extends TagAbstract {
20
21
  * @throws {ClientException}
21
22
  */
22
23
  getRoutes(): Promise<SystemRoute>;
24
+ /**
25
+ * @returns {Promise<SystemOAuthConfiguration>}
26
+ * @throws {ClientException}
27
+ */
28
+ getOAuthConfiguration(): Promise<SystemOAuthConfiguration>;
23
29
  /**
24
30
  * @returns {Promise<SystemHealthCheck>}
25
31
  * @throws {ClientException}
@@ -76,6 +76,36 @@ export class SystemMetaTag extends TagAbstract {
76
76
  }
77
77
  }
78
78
  }
79
+ /**
80
+ * @returns {Promise<SystemOAuthConfiguration>}
81
+ * @throws {ClientException}
82
+ */
83
+ async getOAuthConfiguration() {
84
+ const url = this.parser.url('/system/oauth-authorization-server', {});
85
+ let params = {
86
+ url: url,
87
+ method: 'GET',
88
+ params: this.parser.query({}, []),
89
+ };
90
+ try {
91
+ const response = await this.httpClient.request(params);
92
+ return response.data;
93
+ }
94
+ catch (error) {
95
+ if (error instanceof ClientException) {
96
+ throw error;
97
+ }
98
+ else if (axios.isAxiosError(error) && error.response) {
99
+ switch (error.response.status) {
100
+ default:
101
+ throw new UnknownStatusCodeException('The server returned an unknown status code');
102
+ }
103
+ }
104
+ else {
105
+ throw new ClientException('An unknown error occurred: ' + String(error));
106
+ }
107
+ }
108
+ }
79
109
  /**
80
110
  * @returns {Promise<SystemHealthCheck>}
81
111
  * @throws {ClientException}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * SystemOAuthConfiguration automatically generated by SDKgen please do not edit this file manually
3
+ * {@link https://sdkgen.app}
4
+ */
5
+ export interface SystemOAuthConfiguration {
6
+ issuer?: string;
7
+ token_endpoint?: string;
8
+ token_endpoint_auth_methods_supported?: Array<string>;
9
+ userinfo_endpoint?: string;
10
+ scopes_supported?: Array<string>;
11
+ claims_supported?: Array<string>;
12
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * SystemOAuthConfiguration automatically generated by SDKgen please do not edit this file manually
3
+ * {@link https://sdkgen.app}
4
+ */
5
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fusio-sdk",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "SDK to talk to the Fusio API",
5
5
  "keywords": [
6
6
  "API",