@classytic/payroll 1.0.0 → 2.7.5

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 (40) hide show
  1. package/README.md +525 -574
  2. package/dist/calculators/index.d.ts +300 -0
  3. package/dist/calculators/index.js +304 -0
  4. package/dist/calculators/index.js.map +1 -0
  5. package/dist/employee-identity-Cq2wo9-2.d.ts +490 -0
  6. package/dist/index-DjB72l6e.d.ts +3742 -0
  7. package/dist/index.d.ts +2924 -0
  8. package/dist/index.js +10648 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/prorating.calculator-C7sdFiG2.d.ts +135 -0
  11. package/dist/schemas/index.d.ts +4 -0
  12. package/dist/schemas/index.js +1452 -0
  13. package/dist/schemas/index.js.map +1 -0
  14. package/dist/types-BVDjiVGS.d.ts +1856 -0
  15. package/dist/utils/index.d.ts +995 -0
  16. package/dist/utils/index.js +1629 -0
  17. package/dist/utils/index.js.map +1 -0
  18. package/package.json +77 -24
  19. package/src/config.js +0 -177
  20. package/src/core/compensation.manager.js +0 -242
  21. package/src/core/employment.manager.js +0 -224
  22. package/src/core/payroll.manager.js +0 -499
  23. package/src/enums.js +0 -141
  24. package/src/factories/compensation.factory.js +0 -198
  25. package/src/factories/employee.factory.js +0 -173
  26. package/src/factories/payroll.factory.js +0 -247
  27. package/src/hrm.orchestrator.js +0 -139
  28. package/src/index.js +0 -172
  29. package/src/init.js +0 -41
  30. package/src/models/payroll-record.model.js +0 -126
  31. package/src/plugins/employee.plugin.js +0 -157
  32. package/src/schemas/employment.schema.js +0 -126
  33. package/src/services/compensation.service.js +0 -231
  34. package/src/services/employee.service.js +0 -162
  35. package/src/services/payroll.service.js +0 -213
  36. package/src/utils/calculation.utils.js +0 -91
  37. package/src/utils/date.utils.js +0 -120
  38. package/src/utils/logger.js +0 -36
  39. package/src/utils/query-builders.js +0 -185
  40. package/src/utils/validation.utils.js +0 -122
@@ -0,0 +1,3742 @@
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, e as TaxType, f as TaxStatus, g as LeaveRequestDocument, h as LeaveRequestStatus, L as LeaveType } from './types-BVDjiVGS.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
+ pending: number;
523
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
524
+ year: number;
525
+ allocated: number;
526
+ used: number;
527
+ carriedOver: number;
528
+ expiresAt?: NativeDate | null | undefined;
529
+ }, mongoose.Document<unknown, {}, {
530
+ pending: number;
531
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
532
+ year: number;
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
+ pending: number;
543
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
544
+ year: number;
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
+ pending: number;
560
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
561
+ year: number;
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
+ pending: number;
572
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
573
+ year: number;
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
+ pending: number;
587
+ type: "other" | "annual" | "sick" | "unpaid" | "maternity" | "paternity" | "bereavement" | "compensatory";
588
+ year: number;
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: "tax" | "other" | "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: "tax" | "other" | "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: "tax" | "other" | "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: "tax" | "other" | "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: "tax" | "other" | "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: "tax" | "other" | "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
+ allowances: Types.DocumentArray<{
1038
+ amount: number;
1039
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1040
+ isPercentage: boolean;
1041
+ taxable: boolean;
1042
+ recurring: boolean;
1043
+ effectiveFrom: NativeDate;
1044
+ name?: string | null | undefined;
1045
+ value?: number | null | undefined;
1046
+ effectiveTo?: NativeDate | null | undefined;
1047
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1048
+ amount: number;
1049
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1050
+ isPercentage: boolean;
1051
+ taxable: boolean;
1052
+ recurring: boolean;
1053
+ effectiveFrom: NativeDate;
1054
+ name?: string | null | undefined;
1055
+ value?: number | null | undefined;
1056
+ effectiveTo?: NativeDate | null | undefined;
1057
+ }> & {
1058
+ amount: number;
1059
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1060
+ isPercentage: boolean;
1061
+ taxable: boolean;
1062
+ recurring: boolean;
1063
+ effectiveFrom: NativeDate;
1064
+ name?: string | null | undefined;
1065
+ value?: number | null | undefined;
1066
+ effectiveTo?: NativeDate | null | undefined;
1067
+ }>;
1068
+ deductions: Types.DocumentArray<{
1069
+ amount: number;
1070
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1071
+ auto: boolean;
1072
+ isPercentage: boolean;
1073
+ recurring: boolean;
1074
+ effectiveFrom: NativeDate;
1075
+ name?: string | null | undefined;
1076
+ description?: string | null | undefined;
1077
+ value?: number | null | undefined;
1078
+ effectiveTo?: NativeDate | null | undefined;
1079
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1080
+ amount: number;
1081
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1082
+ auto: boolean;
1083
+ isPercentage: boolean;
1084
+ recurring: boolean;
1085
+ effectiveFrom: NativeDate;
1086
+ name?: string | null | undefined;
1087
+ description?: string | null | undefined;
1088
+ value?: number | null | undefined;
1089
+ effectiveTo?: NativeDate | null | undefined;
1090
+ }> & {
1091
+ amount: number;
1092
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1093
+ auto: boolean;
1094
+ isPercentage: boolean;
1095
+ recurring: boolean;
1096
+ effectiveFrom: NativeDate;
1097
+ name?: string | null | undefined;
1098
+ description?: string | null | undefined;
1099
+ value?: number | null | undefined;
1100
+ effectiveTo?: NativeDate | null | undefined;
1101
+ }>;
1102
+ effectiveFrom: NativeDate;
1103
+ baseAmount: number;
1104
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
1105
+ grossSalary: number;
1106
+ netSalary: number;
1107
+ lastModified: NativeDate;
1108
+ currency?: string | null | undefined;
1109
+ }, mongoose.Document<unknown, {}, {
1110
+ allowances: Types.DocumentArray<{
1111
+ amount: number;
1112
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1113
+ isPercentage: boolean;
1114
+ taxable: boolean;
1115
+ recurring: boolean;
1116
+ effectiveFrom: NativeDate;
1117
+ name?: string | null | undefined;
1118
+ value?: number | null | undefined;
1119
+ effectiveTo?: NativeDate | null | undefined;
1120
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1121
+ amount: number;
1122
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1123
+ isPercentage: boolean;
1124
+ taxable: boolean;
1125
+ recurring: boolean;
1126
+ effectiveFrom: NativeDate;
1127
+ name?: string | null | undefined;
1128
+ value?: number | null | undefined;
1129
+ effectiveTo?: NativeDate | null | undefined;
1130
+ }> & {
1131
+ amount: number;
1132
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1133
+ isPercentage: boolean;
1134
+ taxable: boolean;
1135
+ recurring: boolean;
1136
+ effectiveFrom: NativeDate;
1137
+ name?: string | null | undefined;
1138
+ value?: number | null | undefined;
1139
+ effectiveTo?: NativeDate | null | undefined;
1140
+ }>;
1141
+ deductions: Types.DocumentArray<{
1142
+ amount: number;
1143
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1144
+ auto: boolean;
1145
+ isPercentage: boolean;
1146
+ recurring: boolean;
1147
+ effectiveFrom: NativeDate;
1148
+ name?: string | null | undefined;
1149
+ description?: string | null | undefined;
1150
+ value?: number | null | undefined;
1151
+ effectiveTo?: NativeDate | null | undefined;
1152
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1153
+ amount: number;
1154
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1155
+ auto: boolean;
1156
+ isPercentage: boolean;
1157
+ recurring: boolean;
1158
+ effectiveFrom: NativeDate;
1159
+ name?: string | null | undefined;
1160
+ description?: string | null | undefined;
1161
+ value?: number | null | undefined;
1162
+ effectiveTo?: NativeDate | null | undefined;
1163
+ }> & {
1164
+ amount: number;
1165
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1166
+ auto: boolean;
1167
+ isPercentage: boolean;
1168
+ recurring: boolean;
1169
+ effectiveFrom: NativeDate;
1170
+ name?: string | null | undefined;
1171
+ description?: string | null | undefined;
1172
+ value?: number | null | undefined;
1173
+ effectiveTo?: NativeDate | null | undefined;
1174
+ }>;
1175
+ effectiveFrom: NativeDate;
1176
+ baseAmount: number;
1177
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
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
+ allowances: Types.DocumentArray<{
1188
+ amount: number;
1189
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1190
+ isPercentage: boolean;
1191
+ taxable: boolean;
1192
+ recurring: boolean;
1193
+ effectiveFrom: NativeDate;
1194
+ name?: string | null | undefined;
1195
+ value?: number | null | undefined;
1196
+ effectiveTo?: NativeDate | null | undefined;
1197
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1198
+ amount: number;
1199
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1200
+ isPercentage: boolean;
1201
+ taxable: boolean;
1202
+ recurring: boolean;
1203
+ effectiveFrom: NativeDate;
1204
+ name?: string | null | undefined;
1205
+ value?: number | null | undefined;
1206
+ effectiveTo?: NativeDate | null | undefined;
1207
+ }> & {
1208
+ amount: number;
1209
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1210
+ isPercentage: boolean;
1211
+ taxable: boolean;
1212
+ recurring: boolean;
1213
+ effectiveFrom: NativeDate;
1214
+ name?: string | null | undefined;
1215
+ value?: number | null | undefined;
1216
+ effectiveTo?: NativeDate | null | undefined;
1217
+ }>;
1218
+ deductions: Types.DocumentArray<{
1219
+ amount: number;
1220
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1221
+ auto: boolean;
1222
+ isPercentage: boolean;
1223
+ recurring: boolean;
1224
+ effectiveFrom: NativeDate;
1225
+ name?: string | null | undefined;
1226
+ description?: string | null | undefined;
1227
+ value?: number | null | undefined;
1228
+ effectiveTo?: NativeDate | null | undefined;
1229
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1230
+ amount: number;
1231
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1232
+ auto: boolean;
1233
+ isPercentage: boolean;
1234
+ recurring: boolean;
1235
+ effectiveFrom: NativeDate;
1236
+ name?: string | null | undefined;
1237
+ description?: string | null | undefined;
1238
+ value?: number | null | undefined;
1239
+ effectiveTo?: NativeDate | null | undefined;
1240
+ }> & {
1241
+ amount: number;
1242
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1243
+ auto: boolean;
1244
+ isPercentage: boolean;
1245
+ recurring: boolean;
1246
+ effectiveFrom: NativeDate;
1247
+ name?: string | null | undefined;
1248
+ description?: string | null | undefined;
1249
+ value?: number | null | undefined;
1250
+ effectiveTo?: NativeDate | null | undefined;
1251
+ }>;
1252
+ effectiveFrom: NativeDate;
1253
+ baseAmount: number;
1254
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
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
+ allowances: Types.DocumentArray<{
1270
+ amount: number;
1271
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1272
+ isPercentage: boolean;
1273
+ taxable: boolean;
1274
+ recurring: boolean;
1275
+ effectiveFrom: NativeDate;
1276
+ name?: string | null | undefined;
1277
+ value?: number | null | undefined;
1278
+ effectiveTo?: NativeDate | null | undefined;
1279
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1280
+ amount: number;
1281
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1282
+ isPercentage: boolean;
1283
+ taxable: boolean;
1284
+ recurring: boolean;
1285
+ effectiveFrom: NativeDate;
1286
+ name?: string | null | undefined;
1287
+ value?: number | null | undefined;
1288
+ effectiveTo?: NativeDate | null | undefined;
1289
+ }> & {
1290
+ amount: number;
1291
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1292
+ isPercentage: boolean;
1293
+ taxable: boolean;
1294
+ recurring: boolean;
1295
+ effectiveFrom: NativeDate;
1296
+ name?: string | null | undefined;
1297
+ value?: number | null | undefined;
1298
+ effectiveTo?: NativeDate | null | undefined;
1299
+ }>;
1300
+ deductions: Types.DocumentArray<{
1301
+ amount: number;
1302
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1303
+ auto: boolean;
1304
+ isPercentage: boolean;
1305
+ recurring: boolean;
1306
+ effectiveFrom: NativeDate;
1307
+ name?: string | null | undefined;
1308
+ description?: string | null | undefined;
1309
+ value?: number | null | undefined;
1310
+ effectiveTo?: NativeDate | null | undefined;
1311
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1312
+ amount: number;
1313
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1314
+ auto: boolean;
1315
+ isPercentage: boolean;
1316
+ recurring: boolean;
1317
+ effectiveFrom: NativeDate;
1318
+ name?: string | null | undefined;
1319
+ description?: string | null | undefined;
1320
+ value?: number | null | undefined;
1321
+ effectiveTo?: NativeDate | null | undefined;
1322
+ }> & {
1323
+ amount: number;
1324
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1325
+ auto: boolean;
1326
+ isPercentage: boolean;
1327
+ recurring: boolean;
1328
+ effectiveFrom: NativeDate;
1329
+ name?: string | null | undefined;
1330
+ description?: string | null | undefined;
1331
+ value?: number | null | undefined;
1332
+ effectiveTo?: NativeDate | null | undefined;
1333
+ }>;
1334
+ effectiveFrom: NativeDate;
1335
+ baseAmount: number;
1336
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
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
+ allowances: Types.DocumentArray<{
1347
+ amount: number;
1348
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1349
+ isPercentage: boolean;
1350
+ taxable: boolean;
1351
+ recurring: boolean;
1352
+ effectiveFrom: NativeDate;
1353
+ name?: string | null | undefined;
1354
+ value?: number | null | undefined;
1355
+ effectiveTo?: NativeDate | null | undefined;
1356
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1357
+ amount: number;
1358
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1359
+ isPercentage: boolean;
1360
+ taxable: boolean;
1361
+ recurring: boolean;
1362
+ effectiveFrom: NativeDate;
1363
+ name?: string | null | undefined;
1364
+ value?: number | null | undefined;
1365
+ effectiveTo?: NativeDate | null | undefined;
1366
+ }> & {
1367
+ amount: number;
1368
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1369
+ isPercentage: boolean;
1370
+ taxable: boolean;
1371
+ recurring: boolean;
1372
+ effectiveFrom: NativeDate;
1373
+ name?: string | null | undefined;
1374
+ value?: number | null | undefined;
1375
+ effectiveTo?: NativeDate | null | undefined;
1376
+ }>;
1377
+ deductions: Types.DocumentArray<{
1378
+ amount: number;
1379
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1380
+ auto: boolean;
1381
+ isPercentage: boolean;
1382
+ recurring: boolean;
1383
+ effectiveFrom: NativeDate;
1384
+ name?: string | null | undefined;
1385
+ description?: string | null | undefined;
1386
+ value?: number | null | undefined;
1387
+ effectiveTo?: NativeDate | null | undefined;
1388
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1389
+ amount: number;
1390
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1391
+ auto: boolean;
1392
+ isPercentage: boolean;
1393
+ recurring: boolean;
1394
+ effectiveFrom: NativeDate;
1395
+ name?: string | null | undefined;
1396
+ description?: string | null | undefined;
1397
+ value?: number | null | undefined;
1398
+ effectiveTo?: NativeDate | null | undefined;
1399
+ }> & {
1400
+ amount: number;
1401
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1402
+ auto: boolean;
1403
+ isPercentage: boolean;
1404
+ recurring: boolean;
1405
+ effectiveFrom: NativeDate;
1406
+ name?: string | null | undefined;
1407
+ description?: string | null | undefined;
1408
+ value?: number | null | undefined;
1409
+ effectiveTo?: NativeDate | null | undefined;
1410
+ }>;
1411
+ effectiveFrom: NativeDate;
1412
+ baseAmount: number;
1413
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
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
+ allowances: Types.DocumentArray<{
1427
+ amount: number;
1428
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1429
+ isPercentage: boolean;
1430
+ taxable: boolean;
1431
+ recurring: boolean;
1432
+ effectiveFrom: NativeDate;
1433
+ name?: string | null | undefined;
1434
+ value?: number | null | undefined;
1435
+ effectiveTo?: NativeDate | null | undefined;
1436
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1437
+ amount: number;
1438
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1439
+ isPercentage: boolean;
1440
+ taxable: boolean;
1441
+ recurring: boolean;
1442
+ effectiveFrom: NativeDate;
1443
+ name?: string | null | undefined;
1444
+ value?: number | null | undefined;
1445
+ effectiveTo?: NativeDate | null | undefined;
1446
+ }> & {
1447
+ amount: number;
1448
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
1449
+ isPercentage: boolean;
1450
+ taxable: boolean;
1451
+ recurring: boolean;
1452
+ effectiveFrom: NativeDate;
1453
+ name?: string | null | undefined;
1454
+ value?: number | null | undefined;
1455
+ effectiveTo?: NativeDate | null | undefined;
1456
+ }>;
1457
+ deductions: Types.DocumentArray<{
1458
+ amount: number;
1459
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1460
+ auto: boolean;
1461
+ isPercentage: boolean;
1462
+ recurring: boolean;
1463
+ effectiveFrom: NativeDate;
1464
+ name?: string | null | undefined;
1465
+ description?: string | null | undefined;
1466
+ value?: number | null | undefined;
1467
+ effectiveTo?: NativeDate | null | undefined;
1468
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1469
+ amount: number;
1470
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1471
+ auto: boolean;
1472
+ isPercentage: boolean;
1473
+ recurring: boolean;
1474
+ effectiveFrom: NativeDate;
1475
+ name?: string | null | undefined;
1476
+ description?: string | null | undefined;
1477
+ value?: number | null | undefined;
1478
+ effectiveTo?: NativeDate | null | undefined;
1479
+ }> & {
1480
+ amount: number;
1481
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
1482
+ auto: boolean;
1483
+ isPercentage: boolean;
1484
+ recurring: boolean;
1485
+ effectiveFrom: NativeDate;
1486
+ name?: string | null | undefined;
1487
+ description?: string | null | undefined;
1488
+ value?: number | null | undefined;
1489
+ effectiveTo?: NativeDate | null | undefined;
1490
+ }>;
1491
+ effectiveFrom: NativeDate;
1492
+ baseAmount: number;
1493
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
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
+ hoursPerDay?: number | null | undefined;
1511
+ hoursPerWeek?: number | null | undefined;
1512
+ shiftStart?: string | null | undefined;
1513
+ shiftEnd?: string | null | undefined;
1514
+ }, mongoose.Document<unknown, {}, {
1515
+ workingDays: number[];
1516
+ hoursPerDay?: number | null | undefined;
1517
+ hoursPerWeek?: 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
+ hoursPerDay?: number | null | undefined;
1527
+ hoursPerWeek?: 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
+ hoursPerDay?: number | null | undefined;
1542
+ hoursPerWeek?: 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
+ hoursPerDay?: number | null | undefined;
1552
+ hoursPerWeek?: 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
+ hoursPerDay?: number | null | undefined;
1565
+ hoursPerWeek?: 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
+ allowances: Types.DocumentArray<{
1821
+ amount: number;
1822
+ type: string;
1823
+ taxable: boolean;
1824
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1825
+ amount: number;
1826
+ type: string;
1827
+ taxable: boolean;
1828
+ }> & {
1829
+ amount: number;
1830
+ type: string;
1831
+ taxable: boolean;
1832
+ }>;
1833
+ deductions: Types.DocumentArray<{
1834
+ amount: number;
1835
+ type: string;
1836
+ description?: string | null | undefined;
1837
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1838
+ amount: number;
1839
+ type: string;
1840
+ description?: string | null | undefined;
1841
+ }> & {
1842
+ amount: number;
1843
+ type: string;
1844
+ description?: string | null | undefined;
1845
+ }>;
1846
+ taxableAmount: number;
1847
+ baseAmount: number;
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
+ allowances: Types.DocumentArray<{
1859
+ amount: number;
1860
+ type: string;
1861
+ taxable: boolean;
1862
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1863
+ amount: number;
1864
+ type: string;
1865
+ taxable: boolean;
1866
+ }> & {
1867
+ amount: number;
1868
+ type: string;
1869
+ taxable: boolean;
1870
+ }>;
1871
+ deductions: Types.DocumentArray<{
1872
+ amount: number;
1873
+ type: string;
1874
+ description?: string | null | undefined;
1875
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1876
+ amount: number;
1877
+ type: string;
1878
+ description?: string | null | undefined;
1879
+ }> & {
1880
+ amount: number;
1881
+ type: string;
1882
+ description?: string | null | undefined;
1883
+ }>;
1884
+ taxableAmount: number;
1885
+ baseAmount: number;
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
+ allowances: Types.DocumentArray<{
1901
+ amount: number;
1902
+ type: string;
1903
+ taxable: boolean;
1904
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1905
+ amount: number;
1906
+ type: string;
1907
+ taxable: boolean;
1908
+ }> & {
1909
+ amount: number;
1910
+ type: string;
1911
+ taxable: boolean;
1912
+ }>;
1913
+ deductions: Types.DocumentArray<{
1914
+ amount: number;
1915
+ type: string;
1916
+ description?: string | null | undefined;
1917
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1918
+ amount: number;
1919
+ type: string;
1920
+ description?: string | null | undefined;
1921
+ }> & {
1922
+ amount: number;
1923
+ type: string;
1924
+ description?: string | null | undefined;
1925
+ }>;
1926
+ taxableAmount: number;
1927
+ baseAmount: number;
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
+ allowances: Types.DocumentArray<{
1948
+ amount: number;
1949
+ type: string;
1950
+ taxable: boolean;
1951
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1952
+ amount: number;
1953
+ type: string;
1954
+ taxable: boolean;
1955
+ }> & {
1956
+ amount: number;
1957
+ type: string;
1958
+ taxable: boolean;
1959
+ }>;
1960
+ deductions: Types.DocumentArray<{
1961
+ amount: number;
1962
+ type: string;
1963
+ description?: string | null | undefined;
1964
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1965
+ amount: number;
1966
+ type: string;
1967
+ description?: string | null | undefined;
1968
+ }> & {
1969
+ amount: number;
1970
+ type: string;
1971
+ description?: string | null | undefined;
1972
+ }>;
1973
+ taxableAmount: number;
1974
+ baseAmount: number;
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
+ allowances: Types.DocumentArray<{
1990
+ amount: number;
1991
+ type: string;
1992
+ taxable: boolean;
1993
+ }, Types.Subdocument<bson.ObjectId, unknown, {
1994
+ amount: number;
1995
+ type: string;
1996
+ taxable: boolean;
1997
+ }> & {
1998
+ amount: number;
1999
+ type: string;
2000
+ taxable: boolean;
2001
+ }>;
2002
+ deductions: Types.DocumentArray<{
2003
+ amount: number;
2004
+ type: string;
2005
+ description?: string | null | undefined;
2006
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2007
+ amount: number;
2008
+ type: string;
2009
+ description?: string | null | undefined;
2010
+ }> & {
2011
+ amount: number;
2012
+ type: string;
2013
+ description?: string | null | undefined;
2014
+ }>;
2015
+ taxableAmount: number;
2016
+ baseAmount: number;
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
+ allowances: Types.DocumentArray<{
2035
+ amount: number;
2036
+ type: string;
2037
+ taxable: boolean;
2038
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2039
+ amount: number;
2040
+ type: string;
2041
+ taxable: boolean;
2042
+ }> & {
2043
+ amount: number;
2044
+ type: string;
2045
+ taxable: boolean;
2046
+ }>;
2047
+ deductions: Types.DocumentArray<{
2048
+ amount: number;
2049
+ type: string;
2050
+ description?: string | null | undefined;
2051
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2052
+ amount: number;
2053
+ type: string;
2054
+ description?: string | null | undefined;
2055
+ }> & {
2056
+ amount: number;
2057
+ type: string;
2058
+ description?: string | null | undefined;
2059
+ }>;
2060
+ taxableAmount: number;
2061
+ baseAmount: number;
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
+ * Note: No unique constraint on employee+period - handled at application level
2181
+ * to support re-processing after reversal. Add your own unique index if needed.
2182
+ */
2183
+ declare const payrollRecordIndexes: ({
2184
+ fields: {
2185
+ organizationId: number;
2186
+ employeeId: number;
2187
+ 'period.month': number;
2188
+ 'period.year': number;
2189
+ status?: undefined;
2190
+ createdAt?: undefined;
2191
+ 'period.payDate'?: undefined;
2192
+ };
2193
+ options?: undefined;
2194
+ } | {
2195
+ fields: {
2196
+ organizationId: number;
2197
+ 'period.year': number;
2198
+ 'period.month': number;
2199
+ employeeId?: undefined;
2200
+ status?: undefined;
2201
+ createdAt?: undefined;
2202
+ 'period.payDate'?: undefined;
2203
+ };
2204
+ options?: undefined;
2205
+ } | {
2206
+ fields: {
2207
+ employeeId: number;
2208
+ 'period.year': number;
2209
+ 'period.month': number;
2210
+ organizationId?: undefined;
2211
+ status?: undefined;
2212
+ createdAt?: undefined;
2213
+ 'period.payDate'?: undefined;
2214
+ };
2215
+ options?: undefined;
2216
+ } | {
2217
+ fields: {
2218
+ status: number;
2219
+ createdAt: number;
2220
+ organizationId?: undefined;
2221
+ employeeId?: undefined;
2222
+ 'period.month'?: undefined;
2223
+ 'period.year'?: undefined;
2224
+ 'period.payDate'?: undefined;
2225
+ };
2226
+ options?: undefined;
2227
+ } | {
2228
+ fields: {
2229
+ organizationId: number;
2230
+ status: number;
2231
+ 'period.payDate': number;
2232
+ employeeId?: undefined;
2233
+ 'period.month'?: undefined;
2234
+ 'period.year'?: undefined;
2235
+ createdAt?: undefined;
2236
+ };
2237
+ options?: undefined;
2238
+ } | {
2239
+ fields: {
2240
+ createdAt: number;
2241
+ organizationId?: undefined;
2242
+ employeeId?: undefined;
2243
+ 'period.month'?: undefined;
2244
+ 'period.year'?: undefined;
2245
+ status?: undefined;
2246
+ 'period.payDate'?: undefined;
2247
+ };
2248
+ options: {
2249
+ expireAfterSeconds: number;
2250
+ };
2251
+ })[];
2252
+ /**
2253
+ * Apply indexes to schema
2254
+ */
2255
+ declare function applyEmployeeIndexes(schema: Schema): void;
2256
+ /**
2257
+ * Apply payroll record indexes to schema
2258
+ */
2259
+ declare function applyPayrollRecordIndexes(schema: Schema): void;
2260
+ /**
2261
+ * Create a complete Employee schema with all HRM fields.
2262
+ *
2263
+ * @param additionalFields - Extra fields to add to the schema
2264
+ * @param options - Schema options (organizationRef, userRef)
2265
+ * @returns Mongoose Schema for Employee
2266
+ *
2267
+ * @example
2268
+ * ```typescript
2269
+ * // Default (references 'Organization')
2270
+ * const employeeSchema = createEmployeeSchema();
2271
+ *
2272
+ * // Multi-branch setup
2273
+ * const employeeSchema = createEmployeeSchema({}, {
2274
+ * organizationRef: 'Branch',
2275
+ * });
2276
+ *
2277
+ * // With additional fields
2278
+ * const employeeSchema = createEmployeeSchema({
2279
+ * customField: { type: String },
2280
+ * }, {
2281
+ * organizationRef: 'Company',
2282
+ * });
2283
+ * ```
2284
+ */
2285
+ declare function createEmployeeSchema(additionalFields?: SchemaDefinition, options?: PayrollSchemaOptions): Schema;
2286
+ /**
2287
+ * Create a complete PayrollRecord schema.
2288
+ *
2289
+ * @param additionalFields - Extra fields to add to the schema
2290
+ * @param options - Schema options (organizationRef, userRef)
2291
+ * @returns Mongoose Schema for PayrollRecord
2292
+ *
2293
+ * @example
2294
+ * ```typescript
2295
+ * // Multi-branch setup
2296
+ * const payrollRecordSchema = createPayrollRecordSchema({}, {
2297
+ * organizationRef: 'Branch',
2298
+ * });
2299
+ * ```
2300
+ */
2301
+ declare function createPayrollRecordSchema(additionalFields?: SchemaDefinition, options?: PayrollSchemaOptions): Schema;
2302
+
2303
+ declare const _default: {
2304
+ allowanceSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
2305
+ _id: false;
2306
+ }, {
2307
+ amount: number;
2308
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2309
+ isPercentage: boolean;
2310
+ taxable: boolean;
2311
+ recurring: boolean;
2312
+ effectiveFrom: NativeDate;
2313
+ name?: string | null | undefined;
2314
+ value?: number | null | undefined;
2315
+ effectiveTo?: NativeDate | null | undefined;
2316
+ }, mongoose.Document<unknown, {}, {
2317
+ amount: number;
2318
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2319
+ isPercentage: boolean;
2320
+ taxable: boolean;
2321
+ recurring: boolean;
2322
+ effectiveFrom: NativeDate;
2323
+ name?: string | null | undefined;
2324
+ value?: number | null | undefined;
2325
+ effectiveTo?: NativeDate | null | undefined;
2326
+ }, {
2327
+ id: string;
2328
+ }, mongoose.ResolveSchemaOptions<{
2329
+ _id: false;
2330
+ }>> & Omit<{
2331
+ amount: number;
2332
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2333
+ isPercentage: boolean;
2334
+ taxable: boolean;
2335
+ recurring: boolean;
2336
+ effectiveFrom: NativeDate;
2337
+ name?: string | null | undefined;
2338
+ value?: number | null | undefined;
2339
+ effectiveTo?: NativeDate | null | undefined;
2340
+ } & {
2341
+ _id: Types.ObjectId;
2342
+ } & {
2343
+ __v: number;
2344
+ }, "id"> & {
2345
+ id: string;
2346
+ }, {
2347
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
2348
+ } | {
2349
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
2350
+ amount: number;
2351
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2352
+ isPercentage: boolean;
2353
+ taxable: boolean;
2354
+ recurring: boolean;
2355
+ effectiveFrom: NativeDate;
2356
+ name?: string | null | undefined;
2357
+ value?: number | null | undefined;
2358
+ effectiveTo?: NativeDate | null | undefined;
2359
+ }, {
2360
+ id: string;
2361
+ }, mongoose.ResolveSchemaOptions<{
2362
+ _id: false;
2363
+ }>> & Omit<{
2364
+ amount: number;
2365
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2366
+ isPercentage: boolean;
2367
+ taxable: boolean;
2368
+ recurring: boolean;
2369
+ effectiveFrom: NativeDate;
2370
+ name?: string | null | undefined;
2371
+ value?: number | null | undefined;
2372
+ effectiveTo?: NativeDate | null | undefined;
2373
+ } & {
2374
+ _id: Types.ObjectId;
2375
+ } & {
2376
+ __v: number;
2377
+ }, "id"> & {
2378
+ id: string;
2379
+ }> | undefined;
2380
+ }, {
2381
+ amount: number;
2382
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2383
+ isPercentage: boolean;
2384
+ taxable: boolean;
2385
+ recurring: boolean;
2386
+ effectiveFrom: NativeDate;
2387
+ name?: string | null | undefined;
2388
+ value?: number | null | undefined;
2389
+ effectiveTo?: NativeDate | null | undefined;
2390
+ } & {
2391
+ _id: Types.ObjectId;
2392
+ } & {
2393
+ __v: number;
2394
+ }>;
2395
+ deductionSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
2396
+ _id: false;
2397
+ }, {
2398
+ amount: number;
2399
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2400
+ auto: boolean;
2401
+ isPercentage: boolean;
2402
+ recurring: boolean;
2403
+ effectiveFrom: NativeDate;
2404
+ name?: string | null | undefined;
2405
+ description?: string | null | undefined;
2406
+ value?: number | null | undefined;
2407
+ effectiveTo?: NativeDate | null | undefined;
2408
+ }, mongoose.Document<unknown, {}, {
2409
+ amount: number;
2410
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2411
+ auto: boolean;
2412
+ isPercentage: boolean;
2413
+ recurring: boolean;
2414
+ effectiveFrom: NativeDate;
2415
+ name?: string | null | undefined;
2416
+ description?: string | null | undefined;
2417
+ value?: number | null | undefined;
2418
+ effectiveTo?: NativeDate | null | undefined;
2419
+ }, {
2420
+ id: string;
2421
+ }, mongoose.ResolveSchemaOptions<{
2422
+ _id: false;
2423
+ }>> & Omit<{
2424
+ amount: number;
2425
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2426
+ auto: boolean;
2427
+ isPercentage: boolean;
2428
+ recurring: boolean;
2429
+ effectiveFrom: NativeDate;
2430
+ name?: string | null | undefined;
2431
+ description?: string | null | undefined;
2432
+ value?: number | null | undefined;
2433
+ effectiveTo?: NativeDate | null | undefined;
2434
+ } & {
2435
+ _id: Types.ObjectId;
2436
+ } & {
2437
+ __v: number;
2438
+ }, "id"> & {
2439
+ id: string;
2440
+ }, {
2441
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
2442
+ } | {
2443
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
2444
+ amount: number;
2445
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2446
+ auto: boolean;
2447
+ isPercentage: boolean;
2448
+ recurring: boolean;
2449
+ effectiveFrom: NativeDate;
2450
+ name?: string | null | undefined;
2451
+ description?: string | null | undefined;
2452
+ value?: number | null | undefined;
2453
+ effectiveTo?: NativeDate | null | undefined;
2454
+ }, {
2455
+ id: string;
2456
+ }, mongoose.ResolveSchemaOptions<{
2457
+ _id: false;
2458
+ }>> & Omit<{
2459
+ amount: number;
2460
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2461
+ auto: boolean;
2462
+ isPercentage: boolean;
2463
+ recurring: boolean;
2464
+ effectiveFrom: NativeDate;
2465
+ name?: string | null | undefined;
2466
+ description?: string | null | undefined;
2467
+ value?: number | null | undefined;
2468
+ effectiveTo?: NativeDate | null | undefined;
2469
+ } & {
2470
+ _id: Types.ObjectId;
2471
+ } & {
2472
+ __v: number;
2473
+ }, "id"> & {
2474
+ id: string;
2475
+ }> | undefined;
2476
+ }, {
2477
+ amount: number;
2478
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2479
+ auto: boolean;
2480
+ isPercentage: boolean;
2481
+ recurring: boolean;
2482
+ effectiveFrom: NativeDate;
2483
+ name?: string | null | undefined;
2484
+ description?: string | null | undefined;
2485
+ value?: number | null | undefined;
2486
+ effectiveTo?: NativeDate | null | undefined;
2487
+ } & {
2488
+ _id: Types.ObjectId;
2489
+ } & {
2490
+ __v: number;
2491
+ }>;
2492
+ compensationSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
2493
+ _id: false;
2494
+ }, {
2495
+ allowances: Types.DocumentArray<{
2496
+ amount: number;
2497
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2498
+ isPercentage: boolean;
2499
+ taxable: boolean;
2500
+ recurring: boolean;
2501
+ effectiveFrom: NativeDate;
2502
+ name?: string | null | undefined;
2503
+ value?: number | null | undefined;
2504
+ effectiveTo?: NativeDate | null | undefined;
2505
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2506
+ amount: number;
2507
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2508
+ isPercentage: boolean;
2509
+ taxable: boolean;
2510
+ recurring: boolean;
2511
+ effectiveFrom: NativeDate;
2512
+ name?: string | null | undefined;
2513
+ value?: number | null | undefined;
2514
+ effectiveTo?: NativeDate | null | undefined;
2515
+ }> & {
2516
+ amount: number;
2517
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2518
+ isPercentage: boolean;
2519
+ taxable: boolean;
2520
+ recurring: boolean;
2521
+ effectiveFrom: NativeDate;
2522
+ name?: string | null | undefined;
2523
+ value?: number | null | undefined;
2524
+ effectiveTo?: NativeDate | null | undefined;
2525
+ }>;
2526
+ deductions: Types.DocumentArray<{
2527
+ amount: number;
2528
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2529
+ auto: boolean;
2530
+ isPercentage: boolean;
2531
+ recurring: boolean;
2532
+ effectiveFrom: NativeDate;
2533
+ name?: string | null | undefined;
2534
+ description?: string | null | undefined;
2535
+ value?: number | null | undefined;
2536
+ effectiveTo?: NativeDate | null | undefined;
2537
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2538
+ amount: number;
2539
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2540
+ auto: boolean;
2541
+ isPercentage: boolean;
2542
+ recurring: boolean;
2543
+ effectiveFrom: NativeDate;
2544
+ name?: string | null | undefined;
2545
+ description?: string | null | undefined;
2546
+ value?: number | null | undefined;
2547
+ effectiveTo?: NativeDate | null | undefined;
2548
+ }> & {
2549
+ amount: number;
2550
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2551
+ auto: boolean;
2552
+ isPercentage: boolean;
2553
+ recurring: boolean;
2554
+ effectiveFrom: NativeDate;
2555
+ name?: string | null | undefined;
2556
+ description?: string | null | undefined;
2557
+ value?: number | null | undefined;
2558
+ effectiveTo?: NativeDate | null | undefined;
2559
+ }>;
2560
+ effectiveFrom: NativeDate;
2561
+ baseAmount: number;
2562
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2563
+ grossSalary: number;
2564
+ netSalary: number;
2565
+ lastModified: NativeDate;
2566
+ currency?: string | null | undefined;
2567
+ }, mongoose.Document<unknown, {}, {
2568
+ allowances: Types.DocumentArray<{
2569
+ amount: number;
2570
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2571
+ isPercentage: boolean;
2572
+ taxable: boolean;
2573
+ recurring: boolean;
2574
+ effectiveFrom: NativeDate;
2575
+ name?: string | null | undefined;
2576
+ value?: number | null | undefined;
2577
+ effectiveTo?: NativeDate | null | undefined;
2578
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2579
+ amount: number;
2580
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2581
+ isPercentage: boolean;
2582
+ taxable: boolean;
2583
+ recurring: boolean;
2584
+ effectiveFrom: NativeDate;
2585
+ name?: string | null | undefined;
2586
+ value?: number | null | undefined;
2587
+ effectiveTo?: NativeDate | null | undefined;
2588
+ }> & {
2589
+ amount: number;
2590
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2591
+ isPercentage: boolean;
2592
+ taxable: boolean;
2593
+ recurring: boolean;
2594
+ effectiveFrom: NativeDate;
2595
+ name?: string | null | undefined;
2596
+ value?: number | null | undefined;
2597
+ effectiveTo?: NativeDate | null | undefined;
2598
+ }>;
2599
+ deductions: Types.DocumentArray<{
2600
+ amount: number;
2601
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2602
+ auto: boolean;
2603
+ isPercentage: boolean;
2604
+ recurring: boolean;
2605
+ effectiveFrom: NativeDate;
2606
+ name?: string | null | undefined;
2607
+ description?: string | null | undefined;
2608
+ value?: number | null | undefined;
2609
+ effectiveTo?: NativeDate | null | undefined;
2610
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2611
+ amount: number;
2612
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2613
+ auto: boolean;
2614
+ isPercentage: boolean;
2615
+ recurring: boolean;
2616
+ effectiveFrom: NativeDate;
2617
+ name?: string | null | undefined;
2618
+ description?: string | null | undefined;
2619
+ value?: number | null | undefined;
2620
+ effectiveTo?: NativeDate | null | undefined;
2621
+ }> & {
2622
+ amount: number;
2623
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2624
+ auto: boolean;
2625
+ isPercentage: boolean;
2626
+ recurring: boolean;
2627
+ effectiveFrom: NativeDate;
2628
+ name?: string | null | undefined;
2629
+ description?: string | null | undefined;
2630
+ value?: number | null | undefined;
2631
+ effectiveTo?: NativeDate | null | undefined;
2632
+ }>;
2633
+ effectiveFrom: NativeDate;
2634
+ baseAmount: number;
2635
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2636
+ grossSalary: number;
2637
+ netSalary: number;
2638
+ lastModified: NativeDate;
2639
+ currency?: string | null | undefined;
2640
+ }, {
2641
+ id: string;
2642
+ }, mongoose.ResolveSchemaOptions<{
2643
+ _id: false;
2644
+ }>> & Omit<{
2645
+ allowances: Types.DocumentArray<{
2646
+ amount: number;
2647
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2648
+ isPercentage: boolean;
2649
+ taxable: boolean;
2650
+ recurring: boolean;
2651
+ effectiveFrom: NativeDate;
2652
+ name?: string | null | undefined;
2653
+ value?: number | null | undefined;
2654
+ effectiveTo?: NativeDate | null | undefined;
2655
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2656
+ amount: number;
2657
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2658
+ isPercentage: boolean;
2659
+ taxable: boolean;
2660
+ recurring: boolean;
2661
+ effectiveFrom: NativeDate;
2662
+ name?: string | null | undefined;
2663
+ value?: number | null | undefined;
2664
+ effectiveTo?: NativeDate | null | undefined;
2665
+ }> & {
2666
+ amount: number;
2667
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2668
+ isPercentage: boolean;
2669
+ taxable: boolean;
2670
+ recurring: boolean;
2671
+ effectiveFrom: NativeDate;
2672
+ name?: string | null | undefined;
2673
+ value?: number | null | undefined;
2674
+ effectiveTo?: NativeDate | null | undefined;
2675
+ }>;
2676
+ deductions: Types.DocumentArray<{
2677
+ amount: number;
2678
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2679
+ auto: boolean;
2680
+ isPercentage: boolean;
2681
+ recurring: boolean;
2682
+ effectiveFrom: NativeDate;
2683
+ name?: string | null | undefined;
2684
+ description?: string | null | undefined;
2685
+ value?: number | null | undefined;
2686
+ effectiveTo?: NativeDate | null | undefined;
2687
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2688
+ amount: number;
2689
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2690
+ auto: boolean;
2691
+ isPercentage: boolean;
2692
+ recurring: boolean;
2693
+ effectiveFrom: NativeDate;
2694
+ name?: string | null | undefined;
2695
+ description?: string | null | undefined;
2696
+ value?: number | null | undefined;
2697
+ effectiveTo?: NativeDate | null | undefined;
2698
+ }> & {
2699
+ amount: number;
2700
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2701
+ auto: boolean;
2702
+ isPercentage: boolean;
2703
+ recurring: boolean;
2704
+ effectiveFrom: NativeDate;
2705
+ name?: string | null | undefined;
2706
+ description?: string | null | undefined;
2707
+ value?: number | null | undefined;
2708
+ effectiveTo?: NativeDate | null | undefined;
2709
+ }>;
2710
+ effectiveFrom: NativeDate;
2711
+ baseAmount: number;
2712
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2713
+ grossSalary: number;
2714
+ netSalary: number;
2715
+ lastModified: NativeDate;
2716
+ currency?: string | null | undefined;
2717
+ } & {
2718
+ _id: Types.ObjectId;
2719
+ } & {
2720
+ __v: number;
2721
+ }, "id"> & {
2722
+ id: string;
2723
+ }, {
2724
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
2725
+ } | {
2726
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
2727
+ allowances: Types.DocumentArray<{
2728
+ amount: number;
2729
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2730
+ isPercentage: boolean;
2731
+ taxable: boolean;
2732
+ recurring: boolean;
2733
+ effectiveFrom: NativeDate;
2734
+ name?: string | null | undefined;
2735
+ value?: number | null | undefined;
2736
+ effectiveTo?: NativeDate | null | undefined;
2737
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2738
+ amount: number;
2739
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2740
+ isPercentage: boolean;
2741
+ taxable: boolean;
2742
+ recurring: boolean;
2743
+ effectiveFrom: NativeDate;
2744
+ name?: string | null | undefined;
2745
+ value?: number | null | undefined;
2746
+ effectiveTo?: NativeDate | null | undefined;
2747
+ }> & {
2748
+ amount: number;
2749
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2750
+ isPercentage: boolean;
2751
+ taxable: boolean;
2752
+ recurring: boolean;
2753
+ effectiveFrom: NativeDate;
2754
+ name?: string | null | undefined;
2755
+ value?: number | null | undefined;
2756
+ effectiveTo?: NativeDate | null | undefined;
2757
+ }>;
2758
+ deductions: Types.DocumentArray<{
2759
+ amount: number;
2760
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2761
+ auto: boolean;
2762
+ isPercentage: boolean;
2763
+ recurring: boolean;
2764
+ effectiveFrom: NativeDate;
2765
+ name?: string | null | undefined;
2766
+ description?: string | null | undefined;
2767
+ value?: number | null | undefined;
2768
+ effectiveTo?: NativeDate | null | undefined;
2769
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2770
+ amount: number;
2771
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2772
+ auto: boolean;
2773
+ isPercentage: boolean;
2774
+ recurring: boolean;
2775
+ effectiveFrom: NativeDate;
2776
+ name?: string | null | undefined;
2777
+ description?: string | null | undefined;
2778
+ value?: number | null | undefined;
2779
+ effectiveTo?: NativeDate | null | undefined;
2780
+ }> & {
2781
+ amount: number;
2782
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2783
+ auto: boolean;
2784
+ isPercentage: boolean;
2785
+ recurring: boolean;
2786
+ effectiveFrom: NativeDate;
2787
+ name?: string | null | undefined;
2788
+ description?: string | null | undefined;
2789
+ value?: number | null | undefined;
2790
+ effectiveTo?: NativeDate | null | undefined;
2791
+ }>;
2792
+ effectiveFrom: NativeDate;
2793
+ baseAmount: number;
2794
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2795
+ grossSalary: number;
2796
+ netSalary: number;
2797
+ lastModified: NativeDate;
2798
+ currency?: string | null | undefined;
2799
+ }, {
2800
+ id: string;
2801
+ }, mongoose.ResolveSchemaOptions<{
2802
+ _id: false;
2803
+ }>> & Omit<{
2804
+ allowances: Types.DocumentArray<{
2805
+ amount: number;
2806
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2807
+ isPercentage: boolean;
2808
+ taxable: boolean;
2809
+ recurring: boolean;
2810
+ effectiveFrom: NativeDate;
2811
+ name?: string | null | undefined;
2812
+ value?: number | null | undefined;
2813
+ effectiveTo?: NativeDate | null | undefined;
2814
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2815
+ amount: number;
2816
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2817
+ isPercentage: boolean;
2818
+ taxable: boolean;
2819
+ recurring: boolean;
2820
+ effectiveFrom: NativeDate;
2821
+ name?: string | null | undefined;
2822
+ value?: number | null | undefined;
2823
+ effectiveTo?: NativeDate | null | undefined;
2824
+ }> & {
2825
+ amount: number;
2826
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2827
+ isPercentage: boolean;
2828
+ taxable: boolean;
2829
+ recurring: boolean;
2830
+ effectiveFrom: NativeDate;
2831
+ name?: string | null | undefined;
2832
+ value?: number | null | undefined;
2833
+ effectiveTo?: NativeDate | null | undefined;
2834
+ }>;
2835
+ deductions: Types.DocumentArray<{
2836
+ amount: number;
2837
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2838
+ auto: boolean;
2839
+ isPercentage: boolean;
2840
+ recurring: boolean;
2841
+ effectiveFrom: NativeDate;
2842
+ name?: string | null | undefined;
2843
+ description?: string | null | undefined;
2844
+ value?: number | null | undefined;
2845
+ effectiveTo?: NativeDate | null | undefined;
2846
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2847
+ amount: number;
2848
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2849
+ auto: boolean;
2850
+ isPercentage: boolean;
2851
+ recurring: boolean;
2852
+ effectiveFrom: NativeDate;
2853
+ name?: string | null | undefined;
2854
+ description?: string | null | undefined;
2855
+ value?: number | null | undefined;
2856
+ effectiveTo?: NativeDate | null | undefined;
2857
+ }> & {
2858
+ amount: number;
2859
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2860
+ auto: boolean;
2861
+ isPercentage: boolean;
2862
+ recurring: boolean;
2863
+ effectiveFrom: NativeDate;
2864
+ name?: string | null | undefined;
2865
+ description?: string | null | undefined;
2866
+ value?: number | null | undefined;
2867
+ effectiveTo?: NativeDate | null | undefined;
2868
+ }>;
2869
+ effectiveFrom: NativeDate;
2870
+ baseAmount: number;
2871
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2872
+ grossSalary: number;
2873
+ netSalary: number;
2874
+ lastModified: NativeDate;
2875
+ currency?: string | null | undefined;
2876
+ } & {
2877
+ _id: Types.ObjectId;
2878
+ } & {
2879
+ __v: number;
2880
+ }, "id"> & {
2881
+ id: string;
2882
+ }> | undefined;
2883
+ }, {
2884
+ allowances: Types.DocumentArray<{
2885
+ amount: number;
2886
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2887
+ isPercentage: boolean;
2888
+ taxable: boolean;
2889
+ recurring: boolean;
2890
+ effectiveFrom: NativeDate;
2891
+ name?: string | null | undefined;
2892
+ value?: number | null | undefined;
2893
+ effectiveTo?: NativeDate | null | undefined;
2894
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2895
+ amount: number;
2896
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2897
+ isPercentage: boolean;
2898
+ taxable: boolean;
2899
+ recurring: boolean;
2900
+ effectiveFrom: NativeDate;
2901
+ name?: string | null | undefined;
2902
+ value?: number | null | undefined;
2903
+ effectiveTo?: NativeDate | null | undefined;
2904
+ }> & {
2905
+ amount: number;
2906
+ type: "mobile" | "housing" | "transport" | "meal" | "medical" | "education" | "bonus" | "other";
2907
+ isPercentage: boolean;
2908
+ taxable: boolean;
2909
+ recurring: boolean;
2910
+ effectiveFrom: NativeDate;
2911
+ name?: string | null | undefined;
2912
+ value?: number | null | undefined;
2913
+ effectiveTo?: NativeDate | null | undefined;
2914
+ }>;
2915
+ deductions: Types.DocumentArray<{
2916
+ amount: number;
2917
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2918
+ auto: boolean;
2919
+ isPercentage: boolean;
2920
+ recurring: boolean;
2921
+ effectiveFrom: NativeDate;
2922
+ name?: string | null | undefined;
2923
+ description?: string | null | undefined;
2924
+ value?: number | null | undefined;
2925
+ effectiveTo?: NativeDate | null | undefined;
2926
+ }, Types.Subdocument<bson.ObjectId, unknown, {
2927
+ amount: number;
2928
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2929
+ auto: boolean;
2930
+ isPercentage: boolean;
2931
+ recurring: boolean;
2932
+ effectiveFrom: NativeDate;
2933
+ name?: string | null | undefined;
2934
+ description?: string | null | undefined;
2935
+ value?: number | null | undefined;
2936
+ effectiveTo?: NativeDate | null | undefined;
2937
+ }> & {
2938
+ amount: number;
2939
+ type: "tax" | "other" | "loan" | "advance" | "provident_fund" | "insurance" | "absence";
2940
+ auto: boolean;
2941
+ isPercentage: boolean;
2942
+ recurring: boolean;
2943
+ effectiveFrom: NativeDate;
2944
+ name?: string | null | undefined;
2945
+ description?: string | null | undefined;
2946
+ value?: number | null | undefined;
2947
+ effectiveTo?: NativeDate | null | undefined;
2948
+ }>;
2949
+ effectiveFrom: NativeDate;
2950
+ baseAmount: number;
2951
+ frequency: "monthly" | "bi_weekly" | "weekly" | "hourly" | "daily";
2952
+ grossSalary: number;
2953
+ netSalary: number;
2954
+ lastModified: NativeDate;
2955
+ currency?: string | null | undefined;
2956
+ } & {
2957
+ _id: Types.ObjectId;
2958
+ } & {
2959
+ __v: number;
2960
+ }>;
2961
+ workScheduleSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
2962
+ _id: false;
2963
+ }, {
2964
+ workingDays: number[];
2965
+ hoursPerDay?: number | null | undefined;
2966
+ hoursPerWeek?: number | null | undefined;
2967
+ shiftStart?: string | null | undefined;
2968
+ shiftEnd?: string | null | undefined;
2969
+ }, mongoose.Document<unknown, {}, {
2970
+ workingDays: number[];
2971
+ hoursPerDay?: number | null | undefined;
2972
+ hoursPerWeek?: number | null | undefined;
2973
+ shiftStart?: string | null | undefined;
2974
+ shiftEnd?: string | null | undefined;
2975
+ }, {
2976
+ id: string;
2977
+ }, mongoose.ResolveSchemaOptions<{
2978
+ _id: false;
2979
+ }>> & Omit<{
2980
+ workingDays: number[];
2981
+ hoursPerDay?: number | null | undefined;
2982
+ hoursPerWeek?: number | null | undefined;
2983
+ shiftStart?: string | null | undefined;
2984
+ shiftEnd?: string | null | undefined;
2985
+ } & {
2986
+ _id: Types.ObjectId;
2987
+ } & {
2988
+ __v: number;
2989
+ }, "id"> & {
2990
+ id: string;
2991
+ }, {
2992
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
2993
+ } | {
2994
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
2995
+ workingDays: number[];
2996
+ hoursPerDay?: number | null | undefined;
2997
+ hoursPerWeek?: number | null | undefined;
2998
+ shiftStart?: string | null | undefined;
2999
+ shiftEnd?: string | null | undefined;
3000
+ }, {
3001
+ id: string;
3002
+ }, mongoose.ResolveSchemaOptions<{
3003
+ _id: false;
3004
+ }>> & Omit<{
3005
+ workingDays: number[];
3006
+ hoursPerDay?: number | null | undefined;
3007
+ hoursPerWeek?: number | null | undefined;
3008
+ shiftStart?: string | null | undefined;
3009
+ shiftEnd?: string | null | undefined;
3010
+ } & {
3011
+ _id: Types.ObjectId;
3012
+ } & {
3013
+ __v: number;
3014
+ }, "id"> & {
3015
+ id: string;
3016
+ }> | undefined;
3017
+ }, {
3018
+ workingDays: number[];
3019
+ hoursPerDay?: number | null | undefined;
3020
+ hoursPerWeek?: number | null | undefined;
3021
+ shiftStart?: string | null | undefined;
3022
+ shiftEnd?: string | null | undefined;
3023
+ } & {
3024
+ _id: Types.ObjectId;
3025
+ } & {
3026
+ __v: number;
3027
+ }>;
3028
+ bankDetailsSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3029
+ _id: false;
3030
+ }, {
3031
+ accountName?: string | null | undefined;
3032
+ accountNumber?: string | null | undefined;
3033
+ bankName?: string | null | undefined;
3034
+ branchName?: string | null | undefined;
3035
+ routingNumber?: string | null | undefined;
3036
+ }, mongoose.Document<unknown, {}, {
3037
+ accountName?: string | null | undefined;
3038
+ accountNumber?: string | null | undefined;
3039
+ bankName?: string | null | undefined;
3040
+ branchName?: string | null | undefined;
3041
+ routingNumber?: string | null | undefined;
3042
+ }, {
3043
+ id: string;
3044
+ }, mongoose.ResolveSchemaOptions<{
3045
+ _id: false;
3046
+ }>> & Omit<{
3047
+ accountName?: string | null | undefined;
3048
+ accountNumber?: string | null | undefined;
3049
+ bankName?: string | null | undefined;
3050
+ branchName?: string | null | undefined;
3051
+ routingNumber?: string | null | undefined;
3052
+ } & {
3053
+ _id: Types.ObjectId;
3054
+ } & {
3055
+ __v: number;
3056
+ }, "id"> & {
3057
+ id: string;
3058
+ }, {
3059
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3060
+ } | {
3061
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3062
+ accountName?: string | null | undefined;
3063
+ accountNumber?: string | null | undefined;
3064
+ bankName?: string | null | undefined;
3065
+ branchName?: string | null | undefined;
3066
+ routingNumber?: string | null | undefined;
3067
+ }, {
3068
+ id: string;
3069
+ }, mongoose.ResolveSchemaOptions<{
3070
+ _id: false;
3071
+ }>> & Omit<{
3072
+ accountName?: string | null | undefined;
3073
+ accountNumber?: string | null | undefined;
3074
+ bankName?: string | null | undefined;
3075
+ branchName?: string | null | undefined;
3076
+ routingNumber?: string | null | undefined;
3077
+ } & {
3078
+ _id: Types.ObjectId;
3079
+ } & {
3080
+ __v: number;
3081
+ }, "id"> & {
3082
+ id: string;
3083
+ }> | undefined;
3084
+ }, {
3085
+ accountName?: string | null | undefined;
3086
+ accountNumber?: string | null | undefined;
3087
+ bankName?: string | null | undefined;
3088
+ branchName?: string | null | undefined;
3089
+ routingNumber?: string | null | undefined;
3090
+ } & {
3091
+ _id: Types.ObjectId;
3092
+ } & {
3093
+ __v: number;
3094
+ }>;
3095
+ employmentHistorySchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3096
+ timestamps: true;
3097
+ }, {
3098
+ hireDate: NativeDate;
3099
+ terminationDate: NativeDate;
3100
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3101
+ position?: string | null | undefined;
3102
+ notes?: string | null | undefined;
3103
+ department?: string | null | undefined;
3104
+ finalSalary?: number | null | undefined;
3105
+ } & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
3106
+ hireDate: NativeDate;
3107
+ terminationDate: NativeDate;
3108
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3109
+ position?: string | null | undefined;
3110
+ notes?: string | null | undefined;
3111
+ department?: string | null | undefined;
3112
+ finalSalary?: number | null | undefined;
3113
+ } & mongoose.DefaultTimestampProps, {
3114
+ id: string;
3115
+ }, mongoose.ResolveSchemaOptions<{
3116
+ timestamps: true;
3117
+ }>> & Omit<{
3118
+ hireDate: NativeDate;
3119
+ terminationDate: NativeDate;
3120
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3121
+ position?: string | null | undefined;
3122
+ notes?: string | null | undefined;
3123
+ department?: string | null | undefined;
3124
+ finalSalary?: number | null | undefined;
3125
+ } & mongoose.DefaultTimestampProps & {
3126
+ _id: Types.ObjectId;
3127
+ } & {
3128
+ __v: number;
3129
+ }, "id"> & {
3130
+ id: string;
3131
+ }, {
3132
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3133
+ } | {
3134
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3135
+ hireDate: NativeDate;
3136
+ terminationDate: NativeDate;
3137
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3138
+ position?: string | null | undefined;
3139
+ notes?: string | null | undefined;
3140
+ department?: string | null | undefined;
3141
+ finalSalary?: number | null | undefined;
3142
+ } & mongoose.DefaultTimestampProps, {
3143
+ id: string;
3144
+ }, mongoose.ResolveSchemaOptions<{
3145
+ timestamps: true;
3146
+ }>> & Omit<{
3147
+ hireDate: NativeDate;
3148
+ terminationDate: NativeDate;
3149
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3150
+ position?: string | null | undefined;
3151
+ notes?: string | null | undefined;
3152
+ department?: string | null | undefined;
3153
+ finalSalary?: number | null | undefined;
3154
+ } & mongoose.DefaultTimestampProps & {
3155
+ _id: Types.ObjectId;
3156
+ } & {
3157
+ __v: number;
3158
+ }, "id"> & {
3159
+ id: string;
3160
+ }> | undefined;
3161
+ }, {
3162
+ hireDate: NativeDate;
3163
+ terminationDate: NativeDate;
3164
+ reason?: "termination" | "other" | "resignation" | "retirement" | "contract_end" | "mutual_agreement" | null | undefined;
3165
+ position?: string | null | undefined;
3166
+ notes?: string | null | undefined;
3167
+ department?: string | null | undefined;
3168
+ finalSalary?: number | null | undefined;
3169
+ createdAt: NativeDate;
3170
+ updatedAt: NativeDate;
3171
+ } & {
3172
+ _id: Types.ObjectId;
3173
+ } & {
3174
+ __v: number;
3175
+ }>;
3176
+ payrollStatsSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3177
+ _id: false;
3178
+ }, {
3179
+ updatedAt: NativeDate;
3180
+ totalPaid: number;
3181
+ paymentsThisYear: number;
3182
+ averageMonthly: number;
3183
+ lastPaymentDate?: NativeDate | null | undefined;
3184
+ nextPaymentDate?: NativeDate | null | undefined;
3185
+ }, mongoose.Document<unknown, {}, {
3186
+ updatedAt: NativeDate;
3187
+ totalPaid: number;
3188
+ paymentsThisYear: number;
3189
+ averageMonthly: number;
3190
+ lastPaymentDate?: NativeDate | null | undefined;
3191
+ nextPaymentDate?: NativeDate | null | undefined;
3192
+ }, {
3193
+ id: string;
3194
+ }, mongoose.ResolveSchemaOptions<{
3195
+ _id: false;
3196
+ }>> & Omit<{
3197
+ updatedAt: NativeDate;
3198
+ totalPaid: number;
3199
+ paymentsThisYear: number;
3200
+ averageMonthly: number;
3201
+ lastPaymentDate?: NativeDate | null | undefined;
3202
+ nextPaymentDate?: NativeDate | null | undefined;
3203
+ } & {
3204
+ _id: Types.ObjectId;
3205
+ } & {
3206
+ __v: number;
3207
+ }, "id"> & {
3208
+ id: string;
3209
+ }, {
3210
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3211
+ } | {
3212
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3213
+ updatedAt: NativeDate;
3214
+ totalPaid: number;
3215
+ paymentsThisYear: number;
3216
+ averageMonthly: number;
3217
+ lastPaymentDate?: NativeDate | null | undefined;
3218
+ nextPaymentDate?: NativeDate | null | undefined;
3219
+ }, {
3220
+ id: string;
3221
+ }, mongoose.ResolveSchemaOptions<{
3222
+ _id: false;
3223
+ }>> & Omit<{
3224
+ updatedAt: NativeDate;
3225
+ totalPaid: number;
3226
+ paymentsThisYear: number;
3227
+ averageMonthly: number;
3228
+ lastPaymentDate?: NativeDate | null | undefined;
3229
+ nextPaymentDate?: NativeDate | null | undefined;
3230
+ } & {
3231
+ _id: Types.ObjectId;
3232
+ } & {
3233
+ __v: number;
3234
+ }, "id"> & {
3235
+ id: string;
3236
+ }> | undefined;
3237
+ }, {
3238
+ updatedAt: NativeDate;
3239
+ totalPaid: number;
3240
+ paymentsThisYear: number;
3241
+ averageMonthly: number;
3242
+ lastPaymentDate?: NativeDate | null | undefined;
3243
+ nextPaymentDate?: NativeDate | null | undefined;
3244
+ } & {
3245
+ _id: Types.ObjectId;
3246
+ } & {
3247
+ __v: number;
3248
+ }>;
3249
+ payrollBreakdownSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3250
+ _id: false;
3251
+ }, {
3252
+ allowances: Types.DocumentArray<{
3253
+ amount: number;
3254
+ type: string;
3255
+ taxable: boolean;
3256
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3257
+ amount: number;
3258
+ type: string;
3259
+ taxable: boolean;
3260
+ }> & {
3261
+ amount: number;
3262
+ type: string;
3263
+ taxable: boolean;
3264
+ }>;
3265
+ deductions: Types.DocumentArray<{
3266
+ amount: number;
3267
+ type: string;
3268
+ description?: string | null | undefined;
3269
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3270
+ amount: number;
3271
+ type: string;
3272
+ description?: string | null | undefined;
3273
+ }> & {
3274
+ amount: number;
3275
+ type: string;
3276
+ description?: string | null | undefined;
3277
+ }>;
3278
+ taxableAmount: number;
3279
+ baseAmount: number;
3280
+ grossSalary: number;
3281
+ netSalary: number;
3282
+ taxAmount: number;
3283
+ proRatedAmount: number;
3284
+ attendanceDeduction: number;
3285
+ overtimeAmount: number;
3286
+ bonusAmount: number;
3287
+ workingDays?: number | null | undefined;
3288
+ actualDays?: number | null | undefined;
3289
+ }, mongoose.Document<unknown, {}, {
3290
+ allowances: Types.DocumentArray<{
3291
+ amount: number;
3292
+ type: string;
3293
+ taxable: boolean;
3294
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3295
+ amount: number;
3296
+ type: string;
3297
+ taxable: boolean;
3298
+ }> & {
3299
+ amount: number;
3300
+ type: string;
3301
+ taxable: boolean;
3302
+ }>;
3303
+ deductions: Types.DocumentArray<{
3304
+ amount: number;
3305
+ type: string;
3306
+ description?: string | null | undefined;
3307
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3308
+ amount: number;
3309
+ type: string;
3310
+ description?: string | null | undefined;
3311
+ }> & {
3312
+ amount: number;
3313
+ type: string;
3314
+ description?: string | null | undefined;
3315
+ }>;
3316
+ taxableAmount: number;
3317
+ baseAmount: number;
3318
+ grossSalary: number;
3319
+ netSalary: number;
3320
+ taxAmount: number;
3321
+ proRatedAmount: number;
3322
+ attendanceDeduction: number;
3323
+ overtimeAmount: number;
3324
+ bonusAmount: number;
3325
+ workingDays?: number | null | undefined;
3326
+ actualDays?: number | null | undefined;
3327
+ }, {
3328
+ id: string;
3329
+ }, mongoose.ResolveSchemaOptions<{
3330
+ _id: false;
3331
+ }>> & Omit<{
3332
+ allowances: Types.DocumentArray<{
3333
+ amount: number;
3334
+ type: string;
3335
+ taxable: boolean;
3336
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3337
+ amount: number;
3338
+ type: string;
3339
+ taxable: boolean;
3340
+ }> & {
3341
+ amount: number;
3342
+ type: string;
3343
+ taxable: boolean;
3344
+ }>;
3345
+ deductions: Types.DocumentArray<{
3346
+ amount: number;
3347
+ type: string;
3348
+ description?: string | null | undefined;
3349
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3350
+ amount: number;
3351
+ type: string;
3352
+ description?: string | null | undefined;
3353
+ }> & {
3354
+ amount: number;
3355
+ type: string;
3356
+ description?: string | null | undefined;
3357
+ }>;
3358
+ taxableAmount: number;
3359
+ baseAmount: number;
3360
+ grossSalary: number;
3361
+ netSalary: number;
3362
+ taxAmount: number;
3363
+ proRatedAmount: number;
3364
+ attendanceDeduction: number;
3365
+ overtimeAmount: number;
3366
+ bonusAmount: number;
3367
+ workingDays?: number | null | undefined;
3368
+ actualDays?: number | null | undefined;
3369
+ } & {
3370
+ _id: Types.ObjectId;
3371
+ } & {
3372
+ __v: number;
3373
+ }, "id"> & {
3374
+ id: string;
3375
+ }, {
3376
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3377
+ } | {
3378
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3379
+ allowances: Types.DocumentArray<{
3380
+ amount: number;
3381
+ type: string;
3382
+ taxable: boolean;
3383
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3384
+ amount: number;
3385
+ type: string;
3386
+ taxable: boolean;
3387
+ }> & {
3388
+ amount: number;
3389
+ type: string;
3390
+ taxable: boolean;
3391
+ }>;
3392
+ deductions: Types.DocumentArray<{
3393
+ amount: number;
3394
+ type: string;
3395
+ description?: string | null | undefined;
3396
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3397
+ amount: number;
3398
+ type: string;
3399
+ description?: string | null | undefined;
3400
+ }> & {
3401
+ amount: number;
3402
+ type: string;
3403
+ description?: string | null | undefined;
3404
+ }>;
3405
+ taxableAmount: number;
3406
+ baseAmount: number;
3407
+ grossSalary: number;
3408
+ netSalary: number;
3409
+ taxAmount: number;
3410
+ proRatedAmount: number;
3411
+ attendanceDeduction: number;
3412
+ overtimeAmount: number;
3413
+ bonusAmount: number;
3414
+ workingDays?: number | null | undefined;
3415
+ actualDays?: number | null | undefined;
3416
+ }, {
3417
+ id: string;
3418
+ }, mongoose.ResolveSchemaOptions<{
3419
+ _id: false;
3420
+ }>> & Omit<{
3421
+ allowances: Types.DocumentArray<{
3422
+ amount: number;
3423
+ type: string;
3424
+ taxable: boolean;
3425
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3426
+ amount: number;
3427
+ type: string;
3428
+ taxable: boolean;
3429
+ }> & {
3430
+ amount: number;
3431
+ type: string;
3432
+ taxable: boolean;
3433
+ }>;
3434
+ deductions: Types.DocumentArray<{
3435
+ amount: number;
3436
+ type: string;
3437
+ description?: string | null | undefined;
3438
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3439
+ amount: number;
3440
+ type: string;
3441
+ description?: string | null | undefined;
3442
+ }> & {
3443
+ amount: number;
3444
+ type: string;
3445
+ description?: string | null | undefined;
3446
+ }>;
3447
+ taxableAmount: number;
3448
+ baseAmount: number;
3449
+ grossSalary: number;
3450
+ netSalary: number;
3451
+ taxAmount: number;
3452
+ proRatedAmount: number;
3453
+ attendanceDeduction: number;
3454
+ overtimeAmount: number;
3455
+ bonusAmount: number;
3456
+ workingDays?: number | null | undefined;
3457
+ actualDays?: number | null | undefined;
3458
+ } & {
3459
+ _id: Types.ObjectId;
3460
+ } & {
3461
+ __v: number;
3462
+ }, "id"> & {
3463
+ id: string;
3464
+ }> | undefined;
3465
+ }, {
3466
+ allowances: Types.DocumentArray<{
3467
+ amount: number;
3468
+ type: string;
3469
+ taxable: boolean;
3470
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3471
+ amount: number;
3472
+ type: string;
3473
+ taxable: boolean;
3474
+ }> & {
3475
+ amount: number;
3476
+ type: string;
3477
+ taxable: boolean;
3478
+ }>;
3479
+ deductions: Types.DocumentArray<{
3480
+ amount: number;
3481
+ type: string;
3482
+ description?: string | null | undefined;
3483
+ }, Types.Subdocument<bson.ObjectId, unknown, {
3484
+ amount: number;
3485
+ type: string;
3486
+ description?: string | null | undefined;
3487
+ }> & {
3488
+ amount: number;
3489
+ type: string;
3490
+ description?: string | null | undefined;
3491
+ }>;
3492
+ taxableAmount: number;
3493
+ baseAmount: number;
3494
+ grossSalary: number;
3495
+ netSalary: number;
3496
+ taxAmount: number;
3497
+ proRatedAmount: number;
3498
+ attendanceDeduction: number;
3499
+ overtimeAmount: number;
3500
+ bonusAmount: number;
3501
+ workingDays?: number | null | undefined;
3502
+ actualDays?: number | null | undefined;
3503
+ } & {
3504
+ _id: Types.ObjectId;
3505
+ } & {
3506
+ __v: number;
3507
+ }>;
3508
+ periodSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
3509
+ _id: false;
3510
+ }, {
3511
+ month: number;
3512
+ year: number;
3513
+ startDate: NativeDate;
3514
+ endDate: NativeDate;
3515
+ payDate: NativeDate;
3516
+ }, mongoose.Document<unknown, {}, {
3517
+ month: number;
3518
+ year: number;
3519
+ startDate: NativeDate;
3520
+ endDate: NativeDate;
3521
+ payDate: NativeDate;
3522
+ }, {
3523
+ id: string;
3524
+ }, mongoose.ResolveSchemaOptions<{
3525
+ _id: false;
3526
+ }>> & Omit<{
3527
+ month: number;
3528
+ year: number;
3529
+ startDate: NativeDate;
3530
+ endDate: NativeDate;
3531
+ payDate: NativeDate;
3532
+ } & {
3533
+ _id: Types.ObjectId;
3534
+ } & {
3535
+ __v: number;
3536
+ }, "id"> & {
3537
+ id: string;
3538
+ }, {
3539
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
3540
+ } | {
3541
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
3542
+ month: number;
3543
+ year: number;
3544
+ startDate: NativeDate;
3545
+ endDate: NativeDate;
3546
+ payDate: NativeDate;
3547
+ }, {
3548
+ id: string;
3549
+ }, mongoose.ResolveSchemaOptions<{
3550
+ _id: false;
3551
+ }>> & Omit<{
3552
+ month: number;
3553
+ year: number;
3554
+ startDate: NativeDate;
3555
+ endDate: NativeDate;
3556
+ payDate: NativeDate;
3557
+ } & {
3558
+ _id: Types.ObjectId;
3559
+ } & {
3560
+ __v: number;
3561
+ }, "id"> & {
3562
+ id: string;
3563
+ }> | undefined;
3564
+ }, {
3565
+ month: number;
3566
+ year: number;
3567
+ startDate: NativeDate;
3568
+ endDate: NativeDate;
3569
+ payDate: NativeDate;
3570
+ } & {
3571
+ _id: Types.ObjectId;
3572
+ } & {
3573
+ __v: number;
3574
+ }>;
3575
+ createEmploymentFields: typeof createEmploymentFields;
3576
+ createPayrollRecordFields: typeof createPayrollRecordFields;
3577
+ employeeIndexes: ({
3578
+ fields: {
3579
+ organizationId: number;
3580
+ employeeId: number;
3581
+ userId?: undefined;
3582
+ email?: undefined;
3583
+ status?: undefined;
3584
+ department?: undefined;
3585
+ 'compensation.netSalary'?: undefined;
3586
+ };
3587
+ options: {
3588
+ unique: boolean;
3589
+ partialFilterExpression?: undefined;
3590
+ };
3591
+ } | {
3592
+ fields: {
3593
+ userId: number;
3594
+ organizationId: number;
3595
+ employeeId?: undefined;
3596
+ email?: undefined;
3597
+ status?: undefined;
3598
+ department?: undefined;
3599
+ 'compensation.netSalary'?: undefined;
3600
+ };
3601
+ options: {
3602
+ unique: boolean;
3603
+ partialFilterExpression: {
3604
+ userId: {
3605
+ $exists: boolean;
3606
+ };
3607
+ email?: undefined;
3608
+ status?: undefined;
3609
+ };
3610
+ };
3611
+ } | {
3612
+ fields: {
3613
+ email: number;
3614
+ organizationId: number;
3615
+ employeeId?: undefined;
3616
+ userId?: undefined;
3617
+ status?: undefined;
3618
+ department?: undefined;
3619
+ 'compensation.netSalary'?: undefined;
3620
+ };
3621
+ options: {
3622
+ unique: boolean;
3623
+ partialFilterExpression: {
3624
+ email: {
3625
+ $exists: boolean;
3626
+ };
3627
+ status: {
3628
+ $in: string[];
3629
+ };
3630
+ userId?: undefined;
3631
+ };
3632
+ };
3633
+ } | {
3634
+ fields: {
3635
+ organizationId: number;
3636
+ status: number;
3637
+ employeeId?: undefined;
3638
+ userId?: undefined;
3639
+ email?: undefined;
3640
+ department?: undefined;
3641
+ 'compensation.netSalary'?: undefined;
3642
+ };
3643
+ options?: undefined;
3644
+ } | {
3645
+ fields: {
3646
+ organizationId: number;
3647
+ department: number;
3648
+ employeeId?: undefined;
3649
+ userId?: undefined;
3650
+ email?: undefined;
3651
+ status?: undefined;
3652
+ 'compensation.netSalary'?: undefined;
3653
+ };
3654
+ options?: undefined;
3655
+ } | {
3656
+ fields: {
3657
+ organizationId: number;
3658
+ 'compensation.netSalary': number;
3659
+ employeeId?: undefined;
3660
+ userId?: undefined;
3661
+ email?: undefined;
3662
+ status?: undefined;
3663
+ department?: undefined;
3664
+ };
3665
+ options?: undefined;
3666
+ })[];
3667
+ payrollRecordIndexes: ({
3668
+ fields: {
3669
+ organizationId: number;
3670
+ employeeId: number;
3671
+ 'period.month': number;
3672
+ 'period.year': number;
3673
+ status?: undefined;
3674
+ createdAt?: undefined;
3675
+ 'period.payDate'?: undefined;
3676
+ };
3677
+ options?: undefined;
3678
+ } | {
3679
+ fields: {
3680
+ organizationId: number;
3681
+ 'period.year': number;
3682
+ 'period.month': number;
3683
+ employeeId?: undefined;
3684
+ status?: undefined;
3685
+ createdAt?: undefined;
3686
+ 'period.payDate'?: undefined;
3687
+ };
3688
+ options?: undefined;
3689
+ } | {
3690
+ fields: {
3691
+ employeeId: number;
3692
+ 'period.year': number;
3693
+ 'period.month': number;
3694
+ organizationId?: undefined;
3695
+ status?: undefined;
3696
+ createdAt?: undefined;
3697
+ 'period.payDate'?: undefined;
3698
+ };
3699
+ options?: undefined;
3700
+ } | {
3701
+ fields: {
3702
+ status: number;
3703
+ createdAt: number;
3704
+ organizationId?: undefined;
3705
+ employeeId?: undefined;
3706
+ 'period.month'?: undefined;
3707
+ 'period.year'?: undefined;
3708
+ 'period.payDate'?: undefined;
3709
+ };
3710
+ options?: undefined;
3711
+ } | {
3712
+ fields: {
3713
+ organizationId: number;
3714
+ status: number;
3715
+ 'period.payDate': number;
3716
+ employeeId?: undefined;
3717
+ 'period.month'?: undefined;
3718
+ 'period.year'?: undefined;
3719
+ createdAt?: undefined;
3720
+ };
3721
+ options?: undefined;
3722
+ } | {
3723
+ fields: {
3724
+ createdAt: number;
3725
+ organizationId?: undefined;
3726
+ employeeId?: undefined;
3727
+ 'period.month'?: undefined;
3728
+ 'period.year'?: undefined;
3729
+ status?: undefined;
3730
+ 'period.payDate'?: undefined;
3731
+ };
3732
+ options: {
3733
+ expireAfterSeconds: number;
3734
+ };
3735
+ })[];
3736
+ applyEmployeeIndexes: typeof applyEmployeeIndexes;
3737
+ applyPayrollRecordIndexes: typeof applyPayrollRecordIndexes;
3738
+ createEmployeeSchema: typeof createEmployeeSchema;
3739
+ createPayrollRecordSchema: typeof createPayrollRecordSchema;
3740
+ };
3741
+
3742
+ export { leaveRequestTTLIndex as A, payrollBreakdownSchema as B, payrollRecordIndexes 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, employmentHistorySchema as m, getLeaveRequestFields as n, getLeaveRequestModel as o, getTaxWithholdingFields as p, getTaxWithholdingModel as q, leaveBalanceFields as r, leaveBalanceSchema as s, leaveRequestIndexes as t, leaveRequestSchema as u, payrollStatsSchema as v, taxWithholdingIndexes as w, taxWithholdingSchema as x, workScheduleSchema as y, employeeIndexes as z };