@greensecurity/javascript-sdk 0.45.0-beta.13 → 0.45.0-beta.14

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 (344) hide show
  1. package/README.md +7 -1
  2. package/dist/commonjs/__tests__/companies.test.js +17 -0
  3. package/dist/commonjs/__tests__/companies.test.js.map +1 -1
  4. package/dist/commonjs/__tests__/doAdmin.test.js +51 -0
  5. package/dist/commonjs/__tests__/doAdmin.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/kiosk.test.d.ts +2 -0
  7. package/dist/commonjs/__tests__/kiosk.test.d.ts.map +1 -0
  8. package/dist/commonjs/__tests__/kiosk.test.js +123 -0
  9. package/dist/commonjs/__tests__/kiosk.test.js.map +1 -0
  10. package/dist/commonjs/__tests__/lookups.test.js +21 -0
  11. package/dist/commonjs/__tests__/lookups.test.js.map +1 -1
  12. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  13. package/dist/commonjs/__tests__/zones.test.js +5 -20
  14. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  15. package/dist/commonjs/admin-funcs/dismissCommunication.d.ts +3 -0
  16. package/dist/commonjs/admin-funcs/dismissCommunication.d.ts.map +1 -0
  17. package/dist/commonjs/admin-funcs/dismissCommunication.js +20 -0
  18. package/dist/commonjs/admin-funcs/dismissCommunication.js.map +1 -0
  19. package/dist/commonjs/admin-funcs/doAdmin.d.ts +4 -0
  20. package/dist/commonjs/admin-funcs/doAdmin.d.ts.map +1 -1
  21. package/dist/commonjs/admin-funcs/doAdmin.js +58 -0
  22. package/dist/commonjs/admin-funcs/doAdmin.js.map +1 -1
  23. package/dist/commonjs/admin-funcs/kioskCreateEvent.d.ts +3 -0
  24. package/dist/commonjs/admin-funcs/kioskCreateEvent.d.ts.map +1 -0
  25. package/dist/commonjs/admin-funcs/kioskCreateEvent.js +11 -0
  26. package/dist/commonjs/admin-funcs/kioskCreateEvent.js.map +1 -0
  27. package/dist/commonjs/admin-funcs/kioskCreateKioskDevice.d.ts +7 -0
  28. package/dist/commonjs/admin-funcs/kioskCreateKioskDevice.d.ts.map +1 -0
  29. package/dist/commonjs/admin-funcs/kioskCreateKioskDevice.js +11 -0
  30. package/dist/commonjs/admin-funcs/kioskCreateKioskDevice.js.map +1 -0
  31. package/dist/commonjs/admin-funcs/kioskCreateZoneDevice.d.ts +3 -0
  32. package/dist/commonjs/admin-funcs/kioskCreateZoneDevice.d.ts.map +1 -0
  33. package/dist/commonjs/admin-funcs/kioskCreateZoneDevice.js +11 -0
  34. package/dist/commonjs/admin-funcs/kioskCreateZoneDevice.js.map +1 -0
  35. package/dist/commonjs/admin-funcs/kioskGetKioskDevice.d.ts +3 -0
  36. package/dist/commonjs/admin-funcs/kioskGetKioskDevice.d.ts.map +1 -0
  37. package/dist/commonjs/admin-funcs/kioskGetKioskDevice.js +11 -0
  38. package/dist/commonjs/admin-funcs/kioskGetKioskDevice.js.map +1 -0
  39. package/dist/commonjs/admin-funcs/kioskHeartbeat.d.ts +8 -0
  40. package/dist/commonjs/admin-funcs/kioskHeartbeat.d.ts.map +1 -0
  41. package/dist/commonjs/admin-funcs/kioskHeartbeat.js +11 -0
  42. package/dist/commonjs/admin-funcs/kioskHeartbeat.js.map +1 -0
  43. package/dist/commonjs/admin-funcs/kioskPing2.d.ts +4 -0
  44. package/dist/commonjs/admin-funcs/kioskPing2.d.ts.map +1 -0
  45. package/dist/commonjs/admin-funcs/kioskPing2.js +10 -0
  46. package/dist/commonjs/admin-funcs/kioskPing2.js.map +1 -0
  47. package/dist/commonjs/admin-funcs/kioskUpdateKioskDevice.d.ts +9 -0
  48. package/dist/commonjs/admin-funcs/kioskUpdateKioskDevice.d.ts.map +1 -0
  49. package/dist/commonjs/admin-funcs/kioskUpdateKioskDevice.js +10 -0
  50. package/dist/commonjs/admin-funcs/kioskUpdateKioskDevice.js.map +1 -0
  51. package/dist/commonjs/admin-funcs/listCommunications.d.ts +3 -0
  52. package/dist/commonjs/admin-funcs/listCommunications.d.ts.map +1 -0
  53. package/dist/commonjs/admin-funcs/listCommunications.js +25 -0
  54. package/dist/commonjs/admin-funcs/listCommunications.js.map +1 -0
  55. package/dist/commonjs/funcs/companiesListCompanyManagerContacts.d.ts +18 -0
  56. package/dist/commonjs/funcs/companiesListCompanyManagerContacts.d.ts.map +1 -0
  57. package/dist/commonjs/funcs/companiesListCompanyManagerContacts.js +124 -0
  58. package/dist/commonjs/funcs/companiesListCompanyManagerContacts.js.map +1 -0
  59. package/dist/commonjs/funcs/lookupsLookupPostalCode.d.ts +35 -0
  60. package/dist/commonjs/funcs/lookupsLookupPostalCode.d.ts.map +1 -0
  61. package/dist/commonjs/funcs/lookupsLookupPostalCode.js +140 -0
  62. package/dist/commonjs/funcs/lookupsLookupPostalCode.js.map +1 -0
  63. package/dist/commonjs/funcs/usersUpdateUser.d.ts +6 -0
  64. package/dist/commonjs/funcs/usersUpdateUser.d.ts.map +1 -1
  65. package/dist/commonjs/funcs/usersUpdateUser.js +6 -0
  66. package/dist/commonjs/funcs/usersUpdateUser.js.map +1 -1
  67. package/dist/commonjs/funcs/vendorsCreateVendor.d.ts +4 -0
  68. package/dist/commonjs/funcs/vendorsCreateVendor.d.ts.map +1 -1
  69. package/dist/commonjs/funcs/vendorsCreateVendor.js +4 -0
  70. package/dist/commonjs/funcs/vendorsCreateVendor.js.map +1 -1
  71. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts +9 -1
  72. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
  73. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js +9 -1
  74. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js.map +1 -1
  75. package/dist/commonjs/index.extras.d.ts +22 -0
  76. package/dist/commonjs/index.extras.d.ts.map +1 -1
  77. package/dist/commonjs/index.extras.js +24 -0
  78. package/dist/commonjs/index.extras.js.map +1 -1
  79. package/dist/commonjs/lib/config.d.ts +3 -3
  80. package/dist/commonjs/lib/config.js +3 -3
  81. package/dist/commonjs/models/components/companymanagercontact.d.ts +19 -0
  82. package/dist/commonjs/models/components/companymanagercontact.d.ts.map +1 -0
  83. package/dist/commonjs/models/components/companymanagercontact.js +60 -0
  84. package/dist/commonjs/models/components/companymanagercontact.js.map +1 -0
  85. package/dist/commonjs/models/components/index.d.ts +1 -0
  86. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  87. package/dist/commonjs/models/components/index.js +1 -0
  88. package/dist/commonjs/models/components/index.js.map +1 -1
  89. package/dist/commonjs/models/operations/createvendorcompany.d.ts +7 -1
  90. package/dist/commonjs/models/operations/createvendorcompany.d.ts.map +1 -1
  91. package/dist/commonjs/models/operations/createvendorcompany.js.map +1 -1
  92. package/dist/commonjs/models/operations/index.d.ts +2 -0
  93. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  94. package/dist/commonjs/models/operations/index.js +2 -0
  95. package/dist/commonjs/models/operations/index.js.map +1 -1
  96. package/dist/commonjs/models/operations/listcompanymanagercontacts.d.ts +27 -0
  97. package/dist/commonjs/models/operations/listcompanymanagercontacts.d.ts.map +1 -0
  98. package/dist/commonjs/models/operations/listcompanymanagercontacts.js +65 -0
  99. package/dist/commonjs/models/operations/listcompanymanagercontacts.js.map +1 -0
  100. package/dist/commonjs/models/operations/lookuppostalcode.d.ts +59 -0
  101. package/dist/commonjs/models/operations/lookuppostalcode.d.ts.map +1 -0
  102. package/dist/commonjs/models/operations/lookuppostalcode.js +81 -0
  103. package/dist/commonjs/models/operations/lookuppostalcode.js.map +1 -0
  104. package/dist/commonjs/react-query/companiesListCompanyManagerContacts.core.d.ts +12 -0
  105. package/dist/commonjs/react-query/companiesListCompanyManagerContacts.core.d.ts.map +1 -0
  106. package/dist/commonjs/react-query/companiesListCompanyManagerContacts.core.js +39 -0
  107. package/dist/commonjs/react-query/companiesListCompanyManagerContacts.core.js.map +1 -0
  108. package/dist/commonjs/react-query/companiesListCompanyManagerContacts.d.ts +29 -0
  109. package/dist/commonjs/react-query/companiesListCompanyManagerContacts.d.ts.map +1 -0
  110. package/dist/commonjs/react-query/companiesListCompanyManagerContacts.js +69 -0
  111. package/dist/commonjs/react-query/companiesListCompanyManagerContacts.js.map +1 -0
  112. package/dist/commonjs/react-query/index.d.ts +2 -0
  113. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  114. package/dist/commonjs/react-query/index.js +2 -0
  115. package/dist/commonjs/react-query/index.js.map +1 -1
  116. package/dist/commonjs/react-query/lookupsLookupPostalCode.core.d.ts +16 -0
  117. package/dist/commonjs/react-query/lookupsLookupPostalCode.core.d.ts.map +1 -0
  118. package/dist/commonjs/react-query/lookupsLookupPostalCode.core.js +43 -0
  119. package/dist/commonjs/react-query/lookupsLookupPostalCode.core.js.map +1 -0
  120. package/dist/commonjs/react-query/lookupsLookupPostalCode.d.ts +71 -0
  121. package/dist/commonjs/react-query/lookupsLookupPostalCode.d.ts.map +1 -0
  122. package/dist/commonjs/react-query/lookupsLookupPostalCode.js +95 -0
  123. package/dist/commonjs/react-query/lookupsLookupPostalCode.js.map +1 -0
  124. package/dist/commonjs/react-query/usersUpdateUser.d.ts +6 -0
  125. package/dist/commonjs/react-query/usersUpdateUser.d.ts.map +1 -1
  126. package/dist/commonjs/react-query/usersUpdateUser.js +6 -0
  127. package/dist/commonjs/react-query/usersUpdateUser.js.map +1 -1
  128. package/dist/commonjs/react-query/vendorsCreateVendor.d.ts +4 -0
  129. package/dist/commonjs/react-query/vendorsCreateVendor.d.ts.map +1 -1
  130. package/dist/commonjs/react-query/vendorsCreateVendor.js +4 -0
  131. package/dist/commonjs/react-query/vendorsCreateVendor.js.map +1 -1
  132. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts +9 -1
  133. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
  134. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js +9 -1
  135. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js.map +1 -1
  136. package/dist/commonjs/sdk/companies.d.ts +7 -0
  137. package/dist/commonjs/sdk/companies.d.ts.map +1 -1
  138. package/dist/commonjs/sdk/companies.js +10 -0
  139. package/dist/commonjs/sdk/companies.js.map +1 -1
  140. package/dist/commonjs/sdk/lookups.d.ts +22 -0
  141. package/dist/commonjs/sdk/lookups.d.ts.map +1 -1
  142. package/dist/commonjs/sdk/lookups.js +25 -0
  143. package/dist/commonjs/sdk/lookups.js.map +1 -1
  144. package/dist/commonjs/sdk/users.d.ts +6 -0
  145. package/dist/commonjs/sdk/users.d.ts.map +1 -1
  146. package/dist/commonjs/sdk/users.js +6 -0
  147. package/dist/commonjs/sdk/users.js.map +1 -1
  148. package/dist/commonjs/sdk/vendors.d.ts +13 -1
  149. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  150. package/dist/commonjs/sdk/vendors.js +13 -1
  151. package/dist/commonjs/sdk/vendors.js.map +1 -1
  152. package/dist/esm/__tests__/companies.test.js +17 -0
  153. package/dist/esm/__tests__/companies.test.js.map +1 -1
  154. package/dist/esm/__tests__/doAdmin.test.js +53 -2
  155. package/dist/esm/__tests__/doAdmin.test.js.map +1 -1
  156. package/dist/esm/__tests__/kiosk.test.d.ts +2 -0
  157. package/dist/esm/__tests__/kiosk.test.d.ts.map +1 -0
  158. package/dist/esm/__tests__/kiosk.test.js +121 -0
  159. package/dist/esm/__tests__/kiosk.test.js.map +1 -0
  160. package/dist/esm/__tests__/lookups.test.js +21 -0
  161. package/dist/esm/__tests__/lookups.test.js.map +1 -1
  162. package/dist/esm/__tests__/vendors.test.js +1 -1
  163. package/dist/esm/__tests__/zones.test.js +5 -20
  164. package/dist/esm/__tests__/zones.test.js.map +1 -1
  165. package/dist/esm/admin-funcs/dismissCommunication.d.ts +3 -0
  166. package/dist/esm/admin-funcs/dismissCommunication.d.ts.map +1 -0
  167. package/dist/esm/admin-funcs/dismissCommunication.js +17 -0
  168. package/dist/esm/admin-funcs/dismissCommunication.js.map +1 -0
  169. package/dist/esm/admin-funcs/doAdmin.d.ts +4 -0
  170. package/dist/esm/admin-funcs/doAdmin.d.ts.map +1 -1
  171. package/dist/esm/admin-funcs/doAdmin.js +57 -0
  172. package/dist/esm/admin-funcs/doAdmin.js.map +1 -1
  173. package/dist/esm/admin-funcs/kioskCreateEvent.d.ts +3 -0
  174. package/dist/esm/admin-funcs/kioskCreateEvent.d.ts.map +1 -0
  175. package/dist/esm/admin-funcs/kioskCreateEvent.js +8 -0
  176. package/dist/esm/admin-funcs/kioskCreateEvent.js.map +1 -0
  177. package/dist/esm/admin-funcs/kioskCreateKioskDevice.d.ts +7 -0
  178. package/dist/esm/admin-funcs/kioskCreateKioskDevice.d.ts.map +1 -0
  179. package/dist/esm/admin-funcs/kioskCreateKioskDevice.js +8 -0
  180. package/dist/esm/admin-funcs/kioskCreateKioskDevice.js.map +1 -0
  181. package/dist/esm/admin-funcs/kioskCreateZoneDevice.d.ts +3 -0
  182. package/dist/esm/admin-funcs/kioskCreateZoneDevice.d.ts.map +1 -0
  183. package/dist/esm/admin-funcs/kioskCreateZoneDevice.js +8 -0
  184. package/dist/esm/admin-funcs/kioskCreateZoneDevice.js.map +1 -0
  185. package/dist/esm/admin-funcs/kioskGetKioskDevice.d.ts +3 -0
  186. package/dist/esm/admin-funcs/kioskGetKioskDevice.d.ts.map +1 -0
  187. package/dist/esm/admin-funcs/kioskGetKioskDevice.js +8 -0
  188. package/dist/esm/admin-funcs/kioskGetKioskDevice.js.map +1 -0
  189. package/dist/esm/admin-funcs/kioskHeartbeat.d.ts +8 -0
  190. package/dist/esm/admin-funcs/kioskHeartbeat.d.ts.map +1 -0
  191. package/dist/esm/admin-funcs/kioskHeartbeat.js +8 -0
  192. package/dist/esm/admin-funcs/kioskHeartbeat.js.map +1 -0
  193. package/dist/esm/admin-funcs/kioskPing2.d.ts +4 -0
  194. package/dist/esm/admin-funcs/kioskPing2.d.ts.map +1 -0
  195. package/dist/esm/admin-funcs/kioskPing2.js +7 -0
  196. package/dist/esm/admin-funcs/kioskPing2.js.map +1 -0
  197. package/dist/esm/admin-funcs/kioskUpdateKioskDevice.d.ts +9 -0
  198. package/dist/esm/admin-funcs/kioskUpdateKioskDevice.d.ts.map +1 -0
  199. package/dist/esm/admin-funcs/kioskUpdateKioskDevice.js +7 -0
  200. package/dist/esm/admin-funcs/kioskUpdateKioskDevice.js.map +1 -0
  201. package/dist/esm/admin-funcs/listCommunications.d.ts +3 -0
  202. package/dist/esm/admin-funcs/listCommunications.d.ts.map +1 -0
  203. package/dist/esm/admin-funcs/listCommunications.js +22 -0
  204. package/dist/esm/admin-funcs/listCommunications.js.map +1 -0
  205. package/dist/esm/funcs/companiesListCompanyManagerContacts.d.ts +18 -0
  206. package/dist/esm/funcs/companiesListCompanyManagerContacts.d.ts.map +1 -0
  207. package/dist/esm/funcs/companiesListCompanyManagerContacts.js +88 -0
  208. package/dist/esm/funcs/companiesListCompanyManagerContacts.js.map +1 -0
  209. package/dist/esm/funcs/lookupsLookupPostalCode.d.ts +35 -0
  210. package/dist/esm/funcs/lookupsLookupPostalCode.d.ts.map +1 -0
  211. package/dist/esm/funcs/lookupsLookupPostalCode.js +104 -0
  212. package/dist/esm/funcs/lookupsLookupPostalCode.js.map +1 -0
  213. package/dist/esm/funcs/usersUpdateUser.d.ts +6 -0
  214. package/dist/esm/funcs/usersUpdateUser.d.ts.map +1 -1
  215. package/dist/esm/funcs/usersUpdateUser.js +6 -0
  216. package/dist/esm/funcs/usersUpdateUser.js.map +1 -1
  217. package/dist/esm/funcs/vendorsCreateVendor.d.ts +4 -0
  218. package/dist/esm/funcs/vendorsCreateVendor.d.ts.map +1 -1
  219. package/dist/esm/funcs/vendorsCreateVendor.js +4 -0
  220. package/dist/esm/funcs/vendorsCreateVendor.js.map +1 -1
  221. package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts +9 -1
  222. package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
  223. package/dist/esm/funcs/vendorsUpdateVendorDetails.js +9 -1
  224. package/dist/esm/funcs/vendorsUpdateVendorDetails.js.map +1 -1
  225. package/dist/esm/index.extras.d.ts +22 -0
  226. package/dist/esm/index.extras.d.ts.map +1 -1
  227. package/dist/esm/index.extras.js +24 -0
  228. package/dist/esm/index.extras.js.map +1 -1
  229. package/dist/esm/lib/config.d.ts +3 -3
  230. package/dist/esm/lib/config.js +3 -3
  231. package/dist/esm/models/components/companymanagercontact.d.ts +19 -0
  232. package/dist/esm/models/components/companymanagercontact.d.ts.map +1 -0
  233. package/dist/esm/models/components/companymanagercontact.js +23 -0
  234. package/dist/esm/models/components/companymanagercontact.js.map +1 -0
  235. package/dist/esm/models/components/index.d.ts +1 -0
  236. package/dist/esm/models/components/index.d.ts.map +1 -1
  237. package/dist/esm/models/components/index.js +1 -0
  238. package/dist/esm/models/components/index.js.map +1 -1
  239. package/dist/esm/models/operations/createvendorcompany.d.ts +7 -1
  240. package/dist/esm/models/operations/createvendorcompany.d.ts.map +1 -1
  241. package/dist/esm/models/operations/createvendorcompany.js.map +1 -1
  242. package/dist/esm/models/operations/index.d.ts +2 -0
  243. package/dist/esm/models/operations/index.d.ts.map +1 -1
  244. package/dist/esm/models/operations/index.js +2 -0
  245. package/dist/esm/models/operations/index.js.map +1 -1
  246. package/dist/esm/models/operations/listcompanymanagercontacts.d.ts +27 -0
  247. package/dist/esm/models/operations/listcompanymanagercontacts.d.ts.map +1 -0
  248. package/dist/esm/models/operations/listcompanymanagercontacts.js +27 -0
  249. package/dist/esm/models/operations/listcompanymanagercontacts.js.map +1 -0
  250. package/dist/esm/models/operations/lookuppostalcode.d.ts +59 -0
  251. package/dist/esm/models/operations/lookuppostalcode.d.ts.map +1 -0
  252. package/dist/esm/models/operations/lookuppostalcode.js +43 -0
  253. package/dist/esm/models/operations/lookuppostalcode.js.map +1 -0
  254. package/dist/esm/react-query/companiesListCompanyManagerContacts.core.d.ts +12 -0
  255. package/dist/esm/react-query/companiesListCompanyManagerContacts.core.d.ts.map +1 -0
  256. package/dist/esm/react-query/companiesListCompanyManagerContacts.core.js +34 -0
  257. package/dist/esm/react-query/companiesListCompanyManagerContacts.core.js.map +1 -0
  258. package/dist/esm/react-query/companiesListCompanyManagerContacts.d.ts +29 -0
  259. package/dist/esm/react-query/companiesListCompanyManagerContacts.d.ts.map +1 -0
  260. package/dist/esm/react-query/companiesListCompanyManagerContacts.js +59 -0
  261. package/dist/esm/react-query/companiesListCompanyManagerContacts.js.map +1 -0
  262. package/dist/esm/react-query/index.d.ts +2 -0
  263. package/dist/esm/react-query/index.d.ts.map +1 -1
  264. package/dist/esm/react-query/index.js +2 -0
  265. package/dist/esm/react-query/index.js.map +1 -1
  266. package/dist/esm/react-query/lookupsLookupPostalCode.core.d.ts +16 -0
  267. package/dist/esm/react-query/lookupsLookupPostalCode.core.d.ts.map +1 -0
  268. package/dist/esm/react-query/lookupsLookupPostalCode.core.js +38 -0
  269. package/dist/esm/react-query/lookupsLookupPostalCode.core.js.map +1 -0
  270. package/dist/esm/react-query/lookupsLookupPostalCode.d.ts +71 -0
  271. package/dist/esm/react-query/lookupsLookupPostalCode.d.ts.map +1 -0
  272. package/dist/esm/react-query/lookupsLookupPostalCode.js +85 -0
  273. package/dist/esm/react-query/lookupsLookupPostalCode.js.map +1 -0
  274. package/dist/esm/react-query/usersUpdateUser.d.ts +6 -0
  275. package/dist/esm/react-query/usersUpdateUser.d.ts.map +1 -1
  276. package/dist/esm/react-query/usersUpdateUser.js +6 -0
  277. package/dist/esm/react-query/usersUpdateUser.js.map +1 -1
  278. package/dist/esm/react-query/vendorsCreateVendor.d.ts +4 -0
  279. package/dist/esm/react-query/vendorsCreateVendor.d.ts.map +1 -1
  280. package/dist/esm/react-query/vendorsCreateVendor.js +4 -0
  281. package/dist/esm/react-query/vendorsCreateVendor.js.map +1 -1
  282. package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts +9 -1
  283. package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
  284. package/dist/esm/react-query/vendorsUpdateVendorDetails.js +9 -1
  285. package/dist/esm/react-query/vendorsUpdateVendorDetails.js.map +1 -1
  286. package/dist/esm/sdk/companies.d.ts +7 -0
  287. package/dist/esm/sdk/companies.d.ts.map +1 -1
  288. package/dist/esm/sdk/companies.js +10 -0
  289. package/dist/esm/sdk/companies.js.map +1 -1
  290. package/dist/esm/sdk/lookups.d.ts +22 -0
  291. package/dist/esm/sdk/lookups.d.ts.map +1 -1
  292. package/dist/esm/sdk/lookups.js +25 -0
  293. package/dist/esm/sdk/lookups.js.map +1 -1
  294. package/dist/esm/sdk/users.d.ts +6 -0
  295. package/dist/esm/sdk/users.d.ts.map +1 -1
  296. package/dist/esm/sdk/users.js +6 -0
  297. package/dist/esm/sdk/users.js.map +1 -1
  298. package/dist/esm/sdk/vendors.d.ts +13 -1
  299. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  300. package/dist/esm/sdk/vendors.js +13 -1
  301. package/dist/esm/sdk/vendors.js.map +1 -1
  302. package/jsr.json +1 -1
  303. package/package.json +1 -1
  304. package/src/__tests__/companies.test.ts +20 -0
  305. package/src/__tests__/doAdmin.test.ts +74 -1
  306. package/src/__tests__/kiosk.test.ts +163 -0
  307. package/src/__tests__/lookups.test.ts +24 -0
  308. package/src/__tests__/vendors.test.ts +1 -1
  309. package/src/__tests__/zones.test.ts +5 -20
  310. package/src/admin-funcs/dismissCommunication.ts +20 -0
  311. package/src/admin-funcs/doAdmin.ts +107 -0
  312. package/src/admin-funcs/kioskCreateEvent.ts +18 -0
  313. package/src/admin-funcs/kioskCreateKioskDevice.ts +17 -0
  314. package/src/admin-funcs/kioskCreateZoneDevice.ts +17 -0
  315. package/src/admin-funcs/kioskGetKioskDevice.ts +16 -0
  316. package/src/admin-funcs/kioskHeartbeat.ts +23 -0
  317. package/src/admin-funcs/kioskPing2.ts +10 -0
  318. package/src/admin-funcs/kioskUpdateKioskDevice.ts +23 -0
  319. package/src/admin-funcs/listCommunications.ts +29 -0
  320. package/src/funcs/companiesListCompanyManagerContacts.ts +182 -0
  321. package/src/funcs/lookupsLookupPostalCode.ts +193 -0
  322. package/src/funcs/usersUpdateUser.ts +6 -0
  323. package/src/funcs/vendorsCreateVendor.ts +4 -0
  324. package/src/funcs/vendorsUpdateVendorDetails.ts +9 -1
  325. package/src/index.extras.ts +27 -0
  326. package/src/lib/config.ts +3 -3
  327. package/src/models/components/companymanagercontact.ts +50 -0
  328. package/src/models/components/index.ts +1 -0
  329. package/src/models/operations/createvendorcompany.ts +7 -1
  330. package/src/models/operations/index.ts +2 -0
  331. package/src/models/operations/listcompanymanagercontacts.ts +77 -0
  332. package/src/models/operations/lookuppostalcode.ts +118 -0
  333. package/src/react-query/companiesListCompanyManagerContacts.core.ts +78 -0
  334. package/src/react-query/companiesListCompanyManagerContacts.ts +150 -0
  335. package/src/react-query/index.ts +2 -0
  336. package/src/react-query/lookupsLookupPostalCode.core.ts +82 -0
  337. package/src/react-query/lookupsLookupPostalCode.ts +177 -0
  338. package/src/react-query/usersUpdateUser.ts +6 -0
  339. package/src/react-query/vendorsCreateVendor.ts +4 -0
  340. package/src/react-query/vendorsUpdateVendorDetails.ts +9 -1
  341. package/src/sdk/companies.ts +20 -0
  342. package/src/sdk/lookups.ts +33 -0
  343. package/src/sdk/users.ts +6 -0
  344. package/src/sdk/vendors.ts +13 -1
@@ -0,0 +1,150 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ InvalidateQueryFilters,
7
+ QueryClient,
8
+ useQuery,
9
+ UseQueryResult,
10
+ useSuspenseQuery,
11
+ UseSuspenseQueryResult,
12
+ } from "@tanstack/react-query";
13
+ import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { useGreenSecurityContext } from "./_context.js";
26
+ import {
27
+ QueryHookOptions,
28
+ SuspenseQueryHookOptions,
29
+ TupleToPrefixes,
30
+ } from "./_types.js";
31
+ import {
32
+ buildCompaniesListCompanyManagerContactsQuery,
33
+ CompaniesListCompanyManagerContactsQueryData,
34
+ prefetchCompaniesListCompanyManagerContacts,
35
+ queryKeyCompaniesListCompanyManagerContacts,
36
+ } from "./companiesListCompanyManagerContacts.core.js";
37
+ export {
38
+ buildCompaniesListCompanyManagerContactsQuery,
39
+ type CompaniesListCompanyManagerContactsQueryData,
40
+ prefetchCompaniesListCompanyManagerContacts,
41
+ queryKeyCompaniesListCompanyManagerContacts,
42
+ };
43
+
44
+ export type CompaniesListCompanyManagerContactsQueryError =
45
+ | errors.ApiErrorResponse
46
+ | GreenSecurityError
47
+ | ResponseValidationError
48
+ | ConnectionError
49
+ | RequestAbortedError
50
+ | RequestTimeoutError
51
+ | InvalidRequestError
52
+ | UnexpectedClientError
53
+ | SDKValidationError;
54
+
55
+ /**
56
+ * List the contact details of a company's managers
57
+ *
58
+ * @remarks
59
+ * List the active managers of a company who have an email address, so someone who belongs to that company can contact them. Readable by a vendor of the company, a manager of the company, or an admin; every other caller receives a 404. Carries only the fields needed to address a message, not the full company manager or user record. Distinct from `/companies/{company_id}/managers`, which is the administration listing and is gated on the `company_managers` view permission.
60
+ */
61
+ export function useCompaniesListCompanyManagerContacts(
62
+ request: operations.ListCompanyManagerContactsRequest,
63
+ options?: QueryHookOptions<
64
+ CompaniesListCompanyManagerContactsQueryData,
65
+ CompaniesListCompanyManagerContactsQueryError
66
+ >,
67
+ ): UseQueryResult<
68
+ CompaniesListCompanyManagerContactsQueryData,
69
+ CompaniesListCompanyManagerContactsQueryError
70
+ > {
71
+ const client = useGreenSecurityContext();
72
+ return useQuery({
73
+ ...buildCompaniesListCompanyManagerContactsQuery(
74
+ client,
75
+ request,
76
+ options,
77
+ ),
78
+ ...options,
79
+ });
80
+ }
81
+
82
+ /**
83
+ * List the contact details of a company's managers
84
+ *
85
+ * @remarks
86
+ * List the active managers of a company who have an email address, so someone who belongs to that company can contact them. Readable by a vendor of the company, a manager of the company, or an admin; every other caller receives a 404. Carries only the fields needed to address a message, not the full company manager or user record. Distinct from `/companies/{company_id}/managers`, which is the administration listing and is gated on the `company_managers` view permission.
87
+ */
88
+ export function useCompaniesListCompanyManagerContactsSuspense(
89
+ request: operations.ListCompanyManagerContactsRequest,
90
+ options?: SuspenseQueryHookOptions<
91
+ CompaniesListCompanyManagerContactsQueryData,
92
+ CompaniesListCompanyManagerContactsQueryError
93
+ >,
94
+ ): UseSuspenseQueryResult<
95
+ CompaniesListCompanyManagerContactsQueryData,
96
+ CompaniesListCompanyManagerContactsQueryError
97
+ > {
98
+ const client = useGreenSecurityContext();
99
+ return useSuspenseQuery({
100
+ ...buildCompaniesListCompanyManagerContactsQuery(
101
+ client,
102
+ request,
103
+ options,
104
+ ),
105
+ ...options,
106
+ });
107
+ }
108
+
109
+ export function setCompaniesListCompanyManagerContactsData(
110
+ client: QueryClient,
111
+ queryKeyBase: [companyId: number],
112
+ data: CompaniesListCompanyManagerContactsQueryData,
113
+ ): CompaniesListCompanyManagerContactsQueryData | undefined {
114
+ const key = queryKeyCompaniesListCompanyManagerContacts(...queryKeyBase);
115
+
116
+ return client.setQueryData<CompaniesListCompanyManagerContactsQueryData>(
117
+ key,
118
+ data,
119
+ );
120
+ }
121
+
122
+ export function invalidateCompaniesListCompanyManagerContacts(
123
+ client: QueryClient,
124
+ queryKeyBase: TupleToPrefixes<[companyId: number]>,
125
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
126
+ ): Promise<void> {
127
+ return client.invalidateQueries({
128
+ ...filters,
129
+ queryKey: [
130
+ "@greensecurity/javascript-sdk",
131
+ "companies",
132
+ "listCompanyManagerContacts",
133
+ ...queryKeyBase,
134
+ ],
135
+ });
136
+ }
137
+
138
+ export function invalidateAllCompaniesListCompanyManagerContacts(
139
+ client: QueryClient,
140
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
141
+ ): Promise<void> {
142
+ return client.invalidateQueries({
143
+ ...filters,
144
+ queryKey: [
145
+ "@greensecurity/javascript-sdk",
146
+ "companies",
147
+ "listCompanyManagerContacts",
148
+ ],
149
+ });
150
+ }
@@ -11,6 +11,7 @@ export * from "./companiesAddCompanyManager.js";
11
11
  export * from "./companiesGetCompany.js";
12
12
  export * from "./companiesListCompanyCredentials.js";
13
13
  export * from "./companiesListCompanyCredits.js";
14
+ export * from "./companiesListCompanyManagerContacts.js";
14
15
  export * from "./companiesListCompanyManagers.js";
15
16
  export * from "./companiesListOrSearchCompanies.js";
16
17
  export * from "./companiesLookupCompanies.js";
@@ -43,6 +44,7 @@ export * from "./invoicesListInvoices.js";
43
44
  export * from "./invoicesMakePayment.js";
44
45
  export * from "./invoicesUpdateInvoice.js";
45
46
  export * from "./lookupsListLookupSystems.js";
47
+ export * from "./lookupsLookupPostalCode.js";
46
48
  export * from "./medicalProductsCreateDistributor.js";
47
49
  export * from "./medicalProductsCreateManufacturer.js";
48
50
  export * from "./medicalProductsCreateMedicalProduct.js";
@@ -0,0 +1,82 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ QueryClient,
7
+ QueryFunctionContext,
8
+ QueryKey,
9
+ } from "@tanstack/react-query";
10
+ import { GreenSecurityCore } from "../core.js";
11
+ import { lookupsLookupPostalCode } from "../funcs/lookupsLookupPostalCode.js";
12
+ import { combineSignals } from "../lib/primitives.js";
13
+ import { RequestOptions } from "../lib/sdks.js";
14
+ import * as operations from "../models/operations/index.js";
15
+ import { unwrapAsync } from "../types/fp.js";
16
+ export type LookupsLookupPostalCodeQueryData =
17
+ operations.LookupPostalCodeLookupPostalCodeOk;
18
+
19
+ export function prefetchLookupsLookupPostalCode(
20
+ queryClient: QueryClient,
21
+ client$: GreenSecurityCore,
22
+ request: operations.LookupPostalCodeRequest,
23
+ options?: RequestOptions,
24
+ ): Promise<void> {
25
+ return queryClient.prefetchQuery({
26
+ ...buildLookupsLookupPostalCodeQuery(
27
+ client$,
28
+ request,
29
+ options,
30
+ ),
31
+ });
32
+ }
33
+
34
+ export function buildLookupsLookupPostalCodeQuery(
35
+ client$: GreenSecurityCore,
36
+ request: operations.LookupPostalCodeRequest,
37
+ options?: RequestOptions,
38
+ ): {
39
+ queryKey: QueryKey;
40
+ queryFn: (
41
+ context: QueryFunctionContext,
42
+ ) => Promise<LookupsLookupPostalCodeQueryData>;
43
+ } {
44
+ return {
45
+ queryKey: queryKeyLookupsLookupPostalCode({
46
+ postalCode: request.postalCode,
47
+ state: request.state,
48
+ country: request.country,
49
+ }),
50
+ queryFn: async function lookupsLookupPostalCodeQueryFn(
51
+ ctx,
52
+ ): Promise<LookupsLookupPostalCodeQueryData> {
53
+ const sig = combineSignals(
54
+ ctx.signal,
55
+ options?.signal,
56
+ options?.fetchOptions?.signal,
57
+ );
58
+ const mergedOptions = {
59
+ ...options?.fetchOptions,
60
+ ...options,
61
+ signal: sig,
62
+ };
63
+
64
+ return unwrapAsync(lookupsLookupPostalCode(
65
+ client$,
66
+ request,
67
+ mergedOptions,
68
+ ));
69
+ },
70
+ };
71
+ }
72
+
73
+ export function queryKeyLookupsLookupPostalCode(
74
+ parameters: { postalCode: string; state: string; country: string },
75
+ ): QueryKey {
76
+ return [
77
+ "@greensecurity/javascript-sdk",
78
+ "lookups",
79
+ "lookupPostalCode",
80
+ parameters,
81
+ ];
82
+ }
@@ -0,0 +1,177 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ InvalidateQueryFilters,
7
+ QueryClient,
8
+ useQuery,
9
+ UseQueryResult,
10
+ useSuspenseQuery,
11
+ UseSuspenseQueryResult,
12
+ } from "@tanstack/react-query";
13
+ import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { useGreenSecurityContext } from "./_context.js";
26
+ import {
27
+ QueryHookOptions,
28
+ SuspenseQueryHookOptions,
29
+ TupleToPrefixes,
30
+ } from "./_types.js";
31
+ import {
32
+ buildLookupsLookupPostalCodeQuery,
33
+ LookupsLookupPostalCodeQueryData,
34
+ prefetchLookupsLookupPostalCode,
35
+ queryKeyLookupsLookupPostalCode,
36
+ } from "./lookupsLookupPostalCode.core.js";
37
+ export {
38
+ buildLookupsLookupPostalCodeQuery,
39
+ type LookupsLookupPostalCodeQueryData,
40
+ prefetchLookupsLookupPostalCode,
41
+ queryKeyLookupsLookupPostalCode,
42
+ };
43
+
44
+ export type LookupsLookupPostalCodeQueryError =
45
+ | errors.ApiErrorResponse
46
+ | GreenSecurityError
47
+ | ResponseValidationError
48
+ | ConnectionError
49
+ | RequestAbortedError
50
+ | RequestTimeoutError
51
+ | InvalidRequestError
52
+ | UnexpectedClientError
53
+ | SDKValidationError;
54
+
55
+ /**
56
+ * Check a postal code against a state and country
57
+ *
58
+ * @remarks
59
+ * Cross-checks a postal code against a state/province and country, the same check
60
+ * every write path that stores a US or Canadian address enforces server-side (e.g.
61
+ * `PUT /users/{id}`, `PUT /vendors/{vendor_id_or_me}`). Useful for validating an
62
+ * address before submitting it elsewhere.
63
+ *
64
+ * `status` is one of:
65
+ * - `ok` — the postal code belongs to the given state/province.
66
+ * - `invalid` — the postal code is not shaped like a real one for the given country.
67
+ * - `mismatch` — the postal code is well-formed but belongs to a different state or
68
+ * province. `expected_states` names the state(s) it actually maps to.
69
+ * - `unknown` — nothing to check against (an unsupported country, or a postal code
70
+ * absent from the US ZIP dataset). Treated as acceptable by every write path that
71
+ * uses this check.
72
+ *
73
+ * Only the US and Canada have a real code-to-subdivision map; every other country
74
+ * always returns `unknown`.
75
+ */
76
+ export function useLookupsLookupPostalCode(
77
+ request: operations.LookupPostalCodeRequest,
78
+ options?: QueryHookOptions<
79
+ LookupsLookupPostalCodeQueryData,
80
+ LookupsLookupPostalCodeQueryError
81
+ >,
82
+ ): UseQueryResult<
83
+ LookupsLookupPostalCodeQueryData,
84
+ LookupsLookupPostalCodeQueryError
85
+ > {
86
+ const client = useGreenSecurityContext();
87
+ return useQuery({
88
+ ...buildLookupsLookupPostalCodeQuery(
89
+ client,
90
+ request,
91
+ options,
92
+ ),
93
+ ...options,
94
+ });
95
+ }
96
+
97
+ /**
98
+ * Check a postal code against a state and country
99
+ *
100
+ * @remarks
101
+ * Cross-checks a postal code against a state/province and country, the same check
102
+ * every write path that stores a US or Canadian address enforces server-side (e.g.
103
+ * `PUT /users/{id}`, `PUT /vendors/{vendor_id_or_me}`). Useful for validating an
104
+ * address before submitting it elsewhere.
105
+ *
106
+ * `status` is one of:
107
+ * - `ok` — the postal code belongs to the given state/province.
108
+ * - `invalid` — the postal code is not shaped like a real one for the given country.
109
+ * - `mismatch` — the postal code is well-formed but belongs to a different state or
110
+ * province. `expected_states` names the state(s) it actually maps to.
111
+ * - `unknown` — nothing to check against (an unsupported country, or a postal code
112
+ * absent from the US ZIP dataset). Treated as acceptable by every write path that
113
+ * uses this check.
114
+ *
115
+ * Only the US and Canada have a real code-to-subdivision map; every other country
116
+ * always returns `unknown`.
117
+ */
118
+ export function useLookupsLookupPostalCodeSuspense(
119
+ request: operations.LookupPostalCodeRequest,
120
+ options?: SuspenseQueryHookOptions<
121
+ LookupsLookupPostalCodeQueryData,
122
+ LookupsLookupPostalCodeQueryError
123
+ >,
124
+ ): UseSuspenseQueryResult<
125
+ LookupsLookupPostalCodeQueryData,
126
+ LookupsLookupPostalCodeQueryError
127
+ > {
128
+ const client = useGreenSecurityContext();
129
+ return useSuspenseQuery({
130
+ ...buildLookupsLookupPostalCodeQuery(
131
+ client,
132
+ request,
133
+ options,
134
+ ),
135
+ ...options,
136
+ });
137
+ }
138
+
139
+ export function setLookupsLookupPostalCodeData(
140
+ client: QueryClient,
141
+ queryKeyBase: [
142
+ parameters: { postalCode: string; state: string; country: string },
143
+ ],
144
+ data: LookupsLookupPostalCodeQueryData,
145
+ ): LookupsLookupPostalCodeQueryData | undefined {
146
+ const key = queryKeyLookupsLookupPostalCode(...queryKeyBase);
147
+
148
+ return client.setQueryData<LookupsLookupPostalCodeQueryData>(key, data);
149
+ }
150
+
151
+ export function invalidateLookupsLookupPostalCode(
152
+ client: QueryClient,
153
+ queryKeyBase: TupleToPrefixes<
154
+ [parameters: { postalCode: string; state: string; country: string }]
155
+ >,
156
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
157
+ ): Promise<void> {
158
+ return client.invalidateQueries({
159
+ ...filters,
160
+ queryKey: [
161
+ "@greensecurity/javascript-sdk",
162
+ "lookups",
163
+ "lookupPostalCode",
164
+ ...queryKeyBase,
165
+ ],
166
+ });
167
+ }
168
+
169
+ export function invalidateAllLookupsLookupPostalCode(
170
+ client: QueryClient,
171
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
172
+ ): Promise<void> {
173
+ return client.invalidateQueries({
174
+ ...filters,
175
+ queryKey: ["@greensecurity/javascript-sdk", "lookups", "lookupPostalCode"],
176
+ });
177
+ }
@@ -56,6 +56,12 @@ export type UsersUpdateUserMutationError =
56
56
  * Only submitted fields are applied — unrecognised fields are silently ignored.
57
57
  * Changing `email` automatically resets `bounced_email` to `false`.
58
58
  *
59
+ * Submitting `zip`, `state`, or `country` cross-checks the postal code against the
60
+ * resulting state/country (using the existing value for any of the three left out
61
+ * of the request). A code that is not shaped like a real postal code, or that
62
+ * provably belongs to a different state, is rejected with `422` naming the correct
63
+ * state.
64
+ *
59
65
  * Each subkey of `email_preferences` is independently optional; sending
60
66
  * `{ "email_preferences": { "send_weekly_summary_email": true } }` flips
61
67
  * only that flag and leaves the others unchanged.
@@ -55,6 +55,10 @@ export type VendorsCreateVendorMutationError =
55
55
  * `company_id` is optional for company managers — it defaults to their own company.
56
56
  * All other callers must provide `company_id`. The caller must have access to the
57
57
  * specified company (verified via scoped access policy) and the `vendors:add` permission.
58
+ *
59
+ * `zip` is cross-checked against `state`: a code that is not shaped like a real postal
60
+ * code, or that provably belongs to a different state, is rejected with `422` naming
61
+ * the correct state.
58
62
  */
59
63
  export function useVendorsCreateVendorMutation(
60
64
  options?: MutationHookOptions<
@@ -56,7 +56,15 @@ export type VendorsUpdateVendorDetailsMutationError =
56
56
  * From `location` this endpoint reads only `timezone`, `address1`, `address2`,
57
57
  * `city`, `state`, `zip`, `phone`, `mobile_phone` and `fax`. The `address` and
58
58
  * `country` properties of the shared `UserLocation` schema are ignored here and
59
- * updating them is not supported.
59
+ * updating them is not supported. `state` accepts a US state or a Canadian
60
+ * province — the vendor's country, set only at registration, is not editable
61
+ * through this endpoint.
62
+ *
63
+ * Submitting `location.zip` or `location.state` cross-checks the postal code
64
+ * against the resulting state (using the vendor's existing value for whichever
65
+ * of the two is left out of the request). A code that is not shaped like a real
66
+ * postal code, or that provably belongs to a different state, is rejected with
67
+ * `422` naming the correct state.
60
68
  *
61
69
  * For `title`, the `supervisor` fields, and every `location` field except
62
70
  * `timezone`, the value sent is the value stored: omit a field to leave it
@@ -6,6 +6,7 @@ import { companiesAddCompanyManager } from "../funcs/companiesAddCompanyManager.
6
6
  import { companiesGetCompany } from "../funcs/companiesGetCompany.js";
7
7
  import { companiesListCompanyCredentials } from "../funcs/companiesListCompanyCredentials.js";
8
8
  import { companiesListCompanyCredits } from "../funcs/companiesListCompanyCredits.js";
9
+ import { companiesListCompanyManagerContacts } from "../funcs/companiesListCompanyManagerContacts.js";
9
10
  import { companiesListCompanyManagers } from "../funcs/companiesListCompanyManagers.js";
10
11
  import { companiesListOrSearchCompanies } from "../funcs/companiesListOrSearchCompanies.js";
11
12
  import { companiesLookupCompanies } from "../funcs/companiesLookupCompanies.js";
@@ -152,4 +153,23 @@ export class Companies extends ClientSDK {
152
153
  options,
153
154
  ));
154
155
  }
156
+
157
+ /**
158
+ * List the contact details of a company's managers
159
+ *
160
+ * @remarks
161
+ * List the active managers of a company who have an email address, so someone who belongs to that company can contact them. Readable by a vendor of the company, a manager of the company, or an admin; every other caller receives a 404. Carries only the fields needed to address a message, not the full company manager or user record. Distinct from `/companies/{company_id}/managers`, which is the administration listing and is gated on the `company_managers` view permission.
162
+ */
163
+ async listCompanyManagerContacts(
164
+ request: operations.ListCompanyManagerContactsRequest,
165
+ options?: RequestOptions,
166
+ ): Promise<
167
+ operations.ListCompanyManagerContactsListCompanyManagerContactsOk
168
+ > {
169
+ return unwrapAsync(companiesListCompanyManagerContacts(
170
+ this,
171
+ request,
172
+ options,
173
+ ));
174
+ }
155
175
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import { lookupsListLookupSystems } from "../funcs/lookupsListLookupSystems.js";
6
+ import { lookupsLookupPostalCode } from "../funcs/lookupsLookupPostalCode.js";
6
7
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
8
  import * as operations from "../models/operations/index.js";
8
9
  import { unwrapAsync } from "../types/fp.js";
@@ -31,4 +32,36 @@ export class Lookups extends ClientSDK {
31
32
  options,
32
33
  ));
33
34
  }
35
+
36
+ /**
37
+ * Check a postal code against a state and country
38
+ *
39
+ * @remarks
40
+ * Cross-checks a postal code against a state/province and country, the same check
41
+ * every write path that stores a US or Canadian address enforces server-side (e.g.
42
+ * `PUT /users/{id}`, `PUT /vendors/{vendor_id_or_me}`). Useful for validating an
43
+ * address before submitting it elsewhere.
44
+ *
45
+ * `status` is one of:
46
+ * - `ok` — the postal code belongs to the given state/province.
47
+ * - `invalid` — the postal code is not shaped like a real one for the given country.
48
+ * - `mismatch` — the postal code is well-formed but belongs to a different state or
49
+ * province. `expected_states` names the state(s) it actually maps to.
50
+ * - `unknown` — nothing to check against (an unsupported country, or a postal code
51
+ * absent from the US ZIP dataset). Treated as acceptable by every write path that
52
+ * uses this check.
53
+ *
54
+ * Only the US and Canada have a real code-to-subdivision map; every other country
55
+ * always returns `unknown`.
56
+ */
57
+ async lookupPostalCode(
58
+ request: operations.LookupPostalCodeRequest,
59
+ options?: RequestOptions,
60
+ ): Promise<operations.LookupPostalCodeLookupPostalCodeOk> {
61
+ return unwrapAsync(lookupsLookupPostalCode(
62
+ this,
63
+ request,
64
+ options,
65
+ ));
66
+ }
34
67
  }
package/src/sdk/users.ts CHANGED
@@ -85,6 +85,12 @@ export class Users extends ClientSDK {
85
85
  * Only submitted fields are applied — unrecognised fields are silently ignored.
86
86
  * Changing `email` automatically resets `bounced_email` to `false`.
87
87
  *
88
+ * Submitting `zip`, `state`, or `country` cross-checks the postal code against the
89
+ * resulting state/country (using the existing value for any of the three left out
90
+ * of the request). A code that is not shaped like a real postal code, or that
91
+ * provably belongs to a different state, is rejected with `422` naming the correct
92
+ * state.
93
+ *
88
94
  * Each subkey of `email_preferences` is independently optional; sending
89
95
  * `{ "email_preferences": { "send_weekly_summary_email": true } }` flips
90
96
  * only that flag and leaves the others unchanged.
@@ -132,6 +132,10 @@ export class Vendors extends ClientSDK {
132
132
  * `company_id` is optional for company managers — it defaults to their own company.
133
133
  * All other callers must provide `company_id`. The caller must have access to the
134
134
  * specified company (verified via scoped access policy) and the `vendors:add` permission.
135
+ *
136
+ * `zip` is cross-checked against `state`: a code that is not shaped like a real postal
137
+ * code, or that provably belongs to a different state, is rejected with `422` naming
138
+ * the correct state.
135
139
  */
136
140
  async createVendor(
137
141
  request: operations.CreateVendorRequestBody,
@@ -880,7 +884,15 @@ export class Vendors extends ClientSDK {
880
884
  * From `location` this endpoint reads only `timezone`, `address1`, `address2`,
881
885
  * `city`, `state`, `zip`, `phone`, `mobile_phone` and `fax`. The `address` and
882
886
  * `country` properties of the shared `UserLocation` schema are ignored here and
883
- * updating them is not supported.
887
+ * updating them is not supported. `state` accepts a US state or a Canadian
888
+ * province — the vendor's country, set only at registration, is not editable
889
+ * through this endpoint.
890
+ *
891
+ * Submitting `location.zip` or `location.state` cross-checks the postal code
892
+ * against the resulting state (using the vendor's existing value for whichever
893
+ * of the two is left out of the request). A code that is not shaped like a real
894
+ * postal code, or that provably belongs to a different state, is rejected with
895
+ * `422` naming the correct state.
884
896
  *
885
897
  * For `title`, the `supervisor` fields, and every `location` field except
886
898
  * `timezone`, the value sent is the value stored: omit a field to leave it