@instructure/athena-api-client 1.0.3 → 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 +9 -0
- package/dist/apis/ChatsApi.d.ts +1 -0
- package/dist/apis/ChatsApi.js +3 -0
- package/dist/apis/FilesApi.d.ts +32 -0
- package/dist/apis/FilesApi.js +75 -0
- package/dist/apis/LearningStreakApi.d.ts +31 -0
- package/dist/apis/LearningStreakApi.js +70 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/ChatsApi.d.ts +1 -0
- package/dist/esm/apis/ChatsApi.js +3 -0
- package/dist/esm/apis/FilesApi.d.ts +32 -0
- package/dist/esm/apis/FilesApi.js +71 -0
- package/dist/esm/apis/LearningStreakApi.d.ts +31 -0
- package/dist/esm/apis/LearningStreakApi.js +66 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -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/CreateChatRequest.d.ts +26 -0
- package/dist/esm/models/CreateChatRequest.js +13 -0
- package/dist/esm/models/LearningStreakResponse.d.ts +74 -0
- package/dist/esm/models/LearningStreakResponse.js +67 -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/UpdateChatRequest.d.ts +20 -0
- package/dist/esm/models/UpdateChatRequest.js +11 -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 +7 -0
- package/dist/esm/models/index.js +7 -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/CreateChatRequest.d.ts +26 -0
- package/dist/models/CreateChatRequest.js +14 -0
- package/dist/models/LearningStreakResponse.d.ts +74 -0
- package/dist/models/LearningStreakResponse.js +74 -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/UpdateChatRequest.d.ts +20 -0
- package/dist/models/UpdateChatRequest.js +12 -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 +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +28 -28
package/README.md
CHANGED
|
@@ -63,9 +63,11 @@ 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
|
|
70
|
+
*LearningStreakApi* | [**getLearningStreak**](docs/LearningStreakApi.md#getlearningstreak) | **GET** /api/v1/learning-streak | Get learning streak
|
|
69
71
|
*MessagesApi* | [**deleteMessages**](docs/MessagesApi.md#deletemessages) | **DELETE** /api/v1/chats/{chatId}/messages | Delete messages from timestamp
|
|
70
72
|
*MessagesApi* | [**getChatMessage**](docs/MessagesApi.md#getchatmessage) | **GET** /api/v1/chats/{chatId}/messages/{messageId} | Get a chat message
|
|
71
73
|
*MessagesApi* | [**getChatMessages**](docs/MessagesApi.md#getchatmessages) | **GET** /api/v1/chats/{chatId}/messages | List chat messages
|
|
@@ -83,6 +85,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
83
85
|
- [Account](docs/Account.md)
|
|
84
86
|
- [Chat](docs/Chat.md)
|
|
85
87
|
- [ChatRequest](docs/ChatRequest.md)
|
|
88
|
+
- [ChatRequestAttachmentsInner](docs/ChatRequestAttachmentsInner.md)
|
|
86
89
|
- [CreateAccountRequest](docs/CreateAccountRequest.md)
|
|
87
90
|
- [CreateChatRequest](docs/CreateChatRequest.md)
|
|
88
91
|
- [CreateTokenRequest](docs/CreateTokenRequest.md)
|
|
@@ -90,7 +93,9 @@ All URIs are relative to *http://localhost:3000*
|
|
|
90
93
|
- [HealthCheck](docs/HealthCheck.md)
|
|
91
94
|
- [LearningDaysResponse](docs/LearningDaysResponse.md)
|
|
92
95
|
- [LearningMoment](docs/LearningMoment.md)
|
|
96
|
+
- [LearningStreakResponse](docs/LearningStreakResponse.md)
|
|
93
97
|
- [Message](docs/Message.md)
|
|
98
|
+
- [MessageAttachmentsInner](docs/MessageAttachmentsInner.md)
|
|
94
99
|
- [MessageCountResponse](docs/MessageCountResponse.md)
|
|
95
100
|
- [MessagePartsInner](docs/MessagePartsInner.md)
|
|
96
101
|
- [ModelError](docs/ModelError.md)
|
|
@@ -102,6 +107,10 @@ All URIs are relative to *http://localhost:3000*
|
|
|
102
107
|
- [UpdateChatRequest](docs/UpdateChatRequest.md)
|
|
103
108
|
- [UpdateTokenRequest](docs/UpdateTokenRequest.md)
|
|
104
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)
|
|
105
114
|
|
|
106
115
|
### Authorization
|
|
107
116
|
|
package/dist/apis/ChatsApi.d.ts
CHANGED
package/dist/apis/ChatsApi.js
CHANGED
|
@@ -165,6 +165,9 @@ class ChatsApi extends runtime.BaseAPI {
|
|
|
165
165
|
if (requestParameters['cursor'] != null) {
|
|
166
166
|
queryParameters['cursor'] = requestParameters['cursor'];
|
|
167
167
|
}
|
|
168
|
+
if (requestParameters['chatType'] != null) {
|
|
169
|
+
queryParameters['chatType'] = requestParameters['chatType'];
|
|
170
|
+
}
|
|
168
171
|
const headerParameters = {};
|
|
169
172
|
if (requestParameters['xUserId'] != null) {
|
|
170
173
|
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
@@ -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;
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { LearningStreakResponse } from '../models/index';
|
|
14
|
+
export interface GetLearningStreakRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class LearningStreakApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Returns the current user\'s learning streak record, or null if they have no learning moments yet.
|
|
23
|
+
* Get learning streak
|
|
24
|
+
*/
|
|
25
|
+
getLearningStreakRaw(requestParameters: GetLearningStreakRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LearningStreakResponse>>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the current user\'s learning streak record, or null if they have no learning moments yet.
|
|
28
|
+
* Get learning streak
|
|
29
|
+
*/
|
|
30
|
+
getLearningStreak(requestParameters: GetLearningStreakRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LearningStreakResponse>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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.LearningStreakApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class LearningStreakApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Returns the current user\'s learning streak record, or null if they have no learning moments yet.
|
|
34
|
+
* Get learning streak
|
|
35
|
+
*/
|
|
36
|
+
getLearningStreakRaw(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 getLearningStreak().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
if (requestParameters['xUserId'] != null) {
|
|
44
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
45
|
+
}
|
|
46
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
47
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
48
|
+
}
|
|
49
|
+
let urlPath = `/api/v1/learning-streak`;
|
|
50
|
+
const response = yield this.request({
|
|
51
|
+
path: urlPath,
|
|
52
|
+
method: 'GET',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LearningStreakResponseFromJSON)(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns the current user\'s learning streak record, or null if they have no learning moments yet.
|
|
61
|
+
* Get learning streak
|
|
62
|
+
*/
|
|
63
|
+
getLearningStreak(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const response = yield this.getLearningStreakRaw(requestParameters, initOverrides);
|
|
66
|
+
return yield response.value();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.LearningStreakApi = LearningStreakApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './AccountsApi';
|
|
2
2
|
export * from './ChatsApi';
|
|
3
|
+
export * from './FilesApi';
|
|
3
4
|
export * from './HealthApi';
|
|
4
5
|
export * from './LearningDaysApi';
|
|
5
6
|
export * from './LearningMomentsApi';
|
|
7
|
+
export * from './LearningStreakApi';
|
|
6
8
|
export * from './MessagesApi';
|
|
7
9
|
export * from './ServiceTokensApi';
|
|
8
10
|
export * from './TagsApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -18,9 +18,11 @@ 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);
|
|
25
|
+
__exportStar(require("./LearningStreakApi"), exports);
|
|
24
26
|
__exportStar(require("./MessagesApi"), exports);
|
|
25
27
|
__exportStar(require("./ServiceTokensApi"), exports);
|
|
26
28
|
__exportStar(require("./TagsApi"), exports);
|
|
@@ -162,6 +162,9 @@ export class ChatsApi extends runtime.BaseAPI {
|
|
|
162
162
|
if (requestParameters['cursor'] != null) {
|
|
163
163
|
queryParameters['cursor'] = requestParameters['cursor'];
|
|
164
164
|
}
|
|
165
|
+
if (requestParameters['chatType'] != null) {
|
|
166
|
+
queryParameters['chatType'] = requestParameters['chatType'];
|
|
167
|
+
}
|
|
165
168
|
const headerParameters = {};
|
|
166
169
|
if (requestParameters['xUserId'] != null) {
|
|
167
170
|
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { LearningStreakResponse } from '../models/index';
|
|
14
|
+
export interface GetLearningStreakRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class LearningStreakApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Returns the current user\'s learning streak record, or null if they have no learning moments yet.
|
|
23
|
+
* Get learning streak
|
|
24
|
+
*/
|
|
25
|
+
getLearningStreakRaw(requestParameters: GetLearningStreakRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LearningStreakResponse>>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the current user\'s learning streak record, or null if they have no learning moments yet.
|
|
28
|
+
* Get learning streak
|
|
29
|
+
*/
|
|
30
|
+
getLearningStreak(requestParameters: GetLearningStreakRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LearningStreakResponse>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { LearningStreakResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class LearningStreakApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Returns the current user\'s learning streak record, or null if they have no learning moments yet.
|
|
31
|
+
* Get learning streak
|
|
32
|
+
*/
|
|
33
|
+
getLearningStreakRaw(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 getLearningStreak().');
|
|
37
|
+
}
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
const headerParameters = {};
|
|
40
|
+
if (requestParameters['xUserId'] != null) {
|
|
41
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
42
|
+
}
|
|
43
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
44
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
45
|
+
}
|
|
46
|
+
let urlPath = `/api/v1/learning-streak`;
|
|
47
|
+
const response = yield this.request({
|
|
48
|
+
path: urlPath,
|
|
49
|
+
method: 'GET',
|
|
50
|
+
headers: headerParameters,
|
|
51
|
+
query: queryParameters,
|
|
52
|
+
}, initOverrides);
|
|
53
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LearningStreakResponseFromJSON(jsonValue));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns the current user\'s learning streak record, or null if they have no learning moments yet.
|
|
58
|
+
* Get learning streak
|
|
59
|
+
*/
|
|
60
|
+
getLearningStreak(requestParameters, initOverrides) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const response = yield this.getLearningStreakRaw(requestParameters, initOverrides);
|
|
63
|
+
return yield response.value();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './AccountsApi';
|
|
2
2
|
export * from './ChatsApi';
|
|
3
|
+
export * from './FilesApi';
|
|
3
4
|
export * from './HealthApi';
|
|
4
5
|
export * from './LearningDaysApi';
|
|
5
6
|
export * from './LearningMomentsApi';
|
|
7
|
+
export * from './LearningStreakApi';
|
|
6
8
|
export * from './MessagesApi';
|
|
7
9
|
export * from './ServiceTokensApi';
|
|
8
10
|
export * from './TagsApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export * from './AccountsApi';
|
|
4
4
|
export * from './ChatsApi';
|
|
5
|
+
export * from './FilesApi';
|
|
5
6
|
export * from './HealthApi';
|
|
6
7
|
export * from './LearningDaysApi';
|
|
7
8
|
export * from './LearningMomentsApi';
|
|
9
|
+
export * from './LearningStreakApi';
|
|
8
10
|
export * from './MessagesApi';
|
|
9
11
|
export * from './ServiceTokensApi';
|
|
10
12
|
export * from './TagsApi';
|
|
@@ -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;
|