@kohost/api-client 7.7.1 → 7.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/dist/httpClient.js +3 -2
  2. package/dist/httpClient.js.map +1 -1
  3. package/dist/lib/bills.d.ts +74 -0
  4. package/dist/lib/bills.js +83 -0
  5. package/dist/lib/bills.js.map +1 -0
  6. package/dist/lib/deviceNotifications.js +1 -4
  7. package/dist/lib/deviceNotifications.js.map +1 -1
  8. package/dist/lib/index.d.ts +4 -0
  9. package/dist/lib/index.js +27 -2
  10. package/dist/lib/index.js.map +1 -1
  11. package/dist/lib/kfcStatsWindow.d.ts +37 -0
  12. package/dist/lib/kfcStatsWindow.js +46 -0
  13. package/dist/lib/kfcStatsWindow.js.map +1 -0
  14. package/dist/lib/lowerBoundTable.d.ts +11 -0
  15. package/dist/lib/lowerBoundTable.js +28 -0
  16. package/dist/lib/lowerBoundTable.js.map +1 -0
  17. package/dist/lib/money.d.ts +61 -0
  18. package/dist/lib/money.js +80 -0
  19. package/dist/lib/money.js.map +1 -0
  20. package/dist/lib/policy-resolvers.js +5 -4
  21. package/dist/lib/policy-resolvers.js.map +1 -1
  22. package/dist/lib/ticketRichText.d.ts +35 -0
  23. package/dist/lib/ticketRichText.js +86 -0
  24. package/dist/lib/ticketRichText.js.map +1 -0
  25. package/dist/models/bill.d.ts +17 -0
  26. package/dist/models/bill.js +37 -0
  27. package/dist/models/bill.js.map +1 -0
  28. package/dist/models/billingCategory.d.ts +17 -0
  29. package/dist/models/billingCategory.js +22 -0
  30. package/dist/models/billingCategory.js.map +1 -0
  31. package/dist/models/index.d.ts +2 -1
  32. package/dist/models/index.js +5 -3
  33. package/dist/models/index.js.map +1 -1
  34. package/dist/models/organization.js +4 -0
  35. package/dist/models/organization.js.map +1 -1
  36. package/dist/models/ticket.js +5 -0
  37. package/dist/models/ticket.js.map +1 -1
  38. package/dist/schemas/bill.d.ts +255 -0
  39. package/dist/schemas/bill.js +248 -0
  40. package/dist/schemas/bill.js.map +1 -0
  41. package/dist/schemas/billingCategory.d.ts +46 -0
  42. package/dist/schemas/billingCategory.js +38 -0
  43. package/dist/schemas/billingCategory.js.map +1 -0
  44. package/dist/schemas/definitions.d.ts +2 -2
  45. package/dist/schemas/definitions.js +3 -1
  46. package/dist/schemas/definitions.js.map +1 -1
  47. package/dist/schemas/index.d.ts +2 -1
  48. package/dist/schemas/index.js +3 -2
  49. package/dist/schemas/organization.d.ts +112 -1
  50. package/dist/schemas/organization.js +93 -0
  51. package/dist/schemas/organization.js.map +1 -1
  52. package/dist/schemas/property.d.ts +32 -0
  53. package/dist/schemas/property.js +26 -0
  54. package/dist/schemas/property.js.map +1 -1
  55. package/dist/schemas/ticket.d.ts +381 -3
  56. package/dist/schemas/ticket.js +419 -1
  57. package/dist/schemas/ticket.js.map +1 -1
  58. package/dist/useCases/acknowledgeCostDivergence.d.ts +39 -0
  59. package/dist/useCases/acknowledgeCostDivergence.js +47 -0
  60. package/dist/useCases/acknowledgeCostDivergence.js.map +1 -0
  61. package/dist/useCases/addBillLine.d.ts +36 -0
  62. package/dist/useCases/addBillLine.js +47 -0
  63. package/dist/useCases/addBillLine.js.map +1 -0
  64. package/dist/useCases/addStaffFunctionMember.d.ts +39 -0
  65. package/dist/useCases/addStaffFunctionMember.js +47 -0
  66. package/dist/useCases/addStaffFunctionMember.js.map +1 -0
  67. package/dist/useCases/cancelWorkItem.d.ts +39 -0
  68. package/dist/useCases/cancelWorkItem.js +47 -0
  69. package/dist/useCases/cancelWorkItem.js.map +1 -0
  70. package/dist/useCases/clearWorkItemNoCharge.d.ts +39 -0
  71. package/dist/useCases/clearWorkItemNoCharge.js +47 -0
  72. package/dist/useCases/clearWorkItemNoCharge.js.map +1 -0
  73. package/dist/useCases/createBill.d.ts +27 -0
  74. package/dist/useCases/createBill.js +47 -0
  75. package/dist/useCases/createBill.js.map +1 -0
  76. package/dist/useCases/createBillingCategory.d.ts +27 -0
  77. package/dist/useCases/createBillingCategory.js +47 -0
  78. package/dist/useCases/createBillingCategory.js.map +1 -0
  79. package/dist/useCases/decideApproval.d.ts +39 -0
  80. package/dist/useCases/decideApproval.js +47 -0
  81. package/dist/useCases/decideApproval.js.map +1 -0
  82. package/dist/useCases/deleteBill.d.ts +36 -0
  83. package/dist/useCases/deleteBill.js +47 -0
  84. package/dist/useCases/deleteBill.js.map +1 -0
  85. package/dist/useCases/deleteStaffUser.d.ts +36 -0
  86. package/dist/useCases/deleteStaffUser.js +47 -0
  87. package/dist/useCases/deleteStaffUser.js.map +1 -0
  88. package/dist/useCases/describeBill.d.ts +36 -0
  89. package/dist/useCases/describeBill.js +47 -0
  90. package/dist/useCases/describeBill.js.map +1 -0
  91. package/dist/useCases/describeConciergeFacilitiesViewer.d.ts +27 -0
  92. package/dist/useCases/describeConciergeFacilitiesViewer.js +47 -0
  93. package/dist/useCases/describeConciergeFacilitiesViewer.js.map +1 -0
  94. package/dist/useCases/describeConciergeStatsFilters.d.ts +27 -0
  95. package/dist/useCases/describeConciergeStatsFilters.js +47 -0
  96. package/dist/useCases/describeConciergeStatsFilters.js.map +1 -0
  97. package/dist/useCases/describeConciergeStatsHeatmap.d.ts +27 -0
  98. package/dist/useCases/describeConciergeStatsHeatmap.js +47 -0
  99. package/dist/useCases/describeConciergeStatsHeatmap.js.map +1 -0
  100. package/dist/useCases/describeConciergeStatsSummary.d.ts +27 -0
  101. package/dist/useCases/describeConciergeStatsSummary.js +47 -0
  102. package/dist/useCases/describeConciergeStatsSummary.js.map +1 -0
  103. package/dist/useCases/describeConciergeStatsTickets.d.ts +27 -0
  104. package/dist/useCases/describeConciergeStatsTickets.js +47 -0
  105. package/dist/useCases/describeConciergeStatsTickets.js.map +1 -0
  106. package/dist/useCases/describeConciergeWorkspaceFilters.d.ts +27 -0
  107. package/dist/useCases/describeConciergeWorkspaceFilters.js +47 -0
  108. package/dist/useCases/describeConciergeWorkspaceFilters.js.map +1 -0
  109. package/dist/useCases/describeOrganizationBill.d.ts +36 -0
  110. package/dist/useCases/describeOrganizationBill.js +47 -0
  111. package/dist/useCases/describeOrganizationBill.js.map +1 -0
  112. package/dist/useCases/describeSelfAccess.d.ts +27 -0
  113. package/dist/useCases/describeSelfAccess.js +47 -0
  114. package/dist/useCases/describeSelfAccess.js.map +1 -0
  115. package/dist/useCases/describeStaffFunctions.d.ts +27 -0
  116. package/dist/useCases/describeStaffFunctions.js +47 -0
  117. package/dist/useCases/describeStaffFunctions.js.map +1 -0
  118. package/dist/useCases/describeTicketStatsFilters.d.ts +27 -0
  119. package/dist/useCases/describeTicketStatsFilters.js +47 -0
  120. package/dist/useCases/describeTicketStatsFilters.js.map +1 -0
  121. package/dist/useCases/describeTicketStatsHeatmap.d.ts +27 -0
  122. package/dist/useCases/describeTicketStatsHeatmap.js +47 -0
  123. package/dist/useCases/describeTicketStatsHeatmap.js.map +1 -0
  124. package/dist/useCases/describeTicketStatsSummary.d.ts +27 -0
  125. package/dist/useCases/describeTicketStatsSummary.js +47 -0
  126. package/dist/useCases/describeTicketStatsSummary.js.map +1 -0
  127. package/dist/useCases/describeTicketStatsTickets.d.ts +27 -0
  128. package/dist/useCases/describeTicketStatsTickets.js +47 -0
  129. package/dist/useCases/describeTicketStatsTickets.js.map +1 -0
  130. package/dist/useCases/editCostEntry.d.ts +39 -0
  131. package/dist/useCases/editCostEntry.js +47 -0
  132. package/dist/useCases/editCostEntry.js.map +1 -0
  133. package/dist/useCases/index.d.ts +57 -0
  134. package/dist/useCases/index.js +116 -2
  135. package/dist/useCases/index.js.map +1 -1
  136. package/dist/useCases/listBillingCategories.d.ts +27 -0
  137. package/dist/useCases/listBillingCategories.js +47 -0
  138. package/dist/useCases/listBillingCategories.js.map +1 -0
  139. package/dist/useCases/listBills.d.ts +27 -0
  140. package/dist/useCases/listBills.js +47 -0
  141. package/dist/useCases/listBills.js.map +1 -0
  142. package/dist/useCases/listConciergeUninvoicedCosts.d.ts +27 -0
  143. package/dist/useCases/listConciergeUninvoicedCosts.js +47 -0
  144. package/dist/useCases/listConciergeUninvoicedCosts.js.map +1 -0
  145. package/dist/useCases/listConciergeWorkspaceBills.d.ts +27 -0
  146. package/dist/useCases/listConciergeWorkspaceBills.js +47 -0
  147. package/dist/useCases/listConciergeWorkspaceBills.js.map +1 -0
  148. package/dist/useCases/listConciergeWorkspaceTickets.d.ts +27 -0
  149. package/dist/useCases/listConciergeWorkspaceTickets.js +47 -0
  150. package/dist/useCases/listConciergeWorkspaceTickets.js.map +1 -0
  151. package/dist/useCases/listEligibleApprovers.d.ts +36 -0
  152. package/dist/useCases/listEligibleApprovers.js +47 -0
  153. package/dist/useCases/listEligibleApprovers.js.map +1 -0
  154. package/dist/useCases/listFacilitiesStaffIds.d.ts +27 -0
  155. package/dist/useCases/listFacilitiesStaffIds.js +47 -0
  156. package/dist/useCases/listFacilitiesStaffIds.js.map +1 -0
  157. package/dist/useCases/listKohostStaff.d.ts +27 -0
  158. package/dist/useCases/listKohostStaff.js +47 -0
  159. package/dist/useCases/listKohostStaff.js.map +1 -0
  160. package/dist/useCases/listOrganizationBills.d.ts +27 -0
  161. package/dist/useCases/listOrganizationBills.js +47 -0
  162. package/dist/useCases/listOrganizationBills.js.map +1 -0
  163. package/dist/useCases/markBillPaid.d.ts +36 -0
  164. package/dist/useCases/markBillPaid.js +47 -0
  165. package/dist/useCases/markBillPaid.js.map +1 -0
  166. package/dist/useCases/markBillSent.d.ts +36 -0
  167. package/dist/useCases/markBillSent.js +47 -0
  168. package/dist/useCases/markBillSent.js.map +1 -0
  169. package/dist/useCases/previewBill.d.ts +36 -0
  170. package/dist/useCases/previewBill.js +47 -0
  171. package/dist/useCases/previewBill.js.map +1 -0
  172. package/dist/useCases/recordCostActual.d.ts +39 -0
  173. package/dist/useCases/recordCostActual.js +47 -0
  174. package/dist/useCases/recordCostActual.js.map +1 -0
  175. package/dist/useCases/recordCostEntry.d.ts +36 -0
  176. package/dist/useCases/recordCostEntry.js +47 -0
  177. package/dist/useCases/recordCostEntry.js.map +1 -0
  178. package/dist/useCases/reinstateCostEntry.d.ts +39 -0
  179. package/dist/useCases/reinstateCostEntry.js +47 -0
  180. package/dist/useCases/reinstateCostEntry.js.map +1 -0
  181. package/dist/useCases/removeBillLine.d.ts +39 -0
  182. package/dist/useCases/removeBillLine.js +47 -0
  183. package/dist/useCases/removeBillLine.js.map +1 -0
  184. package/dist/useCases/removeStaffFunctionMember.d.ts +39 -0
  185. package/dist/useCases/removeStaffFunctionMember.js +47 -0
  186. package/dist/useCases/removeStaffFunctionMember.js.map +1 -0
  187. package/dist/useCases/requestApproval.d.ts +36 -0
  188. package/dist/useCases/requestApproval.js +47 -0
  189. package/dist/useCases/requestApproval.js.map +1 -0
  190. package/dist/useCases/rescheduleWorkItem.d.ts +39 -0
  191. package/dist/useCases/rescheduleWorkItem.js +47 -0
  192. package/dist/useCases/rescheduleWorkItem.js.map +1 -0
  193. package/dist/useCases/scheduleWorkItem.d.ts +36 -0
  194. package/dist/useCases/scheduleWorkItem.js +47 -0
  195. package/dist/useCases/scheduleWorkItem.js.map +1 -0
  196. package/dist/useCases/setCostVendorInvoice.d.ts +39 -0
  197. package/dist/useCases/setCostVendorInvoice.js +47 -0
  198. package/dist/useCases/setCostVendorInvoice.js.map +1 -0
  199. package/dist/useCases/setUserSuperAdmin.d.ts +36 -0
  200. package/dist/useCases/setUserSuperAdmin.js +47 -0
  201. package/dist/useCases/setUserSuperAdmin.js.map +1 -0
  202. package/dist/useCases/setWorkItemNoCharge.d.ts +39 -0
  203. package/dist/useCases/setWorkItemNoCharge.js +47 -0
  204. package/dist/useCases/setWorkItemNoCharge.js.map +1 -0
  205. package/dist/useCases/updateBill.d.ts +36 -0
  206. package/dist/useCases/updateBill.js +47 -0
  207. package/dist/useCases/updateBill.js.map +1 -0
  208. package/dist/useCases/updateBillLine.d.ts +39 -0
  209. package/dist/useCases/updateBillLine.js +47 -0
  210. package/dist/useCases/updateBillLine.js.map +1 -0
  211. package/dist/useCases/updateBillingCategory.d.ts +36 -0
  212. package/dist/useCases/updateBillingCategory.js +47 -0
  213. package/dist/useCases/updateBillingCategory.js.map +1 -0
  214. package/dist/useCases/updateOrganizationBillingAddress.d.ts +36 -0
  215. package/dist/useCases/updateOrganizationBillingAddress.js +47 -0
  216. package/dist/useCases/updateOrganizationBillingAddress.js.map +1 -0
  217. package/dist/useCases/updateOrganizationBillingContacts.d.ts +36 -0
  218. package/dist/useCases/updateOrganizationBillingContacts.js +47 -0
  219. package/dist/useCases/updateOrganizationBillingContacts.js.map +1 -0
  220. package/dist/useCases/updateOrganizationTaxExempt.d.ts +36 -0
  221. package/dist/useCases/updateOrganizationTaxExempt.js +47 -0
  222. package/dist/useCases/updateOrganizationTaxExempt.js.map +1 -0
  223. package/dist/useCases/updateStaffUser.d.ts +36 -0
  224. package/dist/useCases/updateStaffUser.js +47 -0
  225. package/dist/useCases/updateStaffUser.js.map +1 -0
  226. package/dist/useCases/voidBill.d.ts +36 -0
  227. package/dist/useCases/voidBill.js +47 -0
  228. package/dist/useCases/voidBill.js.map +1 -0
  229. package/dist/useCases/writeOffCostEntry.d.ts +39 -0
  230. package/dist/useCases/writeOffCostEntry.js +47 -0
  231. package/dist/useCases/writeOffCostEntry.js.map +1 -0
  232. package/dist/validate.d.ts +25 -8
  233. package/dist/validate.js +9 -4
  234. package/dist/validate.js.map +1 -1
  235. package/package.json +6 -6
  236. package/dist/models/order.d.ts +0 -17
  237. package/dist/models/order.js +0 -33
  238. package/dist/models/order.js.map +0 -1
  239. package/dist/schemas/order.d.ts +0 -186
  240. package/dist/schemas/order.js +0 -157
  241. package/dist/schemas/order.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","names":[],"sources":["../../.generated/schemas/definitions.ts"],"sourcesContent":["export const TICKET_NOTIFICATION_EVENTS = [\n \"ticketCreated\",\n \"ticketAssignedToMe\",\n \"addedAsCollaborator\",\n \"mentionedInTicket\",\n \"messageOnMyTicket\",\n \"ticketResolved\",\n \"ticketCreatedAsObserver\",\n \"messageAsObserver\",\n \"ticketResolvedAsObserver\",\n] as const;\n\nexport type TicketNotificationEvent =\n (typeof TICKET_NOTIFICATION_EVENTS)[number];\n\nexport const NOTIFICATION_CHANNELS = [\"email\", \"sms\", \"push\"] as const;\n\nexport type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number];\n\nconst defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"apex-american-audio\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"cool-automation\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"earbridge\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"honeywell-resideo\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lapi\",\n \"lg\",\n \"lg-webos\",\n \"linortek\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"mock\",\n \"modbus\",\n \"napco\",\n \"newline\",\n \"obix\",\n \"one-roster\",\n \"onvif\",\n \"orchid-fusion\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"reolink\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"singlewire\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"zkteco\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"camera\",\n \"courtesy\",\n \"dimmer\",\n \"gateway\",\n \"lock\",\n \"mediaSource\",\n \"motionSensor\",\n \"switch\",\n \"thermostat\",\n \"windowCovering\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n id: {\n type: \"string\"\n },\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Button\",\n \"Communication\",\n \"Config\",\n \"Cost\",\n \"Door Ajar\",\n \"Equipment\",\n \"Maintenance\",\n \"Motion\",\n \"Registration\",\n \"Temperature\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBattery\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n \"powerTrouble\",\n \"monitoringTrouble\",\n \"bellTrouble\",\n \"configIssue\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n ticketNotificationEvent: {\n type: \"string\",\n enum: TICKET_NOTIFICATION_EVENTS,\n },\n notificationChannel: {\n type: \"string\",\n enum: NOTIFICATION_CHANNELS,\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";AAAA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAKA,MAAa,wBAAwB;CAAC;CAAS;CAAO;AAAM;AAI5D,MAAM,OAAO;CACX,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;EACX,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,aAAa;EACf;EACA,YAAY,EACV,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,SAAS,CAAC;EACZ;EACA,MAAM;GACJ,MAAM,CAAC,UAAU,QAAQ;GACzB,QAAQ;EACV;EACA,MAAM;GACJ,MAAM;GACN,UAAU;IAAC;IAAQ;IAAQ;GAAM;GACjC,YAAY;IACV,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;GACF;EACF;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,IAAI,EACF,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,MAAM,EACJ,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,aAAa;KACX,MAAM;KACN,WAAW;KACX,WAAW;IACb;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU;KAAC;KAAQ;KAAU;IAAS;IACtC,YAAY;KACV,IAAI,EACF,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;KACF;KACA,QAAQ;MACN,MAAM;MACN,MAAM,CAAC,UAAU,UAAU;KAC7B;KACA,SAAS,EACP,MAAM,SACR;IACF;GACF;EACF;EACA,wBAAwB;GACtB,MAAM;GACN,aAAa;GACb,OAAO,EACL,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,EACF;EACF;EACA,cAAc;GACZ,MAAM,CAAC,UAAU,MAAM;GACvB,YAAY;IACV,MAAM;KACJ,MAAM;KACN,MAAM;IACR;IACA,WAAW;KACT,MAAM;KACN,SAAS;IACX;IACA,aAAa,EACX,MAAM,SACR;GACF;EACF;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,OAAO;IACL,MAAM;IACN,YAAY;KACV,IAAI,EACF,MAAM,mCACR;KACA,MAAM,EACJ,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,QAAQ;KACV;KACA,OAAO,EACL,MAAM,SACR;KACA,KAAK,EACH,MAAM,CAAC,UAAU,MAAM,EACzB;IACF;GACF;EACF;EACA,yBAAyB;GACvB,MAAM;GACN,MAAM;EACR;EACA,qBAAqB;GACnB,MAAM;GACN,MAAM;EACR;CACF;AACF"}
1
+ {"version":3,"file":"definitions.js","names":[],"sources":["../../.generated/schemas/definitions.ts"],"sourcesContent":["export const TICKET_NOTIFICATION_EVENTS = [\n \"ticketCreated\",\n \"ticketAssignedToMe\",\n \"addedAsCollaborator\",\n \"mentionedInTicket\",\n \"messageOnMyTicket\",\n \"ticketResolved\",\n \"ticketCreatedAsObserver\",\n \"messageAsObserver\",\n \"ticketResolvedAsObserver\",\n \"approvalRequested\",\n \"approvalDecided\",\n] as const;\n\nexport type TicketNotificationEvent =\n (typeof TICKET_NOTIFICATION_EVENTS)[number];\n\nexport const NOTIFICATION_CHANNELS = [\"email\", \"sms\", \"push\"] as const;\n\nexport type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number];\n\nconst defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"apex-american-audio\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"cool-automation\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"earbridge\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"honeywell-resideo\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lapi\",\n \"lg\",\n \"lg-webos\",\n \"linortek\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"mock\",\n \"modbus\",\n \"napco\",\n \"newline\",\n \"obix\",\n \"one-roster\",\n \"onvif\",\n \"orchid-fusion\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"reolink\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"singlewire\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"zkteco\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"camera\",\n \"courtesy\",\n \"dimmer\",\n \"gateway\",\n \"lock\",\n \"mediaSource\",\n \"motionSensor\",\n \"switch\",\n \"thermostat\",\n \"windowCovering\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n id: {\n type: \"string\"\n },\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Button\",\n \"Communication\",\n \"Config\",\n \"Cost\",\n \"Door Ajar\",\n \"Equipment\",\n \"Maintenance\",\n \"Motion\",\n \"Registration\",\n \"Temperature\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBattery\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n \"powerTrouble\",\n \"monitoringTrouble\",\n \"bellTrouble\",\n \"configIssue\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n ticketNotificationEvent: {\n type: \"string\",\n enum: TICKET_NOTIFICATION_EVENTS,\n },\n notificationChannel: {\n type: \"string\",\n enum: NOTIFICATION_CHANNELS,\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";AAAA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAKA,MAAa,wBAAwB;CAAC;CAAS;CAAO;AAAM;AAI5D,MAAM,OAAO;CACX,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;EACX,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,aAAa;EACf;EACA,YAAY,EACV,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,SAAS,CAAC;EACZ;EACA,MAAM;GACJ,MAAM,CAAC,UAAU,QAAQ;GACzB,QAAQ;EACV;EACA,MAAM;GACJ,MAAM;GACN,UAAU;IAAC;IAAQ;IAAQ;GAAM;GACjC,YAAY;IACV,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;GACF;EACF;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,IAAI,EACF,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,MAAM,EACJ,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,aAAa;KACX,MAAM;KACN,WAAW;KACX,WAAW;IACb;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU;KAAC;KAAQ;KAAU;IAAS;IACtC,YAAY;KACV,IAAI,EACF,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;KACF;KACA,QAAQ;MACN,MAAM;MACN,MAAM,CAAC,UAAU,UAAU;KAC7B;KACA,SAAS,EACP,MAAM,SACR;IACF;GACF;EACF;EACA,wBAAwB;GACtB,MAAM;GACN,aAAa;GACb,OAAO,EACL,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,EACF;EACF;EACA,cAAc;GACZ,MAAM,CAAC,UAAU,MAAM;GACvB,YAAY;IACV,MAAM;KACJ,MAAM;KACN,MAAM;IACR;IACA,WAAW;KACT,MAAM;KACN,SAAS;IACX;IACA,aAAa,EACX,MAAM,SACR;GACF;EACF;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,OAAO;IACL,MAAM;IACN,YAAY;KACV,IAAI,EACF,MAAM,mCACR;KACA,MAAM,EACJ,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,QAAQ;KACV;KACA,OAAO,EACL,MAAM,SACR;KACA,KAAK,EACH,MAAM,CAAC,UAAU,MAAM,EACzB;IACF;GACF;EACF;EACA,yBAAyB;GACvB,MAAM;GACN,MAAM;EACR;EACA,qBAAqB;GACnB,MAAM;GACN,MAAM;EACR;CACF;AACF"}
@@ -1,6 +1,8 @@
1
1
  export { alarmSchema, type AlarmSchema } from "./alarm.js";
2
2
  export { announcementSchema, type AnnouncementSchema } from "./announcement.js";
3
3
  export { automationSchema, type AutomationSchema } from "./automation.js";
4
+ export { billSchema, type BillSchema, type BillLine } from "./bill.js";
5
+ export { billingCategorySchema, type BillingCategorySchema } from "./billingCategory.js";
4
6
  export { cameraSchema, type CameraSchema } from "./camera.js";
5
7
  export { categorySchema, type CategorySchema } from "./category.js";
6
8
  export { courtesySchema, type CourtesySchema } from "./courtesy.js";
@@ -22,7 +24,6 @@ export { mediaFileSchema, type MediaFileSchema, methods as mediaFileMethods } fr
22
24
  export { mediaSourceSchema, type MediaSourceSchema } from "./mediaSource.js";
23
25
  export { motionSensorSchema, type MotionSensorSchema } from "./motionSensor.js";
24
26
  export { notificationSchema, type NotificationSchema } from "./notification.js";
25
- export { orderSchema, type OrderSchema } from "./order.js";
26
27
  export { organizationSchema, type OrganizationSchema } from "./organization.js";
27
28
  export { paymentSchema, type PaymentSchema } from "./payment.js";
28
29
  export { policySchema, type PolicySchema } from "./policy.js";
@@ -1,6 +1,8 @@
1
1
  import { alarmSchema } from "./alarm.js";
2
2
  import { announcementSchema } from "./announcement.js";
3
3
  import { automationSchema } from "./automation.js";
4
+ import { billSchema } from "./bill.js";
5
+ import { billingCategorySchema } from "./billingCategory.js";
4
6
  import { cameraSchema } from "./camera.js";
5
7
  import { categorySchema } from "./category.js";
6
8
  import { courtesySchema } from "./courtesy.js";
@@ -22,7 +24,6 @@ import { mediaFileSchema, methods } from "./mediaFile.js";
22
24
  import { mediaSourceSchema } from "./mediaSource.js";
23
25
  import { motionSensorSchema } from "./motionSensor.js";
24
26
  import { notificationSchema } from "./notification.js";
25
- import { orderSchema } from "./order.js";
26
27
  import { organizationSchema } from "./organization.js";
27
28
  import { paymentSchema } from "./payment.js";
28
29
  import { policySchema } from "./policy.js";
@@ -44,4 +45,4 @@ import { timeSheetSchema } from "./timeSheet.js";
44
45
  import { getters, userSchema } from "./user.js";
45
46
  import { vendorSchema } from "./vendor.js";
46
47
  import { windowCoveringSchema } from "./windowCovering.js";
47
- export { alarmSchema, announcementSchema, automationSchema, cameraSchema, categorySchema, courtesySchema, credentialSchema, departmentSchema, dimmerSchema, discoveredDeviceSchema, emailMessageSchema, energyReportSchema, energyReportShardSchema, gatewaySchema, groupSchema, identificationSchema, integrationSchema, issueSchema, lockSchema, logSchema, methods as mediaFileMethods, mediaFileSchema, mediaSourceSchema, motionSensorSchema, notificationSchema, orderSchema, organizationSchema, paymentSchema, policySchema, productSchema, propertySchema, reservationSchema, serverSchema, sessionSchema, shortLinkSchema, smsMessageSchema, sosTypeSchema, spaceSchema, switchSchema, systemSchema, systemUserSchema, thermostatSchema, ticketSchema, timeSheetSchema, getters as userGetters, userSchema, vendorSchema, windowCoveringSchema };
48
+ export { alarmSchema, announcementSchema, automationSchema, billSchema, billingCategorySchema, cameraSchema, categorySchema, courtesySchema, credentialSchema, departmentSchema, dimmerSchema, discoveredDeviceSchema, emailMessageSchema, energyReportSchema, energyReportShardSchema, gatewaySchema, groupSchema, identificationSchema, integrationSchema, issueSchema, lockSchema, logSchema, methods as mediaFileMethods, mediaFileSchema, mediaSourceSchema, motionSensorSchema, notificationSchema, organizationSchema, paymentSchema, policySchema, productSchema, propertySchema, reservationSchema, serverSchema, sessionSchema, shortLinkSchema, smsMessageSchema, sosTypeSchema, spaceSchema, switchSchema, systemSchema, systemUserSchema, thermostatSchema, ticketSchema, timeSheetSchema, getters as userGetters, userSchema, vendorSchema, windowCoveringSchema };
@@ -23,6 +23,12 @@ export declare const organizationSchema: {
23
23
  readonly name: {
24
24
  readonly type: "string";
25
25
  };
26
+ readonly currency: {
27
+ readonly type: "string";
28
+ readonly enum: readonly ["USD"];
29
+ readonly default: "USD";
30
+ readonly description: "ISO 4217 currency code for all of the organization's money amounts. USD only in v1.";
31
+ };
26
32
  readonly smsNumber: {
27
33
  readonly type: "string";
28
34
  };
@@ -210,6 +216,71 @@ export declare const organizationSchema: {
210
216
  };
211
217
  };
212
218
  };
219
+ readonly facilities: {
220
+ readonly type: "object";
221
+ readonly additionalProperties: false;
222
+ readonly properties: {
223
+ readonly enabled: {
224
+ readonly type: "boolean";
225
+ readonly default: false;
226
+ };
227
+ readonly agentUserId: {
228
+ readonly type: readonly ["string", "null"];
229
+ readonly default: null;
230
+ };
231
+ };
232
+ };
233
+ readonly approvals: {
234
+ readonly type: "object";
235
+ readonly additionalProperties: false;
236
+ readonly properties: {
237
+ readonly dneAmount: {
238
+ readonly type: readonly ["integer", "null"];
239
+ readonly minimum: 0;
240
+ readonly default: null;
241
+ readonly description: "Do-not-exceed amount in integer cents. Tickets whose marked-up estimate total exceeds it require approval; null or unset means the gate is off.";
242
+ };
243
+ readonly approverUserIds: {
244
+ readonly type: "array";
245
+ readonly default: readonly [];
246
+ readonly description: "Org users asked to approve when the gate trips; the effective set freezes onto each approval record at request time.";
247
+ readonly items: {
248
+ readonly type: "string";
249
+ };
250
+ };
251
+ };
252
+ };
253
+ readonly costs: {
254
+ readonly type: "object";
255
+ readonly additionalProperties: false;
256
+ readonly properties: {
257
+ readonly markupTiers: {
258
+ readonly type: "array";
259
+ readonly default: readonly [];
260
+ readonly lowerBoundTable: {
261
+ readonly key: "minAmount";
262
+ };
263
+ readonly description: "Lower-bound markup rows keyed per cost entry by its vendor-cost estimate: first row minAmount 0, minAmounts strictly ascending, so gaps and overlaps are impossible. No property override; visible to roster agents and superadmins only, never to org-side viewers.";
264
+ readonly items: {
265
+ readonly type: "object";
266
+ readonly additionalProperties: false;
267
+ readonly required: readonly ["minAmount", "percent"];
268
+ readonly properties: {
269
+ readonly minAmount: {
270
+ readonly type: "integer";
271
+ readonly minimum: 0;
272
+ readonly description: "Inclusive lower bound of the tier in integer cents.";
273
+ };
274
+ readonly percent: {
275
+ readonly type: "number";
276
+ readonly minimum: 0;
277
+ readonly description: "Markup percent for the tier, uncapped.";
278
+ };
279
+ };
280
+ };
281
+ };
282
+ };
283
+ };
213
284
  };
214
285
  };
215
286
  readonly SOS: {
@@ -242,6 +313,34 @@ export declare const organizationSchema: {
242
313
  };
243
314
  };
244
315
  };
316
+ readonly taxExempt: {
317
+ readonly type: "boolean";
318
+ readonly default: false;
319
+ readonly description: string;
320
+ };
321
+ readonly billingAddress: {
322
+ readonly $ref: "definitions.json#/definitions/address";
323
+ readonly description: string;
324
+ };
325
+ readonly billingContacts: {
326
+ readonly type: "array";
327
+ readonly description: string;
328
+ readonly items: {
329
+ readonly type: "object";
330
+ readonly additionalProperties: false;
331
+ readonly required: readonly ["name", "email"];
332
+ readonly properties: {
333
+ readonly name: {
334
+ readonly type: "string";
335
+ readonly minLength: 1;
336
+ };
337
+ readonly email: {
338
+ readonly type: "string";
339
+ readonly format: "email";
340
+ };
341
+ };
342
+ };
343
+ };
245
344
  readonly createdAt: {
246
345
  readonly $ref: "definitions.json#/definitions/date";
247
346
  };
@@ -264,7 +363,19 @@ export type OrganizationSchema = FromSchema<typeof organizationSchema, {
264
363
  }
265
364
  ];
266
365
  }>;
267
- type ConciergeTickets = NonNullable<NonNullable<NonNullable<OrganizationSchema["features"]>["Concierge"]>["tickets"]>;
366
+ type ConciergeFeatures = NonNullable<NonNullable<OrganizationSchema["features"]>["Concierge"]>;
367
+ type ConciergeTickets = NonNullable<ConciergeFeatures["tickets"]>;
368
+ /** Org-level DNE approval gate config: amount plus default approver set. */
369
+ export type ConciergeApprovalsConfig = NonNullable<ConciergeFeatures["approvals"]>;
370
+ /**
371
+ * The ISO 4217 code every money amount an organization owns is denominated in.
372
+ * USD alone in v1: widening the enum needs a minor-units exponent table first.
373
+ */
374
+ export type Currency = NonNullable<OrganizationSchema["currency"]>;
375
+ /** One lower-bound markup tier row. */
376
+ export type MarkupTier = NonNullable<NonNullable<ConciergeFeatures["costs"]>["markupTiers"]>[number];
377
+ /** One OneBill billing contact: a plain name/email pair, KFC-edited. */
378
+ export type OrganizationBillingContact = NonNullable<OrganizationSchema["billingContacts"]>[number];
268
379
  /** One org-wide ticket notification default: channels + lock for a single event. */
269
380
  export type OrgNotificationDefaultEntry = NonNullable<ConciergeTickets["notifications"]>[number];
270
381
  /** Response envelope for the org notification defaults endpoints. */
@@ -21,6 +21,12 @@ const organizationSchema = {
21
21
  },
22
22
  accountNumber: { type: ["number", "null"] },
23
23
  name: { type: "string" },
24
+ currency: {
25
+ type: "string",
26
+ enum: ["USD"],
27
+ default: "USD",
28
+ description: "ISO 4217 currency code for all of the organization's money amounts. USD only in v1."
29
+ },
24
30
  smsNumber: { type: "string" },
25
31
  properties: {
26
32
  type: "array",
@@ -168,6 +174,65 @@ const organizationSchema = {
168
174
  items: { type: "string" }
169
175
  }
170
176
  } }
177
+ },
178
+ facilities: {
179
+ type: "object",
180
+ additionalProperties: false,
181
+ properties: {
182
+ enabled: {
183
+ type: "boolean",
184
+ default: false
185
+ },
186
+ agentUserId: {
187
+ type: ["string", "null"],
188
+ default: null
189
+ }
190
+ }
191
+ },
192
+ approvals: {
193
+ type: "object",
194
+ additionalProperties: false,
195
+ properties: {
196
+ dneAmount: {
197
+ type: ["integer", "null"],
198
+ minimum: 0,
199
+ default: null,
200
+ description: "Do-not-exceed amount in integer cents. Tickets whose marked-up estimate total exceeds it require approval; null or unset means the gate is off."
201
+ },
202
+ approverUserIds: {
203
+ type: "array",
204
+ default: [],
205
+ description: "Org users asked to approve when the gate trips; the effective set freezes onto each approval record at request time.",
206
+ items: { type: "string" }
207
+ }
208
+ }
209
+ },
210
+ costs: {
211
+ type: "object",
212
+ additionalProperties: false,
213
+ properties: { markupTiers: {
214
+ type: "array",
215
+ default: [],
216
+ lowerBoundTable: { key: "minAmount" },
217
+ description: "Lower-bound markup rows keyed per cost entry by its vendor-cost estimate: first row minAmount 0, minAmounts strictly ascending, so gaps and overlaps are impossible. No property override; visible to roster agents and superadmins only, never to org-side viewers.",
218
+ items: {
219
+ type: "object",
220
+ additionalProperties: false,
221
+ required: ["minAmount", "percent"],
222
+ properties: {
223
+ minAmount: {
224
+ type: "integer",
225
+ minimum: 0,
226
+ description: "Inclusive lower bound of the tier in integer cents."
227
+ },
228
+ percent: {
229
+ type: "number",
230
+ minimum: 0,
231
+ description: "Markup percent for the tier, uncapped."
232
+ }
233
+ }
234
+ }
235
+ } }
171
236
  }
172
237
  }
173
238
  },
@@ -191,6 +256,34 @@ const organizationSchema = {
191
256
  additionalProperties: true,
192
257
  properties: { webhookToken: { type: "string" } }
193
258
  },
259
+ taxExempt: {
260
+ type: "boolean",
261
+ default: false,
262
+ description: "Whether OneBill bills to this organization carry no tax. Kohost staff-edited; a draft bill live-reads it and snapshots it at mark-sent."
263
+ },
264
+ billingAddress: {
265
+ $ref: "definitions.json#/definitions/address",
266
+ description: "Postal address printed on OneBill bills. Org administrators edit it; a bill live-reads it while draft and snapshots it at mark-sent, which requires line1, city, state, and postalCode to be non-empty."
267
+ },
268
+ billingContacts: {
269
+ type: "array",
270
+ description: "Recipients of the bill-sent email. KFC-edited only; plain name/email pairs, recipients need not be platform users. Mark-sent requires at least one contact.",
271
+ items: {
272
+ type: "object",
273
+ additionalProperties: false,
274
+ required: ["name", "email"],
275
+ properties: {
276
+ name: {
277
+ type: "string",
278
+ minLength: 1
279
+ },
280
+ email: {
281
+ type: "string",
282
+ format: "email"
283
+ }
284
+ }
285
+ }
286
+ },
194
287
  createdAt: { $ref: "definitions.json#/definitions/date" },
195
288
  updatedAt: { $ref: "definitions.json#/definitions/date" },
196
289
  deletedAt: { $ref: "definitions.json#/definitions/date" }
@@ -1 +1 @@
1
- {"version":3,"file":"organization.js","names":[],"sources":["../../.generated/schemas/organization.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const organizationSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"organization.json\",\n title: \"Organization\",\n type: \"object\",\n description:\n \"An organization is a group or entity that subscribes to Kohost software.\",\n required: [\"id\", \"type\", \"accountNumber\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"organization\",\n enum: [\"organization\"],\n },\n accountNumber: {\n type: [\"number\", \"null\"],\n },\n name: {\n type: \"string\",\n },\n smsNumber: {\n type: \"string\",\n },\n properties: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n appManifest: {\n type: \"object\",\n\n properties: {\n name: {\n type: \"string\",\n },\n short_name: {\n type: \"string\",\n },\n scope: {\n type: \"string\",\n },\n start_url: {\n type: \"string\",\n },\n themeColor: {\n type: \"string\",\n },\n backgroundColor: {\n type: \"string\",\n },\n display: {\n type: \"string\",\n enum: [\"fullscreen\", \"standalone\", \"minimal-ui\", \"browser\"],\n default: \"fullscreen\",\n },\n orientation: {\n type: \"string\",\n enum: [\"portrait\", \"landscape\"],\n default: \"portrait\",\n },\n splash: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n },\n },\n icons: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n },\n },\n },\n logo: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n },\n },\n },\n default: {\n name: \"Kohost\",\n short_name: \"Kohost\",\n start_url: \"/\",\n scope: \"/\",\n display: \"fullscreen\",\n orientation: \"portrait\",\n theme_color: \"#1d1f22\",\n background_color: \"#1d1f22\",\n icons: [\n {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512\",\n sizes: \"512x512\",\n type: \"image/png\",\n },\n ],\n splash: {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500\",\n sizes: \"1500x800\",\n type: \"image/jpg\",\n },\n logo: {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75\",\n sizes: \"300x75\",\n type: \"image/png\",\n },\n },\n },\n features: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n Concierge: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n tickets: {\n type: \"object\",\n properties: {\n nextTicketNumber: {\n type: [\"string\", \"integer\"],\n default: 1,\n },\n autoCloseAfterMinutes: {\n type: \"integer\",\n description:\n \"Minutes a solved Ticket waits before it is automatically closed. Always on; read when the close job is scheduled.\",\n default: 10080,\n minimum: 5,\n },\n notifications: {\n type: \"array\",\n description:\n \"Org-wide ticket notification defaults: the starting channel set per event, and whether members may turn an event off. Read when resolving a member's effective channels.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"discriminator\", \"channels\", \"locked\"],\n properties: {\n discriminator: {\n $ref: \"definitions.json#/definitions/ticketNotificationEvent\",\n },\n channels: {\n type: \"array\",\n items: {\n $ref: \"definitions.json#/definitions/notificationChannel\",\n },\n },\n locked: {\n type: \"boolean\",\n },\n },\n },\n },\n },\n },\n departments: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"array\",\n description:\n \"Org-wide curated Department ID order for the Concierge settings UI. The `Unassigned` and `System` pseudo-groups are pinned at the bottom by the UI and have no entries here.\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n issues: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"object\",\n description:\n \"Org-wide curated Issue ordering for the Concierge settings UI, mapping each Department ID to its ordered Issue IDs.\",\n additionalProperties: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n },\n },\n },\n SOS: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n types: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"array\",\n description:\n \"Org-wide curated SOS Type ID order. Each Property renders its subset of \" +\n \"SOS Types in this order; org-wide and per-property-selected types share one \" +\n \"order. IDs for deleted SOS Types are ignored on read; SOS Types not yet listed \" +\n \"sort to the end alphabetically.\",\n items: { type: \"string\" },\n },\n },\n },\n },\n },\n },\n },\n credentials: {\n type: \"object\",\n additionalProperties: true,\n properties: {\n webhookToken: { type: \"string\" },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type OrganizationSchema = FromSchema<\n typeof organizationSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\ntype ConciergeTickets = NonNullable<\n NonNullable<NonNullable<OrganizationSchema[\"features\"]>[\"Concierge\"]>[\"tickets\"]\n>;\n\n/** One org-wide ticket notification default: channels + lock for a single event. */\nexport type OrgNotificationDefaultEntry = NonNullable<\n ConciergeTickets[\"notifications\"]\n>[number];\n\n/** Response envelope for the org notification defaults endpoints. */\nexport interface OrgNotificationDefaults {\n organizationId: string;\n notifications: OrgNotificationDefaultEntry[];\n}\n"],"mappings":";AAGA,MAAa,qBAAqB;CAChC,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAM;EAAQ;EAAiB;CAAM;CAChD,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,cAAc;EACvB;EACA,eAAe,EACb,MAAM,CAAC,UAAU,MAAM,EACzB;EACA,MAAM,EACJ,MAAM,SACR;EACA,WAAW,EACT,MAAM,SACR;EACA,YAAY;GACV,MAAM;GACN,OAAO,EACL,MAAM,SACR;EACF;EACA,aAAa;GACX,MAAM;GAEN,YAAY;IACV,MAAM,EACJ,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,WAAW,EACT,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,iBAAiB,EACf,MAAM,SACR;IACA,SAAS;KACP,MAAM;KACN,MAAM;MAAC;MAAc;MAAc;MAAc;KAAS;KAC1D,SAAS;IACX;IACA,aAAa;KACX,MAAM;KACN,MAAM,CAAC,YAAY,WAAW;KAC9B,SAAS;IACX;IACA,QAAQ;KACN,MAAM;KACN,YAAY;MACV,KAAK,EACH,MAAM,SACR;MACA,MAAM,EACJ,MAAM,SACR;MACA,OAAO,EACL,MAAM,SACR;KACF;IACF;IACA,OAAO;KACL,MAAM;KACN,OAAO;MACL,MAAM;MACN,YAAY;OACV,KAAK,EACH,MAAM,SACR;OACA,OAAO,EACL,MAAM,SACR;OACA,MAAM,EACJ,MAAM,SACR;MACF;KACF;IACF;IACA,MAAM;KACJ,MAAM;KACN,YAAY;MACV,KAAK,EACH,MAAM,SACR;MACA,MAAM,EACJ,MAAM,SACR;MACA,OAAO,EACL,MAAM,SACR;KACF;IACF;GACF;GACA,SAAS;IACP,MAAM;IACN,YAAY;IACZ,WAAW;IACX,OAAO;IACP,SAAS;IACT,aAAa;IACb,aAAa;IACb,kBAAkB;IAClB,OAAO,CACL;KACE,KAAK;KACL,OAAO;KACP,MAAM;IACR,CACF;IACA,QAAQ;KACN,KAAK;KACL,OAAO;KACP,MAAM;IACR;IACA,MAAM;KACJ,KAAK;KACL,OAAO;KACP,MAAM;IACR;GACF;EACF;EACA,UAAU;GACR,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,WAAW;KACT,MAAM;KACN,sBAAsB;KACtB,YAAY;MACV,SAAS;OACP,MAAM;OACN,YAAY;QACV,kBAAkB;SAChB,MAAM,CAAC,UAAU,SAAS;SAC1B,SAAS;QACX;QACA,uBAAuB;SACrB,MAAM;SACN,aACE;SACF,SAAS;SACT,SAAS;QACX;QACA,eAAe;SACb,MAAM;SACN,aACE;SACF,OAAO;UACL,MAAM;UACN,sBAAsB;UACtB,UAAU;WAAC;WAAiB;WAAY;UAAQ;UAChD,YAAY;WACV,eAAe,EACb,MAAM,wDACR;WACA,UAAU;YACR,MAAM;YACN,OAAO,EACL,MAAM,oDACR;WACF;WACA,QAAQ,EACN,MAAM,UACR;UACF;SACF;QACF;OACF;MACF;MACA,aAAa;OACX,MAAM;OACN,sBAAsB;OACtB,YAAY,EACV,OAAO;QACL,MAAM;QACN,aACE;QACF,OAAO,EACL,MAAM,SACR;OACF,EACF;MACF;MACA,QAAQ;OACN,MAAM;OACN,sBAAsB;OACtB,YAAY,EACV,OAAO;QACL,MAAM;QACN,aACE;QACF,sBAAsB;SACpB,MAAM;SACN,OAAO,EACL,MAAM,SACR;QACF;OACF,EACF;MACF;KACF;IACF;IACA,KAAK;KACH,MAAM;KACN,sBAAsB;KACtB,YAAY,EACV,OAAO;MACL,MAAM;MACN,sBAAsB;MACtB,YAAY,EACV,OAAO;OACL,MAAM;OACN,aACE;OAIF,OAAO,EAAE,MAAM,SAAS;MAC1B,EACF;KACF,EACF;IACF;GACF;EACF;EACA,aAAa;GACX,MAAM;GACN,sBAAsB;GACtB,YAAY,EACV,cAAc,EAAE,MAAM,SAAS,EACjC;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
1
+ {"version":3,"file":"organization.js","names":[],"sources":["../../.generated/schemas/organization.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const organizationSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"organization.json\",\n title: \"Organization\",\n type: \"object\",\n description:\n \"An organization is a group or entity that subscribes to Kohost software.\",\n required: [\"id\", \"type\", \"accountNumber\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"organization\",\n enum: [\"organization\"],\n },\n accountNumber: {\n type: [\"number\", \"null\"],\n },\n name: {\n type: \"string\",\n },\n // Widening this enum requires a minor-units exponent table first:\n // parseMoneyToCents and centsToInput both assume 2 decimal places.\n currency: {\n type: \"string\",\n enum: [\"USD\"],\n default: \"USD\",\n description:\n \"ISO 4217 currency code for all of the organization's money amounts. USD only in v1.\",\n },\n smsNumber: {\n type: \"string\",\n },\n properties: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n appManifest: {\n type: \"object\",\n\n properties: {\n name: {\n type: \"string\",\n },\n short_name: {\n type: \"string\",\n },\n scope: {\n type: \"string\",\n },\n start_url: {\n type: \"string\",\n },\n themeColor: {\n type: \"string\",\n },\n backgroundColor: {\n type: \"string\",\n },\n display: {\n type: \"string\",\n enum: [\"fullscreen\", \"standalone\", \"minimal-ui\", \"browser\"],\n default: \"fullscreen\",\n },\n orientation: {\n type: \"string\",\n enum: [\"portrait\", \"landscape\"],\n default: \"portrait\",\n },\n splash: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n },\n },\n icons: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n },\n },\n },\n logo: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n },\n },\n },\n default: {\n name: \"Kohost\",\n short_name: \"Kohost\",\n start_url: \"/\",\n scope: \"/\",\n display: \"fullscreen\",\n orientation: \"portrait\",\n theme_color: \"#1d1f22\",\n background_color: \"#1d1f22\",\n icons: [\n {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512\",\n sizes: \"512x512\",\n type: \"image/png\",\n },\n ],\n splash: {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500\",\n sizes: \"1500x800\",\n type: \"image/jpg\",\n },\n logo: {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75\",\n sizes: \"300x75\",\n type: \"image/png\",\n },\n },\n },\n features: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n Concierge: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n tickets: {\n type: \"object\",\n properties: {\n nextTicketNumber: {\n type: [\"string\", \"integer\"],\n default: 1,\n },\n autoCloseAfterMinutes: {\n type: \"integer\",\n description:\n \"Minutes a solved Ticket waits before it is automatically closed. Always on; read when the close job is scheduled.\",\n default: 10080,\n minimum: 5,\n },\n notifications: {\n type: \"array\",\n description:\n \"Org-wide ticket notification defaults: the starting channel set per event, and whether members may turn an event off. Read when resolving a member's effective channels.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"discriminator\", \"channels\", \"locked\"],\n properties: {\n discriminator: {\n $ref: \"definitions.json#/definitions/ticketNotificationEvent\",\n },\n channels: {\n type: \"array\",\n items: {\n $ref: \"definitions.json#/definitions/notificationChannel\",\n },\n },\n locked: {\n type: \"boolean\",\n },\n },\n },\n },\n },\n },\n departments: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"array\",\n description:\n \"Org-wide curated Department ID order for the Concierge settings UI. The `Unassigned` and `System` pseudo-groups are pinned at the bottom by the UI and have no entries here.\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n issues: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"object\",\n description:\n \"Org-wide curated Issue ordering for the Concierge settings UI, mapping each Department ID to its ordered Issue IDs.\",\n additionalProperties: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n },\n facilities: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n enabled: {\n type: \"boolean\",\n default: false,\n },\n agentUserId: {\n type: [\"string\", \"null\"],\n default: null,\n },\n },\n },\n approvals: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n dneAmount: {\n type: [\"integer\", \"null\"],\n minimum: 0,\n default: null,\n description:\n \"Do-not-exceed amount in integer cents. Tickets whose marked-up estimate total exceeds it require approval; null or unset means the gate is off.\",\n },\n approverUserIds: {\n type: \"array\",\n default: [],\n description:\n \"Org users asked to approve when the gate trips; the effective set freezes onto each approval record at request time.\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n costs: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n markupTiers: {\n type: \"array\",\n default: [],\n lowerBoundTable: { key: \"minAmount\" },\n description:\n \"Lower-bound markup rows keyed per cost entry by its vendor-cost estimate: first row minAmount 0, minAmounts strictly ascending, so gaps and overlaps are impossible. No property override; visible to roster agents and superadmins only, never to org-side viewers.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"minAmount\", \"percent\"],\n properties: {\n minAmount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"Inclusive lower bound of the tier in integer cents.\",\n },\n percent: {\n type: \"number\",\n minimum: 0,\n description: \"Markup percent for the tier, uncapped.\",\n },\n },\n },\n },\n },\n },\n },\n },\n SOS: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n types: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"array\",\n description:\n \"Org-wide curated SOS Type ID order. Each Property renders its subset of \" +\n \"SOS Types in this order; org-wide and per-property-selected types share one \" +\n \"order. IDs for deleted SOS Types are ignored on read; SOS Types not yet listed \" +\n \"sort to the end alphabetically.\",\n items: { type: \"string\" },\n },\n },\n },\n },\n },\n },\n },\n credentials: {\n type: \"object\",\n additionalProperties: true,\n properties: {\n webhookToken: { type: \"string\" },\n },\n },\n taxExempt: {\n type: \"boolean\",\n default: false,\n description:\n \"Whether OneBill bills to this organization carry no tax. Kohost \" +\n \"staff-edited; a draft bill live-reads it and snapshots it at \" +\n \"mark-sent.\",\n },\n billingAddress: {\n $ref: \"definitions.json#/definitions/address\",\n description:\n \"Postal address printed on OneBill bills. Org administrators edit it; \" +\n \"a bill live-reads it while draft and snapshots it at mark-sent, which \" +\n \"requires line1, city, state, and postalCode to be non-empty.\",\n },\n billingContacts: {\n type: \"array\",\n description:\n \"Recipients of the bill-sent email. KFC-edited only; plain name/email \" +\n \"pairs, recipients need not be platform users. Mark-sent requires at \" +\n \"least one contact.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"name\", \"email\"],\n properties: {\n name: {\n type: \"string\",\n minLength: 1,\n },\n email: {\n type: \"string\",\n format: \"email\",\n },\n },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type OrganizationSchema = FromSchema<\n typeof organizationSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\ntype ConciergeFeatures = NonNullable<\n NonNullable<OrganizationSchema[\"features\"]>[\"Concierge\"]\n>;\n\ntype ConciergeTickets = NonNullable<ConciergeFeatures[\"tickets\"]>;\n\n/** Org-level DNE approval gate config: amount plus default approver set. */\nexport type ConciergeApprovalsConfig = NonNullable<\n ConciergeFeatures[\"approvals\"]\n>;\n\n/**\n * The ISO 4217 code every money amount an organization owns is denominated in.\n * USD alone in v1: widening the enum needs a minor-units exponent table first.\n */\nexport type Currency = NonNullable<OrganizationSchema[\"currency\"]>;\n\n/** One lower-bound markup tier row. */\nexport type MarkupTier = NonNullable<\n NonNullable<ConciergeFeatures[\"costs\"]>[\"markupTiers\"]\n>[number];\n\n/** One OneBill billing contact: a plain name/email pair, KFC-edited. */\nexport type OrganizationBillingContact = NonNullable<\n OrganizationSchema[\"billingContacts\"]\n>[number];\n\n/** One org-wide ticket notification default: channels + lock for a single event. */\nexport type OrgNotificationDefaultEntry = NonNullable<\n ConciergeTickets[\"notifications\"]\n>[number];\n\n/** Response envelope for the org notification defaults endpoints. */\nexport interface OrgNotificationDefaults {\n organizationId: string;\n notifications: OrgNotificationDefaultEntry[];\n}\n"],"mappings":";AAGA,MAAa,qBAAqB;CAChC,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAM;EAAQ;EAAiB;CAAM;CAChD,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,cAAc;EACvB;EACA,eAAe,EACb,MAAM,CAAC,UAAU,MAAM,EACzB;EACA,MAAM,EACJ,MAAM,SACR;EAGA,UAAU;GACR,MAAM;GACN,MAAM,CAAC,KAAK;GACZ,SAAS;GACT,aACE;EACJ;EACA,WAAW,EACT,MAAM,SACR;EACA,YAAY;GACV,MAAM;GACN,OAAO,EACL,MAAM,SACR;EACF;EACA,aAAa;GACX,MAAM;GAEN,YAAY;IACV,MAAM,EACJ,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,WAAW,EACT,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,iBAAiB,EACf,MAAM,SACR;IACA,SAAS;KACP,MAAM;KACN,MAAM;MAAC;MAAc;MAAc;MAAc;KAAS;KAC1D,SAAS;IACX;IACA,aAAa;KACX,MAAM;KACN,MAAM,CAAC,YAAY,WAAW;KAC9B,SAAS;IACX;IACA,QAAQ;KACN,MAAM;KACN,YAAY;MACV,KAAK,EACH,MAAM,SACR;MACA,MAAM,EACJ,MAAM,SACR;MACA,OAAO,EACL,MAAM,SACR;KACF;IACF;IACA,OAAO;KACL,MAAM;KACN,OAAO;MACL,MAAM;MACN,YAAY;OACV,KAAK,EACH,MAAM,SACR;OACA,OAAO,EACL,MAAM,SACR;OACA,MAAM,EACJ,MAAM,SACR;MACF;KACF;IACF;IACA,MAAM;KACJ,MAAM;KACN,YAAY;MACV,KAAK,EACH,MAAM,SACR;MACA,MAAM,EACJ,MAAM,SACR;MACA,OAAO,EACL,MAAM,SACR;KACF;IACF;GACF;GACA,SAAS;IACP,MAAM;IACN,YAAY;IACZ,WAAW;IACX,OAAO;IACP,SAAS;IACT,aAAa;IACb,aAAa;IACb,kBAAkB;IAClB,OAAO,CACL;KACE,KAAK;KACL,OAAO;KACP,MAAM;IACR,CACF;IACA,QAAQ;KACN,KAAK;KACL,OAAO;KACP,MAAM;IACR;IACA,MAAM;KACJ,KAAK;KACL,OAAO;KACP,MAAM;IACR;GACF;EACF;EACA,UAAU;GACR,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,WAAW;KACT,MAAM;KACN,sBAAsB;KACtB,YAAY;MACV,SAAS;OACP,MAAM;OACN,YAAY;QACV,kBAAkB;SAChB,MAAM,CAAC,UAAU,SAAS;SAC1B,SAAS;QACX;QACA,uBAAuB;SACrB,MAAM;SACN,aACE;SACF,SAAS;SACT,SAAS;QACX;QACA,eAAe;SACb,MAAM;SACN,aACE;SACF,OAAO;UACL,MAAM;UACN,sBAAsB;UACtB,UAAU;WAAC;WAAiB;WAAY;UAAQ;UAChD,YAAY;WACV,eAAe,EACb,MAAM,wDACR;WACA,UAAU;YACR,MAAM;YACN,OAAO,EACL,MAAM,oDACR;WACF;WACA,QAAQ,EACN,MAAM,UACR;UACF;SACF;QACF;OACF;MACF;MACA,aAAa;OACX,MAAM;OACN,sBAAsB;OACtB,YAAY,EACV,OAAO;QACL,MAAM;QACN,aACE;QACF,OAAO,EACL,MAAM,SACR;OACF,EACF;MACF;MACA,QAAQ;OACN,MAAM;OACN,sBAAsB;OACtB,YAAY,EACV,OAAO;QACL,MAAM;QACN,aACE;QACF,sBAAsB;SACpB,MAAM;SACN,OAAO,EACL,MAAM,SACR;QACF;OACF,EACF;MACF;MACA,YAAY;OACV,MAAM;OACN,sBAAsB;OACtB,YAAY;QACV,SAAS;SACP,MAAM;SACN,SAAS;QACX;QACA,aAAa;SACX,MAAM,CAAC,UAAU,MAAM;SACvB,SAAS;QACX;OACF;MACF;MACA,WAAW;OACT,MAAM;OACN,sBAAsB;OACtB,YAAY;QACV,WAAW;SACT,MAAM,CAAC,WAAW,MAAM;SACxB,SAAS;SACT,SAAS;SACT,aACE;QACJ;QACA,iBAAiB;SACf,MAAM;SACN,SAAS,CAAC;SACV,aACE;SACF,OAAO,EACL,MAAM,SACR;QACF;OACF;MACF;MACA,OAAO;OACL,MAAM;OACN,sBAAsB;OACtB,YAAY,EACV,aAAa;QACX,MAAM;QACN,SAAS,CAAC;QACV,iBAAiB,EAAE,KAAK,YAAY;QACpC,aACE;QACF,OAAO;SACL,MAAM;SACN,sBAAsB;SACtB,UAAU,CAAC,aAAa,SAAS;SACjC,YAAY;UACV,WAAW;WACT,MAAM;WACN,SAAS;WACT,aACE;UACJ;UACA,SAAS;WACP,MAAM;WACN,SAAS;WACT,aAAa;UACf;SACF;QACF;OACF,EACF;MACF;KACF;IACF;IACA,KAAK;KACH,MAAM;KACN,sBAAsB;KACtB,YAAY,EACV,OAAO;MACL,MAAM;MACN,sBAAsB;MACtB,YAAY,EACV,OAAO;OACL,MAAM;OACN,aACE;OAIF,OAAO,EAAE,MAAM,SAAS;MAC1B,EACF;KACF,EACF;IACF;GACF;EACF;EACA,aAAa;GACX,MAAM;GACN,sBAAsB;GACtB,YAAY,EACV,cAAc,EAAE,MAAM,SAAS,EACjC;EACF;EACA,WAAW;GACT,MAAM;GACN,SAAS;GACT,aACE;EAGJ;EACA,gBAAgB;GACd,MAAM;GACN,aACE;EAGJ;EACA,iBAAiB;GACf,MAAM;GACN,aACE;GAGF,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU,CAAC,QAAQ,OAAO;IAC1B,YAAY;KACV,MAAM;MACJ,MAAM;MACN,WAAW;KACb;KACA,OAAO;MACL,MAAM;MACN,QAAQ;KACV;IACF;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
@@ -160,6 +160,38 @@ export declare const propertySchema: {
160
160
  readonly type: "boolean";
161
161
  readonly default: true;
162
162
  };
163
+ readonly facilities: {
164
+ readonly type: "object";
165
+ readonly additionalProperties: false;
166
+ readonly description: "Per-property override of the organization's facilities (KFC) config; fields are deliberately default-free so absence inherits the organization value";
167
+ readonly properties: {
168
+ readonly enabled: {
169
+ readonly type: "boolean";
170
+ };
171
+ readonly agentUserId: {
172
+ readonly type: readonly ["string", "null"];
173
+ };
174
+ };
175
+ };
176
+ readonly approvals: {
177
+ readonly type: "object";
178
+ readonly additionalProperties: false;
179
+ readonly description: "Per-property override of the organization's approvals config; fields are deliberately default-free so absence inherits the organization value. Values only: the gate cannot be disabled per property, and markup tiers are org-only.";
180
+ readonly properties: {
181
+ readonly dneAmount: {
182
+ readonly type: "integer";
183
+ readonly minimum: 0;
184
+ readonly description: "Do-not-exceed amount in integer cents for this property.";
185
+ };
186
+ readonly approverUserIds: {
187
+ readonly type: "array";
188
+ readonly description: "Org users asked to approve for this property, replacing the org list when present.";
189
+ readonly items: {
190
+ readonly type: "string";
191
+ };
192
+ };
193
+ };
194
+ };
163
195
  };
164
196
  };
165
197
  readonly SOS: {
@@ -123,6 +123,32 @@ const propertySchema = {
123
123
  ratings: {
124
124
  type: "boolean",
125
125
  default: true
126
+ },
127
+ facilities: {
128
+ type: "object",
129
+ additionalProperties: false,
130
+ description: "Per-property override of the organization's facilities (KFC) config; fields are deliberately default-free so absence inherits the organization value",
131
+ properties: {
132
+ enabled: { type: "boolean" },
133
+ agentUserId: { type: ["string", "null"] }
134
+ }
135
+ },
136
+ approvals: {
137
+ type: "object",
138
+ additionalProperties: false,
139
+ description: "Per-property override of the organization's approvals config; fields are deliberately default-free so absence inherits the organization value. Values only: the gate cannot be disabled per property, and markup tiers are org-only.",
140
+ properties: {
141
+ dneAmount: {
142
+ type: "integer",
143
+ minimum: 0,
144
+ description: "Do-not-exceed amount in integer cents for this property."
145
+ },
146
+ approverUserIds: {
147
+ type: "array",
148
+ description: "Org users asked to approve for this property, replacing the org list when present.",
149
+ items: { type: "string" }
150
+ }
151
+ }
126
152
  }
127
153
  }
128
154
  },
@@ -1 +1 @@
1
- {"version":3,"file":"property.js","names":[],"sources":["../../.generated/schemas/property.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const propertySchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"property.json\",\n title: \"Property\",\n type: \"object\",\n description: \"A property is a physical asset or building\",\n required: [\"id\", \"name\", \"type\", \"organization\", \"timezone\", \"discriminator\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n default: \"property\",\n enum: [\"property\"],\n },\n discriminator: {\n type: \"string\",\n enum: [\"education\", \"commercial\"],\n },\n organization: {\n type: \"string\",\n description: \"Reference (id) to the organization that owns this property\",\n },\n testModeEnabled: {\n type: \"boolean\",\n },\n testMode: {\n type: \"object\",\n properties: {\n notificationEmails: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n description:\n \"Only users with these email addresses will receive notifications in test mode, including sms, email, or push.\",\n },\n notificationEmailDomains: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n description:\n \"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push.\",\n },\n },\n },\n timezone: {\n type: \"string\",\n description: \"IANA timezone string\",\n pattern: \"^([a-zA-Z]+/[a-zA-Z_]+)$\",\n examples: [\"America/New_York\", \"America/Los_Angeles\"],\n },\n smsNumber: {\n type: \"string\",\n },\n voiceNumber: {\n type: \"string\",\n },\n tags: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n address: {\n $ref: \"definitions.json#/definitions/address\",\n },\n latitude: {\n type: \"number\",\n },\n longitude: {\n type: \"number\",\n },\n features: {\n type: \"object\",\n properties: {\n SmartBuilding: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n alarmConfig: {\n type: \"object\",\n patternProperties: {\n \"^[a-zA-Z0-9]+$\": {\n type: \"object\",\n properties: {\n zoneLockMap: {\n type: \"object\",\n description: \"Maps zone numbers to lock ids\",\n additionalProperties: { type: \"string\" },\n },\n },\n },\n },\n examples: [\n {\n wZz7hucY: {\n zoneLockMap: {\n 1: \"wc87hucc\",\n 2: \"bc86hzxc\",\n 3: \"zv5ah5jv\",\n },\n },\n },\n ],\n },\n cameraConfig: {\n type: \"object\",\n doorStationConfig: {\n type: \"object\",\n patternProperties: {\n \"^[a-zA-Z0-9]+$\": {\n type: \"object\",\n properties: {\n lockIds: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n default: [],\n description:\n \"List of lock ids that will be available for control from this door station\",\n },\n },\n },\n },\n },\n examples: [\n {\n wZz7hucY: {\n lockIds: [\"wc87hucb\", \"wc87hucd\"],\n },\n },\n ],\n },\n },\n additionalProperties: false,\n },\n Concierge: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n timeTracking: {\n type: \"boolean\",\n default: false,\n },\n feedback: {\n type: \"boolean\",\n default: true,\n },\n ratings: {\n type: \"boolean\",\n default: true,\n },\n },\n },\n SOS: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n active: {\n type: \"boolean\",\n },\n activatedAt: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n },\n activatedBy: {\n type: [\"object\", \"null\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n enum: [\"user\", \"device\", \"automation\"],\n },\n },\n },\n activatedMessage: {\n type: [\"string\", \"null\"],\n },\n activeSOSTypeIds: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n deactivatedAt: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n },\n deactivatedBy: {\n type: [\"object\", \"null\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n enum: [\"user\", \"device\", \"automation\"],\n },\n },\n },\n },\n },\n Automations: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n Resources: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n default: {\n SmartBuilding: {},\n },\n },\n notifications: {\n type: \"object\",\n properties: {\n email: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n sms: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n push: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n default: {\n email: {\n enabled: false,\n },\n sms: {\n enabled: false,\n },\n push: {\n enabled: false,\n },\n },\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n credentials: {\n type: \"object\",\n additionalProperties: true,\n },\n },\n} as const;\n\nexport type PropertySchema = FromSchema<\n typeof propertySchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,iBAAiB;CAC5B,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,aAAa;CACb,UAAU;EAAC;EAAM;EAAQ;EAAQ;EAAgB;EAAY;CAAe;CAC5E,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM,EACJ,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,UAAU;EACnB;EACA,eAAe;GACb,MAAM;GACN,MAAM,CAAC,aAAa,YAAY;EAClC;EACA,cAAc;GACZ,MAAM;GACN,aAAa;EACf;EACA,iBAAiB,EACf,MAAM,UACR;EACA,UAAU;GACR,MAAM;GACN,YAAY;IACV,oBAAoB;KAClB,MAAM;KACN,OAAO,EACL,MAAM,SACR;KACA,aACE;IACJ;IACA,0BAA0B;KACxB,MAAM;KACN,OAAO,EACL,MAAM,SACR;KACA,aACE;IACJ;GACF;EACF;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,SAAS;GACT,UAAU,CAAC,oBAAoB,qBAAqB;EACtD;EACA,WAAW,EACT,MAAM,SACR;EACA,aAAa,EACX,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,OAAO,EACL,MAAM,SACR;EACF;EACA,SAAS,EACP,MAAM,wCACR;EACA,UAAU,EACR,MAAM,SACR;EACA,WAAW,EACT,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,YAAY;IACV,eAAe;KACb,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,aAAa;OACX,MAAM;OACN,mBAAmB,EACjB,kBAAkB;QAChB,MAAM;QACN,YAAY,EACV,aAAa;SACX,MAAM;SACN,aAAa;SACb,sBAAsB,EAAE,MAAM,SAAS;QACzC,EACF;OACF,EACF;OACA,UAAU,CACR,EACE,UAAU,EACR,aAAa;QACX,GAAG;QACH,GAAG;QACH,GAAG;OACL,EACF,EACF,CACF;MACF;MACA,cAAc;OACZ,MAAM;OACN,mBAAmB;QACjB,MAAM;QACN,mBAAmB,EACjB,kBAAkB;SAChB,MAAM;SACN,YAAY,EACV,SAAS;UACP,MAAM;UACN,OAAO,EACL,MAAM,SACR;UACA,SAAS,CAAC;UACV,aACE;SACJ,EACF;QACF,EACF;OACF;OACA,UAAU,CACR,EACE,UAAU,EACR,SAAS,CAAC,YAAY,UAAU,EAClC,EACF,CACF;MACF;KACF;KACA,sBAAsB;IACxB;IACA,WAAW;KACT,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,cAAc;OACZ,MAAM;OACN,SAAS;MACX;MACA,UAAU;OACR,MAAM;OACN,SAAS;MACX;MACA,SAAS;OACP,MAAM;OACN,SAAS;MACX;KACF;IACF;IACA,KAAK;KACH,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,QAAQ,EACN,MAAM,UACR;MACA,aAAa;OACX,MAAM,CAAC,UAAU,MAAM;OACvB,QAAQ;MACV;MACA,aAAa;OACX,MAAM,CAAC,UAAU,MAAM;OACvB,YAAY;QACV,IAAI,EACF,MAAM,SACR;QACA,eAAe,EACb,MAAM;SAAC;SAAQ;SAAU;QAAY,EACvC;OACF;MACF;MACA,kBAAkB,EAChB,MAAM,CAAC,UAAU,MAAM,EACzB;MACA,kBAAkB;OAChB,MAAM;OACN,OAAO,EACL,MAAM,SACR;MACF;MACA,eAAe;OACb,MAAM,CAAC,UAAU,MAAM;OACvB,QAAQ;MACV;MACA,eAAe;OACb,MAAM,CAAC,UAAU,MAAM;OACvB,YAAY;QACV,IAAI,EACF,MAAM,SACR;QACA,eAAe,EACb,MAAM;SAAC;SAAQ;SAAU;QAAY,EACvC;OACF;MACF;KACF;IACF;IACA,aAAa;KACX,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,WAAW;KACT,MAAM;KACN,YAAY,EACV,SAAS;MACP,MAAM;MACN,SAAS;KACX,EACF;KACA,sBAAsB;IACxB;GACF;GACA,sBAAsB;GACtB,SAAS,EACP,eAAe,CAAC,EAClB;EACF;EACA,eAAe;GACb,MAAM;GACN,YAAY;IACV,OAAO;KACL,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,KAAK;KACH,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,MAAM;KACJ,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;GACF;GACA,sBAAsB;GACtB,SAAS;IACP,OAAO,EACL,SAAS,MACX;IACA,KAAK,EACH,SAAS,MACX;IACA,MAAM,EACJ,SAAS,MACX;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,aAAa;GACX,MAAM;GACN,sBAAsB;EACxB;CACF;AACF"}
1
+ {"version":3,"file":"property.js","names":[],"sources":["../../.generated/schemas/property.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const propertySchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"property.json\",\n title: \"Property\",\n type: \"object\",\n description: \"A property is a physical asset or building\",\n required: [\"id\", \"name\", \"type\", \"organization\", \"timezone\", \"discriminator\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n default: \"property\",\n enum: [\"property\"],\n },\n discriminator: {\n type: \"string\",\n enum: [\"education\", \"commercial\"],\n },\n organization: {\n type: \"string\",\n description: \"Reference (id) to the organization that owns this property\",\n },\n testModeEnabled: {\n type: \"boolean\",\n },\n testMode: {\n type: \"object\",\n properties: {\n notificationEmails: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n description:\n \"Only users with these email addresses will receive notifications in test mode, including sms, email, or push.\",\n },\n notificationEmailDomains: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n description:\n \"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push.\",\n },\n },\n },\n timezone: {\n type: \"string\",\n description: \"IANA timezone string\",\n pattern: \"^([a-zA-Z]+/[a-zA-Z_]+)$\",\n examples: [\"America/New_York\", \"America/Los_Angeles\"],\n },\n smsNumber: {\n type: \"string\",\n },\n voiceNumber: {\n type: \"string\",\n },\n tags: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n address: {\n $ref: \"definitions.json#/definitions/address\",\n },\n latitude: {\n type: \"number\",\n },\n longitude: {\n type: \"number\",\n },\n features: {\n type: \"object\",\n properties: {\n SmartBuilding: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n alarmConfig: {\n type: \"object\",\n patternProperties: {\n \"^[a-zA-Z0-9]+$\": {\n type: \"object\",\n properties: {\n zoneLockMap: {\n type: \"object\",\n description: \"Maps zone numbers to lock ids\",\n additionalProperties: { type: \"string\" },\n },\n },\n },\n },\n examples: [\n {\n wZz7hucY: {\n zoneLockMap: {\n 1: \"wc87hucc\",\n 2: \"bc86hzxc\",\n 3: \"zv5ah5jv\",\n },\n },\n },\n ],\n },\n cameraConfig: {\n type: \"object\",\n doorStationConfig: {\n type: \"object\",\n patternProperties: {\n \"^[a-zA-Z0-9]+$\": {\n type: \"object\",\n properties: {\n lockIds: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n default: [],\n description:\n \"List of lock ids that will be available for control from this door station\",\n },\n },\n },\n },\n },\n examples: [\n {\n wZz7hucY: {\n lockIds: [\"wc87hucb\", \"wc87hucd\"],\n },\n },\n ],\n },\n },\n additionalProperties: false,\n },\n Concierge: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n timeTracking: {\n type: \"boolean\",\n default: false,\n },\n feedback: {\n type: \"boolean\",\n default: true,\n },\n ratings: {\n type: \"boolean\",\n default: true,\n },\n facilities: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-property override of the organization's facilities (KFC) config; fields are deliberately default-free so absence inherits the organization value\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n agentUserId: {\n type: [\"string\", \"null\"],\n },\n },\n },\n approvals: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-property override of the organization's approvals config; fields are deliberately default-free so absence inherits the organization value. Values only: the gate cannot be disabled per property, and markup tiers are org-only.\",\n properties: {\n dneAmount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"Do-not-exceed amount in integer cents for this property.\",\n },\n approverUserIds: {\n type: \"array\",\n description:\n \"Org users asked to approve for this property, replacing the org list when present.\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n },\n },\n SOS: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n active: {\n type: \"boolean\",\n },\n activatedAt: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n },\n activatedBy: {\n type: [\"object\", \"null\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n enum: [\"user\", \"device\", \"automation\"],\n },\n },\n },\n activatedMessage: {\n type: [\"string\", \"null\"],\n },\n activeSOSTypeIds: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n deactivatedAt: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n },\n deactivatedBy: {\n type: [\"object\", \"null\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n enum: [\"user\", \"device\", \"automation\"],\n },\n },\n },\n },\n },\n Automations: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n Resources: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n default: {\n SmartBuilding: {},\n },\n },\n notifications: {\n type: \"object\",\n properties: {\n email: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n sms: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n push: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n default: {\n email: {\n enabled: false,\n },\n sms: {\n enabled: false,\n },\n push: {\n enabled: false,\n },\n },\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n credentials: {\n type: \"object\",\n additionalProperties: true,\n },\n },\n} as const;\n\nexport type PropertySchema = FromSchema<\n typeof propertySchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,iBAAiB;CAC5B,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,aAAa;CACb,UAAU;EAAC;EAAM;EAAQ;EAAQ;EAAgB;EAAY;CAAe;CAC5E,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM,EACJ,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,UAAU;EACnB;EACA,eAAe;GACb,MAAM;GACN,MAAM,CAAC,aAAa,YAAY;EAClC;EACA,cAAc;GACZ,MAAM;GACN,aAAa;EACf;EACA,iBAAiB,EACf,MAAM,UACR;EACA,UAAU;GACR,MAAM;GACN,YAAY;IACV,oBAAoB;KAClB,MAAM;KACN,OAAO,EACL,MAAM,SACR;KACA,aACE;IACJ;IACA,0BAA0B;KACxB,MAAM;KACN,OAAO,EACL,MAAM,SACR;KACA,aACE;IACJ;GACF;EACF;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,SAAS;GACT,UAAU,CAAC,oBAAoB,qBAAqB;EACtD;EACA,WAAW,EACT,MAAM,SACR;EACA,aAAa,EACX,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,OAAO,EACL,MAAM,SACR;EACF;EACA,SAAS,EACP,MAAM,wCACR;EACA,UAAU,EACR,MAAM,SACR;EACA,WAAW,EACT,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,YAAY;IACV,eAAe;KACb,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,aAAa;OACX,MAAM;OACN,mBAAmB,EACjB,kBAAkB;QAChB,MAAM;QACN,YAAY,EACV,aAAa;SACX,MAAM;SACN,aAAa;SACb,sBAAsB,EAAE,MAAM,SAAS;QACzC,EACF;OACF,EACF;OACA,UAAU,CACR,EACE,UAAU,EACR,aAAa;QACX,GAAG;QACH,GAAG;QACH,GAAG;OACL,EACF,EACF,CACF;MACF;MACA,cAAc;OACZ,MAAM;OACN,mBAAmB;QACjB,MAAM;QACN,mBAAmB,EACjB,kBAAkB;SAChB,MAAM;SACN,YAAY,EACV,SAAS;UACP,MAAM;UACN,OAAO,EACL,MAAM,SACR;UACA,SAAS,CAAC;UACV,aACE;SACJ,EACF;QACF,EACF;OACF;OACA,UAAU,CACR,EACE,UAAU,EACR,SAAS,CAAC,YAAY,UAAU,EAClC,EACF,CACF;MACF;KACF;KACA,sBAAsB;IACxB;IACA,WAAW;KACT,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,cAAc;OACZ,MAAM;OACN,SAAS;MACX;MACA,UAAU;OACR,MAAM;OACN,SAAS;MACX;MACA,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,YAAY;OACV,MAAM;OACN,sBAAsB;OACtB,aACE;OACF,YAAY;QACV,SAAS,EACP,MAAM,UACR;QACA,aAAa,EACX,MAAM,CAAC,UAAU,MAAM,EACzB;OACF;MACF;MACA,WAAW;OACT,MAAM;OACN,sBAAsB;OACtB,aACE;OACF,YAAY;QACV,WAAW;SACT,MAAM;SACN,SAAS;SACT,aACE;QACJ;QACA,iBAAiB;SACf,MAAM;SACN,aACE;SACF,OAAO,EACL,MAAM,SACR;QACF;OACF;MACF;KACF;IACF;IACA,KAAK;KACH,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,QAAQ,EACN,MAAM,UACR;MACA,aAAa;OACX,MAAM,CAAC,UAAU,MAAM;OACvB,QAAQ;MACV;MACA,aAAa;OACX,MAAM,CAAC,UAAU,MAAM;OACvB,YAAY;QACV,IAAI,EACF,MAAM,SACR;QACA,eAAe,EACb,MAAM;SAAC;SAAQ;SAAU;QAAY,EACvC;OACF;MACF;MACA,kBAAkB,EAChB,MAAM,CAAC,UAAU,MAAM,EACzB;MACA,kBAAkB;OAChB,MAAM;OACN,OAAO,EACL,MAAM,SACR;MACF;MACA,eAAe;OACb,MAAM,CAAC,UAAU,MAAM;OACvB,QAAQ;MACV;MACA,eAAe;OACb,MAAM,CAAC,UAAU,MAAM;OACvB,YAAY;QACV,IAAI,EACF,MAAM,SACR;QACA,eAAe,EACb,MAAM;SAAC;SAAQ;SAAU;QAAY,EACvC;OACF;MACF;KACF;IACF;IACA,aAAa;KACX,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,WAAW;KACT,MAAM;KACN,YAAY,EACV,SAAS;MACP,MAAM;MACN,SAAS;KACX,EACF;KACA,sBAAsB;IACxB;GACF;GACA,sBAAsB;GACtB,SAAS,EACP,eAAe,CAAC,EAClB;EACF;EACA,eAAe;GACb,MAAM;GACN,YAAY;IACV,OAAO;KACL,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,KAAK;KACH,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,MAAM;KACJ,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;GACF;GACA,sBAAsB;GACtB,SAAS;IACP,OAAO,EACL,SAAS,MACX;IACA,KAAK,EACH,SAAS,MACX;IACA,MAAM,EACJ,SAAS,MACX;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,aAAa;GACX,MAAM;GACN,sBAAsB;EACxB;CACF;AACF"}