@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/finance/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/finance/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
|
|
@@ -25,4 +25,7 @@ __exportStar(require("./invoice.schema"), exports);
|
|
|
25
25
|
__exportStar(require("./payment.schema"), exports);
|
|
26
26
|
__exportStar(require("./student-account.schema"), exports);
|
|
27
27
|
__exportStar(require("./payment-gateway.schema"), exports);
|
|
28
|
+
__exportStar(require("./discount-rule.schema"), exports);
|
|
29
|
+
__exportStar(require("./credit-note.schema"), exports);
|
|
30
|
+
__exportStar(require("./refund.schema"), exports);
|
|
28
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schemas/finance/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,yDAAuC;AACvC,mDAAiC;AACjC,mDAAiC;AACjC,2DAAyC;AACzC,2DAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schemas/finance/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,yDAAuC;AACvC,mDAAiC;AACjC,mDAAiC;AACjC,2DAAyC;AACzC,2DAAyC;AACzC,yDAAuC;AACvC,uDAAqC;AACrC,kDAAgC"}
|
|
@@ -8,12 +8,14 @@ import { z } from 'zod';
|
|
|
8
8
|
export declare const invoiceLineItemSchema: z.ZodObject<{
|
|
9
9
|
id: z.ZodString;
|
|
10
10
|
feeStructureId: z.ZodString;
|
|
11
|
+
feeStructureVersion: z.ZodOptional<z.ZodNumber>;
|
|
11
12
|
description: z.ZodString;
|
|
12
13
|
amount: z.ZodNumber;
|
|
13
14
|
quantity: z.ZodDefault<z.ZodNumber>;
|
|
14
15
|
discount: z.ZodDefault<z.ZodNumber>;
|
|
15
16
|
discountReason: z.ZodOptional<z.ZodString>;
|
|
16
17
|
taxRate: z.ZodNumber;
|
|
18
|
+
taxType: z.ZodOptional<z.ZodString>;
|
|
17
19
|
taxAmount: z.ZodNumber;
|
|
18
20
|
total: z.ZodNumber;
|
|
19
21
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -26,6 +28,8 @@ export declare const invoiceLineItemSchema: z.ZodObject<{
|
|
|
26
28
|
quantity: number;
|
|
27
29
|
discount: number;
|
|
28
30
|
taxAmount: number;
|
|
31
|
+
taxType?: string | undefined;
|
|
32
|
+
feeStructureVersion?: number | undefined;
|
|
29
33
|
discountReason?: string | undefined;
|
|
30
34
|
}, {
|
|
31
35
|
total: number;
|
|
@@ -35,10 +39,28 @@ export declare const invoiceLineItemSchema: z.ZodObject<{
|
|
|
35
39
|
taxRate: number;
|
|
36
40
|
feeStructureId: string;
|
|
37
41
|
taxAmount: number;
|
|
42
|
+
taxType?: string | undefined;
|
|
43
|
+
feeStructureVersion?: number | undefined;
|
|
38
44
|
quantity?: number | undefined;
|
|
39
45
|
discount?: number | undefined;
|
|
40
46
|
discountReason?: string | undefined;
|
|
41
47
|
}>;
|
|
48
|
+
export declare const taxSummaryItemSchema: z.ZodObject<{
|
|
49
|
+
taxType: z.ZodString;
|
|
50
|
+
taxableAmount: z.ZodNumber;
|
|
51
|
+
taxRate: z.ZodNumber;
|
|
52
|
+
taxAmount: z.ZodNumber;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
taxRate: number;
|
|
55
|
+
taxType: string;
|
|
56
|
+
taxAmount: number;
|
|
57
|
+
taxableAmount: number;
|
|
58
|
+
}, {
|
|
59
|
+
taxRate: number;
|
|
60
|
+
taxType: string;
|
|
61
|
+
taxAmount: number;
|
|
62
|
+
taxableAmount: number;
|
|
63
|
+
}>;
|
|
42
64
|
export type InvoiceLineItem = z.infer<typeof invoiceLineItemSchema>;
|
|
43
65
|
export declare const invoiceResponseSchema: z.ZodObject<{
|
|
44
66
|
id: z.ZodString;
|
|
@@ -53,12 +75,14 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
53
75
|
lineItems: z.ZodArray<z.ZodObject<{
|
|
54
76
|
id: z.ZodString;
|
|
55
77
|
feeStructureId: z.ZodString;
|
|
78
|
+
feeStructureVersion: z.ZodOptional<z.ZodNumber>;
|
|
56
79
|
description: z.ZodString;
|
|
57
80
|
amount: z.ZodNumber;
|
|
58
81
|
quantity: z.ZodDefault<z.ZodNumber>;
|
|
59
82
|
discount: z.ZodDefault<z.ZodNumber>;
|
|
60
83
|
discountReason: z.ZodOptional<z.ZodString>;
|
|
61
84
|
taxRate: z.ZodNumber;
|
|
85
|
+
taxType: z.ZodOptional<z.ZodString>;
|
|
62
86
|
taxAmount: z.ZodNumber;
|
|
63
87
|
total: z.ZodNumber;
|
|
64
88
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -71,6 +95,8 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
71
95
|
quantity: number;
|
|
72
96
|
discount: number;
|
|
73
97
|
taxAmount: number;
|
|
98
|
+
taxType?: string | undefined;
|
|
99
|
+
feeStructureVersion?: number | undefined;
|
|
74
100
|
discountReason?: string | undefined;
|
|
75
101
|
}, {
|
|
76
102
|
total: number;
|
|
@@ -80,6 +106,8 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
80
106
|
taxRate: number;
|
|
81
107
|
feeStructureId: string;
|
|
82
108
|
taxAmount: number;
|
|
109
|
+
taxType?: string | undefined;
|
|
110
|
+
feeStructureVersion?: number | undefined;
|
|
83
111
|
quantity?: number | undefined;
|
|
84
112
|
discount?: number | undefined;
|
|
85
113
|
discountReason?: string | undefined;
|
|
@@ -90,11 +118,27 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
90
118
|
grandTotal: z.ZodNumber;
|
|
91
119
|
amountPaid: z.ZodNumber;
|
|
92
120
|
amountDue: z.ZodNumber;
|
|
93
|
-
currency: z.ZodEnum<["NPR"]>;
|
|
121
|
+
currency: z.ZodEnum<["NPR", "USD", "INR", "GBP", "AUD", "CAD"]>;
|
|
94
122
|
dueDate: z.ZodString;
|
|
95
123
|
issuedDate: z.ZodString;
|
|
96
124
|
status: z.ZodEnum<["draft", "issued", "partially_paid", "paid", "overdue", "cancelled", "written_off"]>;
|
|
97
125
|
notes: z.ZodOptional<z.ZodString>;
|
|
126
|
+
taxSummary: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
127
|
+
taxType: z.ZodString;
|
|
128
|
+
taxableAmount: z.ZodNumber;
|
|
129
|
+
taxRate: z.ZodNumber;
|
|
130
|
+
taxAmount: z.ZodNumber;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
taxRate: number;
|
|
133
|
+
taxType: string;
|
|
134
|
+
taxAmount: number;
|
|
135
|
+
taxableAmount: number;
|
|
136
|
+
}, {
|
|
137
|
+
taxRate: number;
|
|
138
|
+
taxType: string;
|
|
139
|
+
taxAmount: number;
|
|
140
|
+
taxableAmount: number;
|
|
141
|
+
}>, "many">>;
|
|
98
142
|
createdAt: z.ZodString;
|
|
99
143
|
updatedAt: z.ZodString;
|
|
100
144
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -108,7 +152,7 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
108
152
|
studentName: string;
|
|
109
153
|
academicYear: string;
|
|
110
154
|
dueDate: string;
|
|
111
|
-
currency: "NPR";
|
|
155
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
112
156
|
invoiceNumber: string;
|
|
113
157
|
studentAccountId: string;
|
|
114
158
|
lineItems: {
|
|
@@ -121,6 +165,8 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
121
165
|
quantity: number;
|
|
122
166
|
discount: number;
|
|
123
167
|
taxAmount: number;
|
|
168
|
+
taxType?: string | undefined;
|
|
169
|
+
feeStructureVersion?: number | undefined;
|
|
124
170
|
discountReason?: string | undefined;
|
|
125
171
|
}[];
|
|
126
172
|
subtotal: number;
|
|
@@ -132,6 +178,12 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
132
178
|
issuedDate: string;
|
|
133
179
|
notes?: string | undefined;
|
|
134
180
|
billingPeriod?: string | undefined;
|
|
181
|
+
taxSummary?: {
|
|
182
|
+
taxRate: number;
|
|
183
|
+
taxType: string;
|
|
184
|
+
taxAmount: number;
|
|
185
|
+
taxableAmount: number;
|
|
186
|
+
}[] | undefined;
|
|
135
187
|
}, {
|
|
136
188
|
status: "cancelled" | "draft" | "issued" | "partially_paid" | "paid" | "overdue" | "written_off";
|
|
137
189
|
createdAt: string;
|
|
@@ -143,7 +195,7 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
143
195
|
studentName: string;
|
|
144
196
|
academicYear: string;
|
|
145
197
|
dueDate: string;
|
|
146
|
-
currency: "NPR";
|
|
198
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
147
199
|
invoiceNumber: string;
|
|
148
200
|
studentAccountId: string;
|
|
149
201
|
lineItems: {
|
|
@@ -154,6 +206,8 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
154
206
|
taxRate: number;
|
|
155
207
|
feeStructureId: string;
|
|
156
208
|
taxAmount: number;
|
|
209
|
+
taxType?: string | undefined;
|
|
210
|
+
feeStructureVersion?: number | undefined;
|
|
157
211
|
quantity?: number | undefined;
|
|
158
212
|
discount?: number | undefined;
|
|
159
213
|
discountReason?: string | undefined;
|
|
@@ -167,6 +221,12 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
167
221
|
issuedDate: string;
|
|
168
222
|
notes?: string | undefined;
|
|
169
223
|
billingPeriod?: string | undefined;
|
|
224
|
+
taxSummary?: {
|
|
225
|
+
taxRate: number;
|
|
226
|
+
taxType: string;
|
|
227
|
+
taxAmount: number;
|
|
228
|
+
taxableAmount: number;
|
|
229
|
+
}[] | undefined;
|
|
170
230
|
}>;
|
|
171
231
|
export type Invoice = z.infer<typeof invoiceResponseSchema>;
|
|
172
232
|
export declare const generateInvoiceSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/finance/invoice.schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"invoice.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/finance/invoice.schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAahC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAK/B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMpE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBhC,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAM5D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYhC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMvE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;EAOpC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM/E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS9B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAMnE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAO9B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Lifecycle: draft → issued → partially_paid → paid → overdue → cancelled → written_off
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.invoiceFilterSchema = exports.updateInvoiceSchema = exports.bulkGenerateInvoiceSchema = exports.generateInvoiceSchema = exports.invoiceResponseSchema = exports.invoiceLineItemSchema = void 0;
|
|
9
|
+
exports.invoiceFilterSchema = exports.updateInvoiceSchema = exports.bulkGenerateInvoiceSchema = exports.generateInvoiceSchema = exports.invoiceResponseSchema = exports.taxSummaryItemSchema = exports.invoiceLineItemSchema = void 0;
|
|
10
10
|
const zod_1 = require("zod");
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
const common_2 = require("../common");
|
|
@@ -16,15 +16,23 @@ const common_2 = require("../common");
|
|
|
16
16
|
exports.invoiceLineItemSchema = zod_1.z.object({
|
|
17
17
|
id: common_2.uuidSchema,
|
|
18
18
|
feeStructureId: common_2.uuidSchema,
|
|
19
|
+
feeStructureVersion: zod_1.z.number().int().optional(),
|
|
19
20
|
description: zod_1.z.string(),
|
|
20
21
|
amount: zod_1.z.number().min(0),
|
|
21
22
|
quantity: zod_1.z.number().int().min(1).default(1),
|
|
22
23
|
discount: zod_1.z.number().min(0).default(0),
|
|
23
24
|
discountReason: zod_1.z.string().optional(),
|
|
24
25
|
taxRate: zod_1.z.number().min(0).max(100),
|
|
26
|
+
taxType: zod_1.z.string().optional(),
|
|
25
27
|
taxAmount: zod_1.z.number().min(0),
|
|
26
28
|
total: zod_1.z.number(),
|
|
27
29
|
});
|
|
30
|
+
exports.taxSummaryItemSchema = zod_1.z.object({
|
|
31
|
+
taxType: zod_1.z.string(),
|
|
32
|
+
taxableAmount: zod_1.z.number(),
|
|
33
|
+
taxRate: zod_1.z.number(),
|
|
34
|
+
taxAmount: zod_1.z.number(),
|
|
35
|
+
});
|
|
28
36
|
// ============================================================================
|
|
29
37
|
// RESPONSE
|
|
30
38
|
// ============================================================================
|
|
@@ -50,6 +58,7 @@ exports.invoiceResponseSchema = zod_1.z.object({
|
|
|
50
58
|
issuedDate: zod_1.z.string(),
|
|
51
59
|
status: common_1.invoiceStatusEnum,
|
|
52
60
|
notes: zod_1.z.string().optional(),
|
|
61
|
+
taxSummary: zod_1.z.array(exports.taxSummaryItemSchema).optional(),
|
|
53
62
|
createdAt: zod_1.z.string(),
|
|
54
63
|
updatedAt: zod_1.z.string(),
|
|
55
64
|
});
|
|
@@ -1 +1 @@
|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AAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACrC,OAAO,EAAE,mBAAU,CAAC,QAAQ,EAAE;IAC9B,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC;QAC1B,UAAU,EAAE,mBAAU;QACtB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC7B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;KACvC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACf,CAAC,CAAC;AAIH,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAElE,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,0BAAiB,EAAE,OAAC,CAAC,KAAK,CAAC,0BAAiB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3E,SAAS,EAAE,mBAAU,CAAC,QAAQ,EAAE;IAChC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,WAAW,EAAE,mBAAU,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,mBAAU,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC"}
|
|
@@ -42,7 +42,7 @@ export declare const paymentResponseSchema: z.ZodObject<{
|
|
|
42
42
|
studentAccountId: z.ZodString;
|
|
43
43
|
schoolId: z.ZodString;
|
|
44
44
|
amount: z.ZodNumber;
|
|
45
|
-
currency: z.ZodEnum<["NPR"]>;
|
|
45
|
+
currency: z.ZodEnum<["NPR", "USD", "INR", "GBP", "AUD", "CAD"]>;
|
|
46
46
|
gateway: z.ZodEnum<["esewa", "khalti", "fonepay", "connectips", "stripe", "cash", "bank_transfer", "cheque"]>;
|
|
47
47
|
gatewayTransactionId: z.ZodOptional<z.ZodString>;
|
|
48
48
|
gatewaySessionId: z.ZodOptional<z.ZodString>;
|
|
@@ -90,7 +90,7 @@ export declare const paymentResponseSchema: z.ZodObject<{
|
|
|
90
90
|
schoolId: string;
|
|
91
91
|
id: string;
|
|
92
92
|
amount: number;
|
|
93
|
-
currency: "NPR";
|
|
93
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
94
94
|
studentAccountId: string;
|
|
95
95
|
invoiceId: string;
|
|
96
96
|
gateway: "esewa" | "khalti" | "fonepay" | "connectips" | "stripe" | "cash" | "bank_transfer" | "cheque";
|
|
@@ -119,7 +119,7 @@ export declare const paymentResponseSchema: z.ZodObject<{
|
|
|
119
119
|
schoolId: string;
|
|
120
120
|
id: string;
|
|
121
121
|
amount: number;
|
|
122
|
-
currency: "NPR";
|
|
122
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
123
123
|
studentAccountId: string;
|
|
124
124
|
invoiceId: string;
|
|
125
125
|
gateway: "esewa" | "khalti" | "fonepay" | "connectips" | "stripe" | "cash" | "bank_transfer" | "cheque";
|
|
@@ -148,12 +148,12 @@ export declare const initiatePaymentSchema: z.ZodObject<{
|
|
|
148
148
|
invoiceId: z.ZodString;
|
|
149
149
|
gateway: z.ZodEnum<["esewa", "khalti", "fonepay", "connectips", "stripe", "cash", "bank_transfer", "cheque"]>;
|
|
150
150
|
amount: z.ZodNumber;
|
|
151
|
-
currency: z.ZodDefault<z.ZodEnum<["NPR"]>>;
|
|
151
|
+
currency: z.ZodDefault<z.ZodEnum<["NPR", "USD", "INR", "GBP", "AUD", "CAD"]>>;
|
|
152
152
|
returnUrl: z.ZodString;
|
|
153
153
|
cancelUrl: z.ZodString;
|
|
154
154
|
}, "strip", z.ZodTypeAny, {
|
|
155
155
|
amount: number;
|
|
156
|
-
currency: "NPR";
|
|
156
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
157
157
|
invoiceId: string;
|
|
158
158
|
gateway: "esewa" | "khalti" | "fonepay" | "connectips" | "stripe" | "cash" | "bank_transfer" | "cheque";
|
|
159
159
|
returnUrl: string;
|
|
@@ -164,7 +164,7 @@ export declare const initiatePaymentSchema: z.ZodObject<{
|
|
|
164
164
|
gateway: "esewa" | "khalti" | "fonepay" | "connectips" | "stripe" | "cash" | "bank_transfer" | "cheque";
|
|
165
165
|
returnUrl: string;
|
|
166
166
|
cancelUrl: string;
|
|
167
|
-
currency?: "NPR" | undefined;
|
|
167
|
+
currency?: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD" | undefined;
|
|
168
168
|
}>;
|
|
169
169
|
export type InitiatePaymentRequest = z.infer<typeof initiatePaymentSchema>;
|
|
170
170
|
/** Backend responds with redirect URL to gateway payment page */
|
|
@@ -194,14 +194,14 @@ export declare const recordManualPaymentSchema: z.ZodObject<{
|
|
|
194
194
|
invoiceId: z.ZodString;
|
|
195
195
|
gateway: z.ZodEnum<["cash", "bank_transfer", "cheque"]>;
|
|
196
196
|
amount: z.ZodNumber;
|
|
197
|
-
currency: z.ZodDefault<z.ZodEnum<["NPR"]>>;
|
|
197
|
+
currency: z.ZodDefault<z.ZodEnum<["NPR", "USD", "INR", "GBP", "AUD", "CAD"]>>;
|
|
198
198
|
referenceNumber: z.ZodOptional<z.ZodString>;
|
|
199
199
|
notes: z.ZodOptional<z.ZodString>;
|
|
200
200
|
paidDate: z.ZodOptional<z.ZodString>;
|
|
201
201
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
202
202
|
}, "strip", z.ZodTypeAny, {
|
|
203
203
|
amount: number;
|
|
204
|
-
currency: "NPR";
|
|
204
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
205
205
|
invoiceId: string;
|
|
206
206
|
gateway: "cash" | "bank_transfer" | "cheque";
|
|
207
207
|
notes?: string | undefined;
|
|
@@ -213,7 +213,7 @@ export declare const recordManualPaymentSchema: z.ZodObject<{
|
|
|
213
213
|
invoiceId: string;
|
|
214
214
|
gateway: "cash" | "bank_transfer" | "cheque";
|
|
215
215
|
notes?: string | undefined;
|
|
216
|
-
currency?: "NPR" | undefined;
|
|
216
|
+
currency?: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD" | undefined;
|
|
217
217
|
referenceNumber?: string | undefined;
|
|
218
218
|
paidDate?: string | undefined;
|
|
219
219
|
idempotencyKey?: string | undefined;
|
|
@@ -226,7 +226,7 @@ export declare const verifyPaymentResponseSchema: z.ZodObject<{
|
|
|
226
226
|
studentAccountId: z.ZodString;
|
|
227
227
|
schoolId: z.ZodString;
|
|
228
228
|
amount: z.ZodNumber;
|
|
229
|
-
currency: z.ZodEnum<["NPR"]>;
|
|
229
|
+
currency: z.ZodEnum<["NPR", "USD", "INR", "GBP", "AUD", "CAD"]>;
|
|
230
230
|
gateway: z.ZodEnum<["esewa", "khalti", "fonepay", "connectips", "stripe", "cash", "bank_transfer", "cheque"]>;
|
|
231
231
|
gatewayTransactionId: z.ZodOptional<z.ZodString>;
|
|
232
232
|
gatewaySessionId: z.ZodOptional<z.ZodString>;
|
|
@@ -274,7 +274,7 @@ export declare const verifyPaymentResponseSchema: z.ZodObject<{
|
|
|
274
274
|
schoolId: string;
|
|
275
275
|
id: string;
|
|
276
276
|
amount: number;
|
|
277
|
-
currency: "NPR";
|
|
277
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
278
278
|
studentAccountId: string;
|
|
279
279
|
invoiceId: string;
|
|
280
280
|
gateway: "esewa" | "khalti" | "fonepay" | "connectips" | "stripe" | "cash" | "bank_transfer" | "cheque";
|
|
@@ -303,7 +303,7 @@ export declare const verifyPaymentResponseSchema: z.ZodObject<{
|
|
|
303
303
|
schoolId: string;
|
|
304
304
|
id: string;
|
|
305
305
|
amount: number;
|
|
306
|
-
currency: "NPR";
|
|
306
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
307
307
|
studentAccountId: string;
|
|
308
308
|
invoiceId: string;
|
|
309
309
|
gateway: "esewa" | "khalti" | "fonepay" | "connectips" | "stripe" | "cash" | "bank_transfer" | "cheque";
|
|
@@ -357,7 +357,7 @@ export declare const verifyPaymentResponseSchema: z.ZodObject<{
|
|
|
357
357
|
schoolPhone: z.ZodOptional<z.ZodString>;
|
|
358
358
|
paidDate: z.ZodString;
|
|
359
359
|
amount: z.ZodNumber;
|
|
360
|
-
currency: z.ZodEnum<["NPR"]>;
|
|
360
|
+
currency: z.ZodEnum<["NPR", "USD", "INR", "GBP", "AUD", "CAD"]>;
|
|
361
361
|
gateway: z.ZodEnum<["esewa", "khalti", "fonepay", "connectips", "stripe", "cash", "bank_transfer", "cheque"]>;
|
|
362
362
|
gatewayDisplayName: z.ZodString;
|
|
363
363
|
lineItems: z.ZodArray<z.ZodObject<{
|
|
@@ -403,7 +403,7 @@ export declare const verifyPaymentResponseSchema: z.ZodObject<{
|
|
|
403
403
|
studentId: string;
|
|
404
404
|
studentName: string;
|
|
405
405
|
amount: number;
|
|
406
|
-
currency: "NPR";
|
|
406
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
407
407
|
invoiceNumber: string;
|
|
408
408
|
lineItems: {
|
|
409
409
|
total: number;
|
|
@@ -436,7 +436,7 @@ export declare const verifyPaymentResponseSchema: z.ZodObject<{
|
|
|
436
436
|
studentId: string;
|
|
437
437
|
studentName: string;
|
|
438
438
|
amount: number;
|
|
439
|
-
currency: "NPR";
|
|
439
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
440
440
|
invoiceNumber: string;
|
|
441
441
|
lineItems: {
|
|
442
442
|
total: number;
|
|
@@ -482,7 +482,7 @@ export declare const verifyPaymentResponseSchema: z.ZodObject<{
|
|
|
482
482
|
schoolId: string;
|
|
483
483
|
id: string;
|
|
484
484
|
amount: number;
|
|
485
|
-
currency: "NPR";
|
|
485
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
486
486
|
studentAccountId: string;
|
|
487
487
|
invoiceId: string;
|
|
488
488
|
gateway: "esewa" | "khalti" | "fonepay" | "connectips" | "stripe" | "cash" | "bank_transfer" | "cheque";
|
|
@@ -510,7 +510,7 @@ export declare const verifyPaymentResponseSchema: z.ZodObject<{
|
|
|
510
510
|
studentId: string;
|
|
511
511
|
studentName: string;
|
|
512
512
|
amount: number;
|
|
513
|
-
currency: "NPR";
|
|
513
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
514
514
|
invoiceNumber: string;
|
|
515
515
|
lineItems: {
|
|
516
516
|
total: number;
|
|
@@ -555,7 +555,7 @@ export declare const verifyPaymentResponseSchema: z.ZodObject<{
|
|
|
555
555
|
schoolId: string;
|
|
556
556
|
id: string;
|
|
557
557
|
amount: number;
|
|
558
|
-
currency: "NPR";
|
|
558
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
559
559
|
studentAccountId: string;
|
|
560
560
|
invoiceId: string;
|
|
561
561
|
gateway: "esewa" | "khalti" | "fonepay" | "connectips" | "stripe" | "cash" | "bank_transfer" | "cheque";
|
|
@@ -583,7 +583,7 @@ export declare const verifyPaymentResponseSchema: z.ZodObject<{
|
|
|
583
583
|
studentId: string;
|
|
584
584
|
studentName: string;
|
|
585
585
|
amount: number;
|
|
586
|
-
currency: "NPR";
|
|
586
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
587
587
|
invoiceNumber: string;
|
|
588
588
|
lineItems: {
|
|
589
589
|
total: number;
|
|
@@ -661,7 +661,7 @@ export declare const receiptSchema: z.ZodObject<{
|
|
|
661
661
|
schoolPhone: z.ZodOptional<z.ZodString>;
|
|
662
662
|
paidDate: z.ZodString;
|
|
663
663
|
amount: z.ZodNumber;
|
|
664
|
-
currency: z.ZodEnum<["NPR"]>;
|
|
664
|
+
currency: z.ZodEnum<["NPR", "USD", "INR", "GBP", "AUD", "CAD"]>;
|
|
665
665
|
gateway: z.ZodEnum<["esewa", "khalti", "fonepay", "connectips", "stripe", "cash", "bank_transfer", "cheque"]>;
|
|
666
666
|
gatewayDisplayName: z.ZodString;
|
|
667
667
|
lineItems: z.ZodArray<z.ZodObject<{
|
|
@@ -707,7 +707,7 @@ export declare const receiptSchema: z.ZodObject<{
|
|
|
707
707
|
studentId: string;
|
|
708
708
|
studentName: string;
|
|
709
709
|
amount: number;
|
|
710
|
-
currency: "NPR";
|
|
710
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
711
711
|
invoiceNumber: string;
|
|
712
712
|
lineItems: {
|
|
713
713
|
total: number;
|
|
@@ -740,7 +740,7 @@ export declare const receiptSchema: z.ZodObject<{
|
|
|
740
740
|
studentId: string;
|
|
741
741
|
studentName: string;
|
|
742
742
|
amount: number;
|
|
743
|
-
currency: "NPR";
|
|
743
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
744
744
|
invoiceNumber: string;
|
|
745
745
|
lineItems: {
|
|
746
746
|
total: number;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Refund Request Schemas
|
|
3
|
+
*
|
|
4
|
+
* Governed refund workflow: requested → pending_approval → approved → processing → completed | rejected
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export declare const refundStatusEnum: z.ZodEnum<["requested", "pending_approval", "approved", "processing", "completed", "rejected"]>;
|
|
8
|
+
export type RefundStatus = z.infer<typeof refundStatusEnum>;
|
|
9
|
+
export declare const refundRequestResponseSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
paymentId: z.ZodString;
|
|
12
|
+
invoiceId: z.ZodString;
|
|
13
|
+
studentId: z.ZodString;
|
|
14
|
+
schoolId: z.ZodString;
|
|
15
|
+
amount: z.ZodNumber;
|
|
16
|
+
currency: z.ZodEnum<["NPR", "USD", "INR", "GBP", "AUD", "CAD"]>;
|
|
17
|
+
reason: z.ZodString;
|
|
18
|
+
requestedBy: z.ZodString;
|
|
19
|
+
requestedAt: z.ZodString;
|
|
20
|
+
status: z.ZodEnum<["requested", "pending_approval", "approved", "processing", "completed", "rejected"]>;
|
|
21
|
+
approvedBy: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
approvedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
rejectedReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
24
|
+
processedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
25
|
+
gatewayRefundId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
26
|
+
createdAt: z.ZodString;
|
|
27
|
+
updatedAt: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
status: "completed" | "rejected" | "approved" | "processing" | "requested" | "pending_approval";
|
|
30
|
+
createdAt: string;
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
schoolId: string;
|
|
33
|
+
reason: string;
|
|
34
|
+
studentId: string;
|
|
35
|
+
id: string;
|
|
36
|
+
amount: number;
|
|
37
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
38
|
+
paymentId: string;
|
|
39
|
+
invoiceId: string;
|
|
40
|
+
requestedBy: string;
|
|
41
|
+
requestedAt: string;
|
|
42
|
+
approvedBy?: string | null | undefined;
|
|
43
|
+
approvedAt?: string | null | undefined;
|
|
44
|
+
gatewayRefundId?: string | null | undefined;
|
|
45
|
+
rejectedReason?: string | null | undefined;
|
|
46
|
+
processedAt?: string | null | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
status: "completed" | "rejected" | "approved" | "processing" | "requested" | "pending_approval";
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
schoolId: string;
|
|
52
|
+
reason: string;
|
|
53
|
+
studentId: string;
|
|
54
|
+
id: string;
|
|
55
|
+
amount: number;
|
|
56
|
+
currency: "NPR" | "USD" | "INR" | "GBP" | "CAD" | "AUD";
|
|
57
|
+
paymentId: string;
|
|
58
|
+
invoiceId: string;
|
|
59
|
+
requestedBy: string;
|
|
60
|
+
requestedAt: string;
|
|
61
|
+
approvedBy?: string | null | undefined;
|
|
62
|
+
approvedAt?: string | null | undefined;
|
|
63
|
+
gatewayRefundId?: string | null | undefined;
|
|
64
|
+
rejectedReason?: string | null | undefined;
|
|
65
|
+
processedAt?: string | null | undefined;
|
|
66
|
+
}>;
|
|
67
|
+
export type RefundRequest = z.infer<typeof refundRequestResponseSchema>;
|
|
68
|
+
export declare const createRefundRequestSchema: z.ZodObject<{
|
|
69
|
+
paymentId: z.ZodString;
|
|
70
|
+
invoiceId: z.ZodString;
|
|
71
|
+
amount: z.ZodNumber;
|
|
72
|
+
reason: z.ZodString;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
reason: string;
|
|
75
|
+
amount: number;
|
|
76
|
+
paymentId: string;
|
|
77
|
+
invoiceId: string;
|
|
78
|
+
}, {
|
|
79
|
+
reason: string;
|
|
80
|
+
amount: number;
|
|
81
|
+
paymentId: string;
|
|
82
|
+
invoiceId: string;
|
|
83
|
+
}>;
|
|
84
|
+
export type CreateRefundRequestDto = z.infer<typeof createRefundRequestSchema>;
|
|
85
|
+
export declare const approveRefundSchema: z.ZodObject<{
|
|
86
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
notes?: string | undefined;
|
|
89
|
+
}, {
|
|
90
|
+
notes?: string | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
export declare const rejectRefundSchema: z.ZodObject<{
|
|
93
|
+
reason: z.ZodString;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
reason: string;
|
|
96
|
+
}, {
|
|
97
|
+
reason: string;
|
|
98
|
+
}>;
|
|
99
|
+
//# sourceMappingURL=refund.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refund.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/finance/refund.schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gBAAgB,iGAE3B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE5D,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBtC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAExE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;EAKpC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE/E,eAAO,MAAM,mBAAmB;;;;;;EAE9B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;EAE7B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Refund Request Schemas
|
|
4
|
+
*
|
|
5
|
+
* Governed refund workflow: requested → pending_approval → approved → processing → completed | rejected
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.rejectRefundSchema = exports.approveRefundSchema = exports.createRefundRequestSchema = exports.refundRequestResponseSchema = exports.refundStatusEnum = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const common_1 = require("./common");
|
|
11
|
+
const common_2 = require("../common");
|
|
12
|
+
exports.refundStatusEnum = zod_1.z.enum([
|
|
13
|
+
'requested', 'pending_approval', 'approved', 'processing', 'completed', 'rejected',
|
|
14
|
+
]);
|
|
15
|
+
exports.refundRequestResponseSchema = zod_1.z.object({
|
|
16
|
+
id: common_2.uuidSchema,
|
|
17
|
+
paymentId: common_2.uuidSchema,
|
|
18
|
+
invoiceId: common_2.uuidSchema,
|
|
19
|
+
studentId: common_2.uuidSchema,
|
|
20
|
+
schoolId: common_2.uuidSchema,
|
|
21
|
+
amount: common_1.amountSchema,
|
|
22
|
+
currency: common_1.currencyEnum,
|
|
23
|
+
reason: zod_1.z.string(),
|
|
24
|
+
requestedBy: zod_1.z.string(),
|
|
25
|
+
requestedAt: zod_1.z.string(),
|
|
26
|
+
status: exports.refundStatusEnum,
|
|
27
|
+
approvedBy: zod_1.z.string().optional().nullable(),
|
|
28
|
+
approvedAt: zod_1.z.string().optional().nullable(),
|
|
29
|
+
rejectedReason: zod_1.z.string().optional().nullable(),
|
|
30
|
+
processedAt: zod_1.z.string().optional().nullable(),
|
|
31
|
+
gatewayRefundId: zod_1.z.string().optional().nullable(),
|
|
32
|
+
createdAt: zod_1.z.string(),
|
|
33
|
+
updatedAt: zod_1.z.string(),
|
|
34
|
+
});
|
|
35
|
+
exports.createRefundRequestSchema = zod_1.z.object({
|
|
36
|
+
paymentId: common_2.uuidSchema,
|
|
37
|
+
invoiceId: common_2.uuidSchema,
|
|
38
|
+
amount: common_1.amountSchema.positive('Refund amount must be greater than 0'),
|
|
39
|
+
reason: zod_1.z.string().min(1).max(500),
|
|
40
|
+
});
|
|
41
|
+
exports.approveRefundSchema = zod_1.z.object({
|
|
42
|
+
notes: zod_1.z.string().max(500).optional(),
|
|
43
|
+
});
|
|
44
|
+
exports.rejectRefundSchema = zod_1.z.object({
|
|
45
|
+
reason: zod_1.z.string().min(1).max(500),
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=refund.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refund.schema.js","sourceRoot":"","sources":["../../../src/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