@instructure/athena-api-client 1.0.9 → 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,116 @@
|
|
|
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 { ListChatVotes200ResponseFromJSON, UpsertVoteRequestToJSON, VoteFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class VotesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Returns all votes for the specified chat belonging to the authenticated account user.
|
|
31
|
+
* List votes for a chat
|
|
32
|
+
*/
|
|
33
|
+
listChatVotesRaw(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 listChatVotes().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['chatId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling listChatVotes().');
|
|
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/chats/{chatId}/votes`;
|
|
50
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
51
|
+
const response = yield this.request({
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'GET',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
}, initOverrides);
|
|
57
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListChatVotes200ResponseFromJSON(jsonValue));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Returns all votes for the specified chat belonging to the authenticated account user.
|
|
62
|
+
* List votes for a chat
|
|
63
|
+
*/
|
|
64
|
+
listChatVotes(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.listChatVotesRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates or updates a vote on a message in the specified chat. One vote per message is allowed.
|
|
72
|
+
* Create or update a vote
|
|
73
|
+
*/
|
|
74
|
+
upsertChatVoteRaw(requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (requestParameters['xUserId'] == null) {
|
|
77
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling upsertChatVote().');
|
|
78
|
+
}
|
|
79
|
+
if (requestParameters['chatId'] == null) {
|
|
80
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling upsertChatVote().');
|
|
81
|
+
}
|
|
82
|
+
if (requestParameters['upsertVoteRequest'] == null) {
|
|
83
|
+
throw new runtime.RequiredError('upsertVoteRequest', 'Required parameter "upsertVoteRequest" was null or undefined when calling upsertChatVote().');
|
|
84
|
+
}
|
|
85
|
+
const queryParameters = {};
|
|
86
|
+
const headerParameters = {};
|
|
87
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
88
|
+
if (requestParameters['xUserId'] != null) {
|
|
89
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
90
|
+
}
|
|
91
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
92
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
93
|
+
}
|
|
94
|
+
let urlPath = `/api/v1/chats/{chatId}/votes`;
|
|
95
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
96
|
+
const response = yield this.request({
|
|
97
|
+
path: urlPath,
|
|
98
|
+
method: 'PATCH',
|
|
99
|
+
headers: headerParameters,
|
|
100
|
+
query: queryParameters,
|
|
101
|
+
body: UpsertVoteRequestToJSON(requestParameters['upsertVoteRequest']),
|
|
102
|
+
}, initOverrides);
|
|
103
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VoteFromJSON(jsonValue));
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Creates or updates a vote on a message in the specified chat. One vote per message is allowed.
|
|
108
|
+
* Create or update a vote
|
|
109
|
+
*/
|
|
110
|
+
upsertChatVote(requestParameters, initOverrides) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const response = yield this.upsertChatVoteRaw(requestParameters, initOverrides);
|
|
113
|
+
return yield response.value();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -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,42 @@
|
|
|
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 { MessageFromJSON, MessageToJSON, } from './Message';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the CreateChatMessages201Response interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfCreateChatMessages201Response(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function CreateChatMessages201ResponseFromJSON(json) {
|
|
22
|
+
return CreateChatMessages201ResponseFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function CreateChatMessages201ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'data': json['data'] == null ? undefined : (json['data'].map(MessageFromJSON)),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function CreateChatMessages201ResponseToJSON(json) {
|
|
33
|
+
return CreateChatMessages201ResponseToJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function CreateChatMessages201ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
36
|
+
if (value == null) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'data': value['data'] == null ? undefined : (value['data'].map(MessageToJSON)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -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,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { CreateMessagesRequestMessagesInnerFromJSON, CreateMessagesRequestMessagesInnerToJSON, } from './CreateMessagesRequestMessagesInner';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the CreateMessagesRequest interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfCreateMessagesRequest(value) {
|
|
19
|
+
if (!('messages' in value) || value['messages'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function CreateMessagesRequestFromJSON(json) {
|
|
24
|
+
return CreateMessagesRequestFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function CreateMessagesRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'messages': (json['messages'].map(CreateMessagesRequestMessagesInnerFromJSON)),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function CreateMessagesRequestToJSON(json) {
|
|
35
|
+
return CreateMessagesRequestToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function CreateMessagesRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'messages': (value['messages'].map(CreateMessagesRequestMessagesInnerToJSON)),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -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,62 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const CreateMessagesRequestMessagesInnerRoleEnum = {
|
|
18
|
+
User: 'user',
|
|
19
|
+
Assistant: 'assistant'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the CreateMessagesRequestMessagesInner interface.
|
|
23
|
+
*/
|
|
24
|
+
export function instanceOfCreateMessagesRequestMessagesInner(value) {
|
|
25
|
+
if (!('role' in value) || value['role'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('parts' in value) || value['parts'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
export function CreateMessagesRequestMessagesInnerFromJSON(json) {
|
|
34
|
+
return CreateMessagesRequestMessagesInnerFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function CreateMessagesRequestMessagesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
42
|
+
'role': json['role'],
|
|
43
|
+
'parts': json['parts'],
|
|
44
|
+
'attachments': json['attachments'] == null ? undefined : json['attachments'],
|
|
45
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function CreateMessagesRequestMessagesInnerToJSON(json) {
|
|
49
|
+
return CreateMessagesRequestMessagesInnerToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
export function CreateMessagesRequestMessagesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'id': value['id'],
|
|
57
|
+
'role': value['role'],
|
|
58
|
+
'parts': value['parts'],
|
|
59
|
+
'attachments': value['attachments'],
|
|
60
|
+
'createdAt': value['createdAt'].toISOString(),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -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,42 @@
|
|
|
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 { VoteFromJSON, VoteToJSON, } from './Vote';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ListChatVotes200Response interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfListChatVotes200Response(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function ListChatVotes200ResponseFromJSON(json) {
|
|
22
|
+
return ListChatVotes200ResponseFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function ListChatVotes200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'data': json['data'] == null ? undefined : (json['data'].map(VoteFromJSON)),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function ListChatVotes200ResponseToJSON(json) {
|
|
33
|
+
return ListChatVotes200ResponseToJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function ListChatVotes200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
36
|
+
if (value == null) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'data': value['data'] == null ? undefined : (value['data'].map(VoteToJSON)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -29,8 +29,6 @@ export function instanceOfMessage(value) {
|
|
|
29
29
|
return false;
|
|
30
30
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
31
31
|
return false;
|
|
32
|
-
if (!('isLearningMoment' in value) || value['isLearningMoment'] === undefined)
|
|
33
|
-
return false;
|
|
34
32
|
return true;
|
|
35
33
|
}
|
|
36
34
|
export function MessageFromJSON(json) {
|
|
@@ -47,7 +45,7 @@ export function MessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
47
45
|
'parts': (json['parts'].map(MessagePartsInnerFromJSON)),
|
|
48
46
|
'attachments': (json['attachments'].map(MessageAttachmentsInnerFromJSON)),
|
|
49
47
|
'createdAt': (new Date(json['createdAt'])),
|
|
50
|
-
'isLearningMoment': json['isLearningMoment'],
|
|
48
|
+
'isLearningMoment': json['isLearningMoment'] == null ? undefined : json['isLearningMoment'],
|
|
51
49
|
};
|
|
52
50
|
}
|
|
53
51
|
export 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,54 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const UpsertVoteRequestTypeEnum = {
|
|
18
|
+
Up: 'up',
|
|
19
|
+
Down: 'down'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the UpsertVoteRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
export function instanceOfUpsertVoteRequest(value) {
|
|
25
|
+
if (!('messageId' in value) || value['messageId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
export function UpsertVoteRequestFromJSON(json) {
|
|
32
|
+
return UpsertVoteRequestFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function UpsertVoteRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'messageId': json['messageId'],
|
|
40
|
+
'type': json['type'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function UpsertVoteRequestToJSON(json) {
|
|
44
|
+
return UpsertVoteRequestToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function UpsertVoteRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'messageId': value['messageId'],
|
|
52
|
+
'type': value['type'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -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;
|