nazar-salary 3.5.5 → 3.5.7
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/index.d.ts +11 -9
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -864,8 +864,8 @@ declare module 'nazar-salary' {
|
|
|
864
864
|
cover_image_url: string | null;
|
|
865
865
|
/** percent 0–100, null until graded */
|
|
866
866
|
totalGrade: number | null;
|
|
867
|
-
/** A1…C2, shown on the certificate check page;
|
|
868
|
-
languageLevel: AkcentLanguageLevel | string;
|
|
867
|
+
/** A1…C2, shown on the certificate check page; null until set (the page shows no level) */
|
|
868
|
+
languageLevel: AkcentLanguageLevel | string | null;
|
|
869
869
|
/** lessons with a teacher the student had; 12 until set */
|
|
870
870
|
lessonsDone: number;
|
|
871
871
|
/** lessons in the course; 12 until set */
|
|
@@ -878,7 +878,7 @@ declare module 'nazar-salary' {
|
|
|
878
878
|
|
|
879
879
|
export type AkcentLanguageLevel = 'A1' | 'A2' | 'B1' | 'B2' | 'C1' | 'C2';
|
|
880
880
|
|
|
881
|
-
/** Send only what changes; null puts the default back (
|
|
881
|
+
/** Send only what changes; null puts the default back (no level, 12, 12, no teacher). */
|
|
882
882
|
export interface UpdateAkcentCourseData {
|
|
883
883
|
languageLevel?: AkcentLanguageLevel | null;
|
|
884
884
|
/** 0–1000, not more than lessonsTotal */
|
|
@@ -892,7 +892,7 @@ declare module 'nazar-salary' {
|
|
|
892
892
|
export interface UpdateAkcentCourseResponse {
|
|
893
893
|
userId: string;
|
|
894
894
|
courseId: number;
|
|
895
|
-
languageLevel: AkcentLanguageLevel | string;
|
|
895
|
+
languageLevel: AkcentLanguageLevel | string | null;
|
|
896
896
|
lessonsDone: number;
|
|
897
897
|
lessonsTotal: number;
|
|
898
898
|
teacher_full_name: string | null;
|
|
@@ -921,8 +921,9 @@ declare module 'nazar-salary' {
|
|
|
921
921
|
/** given_date, epoch ms */
|
|
922
922
|
issuedAt: number;
|
|
923
923
|
course_name: string;
|
|
924
|
-
|
|
925
|
-
|
|
924
|
+
/** null when no teacher was given */
|
|
925
|
+
teacher_full_name: string | null;
|
|
926
|
+
languageLevel: AkcentLanguageLevel | string | null;
|
|
926
927
|
lessonsDone: number;
|
|
927
928
|
lessonsTotal: number;
|
|
928
929
|
totalGrade: number;
|
|
@@ -949,9 +950,10 @@ declare module 'nazar-salary' {
|
|
|
949
950
|
export interface CreateOfflineCertificateData {
|
|
950
951
|
/** up to 255 characters */
|
|
951
952
|
course_name: string;
|
|
952
|
-
/** up to 201 characters */
|
|
953
|
-
teacher_full_name
|
|
954
|
-
|
|
953
|
+
/** optional, up to 201 characters; without it the check page shows the certificate's type and the PDF has no teacher line */
|
|
954
|
+
teacher_full_name?: string | null;
|
|
955
|
+
/** optional; without it the check page and the PDF show no level */
|
|
956
|
+
languageLevel?: AkcentLanguageLevel | null;
|
|
955
957
|
/** 0–1000, not more than lessonsTotal */
|
|
956
958
|
lessonsDone: number;
|
|
957
959
|
/** 1–1000 */
|
package/index.js
CHANGED
|
@@ -784,7 +784,7 @@ class SalaryAPI {
|
|
|
784
784
|
* Give an Akcent certificate for an offline course (requireAuth: admin or owner manager)
|
|
785
785
|
* Same student, course_name and day again updates the certificate given before.
|
|
786
786
|
* @param {number} studentId - Student ID
|
|
787
|
-
* @param {object} data - { course_name, teacher_full_name
|
|
787
|
+
* @param {object} data - { course_name, teacher_full_name?, languageLevel?, lessonsDone, lessonsTotal, given_date?, totalGrade? }
|
|
788
788
|
* @returns {Promise<CreateOfflineCertificateResponse>}
|
|
789
789
|
*/
|
|
790
790
|
async createStudentOfflineCertificate(studentId, data) {
|