@greensecurity/javascript-sdk 0.18.2 → 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 (380) hide show
  1. package/REACT_QUERY.md +15 -15
  2. package/README.md +96 -9
  3. package/bin/mcp-server.js +1945 -233
  4. package/bin/mcp-server.js.map +67 -39
  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 +20 -0
  22. package/funcs/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
  23. package/funcs/vendorsListVendorFacilityStatuses.js +155 -0
  24. package/funcs/vendorsListVendorFacilityStatuses.js.map +1 -0
  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/sdks.d.ts.map +1 -1
  49. package/lib/sdks.js +2 -8
  50. package/lib/sdks.js.map +1 -1
  51. package/lib/security.d.ts +4 -3
  52. package/lib/security.d.ts.map +1 -1
  53. package/lib/security.js +6 -1
  54. package/lib/security.js.map +1 -1
  55. package/mcp-server/extensions.d.ts +2 -0
  56. package/mcp-server/extensions.d.ts.map +1 -1
  57. package/mcp-server/mcp-server.js +1 -1
  58. package/mcp-server/prompts.d.ts +26 -0
  59. package/mcp-server/prompts.d.ts.map +1 -0
  60. package/mcp-server/prompts.js +47 -0
  61. package/mcp-server/prompts.js.map +1 -0
  62. package/mcp-server/resources.d.ts.map +1 -1
  63. package/mcp-server/resources.js +1 -0
  64. package/mcp-server/resources.js.map +1 -1
  65. package/mcp-server/server.d.ts.map +1 -1
  66. package/mcp-server/server.js +18 -4
  67. package/mcp-server/server.js.map +1 -1
  68. package/mcp-server/tools/organizationsGetFacility.js +1 -1
  69. package/mcp-server/tools/organizationsListOrSearchFacilities.js +1 -1
  70. package/mcp-server/tools/supportArticlesGetSupportArticle.js +1 -1
  71. package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js +1 -1
  72. package/mcp-server/tools/usersGetCurrentUser.js +1 -1
  73. package/mcp-server/tools/usersGetUserById.js +1 -1
  74. package/mcp-server/tools/usersLogsUserIntoTheSystem.js +1 -1
  75. package/mcp-server/tools/usersMagiclink.js +1 -1
  76. package/mcp-server/tools/usersPassword.js +1 -1
  77. package/mcp-server/tools/usersPasswordResetRequest.js +1 -1
  78. package/mcp-server/tools/vendorScansVendorScanOut.d.ts +8 -0
  79. package/mcp-server/tools/vendorScansVendorScanOut.d.ts.map +1 -0
  80. package/mcp-server/tools/{userPasswordResetRequest.js → vendorScansVendorScanOut.js} +9 -9
  81. package/mcp-server/tools/{userPasswordResetRequest.js.map → vendorScansVendorScanOut.js.map} +1 -1
  82. package/mcp-server/tools/vendorsCreateVendorRegistration.js +1 -1
  83. package/mcp-server/tools/vendorsExpediteTimeRemaining.js +1 -1
  84. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js +1 -1
  85. package/mcp-server/tools/vendorsGetVendorsDetails.d.ts +8 -0
  86. package/mcp-server/tools/vendorsGetVendorsDetails.d.ts.map +1 -0
  87. package/mcp-server/tools/vendorsGetVendorsDetails.js +78 -0
  88. package/mcp-server/tools/vendorsGetVendorsDetails.js.map +1 -0
  89. package/mcp-server/tools/vendorsListVendorCredentials.js +2 -2
  90. package/mcp-server/tools/vendorsListVendorCredentials.js.map +1 -1
  91. package/mcp-server/tools/vendorsListVendorFacilityStatuses.d.ts +8 -0
  92. package/mcp-server/tools/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
  93. package/mcp-server/tools/vendorsListVendorFacilityStatuses.js +64 -0
  94. package/mcp-server/tools/vendorsListVendorFacilityStatuses.js.map +1 -0
  95. package/mcp-server/tools/vendorsListVendorInvoices.js +1 -1
  96. package/mcp-server/tools/vendorsListVendorScrubDetails.d.ts +8 -0
  97. package/mcp-server/tools/vendorsListVendorScrubDetails.d.ts.map +1 -0
  98. package/mcp-server/tools/{userGetUserById.js → vendorsListVendorScrubDetails.js} +9 -9
  99. package/mcp-server/tools/vendorsListVendorScrubDetails.js.map +1 -0
  100. package/mcp-server/tools/vendorsListVendorScrubPurchases.d.ts +8 -0
  101. package/mcp-server/tools/vendorsListVendorScrubPurchases.d.ts.map +1 -0
  102. package/mcp-server/tools/{userPassword.js → vendorsListVendorScrubPurchases.js} +10 -11
  103. package/mcp-server/tools/vendorsListVendorScrubPurchases.js.map +1 -0
  104. package/mcp-server/tools/webhooksGetWebhookEndpoint.d.ts +8 -0
  105. package/mcp-server/tools/webhooksGetWebhookEndpoint.d.ts.map +1 -0
  106. package/mcp-server/tools/{vendorsListVendorJobTitles.js → webhooksGetWebhookEndpoint.js} +10 -10
  107. package/mcp-server/tools/webhooksGetWebhookEndpoint.js.map +1 -0
  108. package/mcp-server/tools/webhooksListAllWebhookEndpoints.d.ts +8 -0
  109. package/mcp-server/tools/webhooksListAllWebhookEndpoints.d.ts.map +1 -0
  110. package/mcp-server/tools/{userMagiclink.js → webhooksListAllWebhookEndpoints.js} +9 -9
  111. package/mcp-server/tools/webhooksListAllWebhookEndpoints.js.map +1 -0
  112. package/mcp-server/tools.d.ts.map +1 -1
  113. package/mcp-server/tools.js +4 -0
  114. package/mcp-server/tools.js.map +1 -1
  115. package/models/components/company.d.ts +15 -15
  116. package/models/components/company.d.ts.map +1 -1
  117. package/models/components/company.js +19 -18
  118. package/models/components/company.js.map +1 -1
  119. package/models/components/contact.d.ts +13 -13
  120. package/models/components/contact.d.ts.map +1 -1
  121. package/models/components/contact.js +16 -16
  122. package/models/components/contact.js.map +1 -1
  123. package/models/components/department.d.ts +34 -0
  124. package/models/components/department.d.ts.map +1 -0
  125. package/models/components/department.js +71 -0
  126. package/models/components/department.js.map +1 -0
  127. package/models/components/expand.d.ts +24 -0
  128. package/models/components/expand.d.ts.map +1 -1
  129. package/models/components/expand.js +8 -0
  130. package/models/components/expand.js.map +1 -1
  131. package/models/components/facility.d.ts +17 -17
  132. package/models/components/facility.d.ts.map +1 -1
  133. package/models/components/facility.js +20 -20
  134. package/models/components/facility.js.map +1 -1
  135. package/models/components/index.d.ts +8 -0
  136. package/models/components/index.d.ts.map +1 -1
  137. package/models/components/index.js +8 -0
  138. package/models/components/index.js.map +1 -1
  139. package/models/components/scantype.d.ts +31 -0
  140. package/models/components/scantype.d.ts.map +1 -0
  141. package/models/components/scantype.js +62 -0
  142. package/models/components/scantype.js.map +1 -0
  143. package/models/components/subscription.d.ts +42 -0
  144. package/models/components/subscription.d.ts.map +1 -0
  145. package/models/components/subscription.js +92 -0
  146. package/models/components/subscription.js.map +1 -0
  147. package/models/components/user.d.ts +8 -25
  148. package/models/components/user.d.ts.map +1 -1
  149. package/models/components/user.js +8 -31
  150. package/models/components/user.js.map +1 -1
  151. package/models/components/vendor.d.ts +374 -0
  152. package/models/components/vendor.d.ts.map +1 -0
  153. package/models/components/vendor.js +523 -0
  154. package/models/components/vendor.js.map +1 -0
  155. package/models/components/vendorfacilitystatusview.d.ts +42 -0
  156. package/models/components/vendorfacilitystatusview.d.ts.map +1 -0
  157. package/models/components/vendorfacilitystatusview.js +98 -0
  158. package/models/components/vendorfacilitystatusview.js.map +1 -0
  159. package/models/components/vendorscrubdetails.d.ts +42 -0
  160. package/models/components/vendorscrubdetails.d.ts.map +1 -0
  161. package/models/components/vendorscrubdetails.js +98 -0
  162. package/models/components/vendorscrubdetails.js.map +1 -0
  163. package/models/components/vendorscrubpurchase.d.ts +38 -0
  164. package/models/components/vendorscrubpurchase.d.ts.map +1 -0
  165. package/models/components/vendorscrubpurchase.js +84 -0
  166. package/models/components/vendorscrubpurchase.js.map +1 -0
  167. package/models/components/webhookendpoint.d.ts +135 -0
  168. package/models/components/webhookendpoint.d.ts.map +1 -0
  169. package/models/components/webhookendpoint.js +158 -0
  170. package/models/components/webhookendpoint.js.map +1 -0
  171. package/models/operations/getvendorsdetails.d.ts +38 -0
  172. package/models/operations/getvendorsdetails.d.ts.map +1 -0
  173. package/models/operations/getvendorsdetails.js +81 -0
  174. package/models/operations/getvendorsdetails.js.map +1 -0
  175. package/models/operations/getwebhookendpoint.d.ts +32 -0
  176. package/models/operations/getwebhookendpoint.d.ts.map +1 -0
  177. package/models/operations/getwebhookendpoint.js +69 -0
  178. package/models/operations/getwebhookendpoint.js.map +1 -0
  179. package/models/operations/index.d.ts +7 -0
  180. package/models/operations/index.d.ts.map +1 -1
  181. package/models/operations/index.js +7 -0
  182. package/models/operations/index.js.map +1 -1
  183. package/models/operations/listallwebhookendpoints.d.ts +81 -0
  184. package/models/operations/listallwebhookendpoints.d.ts.map +1 -0
  185. package/models/operations/listallwebhookendpoints.js +114 -0
  186. package/models/operations/listallwebhookendpoints.js.map +1 -0
  187. package/models/operations/listorsearchfacilities.d.ts +2 -2
  188. package/models/operations/listorsearchfacilities.d.ts.map +1 -1
  189. package/models/operations/listorsearchfacilities.js +2 -2
  190. package/models/operations/listorsearchfacilities.js.map +1 -1
  191. package/models/operations/listvendorcredentials.d.ts +77 -5
  192. package/models/operations/listvendorcredentials.d.ts.map +1 -1
  193. package/models/operations/listvendorcredentials.js +78 -3
  194. package/models/operations/listvendorcredentials.js.map +1 -1
  195. package/models/operations/listvendorfacilitystatuses.d.ts +111 -0
  196. package/models/operations/listvendorfacilitystatuses.d.ts.map +1 -0
  197. package/models/operations/listvendorfacilitystatuses.js +153 -0
  198. package/models/operations/listvendorfacilitystatuses.js.map +1 -0
  199. package/models/operations/listvendorjobtitles.d.ts +27 -0
  200. package/models/operations/listvendorjobtitles.d.ts.map +1 -1
  201. package/models/operations/listvendorjobtitles.js +38 -1
  202. package/models/operations/listvendorjobtitles.js.map +1 -1
  203. package/models/operations/listvendorscrubdetails.d.ts +32 -0
  204. package/models/operations/listvendorscrubdetails.d.ts.map +1 -0
  205. package/models/operations/listvendorscrubdetails.js +78 -0
  206. package/models/operations/listvendorscrubdetails.js.map +1 -0
  207. package/models/operations/listvendorscrubpurchases.d.ts +111 -0
  208. package/models/operations/listvendorscrubpurchases.d.ts.map +1 -0
  209. package/models/operations/listvendorscrubpurchases.js +153 -0
  210. package/models/operations/listvendorscrubpurchases.js.map +1 -0
  211. package/models/operations/vendorscanout.d.ts +64 -0
  212. package/models/operations/vendorscanout.d.ts.map +1 -0
  213. package/models/operations/vendorscanout.js +100 -0
  214. package/models/operations/vendorscanout.js.map +1 -0
  215. package/package.json +1 -1
  216. package/react-query/index.d.ts +7 -0
  217. package/react-query/index.d.ts.map +1 -1
  218. package/react-query/index.js +7 -0
  219. package/react-query/index.js.map +1 -1
  220. package/react-query/vendorScansVendorScanOut.d.ts +23 -0
  221. package/react-query/vendorScansVendorScanOut.d.ts.map +1 -0
  222. package/react-query/vendorScansVendorScanOut.js +47 -0
  223. package/react-query/vendorScansVendorScanOut.js.map +1 -0
  224. package/react-query/vendorsGetVendorsDetails.d.ts +71 -0
  225. package/react-query/vendorsGetVendorsDetails.d.ts.map +1 -0
  226. package/react-query/vendorsGetVendorsDetails.js +123 -0
  227. package/react-query/vendorsGetVendorsDetails.js.map +1 -0
  228. package/react-query/vendorsListVendorCredentials.d.ts +40 -3
  229. package/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
  230. package/react-query/vendorsListVendorCredentials.js +67 -0
  231. package/react-query/vendorsListVendorCredentials.js.map +1 -1
  232. package/react-query/vendorsListVendorFacilityStatuses.d.ts +78 -0
  233. package/react-query/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
  234. package/react-query/vendorsListVendorFacilityStatuses.js +161 -0
  235. package/react-query/vendorsListVendorFacilityStatuses.js.map +1 -0
  236. package/react-query/vendorsListVendorJobTitles.d.ts +7 -7
  237. package/react-query/vendorsListVendorJobTitles.d.ts.map +1 -1
  238. package/react-query/vendorsListVendorJobTitles.js +15 -15
  239. package/react-query/vendorsListVendorJobTitles.js.map +1 -1
  240. package/react-query/vendorsListVendorScrubDetails.d.ts +31 -0
  241. package/react-query/vendorsListVendorScrubDetails.d.ts.map +1 -0
  242. package/react-query/vendorsListVendorScrubDetails.js +96 -0
  243. package/react-query/vendorsListVendorScrubDetails.js.map +1 -0
  244. package/react-query/vendorsListVendorScrubPurchases.d.ts +77 -0
  245. package/react-query/vendorsListVendorScrubPurchases.d.ts.map +1 -0
  246. package/react-query/vendorsListVendorScrubPurchases.js +160 -0
  247. package/react-query/vendorsListVendorScrubPurchases.js.map +1 -0
  248. package/react-query/webhooksGetWebhookEndpoint.d.ts +31 -0
  249. package/react-query/webhooksGetWebhookEndpoint.d.ts.map +1 -0
  250. package/react-query/webhooksGetWebhookEndpoint.js +96 -0
  251. package/react-query/webhooksGetWebhookEndpoint.js.map +1 -0
  252. package/react-query/webhooksListAllWebhookEndpoints.d.ts +50 -0
  253. package/react-query/webhooksListAllWebhookEndpoints.d.ts.map +1 -0
  254. package/react-query/webhooksListAllWebhookEndpoints.js +101 -0
  255. package/react-query/webhooksListAllWebhookEndpoints.js.map +1 -0
  256. package/sdk/sdk.d.ts +6 -0
  257. package/sdk/sdk.d.ts.map +1 -1
  258. package/sdk/sdk.js +8 -0
  259. package/sdk/sdk.js.map +1 -1
  260. package/sdk/vendors.d.ts +50 -2
  261. package/sdk/vendors.d.ts.map +1 -1
  262. package/sdk/vendors.js +57 -3
  263. package/sdk/vendors.js.map +1 -1
  264. package/sdk/vendorscans.d.ts +12 -0
  265. package/sdk/vendorscans.d.ts.map +1 -0
  266. package/sdk/vendorscans.js +22 -0
  267. package/sdk/vendorscans.js.map +1 -0
  268. package/sdk/webhooks.d.ts +20 -0
  269. package/sdk/webhooks.d.ts.map +1 -0
  270. package/sdk/webhooks.js +32 -0
  271. package/sdk/webhooks.js.map +1 -0
  272. package/src/__tests__/vendors.test.ts +51 -118
  273. package/src/__tests__/vendorscans.test.ts +27 -0
  274. package/src/__tests__/webhooks.test.ts +45 -0
  275. package/src/funcs/organizationsListOrSearchFacilities.ts +12 -1
  276. package/src/funcs/vendorScansVendorScanOut.ts +172 -0
  277. package/src/funcs/vendorsGetVendorsDetails.ts +192 -0
  278. package/src/funcs/vendorsListVendorCredentials.ts +104 -27
  279. package/src/funcs/vendorsListVendorFacilityStatuses.ts +246 -0
  280. package/src/funcs/vendorsListVendorJobTitles.ts +25 -2
  281. package/src/funcs/vendorsListVendorScrubDetails.ts +172 -0
  282. package/src/funcs/vendorsListVendorScrubPurchases.ts +249 -0
  283. package/src/funcs/webhooksGetWebhookEndpoint.ts +173 -0
  284. package/src/funcs/webhooksListAllWebhookEndpoints.ts +174 -0
  285. package/src/lib/config.ts +3 -3
  286. package/src/lib/sdks.ts +2 -7
  287. package/src/lib/security.ts +11 -3
  288. package/src/mcp-server/extensions.ts +4 -0
  289. package/src/mcp-server/mcp-server.ts +1 -1
  290. package/src/mcp-server/prompts.ts +110 -0
  291. package/src/mcp-server/resources.ts +1 -0
  292. package/src/mcp-server/server.ts +18 -4
  293. package/src/mcp-server/tools/organizationsGetFacility.ts +1 -1
  294. package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +1 -1
  295. package/src/mcp-server/tools/supportArticlesGetSupportArticle.ts +1 -1
  296. package/src/mcp-server/tools/supportArticlesListOrSearchSupportArticles.ts +1 -1
  297. package/src/mcp-server/tools/usersGetCurrentUser.ts +1 -1
  298. package/src/mcp-server/tools/usersGetUserById.ts +1 -1
  299. package/src/mcp-server/tools/usersLogsUserIntoTheSystem.ts +1 -1
  300. package/src/mcp-server/tools/usersMagiclink.ts +1 -1
  301. package/src/mcp-server/tools/usersPassword.ts +1 -1
  302. package/src/mcp-server/tools/usersPasswordResetRequest.ts +1 -1
  303. package/src/mcp-server/tools/vendorScansVendorScanOut.ts +37 -0
  304. package/src/mcp-server/tools/vendorsCreateVendorRegistration.ts +1 -1
  305. package/src/mcp-server/tools/vendorsExpediteTimeRemaining.ts +1 -1
  306. package/src/mcp-server/tools/vendorsGetVendorInvoiceDetails.ts +1 -1
  307. package/src/mcp-server/tools/vendorsGetVendorsDetails.ts +51 -0
  308. package/src/mcp-server/tools/vendorsListVendorCredentials.ts +2 -2
  309. package/src/mcp-server/tools/{vendorsListVendorJobTitles.ts → vendorsListVendorFacilityStatuses.ts} +9 -7
  310. package/src/mcp-server/tools/vendorsListVendorInvoices.ts +1 -1
  311. package/src/mcp-server/tools/vendorsListVendorScrubDetails.ts +37 -0
  312. package/src/mcp-server/tools/vendorsListVendorScrubPurchases.ts +38 -0
  313. package/src/mcp-server/tools/webhooksGetWebhookEndpoint.ts +37 -0
  314. package/src/mcp-server/tools/webhooksListAllWebhookEndpoints.ts +38 -0
  315. package/src/mcp-server/tools.ts +5 -0
  316. package/src/models/components/company.ts +27 -24
  317. package/src/models/components/contact.ts +24 -20
  318. package/src/models/components/department.ts +69 -0
  319. package/src/models/components/expand.ts +8 -0
  320. package/src/models/components/facility.ts +28 -32
  321. package/src/models/components/index.ts +8 -0
  322. package/src/models/components/scantype.ts +32 -0
  323. package/src/models/components/subscription.ts +98 -0
  324. package/src/models/components/user.ts +19 -53
  325. package/src/models/components/vendor.ts +925 -0
  326. package/src/models/components/vendorfacilitystatusview.ts +108 -0
  327. package/src/models/components/vendorscrubdetails.ts +108 -0
  328. package/src/models/components/vendorscrubpurchase.ts +90 -0
  329. package/src/models/components/webhookendpoint.ts +244 -0
  330. package/src/models/operations/getvendorsdetails.ts +86 -0
  331. package/src/models/operations/getwebhookendpoint.ts +69 -0
  332. package/src/models/operations/index.ts +7 -0
  333. package/src/models/operations/listallwebhookendpoints.ts +175 -0
  334. package/src/models/operations/listorsearchfacilities.ts +4 -4
  335. package/src/models/operations/listvendorcredentials.ts +160 -7
  336. package/src/models/operations/listvendorfacilitystatuses.ts +256 -0
  337. package/src/models/operations/listvendorjobtitles.ts +72 -0
  338. package/src/models/operations/listvendorscrubdetails.ts +80 -0
  339. package/src/models/operations/listvendorscrubpurchases.ts +252 -0
  340. package/src/models/operations/vendorscanout.ts +138 -0
  341. package/src/react-query/index.ts +7 -0
  342. package/src/react-query/vendorScansVendorScanOut.ts +89 -0
  343. package/src/react-query/vendorsGetVendorsDetails.ts +201 -0
  344. package/src/react-query/vendorsListVendorCredentials.ts +169 -1
  345. package/src/react-query/vendorsListVendorFacilityStatuses.ts +347 -0
  346. package/src/react-query/vendorsListVendorJobTitles.ts +15 -0
  347. package/src/react-query/vendorsListVendorScrubDetails.ts +166 -0
  348. package/src/react-query/vendorsListVendorScrubPurchases.ts +346 -0
  349. package/src/react-query/webhooksGetWebhookEndpoint.ts +163 -0
  350. package/src/react-query/webhooksListAllWebhookEndpoints.ts +193 -0
  351. package/src/sdk/sdk.ts +12 -0
  352. package/src/sdk/vendors.ts +99 -2
  353. package/src/sdk/vendorscans.ts +27 -0
  354. package/src/sdk/webhooks.ts +46 -0
  355. package/mcp-server/tools/userGetCurrentUser.d.ts +0 -3
  356. package/mcp-server/tools/userGetCurrentUser.d.ts.map +0 -1
  357. package/mcp-server/tools/userGetCurrentUser.js +0 -26
  358. package/mcp-server/tools/userGetCurrentUser.js.map +0 -1
  359. package/mcp-server/tools/userGetUserById.d.ts +0 -8
  360. package/mcp-server/tools/userGetUserById.d.ts.map +0 -1
  361. package/mcp-server/tools/userGetUserById.js.map +0 -1
  362. package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts +0 -8
  363. package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts.map +0 -1
  364. package/mcp-server/tools/userLogsUserIntoTheSystem.js +0 -94
  365. package/mcp-server/tools/userLogsUserIntoTheSystem.js.map +0 -1
  366. package/mcp-server/tools/userMagiclink.d.ts +0 -8
  367. package/mcp-server/tools/userMagiclink.d.ts.map +0 -1
  368. package/mcp-server/tools/userMagiclink.js.map +0 -1
  369. package/mcp-server/tools/userPassword.d.ts +0 -8
  370. package/mcp-server/tools/userPassword.d.ts.map +0 -1
  371. package/mcp-server/tools/userPassword.js.map +0 -1
  372. package/mcp-server/tools/userPasswordResetRequest.d.ts +0 -8
  373. package/mcp-server/tools/userPasswordResetRequest.d.ts.map +0 -1
  374. package/mcp-server/tools/vendorsListVendorJobTitles.d.ts +0 -8
  375. package/mcp-server/tools/vendorsListVendorJobTitles.d.ts.map +0 -1
  376. package/mcp-server/tools/vendorsListVendorJobTitles.js.map +0 -1
  377. package/src/__tests__/organizations.test.ts +0 -78
  378. package/src/__tests__/supportarticles.test.ts +0 -64
  379. package/src/__tests__/user.test.ts +0 -218
  380. package/vitest.config.ts +0 -8
@@ -0,0 +1,925 @@
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
+ import {
11
+ Company,
12
+ Company$inboundSchema,
13
+ Company$Outbound,
14
+ Company$outboundSchema,
15
+ } from "./company.js";
16
+ import {
17
+ Department,
18
+ Department$inboundSchema,
19
+ Department$Outbound,
20
+ Department$outboundSchema,
21
+ } from "./department.js";
22
+ import {
23
+ Facility,
24
+ Facility$inboundSchema,
25
+ Facility$Outbound,
26
+ Facility$outboundSchema,
27
+ } from "./facility.js";
28
+ import {
29
+ ImageSet,
30
+ ImageSet$inboundSchema,
31
+ ImageSet$Outbound,
32
+ ImageSet$outboundSchema,
33
+ } from "./imageset.js";
34
+ import {
35
+ Subscription,
36
+ Subscription$inboundSchema,
37
+ Subscription$Outbound,
38
+ Subscription$outboundSchema,
39
+ } from "./subscription.js";
40
+
41
+ export type One = {
42
+ id?: number | undefined;
43
+ firstName?: string | null | undefined;
44
+ lastName?: any | undefined;
45
+ email?: string | null | undefined;
46
+ phone?: string | null | undefined;
47
+ userType?: string | null | undefined;
48
+ timezone?: string | null | undefined;
49
+ qrCode?: string | null | undefined;
50
+ /**
51
+ * A set of images in different sizes
52
+ */
53
+ imageUrls?: ImageSet | null | undefined;
54
+ };
55
+
56
+ export type VendorUser = One | number;
57
+
58
+ export type VendorType1 = {
59
+ id?: number | undefined;
60
+ name?: string | undefined;
61
+ };
62
+
63
+ export type VendorVendorType = VendorType1 | number;
64
+
65
+ export type Supervisor = {
66
+ name?: string | null | undefined;
67
+ email?: string | null | undefined;
68
+ phone?: string | null | undefined;
69
+ };
70
+
71
+ export type PaymentProfile1 = {
72
+ id?: number | undefined;
73
+ isValid?: boolean | null | undefined;
74
+ cardType?: string | null | undefined;
75
+ cardLast4?: string | null | undefined;
76
+ isDummy?: boolean | null | undefined;
77
+ profileType?: string | null | undefined;
78
+ };
79
+
80
+ /**
81
+ * Reduced list of attributes of the Payment Profile record
82
+ */
83
+ export type PaymentProfilePaymentProfile = PaymentProfile1 | number;
84
+
85
+ export type PaymentProfile = PaymentProfile1 | number | number;
86
+
87
+ export type PaymentResponsibility = {
88
+ id?: number | null | undefined;
89
+ companyManagerId?: number | null | undefined;
90
+ credentialingSubscription?: boolean | null | undefined;
91
+ scrubsSubscription?: boolean | null | undefined;
92
+ scrubCredits?: boolean | null | undefined;
93
+ hardBadgeInitial?: boolean | null | undefined;
94
+ hardBadgeExtra?: boolean | null | undefined;
95
+ otherInvoices?: boolean | null | undefined;
96
+ facilityId?: number | null | undefined;
97
+ companyId?: number | null | undefined;
98
+ credentialingSubscriptionUserId?: number | null | undefined;
99
+ scrubsSubscriptionUserId?: number | null | undefined;
100
+ scrubCreditsUserId?: number | null | undefined;
101
+ hardBadgeInitialUserId?: number | null | undefined;
102
+ hardBadgeExtraUserId?: number | null | undefined;
103
+ otherInvoicesUserId?: number | null | undefined;
104
+ };
105
+
106
+ /**
107
+ * Vendor details
108
+ */
109
+ export type Vendor = {
110
+ id?: number | undefined;
111
+ emailRecepient?: string | null | undefined;
112
+ sendWeeklySummaryEmail?: boolean | null | undefined;
113
+ title?: string | null | undefined;
114
+ user?: One | number | undefined;
115
+ vendorType?: VendorType1 | number | null | undefined;
116
+ supervisor?: Supervisor | undefined;
117
+ qrCode?: string | null | undefined;
118
+ /**
119
+ * A set of images in different sizes
120
+ */
121
+ headShot?: ImageSet | null | undefined;
122
+ /**
123
+ * A set of images in different sizes
124
+ */
125
+ driversLicense?: ImageSet | null | undefined;
126
+ /**
127
+ * A set of images in different sizes
128
+ */
129
+ imageUrls?: ImageSet | null | undefined;
130
+ paymentProfile?: PaymentProfile1 | number | number | null | undefined;
131
+ /**
132
+ * Describes a facility which typically represents a physical building or logical grouping of offices which act as a single entity.
133
+ */
134
+ primaryFacility?: Facility | null | undefined;
135
+ /**
136
+ * A simplified representation of a Department, typically used in list views.
137
+ */
138
+ primaryDepartment?: Department | null | undefined;
139
+ /**
140
+ * A simplified representation of a Company, typically used in list views.
141
+ */
142
+ company?: Company | null | undefined;
143
+ /**
144
+ * Reduced list of attributes of the Subscription record
145
+ */
146
+ credentialingSubscription?: Subscription | null | undefined;
147
+ /**
148
+ * Reduced list of attributes of the Subscription record
149
+ */
150
+ scrubsSubscription?: Subscription | null | undefined;
151
+ paymentResponsibility?: PaymentResponsibility | null | undefined;
152
+ backgroundCheckDateExpires?: string | null | undefined;
153
+ };
154
+
155
+ /** @internal */
156
+ export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
157
+ .object({
158
+ id: z.number().int().optional(),
159
+ first_name: z.nullable(z.string()).optional(),
160
+ last_name: z.any().optional(),
161
+ email: z.nullable(z.string()).optional(),
162
+ phone: z.nullable(z.string()).optional(),
163
+ user_type: z.nullable(z.string()).optional(),
164
+ timezone: z.nullable(z.string()).optional(),
165
+ qr_code: z.nullable(z.string()).optional(),
166
+ image_urls: z.nullable(ImageSet$inboundSchema).optional(),
167
+ }).transform((v) => {
168
+ return remap$(v, {
169
+ "first_name": "firstName",
170
+ "last_name": "lastName",
171
+ "user_type": "userType",
172
+ "qr_code": "qrCode",
173
+ "image_urls": "imageUrls",
174
+ });
175
+ });
176
+
177
+ /** @internal */
178
+ export type One$Outbound = {
179
+ id?: number | undefined;
180
+ first_name?: string | null | undefined;
181
+ last_name?: any | undefined;
182
+ email?: string | null | undefined;
183
+ phone?: string | null | undefined;
184
+ user_type?: string | null | undefined;
185
+ timezone?: string | null | undefined;
186
+ qr_code?: string | null | undefined;
187
+ image_urls?: ImageSet$Outbound | null | undefined;
188
+ };
189
+
190
+ /** @internal */
191
+ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
192
+ .object({
193
+ id: z.number().int().optional(),
194
+ firstName: z.nullable(z.string()).optional(),
195
+ lastName: z.any().optional(),
196
+ email: z.nullable(z.string()).optional(),
197
+ phone: z.nullable(z.string()).optional(),
198
+ userType: z.nullable(z.string()).optional(),
199
+ timezone: z.nullable(z.string()).optional(),
200
+ qrCode: z.nullable(z.string()).optional(),
201
+ imageUrls: z.nullable(ImageSet$outboundSchema).optional(),
202
+ }).transform((v) => {
203
+ return remap$(v, {
204
+ firstName: "first_name",
205
+ lastName: "last_name",
206
+ userType: "user_type",
207
+ qrCode: "qr_code",
208
+ imageUrls: "image_urls",
209
+ });
210
+ });
211
+
212
+ /**
213
+ * @internal
214
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
215
+ */
216
+ export namespace One$ {
217
+ /** @deprecated use `One$inboundSchema` instead. */
218
+ export const inboundSchema = One$inboundSchema;
219
+ /** @deprecated use `One$outboundSchema` instead. */
220
+ export const outboundSchema = One$outboundSchema;
221
+ /** @deprecated use `One$Outbound` instead. */
222
+ export type Outbound = One$Outbound;
223
+ }
224
+
225
+ export function oneToJSON(one: One): string {
226
+ return JSON.stringify(One$outboundSchema.parse(one));
227
+ }
228
+
229
+ export function oneFromJSON(
230
+ jsonString: string,
231
+ ): SafeParseResult<One, SDKValidationError> {
232
+ return safeParse(
233
+ jsonString,
234
+ (x) => One$inboundSchema.parse(JSON.parse(x)),
235
+ `Failed to parse 'One' from JSON`,
236
+ );
237
+ }
238
+
239
+ /** @internal */
240
+ export const VendorUser$inboundSchema: z.ZodType<
241
+ VendorUser,
242
+ z.ZodTypeDef,
243
+ unknown
244
+ > = z.union([z.lazy(() => One$inboundSchema), z.number().int()]);
245
+
246
+ /** @internal */
247
+ export type VendorUser$Outbound = One$Outbound | number;
248
+
249
+ /** @internal */
250
+ export const VendorUser$outboundSchema: z.ZodType<
251
+ VendorUser$Outbound,
252
+ z.ZodTypeDef,
253
+ VendorUser
254
+ > = z.union([z.lazy(() => One$outboundSchema), z.number().int()]);
255
+
256
+ /**
257
+ * @internal
258
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
259
+ */
260
+ export namespace VendorUser$ {
261
+ /** @deprecated use `VendorUser$inboundSchema` instead. */
262
+ export const inboundSchema = VendorUser$inboundSchema;
263
+ /** @deprecated use `VendorUser$outboundSchema` instead. */
264
+ export const outboundSchema = VendorUser$outboundSchema;
265
+ /** @deprecated use `VendorUser$Outbound` instead. */
266
+ export type Outbound = VendorUser$Outbound;
267
+ }
268
+
269
+ export function vendorUserToJSON(vendorUser: VendorUser): string {
270
+ return JSON.stringify(VendorUser$outboundSchema.parse(vendorUser));
271
+ }
272
+
273
+ export function vendorUserFromJSON(
274
+ jsonString: string,
275
+ ): SafeParseResult<VendorUser, SDKValidationError> {
276
+ return safeParse(
277
+ jsonString,
278
+ (x) => VendorUser$inboundSchema.parse(JSON.parse(x)),
279
+ `Failed to parse 'VendorUser' from JSON`,
280
+ );
281
+ }
282
+
283
+ /** @internal */
284
+ export const VendorType1$inboundSchema: z.ZodType<
285
+ VendorType1,
286
+ z.ZodTypeDef,
287
+ unknown
288
+ > = z.object({
289
+ id: z.number().int().optional(),
290
+ name: z.string().optional(),
291
+ });
292
+
293
+ /** @internal */
294
+ export type VendorType1$Outbound = {
295
+ id?: number | undefined;
296
+ name?: string | undefined;
297
+ };
298
+
299
+ /** @internal */
300
+ export const VendorType1$outboundSchema: z.ZodType<
301
+ VendorType1$Outbound,
302
+ z.ZodTypeDef,
303
+ VendorType1
304
+ > = z.object({
305
+ id: z.number().int().optional(),
306
+ name: z.string().optional(),
307
+ });
308
+
309
+ /**
310
+ * @internal
311
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
312
+ */
313
+ export namespace VendorType1$ {
314
+ /** @deprecated use `VendorType1$inboundSchema` instead. */
315
+ export const inboundSchema = VendorType1$inboundSchema;
316
+ /** @deprecated use `VendorType1$outboundSchema` instead. */
317
+ export const outboundSchema = VendorType1$outboundSchema;
318
+ /** @deprecated use `VendorType1$Outbound` instead. */
319
+ export type Outbound = VendorType1$Outbound;
320
+ }
321
+
322
+ export function vendorType1ToJSON(vendorType1: VendorType1): string {
323
+ return JSON.stringify(VendorType1$outboundSchema.parse(vendorType1));
324
+ }
325
+
326
+ export function vendorType1FromJSON(
327
+ jsonString: string,
328
+ ): SafeParseResult<VendorType1, SDKValidationError> {
329
+ return safeParse(
330
+ jsonString,
331
+ (x) => VendorType1$inboundSchema.parse(JSON.parse(x)),
332
+ `Failed to parse 'VendorType1' from JSON`,
333
+ );
334
+ }
335
+
336
+ /** @internal */
337
+ export const VendorVendorType$inboundSchema: z.ZodType<
338
+ VendorVendorType,
339
+ z.ZodTypeDef,
340
+ unknown
341
+ > = z.union([z.lazy(() => VendorType1$inboundSchema), z.number().int()]);
342
+
343
+ /** @internal */
344
+ export type VendorVendorType$Outbound = VendorType1$Outbound | number;
345
+
346
+ /** @internal */
347
+ export const VendorVendorType$outboundSchema: z.ZodType<
348
+ VendorVendorType$Outbound,
349
+ z.ZodTypeDef,
350
+ VendorVendorType
351
+ > = z.union([z.lazy(() => VendorType1$outboundSchema), z.number().int()]);
352
+
353
+ /**
354
+ * @internal
355
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
356
+ */
357
+ export namespace VendorVendorType$ {
358
+ /** @deprecated use `VendorVendorType$inboundSchema` instead. */
359
+ export const inboundSchema = VendorVendorType$inboundSchema;
360
+ /** @deprecated use `VendorVendorType$outboundSchema` instead. */
361
+ export const outboundSchema = VendorVendorType$outboundSchema;
362
+ /** @deprecated use `VendorVendorType$Outbound` instead. */
363
+ export type Outbound = VendorVendorType$Outbound;
364
+ }
365
+
366
+ export function vendorVendorTypeToJSON(
367
+ vendorVendorType: VendorVendorType,
368
+ ): string {
369
+ return JSON.stringify(
370
+ VendorVendorType$outboundSchema.parse(vendorVendorType),
371
+ );
372
+ }
373
+
374
+ export function vendorVendorTypeFromJSON(
375
+ jsonString: string,
376
+ ): SafeParseResult<VendorVendorType, SDKValidationError> {
377
+ return safeParse(
378
+ jsonString,
379
+ (x) => VendorVendorType$inboundSchema.parse(JSON.parse(x)),
380
+ `Failed to parse 'VendorVendorType' from JSON`,
381
+ );
382
+ }
383
+
384
+ /** @internal */
385
+ export const Supervisor$inboundSchema: z.ZodType<
386
+ Supervisor,
387
+ z.ZodTypeDef,
388
+ unknown
389
+ > = z.object({
390
+ name: z.nullable(z.string()).optional(),
391
+ email: z.nullable(z.string()).optional(),
392
+ phone: z.nullable(z.string()).optional(),
393
+ });
394
+
395
+ /** @internal */
396
+ export type Supervisor$Outbound = {
397
+ name?: string | null | undefined;
398
+ email?: string | null | undefined;
399
+ phone?: string | null | undefined;
400
+ };
401
+
402
+ /** @internal */
403
+ export const Supervisor$outboundSchema: z.ZodType<
404
+ Supervisor$Outbound,
405
+ z.ZodTypeDef,
406
+ Supervisor
407
+ > = z.object({
408
+ name: z.nullable(z.string()).optional(),
409
+ email: z.nullable(z.string()).optional(),
410
+ phone: z.nullable(z.string()).optional(),
411
+ });
412
+
413
+ /**
414
+ * @internal
415
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
416
+ */
417
+ export namespace Supervisor$ {
418
+ /** @deprecated use `Supervisor$inboundSchema` instead. */
419
+ export const inboundSchema = Supervisor$inboundSchema;
420
+ /** @deprecated use `Supervisor$outboundSchema` instead. */
421
+ export const outboundSchema = Supervisor$outboundSchema;
422
+ /** @deprecated use `Supervisor$Outbound` instead. */
423
+ export type Outbound = Supervisor$Outbound;
424
+ }
425
+
426
+ export function supervisorToJSON(supervisor: Supervisor): string {
427
+ return JSON.stringify(Supervisor$outboundSchema.parse(supervisor));
428
+ }
429
+
430
+ export function supervisorFromJSON(
431
+ jsonString: string,
432
+ ): SafeParseResult<Supervisor, SDKValidationError> {
433
+ return safeParse(
434
+ jsonString,
435
+ (x) => Supervisor$inboundSchema.parse(JSON.parse(x)),
436
+ `Failed to parse 'Supervisor' from JSON`,
437
+ );
438
+ }
439
+
440
+ /** @internal */
441
+ export const PaymentProfile1$inboundSchema: z.ZodType<
442
+ PaymentProfile1,
443
+ z.ZodTypeDef,
444
+ unknown
445
+ > = z.object({
446
+ id: z.number().int().optional(),
447
+ is_valid: z.nullable(z.boolean()).optional(),
448
+ card_type: z.nullable(z.string()).optional(),
449
+ card_last4: z.nullable(z.string()).optional(),
450
+ is_dummy: z.nullable(z.boolean()).optional(),
451
+ profile_type: z.nullable(z.string()).optional(),
452
+ }).transform((v) => {
453
+ return remap$(v, {
454
+ "is_valid": "isValid",
455
+ "card_type": "cardType",
456
+ "card_last4": "cardLast4",
457
+ "is_dummy": "isDummy",
458
+ "profile_type": "profileType",
459
+ });
460
+ });
461
+
462
+ /** @internal */
463
+ export type PaymentProfile1$Outbound = {
464
+ id?: number | undefined;
465
+ is_valid?: boolean | null | undefined;
466
+ card_type?: string | null | undefined;
467
+ card_last4?: string | null | undefined;
468
+ is_dummy?: boolean | null | undefined;
469
+ profile_type?: string | null | undefined;
470
+ };
471
+
472
+ /** @internal */
473
+ export const PaymentProfile1$outboundSchema: z.ZodType<
474
+ PaymentProfile1$Outbound,
475
+ z.ZodTypeDef,
476
+ PaymentProfile1
477
+ > = z.object({
478
+ id: z.number().int().optional(),
479
+ isValid: z.nullable(z.boolean()).optional(),
480
+ cardType: z.nullable(z.string()).optional(),
481
+ cardLast4: z.nullable(z.string()).optional(),
482
+ isDummy: z.nullable(z.boolean()).optional(),
483
+ profileType: z.nullable(z.string()).optional(),
484
+ }).transform((v) => {
485
+ return remap$(v, {
486
+ isValid: "is_valid",
487
+ cardType: "card_type",
488
+ cardLast4: "card_last4",
489
+ isDummy: "is_dummy",
490
+ profileType: "profile_type",
491
+ });
492
+ });
493
+
494
+ /**
495
+ * @internal
496
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
497
+ */
498
+ export namespace PaymentProfile1$ {
499
+ /** @deprecated use `PaymentProfile1$inboundSchema` instead. */
500
+ export const inboundSchema = PaymentProfile1$inboundSchema;
501
+ /** @deprecated use `PaymentProfile1$outboundSchema` instead. */
502
+ export const outboundSchema = PaymentProfile1$outboundSchema;
503
+ /** @deprecated use `PaymentProfile1$Outbound` instead. */
504
+ export type Outbound = PaymentProfile1$Outbound;
505
+ }
506
+
507
+ export function paymentProfile1ToJSON(
508
+ paymentProfile1: PaymentProfile1,
509
+ ): string {
510
+ return JSON.stringify(PaymentProfile1$outboundSchema.parse(paymentProfile1));
511
+ }
512
+
513
+ export function paymentProfile1FromJSON(
514
+ jsonString: string,
515
+ ): SafeParseResult<PaymentProfile1, SDKValidationError> {
516
+ return safeParse(
517
+ jsonString,
518
+ (x) => PaymentProfile1$inboundSchema.parse(JSON.parse(x)),
519
+ `Failed to parse 'PaymentProfile1' from JSON`,
520
+ );
521
+ }
522
+
523
+ /** @internal */
524
+ export const PaymentProfilePaymentProfile$inboundSchema: z.ZodType<
525
+ PaymentProfilePaymentProfile,
526
+ z.ZodTypeDef,
527
+ unknown
528
+ > = z.union([z.lazy(() => PaymentProfile1$inboundSchema), z.number().int()]);
529
+
530
+ /** @internal */
531
+ export type PaymentProfilePaymentProfile$Outbound =
532
+ | PaymentProfile1$Outbound
533
+ | number;
534
+
535
+ /** @internal */
536
+ export const PaymentProfilePaymentProfile$outboundSchema: z.ZodType<
537
+ PaymentProfilePaymentProfile$Outbound,
538
+ z.ZodTypeDef,
539
+ PaymentProfilePaymentProfile
540
+ > = z.union([z.lazy(() => PaymentProfile1$outboundSchema), z.number().int()]);
541
+
542
+ /**
543
+ * @internal
544
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
545
+ */
546
+ export namespace PaymentProfilePaymentProfile$ {
547
+ /** @deprecated use `PaymentProfilePaymentProfile$inboundSchema` instead. */
548
+ export const inboundSchema = PaymentProfilePaymentProfile$inboundSchema;
549
+ /** @deprecated use `PaymentProfilePaymentProfile$outboundSchema` instead. */
550
+ export const outboundSchema = PaymentProfilePaymentProfile$outboundSchema;
551
+ /** @deprecated use `PaymentProfilePaymentProfile$Outbound` instead. */
552
+ export type Outbound = PaymentProfilePaymentProfile$Outbound;
553
+ }
554
+
555
+ export function paymentProfilePaymentProfileToJSON(
556
+ paymentProfilePaymentProfile: PaymentProfilePaymentProfile,
557
+ ): string {
558
+ return JSON.stringify(
559
+ PaymentProfilePaymentProfile$outboundSchema.parse(
560
+ paymentProfilePaymentProfile,
561
+ ),
562
+ );
563
+ }
564
+
565
+ export function paymentProfilePaymentProfileFromJSON(
566
+ jsonString: string,
567
+ ): SafeParseResult<PaymentProfilePaymentProfile, SDKValidationError> {
568
+ return safeParse(
569
+ jsonString,
570
+ (x) => PaymentProfilePaymentProfile$inboundSchema.parse(JSON.parse(x)),
571
+ `Failed to parse 'PaymentProfilePaymentProfile' from JSON`,
572
+ );
573
+ }
574
+
575
+ /** @internal */
576
+ export const PaymentProfile$inboundSchema: z.ZodType<
577
+ PaymentProfile,
578
+ z.ZodTypeDef,
579
+ unknown
580
+ > = z.union([
581
+ z.union([z.lazy(() => PaymentProfile1$inboundSchema), z.number().int()]),
582
+ z.number().int(),
583
+ ]);
584
+
585
+ /** @internal */
586
+ export type PaymentProfile$Outbound =
587
+ | PaymentProfile1$Outbound
588
+ | number
589
+ | number;
590
+
591
+ /** @internal */
592
+ export const PaymentProfile$outboundSchema: z.ZodType<
593
+ PaymentProfile$Outbound,
594
+ z.ZodTypeDef,
595
+ PaymentProfile
596
+ > = z.union([
597
+ z.union([z.lazy(() => PaymentProfile1$outboundSchema), z.number().int()]),
598
+ z.number().int(),
599
+ ]);
600
+
601
+ /**
602
+ * @internal
603
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
604
+ */
605
+ export namespace PaymentProfile$ {
606
+ /** @deprecated use `PaymentProfile$inboundSchema` instead. */
607
+ export const inboundSchema = PaymentProfile$inboundSchema;
608
+ /** @deprecated use `PaymentProfile$outboundSchema` instead. */
609
+ export const outboundSchema = PaymentProfile$outboundSchema;
610
+ /** @deprecated use `PaymentProfile$Outbound` instead. */
611
+ export type Outbound = PaymentProfile$Outbound;
612
+ }
613
+
614
+ export function paymentProfileToJSON(paymentProfile: PaymentProfile): string {
615
+ return JSON.stringify(PaymentProfile$outboundSchema.parse(paymentProfile));
616
+ }
617
+
618
+ export function paymentProfileFromJSON(
619
+ jsonString: string,
620
+ ): SafeParseResult<PaymentProfile, SDKValidationError> {
621
+ return safeParse(
622
+ jsonString,
623
+ (x) => PaymentProfile$inboundSchema.parse(JSON.parse(x)),
624
+ `Failed to parse 'PaymentProfile' from JSON`,
625
+ );
626
+ }
627
+
628
+ /** @internal */
629
+ export const PaymentResponsibility$inboundSchema: z.ZodType<
630
+ PaymentResponsibility,
631
+ z.ZodTypeDef,
632
+ unknown
633
+ > = z.object({
634
+ id: z.nullable(z.number().int()).optional(),
635
+ company_manager_id: z.nullable(z.number().int()).optional(),
636
+ credentialing_subscription: z.nullable(z.boolean()).optional(),
637
+ scrubs_subscription: z.nullable(z.boolean()).optional(),
638
+ scrub_credits: z.nullable(z.boolean()).optional(),
639
+ hard_badge_initial: z.nullable(z.boolean()).optional(),
640
+ hard_badge_extra: z.nullable(z.boolean()).optional(),
641
+ other_invoices: z.nullable(z.boolean()).optional(),
642
+ facility_id: z.nullable(z.number().int()).optional(),
643
+ company_id: z.nullable(z.number().int()).optional(),
644
+ credentialing_subscription_user_id: z.nullable(z.number().int()).optional(),
645
+ scrubs_subscription_user_id: z.nullable(z.number().int()).optional(),
646
+ scrub_credits_user_id: z.nullable(z.number().int()).optional(),
647
+ hard_badge_initial_user_id: z.nullable(z.number().int()).optional(),
648
+ hard_badge_extra_user_id: z.nullable(z.number().int()).optional(),
649
+ other_invoices_user_id: z.nullable(z.number().int()).optional(),
650
+ }).transform((v) => {
651
+ return remap$(v, {
652
+ "company_manager_id": "companyManagerId",
653
+ "credentialing_subscription": "credentialingSubscription",
654
+ "scrubs_subscription": "scrubsSubscription",
655
+ "scrub_credits": "scrubCredits",
656
+ "hard_badge_initial": "hardBadgeInitial",
657
+ "hard_badge_extra": "hardBadgeExtra",
658
+ "other_invoices": "otherInvoices",
659
+ "facility_id": "facilityId",
660
+ "company_id": "companyId",
661
+ "credentialing_subscription_user_id": "credentialingSubscriptionUserId",
662
+ "scrubs_subscription_user_id": "scrubsSubscriptionUserId",
663
+ "scrub_credits_user_id": "scrubCreditsUserId",
664
+ "hard_badge_initial_user_id": "hardBadgeInitialUserId",
665
+ "hard_badge_extra_user_id": "hardBadgeExtraUserId",
666
+ "other_invoices_user_id": "otherInvoicesUserId",
667
+ });
668
+ });
669
+
670
+ /** @internal */
671
+ export type PaymentResponsibility$Outbound = {
672
+ id?: number | null | undefined;
673
+ company_manager_id?: number | null | undefined;
674
+ credentialing_subscription?: boolean | null | undefined;
675
+ scrubs_subscription?: boolean | null | undefined;
676
+ scrub_credits?: boolean | null | undefined;
677
+ hard_badge_initial?: boolean | null | undefined;
678
+ hard_badge_extra?: boolean | null | undefined;
679
+ other_invoices?: boolean | null | undefined;
680
+ facility_id?: number | null | undefined;
681
+ company_id?: number | null | undefined;
682
+ credentialing_subscription_user_id?: number | null | undefined;
683
+ scrubs_subscription_user_id?: number | null | undefined;
684
+ scrub_credits_user_id?: number | null | undefined;
685
+ hard_badge_initial_user_id?: number | null | undefined;
686
+ hard_badge_extra_user_id?: number | null | undefined;
687
+ other_invoices_user_id?: number | null | undefined;
688
+ };
689
+
690
+ /** @internal */
691
+ export const PaymentResponsibility$outboundSchema: z.ZodType<
692
+ PaymentResponsibility$Outbound,
693
+ z.ZodTypeDef,
694
+ PaymentResponsibility
695
+ > = z.object({
696
+ id: z.nullable(z.number().int()).optional(),
697
+ companyManagerId: z.nullable(z.number().int()).optional(),
698
+ credentialingSubscription: z.nullable(z.boolean()).optional(),
699
+ scrubsSubscription: z.nullable(z.boolean()).optional(),
700
+ scrubCredits: z.nullable(z.boolean()).optional(),
701
+ hardBadgeInitial: z.nullable(z.boolean()).optional(),
702
+ hardBadgeExtra: z.nullable(z.boolean()).optional(),
703
+ otherInvoices: z.nullable(z.boolean()).optional(),
704
+ facilityId: z.nullable(z.number().int()).optional(),
705
+ companyId: z.nullable(z.number().int()).optional(),
706
+ credentialingSubscriptionUserId: z.nullable(z.number().int()).optional(),
707
+ scrubsSubscriptionUserId: z.nullable(z.number().int()).optional(),
708
+ scrubCreditsUserId: z.nullable(z.number().int()).optional(),
709
+ hardBadgeInitialUserId: z.nullable(z.number().int()).optional(),
710
+ hardBadgeExtraUserId: z.nullable(z.number().int()).optional(),
711
+ otherInvoicesUserId: z.nullable(z.number().int()).optional(),
712
+ }).transform((v) => {
713
+ return remap$(v, {
714
+ companyManagerId: "company_manager_id",
715
+ credentialingSubscription: "credentialing_subscription",
716
+ scrubsSubscription: "scrubs_subscription",
717
+ scrubCredits: "scrub_credits",
718
+ hardBadgeInitial: "hard_badge_initial",
719
+ hardBadgeExtra: "hard_badge_extra",
720
+ otherInvoices: "other_invoices",
721
+ facilityId: "facility_id",
722
+ companyId: "company_id",
723
+ credentialingSubscriptionUserId: "credentialing_subscription_user_id",
724
+ scrubsSubscriptionUserId: "scrubs_subscription_user_id",
725
+ scrubCreditsUserId: "scrub_credits_user_id",
726
+ hardBadgeInitialUserId: "hard_badge_initial_user_id",
727
+ hardBadgeExtraUserId: "hard_badge_extra_user_id",
728
+ otherInvoicesUserId: "other_invoices_user_id",
729
+ });
730
+ });
731
+
732
+ /**
733
+ * @internal
734
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
735
+ */
736
+ export namespace PaymentResponsibility$ {
737
+ /** @deprecated use `PaymentResponsibility$inboundSchema` instead. */
738
+ export const inboundSchema = PaymentResponsibility$inboundSchema;
739
+ /** @deprecated use `PaymentResponsibility$outboundSchema` instead. */
740
+ export const outboundSchema = PaymentResponsibility$outboundSchema;
741
+ /** @deprecated use `PaymentResponsibility$Outbound` instead. */
742
+ export type Outbound = PaymentResponsibility$Outbound;
743
+ }
744
+
745
+ export function paymentResponsibilityToJSON(
746
+ paymentResponsibility: PaymentResponsibility,
747
+ ): string {
748
+ return JSON.stringify(
749
+ PaymentResponsibility$outboundSchema.parse(paymentResponsibility),
750
+ );
751
+ }
752
+
753
+ export function paymentResponsibilityFromJSON(
754
+ jsonString: string,
755
+ ): SafeParseResult<PaymentResponsibility, SDKValidationError> {
756
+ return safeParse(
757
+ jsonString,
758
+ (x) => PaymentResponsibility$inboundSchema.parse(JSON.parse(x)),
759
+ `Failed to parse 'PaymentResponsibility' from JSON`,
760
+ );
761
+ }
762
+
763
+ /** @internal */
764
+ export const Vendor$inboundSchema: z.ZodType<Vendor, z.ZodTypeDef, unknown> = z
765
+ .object({
766
+ id: z.number().int().optional(),
767
+ email_recepient: z.nullable(z.string()).optional(),
768
+ send_weekly_summary_email: z.nullable(z.boolean()).optional(),
769
+ title: z.nullable(z.string()).optional(),
770
+ user: z.union([z.lazy(() => One$inboundSchema), z.number().int()])
771
+ .optional(),
772
+ vendor_type: z.nullable(
773
+ z.union([z.lazy(() => VendorType1$inboundSchema), z.number().int()]),
774
+ ).optional(),
775
+ supervisor: z.lazy(() => Supervisor$inboundSchema).optional(),
776
+ qr_code: z.nullable(z.string()).optional(),
777
+ head_shot: z.nullable(ImageSet$inboundSchema).optional(),
778
+ drivers_license: z.nullable(ImageSet$inboundSchema).optional(),
779
+ image_urls: z.nullable(ImageSet$inboundSchema).optional(),
780
+ payment_profile: z.nullable(
781
+ z.union([
782
+ z.union([
783
+ z.lazy(() => PaymentProfile1$inboundSchema),
784
+ z.number().int(),
785
+ ]),
786
+ z.number().int(),
787
+ ]),
788
+ ).optional(),
789
+ primary_facility: z.nullable(Facility$inboundSchema).optional(),
790
+ primary_department: z.nullable(Department$inboundSchema).optional(),
791
+ company: z.nullable(Company$inboundSchema).optional(),
792
+ credentialing_subscription: z.nullable(Subscription$inboundSchema)
793
+ .optional(),
794
+ scrubs_subscription: z.nullable(Subscription$inboundSchema).optional(),
795
+ payment_responsibility: z.nullable(
796
+ z.lazy(() => PaymentResponsibility$inboundSchema),
797
+ ).optional(),
798
+ background_check_date_expires: z.nullable(z.string()).optional(),
799
+ }).transform((v) => {
800
+ return remap$(v, {
801
+ "email_recepient": "emailRecepient",
802
+ "send_weekly_summary_email": "sendWeeklySummaryEmail",
803
+ "vendor_type": "vendorType",
804
+ "qr_code": "qrCode",
805
+ "head_shot": "headShot",
806
+ "drivers_license": "driversLicense",
807
+ "image_urls": "imageUrls",
808
+ "payment_profile": "paymentProfile",
809
+ "primary_facility": "primaryFacility",
810
+ "primary_department": "primaryDepartment",
811
+ "credentialing_subscription": "credentialingSubscription",
812
+ "scrubs_subscription": "scrubsSubscription",
813
+ "payment_responsibility": "paymentResponsibility",
814
+ "background_check_date_expires": "backgroundCheckDateExpires",
815
+ });
816
+ });
817
+
818
+ /** @internal */
819
+ export type Vendor$Outbound = {
820
+ id?: number | undefined;
821
+ email_recepient?: string | null | undefined;
822
+ send_weekly_summary_email?: boolean | null | undefined;
823
+ title?: string | null | undefined;
824
+ user?: One$Outbound | number | undefined;
825
+ vendor_type?: VendorType1$Outbound | number | null | undefined;
826
+ supervisor?: Supervisor$Outbound | undefined;
827
+ qr_code?: string | null | undefined;
828
+ head_shot?: ImageSet$Outbound | null | undefined;
829
+ drivers_license?: ImageSet$Outbound | null | undefined;
830
+ image_urls?: ImageSet$Outbound | null | undefined;
831
+ payment_profile?:
832
+ | PaymentProfile1$Outbound
833
+ | number
834
+ | number
835
+ | null
836
+ | undefined;
837
+ primary_facility?: Facility$Outbound | null | undefined;
838
+ primary_department?: Department$Outbound | null | undefined;
839
+ company?: Company$Outbound | null | undefined;
840
+ credentialing_subscription?: Subscription$Outbound | null | undefined;
841
+ scrubs_subscription?: Subscription$Outbound | null | undefined;
842
+ payment_responsibility?: PaymentResponsibility$Outbound | null | undefined;
843
+ background_check_date_expires?: string | null | undefined;
844
+ };
845
+
846
+ /** @internal */
847
+ export const Vendor$outboundSchema: z.ZodType<
848
+ Vendor$Outbound,
849
+ z.ZodTypeDef,
850
+ Vendor
851
+ > = z.object({
852
+ id: z.number().int().optional(),
853
+ emailRecepient: z.nullable(z.string()).optional(),
854
+ sendWeeklySummaryEmail: z.nullable(z.boolean()).optional(),
855
+ title: z.nullable(z.string()).optional(),
856
+ user: z.union([z.lazy(() => One$outboundSchema), z.number().int()])
857
+ .optional(),
858
+ vendorType: z.nullable(
859
+ z.union([z.lazy(() => VendorType1$outboundSchema), z.number().int()]),
860
+ ).optional(),
861
+ supervisor: z.lazy(() => Supervisor$outboundSchema).optional(),
862
+ qrCode: z.nullable(z.string()).optional(),
863
+ headShot: z.nullable(ImageSet$outboundSchema).optional(),
864
+ driversLicense: z.nullable(ImageSet$outboundSchema).optional(),
865
+ imageUrls: z.nullable(ImageSet$outboundSchema).optional(),
866
+ paymentProfile: z.nullable(
867
+ z.union([
868
+ z.union([z.lazy(() => PaymentProfile1$outboundSchema), z.number().int()]),
869
+ z.number().int(),
870
+ ]),
871
+ ).optional(),
872
+ primaryFacility: z.nullable(Facility$outboundSchema).optional(),
873
+ primaryDepartment: z.nullable(Department$outboundSchema).optional(),
874
+ company: z.nullable(Company$outboundSchema).optional(),
875
+ credentialingSubscription: z.nullable(Subscription$outboundSchema).optional(),
876
+ scrubsSubscription: z.nullable(Subscription$outboundSchema).optional(),
877
+ paymentResponsibility: z.nullable(
878
+ z.lazy(() => PaymentResponsibility$outboundSchema),
879
+ ).optional(),
880
+ backgroundCheckDateExpires: z.nullable(z.string()).optional(),
881
+ }).transform((v) => {
882
+ return remap$(v, {
883
+ emailRecepient: "email_recepient",
884
+ sendWeeklySummaryEmail: "send_weekly_summary_email",
885
+ vendorType: "vendor_type",
886
+ qrCode: "qr_code",
887
+ headShot: "head_shot",
888
+ driversLicense: "drivers_license",
889
+ imageUrls: "image_urls",
890
+ paymentProfile: "payment_profile",
891
+ primaryFacility: "primary_facility",
892
+ primaryDepartment: "primary_department",
893
+ credentialingSubscription: "credentialing_subscription",
894
+ scrubsSubscription: "scrubs_subscription",
895
+ paymentResponsibility: "payment_responsibility",
896
+ backgroundCheckDateExpires: "background_check_date_expires",
897
+ });
898
+ });
899
+
900
+ /**
901
+ * @internal
902
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
903
+ */
904
+ export namespace Vendor$ {
905
+ /** @deprecated use `Vendor$inboundSchema` instead. */
906
+ export const inboundSchema = Vendor$inboundSchema;
907
+ /** @deprecated use `Vendor$outboundSchema` instead. */
908
+ export const outboundSchema = Vendor$outboundSchema;
909
+ /** @deprecated use `Vendor$Outbound` instead. */
910
+ export type Outbound = Vendor$Outbound;
911
+ }
912
+
913
+ export function vendorToJSON(vendor: Vendor): string {
914
+ return JSON.stringify(Vendor$outboundSchema.parse(vendor));
915
+ }
916
+
917
+ export function vendorFromJSON(
918
+ jsonString: string,
919
+ ): SafeParseResult<Vendor, SDKValidationError> {
920
+ return safeParse(
921
+ jsonString,
922
+ (x) => Vendor$inboundSchema.parse(JSON.parse(x)),
923
+ `Failed to parse 'Vendor' from JSON`,
924
+ );
925
+ }