orbitx-core-models 11.141.0 → 11.143.0

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.
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Single source of truth for the Phase 28 ticket category taxonomy -- imported by the Client and
3
+ * Partner ticket-creation forms, both dashboards' ticket controllers (validation), and Ops's
4
+ * Group "handles these ticket categories" checkbox list, so all four places stay in sync without
5
+ * a real settings-editable admin screen. That screen (add/edit a category without a code
6
+ * release) was asked for in the same Phase 28 batch and is deliberately NOT built here -- it's
7
+ * its own admin CRUD + cache-invalidation feature across three frontends, left for a dedicated
8
+ * pass. This file is the interim single source instead of four separate hardcoded copies.
9
+ *
10
+ * Old tickets keep whatever legacy category they were filed under (chat-dispute,
11
+ * dashboard-technical-issue, payout-issue, referral-issue, review-submission-issue, other) --
12
+ * see CLIENT_TICKET_CATEGORIES_LEGACY/PARTNER_TICKET_CATEGORIES_LEGACY in ticket.interface.ts.
13
+ * Per the "no remapping" decision, those are shown as Legacy and never migrated.
14
+ */
15
+ export interface TicketSubCategoryOption {
16
+ value: string;
17
+ label: string;
18
+ }
19
+ export interface TicketCategoryOption {
20
+ value: string;
21
+ label: string;
22
+ /** Shown under the category as its own dropdown when present; omitted categories skip it. */
23
+ subCategories?: TicketSubCategoryOption[];
24
+ /** The requester picks their own Chat/Lead ID from their own records (locked, not free text). */
25
+ requiresChatId?: boolean;
26
+ /** The requester picks their own Invoice ID from their own records. */
27
+ requiresInvoiceId?: boolean;
28
+ }
29
+ export declare const CLIENT_TICKET_CATEGORY_OPTIONS: TicketCategoryOption[];
30
+ export declare const PARTNER_TICKET_CATEGORY_OPTIONS: TicketCategoryOption[];
31
+ /** Old category values, still valid on old tickets, shown as "(Legacy)" and never offered on the
32
+ * "create a new ticket" form again. Ops's category dropdowns (triage/reassign) still need to
33
+ * accept and display these so an old ticket can be looked at, filtered and re-triaged. */
34
+ export declare const CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY: TicketCategoryOption[];
35
+ export declare const PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY: TicketCategoryOption[];
36
+ /** Every category value that can appear on any ticket, old or new -- what a Group's
37
+ * "handles these ticket categories" checkbox list offers, so routing can still target a legacy
38
+ * category on an old, not-yet-resolved ticket as well as the new taxonomy. */
39
+ export declare const ALL_TICKET_CATEGORY_OPTIONS: TicketCategoryOption[];
40
+ /** Looks a category value up across every list (new + legacy, client + partner) -- for anywhere
41
+ * that just needs the label/shape without caring which dashboard it came from. */
42
+ export declare function findTicketCategoryOption(value?: string | null): TicketCategoryOption | undefined;
43
+ //# sourceMappingURL=ticketCategories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ticketCategories.d.ts","sourceRoot":"","sources":["../../src/constants/ticketCategories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,6FAA6F;IAC7F,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C,iGAAiG;IACjG,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uEAAuE;IACvE,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,8BAA8B,EAAE,oBAAoB,EAqChE,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,oBAAoB,EAgCjE,CAAC;AAEF;;0FAE0F;AAC1F,eAAO,MAAM,qCAAqC,EAAE,oBAAoB,EAEvE,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,oBAAoB,EAMxE,CAAC;AAEF;;8EAE8E;AAC9E,eAAO,MAAM,2BAA2B,EAAE,oBAAoB,EAK7D,CAAC;AAOF;kFACkF;AAClF,wBAAgB,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,oBAAoB,GAAG,SAAS,CAEhG"}
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ /**
3
+ * Single source of truth for the Phase 28 ticket category taxonomy -- imported by the Client and
4
+ * Partner ticket-creation forms, both dashboards' ticket controllers (validation), and Ops's
5
+ * Group "handles these ticket categories" checkbox list, so all four places stay in sync without
6
+ * a real settings-editable admin screen. That screen (add/edit a category without a code
7
+ * release) was asked for in the same Phase 28 batch and is deliberately NOT built here -- it's
8
+ * its own admin CRUD + cache-invalidation feature across three frontends, left for a dedicated
9
+ * pass. This file is the interim single source instead of four separate hardcoded copies.
10
+ *
11
+ * Old tickets keep whatever legacy category they were filed under (chat-dispute,
12
+ * dashboard-technical-issue, payout-issue, referral-issue, review-submission-issue, other) --
13
+ * see CLIENT_TICKET_CATEGORIES_LEGACY/PARTNER_TICKET_CATEGORIES_LEGACY in ticket.interface.ts.
14
+ * Per the "no remapping" decision, those are shown as Legacy and never migrated.
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.ALL_TICKET_CATEGORY_OPTIONS = exports.PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY = exports.CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY = exports.PARTNER_TICKET_CATEGORY_OPTIONS = exports.CLIENT_TICKET_CATEGORY_OPTIONS = void 0;
18
+ exports.findTicketCategoryOption = findTicketCategoryOption;
19
+ exports.CLIENT_TICKET_CATEGORY_OPTIONS = [
20
+ {
21
+ value: "dispute-billable-lead",
22
+ label: "Dispute Billable Lead",
23
+ requiresChatId: true,
24
+ subCategories: [
25
+ { value: "out-of-service", label: "Out of Service" },
26
+ { value: "out-of-coverage", label: "Out of Coverage" },
27
+ { value: "invalid", label: "Invalid" },
28
+ ],
29
+ },
30
+ {
31
+ value: "invoice-dispute",
32
+ label: "Invoice Dispute",
33
+ requiresInvoiceId: true,
34
+ },
35
+ {
36
+ value: "technical-support",
37
+ label: "Technical Support",
38
+ subCategories: [
39
+ { value: "login-access", label: "Login / Access" },
40
+ { value: "bug-error", label: "Bug / Error" },
41
+ { value: "performance", label: "Performance / Slowness" },
42
+ { value: "integration", label: "Integration" },
43
+ { value: "other", label: "Other" },
44
+ ],
45
+ },
46
+ {
47
+ value: "account-support",
48
+ label: "Account Support",
49
+ subCategories: [
50
+ { value: "billing-invoice", label: "Billing / Invoice" },
51
+ { value: "profile-settings", label: "Profile / Settings" },
52
+ { value: "users-permissions", label: "Users & Permissions" },
53
+ { value: "other", label: "Other" },
54
+ ],
55
+ },
56
+ ];
57
+ exports.PARTNER_TICKET_CATEGORY_OPTIONS = [
58
+ {
59
+ value: "failed-withdrawal",
60
+ label: "Failed Withdrawal",
61
+ requiresInvoiceId: true,
62
+ },
63
+ {
64
+ value: "failed-transfer",
65
+ label: "Failed Transfer",
66
+ requiresInvoiceId: true,
67
+ },
68
+ {
69
+ value: "technical-support",
70
+ label: "Technical Support",
71
+ subCategories: [
72
+ { value: "login-access", label: "Login / Access" },
73
+ { value: "bug-error", label: "Bug / Error" },
74
+ { value: "performance", label: "Performance / Slowness" },
75
+ { value: "integration", label: "Integration" },
76
+ { value: "other", label: "Other" },
77
+ ],
78
+ },
79
+ {
80
+ value: "account-support",
81
+ label: "Account Support",
82
+ subCategories: [
83
+ { value: "billing-invoice", label: "Billing / Invoice" },
84
+ { value: "profile-settings", label: "Profile / Settings" },
85
+ { value: "users-permissions", label: "Users & Permissions" },
86
+ { value: "other", label: "Other" },
87
+ ],
88
+ },
89
+ ];
90
+ /** Old category values, still valid on old tickets, shown as "(Legacy)" and never offered on the
91
+ * "create a new ticket" form again. Ops's category dropdowns (triage/reassign) still need to
92
+ * accept and display these so an old ticket can be looked at, filtered and re-triaged. */
93
+ exports.CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY = [
94
+ { value: "chat-dispute", label: "Chat Dispute (Legacy)", requiresChatId: true },
95
+ ];
96
+ exports.PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY = [
97
+ { value: "dashboard-technical-issue", label: "Dashboard / Technical Issue (Legacy)" },
98
+ { value: "payout-issue", label: "Payout Issue (Legacy)" },
99
+ { value: "referral-issue", label: "Referral Issue (Legacy)" },
100
+ { value: "review-submission-issue", label: "Review Submission Error (Legacy)" },
101
+ { value: "other", label: "Other (Legacy)" },
102
+ ];
103
+ /** Every category value that can appear on any ticket, old or new -- what a Group's
104
+ * "handles these ticket categories" checkbox list offers, so routing can still target a legacy
105
+ * category on an old, not-yet-resolved ticket as well as the new taxonomy. */
106
+ exports.ALL_TICKET_CATEGORY_OPTIONS = [
107
+ ...exports.CLIENT_TICKET_CATEGORY_OPTIONS,
108
+ ...exports.PARTNER_TICKET_CATEGORY_OPTIONS,
109
+ ...exports.CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY,
110
+ ...exports.PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY,
111
+ ];
112
+ function findOption(list, value) {
113
+ if (!value)
114
+ return undefined;
115
+ return list.find((o) => o.value === value);
116
+ }
117
+ /** Looks a category value up across every list (new + legacy, client + partner) -- for anywhere
118
+ * that just needs the label/shape without caring which dashboard it came from. */
119
+ function findTicketCategoryOption(value) {
120
+ return findOption(exports.ALL_TICKET_CATEGORY_OPTIONS, value);
121
+ }
package/dist/index.d.ts CHANGED
@@ -33,6 +33,7 @@ import { Employee } from "./models/employee.model";
33
33
  import { CallSession } from "./models/callSession.model";
34
34
  import { Request } from "./models/request.model";
35
35
  import { Ticket } from "./models/ticket.model";
36
+ import { EmailSenderMap } from "./models/emailSenderMap.model";
36
37
  import { Role } from "./models/role.model";
37
38
  import { AiSummarySettings } from "./models/aiSummarySettings.model";
38
39
  import { AiSummaryUsage } from "./models/aiSummaryUsage.model";
@@ -71,11 +72,14 @@ import { ILoginOtp } from "./interfaces/loginOtp.interface";
71
72
  import { IEmployee } from "./interfaces/employee.interface";
72
73
  import { ICallSession, CallSessionStatus, CallSessionDirection } from "./interfaces/callSession.interface";
73
74
  import { IRequest, IRequestAttachment, IRequestMessage, IRequestActivityEntry, RequestCategory, RequestStatus, REQUEST_CATEGORIES, REQUEST_SUBCATEGORIES_BY_CATEGORY } from "./interfaces/request.interface";
74
- import { ITicket, ITicketAttachment, ITicketActivityEntry, TicketCategory, ClientTicketCategory, PartnerTicketCategory, TicketOwnerType, TicketSource, TicketStatus, TicketPriority, TICKET_STATUS_CLIENT_VIEW, CLIENT_TICKET_CATEGORIES, PARTNER_TICKET_CATEGORIES } from "./interfaces/ticket.interface";
75
+ import { ITicket, ITicketAttachment, ITicketActivityEntry, ITicketMessage, TicketCategory, ClientTicketCategory, ClientTicketCategoryLegacy, PartnerTicketCategory, PartnerTicketCategoryLegacy, TicketOwnerType, TicketSource, TicketStatus, TicketPriority, TICKET_STATUS_CLIENT_VIEW, CLIENT_TICKET_CATEGORIES, CLIENT_TICKET_CATEGORIES_LEGACY, PARTNER_TICKET_CATEGORIES, PARTNER_TICKET_CATEGORIES_LEGACY } from "./interfaces/ticket.interface";
76
+ import { TicketCategoryOption, TicketSubCategoryOption, CLIENT_TICKET_CATEGORY_OPTIONS, PARTNER_TICKET_CATEGORY_OPTIONS, CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY, PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY, ALL_TICKET_CATEGORY_OPTIONS, findTicketCategoryOption } from "./constants/ticketCategories";
75
77
  import { IRole } from "./interfaces/role.interface";
76
78
  import { IAiSummarySettings, IAiSummaryExample, IAiSummaryUsage, AiSummaryLength } from "./interfaces/aiSummary.interface";
77
79
  import { IUpdate, UpdateDashboard, UpdateAudience, UpdateType } from "./interfaces/update.interface";
80
+ import { IEmailSenderMap } from "./interfaces/emailSenderMap.interface";
78
81
  import { TicketRoutingInput, TicketRoutingResult } from "./routing/ticketRouting";
82
+ import { sanitizeTicketForRequester } from "./utils/ticketSanitize";
79
83
  import { Dashboard, PermissionNode, DASHBOARDS } from "./permissions/types";
80
84
  import { opsTree } from "./permissions/trees/ops.tree";
81
85
  import { employeeTree } from "./permissions/trees/employee.tree";
@@ -84,6 +88,6 @@ import { clientTree } from "./permissions/trees/client.tree";
84
88
  import { getTree, getAllKeys, getParentKey, getAncestorKeys } from "./permissions/treeUtils";
85
89
  import { resolveEffectivePermissions, hasPermission, validateGrantedKeys, validateExtraKeys, getFullAccessKeys, PermissionSource, ValidationResult } from "./permissions/resolve";
86
90
  import { roleSeeds, RoleSeed } from "./permissions/seeds/roles.seed";
87
- export { Chat, Message, User, Vertical, Macro, Partner, Company, CompanySettings, Review, Wallet, StripeLog, Transaction, Lead, TierConfig, TierProgress, MonthlyTierSnapshot, Product, Plan, PlanOption, Addon, Subscription, Coupon, Visitor, Group, Agent, LeadLedger, Invoice, LeadDispute, Session, LoginOtp, Counter, Employee, CallSession, Request, REQUEST_CATEGORIES, REQUEST_SUBCATEGORIES_BY_CATEGORY, Ticket, CLIENT_TICKET_CATEGORIES, PARTNER_TICKET_CATEGORIES, TICKET_STATUS_CLIENT_VIEW, Role, AiSummarySettings, AiSummaryUsage, Update, resolveTicketRouting, pickFromGroup, OPEN_TICKET_STATUSES, opsTree, employeeTree, partnerTree, clientTree, DASHBOARDS, getTree, getAllKeys, getParentKey, getAncestorKeys, resolveEffectivePermissions, hasPermission, validateGrantedKeys, validateExtraKeys, getFullAccessKeys, roleSeeds, };
88
- export type { IChat, IMessage, IUser, IVertical, IMacro, IPartner, ICompany, IOnboardingStep, ITwilioConfig, ICompanySettings, ICallConnectSettings, ILeadConfig, ILeadFields, IReview, IReviewStatusHistoryEntry, IWallet, IStripeLog, ITransaction, ILead, ITierConfig, ITierProgress, IMonthlyTierSnapshot, IProduct, IPlan, IPlanOption, IAddon, ISubscription, ICoupon, CouponDiscountType, IVisitor, IGroup, IAgent, ILeadLedger, IInvoice, ILeadDispute, ISession, ILoginOtp, IEmployee, ICallSession, CallSessionStatus, CallSessionDirection, IRequest, IRequestAttachment, IRequestMessage, IRequestActivityEntry, RequestCategory, RequestStatus, ITicket, ITicketAttachment, ITicketActivityEntry, TicketCategory, ClientTicketCategory, PartnerTicketCategory, TicketOwnerType, TicketSource, TicketStatus, TicketPriority, IRole, IAiSummarySettings, IAiSummaryExample, IAiSummaryUsage, AiSummaryLength, IUpdate, UpdateDashboard, UpdateAudience, UpdateType, TicketRoutingInput, TicketRoutingResult, Dashboard, PermissionNode, PermissionSource, ValidationResult, RoleSeed, };
91
+ export { Chat, Message, User, Vertical, Macro, Partner, Company, CompanySettings, Review, Wallet, StripeLog, Transaction, Lead, TierConfig, TierProgress, MonthlyTierSnapshot, Product, Plan, PlanOption, Addon, Subscription, Coupon, Visitor, Group, Agent, LeadLedger, Invoice, LeadDispute, Session, LoginOtp, Counter, Employee, CallSession, Request, REQUEST_CATEGORIES, REQUEST_SUBCATEGORIES_BY_CATEGORY, Ticket, EmailSenderMap, CLIENT_TICKET_CATEGORIES, CLIENT_TICKET_CATEGORIES_LEGACY, PARTNER_TICKET_CATEGORIES, PARTNER_TICKET_CATEGORIES_LEGACY, CLIENT_TICKET_CATEGORY_OPTIONS, PARTNER_TICKET_CATEGORY_OPTIONS, CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY, PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY, ALL_TICKET_CATEGORY_OPTIONS, findTicketCategoryOption, TICKET_STATUS_CLIENT_VIEW, sanitizeTicketForRequester, Role, AiSummarySettings, AiSummaryUsage, Update, resolveTicketRouting, pickFromGroup, OPEN_TICKET_STATUSES, opsTree, employeeTree, partnerTree, clientTree, DASHBOARDS, getTree, getAllKeys, getParentKey, getAncestorKeys, resolveEffectivePermissions, hasPermission, validateGrantedKeys, validateExtraKeys, getFullAccessKeys, roleSeeds, };
92
+ export type { IChat, IMessage, IUser, IVertical, IMacro, IPartner, ICompany, IOnboardingStep, ITwilioConfig, ICompanySettings, ICallConnectSettings, ILeadConfig, ILeadFields, IReview, IReviewStatusHistoryEntry, IWallet, IStripeLog, ITransaction, ILead, ITierConfig, ITierProgress, IMonthlyTierSnapshot, IProduct, IPlan, IPlanOption, IAddon, ISubscription, ICoupon, CouponDiscountType, IVisitor, IGroup, IAgent, ILeadLedger, IInvoice, ILeadDispute, ISession, ILoginOtp, IEmployee, ICallSession, CallSessionStatus, CallSessionDirection, IRequest, IRequestAttachment, IRequestMessage, IRequestActivityEntry, RequestCategory, RequestStatus, ITicket, ITicketAttachment, ITicketActivityEntry, ITicketMessage, IEmailSenderMap, TicketCategory, ClientTicketCategory, ClientTicketCategoryLegacy, PartnerTicketCategory, PartnerTicketCategoryLegacy, TicketCategoryOption, TicketSubCategoryOption, TicketOwnerType, TicketSource, TicketStatus, TicketPriority, IRole, IAiSummarySettings, IAiSummaryExample, IAiSummaryUsage, AiSummaryLength, IUpdate, UpdateDashboard, UpdateAudience, UpdateType, TicketRoutingInput, TicketRoutingResult, Dashboard, PermissionNode, PermissionSource, ValidationResult, RoleSeed, };
89
93
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,WAAW,EA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7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.partnerTree = exports.employeeTree = exports.opsTree = exports.OPEN_TICKET_STATUSES = exports.pickFromGroup = exports.resolveTicketRouting = exports.Update = exports.AiSummaryUsage = exports.AiSummarySettings = exports.Role = exports.TICKET_STATUS_CLIENT_VIEW = exports.PARTNER_TICKET_CATEGORIES = exports.CLIENT_TICKET_CATEGORIES = exports.Ticket = exports.REQUEST_SUBCATEGORIES_BY_CATEGORY = exports.REQUEST_CATEGORIES = exports.Request = exports.CallSession = exports.Employee = exports.Counter = exports.LoginOtp = exports.Session = exports.LeadDispute = exports.Invoice = exports.LeadLedger = exports.Agent = exports.Group = exports.Visitor = exports.Coupon = exports.Subscription = exports.Addon = exports.PlanOption = exports.Plan = exports.Product = exports.MonthlyTierSnapshot = exports.TierProgress = exports.TierConfig = exports.Lead = exports.Transaction = exports.StripeLog = exports.Wallet = exports.Review = exports.CompanySettings = exports.Company = exports.Partner = exports.Macro = exports.Vertical = exports.User = exports.Message = exports.Chat = void 0;
4
- exports.roleSeeds = exports.getFullAccessKeys = exports.validateExtraKeys = exports.validateGrantedKeys = exports.hasPermission = exports.resolveEffectivePermissions = exports.getAncestorKeys = exports.getParentKey = exports.getAllKeys = exports.getTree = exports.DASHBOARDS = exports.clientTree = void 0;
3
+ exports.sanitizeTicketForRequester = exports.TICKET_STATUS_CLIENT_VIEW = exports.findTicketCategoryOption = exports.ALL_TICKET_CATEGORY_OPTIONS = exports.PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY = exports.CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY = exports.PARTNER_TICKET_CATEGORY_OPTIONS = exports.CLIENT_TICKET_CATEGORY_OPTIONS = exports.PARTNER_TICKET_CATEGORIES_LEGACY = exports.PARTNER_TICKET_CATEGORIES = exports.CLIENT_TICKET_CATEGORIES_LEGACY = exports.CLIENT_TICKET_CATEGORIES = exports.EmailSenderMap = exports.Ticket = exports.REQUEST_SUBCATEGORIES_BY_CATEGORY = exports.REQUEST_CATEGORIES = exports.Request = exports.CallSession = exports.Employee = exports.Counter = exports.LoginOtp = exports.Session = exports.LeadDispute = exports.Invoice = exports.LeadLedger = exports.Agent = exports.Group = exports.Visitor = exports.Coupon = exports.Subscription = exports.Addon = exports.PlanOption = exports.Plan = exports.Product = exports.MonthlyTierSnapshot = exports.TierProgress = exports.TierConfig = exports.Lead = exports.Transaction = exports.StripeLog = exports.Wallet = exports.Review = exports.CompanySettings = exports.Company = exports.Partner = exports.Macro = exports.Vertical = exports.User = exports.Message = exports.Chat = void 0;
4
+ exports.roleSeeds = exports.getFullAccessKeys = exports.validateExtraKeys = exports.validateGrantedKeys = exports.hasPermission = exports.resolveEffectivePermissions = exports.getAncestorKeys = exports.getParentKey = exports.getAllKeys = exports.getTree = exports.DASHBOARDS = exports.clientTree = exports.partnerTree = exports.employeeTree = exports.opsTree = exports.OPEN_TICKET_STATUSES = exports.pickFromGroup = exports.resolveTicketRouting = exports.Update = exports.AiSummaryUsage = exports.AiSummarySettings = exports.Role = void 0;
5
5
  // MODELS
6
6
  const chat_model_1 = require("./models/chat.model");
7
7
  Object.defineProperty(exports, "Chat", { enumerable: true, get: function () { return chat_model_1.Chat; } });
@@ -73,6 +73,8 @@ const request_model_1 = require("./models/request.model");
73
73
  Object.defineProperty(exports, "Request", { enumerable: true, get: function () { return request_model_1.Request; } });
74
74
  const ticket_model_1 = require("./models/ticket.model");
75
75
  Object.defineProperty(exports, "Ticket", { enumerable: true, get: function () { return ticket_model_1.Ticket; } });
76
+ const emailSenderMap_model_1 = require("./models/emailSenderMap.model");
77
+ Object.defineProperty(exports, "EmailSenderMap", { enumerable: true, get: function () { return emailSenderMap_model_1.EmailSenderMap; } });
76
78
  const role_model_1 = require("./models/role.model");
77
79
  Object.defineProperty(exports, "Role", { enumerable: true, get: function () { return role_model_1.Role; } });
78
80
  const aiSummarySettings_model_1 = require("./models/aiSummarySettings.model");
@@ -91,7 +93,18 @@ Object.defineProperty(exports, "REQUEST_SUBCATEGORIES_BY_CATEGORY", { enumerable
91
93
  const ticket_interface_1 = require("./interfaces/ticket.interface");
92
94
  Object.defineProperty(exports, "TICKET_STATUS_CLIENT_VIEW", { enumerable: true, get: function () { return ticket_interface_1.TICKET_STATUS_CLIENT_VIEW; } });
93
95
  Object.defineProperty(exports, "CLIENT_TICKET_CATEGORIES", { enumerable: true, get: function () { return ticket_interface_1.CLIENT_TICKET_CATEGORIES; } });
96
+ Object.defineProperty(exports, "CLIENT_TICKET_CATEGORIES_LEGACY", { enumerable: true, get: function () { return ticket_interface_1.CLIENT_TICKET_CATEGORIES_LEGACY; } });
94
97
  Object.defineProperty(exports, "PARTNER_TICKET_CATEGORIES", { enumerable: true, get: function () { return ticket_interface_1.PARTNER_TICKET_CATEGORIES; } });
98
+ Object.defineProperty(exports, "PARTNER_TICKET_CATEGORIES_LEGACY", { enumerable: true, get: function () { return ticket_interface_1.PARTNER_TICKET_CATEGORIES_LEGACY; } });
99
+ const ticketCategories_1 = require("./constants/ticketCategories");
100
+ Object.defineProperty(exports, "CLIENT_TICKET_CATEGORY_OPTIONS", { enumerable: true, get: function () { return ticketCategories_1.CLIENT_TICKET_CATEGORY_OPTIONS; } });
101
+ Object.defineProperty(exports, "PARTNER_TICKET_CATEGORY_OPTIONS", { enumerable: true, get: function () { return ticketCategories_1.PARTNER_TICKET_CATEGORY_OPTIONS; } });
102
+ Object.defineProperty(exports, "CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY", { enumerable: true, get: function () { return ticketCategories_1.CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY; } });
103
+ Object.defineProperty(exports, "PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY", { enumerable: true, get: function () { return ticketCategories_1.PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY; } });
104
+ Object.defineProperty(exports, "ALL_TICKET_CATEGORY_OPTIONS", { enumerable: true, get: function () { return ticketCategories_1.ALL_TICKET_CATEGORY_OPTIONS; } });
105
+ Object.defineProperty(exports, "findTicketCategoryOption", { enumerable: true, get: function () { return ticketCategories_1.findTicketCategoryOption; } });
106
+ const ticketSanitize_1 = require("./utils/ticketSanitize");
107
+ Object.defineProperty(exports, "sanitizeTicketForRequester", { enumerable: true, get: function () { return ticketSanitize_1.sanitizeTicketForRequester; } });
95
108
  // PERMISSIONS
96
109
  const types_1 = require("./permissions/types");
97
110
  Object.defineProperty(exports, "DASHBOARDS", { enumerable: true, get: function () { return types_1.DASHBOARDS; } });
@@ -0,0 +1,18 @@
1
+ import { Document, Types } from "mongoose";
2
+ import { TicketOwnerType } from "./ticket.interface";
3
+ /**
4
+ * Phase 33 (Email Tickets) -- "remember the address for next time." The first time an agent
5
+ * manually links an unrecognized inbound-email sender to a real Company or Partner (see
6
+ * ticket.controller.js's linkTicket / the "linked" activity action), that pairing is saved here
7
+ * so the NEXT email from the same address auto-matches instead of landing in the needs-review
8
+ * pool again. Deliberately its own small collection rather than a new field on Company/Partner --
9
+ * one sender can only ever map to one owner, and this keeps the inbound-email matching lookup to
10
+ * a single indexed query regardless of which side owns it.
11
+ */
12
+ export interface IEmailSenderMap extends Document {
13
+ email: string;
14
+ ownerType: TicketOwnerType;
15
+ ownerId: Types.ObjectId;
16
+ createdAt?: Date;
17
+ }
18
+ //# sourceMappingURL=emailSenderMap.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emailSenderMap.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/emailSenderMap.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,eAAe,CAAC;IAC3B,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,18 +7,32 @@ import { Document, Types } from "mongoose";
7
7
  * A ticket in this category just gives Ops a place to see the report and
8
8
  * manually open the real Dispute tool once they've identified the invoice
9
9
  * line item. Revisit auto-linking as a later phase.
10
+ *
11
+ * 2026-09-22 Phase 28 taxonomy pass: "chat-dispute" is retired from the
12
+ * creation form (folded into "dispute-billable-lead", which now carries its
13
+ * own sub-category) and "technical-support"/"account-support" are new. Old
14
+ * tickets already filed under "chat-dispute" or any legacy value are left
15
+ * alone and shown as Legacy -- see CLIENT_TICKET_CATEGORIES_LEGACY below --
16
+ * per the "no remapping" decision.
10
17
  */
11
- export type ClientTicketCategory = "dispute-billable-lead" | "chat-dispute" | "invoice-dispute";
18
+ export type ClientTicketCategory = "dispute-billable-lead" | "invoice-dispute" | "technical-support" | "account-support";
19
+ export type ClientTicketCategoryLegacy = "chat-dispute";
12
20
  /**
13
21
  * Partner Dashboard's categories -- a partner has no leads/invoices of their
14
- * own to dispute (that's the Client side); their issues are about the
15
- * dashboard itself, their payouts, their referrals, or reporting a review
16
- * they couldn't submit.
22
+ * own to dispute (that's the Client side); their issues are about a failed
23
+ * payout, a failed transfer, the dashboard itself, or their own account.
24
+ *
25
+ * 2026-09-22 Phase 28 taxonomy pass: replaces the old
26
+ * dashboard-technical-issue/payout-issue/referral-issue/review-submission-issue/other
27
+ * list (kept below as PARTNER_TICKET_CATEGORIES_LEGACY, same "no remapping" decision).
17
28
  */
18
- export type PartnerTicketCategory = "dashboard-technical-issue" | "payout-issue" | "referral-issue" | "review-submission-issue" | "other";
19
- export type TicketCategory = ClientTicketCategory | PartnerTicketCategory;
29
+ export type PartnerTicketCategory = "failed-withdrawal" | "failed-transfer" | "technical-support" | "account-support";
30
+ export type PartnerTicketCategoryLegacy = "dashboard-technical-issue" | "payout-issue" | "referral-issue" | "review-submission-issue" | "other";
31
+ export type TicketCategory = ClientTicketCategory | ClientTicketCategoryLegacy | PartnerTicketCategory | PartnerTicketCategoryLegacy;
20
32
  export declare const CLIENT_TICKET_CATEGORIES: ClientTicketCategory[];
33
+ export declare const CLIENT_TICKET_CATEGORIES_LEGACY: ClientTicketCategoryLegacy[];
21
34
  export declare const PARTNER_TICKET_CATEGORIES: PartnerTicketCategory[];
35
+ export declare const PARTNER_TICKET_CATEGORIES_LEGACY: PartnerTicketCategoryLegacy[];
22
36
  /** Who this ticket belongs to -- Company (Client Dashboard) or Partner. */
23
37
  export type TicketOwnerType = "Company" | "Partner";
24
38
  /**
@@ -52,7 +66,7 @@ export interface ITicketAttachment {
52
66
  */
53
67
  export interface ITicketActivityEntry {
54
68
  _id?: Types.ObjectId;
55
- action: "created" | "status_changed" | "category_changed" | "priority_changed" | "assigned" | "reassigned" | "message_added" | "mentioned";
69
+ action: "created" | "status_changed" | "category_changed" | "priority_changed" | "assigned" | "reassigned" | "message_added" | "mentioned" | "linked";
56
70
  actorId?: Types.ObjectId;
57
71
  actorName?: string;
58
72
  /** Human-readable before/after for status/category/priority/assignee changes. */
@@ -73,20 +87,40 @@ export interface ITicketMessage {
73
87
  authorName?: string;
74
88
  body: string;
75
89
  isInternal: boolean;
90
+ /** Files attached to this specific reply -- separate from the ticket-level `attachments`
91
+ * captured at creation. Client/partner-authored messages can carry these too. */
92
+ attachments?: ITicketAttachment[];
93
+ /** Ops Users @mentioned in an internal note (never set on a client-visible reply). Each one
94
+ * gets a live Update and the ticket's activityLog gets a matching "mentioned" entry. */
95
+ mentionedUserIds?: Types.ObjectId[];
76
96
  createdAt: Date;
77
97
  }
78
98
  export interface ITicket extends Document {
79
99
  ticketId: string;
80
- ownerType: TicketOwnerType;
81
- ownerId: Types.ObjectId;
100
+ /** Unset only for an email-sourced ticket whose sender couldn't be matched to a real Company or
101
+ * Partner yet -- it sits in the "needs review" pool until an agent links it (see the `linked`
102
+ * activity action) or its category/owner become known some other way. Always set for a
103
+ * dashboard-created ticket. */
104
+ ownerType?: TicketOwnerType;
105
+ ownerId?: Types.ObjectId;
82
106
  source: TicketSource;
83
107
  /** Required when source is "dashboard"; left unset for "email" until an agent triages it. */
84
108
  category?: TicketCategory;
109
+ /** The category's own sub-reason, e.g. dispute-billable-lead's Out of Service/Out of
110
+ * Coverage/Invalid, or technical-support's/account-support's issue type. See
111
+ * TICKET_CATEGORY_OPTIONS in constants/ticketCategories.ts for the valid list per category --
112
+ * not every category has sub-categories, so this is left unset for those. */
113
+ subCategory?: string;
85
114
  /** Client dashboard, dispute-billable-lead / chat-dispute only */
86
115
  disputeReason?: string;
87
116
  /** Client dashboard, dispute-billable-lead / chat-dispute only */
88
117
  chatId?: string;
89
- /** Client dashboard, invoice-dispute only -- free-text reference, matches the UI's free-text field */
118
+ /** The lead this ticket disputes, when raised from the client's own Lead record (locked, not
119
+ * free text) -- distinct from the free-text `chatId` display field. See raiseDispute in
120
+ * client-backend's dispute.service.js. */
121
+ leadId?: Types.ObjectId;
122
+ /** Client dashboard invoice-dispute, and Partner dashboard failed-withdrawal/failed-transfer
123
+ * where it applies -- free-text reference, matches the UI's free-text/picker field. */
90
124
  invoiceId?: string;
91
125
  description?: string;
92
126
  attachments: ITicketAttachment[];
@@ -1 +1 @@
1
- {"version":3,"file":"ticket.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/ticket.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,GAAG,cAAc,GAAG,iBAAiB,CAAC;AAEhG;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAC7B,2BAA2B,GAC3B,cAAc,GACd,gBAAgB,GAChB,yBAAyB,GACzB,OAAO,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG,qBAAqB,CAAC;AAE1E,eAAO,MAAM,wBAAwB,EAAE,oB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exports.CLIENT_TICKET_CATEGORIES = void 0;
3
+ exports.TICKET_STATUS_CLIENT_VIEW = exports.PARTNER_TICKET_CATEGORIES_LEGACY = exports.PARTNER_TICKET_CATEGORIES = exports.CLIENT_TICKET_CATEGORIES_LEGACY = exports.CLIENT_TICKET_CATEGORIES = void 0;
4
4
  exports.CLIENT_TICKET_CATEGORIES = [
5
5
  "dispute-billable-lead",
6
- "chat-dispute",
7
6
  "invoice-dispute",
7
+ "technical-support",
8
+ "account-support",
8
9
  ];
10
+ exports.CLIENT_TICKET_CATEGORIES_LEGACY = ["chat-dispute"];
9
11
  exports.PARTNER_TICKET_CATEGORIES = [
12
+ "failed-withdrawal",
13
+ "failed-transfer",
14
+ "technical-support",
15
+ "account-support",
16
+ ];
17
+ exports.PARTNER_TICKET_CATEGORIES_LEGACY = [
10
18
  "dashboard-technical-issue",
11
19
  "payout-issue",
12
20
  "referral-issue",
@@ -0,0 +1,9 @@
1
+ import mongoose from "mongoose";
2
+ import { IEmailSenderMap } from "../interfaces/emailSenderMap.interface";
3
+ export declare const EmailSenderMap: mongoose.Model<IEmailSenderMap, {}, {}, {}, mongoose.Document<unknown, {}, IEmailSenderMap, {}, {}> & IEmailSenderMap & Required<{
4
+ _id: unknown;
5
+ }> & {
6
+ __v: number;
7
+ }, any>;
8
+ export default EmailSenderMap;
9
+ //# sourceMappingURL=emailSenderMap.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emailSenderMap.model.d.ts","sourceRoot":"","sources":["../../src/models/emailSenderMap.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAWzE,eAAO,MAAM,cAAc;;;;OAA0E,CAAC;AACtG,eAAe,cAAc,CAAC"}
@@ -0,0 +1,44 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.EmailSenderMap = void 0;
37
+ const mongoose_1 = __importStar(require("mongoose"));
38
+ const emailSenderMapSchema = new mongoose_1.Schema({
39
+ email: { type: String, required: true, trim: true, lowercase: true, unique: true },
40
+ ownerType: { type: String, enum: ["Company", "Partner"], required: true },
41
+ ownerId: { type: mongoose_1.Schema.Types.ObjectId, required: true, refPath: "ownerType" },
42
+ }, { timestamps: { createdAt: true, updatedAt: false } });
43
+ exports.EmailSenderMap = mongoose_1.default.model("EmailSenderMap", emailSenderMapSchema);
44
+ exports.default = exports.EmailSenderMap;
@@ -1 +1 @@
1
- {"version":3,"file":"ticket.model.d.ts","sourceRoot":"","sources":["../../src/models/ticket.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAE5C,OAAO,EACL,OAAO,EAIR,MAAM,gCAAgC,CAAC;AAuNxC,eAAO,MAAM,MAAM;;;;OAAkD,CAAC;AACtE,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"ticket.model.d.ts","sourceRoot":"","sources":["../../src/models/ticket.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAE5C,OAAO,EACL,OAAO,EAIR,MAAM,gCAAgC,CAAC;AAkQxC,eAAO,MAAM,MAAM;;;;OAAkD,CAAC;AACtE,eAAe,MAAM,CAAC"}
@@ -49,6 +49,15 @@ const ticketMessageSchema = new mongoose_1.Schema({
49
49
  authorName: { type: String, trim: true },
50
50
  body: { type: String, required: true, trim: true, maxlength: 5000 },
51
51
  isInternal: { type: Boolean, default: false },
52
+ attachments: {
53
+ type: [ticketAttachmentSchema],
54
+ default: [],
55
+ },
56
+ mentionedUserIds: {
57
+ type: [mongoose_1.Schema.Types.ObjectId],
58
+ ref: "User",
59
+ default: [],
60
+ },
52
61
  createdAt: { type: Date, default: Date.now },
53
62
  }, { _id: true });
54
63
  const ticketActivityEntrySchema = new mongoose_1.Schema({
@@ -63,6 +72,7 @@ const ticketActivityEntrySchema = new mongoose_1.Schema({
63
72
  "reassigned",
64
73
  "message_added",
65
74
  "mentioned",
75
+ "linked",
66
76
  ],
67
77
  required: true,
68
78
  },
@@ -79,16 +89,18 @@ const ticketSchema = new mongoose_1.Schema({
79
89
  immutable: true,
80
90
  index: true,
81
91
  },
92
+ // Not schema-required -- an email-sourced ticket from an unrecognized sender is saved with
93
+ // neither set, sitting in the "needs review" pool until an agent links it (or a future match
94
+ // fills them in automatically). The pre-validate hook below still requires both for a
95
+ // dashboard-created ticket, where the owner is always known at creation time.
82
96
  ownerType: {
83
97
  type: String,
84
98
  enum: ["Company", "Partner"],
85
- required: [true, "Ticket owner type is required"],
86
99
  index: true,
87
100
  },
88
101
  ownerId: {
89
102
  type: mongoose_1.Schema.Types.ObjectId,
90
103
  refPath: "ownerType",
91
- required: [true, "Ticket owner is required"],
92
104
  index: true,
93
105
  },
94
106
  source: {
@@ -100,9 +112,18 @@ const ticketSchema = new mongoose_1.Schema({
100
112
  category: {
101
113
  type: String,
102
114
  enum: [
115
+ // Client -- current taxonomy
103
116
  "dispute-billable-lead",
104
- "chat-dispute",
105
117
  "invoice-dispute",
118
+ "technical-support",
119
+ "account-support",
120
+ // Client -- legacy, kept valid for old tickets only (never offered on new-ticket forms)
121
+ "chat-dispute",
122
+ // Partner -- current taxonomy
123
+ "failed-withdrawal",
124
+ "failed-transfer",
125
+ // "technical-support"/"account-support" above are shared with Client
126
+ // Partner -- legacy, kept valid for old tickets only
106
127
  "dashboard-technical-issue",
107
128
  "payout-issue",
108
129
  "referral-issue",
@@ -111,8 +132,10 @@ const ticketSchema = new mongoose_1.Schema({
111
132
  ],
112
133
  index: true,
113
134
  },
135
+ subCategory: { type: String, trim: true, maxlength: 100 },
114
136
  disputeReason: { type: String, trim: true, maxlength: 150 },
115
137
  chatId: { type: String, trim: true, maxlength: 150 },
138
+ leadId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Lead" },
116
139
  invoiceId: { type: String, trim: true, maxlength: 150 },
117
140
  description: {
118
141
  type: String,
@@ -177,8 +200,21 @@ const ticketSchema = new mongoose_1.Schema({
177
200
  toJSON: { virtuals: true },
178
201
  toObject: { virtuals: true },
179
202
  });
180
- const CLIENT_ONLY_CATEGORIES = ["dispute-billable-lead", "chat-dispute", "invoice-dispute"];
203
+ // "technical-support"/"account-support" are shared category values, valid on both dashboards --
204
+ // deliberately listed in both arrays below rather than pulled out, so each array alone still
205
+ // reads as "every category this ownerType may use."
206
+ const CLIENT_ONLY_CATEGORIES = [
207
+ "dispute-billable-lead",
208
+ "chat-dispute",
209
+ "invoice-dispute",
210
+ "technical-support",
211
+ "account-support",
212
+ ];
181
213
  const PARTNER_ONLY_CATEGORIES = [
214
+ "failed-withdrawal",
215
+ "failed-transfer",
216
+ "technical-support",
217
+ "account-support",
182
218
  "dashboard-technical-issue",
183
219
  "payout-issue",
184
220
  "referral-issue",
@@ -187,6 +223,10 @@ const PARTNER_ONLY_CATEGORIES = [
187
223
  ];
188
224
  ticketSchema.pre("validate", function () {
189
225
  if (this.source === "dashboard") {
226
+ if (!this.ownerType || !this.ownerId) {
227
+ this.invalidate("ownerType", "A dashboard-created ticket must have a known owner");
228
+ return;
229
+ }
190
230
  if (!this.category) {
191
231
  this.invalidate("category", "Ticket category is required");
192
232
  return;
@@ -214,6 +254,9 @@ ticketSchema.pre("validate", function () {
214
254
  this.invalidate("invoiceId", "Invoice ID is required");
215
255
  }
216
256
  }
257
+ if (this.source === "email" && !this.requesterEmail) {
258
+ this.invalidate("requesterEmail", "An email-sourced ticket must record the sender's address");
259
+ }
217
260
  });
218
261
  ticketSchema.pre("save", async function () {
219
262
  if (!this.isNew || this.ticketId)
@@ -0,0 +1,18 @@
1
+ import { ITicket, ITicketMessage } from "../interfaces/ticket.interface";
2
+ /**
3
+ * The single place that decides what a Client/Partner Dashboard is allowed to see about their
4
+ * own ticket. Used by client-backend's and partner-dashboard-backend's ticket controllers on
5
+ * every response that includes a ticket -- previously each backend only filtered internal
6
+ * messages (isInternal) and still returned the whole rest of the document as-is, which leaked
7
+ * Ops-internal fields the requester was never meant to see: activityLog (reassignment history
8
+ * and internal actor names), followerIds/assigneeId (raw Ops User references), and priority (an
9
+ * internal triage signal, not something a requester should read into). None of that is exposed
10
+ * anywhere in either dashboard's own UI today, but the raw API response carried it regardless --
11
+ * open to anyone opening devtools. This is a plain object mutation (works on both a Mongoose
12
+ * document's `.toObject()`/`.lean()` result and a plain object), not a defensive copy -- callers
13
+ * that still need the untouched ticket for their own internal use should sanitize a clone.
14
+ */
15
+ export declare function sanitizeTicketForRequester<T extends Partial<ITicket> & {
16
+ messages?: ITicketMessage[];
17
+ }>(ticket: T | null | undefined): T | null | undefined;
18
+ //# sourceMappingURL=ticketSanitize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ticketSanitize.d.ts","sourceRoot":"","sources":["../../src/utils/ticketSanitize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,OAAO,CAAC,OAAO,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAA;CAAE,EACrG,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAC3B,CAAC,GAAG,IAAI,GAAG,SAAS,CAkBtB"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sanitizeTicketForRequester = sanitizeTicketForRequester;
4
+ /**
5
+ * The single place that decides what a Client/Partner Dashboard is allowed to see about their
6
+ * own ticket. Used by client-backend's and partner-dashboard-backend's ticket controllers on
7
+ * every response that includes a ticket -- previously each backend only filtered internal
8
+ * messages (isInternal) and still returned the whole rest of the document as-is, which leaked
9
+ * Ops-internal fields the requester was never meant to see: activityLog (reassignment history
10
+ * and internal actor names), followerIds/assigneeId (raw Ops User references), and priority (an
11
+ * internal triage signal, not something a requester should read into). None of that is exposed
12
+ * anywhere in either dashboard's own UI today, but the raw API response carried it regardless --
13
+ * open to anyone opening devtools. This is a plain object mutation (works on both a Mongoose
14
+ * document's `.toObject()`/`.lean()` result and a plain object), not a defensive copy -- callers
15
+ * that still need the untouched ticket for their own internal use should sanitize a clone.
16
+ */
17
+ function sanitizeTicketForRequester(ticket) {
18
+ if (!ticket)
19
+ return ticket;
20
+ if (Array.isArray(ticket.messages)) {
21
+ ticket.messages = ticket.messages
22
+ .filter((m) => !m.isInternal)
23
+ .map((m) => {
24
+ const { mentionedUserIds, ...rest } = m;
25
+ return rest;
26
+ });
27
+ }
28
+ delete ticket.activityLog;
29
+ delete ticket.followerIds;
30
+ delete ticket.assigneeId;
31
+ delete ticket.priority;
32
+ return ticket;
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbitx-core-models",
3
- "version": "11.141.0",
3
+ "version": "11.143.0",
4
4
  "description": "Shared Mongoose models and interfaces for OrbitX services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",