@instructure/athena-api-client 1.0.11 → 1.0.13-rc.0

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.
Files changed (58) hide show
  1. package/README.md +18 -0
  2. package/dist/apis/AdminApi.d.ts +92 -0
  3. package/dist/apis/AdminApi.js +271 -0
  4. package/dist/apis/ChatAnalysisApi.d.ts +32 -0
  5. package/dist/apis/ChatAnalysisApi.js +74 -0
  6. package/dist/apis/UserContextApi.d.ts +45 -0
  7. package/dist/apis/UserContextApi.js +112 -0
  8. package/dist/apis/index.d.ts +3 -0
  9. package/dist/apis/index.js +3 -0
  10. package/dist/esm/apis/AdminApi.d.ts +92 -0
  11. package/dist/esm/apis/AdminApi.js +267 -0
  12. package/dist/esm/apis/ChatAnalysisApi.d.ts +32 -0
  13. package/dist/esm/apis/ChatAnalysisApi.js +70 -0
  14. package/dist/esm/apis/UserContextApi.d.ts +45 -0
  15. package/dist/esm/apis/UserContextApi.js +108 -0
  16. package/dist/esm/apis/index.d.ts +3 -0
  17. package/dist/esm/apis/index.js +3 -0
  18. package/dist/esm/models/AdminChat.d.ts +112 -0
  19. package/dist/esm/models/AdminChat.js +98 -0
  20. package/dist/esm/models/AdminChatAnalysis.d.ts +68 -0
  21. package/dist/esm/models/AdminChatAnalysis.js +67 -0
  22. package/dist/esm/models/AdminChatWithStats.d.ts +62 -0
  23. package/dist/esm/models/AdminChatWithStats.js +63 -0
  24. package/dist/esm/models/AdminPaginatedChats.d.ts +39 -0
  25. package/dist/esm/models/AdminPaginatedChats.js +48 -0
  26. package/dist/esm/models/AdminStreak.d.ts +62 -0
  27. package/dist/esm/models/AdminStreak.js +63 -0
  28. package/dist/esm/models/AdminUserEngagement.d.ts +38 -0
  29. package/dist/esm/models/AdminUserEngagement.js +47 -0
  30. package/dist/esm/models/ChatAnalysis.d.ts +68 -0
  31. package/dist/esm/models/ChatAnalysis.js +67 -0
  32. package/dist/esm/models/UpsertUserContextRequest.d.ts +56 -0
  33. package/dist/esm/models/UpsertUserContextRequest.js +49 -0
  34. package/dist/esm/models/UserContext.d.ts +80 -0
  35. package/dist/esm/models/UserContext.js +75 -0
  36. package/dist/esm/models/index.d.ts +9 -0
  37. package/dist/esm/models/index.js +9 -0
  38. package/dist/models/AdminChat.d.ts +112 -0
  39. package/dist/models/AdminChat.js +106 -0
  40. package/dist/models/AdminChatAnalysis.d.ts +68 -0
  41. package/dist/models/AdminChatAnalysis.js +74 -0
  42. package/dist/models/AdminChatWithStats.d.ts +62 -0
  43. package/dist/models/AdminChatWithStats.js +70 -0
  44. package/dist/models/AdminPaginatedChats.d.ts +39 -0
  45. package/dist/models/AdminPaginatedChats.js +55 -0
  46. package/dist/models/AdminStreak.d.ts +62 -0
  47. package/dist/models/AdminStreak.js +70 -0
  48. package/dist/models/AdminUserEngagement.d.ts +38 -0
  49. package/dist/models/AdminUserEngagement.js +54 -0
  50. package/dist/models/ChatAnalysis.d.ts +68 -0
  51. package/dist/models/ChatAnalysis.js +74 -0
  52. package/dist/models/UpsertUserContextRequest.d.ts +56 -0
  53. package/dist/models/UpsertUserContextRequest.js +56 -0
  54. package/dist/models/UserContext.d.ts +80 -0
  55. package/dist/models/UserContext.js +82 -0
  56. package/dist/models/index.d.ts +9 -0
  57. package/dist/models/index.js +9 -0
  58. package/package.json +1 -1
@@ -0,0 +1,108 @@
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 { UpsertUserContextRequestToJSON, UserContextFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class UserContextApi extends runtime.BaseAPI {
29
+ /**
30
+ * Returns the personalization context for the authenticated user.
31
+ * Get user context
32
+ */
33
+ getUserContextRaw(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 getUserContext().');
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/user-context`;
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) => UserContextFromJSON(jsonValue));
54
+ });
55
+ }
56
+ /**
57
+ * Returns the personalization context for the authenticated user.
58
+ * Get user context
59
+ */
60
+ getUserContext(requestParameters, initOverrides) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const response = yield this.getUserContextRaw(requestParameters, initOverrides);
63
+ return yield response.value();
64
+ });
65
+ }
66
+ /**
67
+ * Creates or updates the personalization context for the authenticated user.
68
+ * Create or update user context
69
+ */
70
+ upsertUserContextRaw(requestParameters, initOverrides) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (requestParameters['xUserId'] == null) {
73
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling upsertUserContext().');
74
+ }
75
+ if (requestParameters['upsertUserContextRequest'] == null) {
76
+ throw new runtime.RequiredError('upsertUserContextRequest', 'Required parameter "upsertUserContextRequest" was null or undefined when calling upsertUserContext().');
77
+ }
78
+ const queryParameters = {};
79
+ const headerParameters = {};
80
+ headerParameters['Content-Type'] = 'application/json';
81
+ if (requestParameters['xUserId'] != null) {
82
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
83
+ }
84
+ if (this.configuration && this.configuration.apiKey) {
85
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
86
+ }
87
+ let urlPath = `/api/v1/user-context`;
88
+ const response = yield this.request({
89
+ path: urlPath,
90
+ method: 'PUT',
91
+ headers: headerParameters,
92
+ query: queryParameters,
93
+ body: UpsertUserContextRequestToJSON(requestParameters['upsertUserContextRequest']),
94
+ }, initOverrides);
95
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserContextFromJSON(jsonValue));
96
+ });
97
+ }
98
+ /**
99
+ * Creates or updates the personalization context for the authenticated user.
100
+ * Create or update user context
101
+ */
102
+ upsertUserContext(requestParameters, initOverrides) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ const response = yield this.upsertUserContextRaw(requestParameters, initOverrides);
105
+ return yield response.value();
106
+ });
107
+ }
108
+ }
@@ -1,4 +1,6 @@
1
1
  export * from './AccountsApi';
2
+ export * from './AdminApi';
3
+ export * from './ChatAnalysisApi';
2
4
  export * from './ChatsApi';
3
5
  export * from './FeatureOverridesApi';
4
6
  export * from './FeaturesApi';
@@ -13,4 +15,5 @@ export * from './QuizSessionsApi';
13
15
  export * from './QuizzesApi';
14
16
  export * from './ServiceTokensApi';
15
17
  export * from './TagsApi';
18
+ export * from './UserContextApi';
16
19
  export * from './VotesApi';
@@ -1,6 +1,8 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './AccountsApi';
4
+ export * from './AdminApi';
5
+ export * from './ChatAnalysisApi';
4
6
  export * from './ChatsApi';
5
7
  export * from './FeatureOverridesApi';
6
8
  export * from './FeaturesApi';
@@ -15,4 +17,5 @@ export * from './QuizSessionsApi';
15
17
  export * from './QuizzesApi';
16
18
  export * from './ServiceTokensApi';
17
19
  export * from './TagsApi';
20
+ export * from './UserContextApi';
18
21
  export * from './VotesApi';
@@ -0,0 +1,112 @@
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 AdminChat
16
+ */
17
+ export interface AdminChat {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AdminChat
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {Date}
27
+ * @memberof AdminChat
28
+ */
29
+ createdAt: Date;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof AdminChat
34
+ */
35
+ title: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof AdminChat
40
+ */
41
+ chatType: string | null;
42
+ /**
43
+ *
44
+ * @type {Date}
45
+ * @memberof AdminChat
46
+ */
47
+ lastViewedAt: Date | null;
48
+ /**
49
+ * External user ID (externalId), null if not set
50
+ * @type {string}
51
+ * @memberof AdminChat
52
+ */
53
+ userId: string | null;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof AdminChat
58
+ */
59
+ visibility: AdminChatVisibilityEnum;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof AdminChat
64
+ */
65
+ subjectId: string | null;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof AdminChat
70
+ */
71
+ latestJobId: string | null;
72
+ /**
73
+ *
74
+ * @type {Date}
75
+ * @memberof AdminChat
76
+ */
77
+ analysisScheduledFor: Date | null;
78
+ /**
79
+ *
80
+ * @type {string}
81
+ * @memberof AdminChat
82
+ */
83
+ goal: string | null;
84
+ /**
85
+ *
86
+ * @type {boolean}
87
+ * @memberof AdminChat
88
+ */
89
+ goalAchieved: boolean | null;
90
+ /**
91
+ *
92
+ * @type {boolean}
93
+ * @memberof AdminChat
94
+ */
95
+ forReview: boolean;
96
+ }
97
+ /**
98
+ * @export
99
+ */
100
+ export declare const AdminChatVisibilityEnum: {
101
+ readonly Public: "public";
102
+ readonly Private: "private";
103
+ };
104
+ export type AdminChatVisibilityEnum = typeof AdminChatVisibilityEnum[keyof typeof AdminChatVisibilityEnum];
105
+ /**
106
+ * Check if a given object implements the AdminChat interface.
107
+ */
108
+ export declare function instanceOfAdminChat(value: object): value is AdminChat;
109
+ export declare function AdminChatFromJSON(json: any): AdminChat;
110
+ export declare function AdminChatFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminChat;
111
+ export declare function AdminChatToJSON(json: any): AdminChat;
112
+ export declare function AdminChatToJSONTyped(value?: AdminChat | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,98 @@
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 AdminChatVisibilityEnum = {
18
+ Public: 'public',
19
+ Private: 'private'
20
+ };
21
+ /**
22
+ * Check if a given object implements the AdminChat interface.
23
+ */
24
+ export function instanceOfAdminChat(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
28
+ return false;
29
+ if (!('title' in value) || value['title'] === undefined)
30
+ return false;
31
+ if (!('chatType' in value) || value['chatType'] === undefined)
32
+ return false;
33
+ if (!('lastViewedAt' in value) || value['lastViewedAt'] === undefined)
34
+ return false;
35
+ if (!('userId' in value) || value['userId'] === undefined)
36
+ return false;
37
+ if (!('visibility' in value) || value['visibility'] === undefined)
38
+ return false;
39
+ if (!('subjectId' in value) || value['subjectId'] === undefined)
40
+ return false;
41
+ if (!('latestJobId' in value) || value['latestJobId'] === undefined)
42
+ return false;
43
+ if (!('analysisScheduledFor' in value) || value['analysisScheduledFor'] === undefined)
44
+ return false;
45
+ if (!('goal' in value) || value['goal'] === undefined)
46
+ return false;
47
+ if (!('goalAchieved' in value) || value['goalAchieved'] === undefined)
48
+ return false;
49
+ if (!('forReview' in value) || value['forReview'] === undefined)
50
+ return false;
51
+ return true;
52
+ }
53
+ export function AdminChatFromJSON(json) {
54
+ return AdminChatFromJSONTyped(json, false);
55
+ }
56
+ export function AdminChatFromJSONTyped(json, ignoreDiscriminator) {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+ 'id': json['id'],
62
+ 'createdAt': (new Date(json['createdAt'])),
63
+ 'title': json['title'],
64
+ 'chatType': json['chatType'],
65
+ 'lastViewedAt': (json['lastViewedAt'] == null ? null : new Date(json['lastViewedAt'])),
66
+ 'userId': json['userId'],
67
+ 'visibility': json['visibility'],
68
+ 'subjectId': json['subjectId'],
69
+ 'latestJobId': json['latestJobId'],
70
+ 'analysisScheduledFor': (json['analysisScheduledFor'] == null ? null : new Date(json['analysisScheduledFor'])),
71
+ 'goal': json['goal'],
72
+ 'goalAchieved': json['goalAchieved'],
73
+ 'forReview': json['forReview'],
74
+ };
75
+ }
76
+ export function AdminChatToJSON(json) {
77
+ return AdminChatToJSONTyped(json, false);
78
+ }
79
+ export function AdminChatToJSONTyped(value, ignoreDiscriminator = false) {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+ return {
84
+ 'id': value['id'],
85
+ 'createdAt': value['createdAt'].toISOString(),
86
+ 'title': value['title'],
87
+ 'chatType': value['chatType'],
88
+ 'lastViewedAt': value['lastViewedAt'] == null ? value['lastViewedAt'] : value['lastViewedAt'].toISOString(),
89
+ 'userId': value['userId'],
90
+ 'visibility': value['visibility'],
91
+ 'subjectId': value['subjectId'],
92
+ 'latestJobId': value['latestJobId'],
93
+ 'analysisScheduledFor': value['analysisScheduledFor'] == null ? value['analysisScheduledFor'] : value['analysisScheduledFor'].toISOString(),
94
+ 'goal': value['goal'],
95
+ 'goalAchieved': value['goalAchieved'],
96
+ 'forReview': value['forReview'],
97
+ };
98
+ }
@@ -0,0 +1,68 @@
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 AdminChatAnalysis
16
+ */
17
+ export interface AdminChatAnalysis {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AdminChatAnalysis
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AdminChatAnalysis
28
+ */
29
+ title: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof AdminChatAnalysis
34
+ */
35
+ goal: string | null;
36
+ /**
37
+ *
38
+ * @type {boolean}
39
+ * @memberof AdminChatAnalysis
40
+ */
41
+ goalAchieved: boolean | null;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof AdminChatAnalysis
46
+ */
47
+ subject: string | null;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof AdminChatAnalysis
52
+ */
53
+ summary: string | null;
54
+ /**
55
+ *
56
+ * @type {Array<string>}
57
+ * @memberof AdminChatAnalysis
58
+ */
59
+ concepts: Array<string>;
60
+ }
61
+ /**
62
+ * Check if a given object implements the AdminChatAnalysis interface.
63
+ */
64
+ export declare function instanceOfAdminChatAnalysis(value: object): value is AdminChatAnalysis;
65
+ export declare function AdminChatAnalysisFromJSON(json: any): AdminChatAnalysis;
66
+ export declare function AdminChatAnalysisFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminChatAnalysis;
67
+ export declare function AdminChatAnalysisToJSON(json: any): AdminChatAnalysis;
68
+ export declare function AdminChatAnalysisToJSONTyped(value?: AdminChatAnalysis | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,67 @@
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 AdminChatAnalysis interface.
16
+ */
17
+ export function instanceOfAdminChatAnalysis(value) {
18
+ if (!('id' in value) || value['id'] === undefined)
19
+ return false;
20
+ if (!('title' in value) || value['title'] === undefined)
21
+ return false;
22
+ if (!('goal' in value) || value['goal'] === undefined)
23
+ return false;
24
+ if (!('goalAchieved' in value) || value['goalAchieved'] === undefined)
25
+ return false;
26
+ if (!('subject' in value) || value['subject'] === undefined)
27
+ return false;
28
+ if (!('summary' in value) || value['summary'] === undefined)
29
+ return false;
30
+ if (!('concepts' in value) || value['concepts'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ export function AdminChatAnalysisFromJSON(json) {
35
+ return AdminChatAnalysisFromJSONTyped(json, false);
36
+ }
37
+ export function AdminChatAnalysisFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'id': json['id'],
43
+ 'title': json['title'],
44
+ 'goal': json['goal'],
45
+ 'goalAchieved': json['goalAchieved'],
46
+ 'subject': json['subject'],
47
+ 'summary': json['summary'],
48
+ 'concepts': json['concepts'],
49
+ };
50
+ }
51
+ export function AdminChatAnalysisToJSON(json) {
52
+ return AdminChatAnalysisToJSONTyped(json, false);
53
+ }
54
+ export function AdminChatAnalysisToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'id': value['id'],
60
+ 'title': value['title'],
61
+ 'goal': value['goal'],
62
+ 'goalAchieved': value['goalAchieved'],
63
+ 'subject': value['subject'],
64
+ 'summary': value['summary'],
65
+ 'concepts': value['concepts'],
66
+ };
67
+ }
@@ -0,0 +1,62 @@
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 AdminChatWithStats
16
+ */
17
+ export interface AdminChatWithStats {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AdminChatWithStats
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AdminChatWithStats
28
+ */
29
+ title: string;
30
+ /**
31
+ *
32
+ * @type {Date}
33
+ * @memberof AdminChatWithStats
34
+ */
35
+ createdAt: Date;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof AdminChatWithStats
40
+ */
41
+ messageCount: number;
42
+ /**
43
+ *
44
+ * @type {Date}
45
+ * @memberof AdminChatWithStats
46
+ */
47
+ lastMessageAt: Date | null;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof AdminChatWithStats
52
+ */
53
+ subjectName: string | null;
54
+ }
55
+ /**
56
+ * Check if a given object implements the AdminChatWithStats interface.
57
+ */
58
+ export declare function instanceOfAdminChatWithStats(value: object): value is AdminChatWithStats;
59
+ export declare function AdminChatWithStatsFromJSON(json: any): AdminChatWithStats;
60
+ export declare function AdminChatWithStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminChatWithStats;
61
+ export declare function AdminChatWithStatsToJSON(json: any): AdminChatWithStats;
62
+ export declare function AdminChatWithStatsToJSONTyped(value?: AdminChatWithStats | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,63 @@
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 AdminChatWithStats interface.
16
+ */
17
+ export function instanceOfAdminChatWithStats(value) {
18
+ if (!('id' in value) || value['id'] === undefined)
19
+ return false;
20
+ if (!('title' in value) || value['title'] === undefined)
21
+ return false;
22
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
23
+ return false;
24
+ if (!('messageCount' in value) || value['messageCount'] === undefined)
25
+ return false;
26
+ if (!('lastMessageAt' in value) || value['lastMessageAt'] === undefined)
27
+ return false;
28
+ if (!('subjectName' in value) || value['subjectName'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ export function AdminChatWithStatsFromJSON(json) {
33
+ return AdminChatWithStatsFromJSONTyped(json, false);
34
+ }
35
+ export function AdminChatWithStatsFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'id': json['id'],
41
+ 'title': json['title'],
42
+ 'createdAt': (new Date(json['createdAt'])),
43
+ 'messageCount': json['messageCount'],
44
+ 'lastMessageAt': (json['lastMessageAt'] == null ? null : new Date(json['lastMessageAt'])),
45
+ 'subjectName': json['subjectName'],
46
+ };
47
+ }
48
+ export function AdminChatWithStatsToJSON(json) {
49
+ return AdminChatWithStatsToJSONTyped(json, false);
50
+ }
51
+ export function AdminChatWithStatsToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'id': value['id'],
57
+ 'title': value['title'],
58
+ 'createdAt': value['createdAt'].toISOString(),
59
+ 'messageCount': value['messageCount'],
60
+ 'lastMessageAt': value['lastMessageAt'] == null ? value['lastMessageAt'] : value['lastMessageAt'].toISOString(),
61
+ 'subjectName': value['subjectName'],
62
+ };
63
+ }
@@ -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 { AdminChat } from './AdminChat';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AdminPaginatedChats
17
+ */
18
+ export interface AdminPaginatedChats {
19
+ /**
20
+ *
21
+ * @type {Array<AdminChat>}
22
+ * @memberof AdminPaginatedChats
23
+ */
24
+ data: Array<AdminChat>;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof AdminPaginatedChats
29
+ */
30
+ nextCursor: string | null;
31
+ }
32
+ /**
33
+ * Check if a given object implements the AdminPaginatedChats interface.
34
+ */
35
+ export declare function instanceOfAdminPaginatedChats(value: object): value is AdminPaginatedChats;
36
+ export declare function AdminPaginatedChatsFromJSON(json: any): AdminPaginatedChats;
37
+ export declare function AdminPaginatedChatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminPaginatedChats;
38
+ export declare function AdminPaginatedChatsToJSON(json: any): AdminPaginatedChats;
39
+ export declare function AdminPaginatedChatsToJSONTyped(value?: AdminPaginatedChats | null, ignoreDiscriminator?: boolean): any;