@kohost/api-client 7.7.0 → 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 +3 -3
  43. package/dist/schemas/definitions.js +4 -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 +9 -8
  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
@@ -0,0 +1,39 @@
1
+ export interface WriteOffCostEntryCommandConfig {
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 WriteOffCostEntryCommandRequestConfig {
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 WriteOffCostEntryCommand {
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: WriteOffCostEntryCommandRequestConfig;
35
+ static params: readonly ["id", "costId"];
36
+ static url: string;
37
+ static method: "post";
38
+ constructor(commandConfig: WriteOffCostEntryCommandConfig, options?: Record<string, unknown>);
39
+ }
@@ -0,0 +1,47 @@
1
+ //#region .generated/useCases/writeOffCostEntry.ts
2
+ /**
3
+ *
4
+ */
5
+ var WriteOffCostEntryCommand = class WriteOffCostEntryCommand {
6
+ url;
7
+ data;
8
+ query;
9
+ headers;
10
+ config;
11
+ static params = ["id", "costId"];
12
+ static url = "/tickets/:id/costs/:costId/write-off";
13
+ static method = "post";
14
+ constructor(commandConfig, options = {}) {
15
+ const pathParams = WriteOffCostEntryCommand.params;
16
+ let { data, query, headers } = commandConfig ?? {};
17
+ if (typeof data === "undefined") data = null;
18
+ if (typeof query === "undefined") query = null;
19
+ if (typeof headers === "undefined") headers = null;
20
+ let url = WriteOffCostEntryCommand.url;
21
+ if (pathParams && data) for (const param of pathParams) {
22
+ const urlParam = ":" + param;
23
+ url = url.replace(urlParam, data[param]);
24
+ }
25
+ const missingParams = url.match(/:[a-zA-Z0-9]+/g);
26
+ if (missingParams) {
27
+ const missing = missingParams.map((param) => param.replace(":", ""));
28
+ throw new Error("Missing parameters: " + missing.join(", "));
29
+ }
30
+ this.url = url;
31
+ this.data = data;
32
+ this.query = query;
33
+ this.headers = headers;
34
+ this.config = {
35
+ method: WriteOffCostEntryCommand.method,
36
+ url,
37
+ data,
38
+ params: query,
39
+ headers,
40
+ ...options
41
+ };
42
+ }
43
+ };
44
+ //#endregion
45
+ export { WriteOffCostEntryCommand };
46
+
47
+ //# sourceMappingURL=writeOffCostEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writeOffCostEntry.js","names":[],"sources":["../../.generated/useCases/writeOffCostEntry.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface WriteOffCostEntryCommandConfig {\n data?: { id: string; costId: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface WriteOffCostEntryCommandRequestConfig {\n method: \"post\";\n url: string;\n data: { id: string; costId: string; [key: string]: unknown } | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n * \n */\nexport class WriteOffCostEntryCommand {\n url: string;\n data: { id: string; costId: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: WriteOffCostEntryCommandRequestConfig;\n\n static params = [\"id\",\"costId\"] as const;\n static url = \"/tickets/:id/costs/:costId/write-off\";\n static method = \"post\" as const;\n\n constructor(commandConfig: WriteOffCostEntryCommandConfig, options: Record<string, unknown> = {}) {\n const pathParams = WriteOffCostEntryCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = WriteOffCostEntryCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: WriteOffCostEntryCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;AAoBA,IAAa,2BAAb,MAAa,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CAEA,OAAO,SAAS,CAAC,MAAK,QAAQ;CAC9B,OAAO,MAAM;CACb,OAAO,SAAS;CAEhB,YAAY,eAA+C,UAAmC,CAAC,GAAG;EAChG,MAAM,aAAa,yBAAyB;EAE5C,IAAI,EAAE,MAAM,OAAO,YAAY,iBAAiB,CAAC;EAEjD,IAAI,OAAO,SAAS,aAAa,OAAO;EACxC,IAAI,OAAO,UAAU,aAAa,QAAQ;EAC1C,IAAI,OAAO,YAAY,aAAa,UAAU;EAG9C,IAAI,MAAc,yBAAyB;EAE3C,IAAI,cAAc,MAChB,KAAK,MAAM,SAAS,YAAY;GAC9B,MAAM,WAAW,MAAM;GACvB,MAAM,IAAI,QAAQ,UAAW,KAAgC,MAAM;EACrE;EAIF,MAAM,gBAAgB,IAAI,MAAM,gBAAgB;EAChD,IAAI,eAAe;GACjB,MAAM,UAAU,cAAc,KAAK,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;GACnE,MAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;EAC7D;EAEA,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;EAEf,KAAK,SAAS;GACZ,QAAQ,yBAAyB;GAC5B;GACC;GACN,QAAQ;GACC;GACT,GAAG;EACL;CACF;AACF"}
@@ -40,6 +40,31 @@ export declare const validateAutomation: import("ajv").ValidateFunction<{
40
40
  } & {
41
41
  type: any;
42
42
  }>;
43
+ export declare const validateBill: import("ajv").ValidateFunction<{
44
+ currency: any;
45
+ id: any;
46
+ lines: any;
47
+ organizationId: any;
48
+ status: any;
49
+ } & {
50
+ currency: any;
51
+ } & {
52
+ id: any;
53
+ } & {
54
+ lines: any;
55
+ } & {
56
+ organizationId: any;
57
+ } & {
58
+ status: any;
59
+ }>;
60
+ export declare const validateBillingCategory: import("ajv").ValidateFunction<{
61
+ id: any;
62
+ name: any;
63
+ } & {
64
+ id: any;
65
+ } & {
66
+ name: any;
67
+ }>;
43
68
  export declare const validateCamera: import("ajv").ValidateFunction<{
44
69
  driver: any;
45
70
  id: any;
@@ -357,14 +382,6 @@ export declare const validateNotification: import("ajv").ValidateFunction<{
357
382
  } & {
358
383
  type: any;
359
384
  }>;
360
- export declare const validateOrder: import("ajv").ValidateFunction<{
361
- status: any;
362
- type: any;
363
- } & {
364
- status: any;
365
- } & {
366
- type: any;
367
- }>;
368
385
  export declare const validateOrganization: import("ajv").ValidateFunction<{
369
386
  accountNumber: any;
370
387
  id: any;
package/dist/validate.js CHANGED
@@ -1,7 +1,10 @@
1
+ import { addLowerBoundTableKeyword } from "./lib/lowerBoundTable.js";
1
2
  import defs from "./schemas/definitions.js";
2
3
  import { alarmSchema } from "./schemas/alarm.js";
3
4
  import { announcementSchema } from "./schemas/announcement.js";
4
5
  import { automationSchema } from "./schemas/automation.js";
6
+ import { billSchema } from "./schemas/bill.js";
7
+ import { billingCategorySchema } from "./schemas/billingCategory.js";
5
8
  import { cameraSchema } from "./schemas/camera.js";
6
9
  import { categorySchema } from "./schemas/category.js";
7
10
  import { courtesySchema } from "./schemas/courtesy.js";
@@ -23,7 +26,6 @@ import { mediaFileSchema } from "./schemas/mediaFile.js";
23
26
  import { mediaSourceSchema } from "./schemas/mediaSource.js";
24
27
  import { motionSensorSchema } from "./schemas/motionSensor.js";
25
28
  import { notificationSchema } from "./schemas/notification.js";
26
- import { orderSchema } from "./schemas/order.js";
27
29
  import { organizationSchema } from "./schemas/organization.js";
28
30
  import { paymentSchema } from "./schemas/payment.js";
29
31
  import { policySchema } from "./schemas/policy.js";
@@ -61,6 +63,8 @@ const ajv = new Ajv({
61
63
  alarmSchema,
62
64
  announcementSchema,
63
65
  automationSchema,
66
+ billSchema,
67
+ billingCategorySchema,
64
68
  cameraSchema,
65
69
  categorySchema,
66
70
  courtesySchema,
@@ -82,7 +86,6 @@ const ajv = new Ajv({
82
86
  mediaSourceSchema,
83
87
  motionSensorSchema,
84
88
  notificationSchema,
85
- orderSchema,
86
89
  organizationSchema,
87
90
  paymentSchema,
88
91
  policySchema,
@@ -107,9 +110,12 @@ const ajv = new Ajv({
107
110
  ]
108
111
  });
109
112
  addFormats(ajv);
113
+ addLowerBoundTableKeyword(ajv);
110
114
  const validateAlarm = ajv.compile(alarmSchema);
111
115
  const validateAnnouncement = ajv.compile(announcementSchema);
112
116
  const validateAutomation = ajv.compile(automationSchema);
117
+ const validateBill = ajv.compile(billSchema);
118
+ const validateBillingCategory = ajv.compile(billingCategorySchema);
113
119
  const validateCamera = ajv.compile(cameraSchema);
114
120
  const validateCategory = ajv.compile(categorySchema);
115
121
  const validateCourtesy = ajv.compile(courtesySchema);
@@ -131,7 +137,6 @@ const validateMediaFile = ajv.compile(mediaFileSchema);
131
137
  const validateMediaSource = ajv.compile(mediaSourceSchema);
132
138
  const validateMotionSensor = ajv.compile(motionSensorSchema);
133
139
  const validateNotification = ajv.compile(notificationSchema);
134
- const validateOrder = ajv.compile(orderSchema);
135
140
  const validateOrganization = ajv.compile(organizationSchema);
136
141
  const validatePayment = ajv.compile(paymentSchema);
137
142
  const validatePolicy = ajv.compile(policySchema);
@@ -154,6 +159,6 @@ const validateUser = ajv.compile(userSchema);
154
159
  const validateVendor = ajv.compile(vendorSchema);
155
160
  const validateWindowCovering = ajv.compile(windowCoveringSchema);
156
161
  //#endregion
157
- export { validateAlarm, validateAnnouncement, validateAutomation, validateCamera, validateCategory, validateCourtesy, validateCredential, validateDepartment, validateDimmer, validateDiscoveredDevice, validateEmailMessage, validateEnergyReport, validateEnergyReportShard, validateGateway, validateGroup, validateIdentification, validateIntegration, validateIssue, validateLock, validateLog, validateMediaFile, validateMediaSource, validateMotionSensor, validateNotification, validateOrder, validateOrganization, validatePayment, validatePolicy, validateProduct, validateProperty, validateReservation, validateSOSType, validateServer, validateSession, validateShortLink, validateSmsMessage, validateSpace, validateSwitch, validateSystem, validateSystemUser, validateThermostat, validateTicket, validateTimeSheet, validateUser, validateVendor, validateWindowCovering };
162
+ export { validateAlarm, validateAnnouncement, validateAutomation, validateBill, validateBillingCategory, validateCamera, validateCategory, validateCourtesy, validateCredential, validateDepartment, validateDimmer, validateDiscoveredDevice, validateEmailMessage, validateEnergyReport, validateEnergyReportShard, validateGateway, validateGroup, validateIdentification, validateIntegration, validateIssue, validateLock, validateLog, validateMediaFile, validateMediaSource, validateMotionSensor, validateNotification, validateOrganization, validatePayment, validatePolicy, validateProduct, validateProperty, validateReservation, validateSOSType, validateServer, validateSession, validateShortLink, validateSmsMessage, validateSpace, validateSwitch, validateSystem, validateSystemUser, validateThermostat, validateTicket, validateTimeSheet, validateUser, validateVendor, validateWindowCovering };
158
163
 
159
164
  //# sourceMappingURL=validate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","names":[],"sources":["../.generated/validate.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\nimport { Ajv } from \"ajv\";\nimport addFormats from \"ajv-formats\";\n\nimport { definitionsSchema as defs } from \"./schemas/definitions.js\";\nimport { alarmSchema } from \"./schemas/alarm.js\";\nimport { announcementSchema } from \"./schemas/announcement.js\";\nimport { automationSchema } from \"./schemas/automation.js\";\nimport { cameraSchema } from \"./schemas/camera.js\";\nimport { categorySchema } from \"./schemas/category.js\";\nimport { courtesySchema } from \"./schemas/courtesy.js\";\nimport { credentialSchema } from \"./schemas/credential.js\";\nimport { departmentSchema } from \"./schemas/department.js\";\nimport { dimmerSchema } from \"./schemas/dimmer.js\";\nimport { discoveredDeviceSchema } from \"./schemas/discoveredDevice.js\";\nimport { emailMessageSchema } from \"./schemas/emailMessage.js\";\nimport { energyReportSchema } from \"./schemas/energyReport.js\";\nimport { energyReportShardSchema } from \"./schemas/energyReportShard.js\";\nimport { gatewaySchema } from \"./schemas/gateway.js\";\nimport { groupSchema } from \"./schemas/group.js\";\nimport { identificationSchema } from \"./schemas/identification.js\";\nimport { integrationSchema } from \"./schemas/integration.js\";\nimport { issueSchema } from \"./schemas/issue.js\";\nimport { lockSchema } from \"./schemas/lock.js\";\nimport { logSchema } from \"./schemas/log.js\";\nimport { mediaFileSchema } from \"./schemas/mediaFile.js\";\nimport { mediaSourceSchema } from \"./schemas/mediaSource.js\";\nimport { motionSensorSchema } from \"./schemas/motionSensor.js\";\nimport { notificationSchema } from \"./schemas/notification.js\";\nimport { orderSchema } from \"./schemas/order.js\";\nimport { organizationSchema } from \"./schemas/organization.js\";\nimport { paymentSchema } from \"./schemas/payment.js\";\nimport { policySchema } from \"./schemas/policy.js\";\nimport { productSchema } from \"./schemas/product.js\";\nimport { propertySchema } from \"./schemas/property.js\";\nimport { reservationSchema } from \"./schemas/reservation.js\";\nimport { serverSchema } from \"./schemas/server.js\";\nimport { sessionSchema } from \"./schemas/session.js\";\nimport { shortLinkSchema } from \"./schemas/shortLink.js\";\nimport { smsMessageSchema } from \"./schemas/smsMessage.js\";\nimport { sosTypeSchema } from \"./schemas/sosType.js\";\nimport { spaceSchema } from \"./schemas/space.js\";\nimport { switchSchema } from \"./schemas/switch.js\";\nimport { systemSchema } from \"./schemas/system.js\";\nimport { systemUserSchema } from \"./schemas/systemUser.js\";\nimport { thermostatSchema } from \"./schemas/thermostat.js\";\nimport { ticketSchema } from \"./schemas/ticket.js\";\nimport { timeSheetSchema } from \"./schemas/timeSheet.js\";\nimport { userSchema } from \"./schemas/user.js\";\nimport { vendorSchema } from \"./schemas/vendor.js\";\nimport { windowCoveringSchema } from \"./schemas/windowCovering.js\";\n\nconst schemas = [\n defs,\n alarmSchema,\n announcementSchema,\n automationSchema,\n cameraSchema,\n categorySchema,\n courtesySchema,\n credentialSchema,\n departmentSchema,\n dimmerSchema,\n discoveredDeviceSchema,\n emailMessageSchema,\n energyReportSchema,\n energyReportShardSchema,\n gatewaySchema,\n groupSchema,\n identificationSchema,\n integrationSchema,\n issueSchema,\n lockSchema,\n logSchema,\n mediaFileSchema,\n mediaSourceSchema,\n motionSensorSchema,\n notificationSchema,\n orderSchema,\n organizationSchema,\n paymentSchema,\n policySchema,\n productSchema,\n propertySchema,\n reservationSchema,\n serverSchema,\n sessionSchema,\n shortLinkSchema,\n smsMessageSchema,\n sosTypeSchema,\n spaceSchema,\n switchSchema,\n systemSchema,\n systemUserSchema,\n thermostatSchema,\n ticketSchema,\n timeSheetSchema,\n userSchema,\n vendorSchema,\n windowCoveringSchema\n];\n\nconst ajv = new Ajv({\n allErrors: true,\n useDefaults: true,\n strict: false,\n allowMatchingProperties: true,\n allowUnionTypes: true,\n strictRequired: false,\n discriminator: true,\n schemas: schemas,\n});\n\naddFormats(ajv);\n\nexport const validateAlarm = ajv.compile(alarmSchema);\nexport const validateAnnouncement = ajv.compile(announcementSchema);\nexport const validateAutomation = ajv.compile(automationSchema);\nexport const validateCamera = ajv.compile(cameraSchema);\nexport const validateCategory = ajv.compile(categorySchema);\nexport const validateCourtesy = ajv.compile(courtesySchema);\nexport const validateCredential = ajv.compile(credentialSchema);\nexport const validateDepartment = ajv.compile(departmentSchema);\nexport const validateDimmer = ajv.compile(dimmerSchema);\nexport const validateDiscoveredDevice = ajv.compile(discoveredDeviceSchema);\nexport const validateEmailMessage = ajv.compile(emailMessageSchema);\nexport const validateEnergyReport = ajv.compile(energyReportSchema);\nexport const validateEnergyReportShard = ajv.compile(energyReportShardSchema);\nexport const validateGateway = ajv.compile(gatewaySchema);\nexport const validateGroup = ajv.compile(groupSchema);\nexport const validateIdentification = ajv.compile(identificationSchema);\nexport const validateIntegration = ajv.compile(integrationSchema);\nexport const validateIssue = ajv.compile(issueSchema);\nexport const validateLock = ajv.compile(lockSchema);\nexport const validateLog = ajv.compile(logSchema);\nexport const validateMediaFile = ajv.compile(mediaFileSchema);\nexport const validateMediaSource = ajv.compile(mediaSourceSchema);\nexport const validateMotionSensor = ajv.compile(motionSensorSchema);\nexport const validateNotification = ajv.compile(notificationSchema);\nexport const validateOrder = ajv.compile(orderSchema);\nexport const validateOrganization = ajv.compile(organizationSchema);\nexport const validatePayment = ajv.compile(paymentSchema);\nexport const validatePolicy = ajv.compile(policySchema);\nexport const validateProduct = ajv.compile(productSchema);\nexport const validateProperty = ajv.compile(propertySchema);\nexport const validateReservation = ajv.compile(reservationSchema);\nexport const validateServer = ajv.compile(serverSchema);\nexport const validateSession = ajv.compile(sessionSchema);\nexport const validateShortLink = ajv.compile(shortLinkSchema);\nexport const validateSmsMessage = ajv.compile(smsMessageSchema);\nexport const validateSOSType = ajv.compile(sosTypeSchema);\nexport const validateSpace = ajv.compile(spaceSchema);\nexport const validateSwitch = ajv.compile(switchSchema);\nexport const validateSystem = ajv.compile(systemSchema);\nexport const validateSystemUser = ajv.compile(systemUserSchema);\nexport const validateThermostat = ajv.compile(thermostatSchema);\nexport const validateTicket = ajv.compile(ticketSchema);\nexport const validateTimeSheet = ajv.compile(timeSheetSchema);\nexport const validateUser = ajv.compile(userSchema);\nexport const validateVendor = ajv.compile(vendorSchema);\nexport const validateWindowCovering = ajv.compile(windowCoveringSchema);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGA,MAAM,MAAM,IAAI,IAAI;CAClB,WAAW;CACX,aAAa;CACb,QAAQ;CACR,yBAAyB;CACzB,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CACf,SAAS;EAzDT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAWe;AACjB,CAAC;AAED,WAAW,GAAG;AAEd,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,mBAAmB,IAAI,QAAQ,cAAc;AAC1D,MAAa,mBAAmB,IAAI,QAAQ,cAAc;AAC1D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,2BAA2B,IAAI,QAAQ,sBAAsB;AAC1E,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,4BAA4B,IAAI,QAAQ,uBAAuB;AAC5E,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,yBAAyB,IAAI,QAAQ,oBAAoB;AACtE,MAAa,sBAAsB,IAAI,QAAQ,iBAAiB;AAChE,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,eAAe,IAAI,QAAQ,UAAU;AAClD,MAAa,cAAc,IAAI,QAAQ,SAAS;AAChD,MAAa,oBAAoB,IAAI,QAAQ,eAAe;AAC5D,MAAa,sBAAsB,IAAI,QAAQ,iBAAiB;AAChE,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,mBAAmB,IAAI,QAAQ,cAAc;AAC1D,MAAa,sBAAsB,IAAI,QAAQ,iBAAiB;AAChE,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,oBAAoB,IAAI,QAAQ,eAAe;AAC5D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,oBAAoB,IAAI,QAAQ,eAAe;AAC5D,MAAa,eAAe,IAAI,QAAQ,UAAU;AAClD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,yBAAyB,IAAI,QAAQ,oBAAoB"}
1
+ {"version":3,"file":"validate.js","names":[],"sources":["../.generated/validate.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\nimport { Ajv } from \"ajv\";\nimport addFormats from \"ajv-formats\";\nimport { addLowerBoundTableKeyword } from \"./lib/lowerBoundTable.js\";\n\nimport { definitionsSchema as defs } from \"./schemas/definitions.js\";\nimport { alarmSchema } from \"./schemas/alarm.js\";\nimport { announcementSchema } from \"./schemas/announcement.js\";\nimport { automationSchema } from \"./schemas/automation.js\";\nimport { billSchema } from \"./schemas/bill.js\";\nimport { billingCategorySchema } from \"./schemas/billingCategory.js\";\nimport { cameraSchema } from \"./schemas/camera.js\";\nimport { categorySchema } from \"./schemas/category.js\";\nimport { courtesySchema } from \"./schemas/courtesy.js\";\nimport { credentialSchema } from \"./schemas/credential.js\";\nimport { departmentSchema } from \"./schemas/department.js\";\nimport { dimmerSchema } from \"./schemas/dimmer.js\";\nimport { discoveredDeviceSchema } from \"./schemas/discoveredDevice.js\";\nimport { emailMessageSchema } from \"./schemas/emailMessage.js\";\nimport { energyReportSchema } from \"./schemas/energyReport.js\";\nimport { energyReportShardSchema } from \"./schemas/energyReportShard.js\";\nimport { gatewaySchema } from \"./schemas/gateway.js\";\nimport { groupSchema } from \"./schemas/group.js\";\nimport { identificationSchema } from \"./schemas/identification.js\";\nimport { integrationSchema } from \"./schemas/integration.js\";\nimport { issueSchema } from \"./schemas/issue.js\";\nimport { lockSchema } from \"./schemas/lock.js\";\nimport { logSchema } from \"./schemas/log.js\";\nimport { mediaFileSchema } from \"./schemas/mediaFile.js\";\nimport { mediaSourceSchema } from \"./schemas/mediaSource.js\";\nimport { motionSensorSchema } from \"./schemas/motionSensor.js\";\nimport { notificationSchema } from \"./schemas/notification.js\";\nimport { organizationSchema } from \"./schemas/organization.js\";\nimport { paymentSchema } from \"./schemas/payment.js\";\nimport { policySchema } from \"./schemas/policy.js\";\nimport { productSchema } from \"./schemas/product.js\";\nimport { propertySchema } from \"./schemas/property.js\";\nimport { reservationSchema } from \"./schemas/reservation.js\";\nimport { serverSchema } from \"./schemas/server.js\";\nimport { sessionSchema } from \"./schemas/session.js\";\nimport { shortLinkSchema } from \"./schemas/shortLink.js\";\nimport { smsMessageSchema } from \"./schemas/smsMessage.js\";\nimport { sosTypeSchema } from \"./schemas/sosType.js\";\nimport { spaceSchema } from \"./schemas/space.js\";\nimport { switchSchema } from \"./schemas/switch.js\";\nimport { systemSchema } from \"./schemas/system.js\";\nimport { systemUserSchema } from \"./schemas/systemUser.js\";\nimport { thermostatSchema } from \"./schemas/thermostat.js\";\nimport { ticketSchema } from \"./schemas/ticket.js\";\nimport { timeSheetSchema } from \"./schemas/timeSheet.js\";\nimport { userSchema } from \"./schemas/user.js\";\nimport { vendorSchema } from \"./schemas/vendor.js\";\nimport { windowCoveringSchema } from \"./schemas/windowCovering.js\";\n\nconst schemas = [\n defs,\n alarmSchema,\n announcementSchema,\n automationSchema,\n billSchema,\n billingCategorySchema,\n cameraSchema,\n categorySchema,\n courtesySchema,\n credentialSchema,\n departmentSchema,\n dimmerSchema,\n discoveredDeviceSchema,\n emailMessageSchema,\n energyReportSchema,\n energyReportShardSchema,\n gatewaySchema,\n groupSchema,\n identificationSchema,\n integrationSchema,\n issueSchema,\n lockSchema,\n logSchema,\n mediaFileSchema,\n mediaSourceSchema,\n motionSensorSchema,\n notificationSchema,\n organizationSchema,\n paymentSchema,\n policySchema,\n productSchema,\n propertySchema,\n reservationSchema,\n serverSchema,\n sessionSchema,\n shortLinkSchema,\n smsMessageSchema,\n sosTypeSchema,\n spaceSchema,\n switchSchema,\n systemSchema,\n systemUserSchema,\n thermostatSchema,\n ticketSchema,\n timeSheetSchema,\n userSchema,\n vendorSchema,\n windowCoveringSchema\n];\n\nconst ajv = new Ajv({\n allErrors: true,\n useDefaults: true,\n strict: false,\n allowMatchingProperties: true,\n allowUnionTypes: true,\n strictRequired: false,\n discriminator: true,\n schemas: schemas,\n});\n\naddFormats(ajv);\naddLowerBoundTableKeyword(ajv);\n\nexport const validateAlarm = ajv.compile(alarmSchema);\nexport const validateAnnouncement = ajv.compile(announcementSchema);\nexport const validateAutomation = ajv.compile(automationSchema);\nexport const validateBill = ajv.compile(billSchema);\nexport const validateBillingCategory = ajv.compile(billingCategorySchema);\nexport const validateCamera = ajv.compile(cameraSchema);\nexport const validateCategory = ajv.compile(categorySchema);\nexport const validateCourtesy = ajv.compile(courtesySchema);\nexport const validateCredential = ajv.compile(credentialSchema);\nexport const validateDepartment = ajv.compile(departmentSchema);\nexport const validateDimmer = ajv.compile(dimmerSchema);\nexport const validateDiscoveredDevice = ajv.compile(discoveredDeviceSchema);\nexport const validateEmailMessage = ajv.compile(emailMessageSchema);\nexport const validateEnergyReport = ajv.compile(energyReportSchema);\nexport const validateEnergyReportShard = ajv.compile(energyReportShardSchema);\nexport const validateGateway = ajv.compile(gatewaySchema);\nexport const validateGroup = ajv.compile(groupSchema);\nexport const validateIdentification = ajv.compile(identificationSchema);\nexport const validateIntegration = ajv.compile(integrationSchema);\nexport const validateIssue = ajv.compile(issueSchema);\nexport const validateLock = ajv.compile(lockSchema);\nexport const validateLog = ajv.compile(logSchema);\nexport const validateMediaFile = ajv.compile(mediaFileSchema);\nexport const validateMediaSource = ajv.compile(mediaSourceSchema);\nexport const validateMotionSensor = ajv.compile(motionSensorSchema);\nexport const validateNotification = ajv.compile(notificationSchema);\nexport const validateOrganization = ajv.compile(organizationSchema);\nexport const validatePayment = ajv.compile(paymentSchema);\nexport const validatePolicy = ajv.compile(policySchema);\nexport const validateProduct = ajv.compile(productSchema);\nexport const validateProperty = ajv.compile(propertySchema);\nexport const validateReservation = ajv.compile(reservationSchema);\nexport const validateServer = ajv.compile(serverSchema);\nexport const validateSession = ajv.compile(sessionSchema);\nexport const validateShortLink = ajv.compile(shortLinkSchema);\nexport const validateSmsMessage = ajv.compile(smsMessageSchema);\nexport const validateSOSType = ajv.compile(sosTypeSchema);\nexport const validateSpace = ajv.compile(spaceSchema);\nexport const validateSwitch = ajv.compile(switchSchema);\nexport const validateSystem = ajv.compile(systemSchema);\nexport const validateSystemUser = ajv.compile(systemUserSchema);\nexport const validateThermostat = ajv.compile(thermostatSchema);\nexport const validateTicket = ajv.compile(ticketSchema);\nexport const validateTimeSheet = ajv.compile(timeSheetSchema);\nexport const validateUser = ajv.compile(userSchema);\nexport const validateVendor = ajv.compile(vendorSchema);\nexport const validateWindowCovering = ajv.compile(windowCoveringSchema);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,MAAM,MAAM,IAAI,IAAI;CAClB,WAAW;CACX,aAAa;CACb,QAAQ;CACR,yBAAyB;CACzB,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CACf,SAAS;EA1DT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAWe;AACjB,CAAC;AAED,WAAW,GAAG;AACd,0BAA0B,GAAG;AAE7B,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,eAAe,IAAI,QAAQ,UAAU;AAClD,MAAa,0BAA0B,IAAI,QAAQ,qBAAqB;AACxE,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,mBAAmB,IAAI,QAAQ,cAAc;AAC1D,MAAa,mBAAmB,IAAI,QAAQ,cAAc;AAC1D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,2BAA2B,IAAI,QAAQ,sBAAsB;AAC1E,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,4BAA4B,IAAI,QAAQ,uBAAuB;AAC5E,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,yBAAyB,IAAI,QAAQ,oBAAoB;AACtE,MAAa,sBAAsB,IAAI,QAAQ,iBAAiB;AAChE,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,eAAe,IAAI,QAAQ,UAAU;AAClD,MAAa,cAAc,IAAI,QAAQ,SAAS;AAChD,MAAa,oBAAoB,IAAI,QAAQ,eAAe;AAC5D,MAAa,sBAAsB,IAAI,QAAQ,iBAAiB;AAChE,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,mBAAmB,IAAI,QAAQ,cAAc;AAC1D,MAAa,sBAAsB,IAAI,QAAQ,iBAAiB;AAChE,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,oBAAoB,IAAI,QAAQ,eAAe;AAC5D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,oBAAoB,IAAI,QAAQ,eAAe;AAC5D,MAAa,eAAe,IAAI,QAAQ,UAAU;AAClD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,yBAAyB,IAAI,QAAQ,oBAAoB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kohost/api-client",
3
- "version": "7.7.0",
3
+ "version": "7.8.0",
4
4
  "description": "API client, models, schemas, commands, and events for Kohost applications",
5
5
  "author": "Ian Rogers",
6
6
  "readme": "README.md",
@@ -89,7 +89,8 @@
89
89
  "build": "npm run build:js -- --silent && npm run build:types",
90
90
  "build:js": "tsdown",
91
91
  "build:types": "tsc -b tsconfig.build.json && node scripts/add-js-extensions.js dist",
92
- "check-types": "npm run generate-models && tsc -p tsconfig.check.json",
92
+ "build:check-types": "tsx scripts/generate-source-models.js && tsc -b tsconfig.build.json && node scripts/add-js-extensions.js dist",
93
+ "check-types": "npm run generate-models && tsc -p tsconfig.check.json --checkers 1",
93
94
  "prepublishOnly": "npm run build",
94
95
  "generate-models": "tsx scripts/generate-source-models.js",
95
96
  "clean:generated": "rm -rf .generated",
@@ -111,14 +112,14 @@
111
112
  "@types/debug": "^4.1.13",
112
113
  "@types/events": "^3.0.3",
113
114
  "@types/node": "^22.20.1",
114
- "eslint": "^10.5.0",
115
+ "eslint": "^10.8.1",
115
116
  "eslint-config-prettier": "^10.1.8",
116
- "globals": "^17.7.0",
117
+ "globals": "^17.9.0",
117
118
  "husky": "^9.1.7",
118
- "lint-staged": "^17.0.8",
119
- "prettier": "^3.9.5",
120
- "tsdown": "^0.22.9",
121
- "tsx": "^4.23.1",
119
+ "lint-staged": "^17.3.0",
120
+ "prettier": "^3.9.6",
121
+ "tsdown": "^0.22.14",
122
+ "tsx": "^4.23.11",
122
123
  "typescript": "^7.0.2",
123
124
  "vitest": "^4.1.10"
124
125
  },
@@ -1,17 +0,0 @@
1
- import { Entity } from "./entity.js";
2
- import { validateOrder as validate } from "../validate.js";
3
- import { orderSchema, type OrderSchema } from "../schemas/order.js";
4
- /**
5
- * Data type for Order constructor - exported for backwards compatibility
6
- */
7
- export type OrderData = OrderSchema;
8
- /**
9
- * A purchase order for products or services.
10
- */
11
- export interface Order extends OrderSchema {
12
- }
13
- export declare class Order extends Entity {
14
- schema: typeof orderSchema;
15
- validator: typeof validate;
16
- constructor(data: OrderSchema);
17
- }
@@ -1,33 +0,0 @@
1
- import { Entity } from "./entity.js";
2
- import { orderSchema } from "../schemas/order.js";
3
- import { validateOrder } from "../validate.js";
4
- //#region .generated/models/order.ts
5
- var Order = class extends Entity {
6
- constructor(data) {
7
- super(data);
8
- if (data.id !== void 0) this.id = data.id;
9
- if (data.propertyId !== void 0) this.propertyId = data.propertyId;
10
- this.type = data.type;
11
- if (data.orderNumber !== void 0) this.orderNumber = data.orderNumber;
12
- this.status = data.status;
13
- if (data.userId !== void 0) this.userId = data.userId;
14
- if (data.reservationId !== void 0) this.reservationId = data.reservationId;
15
- if (data.date !== void 0) this.date = data.date;
16
- if (data.items !== void 0) this.items = data.items;
17
- if (data.taxes !== void 0) this.taxes = data.taxes;
18
- if (data.fees !== void 0) this.fees = data.fees;
19
- if (data.delivery !== void 0) this.delivery = data.delivery;
20
- if (data.payments !== void 0) this.payments = data.payments;
21
- if (data.createdAt !== void 0) this.createdAt = data.createdAt;
22
- if (data.updatedAt !== void 0) this.updatedAt = data.updatedAt;
23
- if (data.deletedAt !== void 0) this.deletedAt = data.deletedAt;
24
- }
25
- };
26
- Object.defineProperty(Order.prototype, "schema", { value: orderSchema });
27
- Object.defineProperty(Order.prototype, "validator", { get: function() {
28
- return validateOrder;
29
- } });
30
- //#endregion
31
- export { Order };
32
-
33
- //# sourceMappingURL=order.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"order.js","names":["validate"],"sources":["../../.generated/models/order.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateOrder as validate } from \"../validate.js\";\nimport { orderSchema, type OrderSchema } from \"../schemas/order.js\";\n\n/**\n * Data type for Order constructor - exported for backwards compatibility\n */\nexport type OrderData = OrderSchema;\n\n/**\n * A purchase order for products or services.\n */\nexport interface Order extends OrderSchema {}\nexport class Order extends Entity {\n declare schema: typeof orderSchema;\n declare validator: typeof validate;\n\n constructor(data: OrderSchema) {\n super(data);\n if (data.id !== undefined) this.id = data.id;\n if (data.propertyId !== undefined) this.propertyId = data.propertyId;\n this.type = data.type;\n if (data.orderNumber !== undefined) this.orderNumber = data.orderNumber;\n this.status = data.status;\n if (data.userId !== undefined) this.userId = data.userId;\n if (data.reservationId !== undefined) this.reservationId = data.reservationId;\n if (data.date !== undefined) this.date = data.date;\n if (data.items !== undefined) this.items = data.items;\n if (data.taxes !== undefined) this.taxes = data.taxes;\n if (data.fees !== undefined) this.fees = data.fees;\n if (data.delivery !== undefined) this.delivery = data.delivery;\n if (data.payments !== undefined) this.payments = data.payments;\n if (data.createdAt !== undefined) this.createdAt = data.createdAt;\n if (data.updatedAt !== undefined) this.updatedAt = data.updatedAt;\n if (data.deletedAt !== undefined) this.deletedAt = data.deletedAt;\n }\n\n\n\n\n\n\n\n\n}\n\nObject.defineProperty(Order.prototype, \"schema\", {\n value: orderSchema\n});\n\nObject.defineProperty(Order.prototype, \"validator\", {\n get: function() { return validate; }\n});\n"],"mappings":";;;;AAeA,IAAa,QAAb,cAA2B,OAAO;CAIhC,YAAY,MAAmB;EAC7B,MAAM,IAAI;EACV,IAAI,KAAK,OAAO,KAAA,GAAW,KAAK,KAAK,KAAK;EAC1C,IAAI,KAAK,eAAe,KAAA,GAAW,KAAK,aAAa,KAAK;EAC1D,KAAK,OAAO,KAAK;EACjB,IAAI,KAAK,gBAAgB,KAAA,GAAW,KAAK,cAAc,KAAK;EAC5D,KAAK,SAAS,KAAK;EACnB,IAAI,KAAK,WAAW,KAAA,GAAW,KAAK,SAAS,KAAK;EAClD,IAAI,KAAK,kBAAkB,KAAA,GAAW,KAAK,gBAAgB,KAAK;EAChE,IAAI,KAAK,SAAS,KAAA,GAAW,KAAK,OAAO,KAAK;EAC9C,IAAI,KAAK,UAAU,KAAA,GAAW,KAAK,QAAQ,KAAK;EAChD,IAAI,KAAK,UAAU,KAAA,GAAW,KAAK,QAAQ,KAAK;EAChD,IAAI,KAAK,SAAS,KAAA,GAAW,KAAK,OAAO,KAAK;EAC9C,IAAI,KAAK,aAAa,KAAA,GAAW,KAAK,WAAW,KAAK;EACtD,IAAI,KAAK,aAAa,KAAA,GAAW,KAAK,WAAW,KAAK;EACtD,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;EACxD,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;EACxD,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;CAC1D;AASF;AAEA,OAAO,eAAe,MAAM,WAAW,UAAU,EAC/C,OAAO,YACT,CAAC;AAED,OAAO,eAAe,MAAM,WAAW,aAAa,EAClD,KAAK,WAAW;CAAE,OAAOA;AAAU,EACrC,CAAC"}
@@ -1,186 +0,0 @@
1
- import defs from "./definitions.js";
2
- import type { FromSchema } from "json-schema-to-ts";
3
- export declare const orderSchema: {
4
- readonly $schema: "http://json-schema.org/draft-07/schema";
5
- readonly $id: "order.json";
6
- readonly title: "Order";
7
- readonly description: "A purchase order for products or services.";
8
- readonly type: "object";
9
- readonly required: readonly ["type", "status"];
10
- readonly additionalProperties: false;
11
- readonly properties: {
12
- readonly id: {
13
- readonly $ref: "definitions.json#/definitions/id";
14
- };
15
- readonly propertyId: {
16
- readonly type: "string";
17
- readonly description: "ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.";
18
- };
19
- readonly type: {
20
- readonly type: "string";
21
- readonly default: "order";
22
- readonly enum: readonly ["order"];
23
- };
24
- readonly orderNumber: {
25
- readonly type: "string";
26
- };
27
- readonly status: {
28
- readonly type: "string";
29
- readonly enum: readonly ["draft", "pendingPayment", "processing", "outForDelivery", "completed", "paymentFailed", "cancelled", "refunded"];
30
- };
31
- readonly userId: {
32
- readonly $ref: "definitions.json#/definitions/id";
33
- readonly description: "User id of purchaser";
34
- };
35
- readonly reservationId: {
36
- readonly $ref: "definitions.json#/definitions/id";
37
- readonly description: "Reservation id if the order is for a reservation";
38
- };
39
- readonly date: {
40
- readonly $ref: "definitions.json#/definitions/date";
41
- };
42
- readonly items: {
43
- readonly type: "array";
44
- readonly default: readonly [];
45
- readonly items: {
46
- readonly type: "object";
47
- readonly required: readonly ["name", "price"];
48
- readonly properties: {
49
- readonly additionalProperties: false;
50
- readonly name: {
51
- readonly type: "string";
52
- };
53
- readonly sku: {
54
- readonly type: "string";
55
- };
56
- readonly quantity: {
57
- readonly type: "number";
58
- readonly default: 1;
59
- };
60
- readonly price: {
61
- readonly type: "number";
62
- };
63
- readonly taxClass: {
64
- readonly type: "string";
65
- };
66
- readonly deliveryClass: {
67
- readonly type: "string";
68
- };
69
- readonly productId: {
70
- readonly type: "string";
71
- };
72
- };
73
- };
74
- };
75
- readonly taxes: {
76
- readonly type: "array";
77
- readonly default: readonly [];
78
- readonly items: {
79
- readonly type: "object";
80
- readonly required: readonly ["name", "rate"];
81
- readonly properties: {
82
- readonly additionalProperties: false;
83
- readonly name: {
84
- readonly type: "string";
85
- };
86
- readonly class: {
87
- readonly type: "string";
88
- };
89
- readonly rateType: {
90
- readonly type: "string";
91
- readonly enum: readonly ["percentage", "flat"];
92
- readonly default: "percentage";
93
- };
94
- readonly rate: {
95
- readonly type: "number";
96
- };
97
- readonly total: {
98
- readonly type: "number";
99
- };
100
- };
101
- };
102
- };
103
- readonly fees: {
104
- readonly type: "array";
105
- readonly default: readonly [];
106
- readonly items: {
107
- readonly type: "object";
108
- readonly required: readonly ["name", "price"];
109
- readonly properties: {
110
- readonly additionalProperties: false;
111
- readonly name: {
112
- readonly type: "string";
113
- };
114
- readonly price: {
115
- readonly type: "number";
116
- };
117
- };
118
- };
119
- };
120
- readonly delivery: {
121
- readonly type: "array";
122
- readonly default: readonly [];
123
- readonly items: {
124
- readonly type: "object";
125
- readonly required: readonly ["name", "rate"];
126
- readonly properties: {
127
- readonly additionalProperties: false;
128
- readonly name: {
129
- readonly type: "string";
130
- };
131
- readonly class: {
132
- readonly type: "string";
133
- };
134
- readonly rateType: {
135
- readonly type: "string";
136
- readonly enum: readonly ["percentage", "flat"];
137
- readonly default: "percentage";
138
- };
139
- readonly rate: {
140
- readonly type: "number";
141
- };
142
- readonly total: {
143
- readonly type: "number";
144
- };
145
- };
146
- };
147
- };
148
- readonly payments: {
149
- readonly type: "array";
150
- readonly default: readonly [];
151
- readonly items: {
152
- readonly type: "object";
153
- readonly properties: {
154
- readonly method: {
155
- readonly type: "string";
156
- readonly enum: readonly ["folio", "invoice", "amex", "visa", "masterCard", "maestro", "discover", "diners", "jcb", "applePay", "alipay", "chinaUnionPay", "vpay"];
157
- };
158
- readonly name: {
159
- readonly type: "string";
160
- };
161
- readonly date: {
162
- readonly $ref: "definitions.json#/definitions/date";
163
- };
164
- readonly amount: {
165
- readonly type: "number";
166
- };
167
- readonly transactionReference: {
168
- readonly type: "string";
169
- };
170
- };
171
- };
172
- };
173
- readonly createdAt: {
174
- readonly $ref: "definitions.json#/definitions/date";
175
- };
176
- readonly updatedAt: {
177
- readonly $ref: "definitions.json#/definitions/date";
178
- };
179
- readonly deletedAt: {
180
- readonly $ref: "definitions.json#/definitions/date";
181
- };
182
- };
183
- };
184
- export type OrderSchema = FromSchema<typeof orderSchema, {
185
- references: [typeof defs];
186
- }>;