@instructure/athena-api-client 1.0.4 → 1.0.5

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 (46) hide show
  1. package/README.md +7 -0
  2. package/dist/apis/FilesApi.d.ts +32 -0
  3. package/dist/apis/FilesApi.js +75 -0
  4. package/dist/apis/index.d.ts +1 -0
  5. package/dist/apis/index.js +1 -0
  6. package/dist/esm/apis/FilesApi.d.ts +32 -0
  7. package/dist/esm/apis/FilesApi.js +71 -0
  8. package/dist/esm/apis/index.d.ts +1 -0
  9. package/dist/esm/apis/index.js +1 -0
  10. package/dist/esm/models/ChatRequest.d.ts +7 -0
  11. package/dist/esm/models/ChatRequest.js +3 -0
  12. package/dist/esm/models/ChatRequestAttachmentsInner.d.ts +49 -0
  13. package/dist/esm/models/ChatRequestAttachmentsInner.js +57 -0
  14. package/dist/esm/models/Message.d.ts +4 -3
  15. package/dist/esm/models/Message.js +3 -2
  16. package/dist/esm/models/MessageAttachmentsInner.d.ts +55 -0
  17. package/dist/esm/models/MessageAttachmentsInner.js +59 -0
  18. package/dist/esm/models/UploadUrlRequest.d.ts +39 -0
  19. package/dist/esm/models/UploadUrlRequest.js +48 -0
  20. package/dist/esm/models/UploadUrlRequestFilesInner.d.ts +49 -0
  21. package/dist/esm/models/UploadUrlRequestFilesInner.js +57 -0
  22. package/dist/esm/models/UploadUrlResponse.d.ts +33 -0
  23. package/dist/esm/models/UploadUrlResponse.js +44 -0
  24. package/dist/esm/models/UploadUrlResponseFilesInner.d.ts +56 -0
  25. package/dist/esm/models/UploadUrlResponseFilesInner.js +59 -0
  26. package/dist/esm/models/index.d.ts +6 -0
  27. package/dist/esm/models/index.js +6 -0
  28. package/dist/models/ChatRequest.d.ts +7 -0
  29. package/dist/models/ChatRequest.js +3 -0
  30. package/dist/models/ChatRequestAttachmentsInner.d.ts +49 -0
  31. package/dist/models/ChatRequestAttachmentsInner.js +65 -0
  32. package/dist/models/Message.d.ts +4 -3
  33. package/dist/models/Message.js +3 -2
  34. package/dist/models/MessageAttachmentsInner.d.ts +55 -0
  35. package/dist/models/MessageAttachmentsInner.js +67 -0
  36. package/dist/models/UploadUrlRequest.d.ts +39 -0
  37. package/dist/models/UploadUrlRequest.js +55 -0
  38. package/dist/models/UploadUrlRequestFilesInner.d.ts +49 -0
  39. package/dist/models/UploadUrlRequestFilesInner.js +65 -0
  40. package/dist/models/UploadUrlResponse.d.ts +33 -0
  41. package/dist/models/UploadUrlResponse.js +51 -0
  42. package/dist/models/UploadUrlResponseFilesInner.d.ts +56 -0
  43. package/dist/models/UploadUrlResponseFilesInner.js +66 -0
  44. package/dist/models/index.d.ts +6 -0
  45. package/dist/models/index.js +6 -0
  46. package/package.json +28 -28
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Athena API
5
+ * REST API for the Athena system
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { UploadUrlRequestFilesInnerFromJSON, UploadUrlRequestFilesInnerToJSON, } from './UploadUrlRequestFilesInner';
15
+ /**
16
+ * Check if a given object implements the UploadUrlRequest interface.
17
+ */
18
+ export function instanceOfUploadUrlRequest(value) {
19
+ if (!('chatId' in value) || value['chatId'] === undefined)
20
+ return false;
21
+ if (!('files' in value) || value['files'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function UploadUrlRequestFromJSON(json) {
26
+ return UploadUrlRequestFromJSONTyped(json, false);
27
+ }
28
+ export function UploadUrlRequestFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'chatId': json['chatId'],
34
+ 'files': (json['files'].map(UploadUrlRequestFilesInnerFromJSON)),
35
+ };
36
+ }
37
+ export function UploadUrlRequestToJSON(json) {
38
+ return UploadUrlRequestToJSONTyped(json, false);
39
+ }
40
+ export function UploadUrlRequestToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'chatId': value['chatId'],
46
+ 'files': (value['files'].map(UploadUrlRequestFilesInnerToJSON)),
47
+ };
48
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
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 UploadUrlRequestFilesInner
16
+ */
17
+ export interface UploadUrlRequestFilesInner {
18
+ /**
19
+ * MIME type of the file to upload
20
+ * @type {string}
21
+ * @memberof UploadUrlRequestFilesInner
22
+ */
23
+ mimeType: UploadUrlRequestFilesInnerMimeTypeEnum;
24
+ /**
25
+ * File size in bytes (max 7444889)
26
+ * @type {number}
27
+ * @memberof UploadUrlRequestFilesInner
28
+ */
29
+ contentLength: number;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const UploadUrlRequestFilesInnerMimeTypeEnum: {
35
+ readonly ImageJpeg: "image/jpeg";
36
+ readonly ImageJpg: "image/jpg";
37
+ readonly ImagePng: "image/png";
38
+ readonly ImageWebp: "image/webp";
39
+ readonly ApplicationPdf: "application/pdf";
40
+ };
41
+ export type UploadUrlRequestFilesInnerMimeTypeEnum = typeof UploadUrlRequestFilesInnerMimeTypeEnum[keyof typeof UploadUrlRequestFilesInnerMimeTypeEnum];
42
+ /**
43
+ * Check if a given object implements the UploadUrlRequestFilesInner interface.
44
+ */
45
+ export declare function instanceOfUploadUrlRequestFilesInner(value: object): value is UploadUrlRequestFilesInner;
46
+ export declare function UploadUrlRequestFilesInnerFromJSON(json: any): UploadUrlRequestFilesInner;
47
+ export declare function UploadUrlRequestFilesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadUrlRequestFilesInner;
48
+ export declare function UploadUrlRequestFilesInnerToJSON(json: any): UploadUrlRequestFilesInner;
49
+ export declare function UploadUrlRequestFilesInnerToJSONTyped(value?: UploadUrlRequestFilesInner | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Athena API
5
+ * REST API for the Athena system
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * @export
16
+ */
17
+ export const UploadUrlRequestFilesInnerMimeTypeEnum = {
18
+ ImageJpeg: 'image/jpeg',
19
+ ImageJpg: 'image/jpg',
20
+ ImagePng: 'image/png',
21
+ ImageWebp: 'image/webp',
22
+ ApplicationPdf: 'application/pdf'
23
+ };
24
+ /**
25
+ * Check if a given object implements the UploadUrlRequestFilesInner interface.
26
+ */
27
+ export function instanceOfUploadUrlRequestFilesInner(value) {
28
+ if (!('mimeType' in value) || value['mimeType'] === undefined)
29
+ return false;
30
+ if (!('contentLength' in value) || value['contentLength'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ export function UploadUrlRequestFilesInnerFromJSON(json) {
35
+ return UploadUrlRequestFilesInnerFromJSONTyped(json, false);
36
+ }
37
+ export function UploadUrlRequestFilesInnerFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'mimeType': json['mimeType'],
43
+ 'contentLength': json['contentLength'],
44
+ };
45
+ }
46
+ export function UploadUrlRequestFilesInnerToJSON(json) {
47
+ return UploadUrlRequestFilesInnerToJSONTyped(json, false);
48
+ }
49
+ export function UploadUrlRequestFilesInnerToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'mimeType': value['mimeType'],
55
+ 'contentLength': value['contentLength'],
56
+ };
57
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
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 { UploadUrlResponseFilesInner } from './UploadUrlResponseFilesInner';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UploadUrlResponse
17
+ */
18
+ export interface UploadUrlResponse {
19
+ /**
20
+ *
21
+ * @type {Array<UploadUrlResponseFilesInner>}
22
+ * @memberof UploadUrlResponse
23
+ */
24
+ files: Array<UploadUrlResponseFilesInner>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the UploadUrlResponse interface.
28
+ */
29
+ export declare function instanceOfUploadUrlResponse(value: object): value is UploadUrlResponse;
30
+ export declare function UploadUrlResponseFromJSON(json: any): UploadUrlResponse;
31
+ export declare function UploadUrlResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadUrlResponse;
32
+ export declare function UploadUrlResponseToJSON(json: any): UploadUrlResponse;
33
+ export declare function UploadUrlResponseToJSONTyped(value?: UploadUrlResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,44 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Athena API
5
+ * REST API for the Athena system
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { UploadUrlResponseFilesInnerFromJSON, UploadUrlResponseFilesInnerToJSON, } from './UploadUrlResponseFilesInner';
15
+ /**
16
+ * Check if a given object implements the UploadUrlResponse interface.
17
+ */
18
+ export function instanceOfUploadUrlResponse(value) {
19
+ if (!('files' in value) || value['files'] === undefined)
20
+ return false;
21
+ return true;
22
+ }
23
+ export function UploadUrlResponseFromJSON(json) {
24
+ return UploadUrlResponseFromJSONTyped(json, false);
25
+ }
26
+ export function UploadUrlResponseFromJSONTyped(json, ignoreDiscriminator) {
27
+ if (json == null) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'files': (json['files'].map(UploadUrlResponseFilesInnerFromJSON)),
32
+ };
33
+ }
34
+ export function UploadUrlResponseToJSON(json) {
35
+ return UploadUrlResponseToJSONTyped(json, false);
36
+ }
37
+ export function UploadUrlResponseToJSONTyped(value, ignoreDiscriminator = false) {
38
+ if (value == null) {
39
+ return value;
40
+ }
41
+ return {
42
+ 'files': (value['files'].map(UploadUrlResponseFilesInnerToJSON)),
43
+ };
44
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
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 UploadUrlResponseFilesInner
16
+ */
17
+ export interface UploadUrlResponseFilesInner {
18
+ /**
19
+ * Unique identifier for the file
20
+ * @type {string}
21
+ * @memberof UploadUrlResponseFilesInner
22
+ */
23
+ fileId: string;
24
+ /**
25
+ * Presigned S3 PUT URL for uploading the file
26
+ * @type {string}
27
+ * @memberof UploadUrlResponseFilesInner
28
+ */
29
+ uploadUrl: string;
30
+ /**
31
+ * Presigned S3 GET URL for retrieving the file
32
+ * @type {string}
33
+ * @memberof UploadUrlResponseFilesInner
34
+ */
35
+ previewUrl: string;
36
+ /**
37
+ * Presigned S3 DELETE URL for deleting the file
38
+ * @type {string}
39
+ * @memberof UploadUrlResponseFilesInner
40
+ */
41
+ deleteUrl: string;
42
+ /**
43
+ * Expiry timestamp for the presigned URLs
44
+ * @type {Date}
45
+ * @memberof UploadUrlResponseFilesInner
46
+ */
47
+ expiresAt: Date;
48
+ }
49
+ /**
50
+ * Check if a given object implements the UploadUrlResponseFilesInner interface.
51
+ */
52
+ export declare function instanceOfUploadUrlResponseFilesInner(value: object): value is UploadUrlResponseFilesInner;
53
+ export declare function UploadUrlResponseFilesInnerFromJSON(json: any): UploadUrlResponseFilesInner;
54
+ export declare function UploadUrlResponseFilesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadUrlResponseFilesInner;
55
+ export declare function UploadUrlResponseFilesInnerToJSON(json: any): UploadUrlResponseFilesInner;
56
+ export declare function UploadUrlResponseFilesInnerToJSONTyped(value?: UploadUrlResponseFilesInner | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Athena API
5
+ * REST API for the Athena system
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the UploadUrlResponseFilesInner interface.
16
+ */
17
+ export function instanceOfUploadUrlResponseFilesInner(value) {
18
+ if (!('fileId' in value) || value['fileId'] === undefined)
19
+ return false;
20
+ if (!('uploadUrl' in value) || value['uploadUrl'] === undefined)
21
+ return false;
22
+ if (!('previewUrl' in value) || value['previewUrl'] === undefined)
23
+ return false;
24
+ if (!('deleteUrl' in value) || value['deleteUrl'] === undefined)
25
+ return false;
26
+ if (!('expiresAt' in value) || value['expiresAt'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ export function UploadUrlResponseFilesInnerFromJSON(json) {
31
+ return UploadUrlResponseFilesInnerFromJSONTyped(json, false);
32
+ }
33
+ export function UploadUrlResponseFilesInnerFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'fileId': json['fileId'],
39
+ 'uploadUrl': json['uploadUrl'],
40
+ 'previewUrl': json['previewUrl'],
41
+ 'deleteUrl': json['deleteUrl'],
42
+ 'expiresAt': (new Date(json['expiresAt'])),
43
+ };
44
+ }
45
+ export function UploadUrlResponseFilesInnerToJSON(json) {
46
+ return UploadUrlResponseFilesInnerToJSONTyped(json, false);
47
+ }
48
+ export function UploadUrlResponseFilesInnerToJSONTyped(value, ignoreDiscriminator = false) {
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'fileId': value['fileId'],
54
+ 'uploadUrl': value['uploadUrl'],
55
+ 'previewUrl': value['previewUrl'],
56
+ 'deleteUrl': value['deleteUrl'],
57
+ 'expiresAt': value['expiresAt'].toISOString(),
58
+ };
59
+ }
@@ -1,6 +1,7 @@
1
1
  export * from './Account';
2
2
  export * from './Chat';
3
3
  export * from './ChatRequest';
4
+ export * from './ChatRequestAttachmentsInner';
4
5
  export * from './CreateAccountRequest';
5
6
  export * from './CreateChatRequest';
6
7
  export * from './CreateTokenRequest';
@@ -10,6 +11,7 @@ export * from './LearningDaysResponse';
10
11
  export * from './LearningMoment';
11
12
  export * from './LearningStreakResponse';
12
13
  export * from './Message';
14
+ export * from './MessageAttachmentsInner';
13
15
  export * from './MessageCountResponse';
14
16
  export * from './MessagePartsInner';
15
17
  export * from './ModelError';
@@ -21,3 +23,7 @@ export * from './Tag';
21
23
  export * from './UpdateChatRequest';
22
24
  export * from './UpdateTokenRequest';
23
25
  export * from './UpdateTokenResponse';
26
+ export * from './UploadUrlRequest';
27
+ export * from './UploadUrlRequestFilesInner';
28
+ export * from './UploadUrlResponse';
29
+ export * from './UploadUrlResponseFilesInner';
@@ -3,6 +3,7 @@
3
3
  export * from './Account';
4
4
  export * from './Chat';
5
5
  export * from './ChatRequest';
6
+ export * from './ChatRequestAttachmentsInner';
6
7
  export * from './CreateAccountRequest';
7
8
  export * from './CreateChatRequest';
8
9
  export * from './CreateTokenRequest';
@@ -12,6 +13,7 @@ export * from './LearningDaysResponse';
12
13
  export * from './LearningMoment';
13
14
  export * from './LearningStreakResponse';
14
15
  export * from './Message';
16
+ export * from './MessageAttachmentsInner';
15
17
  export * from './MessageCountResponse';
16
18
  export * from './MessagePartsInner';
17
19
  export * from './ModelError';
@@ -23,3 +25,7 @@ export * from './Tag';
23
25
  export * from './UpdateChatRequest';
24
26
  export * from './UpdateTokenRequest';
25
27
  export * from './UpdateTokenResponse';
28
+ export * from './UploadUrlRequest';
29
+ export * from './UploadUrlRequestFilesInner';
30
+ export * from './UploadUrlResponse';
31
+ export * from './UploadUrlResponseFilesInner';
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { ChatRequestAttachmentsInner } from './ChatRequestAttachmentsInner';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -27,6 +28,12 @@ export interface ChatRequest {
27
28
  * @memberof ChatRequest
28
29
  */
29
30
  chatId?: string;
31
+ /**
32
+ * File attachments to include with the message (max 10)
33
+ * @type {Array<ChatRequestAttachmentsInner>}
34
+ * @memberof ChatRequest
35
+ */
36
+ attachments?: Array<ChatRequestAttachmentsInner>;
30
37
  }
31
38
  /**
32
39
  * Check if a given object implements the ChatRequest interface.
@@ -18,6 +18,7 @@ exports.ChatRequestFromJSON = ChatRequestFromJSON;
18
18
  exports.ChatRequestFromJSONTyped = ChatRequestFromJSONTyped;
19
19
  exports.ChatRequestToJSON = ChatRequestToJSON;
20
20
  exports.ChatRequestToJSONTyped = ChatRequestToJSONTyped;
21
+ const ChatRequestAttachmentsInner_1 = require("./ChatRequestAttachmentsInner");
21
22
  /**
22
23
  * Check if a given object implements the ChatRequest interface.
23
24
  */
@@ -36,6 +37,7 @@ function ChatRequestFromJSONTyped(json, ignoreDiscriminator) {
36
37
  return {
37
38
  'message': json['message'],
38
39
  'chatId': json['chatId'] == null ? undefined : json['chatId'],
40
+ 'attachments': json['attachments'] == null ? undefined : (json['attachments'].map(ChatRequestAttachmentsInner_1.ChatRequestAttachmentsInnerFromJSON)),
39
41
  };
40
42
  }
41
43
  function ChatRequestToJSON(json) {
@@ -48,5 +50,6 @@ function ChatRequestToJSONTyped(value, ignoreDiscriminator = false) {
48
50
  return {
49
51
  'message': value['message'],
50
52
  'chatId': value['chatId'],
53
+ 'attachments': value['attachments'] == null ? undefined : (value['attachments'].map(ChatRequestAttachmentsInner_1.ChatRequestAttachmentsInnerToJSON)),
51
54
  };
52
55
  }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
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 ChatRequestAttachmentsInner
16
+ */
17
+ export interface ChatRequestAttachmentsInner {
18
+ /**
19
+ * File ID returned from the upload-url endpoint
20
+ * @type {string}
21
+ * @memberof ChatRequestAttachmentsInner
22
+ */
23
+ fileId: string;
24
+ /**
25
+ * MIME type of the file
26
+ * @type {string}
27
+ * @memberof ChatRequestAttachmentsInner
28
+ */
29
+ mimeType: ChatRequestAttachmentsInnerMimeTypeEnum;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const ChatRequestAttachmentsInnerMimeTypeEnum: {
35
+ readonly ImageJpeg: "image/jpeg";
36
+ readonly ImageJpg: "image/jpg";
37
+ readonly ImagePng: "image/png";
38
+ readonly ImageWebp: "image/webp";
39
+ readonly ApplicationPdf: "application/pdf";
40
+ };
41
+ export type ChatRequestAttachmentsInnerMimeTypeEnum = typeof ChatRequestAttachmentsInnerMimeTypeEnum[keyof typeof ChatRequestAttachmentsInnerMimeTypeEnum];
42
+ /**
43
+ * Check if a given object implements the ChatRequestAttachmentsInner interface.
44
+ */
45
+ export declare function instanceOfChatRequestAttachmentsInner(value: object): value is ChatRequestAttachmentsInner;
46
+ export declare function ChatRequestAttachmentsInnerFromJSON(json: any): ChatRequestAttachmentsInner;
47
+ export declare function ChatRequestAttachmentsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatRequestAttachmentsInner;
48
+ export declare function ChatRequestAttachmentsInnerToJSON(json: any): ChatRequestAttachmentsInner;
49
+ export declare function ChatRequestAttachmentsInnerToJSONTyped(value?: ChatRequestAttachmentsInner | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Athena API
6
+ * REST API for the Athena system
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
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.ChatRequestAttachmentsInnerMimeTypeEnum = void 0;
17
+ exports.instanceOfChatRequestAttachmentsInner = instanceOfChatRequestAttachmentsInner;
18
+ exports.ChatRequestAttachmentsInnerFromJSON = ChatRequestAttachmentsInnerFromJSON;
19
+ exports.ChatRequestAttachmentsInnerFromJSONTyped = ChatRequestAttachmentsInnerFromJSONTyped;
20
+ exports.ChatRequestAttachmentsInnerToJSON = ChatRequestAttachmentsInnerToJSON;
21
+ exports.ChatRequestAttachmentsInnerToJSONTyped = ChatRequestAttachmentsInnerToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.ChatRequestAttachmentsInnerMimeTypeEnum = {
26
+ ImageJpeg: 'image/jpeg',
27
+ ImageJpg: 'image/jpg',
28
+ ImagePng: 'image/png',
29
+ ImageWebp: 'image/webp',
30
+ ApplicationPdf: 'application/pdf'
31
+ };
32
+ /**
33
+ * Check if a given object implements the ChatRequestAttachmentsInner interface.
34
+ */
35
+ function instanceOfChatRequestAttachmentsInner(value) {
36
+ if (!('fileId' in value) || value['fileId'] === undefined)
37
+ return false;
38
+ if (!('mimeType' in value) || value['mimeType'] === undefined)
39
+ return false;
40
+ return true;
41
+ }
42
+ function ChatRequestAttachmentsInnerFromJSON(json) {
43
+ return ChatRequestAttachmentsInnerFromJSONTyped(json, false);
44
+ }
45
+ function ChatRequestAttachmentsInnerFromJSONTyped(json, ignoreDiscriminator) {
46
+ if (json == null) {
47
+ return json;
48
+ }
49
+ return {
50
+ 'fileId': json['fileId'],
51
+ 'mimeType': json['mimeType'],
52
+ };
53
+ }
54
+ function ChatRequestAttachmentsInnerToJSON(json) {
55
+ return ChatRequestAttachmentsInnerToJSONTyped(json, false);
56
+ }
57
+ function ChatRequestAttachmentsInnerToJSONTyped(value, ignoreDiscriminator = false) {
58
+ if (value == null) {
59
+ return value;
60
+ }
61
+ return {
62
+ 'fileId': value['fileId'],
63
+ 'mimeType': value['mimeType'],
64
+ };
65
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { MessageAttachmentsInner } from './MessageAttachmentsInner';
12
13
  import type { MessagePartsInner } from './MessagePartsInner';
13
14
  /**
14
15
  *
@@ -41,11 +42,11 @@ export interface Message {
41
42
  */
42
43
  parts: Array<MessagePartsInner>;
43
44
  /**
44
- * Message attachments
45
- * @type {Array<object>}
45
+ * Message attachments with fresh signed GET URLs
46
+ * @type {Array<MessageAttachmentsInner>}
46
47
  * @memberof Message
47
48
  */
48
- attachments: Array<object>;
49
+ attachments: Array<MessageAttachmentsInner>;
49
50
  /**
50
51
  * Creation timestamp
51
52
  * @type {Date}
@@ -18,6 +18,7 @@ exports.MessageFromJSON = MessageFromJSON;
18
18
  exports.MessageFromJSONTyped = MessageFromJSONTyped;
19
19
  exports.MessageToJSON = MessageToJSON;
20
20
  exports.MessageToJSONTyped = MessageToJSONTyped;
21
+ const MessageAttachmentsInner_1 = require("./MessageAttachmentsInner");
21
22
  const MessagePartsInner_1 = require("./MessagePartsInner");
22
23
  /**
23
24
  * Check if a given object implements the Message interface.
@@ -51,7 +52,7 @@ function MessageFromJSONTyped(json, ignoreDiscriminator) {
51
52
  'chatId': json['chatId'],
52
53
  'role': json['role'],
53
54
  'parts': (json['parts'].map(MessagePartsInner_1.MessagePartsInnerFromJSON)),
54
- 'attachments': json['attachments'],
55
+ 'attachments': (json['attachments'].map(MessageAttachmentsInner_1.MessageAttachmentsInnerFromJSON)),
55
56
  'createdAt': (new Date(json['createdAt'])),
56
57
  'isLearningMoment': json['isLearningMoment'],
57
58
  };
@@ -68,7 +69,7 @@ function MessageToJSONTyped(value, ignoreDiscriminator = false) {
68
69
  'chatId': value['chatId'],
69
70
  'role': value['role'],
70
71
  'parts': (value['parts'].map(MessagePartsInner_1.MessagePartsInnerToJSON)),
71
- 'attachments': value['attachments'],
72
+ 'attachments': (value['attachments'].map(MessageAttachmentsInner_1.MessageAttachmentsInnerToJSON)),
72
73
  'createdAt': value['createdAt'].toISOString(),
73
74
  'isLearningMoment': value['isLearningMoment'],
74
75
  };
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
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 MessageAttachmentsInner
16
+ */
17
+ export interface MessageAttachmentsInner {
18
+ /**
19
+ * File ID returned from the upload-url endpoint
20
+ * @type {string}
21
+ * @memberof MessageAttachmentsInner
22
+ */
23
+ fileId: string;
24
+ /**
25
+ * MIME type of the file
26
+ * @type {string}
27
+ * @memberof MessageAttachmentsInner
28
+ */
29
+ mimeType: MessageAttachmentsInnerMimeTypeEnum;
30
+ /**
31
+ * Fresh signed GET URL (expires in 30 minutes). Absent for legacy attachments without a fileId.
32
+ * @type {string}
33
+ * @memberof MessageAttachmentsInner
34
+ */
35
+ url?: string;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const MessageAttachmentsInnerMimeTypeEnum: {
41
+ readonly ImageJpeg: "image/jpeg";
42
+ readonly ImageJpg: "image/jpg";
43
+ readonly ImagePng: "image/png";
44
+ readonly ImageWebp: "image/webp";
45
+ readonly ApplicationPdf: "application/pdf";
46
+ };
47
+ export type MessageAttachmentsInnerMimeTypeEnum = typeof MessageAttachmentsInnerMimeTypeEnum[keyof typeof MessageAttachmentsInnerMimeTypeEnum];
48
+ /**
49
+ * Check if a given object implements the MessageAttachmentsInner interface.
50
+ */
51
+ export declare function instanceOfMessageAttachmentsInner(value: object): value is MessageAttachmentsInner;
52
+ export declare function MessageAttachmentsInnerFromJSON(json: any): MessageAttachmentsInner;
53
+ export declare function MessageAttachmentsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): MessageAttachmentsInner;
54
+ export declare function MessageAttachmentsInnerToJSON(json: any): MessageAttachmentsInner;
55
+ export declare function MessageAttachmentsInnerToJSONTyped(value?: MessageAttachmentsInner | null, ignoreDiscriminator?: boolean): any;