@instructure/athena-api-client 3.1.0 → 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
@@ -142,8 +142,10 @@ All URIs are relative to *http://localhost:3000*
142
142
  *TaxonomyEnrollmentsApi* | [**enrollInTaxonomy**](docs/TaxonomyEnrollmentsApi.md#enrollintaxonomy) | **POST** /api/v1/taxonomy_enrollments/{id} | Enroll in a taxonomy
143
143
  *TaxonomyEnrollmentsApi* | [**listMyEnrollments**](docs/TaxonomyEnrollmentsApi.md#listmyenrollments) | **GET** /api/v1/taxonomy_enrollments | List current user\'s active enrollments
144
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
145
146
  *UserConceptsApi* | [**getUserConcept**](docs/UserConceptsApi.md#getuserconcept) | **GET** /api/v1/user-concepts/{conceptId} | Get a user concept by concept id
146
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
147
149
  *UserConceptsApi* | [**upsertUserConceptByName**](docs/UserConceptsApi.md#upsertuserconceptbynameoperation) | **POST** /api/v1/user-concepts | Upsert user concept by name
148
150
  *UserContextApi* | [**getUserContext**](docs/UserContextApi.md#getusercontext) | **GET** /api/v1/user-context | Get user context
149
151
  *UserContextApi* | [**upsertUserContext**](docs/UserContextApi.md#upsertusercontextoperation) | **PUT** /api/v1/user-context | Create or update user context
@@ -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
@@ -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.1.0",
4
+ "version": "3.1.1",
5
5
  "description": "OpenAPI client for the Athena API",
6
6
  "author": "Instructure",
7
7
  "repository": {