@kohost/api-client 7.7.1 → 7.8.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.
Files changed (239) hide show
  1. package/dist/lib/bills.d.ts +74 -0
  2. package/dist/lib/bills.js +83 -0
  3. package/dist/lib/bills.js.map +1 -0
  4. package/dist/lib/deviceNotifications.js +1 -4
  5. package/dist/lib/deviceNotifications.js.map +1 -1
  6. package/dist/lib/index.d.ts +4 -0
  7. package/dist/lib/index.js +27 -2
  8. package/dist/lib/index.js.map +1 -1
  9. package/dist/lib/kfcStatsWindow.d.ts +37 -0
  10. package/dist/lib/kfcStatsWindow.js +46 -0
  11. package/dist/lib/kfcStatsWindow.js.map +1 -0
  12. package/dist/lib/lowerBoundTable.d.ts +11 -0
  13. package/dist/lib/lowerBoundTable.js +28 -0
  14. package/dist/lib/lowerBoundTable.js.map +1 -0
  15. package/dist/lib/money.d.ts +61 -0
  16. package/dist/lib/money.js +80 -0
  17. package/dist/lib/money.js.map +1 -0
  18. package/dist/lib/policy-resolvers.js +5 -4
  19. package/dist/lib/policy-resolvers.js.map +1 -1
  20. package/dist/lib/ticketRichText.d.ts +35 -0
  21. package/dist/lib/ticketRichText.js +86 -0
  22. package/dist/lib/ticketRichText.js.map +1 -0
  23. package/dist/models/bill.d.ts +17 -0
  24. package/dist/models/bill.js +37 -0
  25. package/dist/models/bill.js.map +1 -0
  26. package/dist/models/billingCategory.d.ts +17 -0
  27. package/dist/models/billingCategory.js +22 -0
  28. package/dist/models/billingCategory.js.map +1 -0
  29. package/dist/models/index.d.ts +2 -1
  30. package/dist/models/index.js +5 -3
  31. package/dist/models/index.js.map +1 -1
  32. package/dist/models/organization.js +4 -0
  33. package/dist/models/organization.js.map +1 -1
  34. package/dist/models/ticket.js +5 -0
  35. package/dist/models/ticket.js.map +1 -1
  36. package/dist/schemas/bill.d.ts +255 -0
  37. package/dist/schemas/bill.js +248 -0
  38. package/dist/schemas/bill.js.map +1 -0
  39. package/dist/schemas/billingCategory.d.ts +46 -0
  40. package/dist/schemas/billingCategory.js +38 -0
  41. package/dist/schemas/billingCategory.js.map +1 -0
  42. package/dist/schemas/definitions.d.ts +2 -2
  43. package/dist/schemas/definitions.js +3 -1
  44. package/dist/schemas/definitions.js.map +1 -1
  45. package/dist/schemas/index.d.ts +2 -1
  46. package/dist/schemas/index.js +3 -2
  47. package/dist/schemas/organization.d.ts +112 -1
  48. package/dist/schemas/organization.js +93 -0
  49. package/dist/schemas/organization.js.map +1 -1
  50. package/dist/schemas/property.d.ts +32 -0
  51. package/dist/schemas/property.js +26 -0
  52. package/dist/schemas/property.js.map +1 -1
  53. package/dist/schemas/ticket.d.ts +381 -3
  54. package/dist/schemas/ticket.js +419 -1
  55. package/dist/schemas/ticket.js.map +1 -1
  56. package/dist/useCases/acknowledgeCostDivergence.d.ts +39 -0
  57. package/dist/useCases/acknowledgeCostDivergence.js +47 -0
  58. package/dist/useCases/acknowledgeCostDivergence.js.map +1 -0
  59. package/dist/useCases/addBillLine.d.ts +36 -0
  60. package/dist/useCases/addBillLine.js +47 -0
  61. package/dist/useCases/addBillLine.js.map +1 -0
  62. package/dist/useCases/addStaffFunctionMember.d.ts +39 -0
  63. package/dist/useCases/addStaffFunctionMember.js +47 -0
  64. package/dist/useCases/addStaffFunctionMember.js.map +1 -0
  65. package/dist/useCases/cancelWorkItem.d.ts +39 -0
  66. package/dist/useCases/cancelWorkItem.js +47 -0
  67. package/dist/useCases/cancelWorkItem.js.map +1 -0
  68. package/dist/useCases/clearWorkItemNoCharge.d.ts +39 -0
  69. package/dist/useCases/clearWorkItemNoCharge.js +47 -0
  70. package/dist/useCases/clearWorkItemNoCharge.js.map +1 -0
  71. package/dist/useCases/createBill.d.ts +27 -0
  72. package/dist/useCases/createBill.js +47 -0
  73. package/dist/useCases/createBill.js.map +1 -0
  74. package/dist/useCases/createBillingCategory.d.ts +27 -0
  75. package/dist/useCases/createBillingCategory.js +47 -0
  76. package/dist/useCases/createBillingCategory.js.map +1 -0
  77. package/dist/useCases/decideApproval.d.ts +39 -0
  78. package/dist/useCases/decideApproval.js +47 -0
  79. package/dist/useCases/decideApproval.js.map +1 -0
  80. package/dist/useCases/deleteBill.d.ts +36 -0
  81. package/dist/useCases/deleteBill.js +47 -0
  82. package/dist/useCases/deleteBill.js.map +1 -0
  83. package/dist/useCases/deleteStaffUser.d.ts +36 -0
  84. package/dist/useCases/deleteStaffUser.js +47 -0
  85. package/dist/useCases/deleteStaffUser.js.map +1 -0
  86. package/dist/useCases/describeBill.d.ts +36 -0
  87. package/dist/useCases/describeBill.js +47 -0
  88. package/dist/useCases/describeBill.js.map +1 -0
  89. package/dist/useCases/describeConciergeFacilitiesViewer.d.ts +27 -0
  90. package/dist/useCases/describeConciergeFacilitiesViewer.js +47 -0
  91. package/dist/useCases/describeConciergeFacilitiesViewer.js.map +1 -0
  92. package/dist/useCases/describeConciergeStatsFilters.d.ts +27 -0
  93. package/dist/useCases/describeConciergeStatsFilters.js +47 -0
  94. package/dist/useCases/describeConciergeStatsFilters.js.map +1 -0
  95. package/dist/useCases/describeConciergeStatsHeatmap.d.ts +27 -0
  96. package/dist/useCases/describeConciergeStatsHeatmap.js +47 -0
  97. package/dist/useCases/describeConciergeStatsHeatmap.js.map +1 -0
  98. package/dist/useCases/describeConciergeStatsSummary.d.ts +27 -0
  99. package/dist/useCases/describeConciergeStatsSummary.js +47 -0
  100. package/dist/useCases/describeConciergeStatsSummary.js.map +1 -0
  101. package/dist/useCases/describeConciergeStatsTickets.d.ts +27 -0
  102. package/dist/useCases/describeConciergeStatsTickets.js +47 -0
  103. package/dist/useCases/describeConciergeStatsTickets.js.map +1 -0
  104. package/dist/useCases/describeConciergeWorkspaceFilters.d.ts +27 -0
  105. package/dist/useCases/describeConciergeWorkspaceFilters.js +47 -0
  106. package/dist/useCases/describeConciergeWorkspaceFilters.js.map +1 -0
  107. package/dist/useCases/describeOrganizationBill.d.ts +36 -0
  108. package/dist/useCases/describeOrganizationBill.js +47 -0
  109. package/dist/useCases/describeOrganizationBill.js.map +1 -0
  110. package/dist/useCases/describeSelfAccess.d.ts +27 -0
  111. package/dist/useCases/describeSelfAccess.js +47 -0
  112. package/dist/useCases/describeSelfAccess.js.map +1 -0
  113. package/dist/useCases/describeStaffFunctions.d.ts +27 -0
  114. package/dist/useCases/describeStaffFunctions.js +47 -0
  115. package/dist/useCases/describeStaffFunctions.js.map +1 -0
  116. package/dist/useCases/describeTicketStatsFilters.d.ts +27 -0
  117. package/dist/useCases/describeTicketStatsFilters.js +47 -0
  118. package/dist/useCases/describeTicketStatsFilters.js.map +1 -0
  119. package/dist/useCases/describeTicketStatsHeatmap.d.ts +27 -0
  120. package/dist/useCases/describeTicketStatsHeatmap.js +47 -0
  121. package/dist/useCases/describeTicketStatsHeatmap.js.map +1 -0
  122. package/dist/useCases/describeTicketStatsSummary.d.ts +27 -0
  123. package/dist/useCases/describeTicketStatsSummary.js +47 -0
  124. package/dist/useCases/describeTicketStatsSummary.js.map +1 -0
  125. package/dist/useCases/describeTicketStatsTickets.d.ts +27 -0
  126. package/dist/useCases/describeTicketStatsTickets.js +47 -0
  127. package/dist/useCases/describeTicketStatsTickets.js.map +1 -0
  128. package/dist/useCases/editCostEntry.d.ts +39 -0
  129. package/dist/useCases/editCostEntry.js +47 -0
  130. package/dist/useCases/editCostEntry.js.map +1 -0
  131. package/dist/useCases/index.d.ts +57 -0
  132. package/dist/useCases/index.js +116 -2
  133. package/dist/useCases/index.js.map +1 -1
  134. package/dist/useCases/listBillingCategories.d.ts +27 -0
  135. package/dist/useCases/listBillingCategories.js +47 -0
  136. package/dist/useCases/listBillingCategories.js.map +1 -0
  137. package/dist/useCases/listBills.d.ts +27 -0
  138. package/dist/useCases/listBills.js +47 -0
  139. package/dist/useCases/listBills.js.map +1 -0
  140. package/dist/useCases/listConciergeUninvoicedCosts.d.ts +27 -0
  141. package/dist/useCases/listConciergeUninvoicedCosts.js +47 -0
  142. package/dist/useCases/listConciergeUninvoicedCosts.js.map +1 -0
  143. package/dist/useCases/listConciergeWorkspaceBills.d.ts +27 -0
  144. package/dist/useCases/listConciergeWorkspaceBills.js +47 -0
  145. package/dist/useCases/listConciergeWorkspaceBills.js.map +1 -0
  146. package/dist/useCases/listConciergeWorkspaceTickets.d.ts +27 -0
  147. package/dist/useCases/listConciergeWorkspaceTickets.js +47 -0
  148. package/dist/useCases/listConciergeWorkspaceTickets.js.map +1 -0
  149. package/dist/useCases/listEligibleApprovers.d.ts +36 -0
  150. package/dist/useCases/listEligibleApprovers.js +47 -0
  151. package/dist/useCases/listEligibleApprovers.js.map +1 -0
  152. package/dist/useCases/listFacilitiesStaffIds.d.ts +27 -0
  153. package/dist/useCases/listFacilitiesStaffIds.js +47 -0
  154. package/dist/useCases/listFacilitiesStaffIds.js.map +1 -0
  155. package/dist/useCases/listKohostStaff.d.ts +27 -0
  156. package/dist/useCases/listKohostStaff.js +47 -0
  157. package/dist/useCases/listKohostStaff.js.map +1 -0
  158. package/dist/useCases/listOrganizationBills.d.ts +27 -0
  159. package/dist/useCases/listOrganizationBills.js +47 -0
  160. package/dist/useCases/listOrganizationBills.js.map +1 -0
  161. package/dist/useCases/markBillPaid.d.ts +36 -0
  162. package/dist/useCases/markBillPaid.js +47 -0
  163. package/dist/useCases/markBillPaid.js.map +1 -0
  164. package/dist/useCases/markBillSent.d.ts +36 -0
  165. package/dist/useCases/markBillSent.js +47 -0
  166. package/dist/useCases/markBillSent.js.map +1 -0
  167. package/dist/useCases/previewBill.d.ts +36 -0
  168. package/dist/useCases/previewBill.js +47 -0
  169. package/dist/useCases/previewBill.js.map +1 -0
  170. package/dist/useCases/recordCostActual.d.ts +39 -0
  171. package/dist/useCases/recordCostActual.js +47 -0
  172. package/dist/useCases/recordCostActual.js.map +1 -0
  173. package/dist/useCases/recordCostEntry.d.ts +36 -0
  174. package/dist/useCases/recordCostEntry.js +47 -0
  175. package/dist/useCases/recordCostEntry.js.map +1 -0
  176. package/dist/useCases/reinstateCostEntry.d.ts +39 -0
  177. package/dist/useCases/reinstateCostEntry.js +47 -0
  178. package/dist/useCases/reinstateCostEntry.js.map +1 -0
  179. package/dist/useCases/removeBillLine.d.ts +39 -0
  180. package/dist/useCases/removeBillLine.js +47 -0
  181. package/dist/useCases/removeBillLine.js.map +1 -0
  182. package/dist/useCases/removeStaffFunctionMember.d.ts +39 -0
  183. package/dist/useCases/removeStaffFunctionMember.js +47 -0
  184. package/dist/useCases/removeStaffFunctionMember.js.map +1 -0
  185. package/dist/useCases/requestApproval.d.ts +36 -0
  186. package/dist/useCases/requestApproval.js +47 -0
  187. package/dist/useCases/requestApproval.js.map +1 -0
  188. package/dist/useCases/rescheduleWorkItem.d.ts +39 -0
  189. package/dist/useCases/rescheduleWorkItem.js +47 -0
  190. package/dist/useCases/rescheduleWorkItem.js.map +1 -0
  191. package/dist/useCases/scheduleWorkItem.d.ts +36 -0
  192. package/dist/useCases/scheduleWorkItem.js +47 -0
  193. package/dist/useCases/scheduleWorkItem.js.map +1 -0
  194. package/dist/useCases/setCostVendorInvoice.d.ts +39 -0
  195. package/dist/useCases/setCostVendorInvoice.js +47 -0
  196. package/dist/useCases/setCostVendorInvoice.js.map +1 -0
  197. package/dist/useCases/setUserSuperAdmin.d.ts +36 -0
  198. package/dist/useCases/setUserSuperAdmin.js +47 -0
  199. package/dist/useCases/setUserSuperAdmin.js.map +1 -0
  200. package/dist/useCases/setWorkItemNoCharge.d.ts +39 -0
  201. package/dist/useCases/setWorkItemNoCharge.js +47 -0
  202. package/dist/useCases/setWorkItemNoCharge.js.map +1 -0
  203. package/dist/useCases/updateBill.d.ts +36 -0
  204. package/dist/useCases/updateBill.js +47 -0
  205. package/dist/useCases/updateBill.js.map +1 -0
  206. package/dist/useCases/updateBillLine.d.ts +39 -0
  207. package/dist/useCases/updateBillLine.js +47 -0
  208. package/dist/useCases/updateBillLine.js.map +1 -0
  209. package/dist/useCases/updateBillingCategory.d.ts +36 -0
  210. package/dist/useCases/updateBillingCategory.js +47 -0
  211. package/dist/useCases/updateBillingCategory.js.map +1 -0
  212. package/dist/useCases/updateOrganizationBillingAddress.d.ts +36 -0
  213. package/dist/useCases/updateOrganizationBillingAddress.js +47 -0
  214. package/dist/useCases/updateOrganizationBillingAddress.js.map +1 -0
  215. package/dist/useCases/updateOrganizationBillingContacts.d.ts +36 -0
  216. package/dist/useCases/updateOrganizationBillingContacts.js +47 -0
  217. package/dist/useCases/updateOrganizationBillingContacts.js.map +1 -0
  218. package/dist/useCases/updateOrganizationTaxExempt.d.ts +36 -0
  219. package/dist/useCases/updateOrganizationTaxExempt.js +47 -0
  220. package/dist/useCases/updateOrganizationTaxExempt.js.map +1 -0
  221. package/dist/useCases/updateStaffUser.d.ts +36 -0
  222. package/dist/useCases/updateStaffUser.js +47 -0
  223. package/dist/useCases/updateStaffUser.js.map +1 -0
  224. package/dist/useCases/voidBill.d.ts +36 -0
  225. package/dist/useCases/voidBill.js +47 -0
  226. package/dist/useCases/voidBill.js.map +1 -0
  227. package/dist/useCases/writeOffCostEntry.d.ts +39 -0
  228. package/dist/useCases/writeOffCostEntry.js +47 -0
  229. package/dist/useCases/writeOffCostEntry.js.map +1 -0
  230. package/dist/validate.d.ts +25 -8
  231. package/dist/validate.js +9 -4
  232. package/dist/validate.js.map +1 -1
  233. package/package.json +6 -6
  234. package/dist/models/order.d.ts +0 -17
  235. package/dist/models/order.js +0 -33
  236. package/dist/models/order.js.map +0 -1
  237. package/dist/schemas/order.d.ts +0 -186
  238. package/dist/schemas/order.js +0 -157
  239. package/dist/schemas/order.js.map +0 -1
@@ -166,7 +166,15 @@ const ticketSchema = {
166
166
  "priorityChanged",
167
167
  "scheduleDateChanged",
168
168
  "locationChanged",
169
- "nudged"
169
+ "nudged",
170
+ "approvalRequested",
171
+ "approvalApproved",
172
+ "approvalDenied",
173
+ "workScheduled",
174
+ "workRescheduled",
175
+ "workCanceled",
176
+ "costRecorded",
177
+ "costPriceChanged"
170
178
  ],
171
179
  default: "message",
172
180
  description: "The discriminator of the message."
@@ -533,6 +541,416 @@ const ticketSchema = {
533
541
  default: 0,
534
542
  description: "Server-derived count of transitions back to \"open\" that followed a solve/close. reopenCount > 0 answers \"was this ticket ever reopened?\" in O(1); maintained at the repository layer across every status-write path. Never set by clients."
535
543
  },
544
+ work: {
545
+ type: "array",
546
+ default: [],
547
+ description: "Work items scheduled on the ticket: who is coming, when, and what for. Many per ticket, including repeat visits by the same performer. Carries no lifecycle status — the conversation log is the history and a past-dated entry is implicitly done. Never redacted; vendor identity is already public in assignment.",
548
+ items: {
549
+ type: "object",
550
+ additionalProperties: false,
551
+ required: [
552
+ "id",
553
+ "performer",
554
+ "date"
555
+ ],
556
+ properties: {
557
+ id: {
558
+ type: "string",
559
+ description: "The ID of the work item."
560
+ },
561
+ performer: {
562
+ type: "object",
563
+ additionalProperties: false,
564
+ required: [
565
+ "id",
566
+ "discriminator",
567
+ "name"
568
+ ],
569
+ description: "Who is performing the work — a Vendor, or a staff User the work is scheduled to. A discriminated reference in the same shape as `assignedTo`, but orthogonal to it: `assignedTo` is who owns the ticket, this is who shows up for one visit.",
570
+ properties: {
571
+ id: {
572
+ type: "string",
573
+ description: "The ID of the performer."
574
+ },
575
+ discriminator: {
576
+ type: "string",
577
+ enum: ["vendor", "user"],
578
+ description: "The discriminator of the performer."
579
+ },
580
+ name: {
581
+ type: "string",
582
+ description: "The performer's name, denormalized at schedule time for rendering."
583
+ }
584
+ }
585
+ },
586
+ date: {
587
+ type: "string",
588
+ pattern: "^\\d{4}-\\d{2}-\\d{2}$",
589
+ description: "The calendar date of the visit as YYYY-MM-DD, read in the property's timezone."
590
+ },
591
+ time: {
592
+ type: ["string", "null"],
593
+ pattern: "^([01]\\d|2[0-3]):[0-5]\\d$",
594
+ default: null,
595
+ description: "The 24-hour local start time as HH:mm, or null for a day-only commitment. Day-only is first-class, not a missing value."
596
+ },
597
+ description: {
598
+ type: ["string", "null"],
599
+ default: null,
600
+ description: "What the visit is for, in the scheduler's words — the scope handed to whoever shows up. Optional: a booking with nothing to add carries null, and the performer and the slot are the whole record."
601
+ },
602
+ scheduledBy: {
603
+ type: ["string", "null"],
604
+ default: null,
605
+ description: "The ID of the user whose write created this work item. Null when the write was not user-attributable."
606
+ },
607
+ scheduledAt: {
608
+ $ref: "definitions.json#/definitions/date",
609
+ description: "When the work item was created."
610
+ },
611
+ noCharge: {
612
+ type: ["object", "null"],
613
+ additionalProperties: false,
614
+ required: ["setBy", "setAt"],
615
+ default: null,
616
+ description: "The explicit decision that this visit will never be billed, or null while no decision has been made. A disposition rather than a zero-dollar cost: nothing was charged, so there is no amount to record, and financial completion asks whether every visit is either billed or deliberately not. Reversible while the ticket is active; frozen once it closes.",
617
+ properties: {
618
+ setBy: {
619
+ type: ["string", "null"],
620
+ default: null,
621
+ description: "The ID of the user whose write set the disposition. Null when the write was not user-attributable."
622
+ },
623
+ setAt: {
624
+ $ref: "definitions.json#/definitions/date",
625
+ description: "When the disposition was set."
626
+ }
627
+ }
628
+ }
629
+ }
630
+ }
631
+ },
632
+ costs: {
633
+ type: "array",
634
+ default: [],
635
+ description: "Cost line items recorded on the ticket. Each entry stores the customer price and the vendor cost side by side and keeps them independent: the price is seeded from the estimate and markup at recording, and nothing about the vendor side moves it afterwards. Every entry arrives as either the full vendor shape or the redacted price-only shape depending on whether the viewer may see the cost split.",
636
+ items: { oneOf: [{
637
+ type: "object",
638
+ additionalProperties: false,
639
+ required: [
640
+ "id",
641
+ "description",
642
+ "currency",
643
+ "price",
644
+ "estimate",
645
+ "markup"
646
+ ],
647
+ properties: {
648
+ id: {
649
+ type: "string",
650
+ description: "The ID of the cost entry."
651
+ },
652
+ description: {
653
+ type: "string",
654
+ description: "What the cost covers."
655
+ },
656
+ currency: {
657
+ type: "string",
658
+ default: "USD",
659
+ description: "ISO 4217 currency code of the entry's amounts."
660
+ },
661
+ price: {
662
+ type: "object",
663
+ additionalProperties: false,
664
+ required: [
665
+ "amount",
666
+ "recordedBy",
667
+ "recordedAt"
668
+ ],
669
+ description: "The authoritative customer price of the entry — what the org is charged, what the approval gate totals, and what a bill line bills. Seeded at recording from the estimate and the markup, and from then on independent of all three: editing `estimate`, `actual`, or `markup` never moves it. Only an explicit price write does.",
670
+ properties: {
671
+ amount: {
672
+ type: "integer",
673
+ minimum: 0,
674
+ description: "Customer price in integer cents."
675
+ },
676
+ recordedBy: {
677
+ type: "string",
678
+ description: "The ID of the user who recorded the amount."
679
+ },
680
+ recordedAt: {
681
+ $ref: "definitions.json#/definitions/date",
682
+ description: "When the amount was recorded."
683
+ }
684
+ }
685
+ },
686
+ estimate: {
687
+ type: "object",
688
+ additionalProperties: false,
689
+ required: [
690
+ "amount",
691
+ "recordedBy",
692
+ "recordedAt"
693
+ ],
694
+ description: "The vendor cost estimate phase of the entry.",
695
+ properties: {
696
+ amount: {
697
+ type: "integer",
698
+ minimum: 0,
699
+ description: "Vendor cost estimate in integer cents."
700
+ },
701
+ recordedBy: {
702
+ type: "string",
703
+ description: "The ID of the user who recorded the amount."
704
+ },
705
+ recordedAt: {
706
+ $ref: "definitions.json#/definitions/date",
707
+ description: "When the amount was recorded."
708
+ }
709
+ }
710
+ },
711
+ actual: {
712
+ type: "object",
713
+ additionalProperties: false,
714
+ required: [
715
+ "amount",
716
+ "recordedBy",
717
+ "recordedAt"
718
+ ],
719
+ description: "The actual vendor cost phase of the entry, recorded after the work.",
720
+ properties: {
721
+ amount: {
722
+ type: "integer",
723
+ minimum: 0,
724
+ description: "Actual vendor cost in integer cents."
725
+ },
726
+ recordedBy: {
727
+ type: "string",
728
+ description: "The ID of the user who recorded the amount."
729
+ },
730
+ recordedAt: {
731
+ $ref: "definitions.json#/definitions/date",
732
+ description: "When the amount was recorded."
733
+ }
734
+ }
735
+ },
736
+ markup: {
737
+ type: "object",
738
+ additionalProperties: false,
739
+ required: ["percent"],
740
+ properties: {
741
+ percent: {
742
+ type: "number",
743
+ minimum: 0,
744
+ description: "Markup percent the initial price was quoted at, uncapped. Context for how that quote was arrived at, not the source of truth for any amount: `price` is stored, so re-keying this percent prices nothing."
745
+ },
746
+ custom: {
747
+ type: "boolean",
748
+ default: false,
749
+ description: "Whether the percent was manually overridden rather than keyed from the configured markup tiers. Custom percents are never re-keyed on estimate edits."
750
+ }
751
+ }
752
+ },
753
+ vendorInvoices: {
754
+ type: "array",
755
+ items: { $ref: "mediaFile.json" },
756
+ default: [],
757
+ description: "The vendor's paperwork backing the entry's amounts, attached around recording the actual (or later) — an invoice plus whatever came with it. Internal: the file-store cannot enforce roster-only reads, so the boundary is this field living on the full shape only — the redacted projection never carries it."
758
+ },
759
+ vendorInvoiceNumber: {
760
+ type: ["string", "null"],
761
+ default: null,
762
+ description: "The vendor's own invoice number. Internal, redacted org-side like the rest of the cost split."
763
+ },
764
+ vendorId: {
765
+ type: ["string", "null"],
766
+ default: null,
767
+ description: "The Vendor the cost came from. A plain reference — no rollups — recorded alongside the vendor invoice and redacted org-side with the rest of the cost split. Independent of `workItemId`: a vendor cost need not trace to a scheduled visit."
768
+ },
769
+ workItemId: {
770
+ type: ["string", "null"],
771
+ default: null,
772
+ description: "The Work item on this ticket that produced the cost. Many entries may name one visit, so a single trip's labor and materials can be itemized. Cleared when the Work item is removed — the money record outlives the scheduling record. Internal, redacted org-side."
773
+ },
774
+ categoryId: {
775
+ type: ["string", "null"],
776
+ default: null,
777
+ description: "The billing category classifying this cost, picked on the reconciliation pool before any bill claims the entry. `AddBillLine` snapshots it onto the claiming line, which owns its own category from then on. Internal, redacted org-side with the rest of the cost split."
778
+ },
779
+ billId: {
780
+ type: ["string", "null"],
781
+ default: null,
782
+ description: "Backlink to the bill whose draft claimed this cost as a line. Written when a draft bill adds the line, cleared on line removal, draft delete, or bill void; a claimed cost leaves the uninvoiced pool, making double-invoicing structurally impossible. Server-maintained at the repository, never set by clients."
783
+ },
784
+ writtenOff: {
785
+ type: "boolean",
786
+ default: false,
787
+ description: "Server-maintained denormalization of billingReview (approvalState pattern): true after a writtenOff entry until a reinstated entry follows. A written-off cost leaves the uninvoiced pool. Never set by clients."
788
+ },
789
+ billingReview: {
790
+ type: "array",
791
+ default: [],
792
+ description: "Append-only billing review history for the entry (approval-history pattern): reversible write-offs and billed-vs-price divergence acknowledgements. Internal, redacted org-side.",
793
+ items: {
794
+ type: "object",
795
+ additionalProperties: false,
796
+ required: [
797
+ "id",
798
+ "action",
799
+ "performedAt"
800
+ ],
801
+ properties: {
802
+ id: {
803
+ type: "string",
804
+ description: "The ID of the billing review entry."
805
+ },
806
+ action: {
807
+ type: "string",
808
+ enum: [
809
+ "writtenOff",
810
+ "reinstated",
811
+ "divergenceAcknowledged"
812
+ ]
813
+ },
814
+ performedBy: {
815
+ type: ["string", "null"],
816
+ default: null,
817
+ description: "The ID of the user whose write appended this entry. Null when the write was not user-attributable."
818
+ },
819
+ performedAt: {
820
+ $ref: "definitions.json#/definitions/date",
821
+ description: "When the entry was appended."
822
+ },
823
+ note: {
824
+ type: ["string", "null"],
825
+ default: null,
826
+ description: "Free-text rationale for the action."
827
+ },
828
+ billedAmount: {
829
+ type: "integer",
830
+ minimum: 0,
831
+ description: "divergenceAcknowledged only: the amount a bill line already charged for this entry, in integer cents, frozen at ack time."
832
+ },
833
+ priceAmount: {
834
+ type: "integer",
835
+ minimum: 0,
836
+ description: "divergenceAcknowledged only: the entry's stored customer price in integer cents at ack time. A divergence is a billed line that no longer matches the price behind it — a price corrected after the cost was claimed — so the ack silences this one pair and any later price move re-flags it. A vendor actual arriving after billing is not a divergence: it moves margin, not what the customer owes."
837
+ }
838
+ }
839
+ }
840
+ }
841
+ }
842
+ }, {
843
+ type: "object",
844
+ additionalProperties: false,
845
+ required: [
846
+ "id",
847
+ "description",
848
+ "currency",
849
+ "price"
850
+ ],
851
+ properties: {
852
+ id: {
853
+ type: "string",
854
+ description: "The ID of the cost entry."
855
+ },
856
+ description: {
857
+ type: "string",
858
+ description: "What the cost covers."
859
+ },
860
+ currency: {
861
+ type: "string",
862
+ default: "USD",
863
+ description: "ISO 4217 currency code of the entry's amounts."
864
+ },
865
+ price: {
866
+ type: "integer",
867
+ minimum: 0,
868
+ description: "The entry's stored customer price in integer cents — the whole of what an org-side viewer receives, flattened out of the stored price phase so none of its recording metadata comes with it."
869
+ }
870
+ }
871
+ }] }
872
+ },
873
+ approvals: {
874
+ type: "array",
875
+ default: [],
876
+ description: "Approval request history for the ticket. At most one pending record at a time; records are immutable once decided (enforced by use cases).",
877
+ items: {
878
+ type: "object",
879
+ additionalProperties: false,
880
+ required: [
881
+ "id",
882
+ "amount",
883
+ "approverUserIds",
884
+ "status",
885
+ "requestedAt"
886
+ ],
887
+ properties: {
888
+ id: {
889
+ type: "string",
890
+ description: "The ID of the approval record."
891
+ },
892
+ amount: {
893
+ type: "integer",
894
+ minimum: 0,
895
+ description: "The ticket's customer price total in integer cents, frozen at request time."
896
+ },
897
+ approverUserIds: {
898
+ type: "array",
899
+ minItems: 1,
900
+ items: { type: "string" },
901
+ description: "The effective approver set for this request, frozen at request time."
902
+ },
903
+ status: {
904
+ type: "string",
905
+ enum: [
906
+ "pending",
907
+ "approved",
908
+ "denied"
909
+ ],
910
+ default: "pending"
911
+ },
912
+ requestedAt: {
913
+ $ref: "definitions.json#/definitions/date",
914
+ description: "When the approval was requested."
915
+ },
916
+ requestedBy: {
917
+ type: ["string", "null"],
918
+ default: null,
919
+ description: "The ID of the user whose write created this request, frozen at request time. Null when the write was not user-attributable."
920
+ },
921
+ decidedBy: {
922
+ type: ["string", "null"],
923
+ default: null,
924
+ description: "The ID of the approver who decided the request."
925
+ },
926
+ decidedAt: {
927
+ anyOf: [{ $ref: "definitions.json#/definitions/date" }, { type: "null" }],
928
+ default: null,
929
+ description: "When the request was decided."
930
+ },
931
+ comment: {
932
+ type: ["string", "null"],
933
+ default: null,
934
+ description: "The decider's comment. Required on deny, optional on approve (enforced by use cases)."
935
+ }
936
+ }
937
+ }
938
+ },
939
+ dneAmount: {
940
+ type: ["integer", "null"],
941
+ minimum: 0,
942
+ description: "The effective do-not-exceed amount in integer cents the approval gate compares against, resolved per read from the organization and property Concierge settings. Never stored on the document and never set by clients; absent on payloads where it could not be resolved. Viewer-independent: the DNE is the customer's own contract term, so org-side viewers see it."
943
+ },
944
+ approvalState: {
945
+ type: "string",
946
+ enum: [
947
+ "clear",
948
+ "awaitingApproval",
949
+ "denied"
950
+ ],
951
+ default: "clear",
952
+ description: "Server-maintained denormalization of the approval gate, updated on every cost or approval write (reopenCount pattern) so queue filters get O(1) access. Never set by clients."
953
+ },
536
954
  tags: {
537
955
  type: "array",
538
956
  default: [],
@@ -1 +1 @@
1
- {"version":3,"file":"ticket.js","names":[],"sources":["../../.generated/schemas/ticket.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\n// Rich-text node vocabulary for parsedBody.content (ADR 0012). Deliberately\n// fixed-depth rather than recursive: json-schema-to-ts cannot derive types\n// from self-referencing schemas, so nested lists are excluded. These consts\n// must not be exported — the model generator treats the first export ending\n// in \"Schema\" as the entity schema.\nconst richTextTextNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"text\"],\n properties: {\n type: { type: \"string\", enum: [\"text\"] },\n text: { type: \"string\" },\n marks: {\n type: \"array\",\n uniqueItems: true,\n items: { type: \"string\", enum: [\"bold\", \"italic\", \"underline\"] },\n },\n },\n} as const;\n\nconst richTextMentionNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"id\", \"discriminator\", \"label\"],\n properties: {\n type: { type: \"string\", enum: [\"mention\"] },\n id: { type: \"string\" },\n discriminator: { type: \"string\", enum: [\"user\", \"vendor\", \"system\"] },\n label: {\n type: \"string\",\n description: \"Display name of the mentioned entity, without the leading @.\",\n },\n },\n} as const;\n\nconst richTextHardBreakNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\"],\n properties: {\n type: { type: \"string\", enum: [\"hardBreak\"] },\n },\n} as const;\n\nconst richTextInlineNodes = {\n type: \"array\",\n minItems: 1,\n items: {\n anyOf: [richTextTextNode, richTextMentionNode, richTextHardBreakNode],\n },\n} as const;\n\nconst richTextParagraphNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"paragraph\"] },\n content: richTextInlineNodes,\n },\n} as const;\n\nconst richTextListItemNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"listItem\"] },\n content: richTextInlineNodes,\n },\n} as const;\n\nconst richTextBulletListNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"bulletList\"] },\n content: { type: \"array\", minItems: 1, items: richTextListItemNode },\n },\n} as const;\n\nconst richTextOrderedListNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"orderedList\"] },\n content: { type: \"array\", minItems: 1, items: richTextListItemNode },\n },\n} as const;\n\nexport const ticketSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"ticket.json\",\n title: \"Ticket\",\n description: \"A ticket is a request from a user.\",\n type: \"object\",\n required: [\n \"id\",\n \"conversation\",\n \"requester\",\n \"openedBy\",\n \"assignedTo\",\n \"status\",\n \"priority\",\n \"tags\",\n \"createdAt\",\n \"updatedAt\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description: \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n enum: [\"ticket\"],\n default: \"ticket\",\n },\n number: {\n type: \"string\",\n description: \"The number of the ticket.\",\n },\n issueId: {\n type: \"string\",\n description: \"The ID of the issue that this ticket is associated with.\",\n },\n parentAutomationId: {\n type: \"string\",\n description: \"The ID of the automation that created this ticket.\",\n },\n conversation: {\n type: \"array\",\n default: [],\n description: \"The conversation history of the ticket.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"timestamp\", \"body\", \"author\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\n \"message\",\n \"opened\",\n \"assigned\",\n \"rated\",\n \"scheduled\",\n \"collaboratorAdded\",\n \"collaboratorRemoved\",\n \"statusChanged\",\n \"priorityChanged\",\n \"scheduleDateChanged\",\n \"locationChanged\",\n \"nudged\",\n ],\n default: \"message\",\n description: \"The discriminator of the message.\",\n },\n isInternal: {\n type: \"boolean\",\n description: \"Whether the message is internal to the assignedTo and collaborators. Internal messages are not visible to the requester.\",\n default: false,\n },\n author: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the author of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description: \"The discriminator of the author of the message.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the author of the message.\",\n },\n },\n },\n timestamp: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"The ISO 8601 timestamp of the message.\",\n },\n body: {\n type: \"string\",\n description: \"The body of the message.\",\n },\n parsedBody: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"An object containing the parsed body of the message for mentions.\",\n properties: {\n content: {\n type: \"array\",\n minItems: 1,\n description:\n \"Rich-text block nodes (ADR 0012). Present = rich message: `body` is the server-derived plain-text projection of this tree, and the legacy text/mentions fields are not written.\",\n items: {\n anyOf: [\n richTextParagraphNode,\n richTextBulletListNode,\n richTextOrderedListNode,\n ],\n },\n },\n text: {\n type: \"string\",\n description: \"The mention text (legacy tokenized format).\",\n },\n mentions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\n \"discriminator\",\n \"id\",\n \"index\",\n \"length\",\n \"originalText\",\n ],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the mention.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description:\n \"The discriminator of entity that was mentioned.\",\n },\n index: {\n type: \"integer\",\n description: \"The index of the mention in the message.\",\n },\n length: {\n type: \"integer\",\n description: \"The length of the mention in the message.\",\n },\n originalText: {\n type: \"string\",\n description: \"The original text of the mention.\",\n },\n },\n },\n },\n },\n },\n statusChanged: {\n type: \"object\",\n additionalProperties: false,\n required: [\"from\", \"to\"],\n description:\n \"Structured status transition for `statusChanged` entries. Lets consumers detect reopens (from solved/closed to open) without parsing the body text.\",\n properties: {\n from: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned from.\",\n },\n to: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned to.\",\n },\n },\n },\n readBy: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n description: \"The IDs of the users who have read the message.\",\n },\n media: {\n anyOf: [{ $ref: \"mediaFile.json\" }, { type: \"null\" }],\n description: \"The media file associated with the message.\",\n },\n attachments: {\n type: \"array\",\n items: { $ref: \"mediaFile.json\" },\n description:\n \"Files attached to the message. Supersedes the singular media.\",\n },\n },\n },\n },\n subject: {\n type: \"string\",\n description: \"The subject of the ticket.\",\n },\n openedBy: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"system\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n requester: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the requester.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\", \"device\"],\n description: \"The discriminator of the requester.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the requester.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the requester.\",\n },\n },\n },\n assignedTo: {\n type: [\"object\", \"null\"],\n default: null,\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the assigned to.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n description: \"The discriminator of the assigned to.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the assigned to.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the assigned to.\",\n },\n },\n },\n notify: {\n type: \"array\",\n description:\n \"A list of entities to notify when this ticket is created or resolved.\",\n default: [],\n items: {\n type: \"object\",\n required: [\"id\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the entity to notify.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\"],\n },\n },\n },\n },\n collaborators: {\n type: \"array\",\n default: [],\n description: \"A list of entities who will collaborate on this ticket.\",\n items: {\n type: \"object\",\n required: [\"id\", \"name\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n },\n },\n },\n },\n location: {\n type: \"object\",\n required: [\"discriminator\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"space\", \"property\", \"customText\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n status: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n default: \"open\",\n },\n priority: {\n type: \"string\",\n enum: [\"low\", \"normal\", \"high\", \"critical\"],\n default: \"normal\",\n },\n priorityRank: {\n type: \"integer\",\n minimum: 1,\n maximum: 4,\n description:\n \"Server-derived numeric rank of priority (low=1, normal=2, high=3, critical=4). Denormalized to support priority sorting; never set by clients.\",\n },\n reopenCount: {\n type: \"integer\",\n minimum: 0,\n default: 0,\n description:\n \"Server-derived count of transitions back to \\\"open\\\" that followed a solve/close. reopenCount > 0 answers \\\"was this ticket ever reopened?\\\" in O(1); maintained at the repository layer across every status-write path. Never set by clients.\",\n },\n tags: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n },\n rating: {\n type: \"number\",\n minimum: 0,\n maximum: 5,\n },\n ratingComment: {\n type: \"string\",\n },\n scheduleDate: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n solvedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n lastMessageAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"Server-derived timestamp of the latest conversation message; initialized to createdAt when no message exists. Denormalized to support recency sorting; never set by clients.\",\n },\n closedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type TicketSchema = FromSchema<\n typeof ticketSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAgDA,MAAM,sBAAsB;CAC1B,MAAM;CACN,UAAU;CACV,OAAO,EACL,OAAO;EAAC;GA1CV,MAAM;GACN,sBAAsB;GACtB,UAAU,CAAC,QAAQ,MAAM;GACzB,YAAY;IACV,MAAM;KAAE,MAAM;KAAU,MAAM,CAAC,MAAM;IAAE;IACvC,MAAM,EAAE,MAAM,SAAS;IACvB,OAAO;KACL,MAAM;KACN,aAAa;KACb,OAAO;MAAE,MAAM;MAAU,MAAM;OAAC;OAAQ;OAAU;MAAW;KAAE;IACjE;GACF;EA+ByB;EAAG;GA3B5B,MAAM;GACN,sBAAsB;GACtB,UAAU;IAAC;IAAQ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AAS;MAAY;KAAY;IAC1C;IACA,MAAM,EACJ,MAAM,SACR;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,MAAM;IAAC;IAAQ;IAAW;IAAU;GAAQ;GAC5C,SAAS;EACX;EACA,UAAU;GACR,MAAM;GACN,MAAM;IAAC;IAAO;IAAU;IAAQ;GAAU;GAC1C,SAAS;EACX;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,SAAS;GACT,aACE;EACJ;EACA,aAAa;GACX,MAAM;GACN,SAAS;GACT,SAAS;GACT,aACE;EACJ;EACA,MAAM;GACJ,MAAM;GACN,SAAS,CAAC;GACV,OAAO,EACL,MAAM,SACR;EACF;EACA,QAAQ;GACN,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,eAAe,EACb,MAAM,SACR;EACA,cAAc,EACZ,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,qCACR;EACA,eAAe;GACb,MAAM;GACN,aACE;EACJ;EACA,UAAU,EACR,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
1
+ {"version":3,"file":"ticket.js","names":[],"sources":["../../.generated/schemas/ticket.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\n// Rich-text node vocabulary for parsedBody.content (ADR 0012). Deliberately\n// fixed-depth rather than recursive: json-schema-to-ts cannot derive types\n// from self-referencing schemas, so nested lists are excluded. These consts\n// must not be exported — the model generator treats the first export ending\n// in \"Schema\" as the entity schema.\nconst richTextTextNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"text\"],\n properties: {\n type: { type: \"string\", enum: [\"text\"] },\n text: { type: \"string\" },\n marks: {\n type: \"array\",\n uniqueItems: true,\n items: { type: \"string\", enum: [\"bold\", \"italic\", \"underline\"] },\n },\n },\n} as const;\n\nconst richTextMentionNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"id\", \"discriminator\", \"label\"],\n properties: {\n type: { type: \"string\", enum: [\"mention\"] },\n id: { type: \"string\" },\n discriminator: { type: \"string\", enum: [\"user\", \"vendor\", \"system\"] },\n label: {\n type: \"string\",\n description:\n \"Display name of the mentioned entity, without the leading @.\",\n },\n },\n} as const;\n\nconst richTextHardBreakNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\"],\n properties: {\n type: { type: \"string\", enum: [\"hardBreak\"] },\n },\n} as const;\n\nconst richTextInlineNodes = {\n type: \"array\",\n minItems: 1,\n items: {\n anyOf: [richTextTextNode, richTextMentionNode, richTextHardBreakNode],\n },\n} as const;\n\nconst richTextParagraphNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"paragraph\"] },\n content: richTextInlineNodes,\n },\n} as const;\n\nconst richTextListItemNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"listItem\"] },\n content: richTextInlineNodes,\n },\n} as const;\n\nconst richTextBulletListNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"bulletList\"] },\n content: { type: \"array\", minItems: 1, items: richTextListItemNode },\n },\n} as const;\n\nconst richTextOrderedListNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"orderedList\"] },\n content: { type: \"array\", minItems: 1, items: richTextListItemNode },\n },\n} as const;\n\n// A cost entry reaches a client in one of two shapes, and both are valid wire\n// payloads a `Ticket` model must accept. A roster viewer or superadmin receives\n// the stored entry (`fullCostEntry`): the customer `price`, the vendor\n// `estimate`, `markup`, and an optional `actual`. Every other viewer receives\n// the redacted projection (`redactedCostEntry`) the API builds field-by-field —\n// the stored price as a bare amount, never the vendor cost or markup behind it\n// (see `redactCostEntry`/`applyTicketVisibility` in the API). The two are\n// disjoint (each forbids the other's discriminating fields via\n// `additionalProperties`, and `price` is an object on one and an integer on the\n// other), so `costs.items` is their `oneOf`.\nconst fullCostEntrySchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"description\", \"currency\", \"price\", \"estimate\", \"markup\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the cost entry.\",\n },\n description: {\n type: \"string\",\n description: \"What the cost covers.\",\n },\n currency: {\n type: \"string\",\n default: \"USD\",\n description: \"ISO 4217 currency code of the entry's amounts.\",\n },\n price: {\n type: \"object\",\n additionalProperties: false,\n required: [\"amount\", \"recordedBy\", \"recordedAt\"],\n description:\n \"The authoritative customer price of the entry — what the org is \" +\n \"charged, what the approval gate totals, and what a bill line bills. \" +\n \"Seeded at recording from the estimate and the markup, and from then \" +\n \"on independent of all three: editing `estimate`, `actual`, or \" +\n \"`markup` never moves it. Only an explicit price write does.\",\n properties: {\n amount: {\n type: \"integer\",\n minimum: 0,\n description: \"Customer price in integer cents.\",\n },\n recordedBy: {\n type: \"string\",\n description: \"The ID of the user who recorded the amount.\",\n },\n recordedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the amount was recorded.\",\n },\n },\n },\n estimate: {\n type: \"object\",\n additionalProperties: false,\n required: [\"amount\", \"recordedBy\", \"recordedAt\"],\n description: \"The vendor cost estimate phase of the entry.\",\n properties: {\n amount: {\n type: \"integer\",\n minimum: 0,\n description: \"Vendor cost estimate in integer cents.\",\n },\n recordedBy: {\n type: \"string\",\n description: \"The ID of the user who recorded the amount.\",\n },\n recordedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the amount was recorded.\",\n },\n },\n },\n actual: {\n type: \"object\",\n additionalProperties: false,\n required: [\"amount\", \"recordedBy\", \"recordedAt\"],\n description:\n \"The actual vendor cost phase of the entry, recorded after the work.\",\n properties: {\n amount: {\n type: \"integer\",\n minimum: 0,\n description: \"Actual vendor cost in integer cents.\",\n },\n recordedBy: {\n type: \"string\",\n description: \"The ID of the user who recorded the amount.\",\n },\n recordedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the amount was recorded.\",\n },\n },\n },\n markup: {\n type: \"object\",\n additionalProperties: false,\n required: [\"percent\"],\n properties: {\n percent: {\n type: \"number\",\n minimum: 0,\n description:\n \"Markup percent the initial price was quoted at, uncapped. \" +\n \"Context for how that quote was arrived at, not the source of \" +\n \"truth for any amount: `price` is stored, so re-keying this \" +\n \"percent prices nothing.\",\n },\n custom: {\n type: \"boolean\",\n default: false,\n description:\n \"Whether the percent was manually overridden rather than keyed from the configured markup tiers. Custom percents are never re-keyed on estimate edits.\",\n },\n },\n },\n vendorInvoices: {\n type: \"array\",\n items: { $ref: \"mediaFile.json\" },\n default: [],\n description:\n \"The vendor's paperwork backing the entry's amounts, attached \" +\n \"around recording the actual (or later) — an invoice plus whatever \" +\n \"came with it. Internal: the file-store cannot enforce roster-only \" +\n \"reads, so the boundary is this field living on the full shape \" +\n \"only — the redacted projection never carries it.\",\n },\n vendorInvoiceNumber: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The vendor's own invoice number. Internal, redacted org-side like \" +\n \"the rest of the cost split.\",\n },\n vendorId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The Vendor the cost came from. A plain reference — no rollups — \" +\n \"recorded alongside the vendor invoice and redacted org-side with \" +\n \"the rest of the cost split. Independent of `workItemId`: a vendor \" +\n \"cost need not trace to a scheduled visit.\",\n },\n workItemId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The Work item on this ticket that produced the cost. Many entries \" +\n \"may name one visit, so a single trip's labor and materials can be \" +\n \"itemized. Cleared when the Work item is removed — the money record \" +\n \"outlives the scheduling record. Internal, redacted org-side.\",\n },\n categoryId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The billing category classifying this cost, picked on the \" +\n \"reconciliation pool before any bill claims the entry. `AddBillLine` \" +\n \"snapshots it onto the claiming line, which owns its own category \" +\n \"from then on. Internal, redacted org-side with the rest of the \" +\n \"cost split.\",\n },\n billId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"Backlink to the bill whose draft claimed this cost as a line. \" +\n \"Written when a draft bill adds the line, cleared on line removal, \" +\n \"draft delete, or bill void; a claimed cost leaves the uninvoiced \" +\n \"pool, making double-invoicing structurally impossible. \" +\n \"Server-maintained at the repository, never set by clients.\",\n },\n writtenOff: {\n type: \"boolean\",\n default: false,\n description:\n \"Server-maintained denormalization of billingReview (approvalState \" +\n \"pattern): true after a writtenOff entry until a reinstated entry \" +\n \"follows. A written-off cost leaves the uninvoiced pool. Never set \" +\n \"by clients.\",\n },\n billingReview: {\n type: \"array\",\n default: [],\n description:\n \"Append-only billing review history for the entry (approval-history \" +\n \"pattern): reversible write-offs and billed-vs-price divergence \" +\n \"acknowledgements. Internal, redacted org-side.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"action\", \"performedAt\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the billing review entry.\",\n },\n action: {\n type: \"string\",\n enum: [\"writtenOff\", \"reinstated\", \"divergenceAcknowledged\"],\n },\n performedBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write appended this entry. Null \" +\n \"when the write was not user-attributable.\",\n },\n performedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the entry was appended.\",\n },\n note: {\n type: [\"string\", \"null\"],\n default: null,\n description: \"Free-text rationale for the action.\",\n },\n billedAmount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"divergenceAcknowledged only: the amount a bill line already \" +\n \"charged for this entry, in integer cents, frozen at ack time.\",\n },\n priceAmount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"divergenceAcknowledged only: the entry's stored customer \" +\n \"price in integer cents at ack time. A divergence is a billed \" +\n \"line that no longer matches the price behind it — a price \" +\n \"corrected after the cost was claimed — so the ack silences \" +\n \"this one pair and any later price move re-flags it. A vendor \" +\n \"actual arriving after billing is not a divergence: it moves \" +\n \"margin, not what the customer owes.\",\n },\n },\n },\n },\n },\n} as const;\n\nconst redactedCostEntrySchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"description\", \"currency\", \"price\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the cost entry.\",\n },\n description: {\n type: \"string\",\n description: \"What the cost covers.\",\n },\n currency: {\n type: \"string\",\n default: \"USD\",\n description: \"ISO 4217 currency code of the entry's amounts.\",\n },\n price: {\n type: \"integer\",\n minimum: 0,\n description:\n \"The entry's stored customer price in integer cents — the whole of \" +\n \"what an org-side viewer receives, flattened out of the stored \" +\n \"price phase so none of its recording metadata comes with it.\",\n },\n },\n} as const;\n\n// A Work item is a scheduled performance of work on the ticket — who is coming,\n// when, and what for. Timing is wall-clock at the property, not an instant: vendors\n// commit to \"Thursday\" as often as to \"Thursday at 10\", and an instant would\n// force a fake time on the day-only case and drift a day across the property's\n// timezone on every render. `date` and `time` therefore mean exactly what the\n// building reads off them, and the conversation event can be minted without\n// resolving a timezone at all.\nconst workItemSchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"performer\", \"date\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the work item.\",\n },\n performer: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n description:\n \"Who is performing the work — a Vendor, or a staff User the work is \" +\n \"scheduled to. A discriminated reference in the same shape as \" +\n \"`assignedTo`, but orthogonal to it: `assignedTo` is who owns the \" +\n \"ticket, this is who shows up for one visit.\",\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the performer.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"vendor\", \"user\"],\n description: \"The discriminator of the performer.\",\n },\n name: {\n type: \"string\",\n description:\n \"The performer's name, denormalized at schedule time for rendering.\",\n },\n },\n },\n date: {\n type: \"string\",\n pattern: \"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\",\n description:\n \"The calendar date of the visit as YYYY-MM-DD, read in the property's timezone.\",\n },\n time: {\n type: [\"string\", \"null\"],\n pattern: \"^([01]\\\\d|2[0-3]):[0-5]\\\\d$\",\n default: null,\n description:\n \"The 24-hour local start time as HH:mm, or null for a day-only \" +\n \"commitment. Day-only is first-class, not a missing value.\",\n },\n description: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"What the visit is for, in the scheduler's words — the scope handed \" +\n \"to whoever shows up. Optional: a booking with nothing to add carries \" +\n \"null, and the performer and the slot are the whole record.\",\n },\n scheduledBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write created this work item. Null when the write was not user-attributable.\",\n },\n scheduledAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the work item was created.\",\n },\n noCharge: {\n type: [\"object\", \"null\"],\n additionalProperties: false,\n required: [\"setBy\", \"setAt\"],\n default: null,\n description:\n \"The explicit decision that this visit will never be billed, or \" +\n \"null while no decision has been made. A disposition rather than a \" +\n \"zero-dollar cost: nothing was charged, so there is no amount to \" +\n \"record, and financial completion asks whether every visit is \" +\n \"either billed or deliberately not. Reversible while the ticket is \" +\n \"active; frozen once it closes.\",\n properties: {\n setBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write set the disposition. Null when \" +\n \"the write was not user-attributable.\",\n },\n setAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the disposition was set.\",\n },\n },\n },\n },\n} as const;\n\nexport const ticketSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"ticket.json\",\n title: \"Ticket\",\n description: \"A ticket is a request from a user.\",\n type: \"object\",\n required: [\n \"id\",\n \"conversation\",\n \"requester\",\n \"openedBy\",\n \"assignedTo\",\n \"status\",\n \"priority\",\n \"tags\",\n \"createdAt\",\n \"updatedAt\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description:\n \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n enum: [\"ticket\"],\n default: \"ticket\",\n },\n number: {\n type: \"string\",\n description: \"The number of the ticket.\",\n },\n issueId: {\n type: \"string\",\n description: \"The ID of the issue that this ticket is associated with.\",\n },\n parentAutomationId: {\n type: \"string\",\n description: \"The ID of the automation that created this ticket.\",\n },\n conversation: {\n type: \"array\",\n default: [],\n description: \"The conversation history of the ticket.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"timestamp\", \"body\", \"author\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\n \"message\",\n \"opened\",\n \"assigned\",\n \"rated\",\n \"scheduled\",\n \"collaboratorAdded\",\n \"collaboratorRemoved\",\n \"statusChanged\",\n \"priorityChanged\",\n \"scheduleDateChanged\",\n \"locationChanged\",\n \"nudged\",\n \"approvalRequested\",\n \"approvalApproved\",\n \"approvalDenied\",\n \"workScheduled\",\n \"workRescheduled\",\n \"workCanceled\",\n \"costRecorded\",\n \"costPriceChanged\",\n ],\n default: \"message\",\n description: \"The discriminator of the message.\",\n },\n isInternal: {\n type: \"boolean\",\n description:\n \"Whether the message is internal to the assignedTo and collaborators. Internal messages are not visible to the requester.\",\n default: false,\n },\n author: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the author of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description: \"The discriminator of the author of the message.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the author of the message.\",\n },\n },\n },\n timestamp: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"The ISO 8601 timestamp of the message.\",\n },\n body: {\n type: \"string\",\n description: \"The body of the message.\",\n },\n parsedBody: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"An object containing the parsed body of the message for mentions.\",\n properties: {\n content: {\n type: \"array\",\n minItems: 1,\n description:\n \"Rich-text block nodes (ADR 0012). Present = rich message: `body` is the server-derived plain-text projection of this tree, and the legacy text/mentions fields are not written.\",\n items: {\n anyOf: [\n richTextParagraphNode,\n richTextBulletListNode,\n richTextOrderedListNode,\n ],\n },\n },\n text: {\n type: \"string\",\n description: \"The mention text (legacy tokenized format).\",\n },\n mentions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\n \"discriminator\",\n \"id\",\n \"index\",\n \"length\",\n \"originalText\",\n ],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the mention.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description:\n \"The discriminator of entity that was mentioned.\",\n },\n index: {\n type: \"integer\",\n description: \"The index of the mention in the message.\",\n },\n length: {\n type: \"integer\",\n description: \"The length of the mention in the message.\",\n },\n originalText: {\n type: \"string\",\n description: \"The original text of the mention.\",\n },\n },\n },\n },\n },\n },\n statusChanged: {\n type: \"object\",\n additionalProperties: false,\n required: [\"from\", \"to\"],\n description:\n \"Structured status transition for `statusChanged` entries. Lets consumers detect reopens (from solved/closed to open) without parsing the body text.\",\n properties: {\n from: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned from.\",\n },\n to: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned to.\",\n },\n },\n },\n readBy: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n description: \"The IDs of the users who have read the message.\",\n },\n media: {\n anyOf: [{ $ref: \"mediaFile.json\" }, { type: \"null\" }],\n description: \"The media file associated with the message.\",\n },\n attachments: {\n type: \"array\",\n items: { $ref: \"mediaFile.json\" },\n description:\n \"Files attached to the message. Supersedes the singular media.\",\n },\n },\n },\n },\n subject: {\n type: \"string\",\n description: \"The subject of the ticket.\",\n },\n openedBy: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"system\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n requester: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the requester.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\", \"device\"],\n description: \"The discriminator of the requester.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the requester.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the requester.\",\n },\n },\n },\n assignedTo: {\n type: [\"object\", \"null\"],\n default: null,\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the assigned to.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n description: \"The discriminator of the assigned to.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the assigned to.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the assigned to.\",\n },\n },\n },\n notify: {\n type: \"array\",\n description:\n \"A list of entities to notify when this ticket is created or resolved.\",\n default: [],\n items: {\n type: \"object\",\n required: [\"id\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the entity to notify.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\"],\n },\n },\n },\n },\n collaborators: {\n type: \"array\",\n default: [],\n description: \"A list of entities who will collaborate on this ticket.\",\n items: {\n type: \"object\",\n required: [\"id\", \"name\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n },\n },\n },\n },\n location: {\n type: \"object\",\n required: [\"discriminator\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"space\", \"property\", \"customText\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n status: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n default: \"open\",\n },\n priority: {\n type: \"string\",\n enum: [\"low\", \"normal\", \"high\", \"critical\"],\n default: \"normal\",\n },\n priorityRank: {\n type: \"integer\",\n minimum: 1,\n maximum: 4,\n description:\n \"Server-derived numeric rank of priority (low=1, normal=2, high=3, critical=4). Denormalized to support priority sorting; never set by clients.\",\n },\n reopenCount: {\n type: \"integer\",\n minimum: 0,\n default: 0,\n description:\n 'Server-derived count of transitions back to \"open\" that followed a solve/close. reopenCount > 0 answers \"was this ticket ever reopened?\" in O(1); maintained at the repository layer across every status-write path. Never set by clients.',\n },\n work: {\n type: \"array\",\n default: [],\n description:\n \"Work items scheduled on the ticket: who is coming, when, and what for. Many per ticket, including repeat visits by the same performer. Carries no lifecycle status — the conversation log is the history and a past-dated entry is implicitly done. Never redacted; vendor identity is already public in assignment.\",\n items: workItemSchema,\n },\n costs: {\n type: \"array\",\n default: [],\n description:\n \"Cost line items recorded on the ticket. Each entry stores the customer price and the vendor cost side by side and keeps them independent: the price is seeded from the estimate and markup at recording, and nothing about the vendor side moves it afterwards. Every entry arrives as either the full vendor shape or the redacted price-only shape depending on whether the viewer may see the cost split.\",\n items: {\n oneOf: [fullCostEntrySchema, redactedCostEntrySchema],\n },\n },\n approvals: {\n type: \"array\",\n default: [],\n description:\n \"Approval request history for the ticket. At most one pending record at a time; records are immutable once decided (enforced by use cases).\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"amount\", \"approverUserIds\", \"status\", \"requestedAt\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the approval record.\",\n },\n amount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"The ticket's customer price total in integer cents, frozen at request time.\",\n },\n approverUserIds: {\n type: \"array\",\n minItems: 1,\n items: {\n type: \"string\",\n },\n description:\n \"The effective approver set for this request, frozen at request time.\",\n },\n status: {\n type: \"string\",\n enum: [\"pending\", \"approved\", \"denied\"],\n default: \"pending\",\n },\n requestedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the approval was requested.\",\n },\n requestedBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write created this request, frozen at request time. Null when the write was not user-attributable.\",\n },\n decidedBy: {\n type: [\"string\", \"null\"],\n default: null,\n description: \"The ID of the approver who decided the request.\",\n },\n decidedAt: {\n anyOf: [\n { $ref: \"definitions.json#/definitions/date\" },\n { type: \"null\" },\n ],\n default: null,\n description: \"When the request was decided.\",\n },\n comment: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The decider's comment. Required on deny, optional on approve (enforced by use cases).\",\n },\n },\n },\n },\n dneAmount: {\n type: [\"integer\", \"null\"],\n minimum: 0,\n description:\n \"The effective do-not-exceed amount in integer cents the approval gate compares against, resolved per read from the organization and property Concierge settings. Never stored on the document and never set by clients; absent on payloads where it could not be resolved. Viewer-independent: the DNE is the customer's own contract term, so org-side viewers see it.\",\n },\n approvalState: {\n type: \"string\",\n enum: [\"clear\", \"awaitingApproval\", \"denied\"],\n default: \"clear\",\n description:\n \"Server-maintained denormalization of the approval gate, updated on every cost or approval write (reopenCount pattern) so queue filters get O(1) access. Never set by clients.\",\n },\n tags: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n },\n rating: {\n type: \"number\",\n minimum: 0,\n maximum: 5,\n },\n ratingComment: {\n type: \"string\",\n },\n scheduleDate: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n solvedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n lastMessageAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"Server-derived timestamp of the latest conversation message; initialized to createdAt when no message exists. Denormalized to support recency sorting; never set by clients.\",\n },\n closedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\ntype TicketSchemaBase = FromSchema<\n typeof ticketSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\n/** A stored cost entry: the full shape, with `price`, `estimate` and `markup`. */\nexport type TicketCostEntry = Extract<\n NonNullable<TicketSchemaBase[\"costs\"]>[number],\n { estimate: unknown }\n>;\n\n/** One scheduled performance of work on a ticket. */\nexport type TicketWorkItem = NonNullable<TicketSchemaBase[\"work\"]>[number];\n\n/** One append-only billing review entry on a stored cost entry. */\nexport type TicketCostBillingReviewEntry = NonNullable<\n TicketCostEntry[\"billingReview\"]\n>[number];\n\n// The runtime `costs.items` schema is a `oneOf` so a `Ticket` model validates\n// both wire shapes a read can return (see the schema comment), which makes the\n// derived element type a `full | redacted` union. A stored ticket, though, only\n// ever holds the full shape — the redacted projection exists solely at the API\n// read seam (`redactTicketCostSplit`, which casts through `unknown`). Model and\n// write-path consumers reason about the stored document, so `costs` is narrowed\n// back to the full entry here; the redacted shape stays a validation-only\n// concern rather than leaking into every `ticket.costs` dereference.\nexport type TicketSchema = Omit<TicketSchemaBase, \"costs\"> & {\n costs?: TicketCostEntry[];\n};\n"],"mappings":";AAiDA,MAAM,sBAAsB;CAC1B,MAAM;CACN,UAAU;CACV,OAAO,EACL,OAAO;EAAC;GA3CV,MAAM;GACN,sBAAsB;GACtB,UAAU,CAAC,QAAQ,MAAM;GACzB,YAAY;IACV,MAAM;KAAE,MAAM;KAAU,MAAM,CAAC,MAAM;IAAE;IACvC,MAAM,EAAE,MAAM,SAAS;IACvB,OAAO;KACL,MAAM;KACN,aAAa;KACb,OAAO;MAAE,M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;EACF;EACA,QAAQ;GACN,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,eAAe,EACb,MAAM,SACR;EACA,cAAc,EACZ,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,qCACR;EACA,eAAe;GACb,MAAM;GACN,aACE;EACJ;EACA,UAAU,EACR,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
@@ -0,0 +1,39 @@
1
+ export interface AcknowledgeCostDivergenceCommandConfig {
2
+ data?: {
3
+ id: string;
4
+ costId: string;
5
+ [key: string]: unknown;
6
+ } | null;
7
+ headers?: Record<string, string> | null;
8
+ query?: Record<string, unknown> | null;
9
+ }
10
+ export interface AcknowledgeCostDivergenceCommandRequestConfig {
11
+ method: "post";
12
+ url: string;
13
+ data: {
14
+ id: string;
15
+ costId: string;
16
+ [key: string]: unknown;
17
+ } | null;
18
+ params: Record<string, unknown> | null;
19
+ headers: Record<string, string> | null;
20
+ [key: string]: unknown;
21
+ }
22
+ /**
23
+ *
24
+ */
25
+ export declare class AcknowledgeCostDivergenceCommand {
26
+ url: string;
27
+ data: {
28
+ id: string;
29
+ costId: string;
30
+ [key: string]: unknown;
31
+ } | null;
32
+ query: Record<string, unknown> | null;
33
+ headers: Record<string, string> | null;
34
+ config: AcknowledgeCostDivergenceCommandRequestConfig;
35
+ static params: readonly ["id", "costId"];
36
+ static url: string;
37
+ static method: "post";
38
+ constructor(commandConfig: AcknowledgeCostDivergenceCommandConfig, options?: Record<string, unknown>);
39
+ }