@instructure/athena-api-client 3.0.5 → 3.1.1

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 CHANGED
@@ -95,6 +95,7 @@ All URIs are relative to *http://localhost:3000*
95
95
  *LearningMomentsApi* | [**getLearningMomentsCount**](docs/LearningMomentsApi.md#getlearningmomentscount) | **GET** /api/v1/learning-moments/count | Get learning moments count
96
96
  *LearningMomentsApi* | [**listLearningMoments**](docs/LearningMomentsApi.md#listlearningmoments) | **GET** /api/v1/learning-moments | List learning moments
97
97
  *LearningSessionEvaluationsApi* | [**listLearningSessionEvaluations**](docs/LearningSessionEvaluationsApi.md#listlearningsessionevaluations) | **GET** /api/v1/chats/{chatId}/learning-session-evaluations | List learning session evaluations for a chat
98
+ *LearningSessionEvaluationsApi* | [**listLearningSessionEvaluationsForConcept**](docs/LearningSessionEvaluationsApi.md#listlearningsessionevaluationsforconcept) | **GET** /api/v1/user-concepts/{conceptId}/learning-session-evaluations | List learning session evaluations for a concept
98
99
  *LearningStreakApi* | [**getLearningStreak**](docs/LearningStreakApi.md#getlearningstreak) | **GET** /api/v1/learning-streak | Get learning streak
99
100
  *MessagesApi* | [**createChatMessages**](docs/MessagesApi.md#createchatmessages) | **POST** /api/v1/chats/{chatId}/messages | Save messages to a chat
100
101
  *MessagesApi* | [**deleteMessages**](docs/MessagesApi.md#deletemessages) | **DELETE** /api/v1/chats/{chatId}/messages | Delete messages from timestamp
@@ -141,8 +142,10 @@ All URIs are relative to *http://localhost:3000*
141
142
  *TaxonomyEnrollmentsApi* | [**enrollInTaxonomy**](docs/TaxonomyEnrollmentsApi.md#enrollintaxonomy) | **POST** /api/v1/taxonomy_enrollments/{id} | Enroll in a taxonomy
142
143
  *TaxonomyEnrollmentsApi* | [**listMyEnrollments**](docs/TaxonomyEnrollmentsApi.md#listmyenrollments) | **GET** /api/v1/taxonomy_enrollments | List current user\'s active enrollments
143
144
  *TaxonomyEnrollmentsApi* | [**unenrollFromTaxonomy**](docs/TaxonomyEnrollmentsApi.md#unenrollfromtaxonomy) | **DELETE** /api/v1/taxonomy_enrollments/{id} | Unenroll from a taxonomy
145
+ *UserConceptsApi* | [**ensureUserConceptTracked**](docs/UserConceptsApi.md#ensureuserconcepttracked) | **PUT** /api/v1/user-concepts/{conceptId} | Ensure a user concept is tracked by concept id
144
146
  *UserConceptsApi* | [**getUserConcept**](docs/UserConceptsApi.md#getuserconcept) | **GET** /api/v1/user-concepts/{conceptId} | Get a user concept by concept id
145
147
  *UserConceptsApi* | [**listUserConcepts**](docs/UserConceptsApi.md#listuserconcepts) | **GET** /api/v1/user-concepts | List user concepts
148
+ *UserConceptsApi* | [**listUserConceptsByIds**](docs/UserConceptsApi.md#listuserconceptsbyids) | **GET** /api/v1/user-concepts/by-ids | Batch read user concepts by concept ids
146
149
  *UserConceptsApi* | [**upsertUserConceptByName**](docs/UserConceptsApi.md#upsertuserconceptbynameoperation) | **POST** /api/v1/user-concepts | Upsert user concept by name
147
150
  *UserContextApi* | [**getUserContext**](docs/UserContextApi.md#getusercontext) | **GET** /api/v1/user-context | Get user context
148
151
  *UserContextApi* | [**upsertUserContext**](docs/UserContextApi.md#upsertusercontextoperation) | **PUT** /api/v1/user-context | Create or update user context
@@ -15,6 +15,10 @@ export interface ListLearningSessionEvaluationsRequest {
15
15
  chatId: string;
16
16
  xUserId: string;
17
17
  }
18
+ export interface ListLearningSessionEvaluationsForConceptRequest {
19
+ conceptId: string;
20
+ xUserId: string;
21
+ }
18
22
  /**
19
23
  *
20
24
  */
@@ -29,4 +33,14 @@ export declare class LearningSessionEvaluationsApi extends runtime.BaseAPI {
29
33
  * List learning session evaluations for a chat
30
34
  */
31
35
  listLearningSessionEvaluations(requestParameters: ListLearningSessionEvaluationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LearningSessionEvaluation>>;
36
+ /**
37
+ * Returns every per-turn evaluator signal (the learning evidence) across all of the authenticated account user\'s learning-session chats (chatType \'level-up\' or \'quick-practice\') where the supplied concept is the chat\'s primary concept. Aggregates a concept\'s evidence across sessions; each row carries its chatId so callers can group by session. Account-user-scoped — only the caller\'s own chats are considered, never another user\'s. Rows are returned in (createdAt, id) ascending order — a chronological evidence stream. Returns an empty array when the caller has no primary-concept session for the concept (the normal \'no evidence yet\' signal); it intentionally does not assert that the concept exists.
38
+ * List learning session evaluations for a concept
39
+ */
40
+ listLearningSessionEvaluationsForConceptRaw(requestParameters: ListLearningSessionEvaluationsForConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<LearningSessionEvaluation>>>;
41
+ /**
42
+ * Returns every per-turn evaluator signal (the learning evidence) across all of the authenticated account user\'s learning-session chats (chatType \'level-up\' or \'quick-practice\') where the supplied concept is the chat\'s primary concept. Aggregates a concept\'s evidence across sessions; each row carries its chatId so callers can group by session. Account-user-scoped — only the caller\'s own chats are considered, never another user\'s. Rows are returned in (createdAt, id) ascending order — a chronological evidence stream. Returns an empty array when the caller has no primary-concept session for the concept (the normal \'no evidence yet\' signal); it intentionally does not assert that the concept exists.
43
+ * List learning session evaluations for a concept
44
+ */
45
+ listLearningSessionEvaluationsForConcept(requestParameters: ListLearningSessionEvaluationsForConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LearningSessionEvaluation>>;
32
46
  }
@@ -70,5 +70,46 @@ class LearningSessionEvaluationsApi extends runtime.BaseAPI {
70
70
  return yield response.value();
71
71
  });
72
72
  }
73
+ /**
74
+ * Returns every per-turn evaluator signal (the learning evidence) across all of the authenticated account user\'s learning-session chats (chatType \'level-up\' or \'quick-practice\') where the supplied concept is the chat\'s primary concept. Aggregates a concept\'s evidence across sessions; each row carries its chatId so callers can group by session. Account-user-scoped — only the caller\'s own chats are considered, never another user\'s. Rows are returned in (createdAt, id) ascending order — a chronological evidence stream. Returns an empty array when the caller has no primary-concept session for the concept (the normal \'no evidence yet\' signal); it intentionally does not assert that the concept exists.
75
+ * List learning session evaluations for a concept
76
+ */
77
+ listLearningSessionEvaluationsForConceptRaw(requestParameters, initOverrides) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ if (requestParameters['conceptId'] == null) {
80
+ throw new runtime.RequiredError('conceptId', 'Required parameter "conceptId" was null or undefined when calling listLearningSessionEvaluationsForConcept().');
81
+ }
82
+ if (requestParameters['xUserId'] == null) {
83
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listLearningSessionEvaluationsForConcept().');
84
+ }
85
+ const queryParameters = {};
86
+ const headerParameters = {};
87
+ if (requestParameters['xUserId'] != null) {
88
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
89
+ }
90
+ if (this.configuration && this.configuration.apiKey) {
91
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
92
+ }
93
+ let urlPath = `/api/v1/user-concepts/{conceptId}/learning-session-evaluations`;
94
+ urlPath = urlPath.replace(`{${"conceptId"}}`, encodeURIComponent(String(requestParameters['conceptId'])));
95
+ const response = yield this.request({
96
+ path: urlPath,
97
+ method: 'GET',
98
+ headers: headerParameters,
99
+ query: queryParameters,
100
+ }, initOverrides);
101
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.LearningSessionEvaluationFromJSON));
102
+ });
103
+ }
104
+ /**
105
+ * Returns every per-turn evaluator signal (the learning evidence) across all of the authenticated account user\'s learning-session chats (chatType \'level-up\' or \'quick-practice\') where the supplied concept is the chat\'s primary concept. Aggregates a concept\'s evidence across sessions; each row carries its chatId so callers can group by session. Account-user-scoped — only the caller\'s own chats are considered, never another user\'s. Rows are returned in (createdAt, id) ascending order — a chronological evidence stream. Returns an empty array when the caller has no primary-concept session for the concept (the normal \'no evidence yet\' signal); it intentionally does not assert that the concept exists.
106
+ * List learning session evaluations for a concept
107
+ */
108
+ listLearningSessionEvaluationsForConcept(requestParameters, initOverrides) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ const response = yield this.listLearningSessionEvaluationsForConceptRaw(requestParameters, initOverrides);
111
+ return yield response.value();
112
+ });
113
+ }
73
114
  }
74
115
  exports.LearningSessionEvaluationsApi = LearningSessionEvaluationsApi;
@@ -11,6 +11,10 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { PaginatedUserConcepts, UpsertUserConceptByNameRequest, UserConcept } from '../models/index';
14
+ export interface EnsureUserConceptTrackedRequest {
15
+ conceptId: string;
16
+ xUserId: string;
17
+ }
14
18
  export interface GetUserConceptRequest {
15
19
  conceptId: string;
16
20
  xUserId: string;
@@ -21,6 +25,10 @@ export interface ListUserConceptsRequest {
21
25
  cursor?: string;
22
26
  sortBy?: ListUserConceptsSortByEnum;
23
27
  }
28
+ export interface ListUserConceptsByIdsRequest {
29
+ conceptIds: Array<string>;
30
+ xUserId: string;
31
+ }
24
32
  export interface UpsertUserConceptByNameOperationRequest {
25
33
  xUserId: string;
26
34
  upsertUserConceptByNameRequest: UpsertUserConceptByNameRequest;
@@ -29,6 +37,16 @@ export interface UpsertUserConceptByNameOperationRequest {
29
37
  *
30
38
  */
31
39
  export declare class UserConceptsApi extends runtime.BaseAPI {
40
+ /**
41
+ * Find-or-creates the calling account user\'s user-concept row for an existing global concept id, seeding strength and confidence of 0.000 when absent, and returns it joined with concept metadata. Idempotent: re-calling returns the existing row unchanged and never resets an in-progress strength, so it is safe to call before launching a learning session on a concept the learner hasn\'t engaged yet. Concurrency-safe — simultaneous calls resolve to a single row. Always responds 200 (both the fresh-create and returning-existing paths are successful). Unlike the by-name upsert this never creates a concept; an id that doesn\'t resolve to a real concept returns 404.
42
+ * Ensure a user concept is tracked by concept id
43
+ */
44
+ ensureUserConceptTrackedRaw(requestParameters: EnsureUserConceptTrackedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserConcept>>;
45
+ /**
46
+ * Find-or-creates the calling account user\'s user-concept row for an existing global concept id, seeding strength and confidence of 0.000 when absent, and returns it joined with concept metadata. Idempotent: re-calling returns the existing row unchanged and never resets an in-progress strength, so it is safe to call before launching a learning session on a concept the learner hasn\'t engaged yet. Concurrency-safe — simultaneous calls resolve to a single row. Always responds 200 (both the fresh-create and returning-existing paths are successful). Unlike the by-name upsert this never creates a concept; an id that doesn\'t resolve to a real concept returns 404.
47
+ * Ensure a user concept is tracked by concept id
48
+ */
49
+ ensureUserConceptTracked(requestParameters: EnsureUserConceptTrackedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserConcept>;
32
50
  /**
33
51
  * Returns the single user-concept row for the calling account user and the supplied concept id, joined with concept metadata. 404s when the caller has no user-concept row for that concept (i.e. they don\'t track it yet). Use this to look up a single user-concept directly when the concept id is already known — avoids list-and-scan over the full paginated user-concept set.
34
52
  * Get a user concept by concept id
@@ -49,6 +67,16 @@ export declare class UserConceptsApi extends runtime.BaseAPI {
49
67
  * List user concepts
50
68
  */
51
69
  listUserConcepts(requestParameters: ListUserConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUserConcepts>;
70
+ /**
71
+ * Returns the calling account user\'s mastery for a supplied set of concept ids, joined with concept metadata. Only the tracked subset is returned — ids the caller has no user-concept row for are omitted (callers treat an absent id as \'not assessed\'), so the result may be shorter than the requested id list and is empty when none are tracked. Account-user-scoped: never surfaces another learner\'s rows. Capped at 100 ids per request (over-cap, empty, or non-uuid → 400). Use this to enrich a known set of concepts (e.g. a study objective\'s extracted concepts) with per-concept mastery in a single call instead of N single lookups.
72
+ * Batch read user concepts by concept ids
73
+ */
74
+ listUserConceptsByIdsRaw(requestParameters: ListUserConceptsByIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UserConcept>>>;
75
+ /**
76
+ * Returns the calling account user\'s mastery for a supplied set of concept ids, joined with concept metadata. Only the tracked subset is returned — ids the caller has no user-concept row for are omitted (callers treat an absent id as \'not assessed\'), so the result may be shorter than the requested id list and is empty when none are tracked. Account-user-scoped: never surfaces another learner\'s rows. Capped at 100 ids per request (over-cap, empty, or non-uuid → 400). Use this to enrich a known set of concepts (e.g. a study objective\'s extracted concepts) with per-concept mastery in a single call instead of N single lookups.
77
+ * Batch read user concepts by concept ids
78
+ */
79
+ listUserConceptsByIds(requestParameters: ListUserConceptsByIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UserConcept>>;
52
80
  /**
53
81
  * 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.
54
82
  * Upsert user concept by name
@@ -29,6 +29,47 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class UserConceptsApi extends runtime.BaseAPI {
32
+ /**
33
+ * Find-or-creates the calling account user\'s user-concept row for an existing global concept id, seeding strength and confidence of 0.000 when absent, and returns it joined with concept metadata. Idempotent: re-calling returns the existing row unchanged and never resets an in-progress strength, so it is safe to call before launching a learning session on a concept the learner hasn\'t engaged yet. Concurrency-safe — simultaneous calls resolve to a single row. Always responds 200 (both the fresh-create and returning-existing paths are successful). Unlike the by-name upsert this never creates a concept; an id that doesn\'t resolve to a real concept returns 404.
34
+ * Ensure a user concept is tracked by concept id
35
+ */
36
+ ensureUserConceptTrackedRaw(requestParameters, initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['conceptId'] == null) {
39
+ throw new runtime.RequiredError('conceptId', 'Required parameter "conceptId" was null or undefined when calling ensureUserConceptTracked().');
40
+ }
41
+ if (requestParameters['xUserId'] == null) {
42
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling ensureUserConceptTracked().');
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/user-concepts/{conceptId}`;
53
+ urlPath = urlPath.replace(`{${"conceptId"}}`, encodeURIComponent(String(requestParameters['conceptId'])));
54
+ const response = yield this.request({
55
+ path: urlPath,
56
+ method: 'PUT',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ }, initOverrides);
60
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserConceptFromJSON)(jsonValue));
61
+ });
62
+ }
63
+ /**
64
+ * Find-or-creates the calling account user\'s user-concept row for an existing global concept id, seeding strength and confidence of 0.000 when absent, and returns it joined with concept metadata. Idempotent: re-calling returns the existing row unchanged and never resets an in-progress strength, so it is safe to call before launching a learning session on a concept the learner hasn\'t engaged yet. Concurrency-safe — simultaneous calls resolve to a single row. Always responds 200 (both the fresh-create and returning-existing paths are successful). Unlike the by-name upsert this never creates a concept; an id that doesn\'t resolve to a real concept returns 404.
65
+ * Ensure a user concept is tracked by concept id
66
+ */
67
+ ensureUserConceptTracked(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const response = yield this.ensureUserConceptTrackedRaw(requestParameters, initOverrides);
70
+ return yield response.value();
71
+ });
72
+ }
32
73
  /**
33
74
  * Returns the single user-concept row for the calling account user and the supplied concept id, joined with concept metadata. 404s when the caller has no user-concept row for that concept (i.e. they don\'t track it yet). Use this to look up a single user-concept directly when the concept id is already known — avoids list-and-scan over the full paginated user-concept set.
34
75
  * Get a user concept by concept id
@@ -116,6 +157,49 @@ class UserConceptsApi extends runtime.BaseAPI {
116
157
  return yield response.value();
117
158
  });
118
159
  }
160
+ /**
161
+ * Returns the calling account user\'s mastery for a supplied set of concept ids, joined with concept metadata. Only the tracked subset is returned — ids the caller has no user-concept row for are omitted (callers treat an absent id as \'not assessed\'), so the result may be shorter than the requested id list and is empty when none are tracked. Account-user-scoped: never surfaces another learner\'s rows. Capped at 100 ids per request (over-cap, empty, or non-uuid → 400). Use this to enrich a known set of concepts (e.g. a study objective\'s extracted concepts) with per-concept mastery in a single call instead of N single lookups.
162
+ * Batch read user concepts by concept ids
163
+ */
164
+ listUserConceptsByIdsRaw(requestParameters, initOverrides) {
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ if (requestParameters['conceptIds'] == null) {
167
+ throw new runtime.RequiredError('conceptIds', 'Required parameter "conceptIds" was null or undefined when calling listUserConceptsByIds().');
168
+ }
169
+ if (requestParameters['xUserId'] == null) {
170
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listUserConceptsByIds().');
171
+ }
172
+ const queryParameters = {};
173
+ if (requestParameters['conceptIds'] != null) {
174
+ queryParameters['conceptIds'] = requestParameters['conceptIds'];
175
+ }
176
+ const headerParameters = {};
177
+ if (requestParameters['xUserId'] != null) {
178
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
179
+ }
180
+ if (this.configuration && this.configuration.apiKey) {
181
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
182
+ }
183
+ let urlPath = `/api/v1/user-concepts/by-ids`;
184
+ const response = yield this.request({
185
+ path: urlPath,
186
+ method: 'GET',
187
+ headers: headerParameters,
188
+ query: queryParameters,
189
+ }, initOverrides);
190
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UserConceptFromJSON));
191
+ });
192
+ }
193
+ /**
194
+ * Returns the calling account user\'s mastery for a supplied set of concept ids, joined with concept metadata. Only the tracked subset is returned — ids the caller has no user-concept row for are omitted (callers treat an absent id as \'not assessed\'), so the result may be shorter than the requested id list and is empty when none are tracked. Account-user-scoped: never surfaces another learner\'s rows. Capped at 100 ids per request (over-cap, empty, or non-uuid → 400). Use this to enrich a known set of concepts (e.g. a study objective\'s extracted concepts) with per-concept mastery in a single call instead of N single lookups.
195
+ * Batch read user concepts by concept ids
196
+ */
197
+ listUserConceptsByIds(requestParameters, initOverrides) {
198
+ return __awaiter(this, void 0, void 0, function* () {
199
+ const response = yield this.listUserConceptsByIdsRaw(requestParameters, initOverrides);
200
+ return yield response.value();
201
+ });
202
+ }
119
203
  /**
120
204
  * 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.
121
205
  * Upsert user concept by name
@@ -15,6 +15,10 @@ export interface ListLearningSessionEvaluationsRequest {
15
15
  chatId: string;
16
16
  xUserId: string;
17
17
  }
18
+ export interface ListLearningSessionEvaluationsForConceptRequest {
19
+ conceptId: string;
20
+ xUserId: string;
21
+ }
18
22
  /**
19
23
  *
20
24
  */
@@ -29,4 +33,14 @@ export declare class LearningSessionEvaluationsApi extends runtime.BaseAPI {
29
33
  * List learning session evaluations for a chat
30
34
  */
31
35
  listLearningSessionEvaluations(requestParameters: ListLearningSessionEvaluationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LearningSessionEvaluation>>;
36
+ /**
37
+ * Returns every per-turn evaluator signal (the learning evidence) across all of the authenticated account user\'s learning-session chats (chatType \'level-up\' or \'quick-practice\') where the supplied concept is the chat\'s primary concept. Aggregates a concept\'s evidence across sessions; each row carries its chatId so callers can group by session. Account-user-scoped — only the caller\'s own chats are considered, never another user\'s. Rows are returned in (createdAt, id) ascending order — a chronological evidence stream. Returns an empty array when the caller has no primary-concept session for the concept (the normal \'no evidence yet\' signal); it intentionally does not assert that the concept exists.
38
+ * List learning session evaluations for a concept
39
+ */
40
+ listLearningSessionEvaluationsForConceptRaw(requestParameters: ListLearningSessionEvaluationsForConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<LearningSessionEvaluation>>>;
41
+ /**
42
+ * Returns every per-turn evaluator signal (the learning evidence) across all of the authenticated account user\'s learning-session chats (chatType \'level-up\' or \'quick-practice\') where the supplied concept is the chat\'s primary concept. Aggregates a concept\'s evidence across sessions; each row carries its chatId so callers can group by session. Account-user-scoped — only the caller\'s own chats are considered, never another user\'s. Rows are returned in (createdAt, id) ascending order — a chronological evidence stream. Returns an empty array when the caller has no primary-concept session for the concept (the normal \'no evidence yet\' signal); it intentionally does not assert that the concept exists.
43
+ * List learning session evaluations for a concept
44
+ */
45
+ listLearningSessionEvaluationsForConcept(requestParameters: ListLearningSessionEvaluationsForConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LearningSessionEvaluation>>;
32
46
  }
@@ -67,4 +67,45 @@ export class LearningSessionEvaluationsApi extends runtime.BaseAPI {
67
67
  return yield response.value();
68
68
  });
69
69
  }
70
+ /**
71
+ * Returns every per-turn evaluator signal (the learning evidence) across all of the authenticated account user\'s learning-session chats (chatType \'level-up\' or \'quick-practice\') where the supplied concept is the chat\'s primary concept. Aggregates a concept\'s evidence across sessions; each row carries its chatId so callers can group by session. Account-user-scoped — only the caller\'s own chats are considered, never another user\'s. Rows are returned in (createdAt, id) ascending order — a chronological evidence stream. Returns an empty array when the caller has no primary-concept session for the concept (the normal \'no evidence yet\' signal); it intentionally does not assert that the concept exists.
72
+ * List learning session evaluations for a concept
73
+ */
74
+ listLearningSessionEvaluationsForConceptRaw(requestParameters, initOverrides) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ if (requestParameters['conceptId'] == null) {
77
+ throw new runtime.RequiredError('conceptId', 'Required parameter "conceptId" was null or undefined when calling listLearningSessionEvaluationsForConcept().');
78
+ }
79
+ if (requestParameters['xUserId'] == null) {
80
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listLearningSessionEvaluationsForConcept().');
81
+ }
82
+ const queryParameters = {};
83
+ const headerParameters = {};
84
+ if (requestParameters['xUserId'] != null) {
85
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
86
+ }
87
+ if (this.configuration && this.configuration.apiKey) {
88
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
89
+ }
90
+ let urlPath = `/api/v1/user-concepts/{conceptId}/learning-session-evaluations`;
91
+ urlPath = urlPath.replace(`{${"conceptId"}}`, encodeURIComponent(String(requestParameters['conceptId'])));
92
+ const response = yield this.request({
93
+ path: urlPath,
94
+ method: 'GET',
95
+ headers: headerParameters,
96
+ query: queryParameters,
97
+ }, initOverrides);
98
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(LearningSessionEvaluationFromJSON));
99
+ });
100
+ }
101
+ /**
102
+ * Returns every per-turn evaluator signal (the learning evidence) across all of the authenticated account user\'s learning-session chats (chatType \'level-up\' or \'quick-practice\') where the supplied concept is the chat\'s primary concept. Aggregates a concept\'s evidence across sessions; each row carries its chatId so callers can group by session. Account-user-scoped — only the caller\'s own chats are considered, never another user\'s. Rows are returned in (createdAt, id) ascending order — a chronological evidence stream. Returns an empty array when the caller has no primary-concept session for the concept (the normal \'no evidence yet\' signal); it intentionally does not assert that the concept exists.
103
+ * List learning session evaluations for a concept
104
+ */
105
+ listLearningSessionEvaluationsForConcept(requestParameters, initOverrides) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ const response = yield this.listLearningSessionEvaluationsForConceptRaw(requestParameters, initOverrides);
108
+ return yield response.value();
109
+ });
110
+ }
70
111
  }
@@ -11,6 +11,10 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { PaginatedUserConcepts, UpsertUserConceptByNameRequest, UserConcept } from '../models/index';
14
+ export interface EnsureUserConceptTrackedRequest {
15
+ conceptId: string;
16
+ xUserId: string;
17
+ }
14
18
  export interface GetUserConceptRequest {
15
19
  conceptId: string;
16
20
  xUserId: string;
@@ -21,6 +25,10 @@ export interface ListUserConceptsRequest {
21
25
  cursor?: string;
22
26
  sortBy?: ListUserConceptsSortByEnum;
23
27
  }
28
+ export interface ListUserConceptsByIdsRequest {
29
+ conceptIds: Array<string>;
30
+ xUserId: string;
31
+ }
24
32
  export interface UpsertUserConceptByNameOperationRequest {
25
33
  xUserId: string;
26
34
  upsertUserConceptByNameRequest: UpsertUserConceptByNameRequest;
@@ -29,6 +37,16 @@ export interface UpsertUserConceptByNameOperationRequest {
29
37
  *
30
38
  */
31
39
  export declare class UserConceptsApi extends runtime.BaseAPI {
40
+ /**
41
+ * Find-or-creates the calling account user\'s user-concept row for an existing global concept id, seeding strength and confidence of 0.000 when absent, and returns it joined with concept metadata. Idempotent: re-calling returns the existing row unchanged and never resets an in-progress strength, so it is safe to call before launching a learning session on a concept the learner hasn\'t engaged yet. Concurrency-safe — simultaneous calls resolve to a single row. Always responds 200 (both the fresh-create and returning-existing paths are successful). Unlike the by-name upsert this never creates a concept; an id that doesn\'t resolve to a real concept returns 404.
42
+ * Ensure a user concept is tracked by concept id
43
+ */
44
+ ensureUserConceptTrackedRaw(requestParameters: EnsureUserConceptTrackedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserConcept>>;
45
+ /**
46
+ * Find-or-creates the calling account user\'s user-concept row for an existing global concept id, seeding strength and confidence of 0.000 when absent, and returns it joined with concept metadata. Idempotent: re-calling returns the existing row unchanged and never resets an in-progress strength, so it is safe to call before launching a learning session on a concept the learner hasn\'t engaged yet. Concurrency-safe — simultaneous calls resolve to a single row. Always responds 200 (both the fresh-create and returning-existing paths are successful). Unlike the by-name upsert this never creates a concept; an id that doesn\'t resolve to a real concept returns 404.
47
+ * Ensure a user concept is tracked by concept id
48
+ */
49
+ ensureUserConceptTracked(requestParameters: EnsureUserConceptTrackedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserConcept>;
32
50
  /**
33
51
  * Returns the single user-concept row for the calling account user and the supplied concept id, joined with concept metadata. 404s when the caller has no user-concept row for that concept (i.e. they don\'t track it yet). Use this to look up a single user-concept directly when the concept id is already known — avoids list-and-scan over the full paginated user-concept set.
34
52
  * Get a user concept by concept id
@@ -49,6 +67,16 @@ export declare class UserConceptsApi extends runtime.BaseAPI {
49
67
  * List user concepts
50
68
  */
51
69
  listUserConcepts(requestParameters: ListUserConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUserConcepts>;
70
+ /**
71
+ * Returns the calling account user\'s mastery for a supplied set of concept ids, joined with concept metadata. Only the tracked subset is returned — ids the caller has no user-concept row for are omitted (callers treat an absent id as \'not assessed\'), so the result may be shorter than the requested id list and is empty when none are tracked. Account-user-scoped: never surfaces another learner\'s rows. Capped at 100 ids per request (over-cap, empty, or non-uuid → 400). Use this to enrich a known set of concepts (e.g. a study objective\'s extracted concepts) with per-concept mastery in a single call instead of N single lookups.
72
+ * Batch read user concepts by concept ids
73
+ */
74
+ listUserConceptsByIdsRaw(requestParameters: ListUserConceptsByIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UserConcept>>>;
75
+ /**
76
+ * Returns the calling account user\'s mastery for a supplied set of concept ids, joined with concept metadata. Only the tracked subset is returned — ids the caller has no user-concept row for are omitted (callers treat an absent id as \'not assessed\'), so the result may be shorter than the requested id list and is empty when none are tracked. Account-user-scoped: never surfaces another learner\'s rows. Capped at 100 ids per request (over-cap, empty, or non-uuid → 400). Use this to enrich a known set of concepts (e.g. a study objective\'s extracted concepts) with per-concept mastery in a single call instead of N single lookups.
77
+ * Batch read user concepts by concept ids
78
+ */
79
+ listUserConceptsByIds(requestParameters: ListUserConceptsByIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UserConcept>>;
52
80
  /**
53
81
  * 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.
54
82
  * Upsert user concept by name
@@ -26,6 +26,47 @@ import { PaginatedUserConceptsFromJSON, UpsertUserConceptByNameRequestToJSON, Us
26
26
  *
27
27
  */
28
28
  export class UserConceptsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Find-or-creates the calling account user\'s user-concept row for an existing global concept id, seeding strength and confidence of 0.000 when absent, and returns it joined with concept metadata. Idempotent: re-calling returns the existing row unchanged and never resets an in-progress strength, so it is safe to call before launching a learning session on a concept the learner hasn\'t engaged yet. Concurrency-safe — simultaneous calls resolve to a single row. Always responds 200 (both the fresh-create and returning-existing paths are successful). Unlike the by-name upsert this never creates a concept; an id that doesn\'t resolve to a real concept returns 404.
31
+ * Ensure a user concept is tracked by concept id
32
+ */
33
+ ensureUserConceptTrackedRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['conceptId'] == null) {
36
+ throw new runtime.RequiredError('conceptId', 'Required parameter "conceptId" was null or undefined when calling ensureUserConceptTracked().');
37
+ }
38
+ if (requestParameters['xUserId'] == null) {
39
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling ensureUserConceptTracked().');
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/user-concepts/{conceptId}`;
50
+ urlPath = urlPath.replace(`{${"conceptId"}}`, encodeURIComponent(String(requestParameters['conceptId'])));
51
+ const response = yield this.request({
52
+ path: urlPath,
53
+ method: 'PUT',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ }, initOverrides);
57
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserConceptFromJSON(jsonValue));
58
+ });
59
+ }
60
+ /**
61
+ * Find-or-creates the calling account user\'s user-concept row for an existing global concept id, seeding strength and confidence of 0.000 when absent, and returns it joined with concept metadata. Idempotent: re-calling returns the existing row unchanged and never resets an in-progress strength, so it is safe to call before launching a learning session on a concept the learner hasn\'t engaged yet. Concurrency-safe — simultaneous calls resolve to a single row. Always responds 200 (both the fresh-create and returning-existing paths are successful). Unlike the by-name upsert this never creates a concept; an id that doesn\'t resolve to a real concept returns 404.
62
+ * Ensure a user concept is tracked by concept id
63
+ */
64
+ ensureUserConceptTracked(requestParameters, initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const response = yield this.ensureUserConceptTrackedRaw(requestParameters, initOverrides);
67
+ return yield response.value();
68
+ });
69
+ }
29
70
  /**
30
71
  * Returns the single user-concept row for the calling account user and the supplied concept id, joined with concept metadata. 404s when the caller has no user-concept row for that concept (i.e. they don\'t track it yet). Use this to look up a single user-concept directly when the concept id is already known — avoids list-and-scan over the full paginated user-concept set.
31
72
  * Get a user concept by concept id
@@ -113,6 +154,49 @@ export class UserConceptsApi extends runtime.BaseAPI {
113
154
  return yield response.value();
114
155
  });
115
156
  }
157
+ /**
158
+ * Returns the calling account user\'s mastery for a supplied set of concept ids, joined with concept metadata. Only the tracked subset is returned — ids the caller has no user-concept row for are omitted (callers treat an absent id as \'not assessed\'), so the result may be shorter than the requested id list and is empty when none are tracked. Account-user-scoped: never surfaces another learner\'s rows. Capped at 100 ids per request (over-cap, empty, or non-uuid → 400). Use this to enrich a known set of concepts (e.g. a study objective\'s extracted concepts) with per-concept mastery in a single call instead of N single lookups.
159
+ * Batch read user concepts by concept ids
160
+ */
161
+ listUserConceptsByIdsRaw(requestParameters, initOverrides) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ if (requestParameters['conceptIds'] == null) {
164
+ throw new runtime.RequiredError('conceptIds', 'Required parameter "conceptIds" was null or undefined when calling listUserConceptsByIds().');
165
+ }
166
+ if (requestParameters['xUserId'] == null) {
167
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listUserConceptsByIds().');
168
+ }
169
+ const queryParameters = {};
170
+ if (requestParameters['conceptIds'] != null) {
171
+ queryParameters['conceptIds'] = requestParameters['conceptIds'];
172
+ }
173
+ const headerParameters = {};
174
+ if (requestParameters['xUserId'] != null) {
175
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
176
+ }
177
+ if (this.configuration && this.configuration.apiKey) {
178
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
179
+ }
180
+ let urlPath = `/api/v1/user-concepts/by-ids`;
181
+ const response = yield this.request({
182
+ path: urlPath,
183
+ method: 'GET',
184
+ headers: headerParameters,
185
+ query: queryParameters,
186
+ }, initOverrides);
187
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UserConceptFromJSON));
188
+ });
189
+ }
190
+ /**
191
+ * Returns the calling account user\'s mastery for a supplied set of concept ids, joined with concept metadata. Only the tracked subset is returned — ids the caller has no user-concept row for are omitted (callers treat an absent id as \'not assessed\'), so the result may be shorter than the requested id list and is empty when none are tracked. Account-user-scoped: never surfaces another learner\'s rows. Capped at 100 ids per request (over-cap, empty, or non-uuid → 400). Use this to enrich a known set of concepts (e.g. a study objective\'s extracted concepts) with per-concept mastery in a single call instead of N single lookups.
192
+ * Batch read user concepts by concept ids
193
+ */
194
+ listUserConceptsByIds(requestParameters, initOverrides) {
195
+ return __awaiter(this, void 0, void 0, function* () {
196
+ const response = yield this.listUserConceptsByIdsRaw(requestParameters, initOverrides);
197
+ return yield response.value();
198
+ });
199
+ }
116
200
  /**
117
201
  * 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.
118
202
  * Upsert user concept by name
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instructure/athena-api-client",
3
3
  "private": false,
4
- "version": "3.0.5",
4
+ "version": "3.1.1",
5
5
  "description": "OpenAPI client for the Athena API",
6
6
  "author": "Instructure",
7
7
  "repository": {