orbitx-core-models 11.141.0 → 11.142.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
@@ -71,11 +71,13 @@ import { ILoginOtp } from "./interfaces/loginOtp.interface";
71
71
  import { IEmployee } from "./interfaces/employee.interface";
72
72
  import { ICallSession, CallSessionStatus, CallSessionDirection } from "./interfaces/callSession.interface";
73
73
  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";
74
+ 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";
75
+ 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
76
  import { IRole } from "./interfaces/role.interface";
76
77
  import { IAiSummarySettings, IAiSummaryExample, IAiSummaryUsage, AiSummaryLength } from "./interfaces/aiSummary.interface";
77
78
  import { IUpdate, UpdateDashboard, UpdateAudience, UpdateType } from "./interfaces/update.interface";
78
79
  import { TicketRoutingInput, TicketRoutingResult } from "./routing/ticketRouting";
80
+ import { sanitizeTicketForRequester } from "./utils/ticketSanitize";
79
81
  import { Dashboard, PermissionNode, DASHBOARDS } from "./permissions/types";
80
82
  import { opsTree } from "./permissions/trees/ops.tree";
81
83
  import { employeeTree } from "./permissions/trees/employee.tree";
@@ -84,6 +86,6 @@ import { clientTree } from "./permissions/trees/client.tree";
84
86
  import { getTree, getAllKeys, getParentKey, getAncestorKeys } from "./permissions/treeUtils";
85
87
  import { resolveEffectivePermissions, hasPermission, validateGrantedKeys, validateExtraKeys, getFullAccessKeys, PermissionSource, ValidationResult } from "./permissions/resolve";
86
88
  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, };
89
+ 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, 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, };
90
+ 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, 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
91
  //# 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,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAA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Q,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,OAAO,EACP,yBAAyB,EACzB,OAAO,EACP,UAAU,EACV,YAAY,EACZ,KAAK,EACL,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,QAAQ,EACR,KAAK,EACL,WAAW,EACX,MAAM,EACN,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,MAAM,EACN,MAAM,EACN,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,OAAO,EACP,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,KAAK,EACL,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,OAAO,EACP,eAAe,EACf,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,GACT,CAAC"}
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,wBAA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,KAAK,EACL,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,QAAQ,EACR,KAAK,EACL,WAAW,EACX,MAAM,EACN,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,MAAM,EACN,MAAM,EACN,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,OAAO,EACP,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,KAAK,EACL,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,OAAO,EACP,eAAe,EACf,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,GACT,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,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.Role = 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.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 = 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; } });
@@ -91,7 +91,18 @@ Object.defineProperty(exports, "REQUEST_SUBCATEGORIES_BY_CATEGORY", { enumerable
91
91
  const ticket_interface_1 = require("./interfaces/ticket.interface");
92
92
  Object.defineProperty(exports, "TICKET_STATUS_CLIENT_VIEW", { enumerable: true, get: function () { return ticket_interface_1.TICKET_STATUS_CLIENT_VIEW; } });
93
93
  Object.defineProperty(exports, "CLIENT_TICKET_CATEGORIES", { enumerable: true, get: function () { return ticket_interface_1.CLIENT_TICKET_CATEGORIES; } });
94
+ Object.defineProperty(exports, "CLIENT_TICKET_CATEGORIES_LEGACY", { enumerable: true, get: function () { return ticket_interface_1.CLIENT_TICKET_CATEGORIES_LEGACY; } });
94
95
  Object.defineProperty(exports, "PARTNER_TICKET_CATEGORIES", { enumerable: true, get: function () { return ticket_interface_1.PARTNER_TICKET_CATEGORIES; } });
96
+ Object.defineProperty(exports, "PARTNER_TICKET_CATEGORIES_LEGACY", { enumerable: true, get: function () { return ticket_interface_1.PARTNER_TICKET_CATEGORIES_LEGACY; } });
97
+ const ticketCategories_1 = require("./constants/ticketCategories");
98
+ Object.defineProperty(exports, "CLIENT_TICKET_CATEGORY_OPTIONS", { enumerable: true, get: function () { return ticketCategories_1.CLIENT_TICKET_CATEGORY_OPTIONS; } });
99
+ Object.defineProperty(exports, "PARTNER_TICKET_CATEGORY_OPTIONS", { enumerable: true, get: function () { return ticketCategories_1.PARTNER_TICKET_CATEGORY_OPTIONS; } });
100
+ Object.defineProperty(exports, "CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY", { enumerable: true, get: function () { return ticketCategories_1.CLIENT_TICKET_CATEGORY_OPTIONS_LEGACY; } });
101
+ Object.defineProperty(exports, "PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY", { enumerable: true, get: function () { return ticketCategories_1.PARTNER_TICKET_CATEGORY_OPTIONS_LEGACY; } });
102
+ Object.defineProperty(exports, "ALL_TICKET_CATEGORY_OPTIONS", { enumerable: true, get: function () { return ticketCategories_1.ALL_TICKET_CATEGORY_OPTIONS; } });
103
+ Object.defineProperty(exports, "findTicketCategoryOption", { enumerable: true, get: function () { return ticketCategories_1.findTicketCategoryOption; } });
104
+ const ticketSanitize_1 = require("./utils/ticketSanitize");
105
+ Object.defineProperty(exports, "sanitizeTicketForRequester", { enumerable: true, get: function () { return ticketSanitize_1.sanitizeTicketForRequester; } });
95
106
  // PERMISSIONS
96
107
  const types_1 = require("./permissions/types");
97
108
  Object.defineProperty(exports, "DASHBOARDS", { enumerable: true, get: function () { return types_1.DASHBOARDS; } });
@@ -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
  /**
@@ -73,6 +87,12 @@ 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 {
@@ -82,11 +102,21 @@ export interface ITicket extends Document {
82
102
  source: TicketSource;
83
103
  /** Required when source is "dashboard"; left unset for "email" until an agent triages it. */
84
104
  category?: TicketCategory;
105
+ /** The category's own sub-reason, e.g. dispute-billable-lead's Out of Service/Out of
106
+ * Coverage/Invalid, or technical-support's/account-support's issue type. See
107
+ * TICKET_CATEGORY_OPTIONS in constants/ticketCategories.ts for the valid list per category --
108
+ * not every category has sub-categories, so this is left unset for those. */
109
+ subCategory?: string;
85
110
  /** Client dashboard, dispute-billable-lead / chat-dispute only */
86
111
  disputeReason?: string;
87
112
  /** Client dashboard, dispute-billable-lead / chat-dispute only */
88
113
  chatId?: string;
89
- /** Client dashboard, invoice-dispute only -- free-text reference, matches the UI's free-text field */
114
+ /** The lead this ticket disputes, when raised from the client's own Lead record (locked, not
115
+ * free text) -- distinct from the free-text `chatId` display field. See raiseDispute in
116
+ * client-backend's dispute.service.js. */
117
+ leadId?: Types.ObjectId;
118
+ /** Client dashboard invoice-dispute, and Partner dashboard failed-withdrawal/failed-transfer
119
+ * where it applies -- free-text reference, matches the UI's free-text/picker field. */
90
120
  invoiceId?: string;
91
121
  description?: string;
92
122
  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,wBAA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3B,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC;IACxB,MAAM,EAAE,YAAY,CAAC;IACrB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B;;;iFAG6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;8CAE0C;IAC1C,MAAM,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACxB;2FACuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC7B,gGAAgG;IAChG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,cAAc,CAAC;IACzB;sFACkF;IAClF,UAAU,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC5B;+EAC2E;IAC3E,WAAW,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC/B,6GAA6G;IAC7G,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,UAAU,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC5B,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
@@ -1,12 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TICKET_STATUS_CLIENT_VIEW = exports.PARTNER_TICKET_CATEGORIES = 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",
@@ -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;AAwPxC,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({
@@ -100,9 +109,18 @@ const ticketSchema = new mongoose_1.Schema({
100
109
  category: {
101
110
  type: String,
102
111
  enum: [
112
+ // Client -- current taxonomy
103
113
  "dispute-billable-lead",
104
- "chat-dispute",
105
114
  "invoice-dispute",
115
+ "technical-support",
116
+ "account-support",
117
+ // Client -- legacy, kept valid for old tickets only (never offered on new-ticket forms)
118
+ "chat-dispute",
119
+ // Partner -- current taxonomy
120
+ "failed-withdrawal",
121
+ "failed-transfer",
122
+ // "technical-support"/"account-support" above are shared with Client
123
+ // Partner -- legacy, kept valid for old tickets only
106
124
  "dashboard-technical-issue",
107
125
  "payout-issue",
108
126
  "referral-issue",
@@ -111,8 +129,10 @@ const ticketSchema = new mongoose_1.Schema({
111
129
  ],
112
130
  index: true,
113
131
  },
132
+ subCategory: { type: String, trim: true, maxlength: 100 },
114
133
  disputeReason: { type: String, trim: true, maxlength: 150 },
115
134
  chatId: { type: String, trim: true, maxlength: 150 },
135
+ leadId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Lead" },
116
136
  invoiceId: { type: String, trim: true, maxlength: 150 },
117
137
  description: {
118
138
  type: String,
@@ -177,8 +197,21 @@ const ticketSchema = new mongoose_1.Schema({
177
197
  toJSON: { virtuals: true },
178
198
  toObject: { virtuals: true },
179
199
  });
180
- const CLIENT_ONLY_CATEGORIES = ["dispute-billable-lead", "chat-dispute", "invoice-dispute"];
200
+ // "technical-support"/"account-support" are shared category values, valid on both dashboards --
201
+ // deliberately listed in both arrays below rather than pulled out, so each array alone still
202
+ // reads as "every category this ownerType may use."
203
+ const CLIENT_ONLY_CATEGORIES = [
204
+ "dispute-billable-lead",
205
+ "chat-dispute",
206
+ "invoice-dispute",
207
+ "technical-support",
208
+ "account-support",
209
+ ];
181
210
  const PARTNER_ONLY_CATEGORIES = [
211
+ "failed-withdrawal",
212
+ "failed-transfer",
213
+ "technical-support",
214
+ "account-support",
182
215
  "dashboard-technical-issue",
183
216
  "payout-issue",
184
217
  "referral-issue",
@@ -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.142.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",