@instructure/athena-api-client 1.0.8 → 1.0.10
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 -1
- package/dist/apis/HealthApi.d.ts +2 -5
- package/dist/apis/HealthApi.js +2 -6
- package/dist/apis/MessagesApi.d.ts +16 -1
- package/dist/apis/MessagesApi.js +46 -0
- package/dist/apis/VotesApi.d.ts +47 -0
- package/dist/apis/VotesApi.js +120 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/HealthApi.d.ts +2 -5
- package/dist/esm/apis/HealthApi.js +2 -6
- package/dist/esm/apis/MessagesApi.d.ts +16 -1
- package/dist/esm/apis/MessagesApi.js +47 -1
- package/dist/esm/apis/VotesApi.d.ts +47 -0
- package/dist/esm/apis/VotesApi.js +116 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/CreateChatMessages201Response.d.ts +33 -0
- package/dist/esm/models/CreateChatMessages201Response.js +42 -0
- package/dist/esm/models/CreateMessagesRequest.d.ts +33 -0
- package/dist/esm/models/CreateMessagesRequest.js +44 -0
- package/dist/esm/models/CreateMessagesRequestMessagesInner.d.ts +64 -0
- package/dist/esm/models/CreateMessagesRequestMessagesInner.js +62 -0
- package/dist/esm/models/ListChatVotes200Response.d.ts +33 -0
- package/dist/esm/models/ListChatVotes200Response.js +42 -0
- package/dist/esm/models/Message.d.ts +1 -1
- package/dist/esm/models/Message.js +1 -3
- package/dist/esm/models/UpsertVoteRequest.d.ts +46 -0
- package/dist/esm/models/UpsertVoteRequest.js +54 -0
- package/dist/esm/models/Vote.d.ts +44 -0
- package/dist/esm/models/Vote.js +51 -0
- package/dist/esm/models/index.d.ts +6 -1
- package/dist/esm/models/index.js +6 -1
- package/dist/models/CreateChatMessages201Response.d.ts +33 -0
- package/dist/models/CreateChatMessages201Response.js +49 -0
- package/dist/models/CreateMessagesRequest.d.ts +33 -0
- package/dist/models/CreateMessagesRequest.js +51 -0
- package/dist/models/CreateMessagesRequestMessagesInner.d.ts +64 -0
- package/dist/models/CreateMessagesRequestMessagesInner.js +70 -0
- package/dist/models/ListChatVotes200Response.d.ts +33 -0
- package/dist/models/ListChatVotes200Response.js +49 -0
- package/dist/models/Message.d.ts +1 -1
- package/dist/models/Message.js +1 -3
- package/dist/models/UpsertVoteRequest.d.ts +46 -0
- package/dist/models/UpsertVoteRequest.js +62 -0
- package/dist/models/Vote.d.ts +44 -0
- package/dist/models/Vote.js +58 -0
- package/dist/models/index.d.ts +6 -1
- package/dist/models/index.js +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
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 Vote interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfVote(value) {
|
|
18
|
+
if (!('chatId' in value) || value['chatId'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('messageId' in value) || value['messageId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('isUpvoted' in value) || value['isUpvoted'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
export function VoteFromJSON(json) {
|
|
27
|
+
return VoteFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
export function VoteFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
|
+
if (json == null) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'chatId': json['chatId'],
|
|
35
|
+
'messageId': json['messageId'],
|
|
36
|
+
'isUpvoted': json['isUpvoted'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function VoteToJSON(json) {
|
|
40
|
+
return VoteToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function VoteToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'chatId': value['chatId'],
|
|
48
|
+
'messageId': value['messageId'],
|
|
49
|
+
'isUpvoted': value['isUpvoted'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -3,13 +3,16 @@ export * from './Chat';
|
|
|
3
3
|
export * from './ChatRequest';
|
|
4
4
|
export * from './ChatRequestAttachmentsInner';
|
|
5
5
|
export * from './CreateAccountRequest';
|
|
6
|
+
export * from './CreateChatMessages201Response';
|
|
6
7
|
export * from './CreateChatRequest';
|
|
8
|
+
export * from './CreateMessagesRequest';
|
|
9
|
+
export * from './CreateMessagesRequestMessagesInner';
|
|
7
10
|
export * from './CreateTokenRequest';
|
|
8
11
|
export * from './CreateTokenResponse';
|
|
9
|
-
export * from './HealthCheck';
|
|
10
12
|
export * from './LearningDaysResponse';
|
|
11
13
|
export * from './LearningMoment';
|
|
12
14
|
export * from './LearningStreakResponse';
|
|
15
|
+
export * from './ListChatVotes200Response';
|
|
13
16
|
export * from './Message';
|
|
14
17
|
export * from './MessageAttachmentsInner';
|
|
15
18
|
export * from './MessageCountResponse';
|
|
@@ -37,3 +40,5 @@ export * from './UploadUrlRequest';
|
|
|
37
40
|
export * from './UploadUrlRequestFilesInner';
|
|
38
41
|
export * from './UploadUrlResponse';
|
|
39
42
|
export * from './UploadUrlResponseFilesInner';
|
|
43
|
+
export * from './UpsertVoteRequest';
|
|
44
|
+
export * from './Vote';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -5,13 +5,16 @@ export * from './Chat';
|
|
|
5
5
|
export * from './ChatRequest';
|
|
6
6
|
export * from './ChatRequestAttachmentsInner';
|
|
7
7
|
export * from './CreateAccountRequest';
|
|
8
|
+
export * from './CreateChatMessages201Response';
|
|
8
9
|
export * from './CreateChatRequest';
|
|
10
|
+
export * from './CreateMessagesRequest';
|
|
11
|
+
export * from './CreateMessagesRequestMessagesInner';
|
|
9
12
|
export * from './CreateTokenRequest';
|
|
10
13
|
export * from './CreateTokenResponse';
|
|
11
|
-
export * from './HealthCheck';
|
|
12
14
|
export * from './LearningDaysResponse';
|
|
13
15
|
export * from './LearningMoment';
|
|
14
16
|
export * from './LearningStreakResponse';
|
|
17
|
+
export * from './ListChatVotes200Response';
|
|
15
18
|
export * from './Message';
|
|
16
19
|
export * from './MessageAttachmentsInner';
|
|
17
20
|
export * from './MessageCountResponse';
|
|
@@ -39,3 +42,5 @@ export * from './UploadUrlRequest';
|
|
|
39
42
|
export * from './UploadUrlRequestFilesInner';
|
|
40
43
|
export * from './UploadUrlResponse';
|
|
41
44
|
export * from './UploadUrlResponseFilesInner';
|
|
45
|
+
export * from './UpsertVoteRequest';
|
|
46
|
+
export * from './Vote';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Message } from './Message';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface CreateChatMessages201Response
|
|
17
|
+
*/
|
|
18
|
+
export interface CreateChatMessages201Response {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<Message>}
|
|
22
|
+
* @memberof CreateChatMessages201Response
|
|
23
|
+
*/
|
|
24
|
+
data?: Array<Message>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the CreateChatMessages201Response interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfCreateChatMessages201Response(value: object): value is CreateChatMessages201Response;
|
|
30
|
+
export declare function CreateChatMessages201ResponseFromJSON(json: any): CreateChatMessages201Response;
|
|
31
|
+
export declare function CreateChatMessages201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateChatMessages201Response;
|
|
32
|
+
export declare function CreateChatMessages201ResponseToJSON(json: any): CreateChatMessages201Response;
|
|
33
|
+
export declare function CreateChatMessages201ResponseToJSONTyped(value?: CreateChatMessages201Response | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfCreateChatMessages201Response = instanceOfCreateChatMessages201Response;
|
|
17
|
+
exports.CreateChatMessages201ResponseFromJSON = CreateChatMessages201ResponseFromJSON;
|
|
18
|
+
exports.CreateChatMessages201ResponseFromJSONTyped = CreateChatMessages201ResponseFromJSONTyped;
|
|
19
|
+
exports.CreateChatMessages201ResponseToJSON = CreateChatMessages201ResponseToJSON;
|
|
20
|
+
exports.CreateChatMessages201ResponseToJSONTyped = CreateChatMessages201ResponseToJSONTyped;
|
|
21
|
+
const Message_1 = require("./Message");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the CreateChatMessages201Response interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfCreateChatMessages201Response(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function CreateChatMessages201ResponseFromJSON(json) {
|
|
29
|
+
return CreateChatMessages201ResponseFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function CreateChatMessages201ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'data': json['data'] == null ? undefined : (json['data'].map(Message_1.MessageFromJSON)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function CreateChatMessages201ResponseToJSON(json) {
|
|
40
|
+
return CreateChatMessages201ResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function CreateChatMessages201ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'data': value['data'] == null ? undefined : (value['data'].map(Message_1.MessageToJSON)),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { CreateMessagesRequestMessagesInner } from './CreateMessagesRequestMessagesInner';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface CreateMessagesRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface CreateMessagesRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<CreateMessagesRequestMessagesInner>}
|
|
22
|
+
* @memberof CreateMessagesRequest
|
|
23
|
+
*/
|
|
24
|
+
messages: Array<CreateMessagesRequestMessagesInner>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the CreateMessagesRequest interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfCreateMessagesRequest(value: object): value is CreateMessagesRequest;
|
|
30
|
+
export declare function CreateMessagesRequestFromJSON(json: any): CreateMessagesRequest;
|
|
31
|
+
export declare function CreateMessagesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateMessagesRequest;
|
|
32
|
+
export declare function CreateMessagesRequestToJSON(json: any): CreateMessagesRequest;
|
|
33
|
+
export declare function CreateMessagesRequestToJSONTyped(value?: CreateMessagesRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfCreateMessagesRequest = instanceOfCreateMessagesRequest;
|
|
17
|
+
exports.CreateMessagesRequestFromJSON = CreateMessagesRequestFromJSON;
|
|
18
|
+
exports.CreateMessagesRequestFromJSONTyped = CreateMessagesRequestFromJSONTyped;
|
|
19
|
+
exports.CreateMessagesRequestToJSON = CreateMessagesRequestToJSON;
|
|
20
|
+
exports.CreateMessagesRequestToJSONTyped = CreateMessagesRequestToJSONTyped;
|
|
21
|
+
const CreateMessagesRequestMessagesInner_1 = require("./CreateMessagesRequestMessagesInner");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the CreateMessagesRequest interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfCreateMessagesRequest(value) {
|
|
26
|
+
if (!('messages' in value) || value['messages'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function CreateMessagesRequestFromJSON(json) {
|
|
31
|
+
return CreateMessagesRequestFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function CreateMessagesRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'messages': (json['messages'].map(CreateMessagesRequestMessagesInner_1.CreateMessagesRequestMessagesInnerFromJSON)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function CreateMessagesRequestToJSON(json) {
|
|
42
|
+
return CreateMessagesRequestToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function CreateMessagesRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'messages': (value['messages'].map(CreateMessagesRequestMessagesInner_1.CreateMessagesRequestMessagesInnerToJSON)),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 CreateMessagesRequestMessagesInner
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateMessagesRequestMessagesInner {
|
|
18
|
+
/**
|
|
19
|
+
* Optional client-generated ID. If omitted, the server generates one.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateMessagesRequestMessagesInner
|
|
22
|
+
*/
|
|
23
|
+
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateMessagesRequestMessagesInner
|
|
28
|
+
*/
|
|
29
|
+
role: CreateMessagesRequestMessagesInnerRoleEnum;
|
|
30
|
+
/**
|
|
31
|
+
* Message content parts
|
|
32
|
+
* @type {Array<object>}
|
|
33
|
+
* @memberof CreateMessagesRequestMessagesInner
|
|
34
|
+
*/
|
|
35
|
+
parts: Array<object>;
|
|
36
|
+
/**
|
|
37
|
+
* File attachments
|
|
38
|
+
* @type {Array<object>}
|
|
39
|
+
* @memberof CreateMessagesRequestMessagesInner
|
|
40
|
+
*/
|
|
41
|
+
attachments?: Array<object>;
|
|
42
|
+
/**
|
|
43
|
+
* Message creation timestamp
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof CreateMessagesRequestMessagesInner
|
|
46
|
+
*/
|
|
47
|
+
createdAt: Date;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export declare const CreateMessagesRequestMessagesInnerRoleEnum: {
|
|
53
|
+
readonly User: "user";
|
|
54
|
+
readonly Assistant: "assistant";
|
|
55
|
+
};
|
|
56
|
+
export type CreateMessagesRequestMessagesInnerRoleEnum = typeof CreateMessagesRequestMessagesInnerRoleEnum[keyof typeof CreateMessagesRequestMessagesInnerRoleEnum];
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the CreateMessagesRequestMessagesInner interface.
|
|
59
|
+
*/
|
|
60
|
+
export declare function instanceOfCreateMessagesRequestMessagesInner(value: object): value is CreateMessagesRequestMessagesInner;
|
|
61
|
+
export declare function CreateMessagesRequestMessagesInnerFromJSON(json: any): CreateMessagesRequestMessagesInner;
|
|
62
|
+
export declare function CreateMessagesRequestMessagesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateMessagesRequestMessagesInner;
|
|
63
|
+
export declare function CreateMessagesRequestMessagesInnerToJSON(json: any): CreateMessagesRequestMessagesInner;
|
|
64
|
+
export declare function CreateMessagesRequestMessagesInnerToJSONTyped(value?: CreateMessagesRequestMessagesInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CreateMessagesRequestMessagesInnerRoleEnum = void 0;
|
|
17
|
+
exports.instanceOfCreateMessagesRequestMessagesInner = instanceOfCreateMessagesRequestMessagesInner;
|
|
18
|
+
exports.CreateMessagesRequestMessagesInnerFromJSON = CreateMessagesRequestMessagesInnerFromJSON;
|
|
19
|
+
exports.CreateMessagesRequestMessagesInnerFromJSONTyped = CreateMessagesRequestMessagesInnerFromJSONTyped;
|
|
20
|
+
exports.CreateMessagesRequestMessagesInnerToJSON = CreateMessagesRequestMessagesInnerToJSON;
|
|
21
|
+
exports.CreateMessagesRequestMessagesInnerToJSONTyped = CreateMessagesRequestMessagesInnerToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.CreateMessagesRequestMessagesInnerRoleEnum = {
|
|
26
|
+
User: 'user',
|
|
27
|
+
Assistant: 'assistant'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the CreateMessagesRequestMessagesInner interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfCreateMessagesRequestMessagesInner(value) {
|
|
33
|
+
if (!('role' in value) || value['role'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('parts' in value) || value['parts'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function CreateMessagesRequestMessagesInnerFromJSON(json) {
|
|
42
|
+
return CreateMessagesRequestMessagesInnerFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function CreateMessagesRequestMessagesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
50
|
+
'role': json['role'],
|
|
51
|
+
'parts': json['parts'],
|
|
52
|
+
'attachments': json['attachments'] == null ? undefined : json['attachments'],
|
|
53
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function CreateMessagesRequestMessagesInnerToJSON(json) {
|
|
57
|
+
return CreateMessagesRequestMessagesInnerToJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
function CreateMessagesRequestMessagesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'id': value['id'],
|
|
65
|
+
'role': value['role'],
|
|
66
|
+
'parts': value['parts'],
|
|
67
|
+
'attachments': value['attachments'],
|
|
68
|
+
'createdAt': value['createdAt'].toISOString(),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Vote } from './Vote';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ListChatVotes200Response
|
|
17
|
+
*/
|
|
18
|
+
export interface ListChatVotes200Response {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<Vote>}
|
|
22
|
+
* @memberof ListChatVotes200Response
|
|
23
|
+
*/
|
|
24
|
+
data?: Array<Vote>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the ListChatVotes200Response interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfListChatVotes200Response(value: object): value is ListChatVotes200Response;
|
|
30
|
+
export declare function ListChatVotes200ResponseFromJSON(json: any): ListChatVotes200Response;
|
|
31
|
+
export declare function ListChatVotes200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListChatVotes200Response;
|
|
32
|
+
export declare function ListChatVotes200ResponseToJSON(json: any): ListChatVotes200Response;
|
|
33
|
+
export declare function ListChatVotes200ResponseToJSONTyped(value?: ListChatVotes200Response | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfListChatVotes200Response = instanceOfListChatVotes200Response;
|
|
17
|
+
exports.ListChatVotes200ResponseFromJSON = ListChatVotes200ResponseFromJSON;
|
|
18
|
+
exports.ListChatVotes200ResponseFromJSONTyped = ListChatVotes200ResponseFromJSONTyped;
|
|
19
|
+
exports.ListChatVotes200ResponseToJSON = ListChatVotes200ResponseToJSON;
|
|
20
|
+
exports.ListChatVotes200ResponseToJSONTyped = ListChatVotes200ResponseToJSONTyped;
|
|
21
|
+
const Vote_1 = require("./Vote");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ListChatVotes200Response interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfListChatVotes200Response(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function ListChatVotes200ResponseFromJSON(json) {
|
|
29
|
+
return ListChatVotes200ResponseFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function ListChatVotes200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'data': json['data'] == null ? undefined : (json['data'].map(Vote_1.VoteFromJSON)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function ListChatVotes200ResponseToJSON(json) {
|
|
40
|
+
return ListChatVotes200ResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function ListChatVotes200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'data': value['data'] == null ? undefined : (value['data'].map(Vote_1.VoteToJSON)),
|
|
48
|
+
};
|
|
49
|
+
}
|
package/dist/models/Message.d.ts
CHANGED
package/dist/models/Message.js
CHANGED
|
@@ -36,8 +36,6 @@ function instanceOfMessage(value) {
|
|
|
36
36
|
return false;
|
|
37
37
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
38
38
|
return false;
|
|
39
|
-
if (!('isLearningMoment' in value) || value['isLearningMoment'] === undefined)
|
|
40
|
-
return false;
|
|
41
39
|
return true;
|
|
42
40
|
}
|
|
43
41
|
function MessageFromJSON(json) {
|
|
@@ -54,7 +52,7 @@ function MessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
54
52
|
'parts': (json['parts'].map(MessagePartsInner_1.MessagePartsInnerFromJSON)),
|
|
55
53
|
'attachments': (json['attachments'].map(MessageAttachmentsInner_1.MessageAttachmentsInnerFromJSON)),
|
|
56
54
|
'createdAt': (new Date(json['createdAt'])),
|
|
57
|
-
'isLearningMoment': json['isLearningMoment'],
|
|
55
|
+
'isLearningMoment': json['isLearningMoment'] == null ? undefined : json['isLearningMoment'],
|
|
58
56
|
};
|
|
59
57
|
}
|
|
60
58
|
function MessageToJSON(json) {
|
|
@@ -0,0 +1,46 @@
|
|
|
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 UpsertVoteRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface UpsertVoteRequest {
|
|
18
|
+
/**
|
|
19
|
+
* The ID of the message to vote on
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UpsertVoteRequest
|
|
22
|
+
*/
|
|
23
|
+
messageId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Vote direction
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof UpsertVoteRequest
|
|
28
|
+
*/
|
|
29
|
+
type: UpsertVoteRequestTypeEnum;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const UpsertVoteRequestTypeEnum: {
|
|
35
|
+
readonly Up: "up";
|
|
36
|
+
readonly Down: "down";
|
|
37
|
+
};
|
|
38
|
+
export type UpsertVoteRequestTypeEnum = typeof UpsertVoteRequestTypeEnum[keyof typeof UpsertVoteRequestTypeEnum];
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the UpsertVoteRequest interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function instanceOfUpsertVoteRequest(value: object): value is UpsertVoteRequest;
|
|
43
|
+
export declare function UpsertVoteRequestFromJSON(json: any): UpsertVoteRequest;
|
|
44
|
+
export declare function UpsertVoteRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpsertVoteRequest;
|
|
45
|
+
export declare function UpsertVoteRequestToJSON(json: any): UpsertVoteRequest;
|
|
46
|
+
export declare function UpsertVoteRequestToJSONTyped(value?: UpsertVoteRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpsertVoteRequestTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfUpsertVoteRequest = instanceOfUpsertVoteRequest;
|
|
18
|
+
exports.UpsertVoteRequestFromJSON = UpsertVoteRequestFromJSON;
|
|
19
|
+
exports.UpsertVoteRequestFromJSONTyped = UpsertVoteRequestFromJSONTyped;
|
|
20
|
+
exports.UpsertVoteRequestToJSON = UpsertVoteRequestToJSON;
|
|
21
|
+
exports.UpsertVoteRequestToJSONTyped = UpsertVoteRequestToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.UpsertVoteRequestTypeEnum = {
|
|
26
|
+
Up: 'up',
|
|
27
|
+
Down: 'down'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the UpsertVoteRequest interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfUpsertVoteRequest(value) {
|
|
33
|
+
if (!('messageId' in value) || value['messageId'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
function UpsertVoteRequestFromJSON(json) {
|
|
40
|
+
return UpsertVoteRequestFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function UpsertVoteRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'messageId': json['messageId'],
|
|
48
|
+
'type': json['type'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function UpsertVoteRequestToJSON(json) {
|
|
52
|
+
return UpsertVoteRequestToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function UpsertVoteRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'messageId': value['messageId'],
|
|
60
|
+
'type': value['type'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 Vote
|
|
16
|
+
*/
|
|
17
|
+
export interface Vote {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof Vote
|
|
22
|
+
*/
|
|
23
|
+
chatId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof Vote
|
|
28
|
+
*/
|
|
29
|
+
messageId: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof Vote
|
|
34
|
+
*/
|
|
35
|
+
isUpvoted: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the Vote interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfVote(value: object): value is Vote;
|
|
41
|
+
export declare function VoteFromJSON(json: any): Vote;
|
|
42
|
+
export declare function VoteFromJSONTyped(json: any, ignoreDiscriminator: boolean): Vote;
|
|
43
|
+
export declare function VoteToJSON(json: any): Vote;
|
|
44
|
+
export declare function VoteToJSONTyped(value?: Vote | null, ignoreDiscriminator?: boolean): any;
|