@instructure/athena-api-client 2.25.0 → 2.27.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 +1 -0
- package/dist/apis/UserConceptsApi.d.ts +14 -0
- package/dist/apis/UserConceptsApi.js +41 -0
- package/dist/esm/apis/UserConceptsApi.d.ts +14 -0
- package/dist/esm/apis/UserConceptsApi.js +41 -0
- package/dist/esm/models/CreateChatRequest.d.ts +6 -0
- package/dist/esm/models/CreateChatRequest.js +2 -0
- package/dist/models/CreateChatRequest.d.ts +6 -0
- package/dist/models/CreateChatRequest.js +2 -0
- package/package.json +1 -1
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
|
|
@@ -51,6 +51,12 @@ export interface CreateChatRequest {
|
|
|
51
51
|
* @memberof CreateChatRequest
|
|
52
52
|
*/
|
|
53
53
|
initialStrength?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Optional study guide (taxonomy) this chat is scoped to. Persists on `chats.taxonomyId` for any chatType — the existing AI tooling (`getTaxonomy` + `getUserTaxonomyProgress` tool registration, study-guide-scoped system prompt) keys off the row regardless of chatType. The level-up prompt additionally injects the study guide name + description as anchoring context in the prompt body. Caller must be actively enrolled in the supplied taxonomy or the request is rejected with 403, matching the message-stream path's enrollment check.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof CreateChatRequest
|
|
58
|
+
*/
|
|
59
|
+
taxonomyId?: string;
|
|
54
60
|
}
|
|
55
61
|
/**
|
|
56
62
|
* @export
|
|
@@ -38,6 +38,7 @@ export function CreateChatRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
38
38
|
'visibility': json['visibility'] == null ? undefined : json['visibility'],
|
|
39
39
|
'primaryConceptId': json['primaryConceptId'] == null ? undefined : json['primaryConceptId'],
|
|
40
40
|
'initialStrength': json['initialStrength'] == null ? undefined : json['initialStrength'],
|
|
41
|
+
'taxonomyId': json['taxonomyId'] == null ? undefined : json['taxonomyId'],
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
44
|
export function CreateChatRequestToJSON(json) {
|
|
@@ -54,5 +55,6 @@ export function CreateChatRequestToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
54
55
|
'visibility': value['visibility'],
|
|
55
56
|
'primaryConceptId': value['primaryConceptId'],
|
|
56
57
|
'initialStrength': value['initialStrength'],
|
|
58
|
+
'taxonomyId': value['taxonomyId'],
|
|
57
59
|
};
|
|
58
60
|
}
|
|
@@ -51,6 +51,12 @@ export interface CreateChatRequest {
|
|
|
51
51
|
* @memberof CreateChatRequest
|
|
52
52
|
*/
|
|
53
53
|
initialStrength?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Optional study guide (taxonomy) this chat is scoped to. Persists on `chats.taxonomyId` for any chatType — the existing AI tooling (`getTaxonomy` + `getUserTaxonomyProgress` tool registration, study-guide-scoped system prompt) keys off the row regardless of chatType. The level-up prompt additionally injects the study guide name + description as anchoring context in the prompt body. Caller must be actively enrolled in the supplied taxonomy or the request is rejected with 403, matching the message-stream path's enrollment check.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof CreateChatRequest
|
|
58
|
+
*/
|
|
59
|
+
taxonomyId?: string;
|
|
54
60
|
}
|
|
55
61
|
/**
|
|
56
62
|
* @export
|
|
@@ -46,6 +46,7 @@ function CreateChatRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
46
|
'visibility': json['visibility'] == null ? undefined : json['visibility'],
|
|
47
47
|
'primaryConceptId': json['primaryConceptId'] == null ? undefined : json['primaryConceptId'],
|
|
48
48
|
'initialStrength': json['initialStrength'] == null ? undefined : json['initialStrength'],
|
|
49
|
+
'taxonomyId': json['taxonomyId'] == null ? undefined : json['taxonomyId'],
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
52
|
function CreateChatRequestToJSON(json) {
|
|
@@ -62,5 +63,6 @@ function CreateChatRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
62
63
|
'visibility': value['visibility'],
|
|
63
64
|
'primaryConceptId': value['primaryConceptId'],
|
|
64
65
|
'initialStrength': value['initialStrength'],
|
|
66
|
+
'taxonomyId': value['taxonomyId'],
|
|
65
67
|
};
|
|
66
68
|
}
|