@classytic/payroll 1.0.0 → 2.8.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.
Files changed (45) hide show
  1. package/README.md +535 -574
  2. package/dist/attendance.calculator-BZcv2iii.d.ts +336 -0
  3. package/dist/calculators/index.d.ts +4 -0
  4. package/dist/calculators/index.js +439 -0
  5. package/dist/calculators/index.js.map +1 -0
  6. package/dist/core/index.d.ts +321 -0
  7. package/dist/core/index.js +1962 -0
  8. package/dist/core/index.js.map +1 -0
  9. package/dist/error-helpers-Bm6lMny2.d.ts +740 -0
  10. package/dist/index-BKLkuSAs.d.ts +3858 -0
  11. package/dist/index.d.ts +2684 -0
  12. package/dist/index.js +11454 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/payroll-states-DBt0XVm-.d.ts +598 -0
  15. package/dist/prorating.calculator-C33fWBQf.d.ts +135 -0
  16. package/dist/schemas/index.d.ts +4 -0
  17. package/dist/schemas/index.js +1472 -0
  18. package/dist/schemas/index.js.map +1 -0
  19. package/dist/types-bZdAJueH.d.ts +2271 -0
  20. package/dist/utils/index.d.ts +1007 -0
  21. package/dist/utils/index.js +1789 -0
  22. package/dist/utils/index.js.map +1 -0
  23. package/package.json +81 -24
  24. package/src/config.js +0 -177
  25. package/src/core/compensation.manager.js +0 -242
  26. package/src/core/employment.manager.js +0 -224
  27. package/src/core/payroll.manager.js +0 -499
  28. package/src/enums.js +0 -141
  29. package/src/factories/compensation.factory.js +0 -198
  30. package/src/factories/employee.factory.js +0 -173
  31. package/src/factories/payroll.factory.js +0 -247
  32. package/src/hrm.orchestrator.js +0 -139
  33. package/src/index.js +0 -172
  34. package/src/init.js +0 -41
  35. package/src/models/payroll-record.model.js +0 -126
  36. package/src/plugins/employee.plugin.js +0 -157
  37. package/src/schemas/employment.schema.js +0 -126
  38. package/src/services/compensation.service.js +0 -231
  39. package/src/services/employee.service.js +0 -162
  40. package/src/services/payroll.service.js +0 -213
  41. package/src/utils/calculation.utils.js +0 -91
  42. package/src/utils/date.utils.js +0 -120
  43. package/src/utils/logger.js +0 -36
  44. package/src/utils/query-builders.js +0 -185
  45. package/src/utils/validation.utils.js +0 -122
@@ -0,0 +1,3858 @@
1
+ import * as bson from 'bson';
2
+ import * as mongoose from 'mongoose';
3
+ import mongoose__default, { Model, Schema, SchemaDefinition, Types } from 'mongoose';
4
+ import { T as TaxWithholdingDocument, a4 as TaxType, a5 as TaxStatus, L as LeaveRequestDocument, a6 as LeaveRequestStatus, a7 as LeaveType } from './types-bZdAJueH.js';
5
+
6
+ /**
7
+ * @classytic/payroll - TaxWithholding Model
8
+ *
9
+ * Mongoose schema for tax withholding tracking with aggregation support
10
+ */
11
+
12
+ declare const taxWithholdingSchema: mongoose__default.Schema<any, mongoose__default.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
13
+ timestamps: true;
14
+ }, {
15
+ employeeId: mongoose__default.Types.ObjectId;
16
+ amount: number;
17
+ period: {
18
+ month: number;
19
+ year: number;
20
+ startDate: NativeDate;
21
+ endDate: NativeDate;
22
+ payDate: NativeDate;
23
+ };
24
+ organizationId: mongoose__default.Types.ObjectId;
25
+ payrollRecordId: mongoose__default.Types.ObjectId;
26
+ transactionId: mongoose__default.Types.ObjectId;
27
+ currency: string;
28
+ taxType: "other" | "income_tax" | "social_security" | "health_insurance" | "pension" | "employment_insurance" | "local_tax";
29
+ taxRate: number;
30
+ taxableAmount: number;
31
+ status: "pending" | "paid" | "cancelled" | "submitted";
32
+ metadata: any;
33
+ submittedAt?: NativeDate | null | undefined;
34
+ paidAt?: NativeDate | null | undefined;
35
+ referenceNumber?: string | null | undefined;
36
+ notes?: string | null | undefined;
37
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
38
+ governmentTransactionId?: mongoose__default.Types.ObjectId | null | undefined;
39
+ voidedAt?: NativeDate | null | undefined;
40
+ voidedBy?: mongoose__default.Types.ObjectId | null | undefined;
41
+ voidReason?: string | null | undefined;
42
+ voidMetadata?: any;
43
+ } & mongoose__default.DefaultTimestampProps, mongoose__default.Document<unknown, {}, {
44
+ employeeId: mongoose__default.Types.ObjectId;
45
+ amount: number;
46
+ period: {
47
+ month: number;
48
+ year: number;
49
+ startDate: NativeDate;
50
+ endDate: NativeDate;
51
+ payDate: NativeDate;
52
+ };
53
+ organizationId: mongoose__default.Types.ObjectId;
54
+ payrollRecordId: mongoose__default.Types.ObjectId;
55
+ transactionId: mongoose__default.Types.ObjectId;
56
+ currency: string;
57
+ taxType: "other" | "income_tax" | "social_security" | "health_insurance" | "pension" | "employment_insurance" | "local_tax";
58
+ taxRate: number;
59
+ taxableAmount: number;
60
+ status: "pending" | "paid" | "cancelled" | "submitted";
61
+ metadata: any;
62
+ submittedAt?: NativeDate | null | undefined;
63
+ paidAt?: NativeDate | null | undefined;
64
+ referenceNumber?: string | null | undefined;
65
+ notes?: string | null | undefined;
66
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
67
+ governmentTransactionId?: mongoose__default.Types.ObjectId | null | undefined;
68
+ voidedAt?: NativeDate | null | undefined;
69
+ voidedBy?: mongoose__default.Types.ObjectId | null | undefined;
70
+ voidReason?: string | null | undefined;
71
+ voidMetadata?: any;
72
+ } & mongoose__default.DefaultTimestampProps, {
73
+ id: string;
74
+ }, mongoose__default.ResolveSchemaOptions<{
75
+ timestamps: true;
76
+ }>> & Omit<{
77
+ employeeId: mongoose__default.Types.ObjectId;
78
+ amount: number;
79
+ period: {
80
+ month: number;
81
+ year: number;
82
+ startDate: NativeDate;
83
+ endDate: NativeDate;
84
+ payDate: NativeDate;
85
+ };
86
+ organizationId: mongoose__default.Types.ObjectId;
87
+ payrollRecordId: mongoose__default.Types.ObjectId;
88
+ transactionId: mongoose__default.Types.ObjectId;
89
+ currency: string;
90
+ taxType: "other" | "income_tax" | "social_security" | "health_insurance" | "pension" | "employment_insurance" | "local_tax";
91
+ taxRate: number;
92
+ taxableAmount: number;
93
+ status: "pending" | "paid" | "cancelled" | "submitted";
94
+ metadata: any;
95
+ submittedAt?: NativeDate | null | undefined;
96
+ paidAt?: NativeDate | null | undefined;
97
+ referenceNumber?: string | null | undefined;
98
+ notes?: string | null | undefined;
99
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
100
+ governmentTransactionId?: mongoose__default.Types.ObjectId | null | undefined;
101
+ voidedAt?: NativeDate | null | undefined;
102
+ voidedBy?: mongoose__default.Types.ObjectId | null | undefined;
103
+ voidReason?: string | null | undefined;
104
+ voidMetadata?: any;
105
+ } & mongoose__default.DefaultTimestampProps & {
106
+ _id: mongoose__default.Types.ObjectId;
107
+ } & {
108
+ __v: number;
109
+ }, "id"> & {
110
+ id: string;
111
+ }, {
112
+ [path: string]: mongoose__default.SchemaDefinitionProperty<undefined, any, any>;
113
+ } | {
114
+ [x: string]: mongoose__default.SchemaDefinitionProperty<any, any, mongoose__default.Document<unknown, {}, {
115
+ employeeId: mongoose__default.Types.ObjectId;
116
+ amount: number;
117
+ period: {
118
+ month: number;
119
+ year: number;
120
+ startDate: NativeDate;
121
+ endDate: NativeDate;
122
+ payDate: NativeDate;
123
+ };
124
+ organizationId: mongoose__default.Types.ObjectId;
125
+ payrollRecordId: mongoose__default.Types.ObjectId;
126
+ transactionId: mongoose__default.Types.ObjectId;
127
+ currency: string;
128
+ taxType: "other" | "income_tax" | "social_security" | "health_insurance" | "pension" | "employment_insurance" | "local_tax";
129
+ taxRate: number;
130
+ taxableAmount: number;
131
+ status: "pending" | "paid" | "cancelled" | "submitted";
132
+ metadata: any;
133
+ submittedAt?: NativeDate | null | undefined;
134
+ paidAt?: NativeDate | null | undefined;
135
+ referenceNumber?: string | null | undefined;
136
+ notes?: string | null | undefined;
137
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
138
+ governmentTransactionId?: mongoose__default.Types.ObjectId | null | undefined;
139
+ voidedAt?: NativeDate | null | undefined;
140
+ voidedBy?: mongoose__default.Types.ObjectId | null | undefined;
141
+ voidReason?: string | null | undefined;
142
+ voidMetadata?: any;
143
+ } & mongoose__default.DefaultTimestampProps, {
144
+ id: string;
145
+ }, mongoose__default.ResolveSchemaOptions<{
146
+ timestamps: true;
147
+ }>> & Omit<{
148
+ employeeId: mongoose__default.Types.ObjectId;
149
+ amount: number;
150
+ period: {
151
+ month: number;
152
+ year: number;
153
+ startDate: NativeDate;
154
+ endDate: NativeDate;
155
+ payDate: NativeDate;
156
+ };
157
+ organizationId: mongoose__default.Types.ObjectId;
158
+ payrollRecordId: mongoose__default.Types.ObjectId;
159
+ transactionId: mongoose__default.Types.ObjectId;
160
+ currency: string;
161
+ taxType: "other" | "income_tax" | "social_security" | "health_insurance" | "pension" | "employment_insurance" | "local_tax";
162
+ taxRate: number;
163
+ taxableAmount: number;
164
+ status: "pending" | "paid" | "cancelled" | "submitted";
165
+ metadata: any;
166
+ submittedAt?: NativeDate | null | undefined;
167
+ paidAt?: NativeDate | null | undefined;
168
+ referenceNumber?: string | null | undefined;
169
+ notes?: string | null | undefined;
170
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
171
+ governmentTransactionId?: mongoose__default.Types.ObjectId | null | undefined;
172
+ voidedAt?: NativeDate | null | undefined;
173
+ voidedBy?: mongoose__default.Types.ObjectId | null | undefined;
174
+ voidReason?: string | null | undefined;
175
+ voidMetadata?: any;
176
+ } & mongoose__default.DefaultTimestampProps & {
177
+ _id: mongoose__default.Types.ObjectId;
178
+ } & {
179
+ __v: number;
180
+ }, "id"> & {
181
+ id: string;
182
+ }> | undefined;
183
+ }, {
184
+ employeeId: mongoose__default.Types.ObjectId;
185
+ amount: number;
186
+ period: {
187
+ month: number;
188
+ year: number;
189
+ startDate: NativeDate;
190
+ endDate: NativeDate;
191
+ payDate: NativeDate;
192
+ };
193
+ organizationId: mongoose__default.Types.ObjectId;
194
+ payrollRecordId: mongoose__default.Types.ObjectId;
195
+ transactionId: mongoose__default.Types.ObjectId;
196
+ currency: string;
197
+ taxType: "other" | "income_tax" | "social_security" | "health_insurance" | "pension" | "employment_insurance" | "local_tax";
198
+ taxRate: number;
199
+ taxableAmount: number;
200
+ status: "pending" | "paid" | "cancelled" | "submitted";
201
+ metadata: any;
202
+ submittedAt?: NativeDate | null | undefined;
203
+ paidAt?: NativeDate | null | undefined;
204
+ referenceNumber?: string | null | undefined;
205
+ notes?: string | null | undefined;
206
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
207
+ governmentTransactionId?: mongoose__default.Types.ObjectId | null | undefined;
208
+ voidedAt?: NativeDate | null | undefined;
209
+ voidedBy?: mongoose__default.Types.ObjectId | null | undefined;
210
+ voidReason?: string | null | undefined;
211
+ voidMetadata?: any;
212
+ createdAt: NativeDate;
213
+ updatedAt: NativeDate;
214
+ } & {
215
+ _id: mongoose__default.Types.ObjectId;
216
+ } & {
217
+ __v: number;
218
+ }>;
219
+ interface TaxWithholdingModel extends Model<TaxWithholdingDocument> {
220
+ findByPeriod(organizationId: mongoose__default.Types.ObjectId, month: number, year: number): ReturnType<Model<TaxWithholdingDocument>['find']>;
221
+ findByEmployee(employeeId: mongoose__default.Types.ObjectId, options?: {
222
+ year?: number;
223
+ taxType?: TaxType;
224
+ status?: TaxStatus;
225
+ limit?: number;
226
+ }): ReturnType<Model<TaxWithholdingDocument>['find']>;
227
+ findPending(organizationId: mongoose__default.Types.ObjectId, options?: {
228
+ fromMonth?: number;
229
+ fromYear?: number;
230
+ toMonth?: number;
231
+ toYear?: number;
232
+ taxType?: TaxType;
233
+ }): ReturnType<Model<TaxWithholdingDocument>['find']>;
234
+ getSummaryByType(organizationId: mongoose__default.Types.ObjectId, fromPeriod: {
235
+ month: number;
236
+ year: number;
237
+ }, toPeriod: {
238
+ month: number;
239
+ year: number;
240
+ }): Promise<Array<{
241
+ taxType: TaxType;
242
+ totalAmount: number;
243
+ count: number;
244
+ withholdingIds: mongoose__default.Types.ObjectId[];
245
+ }>>;
246
+ getByPayrollRecord(payrollRecordId: mongoose__default.Types.ObjectId): ReturnType<Model<TaxWithholdingDocument>['find']>;
247
+ getTotalByOrganization(organizationId: mongoose__default.Types.ObjectId, options?: {
248
+ status?: TaxStatus;
249
+ year?: number;
250
+ }): Promise<{
251
+ totalAmount: number;
252
+ count: number;
253
+ }>;
254
+ addTTLIndex(fieldName: string, ttlSeconds: number, options?: {
255
+ partialFilter?: Record<string, unknown>;
256
+ }): Promise<void>;
257
+ removeTTLIndex(fieldName: string): Promise<void>;
258
+ }
259
+ /**
260
+ * Get or create TaxWithholding model
261
+ *
262
+ * @example
263
+ * const TaxWithholding = getTaxWithholdingModel();
264
+ *
265
+ * // With custom connection
266
+ * const TaxWithholding = getTaxWithholdingModel(customConnection);
267
+ */
268
+ declare function getTaxWithholdingModel(connection?: mongoose__default.Connection): TaxWithholdingModel;
269
+
270
+ /**
271
+ * Payroll period schema
272
+ * Shared across PayrollRecord and TaxWithholding schemas
273
+ */
274
+ declare const periodSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
275
+ _id: false;
276
+ }, {
277
+ month: number;
278
+ year: number;
279
+ startDate: NativeDate;
280
+ endDate: NativeDate;
281
+ payDate: NativeDate;
282
+ }, mongoose.Document<unknown, {}, {
283
+ month: number;
284
+ year: number;
285
+ startDate: NativeDate;
286
+ endDate: NativeDate;
287
+ payDate: NativeDate;
288
+ }, {
289
+ id: string;
290
+ }, mongoose.ResolveSchemaOptions<{
291
+ _id: false;
292
+ }>> & Omit<{
293
+ month: number;
294
+ year: number;
295
+ startDate: NativeDate;
296
+ endDate: NativeDate;
297
+ payDate: NativeDate;
298
+ } & {
299
+ _id: mongoose.Types.ObjectId;
300
+ } & {
301
+ __v: number;
302
+ }, "id"> & {
303
+ id: string;
304
+ }, {
305
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
306
+ } | {
307
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
308
+ month: number;
309
+ year: number;
310
+ startDate: NativeDate;
311
+ endDate: NativeDate;
312
+ payDate: NativeDate;
313
+ }, {
314
+ id: string;
315
+ }, mongoose.ResolveSchemaOptions<{
316
+ _id: false;
317
+ }>> & Omit<{
318
+ month: number;
319
+ year: number;
320
+ startDate: NativeDate;
321
+ endDate: NativeDate;
322
+ payDate: NativeDate;
323
+ } & {
324
+ _id: mongoose.Types.ObjectId;
325
+ } & {
326
+ __v: number;
327
+ }, "id"> & {
328
+ id: string;
329
+ }> | undefined;
330
+ }, {
331
+ month: number;
332
+ year: number;
333
+ startDate: NativeDate;
334
+ endDate: NativeDate;
335
+ payDate: NativeDate;
336
+ } & {
337
+ _id: mongoose.Types.ObjectId;
338
+ } & {
339
+ __v: number;
340
+ }>;
341
+
342
+ /**
343
+ * @classytic/payroll - LeaveRequest Model
344
+ *
345
+ * Mongoose schema for leave requests with TTL support
346
+ */
347
+
348
+ declare const leaveRequestSchema: mongoose__default.Schema<any, mongoose__default.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
349
+ timestamps: true;
350
+ }, {
351
+ employeeId: mongoose__default.Types.ObjectId;
352
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
353
+ startDate: NativeDate;
354
+ endDate: NativeDate;
355
+ status: "pending" | "approved" | "rejected" | "cancelled";
356
+ metadata: any;
357
+ days: number;
358
+ halfDay: boolean;
359
+ attachments: string[];
360
+ reason?: string | null | undefined;
361
+ organizationId?: mongoose__default.Types.ObjectId | null | undefined;
362
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
363
+ reviewedBy?: mongoose__default.Types.ObjectId | null | undefined;
364
+ reviewedAt?: NativeDate | null | undefined;
365
+ reviewNotes?: string | null | undefined;
366
+ } & mongoose__default.DefaultTimestampProps, mongoose__default.Document<unknown, {}, {
367
+ employeeId: mongoose__default.Types.ObjectId;
368
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
369
+ startDate: NativeDate;
370
+ endDate: NativeDate;
371
+ status: "pending" | "approved" | "rejected" | "cancelled";
372
+ metadata: any;
373
+ days: number;
374
+ halfDay: boolean;
375
+ attachments: string[];
376
+ reason?: string | null | undefined;
377
+ organizationId?: mongoose__default.Types.ObjectId | null | undefined;
378
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
379
+ reviewedBy?: mongoose__default.Types.ObjectId | null | undefined;
380
+ reviewedAt?: NativeDate | null | undefined;
381
+ reviewNotes?: string | null | undefined;
382
+ } & mongoose__default.DefaultTimestampProps, {
383
+ id: string;
384
+ }, mongoose__default.ResolveSchemaOptions<{
385
+ timestamps: true;
386
+ }>> & Omit<{
387
+ employeeId: mongoose__default.Types.ObjectId;
388
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
389
+ startDate: NativeDate;
390
+ endDate: NativeDate;
391
+ status: "pending" | "approved" | "rejected" | "cancelled";
392
+ metadata: any;
393
+ days: number;
394
+ halfDay: boolean;
395
+ attachments: string[];
396
+ reason?: string | null | undefined;
397
+ organizationId?: mongoose__default.Types.ObjectId | null | undefined;
398
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
399
+ reviewedBy?: mongoose__default.Types.ObjectId | null | undefined;
400
+ reviewedAt?: NativeDate | null | undefined;
401
+ reviewNotes?: string | null | undefined;
402
+ } & mongoose__default.DefaultTimestampProps & {
403
+ _id: mongoose__default.Types.ObjectId;
404
+ } & {
405
+ __v: number;
406
+ }, "id"> & {
407
+ id: string;
408
+ }, {
409
+ [path: string]: mongoose__default.SchemaDefinitionProperty<undefined, any, any>;
410
+ } | {
411
+ [x: string]: mongoose__default.SchemaDefinitionProperty<any, any, mongoose__default.Document<unknown, {}, {
412
+ employeeId: mongoose__default.Types.ObjectId;
413
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
414
+ startDate: NativeDate;
415
+ endDate: NativeDate;
416
+ status: "pending" | "approved" | "rejected" | "cancelled";
417
+ metadata: any;
418
+ days: number;
419
+ halfDay: boolean;
420
+ attachments: string[];
421
+ reason?: string | null | undefined;
422
+ organizationId?: mongoose__default.Types.ObjectId | null | undefined;
423
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
424
+ reviewedBy?: mongoose__default.Types.ObjectId | null | undefined;
425
+ reviewedAt?: NativeDate | null | undefined;
426
+ reviewNotes?: string | null | undefined;
427
+ } & mongoose__default.DefaultTimestampProps, {
428
+ id: string;
429
+ }, mongoose__default.ResolveSchemaOptions<{
430
+ timestamps: true;
431
+ }>> & Omit<{
432
+ employeeId: mongoose__default.Types.ObjectId;
433
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
434
+ startDate: NativeDate;
435
+ endDate: NativeDate;
436
+ status: "pending" | "approved" | "rejected" | "cancelled";
437
+ metadata: any;
438
+ days: number;
439
+ halfDay: boolean;
440
+ attachments: string[];
441
+ reason?: string | null | undefined;
442
+ organizationId?: mongoose__default.Types.ObjectId | null | undefined;
443
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
444
+ reviewedBy?: mongoose__default.Types.ObjectId | null | undefined;
445
+ reviewedAt?: NativeDate | null | undefined;
446
+ reviewNotes?: string | null | undefined;
447
+ } & mongoose__default.DefaultTimestampProps & {
448
+ _id: mongoose__default.Types.ObjectId;
449
+ } & {
450
+ __v: number;
451
+ }, "id"> & {
452
+ id: string;
453
+ }> | undefined;
454
+ }, {
455
+ employeeId: mongoose__default.Types.ObjectId;
456
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
457
+ startDate: NativeDate;
458
+ endDate: NativeDate;
459
+ status: "pending" | "approved" | "rejected" | "cancelled";
460
+ metadata: any;
461
+ days: number;
462
+ halfDay: boolean;
463
+ attachments: string[];
464
+ reason?: string | null | undefined;
465
+ organizationId?: mongoose__default.Types.ObjectId | null | undefined;
466
+ userId?: mongoose__default.Types.ObjectId | null | undefined;
467
+ reviewedBy?: mongoose__default.Types.ObjectId | null | undefined;
468
+ reviewedAt?: NativeDate | null | undefined;
469
+ reviewNotes?: string | null | undefined;
470
+ createdAt: NativeDate;
471
+ updatedAt: NativeDate;
472
+ } & {
473
+ _id: mongoose__default.Types.ObjectId;
474
+ } & {
475
+ __v: number;
476
+ }>;
477
+ interface LeaveRequestModel extends Model<LeaveRequestDocument> {
478
+ findByEmployee(employeeId: mongoose__default.Types.ObjectId, options?: {
479
+ status?: LeaveRequestStatus;
480
+ year?: number;
481
+ limit?: number;
482
+ }): ReturnType<Model<LeaveRequestDocument>['find']>;
483
+ findPendingByOrganization(organizationId?: mongoose__default.Types.ObjectId): ReturnType<Model<LeaveRequestDocument>['find']>;
484
+ findByPeriod(organizationId: mongoose__default.Types.ObjectId | undefined, startDate: Date, endDate: Date, options?: {
485
+ status?: LeaveRequestStatus;
486
+ type?: LeaveType;
487
+ }): ReturnType<Model<LeaveRequestDocument>['find']>;
488
+ getLeaveStats(employeeId: mongoose__default.Types.ObjectId, year: number): Promise<Array<{
489
+ _id: LeaveType;
490
+ totalDays: number;
491
+ count: number;
492
+ }>>;
493
+ getOrganizationSummary(organizationId: mongoose__default.Types.ObjectId | undefined, year: number): Promise<Array<{
494
+ _id: {
495
+ status: LeaveRequestStatus;
496
+ type: LeaveType;
497
+ };
498
+ totalDays: number;
499
+ count: number;
500
+ }>>;
501
+ findOverlapping(employeeId: mongoose__default.Types.ObjectId, startDate: Date, endDate: Date, excludeRequestId?: mongoose__default.Types.ObjectId): ReturnType<Model<LeaveRequestDocument>['find']>;
502
+ hasOverlap(employeeId: mongoose__default.Types.ObjectId, startDate: Date, endDate: Date, excludeRequestId?: mongoose__default.Types.ObjectId): Promise<boolean>;
503
+ }
504
+ /**
505
+ * Get or create LeaveRequest model
506
+ *
507
+ * @example
508
+ * const LeaveRequest = getLeaveRequestModel();
509
+ *
510
+ * // With custom connection
511
+ * const LeaveRequest = getLeaveRequestModel(customConnection);
512
+ */
513
+ declare function getLeaveRequestModel(connection?: mongoose__default.Connection): LeaveRequestModel;
514
+
515
+ /**
516
+ * Leave balance schema (embedded in Employee documents)
517
+ * This is NOT a standalone model - it's for embedding.
518
+ */
519
+ declare const leaveBalanceSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
520
+ _id: false;
521
+ }, {
522
+ year: number;
523
+ pending: number;
524
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
525
+ allocated: number;
526
+ used: number;
527
+ carriedOver: number;
528
+ expiresAt?: NativeDate | null | undefined;
529
+ }, mongoose.Document<unknown, {}, {
530
+ year: number;
531
+ pending: number;
532
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
533
+ allocated: number;
534
+ used: number;
535
+ carriedOver: number;
536
+ expiresAt?: NativeDate | null | undefined;
537
+ }, {
538
+ id: string;
539
+ }, mongoose.ResolveSchemaOptions<{
540
+ _id: false;
541
+ }>> & Omit<{
542
+ year: number;
543
+ pending: number;
544
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
545
+ allocated: number;
546
+ used: number;
547
+ carriedOver: number;
548
+ expiresAt?: NativeDate | null | undefined;
549
+ } & {
550
+ _id: mongoose.Types.ObjectId;
551
+ } & {
552
+ __v: number;
553
+ }, "id"> & {
554
+ id: string;
555
+ }, {
556
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
557
+ } | {
558
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
559
+ year: number;
560
+ pending: number;
561
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
562
+ allocated: number;
563
+ used: number;
564
+ carriedOver: number;
565
+ expiresAt?: NativeDate | null | undefined;
566
+ }, {
567
+ id: string;
568
+ }, mongoose.ResolveSchemaOptions<{
569
+ _id: false;
570
+ }>> & Omit<{
571
+ year: number;
572
+ pending: number;
573
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
574
+ allocated: number;
575
+ used: number;
576
+ carriedOver: number;
577
+ expiresAt?: NativeDate | null | undefined;
578
+ } & {
579
+ _id: mongoose.Types.ObjectId;
580
+ } & {
581
+ __v: number;
582
+ }, "id"> & {
583
+ id: string;
584
+ }> | undefined;
585
+ }, {
586
+ year: number;
587
+ pending: number;
588
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
589
+ allocated: number;
590
+ used: number;
591
+ carriedOver: number;
592
+ expiresAt?: NativeDate | null | undefined;
593
+ } & {
594
+ _id: mongoose.Types.ObjectId;
595
+ } & {
596
+ __v: number;
597
+ }>;
598
+ /**
599
+ * Leave balance fields for embedding in Employee schema
600
+ *
601
+ * @example
602
+ * const employeeSchema = new Schema({
603
+ * ...createEmploymentFields({ organizationRef: 'Branch' }),
604
+ * ...leaveBalanceFields,
605
+ * });
606
+ */
607
+ declare const leaveBalanceFields: SchemaDefinition;
608
+ /**
609
+ * Recommended indexes for LeaveRequest collection
610
+ */
611
+ declare const leaveRequestIndexes: ({
612
+ fields: {
613
+ organizationId: number;
614
+ employeeId: number;
615
+ startDate: number;
616
+ status?: undefined;
617
+ createdAt?: undefined;
618
+ type?: undefined;
619
+ };
620
+ } | {
621
+ fields: {
622
+ organizationId: number;
623
+ status: number;
624
+ createdAt: number;
625
+ employeeId?: undefined;
626
+ startDate?: undefined;
627
+ type?: undefined;
628
+ };
629
+ } | {
630
+ fields: {
631
+ employeeId: number;
632
+ status: number;
633
+ organizationId?: undefined;
634
+ startDate?: undefined;
635
+ createdAt?: undefined;
636
+ type?: undefined;
637
+ };
638
+ } | {
639
+ fields: {
640
+ organizationId: number;
641
+ type: number;
642
+ status: number;
643
+ employeeId?: undefined;
644
+ startDate?: undefined;
645
+ createdAt?: undefined;
646
+ };
647
+ })[];
648
+ /**
649
+ * TTL index config for auto-cleanup (opt-in)
650
+ */
651
+ declare const leaveRequestTTLIndex: {
652
+ fields: {
653
+ createdAt: number;
654
+ };
655
+ options: {
656
+ expireAfterSeconds: number;
657
+ partialFilterExpression: {
658
+ status: {
659
+ $in: string[];
660
+ };
661
+ };
662
+ };
663
+ };
664
+ /**
665
+ * Apply indexes to a LeaveRequest schema
666
+ */
667
+ declare function applyLeaveRequestIndexes(schema: Schema, options?: {
668
+ createIndexes?: boolean;
669
+ enableTTL?: boolean;
670
+ ttlSeconds?: number;
671
+ }): void;
672
+ /**
673
+ * Extract field definitions from the authoritative LeaveRequest schema.
674
+ * Use this when composing custom schemas.
675
+ *
676
+ * @example
677
+ * const customSchema = new Schema({
678
+ * ...getLeaveRequestFields(),
679
+ * myCustomField: String,
680
+ * });
681
+ */
682
+ declare function getLeaveRequestFields(): SchemaDefinition;
683
+
684
+ /**
685
+ * @classytic/payroll - Tax Withholding Schema
686
+ *
687
+ * Re-exports from the authoritative model definition.
688
+ * Use this for schema composition when building custom schemas.
689
+ *
690
+ * Single source of truth: models/tax-withholding.model.ts
691
+ */
692
+
693
+ /**
694
+ * Recommended indexes for tax withholding collection
695
+ */
696
+ declare const taxWithholdingIndexes: ({
697
+ fields: {
698
+ organizationId: number;
699
+ status: number;
700
+ 'period.year': number;
701
+ 'period.month': number;
702
+ employeeId?: undefined;
703
+ payrollRecordId?: undefined;
704
+ transactionId?: undefined;
705
+ taxType?: undefined;
706
+ governmentTransactionId?: undefined;
707
+ };
708
+ options?: undefined;
709
+ } | {
710
+ fields: {
711
+ employeeId: number;
712
+ 'period.year': number;
713
+ 'period.month': number;
714
+ organizationId?: undefined;
715
+ status?: undefined;
716
+ payrollRecordId?: undefined;
717
+ transactionId?: undefined;
718
+ taxType?: undefined;
719
+ governmentTransactionId?: undefined;
720
+ };
721
+ options?: undefined;
722
+ } | {
723
+ fields: {
724
+ payrollRecordId: number;
725
+ organizationId?: undefined;
726
+ status?: undefined;
727
+ 'period.year'?: undefined;
728
+ 'period.month'?: undefined;
729
+ employeeId?: undefined;
730
+ transactionId?: undefined;
731
+ taxType?: undefined;
732
+ governmentTransactionId?: undefined;
733
+ };
734
+ options?: undefined;
735
+ } | {
736
+ fields: {
737
+ transactionId: number;
738
+ organizationId?: undefined;
739
+ status?: undefined;
740
+ 'period.year'?: undefined;
741
+ 'period.month'?: undefined;
742
+ employeeId?: undefined;
743
+ payrollRecordId?: undefined;
744
+ taxType?: undefined;
745
+ governmentTransactionId?: undefined;
746
+ };
747
+ options?: undefined;
748
+ } | {
749
+ fields: {
750
+ organizationId: number;
751
+ taxType: number;
752
+ status: number;
753
+ 'period.year'?: undefined;
754
+ 'period.month'?: undefined;
755
+ employeeId?: undefined;
756
+ payrollRecordId?: undefined;
757
+ transactionId?: undefined;
758
+ governmentTransactionId?: undefined;
759
+ };
760
+ options?: undefined;
761
+ } | {
762
+ fields: {
763
+ governmentTransactionId: number;
764
+ organizationId?: undefined;
765
+ status?: undefined;
766
+ 'period.year'?: undefined;
767
+ 'period.month'?: undefined;
768
+ employeeId?: undefined;
769
+ payrollRecordId?: undefined;
770
+ transactionId?: undefined;
771
+ taxType?: undefined;
772
+ };
773
+ options: {
774
+ sparse: boolean;
775
+ };
776
+ })[];
777
+ /**
778
+ * Apply recommended indexes to a custom tax withholding schema
779
+ */
780
+ declare function applyTaxWithholdingIndexes(schema: Schema): void;
781
+ /**
782
+ * Extract field definitions from the authoritative schema.
783
+ * Use this when composing custom schemas that need tax withholding fields.
784
+ *
785
+ * @example
786
+ * const customSchema = new Schema({
787
+ * ...getTaxWithholdingFields(),
788
+ * myCustomField: String,
789
+ * });
790
+ */
791
+ declare function getTaxWithholdingFields(): SchemaDefinition;
792
+
793
+ /**
794
+ * Options for configuring schema references.
795
+ *
796
+ * Use these to customize what collection `organizationId` references.
797
+ * This supports multi-branch, multi-tenant, or any other hierarchy structure.
798
+ *
799
+ * @example
800
+ * ```typescript
801
+ * // Multi-branch setup (one company, multiple branches)
802
+ * const employeeSchema = createEmployeeSchema({}, {
803
+ * organizationRef: 'Branch',
804
+ * });
805
+ *
806
+ * // Multi-tenant SaaS
807
+ * const employeeSchema = createEmployeeSchema({}, {
808
+ * organizationRef: 'Tenant',
809
+ * });
810
+ *
811
+ * // Enterprise with workspaces
812
+ * const employeeSchema = createEmployeeSchema({}, {
813
+ * organizationRef: 'Workspace',
814
+ * });
815
+ * ```
816
+ */
817
+ interface PayrollSchemaOptions {
818
+ /**
819
+ * The collection name that `organizationId` references.
820
+ *
821
+ * This is used for Mongoose's `populate()` feature. The multi-tenant
822
+ * plugin filters by the ObjectId value regardless of what collection
823
+ * it references.
824
+ *
825
+ * @default 'Organization'
826
+ *
827
+ * @example 'Branch' | 'Company' | 'Tenant' | 'Workspace' | 'Team'
828
+ */
829
+ organizationRef?: string;
830
+ /**
831
+ * The collection name that `userId` references.
832
+ *
833
+ * @default 'User'
834
+ */
835
+ userRef?: string;
836
+ }
837
+ /**
838
+ * Allowance schema definition
839
+ */
840
+ declare const allowanceSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
841
+ _id: false;
842
+ }, {
843
+ amount: number;
844
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
845
+ isPercentage: boolean;
846
+ taxable: boolean;
847
+ recurring: boolean;
848
+ effectiveFrom: NativeDate;
849
+ name?: string | null | undefined;
850
+ value?: number | null | undefined;
851
+ effectiveTo?: NativeDate | null | undefined;
852
+ }, mongoose.Document<unknown, {}, {
853
+ amount: number;
854
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
855
+ isPercentage: boolean;
856
+ taxable: boolean;
857
+ recurring: boolean;
858
+ effectiveFrom: NativeDate;
859
+ name?: string | null | undefined;
860
+ value?: number | null | undefined;
861
+ effectiveTo?: NativeDate | null | undefined;
862
+ }, {
863
+ id: string;
864
+ }, mongoose.ResolveSchemaOptions<{
865
+ _id: false;
866
+ }>> & Omit<{
867
+ amount: number;
868
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
869
+ isPercentage: boolean;
870
+ taxable: boolean;
871
+ recurring: boolean;
872
+ effectiveFrom: NativeDate;
873
+ name?: string | null | undefined;
874
+ value?: number | null | undefined;
875
+ effectiveTo?: NativeDate | null | undefined;
876
+ } & {
877
+ _id: Types.ObjectId;
878
+ } & {
879
+ __v: number;
880
+ }, "id"> & {
881
+ id: string;
882
+ }, {
883
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
884
+ } | {
885
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
886
+ amount: number;
887
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
888
+ isPercentage: boolean;
889
+ taxable: boolean;
890
+ recurring: boolean;
891
+ effectiveFrom: NativeDate;
892
+ name?: string | null | undefined;
893
+ value?: number | null | undefined;
894
+ effectiveTo?: NativeDate | null | undefined;
895
+ }, {
896
+ id: string;
897
+ }, mongoose.ResolveSchemaOptions<{
898
+ _id: false;
899
+ }>> & Omit<{
900
+ amount: number;
901
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
902
+ isPercentage: boolean;
903
+ taxable: boolean;
904
+ recurring: boolean;
905
+ effectiveFrom: NativeDate;
906
+ name?: string | null | undefined;
907
+ value?: number | null | undefined;
908
+ effectiveTo?: NativeDate | null | undefined;
909
+ } & {
910
+ _id: Types.ObjectId;
911
+ } & {
912
+ __v: number;
913
+ }, "id"> & {
914
+ id: string;
915
+ }> | undefined;
916
+ }, {
917
+ amount: number;
918
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
919
+ isPercentage: boolean;
920
+ taxable: boolean;
921
+ recurring: boolean;
922
+ effectiveFrom: NativeDate;
923
+ name?: string | null | undefined;
924
+ value?: number | null | undefined;
925
+ effectiveTo?: NativeDate | null | undefined;
926
+ } & {
927
+ _id: Types.ObjectId;
928
+ } & {
929
+ __v: number;
930
+ }>;
931
+ /**
932
+ * Deduction schema definition
933
+ */
934
+ declare const deductionSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
935
+ _id: false;
936
+ }, {
937
+ amount: number;
938
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
939
+ auto: boolean;
940
+ isPercentage: boolean;
941
+ recurring: boolean;
942
+ effectiveFrom: NativeDate;
943
+ name?: string | null | undefined;
944
+ description?: string | null | undefined;
945
+ value?: number | null | undefined;
946
+ effectiveTo?: NativeDate | null | undefined;
947
+ }, mongoose.Document<unknown, {}, {
948
+ amount: number;
949
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
950
+ auto: boolean;
951
+ isPercentage: boolean;
952
+ recurring: boolean;
953
+ effectiveFrom: NativeDate;
954
+ name?: string | null | undefined;
955
+ description?: string | null | undefined;
956
+ value?: number | null | undefined;
957
+ effectiveTo?: NativeDate | null | undefined;
958
+ }, {
959
+ id: string;
960
+ }, mongoose.ResolveSchemaOptions<{
961
+ _id: false;
962
+ }>> & Omit<{
963
+ amount: number;
964
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
965
+ auto: boolean;
966
+ isPercentage: boolean;
967
+ recurring: boolean;
968
+ effectiveFrom: NativeDate;
969
+ name?: string | null | undefined;
970
+ description?: string | null | undefined;
971
+ value?: number | null | undefined;
972
+ effectiveTo?: NativeDate | null | undefined;
973
+ } & {
974
+ _id: Types.ObjectId;
975
+ } & {
976
+ __v: number;
977
+ }, "id"> & {
978
+ id: string;
979
+ }, {
980
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
981
+ } | {
982
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
983
+ amount: number;
984
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
985
+ auto: boolean;
986
+ isPercentage: boolean;
987
+ recurring: boolean;
988
+ effectiveFrom: NativeDate;
989
+ name?: string | null | undefined;
990
+ description?: string | null | undefined;
991
+ value?: number | null | undefined;
992
+ effectiveTo?: NativeDate | null | undefined;
993
+ }, {
994
+ id: string;
995
+ }, mongoose.ResolveSchemaOptions<{
996
+ _id: false;
997
+ }>> & Omit<{
998
+ amount: number;
999
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1000
+ auto: boolean;
1001
+ isPercentage: boolean;
1002
+ recurring: boolean;
1003
+ effectiveFrom: NativeDate;
1004
+ name?: string | null | undefined;
1005
+ description?: string | null | undefined;
1006
+ value?: number | null | undefined;
1007
+ effectiveTo?: NativeDate | null | undefined;
1008
+ } & {
1009
+ _id: Types.ObjectId;
1010
+ } & {
1011
+ __v: number;
1012
+ }, "id"> & {
1013
+ id: string;
1014
+ }> | undefined;
1015
+ }, {
1016
+ amount: number;
1017
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1018
+ auto: boolean;
1019
+ isPercentage: boolean;
1020
+ recurring: boolean;
1021
+ effectiveFrom: NativeDate;
1022
+ name?: string | null | undefined;
1023
+ description?: string | null | undefined;
1024
+ value?: number | null | undefined;
1025
+ effectiveTo?: NativeDate | null | undefined;
1026
+ } & {
1027
+ _id: Types.ObjectId;
1028
+ } & {
1029
+ __v: number;
1030
+ }>;
1031
+ /**
1032
+ * Compensation schema definition
1033
+ */
1034
+ declare const compensationSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
1035
+ _id: false;
1036
+ }, {
1037
+ effectiveFrom: NativeDate;
1038
+ baseAmount: number;
1039
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
1040
+ allowances: Types.DocumentArray<{
1041
+ amount: number;
1042
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1043
+ isPercentage: boolean;
1044
+ taxable: boolean;
1045
+ recurring: boolean;
1046
+ effectiveFrom: NativeDate;
1047
+ name?: string | null | undefined;
1048
+ value?: number | null | undefined;
1049
+ effectiveTo?: NativeDate | null | undefined;
1050
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1051
+ amount: number;
1052
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1053
+ isPercentage: boolean;
1054
+ taxable: boolean;
1055
+ recurring: boolean;
1056
+ effectiveFrom: NativeDate;
1057
+ name?: string | null | undefined;
1058
+ value?: number | null | undefined;
1059
+ effectiveTo?: NativeDate | null | undefined;
1060
+ }> & {
1061
+ amount: number;
1062
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1063
+ isPercentage: boolean;
1064
+ taxable: boolean;
1065
+ recurring: boolean;
1066
+ effectiveFrom: NativeDate;
1067
+ name?: string | null | undefined;
1068
+ value?: number | null | undefined;
1069
+ effectiveTo?: NativeDate | null | undefined;
1070
+ }>;
1071
+ deductions: Types.DocumentArray<{
1072
+ amount: number;
1073
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1074
+ auto: boolean;
1075
+ isPercentage: boolean;
1076
+ recurring: boolean;
1077
+ effectiveFrom: NativeDate;
1078
+ name?: string | null | undefined;
1079
+ description?: string | null | undefined;
1080
+ value?: number | null | undefined;
1081
+ effectiveTo?: NativeDate | null | undefined;
1082
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1083
+ amount: number;
1084
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1085
+ auto: boolean;
1086
+ isPercentage: boolean;
1087
+ recurring: boolean;
1088
+ effectiveFrom: NativeDate;
1089
+ name?: string | null | undefined;
1090
+ description?: string | null | undefined;
1091
+ value?: number | null | undefined;
1092
+ effectiveTo?: NativeDate | null | undefined;
1093
+ }> & {
1094
+ amount: number;
1095
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1096
+ auto: boolean;
1097
+ isPercentage: boolean;
1098
+ recurring: boolean;
1099
+ effectiveFrom: NativeDate;
1100
+ name?: string | null | undefined;
1101
+ description?: string | null | undefined;
1102
+ value?: number | null | undefined;
1103
+ effectiveTo?: NativeDate | null | undefined;
1104
+ }>;
1105
+ grossSalary: number;
1106
+ netSalary: number;
1107
+ lastModified: NativeDate;
1108
+ currency?: string | null | undefined;
1109
+ }, mongoose.Document<unknown, {}, {
1110
+ effectiveFrom: NativeDate;
1111
+ baseAmount: number;
1112
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
1113
+ allowances: Types.DocumentArray<{
1114
+ amount: number;
1115
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1116
+ isPercentage: boolean;
1117
+ taxable: boolean;
1118
+ recurring: boolean;
1119
+ effectiveFrom: NativeDate;
1120
+ name?: string | null | undefined;
1121
+ value?: number | null | undefined;
1122
+ effectiveTo?: NativeDate | null | undefined;
1123
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1124
+ amount: number;
1125
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1126
+ isPercentage: boolean;
1127
+ taxable: boolean;
1128
+ recurring: boolean;
1129
+ effectiveFrom: NativeDate;
1130
+ name?: string | null | undefined;
1131
+ value?: number | null | undefined;
1132
+ effectiveTo?: NativeDate | null | undefined;
1133
+ }> & {
1134
+ amount: number;
1135
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1136
+ isPercentage: boolean;
1137
+ taxable: boolean;
1138
+ recurring: boolean;
1139
+ effectiveFrom: NativeDate;
1140
+ name?: string | null | undefined;
1141
+ value?: number | null | undefined;
1142
+ effectiveTo?: NativeDate | null | undefined;
1143
+ }>;
1144
+ deductions: Types.DocumentArray<{
1145
+ amount: number;
1146
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1147
+ auto: boolean;
1148
+ isPercentage: boolean;
1149
+ recurring: boolean;
1150
+ effectiveFrom: NativeDate;
1151
+ name?: string | null | undefined;
1152
+ description?: string | null | undefined;
1153
+ value?: number | null | undefined;
1154
+ effectiveTo?: NativeDate | null | undefined;
1155
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1156
+ amount: number;
1157
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1158
+ auto: boolean;
1159
+ isPercentage: boolean;
1160
+ recurring: boolean;
1161
+ effectiveFrom: NativeDate;
1162
+ name?: string | null | undefined;
1163
+ description?: string | null | undefined;
1164
+ value?: number | null | undefined;
1165
+ effectiveTo?: NativeDate | null | undefined;
1166
+ }> & {
1167
+ amount: number;
1168
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1169
+ auto: boolean;
1170
+ isPercentage: boolean;
1171
+ recurring: boolean;
1172
+ effectiveFrom: NativeDate;
1173
+ name?: string | null | undefined;
1174
+ description?: string | null | undefined;
1175
+ value?: number | null | undefined;
1176
+ effectiveTo?: NativeDate | null | undefined;
1177
+ }>;
1178
+ grossSalary: number;
1179
+ netSalary: number;
1180
+ lastModified: NativeDate;
1181
+ currency?: string | null | undefined;
1182
+ }, {
1183
+ id: string;
1184
+ }, mongoose.ResolveSchemaOptions<{
1185
+ _id: false;
1186
+ }>> & Omit<{
1187
+ effectiveFrom: NativeDate;
1188
+ baseAmount: number;
1189
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
1190
+ allowances: Types.DocumentArray<{
1191
+ amount: number;
1192
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1193
+ isPercentage: boolean;
1194
+ taxable: boolean;
1195
+ recurring: boolean;
1196
+ effectiveFrom: NativeDate;
1197
+ name?: string | null | undefined;
1198
+ value?: number | null | undefined;
1199
+ effectiveTo?: NativeDate | null | undefined;
1200
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1201
+ amount: number;
1202
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1203
+ isPercentage: boolean;
1204
+ taxable: boolean;
1205
+ recurring: boolean;
1206
+ effectiveFrom: NativeDate;
1207
+ name?: string | null | undefined;
1208
+ value?: number | null | undefined;
1209
+ effectiveTo?: NativeDate | null | undefined;
1210
+ }> & {
1211
+ amount: number;
1212
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1213
+ isPercentage: boolean;
1214
+ taxable: boolean;
1215
+ recurring: boolean;
1216
+ effectiveFrom: NativeDate;
1217
+ name?: string | null | undefined;
1218
+ value?: number | null | undefined;
1219
+ effectiveTo?: NativeDate | null | undefined;
1220
+ }>;
1221
+ deductions: Types.DocumentArray<{
1222
+ amount: number;
1223
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1224
+ auto: boolean;
1225
+ isPercentage: boolean;
1226
+ recurring: boolean;
1227
+ effectiveFrom: NativeDate;
1228
+ name?: string | null | undefined;
1229
+ description?: string | null | undefined;
1230
+ value?: number | null | undefined;
1231
+ effectiveTo?: NativeDate | null | undefined;
1232
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1233
+ amount: number;
1234
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1235
+ auto: boolean;
1236
+ isPercentage: boolean;
1237
+ recurring: boolean;
1238
+ effectiveFrom: NativeDate;
1239
+ name?: string | null | undefined;
1240
+ description?: string | null | undefined;
1241
+ value?: number | null | undefined;
1242
+ effectiveTo?: NativeDate | null | undefined;
1243
+ }> & {
1244
+ amount: number;
1245
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1246
+ auto: boolean;
1247
+ isPercentage: boolean;
1248
+ recurring: boolean;
1249
+ effectiveFrom: NativeDate;
1250
+ name?: string | null | undefined;
1251
+ description?: string | null | undefined;
1252
+ value?: number | null | undefined;
1253
+ effectiveTo?: NativeDate | null | undefined;
1254
+ }>;
1255
+ grossSalary: number;
1256
+ netSalary: number;
1257
+ lastModified: NativeDate;
1258
+ currency?: string | null | undefined;
1259
+ } & {
1260
+ _id: Types.ObjectId;
1261
+ } & {
1262
+ __v: number;
1263
+ }, "id"> & {
1264
+ id: string;
1265
+ }, {
1266
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
1267
+ } | {
1268
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
1269
+ effectiveFrom: NativeDate;
1270
+ baseAmount: number;
1271
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
1272
+ allowances: Types.DocumentArray<{
1273
+ amount: number;
1274
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1275
+ isPercentage: boolean;
1276
+ taxable: boolean;
1277
+ recurring: boolean;
1278
+ effectiveFrom: NativeDate;
1279
+ name?: string | null | undefined;
1280
+ value?: number | null | undefined;
1281
+ effectiveTo?: NativeDate | null | undefined;
1282
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1283
+ amount: number;
1284
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1285
+ isPercentage: boolean;
1286
+ taxable: boolean;
1287
+ recurring: boolean;
1288
+ effectiveFrom: NativeDate;
1289
+ name?: string | null | undefined;
1290
+ value?: number | null | undefined;
1291
+ effectiveTo?: NativeDate | null | undefined;
1292
+ }> & {
1293
+ amount: number;
1294
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1295
+ isPercentage: boolean;
1296
+ taxable: boolean;
1297
+ recurring: boolean;
1298
+ effectiveFrom: NativeDate;
1299
+ name?: string | null | undefined;
1300
+ value?: number | null | undefined;
1301
+ effectiveTo?: NativeDate | null | undefined;
1302
+ }>;
1303
+ deductions: Types.DocumentArray<{
1304
+ amount: number;
1305
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1306
+ auto: boolean;
1307
+ isPercentage: boolean;
1308
+ recurring: boolean;
1309
+ effectiveFrom: NativeDate;
1310
+ name?: string | null | undefined;
1311
+ description?: string | null | undefined;
1312
+ value?: number | null | undefined;
1313
+ effectiveTo?: NativeDate | null | undefined;
1314
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1315
+ amount: number;
1316
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1317
+ auto: boolean;
1318
+ isPercentage: boolean;
1319
+ recurring: boolean;
1320
+ effectiveFrom: NativeDate;
1321
+ name?: string | null | undefined;
1322
+ description?: string | null | undefined;
1323
+ value?: number | null | undefined;
1324
+ effectiveTo?: NativeDate | null | undefined;
1325
+ }> & {
1326
+ amount: number;
1327
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1328
+ auto: boolean;
1329
+ isPercentage: boolean;
1330
+ recurring: boolean;
1331
+ effectiveFrom: NativeDate;
1332
+ name?: string | null | undefined;
1333
+ description?: string | null | undefined;
1334
+ value?: number | null | undefined;
1335
+ effectiveTo?: NativeDate | null | undefined;
1336
+ }>;
1337
+ grossSalary: number;
1338
+ netSalary: number;
1339
+ lastModified: NativeDate;
1340
+ currency?: string | null | undefined;
1341
+ }, {
1342
+ id: string;
1343
+ }, mongoose.ResolveSchemaOptions<{
1344
+ _id: false;
1345
+ }>> & Omit<{
1346
+ effectiveFrom: NativeDate;
1347
+ baseAmount: number;
1348
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
1349
+ allowances: Types.DocumentArray<{
1350
+ amount: number;
1351
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1352
+ isPercentage: boolean;
1353
+ taxable: boolean;
1354
+ recurring: boolean;
1355
+ effectiveFrom: NativeDate;
1356
+ name?: string | null | undefined;
1357
+ value?: number | null | undefined;
1358
+ effectiveTo?: NativeDate | null | undefined;
1359
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1360
+ amount: number;
1361
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1362
+ isPercentage: boolean;
1363
+ taxable: boolean;
1364
+ recurring: boolean;
1365
+ effectiveFrom: NativeDate;
1366
+ name?: string | null | undefined;
1367
+ value?: number | null | undefined;
1368
+ effectiveTo?: NativeDate | null | undefined;
1369
+ }> & {
1370
+ amount: number;
1371
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1372
+ isPercentage: boolean;
1373
+ taxable: boolean;
1374
+ recurring: boolean;
1375
+ effectiveFrom: NativeDate;
1376
+ name?: string | null | undefined;
1377
+ value?: number | null | undefined;
1378
+ effectiveTo?: NativeDate | null | undefined;
1379
+ }>;
1380
+ deductions: Types.DocumentArray<{
1381
+ amount: number;
1382
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1383
+ auto: boolean;
1384
+ isPercentage: boolean;
1385
+ recurring: boolean;
1386
+ effectiveFrom: NativeDate;
1387
+ name?: string | null | undefined;
1388
+ description?: string | null | undefined;
1389
+ value?: number | null | undefined;
1390
+ effectiveTo?: NativeDate | null | undefined;
1391
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1392
+ amount: number;
1393
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1394
+ auto: boolean;
1395
+ isPercentage: boolean;
1396
+ recurring: boolean;
1397
+ effectiveFrom: NativeDate;
1398
+ name?: string | null | undefined;
1399
+ description?: string | null | undefined;
1400
+ value?: number | null | undefined;
1401
+ effectiveTo?: NativeDate | null | undefined;
1402
+ }> & {
1403
+ amount: number;
1404
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1405
+ auto: boolean;
1406
+ isPercentage: boolean;
1407
+ recurring: boolean;
1408
+ effectiveFrom: NativeDate;
1409
+ name?: string | null | undefined;
1410
+ description?: string | null | undefined;
1411
+ value?: number | null | undefined;
1412
+ effectiveTo?: NativeDate | null | undefined;
1413
+ }>;
1414
+ grossSalary: number;
1415
+ netSalary: number;
1416
+ lastModified: NativeDate;
1417
+ currency?: string | null | undefined;
1418
+ } & {
1419
+ _id: Types.ObjectId;
1420
+ } & {
1421
+ __v: number;
1422
+ }, "id"> & {
1423
+ id: string;
1424
+ }> | undefined;
1425
+ }, {
1426
+ effectiveFrom: NativeDate;
1427
+ baseAmount: number;
1428
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
1429
+ allowances: Types.DocumentArray<{
1430
+ amount: number;
1431
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1432
+ isPercentage: boolean;
1433
+ taxable: boolean;
1434
+ recurring: boolean;
1435
+ effectiveFrom: NativeDate;
1436
+ name?: string | null | undefined;
1437
+ value?: number | null | undefined;
1438
+ effectiveTo?: NativeDate | null | undefined;
1439
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1440
+ amount: number;
1441
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1442
+ isPercentage: boolean;
1443
+ taxable: boolean;
1444
+ recurring: boolean;
1445
+ effectiveFrom: NativeDate;
1446
+ name?: string | null | undefined;
1447
+ value?: number | null | undefined;
1448
+ effectiveTo?: NativeDate | null | undefined;
1449
+ }> & {
1450
+ amount: number;
1451
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1452
+ isPercentage: boolean;
1453
+ taxable: boolean;
1454
+ recurring: boolean;
1455
+ effectiveFrom: NativeDate;
1456
+ name?: string | null | undefined;
1457
+ value?: number | null | undefined;
1458
+ effectiveTo?: NativeDate | null | undefined;
1459
+ }>;
1460
+ deductions: Types.DocumentArray<{
1461
+ amount: number;
1462
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1463
+ auto: boolean;
1464
+ isPercentage: boolean;
1465
+ recurring: boolean;
1466
+ effectiveFrom: NativeDate;
1467
+ name?: string | null | undefined;
1468
+ description?: string | null | undefined;
1469
+ value?: number | null | undefined;
1470
+ effectiveTo?: NativeDate | null | undefined;
1471
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1472
+ amount: number;
1473
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1474
+ auto: boolean;
1475
+ isPercentage: boolean;
1476
+ recurring: boolean;
1477
+ effectiveFrom: NativeDate;
1478
+ name?: string | null | undefined;
1479
+ description?: string | null | undefined;
1480
+ value?: number | null | undefined;
1481
+ effectiveTo?: NativeDate | null | undefined;
1482
+ }> & {
1483
+ amount: number;
1484
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1485
+ auto: boolean;
1486
+ isPercentage: boolean;
1487
+ recurring: boolean;
1488
+ effectiveFrom: NativeDate;
1489
+ name?: string | null | undefined;
1490
+ description?: string | null | undefined;
1491
+ value?: number | null | undefined;
1492
+ effectiveTo?: NativeDate | null | undefined;
1493
+ }>;
1494
+ grossSalary: number;
1495
+ netSalary: number;
1496
+ lastModified: NativeDate;
1497
+ currency?: string | null | undefined;
1498
+ } & {
1499
+ _id: Types.ObjectId;
1500
+ } & {
1501
+ __v: number;
1502
+ }>;
1503
+ /**
1504
+ * Work schedule schema definition
1505
+ */
1506
+ declare const workScheduleSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
1507
+ _id: false;
1508
+ }, {
1509
+ workingDays: number[];
1510
+ hoursPerWeek?: number | null | undefined;
1511
+ hoursPerDay?: number | null | undefined;
1512
+ shiftStart?: string | null | undefined;
1513
+ shiftEnd?: string | null | undefined;
1514
+ }, mongoose.Document<unknown, {}, {
1515
+ workingDays: number[];
1516
+ hoursPerWeek?: number | null | undefined;
1517
+ hoursPerDay?: number | null | undefined;
1518
+ shiftStart?: string | null | undefined;
1519
+ shiftEnd?: string | null | undefined;
1520
+ }, {
1521
+ id: string;
1522
+ }, mongoose.ResolveSchemaOptions<{
1523
+ _id: false;
1524
+ }>> & Omit<{
1525
+ workingDays: number[];
1526
+ hoursPerWeek?: number | null | undefined;
1527
+ hoursPerDay?: number | null | undefined;
1528
+ shiftStart?: string | null | undefined;
1529
+ shiftEnd?: string | null | undefined;
1530
+ } & {
1531
+ _id: Types.ObjectId;
1532
+ } & {
1533
+ __v: number;
1534
+ }, "id"> & {
1535
+ id: string;
1536
+ }, {
1537
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
1538
+ } | {
1539
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
1540
+ workingDays: number[];
1541
+ hoursPerWeek?: number | null | undefined;
1542
+ hoursPerDay?: number | null | undefined;
1543
+ shiftStart?: string | null | undefined;
1544
+ shiftEnd?: string | null | undefined;
1545
+ }, {
1546
+ id: string;
1547
+ }, mongoose.ResolveSchemaOptions<{
1548
+ _id: false;
1549
+ }>> & Omit<{
1550
+ workingDays: number[];
1551
+ hoursPerWeek?: number | null | undefined;
1552
+ hoursPerDay?: number | null | undefined;
1553
+ shiftStart?: string | null | undefined;
1554
+ shiftEnd?: string | null | undefined;
1555
+ } & {
1556
+ _id: Types.ObjectId;
1557
+ } & {
1558
+ __v: number;
1559
+ }, "id"> & {
1560
+ id: string;
1561
+ }> | undefined;
1562
+ }, {
1563
+ workingDays: number[];
1564
+ hoursPerWeek?: number | null | undefined;
1565
+ hoursPerDay?: number | null | undefined;
1566
+ shiftStart?: string | null | undefined;
1567
+ shiftEnd?: string | null | undefined;
1568
+ } & {
1569
+ _id: Types.ObjectId;
1570
+ } & {
1571
+ __v: number;
1572
+ }>;
1573
+ /**
1574
+ * Bank details schema definition
1575
+ */
1576
+ declare const bankDetailsSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
1577
+ _id: false;
1578
+ }, {
1579
+ accountName?: string | null | undefined;
1580
+ accountNumber?: string | null | undefined;
1581
+ bankName?: string | null | undefined;
1582
+ branchName?: string | null | undefined;
1583
+ routingNumber?: string | null | undefined;
1584
+ }, mongoose.Document<unknown, {}, {
1585
+ accountName?: string | null | undefined;
1586
+ accountNumber?: string | null | undefined;
1587
+ bankName?: string | null | undefined;
1588
+ branchName?: string | null | undefined;
1589
+ routingNumber?: string | null | undefined;
1590
+ }, {
1591
+ id: string;
1592
+ }, mongoose.ResolveSchemaOptions<{
1593
+ _id: false;
1594
+ }>> & Omit<{
1595
+ accountName?: string | null | undefined;
1596
+ accountNumber?: string | null | undefined;
1597
+ bankName?: string | null | undefined;
1598
+ branchName?: string | null | undefined;
1599
+ routingNumber?: string | null | undefined;
1600
+ } & {
1601
+ _id: Types.ObjectId;
1602
+ } & {
1603
+ __v: number;
1604
+ }, "id"> & {
1605
+ id: string;
1606
+ }, {
1607
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
1608
+ } | {
1609
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
1610
+ accountName?: string | null | undefined;
1611
+ accountNumber?: string | null | undefined;
1612
+ bankName?: string | null | undefined;
1613
+ branchName?: string | null | undefined;
1614
+ routingNumber?: string | null | undefined;
1615
+ }, {
1616
+ id: string;
1617
+ }, mongoose.ResolveSchemaOptions<{
1618
+ _id: false;
1619
+ }>> & Omit<{
1620
+ accountName?: string | null | undefined;
1621
+ accountNumber?: string | null | undefined;
1622
+ bankName?: string | null | undefined;
1623
+ branchName?: string | null | undefined;
1624
+ routingNumber?: string | null | undefined;
1625
+ } & {
1626
+ _id: Types.ObjectId;
1627
+ } & {
1628
+ __v: number;
1629
+ }, "id"> & {
1630
+ id: string;
1631
+ }> | undefined;
1632
+ }, {
1633
+ accountName?: string | null | undefined;
1634
+ accountNumber?: string | null | undefined;
1635
+ bankName?: string | null | undefined;
1636
+ branchName?: string | null | undefined;
1637
+ routingNumber?: string | null | undefined;
1638
+ } & {
1639
+ _id: Types.ObjectId;
1640
+ } & {
1641
+ __v: number;
1642
+ }>;
1643
+ /**
1644
+ * Employment history entry schema
1645
+ */
1646
+ declare const employmentHistorySchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
1647
+ timestamps: true;
1648
+ }, {
1649
+ hireDate: NativeDate;
1650
+ terminationDate: NativeDate;
1651
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
1652
+ position?: string | null | undefined;
1653
+ notes?: string | null | undefined;
1654
+ department?: string | null | undefined;
1655
+ finalSalary?: number | null | undefined;
1656
+ } & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
1657
+ hireDate: NativeDate;
1658
+ terminationDate: NativeDate;
1659
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
1660
+ position?: string | null | undefined;
1661
+ notes?: string | null | undefined;
1662
+ department?: string | null | undefined;
1663
+ finalSalary?: number | null | undefined;
1664
+ } & mongoose.DefaultTimestampProps, {
1665
+ id: string;
1666
+ }, mongoose.ResolveSchemaOptions<{
1667
+ timestamps: true;
1668
+ }>> & Omit<{
1669
+ hireDate: NativeDate;
1670
+ terminationDate: NativeDate;
1671
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
1672
+ position?: string | null | undefined;
1673
+ notes?: string | null | undefined;
1674
+ department?: string | null | undefined;
1675
+ finalSalary?: number | null | undefined;
1676
+ } & mongoose.DefaultTimestampProps & {
1677
+ _id: Types.ObjectId;
1678
+ } & {
1679
+ __v: number;
1680
+ }, "id"> & {
1681
+ id: string;
1682
+ }, {
1683
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
1684
+ } | {
1685
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
1686
+ hireDate: NativeDate;
1687
+ terminationDate: NativeDate;
1688
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
1689
+ position?: string | null | undefined;
1690
+ notes?: string | null | undefined;
1691
+ department?: string | null | undefined;
1692
+ finalSalary?: number | null | undefined;
1693
+ } & mongoose.DefaultTimestampProps, {
1694
+ id: string;
1695
+ }, mongoose.ResolveSchemaOptions<{
1696
+ timestamps: true;
1697
+ }>> & Omit<{
1698
+ hireDate: NativeDate;
1699
+ terminationDate: NativeDate;
1700
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
1701
+ position?: string | null | undefined;
1702
+ notes?: string | null | undefined;
1703
+ department?: string | null | undefined;
1704
+ finalSalary?: number | null | undefined;
1705
+ } & mongoose.DefaultTimestampProps & {
1706
+ _id: Types.ObjectId;
1707
+ } & {
1708
+ __v: number;
1709
+ }, "id"> & {
1710
+ id: string;
1711
+ }> | undefined;
1712
+ }, {
1713
+ hireDate: NativeDate;
1714
+ terminationDate: NativeDate;
1715
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
1716
+ position?: string | null | undefined;
1717
+ notes?: string | null | undefined;
1718
+ department?: string | null | undefined;
1719
+ finalSalary?: number | null | undefined;
1720
+ createdAt: NativeDate;
1721
+ updatedAt: NativeDate;
1722
+ } & {
1723
+ _id: Types.ObjectId;
1724
+ } & {
1725
+ __v: number;
1726
+ }>;
1727
+ /**
1728
+ * Payroll stats schema (pre-calculated)
1729
+ */
1730
+ declare const payrollStatsSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
1731
+ _id: false;
1732
+ }, {
1733
+ updatedAt: NativeDate;
1734
+ totalPaid: number;
1735
+ paymentsThisYear: number;
1736
+ averageMonthly: number;
1737
+ lastPaymentDate?: NativeDate | null | undefined;
1738
+ nextPaymentDate?: NativeDate | null | undefined;
1739
+ }, mongoose.Document<unknown, {}, {
1740
+ updatedAt: NativeDate;
1741
+ totalPaid: number;
1742
+ paymentsThisYear: number;
1743
+ averageMonthly: number;
1744
+ lastPaymentDate?: NativeDate | null | undefined;
1745
+ nextPaymentDate?: NativeDate | null | undefined;
1746
+ }, {
1747
+ id: string;
1748
+ }, mongoose.ResolveSchemaOptions<{
1749
+ _id: false;
1750
+ }>> & Omit<{
1751
+ updatedAt: NativeDate;
1752
+ totalPaid: number;
1753
+ paymentsThisYear: number;
1754
+ averageMonthly: number;
1755
+ lastPaymentDate?: NativeDate | null | undefined;
1756
+ nextPaymentDate?: NativeDate | null | undefined;
1757
+ } & {
1758
+ _id: Types.ObjectId;
1759
+ } & {
1760
+ __v: number;
1761
+ }, "id"> & {
1762
+ id: string;
1763
+ }, {
1764
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
1765
+ } | {
1766
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
1767
+ updatedAt: NativeDate;
1768
+ totalPaid: number;
1769
+ paymentsThisYear: number;
1770
+ averageMonthly: number;
1771
+ lastPaymentDate?: NativeDate | null | undefined;
1772
+ nextPaymentDate?: NativeDate | null | undefined;
1773
+ }, {
1774
+ id: string;
1775
+ }, mongoose.ResolveSchemaOptions<{
1776
+ _id: false;
1777
+ }>> & Omit<{
1778
+ updatedAt: NativeDate;
1779
+ totalPaid: number;
1780
+ paymentsThisYear: number;
1781
+ averageMonthly: number;
1782
+ lastPaymentDate?: NativeDate | null | undefined;
1783
+ nextPaymentDate?: NativeDate | null | undefined;
1784
+ } & {
1785
+ _id: Types.ObjectId;
1786
+ } & {
1787
+ __v: number;
1788
+ }, "id"> & {
1789
+ id: string;
1790
+ }> | undefined;
1791
+ }, {
1792
+ updatedAt: NativeDate;
1793
+ totalPaid: number;
1794
+ paymentsThisYear: number;
1795
+ averageMonthly: number;
1796
+ lastPaymentDate?: NativeDate | null | undefined;
1797
+ nextPaymentDate?: NativeDate | null | undefined;
1798
+ } & {
1799
+ _id: Types.ObjectId;
1800
+ } & {
1801
+ __v: number;
1802
+ }>;
1803
+ /**
1804
+ * Employment fields to spread into your Employee schema.
1805
+ * Use `createEmploymentFields()` for configurable references.
1806
+ */
1807
+ /**
1808
+ * Create employment fields with configurable references.
1809
+ *
1810
+ * @param options - Schema options for configuring references
1811
+ * @returns SchemaDefinition for employment fields
1812
+ */
1813
+ declare function createEmploymentFields(options?: PayrollSchemaOptions): SchemaDefinition;
1814
+ /**
1815
+ * Payroll breakdown schema
1816
+ */
1817
+ declare const payrollBreakdownSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
1818
+ _id: false;
1819
+ }, {
1820
+ taxableAmount: number;
1821
+ baseAmount: number;
1822
+ allowances: Types.DocumentArray<{
1823
+ amount: number;
1824
+ type: string;
1825
+ taxable: boolean;
1826
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1827
+ amount: number;
1828
+ type: string;
1829
+ taxable: boolean;
1830
+ }> & {
1831
+ amount: number;
1832
+ type: string;
1833
+ taxable: boolean;
1834
+ }>;
1835
+ deductions: Types.DocumentArray<{
1836
+ amount: number;
1837
+ type: string;
1838
+ description?: string | null | undefined;
1839
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1840
+ amount: number;
1841
+ type: string;
1842
+ description?: string | null | undefined;
1843
+ }> & {
1844
+ amount: number;
1845
+ type: string;
1846
+ description?: string | null | undefined;
1847
+ }>;
1848
+ grossSalary: number;
1849
+ netSalary: number;
1850
+ taxAmount: number;
1851
+ proRatedAmount: number;
1852
+ attendanceDeduction: number;
1853
+ overtimeAmount: number;
1854
+ bonusAmount: number;
1855
+ workingDays?: number | null | undefined;
1856
+ actualDays?: number | null | undefined;
1857
+ }, mongoose.Document<unknown, {}, {
1858
+ taxableAmount: number;
1859
+ baseAmount: number;
1860
+ allowances: Types.DocumentArray<{
1861
+ amount: number;
1862
+ type: string;
1863
+ taxable: boolean;
1864
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1865
+ amount: number;
1866
+ type: string;
1867
+ taxable: boolean;
1868
+ }> & {
1869
+ amount: number;
1870
+ type: string;
1871
+ taxable: boolean;
1872
+ }>;
1873
+ deductions: Types.DocumentArray<{
1874
+ amount: number;
1875
+ type: string;
1876
+ description?: string | null | undefined;
1877
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1878
+ amount: number;
1879
+ type: string;
1880
+ description?: string | null | undefined;
1881
+ }> & {
1882
+ amount: number;
1883
+ type: string;
1884
+ description?: string | null | undefined;
1885
+ }>;
1886
+ grossSalary: number;
1887
+ netSalary: number;
1888
+ taxAmount: number;
1889
+ proRatedAmount: number;
1890
+ attendanceDeduction: number;
1891
+ overtimeAmount: number;
1892
+ bonusAmount: number;
1893
+ workingDays?: number | null | undefined;
1894
+ actualDays?: number | null | undefined;
1895
+ }, {
1896
+ id: string;
1897
+ }, mongoose.ResolveSchemaOptions<{
1898
+ _id: false;
1899
+ }>> & Omit<{
1900
+ taxableAmount: number;
1901
+ baseAmount: number;
1902
+ allowances: Types.DocumentArray<{
1903
+ amount: number;
1904
+ type: string;
1905
+ taxable: boolean;
1906
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1907
+ amount: number;
1908
+ type: string;
1909
+ taxable: boolean;
1910
+ }> & {
1911
+ amount: number;
1912
+ type: string;
1913
+ taxable: boolean;
1914
+ }>;
1915
+ deductions: Types.DocumentArray<{
1916
+ amount: number;
1917
+ type: string;
1918
+ description?: string | null | undefined;
1919
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1920
+ amount: number;
1921
+ type: string;
1922
+ description?: string | null | undefined;
1923
+ }> & {
1924
+ amount: number;
1925
+ type: string;
1926
+ description?: string | null | undefined;
1927
+ }>;
1928
+ grossSalary: number;
1929
+ netSalary: number;
1930
+ taxAmount: number;
1931
+ proRatedAmount: number;
1932
+ attendanceDeduction: number;
1933
+ overtimeAmount: number;
1934
+ bonusAmount: number;
1935
+ workingDays?: number | null | undefined;
1936
+ actualDays?: number | null | undefined;
1937
+ } & {
1938
+ _id: Types.ObjectId;
1939
+ } & {
1940
+ __v: number;
1941
+ }, "id"> & {
1942
+ id: string;
1943
+ }, {
1944
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
1945
+ } | {
1946
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
1947
+ taxableAmount: number;
1948
+ baseAmount: number;
1949
+ allowances: Types.DocumentArray<{
1950
+ amount: number;
1951
+ type: string;
1952
+ taxable: boolean;
1953
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1954
+ amount: number;
1955
+ type: string;
1956
+ taxable: boolean;
1957
+ }> & {
1958
+ amount: number;
1959
+ type: string;
1960
+ taxable: boolean;
1961
+ }>;
1962
+ deductions: Types.DocumentArray<{
1963
+ amount: number;
1964
+ type: string;
1965
+ description?: string | null | undefined;
1966
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1967
+ amount: number;
1968
+ type: string;
1969
+ description?: string | null | undefined;
1970
+ }> & {
1971
+ amount: number;
1972
+ type: string;
1973
+ description?: string | null | undefined;
1974
+ }>;
1975
+ grossSalary: number;
1976
+ netSalary: number;
1977
+ taxAmount: number;
1978
+ proRatedAmount: number;
1979
+ attendanceDeduction: number;
1980
+ overtimeAmount: number;
1981
+ bonusAmount: number;
1982
+ workingDays?: number | null | undefined;
1983
+ actualDays?: number | null | undefined;
1984
+ }, {
1985
+ id: string;
1986
+ }, mongoose.ResolveSchemaOptions<{
1987
+ _id: false;
1988
+ }>> & Omit<{
1989
+ taxableAmount: number;
1990
+ baseAmount: number;
1991
+ allowances: Types.DocumentArray<{
1992
+ amount: number;
1993
+ type: string;
1994
+ taxable: boolean;
1995
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1996
+ amount: number;
1997
+ type: string;
1998
+ taxable: boolean;
1999
+ }> & {
2000
+ amount: number;
2001
+ type: string;
2002
+ taxable: boolean;
2003
+ }>;
2004
+ deductions: Types.DocumentArray<{
2005
+ amount: number;
2006
+ type: string;
2007
+ description?: string | null | undefined;
2008
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2009
+ amount: number;
2010
+ type: string;
2011
+ description?: string | null | undefined;
2012
+ }> & {
2013
+ amount: number;
2014
+ type: string;
2015
+ description?: string | null | undefined;
2016
+ }>;
2017
+ grossSalary: number;
2018
+ netSalary: number;
2019
+ taxAmount: number;
2020
+ proRatedAmount: number;
2021
+ attendanceDeduction: number;
2022
+ overtimeAmount: number;
2023
+ bonusAmount: number;
2024
+ workingDays?: number | null | undefined;
2025
+ actualDays?: number | null | undefined;
2026
+ } & {
2027
+ _id: Types.ObjectId;
2028
+ } & {
2029
+ __v: number;
2030
+ }, "id"> & {
2031
+ id: string;
2032
+ }> | undefined;
2033
+ }, {
2034
+ taxableAmount: number;
2035
+ baseAmount: number;
2036
+ allowances: Types.DocumentArray<{
2037
+ amount: number;
2038
+ type: string;
2039
+ taxable: boolean;
2040
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2041
+ amount: number;
2042
+ type: string;
2043
+ taxable: boolean;
2044
+ }> & {
2045
+ amount: number;
2046
+ type: string;
2047
+ taxable: boolean;
2048
+ }>;
2049
+ deductions: Types.DocumentArray<{
2050
+ amount: number;
2051
+ type: string;
2052
+ description?: string | null | undefined;
2053
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2054
+ amount: number;
2055
+ type: string;
2056
+ description?: string | null | undefined;
2057
+ }> & {
2058
+ amount: number;
2059
+ type: string;
2060
+ description?: string | null | undefined;
2061
+ }>;
2062
+ grossSalary: number;
2063
+ netSalary: number;
2064
+ taxAmount: number;
2065
+ proRatedAmount: number;
2066
+ attendanceDeduction: number;
2067
+ overtimeAmount: number;
2068
+ bonusAmount: number;
2069
+ workingDays?: number | null | undefined;
2070
+ actualDays?: number | null | undefined;
2071
+ } & {
2072
+ _id: Types.ObjectId;
2073
+ } & {
2074
+ __v: number;
2075
+ }>;
2076
+
2077
+ /**
2078
+ * Create payroll record fields with configurable references.
2079
+ *
2080
+ * @param options - Schema options for configuring references
2081
+ * @returns SchemaDefinition for payroll record fields
2082
+ */
2083
+ declare function createPayrollRecordFields(options?: PayrollSchemaOptions): SchemaDefinition;
2084
+ /**
2085
+ * Recommended indexes for Employee schema
2086
+ */
2087
+ declare const employeeIndexes: ({
2088
+ fields: {
2089
+ organizationId: number;
2090
+ employeeId: number;
2091
+ userId?: undefined;
2092
+ email?: undefined;
2093
+ status?: undefined;
2094
+ department?: undefined;
2095
+ 'compensation.netSalary'?: undefined;
2096
+ };
2097
+ options: {
2098
+ unique: boolean;
2099
+ partialFilterExpression?: undefined;
2100
+ };
2101
+ } | {
2102
+ fields: {
2103
+ userId: number;
2104
+ organizationId: number;
2105
+ employeeId?: undefined;
2106
+ email?: undefined;
2107
+ status?: undefined;
2108
+ department?: undefined;
2109
+ 'compensation.netSalary'?: undefined;
2110
+ };
2111
+ options: {
2112
+ unique: boolean;
2113
+ partialFilterExpression: {
2114
+ userId: {
2115
+ $exists: boolean;
2116
+ };
2117
+ email?: undefined;
2118
+ status?: undefined;
2119
+ };
2120
+ };
2121
+ } | {
2122
+ fields: {
2123
+ email: number;
2124
+ organizationId: number;
2125
+ employeeId?: undefined;
2126
+ userId?: undefined;
2127
+ status?: undefined;
2128
+ department?: undefined;
2129
+ 'compensation.netSalary'?: undefined;
2130
+ };
2131
+ options: {
2132
+ unique: boolean;
2133
+ partialFilterExpression: {
2134
+ email: {
2135
+ $exists: boolean;
2136
+ };
2137
+ status: {
2138
+ $in: string[];
2139
+ };
2140
+ userId?: undefined;
2141
+ };
2142
+ };
2143
+ } | {
2144
+ fields: {
2145
+ organizationId: number;
2146
+ status: number;
2147
+ employeeId?: undefined;
2148
+ userId?: undefined;
2149
+ email?: undefined;
2150
+ department?: undefined;
2151
+ 'compensation.netSalary'?: undefined;
2152
+ };
2153
+ options?: undefined;
2154
+ } | {
2155
+ fields: {
2156
+ organizationId: number;
2157
+ department: number;
2158
+ employeeId?: undefined;
2159
+ userId?: undefined;
2160
+ email?: undefined;
2161
+ status?: undefined;
2162
+ 'compensation.netSalary'?: undefined;
2163
+ };
2164
+ options?: undefined;
2165
+ } | {
2166
+ fields: {
2167
+ organizationId: number;
2168
+ 'compensation.netSalary': number;
2169
+ employeeId?: undefined;
2170
+ userId?: undefined;
2171
+ email?: undefined;
2172
+ status?: undefined;
2173
+ department?: undefined;
2174
+ };
2175
+ options?: undefined;
2176
+ })[];
2177
+ /**
2178
+ * Recommended indexes for PayrollRecord schema
2179
+ *
2180
+ * Includes UNIQUE compound index on (org, employee, period, runType) with partial filter
2181
+ * to prevent race conditions while still allowing re-processing after void/reverse.
2182
+ */
2183
+ declare const payrollRecordIndexes: ({
2184
+ fields: {
2185
+ organizationId: number;
2186
+ employeeId: number;
2187
+ 'period.month': number;
2188
+ 'period.year': number;
2189
+ 'period.startDate': number;
2190
+ payrollRunType: number;
2191
+ status?: undefined;
2192
+ createdAt?: undefined;
2193
+ 'period.payDate'?: undefined;
2194
+ expireAt?: undefined;
2195
+ };
2196
+ options: {
2197
+ unique: boolean;
2198
+ name: string;
2199
+ partialFilterExpression: {
2200
+ isVoided: {
2201
+ $eq: boolean;
2202
+ };
2203
+ };
2204
+ expireAfterSeconds?: undefined;
2205
+ };
2206
+ } | {
2207
+ fields: {
2208
+ organizationId: number;
2209
+ employeeId: number;
2210
+ 'period.month': number;
2211
+ 'period.year': number;
2212
+ 'period.startDate'?: undefined;
2213
+ payrollRunType?: undefined;
2214
+ status?: undefined;
2215
+ createdAt?: undefined;
2216
+ 'period.payDate'?: undefined;
2217
+ expireAt?: undefined;
2218
+ };
2219
+ options?: undefined;
2220
+ } | {
2221
+ fields: {
2222
+ organizationId: number;
2223
+ 'period.year': number;
2224
+ 'period.month': number;
2225
+ employeeId?: undefined;
2226
+ 'period.startDate'?: undefined;
2227
+ payrollRunType?: undefined;
2228
+ status?: undefined;
2229
+ createdAt?: undefined;
2230
+ 'period.payDate'?: undefined;
2231
+ expireAt?: undefined;
2232
+ };
2233
+ options?: undefined;
2234
+ } | {
2235
+ fields: {
2236
+ employeeId: number;
2237
+ 'period.year': number;
2238
+ 'period.month': number;
2239
+ organizationId?: undefined;
2240
+ 'period.startDate'?: undefined;
2241
+ payrollRunType?: undefined;
2242
+ status?: undefined;
2243
+ createdAt?: undefined;
2244
+ 'period.payDate'?: undefined;
2245
+ expireAt?: undefined;
2246
+ };
2247
+ options?: undefined;
2248
+ } | {
2249
+ fields: {
2250
+ status: number;
2251
+ createdAt: number;
2252
+ organizationId?: undefined;
2253
+ employeeId?: undefined;
2254
+ 'period.month'?: undefined;
2255
+ 'period.year'?: undefined;
2256
+ 'period.startDate'?: undefined;
2257
+ payrollRunType?: undefined;
2258
+ 'period.payDate'?: undefined;
2259
+ expireAt?: undefined;
2260
+ };
2261
+ options?: undefined;
2262
+ } | {
2263
+ fields: {
2264
+ organizationId: number;
2265
+ status: number;
2266
+ 'period.payDate': number;
2267
+ employeeId?: undefined;
2268
+ 'period.month'?: undefined;
2269
+ 'period.year'?: undefined;
2270
+ 'period.startDate'?: undefined;
2271
+ payrollRunType?: undefined;
2272
+ createdAt?: undefined;
2273
+ expireAt?: undefined;
2274
+ };
2275
+ options?: undefined;
2276
+ } | {
2277
+ fields: {
2278
+ organizationId: number;
2279
+ payrollRunType: number;
2280
+ 'period.year': number;
2281
+ 'period.month': number;
2282
+ employeeId?: undefined;
2283
+ 'period.startDate'?: undefined;
2284
+ status?: undefined;
2285
+ createdAt?: undefined;
2286
+ 'period.payDate'?: undefined;
2287
+ expireAt?: undefined;
2288
+ };
2289
+ options?: undefined;
2290
+ } | {
2291
+ fields: {
2292
+ expireAt: number;
2293
+ organizationId?: undefined;
2294
+ employeeId?: undefined;
2295
+ 'period.month'?: undefined;
2296
+ 'period.year'?: undefined;
2297
+ 'period.startDate'?: undefined;
2298
+ payrollRunType?: undefined;
2299
+ status?: undefined;
2300
+ createdAt?: undefined;
2301
+ 'period.payDate'?: undefined;
2302
+ };
2303
+ options: {
2304
+ expireAfterSeconds: number;
2305
+ unique?: undefined;
2306
+ name?: undefined;
2307
+ partialFilterExpression?: undefined;
2308
+ };
2309
+ })[];
2310
+ /**
2311
+ * Apply indexes to schema
2312
+ */
2313
+ declare function applyEmployeeIndexes(schema: Schema): void;
2314
+ /**
2315
+ * Apply payroll record indexes to schema
2316
+ */
2317
+ declare function applyPayrollRecordIndexes(schema: Schema): void;
2318
+ /**
2319
+ * Create a complete Employee schema with all HRM fields.
2320
+ *
2321
+ * @param additionalFields - Extra fields to add to the schema
2322
+ * @param options - Schema options (organizationRef, userRef)
2323
+ * @returns Mongoose Schema for Employee
2324
+ *
2325
+ * @example
2326
+ * ```typescript
2327
+ * // Default (references 'Organization')
2328
+ * const employeeSchema = createEmployeeSchema();
2329
+ *
2330
+ * // Multi-branch setup
2331
+ * const employeeSchema = createEmployeeSchema({}, {
2332
+ * organizationRef: 'Branch',
2333
+ * });
2334
+ *
2335
+ * // With additional fields
2336
+ * const employeeSchema = createEmployeeSchema({
2337
+ * customField: { type: String },
2338
+ * }, {
2339
+ * organizationRef: 'Company',
2340
+ * });
2341
+ * ```
2342
+ */
2343
+ declare function createEmployeeSchema(additionalFields?: SchemaDefinition, options?: PayrollSchemaOptions): Schema;
2344
+ /**
2345
+ * Create a complete PayrollRecord schema.
2346
+ *
2347
+ * @param additionalFields - Extra fields to add to the schema
2348
+ * @param options - Schema options (organizationRef, userRef)
2349
+ * @returns Mongoose Schema for PayrollRecord
2350
+ *
2351
+ * @example
2352
+ * ```typescript
2353
+ * // Multi-branch setup
2354
+ * const payrollRecordSchema = createPayrollRecordSchema({}, {
2355
+ * organizationRef: 'Branch',
2356
+ * });
2357
+ * ```
2358
+ */
2359
+ declare function createPayrollRecordSchema(additionalFields?: SchemaDefinition, options?: PayrollSchemaOptions): Schema;
2360
+
2361
+ declare const _default: {
2362
+ allowanceSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
2363
+ _id: false;
2364
+ }, {
2365
+ amount: number;
2366
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2367
+ isPercentage: boolean;
2368
+ taxable: boolean;
2369
+ recurring: boolean;
2370
+ effectiveFrom: NativeDate;
2371
+ name?: string | null | undefined;
2372
+ value?: number | null | undefined;
2373
+ effectiveTo?: NativeDate | null | undefined;
2374
+ }, mongoose.Document<unknown, {}, {
2375
+ amount: number;
2376
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2377
+ isPercentage: boolean;
2378
+ taxable: boolean;
2379
+ recurring: boolean;
2380
+ effectiveFrom: NativeDate;
2381
+ name?: string | null | undefined;
2382
+ value?: number | null | undefined;
2383
+ effectiveTo?: NativeDate | null | undefined;
2384
+ }, {
2385
+ id: string;
2386
+ }, mongoose.ResolveSchemaOptions<{
2387
+ _id: false;
2388
+ }>> & Omit<{
2389
+ amount: number;
2390
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2391
+ isPercentage: boolean;
2392
+ taxable: boolean;
2393
+ recurring: boolean;
2394
+ effectiveFrom: NativeDate;
2395
+ name?: string | null | undefined;
2396
+ value?: number | null | undefined;
2397
+ effectiveTo?: NativeDate | null | undefined;
2398
+ } & {
2399
+ _id: Types.ObjectId;
2400
+ } & {
2401
+ __v: number;
2402
+ }, "id"> & {
2403
+ id: string;
2404
+ }, {
2405
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
2406
+ } | {
2407
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
2408
+ amount: number;
2409
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2410
+ isPercentage: boolean;
2411
+ taxable: boolean;
2412
+ recurring: boolean;
2413
+ effectiveFrom: NativeDate;
2414
+ name?: string | null | undefined;
2415
+ value?: number | null | undefined;
2416
+ effectiveTo?: NativeDate | null | undefined;
2417
+ }, {
2418
+ id: string;
2419
+ }, mongoose.ResolveSchemaOptions<{
2420
+ _id: false;
2421
+ }>> & Omit<{
2422
+ amount: number;
2423
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2424
+ isPercentage: boolean;
2425
+ taxable: boolean;
2426
+ recurring: boolean;
2427
+ effectiveFrom: NativeDate;
2428
+ name?: string | null | undefined;
2429
+ value?: number | null | undefined;
2430
+ effectiveTo?: NativeDate | null | undefined;
2431
+ } & {
2432
+ _id: Types.ObjectId;
2433
+ } & {
2434
+ __v: number;
2435
+ }, "id"> & {
2436
+ id: string;
2437
+ }> | undefined;
2438
+ }, {
2439
+ amount: number;
2440
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2441
+ isPercentage: boolean;
2442
+ taxable: boolean;
2443
+ recurring: boolean;
2444
+ effectiveFrom: NativeDate;
2445
+ name?: string | null | undefined;
2446
+ value?: number | null | undefined;
2447
+ effectiveTo?: NativeDate | null | undefined;
2448
+ } & {
2449
+ _id: Types.ObjectId;
2450
+ } & {
2451
+ __v: number;
2452
+ }>;
2453
+ deductionSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
2454
+ _id: false;
2455
+ }, {
2456
+ amount: number;
2457
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2458
+ auto: boolean;
2459
+ isPercentage: boolean;
2460
+ recurring: boolean;
2461
+ effectiveFrom: NativeDate;
2462
+ name?: string | null | undefined;
2463
+ description?: string | null | undefined;
2464
+ value?: number | null | undefined;
2465
+ effectiveTo?: NativeDate | null | undefined;
2466
+ }, mongoose.Document<unknown, {}, {
2467
+ amount: number;
2468
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2469
+ auto: boolean;
2470
+ isPercentage: boolean;
2471
+ recurring: boolean;
2472
+ effectiveFrom: NativeDate;
2473
+ name?: string | null | undefined;
2474
+ description?: string | null | undefined;
2475
+ value?: number | null | undefined;
2476
+ effectiveTo?: NativeDate | null | undefined;
2477
+ }, {
2478
+ id: string;
2479
+ }, mongoose.ResolveSchemaOptions<{
2480
+ _id: false;
2481
+ }>> & Omit<{
2482
+ amount: number;
2483
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2484
+ auto: boolean;
2485
+ isPercentage: boolean;
2486
+ recurring: boolean;
2487
+ effectiveFrom: NativeDate;
2488
+ name?: string | null | undefined;
2489
+ description?: string | null | undefined;
2490
+ value?: number | null | undefined;
2491
+ effectiveTo?: NativeDate | null | undefined;
2492
+ } & {
2493
+ _id: Types.ObjectId;
2494
+ } & {
2495
+ __v: number;
2496
+ }, "id"> & {
2497
+ id: string;
2498
+ }, {
2499
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
2500
+ } | {
2501
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
2502
+ amount: number;
2503
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2504
+ auto: boolean;
2505
+ isPercentage: boolean;
2506
+ recurring: boolean;
2507
+ effectiveFrom: NativeDate;
2508
+ name?: string | null | undefined;
2509
+ description?: string | null | undefined;
2510
+ value?: number | null | undefined;
2511
+ effectiveTo?: NativeDate | null | undefined;
2512
+ }, {
2513
+ id: string;
2514
+ }, mongoose.ResolveSchemaOptions<{
2515
+ _id: false;
2516
+ }>> & Omit<{
2517
+ amount: number;
2518
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2519
+ auto: boolean;
2520
+ isPercentage: boolean;
2521
+ recurring: boolean;
2522
+ effectiveFrom: NativeDate;
2523
+ name?: string | null | undefined;
2524
+ description?: string | null | undefined;
2525
+ value?: number | null | undefined;
2526
+ effectiveTo?: NativeDate | null | undefined;
2527
+ } & {
2528
+ _id: Types.ObjectId;
2529
+ } & {
2530
+ __v: number;
2531
+ }, "id"> & {
2532
+ id: string;
2533
+ }> | undefined;
2534
+ }, {
2535
+ amount: number;
2536
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2537
+ auto: boolean;
2538
+ isPercentage: boolean;
2539
+ recurring: boolean;
2540
+ effectiveFrom: NativeDate;
2541
+ name?: string | null | undefined;
2542
+ description?: string | null | undefined;
2543
+ value?: number | null | undefined;
2544
+ effectiveTo?: NativeDate | null | undefined;
2545
+ } & {
2546
+ _id: Types.ObjectId;
2547
+ } & {
2548
+ __v: number;
2549
+ }>;
2550
+ compensationSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
2551
+ _id: false;
2552
+ }, {
2553
+ effectiveFrom: NativeDate;
2554
+ baseAmount: number;
2555
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2556
+ allowances: Types.DocumentArray<{
2557
+ amount: number;
2558
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2559
+ isPercentage: boolean;
2560
+ taxable: boolean;
2561
+ recurring: boolean;
2562
+ effectiveFrom: NativeDate;
2563
+ name?: string | null | undefined;
2564
+ value?: number | null | undefined;
2565
+ effectiveTo?: NativeDate | null | undefined;
2566
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2567
+ amount: number;
2568
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2569
+ isPercentage: boolean;
2570
+ taxable: boolean;
2571
+ recurring: boolean;
2572
+ effectiveFrom: NativeDate;
2573
+ name?: string | null | undefined;
2574
+ value?: number | null | undefined;
2575
+ effectiveTo?: NativeDate | null | undefined;
2576
+ }> & {
2577
+ amount: number;
2578
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2579
+ isPercentage: boolean;
2580
+ taxable: boolean;
2581
+ recurring: boolean;
2582
+ effectiveFrom: NativeDate;
2583
+ name?: string | null | undefined;
2584
+ value?: number | null | undefined;
2585
+ effectiveTo?: NativeDate | null | undefined;
2586
+ }>;
2587
+ deductions: Types.DocumentArray<{
2588
+ amount: number;
2589
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2590
+ auto: boolean;
2591
+ isPercentage: boolean;
2592
+ recurring: boolean;
2593
+ effectiveFrom: NativeDate;
2594
+ name?: string | null | undefined;
2595
+ description?: string | null | undefined;
2596
+ value?: number | null | undefined;
2597
+ effectiveTo?: NativeDate | null | undefined;
2598
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2599
+ amount: number;
2600
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2601
+ auto: boolean;
2602
+ isPercentage: boolean;
2603
+ recurring: boolean;
2604
+ effectiveFrom: NativeDate;
2605
+ name?: string | null | undefined;
2606
+ description?: string | null | undefined;
2607
+ value?: number | null | undefined;
2608
+ effectiveTo?: NativeDate | null | undefined;
2609
+ }> & {
2610
+ amount: number;
2611
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2612
+ auto: boolean;
2613
+ isPercentage: boolean;
2614
+ recurring: boolean;
2615
+ effectiveFrom: NativeDate;
2616
+ name?: string | null | undefined;
2617
+ description?: string | null | undefined;
2618
+ value?: number | null | undefined;
2619
+ effectiveTo?: NativeDate | null | undefined;
2620
+ }>;
2621
+ grossSalary: number;
2622
+ netSalary: number;
2623
+ lastModified: NativeDate;
2624
+ currency?: string | null | undefined;
2625
+ }, mongoose.Document<unknown, {}, {
2626
+ effectiveFrom: NativeDate;
2627
+ baseAmount: number;
2628
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2629
+ allowances: Types.DocumentArray<{
2630
+ amount: number;
2631
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2632
+ isPercentage: boolean;
2633
+ taxable: boolean;
2634
+ recurring: boolean;
2635
+ effectiveFrom: NativeDate;
2636
+ name?: string | null | undefined;
2637
+ value?: number | null | undefined;
2638
+ effectiveTo?: NativeDate | null | undefined;
2639
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2640
+ amount: number;
2641
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2642
+ isPercentage: boolean;
2643
+ taxable: boolean;
2644
+ recurring: boolean;
2645
+ effectiveFrom: NativeDate;
2646
+ name?: string | null | undefined;
2647
+ value?: number | null | undefined;
2648
+ effectiveTo?: NativeDate | null | undefined;
2649
+ }> & {
2650
+ amount: number;
2651
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2652
+ isPercentage: boolean;
2653
+ taxable: boolean;
2654
+ recurring: boolean;
2655
+ effectiveFrom: NativeDate;
2656
+ name?: string | null | undefined;
2657
+ value?: number | null | undefined;
2658
+ effectiveTo?: NativeDate | null | undefined;
2659
+ }>;
2660
+ deductions: Types.DocumentArray<{
2661
+ amount: number;
2662
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2663
+ auto: boolean;
2664
+ isPercentage: boolean;
2665
+ recurring: boolean;
2666
+ effectiveFrom: NativeDate;
2667
+ name?: string | null | undefined;
2668
+ description?: string | null | undefined;
2669
+ value?: number | null | undefined;
2670
+ effectiveTo?: NativeDate | null | undefined;
2671
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2672
+ amount: number;
2673
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2674
+ auto: boolean;
2675
+ isPercentage: boolean;
2676
+ recurring: boolean;
2677
+ effectiveFrom: NativeDate;
2678
+ name?: string | null | undefined;
2679
+ description?: string | null | undefined;
2680
+ value?: number | null | undefined;
2681
+ effectiveTo?: NativeDate | null | undefined;
2682
+ }> & {
2683
+ amount: number;
2684
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2685
+ auto: boolean;
2686
+ isPercentage: boolean;
2687
+ recurring: boolean;
2688
+ effectiveFrom: NativeDate;
2689
+ name?: string | null | undefined;
2690
+ description?: string | null | undefined;
2691
+ value?: number | null | undefined;
2692
+ effectiveTo?: NativeDate | null | undefined;
2693
+ }>;
2694
+ grossSalary: number;
2695
+ netSalary: number;
2696
+ lastModified: NativeDate;
2697
+ currency?: string | null | undefined;
2698
+ }, {
2699
+ id: string;
2700
+ }, mongoose.ResolveSchemaOptions<{
2701
+ _id: false;
2702
+ }>> & Omit<{
2703
+ effectiveFrom: NativeDate;
2704
+ baseAmount: number;
2705
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2706
+ allowances: Types.DocumentArray<{
2707
+ amount: number;
2708
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2709
+ isPercentage: boolean;
2710
+ taxable: boolean;
2711
+ recurring: boolean;
2712
+ effectiveFrom: NativeDate;
2713
+ name?: string | null | undefined;
2714
+ value?: number | null | undefined;
2715
+ effectiveTo?: NativeDate | null | undefined;
2716
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2717
+ amount: number;
2718
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2719
+ isPercentage: boolean;
2720
+ taxable: boolean;
2721
+ recurring: boolean;
2722
+ effectiveFrom: NativeDate;
2723
+ name?: string | null | undefined;
2724
+ value?: number | null | undefined;
2725
+ effectiveTo?: NativeDate | null | undefined;
2726
+ }> & {
2727
+ amount: number;
2728
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2729
+ isPercentage: boolean;
2730
+ taxable: boolean;
2731
+ recurring: boolean;
2732
+ effectiveFrom: NativeDate;
2733
+ name?: string | null | undefined;
2734
+ value?: number | null | undefined;
2735
+ effectiveTo?: NativeDate | null | undefined;
2736
+ }>;
2737
+ deductions: Types.DocumentArray<{
2738
+ amount: number;
2739
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2740
+ auto: boolean;
2741
+ isPercentage: boolean;
2742
+ recurring: boolean;
2743
+ effectiveFrom: NativeDate;
2744
+ name?: string | null | undefined;
2745
+ description?: string | null | undefined;
2746
+ value?: number | null | undefined;
2747
+ effectiveTo?: NativeDate | null | undefined;
2748
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2749
+ amount: number;
2750
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2751
+ auto: boolean;
2752
+ isPercentage: boolean;
2753
+ recurring: boolean;
2754
+ effectiveFrom: NativeDate;
2755
+ name?: string | null | undefined;
2756
+ description?: string | null | undefined;
2757
+ value?: number | null | undefined;
2758
+ effectiveTo?: NativeDate | null | undefined;
2759
+ }> & {
2760
+ amount: number;
2761
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2762
+ auto: boolean;
2763
+ isPercentage: boolean;
2764
+ recurring: boolean;
2765
+ effectiveFrom: NativeDate;
2766
+ name?: string | null | undefined;
2767
+ description?: string | null | undefined;
2768
+ value?: number | null | undefined;
2769
+ effectiveTo?: NativeDate | null | undefined;
2770
+ }>;
2771
+ grossSalary: number;
2772
+ netSalary: number;
2773
+ lastModified: NativeDate;
2774
+ currency?: string | null | undefined;
2775
+ } & {
2776
+ _id: Types.ObjectId;
2777
+ } & {
2778
+ __v: number;
2779
+ }, "id"> & {
2780
+ id: string;
2781
+ }, {
2782
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
2783
+ } | {
2784
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
2785
+ effectiveFrom: NativeDate;
2786
+ baseAmount: number;
2787
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2788
+ allowances: Types.DocumentArray<{
2789
+ amount: number;
2790
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2791
+ isPercentage: boolean;
2792
+ taxable: boolean;
2793
+ recurring: boolean;
2794
+ effectiveFrom: NativeDate;
2795
+ name?: string | null | undefined;
2796
+ value?: number | null | undefined;
2797
+ effectiveTo?: NativeDate | null | undefined;
2798
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2799
+ amount: number;
2800
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2801
+ isPercentage: boolean;
2802
+ taxable: boolean;
2803
+ recurring: boolean;
2804
+ effectiveFrom: NativeDate;
2805
+ name?: string | null | undefined;
2806
+ value?: number | null | undefined;
2807
+ effectiveTo?: NativeDate | null | undefined;
2808
+ }> & {
2809
+ amount: number;
2810
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2811
+ isPercentage: boolean;
2812
+ taxable: boolean;
2813
+ recurring: boolean;
2814
+ effectiveFrom: NativeDate;
2815
+ name?: string | null | undefined;
2816
+ value?: number | null | undefined;
2817
+ effectiveTo?: NativeDate | null | undefined;
2818
+ }>;
2819
+ deductions: Types.DocumentArray<{
2820
+ amount: number;
2821
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2822
+ auto: boolean;
2823
+ isPercentage: boolean;
2824
+ recurring: boolean;
2825
+ effectiveFrom: NativeDate;
2826
+ name?: string | null | undefined;
2827
+ description?: string | null | undefined;
2828
+ value?: number | null | undefined;
2829
+ effectiveTo?: NativeDate | null | undefined;
2830
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2831
+ amount: number;
2832
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2833
+ auto: boolean;
2834
+ isPercentage: boolean;
2835
+ recurring: boolean;
2836
+ effectiveFrom: NativeDate;
2837
+ name?: string | null | undefined;
2838
+ description?: string | null | undefined;
2839
+ value?: number | null | undefined;
2840
+ effectiveTo?: NativeDate | null | undefined;
2841
+ }> & {
2842
+ amount: number;
2843
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2844
+ auto: boolean;
2845
+ isPercentage: boolean;
2846
+ recurring: boolean;
2847
+ effectiveFrom: NativeDate;
2848
+ name?: string | null | undefined;
2849
+ description?: string | null | undefined;
2850
+ value?: number | null | undefined;
2851
+ effectiveTo?: NativeDate | null | undefined;
2852
+ }>;
2853
+ grossSalary: number;
2854
+ netSalary: number;
2855
+ lastModified: NativeDate;
2856
+ currency?: string | null | undefined;
2857
+ }, {
2858
+ id: string;
2859
+ }, mongoose.ResolveSchemaOptions<{
2860
+ _id: false;
2861
+ }>> & Omit<{
2862
+ effectiveFrom: NativeDate;
2863
+ baseAmount: number;
2864
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2865
+ allowances: Types.DocumentArray<{
2866
+ amount: number;
2867
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2868
+ isPercentage: boolean;
2869
+ taxable: boolean;
2870
+ recurring: boolean;
2871
+ effectiveFrom: NativeDate;
2872
+ name?: string | null | undefined;
2873
+ value?: number | null | undefined;
2874
+ effectiveTo?: NativeDate | null | undefined;
2875
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2876
+ amount: number;
2877
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2878
+ isPercentage: boolean;
2879
+ taxable: boolean;
2880
+ recurring: boolean;
2881
+ effectiveFrom: NativeDate;
2882
+ name?: string | null | undefined;
2883
+ value?: number | null | undefined;
2884
+ effectiveTo?: NativeDate | null | undefined;
2885
+ }> & {
2886
+ amount: number;
2887
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2888
+ isPercentage: boolean;
2889
+ taxable: boolean;
2890
+ recurring: boolean;
2891
+ effectiveFrom: NativeDate;
2892
+ name?: string | null | undefined;
2893
+ value?: number | null | undefined;
2894
+ effectiveTo?: NativeDate | null | undefined;
2895
+ }>;
2896
+ deductions: Types.DocumentArray<{
2897
+ amount: number;
2898
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2899
+ auto: boolean;
2900
+ isPercentage: boolean;
2901
+ recurring: boolean;
2902
+ effectiveFrom: NativeDate;
2903
+ name?: string | null | undefined;
2904
+ description?: string | null | undefined;
2905
+ value?: number | null | undefined;
2906
+ effectiveTo?: NativeDate | null | undefined;
2907
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2908
+ amount: number;
2909
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2910
+ auto: boolean;
2911
+ isPercentage: boolean;
2912
+ recurring: boolean;
2913
+ effectiveFrom: NativeDate;
2914
+ name?: string | null | undefined;
2915
+ description?: string | null | undefined;
2916
+ value?: number | null | undefined;
2917
+ effectiveTo?: NativeDate | null | undefined;
2918
+ }> & {
2919
+ amount: number;
2920
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2921
+ auto: boolean;
2922
+ isPercentage: boolean;
2923
+ recurring: boolean;
2924
+ effectiveFrom: NativeDate;
2925
+ name?: string | null | undefined;
2926
+ description?: string | null | undefined;
2927
+ value?: number | null | undefined;
2928
+ effectiveTo?: NativeDate | null | undefined;
2929
+ }>;
2930
+ grossSalary: number;
2931
+ netSalary: number;
2932
+ lastModified: NativeDate;
2933
+ currency?: string | null | undefined;
2934
+ } & {
2935
+ _id: Types.ObjectId;
2936
+ } & {
2937
+ __v: number;
2938
+ }, "id"> & {
2939
+ id: string;
2940
+ }> | undefined;
2941
+ }, {
2942
+ effectiveFrom: NativeDate;
2943
+ baseAmount: number;
2944
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2945
+ allowances: Types.DocumentArray<{
2946
+ amount: number;
2947
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2948
+ isPercentage: boolean;
2949
+ taxable: boolean;
2950
+ recurring: boolean;
2951
+ effectiveFrom: NativeDate;
2952
+ name?: string | null | undefined;
2953
+ value?: number | null | undefined;
2954
+ effectiveTo?: NativeDate | null | undefined;
2955
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2956
+ amount: number;
2957
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2958
+ isPercentage: boolean;
2959
+ taxable: boolean;
2960
+ recurring: boolean;
2961
+ effectiveFrom: NativeDate;
2962
+ name?: string | null | undefined;
2963
+ value?: number | null | undefined;
2964
+ effectiveTo?: NativeDate | null | undefined;
2965
+ }> & {
2966
+ amount: number;
2967
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2968
+ isPercentage: boolean;
2969
+ taxable: boolean;
2970
+ recurring: boolean;
2971
+ effectiveFrom: NativeDate;
2972
+ name?: string | null | undefined;
2973
+ value?: number | null | undefined;
2974
+ effectiveTo?: NativeDate | null | undefined;
2975
+ }>;
2976
+ deductions: Types.DocumentArray<{
2977
+ amount: number;
2978
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2979
+ auto: boolean;
2980
+ isPercentage: boolean;
2981
+ recurring: boolean;
2982
+ effectiveFrom: NativeDate;
2983
+ name?: string | null | undefined;
2984
+ description?: string | null | undefined;
2985
+ value?: number | null | undefined;
2986
+ effectiveTo?: NativeDate | null | undefined;
2987
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2988
+ amount: number;
2989
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2990
+ auto: boolean;
2991
+ isPercentage: boolean;
2992
+ recurring: boolean;
2993
+ effectiveFrom: NativeDate;
2994
+ name?: string | null | undefined;
2995
+ description?: string | null | undefined;
2996
+ value?: number | null | undefined;
2997
+ effectiveTo?: NativeDate | null | undefined;
2998
+ }> & {
2999
+ amount: number;
3000
+ type: "other" | "tax" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
3001
+ auto: boolean;
3002
+ isPercentage: boolean;
3003
+ recurring: boolean;
3004
+ effectiveFrom: NativeDate;
3005
+ name?: string | null | undefined;
3006
+ description?: string | null | undefined;
3007
+ value?: number | null | undefined;
3008
+ effectiveTo?: NativeDate | null | undefined;
3009
+ }>;
3010
+ grossSalary: number;
3011
+ netSalary: number;
3012
+ lastModified: NativeDate;
3013
+ currency?: string | null | undefined;
3014
+ } & {
3015
+ _id: Types.ObjectId;
3016
+ } & {
3017
+ __v: number;
3018
+ }>;
3019
+ workScheduleSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3020
+ _id: false;
3021
+ }, {
3022
+ workingDays: number[];
3023
+ hoursPerWeek?: number | null | undefined;
3024
+ hoursPerDay?: number | null | undefined;
3025
+ shiftStart?: string | null | undefined;
3026
+ shiftEnd?: string | null | undefined;
3027
+ }, mongoose.Document<unknown, {}, {
3028
+ workingDays: number[];
3029
+ hoursPerWeek?: number | null | undefined;
3030
+ hoursPerDay?: number | null | undefined;
3031
+ shiftStart?: string | null | undefined;
3032
+ shiftEnd?: string | null | undefined;
3033
+ }, {
3034
+ id: string;
3035
+ }, mongoose.ResolveSchemaOptions<{
3036
+ _id: false;
3037
+ }>> & Omit<{
3038
+ workingDays: number[];
3039
+ hoursPerWeek?: number | null | undefined;
3040
+ hoursPerDay?: number | null | undefined;
3041
+ shiftStart?: string | null | undefined;
3042
+ shiftEnd?: string | null | undefined;
3043
+ } & {
3044
+ _id: Types.ObjectId;
3045
+ } & {
3046
+ __v: number;
3047
+ }, "id"> & {
3048
+ id: string;
3049
+ }, {
3050
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3051
+ } | {
3052
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3053
+ workingDays: number[];
3054
+ hoursPerWeek?: number | null | undefined;
3055
+ hoursPerDay?: number | null | undefined;
3056
+ shiftStart?: string | null | undefined;
3057
+ shiftEnd?: string | null | undefined;
3058
+ }, {
3059
+ id: string;
3060
+ }, mongoose.ResolveSchemaOptions<{
3061
+ _id: false;
3062
+ }>> & Omit<{
3063
+ workingDays: number[];
3064
+ hoursPerWeek?: number | null | undefined;
3065
+ hoursPerDay?: number | null | undefined;
3066
+ shiftStart?: string | null | undefined;
3067
+ shiftEnd?: string | null | undefined;
3068
+ } & {
3069
+ _id: Types.ObjectId;
3070
+ } & {
3071
+ __v: number;
3072
+ }, "id"> & {
3073
+ id: string;
3074
+ }> | undefined;
3075
+ }, {
3076
+ workingDays: number[];
3077
+ hoursPerWeek?: number | null | undefined;
3078
+ hoursPerDay?: number | null | undefined;
3079
+ shiftStart?: string | null | undefined;
3080
+ shiftEnd?: string | null | undefined;
3081
+ } & {
3082
+ _id: Types.ObjectId;
3083
+ } & {
3084
+ __v: number;
3085
+ }>;
3086
+ bankDetailsSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3087
+ _id: false;
3088
+ }, {
3089
+ accountName?: string | null | undefined;
3090
+ accountNumber?: string | null | undefined;
3091
+ bankName?: string | null | undefined;
3092
+ branchName?: string | null | undefined;
3093
+ routingNumber?: string | null | undefined;
3094
+ }, mongoose.Document<unknown, {}, {
3095
+ accountName?: string | null | undefined;
3096
+ accountNumber?: string | null | undefined;
3097
+ bankName?: string | null | undefined;
3098
+ branchName?: string | null | undefined;
3099
+ routingNumber?: string | null | undefined;
3100
+ }, {
3101
+ id: string;
3102
+ }, mongoose.ResolveSchemaOptions<{
3103
+ _id: false;
3104
+ }>> & Omit<{
3105
+ accountName?: string | null | undefined;
3106
+ accountNumber?: string | null | undefined;
3107
+ bankName?: string | null | undefined;
3108
+ branchName?: string | null | undefined;
3109
+ routingNumber?: string | null | undefined;
3110
+ } & {
3111
+ _id: Types.ObjectId;
3112
+ } & {
3113
+ __v: number;
3114
+ }, "id"> & {
3115
+ id: string;
3116
+ }, {
3117
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3118
+ } | {
3119
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3120
+ accountName?: string | null | undefined;
3121
+ accountNumber?: string | null | undefined;
3122
+ bankName?: string | null | undefined;
3123
+ branchName?: string | null | undefined;
3124
+ routingNumber?: string | null | undefined;
3125
+ }, {
3126
+ id: string;
3127
+ }, mongoose.ResolveSchemaOptions<{
3128
+ _id: false;
3129
+ }>> & Omit<{
3130
+ accountName?: string | null | undefined;
3131
+ accountNumber?: string | null | undefined;
3132
+ bankName?: string | null | undefined;
3133
+ branchName?: string | null | undefined;
3134
+ routingNumber?: string | null | undefined;
3135
+ } & {
3136
+ _id: Types.ObjectId;
3137
+ } & {
3138
+ __v: number;
3139
+ }, "id"> & {
3140
+ id: string;
3141
+ }> | undefined;
3142
+ }, {
3143
+ accountName?: string | null | undefined;
3144
+ accountNumber?: string | null | undefined;
3145
+ bankName?: string | null | undefined;
3146
+ branchName?: string | null | undefined;
3147
+ routingNumber?: string | null | undefined;
3148
+ } & {
3149
+ _id: Types.ObjectId;
3150
+ } & {
3151
+ __v: number;
3152
+ }>;
3153
+ employmentHistorySchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3154
+ timestamps: true;
3155
+ }, {
3156
+ hireDate: NativeDate;
3157
+ terminationDate: NativeDate;
3158
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3159
+ position?: string | null | undefined;
3160
+ notes?: string | null | undefined;
3161
+ department?: string | null | undefined;
3162
+ finalSalary?: number | null | undefined;
3163
+ } & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
3164
+ hireDate: NativeDate;
3165
+ terminationDate: NativeDate;
3166
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3167
+ position?: string | null | undefined;
3168
+ notes?: string | null | undefined;
3169
+ department?: string | null | undefined;
3170
+ finalSalary?: number | null | undefined;
3171
+ } & mongoose.DefaultTimestampProps, {
3172
+ id: string;
3173
+ }, mongoose.ResolveSchemaOptions<{
3174
+ timestamps: true;
3175
+ }>> & Omit<{
3176
+ hireDate: NativeDate;
3177
+ terminationDate: NativeDate;
3178
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3179
+ position?: string | null | undefined;
3180
+ notes?: string | null | undefined;
3181
+ department?: string | null | undefined;
3182
+ finalSalary?: number | null | undefined;
3183
+ } & mongoose.DefaultTimestampProps & {
3184
+ _id: Types.ObjectId;
3185
+ } & {
3186
+ __v: number;
3187
+ }, "id"> & {
3188
+ id: string;
3189
+ }, {
3190
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3191
+ } | {
3192
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3193
+ hireDate: NativeDate;
3194
+ terminationDate: NativeDate;
3195
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3196
+ position?: string | null | undefined;
3197
+ notes?: string | null | undefined;
3198
+ department?: string | null | undefined;
3199
+ finalSalary?: number | null | undefined;
3200
+ } & mongoose.DefaultTimestampProps, {
3201
+ id: string;
3202
+ }, mongoose.ResolveSchemaOptions<{
3203
+ timestamps: true;
3204
+ }>> & Omit<{
3205
+ hireDate: NativeDate;
3206
+ terminationDate: NativeDate;
3207
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3208
+ position?: string | null | undefined;
3209
+ notes?: string | null | undefined;
3210
+ department?: string | null | undefined;
3211
+ finalSalary?: number | null | undefined;
3212
+ } & mongoose.DefaultTimestampProps & {
3213
+ _id: Types.ObjectId;
3214
+ } & {
3215
+ __v: number;
3216
+ }, "id"> & {
3217
+ id: string;
3218
+ }> | undefined;
3219
+ }, {
3220
+ hireDate: NativeDate;
3221
+ terminationDate: NativeDate;
3222
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3223
+ position?: string | null | undefined;
3224
+ notes?: string | null | undefined;
3225
+ department?: string | null | undefined;
3226
+ finalSalary?: number | null | undefined;
3227
+ createdAt: NativeDate;
3228
+ updatedAt: NativeDate;
3229
+ } & {
3230
+ _id: Types.ObjectId;
3231
+ } & {
3232
+ __v: number;
3233
+ }>;
3234
+ payrollStatsSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3235
+ _id: false;
3236
+ }, {
3237
+ updatedAt: NativeDate;
3238
+ totalPaid: number;
3239
+ paymentsThisYear: number;
3240
+ averageMonthly: number;
3241
+ lastPaymentDate?: NativeDate | null | undefined;
3242
+ nextPaymentDate?: NativeDate | null | undefined;
3243
+ }, mongoose.Document<unknown, {}, {
3244
+ updatedAt: NativeDate;
3245
+ totalPaid: number;
3246
+ paymentsThisYear: number;
3247
+ averageMonthly: number;
3248
+ lastPaymentDate?: NativeDate | null | undefined;
3249
+ nextPaymentDate?: NativeDate | null | undefined;
3250
+ }, {
3251
+ id: string;
3252
+ }, mongoose.ResolveSchemaOptions<{
3253
+ _id: false;
3254
+ }>> & Omit<{
3255
+ updatedAt: NativeDate;
3256
+ totalPaid: number;
3257
+ paymentsThisYear: number;
3258
+ averageMonthly: number;
3259
+ lastPaymentDate?: NativeDate | null | undefined;
3260
+ nextPaymentDate?: NativeDate | null | undefined;
3261
+ } & {
3262
+ _id: Types.ObjectId;
3263
+ } & {
3264
+ __v: number;
3265
+ }, "id"> & {
3266
+ id: string;
3267
+ }, {
3268
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3269
+ } | {
3270
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3271
+ updatedAt: NativeDate;
3272
+ totalPaid: number;
3273
+ paymentsThisYear: number;
3274
+ averageMonthly: number;
3275
+ lastPaymentDate?: NativeDate | null | undefined;
3276
+ nextPaymentDate?: NativeDate | null | undefined;
3277
+ }, {
3278
+ id: string;
3279
+ }, mongoose.ResolveSchemaOptions<{
3280
+ _id: false;
3281
+ }>> & Omit<{
3282
+ updatedAt: NativeDate;
3283
+ totalPaid: number;
3284
+ paymentsThisYear: number;
3285
+ averageMonthly: number;
3286
+ lastPaymentDate?: NativeDate | null | undefined;
3287
+ nextPaymentDate?: NativeDate | null | undefined;
3288
+ } & {
3289
+ _id: Types.ObjectId;
3290
+ } & {
3291
+ __v: number;
3292
+ }, "id"> & {
3293
+ id: string;
3294
+ }> | undefined;
3295
+ }, {
3296
+ updatedAt: NativeDate;
3297
+ totalPaid: number;
3298
+ paymentsThisYear: number;
3299
+ averageMonthly: number;
3300
+ lastPaymentDate?: NativeDate | null | undefined;
3301
+ nextPaymentDate?: NativeDate | null | undefined;
3302
+ } & {
3303
+ _id: Types.ObjectId;
3304
+ } & {
3305
+ __v: number;
3306
+ }>;
3307
+ payrollBreakdownSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3308
+ _id: false;
3309
+ }, {
3310
+ taxableAmount: number;
3311
+ baseAmount: number;
3312
+ allowances: Types.DocumentArray<{
3313
+ amount: number;
3314
+ type: string;
3315
+ taxable: boolean;
3316
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3317
+ amount: number;
3318
+ type: string;
3319
+ taxable: boolean;
3320
+ }> & {
3321
+ amount: number;
3322
+ type: string;
3323
+ taxable: boolean;
3324
+ }>;
3325
+ deductions: Types.DocumentArray<{
3326
+ amount: number;
3327
+ type: string;
3328
+ description?: string | null | undefined;
3329
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3330
+ amount: number;
3331
+ type: string;
3332
+ description?: string | null | undefined;
3333
+ }> & {
3334
+ amount: number;
3335
+ type: string;
3336
+ description?: string | null | undefined;
3337
+ }>;
3338
+ grossSalary: number;
3339
+ netSalary: number;
3340
+ taxAmount: number;
3341
+ proRatedAmount: number;
3342
+ attendanceDeduction: number;
3343
+ overtimeAmount: number;
3344
+ bonusAmount: number;
3345
+ workingDays?: number | null | undefined;
3346
+ actualDays?: number | null | undefined;
3347
+ }, mongoose.Document<unknown, {}, {
3348
+ taxableAmount: number;
3349
+ baseAmount: number;
3350
+ allowances: Types.DocumentArray<{
3351
+ amount: number;
3352
+ type: string;
3353
+ taxable: boolean;
3354
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3355
+ amount: number;
3356
+ type: string;
3357
+ taxable: boolean;
3358
+ }> & {
3359
+ amount: number;
3360
+ type: string;
3361
+ taxable: boolean;
3362
+ }>;
3363
+ deductions: Types.DocumentArray<{
3364
+ amount: number;
3365
+ type: string;
3366
+ description?: string | null | undefined;
3367
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3368
+ amount: number;
3369
+ type: string;
3370
+ description?: string | null | undefined;
3371
+ }> & {
3372
+ amount: number;
3373
+ type: string;
3374
+ description?: string | null | undefined;
3375
+ }>;
3376
+ grossSalary: number;
3377
+ netSalary: number;
3378
+ taxAmount: number;
3379
+ proRatedAmount: number;
3380
+ attendanceDeduction: number;
3381
+ overtimeAmount: number;
3382
+ bonusAmount: number;
3383
+ workingDays?: number | null | undefined;
3384
+ actualDays?: number | null | undefined;
3385
+ }, {
3386
+ id: string;
3387
+ }, mongoose.ResolveSchemaOptions<{
3388
+ _id: false;
3389
+ }>> & Omit<{
3390
+ taxableAmount: number;
3391
+ baseAmount: number;
3392
+ allowances: Types.DocumentArray<{
3393
+ amount: number;
3394
+ type: string;
3395
+ taxable: boolean;
3396
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3397
+ amount: number;
3398
+ type: string;
3399
+ taxable: boolean;
3400
+ }> & {
3401
+ amount: number;
3402
+ type: string;
3403
+ taxable: boolean;
3404
+ }>;
3405
+ deductions: Types.DocumentArray<{
3406
+ amount: number;
3407
+ type: string;
3408
+ description?: string | null | undefined;
3409
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3410
+ amount: number;
3411
+ type: string;
3412
+ description?: string | null | undefined;
3413
+ }> & {
3414
+ amount: number;
3415
+ type: string;
3416
+ description?: string | null | undefined;
3417
+ }>;
3418
+ grossSalary: number;
3419
+ netSalary: number;
3420
+ taxAmount: number;
3421
+ proRatedAmount: number;
3422
+ attendanceDeduction: number;
3423
+ overtimeAmount: number;
3424
+ bonusAmount: number;
3425
+ workingDays?: number | null | undefined;
3426
+ actualDays?: number | null | undefined;
3427
+ } & {
3428
+ _id: Types.ObjectId;
3429
+ } & {
3430
+ __v: number;
3431
+ }, "id"> & {
3432
+ id: string;
3433
+ }, {
3434
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3435
+ } | {
3436
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3437
+ taxableAmount: number;
3438
+ baseAmount: number;
3439
+ allowances: Types.DocumentArray<{
3440
+ amount: number;
3441
+ type: string;
3442
+ taxable: boolean;
3443
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3444
+ amount: number;
3445
+ type: string;
3446
+ taxable: boolean;
3447
+ }> & {
3448
+ amount: number;
3449
+ type: string;
3450
+ taxable: boolean;
3451
+ }>;
3452
+ deductions: Types.DocumentArray<{
3453
+ amount: number;
3454
+ type: string;
3455
+ description?: string | null | undefined;
3456
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3457
+ amount: number;
3458
+ type: string;
3459
+ description?: string | null | undefined;
3460
+ }> & {
3461
+ amount: number;
3462
+ type: string;
3463
+ description?: string | null | undefined;
3464
+ }>;
3465
+ grossSalary: number;
3466
+ netSalary: number;
3467
+ taxAmount: number;
3468
+ proRatedAmount: number;
3469
+ attendanceDeduction: number;
3470
+ overtimeAmount: number;
3471
+ bonusAmount: number;
3472
+ workingDays?: number | null | undefined;
3473
+ actualDays?: number | null | undefined;
3474
+ }, {
3475
+ id: string;
3476
+ }, mongoose.ResolveSchemaOptions<{
3477
+ _id: false;
3478
+ }>> & Omit<{
3479
+ taxableAmount: number;
3480
+ baseAmount: number;
3481
+ allowances: Types.DocumentArray<{
3482
+ amount: number;
3483
+ type: string;
3484
+ taxable: boolean;
3485
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3486
+ amount: number;
3487
+ type: string;
3488
+ taxable: boolean;
3489
+ }> & {
3490
+ amount: number;
3491
+ type: string;
3492
+ taxable: boolean;
3493
+ }>;
3494
+ deductions: Types.DocumentArray<{
3495
+ amount: number;
3496
+ type: string;
3497
+ description?: string | null | undefined;
3498
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3499
+ amount: number;
3500
+ type: string;
3501
+ description?: string | null | undefined;
3502
+ }> & {
3503
+ amount: number;
3504
+ type: string;
3505
+ description?: string | null | undefined;
3506
+ }>;
3507
+ grossSalary: number;
3508
+ netSalary: number;
3509
+ taxAmount: number;
3510
+ proRatedAmount: number;
3511
+ attendanceDeduction: number;
3512
+ overtimeAmount: number;
3513
+ bonusAmount: number;
3514
+ workingDays?: number | null | undefined;
3515
+ actualDays?: number | null | undefined;
3516
+ } & {
3517
+ _id: Types.ObjectId;
3518
+ } & {
3519
+ __v: number;
3520
+ }, "id"> & {
3521
+ id: string;
3522
+ }> | undefined;
3523
+ }, {
3524
+ taxableAmount: number;
3525
+ baseAmount: number;
3526
+ allowances: Types.DocumentArray<{
3527
+ amount: number;
3528
+ type: string;
3529
+ taxable: boolean;
3530
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3531
+ amount: number;
3532
+ type: string;
3533
+ taxable: boolean;
3534
+ }> & {
3535
+ amount: number;
3536
+ type: string;
3537
+ taxable: boolean;
3538
+ }>;
3539
+ deductions: Types.DocumentArray<{
3540
+ amount: number;
3541
+ type: string;
3542
+ description?: string | null | undefined;
3543
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3544
+ amount: number;
3545
+ type: string;
3546
+ description?: string | null | undefined;
3547
+ }> & {
3548
+ amount: number;
3549
+ type: string;
3550
+ description?: string | null | undefined;
3551
+ }>;
3552
+ grossSalary: number;
3553
+ netSalary: number;
3554
+ taxAmount: number;
3555
+ proRatedAmount: number;
3556
+ attendanceDeduction: number;
3557
+ overtimeAmount: number;
3558
+ bonusAmount: number;
3559
+ workingDays?: number | null | undefined;
3560
+ actualDays?: number | null | undefined;
3561
+ } & {
3562
+ _id: Types.ObjectId;
3563
+ } & {
3564
+ __v: number;
3565
+ }>;
3566
+ periodSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3567
+ _id: false;
3568
+ }, {
3569
+ month: number;
3570
+ year: number;
3571
+ startDate: NativeDate;
3572
+ endDate: NativeDate;
3573
+ payDate: NativeDate;
3574
+ }, mongoose.Document<unknown, {}, {
3575
+ month: number;
3576
+ year: number;
3577
+ startDate: NativeDate;
3578
+ endDate: NativeDate;
3579
+ payDate: NativeDate;
3580
+ }, {
3581
+ id: string;
3582
+ }, mongoose.ResolveSchemaOptions<{
3583
+ _id: false;
3584
+ }>> & Omit<{
3585
+ month: number;
3586
+ year: number;
3587
+ startDate: NativeDate;
3588
+ endDate: NativeDate;
3589
+ payDate: NativeDate;
3590
+ } & {
3591
+ _id: Types.ObjectId;
3592
+ } & {
3593
+ __v: number;
3594
+ }, "id"> & {
3595
+ id: string;
3596
+ }, {
3597
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3598
+ } | {
3599
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3600
+ month: number;
3601
+ year: number;
3602
+ startDate: NativeDate;
3603
+ endDate: NativeDate;
3604
+ payDate: NativeDate;
3605
+ }, {
3606
+ id: string;
3607
+ }, mongoose.ResolveSchemaOptions<{
3608
+ _id: false;
3609
+ }>> & Omit<{
3610
+ month: number;
3611
+ year: number;
3612
+ startDate: NativeDate;
3613
+ endDate: NativeDate;
3614
+ payDate: NativeDate;
3615
+ } & {
3616
+ _id: Types.ObjectId;
3617
+ } & {
3618
+ __v: number;
3619
+ }, "id"> & {
3620
+ id: string;
3621
+ }> | undefined;
3622
+ }, {
3623
+ month: number;
3624
+ year: number;
3625
+ startDate: NativeDate;
3626
+ endDate: NativeDate;
3627
+ payDate: NativeDate;
3628
+ } & {
3629
+ _id: Types.ObjectId;
3630
+ } & {
3631
+ __v: number;
3632
+ }>;
3633
+ createEmploymentFields: typeof createEmploymentFields;
3634
+ createPayrollRecordFields: typeof createPayrollRecordFields;
3635
+ employeeIndexes: ({
3636
+ fields: {
3637
+ organizationId: number;
3638
+ employeeId: number;
3639
+ userId?: undefined;
3640
+ email?: undefined;
3641
+ status?: undefined;
3642
+ department?: undefined;
3643
+ 'compensation.netSalary'?: undefined;
3644
+ };
3645
+ options: {
3646
+ unique: boolean;
3647
+ partialFilterExpression?: undefined;
3648
+ };
3649
+ } | {
3650
+ fields: {
3651
+ userId: number;
3652
+ organizationId: number;
3653
+ employeeId?: undefined;
3654
+ email?: undefined;
3655
+ status?: undefined;
3656
+ department?: undefined;
3657
+ 'compensation.netSalary'?: undefined;
3658
+ };
3659
+ options: {
3660
+ unique: boolean;
3661
+ partialFilterExpression: {
3662
+ userId: {
3663
+ $exists: boolean;
3664
+ };
3665
+ email?: undefined;
3666
+ status?: undefined;
3667
+ };
3668
+ };
3669
+ } | {
3670
+ fields: {
3671
+ email: number;
3672
+ organizationId: number;
3673
+ employeeId?: undefined;
3674
+ userId?: undefined;
3675
+ status?: undefined;
3676
+ department?: undefined;
3677
+ 'compensation.netSalary'?: undefined;
3678
+ };
3679
+ options: {
3680
+ unique: boolean;
3681
+ partialFilterExpression: {
3682
+ email: {
3683
+ $exists: boolean;
3684
+ };
3685
+ status: {
3686
+ $in: string[];
3687
+ };
3688
+ userId?: undefined;
3689
+ };
3690
+ };
3691
+ } | {
3692
+ fields: {
3693
+ organizationId: number;
3694
+ status: number;
3695
+ employeeId?: undefined;
3696
+ userId?: undefined;
3697
+ email?: undefined;
3698
+ department?: undefined;
3699
+ 'compensation.netSalary'?: undefined;
3700
+ };
3701
+ options?: undefined;
3702
+ } | {
3703
+ fields: {
3704
+ organizationId: number;
3705
+ department: number;
3706
+ employeeId?: undefined;
3707
+ userId?: undefined;
3708
+ email?: undefined;
3709
+ status?: undefined;
3710
+ 'compensation.netSalary'?: undefined;
3711
+ };
3712
+ options?: undefined;
3713
+ } | {
3714
+ fields: {
3715
+ organizationId: number;
3716
+ 'compensation.netSalary': number;
3717
+ employeeId?: undefined;
3718
+ userId?: undefined;
3719
+ email?: undefined;
3720
+ status?: undefined;
3721
+ department?: undefined;
3722
+ };
3723
+ options?: undefined;
3724
+ })[];
3725
+ payrollRecordIndexes: ({
3726
+ fields: {
3727
+ organizationId: number;
3728
+ employeeId: number;
3729
+ 'period.month': number;
3730
+ 'period.year': number;
3731
+ 'period.startDate': number;
3732
+ payrollRunType: number;
3733
+ status?: undefined;
3734
+ createdAt?: undefined;
3735
+ 'period.payDate'?: undefined;
3736
+ expireAt?: undefined;
3737
+ };
3738
+ options: {
3739
+ unique: boolean;
3740
+ name: string;
3741
+ partialFilterExpression: {
3742
+ isVoided: {
3743
+ $eq: boolean;
3744
+ };
3745
+ };
3746
+ expireAfterSeconds?: undefined;
3747
+ };
3748
+ } | {
3749
+ fields: {
3750
+ organizationId: number;
3751
+ employeeId: number;
3752
+ 'period.month': number;
3753
+ 'period.year': number;
3754
+ 'period.startDate'?: undefined;
3755
+ payrollRunType?: undefined;
3756
+ status?: undefined;
3757
+ createdAt?: undefined;
3758
+ 'period.payDate'?: undefined;
3759
+ expireAt?: undefined;
3760
+ };
3761
+ options?: undefined;
3762
+ } | {
3763
+ fields: {
3764
+ organizationId: number;
3765
+ 'period.year': number;
3766
+ 'period.month': number;
3767
+ employeeId?: undefined;
3768
+ 'period.startDate'?: undefined;
3769
+ payrollRunType?: undefined;
3770
+ status?: undefined;
3771
+ createdAt?: undefined;
3772
+ 'period.payDate'?: undefined;
3773
+ expireAt?: undefined;
3774
+ };
3775
+ options?: undefined;
3776
+ } | {
3777
+ fields: {
3778
+ employeeId: number;
3779
+ 'period.year': number;
3780
+ 'period.month': number;
3781
+ organizationId?: undefined;
3782
+ 'period.startDate'?: undefined;
3783
+ payrollRunType?: undefined;
3784
+ status?: undefined;
3785
+ createdAt?: undefined;
3786
+ 'period.payDate'?: undefined;
3787
+ expireAt?: undefined;
3788
+ };
3789
+ options?: undefined;
3790
+ } | {
3791
+ fields: {
3792
+ status: number;
3793
+ createdAt: number;
3794
+ organizationId?: undefined;
3795
+ employeeId?: undefined;
3796
+ 'period.month'?: undefined;
3797
+ 'period.year'?: undefined;
3798
+ 'period.startDate'?: undefined;
3799
+ payrollRunType?: undefined;
3800
+ 'period.payDate'?: undefined;
3801
+ expireAt?: undefined;
3802
+ };
3803
+ options?: undefined;
3804
+ } | {
3805
+ fields: {
3806
+ organizationId: number;
3807
+ status: number;
3808
+ 'period.payDate': number;
3809
+ employeeId?: undefined;
3810
+ 'period.month'?: undefined;
3811
+ 'period.year'?: undefined;
3812
+ 'period.startDate'?: undefined;
3813
+ payrollRunType?: undefined;
3814
+ createdAt?: undefined;
3815
+ expireAt?: undefined;
3816
+ };
3817
+ options?: undefined;
3818
+ } | {
3819
+ fields: {
3820
+ organizationId: number;
3821
+ payrollRunType: number;
3822
+ 'period.year': number;
3823
+ 'period.month': number;
3824
+ employeeId?: undefined;
3825
+ 'period.startDate'?: undefined;
3826
+ status?: undefined;
3827
+ createdAt?: undefined;
3828
+ 'period.payDate'?: undefined;
3829
+ expireAt?: undefined;
3830
+ };
3831
+ options?: undefined;
3832
+ } | {
3833
+ fields: {
3834
+ expireAt: number;
3835
+ organizationId?: undefined;
3836
+ employeeId?: undefined;
3837
+ 'period.month'?: undefined;
3838
+ 'period.year'?: undefined;
3839
+ 'period.startDate'?: undefined;
3840
+ payrollRunType?: undefined;
3841
+ status?: undefined;
3842
+ createdAt?: undefined;
3843
+ 'period.payDate'?: undefined;
3844
+ };
3845
+ options: {
3846
+ expireAfterSeconds: number;
3847
+ unique?: undefined;
3848
+ name?: undefined;
3849
+ partialFilterExpression?: undefined;
3850
+ };
3851
+ })[];
3852
+ applyEmployeeIndexes: typeof applyEmployeeIndexes;
3853
+ applyPayrollRecordIndexes: typeof applyPayrollRecordIndexes;
3854
+ createEmployeeSchema: typeof createEmployeeSchema;
3855
+ createPayrollRecordSchema: typeof createPayrollRecordSchema;
3856
+ };
3857
+
3858
+ export { workScheduleSchema as A, leaveRequestTTLIndex as B, payrollBreakdownSchema as C, periodSchema as D, type LeaveRequestModel as L, type PayrollSchemaOptions as P, type TaxWithholdingModel as T, _default as _, allowanceSchema as a, applyEmployeeIndexes as b, applyLeaveRequestIndexes as c, applyPayrollRecordIndexes as d, applyTaxWithholdingIndexes as e, bankDetailsSchema as f, compensationSchema as g, createEmployeeSchema as h, createEmploymentFields as i, createPayrollRecordFields as j, createPayrollRecordSchema as k, deductionSchema as l, employeeIndexes as m, employmentHistorySchema as n, getLeaveRequestFields as o, getLeaveRequestModel as p, getTaxWithholdingFields as q, getTaxWithholdingModel as r, leaveBalanceFields as s, leaveBalanceSchema as t, leaveRequestIndexes as u, leaveRequestSchema as v, payrollRecordIndexes as w, payrollStatsSchema as x, taxWithholdingIndexes as y, taxWithholdingSchema as z };