@greensecurity/javascript-sdk 0.19.0 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/REACT_QUERY.md +15 -15
  2. package/README.md +93 -9
  3. package/bin/mcp-server.js +1734 -271
  4. package/bin/mcp-server.js.map +50 -26
  5. package/funcs/organizationsListOrSearchFacilities.d.ts +2 -1
  6. package/funcs/organizationsListOrSearchFacilities.d.ts.map +1 -1
  7. package/funcs/organizationsListOrSearchFacilities.js +3 -2
  8. package/funcs/organizationsListOrSearchFacilities.js.map +1 -1
  9. package/funcs/vendorScansVendorScanOut.d.ts +17 -0
  10. package/funcs/vendorScansVendorScanOut.d.ts.map +1 -0
  11. package/funcs/vendorScansVendorScanOut.js +120 -0
  12. package/funcs/vendorScansVendorScanOut.js.map +1 -0
  13. package/funcs/vendorsGetVendorsDetails.d.ts +32 -0
  14. package/funcs/vendorsGetVendorsDetails.d.ts.map +1 -0
  15. package/funcs/vendorsGetVendorsDetails.js +139 -0
  16. package/funcs/vendorsGetVendorsDetails.js.map +1 -0
  17. package/funcs/vendorsListVendorCredentials.d.ts +4 -1
  18. package/funcs/vendorsListVendorCredentials.d.ts.map +1 -1
  19. package/funcs/vendorsListVendorCredentials.js +46 -6
  20. package/funcs/vendorsListVendorCredentials.js.map +1 -1
  21. package/funcs/vendorsListVendorFacilityStatuses.d.ts +1 -1
  22. package/funcs/vendorsListVendorFacilityStatuses.d.ts.map +1 -1
  23. package/funcs/vendorsListVendorFacilityStatuses.js +3 -2
  24. package/funcs/vendorsListVendorFacilityStatuses.js.map +1 -1
  25. package/funcs/vendorsListVendorJobTitles.d.ts +1 -1
  26. package/funcs/vendorsListVendorJobTitles.d.ts.map +1 -1
  27. package/funcs/vendorsListVendorJobTitles.js +21 -6
  28. package/funcs/vendorsListVendorJobTitles.js.map +1 -1
  29. package/funcs/vendorsListVendorScrubDetails.d.ts +18 -0
  30. package/funcs/vendorsListVendorScrubDetails.d.ts.map +1 -0
  31. package/funcs/vendorsListVendorScrubDetails.js +121 -0
  32. package/funcs/vendorsListVendorScrubDetails.js.map +1 -0
  33. package/funcs/vendorsListVendorScrubPurchases.d.ts +20 -0
  34. package/funcs/vendorsListVendorScrubPurchases.d.ts.map +1 -0
  35. package/funcs/vendorsListVendorScrubPurchases.js +160 -0
  36. package/funcs/vendorsListVendorScrubPurchases.js.map +1 -0
  37. package/funcs/webhooksGetWebhookEndpoint.d.ts +18 -0
  38. package/funcs/webhooksGetWebhookEndpoint.d.ts.map +1 -0
  39. package/funcs/webhooksGetWebhookEndpoint.js +121 -0
  40. package/funcs/webhooksGetWebhookEndpoint.js.map +1 -0
  41. package/funcs/webhooksListAllWebhookEndpoints.d.ts +17 -0
  42. package/funcs/webhooksListAllWebhookEndpoints.d.ts.map +1 -0
  43. package/funcs/webhooksListAllWebhookEndpoints.js +121 -0
  44. package/funcs/webhooksListAllWebhookEndpoints.js.map +1 -0
  45. package/jsr.json +1 -1
  46. package/lib/config.d.ts +3 -3
  47. package/lib/config.js +3 -3
  48. package/lib/security.d.ts +4 -3
  49. package/lib/security.d.ts.map +1 -1
  50. package/lib/security.js +6 -1
  51. package/lib/security.js.map +1 -1
  52. package/mcp-server/extensions.d.ts +2 -0
  53. package/mcp-server/extensions.d.ts.map +1 -1
  54. package/mcp-server/mcp-server.js +1 -1
  55. package/mcp-server/prompts.d.ts +26 -0
  56. package/mcp-server/prompts.d.ts.map +1 -0
  57. package/mcp-server/prompts.js +47 -0
  58. package/mcp-server/prompts.js.map +1 -0
  59. package/mcp-server/resources.d.ts.map +1 -1
  60. package/mcp-server/resources.js +1 -0
  61. package/mcp-server/resources.js.map +1 -1
  62. package/mcp-server/server.d.ts.map +1 -1
  63. package/mcp-server/server.js +16 -4
  64. package/mcp-server/server.js.map +1 -1
  65. package/mcp-server/tools/vendorScansVendorScanOut.d.ts +8 -0
  66. package/mcp-server/tools/vendorScansVendorScanOut.d.ts.map +1 -0
  67. package/mcp-server/tools/{userPasswordResetRequest.js → vendorScansVendorScanOut.js} +9 -9
  68. package/mcp-server/tools/{userPasswordResetRequest.js.map → vendorScansVendorScanOut.js.map} +1 -1
  69. package/mcp-server/tools/vendorsGetVendorsDetails.d.ts +8 -0
  70. package/mcp-server/tools/vendorsGetVendorsDetails.d.ts.map +1 -0
  71. package/mcp-server/tools/vendorsGetVendorsDetails.js +78 -0
  72. package/mcp-server/tools/vendorsGetVendorsDetails.js.map +1 -0
  73. package/mcp-server/tools/vendorsListVendorCredentials.js +1 -1
  74. package/mcp-server/tools/vendorsListVendorCredentials.js.map +1 -1
  75. package/mcp-server/tools/vendorsListVendorScrubDetails.d.ts +8 -0
  76. package/mcp-server/tools/vendorsListVendorScrubDetails.d.ts.map +1 -0
  77. package/mcp-server/tools/{userGetUserById.js → vendorsListVendorScrubDetails.js} +9 -9
  78. package/mcp-server/tools/vendorsListVendorScrubDetails.js.map +1 -0
  79. package/mcp-server/tools/vendorsListVendorScrubPurchases.d.ts +8 -0
  80. package/mcp-server/tools/vendorsListVendorScrubPurchases.d.ts.map +1 -0
  81. package/mcp-server/tools/{userPassword.js → vendorsListVendorScrubPurchases.js} +10 -11
  82. package/mcp-server/tools/vendorsListVendorScrubPurchases.js.map +1 -0
  83. package/mcp-server/tools/webhooksGetWebhookEndpoint.d.ts +8 -0
  84. package/mcp-server/tools/webhooksGetWebhookEndpoint.d.ts.map +1 -0
  85. package/mcp-server/tools/{vendorsListVendorJobTitles.js → webhooksGetWebhookEndpoint.js} +10 -10
  86. package/mcp-server/tools/webhooksGetWebhookEndpoint.js.map +1 -0
  87. package/mcp-server/tools/webhooksListAllWebhookEndpoints.d.ts +8 -0
  88. package/mcp-server/tools/webhooksListAllWebhookEndpoints.d.ts.map +1 -0
  89. package/mcp-server/tools/{userMagiclink.js → webhooksListAllWebhookEndpoints.js} +9 -9
  90. package/mcp-server/tools/webhooksListAllWebhookEndpoints.js.map +1 -0
  91. package/mcp-server/tools.d.ts.map +1 -1
  92. package/mcp-server/tools.js +1 -0
  93. package/mcp-server/tools.js.map +1 -1
  94. package/models/components/company.d.ts +15 -15
  95. package/models/components/company.d.ts.map +1 -1
  96. package/models/components/company.js +19 -18
  97. package/models/components/company.js.map +1 -1
  98. package/models/components/contact.d.ts +13 -13
  99. package/models/components/contact.d.ts.map +1 -1
  100. package/models/components/contact.js +16 -16
  101. package/models/components/contact.js.map +1 -1
  102. package/models/components/department.d.ts +34 -0
  103. package/models/components/department.d.ts.map +1 -0
  104. package/models/components/department.js +71 -0
  105. package/models/components/department.js.map +1 -0
  106. package/models/components/expand.d.ts +24 -0
  107. package/models/components/expand.d.ts.map +1 -1
  108. package/models/components/expand.js +8 -0
  109. package/models/components/expand.js.map +1 -1
  110. package/models/components/facility.d.ts +17 -17
  111. package/models/components/facility.d.ts.map +1 -1
  112. package/models/components/facility.js +20 -20
  113. package/models/components/facility.js.map +1 -1
  114. package/models/components/index.d.ts +7 -0
  115. package/models/components/index.d.ts.map +1 -1
  116. package/models/components/index.js +7 -0
  117. package/models/components/index.js.map +1 -1
  118. package/models/components/scantype.d.ts +31 -0
  119. package/models/components/scantype.d.ts.map +1 -0
  120. package/models/components/scantype.js +62 -0
  121. package/models/components/scantype.js.map +1 -0
  122. package/models/components/subscription.d.ts +42 -0
  123. package/models/components/subscription.d.ts.map +1 -0
  124. package/models/components/subscription.js +92 -0
  125. package/models/components/subscription.js.map +1 -0
  126. package/models/components/user.d.ts +8 -25
  127. package/models/components/user.d.ts.map +1 -1
  128. package/models/components/user.js +8 -31
  129. package/models/components/user.js.map +1 -1
  130. package/models/components/vendor.d.ts +374 -0
  131. package/models/components/vendor.d.ts.map +1 -0
  132. package/models/components/vendor.js +523 -0
  133. package/models/components/vendor.js.map +1 -0
  134. package/models/components/vendorscrubdetails.d.ts +42 -0
  135. package/models/components/vendorscrubdetails.d.ts.map +1 -0
  136. package/models/components/vendorscrubdetails.js +98 -0
  137. package/models/components/vendorscrubdetails.js.map +1 -0
  138. package/models/components/vendorscrubpurchase.d.ts +38 -0
  139. package/models/components/vendorscrubpurchase.d.ts.map +1 -0
  140. package/models/components/vendorscrubpurchase.js +84 -0
  141. package/models/components/vendorscrubpurchase.js.map +1 -0
  142. package/models/components/webhookendpoint.d.ts +135 -0
  143. package/models/components/webhookendpoint.d.ts.map +1 -0
  144. package/models/components/webhookendpoint.js +158 -0
  145. package/models/components/webhookendpoint.js.map +1 -0
  146. package/models/operations/getvendorsdetails.d.ts +38 -0
  147. package/models/operations/getvendorsdetails.d.ts.map +1 -0
  148. package/models/operations/getvendorsdetails.js +81 -0
  149. package/models/operations/getvendorsdetails.js.map +1 -0
  150. package/models/operations/getwebhookendpoint.d.ts +32 -0
  151. package/models/operations/getwebhookendpoint.d.ts.map +1 -0
  152. package/models/operations/getwebhookendpoint.js +69 -0
  153. package/models/operations/getwebhookendpoint.js.map +1 -0
  154. package/models/operations/index.d.ts +6 -0
  155. package/models/operations/index.d.ts.map +1 -1
  156. package/models/operations/index.js +6 -0
  157. package/models/operations/index.js.map +1 -1
  158. package/models/operations/listallwebhookendpoints.d.ts +81 -0
  159. package/models/operations/listallwebhookendpoints.d.ts.map +1 -0
  160. package/models/operations/listallwebhookendpoints.js +114 -0
  161. package/models/operations/listallwebhookendpoints.js.map +1 -0
  162. package/models/operations/listorsearchfacilities.d.ts +2 -2
  163. package/models/operations/listorsearchfacilities.d.ts.map +1 -1
  164. package/models/operations/listorsearchfacilities.js +2 -2
  165. package/models/operations/listorsearchfacilities.js.map +1 -1
  166. package/models/operations/listvendorcredentials.d.ts +77 -5
  167. package/models/operations/listvendorcredentials.d.ts.map +1 -1
  168. package/models/operations/listvendorcredentials.js +78 -3
  169. package/models/operations/listvendorcredentials.js.map +1 -1
  170. package/models/operations/listvendorfacilitystatuses.d.ts +5 -0
  171. package/models/operations/listvendorfacilitystatuses.d.ts.map +1 -1
  172. package/models/operations/listvendorfacilitystatuses.js +4 -0
  173. package/models/operations/listvendorfacilitystatuses.js.map +1 -1
  174. package/models/operations/listvendorjobtitles.d.ts +27 -0
  175. package/models/operations/listvendorjobtitles.d.ts.map +1 -1
  176. package/models/operations/listvendorjobtitles.js +38 -1
  177. package/models/operations/listvendorjobtitles.js.map +1 -1
  178. package/models/operations/listvendorscrubdetails.d.ts +32 -0
  179. package/models/operations/listvendorscrubdetails.d.ts.map +1 -0
  180. package/models/operations/listvendorscrubdetails.js +78 -0
  181. package/models/operations/listvendorscrubdetails.js.map +1 -0
  182. package/models/operations/listvendorscrubpurchases.d.ts +111 -0
  183. package/models/operations/listvendorscrubpurchases.d.ts.map +1 -0
  184. package/models/operations/listvendorscrubpurchases.js +153 -0
  185. package/models/operations/listvendorscrubpurchases.js.map +1 -0
  186. package/models/operations/vendorscanout.d.ts +64 -0
  187. package/models/operations/vendorscanout.d.ts.map +1 -0
  188. package/models/operations/vendorscanout.js +100 -0
  189. package/models/operations/vendorscanout.js.map +1 -0
  190. package/package.json +1 -1
  191. package/react-query/index.d.ts +6 -0
  192. package/react-query/index.d.ts.map +1 -1
  193. package/react-query/index.js +6 -0
  194. package/react-query/index.js.map +1 -1
  195. package/react-query/vendorScansVendorScanOut.d.ts +23 -0
  196. package/react-query/vendorScansVendorScanOut.d.ts.map +1 -0
  197. package/react-query/vendorScansVendorScanOut.js +47 -0
  198. package/react-query/vendorScansVendorScanOut.js.map +1 -0
  199. package/react-query/vendorsGetVendorsDetails.d.ts +71 -0
  200. package/react-query/vendorsGetVendorsDetails.d.ts.map +1 -0
  201. package/react-query/vendorsGetVendorsDetails.js +123 -0
  202. package/react-query/vendorsGetVendorsDetails.js.map +1 -0
  203. package/react-query/vendorsListVendorCredentials.d.ts +40 -3
  204. package/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
  205. package/react-query/vendorsListVendorCredentials.js +67 -0
  206. package/react-query/vendorsListVendorCredentials.js.map +1 -1
  207. package/react-query/vendorsListVendorFacilityStatuses.d.ts +3 -0
  208. package/react-query/vendorsListVendorFacilityStatuses.d.ts.map +1 -1
  209. package/react-query/vendorsListVendorFacilityStatuses.js +2 -0
  210. package/react-query/vendorsListVendorFacilityStatuses.js.map +1 -1
  211. package/react-query/vendorsListVendorJobTitles.d.ts +7 -7
  212. package/react-query/vendorsListVendorJobTitles.d.ts.map +1 -1
  213. package/react-query/vendorsListVendorJobTitles.js +15 -15
  214. package/react-query/vendorsListVendorJobTitles.js.map +1 -1
  215. package/react-query/vendorsListVendorScrubDetails.d.ts +31 -0
  216. package/react-query/vendorsListVendorScrubDetails.d.ts.map +1 -0
  217. package/react-query/vendorsListVendorScrubDetails.js +96 -0
  218. package/react-query/vendorsListVendorScrubDetails.js.map +1 -0
  219. package/react-query/vendorsListVendorScrubPurchases.d.ts +77 -0
  220. package/react-query/vendorsListVendorScrubPurchases.d.ts.map +1 -0
  221. package/react-query/vendorsListVendorScrubPurchases.js +160 -0
  222. package/react-query/vendorsListVendorScrubPurchases.js.map +1 -0
  223. package/react-query/webhooksGetWebhookEndpoint.d.ts +31 -0
  224. package/react-query/webhooksGetWebhookEndpoint.d.ts.map +1 -0
  225. package/react-query/webhooksGetWebhookEndpoint.js +96 -0
  226. package/react-query/webhooksGetWebhookEndpoint.js.map +1 -0
  227. package/react-query/webhooksListAllWebhookEndpoints.d.ts +50 -0
  228. package/react-query/webhooksListAllWebhookEndpoints.d.ts.map +1 -0
  229. package/react-query/webhooksListAllWebhookEndpoints.js +101 -0
  230. package/react-query/webhooksListAllWebhookEndpoints.js.map +1 -0
  231. package/sdk/sdk.d.ts +6 -0
  232. package/sdk/sdk.d.ts.map +1 -1
  233. package/sdk/sdk.js +8 -0
  234. package/sdk/sdk.js.map +1 -1
  235. package/sdk/vendors.d.ts +41 -2
  236. package/sdk/vendors.d.ts.map +1 -1
  237. package/sdk/vendors.js +47 -3
  238. package/sdk/vendors.js.map +1 -1
  239. package/sdk/vendorscans.d.ts +12 -0
  240. package/sdk/vendorscans.d.ts.map +1 -0
  241. package/sdk/vendorscans.js +22 -0
  242. package/sdk/vendorscans.js.map +1 -0
  243. package/sdk/webhooks.d.ts +20 -0
  244. package/sdk/webhooks.d.ts.map +1 -0
  245. package/sdk/webhooks.js +32 -0
  246. package/sdk/webhooks.js.map +1 -0
  247. package/src/__tests__/vendors.test.ts +50 -152
  248. package/src/__tests__/vendorscans.test.ts +27 -0
  249. package/src/__tests__/webhooks.test.ts +45 -0
  250. package/src/funcs/organizationsListOrSearchFacilities.ts +12 -1
  251. package/src/funcs/vendorScansVendorScanOut.ts +172 -0
  252. package/src/funcs/vendorsGetVendorsDetails.ts +192 -0
  253. package/src/funcs/vendorsListVendorCredentials.ts +104 -27
  254. package/src/funcs/vendorsListVendorFacilityStatuses.ts +7 -1
  255. package/src/funcs/vendorsListVendorJobTitles.ts +25 -2
  256. package/src/funcs/vendorsListVendorScrubDetails.ts +172 -0
  257. package/src/funcs/vendorsListVendorScrubPurchases.ts +249 -0
  258. package/src/funcs/webhooksGetWebhookEndpoint.ts +173 -0
  259. package/src/funcs/webhooksListAllWebhookEndpoints.ts +174 -0
  260. package/src/lib/config.ts +3 -3
  261. package/src/lib/security.ts +11 -3
  262. package/src/mcp-server/extensions.ts +4 -0
  263. package/src/mcp-server/mcp-server.ts +1 -1
  264. package/src/mcp-server/prompts.ts +110 -0
  265. package/src/mcp-server/resources.ts +1 -0
  266. package/src/mcp-server/server.ts +16 -4
  267. package/src/mcp-server/tools/vendorScansVendorScanOut.ts +37 -0
  268. package/src/mcp-server/tools/vendorsGetVendorsDetails.ts +51 -0
  269. package/src/mcp-server/tools/vendorsListVendorCredentials.ts +1 -1
  270. package/src/mcp-server/tools/vendorsListVendorScrubDetails.ts +37 -0
  271. package/src/mcp-server/tools/vendorsListVendorScrubPurchases.ts +38 -0
  272. package/src/mcp-server/tools/{vendorsListVendorJobTitles.ts → webhooksGetWebhookEndpoint.ts} +8 -8
  273. package/src/mcp-server/tools/webhooksListAllWebhookEndpoints.ts +38 -0
  274. package/src/mcp-server/tools.ts +1 -0
  275. package/src/models/components/company.ts +27 -24
  276. package/src/models/components/contact.ts +24 -20
  277. package/src/models/components/department.ts +69 -0
  278. package/src/models/components/expand.ts +8 -0
  279. package/src/models/components/facility.ts +28 -32
  280. package/src/models/components/index.ts +7 -0
  281. package/src/models/components/scantype.ts +32 -0
  282. package/src/models/components/subscription.ts +98 -0
  283. package/src/models/components/user.ts +19 -53
  284. package/src/models/components/vendor.ts +925 -0
  285. package/src/models/components/vendorscrubdetails.ts +108 -0
  286. package/src/models/components/vendorscrubpurchase.ts +90 -0
  287. package/src/models/components/webhookendpoint.ts +244 -0
  288. package/src/models/operations/getvendorsdetails.ts +86 -0
  289. package/src/models/operations/getwebhookendpoint.ts +69 -0
  290. package/src/models/operations/index.ts +6 -0
  291. package/src/models/operations/listallwebhookendpoints.ts +175 -0
  292. package/src/models/operations/listorsearchfacilities.ts +4 -4
  293. package/src/models/operations/listvendorcredentials.ts +160 -7
  294. package/src/models/operations/listvendorfacilitystatuses.ts +9 -0
  295. package/src/models/operations/listvendorjobtitles.ts +72 -0
  296. package/src/models/operations/listvendorscrubdetails.ts +80 -0
  297. package/src/models/operations/listvendorscrubpurchases.ts +252 -0
  298. package/src/models/operations/vendorscanout.ts +138 -0
  299. package/src/react-query/index.ts +6 -0
  300. package/src/react-query/vendorScansVendorScanOut.ts +89 -0
  301. package/src/react-query/vendorsGetVendorsDetails.ts +201 -0
  302. package/src/react-query/vendorsListVendorCredentials.ts +169 -1
  303. package/src/react-query/vendorsListVendorFacilityStatuses.ts +5 -0
  304. package/src/react-query/vendorsListVendorJobTitles.ts +15 -0
  305. package/src/react-query/vendorsListVendorScrubDetails.ts +166 -0
  306. package/src/react-query/vendorsListVendorScrubPurchases.ts +346 -0
  307. package/src/react-query/webhooksGetWebhookEndpoint.ts +163 -0
  308. package/src/react-query/webhooksListAllWebhookEndpoints.ts +193 -0
  309. package/src/sdk/sdk.ts +12 -0
  310. package/src/sdk/vendors.ts +76 -2
  311. package/src/sdk/vendorscans.ts +27 -0
  312. package/src/sdk/webhooks.ts +46 -0
  313. package/mcp-server/tools/userGetCurrentUser.d.ts +0 -3
  314. package/mcp-server/tools/userGetCurrentUser.d.ts.map +0 -1
  315. package/mcp-server/tools/userGetCurrentUser.js +0 -26
  316. package/mcp-server/tools/userGetCurrentUser.js.map +0 -1
  317. package/mcp-server/tools/userGetUserById.d.ts +0 -8
  318. package/mcp-server/tools/userGetUserById.d.ts.map +0 -1
  319. package/mcp-server/tools/userGetUserById.js.map +0 -1
  320. package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts +0 -8
  321. package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts.map +0 -1
  322. package/mcp-server/tools/userLogsUserIntoTheSystem.js +0 -94
  323. package/mcp-server/tools/userLogsUserIntoTheSystem.js.map +0 -1
  324. package/mcp-server/tools/userMagiclink.d.ts +0 -8
  325. package/mcp-server/tools/userMagiclink.d.ts.map +0 -1
  326. package/mcp-server/tools/userMagiclink.js.map +0 -1
  327. package/mcp-server/tools/userPassword.d.ts +0 -8
  328. package/mcp-server/tools/userPassword.d.ts.map +0 -1
  329. package/mcp-server/tools/userPassword.js.map +0 -1
  330. package/mcp-server/tools/userPasswordResetRequest.d.ts +0 -8
  331. package/mcp-server/tools/userPasswordResetRequest.d.ts.map +0 -1
  332. package/mcp-server/tools/vendorsListVendorJobTitles.d.ts +0 -8
  333. package/mcp-server/tools/vendorsListVendorJobTitles.d.ts.map +0 -1
  334. package/mcp-server/tools/vendorsListVendorJobTitles.js.map +0 -1
  335. package/src/__tests__/organizations.test.ts +0 -78
  336. package/src/__tests__/supportarticles.test.ts +0 -64
  337. package/src/__tests__/user.test.ts +0 -218
  338. package/vitest.config.ts +0 -8
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ /**
11
+ * A simplified representation of a Department, typically used in list views.
12
+ */
13
+ export type Department = {
14
+ id: number;
15
+ name: string;
16
+ };
17
+
18
+ /** @internal */
19
+ export const Department$inboundSchema: z.ZodType<
20
+ Department,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ id: z.number().int(),
25
+ name: z.string(),
26
+ });
27
+
28
+ /** @internal */
29
+ export type Department$Outbound = {
30
+ id: number;
31
+ name: string;
32
+ };
33
+
34
+ /** @internal */
35
+ export const Department$outboundSchema: z.ZodType<
36
+ Department$Outbound,
37
+ z.ZodTypeDef,
38
+ Department
39
+ > = z.object({
40
+ id: z.number().int(),
41
+ name: z.string(),
42
+ });
43
+
44
+ /**
45
+ * @internal
46
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
47
+ */
48
+ export namespace Department$ {
49
+ /** @deprecated use `Department$inboundSchema` instead. */
50
+ export const inboundSchema = Department$inboundSchema;
51
+ /** @deprecated use `Department$outboundSchema` instead. */
52
+ export const outboundSchema = Department$outboundSchema;
53
+ /** @deprecated use `Department$Outbound` instead. */
54
+ export type Outbound = Department$Outbound;
55
+ }
56
+
57
+ export function departmentToJSON(department: Department): string {
58
+ return JSON.stringify(Department$outboundSchema.parse(department));
59
+ }
60
+
61
+ export function departmentFromJSON(
62
+ jsonString: string,
63
+ ): SafeParseResult<Department, SDKValidationError> {
64
+ return safeParse(
65
+ jsonString,
66
+ (x) => Department$inboundSchema.parse(JSON.parse(x)),
67
+ `Failed to parse 'Department' from JSON`,
68
+ );
69
+ }
@@ -26,6 +26,14 @@ export const Expand = {
26
26
  VendorUser: "vendor.user",
27
27
  VendorVendorType: "vendor.vendor_type",
28
28
  VendorPaymentProfile: "vendor.payment_profile",
29
+ VendorImageUrls: "vendor.image_urls",
30
+ VendorPrimaryFacility: "vendor.primary_facility",
31
+ VendorPrimaryDepartment: "vendor.primary_department",
32
+ VendorCompany: "vendor.company",
33
+ VendorCredentialingSubscription: "vendor.credentialing_subscription",
34
+ VendorScrubsSubscription: "vendor.scrubs_subscription",
35
+ VendorPaymentResponsibility: "vendor.payment_responsibility",
36
+ VendorBackgroundCheckDateExpires: "vendor.background_check_date_expires",
29
37
  SupportArticleDescription: "support_article.description",
30
38
  SupportArticlePublished: "support_article.published",
31
39
  SupportArticleNotes: "support_article.notes",
@@ -86,7 +86,7 @@ export type FluCredential = {
86
86
  fluDateEnds?: RFCDate | null | undefined;
87
87
  };
88
88
 
89
- export type FacilityLocation = {
89
+ export type Location = {
90
90
  streetAddress?: string | null | undefined;
91
91
  city?: string | null | undefined;
92
92
  state?: string | null | undefined;
@@ -170,8 +170,8 @@ export type Facility = {
170
170
  /**
171
171
  * A set of images in different sizes
172
172
  */
173
- imageUrls?: ImageSet | undefined;
174
- location?: FacilityLocation | undefined;
173
+ imageUrls?: ImageSet | null | undefined;
174
+ location?: Location | undefined;
175
175
  name?: string | undefined;
176
176
  scrubsPolicy?: ScrubsPolicy | null | undefined;
177
177
  status?: string | undefined;
@@ -567,8 +567,8 @@ export function fluCredentialFromJSON(
567
567
  }
568
568
 
569
569
  /** @internal */
570
- export const FacilityLocation$inboundSchema: z.ZodType<
571
- FacilityLocation,
570
+ export const Location$inboundSchema: z.ZodType<
571
+ Location,
572
572
  z.ZodTypeDef,
573
573
  unknown
574
574
  > = z.object({
@@ -590,7 +590,7 @@ export const FacilityLocation$inboundSchema: z.ZodType<
590
590
  });
591
591
 
592
592
  /** @internal */
593
- export type FacilityLocation$Outbound = {
593
+ export type Location$Outbound = {
594
594
  street_address?: string | null | undefined;
595
595
  city?: string | null | undefined;
596
596
  state?: string | null | undefined;
@@ -604,10 +604,10 @@ export type FacilityLocation$Outbound = {
604
604
  };
605
605
 
606
606
  /** @internal */
607
- export const FacilityLocation$outboundSchema: z.ZodType<
608
- FacilityLocation$Outbound,
607
+ export const Location$outboundSchema: z.ZodType<
608
+ Location$Outbound,
609
609
  z.ZodTypeDef,
610
- FacilityLocation
610
+ Location
611
611
  > = z.object({
612
612
  streetAddress: z.nullable(z.string()).optional(),
613
613
  city: z.nullable(z.string()).optional(),
@@ -630,30 +630,26 @@ export const FacilityLocation$outboundSchema: z.ZodType<
630
630
  * @internal
631
631
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
632
632
  */
633
- export namespace FacilityLocation$ {
634
- /** @deprecated use `FacilityLocation$inboundSchema` instead. */
635
- export const inboundSchema = FacilityLocation$inboundSchema;
636
- /** @deprecated use `FacilityLocation$outboundSchema` instead. */
637
- export const outboundSchema = FacilityLocation$outboundSchema;
638
- /** @deprecated use `FacilityLocation$Outbound` instead. */
639
- export type Outbound = FacilityLocation$Outbound;
633
+ export namespace Location$ {
634
+ /** @deprecated use `Location$inboundSchema` instead. */
635
+ export const inboundSchema = Location$inboundSchema;
636
+ /** @deprecated use `Location$outboundSchema` instead. */
637
+ export const outboundSchema = Location$outboundSchema;
638
+ /** @deprecated use `Location$Outbound` instead. */
639
+ export type Outbound = Location$Outbound;
640
640
  }
641
641
 
642
- export function facilityLocationToJSON(
643
- facilityLocation: FacilityLocation,
644
- ): string {
645
- return JSON.stringify(
646
- FacilityLocation$outboundSchema.parse(facilityLocation),
647
- );
642
+ export function locationToJSON(location: Location): string {
643
+ return JSON.stringify(Location$outboundSchema.parse(location));
648
644
  }
649
645
 
650
- export function facilityLocationFromJSON(
646
+ export function locationFromJSON(
651
647
  jsonString: string,
652
- ): SafeParseResult<FacilityLocation, SDKValidationError> {
648
+ ): SafeParseResult<Location, SDKValidationError> {
653
649
  return safeParse(
654
650
  jsonString,
655
- (x) => FacilityLocation$inboundSchema.parse(JSON.parse(x)),
656
- `Failed to parse 'FacilityLocation' from JSON`,
651
+ (x) => Location$inboundSchema.parse(JSON.parse(x)),
652
+ `Failed to parse 'Location' from JSON`,
657
653
  );
658
654
  }
659
655
 
@@ -1198,8 +1194,8 @@ export const Facility$inboundSchema: z.ZodType<
1198
1194
  facility_type: z.nullable(z.string()).optional(),
1199
1195
  flu_credential: z.lazy(() => FluCredential$inboundSchema).optional(),
1200
1196
  id: z.number().int().optional(),
1201
- image_urls: ImageSet$inboundSchema.optional(),
1202
- location: z.lazy(() => FacilityLocation$inboundSchema).optional(),
1197
+ image_urls: z.nullable(ImageSet$inboundSchema).optional(),
1198
+ location: z.lazy(() => Location$inboundSchema).optional(),
1203
1199
  name: z.string().optional(),
1204
1200
  scrubs_policy: z.nullable(z.lazy(() => ScrubsPolicy$inboundSchema))
1205
1201
  .optional(),
@@ -1240,8 +1236,8 @@ export type Facility$Outbound = {
1240
1236
  facility_type?: string | null | undefined;
1241
1237
  flu_credential?: FluCredential$Outbound | undefined;
1242
1238
  id?: number | undefined;
1243
- image_urls?: ImageSet$Outbound | undefined;
1244
- location?: FacilityLocation$Outbound | undefined;
1239
+ image_urls?: ImageSet$Outbound | null | undefined;
1240
+ location?: Location$Outbound | undefined;
1245
1241
  name?: string | undefined;
1246
1242
  scrubs_policy?: ScrubsPolicy$Outbound | null | undefined;
1247
1243
  status?: string | undefined;
@@ -1269,8 +1265,8 @@ export const Facility$outboundSchema: z.ZodType<
1269
1265
  facilityType: z.nullable(z.string()).optional(),
1270
1266
  fluCredential: z.lazy(() => FluCredential$outboundSchema).optional(),
1271
1267
  id: z.number().int().optional(),
1272
- imageUrls: ImageSet$outboundSchema.optional(),
1273
- location: z.lazy(() => FacilityLocation$outboundSchema).optional(),
1268
+ imageUrls: z.nullable(ImageSet$outboundSchema).optional(),
1269
+ location: z.lazy(() => Location$outboundSchema).optional(),
1274
1270
  name: z.string().optional(),
1275
1271
  scrubsPolicy: z.nullable(z.lazy(() => ScrubsPolicy$outboundSchema))
1276
1272
  .optional(),
@@ -6,6 +6,7 @@ export * from "./activestatus.js";
6
6
  export * from "./company.js";
7
7
  export * from "./contact.js";
8
8
  export * from "./credentialstatus.js";
9
+ export * from "./department.js";
9
10
  export * from "./departmentsummary.js";
10
11
  export * from "./desc.js";
11
12
  export * from "./expand.js";
@@ -21,12 +22,18 @@ export * from "./mfarequiredresponse.js";
21
22
  export * from "./pager.js";
22
23
  export * from "./passwordrequiredresponse.js";
23
24
  export * from "./samlloginrequiredresponse.js";
25
+ export * from "./scantype.js";
24
26
  export * from "./security.js";
27
+ export * from "./subscription.js";
25
28
  export * from "./supportarticle.js";
26
29
  export * from "./systemsummary.js";
27
30
  export * from "./user.js";
31
+ export * from "./vendor.js";
28
32
  export * from "./vendorcredentialslim.js";
29
33
  export * from "./vendorfacilitystatusview.js";
30
34
  export * from "./vendorjobtitle.js";
31
35
  export * from "./vendorrequiredcredential.js";
36
+ export * from "./vendorscrubdetails.js";
37
+ export * from "./vendorscrubpurchase.js";
32
38
  export * from "./vendortype.js";
39
+ export * from "./webhookendpoint.js";
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const ScanType = {
9
+ In: "In",
10
+ Out: "Out",
11
+ Check: "Check",
12
+ } as const;
13
+ export type ScanType = ClosedEnum<typeof ScanType>;
14
+
15
+ /** @internal */
16
+ export const ScanType$inboundSchema: z.ZodNativeEnum<typeof ScanType> = z
17
+ .nativeEnum(ScanType);
18
+
19
+ /** @internal */
20
+ export const ScanType$outboundSchema: z.ZodNativeEnum<typeof ScanType> =
21
+ ScanType$inboundSchema;
22
+
23
+ /**
24
+ * @internal
25
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
26
+ */
27
+ export namespace ScanType$ {
28
+ /** @deprecated use `ScanType$inboundSchema` instead. */
29
+ export const inboundSchema = ScanType$inboundSchema;
30
+ /** @deprecated use `ScanType$outboundSchema` instead. */
31
+ export const outboundSchema = ScanType$outboundSchema;
32
+ }
@@ -0,0 +1,98 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Reduced list of attributes of the Subscription record
13
+ */
14
+ export type Subscription = {
15
+ id?: number | null | undefined;
16
+ dateStarted?: string | null | undefined;
17
+ dateEnds?: string | null | undefined;
18
+ status?: string | null | undefined;
19
+ locked?: boolean | null | undefined;
20
+ variantTitle?: any | null | undefined;
21
+ };
22
+
23
+ /** @internal */
24
+ export const Subscription$inboundSchema: z.ZodType<
25
+ Subscription,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ id: z.nullable(z.number().int()).optional(),
30
+ date_started: z.nullable(z.string()).optional(),
31
+ date_ends: z.nullable(z.string()).optional(),
32
+ status: z.nullable(z.string()).optional(),
33
+ locked: z.nullable(z.boolean()).optional(),
34
+ variant_title: z.nullable(z.any()).optional(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "date_started": "dateStarted",
38
+ "date_ends": "dateEnds",
39
+ "variant_title": "variantTitle",
40
+ });
41
+ });
42
+
43
+ /** @internal */
44
+ export type Subscription$Outbound = {
45
+ id?: number | null | undefined;
46
+ date_started?: string | null | undefined;
47
+ date_ends?: string | null | undefined;
48
+ status?: string | null | undefined;
49
+ locked?: boolean | null | undefined;
50
+ variant_title?: any | null | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const Subscription$outboundSchema: z.ZodType<
55
+ Subscription$Outbound,
56
+ z.ZodTypeDef,
57
+ Subscription
58
+ > = z.object({
59
+ id: z.nullable(z.number().int()).optional(),
60
+ dateStarted: z.nullable(z.string()).optional(),
61
+ dateEnds: z.nullable(z.string()).optional(),
62
+ status: z.nullable(z.string()).optional(),
63
+ locked: z.nullable(z.boolean()).optional(),
64
+ variantTitle: z.nullable(z.any()).optional(),
65
+ }).transform((v) => {
66
+ return remap$(v, {
67
+ dateStarted: "date_started",
68
+ dateEnds: "date_ends",
69
+ variantTitle: "variant_title",
70
+ });
71
+ });
72
+
73
+ /**
74
+ * @internal
75
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
76
+ */
77
+ export namespace Subscription$ {
78
+ /** @deprecated use `Subscription$inboundSchema` instead. */
79
+ export const inboundSchema = Subscription$inboundSchema;
80
+ /** @deprecated use `Subscription$outboundSchema` instead. */
81
+ export const outboundSchema = Subscription$outboundSchema;
82
+ /** @deprecated use `Subscription$Outbound` instead. */
83
+ export type Outbound = Subscription$Outbound;
84
+ }
85
+
86
+ export function subscriptionToJSON(subscription: Subscription): string {
87
+ return JSON.stringify(Subscription$outboundSchema.parse(subscription));
88
+ }
89
+
90
+ export function subscriptionFromJSON(
91
+ jsonString: string,
92
+ ): SafeParseResult<Subscription, SDKValidationError> {
93
+ return safeParse(
94
+ jsonString,
95
+ (x) => Subscription$inboundSchema.parse(JSON.parse(x)),
96
+ `Failed to parse 'Subscription' from JSON`,
97
+ );
98
+ }
@@ -26,6 +26,12 @@ import {
26
26
  ImageSet$Outbound,
27
27
  ImageSet$outboundSchema,
28
28
  } from "./imageset.js";
29
+ import {
30
+ Vendor,
31
+ Vendor$inboundSchema,
32
+ Vendor$Outbound,
33
+ Vendor$outboundSchema,
34
+ } from "./vendor.js";
29
35
 
30
36
  /**
31
37
  * The flavor of user will determine the most relevant user experience for this user as well as permissions
@@ -75,7 +81,7 @@ export type UserUser = {
75
81
  /**
76
82
  * A set of images in different sizes
77
83
  */
78
- imageUrls?: ImageSet | undefined;
84
+ imageUrls?: ImageSet | null | undefined;
79
85
  };
80
86
 
81
87
  /**
@@ -101,8 +107,6 @@ export type UserToken = {
101
107
  tokenType?: TokenType | undefined;
102
108
  };
103
109
 
104
- export type Vendor = {};
105
-
106
110
  export type InventoryManager = {};
107
111
 
108
112
  /**
@@ -116,6 +120,9 @@ export type User = {
116
120
  success: boolean;
117
121
  user: UserUser;
118
122
  userToken: UserToken;
123
+ /**
124
+ * Vendor details
125
+ */
119
126
  vendor?: Vendor | undefined;
120
127
  inventoryManager?: InventoryManager | undefined;
121
128
  /**
@@ -125,7 +132,7 @@ export type User = {
125
132
  /**
126
133
  * A simplified representation of a Company, typically used in list views.
127
134
  */
128
- company?: Company | undefined;
135
+ company?: Company | null | undefined;
129
136
  };
130
137
 
131
138
  /** @internal */
@@ -160,7 +167,7 @@ export const UserUser$inboundSchema: z.ZodType<
160
167
  phone: z.nullable(z.string()).optional(),
161
168
  user_type: UserType$inboundSchema,
162
169
  timezone: z.nullable(z.string()).optional(),
163
- image_urls: ImageSet$inboundSchema.optional(),
170
+ image_urls: z.nullable(ImageSet$inboundSchema).optional(),
164
171
  }).transform((v) => {
165
172
  return remap$(v, {
166
173
  "first_name": "firstName",
@@ -179,7 +186,7 @@ export type UserUser$Outbound = {
179
186
  phone?: string | null | undefined;
180
187
  user_type: string;
181
188
  timezone?: string | null | undefined;
182
- image_urls?: ImageSet$Outbound | undefined;
189
+ image_urls?: ImageSet$Outbound | null | undefined;
183
190
  };
184
191
 
185
192
  /** @internal */
@@ -195,7 +202,7 @@ export const UserUser$outboundSchema: z.ZodType<
195
202
  phone: z.nullable(z.string()).optional(),
196
203
  userType: UserType$outboundSchema,
197
204
  timezone: z.nullable(z.string()).optional(),
198
- imageUrls: ImageSet$outboundSchema.optional(),
205
+ imageUrls: z.nullable(ImageSet$outboundSchema).optional(),
199
206
  }).transform((v) => {
200
207
  return remap$(v, {
201
208
  firstName: "first_name",
@@ -312,47 +319,6 @@ export function userTokenFromJSON(
312
319
  );
313
320
  }
314
321
 
315
- /** @internal */
316
- export const Vendor$inboundSchema: z.ZodType<Vendor, z.ZodTypeDef, unknown> = z
317
- .object({});
318
-
319
- /** @internal */
320
- export type Vendor$Outbound = {};
321
-
322
- /** @internal */
323
- export const Vendor$outboundSchema: z.ZodType<
324
- Vendor$Outbound,
325
- z.ZodTypeDef,
326
- Vendor
327
- > = z.object({});
328
-
329
- /**
330
- * @internal
331
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
332
- */
333
- export namespace Vendor$ {
334
- /** @deprecated use `Vendor$inboundSchema` instead. */
335
- export const inboundSchema = Vendor$inboundSchema;
336
- /** @deprecated use `Vendor$outboundSchema` instead. */
337
- export const outboundSchema = Vendor$outboundSchema;
338
- /** @deprecated use `Vendor$Outbound` instead. */
339
- export type Outbound = Vendor$Outbound;
340
- }
341
-
342
- export function vendorToJSON(vendor: Vendor): string {
343
- return JSON.stringify(Vendor$outboundSchema.parse(vendor));
344
- }
345
-
346
- export function vendorFromJSON(
347
- jsonString: string,
348
- ): SafeParseResult<Vendor, SDKValidationError> {
349
- return safeParse(
350
- jsonString,
351
- (x) => Vendor$inboundSchema.parse(JSON.parse(x)),
352
- `Failed to parse 'Vendor' from JSON`,
353
- );
354
- }
355
-
356
322
  /** @internal */
357
323
  export const InventoryManager$inboundSchema: z.ZodType<
358
324
  InventoryManager,
@@ -408,10 +374,10 @@ export const User$inboundSchema: z.ZodType<User, z.ZodTypeDef, unknown> = z
408
374
  success: z.boolean(),
409
375
  user: z.lazy(() => UserUser$inboundSchema),
410
376
  user_token: z.lazy(() => UserToken$inboundSchema),
411
- vendor: z.lazy(() => Vendor$inboundSchema).optional(),
377
+ vendor: Vendor$inboundSchema.optional(),
412
378
  inventory_manager: z.lazy(() => InventoryManager$inboundSchema).optional(),
413
379
  contact: Contact$inboundSchema.optional(),
414
- company: Company$inboundSchema.optional(),
380
+ company: z.nullable(Company$inboundSchema).optional(),
415
381
  }).transform((v) => {
416
382
  return remap$(v, {
417
383
  "is_gatekeeper": "isGatekeeper",
@@ -429,7 +395,7 @@ export type User$Outbound = {
429
395
  vendor?: Vendor$Outbound | undefined;
430
396
  inventory_manager?: InventoryManager$Outbound | undefined;
431
397
  contact?: Contact$Outbound | undefined;
432
- company?: Company$Outbound | undefined;
398
+ company?: Company$Outbound | null | undefined;
433
399
  };
434
400
 
435
401
  /** @internal */
@@ -439,10 +405,10 @@ export const User$outboundSchema: z.ZodType<User$Outbound, z.ZodTypeDef, User> =
439
405
  success: z.boolean(),
440
406
  user: z.lazy(() => UserUser$outboundSchema),
441
407
  userToken: z.lazy(() => UserToken$outboundSchema),
442
- vendor: z.lazy(() => Vendor$outboundSchema).optional(),
408
+ vendor: Vendor$outboundSchema.optional(),
443
409
  inventoryManager: z.lazy(() => InventoryManager$outboundSchema).optional(),
444
410
  contact: Contact$outboundSchema.optional(),
445
- company: Company$outboundSchema.optional(),
411
+ company: z.nullable(Company$outboundSchema).optional(),
446
412
  }).transform((v) => {
447
413
  return remap$(v, {
448
414
  isGatekeeper: "is_gatekeeper",