@breign/client 1.0.174 → 1.0.176

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.
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AddCustomFiller201ResponseUio, AddCustomFillerRequestUio, AnimationCreateRequestUio, AppChatCreateRequestUio, AppChatCreateResponseUio, AppChatSayRequestUio, AppChatSayResponseUio, AppChatSubmitMessageRequestUio, AppConfigurationUio, AppCreateRequestUio, AppFlowCreateRequestUio, AppInstanceCreateRequestUio, AppInstanceListItemUio, AppLightUio, AppProbeRequestUio, AppProbeResponseUio, AppReplaceRequestUio, AppStatusRequestUio, AppStatusResponseUio, AppSubmitMessageRequestUio, AppTextToSpeechRequestUio, AppTextToSpeechResponseUio, AppUio, AppUpdateRequestUio, AudioFileUio, BodyWithIdUio, BodyWithMessageUio, ConversationUio, DeleteMessageAudio200ResponseUio, FileCreationRequestUio, FileCreationResponseUio, FillersArrayInnerUio, FlowUio, S3UploadBodyUio, STTResponseUio, SequenceCreateRequestUio, UpdateSelectedFillers200ResponseUio, UpdateSelectedFillersRequestUio } from '../models/index';
13
+ import type { AddCustomFiller201ResponseUio, AddCustomFillerRequestUio, AnimationCreateRequestUio, AppChatCreateRequestUio, AppChatCreateResponseUio, AppChatSayRequestUio, AppChatSayResponseUio, AppChatSubmitMessageRequestUio, AppConfigurationUio, AppCreateRequestUio, AppFlowCreateRequestUio, AppInstanceCreateRequestUio, AppInstanceListItemUio, AppLightUio, AppProbeRequestUio, AppProbeResponseUio, AppReplaceRequestUio, AppStatusRequestUio, AppStatusResponseUio, AppSubmitMessageRequestUio, AppTextToSpeechRequestUio, AppTextToSpeechResponseUio, AppUio, AppUpdateRequestUio, AudioFileUio, BodyWithIdUio, BodyWithMessageUio, ConversationUio, DeleteMessageAudio200ResponseUio, EphemeralInstanceTokenUio, FileCreationRequestUio, FileCreationResponseUio, FillersArrayInnerUio, FlowUio, S3UploadBodyUio, STTResponseUio, SequenceCreateRequestUio, UpdateSelectedFillers200ResponseUio, UpdateSelectedFillersRequestUio } from '../models/index';
14
14
  export interface AddAnimationRequest {
15
15
  appId: string;
16
16
  animationCreateRequestUio: AnimationCreateRequestUio;
@@ -134,6 +134,10 @@ export interface RefreshAppProbeRequest {
134
134
  appId: string;
135
135
  instanceId?: string;
136
136
  }
137
+ export interface RefreshInstanceTokenRequest {
138
+ appId: string;
139
+ instanceId: string;
140
+ }
137
141
  export interface RemoveAnimationRequest {
138
142
  appId: string;
139
143
  animationId: string;
@@ -476,6 +480,16 @@ export declare class AppApi extends runtime.BaseAPI {
476
480
  * Refresh the app probe
477
481
  */
478
482
  refreshAppProbe(appId: string, instanceId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
483
+ /**
484
+ * Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
485
+ * Refresh ephemeral instance token
486
+ */
487
+ refreshInstanceTokenRaw(requestParameters: RefreshInstanceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EphemeralInstanceTokenUio>>;
488
+ /**
489
+ * Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
490
+ * Refresh ephemeral instance token
491
+ */
492
+ refreshInstanceToken(appId: string, instanceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EphemeralInstanceTokenUio>;
479
493
  /**
480
494
  * Remove an animation from an app
481
495
  * Remove an animation from an app
@@ -1009,6 +1009,38 @@ class AppApi extends runtime.BaseAPI {
1009
1009
  async refreshAppProbe(appId, instanceId, initOverrides) {
1010
1010
  await this.refreshAppProbeRaw({ appId: appId, instanceId: instanceId }, initOverrides);
1011
1011
  }
1012
+ /**
1013
+ * Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
1014
+ * Refresh ephemeral instance token
1015
+ */
1016
+ async refreshInstanceTokenRaw(requestParameters, initOverrides) {
1017
+ if (requestParameters['appId'] == null) {
1018
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling refreshInstanceToken().');
1019
+ }
1020
+ if (requestParameters['instanceId'] == null) {
1021
+ throw new runtime.RequiredError('instanceId', 'Required parameter "instanceId" was null or undefined when calling refreshInstanceToken().');
1022
+ }
1023
+ const queryParameters = {};
1024
+ const headerParameters = {};
1025
+ if (this.configuration && this.configuration.apiKey) {
1026
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1027
+ }
1028
+ const response = await this.request({
1029
+ path: `/apps/{appId}/instances/{instanceId}/token`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))).replace(`{${"instanceId"}}`, encodeURIComponent(String(requestParameters['instanceId']))),
1030
+ method: 'POST',
1031
+ headers: headerParameters,
1032
+ query: queryParameters,
1033
+ }, initOverrides);
1034
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EphemeralInstanceTokenUioFromJSON)(jsonValue));
1035
+ }
1036
+ /**
1037
+ * Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
1038
+ * Refresh ephemeral instance token
1039
+ */
1040
+ async refreshInstanceToken(appId, instanceId, initOverrides) {
1041
+ const response = await this.refreshInstanceTokenRaw({ appId: appId, instanceId: instanceId }, initOverrides);
1042
+ return await response.value();
1043
+ }
1012
1044
  /**
1013
1045
  * Remove an animation from an app
1014
1046
  * Remove an animation from an app
@@ -10,11 +10,26 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AuthCodeConfirmRequestUio, AuthCodeConfirmResponseUio, AuthCodeRequestUio, AuthCodeResponseUio, GetJwks200ResponseUio } from '../models/index';
13
+ import type { ApplicationAuthorizationRequestUio, ApplicationAuthorizationResponseUio, ApplicationTokenRequestUio, ApplicationTokenResponseUio, AuthCodeConfirmRequestUio, AuthCodeConfirmResponseUio, AuthCodeRequestUio, AuthCodeResponseUio, GetJwks200ResponseUio } from '../models/index';
14
+ export interface AuthorizeApplicationRequest {
15
+ responseType: AuthorizeApplicationResponseTypeEnum;
16
+ clientId: string;
17
+ redirectUri: string;
18
+ codeChallenge: string;
19
+ codeChallengeMethod: AuthorizeApplicationCodeChallengeMethodEnum;
20
+ state?: string;
21
+ deviceName?: string;
22
+ }
14
23
  export interface ConfirmAuthCodeRequest {
15
24
  authFlowId: string;
16
25
  authCodeConfirmRequestUio: AuthCodeConfirmRequestUio;
17
26
  }
27
+ export interface CreateApplicationAuthorizationRequest {
28
+ applicationAuthorizationRequestUio: ApplicationAuthorizationRequestUio;
29
+ }
30
+ export interface ExchangeApplicationAuthorizationCodeRequest {
31
+ applicationTokenRequestUio: ApplicationTokenRequestUio;
32
+ }
18
33
  export interface GetAuthCodeRequest {
19
34
  authCodeRequestUio: AuthCodeRequestUio;
20
35
  }
@@ -31,6 +46,16 @@ export interface ToolOauthCallbackRequest {
31
46
  *
32
47
  */
33
48
  export declare class AuthApi extends runtime.BaseAPI {
49
+ /**
50
+ * Entry point of the browser authorization of a desktop application (OAuth2 authorization code with PKCE, loopback redirect per RFC 8252). The request is checked, then the browser is redirected to the consent page of Breign App, which issues the code through `POST /auth/authorizations`.
51
+ * Start an application authorization
52
+ */
53
+ authorizeApplicationRaw(requestParameters: AuthorizeApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
54
+ /**
55
+ * Entry point of the browser authorization of a desktop application (OAuth2 authorization code with PKCE, loopback redirect per RFC 8252). The request is checked, then the browser is redirected to the consent page of Breign App, which issues the code through `POST /auth/authorizations`.
56
+ * Start an application authorization
57
+ */
58
+ authorizeApplication(responseType: AuthorizeApplicationResponseTypeEnum, clientId: string, redirectUri: string, codeChallenge: string, codeChallengeMethod: AuthorizeApplicationCodeChallengeMethodEnum, state?: string, deviceName?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
34
59
  /**
35
60
  * Confirm auth code
36
61
  * Confirm auth code
@@ -41,6 +66,26 @@ export declare class AuthApi extends runtime.BaseAPI {
41
66
  * Confirm auth code
42
67
  */
43
68
  confirmAuthCode(authFlowId: string, authCodeConfirmRequestUio: AuthCodeConfirmRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthCodeConfirmResponseUio>;
69
+ /**
70
+ * Called on behalf of the signed-in user once they consented to the application. Returns a single-use code, valid 5 minutes, bound to the redirect address and the PKCE challenge.
71
+ * Issue an application authorization code
72
+ */
73
+ createApplicationAuthorizationRaw(requestParameters: CreateApplicationAuthorizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationAuthorizationResponseUio>>;
74
+ /**
75
+ * Called on behalf of the signed-in user once they consented to the application. Returns a single-use code, valid 5 minutes, bound to the redirect address and the PKCE challenge.
76
+ * Issue an application authorization code
77
+ */
78
+ createApplicationAuthorization(applicationAuthorizationRequestUio: ApplicationAuthorizationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationAuthorizationResponseUio>;
79
+ /**
80
+ * Exchanges the code issued by `POST /auth/authorizations` for an API key of the user, after checking the PKCE verifier, the client and the redirect address. The code is single use. Errors follow RFC 6749 section 5.2.
81
+ * Exchange an application authorization code
82
+ */
83
+ exchangeApplicationAuthorizationCodeRaw(requestParameters: ExchangeApplicationAuthorizationCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationTokenResponseUio>>;
84
+ /**
85
+ * Exchanges the code issued by `POST /auth/authorizations` for an API key of the user, after checking the PKCE verifier, the client and the redirect address. The code is single use. Errors follow RFC 6749 section 5.2.
86
+ * Exchange an application authorization code
87
+ */
88
+ exchangeApplicationAuthorizationCode(applicationTokenRequestUio: ApplicationTokenRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationTokenResponseUio>;
44
89
  /**
45
90
  * Get auth code
46
91
  * Get auth code
@@ -82,3 +127,17 @@ export declare class AuthApi extends runtime.BaseAPI {
82
127
  */
83
128
  toolOauthCallback(toolId: string, code?: string, state?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
84
129
  }
130
+ /**
131
+ * @export
132
+ */
133
+ export declare const AuthorizeApplicationResponseTypeEnum: {
134
+ readonly Code: "code";
135
+ };
136
+ export type AuthorizeApplicationResponseTypeEnum = typeof AuthorizeApplicationResponseTypeEnum[keyof typeof AuthorizeApplicationResponseTypeEnum];
137
+ /**
138
+ * @export
139
+ */
140
+ export declare const AuthorizeApplicationCodeChallengeMethodEnum: {
141
+ readonly S256: "S256";
142
+ };
143
+ export type AuthorizeApplicationCodeChallengeMethodEnum = typeof AuthorizeApplicationCodeChallengeMethodEnum[keyof typeof AuthorizeApplicationCodeChallengeMethodEnum];
@@ -46,13 +46,71 @@ var __importStar = (this && this.__importStar) || (function () {
46
46
  };
47
47
  })();
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.AuthApi = void 0;
49
+ exports.AuthorizeApplicationCodeChallengeMethodEnum = exports.AuthorizeApplicationResponseTypeEnum = exports.AuthApi = void 0;
50
50
  const runtime = __importStar(require("../runtime"));
51
51
  const index_1 = require("../models/index");
52
52
  /**
53
53
  *
54
54
  */
55
55
  class AuthApi extends runtime.BaseAPI {
56
+ /**
57
+ * Entry point of the browser authorization of a desktop application (OAuth2 authorization code with PKCE, loopback redirect per RFC 8252). The request is checked, then the browser is redirected to the consent page of Breign App, which issues the code through `POST /auth/authorizations`.
58
+ * Start an application authorization
59
+ */
60
+ async authorizeApplicationRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['responseType'] == null) {
62
+ throw new runtime.RequiredError('responseType', 'Required parameter "responseType" was null or undefined when calling authorizeApplication().');
63
+ }
64
+ if (requestParameters['clientId'] == null) {
65
+ throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling authorizeApplication().');
66
+ }
67
+ if (requestParameters['redirectUri'] == null) {
68
+ throw new runtime.RequiredError('redirectUri', 'Required parameter "redirectUri" was null or undefined when calling authorizeApplication().');
69
+ }
70
+ if (requestParameters['codeChallenge'] == null) {
71
+ throw new runtime.RequiredError('codeChallenge', 'Required parameter "codeChallenge" was null or undefined when calling authorizeApplication().');
72
+ }
73
+ if (requestParameters['codeChallengeMethod'] == null) {
74
+ throw new runtime.RequiredError('codeChallengeMethod', 'Required parameter "codeChallengeMethod" was null or undefined when calling authorizeApplication().');
75
+ }
76
+ const queryParameters = {};
77
+ if (requestParameters['responseType'] != null) {
78
+ queryParameters['response_type'] = requestParameters['responseType'];
79
+ }
80
+ if (requestParameters['clientId'] != null) {
81
+ queryParameters['client_id'] = requestParameters['clientId'];
82
+ }
83
+ if (requestParameters['redirectUri'] != null) {
84
+ queryParameters['redirect_uri'] = requestParameters['redirectUri'];
85
+ }
86
+ if (requestParameters['codeChallenge'] != null) {
87
+ queryParameters['code_challenge'] = requestParameters['codeChallenge'];
88
+ }
89
+ if (requestParameters['codeChallengeMethod'] != null) {
90
+ queryParameters['code_challenge_method'] = requestParameters['codeChallengeMethod'];
91
+ }
92
+ if (requestParameters['state'] != null) {
93
+ queryParameters['state'] = requestParameters['state'];
94
+ }
95
+ if (requestParameters['deviceName'] != null) {
96
+ queryParameters['device_name'] = requestParameters['deviceName'];
97
+ }
98
+ const headerParameters = {};
99
+ const response = await this.request({
100
+ path: `/auth/authorize`,
101
+ method: 'GET',
102
+ headers: headerParameters,
103
+ query: queryParameters,
104
+ }, initOverrides);
105
+ return new runtime.VoidApiResponse(response);
106
+ }
107
+ /**
108
+ * Entry point of the browser authorization of a desktop application (OAuth2 authorization code with PKCE, loopback redirect per RFC 8252). The request is checked, then the browser is redirected to the consent page of Breign App, which issues the code through `POST /auth/authorizations`.
109
+ * Start an application authorization
110
+ */
111
+ async authorizeApplication(responseType, clientId, redirectUri, codeChallenge, codeChallengeMethod, state, deviceName, initOverrides) {
112
+ await this.authorizeApplicationRaw({ responseType: responseType, clientId: clientId, redirectUri: redirectUri, codeChallenge: codeChallenge, codeChallengeMethod: codeChallengeMethod, state: state, deviceName: deviceName }, initOverrides);
113
+ }
56
114
  /**
57
115
  * Confirm auth code
58
116
  * Confirm auth code
@@ -87,6 +145,65 @@ class AuthApi extends runtime.BaseAPI {
87
145
  const response = await this.confirmAuthCodeRaw({ authFlowId: authFlowId, authCodeConfirmRequestUio: authCodeConfirmRequestUio }, initOverrides);
88
146
  return await response.value();
89
147
  }
148
+ /**
149
+ * Called on behalf of the signed-in user once they consented to the application. Returns a single-use code, valid 5 minutes, bound to the redirect address and the PKCE challenge.
150
+ * Issue an application authorization code
151
+ */
152
+ async createApplicationAuthorizationRaw(requestParameters, initOverrides) {
153
+ if (requestParameters['applicationAuthorizationRequestUio'] == null) {
154
+ throw new runtime.RequiredError('applicationAuthorizationRequestUio', 'Required parameter "applicationAuthorizationRequestUio" was null or undefined when calling createApplicationAuthorization().');
155
+ }
156
+ const queryParameters = {};
157
+ const headerParameters = {};
158
+ headerParameters['Content-Type'] = 'application/json';
159
+ if (this.configuration && this.configuration.apiKey) {
160
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
161
+ }
162
+ const response = await this.request({
163
+ path: `/auth/authorizations`,
164
+ method: 'POST',
165
+ headers: headerParameters,
166
+ query: queryParameters,
167
+ body: (0, index_1.ApplicationAuthorizationRequestUioToJSON)(requestParameters['applicationAuthorizationRequestUio']),
168
+ }, initOverrides);
169
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApplicationAuthorizationResponseUioFromJSON)(jsonValue));
170
+ }
171
+ /**
172
+ * Called on behalf of the signed-in user once they consented to the application. Returns a single-use code, valid 5 minutes, bound to the redirect address and the PKCE challenge.
173
+ * Issue an application authorization code
174
+ */
175
+ async createApplicationAuthorization(applicationAuthorizationRequestUio, initOverrides) {
176
+ const response = await this.createApplicationAuthorizationRaw({ applicationAuthorizationRequestUio: applicationAuthorizationRequestUio }, initOverrides);
177
+ return await response.value();
178
+ }
179
+ /**
180
+ * Exchanges the code issued by `POST /auth/authorizations` for an API key of the user, after checking the PKCE verifier, the client and the redirect address. The code is single use. Errors follow RFC 6749 section 5.2.
181
+ * Exchange an application authorization code
182
+ */
183
+ async exchangeApplicationAuthorizationCodeRaw(requestParameters, initOverrides) {
184
+ if (requestParameters['applicationTokenRequestUio'] == null) {
185
+ throw new runtime.RequiredError('applicationTokenRequestUio', 'Required parameter "applicationTokenRequestUio" was null or undefined when calling exchangeApplicationAuthorizationCode().');
186
+ }
187
+ const queryParameters = {};
188
+ const headerParameters = {};
189
+ headerParameters['Content-Type'] = 'application/json';
190
+ const response = await this.request({
191
+ path: `/auth/token`,
192
+ method: 'POST',
193
+ headers: headerParameters,
194
+ query: queryParameters,
195
+ body: (0, index_1.ApplicationTokenRequestUioToJSON)(requestParameters['applicationTokenRequestUio']),
196
+ }, initOverrides);
197
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApplicationTokenResponseUioFromJSON)(jsonValue));
198
+ }
199
+ /**
200
+ * Exchanges the code issued by `POST /auth/authorizations` for an API key of the user, after checking the PKCE verifier, the client and the redirect address. The code is single use. Errors follow RFC 6749 section 5.2.
201
+ * Exchange an application authorization code
202
+ */
203
+ async exchangeApplicationAuthorizationCode(applicationTokenRequestUio, initOverrides) {
204
+ const response = await this.exchangeApplicationAuthorizationCodeRaw({ applicationTokenRequestUio: applicationTokenRequestUio }, initOverrides);
205
+ return await response.value();
206
+ }
90
207
  /**
91
208
  * Get auth code
92
209
  * Get auth code
@@ -202,3 +319,15 @@ class AuthApi extends runtime.BaseAPI {
202
319
  }
203
320
  }
204
321
  exports.AuthApi = AuthApi;
322
+ /**
323
+ * @export
324
+ */
325
+ exports.AuthorizeApplicationResponseTypeEnum = {
326
+ Code: 'code'
327
+ };
328
+ /**
329
+ * @export
330
+ */
331
+ exports.AuthorizeApplicationCodeChallengeMethodEnum = {
332
+ S256: 'S256'
333
+ };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ApplicationAuthorizationErrorUio
16
+ */
17
+ export interface ApplicationAuthorizationErrorUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ApplicationAuthorizationErrorUio
22
+ */
23
+ message: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the ApplicationAuthorizationErrorUio interface.
27
+ */
28
+ export declare function instanceOfApplicationAuthorizationErrorUio(value: object): value is ApplicationAuthorizationErrorUio;
29
+ export declare function ApplicationAuthorizationErrorUioFromJSON(json: any): ApplicationAuthorizationErrorUio;
30
+ export declare function ApplicationAuthorizationErrorUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationAuthorizationErrorUio;
31
+ export declare function ApplicationAuthorizationErrorUioToJSON(json: any): ApplicationAuthorizationErrorUio;
32
+ export declare function ApplicationAuthorizationErrorUioToJSONTyped(value?: ApplicationAuthorizationErrorUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfApplicationAuthorizationErrorUio = instanceOfApplicationAuthorizationErrorUio;
17
+ exports.ApplicationAuthorizationErrorUioFromJSON = ApplicationAuthorizationErrorUioFromJSON;
18
+ exports.ApplicationAuthorizationErrorUioFromJSONTyped = ApplicationAuthorizationErrorUioFromJSONTyped;
19
+ exports.ApplicationAuthorizationErrorUioToJSON = ApplicationAuthorizationErrorUioToJSON;
20
+ exports.ApplicationAuthorizationErrorUioToJSONTyped = ApplicationAuthorizationErrorUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ApplicationAuthorizationErrorUio interface.
23
+ */
24
+ function instanceOfApplicationAuthorizationErrorUio(value) {
25
+ if (!('message' in value) || value['message'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function ApplicationAuthorizationErrorUioFromJSON(json) {
30
+ return ApplicationAuthorizationErrorUioFromJSONTyped(json, false);
31
+ }
32
+ function ApplicationAuthorizationErrorUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'message': json['message'],
38
+ };
39
+ }
40
+ function ApplicationAuthorizationErrorUioToJSON(json) {
41
+ return ApplicationAuthorizationErrorUioToJSONTyped(json, false);
42
+ }
43
+ function ApplicationAuthorizationErrorUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'message': value['message'],
49
+ };
50
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ApplicationAuthorizationRequestUio
16
+ */
17
+ export interface ApplicationAuthorizationRequestUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ApplicationAuthorizationRequestUio
22
+ */
23
+ clientId: string;
24
+ /**
25
+ * Loopback HTTP address with a port, e.g. `http://127.0.0.1:53682/callback`.
26
+ * @type {string}
27
+ * @memberof ApplicationAuthorizationRequestUio
28
+ */
29
+ redirectUri: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ApplicationAuthorizationRequestUio
34
+ */
35
+ codeChallenge: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ApplicationAuthorizationRequestUio
40
+ */
41
+ codeChallengeMethod: ApplicationAuthorizationRequestUioCodeChallengeMethodEnum;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof ApplicationAuthorizationRequestUio
46
+ */
47
+ deviceName?: string;
48
+ }
49
+ /**
50
+ * @export
51
+ */
52
+ export declare const ApplicationAuthorizationRequestUioCodeChallengeMethodEnum: {
53
+ readonly S256: "S256";
54
+ };
55
+ export type ApplicationAuthorizationRequestUioCodeChallengeMethodEnum = typeof ApplicationAuthorizationRequestUioCodeChallengeMethodEnum[keyof typeof ApplicationAuthorizationRequestUioCodeChallengeMethodEnum];
56
+ /**
57
+ * Check if a given object implements the ApplicationAuthorizationRequestUio interface.
58
+ */
59
+ export declare function instanceOfApplicationAuthorizationRequestUio(value: object): value is ApplicationAuthorizationRequestUio;
60
+ export declare function ApplicationAuthorizationRequestUioFromJSON(json: any): ApplicationAuthorizationRequestUio;
61
+ export declare function ApplicationAuthorizationRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationAuthorizationRequestUio;
62
+ export declare function ApplicationAuthorizationRequestUioToJSON(json: any): ApplicationAuthorizationRequestUio;
63
+ export declare function ApplicationAuthorizationRequestUioToJSONTyped(value?: ApplicationAuthorizationRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ApplicationAuthorizationRequestUioCodeChallengeMethodEnum = void 0;
17
+ exports.instanceOfApplicationAuthorizationRequestUio = instanceOfApplicationAuthorizationRequestUio;
18
+ exports.ApplicationAuthorizationRequestUioFromJSON = ApplicationAuthorizationRequestUioFromJSON;
19
+ exports.ApplicationAuthorizationRequestUioFromJSONTyped = ApplicationAuthorizationRequestUioFromJSONTyped;
20
+ exports.ApplicationAuthorizationRequestUioToJSON = ApplicationAuthorizationRequestUioToJSON;
21
+ exports.ApplicationAuthorizationRequestUioToJSONTyped = ApplicationAuthorizationRequestUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.ApplicationAuthorizationRequestUioCodeChallengeMethodEnum = {
26
+ S256: 'S256'
27
+ };
28
+ /**
29
+ * Check if a given object implements the ApplicationAuthorizationRequestUio interface.
30
+ */
31
+ function instanceOfApplicationAuthorizationRequestUio(value) {
32
+ if (!('clientId' in value) || value['clientId'] === undefined)
33
+ return false;
34
+ if (!('redirectUri' in value) || value['redirectUri'] === undefined)
35
+ return false;
36
+ if (!('codeChallenge' in value) || value['codeChallenge'] === undefined)
37
+ return false;
38
+ if (!('codeChallengeMethod' in value) || value['codeChallengeMethod'] === undefined)
39
+ return false;
40
+ return true;
41
+ }
42
+ function ApplicationAuthorizationRequestUioFromJSON(json) {
43
+ return ApplicationAuthorizationRequestUioFromJSONTyped(json, false);
44
+ }
45
+ function ApplicationAuthorizationRequestUioFromJSONTyped(json, ignoreDiscriminator) {
46
+ if (json == null) {
47
+ return json;
48
+ }
49
+ return {
50
+ 'clientId': json['clientId'],
51
+ 'redirectUri': json['redirectUri'],
52
+ 'codeChallenge': json['codeChallenge'],
53
+ 'codeChallengeMethod': json['codeChallengeMethod'],
54
+ 'deviceName': json['deviceName'] == null ? undefined : json['deviceName'],
55
+ };
56
+ }
57
+ function ApplicationAuthorizationRequestUioToJSON(json) {
58
+ return ApplicationAuthorizationRequestUioToJSONTyped(json, false);
59
+ }
60
+ function ApplicationAuthorizationRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+ 'clientId': value['clientId'],
66
+ 'redirectUri': value['redirectUri'],
67
+ 'codeChallenge': value['codeChallenge'],
68
+ 'codeChallengeMethod': value['codeChallengeMethod'],
69
+ 'deviceName': value['deviceName'],
70
+ };
71
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ApplicationAuthorizationResponseUio
16
+ */
17
+ export interface ApplicationAuthorizationResponseUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ApplicationAuthorizationResponseUio
22
+ */
23
+ code: string;
24
+ /**
25
+ * Lifetime of the code, in seconds.
26
+ * @type {number}
27
+ * @memberof ApplicationAuthorizationResponseUio
28
+ */
29
+ expiresIn: number;
30
+ }
31
+ /**
32
+ * Check if a given object implements the ApplicationAuthorizationResponseUio interface.
33
+ */
34
+ export declare function instanceOfApplicationAuthorizationResponseUio(value: object): value is ApplicationAuthorizationResponseUio;
35
+ export declare function ApplicationAuthorizationResponseUioFromJSON(json: any): ApplicationAuthorizationResponseUio;
36
+ export declare function ApplicationAuthorizationResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationAuthorizationResponseUio;
37
+ export declare function ApplicationAuthorizationResponseUioToJSON(json: any): ApplicationAuthorizationResponseUio;
38
+ export declare function ApplicationAuthorizationResponseUioToJSONTyped(value?: ApplicationAuthorizationResponseUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfApplicationAuthorizationResponseUio = instanceOfApplicationAuthorizationResponseUio;
17
+ exports.ApplicationAuthorizationResponseUioFromJSON = ApplicationAuthorizationResponseUioFromJSON;
18
+ exports.ApplicationAuthorizationResponseUioFromJSONTyped = ApplicationAuthorizationResponseUioFromJSONTyped;
19
+ exports.ApplicationAuthorizationResponseUioToJSON = ApplicationAuthorizationResponseUioToJSON;
20
+ exports.ApplicationAuthorizationResponseUioToJSONTyped = ApplicationAuthorizationResponseUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ApplicationAuthorizationResponseUio interface.
23
+ */
24
+ function instanceOfApplicationAuthorizationResponseUio(value) {
25
+ if (!('code' in value) || value['code'] === undefined)
26
+ return false;
27
+ if (!('expiresIn' in value) || value['expiresIn'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function ApplicationAuthorizationResponseUioFromJSON(json) {
32
+ return ApplicationAuthorizationResponseUioFromJSONTyped(json, false);
33
+ }
34
+ function ApplicationAuthorizationResponseUioFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'code': json['code'],
40
+ 'expiresIn': json['expiresIn'],
41
+ };
42
+ }
43
+ function ApplicationAuthorizationResponseUioToJSON(json) {
44
+ return ApplicationAuthorizationResponseUioToJSONTyped(json, false);
45
+ }
46
+ function ApplicationAuthorizationResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'code': value['code'],
52
+ 'expiresIn': value['expiresIn'],
53
+ };
54
+ }