@instructure/athena-api-client 2.24.1 → 2.26.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.
package/README.md CHANGED
@@ -129,6 +129,7 @@ All URIs are relative to *http://localhost:3000*
129
129
  *TaxonomyEnrollmentsApi* | [**enrollInTaxonomy**](docs/TaxonomyEnrollmentsApi.md#enrollintaxonomy) | **POST** /api/v1/taxonomy_enrollments/{id} | Enroll in a taxonomy
130
130
  *TaxonomyEnrollmentsApi* | [**listMyEnrollments**](docs/TaxonomyEnrollmentsApi.md#listmyenrollments) | **GET** /api/v1/taxonomy_enrollments | List current user\'s active enrollments
131
131
  *TaxonomyEnrollmentsApi* | [**unenrollFromTaxonomy**](docs/TaxonomyEnrollmentsApi.md#unenrollfromtaxonomy) | **DELETE** /api/v1/taxonomy_enrollments/{id} | Unenroll from a taxonomy
132
+ *UserConceptsApi* | [**getUserConcept**](docs/UserConceptsApi.md#getuserconcept) | **GET** /api/v1/user-concepts/{conceptId} | Get a user concept by concept id
132
133
  *UserConceptsApi* | [**listUserConcepts**](docs/UserConceptsApi.md#listuserconcepts) | **GET** /api/v1/user-concepts | List user concepts
133
134
  *UserConceptsApi* | [**upsertUserConceptByName**](docs/UserConceptsApi.md#upsertuserconceptbynameoperation) | **POST** /api/v1/user-concepts | Upsert user concept by name
134
135
  *UserContextApi* | [**getUserContext**](docs/UserContextApi.md#getusercontext) | **GET** /api/v1/user-context | Get 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 GetUserConceptRequest {
15
+ conceptId: string;
16
+ xUserId: string;
17
+ }
14
18
  export interface ListUserConceptsRequest {
15
19
  xUserId: string;
16
20
  limit?: number;
@@ -25,6 +29,16 @@ export interface UpsertUserConceptByNameOperationRequest {
25
29
  *
26
30
  */
27
31
  export declare class UserConceptsApi extends runtime.BaseAPI {
32
+ /**
33
+ * 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
+ * Get a user concept by concept id
35
+ */
36
+ getUserConceptRaw(requestParameters: GetUserConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserConcept>>;
37
+ /**
38
+ * 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.
39
+ * Get a user concept by concept id
40
+ */
41
+ getUserConcept(requestParameters: GetUserConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserConcept>;
28
42
  /**
29
43
  * 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
44
  * List user concepts
@@ -29,6 +29,47 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class UserConceptsApi extends runtime.BaseAPI {
32
+ /**
33
+ * 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
+ * Get a user concept by concept id
35
+ */
36
+ getUserConceptRaw(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 getUserConcept().');
40
+ }
41
+ if (requestParameters['xUserId'] == null) {
42
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getUserConcept().');
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: 'GET',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ }, initOverrides);
60
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserConceptFromJSON)(jsonValue));
61
+ });
62
+ }
63
+ /**
64
+ * 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.
65
+ * Get a user concept by concept id
66
+ */
67
+ getUserConcept(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const response = yield this.getUserConceptRaw(requestParameters, initOverrides);
70
+ return yield response.value();
71
+ });
72
+ }
32
73
  /**
33
74
  * 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
75
  * List user concepts
@@ -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 GetUserConceptRequest {
15
+ conceptId: string;
16
+ xUserId: string;
17
+ }
14
18
  export interface ListUserConceptsRequest {
15
19
  xUserId: string;
16
20
  limit?: number;
@@ -25,6 +29,16 @@ export interface UpsertUserConceptByNameOperationRequest {
25
29
  *
26
30
  */
27
31
  export declare class UserConceptsApi extends runtime.BaseAPI {
32
+ /**
33
+ * 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
+ * Get a user concept by concept id
35
+ */
36
+ getUserConceptRaw(requestParameters: GetUserConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserConcept>>;
37
+ /**
38
+ * 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.
39
+ * Get a user concept by concept id
40
+ */
41
+ getUserConcept(requestParameters: GetUserConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserConcept>;
28
42
  /**
29
43
  * 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
44
  * List user concepts
@@ -26,6 +26,47 @@ import { PaginatedUserConceptsFromJSON, UpsertUserConceptByNameRequestToJSON, Us
26
26
  *
27
27
  */
28
28
  export class UserConceptsApi extends runtime.BaseAPI {
29
+ /**
30
+ * 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
+ * Get a user concept by concept id
32
+ */
33
+ getUserConceptRaw(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 getUserConcept().');
37
+ }
38
+ if (requestParameters['xUserId'] == null) {
39
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getUserConcept().');
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: 'GET',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ }, initOverrides);
57
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserConceptFromJSON(jsonValue));
58
+ });
59
+ }
60
+ /**
61
+ * 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.
62
+ * Get a user concept by concept id
63
+ */
64
+ getUserConcept(requestParameters, initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const response = yield this.getUserConceptRaw(requestParameters, initOverrides);
67
+ return yield response.value();
68
+ });
69
+ }
29
70
  /**
30
71
  * 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).
31
72
  * List user concepts
@@ -57,6 +57,12 @@ export interface TaxonomyProgressNode {
57
57
  * @memberof TaxonomyProgressNode
58
58
  */
59
59
  assessedConcepts: number;
60
+ /**
61
+ * Concept IDs mapped to this node via the bridge table. Empty for branch nodes by convention; leaves return all bridge-table entries sorted asc.
62
+ * @type {Array<string>}
63
+ * @memberof TaxonomyProgressNode
64
+ */
65
+ conceptIds: Array<string>;
60
66
  /**
61
67
  * Child nodes
62
68
  * @type {Array<TaxonomyProgressNode>}
@@ -29,6 +29,8 @@ export function instanceOfTaxonomyProgressNode(value) {
29
29
  return false;
30
30
  if (!('assessedConcepts' in value) || value['assessedConcepts'] === undefined)
31
31
  return false;
32
+ if (!('conceptIds' in value) || value['conceptIds'] === undefined)
33
+ return false;
32
34
  if (!('children' in value) || value['children'] === undefined)
33
35
  return false;
34
36
  return true;
@@ -48,6 +50,7 @@ export function TaxonomyProgressNodeFromJSONTyped(json, ignoreDiscriminator) {
48
50
  'confidence': json['confidence'],
49
51
  'totalConcepts': json['totalConcepts'],
50
52
  'assessedConcepts': json['assessedConcepts'],
53
+ 'conceptIds': json['conceptIds'],
51
54
  'children': (json['children'].map(TaxonomyProgressNodeFromJSON)),
52
55
  };
53
56
  }
@@ -66,6 +69,7 @@ export function TaxonomyProgressNodeToJSONTyped(value, ignoreDiscriminator = fal
66
69
  'confidence': value['confidence'],
67
70
  'totalConcepts': value['totalConcepts'],
68
71
  'assessedConcepts': value['assessedConcepts'],
72
+ 'conceptIds': value['conceptIds'],
69
73
  'children': (value['children'].map(TaxonomyProgressNodeToJSON)),
70
74
  };
71
75
  }
@@ -57,6 +57,12 @@ export interface TaxonomyProgressNode {
57
57
  * @memberof TaxonomyProgressNode
58
58
  */
59
59
  assessedConcepts: number;
60
+ /**
61
+ * Concept IDs mapped to this node via the bridge table. Empty for branch nodes by convention; leaves return all bridge-table entries sorted asc.
62
+ * @type {Array<string>}
63
+ * @memberof TaxonomyProgressNode
64
+ */
65
+ conceptIds: Array<string>;
60
66
  /**
61
67
  * Child nodes
62
68
  * @type {Array<TaxonomyProgressNode>}
@@ -36,6 +36,8 @@ function instanceOfTaxonomyProgressNode(value) {
36
36
  return false;
37
37
  if (!('assessedConcepts' in value) || value['assessedConcepts'] === undefined)
38
38
  return false;
39
+ if (!('conceptIds' in value) || value['conceptIds'] === undefined)
40
+ return false;
39
41
  if (!('children' in value) || value['children'] === undefined)
40
42
  return false;
41
43
  return true;
@@ -55,6 +57,7 @@ function TaxonomyProgressNodeFromJSONTyped(json, ignoreDiscriminator) {
55
57
  'confidence': json['confidence'],
56
58
  'totalConcepts': json['totalConcepts'],
57
59
  'assessedConcepts': json['assessedConcepts'],
60
+ 'conceptIds': json['conceptIds'],
58
61
  'children': (json['children'].map(TaxonomyProgressNodeFromJSON)),
59
62
  };
60
63
  }
@@ -73,6 +76,7 @@ function TaxonomyProgressNodeToJSONTyped(value, ignoreDiscriminator = false) {
73
76
  'confidence': value['confidence'],
74
77
  'totalConcepts': value['totalConcepts'],
75
78
  'assessedConcepts': value['assessedConcepts'],
79
+ 'conceptIds': value['conceptIds'],
76
80
  'children': (value['children'].map(TaxonomyProgressNodeToJSON)),
77
81
  };
78
82
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instructure/athena-api-client",
3
3
  "private": false,
4
- "version": "2.24.1",
4
+ "version": "2.26.0",
5
5
  "description": "OpenAPI client for the Athena API",
6
6
  "author": "Instructure",
7
7
  "repository": {