glitch-javascript-sdk 2.5.7 → 2.5.8
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/dist/cjs/index.js +28 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Education.d.ts +9 -0
- package/dist/esm/index.js +28 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/package.json +1 -1
- package/src/api/Education.ts +30 -0
- package/src/routes/EducationRoute.ts +1 -0
|
@@ -30,11 +30,20 @@ declare class Education {
|
|
|
30
30
|
static submitQuiz<T>(uuid: string, answers: object): AxiosPromise<Response<T>>;
|
|
31
31
|
static myQuizAttempts<T>(uuid: string): AxiosPromise<Response<T>>;
|
|
32
32
|
static viewQuizAttempt<T>(uuid: string): AxiosPromise<Response<T>>;
|
|
33
|
+
static createQuiz<T>(data: object): AxiosPromise<Response<T>>;
|
|
34
|
+
static updateQuiz<T>(uuid: string, data: object): AxiosPromise<Response<T>>;
|
|
35
|
+
static deleteQuiz<T>(uuid: string): AxiosPromise<Response<T>>;
|
|
33
36
|
static listQuizQuestions<T>(quiz_id: string): AxiosPromise<Response<T>>;
|
|
34
37
|
static createQuizQuestion<T>(quiz_id: string, data: object): AxiosPromise<Response<T>>;
|
|
35
38
|
static reorderQuizQuestions<T>(quiz_id: string, question_ids: string[]): AxiosPromise<Response<T>>;
|
|
36
39
|
static listQuizOptions<T>(question_id: string): AxiosPromise<Response<T>>;
|
|
37
40
|
static createQuizOption<T>(question_id: string, data: object): AxiosPromise<Response<T>>;
|
|
41
|
+
static viewQuizQuestion<T>(uuid: string): AxiosPromise<Response<T>>;
|
|
42
|
+
static updateQuizQuestion<T>(uuid: string, data: object): AxiosPromise<Response<T>>;
|
|
43
|
+
static deleteQuizQuestion<T>(uuid: string): AxiosPromise<Response<T>>;
|
|
44
|
+
static viewQuizOption<T>(uuid: string): AxiosPromise<Response<T>>;
|
|
45
|
+
static updateQuizOption<T>(uuid: string, data: object): AxiosPromise<Response<T>>;
|
|
46
|
+
static deleteQuizOption<T>(uuid: string): AxiosPromise<Response<T>>;
|
|
38
47
|
static syncProgress<T>(data: object): AxiosPromise<Response<T>>;
|
|
39
48
|
static getMyProgressByContent<T>(content_id: string): AxiosPromise<Response<T>>;
|
|
40
49
|
static listRegistrations<T>(params?: object): AxiosPromise<Response<T>>;
|
package/dist/esm/index.js
CHANGED
|
@@ -16685,6 +16685,15 @@ var Education = /** @class */ (function () {
|
|
|
16685
16685
|
Education.viewQuizAttempt = function (uuid) {
|
|
16686
16686
|
return Requests.processRoute(EducationRoute.routes.viewQuizAttempt, undefined, { uuid: uuid });
|
|
16687
16687
|
};
|
|
16688
|
+
Education.createQuiz = function (data) {
|
|
16689
|
+
return Requests.processRoute(EducationRoute.routes.createQuiz, data);
|
|
16690
|
+
};
|
|
16691
|
+
Education.updateQuiz = function (uuid, data) {
|
|
16692
|
+
return Requests.processRoute(EducationRoute.routes.updateQuiz, data, { uuid: uuid });
|
|
16693
|
+
};
|
|
16694
|
+
Education.deleteQuiz = function (uuid) {
|
|
16695
|
+
return Requests.processRoute(EducationRoute.routes.deleteQuiz, undefined, { uuid: uuid });
|
|
16696
|
+
};
|
|
16688
16697
|
// --- 6. QUIZ QUESTIONS & OPTIONS ---
|
|
16689
16698
|
Education.listQuizQuestions = function (quiz_id) {
|
|
16690
16699
|
return Requests.processRoute(EducationRoute.routes.listQuizQuestions, undefined, { quiz_id: quiz_id });
|
|
@@ -16701,6 +16710,25 @@ var Education = /** @class */ (function () {
|
|
|
16701
16710
|
Education.createQuizOption = function (question_id, data) {
|
|
16702
16711
|
return Requests.processRoute(EducationRoute.routes.createQuizOption, data, { question_id: question_id });
|
|
16703
16712
|
};
|
|
16713
|
+
Education.viewQuizQuestion = function (uuid) {
|
|
16714
|
+
return Requests.processRoute(EducationRoute.routes.viewQuizQuestion, undefined, { uuid: uuid });
|
|
16715
|
+
};
|
|
16716
|
+
Education.updateQuizQuestion = function (uuid, data) {
|
|
16717
|
+
return Requests.processRoute(EducationRoute.routes.updateQuizQuestion, data, { uuid: uuid });
|
|
16718
|
+
};
|
|
16719
|
+
Education.deleteQuizQuestion = function (uuid) {
|
|
16720
|
+
return Requests.processRoute(EducationRoute.routes.deleteQuizQuestion, undefined, { uuid: uuid });
|
|
16721
|
+
};
|
|
16722
|
+
// --- QUIZ OPTIONS (CRUD) ---
|
|
16723
|
+
Education.viewQuizOption = function (uuid) {
|
|
16724
|
+
return Requests.processRoute(EducationRoute.routes.viewQuizOption, undefined, { uuid: uuid });
|
|
16725
|
+
};
|
|
16726
|
+
Education.updateQuizOption = function (uuid, data) {
|
|
16727
|
+
return Requests.processRoute(EducationRoute.routes.updateQuizOption, data, { uuid: uuid });
|
|
16728
|
+
};
|
|
16729
|
+
Education.deleteQuizOption = function (uuid) {
|
|
16730
|
+
return Requests.processRoute(EducationRoute.routes.deleteQuizOption, undefined, { uuid: uuid });
|
|
16731
|
+
};
|
|
16704
16732
|
// --- 7. PROGRESS & REGISTRATIONS ---
|
|
16705
16733
|
Education.syncProgress = function (data) {
|
|
16706
16734
|
return Requests.processRoute(EducationRoute.routes.syncProgress, data);
|