@antelopejs/interface-dms-saas 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/README.md +51 -0
- package/dist/billing.d.ts +25 -0
- package/dist/billing.js +15 -0
- package/dist/billing.js.map +1 -0
- package/dist/data-api.d.ts +1 -0
- package/dist/data-api.js +6 -0
- package/dist/data-api.js.map +1 -0
- package/dist/db/index.d.ts +2 -0
- package/dist/db/index.js +19 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/models/billingSettings.model.d.ts +22 -0
- package/dist/db/models/billingSettings.model.js +9 -0
- package/dist/db/models/billingSettings.model.js.map +1 -0
- package/dist/db/models/creditNotes.model.d.ts +25 -0
- package/dist/db/models/creditNotes.model.js +26 -0
- package/dist/db/models/creditNotes.model.js.map +1 -0
- package/dist/db/models/features.model.d.ts +22 -0
- package/dist/db/models/features.model.js +9 -0
- package/dist/db/models/features.model.js.map +1 -0
- package/dist/db/models/index.d.ts +19 -0
- package/dist/db/models/index.js +36 -0
- package/dist/db/models/index.js.map +1 -0
- package/dist/db/models/invoices.model.d.ts +29 -0
- package/dist/db/models/invoices.model.js +60 -0
- package/dist/db/models/invoices.model.js.map +1 -0
- package/dist/db/models/legalDocuments.model.d.ts +22 -0
- package/dist/db/models/legalDocuments.model.js +9 -0
- package/dist/db/models/legalDocuments.model.js.map +1 -0
- package/dist/db/models/planMigrations.model.d.ts +29 -0
- package/dist/db/models/planMigrations.model.js +70 -0
- package/dist/db/models/planMigrations.model.js.map +1 -0
- package/dist/db/models/plans.model.d.ts +31 -0
- package/dist/db/models/plans.model.js +74 -0
- package/dist/db/models/plans.model.js.map +1 -0
- package/dist/db/models/platformNotes.model.d.ts +33 -0
- package/dist/db/models/platformNotes.model.js +27 -0
- package/dist/db/models/platformNotes.model.js.map +1 -0
- package/dist/db/models/refunds.model.d.ts +23 -0
- package/dist/db/models/refunds.model.js +17 -0
- package/dist/db/models/refunds.model.js.map +1 -0
- package/dist/db/models/revision.d.ts +1 -0
- package/dist/db/models/revision.js +14 -0
- package/dist/db/models/revision.js.map +1 -0
- package/dist/db/models/segments.model.d.ts +29 -0
- package/dist/db/models/segments.model.js +81 -0
- package/dist/db/models/segments.model.js.map +1 -0
- package/dist/db/models/stripeWebhookEvents.model.d.ts +26 -0
- package/dist/db/models/stripeWebhookEvents.model.js +70 -0
- package/dist/db/models/stripeWebhookEvents.model.js.map +1 -0
- package/dist/db/models/supportMessages.model.d.ts +23 -0
- package/dist/db/models/supportMessages.model.js +17 -0
- package/dist/db/models/supportMessages.model.js.map +1 -0
- package/dist/db/models/supportTicketEvents.model.d.ts +22 -0
- package/dist/db/models/supportTicketEvents.model.js +9 -0
- package/dist/db/models/supportTicketEvents.model.js.map +1 -0
- package/dist/db/models/supportTickets.model.d.ts +25 -0
- package/dist/db/models/supportTickets.model.js +32 -0
- package/dist/db/models/supportTickets.model.js.map +1 -0
- package/dist/db/models/tenantBillingInfo.model.d.ts +24 -0
- package/dist/db/models/tenantBillingInfo.model.js +20 -0
- package/dist/db/models/tenantBillingInfo.model.js.map +1 -0
- package/dist/db/models/tenantBillingState.model.d.ts +28 -0
- package/dist/db/models/tenantBillingState.model.js +72 -0
- package/dist/db/models/tenantBillingState.model.js.map +1 -0
- package/dist/db/models/tenantSubscriptions.model.d.ts +51 -0
- package/dist/db/models/tenantSubscriptions.model.js +305 -0
- package/dist/db/models/tenantSubscriptions.model.js.map +1 -0
- package/dist/db/models/trialConsumptions.model.d.ts +24 -0
- package/dist/db/models/trialConsumptions.model.js +30 -0
- package/dist/db/models/trialConsumptions.model.js.map +1 -0
- package/dist/db/models/update-result.d.ts +1 -0
- package/dist/db/models/update-result.js +13 -0
- package/dist/db/models/update-result.js.map +1 -0
- package/dist/db/models/userSegments.model.d.ts +30 -0
- package/dist/db/models/userSegments.model.js +97 -0
- package/dist/db/models/userSegments.model.js.map +1 -0
- package/dist/db/tables/billingSettings.table.d.ts +22 -0
- package/dist/db/tables/billingSettings.table.js +73 -0
- package/dist/db/tables/billingSettings.table.js.map +1 -0
- package/dist/db/tables/creditNotes.table.d.ts +26 -0
- package/dist/db/tables/creditNotes.table.js +110 -0
- package/dist/db/tables/creditNotes.table.js.map +1 -0
- package/dist/db/tables/features.table.d.ts +18 -0
- package/dist/db/tables/features.table.js +70 -0
- package/dist/db/tables/features.table.js.map +1 -0
- package/dist/db/tables/index.d.ts +19 -0
- package/dist/db/tables/index.js +36 -0
- package/dist/db/tables/index.js.map +1 -0
- package/dist/db/tables/invoices.table.d.ts +47 -0
- package/dist/db/tables/invoices.table.js +140 -0
- package/dist/db/tables/invoices.table.js.map +1 -0
- package/dist/db/tables/legalDocuments.table.d.ts +10 -0
- package/dist/db/tables/legalDocuments.table.js +44 -0
- package/dist/db/tables/legalDocuments.table.js.map +1 -0
- package/dist/db/tables/planMigrations.table.d.ts +61 -0
- package/dist/db/tables/planMigrations.table.js +114 -0
- package/dist/db/tables/planMigrations.table.js.map +1 -0
- package/dist/db/tables/plans.table.d.ts +41 -0
- package/dist/db/tables/plans.table.js +125 -0
- package/dist/db/tables/plans.table.js.map +1 -0
- package/dist/db/tables/platformNotes.table.d.ts +13 -0
- package/dist/db/tables/platformNotes.table.js +58 -0
- package/dist/db/tables/platformNotes.table.js.map +1 -0
- package/dist/db/tables/refunds.table.d.ts +15 -0
- package/dist/db/tables/refunds.table.js +70 -0
- package/dist/db/tables/refunds.table.js.map +1 -0
- package/dist/db/tables/segments.table.d.ts +37 -0
- package/dist/db/tables/segments.table.js +79 -0
- package/dist/db/tables/segments.table.js.map +1 -0
- package/dist/db/tables/stripeWebhookEvents.table.d.ts +12 -0
- package/dist/db/tables/stripeWebhookEvents.table.js +54 -0
- package/dist/db/tables/stripeWebhookEvents.table.js.map +1 -0
- package/dist/db/tables/supportMessages.table.d.ts +14 -0
- package/dist/db/tables/supportMessages.table.js +62 -0
- package/dist/db/tables/supportMessages.table.js.map +1 -0
- package/dist/db/tables/supportTicketEvents.table.d.ts +14 -0
- package/dist/db/tables/supportTicketEvents.table.js +61 -0
- package/dist/db/tables/supportTicketEvents.table.js.map +1 -0
- package/dist/db/tables/supportTickets.table.d.ts +25 -0
- package/dist/db/tables/supportTickets.table.js +109 -0
- package/dist/db/tables/supportTickets.table.js.map +1 -0
- package/dist/db/tables/tenantBillingInfo.table.d.ts +24 -0
- package/dist/db/tables/tenantBillingInfo.table.js +62 -0
- package/dist/db/tables/tenantBillingInfo.table.js.map +1 -0
- package/dist/db/tables/tenantBillingState.table.d.ts +12 -0
- package/dist/db/tables/tenantBillingState.table.js +59 -0
- package/dist/db/tables/tenantBillingState.table.js.map +1 -0
- package/dist/db/tables/tenantSubscriptions.table.d.ts +46 -0
- package/dist/db/tables/tenantSubscriptions.table.js +157 -0
- package/dist/db/tables/tenantSubscriptions.table.js.map +1 -0
- package/dist/db/tables/trialConsumptions.table.d.ts +10 -0
- package/dist/db/tables/trialConsumptions.table.js +55 -0
- package/dist/db/tables/trialConsumptions.table.js.map +1 -0
- package/dist/db/tables/userSegments.table.d.ts +11 -0
- package/dist/db/tables/userSegments.table.js +56 -0
- package/dist/db/tables/userSegments.table.js.map +1 -0
- package/dist/hidden-filter.d.ts +1 -0
- package/dist/hidden-filter.js +10 -0
- package/dist/hidden-filter.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/invoice-line-items.d.ts +42 -0
- package/dist/invoice-line-items.js +83 -0
- package/dist/invoice-line-items.js.map +1 -0
- package/dist/page-definitions.d.ts +17 -0
- package/dist/page-definitions.js +60 -0
- package/dist/page-definitions.js.map +1 -0
- package/dist/pages.d.ts +59 -0
- package/dist/pages.js +88 -0
- package/dist/pages.js.map +1 -0
- package/dist/plans.d.ts +27 -0
- package/dist/plans.js +60 -0
- package/dist/plans.js.map +1 -0
- package/dist/provisioning.d.ts +5 -0
- package/dist/provisioning.js +3 -0
- package/dist/provisioning.js.map +1 -0
- package/dist/registration.d.ts +6 -0
- package/dist/registration.js +9 -0
- package/dist/registration.js.map +1 -0
- package/dist/workspace-lifecycle.d.ts +27 -0
- package/dist/workspace-lifecycle.js +30 -0
- package/dist/workspace-lifecycle.js.map +1 -0
- package/package.json +108 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
export declare const creditNotesTableName = "credit_notes";
|
|
3
|
+
export declare const CREDIT_NOTE_TYPES: readonly ["pre_payment", "post_payment", "credit_to_balance", "refund"];
|
|
4
|
+
export type CreditNoteType = (typeof CREDIT_NOTE_TYPES)[number];
|
|
5
|
+
export declare const CREDIT_NOTE_STATUSES: readonly ["issued", "void"];
|
|
6
|
+
export type CreditNoteStatus = (typeof CREDIT_NOTE_STATUSES)[number];
|
|
7
|
+
export declare class CreditNote extends Table {
|
|
8
|
+
_id: string;
|
|
9
|
+
invoiceId: string;
|
|
10
|
+
stripeCreditNoteId: string;
|
|
11
|
+
number: string;
|
|
12
|
+
amount: number;
|
|
13
|
+
currency: string;
|
|
14
|
+
reason: string;
|
|
15
|
+
memo: string | null;
|
|
16
|
+
type: CreditNoteType;
|
|
17
|
+
refundId: string | null;
|
|
18
|
+
hostedUrl: string | null;
|
|
19
|
+
pdfUrl: string | null;
|
|
20
|
+
status: CreditNoteStatus;
|
|
21
|
+
issuedAt: Date;
|
|
22
|
+
voidedAt: Date | null;
|
|
23
|
+
metadata: Record<string, unknown>;
|
|
24
|
+
createdAt: Date;
|
|
25
|
+
updatedAt: Date;
|
|
26
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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.CreditNote = exports.CREDIT_NOTE_STATUSES = exports.CREDIT_NOTE_TYPES = exports.creditNotesTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
15
|
+
const invoices_table_1 = require("./invoices.table");
|
|
16
|
+
const refunds_table_1 = require("./refunds.table");
|
|
17
|
+
exports.creditNotesTableName = "credit_notes";
|
|
18
|
+
exports.CREDIT_NOTE_TYPES = [
|
|
19
|
+
"pre_payment",
|
|
20
|
+
"post_payment",
|
|
21
|
+
"credit_to_balance",
|
|
22
|
+
"refund",
|
|
23
|
+
];
|
|
24
|
+
exports.CREDIT_NOTE_STATUSES = ["issued", "void"];
|
|
25
|
+
let CreditNote = class CreditNote extends interface_database_decorators_1.Table {
|
|
26
|
+
};
|
|
27
|
+
exports.CreditNote = CreditNote;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], CreditNote.prototype, "_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, interface_database_decorators_1.Index)(),
|
|
34
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
35
|
+
(0, interface_database_decorators_1.Relation)({ to: () => invoices_table_1.Invoice }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], CreditNote.prototype, "invoiceId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, interface_database_decorators_1.Index)(),
|
|
40
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], CreditNote.prototype, "stripeCreditNoteId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CreditNote.prototype, "number", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, interface_database_decorators_1.Field)("number"),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], CreditNote.prototype, "amount", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], CreditNote.prototype, "currency", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], CreditNote.prototype, "reason", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], CreditNote.prototype, "memo", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], CreditNote.prototype, "type", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
69
|
+
(0, interface_database_decorators_1.Relation)({ to: () => refunds_table_1.Refund }),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], CreditNote.prototype, "refundId", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], CreditNote.prototype, "hostedUrl", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], CreditNote.prototype, "pdfUrl", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], CreditNote.prototype, "status", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, interface_database_decorators_1.Index)(),
|
|
86
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
87
|
+
__metadata("design:type", Date)
|
|
88
|
+
], CreditNote.prototype, "issuedAt", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], CreditNote.prototype, "voidedAt", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, interface_database_decorators_1.Field)("any"),
|
|
95
|
+
__metadata("design:type", Object)
|
|
96
|
+
], CreditNote.prototype, "metadata", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, interface_database_decorators_1.CreationTime)(),
|
|
99
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
100
|
+
__metadata("design:type", Date)
|
|
101
|
+
], CreditNote.prototype, "createdAt", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, interface_database_decorators_1.UpdateTime)(),
|
|
104
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
105
|
+
__metadata("design:type", Date)
|
|
106
|
+
], CreditNote.prototype, "updatedAt", void 0);
|
|
107
|
+
exports.CreditNote = CreditNote = __decorate([
|
|
108
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.creditNotesTableName, constants_1.TENANT_SCHEMA_NAME)
|
|
109
|
+
], CreditNote);
|
|
110
|
+
//# sourceMappingURL=creditNotes.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creditNotes.table.js","sourceRoot":"","sources":["../../../src/db/tables/creditNotes.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAQmD;AACnD,mEAAyE;AACzE,qDAA2C;AAK3C,mDAAyC;AAE5B,QAAA,oBAAoB,GAAG,cAAc,CAAC;AAEtC,QAAA,iBAAiB,GAAG;IAC/B,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,QAAQ;CACA,CAAC;AAGE,QAAA,oBAAoB,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAU,CAAC;AAKzD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,qCAAK;CA6DpC,CAAA;AA7DY,gCAAU;AAEb;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;uCACI;AAKZ;IAHP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;IACf,IAAA,wCAAQ,EAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC;;6CACN;AAIlB;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;sDACmB;AAG3B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;0CACO;AAGf;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;0CACO;AAGf;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;4CACS;AAGjB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;0CACO;AAGf;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;wCACY;AAGpB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;wCACa;AAIrB;IAFP,IAAA,qCAAK,EAAC,QAAQ,CAAC;IACf,IAAA,wCAAQ,EAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,sBAAM,EAAE,CAAC;;4CACC;AAGxB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;6CACiB;AAGzB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;0CACc;AAGtB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;0CACiB;AAIzB;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACI,IAAI;4CAAC;AAGf;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;;4CACgB;AAGtB;IADP,IAAA,qCAAK,EAAC,KAAK,CAAC;;4CAC6B;AAIlC;IAFP,IAAA,4CAAY,GAAE;IACd,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;6CAAC;AAIhB;IAFP,IAAA,0CAAU,GAAE;IACZ,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;6CAAC;qBA5Db,UAAU;IADtB,IAAA,6CAAa,EAAC,4BAAoB,EAAE,8BAAkB,CAAC;GAC3C,UAAU,CA6DtB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
export declare const featuresTableName = "features";
|
|
3
|
+
export declare const FEATURE_VALUE_TYPES: readonly ["boolean", "number", "string"];
|
|
4
|
+
export type FeatureValueType = (typeof FEATURE_VALUE_TYPES)[number];
|
|
5
|
+
export declare const FEATURE_DEFAULT_ORDER = 0;
|
|
6
|
+
export declare class Feature extends Table {
|
|
7
|
+
_id: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
description: string;
|
|
10
|
+
valueType: FeatureValueType;
|
|
11
|
+
defaultValue: unknown;
|
|
12
|
+
tooltip: string | null;
|
|
13
|
+
unit: string | null;
|
|
14
|
+
isDetailRow: boolean;
|
|
15
|
+
order: number;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
updatedAt: Date;
|
|
18
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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.Feature = exports.FEATURE_DEFAULT_ORDER = exports.FEATURE_VALUE_TYPES = exports.featuresTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
15
|
+
exports.featuresTableName = "features";
|
|
16
|
+
exports.FEATURE_VALUE_TYPES = ["boolean", "number", "string"];
|
|
17
|
+
exports.FEATURE_DEFAULT_ORDER = 0;
|
|
18
|
+
let Feature = class Feature extends interface_database_decorators_1.Table {
|
|
19
|
+
};
|
|
20
|
+
exports.Feature = Feature;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Feature.prototype, "_id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], Feature.prototype, "displayName", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Feature.prototype, "description", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Feature.prototype, "valueType", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, interface_database_decorators_1.Field)("any"),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], Feature.prototype, "defaultValue", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], Feature.prototype, "tooltip", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], Feature.prototype, "unit", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, interface_database_decorators_1.Field)("boolean"),
|
|
51
|
+
__metadata("design:type", Boolean)
|
|
52
|
+
], Feature.prototype, "isDetailRow", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, interface_database_decorators_1.Field)("number"),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], Feature.prototype, "order", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, interface_database_decorators_1.CreationTime)(),
|
|
59
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
60
|
+
__metadata("design:type", Date)
|
|
61
|
+
], Feature.prototype, "createdAt", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, interface_database_decorators_1.UpdateTime)(),
|
|
64
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
65
|
+
__metadata("design:type", Date)
|
|
66
|
+
], Feature.prototype, "updatedAt", void 0);
|
|
67
|
+
exports.Feature = Feature = __decorate([
|
|
68
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.featuresTableName, constants_1.CORE_SCHEMA_NAME)
|
|
69
|
+
], Feature);
|
|
70
|
+
//# sourceMappingURL=features.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features.table.js","sourceRoot":"","sources":["../../../src/db/tables/features.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAMmD;AACnD,mEAAuE;AAE1D,QAAA,iBAAiB,GAAG,UAAU,CAAC;AAE/B,QAAA,mBAAmB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAG/D,QAAA,qBAAqB,GAAG,CAAC,CAAC;AAIhC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qCAAK;CAmCjC,CAAA;AAnCY,0BAAO;AAEV;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oCACI;AAGZ;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;4CACY;AAGpB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;4CACY;AAGpB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;0CACoB;AAG5B;IADP,IAAA,qCAAK,EAAC,KAAK,CAAC;;6CACiB;AAGtB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;wCACe;AAGvB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;qCACY;AAGpB;IADP,IAAA,qCAAK,EAAC,SAAS,CAAC;;4CACY;AAGrB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;sCACM;AAId;IAFP,IAAA,4CAAY,GAAE;IACd,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;0CAAC;AAIhB;IAFP,IAAA,0CAAU,GAAE;IACZ,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;0CAAC;kBAlCb,OAAO;IADnB,IAAA,6CAAa,EAAC,yBAAiB,EAAE,4BAAgB,CAAC;GACtC,OAAO,CAmCnB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from "./billingSettings.table";
|
|
2
|
+
export * from "./creditNotes.table";
|
|
3
|
+
export * from "./features.table";
|
|
4
|
+
export * from "./invoices.table";
|
|
5
|
+
export * from "./legalDocuments.table";
|
|
6
|
+
export * from "./planMigrations.table";
|
|
7
|
+
export * from "./plans.table";
|
|
8
|
+
export * from "./platformNotes.table";
|
|
9
|
+
export * from "./refunds.table";
|
|
10
|
+
export * from "./segments.table";
|
|
11
|
+
export * from "./stripeWebhookEvents.table";
|
|
12
|
+
export * from "./supportMessages.table";
|
|
13
|
+
export * from "./supportTicketEvents.table";
|
|
14
|
+
export * from "./supportTickets.table";
|
|
15
|
+
export * from "./tenantBillingInfo.table";
|
|
16
|
+
export * from "./tenantBillingState.table";
|
|
17
|
+
export * from "./tenantSubscriptions.table";
|
|
18
|
+
export * from "./trialConsumptions.table";
|
|
19
|
+
export * from "./userSegments.table";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./billingSettings.table"), exports);
|
|
18
|
+
__exportStar(require("./creditNotes.table"), exports);
|
|
19
|
+
__exportStar(require("./features.table"), exports);
|
|
20
|
+
__exportStar(require("./invoices.table"), exports);
|
|
21
|
+
__exportStar(require("./legalDocuments.table"), exports);
|
|
22
|
+
__exportStar(require("./planMigrations.table"), exports);
|
|
23
|
+
__exportStar(require("./plans.table"), exports);
|
|
24
|
+
__exportStar(require("./platformNotes.table"), exports);
|
|
25
|
+
__exportStar(require("./refunds.table"), exports);
|
|
26
|
+
__exportStar(require("./segments.table"), exports);
|
|
27
|
+
__exportStar(require("./stripeWebhookEvents.table"), exports);
|
|
28
|
+
__exportStar(require("./supportMessages.table"), exports);
|
|
29
|
+
__exportStar(require("./supportTicketEvents.table"), exports);
|
|
30
|
+
__exportStar(require("./supportTickets.table"), exports);
|
|
31
|
+
__exportStar(require("./tenantBillingInfo.table"), exports);
|
|
32
|
+
__exportStar(require("./tenantBillingState.table"), exports);
|
|
33
|
+
__exportStar(require("./tenantSubscriptions.table"), exports);
|
|
34
|
+
__exportStar(require("./trialConsumptions.table"), exports);
|
|
35
|
+
__exportStar(require("./userSegments.table"), exports);
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/db/tables/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,sDAAoC;AACpC,mDAAiC;AACjC,mDAAiC;AACjC,yDAAuC;AACvC,yDAAuC;AACvC,gDAA8B;AAC9B,wDAAsC;AACtC,kDAAgC;AAChC,mDAAiC;AACjC,8DAA4C;AAC5C,0DAAwC;AACxC,8DAA4C;AAC5C,yDAAuC;AACvC,4DAA0C;AAC1C,6DAA2C;AAC3C,8DAA4C;AAC5C,4DAA0C;AAC1C,uDAAqC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
export declare const invoicesTableName = "invoices";
|
|
3
|
+
export declare const INVOICE_STATUSES: readonly ["draft", "open", "paid", "void", "uncollectible"];
|
|
4
|
+
export type InvoiceStatus = (typeof INVOICE_STATUSES)[number];
|
|
5
|
+
export type BillingDocumentType = "invoice" | "credit_note";
|
|
6
|
+
export type BillingDocumentStatus = InvoiceStatus | "issued";
|
|
7
|
+
export interface InvoiceMetadata {
|
|
8
|
+
planId?: string;
|
|
9
|
+
planName?: string;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface InvoiceLine {
|
|
13
|
+
description: string;
|
|
14
|
+
quantity: number | null;
|
|
15
|
+
amount: number;
|
|
16
|
+
currency: string;
|
|
17
|
+
periodStart: Date | null;
|
|
18
|
+
periodEnd: Date | null;
|
|
19
|
+
}
|
|
20
|
+
export declare class Invoice extends Table {
|
|
21
|
+
_id: string;
|
|
22
|
+
documentType: BillingDocumentType;
|
|
23
|
+
stripeInvoiceId: string;
|
|
24
|
+
stripeCreditNoteId: string | null;
|
|
25
|
+
number: string | null;
|
|
26
|
+
parentInvoiceNumber: string | null;
|
|
27
|
+
amount: number;
|
|
28
|
+
subtotal: number;
|
|
29
|
+
tax: number;
|
|
30
|
+
total: number;
|
|
31
|
+
currency: string;
|
|
32
|
+
periodStart: Date | null;
|
|
33
|
+
periodEnd: Date | null;
|
|
34
|
+
lines: InvoiceLine[];
|
|
35
|
+
status: BillingDocumentStatus;
|
|
36
|
+
creditNoteReason: string | null;
|
|
37
|
+
creditNoteType: string | null;
|
|
38
|
+
memo: string | null;
|
|
39
|
+
hostedInvoiceUrl: string | null;
|
|
40
|
+
invoicePdfUrl: string | null;
|
|
41
|
+
metadata: InvoiceMetadata;
|
|
42
|
+
paidAt: Date | null;
|
|
43
|
+
voidedAt: Date | null;
|
|
44
|
+
issuedAt: Date;
|
|
45
|
+
createdAt: Date;
|
|
46
|
+
updatedAt: Date;
|
|
47
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
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.Invoice = exports.INVOICE_STATUSES = exports.invoicesTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
15
|
+
exports.invoicesTableName = "invoices";
|
|
16
|
+
exports.INVOICE_STATUSES = [
|
|
17
|
+
"draft",
|
|
18
|
+
"open",
|
|
19
|
+
"paid",
|
|
20
|
+
"void",
|
|
21
|
+
"uncollectible",
|
|
22
|
+
];
|
|
23
|
+
let Invoice = class Invoice extends interface_database_decorators_1.Table {
|
|
24
|
+
};
|
|
25
|
+
exports.Invoice = Invoice;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Invoice.prototype, "_id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, interface_database_decorators_1.Index)(),
|
|
32
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Invoice.prototype, "documentType", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, interface_database_decorators_1.Index)(),
|
|
37
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Invoice.prototype, "stripeInvoiceId", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, interface_database_decorators_1.Index)(),
|
|
42
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], Invoice.prototype, "stripeCreditNoteId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], Invoice.prototype, "number", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], Invoice.prototype, "parentInvoiceNumber", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, interface_database_decorators_1.Field)("number"),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], Invoice.prototype, "amount", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, interface_database_decorators_1.Field)("number"),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], Invoice.prototype, "subtotal", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, interface_database_decorators_1.Field)("number"),
|
|
63
|
+
__metadata("design:type", Number)
|
|
64
|
+
], Invoice.prototype, "tax", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, interface_database_decorators_1.Field)("number"),
|
|
67
|
+
__metadata("design:type", Number)
|
|
68
|
+
], Invoice.prototype, "total", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], Invoice.prototype, "currency", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], Invoice.prototype, "periodStart", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
79
|
+
__metadata("design:type", Object)
|
|
80
|
+
], Invoice.prototype, "periodEnd", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, interface_database_decorators_1.Field)("any"),
|
|
83
|
+
__metadata("design:type", Array)
|
|
84
|
+
], Invoice.prototype, "lines", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, interface_database_decorators_1.Index)(),
|
|
87
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], Invoice.prototype, "status", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
92
|
+
__metadata("design:type", Object)
|
|
93
|
+
], Invoice.prototype, "creditNoteReason", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
96
|
+
__metadata("design:type", Object)
|
|
97
|
+
], Invoice.prototype, "creditNoteType", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
100
|
+
__metadata("design:type", Object)
|
|
101
|
+
], Invoice.prototype, "memo", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
104
|
+
__metadata("design:type", Object)
|
|
105
|
+
], Invoice.prototype, "hostedInvoiceUrl", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
108
|
+
__metadata("design:type", Object)
|
|
109
|
+
], Invoice.prototype, "invoicePdfUrl", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, interface_database_decorators_1.Field)("any"),
|
|
112
|
+
__metadata("design:type", Object)
|
|
113
|
+
], Invoice.prototype, "metadata", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
116
|
+
__metadata("design:type", Object)
|
|
117
|
+
], Invoice.prototype, "paidAt", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
120
|
+
__metadata("design:type", Object)
|
|
121
|
+
], Invoice.prototype, "voidedAt", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, interface_database_decorators_1.Index)(),
|
|
124
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
125
|
+
__metadata("design:type", Date)
|
|
126
|
+
], Invoice.prototype, "issuedAt", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, interface_database_decorators_1.CreationTime)(),
|
|
129
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
130
|
+
__metadata("design:type", Date)
|
|
131
|
+
], Invoice.prototype, "createdAt", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, interface_database_decorators_1.UpdateTime)(),
|
|
134
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
135
|
+
__metadata("design:type", Date)
|
|
136
|
+
], Invoice.prototype, "updatedAt", void 0);
|
|
137
|
+
exports.Invoice = Invoice = __decorate([
|
|
138
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.invoicesTableName, constants_1.TENANT_SCHEMA_NAME)
|
|
139
|
+
], Invoice);
|
|
140
|
+
//# sourceMappingURL=invoices.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoices.table.js","sourceRoot":"","sources":["../../../src/db/tables/invoices.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAOmD;AACnD,mEAAyE;AAE5D,QAAA,iBAAiB,GAAG,UAAU,CAAC;AAE/B,QAAA,gBAAgB,GAAG;IAC9B,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,eAAe;CACP,CAAC;AAwBJ,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qCAAK;CAqFjC,CAAA;AArFY,0BAAO;AAEV;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oCACI;AAIZ;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;6CAC0B;AAIlC;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;gDACgB;AAIxB;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;mDAC0B;AAGlC;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;uCACc;AAGtB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oDAC2B;AAGnC;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;uCACO;AAGf;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;yCACS;AAGjB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oCACI;AAGZ;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;sCACM;AAGd;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;yCACS;AAGjB;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;;4CACmB;AAGzB;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;;0CACiB;AAGvB;IADP,IAAA,qCAAK,EAAC,KAAK,CAAC;;sCACgB;AAIrB;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;uCACsB;AAG9B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;iDACwB;AAGhC;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;+CACsB;AAG9B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;qCACY;AAGpB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;iDACwB;AAGhC;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;8CACqB;AAG7B;IADP,IAAA,qCAAK,EAAC,KAAK,CAAC;;yCACqB;AAG1B;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;;uCACc;AAGpB;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;;yCACgB;AAItB;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACI,IAAI;yCAAC;AAIf;IAFP,IAAA,4CAAY,GAAE;IACd,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;0CAAC;AAIhB;IAFP,IAAA,0CAAU,GAAE;IACZ,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;0CAAC;kBApFb,OAAO;IADnB,IAAA,6CAAa,EAAC,yBAAiB,EAAE,8BAAkB,CAAC;GACxC,OAAO,CAqFnB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
export declare const legalDocumentsTableName = "legal_documents";
|
|
3
|
+
export declare const LEGAL_DOCUMENTS_SINGLETON_ID = "singleton";
|
|
4
|
+
export declare class LegalDocuments extends Table {
|
|
5
|
+
_id: string;
|
|
6
|
+
termsOfUse: string;
|
|
7
|
+
termsAndConditions: string;
|
|
8
|
+
privacyPolicy: string;
|
|
9
|
+
updatedAt: Date;
|
|
10
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.LegalDocuments = exports.LEGAL_DOCUMENTS_SINGLETON_ID = exports.legalDocumentsTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
15
|
+
exports.legalDocumentsTableName = "legal_documents";
|
|
16
|
+
exports.LEGAL_DOCUMENTS_SINGLETON_ID = "singleton";
|
|
17
|
+
let LegalDocuments = class LegalDocuments extends interface_database_decorators_1.Table {
|
|
18
|
+
};
|
|
19
|
+
exports.LegalDocuments = LegalDocuments;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], LegalDocuments.prototype, "_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], LegalDocuments.prototype, "termsOfUse", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], LegalDocuments.prototype, "termsAndConditions", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], LegalDocuments.prototype, "privacyPolicy", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, interface_database_decorators_1.UpdateTime)(),
|
|
38
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
39
|
+
__metadata("design:type", Date)
|
|
40
|
+
], LegalDocuments.prototype, "updatedAt", void 0);
|
|
41
|
+
exports.LegalDocuments = LegalDocuments = __decorate([
|
|
42
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.legalDocumentsTableName, constants_1.CORE_SCHEMA_NAME)
|
|
43
|
+
], LegalDocuments);
|
|
44
|
+
//# sourceMappingURL=legalDocuments.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legalDocuments.table.js","sourceRoot":"","sources":["../../../src/db/tables/legalDocuments.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAKmD;AACnD,mEAAuE;AAE1D,QAAA,uBAAuB,GAAG,iBAAiB,CAAC;AAC5C,QAAA,4BAA4B,GAAG,WAAW,CAAC;AAIjD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,qCAAK;CAgBxC,CAAA;AAhBY,wCAAc;AAEjB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;2CACI;AAGZ;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;kDACW;AAGnB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;0DACmB;AAG3B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;qDACc;AAItB;IAFP,IAAA,0CAAU,GAAE;IACZ,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;iDAAC;yBAfb,cAAc;IAD1B,IAAA,6CAAa,EAAC,+BAAuB,EAAE,4BAAgB,CAAC;GAC5C,cAAc,CAgB1B"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
import { type PlanBillingMode } from "./plans.table";
|
|
3
|
+
export declare const planMigrationsTableName = "plan_migrations";
|
|
4
|
+
export declare const PLAN_MIGRATION_STATUSES: readonly ["pending", "running", "completed", "failed", "partially_failed", "reconciliation_required"];
|
|
5
|
+
export type PlanMigrationStatus = (typeof PLAN_MIGRATION_STATUSES)[number];
|
|
6
|
+
export interface PlanMigrationFailedWorkspace {
|
|
7
|
+
tenantId: string;
|
|
8
|
+
error: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PlanMigrationTarget {
|
|
11
|
+
planId: string;
|
|
12
|
+
name: string;
|
|
13
|
+
billingMode: PlanBillingMode;
|
|
14
|
+
stripePriceId: string | null;
|
|
15
|
+
permissions: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface PlanMigrationSnapshot {
|
|
18
|
+
tenantIds: string[];
|
|
19
|
+
target: PlanMigrationTarget;
|
|
20
|
+
}
|
|
21
|
+
export interface PlanMigrationTenantOutcome {
|
|
22
|
+
tenantId: string;
|
|
23
|
+
status: "running" | "succeeded" | "reconciliation_required";
|
|
24
|
+
error: string | null;
|
|
25
|
+
seatQuantity: number | null;
|
|
26
|
+
}
|
|
27
|
+
export interface PlanMigrationPermissionDiff {
|
|
28
|
+
removed: string[];
|
|
29
|
+
added: string[];
|
|
30
|
+
unchanged: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface PlanMigrationFeatureChange {
|
|
33
|
+
key: string;
|
|
34
|
+
oldValue: unknown;
|
|
35
|
+
newValue: unknown;
|
|
36
|
+
}
|
|
37
|
+
export interface PlanMigrationFeatureDiff {
|
|
38
|
+
removed: string[];
|
|
39
|
+
added: string[];
|
|
40
|
+
changed: PlanMigrationFeatureChange[];
|
|
41
|
+
}
|
|
42
|
+
export declare class PlanMigration extends Table {
|
|
43
|
+
_id: string;
|
|
44
|
+
revision?: string;
|
|
45
|
+
snapshot: PlanMigrationSnapshot | null;
|
|
46
|
+
tenantOutcomes: PlanMigrationTenantOutcome[];
|
|
47
|
+
fromPlanId: string;
|
|
48
|
+
toPlanId: string;
|
|
49
|
+
notifyMembers: boolean;
|
|
50
|
+
status: PlanMigrationStatus;
|
|
51
|
+
totalWorkspaces: number;
|
|
52
|
+
processedWorkspaces: number;
|
|
53
|
+
processedTenantIds: string[];
|
|
54
|
+
failedWorkspaces: PlanMigrationFailedWorkspace[];
|
|
55
|
+
initiatedBy: string;
|
|
56
|
+
permissionDiff: PlanMigrationPermissionDiff;
|
|
57
|
+
featureDiff: PlanMigrationFeatureDiff;
|
|
58
|
+
createdAt: Date;
|
|
59
|
+
startedAt: Date | null;
|
|
60
|
+
completedAt: Date | null;
|
|
61
|
+
}
|