@brighterly/lib-core-types 0.9.4 → 0.10.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/dist/date/enums.d.ts +2 -1
- package/dist/date/enums.js +1 -0
- package/dist/tutor/enums.d.ts +11 -0
- package/dist/tutor/enums.js +13 -0
- package/dist/tutor/interfaces.d.ts +2 -0
- package/dist/tutor-policy/enums.d.ts +18 -0
- package/dist/tutor-policy/enums.js +19 -0
- package/dist/tutor-policy/interfaces.d.ts +39 -0
- package/dist/tutor-policy/interfaces.js +1 -0
- package/dist/tutor-policy/types.d.ts +1 -0
- package/dist/tutor-policy/types.js +1 -0
- package/package.json +11 -1
package/dist/date/enums.d.ts
CHANGED
package/dist/date/enums.js
CHANGED
package/dist/tutor/enums.d.ts
CHANGED
|
@@ -33,3 +33,14 @@ export declare enum PaidLabel {
|
|
|
33
33
|
NoLabel = "NO_LABEL",
|
|
34
34
|
NoAssign = "NO_ASSIGN"
|
|
35
35
|
}
|
|
36
|
+
export declare enum TutorCategoryType {
|
|
37
|
+
PaidMath = "PAID_MATH",
|
|
38
|
+
PaidEla = "PAID_ELA",
|
|
39
|
+
DemoMath = "DEMO_MATH",
|
|
40
|
+
DemoEla = "DEMO_ELA"
|
|
41
|
+
}
|
|
42
|
+
export declare enum TutorSlotType {
|
|
43
|
+
DemoPriority = "DEMO_PRIORITY",
|
|
44
|
+
DemoCatchUp = "DEMO_CATCH_UP",
|
|
45
|
+
Paid = "PAID"
|
|
46
|
+
}
|
package/dist/tutor/enums.js
CHANGED
|
@@ -39,3 +39,16 @@ export var PaidLabel;
|
|
|
39
39
|
PaidLabel["NoLabel"] = "NO_LABEL";
|
|
40
40
|
PaidLabel["NoAssign"] = "NO_ASSIGN";
|
|
41
41
|
})(PaidLabel || (PaidLabel = {}));
|
|
42
|
+
export var TutorCategoryType;
|
|
43
|
+
(function (TutorCategoryType) {
|
|
44
|
+
TutorCategoryType["PaidMath"] = "PAID_MATH";
|
|
45
|
+
TutorCategoryType["PaidEla"] = "PAID_ELA";
|
|
46
|
+
TutorCategoryType["DemoMath"] = "DEMO_MATH";
|
|
47
|
+
TutorCategoryType["DemoEla"] = "DEMO_ELA";
|
|
48
|
+
})(TutorCategoryType || (TutorCategoryType = {}));
|
|
49
|
+
export var TutorSlotType;
|
|
50
|
+
(function (TutorSlotType) {
|
|
51
|
+
TutorSlotType["DemoPriority"] = "DEMO_PRIORITY";
|
|
52
|
+
TutorSlotType["DemoCatchUp"] = "DEMO_CATCH_UP";
|
|
53
|
+
TutorSlotType["Paid"] = "PAID";
|
|
54
|
+
})(TutorSlotType || (TutorSlotType = {}));
|
|
@@ -8,6 +8,7 @@ import type { TopicsByGrade } from './types';
|
|
|
8
8
|
import type { TutorKanbanStage } from "../tutor-kanban/enums";
|
|
9
9
|
import type { KanbanAgent, KanbanTutorStageDetails } from "../tutor-kanban/interfaces";
|
|
10
10
|
import type { PaidLabel } from "./enums";
|
|
11
|
+
import type { TutorPolicy } from "../tutor-policy/interfaces";
|
|
11
12
|
export interface Tutor {
|
|
12
13
|
id: number;
|
|
13
14
|
avatar_url: string | null;
|
|
@@ -75,6 +76,7 @@ export interface Tutor {
|
|
|
75
76
|
kanban_priority: number | null;
|
|
76
77
|
paid_label: PaidLabel | null;
|
|
77
78
|
demo_label: string | null;
|
|
79
|
+
payment_policies: TutorPolicy;
|
|
78
80
|
}
|
|
79
81
|
export interface CoverTopic {
|
|
80
82
|
covered_topics: string[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum TutorReasonLessonPolicy {
|
|
2
|
+
CancelAdmin = "CANCEL_ADMIN",
|
|
3
|
+
CancelBadAdmin = "CANCEL_BAD_ADMIN",
|
|
4
|
+
CancelBadCustomer = "CANCEL_BAD_CUSTOMER",
|
|
5
|
+
CancelBadTutor = "CANCEL_BAD_TUTOR",
|
|
6
|
+
CancelCustomer = "CANCEL_CUSTOMER",
|
|
7
|
+
CancelTutor = "CANCEL_TUTOR",
|
|
8
|
+
Completed = "COMPLETED",
|
|
9
|
+
NoShowAdmin = "NO_SHOW_ADMIN",
|
|
10
|
+
NoShowCustomer = "NO_SHOW_CUSTOMER",
|
|
11
|
+
NoShowTutor = "NO_SHOW_TUTOR",
|
|
12
|
+
RescheduleAdmin = "RESCHEDULE_ADMIN",
|
|
13
|
+
RescheduleBadAdmin = "RESCHEDULE_BAD_ADMIN",
|
|
14
|
+
RescheduleBadCustomer = "RESCHEDULE_BAD_CUSTOMER",
|
|
15
|
+
RescheduleBadTutor = "RESCHEDULE_BAD_TUTOR",
|
|
16
|
+
RescheduleCustomer = "RESCHEDULE_CUSTOMER",
|
|
17
|
+
RescheduleTutor = "RESCHEDULE_TUTOR"
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var TutorReasonLessonPolicy;
|
|
2
|
+
(function (TutorReasonLessonPolicy) {
|
|
3
|
+
TutorReasonLessonPolicy["CancelAdmin"] = "CANCEL_ADMIN";
|
|
4
|
+
TutorReasonLessonPolicy["CancelBadAdmin"] = "CANCEL_BAD_ADMIN";
|
|
5
|
+
TutorReasonLessonPolicy["CancelBadCustomer"] = "CANCEL_BAD_CUSTOMER";
|
|
6
|
+
TutorReasonLessonPolicy["CancelBadTutor"] = "CANCEL_BAD_TUTOR";
|
|
7
|
+
TutorReasonLessonPolicy["CancelCustomer"] = "CANCEL_CUSTOMER";
|
|
8
|
+
TutorReasonLessonPolicy["CancelTutor"] = "CANCEL_TUTOR";
|
|
9
|
+
TutorReasonLessonPolicy["Completed"] = "COMPLETED";
|
|
10
|
+
TutorReasonLessonPolicy["NoShowAdmin"] = "NO_SHOW_ADMIN";
|
|
11
|
+
TutorReasonLessonPolicy["NoShowCustomer"] = "NO_SHOW_CUSTOMER";
|
|
12
|
+
TutorReasonLessonPolicy["NoShowTutor"] = "NO_SHOW_TUTOR";
|
|
13
|
+
TutorReasonLessonPolicy["RescheduleAdmin"] = "RESCHEDULE_ADMIN";
|
|
14
|
+
TutorReasonLessonPolicy["RescheduleBadAdmin"] = "RESCHEDULE_BAD_ADMIN";
|
|
15
|
+
TutorReasonLessonPolicy["RescheduleBadCustomer"] = "RESCHEDULE_BAD_CUSTOMER";
|
|
16
|
+
TutorReasonLessonPolicy["RescheduleBadTutor"] = "RESCHEDULE_BAD_TUTOR";
|
|
17
|
+
TutorReasonLessonPolicy["RescheduleCustomer"] = "RESCHEDULE_CUSTOMER";
|
|
18
|
+
TutorReasonLessonPolicy["RescheduleTutor"] = "RESCHEDULE_TUTOR";
|
|
19
|
+
})(TutorReasonLessonPolicy || (TutorReasonLessonPolicy = {}));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Type } from "../kanban/enums";
|
|
2
|
+
import type { TutorCategoryType } from "../tutor/enums.ts";
|
|
3
|
+
import type { Grade } from "../kid/enums";
|
|
4
|
+
import type { TutorReasonLessonPolicy } from "./enums";
|
|
5
|
+
import { TutorSlotType } from "../tutor/enums";
|
|
6
|
+
export interface TutorPolicy {
|
|
7
|
+
id: number;
|
|
8
|
+
name: string;
|
|
9
|
+
booking_type: Type;
|
|
10
|
+
notes: string;
|
|
11
|
+
created_at: string;
|
|
12
|
+
updated_at: string;
|
|
13
|
+
tutors_count: number;
|
|
14
|
+
rules: RulePolicy[];
|
|
15
|
+
pivot?: PolicyPivot;
|
|
16
|
+
}
|
|
17
|
+
export interface PolicyPivot {
|
|
18
|
+
category: TutorCategoryType;
|
|
19
|
+
created_at: string;
|
|
20
|
+
updated_at: string;
|
|
21
|
+
tutor_id: number;
|
|
22
|
+
tutor_payment_policy_id: number;
|
|
23
|
+
}
|
|
24
|
+
export interface RulePolicy {
|
|
25
|
+
grades: Grade[];
|
|
26
|
+
lesson_statuses: TutorReasonLessonPolicy[];
|
|
27
|
+
no_booking: boolean;
|
|
28
|
+
number: number;
|
|
29
|
+
rate: number;
|
|
30
|
+
rates: PolicyRate[];
|
|
31
|
+
slot_type: TutorSlotType;
|
|
32
|
+
delay_affect: boolean;
|
|
33
|
+
delay_threshold: number | null;
|
|
34
|
+
}
|
|
35
|
+
export interface PolicyRate {
|
|
36
|
+
from: number;
|
|
37
|
+
to: number | null;
|
|
38
|
+
rate: number | null;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { TutorSlotType } from "../tutor/enums";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brighterly/lib-core-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Official Brighterly lib-core-types",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -431,6 +431,16 @@
|
|
|
431
431
|
"types": "./dist/tutor-kanban/enums.d.ts",
|
|
432
432
|
"import": "./dist/tutor-kanban/enums.js"
|
|
433
433
|
},
|
|
434
|
+
"./tutor-policy/interfaces": {
|
|
435
|
+
"types": "./dist/tutor-policy/interfaces.d.ts"
|
|
436
|
+
},
|
|
437
|
+
"./tutor-policy/types": {
|
|
438
|
+
"types": "./dist/tutor-policy/types.d.ts"
|
|
439
|
+
},
|
|
440
|
+
"./tutor-policy/enums": {
|
|
441
|
+
"types": "./dist/tutor-policy/enums.d.ts",
|
|
442
|
+
"import": "./dist/tutor-policy/enums.js"
|
|
443
|
+
},
|
|
434
444
|
"./ui/inputs/interfaces": {
|
|
435
445
|
"types": "./dist/ui/inputs/interfaces.d.ts"
|
|
436
446
|
},
|