@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.
- package/README.md +7 -0
- package/dist/apis/FilesApi.d.ts +32 -0
- package/dist/apis/FilesApi.js +75 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/FilesApi.d.ts +32 -0
- package/dist/esm/apis/FilesApi.js +71 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ChatRequest.d.ts +7 -0
- package/dist/esm/models/ChatRequest.js +3 -0
- package/dist/esm/models/ChatRequestAttachmentsInner.d.ts +49 -0
- package/dist/esm/models/ChatRequestAttachmentsInner.js +57 -0
- package/dist/esm/models/Message.d.ts +4 -3
- package/dist/esm/models/Message.js +3 -2
- package/dist/esm/models/MessageAttachmentsInner.d.ts +55 -0
- package/dist/esm/models/MessageAttachmentsInner.js +59 -0
- package/dist/esm/models/UploadUrlRequest.d.ts +39 -0
- package/dist/esm/models/UploadUrlRequest.js +48 -0
- package/dist/esm/models/UploadUrlRequestFilesInner.d.ts +49 -0
- package/dist/esm/models/UploadUrlRequestFilesInner.js +57 -0
- package/dist/esm/models/UploadUrlResponse.d.ts +33 -0
- package/dist/esm/models/UploadUrlResponse.js +44 -0
- package/dist/esm/models/UploadUrlResponseFilesInner.d.ts +56 -0
- package/dist/esm/models/UploadUrlResponseFilesInner.js +59 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/models/ChatRequest.d.ts +7 -0
- package/dist/models/ChatRequest.js +3 -0
- package/dist/models/ChatRequestAttachmentsInner.d.ts +49 -0
- package/dist/models/ChatRequestAttachmentsInner.js +65 -0
- package/dist/models/Message.d.ts +4 -3
- package/dist/models/Message.js +3 -2
- package/dist/models/MessageAttachmentsInner.d.ts +55 -0
- package/dist/models/MessageAttachmentsInner.js +67 -0
- package/dist/models/UploadUrlRequest.d.ts +39 -0
- package/dist/models/UploadUrlRequest.js +55 -0
- package/dist/models/UploadUrlRequestFilesInner.d.ts +49 -0
- package/dist/models/UploadUrlRequestFilesInner.js +65 -0
- package/dist/models/UploadUrlResponse.d.ts +33 -0
- package/dist/models/UploadUrlResponse.js +51 -0
- package/dist/models/UploadUrlResponseFilesInner.d.ts +56 -0
- package/dist/models/UploadUrlResponseFilesInner.js +66 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +28 -28
package/README.md
CHANGED
|
@@ -63,6 +63,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
63
63
|
*ChatsApi* | [**markChatAsViewed**](docs/ChatsApi.md#markchatasviewed) | **PATCH** /api/v1/chats/{chatId}/viewed | Mark chat as viewed
|
|
64
64
|
*ChatsApi* | [**sendChatMessage**](docs/ChatsApi.md#sendchatmessage) | **POST** /api/v1/chat | Send a message to a chat
|
|
65
65
|
*ChatsApi* | [**updateChat**](docs/ChatsApi.md#updatechatoperation) | **PATCH** /api/v1/chats/{chatId} | Update a chat
|
|
66
|
+
*FilesApi* | [**getFileUploadUrls**](docs/FilesApi.md#getfileuploadurls) | **POST** /api/v1/files/upload-url | Get presigned upload URLs
|
|
66
67
|
*HealthApi* | [**healthCheck**](docs/HealthApi.md#healthcheck) | **GET** /health | Health check endpoint
|
|
67
68
|
*LearningDaysApi* | [**getLearningDays**](docs/LearningDaysApi.md#getlearningdays) | **GET** /api/v1/learning-days | Get learning days in range
|
|
68
69
|
*LearningMomentsApi* | [**listLearningMoments**](docs/LearningMomentsApi.md#listlearningmoments) | **GET** /api/v1/learning-moments | List learning moments
|
|
@@ -84,6 +85,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
84
85
|
- [Account](docs/Account.md)
|
|
85
86
|
- [Chat](docs/Chat.md)
|
|
86
87
|
- [ChatRequest](docs/ChatRequest.md)
|
|
88
|
+
- [ChatRequestAttachmentsInner](docs/ChatRequestAttachmentsInner.md)
|
|
87
89
|
- [CreateAccountRequest](docs/CreateAccountRequest.md)
|
|
88
90
|
- [CreateChatRequest](docs/CreateChatRequest.md)
|
|
89
91
|
- [CreateTokenRequest](docs/CreateTokenRequest.md)
|
|
@@ -93,6 +95,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
93
95
|
- [LearningMoment](docs/LearningMoment.md)
|
|
94
96
|
- [LearningStreakResponse](docs/LearningStreakResponse.md)
|
|
95
97
|
- [Message](docs/Message.md)
|
|
98
|
+
- [MessageAttachmentsInner](docs/MessageAttachmentsInner.md)
|
|
96
99
|
- [MessageCountResponse](docs/MessageCountResponse.md)
|
|
97
100
|
- [MessagePartsInner](docs/MessagePartsInner.md)
|
|
98
101
|
- [ModelError](docs/ModelError.md)
|
|
@@ -104,6 +107,10 @@ All URIs are relative to *http://localhost:3000*
|
|
|
104
107
|
- [UpdateChatRequest](docs/UpdateChatRequest.md)
|
|
105
108
|
- [UpdateTokenRequest](docs/UpdateTokenRequest.md)
|
|
106
109
|
- [UpdateTokenResponse](docs/UpdateTokenResponse.md)
|
|
110
|
+
- [UploadUrlRequest](docs/UploadUrlRequest.md)
|
|
111
|
+
- [UploadUrlRequestFilesInner](docs/UploadUrlRequestFilesInner.md)
|
|
112
|
+
- [UploadUrlResponse](docs/UploadUrlResponse.md)
|
|
113
|
+
- [UploadUrlResponseFilesInner](docs/UploadUrlResponseFilesInner.md)
|
|
107
114
|
|
|
108
115
|
### Authorization
|
|
109
116
|
|
|
@@ -0,0 +1,32 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { UploadUrlRequest, UploadUrlResponse } from '../models/index';
|
|
14
|
+
export interface GetFileUploadUrlsRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
uploadUrlRequest: UploadUrlRequest;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare class FilesApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Returns signed S3 PUT/GET/DELETE URLs for uploading files. Only the chat owner can request upload URLs.
|
|
24
|
+
* Get presigned upload URLs
|
|
25
|
+
*/
|
|
26
|
+
getFileUploadUrlsRaw(requestParameters: GetFileUploadUrlsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadUrlResponse>>;
|
|
27
|
+
/**
|
|
28
|
+
* Returns signed S3 PUT/GET/DELETE URLs for uploading files. Only the chat owner can request upload URLs.
|
|
29
|
+
* Get presigned upload URLs
|
|
30
|
+
*/
|
|
31
|
+
getFileUploadUrls(requestParameters: GetFileUploadUrlsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadUrlResponse>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.FilesApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class FilesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Returns signed S3 PUT/GET/DELETE URLs for uploading files. Only the chat owner can request upload URLs.
|
|
34
|
+
* Get presigned upload URLs
|
|
35
|
+
*/
|
|
36
|
+
getFileUploadUrlsRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['xUserId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getFileUploadUrls().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['uploadUrlRequest'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('uploadUrlRequest', 'Required parameter "uploadUrlRequest" was null or undefined when calling getFileUploadUrls().');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
47
|
+
if (requestParameters['xUserId'] != null) {
|
|
48
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
49
|
+
}
|
|
50
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
51
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
52
|
+
}
|
|
53
|
+
let urlPath = `/api/v1/files/upload-url`;
|
|
54
|
+
const response = yield this.request({
|
|
55
|
+
path: urlPath,
|
|
56
|
+
method: 'POST',
|
|
57
|
+
headers: headerParameters,
|
|
58
|
+
query: queryParameters,
|
|
59
|
+
body: (0, index_1.UploadUrlRequestToJSON)(requestParameters['uploadUrlRequest']),
|
|
60
|
+
}, initOverrides);
|
|
61
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UploadUrlResponseFromJSON)(jsonValue));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Returns signed S3 PUT/GET/DELETE URLs for uploading files. Only the chat owner can request upload URLs.
|
|
66
|
+
* Get presigned upload URLs
|
|
67
|
+
*/
|
|
68
|
+
getFileUploadUrls(requestParameters, initOverrides) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const response = yield this.getFileUploadUrlsRaw(requestParameters, initOverrides);
|
|
71
|
+
return yield response.value();
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.FilesApi = FilesApi;
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./AccountsApi"), exports);
|
|
20
20
|
__exportStar(require("./ChatsApi"), exports);
|
|
21
|
+
__exportStar(require("./FilesApi"), exports);
|
|
21
22
|
__exportStar(require("./HealthApi"), exports);
|
|
22
23
|
__exportStar(require("./LearningDaysApi"), exports);
|
|
23
24
|
__exportStar(require("./LearningMomentsApi"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { UploadUrlRequest, UploadUrlResponse } from '../models/index';
|
|
14
|
+
export interface GetFileUploadUrlsRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
uploadUrlRequest: UploadUrlRequest;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare class FilesApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Returns signed S3 PUT/GET/DELETE URLs for uploading files. Only the chat owner can request upload URLs.
|
|
24
|
+
* Get presigned upload URLs
|
|
25
|
+
*/
|
|
26
|
+
getFileUploadUrlsRaw(requestParameters: GetFileUploadUrlsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadUrlResponse>>;
|
|
27
|
+
/**
|
|
28
|
+
* Returns signed S3 PUT/GET/DELETE URLs for uploading files. Only the chat owner can request upload URLs.
|
|
29
|
+
* Get presigned upload URLs
|
|
30
|
+
*/
|
|
31
|
+
getFileUploadUrls(requestParameters: GetFileUploadUrlsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadUrlResponse>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { UploadUrlRequestToJSON, UploadUrlResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class FilesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Returns signed S3 PUT/GET/DELETE URLs for uploading files. Only the chat owner can request upload URLs.
|
|
31
|
+
* Get presigned upload URLs
|
|
32
|
+
*/
|
|
33
|
+
getFileUploadUrlsRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['xUserId'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getFileUploadUrls().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['uploadUrlRequest'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('uploadUrlRequest', 'Required parameter "uploadUrlRequest" was null or undefined when calling getFileUploadUrls().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
+
if (requestParameters['xUserId'] != null) {
|
|
45
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
46
|
+
}
|
|
47
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
48
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
49
|
+
}
|
|
50
|
+
let urlPath = `/api/v1/files/upload-url`;
|
|
51
|
+
const response = yield this.request({
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
body: UploadUrlRequestToJSON(requestParameters['uploadUrlRequest']),
|
|
57
|
+
}, initOverrides);
|
|
58
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UploadUrlResponseFromJSON(jsonValue));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Returns signed S3 PUT/GET/DELETE URLs for uploading files. Only the chat owner can request upload URLs.
|
|
63
|
+
* Get presigned upload URLs
|
|
64
|
+
*/
|
|
65
|
+
getFileUploadUrls(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const response = yield this.getFileUploadUrlsRaw(requestParameters, initOverrides);
|
|
68
|
+
return yield response.value();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -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.
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { ChatRequestAttachmentsInnerFromJSON, ChatRequestAttachmentsInnerToJSON, } from './ChatRequestAttachmentsInner';
|
|
14
15
|
/**
|
|
15
16
|
* Check if a given object implements the ChatRequest interface.
|
|
16
17
|
*/
|
|
@@ -29,6 +30,7 @@ export function ChatRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
30
|
return {
|
|
30
31
|
'message': json['message'],
|
|
31
32
|
'chatId': json['chatId'] == null ? undefined : json['chatId'],
|
|
33
|
+
'attachments': json['attachments'] == null ? undefined : (json['attachments'].map(ChatRequestAttachmentsInnerFromJSON)),
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
36
|
export function ChatRequestToJSON(json) {
|
|
@@ -41,5 +43,6 @@ export function ChatRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
41
43
|
return {
|
|
42
44
|
'message': value['message'],
|
|
43
45
|
'chatId': value['chatId'],
|
|
46
|
+
'attachments': value['attachments'] == null ? undefined : (value['attachments'].map(ChatRequestAttachmentsInnerToJSON)),
|
|
44
47
|
};
|
|
45
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 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,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 ChatRequestAttachmentsInnerMimeTypeEnum = {
|
|
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 ChatRequestAttachmentsInner interface.
|
|
26
|
+
*/
|
|
27
|
+
export function instanceOfChatRequestAttachmentsInner(value) {
|
|
28
|
+
if (!('fileId' in value) || value['fileId'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('mimeType' in value) || value['mimeType'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
export function ChatRequestAttachmentsInnerFromJSON(json) {
|
|
35
|
+
return ChatRequestAttachmentsInnerFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function ChatRequestAttachmentsInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'fileId': json['fileId'],
|
|
43
|
+
'mimeType': json['mimeType'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function ChatRequestAttachmentsInnerToJSON(json) {
|
|
47
|
+
return ChatRequestAttachmentsInnerToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
export function ChatRequestAttachmentsInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'fileId': value['fileId'],
|
|
55
|
+
'mimeType': value['mimeType'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -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<
|
|
45
|
+
* Message attachments with fresh signed GET URLs
|
|
46
|
+
* @type {Array<MessageAttachmentsInner>}
|
|
46
47
|
* @memberof Message
|
|
47
48
|
*/
|
|
48
|
-
attachments: Array<
|
|
49
|
+
attachments: Array<MessageAttachmentsInner>;
|
|
49
50
|
/**
|
|
50
51
|
* Creation timestamp
|
|
51
52
|
* @type {Date}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { MessageAttachmentsInnerFromJSON, MessageAttachmentsInnerToJSON, } from './MessageAttachmentsInner';
|
|
14
15
|
import { MessagePartsInnerFromJSON, MessagePartsInnerToJSON, } from './MessagePartsInner';
|
|
15
16
|
/**
|
|
16
17
|
* Check if a given object implements the Message interface.
|
|
@@ -44,7 +45,7 @@ export function MessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
45
|
'chatId': json['chatId'],
|
|
45
46
|
'role': json['role'],
|
|
46
47
|
'parts': (json['parts'].map(MessagePartsInnerFromJSON)),
|
|
47
|
-
'attachments': json['attachments'],
|
|
48
|
+
'attachments': (json['attachments'].map(MessageAttachmentsInnerFromJSON)),
|
|
48
49
|
'createdAt': (new Date(json['createdAt'])),
|
|
49
50
|
'isLearningMoment': json['isLearningMoment'],
|
|
50
51
|
};
|
|
@@ -61,7 +62,7 @@ export function MessageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
61
62
|
'chatId': value['chatId'],
|
|
62
63
|
'role': value['role'],
|
|
63
64
|
'parts': (value['parts'].map(MessagePartsInnerToJSON)),
|
|
64
|
-
'attachments': value['attachments'],
|
|
65
|
+
'attachments': (value['attachments'].map(MessageAttachmentsInnerToJSON)),
|
|
65
66
|
'createdAt': value['createdAt'].toISOString(),
|
|
66
67
|
'isLearningMoment': value['isLearningMoment'],
|
|
67
68
|
};
|
|
@@ -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;
|
|
@@ -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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const MessageAttachmentsInnerMimeTypeEnum = {
|
|
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 MessageAttachmentsInner interface.
|
|
26
|
+
*/
|
|
27
|
+
export function instanceOfMessageAttachmentsInner(value) {
|
|
28
|
+
if (!('fileId' in value) || value['fileId'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('mimeType' in value) || value['mimeType'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
export function MessageAttachmentsInnerFromJSON(json) {
|
|
35
|
+
return MessageAttachmentsInnerFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function MessageAttachmentsInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'fileId': json['fileId'],
|
|
43
|
+
'mimeType': json['mimeType'],
|
|
44
|
+
'url': json['url'] == null ? undefined : json['url'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export function MessageAttachmentsInnerToJSON(json) {
|
|
48
|
+
return MessageAttachmentsInnerToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
export function MessageAttachmentsInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'fileId': value['fileId'],
|
|
56
|
+
'mimeType': value['mimeType'],
|
|
57
|
+
'url': value['url'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { UploadUrlRequestFilesInner } from './UploadUrlRequestFilesInner';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UploadUrlRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface UploadUrlRequest {
|
|
19
|
+
/**
|
|
20
|
+
* ID of the chat to associate the files with
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UploadUrlRequest
|
|
23
|
+
*/
|
|
24
|
+
chatId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {Array<UploadUrlRequestFilesInner>}
|
|
28
|
+
* @memberof UploadUrlRequest
|
|
29
|
+
*/
|
|
30
|
+
files: Array<UploadUrlRequestFilesInner>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the UploadUrlRequest interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfUploadUrlRequest(value: object): value is UploadUrlRequest;
|
|
36
|
+
export declare function UploadUrlRequestFromJSON(json: any): UploadUrlRequest;
|
|
37
|
+
export declare function UploadUrlRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadUrlRequest;
|
|
38
|
+
export declare function UploadUrlRequestToJSON(json: any): UploadUrlRequest;
|
|
39
|
+
export declare function UploadUrlRequestToJSONTyped(value?: UploadUrlRequest | null, ignoreDiscriminator?: boolean): any;
|