@aibrains/shared-types 0.15.0 → 0.16.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/events/enrollment-billing.events.d.ts +47 -0
- package/dist/events/enrollment-billing.events.d.ts.map +1 -0
- package/dist/events/enrollment-billing.events.js +9 -0
- package/dist/events/enrollment-billing.events.js.map +1 -0
- package/dist/identity/country-config.d.ts +120 -0
- package/dist/identity/country-config.d.ts.map +1 -0
- package/dist/identity/country-config.js +404 -0
- package/dist/identity/country-config.js.map +1 -0
- package/dist/identity/field-governance.d.ts +40 -0
- package/dist/identity/field-governance.d.ts.map +1 -0
- package/dist/identity/field-governance.js +111 -0
- package/dist/identity/field-governance.js.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/mappers/edfi/education-org.mapper.js +3 -3
- package/dist/mappers/edfi/education-org.mapper.js.map +1 -1
- package/dist/schemas/finance/common.d.ts +1 -1
- package/dist/schemas/finance/common.d.ts.map +1 -1
- package/dist/schemas/finance/common.js +1 -1
- package/dist/schemas/finance/common.js.map +1 -1
- package/dist/schemas/finance/credit-note.schema.d.ts +127 -0
- package/dist/schemas/finance/credit-note.schema.d.ts.map +1 -0
- package/dist/schemas/finance/credit-note.schema.js +55 -0
- package/dist/schemas/finance/credit-note.schema.js.map +1 -0
- package/dist/schemas/finance/discount-rule.schema.d.ts +352 -0
- package/dist/schemas/finance/discount-rule.schema.d.ts.map +1 -0
- package/dist/schemas/finance/discount-rule.schema.js +57 -0
- package/dist/schemas/finance/discount-rule.schema.js.map +1 -0
- package/dist/schemas/finance/fee-structure.schema.d.ts +36 -6
- package/dist/schemas/finance/fee-structure.schema.d.ts.map +1 -1
- package/dist/schemas/finance/fee-structure.schema.js +10 -0
- package/dist/schemas/finance/fee-structure.schema.js.map +1 -1
- package/dist/schemas/finance/index.d.ts +3 -0
- package/dist/schemas/finance/index.d.ts.map +1 -1
- package/dist/schemas/finance/index.js +3 -0
- package/dist/schemas/finance/index.js.map +1 -1
- package/dist/schemas/finance/invoice.schema.d.ts +63 -3
- package/dist/schemas/finance/invoice.schema.d.ts.map +1 -1
- package/dist/schemas/finance/invoice.schema.js +10 -1
- package/dist/schemas/finance/invoice.schema.js.map +1 -1
- package/dist/schemas/finance/payment.schema.d.ts +22 -22
- package/dist/schemas/finance/refund.schema.d.ts +99 -0
- package/dist/schemas/finance/refund.schema.d.ts.map +1 -0
- package/dist/schemas/finance/refund.schema.js +47 -0
- package/dist/schemas/finance/refund.schema.js.map +1 -0
- package/dist/schemas/identity/academic-year.schema.d.ts +14 -14
- package/dist/schemas/identity/department.schema.d.ts +6 -6
- package/dist/schemas/identity/index.d.ts +2 -0
- package/dist/schemas/identity/index.d.ts.map +1 -1
- package/dist/schemas/identity/index.js +4 -0
- package/dist/schemas/identity/index.js.map +1 -1
- package/dist/schemas/identity/leave.schema.d.ts +26 -26
- package/dist/schemas/identity/school-year.schema.d.ts +18 -18
- package/dist/schemas/identity/school.schema.d.ts +609 -120
- package/dist/schemas/identity/school.schema.d.ts.map +1 -1
- package/dist/schemas/identity/school.schema.js +32 -8
- package/dist/schemas/identity/school.schema.js.map +1 -1
- package/dist/utils/bikram-sambat.d.ts +68 -0
- package/dist/utils/bikram-sambat.d.ts.map +1 -0
- package/dist/utils/bikram-sambat.js +301 -0
- package/dist/utils/bikram-sambat.js.map +1 -0
- package/dist/utils/currency.d.ts +30 -8
- package/dist/utils/currency.d.ts.map +1 -1
- package/dist/utils/currency.js +93 -25
- package/dist/utils/currency.js.map +1 -1
- package/dist/utils/date-format.d.ts +20 -0
- package/dist/utils/date-format.d.ts.map +1 -0
- package/dist/utils/date-format.js +66 -0
- package/dist/utils/date-format.js.map +1 -0
- package/dist/utils/school-hours.d.ts +48 -0
- package/dist/utils/school-hours.d.ts.map +1 -0
- package/dist/utils/school-hours.js +134 -0
- package/dist/utils/school-hours.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discount Rule Schemas
|
|
3
|
+
*
|
|
4
|
+
* Rules for automatic and manual discounts:
|
|
5
|
+
* sibling discounts, early payment, scholarships, staff child, manual.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export declare const discountConditionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<"sibling">;
|
|
10
|
+
minSiblings: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
type: "sibling";
|
|
13
|
+
minSiblings: number;
|
|
14
|
+
}, {
|
|
15
|
+
type: "sibling";
|
|
16
|
+
minSiblings?: number | undefined;
|
|
17
|
+
}>, z.ZodObject<{
|
|
18
|
+
type: z.ZodLiteral<"early_payment">;
|
|
19
|
+
daysBefore: z.ZodNumber;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
type: "early_payment";
|
|
22
|
+
daysBefore: number;
|
|
23
|
+
}, {
|
|
24
|
+
type: "early_payment";
|
|
25
|
+
daysBefore: number;
|
|
26
|
+
}>, z.ZodObject<{
|
|
27
|
+
type: z.ZodLiteral<"scholarship">;
|
|
28
|
+
scholarshipId: z.ZodString;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
type: "scholarship";
|
|
31
|
+
scholarshipId: string;
|
|
32
|
+
}, {
|
|
33
|
+
type: "scholarship";
|
|
34
|
+
scholarshipId: string;
|
|
35
|
+
}>, z.ZodObject<{
|
|
36
|
+
type: z.ZodLiteral<"staff_child">;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
type: "staff_child";
|
|
39
|
+
}, {
|
|
40
|
+
type: "staff_child";
|
|
41
|
+
}>, z.ZodObject<{
|
|
42
|
+
type: z.ZodLiteral<"manual">;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
type: "manual";
|
|
45
|
+
}, {
|
|
46
|
+
type: "manual";
|
|
47
|
+
}>]>;
|
|
48
|
+
export type DiscountCondition = z.infer<typeof discountConditionSchema>;
|
|
49
|
+
export declare const discountRuleResponseSchema: z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
schoolId: z.ZodString;
|
|
52
|
+
academicYearId: z.ZodString;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
description: z.ZodOptional<z.ZodString>;
|
|
55
|
+
type: z.ZodEnum<["percentage", "fixed"]>;
|
|
56
|
+
value: z.ZodNumber;
|
|
57
|
+
applicableFeeTypes: z.ZodArray<z.ZodEnum<["tuition", "admission", "exam", "transport", "library", "lab", "hostel", "uniform", "miscellaneous", "custom"]>, "many">;
|
|
58
|
+
condition: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
59
|
+
type: z.ZodLiteral<"sibling">;
|
|
60
|
+
minSiblings: z.ZodDefault<z.ZodNumber>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
type: "sibling";
|
|
63
|
+
minSiblings: number;
|
|
64
|
+
}, {
|
|
65
|
+
type: "sibling";
|
|
66
|
+
minSiblings?: number | undefined;
|
|
67
|
+
}>, z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<"early_payment">;
|
|
69
|
+
daysBefore: z.ZodNumber;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
type: "early_payment";
|
|
72
|
+
daysBefore: number;
|
|
73
|
+
}, {
|
|
74
|
+
type: "early_payment";
|
|
75
|
+
daysBefore: number;
|
|
76
|
+
}>, z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<"scholarship">;
|
|
78
|
+
scholarshipId: z.ZodString;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
type: "scholarship";
|
|
81
|
+
scholarshipId: string;
|
|
82
|
+
}, {
|
|
83
|
+
type: "scholarship";
|
|
84
|
+
scholarshipId: string;
|
|
85
|
+
}>, z.ZodObject<{
|
|
86
|
+
type: z.ZodLiteral<"staff_child">;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
type: "staff_child";
|
|
89
|
+
}, {
|
|
90
|
+
type: "staff_child";
|
|
91
|
+
}>, z.ZodObject<{
|
|
92
|
+
type: z.ZodLiteral<"manual">;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
type: "manual";
|
|
95
|
+
}, {
|
|
96
|
+
type: "manual";
|
|
97
|
+
}>]>;
|
|
98
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
99
|
+
isActive: z.ZodBoolean;
|
|
100
|
+
maxDiscountAmount: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
createdAt: z.ZodString;
|
|
102
|
+
updatedAt: z.ZodString;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
type: "percentage" | "fixed";
|
|
105
|
+
value: number;
|
|
106
|
+
createdAt: string;
|
|
107
|
+
updatedAt: string;
|
|
108
|
+
name: string;
|
|
109
|
+
schoolId: string;
|
|
110
|
+
isActive: boolean;
|
|
111
|
+
id: string;
|
|
112
|
+
academicYearId: string;
|
|
113
|
+
priority: number;
|
|
114
|
+
applicableFeeTypes: ("custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous")[];
|
|
115
|
+
condition: {
|
|
116
|
+
type: "sibling";
|
|
117
|
+
minSiblings: number;
|
|
118
|
+
} | {
|
|
119
|
+
type: "early_payment";
|
|
120
|
+
daysBefore: number;
|
|
121
|
+
} | {
|
|
122
|
+
type: "scholarship";
|
|
123
|
+
scholarshipId: string;
|
|
124
|
+
} | {
|
|
125
|
+
type: "staff_child";
|
|
126
|
+
} | {
|
|
127
|
+
type: "manual";
|
|
128
|
+
};
|
|
129
|
+
description?: string | undefined;
|
|
130
|
+
maxDiscountAmount?: number | undefined;
|
|
131
|
+
}, {
|
|
132
|
+
type: "percentage" | "fixed";
|
|
133
|
+
value: number;
|
|
134
|
+
createdAt: string;
|
|
135
|
+
updatedAt: string;
|
|
136
|
+
name: string;
|
|
137
|
+
schoolId: string;
|
|
138
|
+
isActive: boolean;
|
|
139
|
+
id: string;
|
|
140
|
+
academicYearId: string;
|
|
141
|
+
applicableFeeTypes: ("custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous")[];
|
|
142
|
+
condition: {
|
|
143
|
+
type: "sibling";
|
|
144
|
+
minSiblings?: number | undefined;
|
|
145
|
+
} | {
|
|
146
|
+
type: "early_payment";
|
|
147
|
+
daysBefore: number;
|
|
148
|
+
} | {
|
|
149
|
+
type: "scholarship";
|
|
150
|
+
scholarshipId: string;
|
|
151
|
+
} | {
|
|
152
|
+
type: "staff_child";
|
|
153
|
+
} | {
|
|
154
|
+
type: "manual";
|
|
155
|
+
};
|
|
156
|
+
description?: string | undefined;
|
|
157
|
+
priority?: number | undefined;
|
|
158
|
+
maxDiscountAmount?: number | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
export type DiscountRule = z.infer<typeof discountRuleResponseSchema>;
|
|
161
|
+
export declare const createDiscountRuleSchema: z.ZodObject<{
|
|
162
|
+
name: z.ZodString;
|
|
163
|
+
description: z.ZodOptional<z.ZodString>;
|
|
164
|
+
academicYearId: z.ZodString;
|
|
165
|
+
type: z.ZodEnum<["percentage", "fixed"]>;
|
|
166
|
+
value: z.ZodNumber;
|
|
167
|
+
applicableFeeTypes: z.ZodArray<z.ZodEnum<["tuition", "admission", "exam", "transport", "library", "lab", "hostel", "uniform", "miscellaneous", "custom"]>, "many">;
|
|
168
|
+
condition: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
169
|
+
type: z.ZodLiteral<"sibling">;
|
|
170
|
+
minSiblings: z.ZodDefault<z.ZodNumber>;
|
|
171
|
+
}, "strip", z.ZodTypeAny, {
|
|
172
|
+
type: "sibling";
|
|
173
|
+
minSiblings: number;
|
|
174
|
+
}, {
|
|
175
|
+
type: "sibling";
|
|
176
|
+
minSiblings?: number | undefined;
|
|
177
|
+
}>, z.ZodObject<{
|
|
178
|
+
type: z.ZodLiteral<"early_payment">;
|
|
179
|
+
daysBefore: z.ZodNumber;
|
|
180
|
+
}, "strip", z.ZodTypeAny, {
|
|
181
|
+
type: "early_payment";
|
|
182
|
+
daysBefore: number;
|
|
183
|
+
}, {
|
|
184
|
+
type: "early_payment";
|
|
185
|
+
daysBefore: number;
|
|
186
|
+
}>, z.ZodObject<{
|
|
187
|
+
type: z.ZodLiteral<"scholarship">;
|
|
188
|
+
scholarshipId: z.ZodString;
|
|
189
|
+
}, "strip", z.ZodTypeAny, {
|
|
190
|
+
type: "scholarship";
|
|
191
|
+
scholarshipId: string;
|
|
192
|
+
}, {
|
|
193
|
+
type: "scholarship";
|
|
194
|
+
scholarshipId: string;
|
|
195
|
+
}>, z.ZodObject<{
|
|
196
|
+
type: z.ZodLiteral<"staff_child">;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
type: "staff_child";
|
|
199
|
+
}, {
|
|
200
|
+
type: "staff_child";
|
|
201
|
+
}>, z.ZodObject<{
|
|
202
|
+
type: z.ZodLiteral<"manual">;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
type: "manual";
|
|
205
|
+
}, {
|
|
206
|
+
type: "manual";
|
|
207
|
+
}>]>;
|
|
208
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
209
|
+
maxDiscountAmount: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
}, "strip", z.ZodTypeAny, {
|
|
211
|
+
type: "percentage" | "fixed";
|
|
212
|
+
value: number;
|
|
213
|
+
name: string;
|
|
214
|
+
academicYearId: string;
|
|
215
|
+
priority: number;
|
|
216
|
+
applicableFeeTypes: ("custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous")[];
|
|
217
|
+
condition: {
|
|
218
|
+
type: "sibling";
|
|
219
|
+
minSiblings: number;
|
|
220
|
+
} | {
|
|
221
|
+
type: "early_payment";
|
|
222
|
+
daysBefore: number;
|
|
223
|
+
} | {
|
|
224
|
+
type: "scholarship";
|
|
225
|
+
scholarshipId: string;
|
|
226
|
+
} | {
|
|
227
|
+
type: "staff_child";
|
|
228
|
+
} | {
|
|
229
|
+
type: "manual";
|
|
230
|
+
};
|
|
231
|
+
description?: string | undefined;
|
|
232
|
+
maxDiscountAmount?: number | undefined;
|
|
233
|
+
}, {
|
|
234
|
+
type: "percentage" | "fixed";
|
|
235
|
+
value: number;
|
|
236
|
+
name: string;
|
|
237
|
+
academicYearId: string;
|
|
238
|
+
applicableFeeTypes: ("custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous")[];
|
|
239
|
+
condition: {
|
|
240
|
+
type: "sibling";
|
|
241
|
+
minSiblings?: number | undefined;
|
|
242
|
+
} | {
|
|
243
|
+
type: "early_payment";
|
|
244
|
+
daysBefore: number;
|
|
245
|
+
} | {
|
|
246
|
+
type: "scholarship";
|
|
247
|
+
scholarshipId: string;
|
|
248
|
+
} | {
|
|
249
|
+
type: "staff_child";
|
|
250
|
+
} | {
|
|
251
|
+
type: "manual";
|
|
252
|
+
};
|
|
253
|
+
description?: string | undefined;
|
|
254
|
+
priority?: number | undefined;
|
|
255
|
+
maxDiscountAmount?: number | undefined;
|
|
256
|
+
}>;
|
|
257
|
+
export type CreateDiscountRuleDto = z.infer<typeof createDiscountRuleSchema>;
|
|
258
|
+
export declare const updateDiscountRuleSchema: z.ZodObject<{
|
|
259
|
+
name: z.ZodOptional<z.ZodString>;
|
|
260
|
+
description: z.ZodOptional<z.ZodString>;
|
|
261
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
262
|
+
applicableFeeTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["tuition", "admission", "exam", "transport", "library", "lab", "hostel", "uniform", "miscellaneous", "custom"]>, "many">>;
|
|
263
|
+
condition: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
264
|
+
type: z.ZodLiteral<"sibling">;
|
|
265
|
+
minSiblings: z.ZodDefault<z.ZodNumber>;
|
|
266
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
type: "sibling";
|
|
268
|
+
minSiblings: number;
|
|
269
|
+
}, {
|
|
270
|
+
type: "sibling";
|
|
271
|
+
minSiblings?: number | undefined;
|
|
272
|
+
}>, z.ZodObject<{
|
|
273
|
+
type: z.ZodLiteral<"early_payment">;
|
|
274
|
+
daysBefore: z.ZodNumber;
|
|
275
|
+
}, "strip", z.ZodTypeAny, {
|
|
276
|
+
type: "early_payment";
|
|
277
|
+
daysBefore: number;
|
|
278
|
+
}, {
|
|
279
|
+
type: "early_payment";
|
|
280
|
+
daysBefore: number;
|
|
281
|
+
}>, z.ZodObject<{
|
|
282
|
+
type: z.ZodLiteral<"scholarship">;
|
|
283
|
+
scholarshipId: z.ZodString;
|
|
284
|
+
}, "strip", z.ZodTypeAny, {
|
|
285
|
+
type: "scholarship";
|
|
286
|
+
scholarshipId: string;
|
|
287
|
+
}, {
|
|
288
|
+
type: "scholarship";
|
|
289
|
+
scholarshipId: string;
|
|
290
|
+
}>, z.ZodObject<{
|
|
291
|
+
type: z.ZodLiteral<"staff_child">;
|
|
292
|
+
}, "strip", z.ZodTypeAny, {
|
|
293
|
+
type: "staff_child";
|
|
294
|
+
}, {
|
|
295
|
+
type: "staff_child";
|
|
296
|
+
}>, z.ZodObject<{
|
|
297
|
+
type: z.ZodLiteral<"manual">;
|
|
298
|
+
}, "strip", z.ZodTypeAny, {
|
|
299
|
+
type: "manual";
|
|
300
|
+
}, {
|
|
301
|
+
type: "manual";
|
|
302
|
+
}>]>>;
|
|
303
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
304
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
305
|
+
maxDiscountAmount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
306
|
+
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
value?: number | undefined;
|
|
308
|
+
name?: string | undefined;
|
|
309
|
+
isActive?: boolean | undefined;
|
|
310
|
+
description?: string | undefined;
|
|
311
|
+
priority?: number | undefined;
|
|
312
|
+
applicableFeeTypes?: ("custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous")[] | undefined;
|
|
313
|
+
condition?: {
|
|
314
|
+
type: "sibling";
|
|
315
|
+
minSiblings: number;
|
|
316
|
+
} | {
|
|
317
|
+
type: "early_payment";
|
|
318
|
+
daysBefore: number;
|
|
319
|
+
} | {
|
|
320
|
+
type: "scholarship";
|
|
321
|
+
scholarshipId: string;
|
|
322
|
+
} | {
|
|
323
|
+
type: "staff_child";
|
|
324
|
+
} | {
|
|
325
|
+
type: "manual";
|
|
326
|
+
} | undefined;
|
|
327
|
+
maxDiscountAmount?: number | null | undefined;
|
|
328
|
+
}, {
|
|
329
|
+
value?: number | undefined;
|
|
330
|
+
name?: string | undefined;
|
|
331
|
+
isActive?: boolean | undefined;
|
|
332
|
+
description?: string | undefined;
|
|
333
|
+
priority?: number | undefined;
|
|
334
|
+
applicableFeeTypes?: ("custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous")[] | undefined;
|
|
335
|
+
condition?: {
|
|
336
|
+
type: "sibling";
|
|
337
|
+
minSiblings?: number | undefined;
|
|
338
|
+
} | {
|
|
339
|
+
type: "early_payment";
|
|
340
|
+
daysBefore: number;
|
|
341
|
+
} | {
|
|
342
|
+
type: "scholarship";
|
|
343
|
+
scholarshipId: string;
|
|
344
|
+
} | {
|
|
345
|
+
type: "staff_child";
|
|
346
|
+
} | {
|
|
347
|
+
type: "manual";
|
|
348
|
+
} | undefined;
|
|
349
|
+
maxDiscountAmount?: number | null | undefined;
|
|
350
|
+
}>;
|
|
351
|
+
export type UpdateDiscountRuleDto = z.infer<typeof updateDiscountRuleSchema>;
|
|
352
|
+
//# sourceMappingURL=discount-rule.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-rule.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/finance/discount-rule.schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAerC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEtE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUnC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE7E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASnC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Discount Rule Schemas
|
|
4
|
+
*
|
|
5
|
+
* Rules for automatic and manual discounts:
|
|
6
|
+
* sibling discounts, early payment, scholarships, staff child, manual.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.updateDiscountRuleSchema = exports.createDiscountRuleSchema = exports.discountRuleResponseSchema = exports.discountConditionSchema = void 0;
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const common_1 = require("./common");
|
|
12
|
+
const common_2 = require("../common");
|
|
13
|
+
exports.discountConditionSchema = zod_1.z.discriminatedUnion('type', [
|
|
14
|
+
zod_1.z.object({ type: zod_1.z.literal('sibling'), minSiblings: zod_1.z.number().int().min(2).default(2) }),
|
|
15
|
+
zod_1.z.object({ type: zod_1.z.literal('early_payment'), daysBefore: zod_1.z.number().int().min(1) }),
|
|
16
|
+
zod_1.z.object({ type: zod_1.z.literal('scholarship'), scholarshipId: zod_1.z.string().min(1) }),
|
|
17
|
+
zod_1.z.object({ type: zod_1.z.literal('staff_child') }),
|
|
18
|
+
zod_1.z.object({ type: zod_1.z.literal('manual') }),
|
|
19
|
+
]);
|
|
20
|
+
exports.discountRuleResponseSchema = zod_1.z.object({
|
|
21
|
+
id: common_2.uuidSchema,
|
|
22
|
+
schoolId: common_2.uuidSchema,
|
|
23
|
+
academicYearId: common_2.uuidSchema,
|
|
24
|
+
name: zod_1.z.string(),
|
|
25
|
+
description: zod_1.z.string().optional(),
|
|
26
|
+
type: zod_1.z.enum(['percentage', 'fixed']),
|
|
27
|
+
value: zod_1.z.number().min(0),
|
|
28
|
+
applicableFeeTypes: zod_1.z.array(common_1.feeTypeEnum),
|
|
29
|
+
condition: exports.discountConditionSchema,
|
|
30
|
+
priority: zod_1.z.number().int().min(0).default(0),
|
|
31
|
+
isActive: zod_1.z.boolean(),
|
|
32
|
+
maxDiscountAmount: zod_1.z.number().min(0).optional(),
|
|
33
|
+
createdAt: zod_1.z.string(),
|
|
34
|
+
updatedAt: zod_1.z.string(),
|
|
35
|
+
});
|
|
36
|
+
exports.createDiscountRuleSchema = zod_1.z.object({
|
|
37
|
+
name: zod_1.z.string().min(1).max(200),
|
|
38
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
39
|
+
academicYearId: common_2.uuidSchema,
|
|
40
|
+
type: zod_1.z.enum(['percentage', 'fixed']),
|
|
41
|
+
value: zod_1.z.number().min(0),
|
|
42
|
+
applicableFeeTypes: zod_1.z.array(common_1.feeTypeEnum).min(1),
|
|
43
|
+
condition: exports.discountConditionSchema,
|
|
44
|
+
priority: zod_1.z.number().int().min(0).default(0),
|
|
45
|
+
maxDiscountAmount: zod_1.z.number().min(0).optional(),
|
|
46
|
+
});
|
|
47
|
+
exports.updateDiscountRuleSchema = zod_1.z.object({
|
|
48
|
+
name: zod_1.z.string().min(1).max(200).optional(),
|
|
49
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
50
|
+
value: zod_1.z.number().min(0).optional(),
|
|
51
|
+
applicableFeeTypes: zod_1.z.array(common_1.feeTypeEnum).optional(),
|
|
52
|
+
condition: exports.discountConditionSchema.optional(),
|
|
53
|
+
priority: zod_1.z.number().int().min(0).optional(),
|
|
54
|
+
isActive: zod_1.z.boolean().optional(),
|
|
55
|
+
maxDiscountAmount: zod_1.z.number().min(0).optional().nullable(),
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=discount-rule.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-rule.schema.js","sourceRoot":"","sources":["../../../src/schemas/finance/discount-rule.schema.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAwB;AACxB,qCAAmE;AACnE,sCAAuC;AAE1B,QAAA,uBAAuB,GAAG,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAClE,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,C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,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAC5C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACnC,kBAAkB,EAAE,OAAC,CAAC,KAAK,CAAC,oBAAW,CAAC,CAAC,QAAQ,EAAE;IACnD,SAAS,EAAE,+BAAuB,CAAC,QAAQ,EAAE;IAC7C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5C,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC3D,CAAC,CAAC"}
|
|
@@ -11,89 +11,112 @@ export declare const feeStructureResponseSchema: z.ZodObject<{
|
|
|
11
11
|
name: z.ZodString;
|
|
12
12
|
description: z.ZodOptional<z.ZodString>;
|
|
13
13
|
academicYear: z.ZodString;
|
|
14
|
+
academicYearId: z.ZodString;
|
|
14
15
|
feeType: z.ZodEnum<["tuition", "admission", "exam", "transport", "library", "lab", "hostel", "uniform", "miscellaneous", "custom"]>;
|
|
15
16
|
amount: z.ZodNumber;
|
|
16
|
-
currency: z.ZodEnum<["NPR"]>;
|
|
17
|
+
currency: z.ZodEnum<["NPR", "USD", "INR", "GBP", "AUD", "CAD"]>;
|
|
17
18
|
taxRate: z.ZodNumber;
|
|
18
19
|
taxType: z.ZodEnum<["PAN", "VAT", "none"]>;
|
|
19
20
|
frequency: z.ZodEnum<["one_time", "monthly", "quarterly", "annual"]>;
|
|
20
21
|
gradeLevels: z.ZodArray<z.ZodString, "many">;
|
|
21
22
|
isActive: z.ZodBoolean;
|
|
22
23
|
autoApplyOnEnrollment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
24
|
+
proRateOnMidTermEntry: z.ZodOptional<z.ZodBoolean>;
|
|
23
25
|
effectiveFrom: z.ZodString;
|
|
24
26
|
effectiveTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
27
|
+
version: z.ZodNumber;
|
|
28
|
+
versionParentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
29
|
+
templateParentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
30
|
+
isOverride: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
25
31
|
createdAt: z.ZodString;
|
|
26
32
|
updatedAt: z.ZodString;
|
|
27
33
|
}, "strip", z.ZodTypeAny, {
|
|
28
34
|
createdAt: string;
|
|
29
35
|
updatedAt: string;
|
|
36
|
+
version: number;
|
|
30
37
|
name: string;
|
|
31
38
|
gradeLevels: string[];
|
|
32
39
|
schoolId: string;
|
|
33
40
|
isActive: boolean;
|
|
34
41
|
id: string;
|
|
42
|
+
academicYearId: string;
|
|
35
43
|
academicYear: string;
|
|
36
44
|
feeType: "custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous";
|
|
37
45
|
amount: number;
|
|
38
|
-
currency: "NPR";
|
|
46
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
39
47
|
taxRate: number;
|
|
40
48
|
taxType: "none" | "PAN" | "VAT";
|
|
41
49
|
frequency: "annual" | "one_time" | "monthly" | "quarterly";
|
|
42
50
|
autoApplyOnEnrollment: boolean;
|
|
43
51
|
effectiveFrom: string;
|
|
52
|
+
isOverride: boolean;
|
|
44
53
|
description?: string | undefined;
|
|
54
|
+
proRateOnMidTermEntry?: boolean | undefined;
|
|
45
55
|
effectiveTo?: string | null | undefined;
|
|
56
|
+
versionParentId?: string | null | undefined;
|
|
57
|
+
templateParentId?: string | null | undefined;
|
|
46
58
|
}, {
|
|
47
59
|
createdAt: string;
|
|
48
60
|
updatedAt: string;
|
|
61
|
+
version: number;
|
|
49
62
|
name: string;
|
|
50
63
|
gradeLevels: string[];
|
|
51
64
|
schoolId: string;
|
|
52
65
|
isActive: boolean;
|
|
53
66
|
id: string;
|
|
67
|
+
academicYearId: string;
|
|
54
68
|
academicYear: string;
|
|
55
69
|
feeType: "custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous";
|
|
56
70
|
amount: number;
|
|
57
|
-
currency: "NPR";
|
|
71
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
58
72
|
taxRate: number;
|
|
59
73
|
taxType: "none" | "PAN" | "VAT";
|
|
60
74
|
frequency: "annual" | "one_time" | "monthly" | "quarterly";
|
|
61
75
|
effectiveFrom: string;
|
|
62
76
|
description?: string | undefined;
|
|
63
77
|
autoApplyOnEnrollment?: boolean | undefined;
|
|
78
|
+
proRateOnMidTermEntry?: boolean | undefined;
|
|
64
79
|
effectiveTo?: string | null | undefined;
|
|
80
|
+
versionParentId?: string | null | undefined;
|
|
81
|
+
templateParentId?: string | null | undefined;
|
|
82
|
+
isOverride?: boolean | undefined;
|
|
65
83
|
}>;
|
|
66
84
|
export type FeeStructure = z.infer<typeof feeStructureResponseSchema>;
|
|
67
85
|
export declare const createFeeStructureSchema: z.ZodObject<{
|
|
68
86
|
name: z.ZodString;
|
|
69
87
|
description: z.ZodOptional<z.ZodString>;
|
|
70
88
|
academicYear: z.ZodString;
|
|
89
|
+
academicYearId: z.ZodString;
|
|
71
90
|
feeType: z.ZodEnum<["tuition", "admission", "exam", "transport", "library", "lab", "hostel", "uniform", "miscellaneous", "custom"]>;
|
|
72
91
|
amount: z.ZodNumber;
|
|
73
|
-
currency: z.ZodDefault<z.ZodEnum<["NPR"]>>;
|
|
92
|
+
currency: z.ZodDefault<z.ZodEnum<["NPR", "USD", "INR", "GBP", "AUD", "CAD"]>>;
|
|
74
93
|
taxRate: z.ZodDefault<z.ZodNumber>;
|
|
75
94
|
taxType: z.ZodDefault<z.ZodEnum<["PAN", "VAT", "none"]>>;
|
|
76
95
|
frequency: z.ZodEnum<["one_time", "monthly", "quarterly", "annual"]>;
|
|
77
96
|
gradeLevels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
78
97
|
autoApplyOnEnrollment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
98
|
+
proRateOnMidTermEntry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
79
99
|
effectiveFrom: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
80
100
|
effectiveTo: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
81
101
|
}, "strip", z.ZodTypeAny, {
|
|
82
102
|
name: string;
|
|
83
103
|
gradeLevels: string[];
|
|
104
|
+
academicYearId: string;
|
|
84
105
|
academicYear: string;
|
|
85
106
|
feeType: "custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous";
|
|
86
107
|
amount: number;
|
|
87
|
-
currency: "NPR";
|
|
108
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
88
109
|
taxRate: number;
|
|
89
110
|
taxType: "none" | "PAN" | "VAT";
|
|
90
111
|
frequency: "annual" | "one_time" | "monthly" | "quarterly";
|
|
91
112
|
autoApplyOnEnrollment: boolean;
|
|
113
|
+
proRateOnMidTermEntry: boolean;
|
|
92
114
|
effectiveFrom: string;
|
|
93
115
|
description?: string | undefined;
|
|
94
116
|
effectiveTo?: string | undefined;
|
|
95
117
|
}, {
|
|
96
118
|
name: string;
|
|
119
|
+
academicYearId: string;
|
|
97
120
|
academicYear: string;
|
|
98
121
|
feeType: "custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous";
|
|
99
122
|
amount: number;
|
|
@@ -101,10 +124,11 @@ export declare const createFeeStructureSchema: z.ZodObject<{
|
|
|
101
124
|
effectiveFrom: string;
|
|
102
125
|
gradeLevels?: string[] | undefined;
|
|
103
126
|
description?: string | undefined;
|
|
104
|
-
currency?: "NPR" | undefined;
|
|
127
|
+
currency?: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD" | undefined;
|
|
105
128
|
taxRate?: number | undefined;
|
|
106
129
|
taxType?: "none" | "PAN" | "VAT" | undefined;
|
|
107
130
|
autoApplyOnEnrollment?: boolean | undefined;
|
|
131
|
+
proRateOnMidTermEntry?: boolean | undefined;
|
|
108
132
|
effectiveTo?: string | undefined;
|
|
109
133
|
}>;
|
|
110
134
|
export type CreateFeeStructureDto = z.infer<typeof createFeeStructureSchema>;
|
|
@@ -118,18 +142,22 @@ export declare const updateFeeStructureSchema: z.ZodObject<{
|
|
|
118
142
|
gradeLevels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
119
143
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
120
144
|
autoApplyOnEnrollment: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
+
proRateOnMidTermEntry: z.ZodOptional<z.ZodBoolean>;
|
|
121
146
|
effectiveFrom: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
122
147
|
effectiveTo: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
|
|
148
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
123
149
|
}, "strip", z.ZodTypeAny, {
|
|
124
150
|
name?: string | undefined;
|
|
125
151
|
gradeLevels?: string[] | undefined;
|
|
126
152
|
isActive?: boolean | undefined;
|
|
127
153
|
description?: string | undefined;
|
|
154
|
+
reason?: string | undefined;
|
|
128
155
|
amount?: number | undefined;
|
|
129
156
|
taxRate?: number | undefined;
|
|
130
157
|
taxType?: "none" | "PAN" | "VAT" | undefined;
|
|
131
158
|
frequency?: "annual" | "one_time" | "monthly" | "quarterly" | undefined;
|
|
132
159
|
autoApplyOnEnrollment?: boolean | undefined;
|
|
160
|
+
proRateOnMidTermEntry?: boolean | undefined;
|
|
133
161
|
effectiveFrom?: string | undefined;
|
|
134
162
|
effectiveTo?: string | null | undefined;
|
|
135
163
|
}, {
|
|
@@ -137,11 +165,13 @@ export declare const updateFeeStructureSchema: z.ZodObject<{
|
|
|
137
165
|
gradeLevels?: string[] | undefined;
|
|
138
166
|
isActive?: boolean | undefined;
|
|
139
167
|
description?: string | undefined;
|
|
168
|
+
reason?: string | undefined;
|
|
140
169
|
amount?: number | undefined;
|
|
141
170
|
taxRate?: number | undefined;
|
|
142
171
|
taxType?: "none" | "PAN" | "VAT" | undefined;
|
|
143
172
|
frequency?: "annual" | "one_time" | "monthly" | "quarterly" | undefined;
|
|
144
173
|
autoApplyOnEnrollment?: boolean | undefined;
|
|
174
|
+
proRateOnMidTermEntry?: boolean | undefined;
|
|
145
175
|
effectiveFrom?: string | undefined;
|
|
146
176
|
effectiveTo?: string | null | undefined;
|
|
147
177
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee-structure.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/finance/fee-structure.schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"fee-structure.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/finance/fee-structure.schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBrC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAMtE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBnC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM7E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcnC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM7E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;EAOnC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -19,6 +19,7 @@ exports.feeStructureResponseSchema = zod_1.z.object({
|
|
|
19
19
|
name: zod_1.z.string(),
|
|
20
20
|
description: zod_1.z.string().optional(),
|
|
21
21
|
academicYear: zod_1.z.string(),
|
|
22
|
+
academicYearId: common_2.uuidSchema,
|
|
22
23
|
feeType: common_1.feeTypeEnum,
|
|
23
24
|
amount: common_1.amountSchema,
|
|
24
25
|
currency: common_1.currencyEnum,
|
|
@@ -28,8 +29,13 @@ exports.feeStructureResponseSchema = zod_1.z.object({
|
|
|
28
29
|
gradeLevels: zod_1.z.array(zod_1.z.string()),
|
|
29
30
|
isActive: zod_1.z.boolean(),
|
|
30
31
|
autoApplyOnEnrollment: zod_1.z.boolean().optional().default(false),
|
|
32
|
+
proRateOnMidTermEntry: zod_1.z.boolean().optional(),
|
|
31
33
|
effectiveFrom: zod_1.z.string(),
|
|
32
34
|
effectiveTo: zod_1.z.string().optional().nullable(),
|
|
35
|
+
version: zod_1.z.number().int().min(1),
|
|
36
|
+
versionParentId: common_2.uuidSchema.optional().nullable(),
|
|
37
|
+
templateParentId: common_2.uuidSchema.optional().nullable(),
|
|
38
|
+
isOverride: zod_1.z.boolean().optional().default(false),
|
|
33
39
|
createdAt: zod_1.z.string(),
|
|
34
40
|
updatedAt: zod_1.z.string(),
|
|
35
41
|
});
|
|
@@ -40,6 +46,7 @@ exports.createFeeStructureSchema = zod_1.z.object({
|
|
|
40
46
|
name: zod_1.z.string().min(1).max(200),
|
|
41
47
|
description: zod_1.z.string().max(1000).optional(),
|
|
42
48
|
academicYear: zod_1.z.string().min(1).max(20),
|
|
49
|
+
academicYearId: common_2.uuidSchema,
|
|
43
50
|
feeType: common_1.feeTypeEnum,
|
|
44
51
|
amount: common_1.amountSchema.positive('Amount must be greater than 0'),
|
|
45
52
|
currency: common_1.currencyEnum.default('NPR'),
|
|
@@ -48,6 +55,7 @@ exports.createFeeStructureSchema = zod_1.z.object({
|
|
|
48
55
|
frequency: common_1.feeFrequencyEnum,
|
|
49
56
|
gradeLevels: zod_1.z.array(zod_1.z.string().min(1).max(10)).default([]),
|
|
50
57
|
autoApplyOnEnrollment: zod_1.z.boolean().optional().default(false),
|
|
58
|
+
proRateOnMidTermEntry: zod_1.z.boolean().optional().default(false),
|
|
51
59
|
effectiveFrom: common_2.dateSchema,
|
|
52
60
|
effectiveTo: common_2.dateSchema.optional(),
|
|
53
61
|
});
|
|
@@ -64,8 +72,10 @@ exports.updateFeeStructureSchema = zod_1.z.object({
|
|
|
64
72
|
gradeLevels: zod_1.z.array(zod_1.z.string().min(1).max(10)).optional(),
|
|
65
73
|
isActive: zod_1.z.boolean().optional(),
|
|
66
74
|
autoApplyOnEnrollment: zod_1.z.boolean().optional(),
|
|
75
|
+
proRateOnMidTermEntry: zod_1.z.boolean().optional(),
|
|
67
76
|
effectiveFrom: common_2.dateSchema.optional(),
|
|
68
77
|
effectiveTo: common_2.dateSchema.optional().nullable(),
|
|
78
|
+
reason: zod_1.z.string().max(500).optional(),
|
|
69
79
|
});
|
|
70
80
|
// ============================================================================
|
|
71
81
|
// FILTER
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee-structure.schema.js","sourceRoot":"","sources":["../../../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MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC1D,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,qBAAqB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC7C,qBAAqB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC7C,aAAa,EAAE,mBAAU,CAAC,QAAQ,EAAE;IACpC,WAAW,EAAE,mBAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAIH,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAElE,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,oBAAW,CAAC,QAAQ,EAAE;IAC/B,SAAS,EAAE,yBAAgB,CAAC,QAAQ,EAAE;IACtC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC"}
|
|
@@ -9,4 +9,7 @@ export * from './invoice.schema';
|
|
|
9
9
|
export * from './payment.schema';
|
|
10
10
|
export * from './student-account.schema';
|
|
11
11
|
export * from './payment-gateway.schema';
|
|
12
|
+
export * from './discount-rule.schema';
|
|
13
|
+
export * from './credit-note.schema';
|
|
14
|
+
export * from './refund.schema';
|
|
12
15
|
//# sourceMappingURL=index.d.ts.map
|