@instructure/athena-api-client 3.31.1 → 3.32.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 +2 -0
- package/dist/apis/StudyObjectivesApi.d.ts +2 -2
- package/dist/apis/StudyObjectivesApi.js +2 -2
- package/dist/apis/StudyPlansApi.d.ts +15 -1
- package/dist/apis/StudyPlansApi.js +41 -0
- package/dist/esm/apis/StudyObjectivesApi.d.ts +2 -2
- package/dist/esm/apis/StudyObjectivesApi.js +2 -2
- package/dist/esm/apis/StudyPlansApi.d.ts +15 -1
- package/dist/esm/apis/StudyPlansApi.js +42 -1
- package/dist/esm/models/ChatStudyPlanActivity.d.ts +57 -0
- package/dist/esm/models/ChatStudyPlanActivity.js +60 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/ChatStudyPlanActivity.d.ts +57 -0
- package/dist/models/ChatStudyPlanActivity.js +67 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -144,6 +144,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
144
144
|
*StudyObjectivesApi* | [**listStudyObjectives**](docs/StudyObjectivesApi.md#liststudyobjectives) | **GET** /api/v1/study-objectives | List study objectives for a course or study space
|
|
145
145
|
*StudyObjectivesApi* | [**updateStudyObjective**](docs/StudyObjectivesApi.md#updatestudyobjective) | **PATCH** /api/v1/study-objectives/{studyObjectiveId} | Update a study objective
|
|
146
146
|
*StudyPlansApi* | [**deleteStudyPlan**](docs/StudyPlansApi.md#deletestudyplan) | **DELETE** /api/v1/study-plans/{planId} | Delete a study plan
|
|
147
|
+
*StudyPlansApi* | [**getChatStudyPlanActivity**](docs/StudyPlansApi.md#getchatstudyplanactivity) | **GET** /api/v1/chats/{chatId}/study-plan-activity | Get the study plan activity a chat was launched from
|
|
147
148
|
*StudyPlansApi* | [**getStudyObjectiveStudyPlan**](docs/StudyPlansApi.md#getstudyobjectivestudyplan) | **GET** /api/v1/study-objectives/{studyObjectiveId}/study-plan | Get a study objective\'s plan
|
|
148
149
|
*StudyPlansApi* | [**saveStudyObjectiveStudyPlan**](docs/StudyPlansApi.md#savestudyobjectivestudyplan) | **POST** /api/v1/study-objectives/{studyObjectiveId}/study-plan | Save (or replace) a study objective\'s plan
|
|
149
150
|
*StudyPlansApi* | [**updateStudyPlanActivityCompletion**](docs/StudyPlansApi.md#updatestudyplanactivitycompletion) | **PATCH** /api/v1/study-plan-activities/{activityId} | Mark a plan activity complete or incomplete
|
|
@@ -232,6 +233,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
232
233
|
- [ChatRequestQuizContext](docs/ChatRequestQuizContext.md)
|
|
233
234
|
- [ChatRequestQuizContextAnswerState](docs/ChatRequestQuizContextAnswerState.md)
|
|
234
235
|
- [ChatRequestQuizContextCurrentQuestion](docs/ChatRequestQuizContextCurrentQuestion.md)
|
|
236
|
+
- [ChatStudyPlanActivity](docs/ChatStudyPlanActivity.md)
|
|
235
237
|
- [ConceptAssessmentEntity](docs/ConceptAssessmentEntity.md)
|
|
236
238
|
- [ConceptChange](docs/ConceptChange.md)
|
|
237
239
|
- [CreateAccountRequest](docs/CreateAccountRequest.md)
|
|
@@ -65,12 +65,12 @@ export interface UpdateStudyObjectiveRequest {
|
|
|
65
65
|
*/
|
|
66
66
|
export declare class StudyObjectivesApi extends runtime.BaseAPI {
|
|
67
67
|
/**
|
|
68
|
-
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity
|
|
68
|
+
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity. Linking does not complete the activity: completion is set only through `PATCH /api/v1/study-plan-activities/{activityId}`.
|
|
69
69
|
* Attach a chat resource to a study objective
|
|
70
70
|
*/
|
|
71
71
|
createObjectiveResourceRaw(requestParameters: CreateObjectiveResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ObjectiveResource>>;
|
|
72
72
|
/**
|
|
73
|
-
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity
|
|
73
|
+
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity. Linking does not complete the activity: completion is set only through `PATCH /api/v1/study-plan-activities/{activityId}`.
|
|
74
74
|
* Attach a chat resource to a study objective
|
|
75
75
|
*/
|
|
76
76
|
createObjectiveResource(requestParameters: CreateObjectiveResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectiveResource>;
|
|
@@ -30,7 +30,7 @@ const index_1 = require("../models/index");
|
|
|
30
30
|
*/
|
|
31
31
|
class StudyObjectivesApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
|
-
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity
|
|
33
|
+
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity. Linking does not complete the activity: completion is set only through `PATCH /api/v1/study-plan-activities/{activityId}`.
|
|
34
34
|
* Attach a chat resource to a study objective
|
|
35
35
|
*/
|
|
36
36
|
createObjectiveResourceRaw(requestParameters, initOverrides) {
|
|
@@ -66,7 +66,7 @@ class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity
|
|
69
|
+
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity. Linking does not complete the activity: completion is set only through `PATCH /api/v1/study-plan-activities/{activityId}`.
|
|
70
70
|
* Attach a chat resource to a study objective
|
|
71
71
|
*/
|
|
72
72
|
createObjectiveResource(requestParameters, initOverrides) {
|
|
@@ -10,11 +10,15 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateStudyPlanDto, StudyPlan, StudyPlanActivity, UpdateActivityCompletionDto } from '../models/index';
|
|
13
|
+
import type { ChatStudyPlanActivity, CreateStudyPlanDto, StudyPlan, StudyPlanActivity, UpdateActivityCompletionDto } from '../models/index';
|
|
14
14
|
export interface DeleteStudyPlanRequest {
|
|
15
15
|
xUserId: string;
|
|
16
16
|
planId: string;
|
|
17
17
|
}
|
|
18
|
+
export interface GetChatStudyPlanActivityRequest {
|
|
19
|
+
xUserId: string;
|
|
20
|
+
chatId: string;
|
|
21
|
+
}
|
|
18
22
|
export interface GetStudyObjectiveStudyPlanRequest {
|
|
19
23
|
xUserId: string;
|
|
20
24
|
studyObjectiveId: string;
|
|
@@ -43,6 +47,16 @@ export declare class StudyPlansApi extends runtime.BaseAPI {
|
|
|
43
47
|
* Delete a study plan
|
|
44
48
|
*/
|
|
45
49
|
deleteStudyPlan(requestParameters: DeleteStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Answers, for a chat opened cold from history, whether it was launched from a study plan activity and whether that activity is done. Returns the activity with its position in the plan (`ordinal` of `total`) and the plan\'s study objective. 404 when the chat carries no activity link — including a link severed by a later plan replacement — or when the plan is not the caller\'s.
|
|
52
|
+
* Get the study plan activity a chat was launched from
|
|
53
|
+
*/
|
|
54
|
+
getChatStudyPlanActivityRaw(requestParameters: GetChatStudyPlanActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChatStudyPlanActivity>>;
|
|
55
|
+
/**
|
|
56
|
+
* Answers, for a chat opened cold from history, whether it was launched from a study plan activity and whether that activity is done. Returns the activity with its position in the plan (`ordinal` of `total`) and the plan\'s study objective. 404 when the chat carries no activity link — including a link severed by a later plan replacement — or when the plan is not the caller\'s.
|
|
57
|
+
* Get the study plan activity a chat was launched from
|
|
58
|
+
*/
|
|
59
|
+
getChatStudyPlanActivity(requestParameters: GetChatStudyPlanActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChatStudyPlanActivity>;
|
|
46
60
|
/**
|
|
47
61
|
* Returns the objective\'s saved plan with its activities ordered by `position`, or 404 when the objective has no plan.
|
|
48
62
|
* Get a study objective\'s plan
|
|
@@ -69,6 +69,47 @@ class StudyPlansApi extends runtime.BaseAPI {
|
|
|
69
69
|
yield this.deleteStudyPlanRaw(requestParameters, initOverrides);
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Answers, for a chat opened cold from history, whether it was launched from a study plan activity and whether that activity is done. Returns the activity with its position in the plan (`ordinal` of `total`) and the plan\'s study objective. 404 when the chat carries no activity link — including a link severed by a later plan replacement — or when the plan is not the caller\'s.
|
|
74
|
+
* Get the study plan activity a chat was launched from
|
|
75
|
+
*/
|
|
76
|
+
getChatStudyPlanActivityRaw(requestParameters, initOverrides) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (requestParameters['xUserId'] == null) {
|
|
79
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getChatStudyPlanActivity().');
|
|
80
|
+
}
|
|
81
|
+
if (requestParameters['chatId'] == null) {
|
|
82
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChatStudyPlanActivity().');
|
|
83
|
+
}
|
|
84
|
+
const queryParameters = {};
|
|
85
|
+
const headerParameters = {};
|
|
86
|
+
if (requestParameters['xUserId'] != null) {
|
|
87
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
88
|
+
}
|
|
89
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
90
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
91
|
+
}
|
|
92
|
+
let urlPath = `/api/v1/chats/{chatId}/study-plan-activity`;
|
|
93
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
94
|
+
const response = yield this.request({
|
|
95
|
+
path: urlPath,
|
|
96
|
+
method: 'GET',
|
|
97
|
+
headers: headerParameters,
|
|
98
|
+
query: queryParameters,
|
|
99
|
+
}, initOverrides);
|
|
100
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ChatStudyPlanActivityFromJSON)(jsonValue));
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Answers, for a chat opened cold from history, whether it was launched from a study plan activity and whether that activity is done. Returns the activity with its position in the plan (`ordinal` of `total`) and the plan\'s study objective. 404 when the chat carries no activity link — including a link severed by a later plan replacement — or when the plan is not the caller\'s.
|
|
105
|
+
* Get the study plan activity a chat was launched from
|
|
106
|
+
*/
|
|
107
|
+
getChatStudyPlanActivity(requestParameters, initOverrides) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
const response = yield this.getChatStudyPlanActivityRaw(requestParameters, initOverrides);
|
|
110
|
+
return yield response.value();
|
|
111
|
+
});
|
|
112
|
+
}
|
|
72
113
|
/**
|
|
73
114
|
* Returns the objective\'s saved plan with its activities ordered by `position`, or 404 when the objective has no plan.
|
|
74
115
|
* Get a study objective\'s plan
|
|
@@ -65,12 +65,12 @@ export interface UpdateStudyObjectiveRequest {
|
|
|
65
65
|
*/
|
|
66
66
|
export declare class StudyObjectivesApi extends runtime.BaseAPI {
|
|
67
67
|
/**
|
|
68
|
-
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity
|
|
68
|
+
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity. Linking does not complete the activity: completion is set only through `PATCH /api/v1/study-plan-activities/{activityId}`.
|
|
69
69
|
* Attach a chat resource to a study objective
|
|
70
70
|
*/
|
|
71
71
|
createObjectiveResourceRaw(requestParameters: CreateObjectiveResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ObjectiveResource>>;
|
|
72
72
|
/**
|
|
73
|
-
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity
|
|
73
|
+
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity. Linking does not complete the activity: completion is set only through `PATCH /api/v1/study-plan-activities/{activityId}`.
|
|
74
74
|
* Attach a chat resource to a study objective
|
|
75
75
|
*/
|
|
76
76
|
createObjectiveResource(requestParameters: CreateObjectiveResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectiveResource>;
|
|
@@ -27,7 +27,7 @@ import { CreateObjectiveResourceDtoToJSON, CreateStudyObjectiveDtoToJSON, Object
|
|
|
27
27
|
*/
|
|
28
28
|
export class StudyObjectivesApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity
|
|
30
|
+
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity. Linking does not complete the activity: completion is set only through `PATCH /api/v1/study-plan-activities/{activityId}`.
|
|
31
31
|
* Attach a chat resource to a study objective
|
|
32
32
|
*/
|
|
33
33
|
createObjectiveResourceRaw(requestParameters, initOverrides) {
|
|
@@ -63,7 +63,7 @@ export class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
-
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity
|
|
66
|
+
* Records that a chat (regular chat, quiz, flashcard, or plan activity) is being used in service of a study objective. Pass `studyPlanActivityId` to record which study plan activity the chat was started from — required for `plan-activity` resources — which grounds the chat in that activity. Linking does not complete the activity: completion is set only through `PATCH /api/v1/study-plan-activities/{activityId}`.
|
|
67
67
|
* Attach a chat resource to a study objective
|
|
68
68
|
*/
|
|
69
69
|
createObjectiveResource(requestParameters, initOverrides) {
|
|
@@ -10,11 +10,15 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateStudyPlanDto, StudyPlan, StudyPlanActivity, UpdateActivityCompletionDto } from '../models/index';
|
|
13
|
+
import type { ChatStudyPlanActivity, CreateStudyPlanDto, StudyPlan, StudyPlanActivity, UpdateActivityCompletionDto } from '../models/index';
|
|
14
14
|
export interface DeleteStudyPlanRequest {
|
|
15
15
|
xUserId: string;
|
|
16
16
|
planId: string;
|
|
17
17
|
}
|
|
18
|
+
export interface GetChatStudyPlanActivityRequest {
|
|
19
|
+
xUserId: string;
|
|
20
|
+
chatId: string;
|
|
21
|
+
}
|
|
18
22
|
export interface GetStudyObjectiveStudyPlanRequest {
|
|
19
23
|
xUserId: string;
|
|
20
24
|
studyObjectiveId: string;
|
|
@@ -43,6 +47,16 @@ export declare class StudyPlansApi extends runtime.BaseAPI {
|
|
|
43
47
|
* Delete a study plan
|
|
44
48
|
*/
|
|
45
49
|
deleteStudyPlan(requestParameters: DeleteStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Answers, for a chat opened cold from history, whether it was launched from a study plan activity and whether that activity is done. Returns the activity with its position in the plan (`ordinal` of `total`) and the plan\'s study objective. 404 when the chat carries no activity link — including a link severed by a later plan replacement — or when the plan is not the caller\'s.
|
|
52
|
+
* Get the study plan activity a chat was launched from
|
|
53
|
+
*/
|
|
54
|
+
getChatStudyPlanActivityRaw(requestParameters: GetChatStudyPlanActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChatStudyPlanActivity>>;
|
|
55
|
+
/**
|
|
56
|
+
* Answers, for a chat opened cold from history, whether it was launched from a study plan activity and whether that activity is done. Returns the activity with its position in the plan (`ordinal` of `total`) and the plan\'s study objective. 404 when the chat carries no activity link — including a link severed by a later plan replacement — or when the plan is not the caller\'s.
|
|
57
|
+
* Get the study plan activity a chat was launched from
|
|
58
|
+
*/
|
|
59
|
+
getChatStudyPlanActivity(requestParameters: GetChatStudyPlanActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChatStudyPlanActivity>;
|
|
46
60
|
/**
|
|
47
61
|
* Returns the objective\'s saved plan with its activities ordered by `position`, or 404 when the objective has no plan.
|
|
48
62
|
* Get a study objective\'s plan
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { CreateStudyPlanDtoToJSON, StudyPlanFromJSON, StudyPlanActivityFromJSON, UpdateActivityCompletionDtoToJSON, } from '../models/index';
|
|
24
|
+
import { ChatStudyPlanActivityFromJSON, CreateStudyPlanDtoToJSON, StudyPlanFromJSON, StudyPlanActivityFromJSON, UpdateActivityCompletionDtoToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -66,6 +66,47 @@ export class StudyPlansApi extends runtime.BaseAPI {
|
|
|
66
66
|
yield this.deleteStudyPlanRaw(requestParameters, initOverrides);
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Answers, for a chat opened cold from history, whether it was launched from a study plan activity and whether that activity is done. Returns the activity with its position in the plan (`ordinal` of `total`) and the plan\'s study objective. 404 when the chat carries no activity link — including a link severed by a later plan replacement — or when the plan is not the caller\'s.
|
|
71
|
+
* Get the study plan activity a chat was launched from
|
|
72
|
+
*/
|
|
73
|
+
getChatStudyPlanActivityRaw(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
if (requestParameters['xUserId'] == null) {
|
|
76
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getChatStudyPlanActivity().');
|
|
77
|
+
}
|
|
78
|
+
if (requestParameters['chatId'] == null) {
|
|
79
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChatStudyPlanActivity().');
|
|
80
|
+
}
|
|
81
|
+
const queryParameters = {};
|
|
82
|
+
const headerParameters = {};
|
|
83
|
+
if (requestParameters['xUserId'] != null) {
|
|
84
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
85
|
+
}
|
|
86
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
87
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
88
|
+
}
|
|
89
|
+
let urlPath = `/api/v1/chats/{chatId}/study-plan-activity`;
|
|
90
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
91
|
+
const response = yield this.request({
|
|
92
|
+
path: urlPath,
|
|
93
|
+
method: 'GET',
|
|
94
|
+
headers: headerParameters,
|
|
95
|
+
query: queryParameters,
|
|
96
|
+
}, initOverrides);
|
|
97
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChatStudyPlanActivityFromJSON(jsonValue));
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Answers, for a chat opened cold from history, whether it was launched from a study plan activity and whether that activity is done. Returns the activity with its position in the plan (`ordinal` of `total`) and the plan\'s study objective. 404 when the chat carries no activity link — including a link severed by a later plan replacement — or when the plan is not the caller\'s.
|
|
102
|
+
* Get the study plan activity a chat was launched from
|
|
103
|
+
*/
|
|
104
|
+
getChatStudyPlanActivity(requestParameters, initOverrides) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const response = yield this.getChatStudyPlanActivityRaw(requestParameters, initOverrides);
|
|
107
|
+
return yield response.value();
|
|
108
|
+
});
|
|
109
|
+
}
|
|
69
110
|
/**
|
|
70
111
|
* Returns the objective\'s saved plan with its activities ordered by `position`, or 404 when the objective has no plan.
|
|
71
112
|
* Get a study objective\'s plan
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { StudyPlanActivity } from './StudyPlanActivity';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ChatStudyPlanActivity
|
|
17
|
+
*/
|
|
18
|
+
export interface ChatStudyPlanActivity {
|
|
19
|
+
/**
|
|
20
|
+
* The activity itself. Its `chatId` is the activity's most recent linked chat — the resume target — which is not necessarily the chat this was looked up by.
|
|
21
|
+
* @type {StudyPlanActivity}
|
|
22
|
+
* @memberof ChatStudyPlanActivity
|
|
23
|
+
*/
|
|
24
|
+
activity: StudyPlanActivity;
|
|
25
|
+
/**
|
|
26
|
+
* 1-based position of the activity among the plan's position-ordered activities.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof ChatStudyPlanActivity
|
|
29
|
+
*/
|
|
30
|
+
ordinal: number;
|
|
31
|
+
/**
|
|
32
|
+
* How many activities the plan contains.
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof ChatStudyPlanActivity
|
|
35
|
+
*/
|
|
36
|
+
total: number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ChatStudyPlanActivity
|
|
41
|
+
*/
|
|
42
|
+
studyPlanId: string;
|
|
43
|
+
/**
|
|
44
|
+
* The study objective the plan belongs to.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ChatStudyPlanActivity
|
|
47
|
+
*/
|
|
48
|
+
studyObjectiveId: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the ChatStudyPlanActivity interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfChatStudyPlanActivity(value: object): value is ChatStudyPlanActivity;
|
|
54
|
+
export declare function ChatStudyPlanActivityFromJSON(json: any): ChatStudyPlanActivity;
|
|
55
|
+
export declare function ChatStudyPlanActivityFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatStudyPlanActivity;
|
|
56
|
+
export declare function ChatStudyPlanActivityToJSON(json: any): ChatStudyPlanActivity;
|
|
57
|
+
export declare function ChatStudyPlanActivityToJSONTyped(value?: ChatStudyPlanActivity | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { StudyPlanActivityFromJSON, StudyPlanActivityToJSON, } from './StudyPlanActivity';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ChatStudyPlanActivity interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfChatStudyPlanActivity(value) {
|
|
19
|
+
if (!('activity' in value) || value['activity'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('ordinal' in value) || value['ordinal'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('studyPlanId' in value) || value['studyPlanId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('studyObjectiveId' in value) || value['studyObjectiveId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
export function ChatStudyPlanActivityFromJSON(json) {
|
|
32
|
+
return ChatStudyPlanActivityFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function ChatStudyPlanActivityFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'activity': StudyPlanActivityFromJSON(json['activity']),
|
|
40
|
+
'ordinal': json['ordinal'],
|
|
41
|
+
'total': json['total'],
|
|
42
|
+
'studyPlanId': json['studyPlanId'],
|
|
43
|
+
'studyObjectiveId': json['studyObjectiveId'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function ChatStudyPlanActivityToJSON(json) {
|
|
47
|
+
return ChatStudyPlanActivityToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
export function ChatStudyPlanActivityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'activity': StudyPlanActivityToJSON(value['activity']),
|
|
55
|
+
'ordinal': value['ordinal'],
|
|
56
|
+
'total': value['total'],
|
|
57
|
+
'studyPlanId': value['studyPlanId'],
|
|
58
|
+
'studyObjectiveId': value['studyObjectiveId'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -47,6 +47,7 @@ export * from './ChatRequestMessageMetadata';
|
|
|
47
47
|
export * from './ChatRequestQuizContext';
|
|
48
48
|
export * from './ChatRequestQuizContextAnswerState';
|
|
49
49
|
export * from './ChatRequestQuizContextCurrentQuestion';
|
|
50
|
+
export * from './ChatStudyPlanActivity';
|
|
50
51
|
export * from './ConceptAssessmentEntity';
|
|
51
52
|
export * from './ConceptChange';
|
|
52
53
|
export * from './CreateAccountRequest';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -49,6 +49,7 @@ export * from './ChatRequestMessageMetadata';
|
|
|
49
49
|
export * from './ChatRequestQuizContext';
|
|
50
50
|
export * from './ChatRequestQuizContextAnswerState';
|
|
51
51
|
export * from './ChatRequestQuizContextCurrentQuestion';
|
|
52
|
+
export * from './ChatStudyPlanActivity';
|
|
52
53
|
export * from './ConceptAssessmentEntity';
|
|
53
54
|
export * from './ConceptChange';
|
|
54
55
|
export * from './CreateAccountRequest';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { StudyPlanActivity } from './StudyPlanActivity';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ChatStudyPlanActivity
|
|
17
|
+
*/
|
|
18
|
+
export interface ChatStudyPlanActivity {
|
|
19
|
+
/**
|
|
20
|
+
* The activity itself. Its `chatId` is the activity's most recent linked chat — the resume target — which is not necessarily the chat this was looked up by.
|
|
21
|
+
* @type {StudyPlanActivity}
|
|
22
|
+
* @memberof ChatStudyPlanActivity
|
|
23
|
+
*/
|
|
24
|
+
activity: StudyPlanActivity;
|
|
25
|
+
/**
|
|
26
|
+
* 1-based position of the activity among the plan's position-ordered activities.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof ChatStudyPlanActivity
|
|
29
|
+
*/
|
|
30
|
+
ordinal: number;
|
|
31
|
+
/**
|
|
32
|
+
* How many activities the plan contains.
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof ChatStudyPlanActivity
|
|
35
|
+
*/
|
|
36
|
+
total: number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ChatStudyPlanActivity
|
|
41
|
+
*/
|
|
42
|
+
studyPlanId: string;
|
|
43
|
+
/**
|
|
44
|
+
* The study objective the plan belongs to.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ChatStudyPlanActivity
|
|
47
|
+
*/
|
|
48
|
+
studyObjectiveId: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the ChatStudyPlanActivity interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfChatStudyPlanActivity(value: object): value is ChatStudyPlanActivity;
|
|
54
|
+
export declare function ChatStudyPlanActivityFromJSON(json: any): ChatStudyPlanActivity;
|
|
55
|
+
export declare function ChatStudyPlanActivityFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatStudyPlanActivity;
|
|
56
|
+
export declare function ChatStudyPlanActivityToJSON(json: any): ChatStudyPlanActivity;
|
|
57
|
+
export declare function ChatStudyPlanActivityToJSONTyped(value?: ChatStudyPlanActivity | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfChatStudyPlanActivity = instanceOfChatStudyPlanActivity;
|
|
17
|
+
exports.ChatStudyPlanActivityFromJSON = ChatStudyPlanActivityFromJSON;
|
|
18
|
+
exports.ChatStudyPlanActivityFromJSONTyped = ChatStudyPlanActivityFromJSONTyped;
|
|
19
|
+
exports.ChatStudyPlanActivityToJSON = ChatStudyPlanActivityToJSON;
|
|
20
|
+
exports.ChatStudyPlanActivityToJSONTyped = ChatStudyPlanActivityToJSONTyped;
|
|
21
|
+
const StudyPlanActivity_1 = require("./StudyPlanActivity");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ChatStudyPlanActivity interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfChatStudyPlanActivity(value) {
|
|
26
|
+
if (!('activity' in value) || value['activity'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('ordinal' in value) || value['ordinal'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('studyPlanId' in value) || value['studyPlanId'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('studyObjectiveId' in value) || value['studyObjectiveId'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function ChatStudyPlanActivityFromJSON(json) {
|
|
39
|
+
return ChatStudyPlanActivityFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function ChatStudyPlanActivityFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'activity': (0, StudyPlanActivity_1.StudyPlanActivityFromJSON)(json['activity']),
|
|
47
|
+
'ordinal': json['ordinal'],
|
|
48
|
+
'total': json['total'],
|
|
49
|
+
'studyPlanId': json['studyPlanId'],
|
|
50
|
+
'studyObjectiveId': json['studyObjectiveId'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function ChatStudyPlanActivityToJSON(json) {
|
|
54
|
+
return ChatStudyPlanActivityToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function ChatStudyPlanActivityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'activity': (0, StudyPlanActivity_1.StudyPlanActivityToJSON)(value['activity']),
|
|
62
|
+
'ordinal': value['ordinal'],
|
|
63
|
+
'total': value['total'],
|
|
64
|
+
'studyPlanId': value['studyPlanId'],
|
|
65
|
+
'studyObjectiveId': value['studyObjectiveId'],
|
|
66
|
+
};
|
|
67
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export * from './ChatRequestMessageMetadata';
|
|
|
47
47
|
export * from './ChatRequestQuizContext';
|
|
48
48
|
export * from './ChatRequestQuizContextAnswerState';
|
|
49
49
|
export * from './ChatRequestQuizContextCurrentQuestion';
|
|
50
|
+
export * from './ChatStudyPlanActivity';
|
|
50
51
|
export * from './ConceptAssessmentEntity';
|
|
51
52
|
export * from './ConceptChange';
|
|
52
53
|
export * from './CreateAccountRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -65,6 +65,7 @@ __exportStar(require("./ChatRequestMessageMetadata"), exports);
|
|
|
65
65
|
__exportStar(require("./ChatRequestQuizContext"), exports);
|
|
66
66
|
__exportStar(require("./ChatRequestQuizContextAnswerState"), exports);
|
|
67
67
|
__exportStar(require("./ChatRequestQuizContextCurrentQuestion"), exports);
|
|
68
|
+
__exportStar(require("./ChatStudyPlanActivity"), exports);
|
|
68
69
|
__exportStar(require("./ConceptAssessmentEntity"), exports);
|
|
69
70
|
__exportStar(require("./ConceptChange"), exports);
|
|
70
71
|
__exportStar(require("./CreateAccountRequest"), exports);
|