@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
@@ -9,7 +9,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { RFCDate } from "../../types/rfcdate.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
- export type Location = {
12
+ export type CompanyLocation = {
13
13
  address: string | null;
14
14
  phone?: string | null | undefined;
15
15
  city?: string | null | undefined;
@@ -48,15 +48,15 @@ export type Company = {
48
48
  name: string | null;
49
49
  status?: string | null | undefined;
50
50
  creditBalance?: string | null | undefined;
51
- location?: Location | null | undefined;
51
+ location?: CompanyLocation | null | undefined;
52
52
  contact?: CompanyContact | undefined;
53
53
  tax?: Tax | undefined;
54
54
  stats?: Stats | undefined;
55
55
  };
56
56
 
57
57
  /** @internal */
58
- export const Location$inboundSchema: z.ZodType<
59
- Location,
58
+ export const CompanyLocation$inboundSchema: z.ZodType<
59
+ CompanyLocation,
60
60
  z.ZodTypeDef,
61
61
  unknown
62
62
  > = z.object({
@@ -69,7 +69,7 @@ export const Location$inboundSchema: z.ZodType<
69
69
  });
70
70
 
71
71
  /** @internal */
72
- export type Location$Outbound = {
72
+ export type CompanyLocation$Outbound = {
73
73
  address: string | null;
74
74
  phone?: string | null | undefined;
75
75
  city?: string | null | undefined;
@@ -79,10 +79,10 @@ export type Location$Outbound = {
79
79
  };
80
80
 
81
81
  /** @internal */
82
- export const Location$outboundSchema: z.ZodType<
83
- Location$Outbound,
82
+ export const CompanyLocation$outboundSchema: z.ZodType<
83
+ CompanyLocation$Outbound,
84
84
  z.ZodTypeDef,
85
- Location
85
+ CompanyLocation
86
86
  > = z.object({
87
87
  address: z.nullable(z.string()),
88
88
  phone: z.nullable(z.string()).optional(),
@@ -96,26 +96,28 @@ export const Location$outboundSchema: z.ZodType<
96
96
  * @internal
97
97
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
98
98
  */
99
- export namespace Location$ {
100
- /** @deprecated use `Location$inboundSchema` instead. */
101
- export const inboundSchema = Location$inboundSchema;
102
- /** @deprecated use `Location$outboundSchema` instead. */
103
- export const outboundSchema = Location$outboundSchema;
104
- /** @deprecated use `Location$Outbound` instead. */
105
- export type Outbound = Location$Outbound;
99
+ export namespace CompanyLocation$ {
100
+ /** @deprecated use `CompanyLocation$inboundSchema` instead. */
101
+ export const inboundSchema = CompanyLocation$inboundSchema;
102
+ /** @deprecated use `CompanyLocation$outboundSchema` instead. */
103
+ export const outboundSchema = CompanyLocation$outboundSchema;
104
+ /** @deprecated use `CompanyLocation$Outbound` instead. */
105
+ export type Outbound = CompanyLocation$Outbound;
106
106
  }
107
107
 
108
- export function locationToJSON(location: Location): string {
109
- return JSON.stringify(Location$outboundSchema.parse(location));
108
+ export function companyLocationToJSON(
109
+ companyLocation: CompanyLocation,
110
+ ): string {
111
+ return JSON.stringify(CompanyLocation$outboundSchema.parse(companyLocation));
110
112
  }
111
113
 
112
- export function locationFromJSON(
114
+ export function companyLocationFromJSON(
113
115
  jsonString: string,
114
- ): SafeParseResult<Location, SDKValidationError> {
116
+ ): SafeParseResult<CompanyLocation, SDKValidationError> {
115
117
  return safeParse(
116
118
  jsonString,
117
- (x) => Location$inboundSchema.parse(JSON.parse(x)),
118
- `Failed to parse 'Location' from JSON`,
119
+ (x) => CompanyLocation$inboundSchema.parse(JSON.parse(x)),
120
+ `Failed to parse 'CompanyLocation' from JSON`,
119
121
  );
120
122
  }
121
123
 
@@ -333,7 +335,8 @@ export const Company$inboundSchema: z.ZodType<Company, z.ZodTypeDef, unknown> =
333
335
  name: z.nullable(z.string()),
334
336
  status: z.nullable(z.string()).optional(),
335
337
  credit_balance: z.nullable(z.string()).optional(),
336
- location: z.nullable(z.lazy(() => Location$inboundSchema)).optional(),
338
+ location: z.nullable(z.lazy(() => CompanyLocation$inboundSchema))
339
+ .optional(),
337
340
  contact: z.lazy(() => CompanyContact$inboundSchema).optional(),
338
341
  tax: z.lazy(() => Tax$inboundSchema).optional(),
339
342
  stats: z.lazy(() => Stats$inboundSchema).optional(),
@@ -349,7 +352,7 @@ export type Company$Outbound = {
349
352
  name: string | null;
350
353
  status?: string | null | undefined;
351
354
  credit_balance?: string | null | undefined;
352
- location?: Location$Outbound | null | undefined;
355
+ location?: CompanyLocation$Outbound | null | undefined;
353
356
  contact?: CompanyContact$Outbound | undefined;
354
357
  tax?: Tax$Outbound | undefined;
355
358
  stats?: Stats$Outbound | undefined;
@@ -365,7 +368,7 @@ export const Company$outboundSchema: z.ZodType<
365
368
  name: z.nullable(z.string()),
366
369
  status: z.nullable(z.string()).optional(),
367
370
  creditBalance: z.nullable(z.string()).optional(),
368
- location: z.nullable(z.lazy(() => Location$outboundSchema)).optional(),
371
+ location: z.nullable(z.lazy(() => CompanyLocation$outboundSchema)).optional(),
369
372
  contact: z.lazy(() => CompanyContact$outboundSchema).optional(),
370
373
  tax: z.lazy(() => Tax$outboundSchema).optional(),
371
374
  stats: z.lazy(() => Stats$outboundSchema).optional(),
@@ -37,7 +37,7 @@ export const Status = {
37
37
  } as const;
38
38
  export type Status = ClosedEnum<typeof Status>;
39
39
 
40
- export type Department = DepartmentSummary | number;
40
+ export type ContactDepartment = DepartmentSummary | number;
41
41
 
42
42
  /**
43
43
  * This object represents a contact at the system or facility level. Use it to verify vendors, create appointments, or check in visitors.
@@ -157,46 +157,50 @@ export namespace Status$ {
157
157
  }
158
158
 
159
159
  /** @internal */
160
- export const Department$inboundSchema: z.ZodType<
161
- Department,
160
+ export const ContactDepartment$inboundSchema: z.ZodType<
161
+ ContactDepartment,
162
162
  z.ZodTypeDef,
163
163
  unknown
164
164
  > = z.union([DepartmentSummary$inboundSchema, z.number().int()]);
165
165
 
166
166
  /** @internal */
167
- export type Department$Outbound = DepartmentSummary$Outbound | number;
167
+ export type ContactDepartment$Outbound = DepartmentSummary$Outbound | number;
168
168
 
169
169
  /** @internal */
170
- export const Department$outboundSchema: z.ZodType<
171
- Department$Outbound,
170
+ export const ContactDepartment$outboundSchema: z.ZodType<
171
+ ContactDepartment$Outbound,
172
172
  z.ZodTypeDef,
173
- Department
173
+ ContactDepartment
174
174
  > = z.union([DepartmentSummary$outboundSchema, z.number().int()]);
175
175
 
176
176
  /**
177
177
  * @internal
178
178
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
179
179
  */
180
- export namespace Department$ {
181
- /** @deprecated use `Department$inboundSchema` instead. */
182
- export const inboundSchema = Department$inboundSchema;
183
- /** @deprecated use `Department$outboundSchema` instead. */
184
- export const outboundSchema = Department$outboundSchema;
185
- /** @deprecated use `Department$Outbound` instead. */
186
- export type Outbound = Department$Outbound;
180
+ export namespace ContactDepartment$ {
181
+ /** @deprecated use `ContactDepartment$inboundSchema` instead. */
182
+ export const inboundSchema = ContactDepartment$inboundSchema;
183
+ /** @deprecated use `ContactDepartment$outboundSchema` instead. */
184
+ export const outboundSchema = ContactDepartment$outboundSchema;
185
+ /** @deprecated use `ContactDepartment$Outbound` instead. */
186
+ export type Outbound = ContactDepartment$Outbound;
187
187
  }
188
188
 
189
- export function departmentToJSON(department: Department): string {
190
- return JSON.stringify(Department$outboundSchema.parse(department));
189
+ export function contactDepartmentToJSON(
190
+ contactDepartment: ContactDepartment,
191
+ ): string {
192
+ return JSON.stringify(
193
+ ContactDepartment$outboundSchema.parse(contactDepartment),
194
+ );
191
195
  }
192
196
 
193
- export function departmentFromJSON(
197
+ export function contactDepartmentFromJSON(
194
198
  jsonString: string,
195
- ): SafeParseResult<Department, SDKValidationError> {
199
+ ): SafeParseResult<ContactDepartment, SDKValidationError> {
196
200
  return safeParse(
197
201
  jsonString,
198
- (x) => Department$inboundSchema.parse(JSON.parse(x)),
199
- `Failed to parse 'Department' from JSON`,
202
+ (x) => ContactDepartment$inboundSchema.parse(JSON.parse(x)),
203
+ `Failed to parse 'ContactDepartment' from JSON`,
200
204
  );
201
205
  }
202
206
 
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ /**
11
+ * A simplified representation of a Department, typically used in list views.
12
+ */
13
+ export type Department = {
14
+ id: number;
15
+ name: string;
16
+ };
17
+
18
+ /** @internal */
19
+ export const Department$inboundSchema: z.ZodType<
20
+ Department,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ id: z.number().int(),
25
+ name: z.string(),
26
+ });
27
+
28
+ /** @internal */
29
+ export type Department$Outbound = {
30
+ id: number;
31
+ name: string;
32
+ };
33
+
34
+ /** @internal */
35
+ export const Department$outboundSchema: z.ZodType<
36
+ Department$Outbound,
37
+ z.ZodTypeDef,
38
+ Department
39
+ > = z.object({
40
+ id: z.number().int(),
41
+ name: z.string(),
42
+ });
43
+
44
+ /**
45
+ * @internal
46
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
47
+ */
48
+ export namespace Department$ {
49
+ /** @deprecated use `Department$inboundSchema` instead. */
50
+ export const inboundSchema = Department$inboundSchema;
51
+ /** @deprecated use `Department$outboundSchema` instead. */
52
+ export const outboundSchema = Department$outboundSchema;
53
+ /** @deprecated use `Department$Outbound` instead. */
54
+ export type Outbound = Department$Outbound;
55
+ }
56
+
57
+ export function departmentToJSON(department: Department): string {
58
+ return JSON.stringify(Department$outboundSchema.parse(department));
59
+ }
60
+
61
+ export function departmentFromJSON(
62
+ jsonString: string,
63
+ ): SafeParseResult<Department, SDKValidationError> {
64
+ return safeParse(
65
+ jsonString,
66
+ (x) => Department$inboundSchema.parse(JSON.parse(x)),
67
+ `Failed to parse 'Department' from JSON`,
68
+ );
69
+ }
@@ -26,6 +26,14 @@ export const Expand = {
26
26
  VendorUser: "vendor.user",
27
27
  VendorVendorType: "vendor.vendor_type",
28
28
  VendorPaymentProfile: "vendor.payment_profile",
29
+ VendorImageUrls: "vendor.image_urls",
30
+ VendorPrimaryFacility: "vendor.primary_facility",
31
+ VendorPrimaryDepartment: "vendor.primary_department",
32
+ VendorCompany: "vendor.company",
33
+ VendorCredentialingSubscription: "vendor.credentialing_subscription",
34
+ VendorScrubsSubscription: "vendor.scrubs_subscription",
35
+ VendorPaymentResponsibility: "vendor.payment_responsibility",
36
+ VendorBackgroundCheckDateExpires: "vendor.background_check_date_expires",
29
37
  SupportArticleDescription: "support_article.description",
30
38
  SupportArticlePublished: "support_article.published",
31
39
  SupportArticleNotes: "support_article.notes",
@@ -86,7 +86,7 @@ export type FluCredential = {
86
86
  fluDateEnds?: RFCDate | null | undefined;
87
87
  };
88
88
 
89
- export type FacilityLocation = {
89
+ export type Location = {
90
90
  streetAddress?: string | null | undefined;
91
91
  city?: string | null | undefined;
92
92
  state?: string | null | undefined;
@@ -170,8 +170,8 @@ export type Facility = {
170
170
  /**
171
171
  * A set of images in different sizes
172
172
  */
173
- imageUrls?: ImageSet | undefined;
174
- location?: FacilityLocation | undefined;
173
+ imageUrls?: ImageSet | null | undefined;
174
+ location?: Location | undefined;
175
175
  name?: string | undefined;
176
176
  scrubsPolicy?: ScrubsPolicy | null | undefined;
177
177
  status?: string | undefined;
@@ -567,8 +567,8 @@ export function fluCredentialFromJSON(
567
567
  }
568
568
 
569
569
  /** @internal */
570
- export const FacilityLocation$inboundSchema: z.ZodType<
571
- FacilityLocation,
570
+ export const Location$inboundSchema: z.ZodType<
571
+ Location,
572
572
  z.ZodTypeDef,
573
573
  unknown
574
574
  > = z.object({
@@ -590,7 +590,7 @@ export const FacilityLocation$inboundSchema: z.ZodType<
590
590
  });
591
591
 
592
592
  /** @internal */
593
- export type FacilityLocation$Outbound = {
593
+ export type Location$Outbound = {
594
594
  street_address?: string | null | undefined;
595
595
  city?: string | null | undefined;
596
596
  state?: string | null | undefined;
@@ -604,10 +604,10 @@ export type FacilityLocation$Outbound = {
604
604
  };
605
605
 
606
606
  /** @internal */
607
- export const FacilityLocation$outboundSchema: z.ZodType<
608
- FacilityLocation$Outbound,
607
+ export const Location$outboundSchema: z.ZodType<
608
+ Location$Outbound,
609
609
  z.ZodTypeDef,
610
- FacilityLocation
610
+ Location
611
611
  > = z.object({
612
612
  streetAddress: z.nullable(z.string()).optional(),
613
613
  city: z.nullable(z.string()).optional(),
@@ -630,30 +630,26 @@ export const FacilityLocation$outboundSchema: z.ZodType<
630
630
  * @internal
631
631
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
632
632
  */
633
- export namespace FacilityLocation$ {
634
- /** @deprecated use `FacilityLocation$inboundSchema` instead. */
635
- export const inboundSchema = FacilityLocation$inboundSchema;
636
- /** @deprecated use `FacilityLocation$outboundSchema` instead. */
637
- export const outboundSchema = FacilityLocation$outboundSchema;
638
- /** @deprecated use `FacilityLocation$Outbound` instead. */
639
- export type Outbound = FacilityLocation$Outbound;
633
+ export namespace Location$ {
634
+ /** @deprecated use `Location$inboundSchema` instead. */
635
+ export const inboundSchema = Location$inboundSchema;
636
+ /** @deprecated use `Location$outboundSchema` instead. */
637
+ export const outboundSchema = Location$outboundSchema;
638
+ /** @deprecated use `Location$Outbound` instead. */
639
+ export type Outbound = Location$Outbound;
640
640
  }
641
641
 
642
- export function facilityLocationToJSON(
643
- facilityLocation: FacilityLocation,
644
- ): string {
645
- return JSON.stringify(
646
- FacilityLocation$outboundSchema.parse(facilityLocation),
647
- );
642
+ export function locationToJSON(location: Location): string {
643
+ return JSON.stringify(Location$outboundSchema.parse(location));
648
644
  }
649
645
 
650
- export function facilityLocationFromJSON(
646
+ export function locationFromJSON(
651
647
  jsonString: string,
652
- ): SafeParseResult<FacilityLocation, SDKValidationError> {
648
+ ): SafeParseResult<Location, SDKValidationError> {
653
649
  return safeParse(
654
650
  jsonString,
655
- (x) => FacilityLocation$inboundSchema.parse(JSON.parse(x)),
656
- `Failed to parse 'FacilityLocation' from JSON`,
651
+ (x) => Location$inboundSchema.parse(JSON.parse(x)),
652
+ `Failed to parse 'Location' from JSON`,
657
653
  );
658
654
  }
659
655
 
@@ -1198,8 +1194,8 @@ export const Facility$inboundSchema: z.ZodType<
1198
1194
  facility_type: z.nullable(z.string()).optional(),
1199
1195
  flu_credential: z.lazy(() => FluCredential$inboundSchema).optional(),
1200
1196
  id: z.number().int().optional(),
1201
- image_urls: ImageSet$inboundSchema.optional(),
1202
- location: z.lazy(() => FacilityLocation$inboundSchema).optional(),
1197
+ image_urls: z.nullable(ImageSet$inboundSchema).optional(),
1198
+ location: z.lazy(() => Location$inboundSchema).optional(),
1203
1199
  name: z.string().optional(),
1204
1200
  scrubs_policy: z.nullable(z.lazy(() => ScrubsPolicy$inboundSchema))
1205
1201
  .optional(),
@@ -1240,8 +1236,8 @@ export type Facility$Outbound = {
1240
1236
  facility_type?: string | null | undefined;
1241
1237
  flu_credential?: FluCredential$Outbound | undefined;
1242
1238
  id?: number | undefined;
1243
- image_urls?: ImageSet$Outbound | undefined;
1244
- location?: FacilityLocation$Outbound | undefined;
1239
+ image_urls?: ImageSet$Outbound | null | undefined;
1240
+ location?: Location$Outbound | undefined;
1245
1241
  name?: string | undefined;
1246
1242
  scrubs_policy?: ScrubsPolicy$Outbound | null | undefined;
1247
1243
  status?: string | undefined;
@@ -1269,8 +1265,8 @@ export const Facility$outboundSchema: z.ZodType<
1269
1265
  facilityType: z.nullable(z.string()).optional(),
1270
1266
  fluCredential: z.lazy(() => FluCredential$outboundSchema).optional(),
1271
1267
  id: z.number().int().optional(),
1272
- imageUrls: ImageSet$outboundSchema.optional(),
1273
- location: z.lazy(() => FacilityLocation$outboundSchema).optional(),
1268
+ imageUrls: z.nullable(ImageSet$outboundSchema).optional(),
1269
+ location: z.lazy(() => Location$outboundSchema).optional(),
1274
1270
  name: z.string().optional(),
1275
1271
  scrubsPolicy: z.nullable(z.lazy(() => ScrubsPolicy$outboundSchema))
1276
1272
  .optional(),
@@ -6,6 +6,7 @@ export * from "./activestatus.js";
6
6
  export * from "./company.js";
7
7
  export * from "./contact.js";
8
8
  export * from "./credentialstatus.js";
9
+ export * from "./department.js";
9
10
  export * from "./departmentsummary.js";
10
11
  export * from "./desc.js";
11
12
  export * from "./expand.js";
@@ -21,11 +22,18 @@ export * from "./mfarequiredresponse.js";
21
22
  export * from "./pager.js";
22
23
  export * from "./passwordrequiredresponse.js";
23
24
  export * from "./samlloginrequiredresponse.js";
25
+ export * from "./scantype.js";
24
26
  export * from "./security.js";
27
+ export * from "./subscription.js";
25
28
  export * from "./supportarticle.js";
26
29
  export * from "./systemsummary.js";
27
30
  export * from "./user.js";
31
+ export * from "./vendor.js";
28
32
  export * from "./vendorcredentialslim.js";
33
+ export * from "./vendorfacilitystatusview.js";
29
34
  export * from "./vendorjobtitle.js";
30
35
  export * from "./vendorrequiredcredential.js";
36
+ export * from "./vendorscrubdetails.js";
37
+ export * from "./vendorscrubpurchase.js";
31
38
  export * from "./vendortype.js";
39
+ export * from "./webhookendpoint.js";
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const ScanType = {
9
+ In: "In",
10
+ Out: "Out",
11
+ Check: "Check",
12
+ } as const;
13
+ export type ScanType = ClosedEnum<typeof ScanType>;
14
+
15
+ /** @internal */
16
+ export const ScanType$inboundSchema: z.ZodNativeEnum<typeof ScanType> = z
17
+ .nativeEnum(ScanType);
18
+
19
+ /** @internal */
20
+ export const ScanType$outboundSchema: z.ZodNativeEnum<typeof ScanType> =
21
+ ScanType$inboundSchema;
22
+
23
+ /**
24
+ * @internal
25
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
26
+ */
27
+ export namespace ScanType$ {
28
+ /** @deprecated use `ScanType$inboundSchema` instead. */
29
+ export const inboundSchema = ScanType$inboundSchema;
30
+ /** @deprecated use `ScanType$outboundSchema` instead. */
31
+ export const outboundSchema = ScanType$outboundSchema;
32
+ }
@@ -0,0 +1,98 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Reduced list of attributes of the Subscription record
13
+ */
14
+ export type Subscription = {
15
+ id?: number | null | undefined;
16
+ dateStarted?: string | null | undefined;
17
+ dateEnds?: string | null | undefined;
18
+ status?: string | null | undefined;
19
+ locked?: boolean | null | undefined;
20
+ variantTitle?: any | null | undefined;
21
+ };
22
+
23
+ /** @internal */
24
+ export const Subscription$inboundSchema: z.ZodType<
25
+ Subscription,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ id: z.nullable(z.number().int()).optional(),
30
+ date_started: z.nullable(z.string()).optional(),
31
+ date_ends: z.nullable(z.string()).optional(),
32
+ status: z.nullable(z.string()).optional(),
33
+ locked: z.nullable(z.boolean()).optional(),
34
+ variant_title: z.nullable(z.any()).optional(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "date_started": "dateStarted",
38
+ "date_ends": "dateEnds",
39
+ "variant_title": "variantTitle",
40
+ });
41
+ });
42
+
43
+ /** @internal */
44
+ export type Subscription$Outbound = {
45
+ id?: number | null | undefined;
46
+ date_started?: string | null | undefined;
47
+ date_ends?: string | null | undefined;
48
+ status?: string | null | undefined;
49
+ locked?: boolean | null | undefined;
50
+ variant_title?: any | null | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const Subscription$outboundSchema: z.ZodType<
55
+ Subscription$Outbound,
56
+ z.ZodTypeDef,
57
+ Subscription
58
+ > = z.object({
59
+ id: z.nullable(z.number().int()).optional(),
60
+ dateStarted: z.nullable(z.string()).optional(),
61
+ dateEnds: z.nullable(z.string()).optional(),
62
+ status: z.nullable(z.string()).optional(),
63
+ locked: z.nullable(z.boolean()).optional(),
64
+ variantTitle: z.nullable(z.any()).optional(),
65
+ }).transform((v) => {
66
+ return remap$(v, {
67
+ dateStarted: "date_started",
68
+ dateEnds: "date_ends",
69
+ variantTitle: "variant_title",
70
+ });
71
+ });
72
+
73
+ /**
74
+ * @internal
75
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
76
+ */
77
+ export namespace Subscription$ {
78
+ /** @deprecated use `Subscription$inboundSchema` instead. */
79
+ export const inboundSchema = Subscription$inboundSchema;
80
+ /** @deprecated use `Subscription$outboundSchema` instead. */
81
+ export const outboundSchema = Subscription$outboundSchema;
82
+ /** @deprecated use `Subscription$Outbound` instead. */
83
+ export type Outbound = Subscription$Outbound;
84
+ }
85
+
86
+ export function subscriptionToJSON(subscription: Subscription): string {
87
+ return JSON.stringify(Subscription$outboundSchema.parse(subscription));
88
+ }
89
+
90
+ export function subscriptionFromJSON(
91
+ jsonString: string,
92
+ ): SafeParseResult<Subscription, SDKValidationError> {
93
+ return safeParse(
94
+ jsonString,
95
+ (x) => Subscription$inboundSchema.parse(JSON.parse(x)),
96
+ `Failed to parse 'Subscription' from JSON`,
97
+ );
98
+ }