glitch-javascript-sdk 2.5.6 → 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 +35 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Education.d.ts +14 -0
- package/dist/esm/index.js +35 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +14 -0
- package/package.json +1 -1
- package/src/api/Education.ts +38 -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>>;
|
|
@@ -46,6 +55,11 @@ declare class Education {
|
|
|
46
55
|
static getAdoptionReport<T>(): AxiosPromise<Response<T>>;
|
|
47
56
|
static getQuestionPerformanceReport<T>(params?: object): AxiosPromise<Response<T>>;
|
|
48
57
|
static getRetentionReport<T>(): AxiosPromise<Response<T>>;
|
|
58
|
+
/**
|
|
59
|
+
* List raw engagement logs.
|
|
60
|
+
* @param params Filter by user_id, content_id, or is_paid
|
|
61
|
+
*/
|
|
62
|
+
static listViews<T>(params?: object): AxiosPromise<Response<T>>;
|
|
49
63
|
static myBadges<T>(): AxiosPromise<Response<T>>;
|
|
50
64
|
static awardBadge<T>(data: object): AxiosPromise<Response<T>>;
|
|
51
65
|
static myCertificates<T>(): 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);
|
|
@@ -16736,6 +16764,13 @@ var Education = /** @class */ (function () {
|
|
|
16736
16764
|
Education.getRetentionReport = function () {
|
|
16737
16765
|
return Requests.processRoute(EducationRoute.routes.reportRetention);
|
|
16738
16766
|
};
|
|
16767
|
+
/**
|
|
16768
|
+
* List raw engagement logs.
|
|
16769
|
+
* @param params Filter by user_id, content_id, or is_paid
|
|
16770
|
+
*/
|
|
16771
|
+
Education.listViews = function (params) {
|
|
16772
|
+
return Requests.processRoute(EducationRoute.routes.listViews, undefined, undefined, params);
|
|
16773
|
+
};
|
|
16739
16774
|
// --- 9. ACHIEVEMENTS (BADGES & CERTIFICATES) ---
|
|
16740
16775
|
Education.myBadges = function () {
|
|
16741
16776
|
return Requests.processRoute(EducationRoute.routes.myBadges);
|