@procxo/shared 1.0.3 → 1.0.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.
- package/dist/config/ormconfig.factory.d.ts.map +1 -1
- package/dist/config/ormconfig.factory.js +2 -2
- package/dist/config/ormconfig.factory.js.map +1 -1
- package/dist/core/json/core-data/permission.json +16 -32
- package/dist/database/entities/client.entity.d.ts +10 -6
- package/dist/database/entities/client.entity.d.ts.map +1 -1
- package/dist/database/entities/client.entity.js +67 -22
- package/dist/database/entities/client.entity.js.map +1 -1
- package/dist/database/entities/credit-note.entity.d.ts +3 -0
- package/dist/database/entities/credit-note.entity.d.ts.map +1 -1
- package/dist/database/entities/credit-note.entity.js +15 -0
- package/dist/database/entities/credit-note.entity.js.map +1 -1
- package/dist/database/entities/file.entity.d.ts +3 -1
- package/dist/database/entities/file.entity.d.ts.map +1 -1
- package/dist/database/entities/file.entity.js +11 -1
- package/dist/database/entities/file.entity.js.map +1 -1
- package/dist/database/entities/index.d.ts +3 -0
- package/dist/database/entities/index.d.ts.map +1 -1
- package/dist/database/entities/index.js +3 -0
- package/dist/database/entities/index.js.map +1 -1
- package/dist/database/entities/invoice.entity.d.ts +11 -8
- package/dist/database/entities/invoice.entity.d.ts.map +1 -1
- package/dist/database/entities/invoice.entity.js +131 -41
- package/dist/database/entities/invoice.entity.js.map +1 -1
- package/dist/database/entities/otp.entity.d.ts +24 -0
- package/dist/database/entities/otp.entity.d.ts.map +1 -0
- package/dist/database/entities/otp.entity.js +97 -0
- package/dist/database/entities/otp.entity.js.map +1 -0
- package/dist/database/entities/payment.entity.d.ts +8 -5
- package/dist/database/entities/payment.entity.d.ts.map +1 -1
- package/dist/database/entities/payment.entity.js +103 -23
- package/dist/database/entities/payment.entity.js.map +1 -1
- package/dist/database/entities/upload-log.entity.d.ts +1 -0
- package/dist/database/entities/upload-log.entity.d.ts.map +1 -1
- package/dist/database/entities/upload-log.entity.js +5 -0
- package/dist/database/entities/upload-log.entity.js.map +1 -1
- package/dist/database/entities/user-session-history.entity.d.ts +9 -1
- package/dist/database/entities/user-session-history.entity.d.ts.map +1 -1
- package/dist/database/entities/user-session-history.entity.js +29 -12
- package/dist/database/entities/user-session-history.entity.js.map +1 -1
- package/dist/database/entities/user.entity.d.ts +3 -0
- package/dist/database/entities/user.entity.d.ts.map +1 -1
- package/dist/database/entities/user.entity.js +15 -0
- package/dist/database/entities/user.entity.js.map +1 -1
- package/dist/database/entities/zohobooks-connection.entity.d.ts +16 -0
- package/dist/database/entities/zohobooks-connection.entity.d.ts.map +1 -0
- package/dist/database/entities/zohobooks-connection.entity.js +81 -0
- package/dist/database/entities/zohobooks-connection.entity.js.map +1 -0
- package/dist/database/entities/zohobooks-sync-log.entity.d.ts +35 -0
- package/dist/database/entities/zohobooks-sync-log.entity.d.ts.map +1 -0
- package/dist/database/entities/zohobooks-sync-log.entity.js +117 -0
- package/dist/database/entities/zohobooks-sync-log.entity.js.map +1 -0
- package/dist/database/migrations/1773212696542-Added_profileUrl_in_user_And_error_file_presigned_url_in_uploadLog.d.ts +7 -0
- package/dist/database/migrations/1773212696542-Added_profileUrl_in_user_And_error_file_presigned_url_in_uploadLog.d.ts.map +1 -0
- package/dist/database/migrations/1773212696542-Added_profileUrl_in_user_And_error_file_presigned_url_in_uploadLog.js +16 -0
- package/dist/database/migrations/1773212696542-Added_profileUrl_in_user_And_error_file_presigned_url_in_uploadLog.js.map +1 -0
- package/dist/database/migrations/1773395645993-AddedOtpEntityAndUpdateUserSessionEntity.d.ts +7 -0
- package/dist/database/migrations/1773395645993-AddedOtpEntityAndUpdateUserSessionEntity.d.ts.map +1 -0
- package/dist/database/migrations/1773395645993-AddedOtpEntityAndUpdateUserSessionEntity.js +34 -0
- package/dist/database/migrations/1773395645993-AddedOtpEntityAndUpdateUserSessionEntity.js.map +1 -0
- package/dist/database/migrations/1773397322355-AddedSystemUserName_in_UserEntity.d.ts +7 -0
- package/dist/database/migrations/1773397322355-AddedSystemUserName_in_UserEntity.d.ts.map +1 -0
- package/dist/database/migrations/1773397322355-AddedSystemUserName_in_UserEntity.js +14 -0
- package/dist/database/migrations/1773397322355-AddedSystemUserName_in_UserEntity.js.map +1 -0
- package/dist/database/migrations/1775023603725-updateClient_creditNote_file_invoice_payment_entity_and_Added_zohobookConnection_And_zohobookSync_log_entities.d.ts +7 -0
- package/dist/database/migrations/1775023603725-updateClient_creditNote_file_invoice_payment_entity_and_Added_zohobookConnection_And_zohobookSync_log_entities.d.ts.map +1 -0
- package/dist/database/migrations/1775023603725-updateClient_creditNote_file_invoice_payment_entity_and_Added_zohobookConnection_And_zohobookSync_log_entities.js +34 -0
- package/dist/database/migrations/1775023603725-updateClient_creditNote_file_invoice_payment_entity_and_Added_zohobookConnection_And_zohobookSync_log_entities.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -54,147 +54,237 @@ let Invoice = class Invoice extends base_entity_1.BaseEntity {
|
|
|
54
54
|
quickbooksId;
|
|
55
55
|
quickbooksSyncToken;
|
|
56
56
|
lastSyncedAt;
|
|
57
|
+
zohobooksId;
|
|
58
|
+
zohobooksSyncToken;
|
|
59
|
+
lastSyncedAtZoho;
|
|
57
60
|
creditNote;
|
|
58
61
|
invoiceItems;
|
|
59
62
|
};
|
|
60
63
|
exports.Invoice = Invoice;
|
|
61
64
|
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({ type:
|
|
65
|
+
(0, typeorm_1.Column)({ type: "int", name: "matter_id", nullable: true }),
|
|
63
66
|
__metadata("design:type", Number)
|
|
64
67
|
], Invoice.prototype, "matterId", void 0);
|
|
65
68
|
__decorate([
|
|
66
|
-
(0, typeorm_1.Column)({ type:
|
|
69
|
+
(0, typeorm_1.Column)({ type: "int", name: "client_id" }),
|
|
67
70
|
__metadata("design:type", Number)
|
|
68
71
|
], Invoice.prototype, "clientId", void 0);
|
|
69
72
|
__decorate([
|
|
70
|
-
(0, typeorm_1.Column)({ type:
|
|
73
|
+
(0, typeorm_1.Column)({ type: "int", name: "partner_id" }),
|
|
71
74
|
__metadata("design:type", Number)
|
|
72
75
|
], Invoice.prototype, "partnerId", void 0);
|
|
73
76
|
__decorate([
|
|
74
|
-
(0, typeorm_1.ManyToOne)(() => matter_entity_1.Matter, (matter) => matter.invoices, {
|
|
75
|
-
|
|
77
|
+
(0, typeorm_1.ManyToOne)(() => matter_entity_1.Matter, (matter) => matter.invoices, {
|
|
78
|
+
onDelete: "CASCADE",
|
|
79
|
+
onUpdate: "CASCADE",
|
|
80
|
+
}),
|
|
81
|
+
(0, typeorm_1.JoinColumn)({ name: "matter_id" }),
|
|
76
82
|
__metadata("design:type", matter_entity_1.Matter)
|
|
77
83
|
], Invoice.prototype, "matter", void 0);
|
|
78
84
|
__decorate([
|
|
79
|
-
(0, typeorm_1.ManyToOne)(() => client_entity_1.Client, (client) => client.invoices, {
|
|
80
|
-
|
|
85
|
+
(0, typeorm_1.ManyToOne)(() => client_entity_1.Client, (client) => client.invoices, {
|
|
86
|
+
onDelete: "CASCADE",
|
|
87
|
+
onUpdate: "CASCADE",
|
|
88
|
+
}),
|
|
89
|
+
(0, typeorm_1.JoinColumn)({ name: "client_id" }),
|
|
81
90
|
__metadata("design:type", client_entity_1.Client)
|
|
82
91
|
], Invoice.prototype, "client", void 0);
|
|
83
92
|
__decorate([
|
|
84
93
|
(0, typeorm_1.Column)({
|
|
85
|
-
type:
|
|
94
|
+
type: "varchar",
|
|
86
95
|
length: 20,
|
|
87
|
-
name:
|
|
96
|
+
name: "status",
|
|
88
97
|
}),
|
|
89
98
|
__metadata("design:type", String)
|
|
90
99
|
], Invoice.prototype, "status", void 0);
|
|
91
100
|
__decorate([
|
|
92
|
-
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.approvedInvoices, {
|
|
93
|
-
|
|
101
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.approvedInvoices, {
|
|
102
|
+
nullable: true,
|
|
103
|
+
onDelete: "SET NULL",
|
|
104
|
+
onUpdate: "CASCADE",
|
|
105
|
+
}),
|
|
106
|
+
(0, typeorm_1.JoinColumn)({ name: "approved_by" }),
|
|
94
107
|
__metadata("design:type", user_entity_1.User)
|
|
95
108
|
], Invoice.prototype, "approvedBy", void 0);
|
|
96
109
|
__decorate([
|
|
97
|
-
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.requestedInvoices, {
|
|
98
|
-
|
|
110
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.requestedInvoices, {
|
|
111
|
+
nullable: true,
|
|
112
|
+
onDelete: "SET NULL",
|
|
113
|
+
onUpdate: "CASCADE",
|
|
114
|
+
}),
|
|
115
|
+
(0, typeorm_1.JoinColumn)({ name: "approval_requested_by" }),
|
|
99
116
|
__metadata("design:type", user_entity_1.User)
|
|
100
117
|
], Invoice.prototype, "approvalRequestedBy", void 0);
|
|
101
118
|
__decorate([
|
|
102
|
-
(0, typeorm_1.Column)({
|
|
119
|
+
(0, typeorm_1.Column)({
|
|
120
|
+
type: "decimal",
|
|
121
|
+
precision: 10,
|
|
122
|
+
scale: 2,
|
|
123
|
+
name: "amount",
|
|
124
|
+
nullable: true,
|
|
125
|
+
}),
|
|
103
126
|
__metadata("design:type", Number)
|
|
104
127
|
], Invoice.prototype, "amount", void 0);
|
|
105
128
|
__decorate([
|
|
106
|
-
(0, typeorm_1.Column)({
|
|
129
|
+
(0, typeorm_1.Column)({
|
|
130
|
+
type: "decimal",
|
|
131
|
+
precision: 10,
|
|
132
|
+
scale: 2,
|
|
133
|
+
name: "tds_amount",
|
|
134
|
+
nullable: true,
|
|
135
|
+
}),
|
|
107
136
|
__metadata("design:type", Number)
|
|
108
137
|
], Invoice.prototype, "tdsAmount", void 0);
|
|
109
138
|
__decorate([
|
|
110
|
-
(0, typeorm_1.Column)({
|
|
139
|
+
(0, typeorm_1.Column)({
|
|
140
|
+
type: "decimal",
|
|
141
|
+
precision: 10,
|
|
142
|
+
scale: 2,
|
|
143
|
+
name: "tds_percentage",
|
|
144
|
+
nullable: true,
|
|
145
|
+
}),
|
|
111
146
|
__metadata("design:type", Number)
|
|
112
147
|
], Invoice.prototype, "tdsPercentage", void 0);
|
|
113
148
|
__decorate([
|
|
114
|
-
(0, typeorm_1.Column)({ type:
|
|
149
|
+
(0, typeorm_1.Column)({ type: "boolean", name: "is_tds_applicable", default: false }),
|
|
115
150
|
__metadata("design:type", Boolean)
|
|
116
151
|
], Invoice.prototype, "isTdsApplicable", void 0);
|
|
117
152
|
__decorate([
|
|
118
|
-
(0, typeorm_1.Column)({
|
|
153
|
+
(0, typeorm_1.Column)({
|
|
154
|
+
type: "decimal",
|
|
155
|
+
precision: 10,
|
|
156
|
+
scale: 2,
|
|
157
|
+
name: "pending_amount",
|
|
158
|
+
nullable: true,
|
|
159
|
+
}),
|
|
119
160
|
__metadata("design:type", Number)
|
|
120
161
|
], Invoice.prototype, "pendingAmount", void 0);
|
|
121
162
|
__decorate([
|
|
122
|
-
(0, typeorm_1.Column)({
|
|
163
|
+
(0, typeorm_1.Column)({
|
|
164
|
+
type: "decimal",
|
|
165
|
+
precision: 10,
|
|
166
|
+
scale: 2,
|
|
167
|
+
name: "total_amount",
|
|
168
|
+
nullable: true,
|
|
169
|
+
}),
|
|
123
170
|
__metadata("design:type", Number)
|
|
124
171
|
], Invoice.prototype, "totalAmount", void 0);
|
|
125
172
|
__decorate([
|
|
126
|
-
(0, typeorm_1.Column)({ type:
|
|
173
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true, name: "expense_details" }),
|
|
127
174
|
__metadata("design:type", String)
|
|
128
175
|
], Invoice.prototype, "expenseDetails", void 0);
|
|
129
176
|
__decorate([
|
|
130
|
-
(0, typeorm_1.Column)({ type:
|
|
177
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true, name: "custom_terms" }),
|
|
131
178
|
__metadata("design:type", String)
|
|
132
179
|
], Invoice.prototype, "customTerms", void 0);
|
|
133
180
|
__decorate([
|
|
134
|
-
(0, typeorm_1.Column)({ type:
|
|
181
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true, name: "category" }),
|
|
135
182
|
__metadata("design:type", String)
|
|
136
183
|
], Invoice.prototype, "category", void 0);
|
|
137
184
|
__decorate([
|
|
138
|
-
(0, typeorm_1.Column)({ type:
|
|
185
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true, name: "invoice_no" }),
|
|
139
186
|
__metadata("design:type", String)
|
|
140
187
|
], Invoice.prototype, "invoiceNo", void 0);
|
|
141
188
|
__decorate([
|
|
142
|
-
(0, typeorm_1.Column)({ type:
|
|
189
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true, name: "billing_date" }),
|
|
143
190
|
__metadata("design:type", Date)
|
|
144
191
|
], Invoice.prototype, "billingDate", void 0);
|
|
145
192
|
__decorate([
|
|
146
|
-
(0, typeorm_1.Column)({ type:
|
|
193
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true, name: "due_date" }),
|
|
147
194
|
__metadata("design:type", Date)
|
|
148
195
|
], Invoice.prototype, "dueDate", void 0);
|
|
149
196
|
__decorate([
|
|
150
|
-
(0, typeorm_1.Column)({ type:
|
|
197
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true, name: "pdf_url" }),
|
|
151
198
|
__metadata("design:type", String)
|
|
152
199
|
], Invoice.prototype, "pdfUrl", void 0);
|
|
153
200
|
__decorate([
|
|
154
|
-
(0, typeorm_1.Column)({ type:
|
|
201
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true, name: "file_id" }),
|
|
155
202
|
__metadata("design:type", Number)
|
|
156
203
|
], Invoice.prototype, "fileId", void 0);
|
|
157
204
|
__decorate([
|
|
158
|
-
(0, typeorm_1.Column)({
|
|
205
|
+
(0, typeorm_1.Column)({
|
|
206
|
+
type: "decimal",
|
|
207
|
+
precision: 10,
|
|
208
|
+
scale: 2,
|
|
209
|
+
nullable: true,
|
|
210
|
+
name: "tax",
|
|
211
|
+
}),
|
|
159
212
|
__metadata("design:type", Number)
|
|
160
213
|
], Invoice.prototype, "tax", void 0);
|
|
161
214
|
__decorate([
|
|
162
|
-
(0, typeorm_1.Column)({ type:
|
|
215
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true, name: "approved_at" }),
|
|
163
216
|
__metadata("design:type", Date)
|
|
164
217
|
], Invoice.prototype, "approvedAt", void 0);
|
|
165
218
|
__decorate([
|
|
166
|
-
(0, typeorm_1.Column)({ type:
|
|
219
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true, name: "paid_at" }),
|
|
167
220
|
__metadata("design:type", Date)
|
|
168
221
|
], Invoice.prototype, "paidAt", void 0);
|
|
169
222
|
__decorate([
|
|
170
|
-
(0, typeorm_1.Column)({ type:
|
|
223
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false, name: "is_draft" }),
|
|
171
224
|
__metadata("design:type", Boolean)
|
|
172
225
|
], Invoice.prototype, "isDraft", void 0);
|
|
173
226
|
__decorate([
|
|
174
|
-
(0, typeorm_1.Column)({
|
|
227
|
+
(0, typeorm_1.Column)({
|
|
228
|
+
type: "enum",
|
|
229
|
+
name: "invoice_type",
|
|
230
|
+
enum: InvoiceType,
|
|
231
|
+
nullable: true,
|
|
232
|
+
}),
|
|
175
233
|
__metadata("design:type", String)
|
|
176
234
|
], Invoice.prototype, "invoiceType", void 0);
|
|
177
235
|
__decorate([
|
|
178
236
|
(0, typeorm_1.Column)({
|
|
179
|
-
type:
|
|
237
|
+
type: "varchar",
|
|
180
238
|
length: 50,
|
|
181
|
-
default:
|
|
182
|
-
name:
|
|
239
|
+
default: "draft",
|
|
240
|
+
name: "approval_status",
|
|
183
241
|
}),
|
|
184
242
|
__metadata("design:type", String)
|
|
185
243
|
], Invoice.prototype, "approvalStatus", void 0);
|
|
186
244
|
__decorate([
|
|
187
|
-
(0, typeorm_1.Column)({
|
|
245
|
+
(0, typeorm_1.Column)({
|
|
246
|
+
type: "varchar",
|
|
247
|
+
length: 255,
|
|
248
|
+
nullable: true,
|
|
249
|
+
name: "quickbooks_id",
|
|
250
|
+
}),
|
|
188
251
|
__metadata("design:type", String)
|
|
189
252
|
], Invoice.prototype, "quickbooksId", void 0);
|
|
190
253
|
__decorate([
|
|
191
|
-
(0, typeorm_1.Column)({
|
|
254
|
+
(0, typeorm_1.Column)({
|
|
255
|
+
type: "varchar",
|
|
256
|
+
length: 50,
|
|
257
|
+
nullable: true,
|
|
258
|
+
name: "quickbooks_sync_token",
|
|
259
|
+
}),
|
|
192
260
|
__metadata("design:type", String)
|
|
193
261
|
], Invoice.prototype, "quickbooksSyncToken", void 0);
|
|
194
262
|
__decorate([
|
|
195
|
-
(0, typeorm_1.Column)({ type:
|
|
263
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true, name: "last_synced_at" }),
|
|
196
264
|
__metadata("design:type", Date)
|
|
197
265
|
], Invoice.prototype, "lastSyncedAt", void 0);
|
|
266
|
+
__decorate([
|
|
267
|
+
(0, typeorm_1.Column)({
|
|
268
|
+
type: "varchar",
|
|
269
|
+
length: 255,
|
|
270
|
+
nullable: true,
|
|
271
|
+
name: "zohobooks_id",
|
|
272
|
+
}),
|
|
273
|
+
__metadata("design:type", String)
|
|
274
|
+
], Invoice.prototype, "zohobooksId", void 0);
|
|
275
|
+
__decorate([
|
|
276
|
+
(0, typeorm_1.Column)({
|
|
277
|
+
type: "varchar",
|
|
278
|
+
length: 50,
|
|
279
|
+
nullable: true,
|
|
280
|
+
name: "zohobooks_sync_token",
|
|
281
|
+
}),
|
|
282
|
+
__metadata("design:type", String)
|
|
283
|
+
], Invoice.prototype, "zohobooksSyncToken", void 0);
|
|
284
|
+
__decorate([
|
|
285
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true, name: "last_synced_at_zoho" }),
|
|
286
|
+
__metadata("design:type", Date)
|
|
287
|
+
], Invoice.prototype, "lastSyncedAtZoho", void 0);
|
|
198
288
|
__decorate([
|
|
199
289
|
(0, typeorm_1.OneToMany)(() => credit_note_entity_1.CreditNoteEntity, (creditNote) => creditNote.invoice),
|
|
200
290
|
__metadata("design:type", credit_note_entity_1.CreditNoteEntity)
|
|
@@ -205,8 +295,8 @@ __decorate([
|
|
|
205
295
|
], Invoice.prototype, "invoiceItems", void 0);
|
|
206
296
|
exports.Invoice = Invoice = __decorate([
|
|
207
297
|
(0, typeorm_1.Entity)({ name: "invoices", schema: "core" }),
|
|
208
|
-
(0, typeorm_1.Index)(
|
|
209
|
-
(0, typeorm_1.Index)(
|
|
210
|
-
(0, typeorm_1.Index)(
|
|
298
|
+
(0, typeorm_1.Index)("idx_invoices_matter_id", ["matter"]),
|
|
299
|
+
(0, typeorm_1.Index)("idx_invoices_client_id", ["client"]),
|
|
300
|
+
(0, typeorm_1.Index)("idx_invoices_status", ["status"])
|
|
211
301
|
], Invoice);
|
|
212
302
|
//# sourceMappingURL=invoice.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.entity.js","sourceRoot":"","sources":["../../../src/database/entities/invoice.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAOiB;AACjB,mDAAyC;AACzC,mDAAyC;AACzC,+CAAqC;AACrC,+CAA2C;AAC3C,6DAAwD;AACxD,+DAAoD;AAEpD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,
|
|
1
|
+
{"version":3,"file":"invoice.entity.js","sourceRoot":"","sources":["../../../src/database/entities/invoice.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAOiB;AACjB,mDAAyC;AACzC,mDAAyC;AACzC,+CAAqC;AACrC,+CAA2C;AAC3C,6DAAwD;AACxD,+DAAoD;AAEpD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAMM,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,wBAAU;IAErC,QAAQ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AAG7B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,iCAAW,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;6CACvC;kBAlNjB,OAAO;IAJnB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC5C,IAAA,eAAK,EAAC,wBAAwB,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC3C,IAAA,eAAK,EAAC,wBAAwB,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC3C,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,QAAQ,CAAC,CAAC;GAC5B,OAAO,CAmNnB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseEntity } from './base.entity';
|
|
2
|
+
export declare enum OtpPurpose {
|
|
3
|
+
TWO_FACTOR_AUTH = "2FA"
|
|
4
|
+
}
|
|
5
|
+
export declare enum IdentifierType {
|
|
6
|
+
EMAIL = "email",
|
|
7
|
+
PHONE = "phone"
|
|
8
|
+
}
|
|
9
|
+
export declare class Otp extends BaseEntity {
|
|
10
|
+
identifier: string;
|
|
11
|
+
identifierType: IdentifierType;
|
|
12
|
+
purpose: OtpPurpose;
|
|
13
|
+
otpHash: string;
|
|
14
|
+
expiresAt: Date;
|
|
15
|
+
isUsed: boolean;
|
|
16
|
+
usedAt: Date | null;
|
|
17
|
+
userId: number | null;
|
|
18
|
+
attempts: number;
|
|
19
|
+
maxAttempts: number;
|
|
20
|
+
resendCount: number;
|
|
21
|
+
maxResends: number;
|
|
22
|
+
cooldownUntil: Date | null;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=otp.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp.entity.d.ts","sourceRoot":"","sources":["../../../src/database/entities/otp.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,oBAAY,UAAU;IACpB,eAAe,QAAQ;CACxB;AAED,oBAAY,cAAc;IACxB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AACD,qBAGa,GAAI,SAAQ,UAAU;IAE/B,UAAU,EAAE,MAAM,CAAC;IAGnB,cAAc,EAAE,cAAc,CAAC;IAG/B,OAAO,EAAE,UAAU,CAAC;IAGpB,OAAO,EAAE,MAAM,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAGhB,MAAM,EAAE,OAAO,CAAC;IAGhB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IAGpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,QAAQ,EAAE,MAAM,CAAC;IAGjB,WAAW,EAAE,MAAM,CAAC;IAGpB,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,MAAM,CAAC;IAGnB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Otp = exports.IdentifierType = exports.OtpPurpose = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const base_entity_1 = require("./base.entity");
|
|
15
|
+
var OtpPurpose;
|
|
16
|
+
(function (OtpPurpose) {
|
|
17
|
+
OtpPurpose["TWO_FACTOR_AUTH"] = "2FA";
|
|
18
|
+
})(OtpPurpose || (exports.OtpPurpose = OtpPurpose = {}));
|
|
19
|
+
var IdentifierType;
|
|
20
|
+
(function (IdentifierType) {
|
|
21
|
+
IdentifierType["EMAIL"] = "email";
|
|
22
|
+
IdentifierType["PHONE"] = "phone";
|
|
23
|
+
})(IdentifierType || (exports.IdentifierType = IdentifierType = {}));
|
|
24
|
+
let Otp = class Otp extends base_entity_1.BaseEntity {
|
|
25
|
+
identifier;
|
|
26
|
+
identifierType;
|
|
27
|
+
purpose;
|
|
28
|
+
otpHash;
|
|
29
|
+
expiresAt;
|
|
30
|
+
isUsed;
|
|
31
|
+
usedAt;
|
|
32
|
+
userId;
|
|
33
|
+
attempts;
|
|
34
|
+
maxAttempts;
|
|
35
|
+
resendCount;
|
|
36
|
+
maxResends;
|
|
37
|
+
cooldownUntil;
|
|
38
|
+
};
|
|
39
|
+
exports.Otp = Otp;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ name: 'identifier', type: 'varchar', length: 255 }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Otp.prototype, "identifier", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ name: 'identifier_type', type: 'enum', enum: IdentifierType, default: IdentifierType.EMAIL }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Otp.prototype, "identifierType", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ name: 'purpose', type: 'enum', enum: OtpPurpose }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], Otp.prototype, "purpose", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ name: 'otp_hash', type: 'varchar', length: 255 }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], Otp.prototype, "otpHash", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ name: 'expires_at', type: 'timestamp' }),
|
|
58
|
+
__metadata("design:type", Date)
|
|
59
|
+
], Otp.prototype, "expiresAt", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ name: 'is_used', default: false }),
|
|
62
|
+
__metadata("design:type", Boolean)
|
|
63
|
+
], Otp.prototype, "isUsed", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ name: 'used_at', type: 'timestamp', nullable: true }),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], Otp.prototype, "usedAt", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ name: 'user_id', type: 'int', nullable: true }),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], Otp.prototype, "userId", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ name: 'attempts', type: 'int', default: 0 }),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], Otp.prototype, "attempts", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ name: 'max_attempts', type: 'int', default: 5 }),
|
|
78
|
+
__metadata("design:type", Number)
|
|
79
|
+
], Otp.prototype, "maxAttempts", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ name: 'resend_count', type: 'int', default: 0 }),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], Otp.prototype, "resendCount", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ name: 'max_resends', type: 'int', default: 3 }),
|
|
86
|
+
__metadata("design:type", Number)
|
|
87
|
+
], Otp.prototype, "maxResends", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ name: 'cooldown_until', type: 'timestamp', nullable: true }),
|
|
90
|
+
__metadata("design:type", Object)
|
|
91
|
+
], Otp.prototype, "cooldownUntil", void 0);
|
|
92
|
+
exports.Otp = Otp = __decorate([
|
|
93
|
+
(0, typeorm_1.Entity)({ name: 'otps', schema: 'user' }),
|
|
94
|
+
(0, typeorm_1.Index)(['identifier', 'purpose', 'isUsed'], { where: 'is_deleted = false' }),
|
|
95
|
+
(0, typeorm_1.Index)(['expiresAt'], { where: 'is_deleted = false' })
|
|
96
|
+
], Otp);
|
|
97
|
+
//# sourceMappingURL=otp.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp.entity.js","sourceRoot":"","sources":["../../../src/database/entities/otp.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAgD;AAChD,+CAA2C;AAM3C,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,qCAAuB,CAAA;AACzB,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAIM,IAAM,GAAG,GAAT,MAAM,GAAI,SAAQ,wBAAU;IAE/B,UAAU,CAAS;IAGnB,cAAc,CAAiB;IAG/B,OAAO,CAAa;IAGpB,OAAO,CAAS;IAGhB,SAAS,CAAO;IAGhB,MAAM,CAAU;IAGhB,MAAM,CAAc;IAGpB,MAAM,CAAgB;IAGtB,QAAQ,CAAS;IAGjB,WAAW,CAAS;IAGpB,WAAW,CAAS;IAGpB,UAAU,CAAS;IAGnB,aAAa,CAAc;CAC9B,CAAA;AAvCY,kBAAG;AAEZ;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;uCAC1C;AAGnB;IADC,IAAA,gBAAM,EA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IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uCACtC;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC3C;cAtClB,GAAG;IAHf,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACxC,IAAA,eAAK,EAAC,CAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC3E,IAAA,eAAK,EAAC,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;GACzC,GAAG,CAuCf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseEntity } from
|
|
2
|
-
import { Invoice } from
|
|
3
|
-
import { User } from
|
|
1
|
+
import { BaseEntity } from "./base.entity";
|
|
2
|
+
import { Invoice } from "./invoice.entity";
|
|
3
|
+
import { User } from "./user.entity";
|
|
4
4
|
export declare class Payment extends BaseEntity {
|
|
5
5
|
invoiceId: number;
|
|
6
6
|
amount: number;
|
|
@@ -14,12 +14,15 @@ export declare class Payment extends BaseEntity {
|
|
|
14
14
|
tdsAmount: number;
|
|
15
15
|
tdsPercentage: number;
|
|
16
16
|
totalPaymentRecorded: number;
|
|
17
|
-
paymentMode:
|
|
18
|
-
paymentStatus:
|
|
17
|
+
paymentMode: "Bank Transfer" | "Card" | "Cash" | "Cheque";
|
|
18
|
+
paymentStatus: "Partially Paid" | "Full Payment" | "Overdue" | "Cancelled" | "Refunded";
|
|
19
19
|
invoiceNo: string;
|
|
20
20
|
quickbooksId: string;
|
|
21
21
|
quickbooksSyncToken: string;
|
|
22
22
|
lastSyncedAt: Date;
|
|
23
|
+
zohobooksId: string;
|
|
24
|
+
zohobooksSyncToken: string;
|
|
25
|
+
lastSyncedAtZoho: Date;
|
|
23
26
|
user: User;
|
|
24
27
|
invoice: Invoice;
|
|
25
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.entity.d.ts","sourceRoot":"","sources":["../../../src/database/entities/payment.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,
|
|
1
|
+
{"version":3,"file":"payment.entity.d.ts","sourceRoot":"","sources":["../../../src/database/entities/payment.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,qBAKa,OAAQ,SAAQ,UAAU;IAErC,SAAS,EAAE,MAAM,CAAC;IASlB,MAAM,EAAE,MAAM,CAAC;IAGf,WAAW,EAAE,IAAI,CAAC;IAGlB,WAAW,EAAE,MAAM,CAAC;IAQpB,0BAA0B,EAAE,MAAM,CAAC;IAQnC,iBAAiB,EAAE,MAAM,CAAC;IAQ1B,aAAa,EAAE,MAAM,CAAC;IAStB,cAAc,EAAE,MAAM,CAAC;IAGvB,eAAe,EAAE,OAAO,CAAC;IASzB,SAAS,EAAE,MAAM,CAAC;IASlB,aAAa,EAAE,MAAM,CAAC;IAStB,oBAAoB,EAAE,MAAM,CAAC;IAG7B,WAAW,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IAG1D,aAAa,EACT,gBAAgB,GAChB,cAAc,GACd,SAAS,GACT,WAAW,GACX,UAAU,CAAC;IAGf,SAAS,EAAE,MAAM,CAAC;IASlB,YAAY,EAAE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