@instructure/athena-api-client 1.0.0 → 1.0.2
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/ChatsApi.d.ts +14 -0
- package/dist/apis/ChatsApi.js +41 -0
- package/dist/apis/LearningMomentsApi.d.ts +33 -0
- package/dist/apis/LearningMomentsApi.js +76 -0
- package/dist/apis/MessagesApi.d.ts +30 -1
- package/dist/apis/MessagesApi.js +88 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ChatsApi.d.ts +14 -0
- package/dist/esm/apis/ChatsApi.js +41 -0
- package/dist/esm/apis/LearningMomentsApi.d.ts +33 -0
- package/dist/esm/apis/LearningMomentsApi.js +72 -0
- package/dist/esm/apis/MessagesApi.d.ts +30 -1
- package/dist/esm/apis/MessagesApi.js +89 -1
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/Account.d.ts +6 -0
- package/dist/esm/models/Account.js +2 -0
- package/dist/esm/models/LearningMoment.d.ts +86 -0
- package/dist/esm/models/LearningMoment.js +73 -0
- package/dist/esm/models/Message.d.ts +6 -0
- package/dist/esm/models/Message.js +4 -0
- package/dist/esm/models/MessageCountResponse.d.ts +32 -0
- package/dist/esm/models/MessageCountResponse.js +43 -0
- package/dist/esm/models/PaginatedLearningMoments.d.ts +39 -0
- package/dist/esm/models/PaginatedLearningMoments.js +48 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/Account.d.ts +6 -0
- package/dist/models/Account.js +2 -0
- package/dist/models/LearningMoment.d.ts +86 -0
- package/dist/models/LearningMoment.js +80 -0
- package/dist/models/Message.d.ts +6 -0
- package/dist/models/Message.js +4 -0
- package/dist/models/MessageCountResponse.d.ts +32 -0
- package/dist/models/MessageCountResponse.js +50 -0
- package/dist/models/PaginatedLearningMoments.d.ts +39 -0
- package/dist/models/PaginatedLearningMoments.js +55 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
|
@@ -21,11 +21,56 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { PaginatedMessagesFromJSON, } from '../models/index';
|
|
24
|
+
import { MessageFromJSON, MessageCountResponseFromJSON, PaginatedMessagesFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class MessagesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Returns a single message belonging to the specified chat.
|
|
31
|
+
* Get a chat message
|
|
32
|
+
*/
|
|
33
|
+
getChatMessageRaw(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 getChatMessage().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['chatId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChatMessage().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['messageId'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('messageId', 'Required parameter "messageId" was null or undefined when calling getChatMessage().');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
if (requestParameters['xUserId'] != null) {
|
|
47
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
48
|
+
}
|
|
49
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
50
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
51
|
+
}
|
|
52
|
+
let urlPath = `/api/v1/chats/{chatId}/messages/{messageId}`;
|
|
53
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
54
|
+
urlPath = urlPath.replace(`{${"messageId"}}`, encodeURIComponent(String(requestParameters['messageId'])));
|
|
55
|
+
const response = yield this.request({
|
|
56
|
+
path: urlPath,
|
|
57
|
+
method: 'GET',
|
|
58
|
+
headers: headerParameters,
|
|
59
|
+
query: queryParameters,
|
|
60
|
+
}, initOverrides);
|
|
61
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MessageFromJSON(jsonValue));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Returns a single message belonging to the specified chat.
|
|
66
|
+
* Get a chat message
|
|
67
|
+
*/
|
|
68
|
+
getChatMessage(requestParameters, initOverrides) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const response = yield this.getChatMessageRaw(requestParameters, initOverrides);
|
|
71
|
+
return yield response.value();
|
|
72
|
+
});
|
|
73
|
+
}
|
|
29
74
|
/**
|
|
30
75
|
* Returns paginated messages belonging to the specified chat, ordered by creation date (newest first).
|
|
31
76
|
* List chat messages
|
|
@@ -73,4 +118,47 @@ export class MessagesApi extends runtime.BaseAPI {
|
|
|
73
118
|
return yield response.value();
|
|
74
119
|
});
|
|
75
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Returns the number of user-role messages sent by the authenticated account user within the given time window.
|
|
123
|
+
* Count user messages
|
|
124
|
+
*/
|
|
125
|
+
getMessageCountRaw(requestParameters, initOverrides) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
if (requestParameters['xUserId'] == null) {
|
|
128
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getMessageCount().');
|
|
129
|
+
}
|
|
130
|
+
if (requestParameters['hours'] == null) {
|
|
131
|
+
throw new runtime.RequiredError('hours', 'Required parameter "hours" was null or undefined when calling getMessageCount().');
|
|
132
|
+
}
|
|
133
|
+
const queryParameters = {};
|
|
134
|
+
if (requestParameters['hours'] != null) {
|
|
135
|
+
queryParameters['hours'] = requestParameters['hours'];
|
|
136
|
+
}
|
|
137
|
+
const headerParameters = {};
|
|
138
|
+
if (requestParameters['xUserId'] != null) {
|
|
139
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
140
|
+
}
|
|
141
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
142
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
143
|
+
}
|
|
144
|
+
let urlPath = `/api/v1/messages/count`;
|
|
145
|
+
const response = yield this.request({
|
|
146
|
+
path: urlPath,
|
|
147
|
+
method: 'GET',
|
|
148
|
+
headers: headerParameters,
|
|
149
|
+
query: queryParameters,
|
|
150
|
+
}, initOverrides);
|
|
151
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MessageCountResponseFromJSON(jsonValue));
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Returns the number of user-role messages sent by the authenticated account user within the given time window.
|
|
156
|
+
* Count user messages
|
|
157
|
+
*/
|
|
158
|
+
getMessageCount(requestParameters, initOverrides) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
const response = yield this.getMessageCountRaw(requestParameters, initOverrides);
|
|
161
|
+
return yield response.value();
|
|
162
|
+
});
|
|
163
|
+
}
|
|
76
164
|
}
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -35,6 +35,7 @@ export function AccountFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
35
|
return {
|
|
36
36
|
'id': json['id'],
|
|
37
37
|
'name': json['name'],
|
|
38
|
+
'planId': json['planId'] == null ? undefined : json['planId'],
|
|
38
39
|
'createdAt': (new Date(json['createdAt'])),
|
|
39
40
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
40
41
|
};
|
|
@@ -49,6 +50,7 @@ export function AccountToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
49
50
|
return {
|
|
50
51
|
'id': value['id'],
|
|
51
52
|
'name': value['name'],
|
|
53
|
+
'planId': value['planId'],
|
|
52
54
|
'createdAt': value['createdAt'].toISOString(),
|
|
53
55
|
'updatedAt': value['updatedAt'].toISOString(),
|
|
54
56
|
};
|
|
@@ -0,0 +1,86 @@
|
|
|
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 LearningMoment
|
|
16
|
+
*/
|
|
17
|
+
export interface LearningMoment {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof LearningMoment
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* ID of the account user
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof LearningMoment
|
|
28
|
+
*/
|
|
29
|
+
accountUserId: string;
|
|
30
|
+
/**
|
|
31
|
+
* ID of the chat where the learning moment occurred
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof LearningMoment
|
|
34
|
+
*/
|
|
35
|
+
chatId: string;
|
|
36
|
+
/**
|
|
37
|
+
* ID of the message that triggered the learning moment
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof LearningMoment
|
|
40
|
+
*/
|
|
41
|
+
messageId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Learning signal label (e.g. 'yes', 'weak')
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof LearningMoment
|
|
46
|
+
*/
|
|
47
|
+
label?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Confidence score (0.00 - 1.00)
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof LearningMoment
|
|
52
|
+
*/
|
|
53
|
+
confidence?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Explanation for the learning moment
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof LearningMoment
|
|
58
|
+
*/
|
|
59
|
+
reason?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Date the learning moment occurred
|
|
62
|
+
* @type {Date}
|
|
63
|
+
* @memberof LearningMoment
|
|
64
|
+
*/
|
|
65
|
+
occurredOn: Date;
|
|
66
|
+
/**
|
|
67
|
+
* Creation timestamp
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof LearningMoment
|
|
70
|
+
*/
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
/**
|
|
73
|
+
* Last update timestamp
|
|
74
|
+
* @type {Date}
|
|
75
|
+
* @memberof LearningMoment
|
|
76
|
+
*/
|
|
77
|
+
updatedAt: Date;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the LearningMoment interface.
|
|
81
|
+
*/
|
|
82
|
+
export declare function instanceOfLearningMoment(value: object): value is LearningMoment;
|
|
83
|
+
export declare function LearningMomentFromJSON(json: any): LearningMoment;
|
|
84
|
+
export declare function LearningMomentFromJSONTyped(json: any, ignoreDiscriminator: boolean): LearningMoment;
|
|
85
|
+
export declare function LearningMomentToJSON(json: any): LearningMoment;
|
|
86
|
+
export declare function LearningMomentToJSONTyped(value?: LearningMoment | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,73 @@
|
|
|
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 LearningMoment interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfLearningMoment(value) {
|
|
18
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('accountUserId' in value) || value['accountUserId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('chatId' in value) || value['chatId'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('messageId' in value) || value['messageId'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('occurredOn' in value) || value['occurredOn'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
export function LearningMomentFromJSON(json) {
|
|
35
|
+
return LearningMomentFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function LearningMomentFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'id': json['id'],
|
|
43
|
+
'accountUserId': json['accountUserId'],
|
|
44
|
+
'chatId': json['chatId'],
|
|
45
|
+
'messageId': json['messageId'],
|
|
46
|
+
'label': json['label'] == null ? undefined : json['label'],
|
|
47
|
+
'confidence': json['confidence'] == null ? undefined : json['confidence'],
|
|
48
|
+
'reason': json['reason'] == null ? undefined : json['reason'],
|
|
49
|
+
'occurredOn': (new Date(json['occurredOn'])),
|
|
50
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
51
|
+
'updatedAt': (new Date(json['updatedAt'])),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export function LearningMomentToJSON(json) {
|
|
55
|
+
return LearningMomentToJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
export function LearningMomentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
58
|
+
if (value == null) {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
'id': value['id'],
|
|
63
|
+
'accountUserId': value['accountUserId'],
|
|
64
|
+
'chatId': value['chatId'],
|
|
65
|
+
'messageId': value['messageId'],
|
|
66
|
+
'label': value['label'],
|
|
67
|
+
'confidence': value['confidence'],
|
|
68
|
+
'reason': value['reason'],
|
|
69
|
+
'occurredOn': value['occurredOn'].toISOString().substring(0, 10),
|
|
70
|
+
'createdAt': value['createdAt'].toISOString(),
|
|
71
|
+
'updatedAt': value['updatedAt'].toISOString(),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -52,6 +52,12 @@ export interface Message {
|
|
|
52
52
|
* @memberof Message
|
|
53
53
|
*/
|
|
54
54
|
createdAt: Date;
|
|
55
|
+
/**
|
|
56
|
+
* Whether a learning moment exists for this message
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof Message
|
|
59
|
+
*/
|
|
60
|
+
isLearningMoment: boolean;
|
|
55
61
|
}
|
|
56
62
|
/**
|
|
57
63
|
* Check if a given object implements the Message interface.
|
|
@@ -28,6 +28,8 @@ export function instanceOfMessage(value) {
|
|
|
28
28
|
return false;
|
|
29
29
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
30
30
|
return false;
|
|
31
|
+
if (!('isLearningMoment' in value) || value['isLearningMoment'] === undefined)
|
|
32
|
+
return false;
|
|
31
33
|
return true;
|
|
32
34
|
}
|
|
33
35
|
export function MessageFromJSON(json) {
|
|
@@ -44,6 +46,7 @@ export function MessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
46
|
'parts': (json['parts'].map(MessagePartsInnerFromJSON)),
|
|
45
47
|
'attachments': json['attachments'],
|
|
46
48
|
'createdAt': (new Date(json['createdAt'])),
|
|
49
|
+
'isLearningMoment': json['isLearningMoment'],
|
|
47
50
|
};
|
|
48
51
|
}
|
|
49
52
|
export function MessageToJSON(json) {
|
|
@@ -60,5 +63,6 @@ export function MessageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
60
63
|
'parts': (value['parts'].map(MessagePartsInnerToJSON)),
|
|
61
64
|
'attachments': value['attachments'],
|
|
62
65
|
'createdAt': value['createdAt'].toISOString(),
|
|
66
|
+
'isLearningMoment': value['isLearningMoment'],
|
|
63
67
|
};
|
|
64
68
|
}
|
|
@@ -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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface MessageCountResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface MessageCountResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof MessageCountResponse
|
|
22
|
+
*/
|
|
23
|
+
count: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the MessageCountResponse interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfMessageCountResponse(value: object): value is MessageCountResponse;
|
|
29
|
+
export declare function MessageCountResponseFromJSON(json: any): MessageCountResponse;
|
|
30
|
+
export declare function MessageCountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MessageCountResponse;
|
|
31
|
+
export declare function MessageCountResponseToJSON(json: any): MessageCountResponse;
|
|
32
|
+
export declare function MessageCountResponseToJSONTyped(value?: MessageCountResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
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 MessageCountResponse interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfMessageCountResponse(value) {
|
|
18
|
+
if (!('count' in value) || value['count'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function MessageCountResponseFromJSON(json) {
|
|
23
|
+
return MessageCountResponseFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function MessageCountResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'count': json['count'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function MessageCountResponseToJSON(json) {
|
|
34
|
+
return MessageCountResponseToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function MessageCountResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'count': value['count'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -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 { LearningMoment } from './LearningMoment';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PaginatedLearningMoments
|
|
17
|
+
*/
|
|
18
|
+
export interface PaginatedLearningMoments {
|
|
19
|
+
/**
|
|
20
|
+
* Array of learning moment objects
|
|
21
|
+
* @type {Array<LearningMoment>}
|
|
22
|
+
* @memberof PaginatedLearningMoments
|
|
23
|
+
*/
|
|
24
|
+
data: Array<LearningMoment>;
|
|
25
|
+
/**
|
|
26
|
+
* Opaque cursor for fetching the next page. Null when there are no more results.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof PaginatedLearningMoments
|
|
29
|
+
*/
|
|
30
|
+
nextCursor: string | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the PaginatedLearningMoments interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfPaginatedLearningMoments(value: object): value is PaginatedLearningMoments;
|
|
36
|
+
export declare function PaginatedLearningMomentsFromJSON(json: any): PaginatedLearningMoments;
|
|
37
|
+
export declare function PaginatedLearningMomentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLearningMoments;
|
|
38
|
+
export declare function PaginatedLearningMomentsToJSON(json: any): PaginatedLearningMoments;
|
|
39
|
+
export declare function PaginatedLearningMomentsToJSONTyped(value?: PaginatedLearningMoments | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -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 { LearningMomentFromJSON, LearningMomentToJSON, } from './LearningMoment';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the PaginatedLearningMoments interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfPaginatedLearningMoments(value) {
|
|
19
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('nextCursor' in value) || value['nextCursor'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function PaginatedLearningMomentsFromJSON(json) {
|
|
26
|
+
return PaginatedLearningMomentsFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function PaginatedLearningMomentsFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'data': (json['data'].map(LearningMomentFromJSON)),
|
|
34
|
+
'nextCursor': json['nextCursor'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function PaginatedLearningMomentsToJSON(json) {
|
|
38
|
+
return PaginatedLearningMomentsToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function PaginatedLearningMomentsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'data': (value['data'].map(LearningMomentToJSON)),
|
|
46
|
+
'nextCursor': value['nextCursor'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -6,10 +6,13 @@ export * from './CreateChatRequest';
|
|
|
6
6
|
export * from './CreateTokenRequest';
|
|
7
7
|
export * from './CreateTokenResponse';
|
|
8
8
|
export * from './HealthCheck';
|
|
9
|
+
export * from './LearningMoment';
|
|
9
10
|
export * from './Message';
|
|
11
|
+
export * from './MessageCountResponse';
|
|
10
12
|
export * from './MessagePartsInner';
|
|
11
13
|
export * from './ModelError';
|
|
12
14
|
export * from './PaginatedChats';
|
|
15
|
+
export * from './PaginatedLearningMoments';
|
|
13
16
|
export * from './PaginatedMessages';
|
|
14
17
|
export * from './ServiceToken';
|
|
15
18
|
export * from './Tag';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -8,10 +8,13 @@ export * from './CreateChatRequest';
|
|
|
8
8
|
export * from './CreateTokenRequest';
|
|
9
9
|
export * from './CreateTokenResponse';
|
|
10
10
|
export * from './HealthCheck';
|
|
11
|
+
export * from './LearningMoment';
|
|
11
12
|
export * from './Message';
|
|
13
|
+
export * from './MessageCountResponse';
|
|
12
14
|
export * from './MessagePartsInner';
|
|
13
15
|
export * from './ModelError';
|
|
14
16
|
export * from './PaginatedChats';
|
|
17
|
+
export * from './PaginatedLearningMoments';
|
|
15
18
|
export * from './PaginatedMessages';
|
|
16
19
|
export * from './ServiceToken';
|
|
17
20
|
export * from './Tag';
|
package/dist/models/Account.d.ts
CHANGED
package/dist/models/Account.js
CHANGED
|
@@ -42,6 +42,7 @@ function AccountFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
42
|
return {
|
|
43
43
|
'id': json['id'],
|
|
44
44
|
'name': json['name'],
|
|
45
|
+
'planId': json['planId'] == null ? undefined : json['planId'],
|
|
45
46
|
'createdAt': (new Date(json['createdAt'])),
|
|
46
47
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
47
48
|
};
|
|
@@ -56,6 +57,7 @@ function AccountToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
56
57
|
return {
|
|
57
58
|
'id': value['id'],
|
|
58
59
|
'name': value['name'],
|
|
60
|
+
'planId': value['planId'],
|
|
59
61
|
'createdAt': value['createdAt'].toISOString(),
|
|
60
62
|
'updatedAt': value['updatedAt'].toISOString(),
|
|
61
63
|
};
|
|
@@ -0,0 +1,86 @@
|
|
|
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 LearningMoment
|
|
16
|
+
*/
|
|
17
|
+
export interface LearningMoment {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof LearningMoment
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* ID of the account user
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof LearningMoment
|
|
28
|
+
*/
|
|
29
|
+
accountUserId: string;
|
|
30
|
+
/**
|
|
31
|
+
* ID of the chat where the learning moment occurred
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof LearningMoment
|
|
34
|
+
*/
|
|
35
|
+
chatId: string;
|
|
36
|
+
/**
|
|
37
|
+
* ID of the message that triggered the learning moment
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof LearningMoment
|
|
40
|
+
*/
|
|
41
|
+
messageId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Learning signal label (e.g. 'yes', 'weak')
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof LearningMoment
|
|
46
|
+
*/
|
|
47
|
+
label?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Confidence score (0.00 - 1.00)
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof LearningMoment
|
|
52
|
+
*/
|
|
53
|
+
confidence?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Explanation for the learning moment
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof LearningMoment
|
|
58
|
+
*/
|
|
59
|
+
reason?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Date the learning moment occurred
|
|
62
|
+
* @type {Date}
|
|
63
|
+
* @memberof LearningMoment
|
|
64
|
+
*/
|
|
65
|
+
occurredOn: Date;
|
|
66
|
+
/**
|
|
67
|
+
* Creation timestamp
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof LearningMoment
|
|
70
|
+
*/
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
/**
|
|
73
|
+
* Last update timestamp
|
|
74
|
+
* @type {Date}
|
|
75
|
+
* @memberof LearningMoment
|
|
76
|
+
*/
|
|
77
|
+
updatedAt: Date;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the LearningMoment interface.
|
|
81
|
+
*/
|
|
82
|
+
export declare function instanceOfLearningMoment(value: object): value is LearningMoment;
|
|
83
|
+
export declare function LearningMomentFromJSON(json: any): LearningMoment;
|
|
84
|
+
export declare function LearningMomentFromJSONTyped(json: any, ignoreDiscriminator: boolean): LearningMoment;
|
|
85
|
+
export declare function LearningMomentToJSON(json: any): LearningMoment;
|
|
86
|
+
export declare function LearningMomentToJSONTyped(value?: LearningMoment | null, ignoreDiscriminator?: boolean): any;
|