@antelopejs/interface-dms-saas 0.2.1 → 0.2.2

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.
@@ -9,9 +9,6 @@ export * from "./platformNotes.model";
9
9
  export * from "./refunds.model";
10
10
  export * from "./segments.model";
11
11
  export * from "./stripeWebhookEvents.model";
12
- export * from "./supportMessages.model";
13
- export * from "./supportTicketEvents.model";
14
- export * from "./supportTickets.model";
15
12
  export * from "./tenantBillingInfo.model";
16
13
  export * from "./tenantBillingState.model";
17
14
  export * from "./tenantSubscriptions.model";
@@ -25,9 +25,6 @@ __exportStar(require("./platformNotes.model"), exports);
25
25
  __exportStar(require("./refunds.model"), exports);
26
26
  __exportStar(require("./segments.model"), exports);
27
27
  __exportStar(require("./stripeWebhookEvents.model"), exports);
28
- __exportStar(require("./supportMessages.model"), exports);
29
- __exportStar(require("./supportTicketEvents.model"), exports);
30
- __exportStar(require("./supportTickets.model"), exports);
31
28
  __exportStar(require("./tenantBillingInfo.model"), exports);
32
29
  __exportStar(require("./tenantBillingState.model"), exports);
33
30
  __exportStar(require("./tenantSubscriptions.model"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/db/models/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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/db/models/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,4DAA0C;AAC1C,6DAA2C;AAC3C,8DAA4C;AAC5C,4DAA0C;AAC1C,uDAAqC"}
@@ -9,9 +9,6 @@ export * from "./platformNotes.table";
9
9
  export * from "./refunds.table";
10
10
  export * from "./segments.table";
11
11
  export * from "./stripeWebhookEvents.table";
12
- export * from "./supportMessages.table";
13
- export * from "./supportTicketEvents.table";
14
- export * from "./supportTickets.table";
15
12
  export * from "./tenantBillingInfo.table";
16
13
  export * from "./tenantBillingState.table";
17
14
  export * from "./tenantSubscriptions.table";
@@ -25,9 +25,6 @@ __exportStar(require("./platformNotes.table"), exports);
25
25
  __exportStar(require("./refunds.table"), exports);
26
26
  __exportStar(require("./segments.table"), exports);
27
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
28
  __exportStar(require("./tenantBillingInfo.table"), exports);
32
29
  __exportStar(require("./tenantBillingState.table"), exports);
33
30
  __exportStar(require("./tenantSubscriptions.table"), exports);
@@ -1 +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"}
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,4DAA0C;AAC1C,6DAA2C;AAC3C,8DAA4C;AAC5C,4DAA0C;AAC1C,uDAAqC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/interface-dms-saas",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Public interfaces for the DMS SaaS module",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,23 +0,0 @@
1
- import { SupportMessage } from "../tables/supportMessages.table";
2
- declare const SupportMessageModel_base: {
3
- new (database: import("@antelopejs/interface-database").SchemaInstance<any>): {
4
- readonly table: import("@antelopejs/interface-database").Table<SupportMessage>;
5
- readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
6
- get(id: string): PromiseLike<SupportMessage | undefined>;
7
- getBy(index: keyof SupportMessage, ...keys: any[]): PromiseLike<SupportMessage[]>;
8
- getAll(): PromiseLike<SupportMessage[]>;
9
- insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<SupportMessage> | import("@antelopejs/interface-database-decorators").DeepPartial<SupportMessage>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
10
- update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<SupportMessage>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<SupportMessage>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
- delete(id: string): Promise<number>;
13
- };
14
- readonly schemaName: string;
15
- fromPlainData(obj: any): SupportMessage;
16
- fromDatabase(obj: any): SupportMessage | undefined;
17
- toDatabase(obj: any): Record<string, any>;
18
- validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
19
- };
20
- export declare class SupportMessageModel extends SupportMessageModel_base {
21
- hasAttachment(ticketId: string, resourceKey: string): Promise<boolean>;
22
- }
23
- export {};
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupportMessageModel = void 0;
4
- const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
5
- const supportMessages_table_1 = require("../tables/supportMessages.table");
6
- class SupportMessageModel extends (0, interface_database_decorators_1.BasicDataModel)(supportMessages_table_1.SupportMessage, supportMessages_table_1.supportMessagesTableName) {
7
- async hasAttachment(ticketId, resourceKey) {
8
- const count = await this.table
9
- .getAll(ticketId, "ticketId")
10
- .filter((row) => row.key("attachments").includes(resourceKey))
11
- .count()
12
- .run();
13
- return count > 0;
14
- }
15
- }
16
- exports.SupportMessageModel = SupportMessageModel;
17
- //# sourceMappingURL=supportMessages.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"supportMessages.model.js","sourceRoot":"","sources":["../../../src/db/models/supportMessages.model.ts"],"names":[],"mappings":";;;AAAA,6FAA2E;AAC3E,2EAGyC;AAGzC,MAAa,mBAAoB,SAAQ,IAAA,8CAAc,EACrD,sCAAc,EACd,gDAAwB,CACzB;IAEC,KAAK,CAAC,aAAa,CAAC,QAAgB,EAAE,WAAmB;QACvD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK;aAC3B,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC;aAC5B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;aAC7D,KAAK,EAAE;aACP,GAAG,EAAE,CAAC;QACT,OAAO,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;CACF;AAbD,kDAaC"}
@@ -1,22 +0,0 @@
1
- import { SupportTicketEvent } from "../tables/supportTicketEvents.table";
2
- declare const SupportTicketEventModel_base: {
3
- new (database: import("@antelopejs/interface-database").SchemaInstance<any>): {
4
- readonly table: import("@antelopejs/interface-database").Table<SupportTicketEvent>;
5
- readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
6
- get(id: string): PromiseLike<SupportTicketEvent | undefined>;
7
- getBy(index: keyof SupportTicketEvent, ...keys: any[]): PromiseLike<SupportTicketEvent[]>;
8
- getAll(): PromiseLike<SupportTicketEvent[]>;
9
- insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<SupportTicketEvent> | import("@antelopejs/interface-database-decorators").DeepPartial<SupportTicketEvent>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
10
- update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<SupportTicketEvent>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<SupportTicketEvent>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
- delete(id: string): Promise<number>;
13
- };
14
- readonly schemaName: string;
15
- fromPlainData(obj: any): SupportTicketEvent;
16
- fromDatabase(obj: any): SupportTicketEvent | undefined;
17
- toDatabase(obj: any): Record<string, any>;
18
- validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
19
- };
20
- export declare class SupportTicketEventModel extends SupportTicketEventModel_base {
21
- }
22
- export {};
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupportTicketEventModel = void 0;
4
- const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
5
- const supportTicketEvents_table_1 = require("../tables/supportTicketEvents.table");
6
- class SupportTicketEventModel extends (0, interface_database_decorators_1.BasicDataModel)(supportTicketEvents_table_1.SupportTicketEvent, supportTicketEvents_table_1.supportTicketEventsTableName) {
7
- }
8
- exports.SupportTicketEventModel = SupportTicketEventModel;
9
- //# sourceMappingURL=supportTicketEvents.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"supportTicketEvents.model.js","sourceRoot":"","sources":["../../../src/db/models/supportTicketEvents.model.ts"],"names":[],"mappings":";;;AAAA,6FAA2E;AAC3E,mFAG6C;AAG7C,MAAa,uBAAwB,SAAQ,IAAA,8CAAc,EACzD,8CAAkB,EAClB,wDAA4B,CAC7B;CAAG;AAHJ,0DAGI"}
@@ -1,25 +0,0 @@
1
- import type { AtomicMutationOutcome } from "@antelopejs/interface-database";
2
- import { SupportTicket } from "../tables/supportTickets.table";
3
- declare const SupportTicketModel_base: {
4
- new (database: import("@antelopejs/interface-database").SchemaInstance<any>): {
5
- readonly table: import("@antelopejs/interface-database").Table<SupportTicket>;
6
- readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
7
- get(id: string): PromiseLike<SupportTicket | undefined>;
8
- getBy(index: keyof SupportTicket, ...keys: any[]): PromiseLike<SupportTicket[]>;
9
- getAll(): PromiseLike<SupportTicket[]>;
10
- insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<SupportTicket> | import("@antelopejs/interface-database-decorators").DeepPartial<SupportTicket>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
11
- update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<SupportTicket>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<SupportTicket>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
13
- delete(id: string): Promise<number>;
14
- };
15
- readonly schemaName: string;
16
- fromPlainData(obj: any): SupportTicket;
17
- fromDatabase(obj: any): SupportTicket | undefined;
18
- toDatabase(obj: any): Record<string, any>;
19
- validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
20
- };
21
- export declare class SupportTicketModel extends SupportTicketModel_base {
22
- publish(ticket: SupportTicket, expectedMutationId: string): Promise<AtomicMutationOutcome>;
23
- settlePublication(id: string, operationId: string): Promise<AtomicMutationOutcome>;
24
- }
25
- export {};
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupportTicketModel = void 0;
4
- const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
5
- const supportTickets_table_1 = require("../tables/supportTickets.table");
6
- class SupportTicketModel extends (0, interface_database_decorators_1.BasicDataModel)(supportTickets_table_1.SupportTicket, supportTickets_table_1.supportTicketsTableName) {
7
- publish(ticket, expectedMutationId) {
8
- const { _id, mutationId, ...patch } = ticket;
9
- return this.table
10
- .atomicMutation(_id, {
11
- type: "update",
12
- revisionField: "mutationId",
13
- expectedRevision: expectedMutationId,
14
- nextRevision: mutationId,
15
- patch,
16
- })
17
- .run();
18
- }
19
- settlePublication(id, operationId) {
20
- return this.table
21
- .atomicMutation(id, {
22
- type: "update",
23
- revisionField: "mutationId",
24
- expectedRevision: operationId,
25
- nextRevision: `${operationId}:settled`,
26
- patch: { publicationId: null },
27
- })
28
- .run();
29
- }
30
- }
31
- exports.SupportTicketModel = SupportTicketModel;
32
- //# sourceMappingURL=supportTickets.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"supportTickets.model.js","sourceRoot":"","sources":["../../../src/db/models/supportTickets.model.ts"],"names":[],"mappings":";;;AACA,6FAA2E;AAC3E,yEAGwC;AAMxC,MAAa,kBAAmB,SAAQ,IAAA,8CAAc,EACpD,oCAAa,EACb,8CAAuB,CACxB;IAEC,OAAO,CACL,MAAqB,EACrB,kBAA0B;QAE1B,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC7C,OAAO,IAAI,CAAC,KAAK;aACd,cAAc,CAAC,GAAG,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,aAAa,EAAE,YAAY;YAC3B,gBAAgB,EAAE,kBAAkB;YACpC,YAAY,EAAE,UAAU;YACxB,KAAK;SACN,CAAC;aACD,GAAG,EAAE,CAAC;IACX,CAAC;IAGD,iBAAiB,CACf,EAAU,EACV,WAAmB;QAEnB,OAAO,IAAI,CAAC,KAAK;aACd,cAAc,CAAC,EAAE,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,aAAa,EAAE,YAAY;YAC3B,gBAAgB,EAAE,WAAW;YAC7B,YAAY,EAAE,GAAG,WAAW,UAAU;YACtC,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;SAC/B,CAAC;aACD,GAAG,EAAE,CAAC;IACX,CAAC;CACF;AApCD,gDAoCC"}
@@ -1,14 +0,0 @@
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
- }
@@ -1,62 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,14 +0,0 @@
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
- }
@@ -1,61 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,25 +0,0 @@
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
- }
@@ -1,109 +0,0 @@
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
@@ -1 +0,0 @@
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"}