@aibrains/shared-types 0.9.2 → 0.10.1

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.
Files changed (41) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +6 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/schemas/finance/common.d.ts +41 -0
  6. package/dist/schemas/finance/common.d.ts.map +1 -0
  7. package/dist/schemas/finance/common.js +105 -0
  8. package/dist/schemas/finance/common.js.map +1 -0
  9. package/dist/schemas/finance/fee-structure.schema.d.ts +163 -0
  10. package/dist/schemas/finance/fee-structure.schema.d.ts.map +1 -0
  11. package/dist/schemas/finance/fee-structure.schema.js +78 -0
  12. package/dist/schemas/finance/fee-structure.schema.js.map +1 -0
  13. package/dist/schemas/finance/index.d.ts +12 -0
  14. package/dist/schemas/finance/index.d.ts.map +1 -0
  15. package/dist/schemas/finance/index.js +28 -0
  16. package/dist/schemas/finance/index.js.map +1 -0
  17. package/dist/schemas/finance/invoice.schema.d.ts +301 -0
  18. package/dist/schemas/finance/invoice.schema.d.ts.map +1 -0
  19. package/dist/schemas/finance/invoice.schema.js +107 -0
  20. package/dist/schemas/finance/invoice.schema.js.map +1 -0
  21. package/dist/schemas/finance/payment-gateway.schema.d.ts +84 -0
  22. package/dist/schemas/finance/payment-gateway.schema.d.ts.map +1 -0
  23. package/dist/schemas/finance/payment-gateway.schema.js +41 -0
  24. package/dist/schemas/finance/payment-gateway.schema.js.map +1 -0
  25. package/dist/schemas/finance/payment.schema.d.ts +794 -0
  26. package/dist/schemas/finance/payment.schema.d.ts.map +1 -0
  27. package/dist/schemas/finance/payment.schema.js +170 -0
  28. package/dist/schemas/finance/payment.schema.js.map +1 -0
  29. package/dist/schemas/finance/student-account.schema.d.ts +89 -0
  30. package/dist/schemas/finance/student-account.schema.d.ts.map +1 -0
  31. package/dist/schemas/finance/student-account.schema.js +50 -0
  32. package/dist/schemas/finance/student-account.schema.js.map +1 -0
  33. package/dist/schemas/index.d.ts +1 -0
  34. package/dist/schemas/index.d.ts.map +1 -1
  35. package/dist/schemas/index.js +1 -0
  36. package/dist/schemas/index.js.map +1 -1
  37. package/dist/utils/currency.d.ts +23 -0
  38. package/dist/utils/currency.d.ts.map +1 -0
  39. package/dist/utils/currency.js +45 -0
  40. package/dist/utils/currency.js.map +1 -0
  41. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -44,5 +44,6 @@ export type { ZodSchema, ZodType, ZodError } from 'zod';
44
44
  export * from './validators';
45
45
  export * from './schemas';
46
46
  export * from './mappers';
47
+ export { formatNPR } from './utils/currency';
47
48
  export type { BaseEntity, RequestContext, Address, EntityStatus, PaginationQuery, ErrorResponse, } from './schemas/common';
48
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAMxD,cAAc,cAAc,CAAC;AAM7B,cAAc,WAAW,CAAC;AAM1B,cAAc,WAAW,CAAC;AAQ1B,YAAY,EACV,UAAU,EACV,cAAc,EACd,OAAO,EACP,YAAY,EACZ,eAAe,EACf,aAAa,GACd,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAMxD,cAAc,cAAc,CAAC;AAM7B,cAAc,WAAW,CAAC;AAM1B,cAAc,WAAW,CAAC;AAM1B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAQ7C,YAAY,EACV,UAAU,EACV,cAAc,EACd,OAAO,EACP,YAAY,EACZ,eAAe,EACf,aAAa,GACd,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -55,7 +55,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
55
55
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
56
56
  };
57
57
  Object.defineProperty(exports, "__esModule", { value: true });
58
- exports.z = void 0;
58
+ exports.formatNPR = exports.z = void 0;
59
59
  // Re-export Zod for convenience
60
60
  var zod_1 = require("zod");
61
61
  Object.defineProperty(exports, "z", { enumerable: true, get: function () { return zod_1.z; } });
@@ -71,4 +71,9 @@ __exportStar(require("./schemas"), exports);
71
71
  // Ed-Fi Mappers (for compliance export)
72
72
  // ============================================
73
73
  __exportStar(require("./mappers"), exports);
74
+ // ============================================
75
+ // Utility Functions
76
+ // ============================================
77
+ var currency_1 = require("./utils/currency");
78
+ Object.defineProperty(exports, "formatNPR", { enumerable: true, get: function () { return currency_1.formatNPR; } });
74
79
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;;;;;;;;;;;;;;;;;AAEH,gCAAgC;AAChC,2BAAwB;AAAf,wFAAA,CAAC,OAAA;AAGV,+CAA+C;AAC/C,aAAa;AACb,+CAA+C;AAE/C,+CAA6B;AAE7B,+CAA+C;AAC/C,wBAAwB;AACxB,+CAA+C;AAE/C,4CAA0B;AAE1B,+CAA+C;AAC/C,wCAAwC;AACxC,+CAA+C;AAE/C,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;;;;;;;;;;;;;;;;;AAEH,gCAAgC;AAChC,2BAAwB;AAAf,wFAAA,CAAC,OAAA;AAGV,+CAA+C;AAC/C,aAAa;AACb,+CAA+C;AAE/C,+CAA6B;AAE7B,+CAA+C;AAC/C,wBAAwB;AACxB,+CAA+C;AAE/C,4CAA0B;AAE1B,+CAA+C;AAC/C,wCAAwC;AACxC,+CAA+C;AAE/C,4CAA0B;AAE1B,+CAA+C;AAC/C,oBAAoB;AACpB,+CAA+C;AAE/C,6CAA6C;AAApC,qGAAA,SAAS,OAAA"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Finance Domain — Common Enums & Base Types
3
+ *
4
+ * Shared across fee-structure, invoice, payment, student-account,
5
+ * and payment-gateway schemas.
6
+ */
7
+ import { z } from 'zod';
8
+ /** Fee categories aligned with Nepal school fee taxonomy */
9
+ export declare const feeTypeEnum: z.ZodEnum<["tuition", "admission", "exam", "transport", "library", "lab", "hostel", "uniform", "miscellaneous", "custom"]>;
10
+ export type FeeType = z.infer<typeof feeTypeEnum>;
11
+ /** How often the fee is charged */
12
+ export declare const feeFrequencyEnum: z.ZodEnum<["one_time", "monthly", "quarterly", "annual"]>;
13
+ export type FeeFrequency = z.infer<typeof feeFrequencyEnum>;
14
+ /** Nepal tax registration types */
15
+ export declare const taxTypeEnum: z.ZodEnum<["PAN", "VAT", "none"]>;
16
+ export type TaxType = z.infer<typeof taxTypeEnum>;
17
+ /** Invoice lifecycle: draft → issued → partially_paid → paid → overdue → cancelled → written_off */
18
+ export declare const invoiceStatusEnum: z.ZodEnum<["draft", "issued", "partially_paid", "paid", "overdue", "cancelled", "written_off"]>;
19
+ export type InvoiceStatus = z.infer<typeof invoiceStatusEnum>;
20
+ /** Payment lifecycle: pending → processing → completed | failed | cancelled → refunded */
21
+ export declare const paymentStatusEnum: z.ZodEnum<["pending", "processing", "completed", "failed", "cancelled", "refunded", "partially_refunded"]>;
22
+ export type PaymentStatus = z.infer<typeof paymentStatusEnum>;
23
+ /** Supported payment gateways */
24
+ export declare const paymentGatewayEnum: z.ZodEnum<["esewa", "khalti", "fonepay", "connectips", "stripe", "cash", "bank_transfer", "cheque"]>;
25
+ export type PaymentGateway = z.infer<typeof paymentGatewayEnum>;
26
+ /** Manual (offline) payment methods that don't require gateway redirect */
27
+ export declare const OFFLINE_GATEWAYS: ReadonlySet<PaymentGateway>;
28
+ export declare const ledgerEntryTypeEnum: z.ZodEnum<["invoice", "payment", "refund", "adjustment", "write_off"]>;
29
+ export type LedgerEntryType = z.infer<typeof ledgerEntryTypeEnum>;
30
+ /** Supported currencies (extensible without breaking change) */
31
+ export declare const currencyEnum: z.ZodEnum<["NPR"]>;
32
+ export type Currency = z.infer<typeof currencyEnum>;
33
+ /** Positive monetary amount (NPR, max 10 million) */
34
+ export declare const amountSchema: z.ZodNumber;
35
+ /** Monetary amount that can be zero (max 10 million) */
36
+ export declare const amountOrZeroSchema: z.ZodNumber;
37
+ /** Tax rate as percentage (0–100) */
38
+ export declare const taxRateSchema: z.ZodDefault<z.ZodNumber>;
39
+ /** Discount amount (non-negative, max 10 million) */
40
+ export declare const discountAmountSchema: z.ZodDefault<z.ZodNumber>;
41
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/schemas/finance/common.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,4DAA4D;AAC5D,eAAO,MAAM,WAAW,4HAWtB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAElD,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,2DAK3B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,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account,
6
+ * and payment-gateway schemas.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.discountAmountSchema = exports.taxRateSchema = exports.amountOrZeroSchema = exports.amountSchema = exports.currencyEnum = exports.ledgerEntryTypeEnum = exports.OFFLINE_GATEWAYS = exports.paymentGatewayEnum = exports.paymentStatusEnum = exports.invoiceStatusEnum = exports.taxTypeEnum = exports.feeFrequencyEnum = exports.feeTypeEnum = void 0;
10
+ const zod_1 = require("zod");
11
+ // ============================================================================
12
+ // FEE ENUMS
13
+ // ============================================================================
14
+ /** Fee categories aligned with Nepal school fee taxonomy */
15
+ exports.feeTypeEnum = zod_1.z.enum([
16
+ 'tuition',
17
+ 'admission',
18
+ 'exam',
19
+ 'transport',
20
+ 'library',
21
+ 'lab',
22
+ 'hostel',
23
+ 'uniform',
24
+ 'miscellaneous',
25
+ 'custom',
26
+ ]);
27
+ /** How often the fee is charged */
28
+ exports.feeFrequencyEnum = zod_1.z.enum([
29
+ 'one_time',
30
+ 'monthly',
31
+ 'quarterly',
32
+ 'annual',
33
+ ]);
34
+ // ============================================================================
35
+ // TAX ENUMS
36
+ // ============================================================================
37
+ /** Nepal tax registration types */
38
+ exports.taxTypeEnum = zod_1.z.enum(['PAN', 'VAT', 'none']);
39
+ // ============================================================================
40
+ // INVOICE ENUMS
41
+ // ============================================================================
42
+ /** Invoice lifecycle: draft → issued → partially_paid → paid → overdue → cancelled → written_off */
43
+ exports.invoiceStatusEnum = zod_1.z.enum([
44
+ 'draft',
45
+ 'issued',
46
+ 'partially_paid',
47
+ 'paid',
48
+ 'overdue',
49
+ 'cancelled',
50
+ 'written_off',
51
+ ]);
52
+ // ============================================================================
53
+ // PAYMENT ENUMS
54
+ // ============================================================================
55
+ /** Payment lifecycle: pending → processing → completed | failed | cancelled → refunded */
56
+ exports.paymentStatusEnum = zod_1.z.enum([
57
+ 'pending',
58
+ 'processing',
59
+ 'completed',
60
+ 'failed',
61
+ 'cancelled',
62
+ 'refunded',
63
+ 'partially_refunded',
64
+ ]);
65
+ /** Supported payment gateways */
66
+ exports.paymentGatewayEnum = zod_1.z.enum([
67
+ 'esewa',
68
+ 'khalti',
69
+ 'fonepay',
70
+ 'connectips',
71
+ 'stripe',
72
+ 'cash',
73
+ 'bank_transfer',
74
+ 'cheque',
75
+ ]);
76
+ /** Manual (offline) payment methods that don't require gateway redirect */
77
+ exports.OFFLINE_GATEWAYS = new Set([
78
+ 'cash',
79
+ 'bank_transfer',
80
+ 'cheque',
81
+ ]);
82
+ // ============================================================================
83
+ // LEDGER ENUMS
84
+ // ============================================================================
85
+ exports.ledgerEntryTypeEnum = zod_1.z.enum([
86
+ 'invoice',
87
+ 'payment',
88
+ 'refund',
89
+ 'adjustment',
90
+ 'write_off',
91
+ ]);
92
+ // ============================================================================
93
+ // CURRENCY
94
+ // ============================================================================
95
+ /** Supported currencies (extensible without breaking change) */
96
+ exports.currencyEnum = zod_1.z.enum(['NPR']);
97
+ /** Positive monetary amount (NPR, max 10 million) */
98
+ exports.amountSchema = zod_1.z.number().min(0).max(10000000);
99
+ /** Monetary amount that can be zero (max 10 million) */
100
+ exports.amountOrZeroSchema = zod_1.z.number().min(0).max(10000000);
101
+ /** Tax rate as percentage (0–100) */
102
+ exports.taxRateSchema = zod_1.z.number().min(0).max(100).default(0);
103
+ /** Discount amount (non-negative, max 10 million) */
104
+ exports.discountAmountSchema = zod_1.z.number().min(0).max(10000000).default(0);
105
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/schemas/finance/common.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAwB;AAExB,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,4DAA4D;AAC/C,QAAA,WAAW,GAAG,OAAC,CAAC,IAAI,CAAC;IAChC,SAAS;IACT,WAAW;IACX,MAAM;IACN,WAAW;IACX,SAAS;IACT,KAAK;IACL,QAAQ;IACR,SAAS;IACT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,+EAA+E;AAE/E,gEAAgE;AACnD,QAAA,YAAY,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAG5C,qDAAqD;AACxC,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAU,CAAC,CAAC;AAE9D,wDAAwD;AAC3C,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAU,CAAC,CAAC;AAEpE,qCAAqC;AACxB,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAEnE,qDAAqD;AACxC,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * Fee Structure Schemas
3
+ *
4
+ * Defines billable items a school charges students.
5
+ * Admin configures these; the system generates invoices from them.
6
+ */
7
+ import { z } from 'zod';
8
+ export declare const feeStructureResponseSchema: z.ZodObject<{
9
+ id: z.ZodString;
10
+ schoolId: z.ZodString;
11
+ name: z.ZodString;
12
+ description: z.ZodOptional<z.ZodString>;
13
+ academicYear: z.ZodString;
14
+ feeType: z.ZodEnum<["tuition", "admission", "exam", "transport", "library", "lab", "hostel", "uniform", "miscellaneous", "custom"]>;
15
+ amount: z.ZodNumber;
16
+ currency: z.ZodEnum<["NPR"]>;
17
+ taxRate: z.ZodNumber;
18
+ taxType: z.ZodEnum<["PAN", "VAT", "none"]>;
19
+ frequency: z.ZodEnum<["one_time", "monthly", "quarterly", "annual"]>;
20
+ gradeLevels: z.ZodArray<z.ZodString, "many">;
21
+ isActive: z.ZodBoolean;
22
+ effectiveFrom: z.ZodString;
23
+ effectiveTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
24
+ createdAt: z.ZodString;
25
+ updatedAt: z.ZodString;
26
+ }, "strip", z.ZodTypeAny, {
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ name: string;
30
+ gradeLevels: string[];
31
+ schoolId: string;
32
+ isActive: boolean;
33
+ id: string;
34
+ academicYear: string;
35
+ feeType: "custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous";
36
+ amount: number;
37
+ currency: "NPR";
38
+ taxRate: number;
39
+ taxType: "none" | "PAN" | "VAT";
40
+ frequency: "annual" | "one_time" | "monthly" | "quarterly";
41
+ effectiveFrom: string;
42
+ description?: string | undefined;
43
+ effectiveTo?: string | null | undefined;
44
+ }, {
45
+ createdAt: string;
46
+ updatedAt: string;
47
+ name: string;
48
+ gradeLevels: string[];
49
+ schoolId: string;
50
+ isActive: boolean;
51
+ id: string;
52
+ academicYear: string;
53
+ feeType: "custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous";
54
+ amount: number;
55
+ currency: "NPR";
56
+ taxRate: number;
57
+ taxType: "none" | "PAN" | "VAT";
58
+ frequency: "annual" | "one_time" | "monthly" | "quarterly";
59
+ effectiveFrom: string;
60
+ description?: string | undefined;
61
+ effectiveTo?: string | null | undefined;
62
+ }>;
63
+ export type FeeStructure = z.infer<typeof feeStructureResponseSchema>;
64
+ export declare const createFeeStructureSchema: z.ZodObject<{
65
+ name: z.ZodString;
66
+ description: z.ZodOptional<z.ZodString>;
67
+ academicYear: z.ZodString;
68
+ feeType: z.ZodEnum<["tuition", "admission", "exam", "transport", "library", "lab", "hostel", "uniform", "miscellaneous", "custom"]>;
69
+ amount: z.ZodNumber;
70
+ currency: z.ZodDefault<z.ZodEnum<["NPR"]>>;
71
+ taxRate: z.ZodDefault<z.ZodNumber>;
72
+ taxType: z.ZodDefault<z.ZodEnum<["PAN", "VAT", "none"]>>;
73
+ frequency: z.ZodEnum<["one_time", "monthly", "quarterly", "annual"]>;
74
+ gradeLevels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
75
+ effectiveFrom: z.ZodEffects<z.ZodString, string, string>;
76
+ effectiveTo: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ name: string;
79
+ gradeLevels: string[];
80
+ academicYear: string;
81
+ feeType: "custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous";
82
+ amount: number;
83
+ currency: "NPR";
84
+ taxRate: number;
85
+ taxType: "none" | "PAN" | "VAT";
86
+ frequency: "annual" | "one_time" | "monthly" | "quarterly";
87
+ effectiveFrom: string;
88
+ description?: string | undefined;
89
+ effectiveTo?: string | undefined;
90
+ }, {
91
+ name: string;
92
+ academicYear: string;
93
+ feeType: "custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous";
94
+ amount: number;
95
+ frequency: "annual" | "one_time" | "monthly" | "quarterly";
96
+ effectiveFrom: string;
97
+ gradeLevels?: string[] | undefined;
98
+ description?: string | undefined;
99
+ currency?: "NPR" | undefined;
100
+ taxRate?: number | undefined;
101
+ taxType?: "none" | "PAN" | "VAT" | undefined;
102
+ effectiveTo?: string | undefined;
103
+ }>;
104
+ export type CreateFeeStructureDto = z.infer<typeof createFeeStructureSchema>;
105
+ export declare const updateFeeStructureSchema: z.ZodObject<{
106
+ name: z.ZodOptional<z.ZodString>;
107
+ description: z.ZodOptional<z.ZodString>;
108
+ amount: z.ZodOptional<z.ZodNumber>;
109
+ taxRate: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
110
+ taxType: z.ZodOptional<z.ZodEnum<["PAN", "VAT", "none"]>>;
111
+ frequency: z.ZodOptional<z.ZodEnum<["one_time", "monthly", "quarterly", "annual"]>>;
112
+ gradeLevels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
113
+ isActive: z.ZodOptional<z.ZodBoolean>;
114
+ effectiveFrom: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
115
+ effectiveTo: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ name?: string | undefined;
118
+ gradeLevels?: string[] | undefined;
119
+ isActive?: boolean | undefined;
120
+ description?: string | undefined;
121
+ amount?: number | undefined;
122
+ taxRate?: number | undefined;
123
+ taxType?: "none" | "PAN" | "VAT" | undefined;
124
+ frequency?: "annual" | "one_time" | "monthly" | "quarterly" | undefined;
125
+ effectiveFrom?: string | undefined;
126
+ effectiveTo?: string | null | undefined;
127
+ }, {
128
+ name?: string | undefined;
129
+ gradeLevels?: string[] | undefined;
130
+ isActive?: boolean | undefined;
131
+ description?: string | undefined;
132
+ amount?: number | undefined;
133
+ taxRate?: number | undefined;
134
+ taxType?: "none" | "PAN" | "VAT" | undefined;
135
+ frequency?: "annual" | "one_time" | "monthly" | "quarterly" | undefined;
136
+ effectiveFrom?: string | undefined;
137
+ effectiveTo?: string | null | undefined;
138
+ }>;
139
+ export type UpdateFeeStructureDto = z.infer<typeof updateFeeStructureSchema>;
140
+ export declare const feeStructureFilterSchema: z.ZodObject<{
141
+ feeType: z.ZodOptional<z.ZodEnum<["tuition", "admission", "exam", "transport", "library", "lab", "hostel", "uniform", "miscellaneous", "custom"]>>;
142
+ frequency: z.ZodOptional<z.ZodEnum<["one_time", "monthly", "quarterly", "annual"]>>;
143
+ academicYear: z.ZodOptional<z.ZodString>;
144
+ gradeLevel: z.ZodOptional<z.ZodString>;
145
+ isActive: z.ZodOptional<z.ZodBoolean>;
146
+ searchTerm: z.ZodOptional<z.ZodString>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ isActive?: boolean | undefined;
149
+ gradeLevel?: string | undefined;
150
+ searchTerm?: string | undefined;
151
+ academicYear?: string | undefined;
152
+ feeType?: "custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous" | undefined;
153
+ frequency?: "annual" | "one_time" | "monthly" | "quarterly" | undefined;
154
+ }, {
155
+ isActive?: boolean | undefined;
156
+ gradeLevel?: string | undefined;
157
+ searchTerm?: string | undefined;
158
+ academicYear?: string | undefined;
159
+ feeType?: "custom" | "lab" | "library" | "exam" | "tuition" | "admission" | "transport" | "hostel" | "uniform" | "miscellaneous" | undefined;
160
+ frequency?: "annual" | "one_time" | "monthly" | "quarterly" | undefined;
161
+ }>;
162
+ export type FeeStructureFilterDto = z.infer<typeof feeStructureFilterSchema>;
163
+ //# sourceMappingURL=fee-structure.schema.d.ts.map
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBrC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAMtE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAanC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM7E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWnC,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"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ /**
3
+ * Fee Structure Schemas
4
+ *
5
+ * Defines billable items a school charges students.
6
+ * Admin configures these; the system generates invoices from them.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.feeStructureFilterSchema = exports.updateFeeStructureSchema = exports.createFeeStructureSchema = exports.feeStructureResponseSchema = void 0;
10
+ const zod_1 = require("zod");
11
+ const common_1 = require("./common");
12
+ const common_2 = require("../common");
13
+ // ============================================================================
14
+ // RESPONSE
15
+ // ============================================================================
16
+ exports.feeStructureResponseSchema = zod_1.z.object({
17
+ id: common_2.uuidSchema,
18
+ schoolId: common_2.uuidSchema,
19
+ name: zod_1.z.string(),
20
+ description: zod_1.z.string().optional(),
21
+ academicYear: zod_1.z.string(),
22
+ feeType: common_1.feeTypeEnum,
23
+ amount: common_1.amountSchema,
24
+ currency: common_1.currencyEnum,
25
+ taxRate: zod_1.z.number().min(0).max(100),
26
+ taxType: common_1.taxTypeEnum,
27
+ frequency: common_1.feeFrequencyEnum,
28
+ gradeLevels: zod_1.z.array(zod_1.z.string()),
29
+ isActive: zod_1.z.boolean(),
30
+ effectiveFrom: zod_1.z.string(),
31
+ effectiveTo: zod_1.z.string().optional().nullable(),
32
+ createdAt: zod_1.z.string(),
33
+ updatedAt: zod_1.z.string(),
34
+ });
35
+ // ============================================================================
36
+ // CREATE
37
+ // ============================================================================
38
+ exports.createFeeStructureSchema = zod_1.z.object({
39
+ name: zod_1.z.string().min(1).max(200),
40
+ description: zod_1.z.string().max(1000).optional(),
41
+ academicYear: zod_1.z.string().min(1).max(20),
42
+ feeType: common_1.feeTypeEnum,
43
+ amount: common_1.amountSchema.positive('Amount must be greater than 0'),
44
+ currency: common_1.currencyEnum.default('NPR'),
45
+ taxRate: common_1.taxRateSchema,
46
+ taxType: common_1.taxTypeEnum.default('none'),
47
+ frequency: common_1.feeFrequencyEnum,
48
+ gradeLevels: zod_1.z.array(zod_1.z.string().min(1).max(10)).default([]),
49
+ effectiveFrom: common_2.dateSchema,
50
+ effectiveTo: common_2.dateSchema.optional(),
51
+ });
52
+ // ============================================================================
53
+ // UPDATE
54
+ // ============================================================================
55
+ exports.updateFeeStructureSchema = zod_1.z.object({
56
+ name: zod_1.z.string().min(1).max(200).optional(),
57
+ description: zod_1.z.string().max(1000).optional(),
58
+ amount: common_1.amountSchema.positive('Amount must be greater than 0').optional(),
59
+ taxRate: common_1.taxRateSchema.optional(),
60
+ taxType: common_1.taxTypeEnum.optional(),
61
+ frequency: common_1.feeFrequencyEnum.optional(),
62
+ gradeLevels: zod_1.z.array(zod_1.z.string().min(1).max(10)).optional(),
63
+ isActive: zod_1.z.boolean().optional(),
64
+ effectiveFrom: common_2.dateSchema.optional(),
65
+ effectiveTo: common_2.dateSchema.optional().nullable(),
66
+ });
67
+ // ============================================================================
68
+ // FILTER
69
+ // ============================================================================
70
+ exports.feeStructureFilterSchema = zod_1.z.object({
71
+ feeType: common_1.feeTypeEnum.optional(),
72
+ frequency: common_1.feeFrequencyEnum.optional(),
73
+ academicYear: zod_1.z.string().optional(),
74
+ gradeLevel: zod_1.z.string().optional(),
75
+ isActive: zod_1.z.coerce.boolean().optional(),
76
+ searchTerm: zod_1.z.string().max(100).optional(),
77
+ });
78
+ //# sourceMappingURL=fee-structure.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fee-structure.schema.js","sourceRoot":"","sources":["../../../src/schemas/finance/fee-structure.schema.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAwB;AACxB,qCAAiH;AACjH,sCAAkE;AAElE,+EAA+E;AAC/E,WAAW;AACX,+EAA+E;AAElE,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,EAAE,EAAE,mBAAU;IACd,QAAQ,EAAE,mBAAU;IACpB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;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T,+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"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Finance Domain Schemas
3
+ *
4
+ * Re-exports all finance-related Zod schemas and inferred types.
5
+ */
6
+ export * from './common';
7
+ export * from './fee-structure.schema';
8
+ export * from './invoice.schema';
9
+ export * from './payment.schema';
10
+ export * from './student-account.schema';
11
+ export * from './payment-gateway.schema';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * Finance Domain Schemas
4
+ *
5
+ * Re-exports all finance-related Zod schemas and inferred types.
6
+ */
7
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
+ if (k2 === undefined) k2 = k;
9
+ var desc = Object.getOwnPropertyDescriptor(m, k);
10
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
+ desc = { enumerable: true, get: function() { return m[k]; } };
12
+ }
13
+ Object.defineProperty(o, k2, desc);
14
+ }) : (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ o[k2] = m[k];
17
+ }));
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ __exportStar(require("./common"), exports);
23
+ __exportStar(require("./fee-structure.schema"), exports);
24
+ __exportStar(require("./invoice.schema"), exports);
25
+ __exportStar(require("./payment.schema"), exports);
26
+ __exportStar(require("./student-account.schema"), exports);
27
+ __exportStar(require("./payment-gateway.schema"), exports);
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}