@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,108 @@
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
+ * A representation of a vendor facility status view
13
+ */
14
+ export type VendorFacilityStatusView = {
15
+ vendorId?: number | undefined;
16
+ facilityId?: number | undefined;
17
+ facilityName?: string | undefined;
18
+ facilityStatus?: string | null | undefined;
19
+ vendorScanId?: number | null | undefined;
20
+ vendorScanType?: number | null | undefined;
21
+ };
22
+
23
+ /** @internal */
24
+ export const VendorFacilityStatusView$inboundSchema: z.ZodType<
25
+ VendorFacilityStatusView,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ vendor_id: z.number().int().optional(),
30
+ facility_id: z.number().int().optional(),
31
+ facility_name: z.string().optional(),
32
+ facility_status: z.nullable(z.string()).optional(),
33
+ vendor_scan_id: z.nullable(z.number().int()).optional(),
34
+ vendor_scan_type: z.nullable(z.number().int()).optional(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "vendor_id": "vendorId",
38
+ "facility_id": "facilityId",
39
+ "facility_name": "facilityName",
40
+ "facility_status": "facilityStatus",
41
+ "vendor_scan_id": "vendorScanId",
42
+ "vendor_scan_type": "vendorScanType",
43
+ });
44
+ });
45
+
46
+ /** @internal */
47
+ export type VendorFacilityStatusView$Outbound = {
48
+ vendor_id?: number | undefined;
49
+ facility_id?: number | undefined;
50
+ facility_name?: string | undefined;
51
+ facility_status?: string | null | undefined;
52
+ vendor_scan_id?: number | null | undefined;
53
+ vendor_scan_type?: number | null | undefined;
54
+ };
55
+
56
+ /** @internal */
57
+ export const VendorFacilityStatusView$outboundSchema: z.ZodType<
58
+ VendorFacilityStatusView$Outbound,
59
+ z.ZodTypeDef,
60
+ VendorFacilityStatusView
61
+ > = z.object({
62
+ vendorId: z.number().int().optional(),
63
+ facilityId: z.number().int().optional(),
64
+ facilityName: z.string().optional(),
65
+ facilityStatus: z.nullable(z.string()).optional(),
66
+ vendorScanId: z.nullable(z.number().int()).optional(),
67
+ vendorScanType: z.nullable(z.number().int()).optional(),
68
+ }).transform((v) => {
69
+ return remap$(v, {
70
+ vendorId: "vendor_id",
71
+ facilityId: "facility_id",
72
+ facilityName: "facility_name",
73
+ facilityStatus: "facility_status",
74
+ vendorScanId: "vendor_scan_id",
75
+ vendorScanType: "vendor_scan_type",
76
+ });
77
+ });
78
+
79
+ /**
80
+ * @internal
81
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
82
+ */
83
+ export namespace VendorFacilityStatusView$ {
84
+ /** @deprecated use `VendorFacilityStatusView$inboundSchema` instead. */
85
+ export const inboundSchema = VendorFacilityStatusView$inboundSchema;
86
+ /** @deprecated use `VendorFacilityStatusView$outboundSchema` instead. */
87
+ export const outboundSchema = VendorFacilityStatusView$outboundSchema;
88
+ /** @deprecated use `VendorFacilityStatusView$Outbound` instead. */
89
+ export type Outbound = VendorFacilityStatusView$Outbound;
90
+ }
91
+
92
+ export function vendorFacilityStatusViewToJSON(
93
+ vendorFacilityStatusView: VendorFacilityStatusView,
94
+ ): string {
95
+ return JSON.stringify(
96
+ VendorFacilityStatusView$outboundSchema.parse(vendorFacilityStatusView),
97
+ );
98
+ }
99
+
100
+ export function vendorFacilityStatusViewFromJSON(
101
+ jsonString: string,
102
+ ): SafeParseResult<VendorFacilityStatusView, SDKValidationError> {
103
+ return safeParse(
104
+ jsonString,
105
+ (x) => VendorFacilityStatusView$inboundSchema.parse(JSON.parse(x)),
106
+ `Failed to parse 'VendorFacilityStatusView' from JSON`,
107
+ );
108
+ }
@@ -0,0 +1,108 @@
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
+ * List of attributes of Vendor Scrub Details
13
+ */
14
+ export type VendorScrubDetails = {
15
+ scrubTopSize?: string | null | undefined;
16
+ scrubBottomSize?: string | null | undefined;
17
+ scrubColor?: string | null | undefined;
18
+ totalCredits?: number | null | undefined;
19
+ totalDebits?: number | null | undefined;
20
+ scrubCredits?: number | null | undefined;
21
+ };
22
+
23
+ /** @internal */
24
+ export const VendorScrubDetails$inboundSchema: z.ZodType<
25
+ VendorScrubDetails,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ scrub_top_size: z.nullable(z.string()).optional(),
30
+ scrub_bottom_size: z.nullable(z.string()).optional(),
31
+ scrub_color: z.nullable(z.string()).optional(),
32
+ total_credits: z.nullable(z.number().int()).optional(),
33
+ total_debits: z.nullable(z.number().int()).optional(),
34
+ scrub_credits: z.nullable(z.number().int()).optional(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "scrub_top_size": "scrubTopSize",
38
+ "scrub_bottom_size": "scrubBottomSize",
39
+ "scrub_color": "scrubColor",
40
+ "total_credits": "totalCredits",
41
+ "total_debits": "totalDebits",
42
+ "scrub_credits": "scrubCredits",
43
+ });
44
+ });
45
+
46
+ /** @internal */
47
+ export type VendorScrubDetails$Outbound = {
48
+ scrub_top_size?: string | null | undefined;
49
+ scrub_bottom_size?: string | null | undefined;
50
+ scrub_color?: string | null | undefined;
51
+ total_credits?: number | null | undefined;
52
+ total_debits?: number | null | undefined;
53
+ scrub_credits?: number | null | undefined;
54
+ };
55
+
56
+ /** @internal */
57
+ export const VendorScrubDetails$outboundSchema: z.ZodType<
58
+ VendorScrubDetails$Outbound,
59
+ z.ZodTypeDef,
60
+ VendorScrubDetails
61
+ > = z.object({
62
+ scrubTopSize: z.nullable(z.string()).optional(),
63
+ scrubBottomSize: z.nullable(z.string()).optional(),
64
+ scrubColor: z.nullable(z.string()).optional(),
65
+ totalCredits: z.nullable(z.number().int()).optional(),
66
+ totalDebits: z.nullable(z.number().int()).optional(),
67
+ scrubCredits: z.nullable(z.number().int()).optional(),
68
+ }).transform((v) => {
69
+ return remap$(v, {
70
+ scrubTopSize: "scrub_top_size",
71
+ scrubBottomSize: "scrub_bottom_size",
72
+ scrubColor: "scrub_color",
73
+ totalCredits: "total_credits",
74
+ totalDebits: "total_debits",
75
+ scrubCredits: "scrub_credits",
76
+ });
77
+ });
78
+
79
+ /**
80
+ * @internal
81
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
82
+ */
83
+ export namespace VendorScrubDetails$ {
84
+ /** @deprecated use `VendorScrubDetails$inboundSchema` instead. */
85
+ export const inboundSchema = VendorScrubDetails$inboundSchema;
86
+ /** @deprecated use `VendorScrubDetails$outboundSchema` instead. */
87
+ export const outboundSchema = VendorScrubDetails$outboundSchema;
88
+ /** @deprecated use `VendorScrubDetails$Outbound` instead. */
89
+ export type Outbound = VendorScrubDetails$Outbound;
90
+ }
91
+
92
+ export function vendorScrubDetailsToJSON(
93
+ vendorScrubDetails: VendorScrubDetails,
94
+ ): string {
95
+ return JSON.stringify(
96
+ VendorScrubDetails$outboundSchema.parse(vendorScrubDetails),
97
+ );
98
+ }
99
+
100
+ export function vendorScrubDetailsFromJSON(
101
+ jsonString: string,
102
+ ): SafeParseResult<VendorScrubDetails, SDKValidationError> {
103
+ return safeParse(
104
+ jsonString,
105
+ (x) => VendorScrubDetails$inboundSchema.parse(JSON.parse(x)),
106
+ `Failed to parse 'VendorScrubDetails' from JSON`,
107
+ );
108
+ }
@@ -0,0 +1,90 @@
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 Vendor ScrubPurchase record
13
+ */
14
+ export type VendorScrubPurchase = {
15
+ id?: number | undefined;
16
+ purchaseDate?: string | null | undefined;
17
+ quantity?: number | null | undefined;
18
+ total?: number | null | undefined;
19
+ };
20
+
21
+ /** @internal */
22
+ export const VendorScrubPurchase$inboundSchema: z.ZodType<
23
+ VendorScrubPurchase,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ id: z.number().int().optional(),
28
+ purchase_date: z.nullable(z.string()).optional(),
29
+ quantity: z.nullable(z.number().int()).optional(),
30
+ total: z.nullable(z.number().int()).optional(),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "purchase_date": "purchaseDate",
34
+ });
35
+ });
36
+
37
+ /** @internal */
38
+ export type VendorScrubPurchase$Outbound = {
39
+ id?: number | undefined;
40
+ purchase_date?: string | null | undefined;
41
+ quantity?: number | null | undefined;
42
+ total?: number | null | undefined;
43
+ };
44
+
45
+ /** @internal */
46
+ export const VendorScrubPurchase$outboundSchema: z.ZodType<
47
+ VendorScrubPurchase$Outbound,
48
+ z.ZodTypeDef,
49
+ VendorScrubPurchase
50
+ > = z.object({
51
+ id: z.number().int().optional(),
52
+ purchaseDate: z.nullable(z.string()).optional(),
53
+ quantity: z.nullable(z.number().int()).optional(),
54
+ total: z.nullable(z.number().int()).optional(),
55
+ }).transform((v) => {
56
+ return remap$(v, {
57
+ purchaseDate: "purchase_date",
58
+ });
59
+ });
60
+
61
+ /**
62
+ * @internal
63
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
64
+ */
65
+ export namespace VendorScrubPurchase$ {
66
+ /** @deprecated use `VendorScrubPurchase$inboundSchema` instead. */
67
+ export const inboundSchema = VendorScrubPurchase$inboundSchema;
68
+ /** @deprecated use `VendorScrubPurchase$outboundSchema` instead. */
69
+ export const outboundSchema = VendorScrubPurchase$outboundSchema;
70
+ /** @deprecated use `VendorScrubPurchase$Outbound` instead. */
71
+ export type Outbound = VendorScrubPurchase$Outbound;
72
+ }
73
+
74
+ export function vendorScrubPurchaseToJSON(
75
+ vendorScrubPurchase: VendorScrubPurchase,
76
+ ): string {
77
+ return JSON.stringify(
78
+ VendorScrubPurchase$outboundSchema.parse(vendorScrubPurchase),
79
+ );
80
+ }
81
+
82
+ export function vendorScrubPurchaseFromJSON(
83
+ jsonString: string,
84
+ ): SafeParseResult<VendorScrubPurchase, SDKValidationError> {
85
+ return safeParse(
86
+ jsonString,
87
+ (x) => VendorScrubPurchase$inboundSchema.parse(JSON.parse(x)),
88
+ `Failed to parse 'VendorScrubPurchase' from JSON`,
89
+ );
90
+ }
@@ -0,0 +1,244 @@
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 { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * The signature algorithm which will be used by you to verify the content of the webhook was actually sent by Green Security LLC.
14
+ */
15
+ export const SignatureAlgo = {
16
+ SigHmacSha256: "sig_hmac_sha256",
17
+ } as const;
18
+ /**
19
+ * The signature algorithm which will be used by you to verify the content of the webhook was actually sent by Green Security LLC.
20
+ */
21
+ export type SignatureAlgo = ClosedEnum<typeof SignatureAlgo>;
22
+
23
+ /**
24
+ * Identifies which consumers will receive events for this webhook. This should be treated as a union (meaning multiple settings are considered an OR operation).
25
+ */
26
+ export type Consumers = {
27
+ /**
28
+ * A unique identifier for a health system. If specified, this webhook will fire for all facilities within the specified health system.
29
+ */
30
+ systemId?: number | null | undefined;
31
+ /**
32
+ * A unique identifier for a hospital facility. If specified, this webhook will fire for any events matching this facility.
33
+ */
34
+ facilityId?: number | null | undefined;
35
+ /**
36
+ * A unique identifier for a company. If specified, this webhook will fire for any event related to this company.
37
+ */
38
+ companyId?: number | null | undefined;
39
+ /**
40
+ * A unique identifier for a specific user. If specified, this webhook will fire for any event for this specific user.
41
+ */
42
+ userId?: number | null | undefined;
43
+ };
44
+
45
+ /**
46
+ * A simplified representation of a WebhookEndpoint, typically used in list views.
47
+ */
48
+ export type WebhookEndpoint = {
49
+ /**
50
+ * Unique identifier for the object.
51
+ */
52
+ id: number;
53
+ /**
54
+ * The URL of the webhook endpoint.
55
+ */
56
+ webhookUrl: string;
57
+ /**
58
+ * The signature algorithm which will be used by you to verify the content of the webhook was actually sent by Green Security LLC.
59
+ */
60
+ signatureAlgo?: SignatureAlgo | undefined;
61
+ /**
62
+ * The list of events to enable for this endpoint.
63
+ */
64
+ subscriptions: Array<string> | null;
65
+ /**
66
+ * Identifies which consumers will receive events for this webhook. This should be treated as a union (meaning multiple settings are considered an OR operation).
67
+ */
68
+ consumers: Consumers;
69
+ /**
70
+ * The endpoint’s secret, used to generate webhook signatures. Only returned at creation.
71
+ */
72
+ secrets?: Array<string> | null | undefined;
73
+ };
74
+
75
+ /** @internal */
76
+ export const SignatureAlgo$inboundSchema: z.ZodNativeEnum<
77
+ typeof SignatureAlgo
78
+ > = z.nativeEnum(SignatureAlgo);
79
+
80
+ /** @internal */
81
+ export const SignatureAlgo$outboundSchema: z.ZodNativeEnum<
82
+ typeof SignatureAlgo
83
+ > = SignatureAlgo$inboundSchema;
84
+
85
+ /**
86
+ * @internal
87
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
88
+ */
89
+ export namespace SignatureAlgo$ {
90
+ /** @deprecated use `SignatureAlgo$inboundSchema` instead. */
91
+ export const inboundSchema = SignatureAlgo$inboundSchema;
92
+ /** @deprecated use `SignatureAlgo$outboundSchema` instead. */
93
+ export const outboundSchema = SignatureAlgo$outboundSchema;
94
+ }
95
+
96
+ /** @internal */
97
+ export const Consumers$inboundSchema: z.ZodType<
98
+ Consumers,
99
+ z.ZodTypeDef,
100
+ unknown
101
+ > = z.object({
102
+ system_id: z.nullable(z.number().int()).optional(),
103
+ facility_id: z.nullable(z.number().int()).optional(),
104
+ company_id: z.nullable(z.number().int()).optional(),
105
+ user_id: z.nullable(z.number().int()).optional(),
106
+ }).transform((v) => {
107
+ return remap$(v, {
108
+ "system_id": "systemId",
109
+ "facility_id": "facilityId",
110
+ "company_id": "companyId",
111
+ "user_id": "userId",
112
+ });
113
+ });
114
+
115
+ /** @internal */
116
+ export type Consumers$Outbound = {
117
+ system_id?: number | null | undefined;
118
+ facility_id?: number | null | undefined;
119
+ company_id?: number | null | undefined;
120
+ user_id?: number | null | undefined;
121
+ };
122
+
123
+ /** @internal */
124
+ export const Consumers$outboundSchema: z.ZodType<
125
+ Consumers$Outbound,
126
+ z.ZodTypeDef,
127
+ Consumers
128
+ > = z.object({
129
+ systemId: z.nullable(z.number().int()).optional(),
130
+ facilityId: z.nullable(z.number().int()).optional(),
131
+ companyId: z.nullable(z.number().int()).optional(),
132
+ userId: z.nullable(z.number().int()).optional(),
133
+ }).transform((v) => {
134
+ return remap$(v, {
135
+ systemId: "system_id",
136
+ facilityId: "facility_id",
137
+ companyId: "company_id",
138
+ userId: "user_id",
139
+ });
140
+ });
141
+
142
+ /**
143
+ * @internal
144
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
145
+ */
146
+ export namespace Consumers$ {
147
+ /** @deprecated use `Consumers$inboundSchema` instead. */
148
+ export const inboundSchema = Consumers$inboundSchema;
149
+ /** @deprecated use `Consumers$outboundSchema` instead. */
150
+ export const outboundSchema = Consumers$outboundSchema;
151
+ /** @deprecated use `Consumers$Outbound` instead. */
152
+ export type Outbound = Consumers$Outbound;
153
+ }
154
+
155
+ export function consumersToJSON(consumers: Consumers): string {
156
+ return JSON.stringify(Consumers$outboundSchema.parse(consumers));
157
+ }
158
+
159
+ export function consumersFromJSON(
160
+ jsonString: string,
161
+ ): SafeParseResult<Consumers, SDKValidationError> {
162
+ return safeParse(
163
+ jsonString,
164
+ (x) => Consumers$inboundSchema.parse(JSON.parse(x)),
165
+ `Failed to parse 'Consumers' from JSON`,
166
+ );
167
+ }
168
+
169
+ /** @internal */
170
+ export const WebhookEndpoint$inboundSchema: z.ZodType<
171
+ WebhookEndpoint,
172
+ z.ZodTypeDef,
173
+ unknown
174
+ > = z.object({
175
+ id: z.number().int(),
176
+ webhook_url: z.string(),
177
+ signature_algo: SignatureAlgo$inboundSchema.default("sig_hmac_sha256"),
178
+ subscriptions: z.nullable(z.array(z.string())),
179
+ consumers: z.lazy(() => Consumers$inboundSchema),
180
+ secrets: z.nullable(z.array(z.string())).optional(),
181
+ }).transform((v) => {
182
+ return remap$(v, {
183
+ "webhook_url": "webhookUrl",
184
+ "signature_algo": "signatureAlgo",
185
+ });
186
+ });
187
+
188
+ /** @internal */
189
+ export type WebhookEndpoint$Outbound = {
190
+ id: number;
191
+ webhook_url: string;
192
+ signature_algo: string;
193
+ subscriptions: Array<string> | null;
194
+ consumers: Consumers$Outbound;
195
+ secrets?: Array<string> | null | undefined;
196
+ };
197
+
198
+ /** @internal */
199
+ export const WebhookEndpoint$outboundSchema: z.ZodType<
200
+ WebhookEndpoint$Outbound,
201
+ z.ZodTypeDef,
202
+ WebhookEndpoint
203
+ > = z.object({
204
+ id: z.number().int(),
205
+ webhookUrl: z.string(),
206
+ signatureAlgo: SignatureAlgo$outboundSchema.default("sig_hmac_sha256"),
207
+ subscriptions: z.nullable(z.array(z.string())),
208
+ consumers: z.lazy(() => Consumers$outboundSchema),
209
+ secrets: z.nullable(z.array(z.string())).optional(),
210
+ }).transform((v) => {
211
+ return remap$(v, {
212
+ webhookUrl: "webhook_url",
213
+ signatureAlgo: "signature_algo",
214
+ });
215
+ });
216
+
217
+ /**
218
+ * @internal
219
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
220
+ */
221
+ export namespace WebhookEndpoint$ {
222
+ /** @deprecated use `WebhookEndpoint$inboundSchema` instead. */
223
+ export const inboundSchema = WebhookEndpoint$inboundSchema;
224
+ /** @deprecated use `WebhookEndpoint$outboundSchema` instead. */
225
+ export const outboundSchema = WebhookEndpoint$outboundSchema;
226
+ /** @deprecated use `WebhookEndpoint$Outbound` instead. */
227
+ export type Outbound = WebhookEndpoint$Outbound;
228
+ }
229
+
230
+ export function webhookEndpointToJSON(
231
+ webhookEndpoint: WebhookEndpoint,
232
+ ): string {
233
+ return JSON.stringify(WebhookEndpoint$outboundSchema.parse(webhookEndpoint));
234
+ }
235
+
236
+ export function webhookEndpointFromJSON(
237
+ jsonString: string,
238
+ ): SafeParseResult<WebhookEndpoint, SDKValidationError> {
239
+ return safeParse(
240
+ jsonString,
241
+ (x) => WebhookEndpoint$inboundSchema.parse(JSON.parse(x)),
242
+ `Failed to parse 'WebhookEndpoint' from JSON`,
243
+ );
244
+ }
@@ -0,0 +1,86 @@
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 * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type GetVendorsDetailsRequest = {
13
+ /**
14
+ * Either the ID of the vendor rep or the keyword "me" to represent the current vendor.
15
+ */
16
+ vendorIdOrMe: string;
17
+ /**
18
+ * An array-style parameter to identify which sections of an object to expand. See documentation for the endpoint for a list of valid expansion values.
19
+ */
20
+ expand?: Array<components.Expand> | undefined;
21
+ };
22
+
23
+ /** @internal */
24
+ export const GetVendorsDetailsRequest$inboundSchema: z.ZodType<
25
+ GetVendorsDetailsRequest,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ vendor_id_or_me: z.string(),
30
+ expand: z.array(components.Expand$inboundSchema).optional(),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "vendor_id_or_me": "vendorIdOrMe",
34
+ });
35
+ });
36
+
37
+ /** @internal */
38
+ export type GetVendorsDetailsRequest$Outbound = {
39
+ vendor_id_or_me: string;
40
+ expand?: Array<string> | undefined;
41
+ };
42
+
43
+ /** @internal */
44
+ export const GetVendorsDetailsRequest$outboundSchema: z.ZodType<
45
+ GetVendorsDetailsRequest$Outbound,
46
+ z.ZodTypeDef,
47
+ GetVendorsDetailsRequest
48
+ > = z.object({
49
+ vendorIdOrMe: z.string(),
50
+ expand: z.array(components.Expand$outboundSchema).optional(),
51
+ }).transform((v) => {
52
+ return remap$(v, {
53
+ vendorIdOrMe: "vendor_id_or_me",
54
+ });
55
+ });
56
+
57
+ /**
58
+ * @internal
59
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
+ */
61
+ export namespace GetVendorsDetailsRequest$ {
62
+ /** @deprecated use `GetVendorsDetailsRequest$inboundSchema` instead. */
63
+ export const inboundSchema = GetVendorsDetailsRequest$inboundSchema;
64
+ /** @deprecated use `GetVendorsDetailsRequest$outboundSchema` instead. */
65
+ export const outboundSchema = GetVendorsDetailsRequest$outboundSchema;
66
+ /** @deprecated use `GetVendorsDetailsRequest$Outbound` instead. */
67
+ export type Outbound = GetVendorsDetailsRequest$Outbound;
68
+ }
69
+
70
+ export function getVendorsDetailsRequestToJSON(
71
+ getVendorsDetailsRequest: GetVendorsDetailsRequest,
72
+ ): string {
73
+ return JSON.stringify(
74
+ GetVendorsDetailsRequest$outboundSchema.parse(getVendorsDetailsRequest),
75
+ );
76
+ }
77
+
78
+ export function getVendorsDetailsRequestFromJSON(
79
+ jsonString: string,
80
+ ): SafeParseResult<GetVendorsDetailsRequest, SDKValidationError> {
81
+ return safeParse(
82
+ jsonString,
83
+ (x) => GetVendorsDetailsRequest$inboundSchema.parse(JSON.parse(x)),
84
+ `Failed to parse 'GetVendorsDetailsRequest' from JSON`,
85
+ );
86
+ }