@breign/client 1.0.56 → 1.0.58

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.
Files changed (41) hide show
  1. package/dist/apis/ConversationsApi.d.ts +5 -5
  2. package/dist/apis/ConversationsApi.js +4 -3
  3. package/dist/apis/ToolsApi.d.ts +12 -1
  4. package/dist/apis/ToolsApi.js +27 -0
  5. package/dist/models/AttachmentCreateRequestUio.d.ts +5 -39
  6. package/dist/models/AttachmentCreateRequestUio.js +22 -32
  7. package/dist/models/AttachmentCreateResponseUio.d.ts +24 -0
  8. package/dist/models/AttachmentCreateResponseUio.js +64 -0
  9. package/dist/models/AttachmentDetailsResponseUio.d.ts +23 -0
  10. package/dist/models/AttachmentDetailsResponseUio.js +57 -0
  11. package/dist/models/AttachmentTypeUio.d.ts +1 -0
  12. package/dist/models/AttachmentTypeUio.js +2 -1
  13. package/dist/models/ChatContextAttachmentUio.d.ts +23 -0
  14. package/dist/models/ChatContextAttachmentUio.js +57 -0
  15. package/dist/models/ConnectOAuth2Tool200ResponseUio.d.ts +32 -0
  16. package/dist/models/ConnectOAuth2Tool200ResponseUio.js +50 -0
  17. package/dist/models/ContextUio.d.ts +3 -3
  18. package/dist/models/ContextUio.js +3 -3
  19. package/dist/models/FileAttachmentCreateRequestUio.d.ts +63 -0
  20. package/dist/models/FileAttachmentCreateRequestUio.js +73 -0
  21. package/dist/models/FileAttachmentDetailsResponseUio.d.ts +89 -0
  22. package/dist/models/FileAttachmentDetailsResponseUio.js +85 -0
  23. package/dist/models/FileAttachmentProcessedOneOfUio.d.ts +9 -3
  24. package/dist/models/FileAttachmentProcessedOneOfUio.js +9 -3
  25. package/dist/models/FileAttachmentUio.d.ts +1 -1
  26. package/dist/models/FileAttachmentUploadResponseUio.d.ts +103 -0
  27. package/dist/models/FileAttachmentUploadResponseUio.js +93 -0
  28. package/dist/models/ImageAttachment1Uio.d.ts +94 -0
  29. package/dist/models/ImageAttachment1Uio.js +90 -0
  30. package/dist/models/ImageAttachmentCreateRequestUio.d.ts +69 -0
  31. package/dist/models/ImageAttachmentCreateRequestUio.js +75 -0
  32. package/dist/models/ImageAttachmentDetailsResponseUio.d.ts +94 -0
  33. package/dist/models/ImageAttachmentDetailsResponseUio.js +90 -0
  34. package/dist/models/ImageAttachmentUio.d.ts +94 -0
  35. package/dist/models/ImageAttachmentUio.js +90 -0
  36. package/dist/models/ImageAttachmentUploadResponseUio.d.ts +108 -0
  37. package/dist/models/ImageAttachmentUploadResponseUio.js +98 -0
  38. package/dist/models/index.d.ts +12 -0
  39. package/dist/models/index.js +12 -0
  40. package/dist/openapi.json +249 -6
  41. package/package.json +1 -1
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AttachmentCreateRequestUio, BodyWithMessageUio, ContextUio, ConversationSummaryUio, FileAttachmentUio } from '../models/index';
13
+ import type { AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, BodyWithMessageUio, ContextUio, ConversationSummaryUio } from '../models/index';
14
14
  export interface ArchiveConversationByIdRequest {
15
15
  conversationId: string;
16
16
  }
@@ -127,12 +127,12 @@ export declare class ConversationsApi extends runtime.BaseAPI {
127
127
  * Get a specific attachment by its ID from the context of a conversation.
128
128
  * Retrieve an attachment from a conversation context
129
129
  */
130
- getAttachmentRaw(requestParameters: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileAttachmentUio>>;
130
+ getAttachmentRaw(requestParameters: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AttachmentDetailsResponseUio>>;
131
131
  /**
132
132
  * Get a specific attachment by its ID from the context of a conversation.
133
133
  * Retrieve an attachment from a conversation context
134
134
  */
135
- getAttachment(conversationId: string, attachmentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileAttachmentUio>;
135
+ getAttachment(conversationId: string, attachmentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AttachmentDetailsResponseUio>;
136
136
  /**
137
137
  * Retrieve the context of a specific conversation by its ID.
138
138
  * Get the context of a conversation
@@ -181,12 +181,12 @@ export declare class ConversationsApi extends runtime.BaseAPI {
181
181
  * Upload one file attachment to the context of a specific conversation.
182
182
  * Upload attachment to a conversation context.
183
183
  */
184
- uploadAttachmentRaw(requestParameters: UploadAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
184
+ uploadAttachmentRaw(requestParameters: UploadAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AttachmentCreateResponseUio>>;
185
185
  /**
186
186
  * Upload one file attachment to the context of a specific conversation.
187
187
  * Upload attachment to a conversation context.
188
188
  */
189
- uploadAttachment(conversationId: string, attachmentCreateRequestUio: AttachmentCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
189
+ uploadAttachment(conversationId: string, attachmentCreateRequestUio: AttachmentCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AttachmentCreateResponseUio>;
190
190
  }
191
191
  /**
192
192
  * @export
@@ -260,7 +260,7 @@ class ConversationsApi extends runtime.BaseAPI {
260
260
  headers: headerParameters,
261
261
  query: queryParameters,
262
262
  }, initOverrides);
263
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FileAttachmentUioFromJSON)(jsonValue));
263
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AttachmentDetailsResponseUioFromJSON)(jsonValue));
264
264
  }
265
265
  /**
266
266
  * Get a specific attachment by its ID from the context of a conversation.
@@ -416,14 +416,15 @@ class ConversationsApi extends runtime.BaseAPI {
416
416
  query: queryParameters,
417
417
  body: (0, index_1.AttachmentCreateRequestUioToJSON)(requestParameters['attachmentCreateRequestUio']),
418
418
  }, initOverrides);
419
- return new runtime.VoidApiResponse(response);
419
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AttachmentCreateResponseUioFromJSON)(jsonValue));
420
420
  }
421
421
  /**
422
422
  * Upload one file attachment to the context of a specific conversation.
423
423
  * Upload attachment to a conversation context.
424
424
  */
425
425
  async uploadAttachment(conversationId, attachmentCreateRequestUio, initOverrides) {
426
- await this.uploadAttachmentRaw({ conversationId: conversationId, attachmentCreateRequestUio: attachmentCreateRequestUio }, initOverrides);
426
+ const response = await this.uploadAttachmentRaw({ conversationId: conversationId, attachmentCreateRequestUio: attachmentCreateRequestUio }, initOverrides);
427
+ return await response.value();
427
428
  }
428
429
  }
429
430
  exports.ConversationsApi = ConversationsApi;
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AgentToolUio, RevealTokenRequestUio, RevealTokenResponseUio, STTResponseUio, SetTokenRequestUio, TTSRequestUio, TTSResponseUio, ToolCreateRequestUio, ToolSecureUio } from '../models/index';
13
+ import type { AgentToolUio, ConnectOAuth2Tool200ResponseUio, RevealTokenRequestUio, RevealTokenResponseUio, STTResponseUio, SetTokenRequestUio, TTSRequestUio, TTSResponseUio, ToolCreateRequestUio, ToolSecureUio } from '../models/index';
14
+ export interface ConnectOAuth2ToolRequest {
15
+ toolId: string;
16
+ }
14
17
  export interface ConvertSpeechToTextRequest {
15
18
  body: Blob;
16
19
  language?: string;
@@ -45,6 +48,14 @@ export interface SetupToolRequest {
45
48
  *
46
49
  */
47
50
  export declare class ToolsApi extends runtime.BaseAPI {
51
+ /**
52
+ * Connect a tool via OAuth2
53
+ */
54
+ connectOAuth2ToolRaw(requestParameters: ConnectOAuth2ToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConnectOAuth2Tool200ResponseUio>>;
55
+ /**
56
+ * Connect a tool via OAuth2
57
+ */
58
+ connectOAuth2Tool(toolId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectOAuth2Tool200ResponseUio>;
48
59
  /**
49
60
  * Transcribes audio files to text using OpenAI\'s Whisper model
50
61
  * Convert speech to text
@@ -53,6 +53,33 @@ const index_1 = require("../models/index");
53
53
  *
54
54
  */
55
55
  class ToolsApi extends runtime.BaseAPI {
56
+ /**
57
+ * Connect a tool via OAuth2
58
+ */
59
+ async connectOAuth2ToolRaw(requestParameters, initOverrides) {
60
+ if (requestParameters['toolId'] == null) {
61
+ throw new runtime.RequiredError('toolId', 'Required parameter "toolId" was null or undefined when calling connectOAuth2Tool().');
62
+ }
63
+ const queryParameters = {};
64
+ const headerParameters = {};
65
+ if (this.configuration && this.configuration.apiKey) {
66
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
67
+ }
68
+ const response = await this.request({
69
+ path: `/tools/{toolId}/oauth/connect`.replace(`{${"toolId"}}`, encodeURIComponent(String(requestParameters['toolId']))),
70
+ method: 'POST',
71
+ headers: headerParameters,
72
+ query: queryParameters,
73
+ }, initOverrides);
74
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConnectOAuth2Tool200ResponseUioFromJSON)(jsonValue));
75
+ }
76
+ /**
77
+ * Connect a tool via OAuth2
78
+ */
79
+ async connectOAuth2Tool(toolId, initOverrides) {
80
+ const response = await this.connectOAuth2ToolRaw({ toolId: toolId }, initOverrides);
81
+ return await response.value();
82
+ }
56
83
  /**
57
84
  * Transcribes audio files to text using OpenAI\'s Whisper model
58
85
  * Convert speech to text
@@ -9,49 +9,15 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { AttachmentTypeUio } from './AttachmentTypeUio';
12
+ import type { FileAttachmentCreateRequestUio } from './FileAttachmentCreateRequestUio';
13
+ import type { ImageAttachmentCreateRequestUio } from './ImageAttachmentCreateRequestUio';
13
14
  /**
15
+ * @type AttachmentCreateRequestUio
14
16
  *
15
17
  * @export
16
- * @interface AttachmentCreateRequestUio
17
18
  */
18
- export interface AttachmentCreateRequestUio {
19
- /**
20
- *
21
- * @type {AttachmentTypeUio}
22
- * @memberof AttachmentCreateRequestUio
23
- */
24
- type: AttachmentTypeUio;
25
- /**
26
- *
27
- * @type {string}
28
- * @memberof AttachmentCreateRequestUio
29
- */
30
- name: string;
31
- /**
32
- *
33
- * @type {string}
34
- * @memberof AttachmentCreateRequestUio
35
- */
36
- mimeType: string;
37
- /**
38
- *
39
- * @type {number}
40
- * @memberof AttachmentCreateRequestUio
41
- */
42
- size: number;
43
- /**
44
- *
45
- * @type {string}
46
- * @memberof AttachmentCreateRequestUio
47
- */
48
- ext: string;
49
- }
50
- /**
51
- * Check if a given object implements the AttachmentCreateRequestUio interface.
52
- */
53
- export declare function instanceOfAttachmentCreateRequestUio(value: object): value is AttachmentCreateRequestUio;
19
+ export type AttachmentCreateRequestUio = FileAttachmentCreateRequestUio | ImageAttachmentCreateRequestUio;
54
20
  export declare function AttachmentCreateRequestUioFromJSON(json: any): AttachmentCreateRequestUio;
55
21
  export declare function AttachmentCreateRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachmentCreateRequestUio;
56
- export declare function AttachmentCreateRequestUioToJSON(json: any): AttachmentCreateRequestUio;
22
+ export declare function AttachmentCreateRequestUioToJSON(json: any): any;
57
23
  export declare function AttachmentCreateRequestUioToJSONTyped(value?: AttachmentCreateRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -13,28 +13,12 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.instanceOfAttachmentCreateRequestUio = instanceOfAttachmentCreateRequestUio;
17
16
  exports.AttachmentCreateRequestUioFromJSON = AttachmentCreateRequestUioFromJSON;
18
17
  exports.AttachmentCreateRequestUioFromJSONTyped = AttachmentCreateRequestUioFromJSONTyped;
19
18
  exports.AttachmentCreateRequestUioToJSON = AttachmentCreateRequestUioToJSON;
20
19
  exports.AttachmentCreateRequestUioToJSONTyped = AttachmentCreateRequestUioToJSONTyped;
21
- const AttachmentTypeUio_1 = require("./AttachmentTypeUio");
22
- /**
23
- * Check if a given object implements the AttachmentCreateRequestUio interface.
24
- */
25
- function instanceOfAttachmentCreateRequestUio(value) {
26
- if (!('type' in value) || value['type'] === undefined)
27
- return false;
28
- if (!('name' in value) || value['name'] === undefined)
29
- return false;
30
- if (!('mimeType' in value) || value['mimeType'] === undefined)
31
- return false;
32
- if (!('size' in value) || value['size'] === undefined)
33
- return false;
34
- if (!('ext' in value) || value['ext'] === undefined)
35
- return false;
36
- return true;
37
- }
20
+ const FileAttachmentCreateRequestUio_1 = require("./FileAttachmentCreateRequestUio");
21
+ const ImageAttachmentCreateRequestUio_1 = require("./ImageAttachmentCreateRequestUio");
38
22
  function AttachmentCreateRequestUioFromJSON(json) {
39
23
  return AttachmentCreateRequestUioFromJSONTyped(json, false);
40
24
  }
@@ -42,13 +26,16 @@ function AttachmentCreateRequestUioFromJSONTyped(json, ignoreDiscriminator) {
42
26
  if (json == null) {
43
27
  return json;
44
28
  }
45
- return {
46
- 'type': (0, AttachmentTypeUio_1.AttachmentTypeUioFromJSON)(json['type']),
47
- 'name': json['name'],
48
- 'mimeType': json['mimeType'],
49
- 'size': json['size'],
50
- 'ext': json['ext'],
51
- };
29
+ if (typeof json !== 'object') {
30
+ return json;
31
+ }
32
+ if ((0, FileAttachmentCreateRequestUio_1.instanceOfFileAttachmentCreateRequestUio)(json)) {
33
+ return (0, FileAttachmentCreateRequestUio_1.FileAttachmentCreateRequestUioFromJSONTyped)(json, true);
34
+ }
35
+ if ((0, ImageAttachmentCreateRequestUio_1.instanceOfImageAttachmentCreateRequestUio)(json)) {
36
+ return (0, ImageAttachmentCreateRequestUio_1.ImageAttachmentCreateRequestUioFromJSONTyped)(json, true);
37
+ }
38
+ return {};
52
39
  }
53
40
  function AttachmentCreateRequestUioToJSON(json) {
54
41
  return AttachmentCreateRequestUioToJSONTyped(json, false);
@@ -57,11 +44,14 @@ function AttachmentCreateRequestUioToJSONTyped(value, ignoreDiscriminator = fals
57
44
  if (value == null) {
58
45
  return value;
59
46
  }
60
- return {
61
- 'type': (0, AttachmentTypeUio_1.AttachmentTypeUioToJSON)(value['type']),
62
- 'name': value['name'],
63
- 'mimeType': value['mimeType'],
64
- 'size': value['size'],
65
- 'ext': value['ext'],
66
- };
47
+ if (typeof value !== 'object') {
48
+ return value;
49
+ }
50
+ if ((0, FileAttachmentCreateRequestUio_1.instanceOfFileAttachmentCreateRequestUio)(value)) {
51
+ return (0, FileAttachmentCreateRequestUio_1.FileAttachmentCreateRequestUioToJSON)(value);
52
+ }
53
+ if ((0, ImageAttachmentCreateRequestUio_1.instanceOfImageAttachmentCreateRequestUio)(value)) {
54
+ return (0, ImageAttachmentCreateRequestUio_1.ImageAttachmentCreateRequestUioToJSON)(value);
55
+ }
56
+ return {};
67
57
  }
@@ -0,0 +1,24 @@
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
+ import type { FileAttachmentUploadResponseUio } from './FileAttachmentUploadResponseUio';
13
+ import type { ImageAttachmentUio } from './ImageAttachmentUio';
14
+ import type { ImageAttachmentUploadResponseUio } from './ImageAttachmentUploadResponseUio';
15
+ /**
16
+ * @type AttachmentCreateResponseUio
17
+ *
18
+ * @export
19
+ */
20
+ export type AttachmentCreateResponseUio = FileAttachmentUploadResponseUio | ImageAttachmentUio | ImageAttachmentUploadResponseUio;
21
+ export declare function AttachmentCreateResponseUioFromJSON(json: any): AttachmentCreateResponseUio;
22
+ export declare function AttachmentCreateResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachmentCreateResponseUio;
23
+ export declare function AttachmentCreateResponseUioToJSON(json: any): any;
24
+ export declare function AttachmentCreateResponseUioToJSONTyped(value?: AttachmentCreateResponseUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,64 @@
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.AttachmentCreateResponseUioFromJSON = AttachmentCreateResponseUioFromJSON;
17
+ exports.AttachmentCreateResponseUioFromJSONTyped = AttachmentCreateResponseUioFromJSONTyped;
18
+ exports.AttachmentCreateResponseUioToJSON = AttachmentCreateResponseUioToJSON;
19
+ exports.AttachmentCreateResponseUioToJSONTyped = AttachmentCreateResponseUioToJSONTyped;
20
+ const FileAttachmentUploadResponseUio_1 = require("./FileAttachmentUploadResponseUio");
21
+ const ImageAttachmentUio_1 = require("./ImageAttachmentUio");
22
+ const ImageAttachmentUploadResponseUio_1 = require("./ImageAttachmentUploadResponseUio");
23
+ function AttachmentCreateResponseUioFromJSON(json) {
24
+ return AttachmentCreateResponseUioFromJSONTyped(json, false);
25
+ }
26
+ function AttachmentCreateResponseUioFromJSONTyped(json, ignoreDiscriminator) {
27
+ if (json == null) {
28
+ return json;
29
+ }
30
+ if (typeof json !== 'object') {
31
+ return json;
32
+ }
33
+ if ((0, FileAttachmentUploadResponseUio_1.instanceOfFileAttachmentUploadResponseUio)(json)) {
34
+ return (0, FileAttachmentUploadResponseUio_1.FileAttachmentUploadResponseUioFromJSONTyped)(json, true);
35
+ }
36
+ if ((0, ImageAttachmentUio_1.instanceOfImageAttachmentUio)(json)) {
37
+ return (0, ImageAttachmentUio_1.ImageAttachmentUioFromJSONTyped)(json, true);
38
+ }
39
+ if ((0, ImageAttachmentUploadResponseUio_1.instanceOfImageAttachmentUploadResponseUio)(json)) {
40
+ return (0, ImageAttachmentUploadResponseUio_1.ImageAttachmentUploadResponseUioFromJSONTyped)(json, true);
41
+ }
42
+ return {};
43
+ }
44
+ function AttachmentCreateResponseUioToJSON(json) {
45
+ return AttachmentCreateResponseUioToJSONTyped(json, false);
46
+ }
47
+ function AttachmentCreateResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ if (typeof value !== 'object') {
52
+ return value;
53
+ }
54
+ if ((0, FileAttachmentUploadResponseUio_1.instanceOfFileAttachmentUploadResponseUio)(value)) {
55
+ return (0, FileAttachmentUploadResponseUio_1.FileAttachmentUploadResponseUioToJSON)(value);
56
+ }
57
+ if ((0, ImageAttachmentUio_1.instanceOfImageAttachmentUio)(value)) {
58
+ return (0, ImageAttachmentUio_1.ImageAttachmentUioToJSON)(value);
59
+ }
60
+ if ((0, ImageAttachmentUploadResponseUio_1.instanceOfImageAttachmentUploadResponseUio)(value)) {
61
+ return (0, ImageAttachmentUploadResponseUio_1.ImageAttachmentUploadResponseUioToJSON)(value);
62
+ }
63
+ return {};
64
+ }
@@ -0,0 +1,23 @@
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
+ import type { FileAttachmentDetailsResponseUio } from './FileAttachmentDetailsResponseUio';
13
+ import type { ImageAttachmentDetailsResponseUio } from './ImageAttachmentDetailsResponseUio';
14
+ /**
15
+ * @type AttachmentDetailsResponseUio
16
+ *
17
+ * @export
18
+ */
19
+ export type AttachmentDetailsResponseUio = FileAttachmentDetailsResponseUio | ImageAttachmentDetailsResponseUio;
20
+ export declare function AttachmentDetailsResponseUioFromJSON(json: any): AttachmentDetailsResponseUio;
21
+ export declare function AttachmentDetailsResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachmentDetailsResponseUio;
22
+ export declare function AttachmentDetailsResponseUioToJSON(json: any): any;
23
+ export declare function AttachmentDetailsResponseUioToJSONTyped(value?: AttachmentDetailsResponseUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
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.AttachmentDetailsResponseUioFromJSON = AttachmentDetailsResponseUioFromJSON;
17
+ exports.AttachmentDetailsResponseUioFromJSONTyped = AttachmentDetailsResponseUioFromJSONTyped;
18
+ exports.AttachmentDetailsResponseUioToJSON = AttachmentDetailsResponseUioToJSON;
19
+ exports.AttachmentDetailsResponseUioToJSONTyped = AttachmentDetailsResponseUioToJSONTyped;
20
+ const FileAttachmentDetailsResponseUio_1 = require("./FileAttachmentDetailsResponseUio");
21
+ const ImageAttachmentDetailsResponseUio_1 = require("./ImageAttachmentDetailsResponseUio");
22
+ function AttachmentDetailsResponseUioFromJSON(json) {
23
+ return AttachmentDetailsResponseUioFromJSONTyped(json, false);
24
+ }
25
+ function AttachmentDetailsResponseUioFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ if (typeof json !== 'object') {
30
+ return json;
31
+ }
32
+ if ((0, FileAttachmentDetailsResponseUio_1.instanceOfFileAttachmentDetailsResponseUio)(json)) {
33
+ return (0, FileAttachmentDetailsResponseUio_1.FileAttachmentDetailsResponseUioFromJSONTyped)(json, true);
34
+ }
35
+ if ((0, ImageAttachmentDetailsResponseUio_1.instanceOfImageAttachmentDetailsResponseUio)(json)) {
36
+ return (0, ImageAttachmentDetailsResponseUio_1.ImageAttachmentDetailsResponseUioFromJSONTyped)(json, true);
37
+ }
38
+ return {};
39
+ }
40
+ function AttachmentDetailsResponseUioToJSON(json) {
41
+ return AttachmentDetailsResponseUioToJSONTyped(json, false);
42
+ }
43
+ function AttachmentDetailsResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ if (typeof value !== 'object') {
48
+ return value;
49
+ }
50
+ if ((0, FileAttachmentDetailsResponseUio_1.instanceOfFileAttachmentDetailsResponseUio)(value)) {
51
+ return (0, FileAttachmentDetailsResponseUio_1.FileAttachmentDetailsResponseUioToJSON)(value);
52
+ }
53
+ if ((0, ImageAttachmentDetailsResponseUio_1.instanceOfImageAttachmentDetailsResponseUio)(value)) {
54
+ return (0, ImageAttachmentDetailsResponseUio_1.ImageAttachmentDetailsResponseUioToJSON)(value);
55
+ }
56
+ return {};
57
+ }
@@ -15,6 +15,7 @@
15
15
  */
16
16
  export declare const AttachmentTypeUio: {
17
17
  readonly File: "file";
18
+ readonly Image: "image";
18
19
  };
19
20
  export type AttachmentTypeUio = typeof AttachmentTypeUio[keyof typeof AttachmentTypeUio];
20
21
  export declare function instanceOfAttachmentTypeUio(value: any): boolean;
@@ -24,7 +24,8 @@ exports.AttachmentTypeUioToJSONTyped = AttachmentTypeUioToJSONTyped;
24
24
  * @export
25
25
  */
26
26
  exports.AttachmentTypeUio = {
27
- File: 'file'
27
+ File: 'file',
28
+ Image: 'image'
28
29
  };
29
30
  function instanceOfAttachmentTypeUio(value) {
30
31
  for (const key in exports.AttachmentTypeUio) {
@@ -0,0 +1,23 @@
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
+ import type { FileAttachmentUio } from './FileAttachmentUio';
13
+ import type { ImageAttachment1Uio } from './ImageAttachment1Uio';
14
+ /**
15
+ * @type ChatContextAttachmentUio
16
+ *
17
+ * @export
18
+ */
19
+ export type ChatContextAttachmentUio = FileAttachmentUio | ImageAttachment1Uio;
20
+ export declare function ChatContextAttachmentUioFromJSON(json: any): ChatContextAttachmentUio;
21
+ export declare function ChatContextAttachmentUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatContextAttachmentUio;
22
+ export declare function ChatContextAttachmentUioToJSON(json: any): any;
23
+ export declare function ChatContextAttachmentUioToJSONTyped(value?: ChatContextAttachmentUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
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.ChatContextAttachmentUioFromJSON = ChatContextAttachmentUioFromJSON;
17
+ exports.ChatContextAttachmentUioFromJSONTyped = ChatContextAttachmentUioFromJSONTyped;
18
+ exports.ChatContextAttachmentUioToJSON = ChatContextAttachmentUioToJSON;
19
+ exports.ChatContextAttachmentUioToJSONTyped = ChatContextAttachmentUioToJSONTyped;
20
+ const FileAttachmentUio_1 = require("./FileAttachmentUio");
21
+ const ImageAttachment1Uio_1 = require("./ImageAttachment1Uio");
22
+ function ChatContextAttachmentUioFromJSON(json) {
23
+ return ChatContextAttachmentUioFromJSONTyped(json, false);
24
+ }
25
+ function ChatContextAttachmentUioFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ if (typeof json !== 'object') {
30
+ return json;
31
+ }
32
+ if ((0, FileAttachmentUio_1.instanceOfFileAttachmentUio)(json)) {
33
+ return (0, FileAttachmentUio_1.FileAttachmentUioFromJSONTyped)(json, true);
34
+ }
35
+ if ((0, ImageAttachment1Uio_1.instanceOfImageAttachment1Uio)(json)) {
36
+ return (0, ImageAttachment1Uio_1.ImageAttachment1UioFromJSONTyped)(json, true);
37
+ }
38
+ return {};
39
+ }
40
+ function ChatContextAttachmentUioToJSON(json) {
41
+ return ChatContextAttachmentUioToJSONTyped(json, false);
42
+ }
43
+ function ChatContextAttachmentUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ if (typeof value !== 'object') {
48
+ return value;
49
+ }
50
+ if ((0, FileAttachmentUio_1.instanceOfFileAttachmentUio)(value)) {
51
+ return (0, FileAttachmentUio_1.FileAttachmentUioToJSON)(value);
52
+ }
53
+ if ((0, ImageAttachment1Uio_1.instanceOfImageAttachment1Uio)(value)) {
54
+ return (0, ImageAttachment1Uio_1.ImageAttachment1UioToJSON)(value);
55
+ }
56
+ return {};
57
+ }
@@ -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 ConnectOAuth2Tool200ResponseUio
16
+ */
17
+ export interface ConnectOAuth2Tool200ResponseUio {
18
+ /**
19
+ * URL to redirect the user for OAuth2 authorization
20
+ * @type {string}
21
+ * @memberof ConnectOAuth2Tool200ResponseUio
22
+ */
23
+ authorizationUrl: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the ConnectOAuth2Tool200ResponseUio interface.
27
+ */
28
+ export declare function instanceOfConnectOAuth2Tool200ResponseUio(value: object): value is ConnectOAuth2Tool200ResponseUio;
29
+ export declare function ConnectOAuth2Tool200ResponseUioFromJSON(json: any): ConnectOAuth2Tool200ResponseUio;
30
+ export declare function ConnectOAuth2Tool200ResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectOAuth2Tool200ResponseUio;
31
+ export declare function ConnectOAuth2Tool200ResponseUioToJSON(json: any): ConnectOAuth2Tool200ResponseUio;
32
+ export declare function ConnectOAuth2Tool200ResponseUioToJSONTyped(value?: ConnectOAuth2Tool200ResponseUio | 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.instanceOfConnectOAuth2Tool200ResponseUio = instanceOfConnectOAuth2Tool200ResponseUio;
17
+ exports.ConnectOAuth2Tool200ResponseUioFromJSON = ConnectOAuth2Tool200ResponseUioFromJSON;
18
+ exports.ConnectOAuth2Tool200ResponseUioFromJSONTyped = ConnectOAuth2Tool200ResponseUioFromJSONTyped;
19
+ exports.ConnectOAuth2Tool200ResponseUioToJSON = ConnectOAuth2Tool200ResponseUioToJSON;
20
+ exports.ConnectOAuth2Tool200ResponseUioToJSONTyped = ConnectOAuth2Tool200ResponseUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ConnectOAuth2Tool200ResponseUio interface.
23
+ */
24
+ function instanceOfConnectOAuth2Tool200ResponseUio(value) {
25
+ if (!('authorizationUrl' in value) || value['authorizationUrl'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function ConnectOAuth2Tool200ResponseUioFromJSON(json) {
30
+ return ConnectOAuth2Tool200ResponseUioFromJSONTyped(json, false);
31
+ }
32
+ function ConnectOAuth2Tool200ResponseUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'authorizationUrl': json['authorizationUrl'],
38
+ };
39
+ }
40
+ function ConnectOAuth2Tool200ResponseUioToJSON(json) {
41
+ return ConnectOAuth2Tool200ResponseUioToJSONTyped(json, false);
42
+ }
43
+ function ConnectOAuth2Tool200ResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'authorizationUrl': value['authorizationUrl'],
49
+ };
50
+ }
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FileAttachmentUio } from './FileAttachmentUio';
12
+ import type { ChatContextAttachmentUio } from './ChatContextAttachmentUio';
13
13
  /**
14
14
  *
15
15
  * @export
@@ -18,10 +18,10 @@ import type { FileAttachmentUio } from './FileAttachmentUio';
18
18
  export interface ContextUio {
19
19
  /**
20
20
  *
21
- * @type {Array<FileAttachmentUio>}
21
+ * @type {Array<ChatContextAttachmentUio>}
22
22
  * @memberof ContextUio
23
23
  */
24
- attachments: Array<FileAttachmentUio>;
24
+ attachments: Array<ChatContextAttachmentUio>;
25
25
  }
26
26
  /**
27
27
  * Check if a given object implements the ContextUio interface.