@breign/client 1.0.57 → 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 (37) hide show
  1. package/dist/apis/ConversationsApi.d.ts +5 -5
  2. package/dist/apis/ConversationsApi.js +4 -3
  3. package/dist/models/AttachmentCreateRequestUio.d.ts +5 -39
  4. package/dist/models/AttachmentCreateRequestUio.js +22 -32
  5. package/dist/models/AttachmentCreateResponseUio.d.ts +24 -0
  6. package/dist/models/AttachmentCreateResponseUio.js +64 -0
  7. package/dist/models/AttachmentDetailsResponseUio.d.ts +23 -0
  8. package/dist/models/AttachmentDetailsResponseUio.js +57 -0
  9. package/dist/models/AttachmentTypeUio.d.ts +1 -0
  10. package/dist/models/AttachmentTypeUio.js +2 -1
  11. package/dist/models/ChatContextAttachmentUio.d.ts +23 -0
  12. package/dist/models/ChatContextAttachmentUio.js +57 -0
  13. package/dist/models/ContextUio.d.ts +3 -3
  14. package/dist/models/ContextUio.js +3 -3
  15. package/dist/models/FileAttachmentCreateRequestUio.d.ts +63 -0
  16. package/dist/models/FileAttachmentCreateRequestUio.js +73 -0
  17. package/dist/models/FileAttachmentDetailsResponseUio.d.ts +89 -0
  18. package/dist/models/FileAttachmentDetailsResponseUio.js +85 -0
  19. package/dist/models/FileAttachmentProcessedOneOfUio.d.ts +9 -3
  20. package/dist/models/FileAttachmentProcessedOneOfUio.js +9 -3
  21. package/dist/models/FileAttachmentUio.d.ts +1 -1
  22. package/dist/models/FileAttachmentUploadResponseUio.d.ts +103 -0
  23. package/dist/models/FileAttachmentUploadResponseUio.js +93 -0
  24. package/dist/models/ImageAttachment1Uio.d.ts +94 -0
  25. package/dist/models/ImageAttachment1Uio.js +90 -0
  26. package/dist/models/ImageAttachmentCreateRequestUio.d.ts +69 -0
  27. package/dist/models/ImageAttachmentCreateRequestUio.js +75 -0
  28. package/dist/models/ImageAttachmentDetailsResponseUio.d.ts +94 -0
  29. package/dist/models/ImageAttachmentDetailsResponseUio.js +90 -0
  30. package/dist/models/ImageAttachmentUio.d.ts +94 -0
  31. package/dist/models/ImageAttachmentUio.js +90 -0
  32. package/dist/models/ImageAttachmentUploadResponseUio.d.ts +108 -0
  33. package/dist/models/ImageAttachmentUploadResponseUio.js +98 -0
  34. package/dist/models/index.d.ts +11 -0
  35. package/dist/models/index.js +11 -0
  36. package/dist/openapi.json +194 -6
  37. 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;
@@ -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
+ }
@@ -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.
@@ -18,7 +18,7 @@ exports.ContextUioFromJSON = ContextUioFromJSON;
18
18
  exports.ContextUioFromJSONTyped = ContextUioFromJSONTyped;
19
19
  exports.ContextUioToJSON = ContextUioToJSON;
20
20
  exports.ContextUioToJSONTyped = ContextUioToJSONTyped;
21
- const FileAttachmentUio_1 = require("./FileAttachmentUio");
21
+ const ChatContextAttachmentUio_1 = require("./ChatContextAttachmentUio");
22
22
  /**
23
23
  * Check if a given object implements the ContextUio interface.
24
24
  */
@@ -35,7 +35,7 @@ function ContextUioFromJSONTyped(json, ignoreDiscriminator) {
35
35
  return json;
36
36
  }
37
37
  return {
38
- 'attachments': (json['attachments'].map(FileAttachmentUio_1.FileAttachmentUioFromJSON)),
38
+ 'attachments': (json['attachments'].map(ChatContextAttachmentUio_1.ChatContextAttachmentUioFromJSON)),
39
39
  };
40
40
  }
41
41
  function ContextUioToJSON(json) {
@@ -46,6 +46,6 @@ function ContextUioToJSONTyped(value, ignoreDiscriminator = false) {
46
46
  return value;
47
47
  }
48
48
  return {
49
- 'attachments': (value['attachments'].map(FileAttachmentUio_1.FileAttachmentUioToJSON)),
49
+ 'attachments': (value['attachments'].map(ChatContextAttachmentUio_1.ChatContextAttachmentUioToJSON)),
50
50
  };
51
51
  }
@@ -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 FileAttachmentCreateRequestUio
16
+ */
17
+ export interface FileAttachmentCreateRequestUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof FileAttachmentCreateRequestUio
22
+ */
23
+ type: FileAttachmentCreateRequestUioTypeEnum;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof FileAttachmentCreateRequestUio
28
+ */
29
+ name: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof FileAttachmentCreateRequestUio
34
+ */
35
+ mimeType: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof FileAttachmentCreateRequestUio
40
+ */
41
+ ext: string;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof FileAttachmentCreateRequestUio
46
+ */
47
+ size: number;
48
+ }
49
+ /**
50
+ * @export
51
+ */
52
+ export declare const FileAttachmentCreateRequestUioTypeEnum: {
53
+ readonly File: "file";
54
+ };
55
+ export type FileAttachmentCreateRequestUioTypeEnum = typeof FileAttachmentCreateRequestUioTypeEnum[keyof typeof FileAttachmentCreateRequestUioTypeEnum];
56
+ /**
57
+ * Check if a given object implements the FileAttachmentCreateRequestUio interface.
58
+ */
59
+ export declare function instanceOfFileAttachmentCreateRequestUio(value: object): value is FileAttachmentCreateRequestUio;
60
+ export declare function FileAttachmentCreateRequestUioFromJSON(json: any): FileAttachmentCreateRequestUio;
61
+ export declare function FileAttachmentCreateRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileAttachmentCreateRequestUio;
62
+ export declare function FileAttachmentCreateRequestUioToJSON(json: any): FileAttachmentCreateRequestUio;
63
+ export declare function FileAttachmentCreateRequestUioToJSONTyped(value?: FileAttachmentCreateRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,73 @@
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.FileAttachmentCreateRequestUioTypeEnum = void 0;
17
+ exports.instanceOfFileAttachmentCreateRequestUio = instanceOfFileAttachmentCreateRequestUio;
18
+ exports.FileAttachmentCreateRequestUioFromJSON = FileAttachmentCreateRequestUioFromJSON;
19
+ exports.FileAttachmentCreateRequestUioFromJSONTyped = FileAttachmentCreateRequestUioFromJSONTyped;
20
+ exports.FileAttachmentCreateRequestUioToJSON = FileAttachmentCreateRequestUioToJSON;
21
+ exports.FileAttachmentCreateRequestUioToJSONTyped = FileAttachmentCreateRequestUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.FileAttachmentCreateRequestUioTypeEnum = {
26
+ File: 'file'
27
+ };
28
+ /**
29
+ * Check if a given object implements the FileAttachmentCreateRequestUio interface.
30
+ */
31
+ function instanceOfFileAttachmentCreateRequestUio(value) {
32
+ if (!('type' in value) || value['type'] === undefined)
33
+ return false;
34
+ if (!('name' in value) || value['name'] === undefined)
35
+ return false;
36
+ if (!('mimeType' in value) || value['mimeType'] === undefined)
37
+ return false;
38
+ if (!('ext' in value) || value['ext'] === undefined)
39
+ return false;
40
+ if (!('size' in value) || value['size'] === undefined)
41
+ return false;
42
+ return true;
43
+ }
44
+ function FileAttachmentCreateRequestUioFromJSON(json) {
45
+ return FileAttachmentCreateRequestUioFromJSONTyped(json, false);
46
+ }
47
+ function FileAttachmentCreateRequestUioFromJSONTyped(json, ignoreDiscriminator) {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+ 'type': json['type'],
53
+ 'name': json['name'],
54
+ 'mimeType': json['mimeType'],
55
+ 'ext': json['ext'],
56
+ 'size': json['size'],
57
+ };
58
+ }
59
+ function FileAttachmentCreateRequestUioToJSON(json) {
60
+ return FileAttachmentCreateRequestUioToJSONTyped(json, false);
61
+ }
62
+ function FileAttachmentCreateRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
63
+ if (value == null) {
64
+ return value;
65
+ }
66
+ return {
67
+ 'type': value['type'],
68
+ 'name': value['name'],
69
+ 'mimeType': value['mimeType'],
70
+ 'ext': value['ext'],
71
+ 'size': value['size'],
72
+ };
73
+ }