@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 @@
|
|
|
1
|
+
{"version":3,"file":"stripeWebhookEvents.table.js","sourceRoot":"","sources":["../../../src/db/tables/stripeWebhookEvents.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAKmD;AACnD,mEAAuE;AAE1D,QAAA,4BAA4B,GAAG,uBAAuB,CAAC;AAEvD,QAAA,eAAe,GAAG;IAC7B,SAAS;IACT,SAAS;IACT,QAAQ;IACR,SAAS;IACT,yBAAyB;CACjB,CAAC;AAKJ,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,qCAAK;CAmB5C,CAAA;AAnBY,gDAAkB;AAErB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;+CACI;AAGZ;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;gDACK;AAIb;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACO,IAAI;uDAAC;AAGlB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;kDACc;AAGtB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;wDACoB;AAG5B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oDACU;6BAlBf,kBAAkB;IAD9B,IAAA,6CAAa,EAAC,oCAA4B,EAAE,4BAAgB,CAAC;GACjD,kBAAkB,CAmB9B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
export declare const supportMessagesTableName = "support_messages";
|
|
3
|
+
export declare const SUPPORT_MESSAGE_ORDER_INDEX = "ticket_message_order";
|
|
4
|
+
export declare const SUPPORT_MESSAGE_AUTHOR_TYPES: readonly ["tenant", "platform"];
|
|
5
|
+
export type SupportMessageAuthorType = (typeof SUPPORT_MESSAGE_AUTHOR_TYPES)[number];
|
|
6
|
+
export declare class SupportMessage extends Table {
|
|
7
|
+
ticketId: string;
|
|
8
|
+
authorId: string;
|
|
9
|
+
authorType: SupportMessageAuthorType;
|
|
10
|
+
body: string;
|
|
11
|
+
attachments: string[];
|
|
12
|
+
createdAt: Date;
|
|
13
|
+
_id: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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.SupportMessage = exports.SUPPORT_MESSAGE_AUTHOR_TYPES = exports.SUPPORT_MESSAGE_ORDER_INDEX = exports.supportMessagesTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
15
|
+
const users_table_1 = require("@antelopejs/interface-dms/auth/db/tables/users.table");
|
|
16
|
+
const supportTickets_table_1 = require("./supportTickets.table");
|
|
17
|
+
exports.supportMessagesTableName = "support_messages";
|
|
18
|
+
exports.SUPPORT_MESSAGE_ORDER_INDEX = "ticket_message_order";
|
|
19
|
+
exports.SUPPORT_MESSAGE_AUTHOR_TYPES = ["tenant", "platform"];
|
|
20
|
+
let SupportMessage = class SupportMessage extends interface_database_decorators_1.Table {
|
|
21
|
+
};
|
|
22
|
+
exports.SupportMessage = SupportMessage;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, interface_database_decorators_1.Index)(),
|
|
25
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_MESSAGE_ORDER_INDEX }),
|
|
26
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
27
|
+
(0, interface_database_decorators_1.Relation)({ to: () => supportTickets_table_1.SupportTicket }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], SupportMessage.prototype, "ticketId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, interface_database_decorators_1.Index)(),
|
|
32
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
33
|
+
(0, interface_database_decorators_1.Relation)({ to: () => users_table_1.User }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], SupportMessage.prototype, "authorId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], SupportMessage.prototype, "authorType", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], SupportMessage.prototype, "body", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, interface_database_decorators_1.Field)(["string"]),
|
|
46
|
+
__metadata("design:type", Array)
|
|
47
|
+
], SupportMessage.prototype, "attachments", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, interface_database_decorators_1.Index)(),
|
|
50
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_MESSAGE_ORDER_INDEX }),
|
|
51
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
52
|
+
__metadata("design:type", Date)
|
|
53
|
+
], SupportMessage.prototype, "createdAt", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_MESSAGE_ORDER_INDEX }),
|
|
56
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], SupportMessage.prototype, "_id", void 0);
|
|
59
|
+
exports.SupportMessage = SupportMessage = __decorate([
|
|
60
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.supportMessagesTableName, constants_1.TENANT_SCHEMA_NAME)
|
|
61
|
+
], SupportMessage);
|
|
62
|
+
//# sourceMappingURL=supportMessages.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supportMessages.table.js","sourceRoot":"","sources":["../../../src/db/tables/supportMessages.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAMmD;AACnD,mEAAyE;AACzE,sFAA4E;AAC5E,iEAAuD;AAE1C,QAAA,wBAAwB,GAAG,kBAAkB,CAAC;AAC9C,QAAA,2BAA2B,GAAG,sBAAsB,CAAC;AAErD,QAAA,4BAA4B,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAU,CAAC;AAMrE,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,qCAAK;CA8BxC,CAAA;AA9BY,wCAAc;AAKjB;IAJP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,mCAA2B,EAAE,CAAC;IAC7C,IAAA,qCAAK,EAAC,QAAQ,CAAC;IACf,IAAA,wCAAQ,EAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,oCAAa,EAAE,CAAC;;gDACb;AAKjB;IAHP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;IACf,IAAA,wCAAQ,EAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC;;gDACJ;AAGjB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;kDAC6B;AAGrC;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;4CACK;AAGb;IADP,IAAA,qCAAK,EAAC,CAAC,QAAQ,CAAC,CAAC;;mDACY;AAMtB;IAHP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,mCAA2B,EAAE,CAAC;IAC7C,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;iDAAC;AAIhB;IAFP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,mCAA2B,EAAE,CAAC;IAC7C,IAAA,qCAAK,EAAC,QAAQ,CAAC;;2CACI;yBA7BT,cAAc;IAD1B,IAAA,6CAAa,EAAC,gCAAwB,EAAE,8BAAkB,CAAC;GAC/C,cAAc,CA8B1B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
export declare const supportTicketEventsTableName = "support_ticket_events";
|
|
3
|
+
export declare const SUPPORT_EVENT_ORDER_INDEX = "ticket_event_order";
|
|
4
|
+
export type SupportTicketEventType = "status_changed" | "assignment_changed";
|
|
5
|
+
export declare class SupportTicketEvent extends Table {
|
|
6
|
+
ticketId: string;
|
|
7
|
+
createdAt: Date;
|
|
8
|
+
_id: string;
|
|
9
|
+
actorId: string;
|
|
10
|
+
actorName: string;
|
|
11
|
+
type: SupportTicketEventType;
|
|
12
|
+
previousValue: string | null;
|
|
13
|
+
newValue: string | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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.SupportTicketEvent = exports.SUPPORT_EVENT_ORDER_INDEX = exports.supportTicketEventsTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
15
|
+
const supportTickets_table_1 = require("./supportTickets.table");
|
|
16
|
+
exports.supportTicketEventsTableName = "support_ticket_events";
|
|
17
|
+
exports.SUPPORT_EVENT_ORDER_INDEX = "ticket_event_order";
|
|
18
|
+
let SupportTicketEvent = class SupportTicketEvent extends interface_database_decorators_1.Table {
|
|
19
|
+
};
|
|
20
|
+
exports.SupportTicketEvent = SupportTicketEvent;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, interface_database_decorators_1.Index)(),
|
|
23
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_EVENT_ORDER_INDEX }),
|
|
24
|
+
(0, interface_database_decorators_1.Relation)({ to: () => supportTickets_table_1.SupportTicket }),
|
|
25
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], SupportTicketEvent.prototype, "ticketId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_EVENT_ORDER_INDEX }),
|
|
30
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
31
|
+
__metadata("design:type", Date)
|
|
32
|
+
], SupportTicketEvent.prototype, "createdAt", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_EVENT_ORDER_INDEX }),
|
|
35
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], SupportTicketEvent.prototype, "_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], SupportTicketEvent.prototype, "actorId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], SupportTicketEvent.prototype, "actorName", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], SupportTicketEvent.prototype, "type", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], SupportTicketEvent.prototype, "previousValue", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], SupportTicketEvent.prototype, "newValue", void 0);
|
|
58
|
+
exports.SupportTicketEvent = SupportTicketEvent = __decorate([
|
|
59
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.supportTicketEventsTableName, constants_1.TENANT_SCHEMA_NAME)
|
|
60
|
+
], SupportTicketEvent);
|
|
61
|
+
//# sourceMappingURL=supportTicketEvents.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supportTicketEvents.table.js","sourceRoot":"","sources":["../../../src/db/tables/supportTicketEvents.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAMmD;AACnD,mEAAyE;AACzE,iEAAuD;AAE1C,QAAA,4BAA4B,GAAG,uBAAuB,CAAC;AACvD,QAAA,yBAAyB,GAAG,oBAAoB,CAAC;AAKvD,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,qCAAK;CA8B5C,CAAA;AA9BY,gDAAkB;AAKrB;IAJP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,iCAAyB,EAAE,CAAC;IAC3C,IAAA,wCAAQ,EAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,oCAAa,EAAE,CAAC;IACrC,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oDACS;AAKjB;IAFP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,iCAAyB,EAAE,CAAC;IAC3C,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;qDAAC;AAIhB;IAFP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,iCAAyB,EAAE,CAAC;IAC3C,IAAA,qCAAK,EAAC,QAAQ,CAAC;;+CACI;AAGZ;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;mDACQ;AAGhB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;qDACU;AAGlB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;gDACqB;AAG7B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;yDACqB;AAG7B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oDACgB;6BA7BrB,kBAAkB;IAD9B,IAAA,6CAAa,EAAC,oCAA4B,EAAE,8BAAkB,CAAC;GACnD,kBAAkB,CA8B9B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
export declare const supportTicketsTableName = "support_tickets";
|
|
3
|
+
export declare const SUPPORT_TICKET_ORDER_INDEX = "ticket_recent_order";
|
|
4
|
+
export declare const SUPPORT_TICKET_STATUS_ORDER_INDEX = "ticket_status_recent_order";
|
|
5
|
+
export declare const SUPPORT_TICKET_CATEGORIES: readonly ["question", "incident", "billing", "feature_request"];
|
|
6
|
+
export type SupportTicketCategory = (typeof SUPPORT_TICKET_CATEGORIES)[number];
|
|
7
|
+
export declare const SUPPORT_TICKET_PRIORITIES: readonly ["low", "normal", "high", "urgent"];
|
|
8
|
+
export type SupportTicketPriority = (typeof SUPPORT_TICKET_PRIORITIES)[number];
|
|
9
|
+
export declare const SUPPORT_TICKET_STATUSES: readonly ["open", "in_progress", "waiting_customer", "resolved", "closed"];
|
|
10
|
+
export type SupportTicketStatus = (typeof SUPPORT_TICKET_STATUSES)[number];
|
|
11
|
+
export declare class SupportTicket extends Table {
|
|
12
|
+
subject: string;
|
|
13
|
+
category: SupportTicketCategory;
|
|
14
|
+
priority: SupportTicketPriority;
|
|
15
|
+
status: SupportTicketStatus;
|
|
16
|
+
createdBy: string;
|
|
17
|
+
assignedTo: string | null;
|
|
18
|
+
revision: number;
|
|
19
|
+
mutationId: string;
|
|
20
|
+
publicationId?: string | null;
|
|
21
|
+
lastMessageAt: Date;
|
|
22
|
+
_id: string;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
updatedAt: Date;
|
|
25
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
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.SupportTicket = exports.SUPPORT_TICKET_STATUSES = exports.SUPPORT_TICKET_PRIORITIES = exports.SUPPORT_TICKET_CATEGORIES = exports.SUPPORT_TICKET_STATUS_ORDER_INDEX = exports.SUPPORT_TICKET_ORDER_INDEX = exports.supportTicketsTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
15
|
+
const users_table_1 = require("@antelopejs/interface-dms/auth/db/tables/users.table");
|
|
16
|
+
exports.supportTicketsTableName = "support_tickets";
|
|
17
|
+
exports.SUPPORT_TICKET_ORDER_INDEX = "ticket_recent_order";
|
|
18
|
+
exports.SUPPORT_TICKET_STATUS_ORDER_INDEX = "ticket_status_recent_order";
|
|
19
|
+
exports.SUPPORT_TICKET_CATEGORIES = [
|
|
20
|
+
"question",
|
|
21
|
+
"incident",
|
|
22
|
+
"billing",
|
|
23
|
+
"feature_request",
|
|
24
|
+
];
|
|
25
|
+
exports.SUPPORT_TICKET_PRIORITIES = [
|
|
26
|
+
"low",
|
|
27
|
+
"normal",
|
|
28
|
+
"high",
|
|
29
|
+
"urgent",
|
|
30
|
+
];
|
|
31
|
+
exports.SUPPORT_TICKET_STATUSES = [
|
|
32
|
+
"open",
|
|
33
|
+
"in_progress",
|
|
34
|
+
"waiting_customer",
|
|
35
|
+
"resolved",
|
|
36
|
+
"closed",
|
|
37
|
+
];
|
|
38
|
+
let SupportTicket = class SupportTicket extends interface_database_decorators_1.Table {
|
|
39
|
+
};
|
|
40
|
+
exports.SupportTicket = SupportTicket;
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], SupportTicket.prototype, "subject", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, interface_database_decorators_1.Index)(),
|
|
47
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], SupportTicket.prototype, "category", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, interface_database_decorators_1.Index)(),
|
|
52
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], SupportTicket.prototype, "priority", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, interface_database_decorators_1.Index)(),
|
|
57
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_TICKET_STATUS_ORDER_INDEX }),
|
|
58
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], SupportTicket.prototype, "status", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, interface_database_decorators_1.Index)(),
|
|
63
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
64
|
+
(0, interface_database_decorators_1.Relation)({ to: () => users_table_1.User }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], SupportTicket.prototype, "createdBy", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, interface_database_decorators_1.Index)(),
|
|
69
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
70
|
+
(0, interface_database_decorators_1.Relation)({ to: () => users_table_1.User }),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], SupportTicket.prototype, "assignedTo", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, interface_database_decorators_1.Field)("number"),
|
|
75
|
+
__metadata("design:type", Number)
|
|
76
|
+
], SupportTicket.prototype, "revision", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], SupportTicket.prototype, "mutationId", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
83
|
+
__metadata("design:type", Object)
|
|
84
|
+
], SupportTicket.prototype, "publicationId", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, interface_database_decorators_1.Index)(),
|
|
87
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_TICKET_ORDER_INDEX }),
|
|
88
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_TICKET_STATUS_ORDER_INDEX }),
|
|
89
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
90
|
+
__metadata("design:type", Date)
|
|
91
|
+
], SupportTicket.prototype, "lastMessageAt", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_TICKET_ORDER_INDEX }),
|
|
94
|
+
(0, interface_database_decorators_1.Index)({ group: exports.SUPPORT_TICKET_STATUS_ORDER_INDEX }),
|
|
95
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], SupportTicket.prototype, "_id", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
100
|
+
__metadata("design:type", Date)
|
|
101
|
+
], SupportTicket.prototype, "createdAt", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
104
|
+
__metadata("design:type", Date)
|
|
105
|
+
], SupportTicket.prototype, "updatedAt", void 0);
|
|
106
|
+
exports.SupportTicket = SupportTicket = __decorate([
|
|
107
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.supportTicketsTableName, constants_1.TENANT_SCHEMA_NAME)
|
|
108
|
+
], SupportTicket);
|
|
109
|
+
//# sourceMappingURL=supportTickets.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supportTickets.table.js","sourceRoot":"","sources":["../../../src/db/tables/supportTickets.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAMmD;AACnD,mEAAyE;AACzE,sFAA4E;AAE/D,QAAA,uBAAuB,GAAG,iBAAiB,CAAC;AAC5C,QAAA,0BAA0B,GAAG,qBAAqB,CAAC;AACnD,QAAA,iCAAiC,GAAG,4BAA4B,CAAC;AAEjE,QAAA,yBAAyB,GAAG;IACvC,UAAU;IACV,UAAU;IACV,SAAS;IACT,iBAAiB;CACT,CAAC;AAGE,QAAA,yBAAyB,GAAG;IACvC,KAAK;IACL,QAAQ;IACR,MAAM;IACN,QAAQ;CACA,CAAC;AAGE,QAAA,uBAAuB,GAAG;IACrC,MAAM;IACN,aAAa;IACb,kBAAkB;IAClB,UAAU;IACV,QAAQ;CACA,CAAC;AAKJ,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,qCAAK;CAqDvC,CAAA;AArDY,sCAAa;AAEhB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;8CACQ;AAIhB;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;+CACwB;AAIhC;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;+CACwB;AAKhC;IAHP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,yCAAiC,EAAE,CAAC;IACnD,IAAA,qCAAK,EAAC,QAAQ,CAAC;;6CACoB;AAK5B;IAHP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;IACf,IAAA,wCAAQ,EAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC;;gDACH;AAKlB;IAHP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;IACf,IAAA,wCAAQ,EAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC;;iDACK;AAG1B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;+CACS;AAGjB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;iDACW;AAGnB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oDACsB;AAM9B;IAJP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,kCAA0B,EAAE,CAAC;IAC5C,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,yCAAiC,EAAE,CAAC;IACnD,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACS,IAAI;oDAAC;AAKpB;IAHP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,kCAA0B,EAAE,CAAC;IAC5C,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,yCAAiC,EAAE,CAAC;IACnD,IAAA,qCAAK,EAAC,QAAQ,CAAC;;0CACI;AAIZ;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;gDAAC;AAGhB;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;gDAAC;wBApDb,aAAa;IADzB,IAAA,6CAAa,EAAC,+BAAuB,EAAE,8BAAkB,CAAC;GAC9C,aAAa,CAqDzB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
export declare const tenantBillingInfoTableName = "tenant_billing_info";
|
|
3
|
+
export declare const TENANT_CUSTOMER_TYPES: readonly ["individual", "business"];
|
|
4
|
+
export type TenantCustomerType = (typeof TENANT_CUSTOMER_TYPES)[number];
|
|
5
|
+
export declare const VAT_VERIFICATION_STATUSES: readonly ["pending", "verified", "unverified"];
|
|
6
|
+
export type VatVerificationStatus = (typeof VAT_VERIFICATION_STATUSES)[number];
|
|
7
|
+
export interface TenantBillingAddress {
|
|
8
|
+
line1: string | null;
|
|
9
|
+
line2: string | null;
|
|
10
|
+
postalCode: string | null;
|
|
11
|
+
city: string | null;
|
|
12
|
+
state: string | null;
|
|
13
|
+
country: string | null;
|
|
14
|
+
}
|
|
15
|
+
export declare class TenantBillingInfo extends Table {
|
|
16
|
+
_id: string;
|
|
17
|
+
customerType: TenantCustomerType | null;
|
|
18
|
+
companyName: string | null;
|
|
19
|
+
vatNumber: string | null;
|
|
20
|
+
vatVerificationStatus: VatVerificationStatus | null;
|
|
21
|
+
billingEmail: string | null;
|
|
22
|
+
address: TenantBillingAddress | null;
|
|
23
|
+
updatedAt: Date;
|
|
24
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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.TenantBillingInfo = exports.VAT_VERIFICATION_STATUSES = exports.TENANT_CUSTOMER_TYPES = exports.tenantBillingInfoTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
15
|
+
exports.tenantBillingInfoTableName = "tenant_billing_info";
|
|
16
|
+
exports.TENANT_CUSTOMER_TYPES = ["individual", "business"];
|
|
17
|
+
exports.VAT_VERIFICATION_STATUSES = [
|
|
18
|
+
"pending",
|
|
19
|
+
"verified",
|
|
20
|
+
"unverified",
|
|
21
|
+
];
|
|
22
|
+
let TenantBillingInfo = class TenantBillingInfo extends interface_database_decorators_1.Table {
|
|
23
|
+
};
|
|
24
|
+
exports.TenantBillingInfo = TenantBillingInfo;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], TenantBillingInfo.prototype, "_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], TenantBillingInfo.prototype, "customerType", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], TenantBillingInfo.prototype, "companyName", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], TenantBillingInfo.prototype, "vatNumber", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], TenantBillingInfo.prototype, "vatVerificationStatus", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], TenantBillingInfo.prototype, "billingEmail", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, interface_database_decorators_1.Field)("any"),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], TenantBillingInfo.prototype, "address", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, interface_database_decorators_1.Index)(),
|
|
55
|
+
(0, interface_database_decorators_1.UpdateTime)(),
|
|
56
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
57
|
+
__metadata("design:type", Date)
|
|
58
|
+
], TenantBillingInfo.prototype, "updatedAt", void 0);
|
|
59
|
+
exports.TenantBillingInfo = TenantBillingInfo = __decorate([
|
|
60
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.tenantBillingInfoTableName, constants_1.TENANT_SCHEMA_NAME)
|
|
61
|
+
], TenantBillingInfo);
|
|
62
|
+
//# sourceMappingURL=tenantBillingInfo.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenantBillingInfo.table.js","sourceRoot":"","sources":["../../../src/db/tables/tenantBillingInfo.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAMmD;AACnD,mEAAyE;AAE5D,QAAA,0BAA0B,GAAG,qBAAqB,CAAC;AAEnD,QAAA,qBAAqB,GAAG,CAAC,YAAY,EAAE,UAAU,CAAU,CAAC;AAG5D,QAAA,yBAAyB,GAAG;IACvC,SAAS;IACT,UAAU;IACV,YAAY;CACJ,CAAC;AAcJ,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,qCAAK;CA0B3C,CAAA;AA1BY,8CAAiB;AAEpB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;8CACI;AAGZ;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;uDACgC;AAGxC;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;sDACmB;AAG3B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oDACiB;AAGzB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;gEAC4C;AAGpD;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;uDACoB;AAG5B;IADP,IAAA,qCAAK,EAAC,KAAK,CAAC;;kDACgC;AAKrC;IAHP,IAAA,qCAAK,GAAE;IACP,IAAA,0CAAU,GAAE;IACZ,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;oDAAC;4BAzBb,iBAAiB;IAD7B,IAAA,6CAAa,EAAC,kCAA0B,EAAE,8BAAkB,CAAC;GACjD,iBAAiB,CA0B7B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
export declare const tenantBillingStateTableName = "tenant_billing_state";
|
|
3
|
+
export declare const BILLING_STATES: readonly ["free", "active", "trialing", "past_due", "suspended", "cancelled", "pending_payment"];
|
|
4
|
+
export type BillingState = (typeof BILLING_STATES)[number];
|
|
5
|
+
export declare class TenantBillingState extends Table {
|
|
6
|
+
_id: string;
|
|
7
|
+
tenantId: string;
|
|
8
|
+
billingState: BillingState;
|
|
9
|
+
updatedAt: Date;
|
|
10
|
+
revision: string;
|
|
11
|
+
deletedAt: Date | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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.TenantBillingState = exports.BILLING_STATES = exports.tenantBillingStateTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
15
|
+
const tenants_table_1 = require("@antelopejs/interface-dms/db/tables/tenants.table");
|
|
16
|
+
exports.tenantBillingStateTableName = "tenant_billing_state";
|
|
17
|
+
exports.BILLING_STATES = [
|
|
18
|
+
"free",
|
|
19
|
+
"active",
|
|
20
|
+
"trialing",
|
|
21
|
+
"past_due",
|
|
22
|
+
"suspended",
|
|
23
|
+
"cancelled",
|
|
24
|
+
"pending_payment",
|
|
25
|
+
];
|
|
26
|
+
let TenantBillingState = class TenantBillingState extends interface_database_decorators_1.Table {
|
|
27
|
+
};
|
|
28
|
+
exports.TenantBillingState = TenantBillingState;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], TenantBillingState.prototype, "_id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, interface_database_decorators_1.Index)(),
|
|
35
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
36
|
+
(0, interface_database_decorators_1.Relation)({ to: () => tenants_table_1.Tenant }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], TenantBillingState.prototype, "tenantId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, interface_database_decorators_1.Index)(),
|
|
41
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], TenantBillingState.prototype, "billingState", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
46
|
+
__metadata("design:type", Date)
|
|
47
|
+
], TenantBillingState.prototype, "updatedAt", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], TenantBillingState.prototype, "revision", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], TenantBillingState.prototype, "deletedAt", void 0);
|
|
56
|
+
exports.TenantBillingState = TenantBillingState = __decorate([
|
|
57
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.tenantBillingStateTableName, constants_1.CORE_SCHEMA_NAME)
|
|
58
|
+
], TenantBillingState);
|
|
59
|
+
//# sourceMappingURL=tenantBillingState.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenantBillingState.table.js","sourceRoot":"","sources":["../../../src/db/tables/tenantBillingState.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAMmD;AACnD,mEAAuE;AACvE,qFAA2E;AAE9D,QAAA,2BAA2B,GAAG,sBAAsB,CAAC;AAErD,QAAA,cAAc,GAAG;IAC5B,MAAM;IACN,QAAQ;IACR,UAAU;IACV,UAAU;IACV,WAAW;IACX,WAAW;IACX,iBAAiB;CACT,CAAC;AAKJ,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,qCAAK;CAsB5C,CAAA;AAtBY,gDAAkB;AAErB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;+CACI;AAKZ;IAHP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;IACf,IAAA,wCAAQ,EAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,sBAAM,EAAE,CAAC;;oDACN;AAIjB;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;wDACmB;AAG3B;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;qDAAC;AAGhB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oDACS;AAIjB;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;;qDACiB;6BArBpB,kBAAkB;IAD9B,IAAA,6CAAa,EAAC,mCAA2B,EAAE,4BAAgB,CAAC;GAChD,kBAAkB,CAsB9B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
export declare const tenantSubscriptionsTableName = "tenant_subscriptions";
|
|
3
|
+
export declare const TENANT_SUBSCRIPTION_STATUSES: readonly ["pending_payment", "active", "trialing", "past_due", "suspended", "cancelled"];
|
|
4
|
+
export type TenantSubscriptionStatus = (typeof TENANT_SUBSCRIPTION_STATUSES)[number];
|
|
5
|
+
export interface SubscriptionCronNotification {
|
|
6
|
+
eventId: string;
|
|
7
|
+
kind: "free_expired" | "suspended";
|
|
8
|
+
}
|
|
9
|
+
export interface SubscriptionTransition {
|
|
10
|
+
operationId: string;
|
|
11
|
+
kind: "suspend" | "reactivate" | "change_plan" | "cancel" | "checkout";
|
|
12
|
+
targetPlanId: string | null;
|
|
13
|
+
requestedAt: Date;
|
|
14
|
+
}
|
|
15
|
+
export interface PaidUsagePeriod {
|
|
16
|
+
stripeSubscriptionId: string;
|
|
17
|
+
start: Date;
|
|
18
|
+
end: Date | null;
|
|
19
|
+
}
|
|
20
|
+
export declare const DunningClock: () => import("@antelopejs/interface-core/decorators").PropertyDecorator;
|
|
21
|
+
export declare class TenantSubscription extends Table {
|
|
22
|
+
_id: string;
|
|
23
|
+
planId: string | null;
|
|
24
|
+
status: TenantSubscriptionStatus;
|
|
25
|
+
deletionStartedAt: Date | null;
|
|
26
|
+
cronNotification: SubscriptionCronNotification | null;
|
|
27
|
+
stripeCustomerId: string | null;
|
|
28
|
+
stripeSubscriptionId: string | null;
|
|
29
|
+
stripeCheckoutSessionId: string | null;
|
|
30
|
+
completedCheckoutSessionId: string | null;
|
|
31
|
+
cardFingerprint: string | null;
|
|
32
|
+
currentPeriodEnd: Date | null;
|
|
33
|
+
pendingPlanId: string | null;
|
|
34
|
+
pendingPlanChangeAt: Date | null;
|
|
35
|
+
domainTransition: SubscriptionTransition | null;
|
|
36
|
+
revision?: string;
|
|
37
|
+
createdBy: string | null;
|
|
38
|
+
refundRequestedAt: Date | null;
|
|
39
|
+
pastDueSince: Date | null;
|
|
40
|
+
freeUntil: Date | null;
|
|
41
|
+
isComplimentary?: boolean;
|
|
42
|
+
paidUsageStartedAt?: Date | null;
|
|
43
|
+
paidUsagePeriods?: PaidUsagePeriod[] | null;
|
|
44
|
+
createdAt: Date;
|
|
45
|
+
updatedAt: Date;
|
|
46
|
+
}
|