@greensecurity/javascript-sdk 0.48.0-beta.1 → 0.48.0-beta.11

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 (349) hide show
  1. package/README.md +1 -1
  2. package/dist/commonjs/__tests__/subscriptionPlanSelection.test.d.ts +2 -0
  3. package/dist/commonjs/__tests__/subscriptionPlanSelection.test.d.ts.map +1 -0
  4. package/dist/commonjs/__tests__/subscriptionPlanSelection.test.js +36 -0
  5. package/dist/commonjs/__tests__/subscriptionPlanSelection.test.js.map +1 -0
  6. package/dist/commonjs/__tests__/users.test.js +0 -3
  7. package/dist/commonjs/__tests__/users.test.js.map +1 -1
  8. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  9. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  10. package/dist/commonjs/__tests__/webhooks.test.js +5 -4
  11. package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
  12. package/dist/commonjs/__tests__/zoneDevicesCreate.test.js +6 -0
  13. package/dist/commonjs/__tests__/zoneDevicesCreate.test.js.map +1 -1
  14. package/dist/commonjs/__tests__/zoneDevicesList.test.js +9 -1
  15. package/dist/commonjs/__tests__/zoneDevicesList.test.js.map +1 -1
  16. package/dist/commonjs/__tests__/zones.test.js +31 -4
  17. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  18. package/dist/commonjs/admin-funcs/doAdmin.d.ts +7 -5
  19. package/dist/commonjs/admin-funcs/doAdmin.d.ts.map +1 -1
  20. package/dist/commonjs/admin-funcs/doAdmin.js +20 -11
  21. package/dist/commonjs/admin-funcs/doAdmin.js.map +1 -1
  22. package/dist/commonjs/admin-funcs/networksCreate.d.ts +3 -0
  23. package/dist/commonjs/admin-funcs/networksCreate.d.ts.map +1 -1
  24. package/dist/commonjs/admin-funcs/networksCreate.js +10 -3
  25. package/dist/commonjs/admin-funcs/networksCreate.js.map +1 -1
  26. package/dist/commonjs/admin-funcs/networksEmailGatewayUpdates.d.ts +3 -0
  27. package/dist/commonjs/admin-funcs/networksEmailGatewayUpdates.d.ts.map +1 -0
  28. package/dist/commonjs/admin-funcs/networksEmailGatewayUpdates.js +9 -0
  29. package/dist/commonjs/admin-funcs/networksEmailGatewayUpdates.js.map +1 -0
  30. package/dist/commonjs/admin-funcs/networksUpdate.d.ts +10 -0
  31. package/dist/commonjs/admin-funcs/networksUpdate.d.ts.map +1 -0
  32. package/dist/commonjs/admin-funcs/networksUpdate.js +14 -0
  33. package/dist/commonjs/admin-funcs/networksUpdate.js.map +1 -0
  34. package/dist/commonjs/admin-funcs/subscriptionFinishScreeningQuestions.d.ts +3 -2
  35. package/dist/commonjs/admin-funcs/subscriptionFinishScreeningQuestions.d.ts.map +1 -1
  36. package/dist/commonjs/admin-funcs/subscriptionFinishScreeningQuestions.js +2 -1
  37. package/dist/commonjs/admin-funcs/subscriptionFinishScreeningQuestions.js.map +1 -1
  38. package/dist/commonjs/admin-funcs/subscriptionPlanSelection.d.ts +7 -0
  39. package/dist/commonjs/admin-funcs/subscriptionPlanSelection.d.ts.map +1 -0
  40. package/dist/commonjs/admin-funcs/subscriptionPlanSelection.js +45 -0
  41. package/dist/commonjs/admin-funcs/subscriptionPlanSelection.js.map +1 -0
  42. package/dist/commonjs/admin-funcs/subscriptionUpdateVendorType.d.ts +3 -2
  43. package/dist/commonjs/admin-funcs/subscriptionUpdateVendorType.d.ts.map +1 -1
  44. package/dist/commonjs/admin-funcs/subscriptionUpdateVendorType.js +2 -1
  45. package/dist/commonjs/admin-funcs/subscriptionUpdateVendorType.js.map +1 -1
  46. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.d.ts +4 -1
  47. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.d.ts.map +1 -1
  48. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.js +3 -8
  49. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.js.map +1 -1
  50. package/dist/commonjs/funcs/alertsListAlerts.js +1 -0
  51. package/dist/commonjs/funcs/alertsListAlerts.js.map +1 -1
  52. package/dist/commonjs/funcs/invoicesConvertQuote.d.ts +4 -1
  53. package/dist/commonjs/funcs/invoicesConvertQuote.d.ts.map +1 -1
  54. package/dist/commonjs/funcs/invoicesConvertQuote.js +6 -2
  55. package/dist/commonjs/funcs/invoicesConvertQuote.js.map +1 -1
  56. package/dist/commonjs/funcs/invoicesListInvoices.d.ts +1 -0
  57. package/dist/commonjs/funcs/invoicesListInvoices.d.ts.map +1 -1
  58. package/dist/commonjs/funcs/invoicesListInvoices.js +1 -0
  59. package/dist/commonjs/funcs/invoicesListInvoices.js.map +1 -1
  60. package/dist/commonjs/funcs/vendorsGetVendorInvoiceReceipt.js +4 -0
  61. package/dist/commonjs/funcs/vendorsGetVendorInvoiceReceipt.js.map +1 -1
  62. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts +1 -7
  63. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
  64. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js +1 -7
  65. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js.map +1 -1
  66. package/dist/commonjs/index.extras.d.ts +4 -0
  67. package/dist/commonjs/index.extras.d.ts.map +1 -1
  68. package/dist/commonjs/index.extras.js +5 -1
  69. package/dist/commonjs/index.extras.js.map +1 -1
  70. package/dist/commonjs/lib/config.d.ts +3 -3
  71. package/dist/commonjs/lib/config.js +3 -3
  72. package/dist/commonjs/lib/config.js.map +1 -1
  73. package/dist/commonjs/models/components/alert.d.ts +36 -2
  74. package/dist/commonjs/models/components/alert.d.ts.map +1 -1
  75. package/dist/commonjs/models/components/alert.js +20 -1
  76. package/dist/commonjs/models/components/alert.js.map +1 -1
  77. package/dist/commonjs/models/components/invoice.d.ts +10 -0
  78. package/dist/commonjs/models/components/invoice.d.ts.map +1 -1
  79. package/dist/commonjs/models/components/invoice.js +8 -0
  80. package/dist/commonjs/models/components/invoice.js.map +1 -1
  81. package/dist/commonjs/models/components/invoicefinancialstatus.d.ts +1 -0
  82. package/dist/commonjs/models/components/invoicefinancialstatus.d.ts.map +1 -1
  83. package/dist/commonjs/models/components/invoicefinancialstatus.js +1 -0
  84. package/dist/commonjs/models/components/invoicefinancialstatus.js.map +1 -1
  85. package/dist/commonjs/models/components/userdetails.d.ts +0 -22
  86. package/dist/commonjs/models/components/userdetails.d.ts.map +1 -1
  87. package/dist/commonjs/models/components/userdetails.js +0 -6
  88. package/dist/commonjs/models/components/userdetails.js.map +1 -1
  89. package/dist/commonjs/models/components/userlocation.d.ts +0 -10
  90. package/dist/commonjs/models/components/userlocation.d.ts.map +1 -1
  91. package/dist/commonjs/models/components/userlocation.js +0 -8
  92. package/dist/commonjs/models/components/userlocation.js.map +1 -1
  93. package/dist/commonjs/models/operations/convertquote.d.ts +21 -0
  94. package/dist/commonjs/models/operations/convertquote.d.ts.map +1 -1
  95. package/dist/commonjs/models/operations/convertquote.js +18 -1
  96. package/dist/commonjs/models/operations/convertquote.js.map +1 -1
  97. package/dist/commonjs/models/operations/createinvoice.d.ts +25 -0
  98. package/dist/commonjs/models/operations/createinvoice.d.ts.map +1 -1
  99. package/dist/commonjs/models/operations/createinvoice.js +10 -0
  100. package/dist/commonjs/models/operations/createinvoice.js.map +1 -1
  101. package/dist/commonjs/models/operations/getvendorinvoicereceipt.d.ts +19 -0
  102. package/dist/commonjs/models/operations/getvendorinvoicereceipt.d.ts.map +1 -1
  103. package/dist/commonjs/models/operations/getvendorinvoicereceipt.js +16 -1
  104. package/dist/commonjs/models/operations/getvendorinvoicereceipt.js.map +1 -1
  105. package/dist/commonjs/models/operations/invoicesexport.d.ts +4 -3
  106. package/dist/commonjs/models/operations/invoicesexport.d.ts.map +1 -1
  107. package/dist/commonjs/models/operations/invoicesexport.js +2 -1
  108. package/dist/commonjs/models/operations/invoicesexport.js.map +1 -1
  109. package/dist/commonjs/models/operations/listalerts.d.ts +5 -0
  110. package/dist/commonjs/models/operations/listalerts.d.ts.map +1 -1
  111. package/dist/commonjs/models/operations/listalerts.js +2 -0
  112. package/dist/commonjs/models/operations/listalerts.js.map +1 -1
  113. package/dist/commonjs/models/operations/listinvoices.d.ts +1 -1
  114. package/dist/commonjs/models/operations/listvendorinvoices.d.ts +1 -1
  115. package/dist/commonjs/models/operations/updateuser.d.ts +2 -0
  116. package/dist/commonjs/models/operations/updateuser.d.ts.map +1 -1
  117. package/dist/commonjs/models/operations/updateuser.js +1 -0
  118. package/dist/commonjs/models/operations/updateuser.js.map +1 -1
  119. package/dist/commonjs/react-query/alertsListAlerts.core.d.ts +2 -0
  120. package/dist/commonjs/react-query/alertsListAlerts.core.d.ts.map +1 -1
  121. package/dist/commonjs/react-query/alertsListAlerts.core.js +2 -0
  122. package/dist/commonjs/react-query/alertsListAlerts.core.js.map +1 -1
  123. package/dist/commonjs/react-query/alertsListAlerts.d.ts +2 -0
  124. package/dist/commonjs/react-query/alertsListAlerts.d.ts.map +1 -1
  125. package/dist/commonjs/react-query/alertsListAlerts.js.map +1 -1
  126. package/dist/commonjs/react-query/invoicesConvertQuote.d.ts +4 -1
  127. package/dist/commonjs/react-query/invoicesConvertQuote.d.ts.map +1 -1
  128. package/dist/commonjs/react-query/invoicesConvertQuote.js +4 -1
  129. package/dist/commonjs/react-query/invoicesConvertQuote.js.map +1 -1
  130. package/dist/commonjs/react-query/invoicesListInvoices.d.ts +4 -0
  131. package/dist/commonjs/react-query/invoicesListInvoices.d.ts.map +1 -1
  132. package/dist/commonjs/react-query/invoicesListInvoices.js +4 -0
  133. package/dist/commonjs/react-query/invoicesListInvoices.js.map +1 -1
  134. package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.core.d.ts +3 -1
  135. package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.core.d.ts.map +1 -1
  136. package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.core.js +5 -2
  137. package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.core.js.map +1 -1
  138. package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.d.ts +12 -2
  139. package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.d.ts.map +1 -1
  140. package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.js.map +1 -1
  141. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts +1 -7
  142. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
  143. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js +1 -7
  144. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js.map +1 -1
  145. package/dist/commonjs/sdk/invoices.d.ts +5 -1
  146. package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
  147. package/dist/commonjs/sdk/invoices.js +5 -1
  148. package/dist/commonjs/sdk/invoices.js.map +1 -1
  149. package/dist/commonjs/sdk/vendors.d.ts +1 -7
  150. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  151. package/dist/commonjs/sdk/vendors.js +1 -7
  152. package/dist/commonjs/sdk/vendors.js.map +1 -1
  153. package/dist/esm/__tests__/subscriptionPlanSelection.test.d.ts +2 -0
  154. package/dist/esm/__tests__/subscriptionPlanSelection.test.d.ts.map +1 -0
  155. package/dist/esm/__tests__/subscriptionPlanSelection.test.js +34 -0
  156. package/dist/esm/__tests__/subscriptionPlanSelection.test.js.map +1 -0
  157. package/dist/esm/__tests__/users.test.js +0 -3
  158. package/dist/esm/__tests__/users.test.js.map +1 -1
  159. package/dist/esm/__tests__/vendors.test.js +1 -1
  160. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  161. package/dist/esm/__tests__/webhooks.test.js +5 -4
  162. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  163. package/dist/esm/__tests__/zoneDevicesCreate.test.js +6 -0
  164. package/dist/esm/__tests__/zoneDevicesCreate.test.js.map +1 -1
  165. package/dist/esm/__tests__/zoneDevicesList.test.js +9 -1
  166. package/dist/esm/__tests__/zoneDevicesList.test.js.map +1 -1
  167. package/dist/esm/__tests__/zones.test.js +31 -4
  168. package/dist/esm/__tests__/zones.test.js.map +1 -1
  169. package/dist/esm/admin-funcs/doAdmin.d.ts +7 -5
  170. package/dist/esm/admin-funcs/doAdmin.d.ts.map +1 -1
  171. package/dist/esm/admin-funcs/doAdmin.js +19 -11
  172. package/dist/esm/admin-funcs/doAdmin.js.map +1 -1
  173. package/dist/esm/admin-funcs/networksCreate.d.ts +3 -0
  174. package/dist/esm/admin-funcs/networksCreate.d.ts.map +1 -1
  175. package/dist/esm/admin-funcs/networksCreate.js +9 -3
  176. package/dist/esm/admin-funcs/networksCreate.js.map +1 -1
  177. package/dist/esm/admin-funcs/networksEmailGatewayUpdates.d.ts +3 -0
  178. package/dist/esm/admin-funcs/networksEmailGatewayUpdates.d.ts.map +1 -0
  179. package/dist/esm/admin-funcs/networksEmailGatewayUpdates.js +6 -0
  180. package/dist/esm/admin-funcs/networksEmailGatewayUpdates.js.map +1 -0
  181. package/dist/esm/admin-funcs/networksUpdate.d.ts +10 -0
  182. package/dist/esm/admin-funcs/networksUpdate.d.ts.map +1 -0
  183. package/dist/esm/admin-funcs/networksUpdate.js +11 -0
  184. package/dist/esm/admin-funcs/networksUpdate.js.map +1 -0
  185. package/dist/esm/admin-funcs/subscriptionFinishScreeningQuestions.d.ts +3 -2
  186. package/dist/esm/admin-funcs/subscriptionFinishScreeningQuestions.d.ts.map +1 -1
  187. package/dist/esm/admin-funcs/subscriptionFinishScreeningQuestions.js +2 -1
  188. package/dist/esm/admin-funcs/subscriptionFinishScreeningQuestions.js.map +1 -1
  189. package/dist/esm/admin-funcs/subscriptionPlanSelection.d.ts +7 -0
  190. package/dist/esm/admin-funcs/subscriptionPlanSelection.d.ts.map +1 -0
  191. package/dist/esm/admin-funcs/subscriptionPlanSelection.js +9 -0
  192. package/dist/esm/admin-funcs/subscriptionPlanSelection.js.map +1 -0
  193. package/dist/esm/admin-funcs/subscriptionUpdateVendorType.d.ts +3 -2
  194. package/dist/esm/admin-funcs/subscriptionUpdateVendorType.d.ts.map +1 -1
  195. package/dist/esm/admin-funcs/subscriptionUpdateVendorType.js +2 -1
  196. package/dist/esm/admin-funcs/subscriptionUpdateVendorType.js.map +1 -1
  197. package/dist/esm/admin-funcs/zoneDevicesProvisioning.d.ts +4 -1
  198. package/dist/esm/admin-funcs/zoneDevicesProvisioning.d.ts.map +1 -1
  199. package/dist/esm/admin-funcs/zoneDevicesProvisioning.js +3 -8
  200. package/dist/esm/admin-funcs/zoneDevicesProvisioning.js.map +1 -1
  201. package/dist/esm/funcs/alertsListAlerts.js +1 -0
  202. package/dist/esm/funcs/alertsListAlerts.js.map +1 -1
  203. package/dist/esm/funcs/invoicesConvertQuote.d.ts +4 -1
  204. package/dist/esm/funcs/invoicesConvertQuote.d.ts.map +1 -1
  205. package/dist/esm/funcs/invoicesConvertQuote.js +7 -3
  206. package/dist/esm/funcs/invoicesConvertQuote.js.map +1 -1
  207. package/dist/esm/funcs/invoicesListInvoices.d.ts +1 -0
  208. package/dist/esm/funcs/invoicesListInvoices.d.ts.map +1 -1
  209. package/dist/esm/funcs/invoicesListInvoices.js +1 -0
  210. package/dist/esm/funcs/invoicesListInvoices.js.map +1 -1
  211. package/dist/esm/funcs/vendorsGetVendorInvoiceReceipt.js +5 -1
  212. package/dist/esm/funcs/vendorsGetVendorInvoiceReceipt.js.map +1 -1
  213. package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts +1 -7
  214. package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
  215. package/dist/esm/funcs/vendorsUpdateVendorDetails.js +1 -7
  216. package/dist/esm/funcs/vendorsUpdateVendorDetails.js.map +1 -1
  217. package/dist/esm/index.extras.d.ts +4 -0
  218. package/dist/esm/index.extras.d.ts.map +1 -1
  219. package/dist/esm/index.extras.js +5 -1
  220. package/dist/esm/index.extras.js.map +1 -1
  221. package/dist/esm/lib/config.d.ts +3 -3
  222. package/dist/esm/lib/config.js +3 -3
  223. package/dist/esm/lib/config.js.map +1 -1
  224. package/dist/esm/models/components/alert.d.ts +36 -2
  225. package/dist/esm/models/components/alert.d.ts.map +1 -1
  226. package/dist/esm/models/components/alert.js +19 -0
  227. package/dist/esm/models/components/alert.js.map +1 -1
  228. package/dist/esm/models/components/invoice.d.ts +10 -0
  229. package/dist/esm/models/components/invoice.d.ts.map +1 -1
  230. package/dist/esm/models/components/invoice.js +8 -0
  231. package/dist/esm/models/components/invoice.js.map +1 -1
  232. package/dist/esm/models/components/invoicefinancialstatus.d.ts +1 -0
  233. package/dist/esm/models/components/invoicefinancialstatus.d.ts.map +1 -1
  234. package/dist/esm/models/components/invoicefinancialstatus.js +1 -0
  235. package/dist/esm/models/components/invoicefinancialstatus.js.map +1 -1
  236. package/dist/esm/models/components/userdetails.d.ts +0 -22
  237. package/dist/esm/models/components/userdetails.d.ts.map +1 -1
  238. package/dist/esm/models/components/userdetails.js +0 -6
  239. package/dist/esm/models/components/userdetails.js.map +1 -1
  240. package/dist/esm/models/components/userlocation.d.ts +0 -10
  241. package/dist/esm/models/components/userlocation.d.ts.map +1 -1
  242. package/dist/esm/models/components/userlocation.js +0 -8
  243. package/dist/esm/models/components/userlocation.js.map +1 -1
  244. package/dist/esm/models/operations/convertquote.d.ts +21 -0
  245. package/dist/esm/models/operations/convertquote.d.ts.map +1 -1
  246. package/dist/esm/models/operations/convertquote.js +16 -0
  247. package/dist/esm/models/operations/convertquote.js.map +1 -1
  248. package/dist/esm/models/operations/createinvoice.d.ts +25 -0
  249. package/dist/esm/models/operations/createinvoice.d.ts.map +1 -1
  250. package/dist/esm/models/operations/createinvoice.js +10 -0
  251. package/dist/esm/models/operations/createinvoice.js.map +1 -1
  252. package/dist/esm/models/operations/getvendorinvoicereceipt.d.ts +19 -0
  253. package/dist/esm/models/operations/getvendorinvoicereceipt.d.ts.map +1 -1
  254. package/dist/esm/models/operations/getvendorinvoicereceipt.js +15 -0
  255. package/dist/esm/models/operations/getvendorinvoicereceipt.js.map +1 -1
  256. package/dist/esm/models/operations/invoicesexport.d.ts +4 -3
  257. package/dist/esm/models/operations/invoicesexport.d.ts.map +1 -1
  258. package/dist/esm/models/operations/invoicesexport.js +2 -1
  259. package/dist/esm/models/operations/invoicesexport.js.map +1 -1
  260. package/dist/esm/models/operations/listalerts.d.ts +5 -0
  261. package/dist/esm/models/operations/listalerts.d.ts.map +1 -1
  262. package/dist/esm/models/operations/listalerts.js +2 -0
  263. package/dist/esm/models/operations/listalerts.js.map +1 -1
  264. package/dist/esm/models/operations/listinvoices.d.ts +1 -1
  265. package/dist/esm/models/operations/listvendorinvoices.d.ts +1 -1
  266. package/dist/esm/models/operations/updateuser.d.ts +2 -0
  267. package/dist/esm/models/operations/updateuser.d.ts.map +1 -1
  268. package/dist/esm/models/operations/updateuser.js +1 -0
  269. package/dist/esm/models/operations/updateuser.js.map +1 -1
  270. package/dist/esm/react-query/alertsListAlerts.core.d.ts +2 -0
  271. package/dist/esm/react-query/alertsListAlerts.core.d.ts.map +1 -1
  272. package/dist/esm/react-query/alertsListAlerts.core.js +2 -0
  273. package/dist/esm/react-query/alertsListAlerts.core.js.map +1 -1
  274. package/dist/esm/react-query/alertsListAlerts.d.ts +2 -0
  275. package/dist/esm/react-query/alertsListAlerts.d.ts.map +1 -1
  276. package/dist/esm/react-query/alertsListAlerts.js.map +1 -1
  277. package/dist/esm/react-query/invoicesConvertQuote.d.ts +4 -1
  278. package/dist/esm/react-query/invoicesConvertQuote.d.ts.map +1 -1
  279. package/dist/esm/react-query/invoicesConvertQuote.js +4 -1
  280. package/dist/esm/react-query/invoicesConvertQuote.js.map +1 -1
  281. package/dist/esm/react-query/invoicesListInvoices.d.ts +4 -0
  282. package/dist/esm/react-query/invoicesListInvoices.d.ts.map +1 -1
  283. package/dist/esm/react-query/invoicesListInvoices.js +4 -0
  284. package/dist/esm/react-query/invoicesListInvoices.js.map +1 -1
  285. package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.core.d.ts +3 -1
  286. package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.core.d.ts.map +1 -1
  287. package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.core.js +5 -2
  288. package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.core.js.map +1 -1
  289. package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.d.ts +12 -2
  290. package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.d.ts.map +1 -1
  291. package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.js.map +1 -1
  292. package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts +1 -7
  293. package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
  294. package/dist/esm/react-query/vendorsUpdateVendorDetails.js +1 -7
  295. package/dist/esm/react-query/vendorsUpdateVendorDetails.js.map +1 -1
  296. package/dist/esm/sdk/invoices.d.ts +5 -1
  297. package/dist/esm/sdk/invoices.d.ts.map +1 -1
  298. package/dist/esm/sdk/invoices.js +5 -1
  299. package/dist/esm/sdk/invoices.js.map +1 -1
  300. package/dist/esm/sdk/vendors.d.ts +1 -7
  301. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  302. package/dist/esm/sdk/vendors.js +1 -7
  303. package/dist/esm/sdk/vendors.js.map +1 -1
  304. package/jsr.json +1 -1
  305. package/package.json +1 -1
  306. package/src/__tests__/subscriptionPlanSelection.test.ts +53 -0
  307. package/src/__tests__/users.test.ts +0 -3
  308. package/src/__tests__/vendors.test.ts +1 -1
  309. package/src/__tests__/webhooks.test.ts +5 -4
  310. package/src/__tests__/zoneDevicesCreate.test.ts +8 -0
  311. package/src/__tests__/zoneDevicesList.test.ts +9 -1
  312. package/src/__tests__/zones.test.ts +31 -4
  313. package/src/admin-funcs/doAdmin.ts +42 -19
  314. package/src/admin-funcs/networksCreate.ts +13 -3
  315. package/src/admin-funcs/networksEmailGatewayUpdates.ts +6 -0
  316. package/src/admin-funcs/networksUpdate.ts +28 -0
  317. package/src/admin-funcs/subscriptionFinishScreeningQuestions.ts +11 -3
  318. package/src/admin-funcs/subscriptionPlanSelection.ts +17 -0
  319. package/src/admin-funcs/subscriptionUpdateVendorType.ts +11 -3
  320. package/src/admin-funcs/zoneDevicesProvisioning.ts +14 -2
  321. package/src/funcs/alertsListAlerts.ts +1 -0
  322. package/src/funcs/invoicesConvertQuote.ts +7 -3
  323. package/src/funcs/invoicesListInvoices.ts +1 -0
  324. package/src/funcs/vendorsGetVendorInvoiceReceipt.ts +6 -1
  325. package/src/funcs/vendorsUpdateVendorDetails.ts +1 -7
  326. package/src/index.extras.ts +5 -1
  327. package/src/lib/config.ts +3 -3
  328. package/src/models/components/alert.ts +51 -2
  329. package/src/models/components/invoice.ts +18 -0
  330. package/src/models/components/invoicefinancialstatus.ts +1 -0
  331. package/src/models/components/userdetails.ts +0 -28
  332. package/src/models/components/userlocation.ts +0 -18
  333. package/src/models/operations/convertquote.ts +46 -0
  334. package/src/models/operations/createinvoice.ts +35 -0
  335. package/src/models/operations/getvendorinvoicereceipt.ts +27 -0
  336. package/src/models/operations/invoicesexport.ts +4 -3
  337. package/src/models/operations/listalerts.ts +7 -0
  338. package/src/models/operations/listinvoices.ts +1 -1
  339. package/src/models/operations/listvendorinvoices.ts +1 -1
  340. package/src/models/operations/updateuser.ts +3 -0
  341. package/src/react-query/alertsListAlerts.core.ts +4 -0
  342. package/src/react-query/alertsListAlerts.ts +2 -0
  343. package/src/react-query/invoicesConvertQuote.ts +4 -1
  344. package/src/react-query/invoicesListInvoices.ts +4 -0
  345. package/src/react-query/vendorsGetVendorInvoiceReceipt.core.ts +8 -2
  346. package/src/react-query/vendorsGetVendorInvoiceReceipt.ts +7 -2
  347. package/src/react-query/vendorsUpdateVendorDetails.ts +1 -7
  348. package/src/sdk/invoices.ts +5 -1
  349. package/src/sdk/vendors.ts +1 -7
@@ -20,9 +20,11 @@ import { Result } from "../types/fp.js";
20
20
  import { getInternalCore } from "./initializeCore.js";
21
21
  import { encodeJSON } from "../lib/encodings.js";
22
22
 
23
- export type internalApiResult = APIPromise<
23
+ // An internal call whose response is validated against a schema for `T` (see $doPost's
24
+ // responseSchema). internalApiResult is the untyped default.
25
+ export type internalApiResultOf<T> = APIPromise<
24
26
  Result<
25
- Json,
27
+ T,
26
28
  | errors.ApiErrorResponse
27
29
  | GreenSecurityError
28
30
  | SDKValidationError
@@ -34,6 +36,8 @@ export type internalApiResult = APIPromise<
34
36
  >
35
37
  >;
36
38
 
39
+ export type internalApiResult = internalApiResultOf<Json>;
40
+
37
41
  // This creates a generic JSON schema that can be used to validate any JSON object
38
42
  const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
39
43
  type Literal = z.infer<typeof literalSchema>;
@@ -201,10 +205,10 @@ export async function $doGetSingle<T extends object>(
201
205
  return [result, { status: "complete", request: req, response }];
202
206
  }
203
207
 
204
- type PostResult = Promise<
208
+ type BodyResult<T = Json> = Promise<
205
209
  [
206
210
  Result<
207
- Json,
211
+ T,
208
212
  | errors.ApiErrorResponse
209
213
  | GreenSecurityError
210
214
  | ResponseValidationError
@@ -219,15 +223,21 @@ type PostResult = Promise<
219
223
  ]
220
224
  >;
221
225
 
222
- // Shared by the JSON and multipart posts below: everything except how the body is built and
223
- // whether we name a Content-Type. A multipart body must NOT carry one, because only fetch can
224
- // append the boundary it generates.
225
- async function $doPostBody(
226
+ // Shared by the JSON and multipart requests below: everything except the method, how the body
227
+ // is built and whether we name a Content-Type. A multipart body must NOT carry one, because only
228
+ // fetch can append the boundary it generates.
229
+ async function $doBodyRequest<R = Json>(
230
+ method: "POST" | "PUT",
226
231
  route: string,
227
232
  body: BodyInit | undefined,
228
233
  contentTypeHeader: Record<string, string>,
229
234
  options?: RequestOptions,
230
- ): PostResult {
235
+ responseSchema?: z.ZodType<R>,
236
+ ): BodyResult<R> {
237
+ // Without a schema the body is only checked to be JSON, which is every caller before typed
238
+ // responses existed.
239
+ const schema = (responseSchema ?? jsonSchema) as z.ZodType<R>;
240
+
231
241
  const client = getInternalCore();
232
242
  if (!client) {
233
243
  throw new Error("GreenSecurityCore client is not initialized.");
@@ -263,7 +273,7 @@ async function $doPostBody(
263
273
 
264
274
  const requestRes = client._createRequest(context, {
265
275
  security: requestSecurity,
266
- method: "POST",
276
+ method,
267
277
  baseURL: options?.serverURL,
268
278
  path: path,
269
279
  headers: headers,
@@ -289,7 +299,7 @@ async function $doPostBody(
289
299
  };
290
300
 
291
301
  const [result] = await M.match<
292
- Json,
302
+ R,
293
303
  | errors.ApiErrorResponse
294
304
  | GreenSecurityError
295
305
  | ResponseValidationError
@@ -300,10 +310,10 @@ async function $doPostBody(
300
310
  | RequestTimeoutError
301
311
  | ConnectionError
302
312
  >(
303
- M.json(200, jsonSchema),
313
+ M.json(200, schema),
304
314
  // A REST create answers 201, which matches none of the cases below — an unmatched status is
305
315
  // an error, so the caller saw a failure for a request the server had accepted.
306
- M.json(201, jsonSchema),
316
+ M.json(201, schema),
307
317
  // 422 is a real answer here, not a surprise: the create returns it for a refused certificate
308
318
  // and for a model validation failure. Left out, it fell through to M.fail("4XX"), which
309
319
  // yields a generic APIError and hides the server's message from the form.
@@ -318,16 +328,21 @@ async function $doPostBody(
318
328
  return [result, { status: "complete", request: req, response }];
319
329
  }
320
330
 
321
- export async function $doPost<T extends object>(
331
+ // Pass responseSchema to validate and type the 200/201 body; a body that does not match it comes
332
+ // back as a ResponseValidationError instead of being handed to the caller.
333
+ export async function $doPost<T extends object, R = Json>(
322
334
  route: string,
323
335
  postData: T,
324
336
  options?: RequestOptions,
325
- ): PostResult {
326
- return $doPostBody(
337
+ responseSchema?: z.ZodType<R>,
338
+ ): BodyResult<R> {
339
+ return $doBodyRequest(
340
+ "POST",
327
341
  route,
328
342
  encodeJSON("body", postData, { explode: true }),
329
343
  { "Content-Type": "application/json" },
330
344
  options,
345
+ responseSchema,
331
346
  );
332
347
  }
333
348
 
@@ -337,8 +352,16 @@ export async function $doPostForm(
337
352
  route: string,
338
353
  form: FormData,
339
354
  options?: RequestOptions,
340
- ): PostResult {
341
- return $doPostBody(route, form, {}, options);
355
+ ): BodyResult {
356
+ return $doBodyRequest("POST", route, form, {}, options);
357
+ }
358
+
359
+ export async function $doPutForm(
360
+ route: string,
361
+ form: FormData,
362
+ options?: RequestOptions,
363
+ ): BodyResult {
364
+ return $doBodyRequest("PUT", route, form, {}, options);
342
365
  }
343
366
 
344
367
  export function $doPut<T extends object>(
@@ -454,7 +477,7 @@ async function $doJsonRequest(
454
477
  | ConnectionError
455
478
  >(
456
479
  M.json(200, jsonSchema),
457
- M.jsonErr([400, 401, 403, 404], errors.ApiErrorResponse$inboundSchema),
480
+ M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema),
458
481
  M.fail("4XX"),
459
482
  M.fail("5XX"),
460
483
  )(response, req, { extraFields: responseFields });
@@ -68,9 +68,19 @@ export function networksCreate(
68
68
  return new APIPromise($doPost("/networks", request));
69
69
  }
70
70
 
71
+ return new APIPromise($doPostForm("/networks", networkForm(request, certificate)));
72
+ }
73
+
74
+ // The multipart body for a network create or update; only the fields present are sent.
75
+ export function networkForm(
76
+ request: { [K in keyof networksCreateRequest]?: networksCreateRequest[K] | undefined },
77
+ certificate: networksCreateCertificate,
78
+ ): FormData {
71
79
  const form = new FormData();
72
- appendField(form, "name", request.name);
73
- request.facility_ids.forEach((id) => form.append("facility_ids[]", String(id)));
80
+ if (request.name !== undefined) {
81
+ appendField(form, "name", request.name);
82
+ }
83
+ request.facility_ids?.forEach((id) => form.append("facility_ids[]", String(id)));
74
84
  if (request.setup_complete !== undefined) {
75
85
  appendField(form, "setup_complete", request.setup_complete);
76
86
  }
@@ -79,7 +89,7 @@ export function networksCreate(
79
89
  // RN's FormData accepts {uri,name,type} where the DOM expects a Blob, hence the cast.
80
90
  form.append("certificate", certificate as unknown as Blob);
81
91
 
82
- return new APIPromise($doPostForm("/networks", form));
92
+ return form;
83
93
  }
84
94
 
85
95
  function appendField(form: FormData, key: string, value: string | number | boolean): void {
@@ -0,0 +1,6 @@
1
+ import { APIPromise } from "../types/async.js";
2
+ import { $doPost, internalApiResult } from "./doAdmin.js";
3
+
4
+ export function networksEmailGatewayUpdates(networkId: number): internalApiResult {
5
+ return new APIPromise($doPost(`/networks/${networkId}/gateway-update-email`, {}));
6
+ }
@@ -0,0 +1,28 @@
1
+ import { APIPromise } from "../types/async.js";
2
+ import { $doPut, $doPutForm, internalApiResult } from "./doAdmin.js";
3
+ import {
4
+ networkEthernetSettings,
5
+ networkForm,
6
+ networksCreateCertificate,
7
+ networkWifiSettings,
8
+ } from "./networksCreate.js";
9
+
10
+ export type networksUpdateRequest = {
11
+ name?: string;
12
+ facility_ids?: number[];
13
+ ethernet: networkEthernetSettings | undefined;
14
+ wifi: networkWifiSettings | undefined;
15
+ };
16
+
17
+ export function networksUpdate(
18
+ networkId: number,
19
+ request: networksUpdateRequest,
20
+ certificate?: networksCreateCertificate,
21
+ ): internalApiResult {
22
+ const route = `/networks/${networkId}`;
23
+ if (!certificate) {
24
+ return new APIPromise($doPut(route, request));
25
+ }
26
+
27
+ return new APIPromise($doPutForm(route, networkForm(request, certificate)));
28
+ }
@@ -1,13 +1,21 @@
1
1
  import { APIPromise } from "../types/async.js";
2
- import { $doPost, internalApiResult } from "./doAdmin.js";
2
+ import { $doPost, internalApiResultOf } from "./doAdmin.js";
3
+ import {
4
+ subscriptionPlanSelectionResponse,
5
+ subscriptionPlanSelectionResponse$inboundSchema,
6
+ } from "./subscriptionPlanSelection.js";
3
7
 
4
8
  export type subscriptionFinishScreeningQuestionsRequest = {
5
9
  vendor_id: number;
6
10
  };
7
11
 
8
- export function subscriptionFinishScreeningQuestions(request: subscriptionFinishScreeningQuestionsRequest): internalApiResult {
12
+ export function subscriptionFinishScreeningQuestions(
13
+ request: subscriptionFinishScreeningQuestionsRequest,
14
+ ): internalApiResultOf<subscriptionPlanSelectionResponse> {
9
15
  return new APIPromise($doPost(
10
16
  "/subscription/screening-questions",
11
- request
17
+ request,
18
+ undefined,
19
+ subscriptionPlanSelectionResponse$inboundSchema,
12
20
  ));
13
21
  }
@@ -0,0 +1,17 @@
1
+ import * as z from "zod/v3";
2
+
3
+ // What finishing the screening questions or choosing a vendor type answers. GSSD-7289.
4
+ export type subscriptionPlanSelectionResponse = {
5
+ success: boolean;
6
+ // false when Standard is the vendor's only plan (e.g. Level 1, which cannot buy Emerald): the
7
+ // server has already selected it, so the plan step is skipped and the next step is the invoice.
8
+ plan_selection_required: boolean;
9
+ };
10
+
11
+ // Unknown fields pass through, so the server can add to the response without breaking callers.
12
+ export const subscriptionPlanSelectionResponse$inboundSchema: z.ZodType<subscriptionPlanSelectionResponse> = z
13
+ .object({
14
+ success: z.boolean(),
15
+ plan_selection_required: z.boolean(),
16
+ })
17
+ .passthrough();
@@ -1,14 +1,22 @@
1
1
  import { APIPromise } from "../types/async.js";
2
- import { $doPost, internalApiResult } from "./doAdmin.js";
2
+ import { $doPost, internalApiResultOf } from "./doAdmin.js";
3
+ import {
4
+ subscriptionPlanSelectionResponse,
5
+ subscriptionPlanSelectionResponse$inboundSchema,
6
+ } from "./subscriptionPlanSelection.js";
3
7
 
4
8
  export type subscriptionUpdateVendorTypeRequest = {
5
9
  vendor_id: number;
6
10
  vendor_type_id: number[];
7
11
  };
8
12
 
9
- export function subscriptionUpdateVendorType(request: subscriptionUpdateVendorTypeRequest): internalApiResult {
13
+ export function subscriptionUpdateVendorType(
14
+ request: subscriptionUpdateVendorTypeRequest,
15
+ ): internalApiResultOf<subscriptionPlanSelectionResponse> {
10
16
  return new APIPromise($doPost(
11
17
  "/subscription/vendor-type",
12
- request
18
+ request,
19
+ undefined,
20
+ subscriptionPlanSelectionResponse$inboundSchema,
13
21
  ));
14
22
  }
@@ -7,6 +7,18 @@ import { $doPost, internalApiResult } from "./doAdmin.js";
7
7
  //
8
8
  // Internal for the same reason as zoneDevicesCreate. The response carries secrets: callers keep it
9
9
  // in memory for the provisioning run and never persist or log it.
10
- export function zoneDevicesProvisioning(zoneDeviceId: number): internalApiResult {
11
- return new APIPromise($doPost(`/zone-devices/${zoneDeviceId}/provisioning`, {}));
10
+ //
11
+ // `certificate: false` is for tasks that never write a certificate to the gateway (edit, reboot):
12
+ // the server then mints none and returns no IoT credentials, since minting revokes the certificate
13
+ // the gateway already runs on. Left out, the server mints when none is stored, as before.
14
+ export type zoneDevicesProvisioningOptions = {
15
+ certificate?: boolean;
16
+ };
17
+
18
+ export function zoneDevicesProvisioning(
19
+ zoneDeviceId: number,
20
+ options: zoneDevicesProvisioningOptions = {}
21
+ ): internalApiResult {
22
+ const body = options.certificate === false ? { certificate: false } : {};
23
+ return new APIPromise($doPost(`/zone-devices/${zoneDeviceId}/provisioning`, body));
12
24
  }
@@ -114,6 +114,7 @@ async function $do(
114
114
  encodeFormQuery({
115
115
  "alert_type": payload.alert_type,
116
116
  "desc": payload.desc,
117
+ "include_dismissed_reminders": payload.include_dismissed_reminders,
117
118
  "items_per_page": payload.items_per_page,
118
119
  "page": payload.page,
119
120
  "sort": payload.sort,
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { GreenSecurityCore } from "../core.js";
6
- import { encodeSimple } from "../lib/encodings.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
7
  import { matchStatusCode } from "../lib/http.js";
8
8
  import * as M from "../lib/matchers.js";
9
9
  import { compactMap } from "../lib/primitives.js";
@@ -43,7 +43,10 @@ import { Result } from "../types/fp.js";
43
43
  * invoices; a caller allowed to create the invoice but not to update the
44
44
  * linked `VendorCredential` responds `401`.
45
45
  *
46
- * Takes no request body.
46
+ * Optionally takes `send_to_company_manager`, for a quote linked to a
47
+ * `VendorCredential`: send `true` when the vendor is sending the
48
+ * converted invoice to their company managers to pay instead of paying
49
+ * it themselves. It follows the same rules as on `POST /invoices`.
47
50
  *
48
51
  * **Permissions.** Requires a valid token. This endpoint is not gated on a named permission—the caller's role and their relationship to the record decide what it returns.
49
52
  *
@@ -104,7 +107,7 @@ async function $do(
104
107
  return [parsed, { status: "invalid" }];
105
108
  }
106
109
  const payload = parsed.value;
107
- const body = null;
110
+ const body = encodeJSON("body", payload.RequestBody, { explode: true });
108
111
 
109
112
  const pathParams = {
110
113
  id: encodeSimple("id", payload.id, {
@@ -115,6 +118,7 @@ async function $do(
115
118
  const path = pathToFunc("/invoices/{id}/convert")(pathParams);
116
119
 
117
120
  const headers = new Headers(compactMap({
121
+ "Content-Type": "application/json",
118
122
  Accept: "application/json",
119
123
  }));
120
124
 
@@ -62,6 +62,7 @@ import {
62
62
  * - invoice_number
63
63
  * - date (processed date)
64
64
  * - date_paid
65
+ * - date_created
65
66
  * - financial_status
66
67
  * - amount
67
68
  *
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { GreenSecurityCore } from "../core.js";
6
- import { encodeSimple } from "../lib/encodings.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
7
  import { matchStatusCode } from "../lib/http.js";
8
8
  import * as M from "../lib/matchers.js";
9
9
  import { compactMap } from "../lib/primitives.js";
@@ -102,6 +102,10 @@ async function $do(
102
102
  };
103
103
  const path = pathToFunc("/vendors/invoices/{id}/receipt")(pathParams);
104
104
 
105
+ const query = encodeFormQuery({
106
+ "pdf_type": payload.pdf_type,
107
+ });
108
+
105
109
  const headers = new Headers(compactMap({
106
110
  Accept: "application/json",
107
111
  }));
@@ -130,6 +134,7 @@ async function $do(
130
134
  baseURL: options?.serverURL,
131
135
  path: path,
132
136
  headers: headers,
137
+ query: query,
133
138
  body: body,
134
139
  userAgent: client._options.userAgent,
135
140
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -36,18 +36,12 @@ import * as types$ from "../types/primitives.js";
36
36
  * can also remove the vendor from their company by sending `company_id: null`.
37
37
  *
38
38
  * From `location` this endpoint reads only `timezone`, `address1`, `address2`,
39
- * `city`, `state`, `zip`, `phone`, `mobile_phone`, `fax`, `work_email` and `personal_email`. The `address` and
39
+ * `city`, `state`, `zip`, `phone`, `mobile_phone` and `fax`. The `address` and
40
40
  * `country` properties of the shared `UserLocation` schema have no effect here, and
41
41
  * updating them is not supported. `state` accepts a US state or a Canadian
42
42
  * province—the vendor's country, set only at registration, is not editable
43
43
  * through this endpoint.
44
44
  *
45
- * `location.work_email` and `location.personal_email` are stored lowercased, and a
46
- * value that is not a valid email address, or is longer than 255 characters, gets a
47
- * `422` response. They are contact fields: the login stays `email`, which this
48
- * endpoint does not change. When an update sets either of them, one must be the
49
- * vendor's `email` and the other a different address or empty, or it gets a `422`.
50
- *
51
45
  * Submitting `location.zip` or `location.state` cross-checks the postal code
52
46
  * against the resulting state (using the vendor's existing value for whichever
53
47
  * of the two you omit from the request). The server rejects a code that is not shaped like a real
@@ -71,6 +71,8 @@ import { appsApproveDevice } from "./admin-funcs/appsApproveDevice.js";
71
71
  import { networksList } from "./admin-funcs/networksList.js";
72
72
  import { networksGet } from "./admin-funcs/networksGet.js";
73
73
  import { networksCreate } from "./admin-funcs/networksCreate.js";
74
+ import { networksUpdate } from "./admin-funcs/networksUpdate.js";
75
+ import { networksEmailGatewayUpdates } from "./admin-funcs/networksEmailGatewayUpdates.js";
74
76
  import { zoneDevicesList } from "./admin-funcs/zoneDevicesList.js";
75
77
  import { zoneDevicesGet } from "./admin-funcs/zoneDevicesGet.js";
76
78
  import { zoneDevicesCreate } from "./admin-funcs/zoneDevicesCreate.js";
@@ -205,7 +207,9 @@ export const __internal = {
205
207
  networks: {
206
208
  list: networksList,
207
209
  get: networksGet,
208
- create: networksCreate
210
+ create: networksCreate,
211
+ update: networksUpdate,
212
+ emailGatewayUpdates: networksEmailGatewayUpdates
209
213
  },
210
214
 
211
215
  zoneDevices: {
package/src/lib/config.ts CHANGED
@@ -80,8 +80,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
80
80
  export const SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "0.47.0",
83
- sdkVersion: "0.48.0-beta.1",
84
- genVersion: "2.950.2",
83
+ sdkVersion: "0.48.0-beta.11",
84
+ genVersion: "2.950.13",
85
85
  userAgent:
86
- "speakeasy-sdk/typescript 0.48.0-beta.1 2.950.2 0.47.0 @greensecurity/javascript-sdk",
86
+ "speakeasy-sdk/typescript 0.48.0-beta.11 2.950.13 0.47.0 @greensecurity/javascript-sdk",
87
87
  } as const;
@@ -39,7 +39,20 @@ export const FollowUpType = {
39
39
  export type FollowUpType = OpenEnum<typeof FollowUpType>;
40
40
 
41
41
  /**
42
- * Context data for the alert. Smart badge follow-ups carry the check-in fields, and credential paid alerts carry `vendor_credential_id`.
42
+ * Which checkout reminder this is. `null` if not applicable.
43
+ */
44
+ export const ReminderStage = {
45
+ ThirtyMinutes: "thirty_minutes",
46
+ FiveMinutes: "five_minutes",
47
+ Ended: "ended",
48
+ } as const;
49
+ /**
50
+ * Which checkout reminder this is. `null` if not applicable.
51
+ */
52
+ export type ReminderStage = OpenEnum<typeof ReminderStage>;
53
+
54
+ /**
55
+ * Context data for the alert. Smart badge follow-ups carry the check-in fields, credential paid alerts carry `vendor_credential_id`, and visit checkout reminders carry the visit and reminder fields.
43
56
  */
44
57
  export type AlertContext = {
45
58
  /**
@@ -74,6 +87,26 @@ export type AlertContext = {
74
87
  * The ID of the vendor credential the alert relates to. `null` if not applicable.
75
88
  */
76
89
  vendorCredentialId?: number | null | undefined;
90
+ /**
91
+ * The name of the facility a visit checkout reminder is for. `null` if not applicable.
92
+ */
93
+ facilityName?: string | null | undefined;
94
+ /**
95
+ * The visit's scheduled checkout time when a checkout reminder was sent, in UTC. `null` if not applicable.
96
+ */
97
+ scheduledCheckoutTime?: string | null | undefined;
98
+ /**
99
+ * Which checkout reminder this is. `null` if not applicable.
100
+ */
101
+ reminderStage?: ReminderStage | null | undefined;
102
+ /**
103
+ * The extensions, in minutes, the vendor could still take when a checkout reminder was sent. `null` if not applicable.
104
+ */
105
+ extensionOptionsMinutes?: Array<number> | null | undefined;
106
+ /**
107
+ * Whether a checkout reminder was dismissed because the vendor checked out, extended, or got a later reminder. `null` if not applicable.
108
+ */
109
+ dismissed?: boolean | null | undefined;
77
110
  };
78
111
 
79
112
  /**
@@ -117,7 +150,7 @@ export type Alert = {
117
150
  */
118
151
  plainText?: string | null | undefined;
119
152
  /**
120
- * Context data for the alert. Smart badge follow-ups carry the check-in fields, and credential paid alerts carry `vendor_credential_id`.
153
+ * Context data for the alert. Smart badge follow-ups carry the check-in fields, credential paid alerts carry `vendor_credential_id`, and visit checkout reminders carry the visit and reminder fields.
121
154
  */
122
155
  alertContext?: AlertContext | null | undefined;
123
156
  /**
@@ -141,6 +174,13 @@ export const FollowUpType$inboundSchema: z.ZodType<
141
174
  unknown
142
175
  > = openEnums.inboundSchema(FollowUpType);
143
176
 
177
+ /** @internal */
178
+ export const ReminderStage$inboundSchema: z.ZodType<
179
+ ReminderStage,
180
+ z.ZodTypeDef,
181
+ unknown
182
+ > = openEnums.inboundSchema(ReminderStage);
183
+
144
184
  /** @internal */
145
185
  export const AlertContext$inboundSchema: z.ZodType<
146
186
  AlertContext,
@@ -155,6 +195,11 @@ export const AlertContext$inboundSchema: z.ZodType<
155
195
  recheck_vendor_scan_id: z.nullable(types.number()).optional(),
156
196
  follow_up_type: z.nullable(FollowUpType$inboundSchema).optional(),
157
197
  vendor_credential_id: z.nullable(types.number()).optional(),
198
+ facility_name: z.nullable(types.string()).optional(),
199
+ scheduled_checkout_time: z.nullable(types.string()).optional(),
200
+ reminder_stage: z.nullable(ReminderStage$inboundSchema).optional(),
201
+ extension_options_minutes: z.nullable(z.array(types.number())).optional(),
202
+ dismissed: z.nullable(types.boolean()).optional(),
158
203
  }).transform((v) => {
159
204
  return remap$(v, {
160
205
  "facility_id": "facilityId",
@@ -165,6 +210,10 @@ export const AlertContext$inboundSchema: z.ZodType<
165
210
  "recheck_vendor_scan_id": "recheckVendorScanId",
166
211
  "follow_up_type": "followUpType",
167
212
  "vendor_credential_id": "vendorCredentialId",
213
+ "facility_name": "facilityName",
214
+ "scheduled_checkout_time": "scheduledCheckoutTime",
215
+ "reminder_stage": "reminderStage",
216
+ "extension_options_minutes": "extensionOptionsMinutes",
168
217
  });
169
218
  });
170
219
 
@@ -137,6 +137,14 @@ export type Invoice = {
137
137
  * Date of the invoice payment. Backfilled automatically by a daily background job for every paid invoice, from the last successful payment transaction or, failing that, the invoice's line item start date or creation date. Unlike `date_processed`, this is reliably populated for real (non-test) payments—allow up to 24 hours for it to appear after payment.
138
138
  */
139
139
  datePaid?: string | null | undefined;
140
+ /**
141
+ * When the invoice was created.
142
+ */
143
+ dateCreated?: string | null | undefined;
144
+ /**
145
+ * When the vendor sent this invoice to their company managers to pay instead of paying it themselves (`send_to_company_manager` on `POST /invoices` or `POST /invoices/{id}/convert`). `null` if it was never sent, or if the vendor took it back or settled it themselves. It is kept on an invoice the managers paid, and on one that was later voided.
146
+ */
147
+ dateSentToCompanyManager?: string | null | undefined;
140
148
  /**
141
149
  * The date the invoice payment is due. `null` if no due date is set.
142
150
  */
@@ -388,6 +396,8 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
388
396
  tracking_number: z.nullable(types.string()).optional(),
389
397
  date_processed: z.nullable(types.string()).optional(),
390
398
  date_paid: z.nullable(types.string()).optional(),
399
+ date_created: z.nullable(types.string()).optional(),
400
+ date_sent_to_company_manager: z.nullable(types.string()).optional(),
391
401
  date_due: z.nullable(types.string()).optional(),
392
402
  amount: z.nullable(types.number()).optional(),
393
403
  status: z.nullable(types.string()).optional(),
@@ -415,6 +425,8 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
415
425
  "tracking_number": "trackingNumber",
416
426
  "date_processed": "dateProcessed",
417
427
  "date_paid": "datePaid",
428
+ "date_created": "dateCreated",
429
+ "date_sent_to_company_manager": "dateSentToCompanyManager",
418
430
  "date_due": "dateDue",
419
431
  "financial_status": "financialStatus",
420
432
  "amount_not_paid": "amountNotPaid",
@@ -432,6 +444,8 @@ export type Invoice$Outbound = {
432
444
  tracking_number?: string | null | undefined;
433
445
  date_processed?: string | null | undefined;
434
446
  date_paid?: string | null | undefined;
447
+ date_created?: string | null | undefined;
448
+ date_sent_to_company_manager?: string | null | undefined;
435
449
  date_due?: string | null | undefined;
436
450
  amount?: number | null | undefined;
437
451
  status?: string | null | undefined;
@@ -463,6 +477,8 @@ export const Invoice$outboundSchema: z.ZodType<
463
477
  trackingNumber: z.nullable(z.string()).optional(),
464
478
  dateProcessed: z.nullable(z.string()).optional(),
465
479
  datePaid: z.nullable(z.string()).optional(),
480
+ dateCreated: z.nullable(z.string()).optional(),
481
+ dateSentToCompanyManager: z.nullable(z.string()).optional(),
466
482
  dateDue: z.nullable(z.string()).optional(),
467
483
  amount: z.nullable(z.number().int()).optional(),
468
484
  status: z.nullable(z.string()).optional(),
@@ -489,6 +505,8 @@ export const Invoice$outboundSchema: z.ZodType<
489
505
  trackingNumber: "tracking_number",
490
506
  dateProcessed: "date_processed",
491
507
  datePaid: "date_paid",
508
+ dateCreated: "date_created",
509
+ dateSentToCompanyManager: "date_sent_to_company_manager",
492
510
  dateDue: "date_due",
493
511
  financialStatus: "financial_status",
494
512
  amountNotPaid: "amount_not_paid",
@@ -8,6 +8,7 @@ import { ClosedEnum } from "../../types/enums.js";
8
8
  export const InvoiceFinancialStatus = {
9
9
  Paid: "paid",
10
10
  Unpaid: "unpaid",
11
+ AwaitingPayment: "awaiting_payment",
11
12
  } as const;
12
13
  export type InvoiceFinancialStatus = ClosedEnum<typeof InvoiceFinancialStatus>;
13
14
 
@@ -85,10 +85,6 @@ export type UserDetails = {
85
85
  * First name of the user.
86
86
  */
87
87
  firstName?: string | null | undefined;
88
- /**
89
- * Middle name of the user, or `null` if not set. Returned only in the full user record (`expand=user`).
90
- */
91
- middleName?: string | null | undefined;
92
88
  /**
93
89
  * Last name of the user.
94
90
  */
@@ -97,24 +93,6 @@ export type UserDetails = {
97
93
  * Email address (not always valid)
98
94
  */
99
95
  email: string;
100
- /**
101
- * A vendor's work email address, a contact field kept apart from `email`,
102
- *
103
- * @remarks
104
- * which stays the login. When it is the same address as `email`, it follows
105
- * any change to the login. `null` if not set. Returned only in the full user
106
- * record (`expand=user`).
107
- */
108
- workEmail?: string | null | undefined;
109
- /**
110
- * A vendor's personal email address, a contact field kept apart from `email`,
111
- *
112
- * @remarks
113
- * which stays the login. When it is the same address as `email`, it follows
114
- * any change to the login. `null` if not set. Returned only in the full user
115
- * record (`expand=user`).
116
- */
117
- personalEmail?: string | null | undefined;
118
96
  /**
119
97
  * The user's landline phone number, or `null` if not set.
120
98
  */
@@ -275,11 +253,8 @@ export const UserDetails$inboundSchema: z.ZodType<
275
253
  > = z.object({
276
254
  id: types.number(),
277
255
  first_name: z.nullable(types.string()).optional(),
278
- middle_name: z.nullable(types.string()).optional(),
279
256
  last_name: z.nullable(types.string()).optional(),
280
257
  email: types.string(),
281
- work_email: z.nullable(types.string()).optional(),
282
- personal_email: z.nullable(types.string()).optional(),
283
258
  phone: z.nullable(types.string()).optional(),
284
259
  mobile_phone: z.nullable(types.string()).optional(),
285
260
  fax: z.nullable(types.string()).optional(),
@@ -299,10 +274,7 @@ export const UserDetails$inboundSchema: z.ZodType<
299
274
  }).transform((v) => {
300
275
  return remap$(v, {
301
276
  "first_name": "firstName",
302
- "middle_name": "middleName",
303
277
  "last_name": "lastName",
304
- "work_email": "workEmail",
305
- "personal_email": "personalEmail",
306
278
  "mobile_phone": "mobilePhone",
307
279
  "phone_confirmed": "phoneConfirmed",
308
280
  "email_confirmed": "emailConfirmed",