@bharatbxhipment/xhipment-models-v2 1.0.64 → 1.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export * from "./schemas/exchangeRate/exchange-rate.model";
14
14
  export * from "./schemas/vendors/vendor.model";
15
15
  export * from "./schemas/vendor-payables/vendor-payable.model";
16
16
  export * from "./schemas/credit-note-master/credit-note-master.model";
17
+ export * from "./schemas/attendance-session/attendance-session.model";
17
18
  export * from "./schemas/container-meta-data/container-meta-data.type";
18
19
  export * from "./schemas/countries/countries.interface";
19
20
  export * from "./schemas/billing-entities/billing-entities.interface";
@@ -30,4 +31,5 @@ export * from "./schemas/exchangeRate/exchange-rate.interface";
30
31
  export * from "./schemas/vendors/vendor.interface";
31
32
  export * from "./schemas/vendor-payables/vendor-payable.interface";
32
33
  export * from "./schemas/credit-note-master/credit-note-master.interface";
34
+ export * from "./schemas/attendance-session/attendance-session.interface";
33
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,yDAAyD,CAAC;AACxE,cAAc,mDAAmD,CAAC;AAClE,cAAc,qCAAqC,CAAC;AACpD,cAAc,wDAAwD,CAAC;AACvE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sDAAsD,CAAC;AACrE,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uDAAuD,CAAC;AAEtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yCAAyC,CAAC;AACxD,cAA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AC;AAC/D,cAAc,oCAAoC,CAAC;AACnD,cAAc,oDAAoD,CAAC;AACnE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,2DAA2D,CAAC"}
package/dist/index.js CHANGED
@@ -31,6 +31,7 @@ __exportStar(require("./schemas/exchangeRate/exchange-rate.model"), exports);
31
31
  __exportStar(require("./schemas/vendors/vendor.model"), exports);
32
32
  __exportStar(require("./schemas/vendor-payables/vendor-payable.model"), exports);
33
33
  __exportStar(require("./schemas/credit-note-master/credit-note-master.model"), exports);
34
+ __exportStar(require("./schemas/attendance-session/attendance-session.model"), exports);
34
35
  // Types
35
36
  __exportStar(require("./schemas/container-meta-data/container-meta-data.type"), exports);
36
37
  __exportStar(require("./schemas/countries/countries.interface"), exports);
@@ -48,4 +49,5 @@ __exportStar(require("./schemas/exchangeRate/exchange-rate.interface"), exports)
48
49
  __exportStar(require("./schemas/vendors/vendor.interface"), exports);
49
50
  __exportStar(require("./schemas/vendor-payables/vendor-payable.interface"), exports);
50
51
  __exportStar(require("./schemas/credit-note-master/credit-note-master.interface"), exports);
52
+ __exportStar(require("./schemas/attendance-session/attendance-session.interface"), exports);
51
53
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,0FAAwE;AACxE,oFAAkE;AAClE,sEAAoD;AACpD,yFAAuE;AACvE,8EAA4D;AAC5D,8DAA4C;AAC5C,uFAAqE;AACrE,0EAAwD;AACxD,sEAAoD;AACpD,kEAAgD;AAChD,uEAAqD;AACrD,8EAA4D;AAC5D,6EAA2D;AAC3D,iEAA+C;AAC/C,iFAA+D;AAC/D,wFAAsE;AACtE,QAAQ;AACR,yFAAuE;AACvE,0EAAwD;AACxD,wFAAsE;AACtE,6FAA2E;AAC3E,kFAAgE;AAChE,kEAAgD;AAChD,2FAAyE;AACzE,8EAA4D;AAC5D,0EAAwD;AACxD,sEAAoD;AACpD,2EAAyD;AACzD,kFAAgE;AAChE,iFAA+D;AAC/D,qEAAmD;AACnD,qFAAmE;AACnE,4FAA0E"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,0FAAwE;AACxE,oFAAkE;AAClE,sEAAoD;AACpD,yFAAuE;AACvE,8EAA4D;AAC5D,8DAA4C;AAC5C,uFAAqE;AACrE,0EAAwD;AACxD,sEAAoD;AACpD,kEAAgD;AAChD,uEAAqD;AACrD,8EAA4D;AAC5D,6EAA2D;AAC3D,iEAA+C;AAC/C,iFAA+D;AAC/D,wFAAsE;AACtE,wFAAsE;AACtE,QAAQ;AACR,yFAAuE;AACvE,0EAAwD;AACxD,wFAAsE;AACtE,6FAA2E;AAC3E,kFAAgE;AAChE,kEAAgD;AAChD,2FAAyE;AACzE,8EAA4D;AAC5D,0EAAwD;AACxD,sEAAoD;AACpD,2EAAyD;AACzD,kFAAgE;AAChE,iFAA+D;AAC/D,qEAAmD;AACnD,qFAAmE;AACnE,4FAA0E;AAC1E,4FAA0E"}
@@ -0,0 +1,35 @@
1
+ import mongoose from "mongoose";
2
+ export interface IAttendanceLocation {
3
+ lat: number;
4
+ lng: number;
5
+ accuracy: number;
6
+ }
7
+ export interface IAttendanceDevice {
8
+ userAgent: string;
9
+ platform: string;
10
+ }
11
+ export interface IAttendanceSession {
12
+ _id?: mongoose.Types.ObjectId;
13
+ employeeId: mongoose.Types.ObjectId;
14
+ date: Date;
15
+ expectedStartTime: string;
16
+ expectedEndTime: string;
17
+ checkinTime: Date;
18
+ checkoutTime?: Date;
19
+ checkinLocation: IAttendanceLocation;
20
+ checkoutLocation?: IAttendanceLocation;
21
+ checkinDevice: IAttendanceDevice;
22
+ checkoutDevice?: IAttendanceDevice;
23
+ checkinIp: string;
24
+ checkoutIp?: string;
25
+ workMode: "WFO" | "WFH";
26
+ isLate: boolean;
27
+ lateByMinutes: number;
28
+ isEarlyCheckout: boolean;
29
+ earlyByMinutes: number;
30
+ effectiveMinutes: number;
31
+ status: "checked_in" | "checked_out";
32
+ createdAt?: Date;
33
+ updatedAt?: Date;
34
+ }
35
+ //# sourceMappingURL=attendance-session.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance-session.interface.d.ts","sourceRoot":"","sources":["../../../src/schemas/attendance-session/attendance-session.interface.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC9B,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACpC,IAAI,EAAE,IAAI,CAAC;IACX,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,eAAe,EAAE,mBAAmB,CAAC;IACrC,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;IACvC,aAAa,EAAE,iBAAiB,CAAC;IACjC,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,GAAG,KAAK,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,YAAY,GAAG,aAAa,CAAC;IACrC,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=attendance-session.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance-session.interface.js","sourceRoot":"","sources":["../../../src/schemas/attendance-session/attendance-session.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { Schema } from "mongoose";
2
+ import { IAttendanceSession } from "./attendance-session.interface";
3
+ export declare const attendanceSessionSchema: Schema<IAttendanceSession, import("mongoose").Model<IAttendanceSession, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IAttendanceSession>;
4
+ //# sourceMappingURL=attendance-session.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance-session.model.d.ts","sourceRoot":"","sources":["../../../src/schemas/attendance-session/attendance-session.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAA0C,MAAM,gCAAgC,CAAC;AAmB5G,eAAO,MAAM,uBAAuB,2KAqFnC,CAAC"}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.attendanceSessionSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const locationSchema = new mongoose_1.Schema({
6
+ lat: { type: Number, required: true },
7
+ lng: { type: Number, required: true },
8
+ accuracy: { type: Number, required: true },
9
+ }, { _id: false });
10
+ const deviceSchema = new mongoose_1.Schema({
11
+ userAgent: { type: String, required: true },
12
+ platform: { type: String, required: true },
13
+ }, { _id: false });
14
+ exports.attendanceSessionSchema = new mongoose_1.Schema({
15
+ employeeId: {
16
+ type: mongoose_1.Schema.Types.ObjectId,
17
+ ref: "Employee",
18
+ required: true,
19
+ },
20
+ date: {
21
+ type: Date,
22
+ required: true,
23
+ },
24
+ expectedStartTime: {
25
+ type: String,
26
+ required: true,
27
+ },
28
+ expectedEndTime: {
29
+ type: String,
30
+ required: true,
31
+ },
32
+ checkinTime: {
33
+ type: Date,
34
+ required: true,
35
+ },
36
+ checkoutTime: {
37
+ type: Date,
38
+ default: null,
39
+ },
40
+ checkinLocation: {
41
+ type: locationSchema,
42
+ required: true,
43
+ },
44
+ checkoutLocation: {
45
+ type: locationSchema,
46
+ default: null,
47
+ },
48
+ checkinDevice: {
49
+ type: deviceSchema,
50
+ required: true,
51
+ },
52
+ checkoutDevice: {
53
+ type: deviceSchema,
54
+ default: null,
55
+ },
56
+ checkinIp: {
57
+ type: String,
58
+ required: true,
59
+ },
60
+ checkoutIp: {
61
+ type: String,
62
+ default: null,
63
+ },
64
+ workMode: {
65
+ type: String,
66
+ enum: ["WFO", "WFH"],
67
+ required: true,
68
+ },
69
+ isLate: {
70
+ type: Boolean,
71
+ default: false,
72
+ },
73
+ lateByMinutes: {
74
+ type: Number,
75
+ default: 0,
76
+ },
77
+ isEarlyCheckout: {
78
+ type: Boolean,
79
+ default: false,
80
+ },
81
+ earlyByMinutes: {
82
+ type: Number,
83
+ default: 0,
84
+ },
85
+ effectiveMinutes: {
86
+ type: Number,
87
+ default: 0,
88
+ },
89
+ status: {
90
+ type: String,
91
+ enum: ["checked_in", "checked_out"],
92
+ required: true,
93
+ },
94
+ }, {
95
+ timestamps: true,
96
+ });
97
+ exports.attendanceSessionSchema.index({ employeeId: 1, date: 1 });
98
+ exports.attendanceSessionSchema.index({ employeeId: 1, status: 1 });
99
+ //# sourceMappingURL=attendance-session.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance-session.model.js","sourceRoot":"","sources":["../../../src/schemas/attendance-session/attendance-session.model.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAGlC,MAAM,cAAc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,EAAE,YAAY;QAClB,QAAQ,EAAE,IAAI;KACf;IACD,cAAc,EAAE;QACd,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,IAAI;KACd;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,KAAK;KACf;IACD,aAAa,EAAE;QACb,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,CAAC;KACX;IACD,eAAe,EAAE;QACf,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,KAAK;KACf;IACD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,CAAC;KACX;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,CAAC;KACX;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;QACnC,QAAQ,EAAE,IAAI;KACf;CACF,EACD;IACE,UAAU,EAAE,IAAI;CACjB,CACF,CAAC;AAEF,+BAAuB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AAC1D,+BAAuB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bharatbxhipment/xhipment-models-v2",
3
- "version": "1.0.64",
3
+ "version": "1.0.65",
4
4
  "description": "Mongoose schemas and TypeScript types for Xhipment application",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",