@instructure/athena-api-client 2.14.3 → 2.15.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 (38) hide show
  1. package/README.md +8 -0
  2. package/dist/apis/LearningSessionEvaluationsApi.d.ts +32 -0
  3. package/dist/apis/LearningSessionEvaluationsApi.js +74 -0
  4. package/dist/apis/UserConceptsApi.d.ts +57 -0
  5. package/dist/apis/UserConceptsApi.js +129 -0
  6. package/dist/apis/index.d.ts +2 -0
  7. package/dist/apis/index.js +2 -0
  8. package/dist/esm/apis/LearningSessionEvaluationsApi.d.ts +32 -0
  9. package/dist/esm/apis/LearningSessionEvaluationsApi.js +70 -0
  10. package/dist/esm/apis/UserConceptsApi.d.ts +57 -0
  11. package/dist/esm/apis/UserConceptsApi.js +125 -0
  12. package/dist/esm/apis/index.d.ts +2 -0
  13. package/dist/esm/apis/index.js +2 -0
  14. package/dist/esm/models/LearningSessionEvaluation.d.ts +80 -0
  15. package/dist/esm/models/LearningSessionEvaluation.js +75 -0
  16. package/dist/esm/models/PaginatedUserConcepts.d.ts +39 -0
  17. package/dist/esm/models/PaginatedUserConcepts.js +48 -0
  18. package/dist/esm/models/UpsertUserConceptByNameRequest.d.ts +32 -0
  19. package/dist/esm/models/UpsertUserConceptByNameRequest.js +43 -0
  20. package/dist/esm/models/UserConcept.d.ts +63 -0
  21. package/dist/esm/models/UserConcept.js +64 -0
  22. package/dist/esm/models/UserConceptConcept.d.ts +44 -0
  23. package/dist/esm/models/UserConceptConcept.js +51 -0
  24. package/dist/esm/models/index.d.ts +5 -0
  25. package/dist/esm/models/index.js +5 -0
  26. package/dist/models/LearningSessionEvaluation.d.ts +80 -0
  27. package/dist/models/LearningSessionEvaluation.js +82 -0
  28. package/dist/models/PaginatedUserConcepts.d.ts +39 -0
  29. package/dist/models/PaginatedUserConcepts.js +55 -0
  30. package/dist/models/UpsertUserConceptByNameRequest.d.ts +32 -0
  31. package/dist/models/UpsertUserConceptByNameRequest.js +50 -0
  32. package/dist/models/UserConcept.d.ts +63 -0
  33. package/dist/models/UserConcept.js +71 -0
  34. package/dist/models/UserConceptConcept.d.ts +44 -0
  35. package/dist/models/UserConceptConcept.js +58 -0
  36. package/dist/models/index.d.ts +5 -0
  37. package/dist/models/index.js +5 -0
  38. package/package.json +1 -1
package/README.md CHANGED
@@ -91,6 +91,7 @@ All URIs are relative to *http://localhost:3000*
91
91
  *LearningDaysApi* | [**getLearningDays**](docs/LearningDaysApi.md#getlearningdays) | **GET** /api/v1/learning-days | Get learning days in range
92
92
  *LearningMomentsApi* | [**getLearningMomentsCount**](docs/LearningMomentsApi.md#getlearningmomentscount) | **GET** /api/v1/learning-moments/count | Get learning moments count
93
93
  *LearningMomentsApi* | [**listLearningMoments**](docs/LearningMomentsApi.md#listlearningmoments) | **GET** /api/v1/learning-moments | List learning moments
94
+ *LearningSessionEvaluationsApi* | [**listLearningSessionEvaluations**](docs/LearningSessionEvaluationsApi.md#listlearningsessionevaluations) | **GET** /api/v1/chats/{chatId}/learning-session-evaluations | List learning session evaluations for a chat
94
95
  *LearningStreakApi* | [**getLearningStreak**](docs/LearningStreakApi.md#getlearningstreak) | **GET** /api/v1/learning-streak | Get learning streak
95
96
  *MessagesApi* | [**createChatMessages**](docs/MessagesApi.md#createchatmessages) | **POST** /api/v1/chats/{chatId}/messages | Save messages to a chat
96
97
  *MessagesApi* | [**deleteMessages**](docs/MessagesApi.md#deletemessages) | **DELETE** /api/v1/chats/{chatId}/messages | Delete messages from timestamp
@@ -122,6 +123,8 @@ All URIs are relative to *http://localhost:3000*
122
123
  *TaxonomyEnrollmentsApi* | [**enrollInTaxonomy**](docs/TaxonomyEnrollmentsApi.md#enrollintaxonomy) | **POST** /api/v1/taxonomy_enrollments/{id} | Enroll in a taxonomy
123
124
  *TaxonomyEnrollmentsApi* | [**listMyEnrollments**](docs/TaxonomyEnrollmentsApi.md#listmyenrollments) | **GET** /api/v1/taxonomy_enrollments | List current user\'s active enrollments
124
125
  *TaxonomyEnrollmentsApi* | [**unenrollFromTaxonomy**](docs/TaxonomyEnrollmentsApi.md#unenrollfromtaxonomy) | **DELETE** /api/v1/taxonomy_enrollments/{id} | Unenroll from a taxonomy
126
+ *UserConceptsApi* | [**listUserConcepts**](docs/UserConceptsApi.md#listuserconcepts) | **GET** /api/v1/user-concepts | List user concepts
127
+ *UserConceptsApi* | [**upsertUserConceptByName**](docs/UserConceptsApi.md#upsertuserconceptbynameoperation) | **POST** /api/v1/user-concepts | Upsert user concept by name
125
128
  *UserContextApi* | [**getUserContext**](docs/UserContextApi.md#getusercontext) | **GET** /api/v1/user-context | Get user context
126
129
  *UserContextApi* | [**upsertUserContext**](docs/UserContextApi.md#upsertusercontextoperation) | **PUT** /api/v1/user-context | Create or update user context
127
130
  *VotesApi* | [**listChatVotes**](docs/VotesApi.md#listchatvotes) | **GET** /api/v1/chats/{chatId}/votes | List votes for a chat
@@ -168,6 +171,7 @@ All URIs are relative to *http://localhost:3000*
168
171
  - [LearningDaysResponse](docs/LearningDaysResponse.md)
169
172
  - [LearningMoment](docs/LearningMoment.md)
170
173
  - [LearningMomentCount](docs/LearningMomentCount.md)
174
+ - [LearningSessionEvaluation](docs/LearningSessionEvaluation.md)
171
175
  - [LearningStreakResponse](docs/LearningStreakResponse.md)
172
176
  - [Message](docs/Message.md)
173
177
  - [MessageAttachment](docs/MessageAttachment.md)
@@ -179,6 +183,7 @@ All URIs are relative to *http://localhost:3000*
179
183
  - [PaginatedQuizSessions](docs/PaginatedQuizSessions.md)
180
184
  - [PaginatedQuizzes](docs/PaginatedQuizzes.md)
181
185
  - [PaginatedTaxonomies](docs/PaginatedTaxonomies.md)
186
+ - [PaginatedUserConcepts](docs/PaginatedUserConcepts.md)
182
187
  - [Plan](docs/Plan.md)
183
188
  - [Quiz](docs/Quiz.md)
184
189
  - [QuizListItem](docs/QuizListItem.md)
@@ -214,8 +219,11 @@ All URIs are relative to *http://localhost:3000*
214
219
  - [UploadUrlRequestFilesInner](docs/UploadUrlRequestFilesInner.md)
215
220
  - [UploadUrlResponse](docs/UploadUrlResponse.md)
216
221
  - [UpsertOverrideDto](docs/UpsertOverrideDto.md)
222
+ - [UpsertUserConceptByNameRequest](docs/UpsertUserConceptByNameRequest.md)
217
223
  - [UpsertUserContextRequest](docs/UpsertUserContextRequest.md)
218
224
  - [UpsertVoteRequest](docs/UpsertVoteRequest.md)
225
+ - [UserConcept](docs/UserConcept.md)
226
+ - [UserConceptConcept](docs/UserConceptConcept.md)
219
227
  - [UserContext](docs/UserContext.md)
220
228
  - [Vote](docs/Vote.md)
221
229
  - [VotesResponse](docs/VotesResponse.md)
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { LearningSessionEvaluation } from '../models/index';
14
+ export interface ListLearningSessionEvaluationsRequest {
15
+ chatId: string;
16
+ xUserId: string;
17
+ }
18
+ /**
19
+ *
20
+ */
21
+ export declare class LearningSessionEvaluationsApi extends runtime.BaseAPI {
22
+ /**
23
+ * Returns the ordered per-turn evaluator signals for a learning-session chat (chatType \'level-up\' or \'quick-practice\'). Powers client-side rehydration of the session-panel reducer when the chat is reopened. Rows are returned in (createdAt, id) ascending order — natural turn order. No pagination: sessions are bounded to <30 turns.
24
+ * List learning session evaluations for a chat
25
+ */
26
+ listLearningSessionEvaluationsRaw(requestParameters: ListLearningSessionEvaluationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<LearningSessionEvaluation>>>;
27
+ /**
28
+ * Returns the ordered per-turn evaluator signals for a learning-session chat (chatType \'level-up\' or \'quick-practice\'). Powers client-side rehydration of the session-panel reducer when the chat is reopened. Rows are returned in (createdAt, id) ascending order — natural turn order. No pagination: sessions are bounded to <30 turns.
29
+ * List learning session evaluations for a chat
30
+ */
31
+ listLearningSessionEvaluations(requestParameters: ListLearningSessionEvaluationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LearningSessionEvaluation>>;
32
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Athena API
6
+ * REST API for the Athena system
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.LearningSessionEvaluationsApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class LearningSessionEvaluationsApi extends runtime.BaseAPI {
32
+ /**
33
+ * Returns the ordered per-turn evaluator signals for a learning-session chat (chatType \'level-up\' or \'quick-practice\'). Powers client-side rehydration of the session-panel reducer when the chat is reopened. Rows are returned in (createdAt, id) ascending order — natural turn order. No pagination: sessions are bounded to <30 turns.
34
+ * List learning session evaluations for a chat
35
+ */
36
+ listLearningSessionEvaluationsRaw(requestParameters, initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['chatId'] == null) {
39
+ throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling listLearningSessionEvaluations().');
40
+ }
41
+ if (requestParameters['xUserId'] == null) {
42
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listLearningSessionEvaluations().');
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}/learning-session-evaluations`;
53
+ urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
54
+ const response = yield this.request({
55
+ path: urlPath,
56
+ method: 'GET',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ }, initOverrides);
60
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.LearningSessionEvaluationFromJSON));
61
+ });
62
+ }
63
+ /**
64
+ * Returns the ordered per-turn evaluator signals for a learning-session chat (chatType \'level-up\' or \'quick-practice\'). Powers client-side rehydration of the session-panel reducer when the chat is reopened. Rows are returned in (createdAt, id) ascending order — natural turn order. No pagination: sessions are bounded to <30 turns.
65
+ * List learning session evaluations for a chat
66
+ */
67
+ listLearningSessionEvaluations(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const response = yield this.listLearningSessionEvaluationsRaw(requestParameters, initOverrides);
70
+ return yield response.value();
71
+ });
72
+ }
73
+ }
74
+ exports.LearningSessionEvaluationsApi = LearningSessionEvaluationsApi;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { PaginatedUserConcepts, UpsertUserConceptByNameRequest, UserConcept } from '../models/index';
14
+ export interface ListUserConceptsRequest {
15
+ xUserId: string;
16
+ limit?: number;
17
+ cursor?: string;
18
+ sortBy?: ListUserConceptsSortByEnum;
19
+ }
20
+ export interface UpsertUserConceptByNameOperationRequest {
21
+ xUserId: string;
22
+ upsertUserConceptByNameRequest: UpsertUserConceptByNameRequest;
23
+ }
24
+ /**
25
+ *
26
+ */
27
+ export declare class UserConceptsApi extends runtime.BaseAPI {
28
+ /**
29
+ * Returns a paginated list of concepts tracked for the authenticated account user. sortBy values: \'priority\' (v1 = updatedAt DESC with weakest-first tie-break), \'updated\' (updatedAt DESC), \'strength\' (weakest first).
30
+ * List user concepts
31
+ */
32
+ listUserConceptsRaw(requestParameters: ListUserConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedUserConcepts>>;
33
+ /**
34
+ * Returns a paginated list of concepts tracked for the authenticated account user. sortBy values: \'priority\' (v1 = updatedAt DESC with weakest-first tie-break), \'updated\' (updatedAt DESC), \'strength\' (weakest first).
35
+ * List user concepts
36
+ */
37
+ listUserConcepts(requestParameters: ListUserConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUserConcepts>;
38
+ /**
39
+ * Finds or creates a concept matching the supplied name (case-insensitive, whitespace-normalized) and ensures a user-concept row exists for the calling account user. Returns the (possibly pre-existing) user-concept joined with its concept. Always responds 200 — both fresh creates and returning-existing-row paths are successful and idempotent. New user-concept rows are seeded with strength and confidence of 0.000; no user_concept_history row is written.
40
+ * Upsert user concept by name
41
+ */
42
+ upsertUserConceptByNameRaw(requestParameters: UpsertUserConceptByNameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserConcept>>;
43
+ /**
44
+ * Finds or creates a concept matching the supplied name (case-insensitive, whitespace-normalized) and ensures a user-concept row exists for the calling account user. Returns the (possibly pre-existing) user-concept joined with its concept. Always responds 200 — both fresh creates and returning-existing-row paths are successful and idempotent. New user-concept rows are seeded with strength and confidence of 0.000; no user_concept_history row is written.
45
+ * Upsert user concept by name
46
+ */
47
+ upsertUserConceptByName(requestParameters: UpsertUserConceptByNameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserConcept>;
48
+ }
49
+ /**
50
+ * @export
51
+ */
52
+ export declare const ListUserConceptsSortByEnum: {
53
+ readonly Priority: "priority";
54
+ readonly Updated: "updated";
55
+ readonly Strength: "strength";
56
+ };
57
+ export type ListUserConceptsSortByEnum = typeof ListUserConceptsSortByEnum[keyof typeof ListUserConceptsSortByEnum];
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Athena API
6
+ * REST API for the Athena system
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ListUserConceptsSortByEnum = exports.UserConceptsApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class UserConceptsApi extends runtime.BaseAPI {
32
+ /**
33
+ * Returns a paginated list of concepts tracked for the authenticated account user. sortBy values: \'priority\' (v1 = updatedAt DESC with weakest-first tie-break), \'updated\' (updatedAt DESC), \'strength\' (weakest first).
34
+ * List user concepts
35
+ */
36
+ listUserConceptsRaw(requestParameters, initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['xUserId'] == null) {
39
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listUserConcepts().');
40
+ }
41
+ const queryParameters = {};
42
+ if (requestParameters['limit'] != null) {
43
+ queryParameters['limit'] = requestParameters['limit'];
44
+ }
45
+ if (requestParameters['cursor'] != null) {
46
+ queryParameters['cursor'] = requestParameters['cursor'];
47
+ }
48
+ if (requestParameters['sortBy'] != null) {
49
+ queryParameters['sortBy'] = requestParameters['sortBy'];
50
+ }
51
+ const headerParameters = {};
52
+ if (requestParameters['xUserId'] != null) {
53
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
54
+ }
55
+ if (this.configuration && this.configuration.apiKey) {
56
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
57
+ }
58
+ let urlPath = `/api/v1/user-concepts`;
59
+ const response = yield this.request({
60
+ path: urlPath,
61
+ method: 'GET',
62
+ headers: headerParameters,
63
+ query: queryParameters,
64
+ }, initOverrides);
65
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedUserConceptsFromJSON)(jsonValue));
66
+ });
67
+ }
68
+ /**
69
+ * Returns a paginated list of concepts tracked for the authenticated account user. sortBy values: \'priority\' (v1 = updatedAt DESC with weakest-first tie-break), \'updated\' (updatedAt DESC), \'strength\' (weakest first).
70
+ * List user concepts
71
+ */
72
+ listUserConcepts(requestParameters, initOverrides) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const response = yield this.listUserConceptsRaw(requestParameters, initOverrides);
75
+ return yield response.value();
76
+ });
77
+ }
78
+ /**
79
+ * Finds or creates a concept matching the supplied name (case-insensitive, whitespace-normalized) and ensures a user-concept row exists for the calling account user. Returns the (possibly pre-existing) user-concept joined with its concept. Always responds 200 — both fresh creates and returning-existing-row paths are successful and idempotent. New user-concept rows are seeded with strength and confidence of 0.000; no user_concept_history row is written.
80
+ * Upsert user concept by name
81
+ */
82
+ upsertUserConceptByNameRaw(requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function* () {
84
+ if (requestParameters['xUserId'] == null) {
85
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling upsertUserConceptByName().');
86
+ }
87
+ if (requestParameters['upsertUserConceptByNameRequest'] == null) {
88
+ throw new runtime.RequiredError('upsertUserConceptByNameRequest', 'Required parameter "upsertUserConceptByNameRequest" was null or undefined when calling upsertUserConceptByName().');
89
+ }
90
+ const queryParameters = {};
91
+ const headerParameters = {};
92
+ headerParameters['Content-Type'] = 'application/json';
93
+ if (requestParameters['xUserId'] != null) {
94
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
95
+ }
96
+ if (this.configuration && this.configuration.apiKey) {
97
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
98
+ }
99
+ let urlPath = `/api/v1/user-concepts`;
100
+ const response = yield this.request({
101
+ path: urlPath,
102
+ method: 'POST',
103
+ headers: headerParameters,
104
+ query: queryParameters,
105
+ body: (0, index_1.UpsertUserConceptByNameRequestToJSON)(requestParameters['upsertUserConceptByNameRequest']),
106
+ }, initOverrides);
107
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserConceptFromJSON)(jsonValue));
108
+ });
109
+ }
110
+ /**
111
+ * Finds or creates a concept matching the supplied name (case-insensitive, whitespace-normalized) and ensures a user-concept row exists for the calling account user. Returns the (possibly pre-existing) user-concept joined with its concept. Always responds 200 — both fresh creates and returning-existing-row paths are successful and idempotent. New user-concept rows are seeded with strength and confidence of 0.000; no user_concept_history row is written.
112
+ * Upsert user concept by name
113
+ */
114
+ upsertUserConceptByName(requestParameters, initOverrides) {
115
+ return __awaiter(this, void 0, void 0, function* () {
116
+ const response = yield this.upsertUserConceptByNameRaw(requestParameters, initOverrides);
117
+ return yield response.value();
118
+ });
119
+ }
120
+ }
121
+ exports.UserConceptsApi = UserConceptsApi;
122
+ /**
123
+ * @export
124
+ */
125
+ exports.ListUserConceptsSortByEnum = {
126
+ Priority: 'priority',
127
+ Updated: 'updated',
128
+ Strength: 'strength'
129
+ };
@@ -9,6 +9,7 @@ export * from './FilesApi';
9
9
  export * from './HealthApi';
10
10
  export * from './LearningDaysApi';
11
11
  export * from './LearningMomentsApi';
12
+ export * from './LearningSessionEvaluationsApi';
12
13
  export * from './LearningStreakApi';
13
14
  export * from './MessagesApi';
14
15
  export * from './PlansApi';
@@ -18,5 +19,6 @@ export * from './ServiceTokensApi';
18
19
  export * from './TagsApi';
19
20
  export * from './TaxonomiesApi';
20
21
  export * from './TaxonomyEnrollmentsApi';
22
+ export * from './UserConceptsApi';
21
23
  export * from './UserContextApi';
22
24
  export * from './VotesApi';
@@ -27,6 +27,7 @@ __exportStar(require("./FilesApi"), exports);
27
27
  __exportStar(require("./HealthApi"), exports);
28
28
  __exportStar(require("./LearningDaysApi"), exports);
29
29
  __exportStar(require("./LearningMomentsApi"), exports);
30
+ __exportStar(require("./LearningSessionEvaluationsApi"), exports);
30
31
  __exportStar(require("./LearningStreakApi"), exports);
31
32
  __exportStar(require("./MessagesApi"), exports);
32
33
  __exportStar(require("./PlansApi"), exports);
@@ -36,5 +37,6 @@ __exportStar(require("./ServiceTokensApi"), exports);
36
37
  __exportStar(require("./TagsApi"), exports);
37
38
  __exportStar(require("./TaxonomiesApi"), exports);
38
39
  __exportStar(require("./TaxonomyEnrollmentsApi"), exports);
40
+ __exportStar(require("./UserConceptsApi"), exports);
39
41
  __exportStar(require("./UserContextApi"), exports);
40
42
  __exportStar(require("./VotesApi"), exports);
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { LearningSessionEvaluation } from '../models/index';
14
+ export interface ListLearningSessionEvaluationsRequest {
15
+ chatId: string;
16
+ xUserId: string;
17
+ }
18
+ /**
19
+ *
20
+ */
21
+ export declare class LearningSessionEvaluationsApi extends runtime.BaseAPI {
22
+ /**
23
+ * Returns the ordered per-turn evaluator signals for a learning-session chat (chatType \'level-up\' or \'quick-practice\'). Powers client-side rehydration of the session-panel reducer when the chat is reopened. Rows are returned in (createdAt, id) ascending order — natural turn order. No pagination: sessions are bounded to <30 turns.
24
+ * List learning session evaluations for a chat
25
+ */
26
+ listLearningSessionEvaluationsRaw(requestParameters: ListLearningSessionEvaluationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<LearningSessionEvaluation>>>;
27
+ /**
28
+ * Returns the ordered per-turn evaluator signals for a learning-session chat (chatType \'level-up\' or \'quick-practice\'). Powers client-side rehydration of the session-panel reducer when the chat is reopened. Rows are returned in (createdAt, id) ascending order — natural turn order. No pagination: sessions are bounded to <30 turns.
29
+ * List learning session evaluations for a chat
30
+ */
31
+ listLearningSessionEvaluations(requestParameters: ListLearningSessionEvaluationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LearningSessionEvaluation>>;
32
+ }
@@ -0,0 +1,70 @@
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 { LearningSessionEvaluationFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class LearningSessionEvaluationsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Returns the ordered per-turn evaluator signals for a learning-session chat (chatType \'level-up\' or \'quick-practice\'). Powers client-side rehydration of the session-panel reducer when the chat is reopened. Rows are returned in (createdAt, id) ascending order — natural turn order. No pagination: sessions are bounded to <30 turns.
31
+ * List learning session evaluations for a chat
32
+ */
33
+ listLearningSessionEvaluationsRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['chatId'] == null) {
36
+ throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling listLearningSessionEvaluations().');
37
+ }
38
+ if (requestParameters['xUserId'] == null) {
39
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listLearningSessionEvaluations().');
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}/learning-session-evaluations`;
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) => jsonValue.map(LearningSessionEvaluationFromJSON));
58
+ });
59
+ }
60
+ /**
61
+ * Returns the ordered per-turn evaluator signals for a learning-session chat (chatType \'level-up\' or \'quick-practice\'). Powers client-side rehydration of the session-panel reducer when the chat is reopened. Rows are returned in (createdAt, id) ascending order — natural turn order. No pagination: sessions are bounded to <30 turns.
62
+ * List learning session evaluations for a chat
63
+ */
64
+ listLearningSessionEvaluations(requestParameters, initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const response = yield this.listLearningSessionEvaluationsRaw(requestParameters, initOverrides);
67
+ return yield response.value();
68
+ });
69
+ }
70
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { PaginatedUserConcepts, UpsertUserConceptByNameRequest, UserConcept } from '../models/index';
14
+ export interface ListUserConceptsRequest {
15
+ xUserId: string;
16
+ limit?: number;
17
+ cursor?: string;
18
+ sortBy?: ListUserConceptsSortByEnum;
19
+ }
20
+ export interface UpsertUserConceptByNameOperationRequest {
21
+ xUserId: string;
22
+ upsertUserConceptByNameRequest: UpsertUserConceptByNameRequest;
23
+ }
24
+ /**
25
+ *
26
+ */
27
+ export declare class UserConceptsApi extends runtime.BaseAPI {
28
+ /**
29
+ * Returns a paginated list of concepts tracked for the authenticated account user. sortBy values: \'priority\' (v1 = updatedAt DESC with weakest-first tie-break), \'updated\' (updatedAt DESC), \'strength\' (weakest first).
30
+ * List user concepts
31
+ */
32
+ listUserConceptsRaw(requestParameters: ListUserConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedUserConcepts>>;
33
+ /**
34
+ * Returns a paginated list of concepts tracked for the authenticated account user. sortBy values: \'priority\' (v1 = updatedAt DESC with weakest-first tie-break), \'updated\' (updatedAt DESC), \'strength\' (weakest first).
35
+ * List user concepts
36
+ */
37
+ listUserConcepts(requestParameters: ListUserConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUserConcepts>;
38
+ /**
39
+ * Finds or creates a concept matching the supplied name (case-insensitive, whitespace-normalized) and ensures a user-concept row exists for the calling account user. Returns the (possibly pre-existing) user-concept joined with its concept. Always responds 200 — both fresh creates and returning-existing-row paths are successful and idempotent. New user-concept rows are seeded with strength and confidence of 0.000; no user_concept_history row is written.
40
+ * Upsert user concept by name
41
+ */
42
+ upsertUserConceptByNameRaw(requestParameters: UpsertUserConceptByNameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserConcept>>;
43
+ /**
44
+ * Finds or creates a concept matching the supplied name (case-insensitive, whitespace-normalized) and ensures a user-concept row exists for the calling account user. Returns the (possibly pre-existing) user-concept joined with its concept. Always responds 200 — both fresh creates and returning-existing-row paths are successful and idempotent. New user-concept rows are seeded with strength and confidence of 0.000; no user_concept_history row is written.
45
+ * Upsert user concept by name
46
+ */
47
+ upsertUserConceptByName(requestParameters: UpsertUserConceptByNameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserConcept>;
48
+ }
49
+ /**
50
+ * @export
51
+ */
52
+ export declare const ListUserConceptsSortByEnum: {
53
+ readonly Priority: "priority";
54
+ readonly Updated: "updated";
55
+ readonly Strength: "strength";
56
+ };
57
+ export type ListUserConceptsSortByEnum = typeof ListUserConceptsSortByEnum[keyof typeof ListUserConceptsSortByEnum];