@greensecurity/javascript-sdk 0.37.10 → 0.37.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/README.md +16 -1
  2. package/bin/mcp-server.js +1744 -618
  3. package/bin/mcp-server.js.map +39 -22
  4. package/dist/commonjs/__tests__/organizations.test.js +42 -0
  5. package/dist/commonjs/__tests__/organizations.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/systems.test.d.ts +2 -0
  7. package/dist/commonjs/__tests__/systems.test.d.ts.map +1 -0
  8. package/dist/commonjs/__tests__/systems.test.js +46 -0
  9. package/dist/commonjs/__tests__/systems.test.js.map +1 -0
  10. package/dist/commonjs/__tests__/vendors.test.js +49 -0
  11. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  12. package/dist/commonjs/__tests__/zones.test.js +28 -3
  13. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  14. package/dist/commonjs/funcs/organizationsListOrSearchDepartmentContacts.d.ts +26 -0
  15. package/dist/commonjs/funcs/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/organizationsListOrSearchDepartmentContacts.js +168 -0
  17. package/dist/commonjs/funcs/organizationsListOrSearchDepartmentContacts.js.map +1 -0
  18. package/dist/commonjs/funcs/systemsListSystems.d.ts +25 -0
  19. package/dist/commonjs/funcs/systemsListSystems.d.ts.map +1 -0
  20. package/dist/commonjs/funcs/systemsListSystems.js +163 -0
  21. package/dist/commonjs/funcs/systemsListSystems.js.map +1 -0
  22. package/dist/commonjs/funcs/vendorsGetSubscription.d.ts +22 -0
  23. package/dist/commonjs/funcs/vendorsGetSubscription.d.ts.map +1 -0
  24. package/dist/commonjs/funcs/vendorsGetSubscription.js +130 -0
  25. package/dist/commonjs/funcs/vendorsGetSubscription.js.map +1 -0
  26. package/dist/commonjs/funcs/vendorsGetVendorsDetails.d.ts +3 -0
  27. package/dist/commonjs/funcs/vendorsGetVendorsDetails.d.ts.map +1 -1
  28. package/dist/commonjs/funcs/vendorsGetVendorsDetails.js +3 -0
  29. package/dist/commonjs/funcs/vendorsGetVendorsDetails.js.map +1 -1
  30. package/dist/commonjs/funcs/vendorsListVendorTypes.d.ts +21 -0
  31. package/dist/commonjs/funcs/vendorsListVendorTypes.d.ts.map +1 -0
  32. package/dist/commonjs/funcs/vendorsListVendorTypes.js +156 -0
  33. package/dist/commonjs/funcs/vendorsListVendorTypes.js.map +1 -0
  34. package/dist/commonjs/lib/config.d.ts +3 -3
  35. package/dist/commonjs/lib/config.js +3 -3
  36. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  37. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  38. package/dist/commonjs/mcp-server/server.js +10 -2
  39. package/dist/commonjs/mcp-server/server.js.map +1 -1
  40. package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartmentContacts.d.ts +8 -0
  41. package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
  42. package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartmentContacts.js +69 -0
  43. package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartmentContacts.js.map +1 -0
  44. package/dist/commonjs/mcp-server/tools/systemsListSystems.d.ts +8 -0
  45. package/dist/commonjs/mcp-server/tools/systemsListSystems.d.ts.map +1 -0
  46. package/dist/commonjs/mcp-server/tools/systemsListSystems.js +68 -0
  47. package/dist/commonjs/mcp-server/tools/systemsListSystems.js.map +1 -0
  48. package/dist/commonjs/mcp-server/tools/vendorsGetSubscription.d.ts +8 -0
  49. package/dist/commonjs/mcp-server/tools/vendorsGetSubscription.d.ts.map +1 -0
  50. package/dist/commonjs/mcp-server/tools/vendorsGetSubscription.js +68 -0
  51. package/dist/commonjs/mcp-server/tools/vendorsGetSubscription.js.map +1 -0
  52. package/dist/commonjs/mcp-server/tools/vendorsGetVendorsDetails.d.ts.map +1 -1
  53. package/dist/commonjs/mcp-server/tools/vendorsGetVendorsDetails.js +4 -1
  54. package/dist/commonjs/mcp-server/tools/vendorsGetVendorsDetails.js.map +1 -1
  55. package/dist/commonjs/mcp-server/tools/vendorsListVendorTypes.d.ts +8 -0
  56. package/dist/commonjs/mcp-server/tools/vendorsListVendorTypes.d.ts.map +1 -0
  57. package/dist/commonjs/mcp-server/tools/vendorsListVendorTypes.js +64 -0
  58. package/dist/commonjs/mcp-server/tools/vendorsListVendorTypes.js.map +1 -0
  59. package/dist/commonjs/models/components/company.d.ts +3 -0
  60. package/dist/commonjs/models/components/company.d.ts.map +1 -1
  61. package/dist/commonjs/models/components/company.js +5 -0
  62. package/dist/commonjs/models/components/company.js.map +1 -1
  63. package/dist/commonjs/models/components/companyvendortyperestriction.d.ts +80 -0
  64. package/dist/commonjs/models/components/companyvendortyperestriction.d.ts.map +1 -0
  65. package/dist/commonjs/models/components/companyvendortyperestriction.js +132 -0
  66. package/dist/commonjs/models/components/companyvendortyperestriction.js.map +1 -0
  67. package/dist/commonjs/models/components/contact.d.ts +30 -4
  68. package/dist/commonjs/models/components/contact.d.ts.map +1 -1
  69. package/dist/commonjs/models/components/contact.js +35 -5
  70. package/dist/commonjs/models/components/contact.js.map +1 -1
  71. package/dist/commonjs/models/components/departmentmembership.d.ts +80 -0
  72. package/dist/commonjs/models/components/departmentmembership.d.ts.map +1 -0
  73. package/dist/commonjs/models/components/departmentmembership.js +123 -0
  74. package/dist/commonjs/models/components/departmentmembership.js.map +1 -0
  75. package/dist/commonjs/models/components/expand.d.ts +21 -0
  76. package/dist/commonjs/models/components/expand.d.ts.map +1 -1
  77. package/dist/commonjs/models/components/expand.js +7 -0
  78. package/dist/commonjs/models/components/expand.js.map +1 -1
  79. package/dist/commonjs/models/components/facility.d.ts +18 -18
  80. package/dist/commonjs/models/components/facility.d.ts.map +1 -1
  81. package/dist/commonjs/models/components/facility.js +21 -21
  82. package/dist/commonjs/models/components/facility.js.map +1 -1
  83. package/dist/commonjs/models/components/facilitysummary.d.ts +28 -0
  84. package/dist/commonjs/models/components/facilitysummary.d.ts.map +1 -1
  85. package/dist/commonjs/models/components/facilitysummary.js +50 -1
  86. package/dist/commonjs/models/components/facilitysummary.js.map +1 -1
  87. package/dist/commonjs/models/components/facilityvendortype.d.ts +71 -0
  88. package/dist/commonjs/models/components/facilityvendortype.d.ts.map +1 -0
  89. package/dist/commonjs/models/components/facilityvendortype.js +137 -0
  90. package/dist/commonjs/models/components/facilityvendortype.js.map +1 -0
  91. package/dist/commonjs/models/components/index.d.ts +5 -0
  92. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  93. package/dist/commonjs/models/components/index.js +5 -0
  94. package/dist/commonjs/models/components/index.js.map +1 -1
  95. package/dist/commonjs/models/components/invoiceitem.d.ts +33 -0
  96. package/dist/commonjs/models/components/invoiceitem.d.ts.map +1 -1
  97. package/dist/commonjs/models/components/invoiceitem.js +48 -1
  98. package/dist/commonjs/models/components/invoiceitem.js.map +1 -1
  99. package/dist/commonjs/models/components/productvariant.d.ts +4 -4
  100. package/dist/commonjs/models/components/productvariant.d.ts.map +1 -1
  101. package/dist/commonjs/models/components/productvariant.js +4 -4
  102. package/dist/commonjs/models/components/productvariant.js.map +1 -1
  103. package/dist/commonjs/models/components/subscription.d.ts +3 -0
  104. package/dist/commonjs/models/components/subscription.d.ts.map +1 -1
  105. package/dist/commonjs/models/components/subscription.js +5 -0
  106. package/dist/commonjs/models/components/subscription.js.map +1 -1
  107. package/dist/commonjs/models/components/systemsummary.d.ts +3 -0
  108. package/dist/commonjs/models/components/systemsummary.d.ts.map +1 -1
  109. package/dist/commonjs/models/components/systemsummary.js +3 -0
  110. package/dist/commonjs/models/components/systemsummary.js.map +1 -1
  111. package/dist/commonjs/models/components/usersummary.d.ts +34 -0
  112. package/dist/commonjs/models/components/usersummary.d.ts.map +1 -0
  113. package/dist/commonjs/models/components/usersummary.js +71 -0
  114. package/dist/commonjs/models/components/usersummary.js.map +1 -0
  115. package/dist/commonjs/models/components/vendor.d.ts +56 -0
  116. package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
  117. package/dist/commonjs/models/components/vendor.js +69 -1
  118. package/dist/commonjs/models/components/vendor.js.map +1 -1
  119. package/dist/commonjs/models/components/vendorgroup.d.ts +38 -0
  120. package/dist/commonjs/models/components/vendorgroup.d.ts.map +1 -0
  121. package/dist/commonjs/models/components/vendorgroup.js +84 -0
  122. package/dist/commonjs/models/components/vendorgroup.js.map +1 -0
  123. package/dist/commonjs/models/components/zoneconfig.d.ts +15 -15
  124. package/dist/commonjs/models/components/zoneconfig.d.ts.map +1 -1
  125. package/dist/commonjs/models/components/zoneconfig.js +18 -18
  126. package/dist/commonjs/models/components/zoneconfig.js.map +1 -1
  127. package/dist/commonjs/models/operations/getsubscription.d.ts +69 -0
  128. package/dist/commonjs/models/operations/getsubscription.d.ts.map +1 -0
  129. package/dist/commonjs/models/operations/getsubscription.js +108 -0
  130. package/dist/commonjs/models/operations/getsubscription.js.map +1 -0
  131. package/dist/commonjs/models/operations/index.d.ts +4 -0
  132. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  133. package/dist/commonjs/models/operations/index.js +4 -0
  134. package/dist/commonjs/models/operations/index.js.map +1 -1
  135. package/dist/commonjs/models/operations/listorsearchdepartmentcontacts.d.ts +121 -0
  136. package/dist/commonjs/models/operations/listorsearchdepartmentcontacts.d.ts.map +1 -0
  137. package/dist/commonjs/models/operations/listorsearchdepartmentcontacts.js +155 -0
  138. package/dist/commonjs/models/operations/listorsearchdepartmentcontacts.js.map +1 -0
  139. package/dist/commonjs/models/operations/listsystems.d.ts +116 -0
  140. package/dist/commonjs/models/operations/listsystems.d.ts.map +1 -0
  141. package/dist/commonjs/models/operations/listsystems.js +155 -0
  142. package/dist/commonjs/models/operations/listsystems.js.map +1 -0
  143. package/dist/commonjs/models/operations/listvendortypes.d.ts +106 -0
  144. package/dist/commonjs/models/operations/listvendortypes.d.ts.map +1 -0
  145. package/dist/commonjs/models/operations/listvendortypes.js +149 -0
  146. package/dist/commonjs/models/operations/listvendortypes.js.map +1 -0
  147. package/dist/commonjs/react-query/index.d.ts +4 -0
  148. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  149. package/dist/commonjs/react-query/index.js +4 -0
  150. package/dist/commonjs/react-query/index.js.map +1 -1
  151. package/dist/commonjs/react-query/organizationsListOrSearchDepartmentContacts.d.ts +103 -0
  152. package/dist/commonjs/react-query/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
  153. package/dist/commonjs/react-query/organizationsListOrSearchDepartmentContacts.js +184 -0
  154. package/dist/commonjs/react-query/organizationsListOrSearchDepartmentContacts.js.map +1 -0
  155. package/dist/commonjs/react-query/systemsListSystems.d.ts +97 -0
  156. package/dist/commonjs/react-query/systemsListSystems.d.ts.map +1 -0
  157. package/dist/commonjs/react-query/systemsListSystems.js +175 -0
  158. package/dist/commonjs/react-query/systemsListSystems.js.map +1 -0
  159. package/dist/commonjs/react-query/vendorsGetSubscription.d.ts +51 -0
  160. package/dist/commonjs/react-query/vendorsGetSubscription.d.ts.map +1 -0
  161. package/dist/commonjs/react-query/vendorsGetSubscription.js +103 -0
  162. package/dist/commonjs/react-query/vendorsGetSubscription.js.map +1 -0
  163. package/dist/commonjs/react-query/vendorsGetVendorsDetails.d.ts +6 -0
  164. package/dist/commonjs/react-query/vendorsGetVendorsDetails.d.ts.map +1 -1
  165. package/dist/commonjs/react-query/vendorsGetVendorsDetails.js +6 -0
  166. package/dist/commonjs/react-query/vendorsGetVendorsDetails.js.map +1 -1
  167. package/dist/commonjs/react-query/vendorsListVendorTypes.d.ts +75 -0
  168. package/dist/commonjs/react-query/vendorsListVendorTypes.d.ts.map +1 -0
  169. package/dist/commonjs/react-query/vendorsListVendorTypes.js +155 -0
  170. package/dist/commonjs/react-query/vendorsListVendorTypes.js.map +1 -0
  171. package/dist/commonjs/sdk/organizations.d.ts +14 -0
  172. package/dist/commonjs/sdk/organizations.d.ts.map +1 -1
  173. package/dist/commonjs/sdk/organizations.js +15 -0
  174. package/dist/commonjs/sdk/organizations.js.map +1 -1
  175. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  176. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  177. package/dist/commonjs/sdk/sdk.js +4 -0
  178. package/dist/commonjs/sdk/sdk.js.map +1 -1
  179. package/dist/commonjs/sdk/systems.d.ts +19 -0
  180. package/dist/commonjs/sdk/systems.d.ts.map +1 -0
  181. package/dist/commonjs/sdk/systems.js +26 -0
  182. package/dist/commonjs/sdk/systems.js.map +1 -0
  183. package/dist/commonjs/sdk/vendors.d.ts +30 -7
  184. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  185. package/dist/commonjs/sdk/vendors.js +36 -9
  186. package/dist/commonjs/sdk/vendors.js.map +1 -1
  187. package/dist/esm/__tests__/organizations.test.js +42 -0
  188. package/dist/esm/__tests__/organizations.test.js.map +1 -1
  189. package/dist/esm/__tests__/systems.test.d.ts +2 -0
  190. package/dist/esm/__tests__/systems.test.d.ts.map +1 -0
  191. package/dist/esm/__tests__/systems.test.js +44 -0
  192. package/dist/esm/__tests__/systems.test.js.map +1 -0
  193. package/dist/esm/__tests__/vendors.test.js +49 -0
  194. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  195. package/dist/esm/__tests__/zones.test.js +28 -3
  196. package/dist/esm/__tests__/zones.test.js.map +1 -1
  197. package/dist/esm/funcs/organizationsListOrSearchDepartmentContacts.d.ts +26 -0
  198. package/dist/esm/funcs/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
  199. package/dist/esm/funcs/organizationsListOrSearchDepartmentContacts.js +132 -0
  200. package/dist/esm/funcs/organizationsListOrSearchDepartmentContacts.js.map +1 -0
  201. package/dist/esm/funcs/systemsListSystems.d.ts +25 -0
  202. package/dist/esm/funcs/systemsListSystems.d.ts.map +1 -0
  203. package/dist/esm/funcs/systemsListSystems.js +127 -0
  204. package/dist/esm/funcs/systemsListSystems.js.map +1 -0
  205. package/dist/esm/funcs/vendorsGetSubscription.d.ts +22 -0
  206. package/dist/esm/funcs/vendorsGetSubscription.d.ts.map +1 -0
  207. package/dist/esm/funcs/vendorsGetSubscription.js +94 -0
  208. package/dist/esm/funcs/vendorsGetSubscription.js.map +1 -0
  209. package/dist/esm/funcs/vendorsGetVendorsDetails.d.ts +3 -0
  210. package/dist/esm/funcs/vendorsGetVendorsDetails.d.ts.map +1 -1
  211. package/dist/esm/funcs/vendorsGetVendorsDetails.js +3 -0
  212. package/dist/esm/funcs/vendorsGetVendorsDetails.js.map +1 -1
  213. package/dist/esm/funcs/vendorsListVendorTypes.d.ts +21 -0
  214. package/dist/esm/funcs/vendorsListVendorTypes.d.ts.map +1 -0
  215. package/dist/esm/funcs/vendorsListVendorTypes.js +120 -0
  216. package/dist/esm/funcs/vendorsListVendorTypes.js.map +1 -0
  217. package/dist/esm/lib/config.d.ts +3 -3
  218. package/dist/esm/lib/config.js +3 -3
  219. package/dist/esm/mcp-server/mcp-server.js +1 -1
  220. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  221. package/dist/esm/mcp-server/server.js +10 -2
  222. package/dist/esm/mcp-server/server.js.map +1 -1
  223. package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartmentContacts.d.ts +8 -0
  224. package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
  225. package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartmentContacts.js +33 -0
  226. package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartmentContacts.js.map +1 -0
  227. package/dist/esm/mcp-server/tools/systemsListSystems.d.ts +8 -0
  228. package/dist/esm/mcp-server/tools/systemsListSystems.d.ts.map +1 -0
  229. package/dist/esm/mcp-server/tools/systemsListSystems.js +32 -0
  230. package/dist/esm/mcp-server/tools/systemsListSystems.js.map +1 -0
  231. package/dist/esm/mcp-server/tools/vendorsGetSubscription.d.ts +8 -0
  232. package/dist/esm/mcp-server/tools/vendorsGetSubscription.d.ts.map +1 -0
  233. package/dist/esm/mcp-server/tools/vendorsGetSubscription.js +32 -0
  234. package/dist/esm/mcp-server/tools/vendorsGetSubscription.js.map +1 -0
  235. package/dist/esm/mcp-server/tools/vendorsGetVendorsDetails.d.ts.map +1 -1
  236. package/dist/esm/mcp-server/tools/vendorsGetVendorsDetails.js +4 -1
  237. package/dist/esm/mcp-server/tools/vendorsGetVendorsDetails.js.map +1 -1
  238. package/dist/esm/mcp-server/tools/vendorsListVendorTypes.d.ts +8 -0
  239. package/dist/esm/mcp-server/tools/vendorsListVendorTypes.d.ts.map +1 -0
  240. package/dist/esm/mcp-server/tools/vendorsListVendorTypes.js +28 -0
  241. package/dist/esm/mcp-server/tools/vendorsListVendorTypes.js.map +1 -0
  242. package/dist/esm/models/components/company.d.ts +3 -0
  243. package/dist/esm/models/components/company.d.ts.map +1 -1
  244. package/dist/esm/models/components/company.js +5 -0
  245. package/dist/esm/models/components/company.js.map +1 -1
  246. package/dist/esm/models/components/companyvendortyperestriction.d.ts +80 -0
  247. package/dist/esm/models/components/companyvendortyperestriction.d.ts.map +1 -0
  248. package/dist/esm/models/components/companyvendortyperestriction.js +90 -0
  249. package/dist/esm/models/components/companyvendortyperestriction.js.map +1 -0
  250. package/dist/esm/models/components/contact.d.ts +30 -4
  251. package/dist/esm/models/components/contact.d.ts.map +1 -1
  252. package/dist/esm/models/components/contact.js +32 -4
  253. package/dist/esm/models/components/contact.js.map +1 -1
  254. package/dist/esm/models/components/departmentmembership.d.ts +80 -0
  255. package/dist/esm/models/components/departmentmembership.d.ts.map +1 -0
  256. package/dist/esm/models/components/departmentmembership.js +81 -0
  257. package/dist/esm/models/components/departmentmembership.js.map +1 -0
  258. package/dist/esm/models/components/expand.d.ts +21 -0
  259. package/dist/esm/models/components/expand.d.ts.map +1 -1
  260. package/dist/esm/models/components/expand.js +7 -0
  261. package/dist/esm/models/components/expand.js.map +1 -1
  262. package/dist/esm/models/components/facility.d.ts +18 -18
  263. package/dist/esm/models/components/facility.d.ts.map +1 -1
  264. package/dist/esm/models/components/facility.js +18 -18
  265. package/dist/esm/models/components/facility.js.map +1 -1
  266. package/dist/esm/models/components/facilitysummary.d.ts +28 -0
  267. package/dist/esm/models/components/facilitysummary.d.ts.map +1 -1
  268. package/dist/esm/models/components/facilitysummary.js +47 -0
  269. package/dist/esm/models/components/facilitysummary.js.map +1 -1
  270. package/dist/esm/models/components/facilityvendortype.d.ts +71 -0
  271. package/dist/esm/models/components/facilityvendortype.d.ts.map +1 -0
  272. package/dist/esm/models/components/facilityvendortype.js +97 -0
  273. package/dist/esm/models/components/facilityvendortype.js.map +1 -0
  274. package/dist/esm/models/components/index.d.ts +5 -0
  275. package/dist/esm/models/components/index.d.ts.map +1 -1
  276. package/dist/esm/models/components/index.js +5 -0
  277. package/dist/esm/models/components/index.js.map +1 -1
  278. package/dist/esm/models/components/invoiceitem.d.ts +33 -0
  279. package/dist/esm/models/components/invoiceitem.d.ts.map +1 -1
  280. package/dist/esm/models/components/invoiceitem.js +45 -0
  281. package/dist/esm/models/components/invoiceitem.js.map +1 -1
  282. package/dist/esm/models/components/productvariant.d.ts +4 -4
  283. package/dist/esm/models/components/productvariant.d.ts.map +1 -1
  284. package/dist/esm/models/components/productvariant.js +4 -4
  285. package/dist/esm/models/components/productvariant.js.map +1 -1
  286. package/dist/esm/models/components/subscription.d.ts +3 -0
  287. package/dist/esm/models/components/subscription.d.ts.map +1 -1
  288. package/dist/esm/models/components/subscription.js +5 -0
  289. package/dist/esm/models/components/subscription.js.map +1 -1
  290. package/dist/esm/models/components/systemsummary.d.ts +3 -0
  291. package/dist/esm/models/components/systemsummary.d.ts.map +1 -1
  292. package/dist/esm/models/components/systemsummary.js +3 -0
  293. package/dist/esm/models/components/systemsummary.js.map +1 -1
  294. package/dist/esm/models/components/usersummary.d.ts +34 -0
  295. package/dist/esm/models/components/usersummary.d.ts.map +1 -0
  296. package/dist/esm/models/components/usersummary.js +33 -0
  297. package/dist/esm/models/components/usersummary.js.map +1 -0
  298. package/dist/esm/models/components/vendor.d.ts +56 -0
  299. package/dist/esm/models/components/vendor.d.ts.map +1 -1
  300. package/dist/esm/models/components/vendor.js +64 -0
  301. package/dist/esm/models/components/vendor.js.map +1 -1
  302. package/dist/esm/models/components/vendorgroup.d.ts +38 -0
  303. package/dist/esm/models/components/vendorgroup.d.ts.map +1 -0
  304. package/dist/esm/models/components/vendorgroup.js +46 -0
  305. package/dist/esm/models/components/vendorgroup.js.map +1 -0
  306. package/dist/esm/models/components/zoneconfig.d.ts +15 -15
  307. package/dist/esm/models/components/zoneconfig.d.ts.map +1 -1
  308. package/dist/esm/models/components/zoneconfig.js +15 -15
  309. package/dist/esm/models/components/zoneconfig.js.map +1 -1
  310. package/dist/esm/models/operations/getsubscription.d.ts +69 -0
  311. package/dist/esm/models/operations/getsubscription.d.ts.map +1 -0
  312. package/dist/esm/models/operations/getsubscription.js +68 -0
  313. package/dist/esm/models/operations/getsubscription.js.map +1 -0
  314. package/dist/esm/models/operations/index.d.ts +4 -0
  315. package/dist/esm/models/operations/index.d.ts.map +1 -1
  316. package/dist/esm/models/operations/index.js +4 -0
  317. package/dist/esm/models/operations/index.js.map +1 -1
  318. package/dist/esm/models/operations/listorsearchdepartmentcontacts.d.ts +121 -0
  319. package/dist/esm/models/operations/listorsearchdepartmentcontacts.d.ts.map +1 -0
  320. package/dist/esm/models/operations/listorsearchdepartmentcontacts.js +113 -0
  321. package/dist/esm/models/operations/listorsearchdepartmentcontacts.js.map +1 -0
  322. package/dist/esm/models/operations/listsystems.d.ts +116 -0
  323. package/dist/esm/models/operations/listsystems.d.ts.map +1 -0
  324. package/dist/esm/models/operations/listsystems.js +113 -0
  325. package/dist/esm/models/operations/listsystems.js.map +1 -0
  326. package/dist/esm/models/operations/listvendortypes.d.ts +106 -0
  327. package/dist/esm/models/operations/listvendortypes.d.ts.map +1 -0
  328. package/dist/esm/models/operations/listvendortypes.js +107 -0
  329. package/dist/esm/models/operations/listvendortypes.js.map +1 -0
  330. package/dist/esm/react-query/index.d.ts +4 -0
  331. package/dist/esm/react-query/index.d.ts.map +1 -1
  332. package/dist/esm/react-query/index.js +4 -0
  333. package/dist/esm/react-query/index.js.map +1 -1
  334. package/dist/esm/react-query/organizationsListOrSearchDepartmentContacts.d.ts +103 -0
  335. package/dist/esm/react-query/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
  336. package/dist/esm/react-query/organizationsListOrSearchDepartmentContacts.js +171 -0
  337. package/dist/esm/react-query/organizationsListOrSearchDepartmentContacts.js.map +1 -0
  338. package/dist/esm/react-query/systemsListSystems.d.ts +97 -0
  339. package/dist/esm/react-query/systemsListSystems.d.ts.map +1 -0
  340. package/dist/esm/react-query/systemsListSystems.js +162 -0
  341. package/dist/esm/react-query/systemsListSystems.js.map +1 -0
  342. package/dist/esm/react-query/vendorsGetSubscription.d.ts +51 -0
  343. package/dist/esm/react-query/vendorsGetSubscription.d.ts.map +1 -0
  344. package/dist/esm/react-query/vendorsGetSubscription.js +93 -0
  345. package/dist/esm/react-query/vendorsGetSubscription.js.map +1 -0
  346. package/dist/esm/react-query/vendorsGetVendorsDetails.d.ts +6 -0
  347. package/dist/esm/react-query/vendorsGetVendorsDetails.d.ts.map +1 -1
  348. package/dist/esm/react-query/vendorsGetVendorsDetails.js +6 -0
  349. package/dist/esm/react-query/vendorsGetVendorsDetails.js.map +1 -1
  350. package/dist/esm/react-query/vendorsListVendorTypes.d.ts +75 -0
  351. package/dist/esm/react-query/vendorsListVendorTypes.d.ts.map +1 -0
  352. package/dist/esm/react-query/vendorsListVendorTypes.js +142 -0
  353. package/dist/esm/react-query/vendorsListVendorTypes.js.map +1 -0
  354. package/dist/esm/sdk/organizations.d.ts +14 -0
  355. package/dist/esm/sdk/organizations.d.ts.map +1 -1
  356. package/dist/esm/sdk/organizations.js +15 -0
  357. package/dist/esm/sdk/organizations.js.map +1 -1
  358. package/dist/esm/sdk/sdk.d.ts +3 -0
  359. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  360. package/dist/esm/sdk/sdk.js +4 -0
  361. package/dist/esm/sdk/sdk.js.map +1 -1
  362. package/dist/esm/sdk/systems.d.ts +19 -0
  363. package/dist/esm/sdk/systems.d.ts.map +1 -0
  364. package/dist/esm/sdk/systems.js +22 -0
  365. package/dist/esm/sdk/systems.js.map +1 -0
  366. package/dist/esm/sdk/vendors.d.ts +30 -7
  367. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  368. package/dist/esm/sdk/vendors.js +36 -9
  369. package/dist/esm/sdk/vendors.js.map +1 -1
  370. package/examples/package-lock.json +1 -1
  371. package/jsr.json +1 -1
  372. package/package.json +1 -1
  373. package/src/__tests__/organizations.test.ts +45 -0
  374. package/src/__tests__/systems.test.ts +47 -0
  375. package/src/__tests__/vendors.test.ts +55 -0
  376. package/src/__tests__/zones.test.ts +28 -3
  377. package/src/funcs/organizationsListOrSearchDepartmentContacts.ts +270 -0
  378. package/src/funcs/systemsListSystems.ts +257 -0
  379. package/src/funcs/vendorsGetSubscription.ts +186 -0
  380. package/src/funcs/vendorsGetVendorsDetails.ts +3 -0
  381. package/src/funcs/vendorsListVendorTypes.ts +247 -0
  382. package/src/lib/config.ts +3 -3
  383. package/src/mcp-server/mcp-server.ts +1 -1
  384. package/src/mcp-server/server.ts +10 -2
  385. package/src/mcp-server/tools/organizationsListOrSearchDepartmentContacts.ts +44 -0
  386. package/src/mcp-server/tools/systemsListSystems.ts +41 -0
  387. package/src/mcp-server/tools/vendorsGetSubscription.ts +41 -0
  388. package/src/mcp-server/tools/vendorsGetVendorsDetails.ts +4 -1
  389. package/src/mcp-server/tools/vendorsListVendorTypes.ts +37 -0
  390. package/src/models/components/company.ts +22 -0
  391. package/src/models/components/companyvendortyperestriction.ts +221 -0
  392. package/src/models/components/contact.ts +74 -8
  393. package/src/models/components/departmentmembership.ts +201 -0
  394. package/src/models/components/expand.ts +7 -0
  395. package/src/models/components/facility.ts +38 -34
  396. package/src/models/components/facilitysummary.ts +83 -0
  397. package/src/models/components/facilityvendortype.ts +178 -0
  398. package/src/models/components/index.ts +5 -0
  399. package/src/models/components/invoiceitem.ts +79 -0
  400. package/src/models/components/productvariant.ts +8 -8
  401. package/src/models/components/subscription.ts +12 -0
  402. package/src/models/components/systemsummary.ts +10 -0
  403. package/src/models/components/usersummary.ts +69 -0
  404. package/src/models/components/vendor.ts +148 -0
  405. package/src/models/components/vendorgroup.ts +86 -0
  406. package/src/models/components/zoneconfig.ts +28 -24
  407. package/src/models/operations/getsubscription.ts +152 -0
  408. package/src/models/operations/index.ts +4 -0
  409. package/src/models/operations/listorsearchdepartmentcontacts.ts +280 -0
  410. package/src/models/operations/listsystems.ts +250 -0
  411. package/src/models/operations/listvendortypes.ts +236 -0
  412. package/src/react-query/index.ts +4 -0
  413. package/src/react-query/organizationsListOrSearchDepartmentContacts.ts +386 -0
  414. package/src/react-query/systemsListSystems.ts +353 -0
  415. package/src/react-query/vendorsGetSubscription.ts +182 -0
  416. package/src/react-query/vendorsGetVendorsDetails.ts +6 -0
  417. package/src/react-query/vendorsListVendorTypes.ts +328 -0
  418. package/src/sdk/organizations.ts +28 -0
  419. package/src/sdk/sdk.ts +6 -0
  420. package/src/sdk/systems.ts +31 -0
  421. package/src/sdk/vendors.ts +62 -17
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.37.10",
22
+ currentVersion: "0.37.14",
23
23
  },
24
24
  });
25
25
 
@@ -21,10 +21,12 @@ import { tool$invoicesCreateInvoice } from "./tools/invoicesCreateInvoice.js";
21
21
  import { tool$invoicesMakePayment } from "./tools/invoicesMakePayment.js";
22
22
  import { tool$invoicesUpdateInvoice } from "./tools/invoicesUpdateInvoice.js";
23
23
  import { tool$organizationsGetFacility } from "./tools/organizationsGetFacility.js";
24
+ import { tool$organizationsListOrSearchDepartmentContacts } from "./tools/organizationsListOrSearchDepartmentContacts.js";
24
25
  import { tool$organizationsListOrSearchDepartments } from "./tools/organizationsListOrSearchDepartments.js";
25
26
  import { tool$organizationsListOrSearchFacilities } from "./tools/organizationsListOrSearchFacilities.js";
26
27
  import { tool$supportArticlesGetSupportArticle } from "./tools/supportArticlesGetSupportArticle.js";
27
28
  import { tool$supportArticlesListOrSearchSupportArticles } from "./tools/supportArticlesListOrSearchSupportArticles.js";
29
+ import { tool$systemsListSystems } from "./tools/systemsListSystems.js";
28
30
  import { tool$usersChangePassword } from "./tools/usersChangePassword.js";
29
31
  import { tool$usersGetCurrentUser } from "./tools/usersGetCurrentUser.js";
30
32
  import { tool$usersGetUserById } from "./tools/usersGetUserById.js";
@@ -48,6 +50,7 @@ import { tool$vendorsDeclineVendorCredential } from "./tools/vendorsDeclineVendo
48
50
  import { tool$vendorsDeleteVendorCredentialFile } from "./tools/vendorsDeleteVendorCredentialFile.js";
49
51
  import { tool$vendorsDeleteVendorManagedByCompany } from "./tools/vendorsDeleteVendorManagedByCompany.js";
50
52
  import { tool$vendorsExpediteTimeRemaining } from "./tools/vendorsExpediteTimeRemaining.js";
53
+ import { tool$vendorsGetSubscription } from "./tools/vendorsGetSubscription.js";
51
54
  import { tool$vendorsGetVendorCredentialDetails } from "./tools/vendorsGetVendorCredentialDetails.js";
52
55
  import { tool$vendorsGetVendorCredentialFile } from "./tools/vendorsGetVendorCredentialFile.js";
53
56
  import { tool$vendorsGetVendorInvoiceDetails } from "./tools/vendorsGetVendorInvoiceDetails.js";
@@ -66,6 +69,7 @@ import { tool$vendorsListVendorManagedByCompanies } from "./tools/vendorsListVen
66
69
  import { tool$vendorsListVendorScrubDetails } from "./tools/vendorsListVendorScrubDetails.js";
67
70
  import { tool$vendorsListVendorScrubPackages } from "./tools/vendorsListVendorScrubPackages.js";
68
71
  import { tool$vendorsListVendorScrubPurchases } from "./tools/vendorsListVendorScrubPurchases.js";
72
+ import { tool$vendorsListVendorTypes } from "./tools/vendorsListVendorTypes.js";
69
73
  import { tool$vendorsPurchaseScrubCredits } from "./tools/vendorsPurchaseScrubCredits.js";
70
74
  import { tool$vendorsSendDownloadCode } from "./tools/vendorsSendDownloadCode.js";
71
75
  import { tool$vendorsSubmitVendorCredential } from "./tools/vendorsSubmitVendorCredential.js";
@@ -91,7 +95,7 @@ export function createMCPServer(deps: {
91
95
  }) {
92
96
  const server = new McpServer({
93
97
  name: "GreenSecurity",
94
- version: "0.37.10",
98
+ version: "0.37.14",
95
99
  });
96
100
 
97
101
  const client = new GreenSecurityCore({
@@ -123,6 +127,7 @@ export function createMCPServer(deps: {
123
127
 
124
128
  tool(tool$vendorsCreateVendorRegistration);
125
129
  tool(tool$vendorsListVendorJobTitles);
130
+ tool(tool$vendorsListVendorTypes);
126
131
  tool(tool$vendorsListVendorCredentials);
127
132
  tool(tool$vendorsGetVendorCredentialDetails);
128
133
  tool(tool$vendorsUpdateVendorCredentialData);
@@ -142,6 +147,8 @@ export function createMCPServer(deps: {
142
147
  tool(tool$vendorsListVendorCredentialHistory);
143
148
  tool(tool$vendorsListVendorCredentialDataRequests);
144
149
  tool(tool$vendorsExpediteTimeRemaining);
150
+ tool(tool$vendorsGetSubscription);
151
+ tool(tool$vendorsChangeSubscription);
145
152
  tool(tool$vendorsListVendorInvoices);
146
153
  tool(tool$vendorsGetVendorInvoiceDetails);
147
154
  tool(tool$vendorsListVendorFacilityStatuses);
@@ -160,7 +167,6 @@ export function createMCPServer(deps: {
160
167
  tool(tool$vendorsPurchaseScrubCredits);
161
168
  tool(tool$vendorsCreateVendorCompany);
162
169
  tool(tool$vendorsCalculateSubscriptionPrice);
163
- tool(tool$vendorsChangeSubscription);
164
170
  tool(tool$usersGetCurrentUser);
165
171
  tool(tool$usersGetUserById);
166
172
  tool(tool$usersPostAuthenticate);
@@ -172,6 +178,7 @@ export function createMCPServer(deps: {
172
178
  tool(tool$organizationsListOrSearchFacilities);
173
179
  tool(tool$organizationsGetFacility);
174
180
  tool(tool$organizationsListOrSearchDepartments);
181
+ tool(tool$organizationsListOrSearchDepartmentContacts);
175
182
  tool(tool$supportArticlesListOrSearchSupportArticles);
176
183
  tool(tool$supportArticlesGetSupportArticle);
177
184
  tool(tool$webhooksListAllWebhookEndpoints);
@@ -188,6 +195,7 @@ export function createMCPServer(deps: {
188
195
  tool(tool$invoicesCreateInvoice);
189
196
  tool(tool$invoicesUpdateInvoice);
190
197
  tool(tool$invoicesMakePayment);
198
+ tool(tool$systemsListSystems);
191
199
 
192
200
  return server;
193
201
  }
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { organizationsListOrSearchDepartmentContacts } from "../../funcs/organizationsListOrSearchDepartmentContacts.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.ListOrSearchDepartmentContactsRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$organizationsListOrSearchDepartmentContacts: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "organizations-list-or-search-department-contacts",
17
+ description: `List or search department contacts
18
+
19
+ List or search department contacts.
20
+
21
+ Available \`expand\` scopes are:
22
+
23
+ - department_membership.contact
24
+ - department_membership.department`,
25
+ args,
26
+ tool: async (client, args, ctx) => {
27
+ const [result, apiCall] = await organizationsListOrSearchDepartmentContacts(
28
+ client,
29
+ args.request,
30
+ { fetchOptions: { signal: ctx.signal } },
31
+ ).$inspect();
32
+
33
+ if (!result.ok) {
34
+ return {
35
+ content: [{ type: "text", text: result.error.message }],
36
+ isError: true,
37
+ };
38
+ }
39
+
40
+ const value = result.value.result;
41
+
42
+ return formatResult(value, apiCall);
43
+ },
44
+ };
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { systemsListSystems } from "../../funcs/systemsListSystems.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.ListSystemsRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$systemsListSystems: ToolDefinition<typeof args> = {
14
+ name: "systems-list-systems",
15
+ description: `List systems
16
+
17
+ List or search systems.
18
+
19
+ Available \`expand\` scopes are:
20
+
21
+ - system.facilities`,
22
+ args,
23
+ tool: async (client, args, ctx) => {
24
+ const [result, apiCall] = await systemsListSystems(
25
+ client,
26
+ args.request,
27
+ { fetchOptions: { signal: ctx.signal } },
28
+ ).$inspect();
29
+
30
+ if (!result.ok) {
31
+ return {
32
+ content: [{ type: "text", text: result.error.message }],
33
+ isError: true,
34
+ };
35
+ }
36
+
37
+ const value = result.value.result;
38
+
39
+ return formatResult(value, apiCall);
40
+ },
41
+ };
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { vendorsGetSubscription } from "../../funcs/vendorsGetSubscription.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.GetSubscriptionRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$vendorsGetSubscription: ToolDefinition<typeof args> = {
14
+ name: "vendors-get-subscription",
15
+ description: `Vendor subscription
16
+
17
+ Get vendor subscription
18
+
19
+ Available \`expand\` scopes are:
20
+
21
+ subscription.expedited_offer`,
22
+ args,
23
+ tool: async (client, args, ctx) => {
24
+ const [result, apiCall] = await vendorsGetSubscription(
25
+ client,
26
+ args.request,
27
+ { fetchOptions: { signal: ctx.signal } },
28
+ ).$inspect();
29
+
30
+ if (!result.ok) {
31
+ return {
32
+ content: [{ type: "text", text: result.error.message }],
33
+ isError: true,
34
+ };
35
+ }
36
+
37
+ const value = result.value;
38
+
39
+ return formatResult(value, apiCall);
40
+ },
41
+ };
@@ -32,7 +32,10 @@ vendor.payment_responsibility
32
32
  vendor.background_check_date_expires
33
33
  vendor.credit_balance
34
34
  vendor.registration_data
35
- vendor.registration_finished`,
35
+ vendor.registration_finished
36
+ vendor.target_facilities
37
+ vendor.pending_invoice
38
+ vendor.vendor_groups`,
36
39
  args,
37
40
  tool: async (client, args, ctx) => {
38
41
  const [result, apiCall] = await vendorsGetVendorsDetails(
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { vendorsListVendorTypes } from "../../funcs/vendorsListVendorTypes.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.ListVendorTypesRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$vendorsListVendorTypes: ToolDefinition<typeof args> = {
14
+ name: "vendors-list-vendor-types",
15
+ description: `List vendor types
16
+
17
+ List vendor types.`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await vendorsListVendorTypes(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value.result;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -8,6 +8,12 @@ import { safeParse } from "../../lib/schemas.js";
8
8
  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
+ import {
12
+ CompanyVendorTypeRestriction,
13
+ CompanyVendorTypeRestriction$inboundSchema,
14
+ CompanyVendorTypeRestriction$Outbound,
15
+ CompanyVendorTypeRestriction$outboundSchema,
16
+ } from "./companyvendortyperestriction.js";
11
17
 
12
18
  export type CompanyLocation = {
13
19
  address?: string | null | undefined;
@@ -52,6 +58,10 @@ export type Company = {
52
58
  contact?: CompanyContact | undefined;
53
59
  tax?: Tax | undefined;
54
60
  stats?: Stats | undefined;
61
+ vendorTypeRestrictions?:
62
+ | Array<CompanyVendorTypeRestriction | null>
63
+ | null
64
+ | undefined;
55
65
  };
56
66
 
57
67
  /** @internal */
@@ -340,9 +350,13 @@ export const Company$inboundSchema: z.ZodType<Company, z.ZodTypeDef, unknown> =
340
350
  contact: z.lazy(() => CompanyContact$inboundSchema).optional(),
341
351
  tax: z.lazy(() => Tax$inboundSchema).optional(),
342
352
  stats: z.lazy(() => Stats$inboundSchema).optional(),
353
+ vendor_type_restrictions: z.nullable(
354
+ z.array(z.nullable(CompanyVendorTypeRestriction$inboundSchema)),
355
+ ).optional(),
343
356
  }).transform((v) => {
344
357
  return remap$(v, {
345
358
  "credit_balance": "creditBalance",
359
+ "vendor_type_restrictions": "vendorTypeRestrictions",
346
360
  });
347
361
  });
348
362
 
@@ -356,6 +370,10 @@ export type Company$Outbound = {
356
370
  contact?: CompanyContact$Outbound | undefined;
357
371
  tax?: Tax$Outbound | undefined;
358
372
  stats?: Stats$Outbound | undefined;
373
+ vendor_type_restrictions?:
374
+ | Array<CompanyVendorTypeRestriction$Outbound | null>
375
+ | null
376
+ | undefined;
359
377
  };
360
378
 
361
379
  /** @internal */
@@ -372,9 +390,13 @@ export const Company$outboundSchema: z.ZodType<
372
390
  contact: z.lazy(() => CompanyContact$outboundSchema).optional(),
373
391
  tax: z.lazy(() => Tax$outboundSchema).optional(),
374
392
  stats: z.lazy(() => Stats$outboundSchema).optional(),
393
+ vendorTypeRestrictions: z.nullable(
394
+ z.array(z.nullable(CompanyVendorTypeRestriction$outboundSchema)),
395
+ ).optional(),
375
396
  }).transform((v) => {
376
397
  return remap$(v, {
377
398
  creditBalance: "credit_balance",
399
+ vendorTypeRestrictions: "vendor_type_restrictions",
378
400
  });
379
401
  });
380
402
 
@@ -0,0 +1,221 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ FacilitySummary,
12
+ FacilitySummary$inboundSchema,
13
+ FacilitySummary$Outbound,
14
+ FacilitySummary$outboundSchema,
15
+ } from "./facilitysummary.js";
16
+ import {
17
+ VendorType,
18
+ VendorType$inboundSchema,
19
+ VendorType$Outbound,
20
+ VendorType$outboundSchema,
21
+ } from "./vendortype.js";
22
+
23
+ export type CompanyVendorTypeRestrictionFacility = FacilitySummary | number;
24
+
25
+ export type CompanyVendorTypeRestrictionVendorType = VendorType | number;
26
+
27
+ /**
28
+ * Reduced list of attributes of the Company Vendor Type Restriction record
29
+ */
30
+ export type CompanyVendorTypeRestriction = {
31
+ id?: number | undefined;
32
+ facility?: FacilitySummary | number | null | undefined;
33
+ vendorType?: VendorType | number | null | undefined;
34
+ };
35
+
36
+ /** @internal */
37
+ export const CompanyVendorTypeRestrictionFacility$inboundSchema: z.ZodType<
38
+ CompanyVendorTypeRestrictionFacility,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.union([FacilitySummary$inboundSchema, z.number().int()]);
42
+
43
+ /** @internal */
44
+ export type CompanyVendorTypeRestrictionFacility$Outbound =
45
+ | FacilitySummary$Outbound
46
+ | number;
47
+
48
+ /** @internal */
49
+ export const CompanyVendorTypeRestrictionFacility$outboundSchema: z.ZodType<
50
+ CompanyVendorTypeRestrictionFacility$Outbound,
51
+ z.ZodTypeDef,
52
+ CompanyVendorTypeRestrictionFacility
53
+ > = z.union([FacilitySummary$outboundSchema, z.number().int()]);
54
+
55
+ /**
56
+ * @internal
57
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
58
+ */
59
+ export namespace CompanyVendorTypeRestrictionFacility$ {
60
+ /** @deprecated use `CompanyVendorTypeRestrictionFacility$inboundSchema` instead. */
61
+ export const inboundSchema =
62
+ CompanyVendorTypeRestrictionFacility$inboundSchema;
63
+ /** @deprecated use `CompanyVendorTypeRestrictionFacility$outboundSchema` instead. */
64
+ export const outboundSchema =
65
+ CompanyVendorTypeRestrictionFacility$outboundSchema;
66
+ /** @deprecated use `CompanyVendorTypeRestrictionFacility$Outbound` instead. */
67
+ export type Outbound = CompanyVendorTypeRestrictionFacility$Outbound;
68
+ }
69
+
70
+ export function companyVendorTypeRestrictionFacilityToJSON(
71
+ companyVendorTypeRestrictionFacility: CompanyVendorTypeRestrictionFacility,
72
+ ): string {
73
+ return JSON.stringify(
74
+ CompanyVendorTypeRestrictionFacility$outboundSchema.parse(
75
+ companyVendorTypeRestrictionFacility,
76
+ ),
77
+ );
78
+ }
79
+
80
+ export function companyVendorTypeRestrictionFacilityFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<CompanyVendorTypeRestrictionFacility, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) =>
86
+ CompanyVendorTypeRestrictionFacility$inboundSchema.parse(JSON.parse(x)),
87
+ `Failed to parse 'CompanyVendorTypeRestrictionFacility' from JSON`,
88
+ );
89
+ }
90
+
91
+ /** @internal */
92
+ export const CompanyVendorTypeRestrictionVendorType$inboundSchema: z.ZodType<
93
+ CompanyVendorTypeRestrictionVendorType,
94
+ z.ZodTypeDef,
95
+ unknown
96
+ > = z.union([VendorType$inboundSchema, z.number().int()]);
97
+
98
+ /** @internal */
99
+ export type CompanyVendorTypeRestrictionVendorType$Outbound =
100
+ | VendorType$Outbound
101
+ | number;
102
+
103
+ /** @internal */
104
+ export const CompanyVendorTypeRestrictionVendorType$outboundSchema: z.ZodType<
105
+ CompanyVendorTypeRestrictionVendorType$Outbound,
106
+ z.ZodTypeDef,
107
+ CompanyVendorTypeRestrictionVendorType
108
+ > = z.union([VendorType$outboundSchema, z.number().int()]);
109
+
110
+ /**
111
+ * @internal
112
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
113
+ */
114
+ export namespace CompanyVendorTypeRestrictionVendorType$ {
115
+ /** @deprecated use `CompanyVendorTypeRestrictionVendorType$inboundSchema` instead. */
116
+ export const inboundSchema =
117
+ CompanyVendorTypeRestrictionVendorType$inboundSchema;
118
+ /** @deprecated use `CompanyVendorTypeRestrictionVendorType$outboundSchema` instead. */
119
+ export const outboundSchema =
120
+ CompanyVendorTypeRestrictionVendorType$outboundSchema;
121
+ /** @deprecated use `CompanyVendorTypeRestrictionVendorType$Outbound` instead. */
122
+ export type Outbound = CompanyVendorTypeRestrictionVendorType$Outbound;
123
+ }
124
+
125
+ export function companyVendorTypeRestrictionVendorTypeToJSON(
126
+ companyVendorTypeRestrictionVendorType:
127
+ CompanyVendorTypeRestrictionVendorType,
128
+ ): string {
129
+ return JSON.stringify(
130
+ CompanyVendorTypeRestrictionVendorType$outboundSchema.parse(
131
+ companyVendorTypeRestrictionVendorType,
132
+ ),
133
+ );
134
+ }
135
+
136
+ export function companyVendorTypeRestrictionVendorTypeFromJSON(
137
+ jsonString: string,
138
+ ): SafeParseResult<CompanyVendorTypeRestrictionVendorType, SDKValidationError> {
139
+ return safeParse(
140
+ jsonString,
141
+ (x) =>
142
+ CompanyVendorTypeRestrictionVendorType$inboundSchema.parse(JSON.parse(x)),
143
+ `Failed to parse 'CompanyVendorTypeRestrictionVendorType' from JSON`,
144
+ );
145
+ }
146
+
147
+ /** @internal */
148
+ export const CompanyVendorTypeRestriction$inboundSchema: z.ZodType<
149
+ CompanyVendorTypeRestriction,
150
+ z.ZodTypeDef,
151
+ unknown
152
+ > = z.object({
153
+ id: z.number().int().optional(),
154
+ facility: z.nullable(
155
+ z.union([FacilitySummary$inboundSchema, z.number().int()]),
156
+ ).optional(),
157
+ vendor_type: z.nullable(z.union([VendorType$inboundSchema, z.number().int()]))
158
+ .optional(),
159
+ }).transform((v) => {
160
+ return remap$(v, {
161
+ "vendor_type": "vendorType",
162
+ });
163
+ });
164
+
165
+ /** @internal */
166
+ export type CompanyVendorTypeRestriction$Outbound = {
167
+ id?: number | undefined;
168
+ facility?: FacilitySummary$Outbound | number | null | undefined;
169
+ vendor_type?: VendorType$Outbound | number | null | undefined;
170
+ };
171
+
172
+ /** @internal */
173
+ export const CompanyVendorTypeRestriction$outboundSchema: z.ZodType<
174
+ CompanyVendorTypeRestriction$Outbound,
175
+ z.ZodTypeDef,
176
+ CompanyVendorTypeRestriction
177
+ > = z.object({
178
+ id: z.number().int().optional(),
179
+ facility: z.nullable(
180
+ z.union([FacilitySummary$outboundSchema, z.number().int()]),
181
+ ).optional(),
182
+ vendorType: z.nullable(z.union([VendorType$outboundSchema, z.number().int()]))
183
+ .optional(),
184
+ }).transform((v) => {
185
+ return remap$(v, {
186
+ vendorType: "vendor_type",
187
+ });
188
+ });
189
+
190
+ /**
191
+ * @internal
192
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
193
+ */
194
+ export namespace CompanyVendorTypeRestriction$ {
195
+ /** @deprecated use `CompanyVendorTypeRestriction$inboundSchema` instead. */
196
+ export const inboundSchema = CompanyVendorTypeRestriction$inboundSchema;
197
+ /** @deprecated use `CompanyVendorTypeRestriction$outboundSchema` instead. */
198
+ export const outboundSchema = CompanyVendorTypeRestriction$outboundSchema;
199
+ /** @deprecated use `CompanyVendorTypeRestriction$Outbound` instead. */
200
+ export type Outbound = CompanyVendorTypeRestriction$Outbound;
201
+ }
202
+
203
+ export function companyVendorTypeRestrictionToJSON(
204
+ companyVendorTypeRestriction: CompanyVendorTypeRestriction,
205
+ ): string {
206
+ return JSON.stringify(
207
+ CompanyVendorTypeRestriction$outboundSchema.parse(
208
+ companyVendorTypeRestriction,
209
+ ),
210
+ );
211
+ }
212
+
213
+ export function companyVendorTypeRestrictionFromJSON(
214
+ jsonString: string,
215
+ ): SafeParseResult<CompanyVendorTypeRestriction, SDKValidationError> {
216
+ return safeParse(
217
+ jsonString,
218
+ (x) => CompanyVendorTypeRestriction$inboundSchema.parse(JSON.parse(x)),
219
+ `Failed to parse 'CompanyVendorTypeRestriction' from JSON`,
220
+ );
221
+ }
@@ -25,11 +25,19 @@ import {
25
25
  SystemSummary$Outbound,
26
26
  SystemSummary$outboundSchema,
27
27
  } from "./systemsummary.js";
28
+ import {
29
+ UserSummary,
30
+ UserSummary$inboundSchema,
31
+ UserSummary$Outbound,
32
+ UserSummary$outboundSchema,
33
+ } from "./usersummary.js";
28
34
 
29
35
  export type ContactFacility = FacilitySummary | number;
30
36
 
31
37
  export type System = SystemSummary | number;
32
38
 
39
+ export type ContactUser = UserSummary | number;
40
+
33
41
  export const Status = {
34
42
  Active: "Active",
35
43
  Inactive: "Inactive",
@@ -43,8 +51,10 @@ export type ContactDepartment = DepartmentSummary | number;
43
51
  * This object represents a contact at the system or facility level. Use it to verify vendors, create appointments, or check in visitors.
44
52
  */
45
53
  export type Contact = {
46
- facility?: FacilitySummary | number | undefined;
47
- system?: SystemSummary | number | undefined;
54
+ id?: number | undefined;
55
+ facility?: FacilitySummary | number | null | undefined;
56
+ system?: SystemSummary | number | null | undefined;
57
+ user?: UserSummary | number | null | undefined;
48
58
  status: Status;
49
59
  position?: string | null | undefined;
50
60
  department?: DepartmentSummary | number | null | undefined;
@@ -137,6 +147,50 @@ export function systemFromJSON(
137
147
  );
138
148
  }
139
149
 
150
+ /** @internal */
151
+ export const ContactUser$inboundSchema: z.ZodType<
152
+ ContactUser,
153
+ z.ZodTypeDef,
154
+ unknown
155
+ > = z.union([UserSummary$inboundSchema, z.number().int()]);
156
+
157
+ /** @internal */
158
+ export type ContactUser$Outbound = UserSummary$Outbound | number;
159
+
160
+ /** @internal */
161
+ export const ContactUser$outboundSchema: z.ZodType<
162
+ ContactUser$Outbound,
163
+ z.ZodTypeDef,
164
+ ContactUser
165
+ > = z.union([UserSummary$outboundSchema, z.number().int()]);
166
+
167
+ /**
168
+ * @internal
169
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
170
+ */
171
+ export namespace ContactUser$ {
172
+ /** @deprecated use `ContactUser$inboundSchema` instead. */
173
+ export const inboundSchema = ContactUser$inboundSchema;
174
+ /** @deprecated use `ContactUser$outboundSchema` instead. */
175
+ export const outboundSchema = ContactUser$outboundSchema;
176
+ /** @deprecated use `ContactUser$Outbound` instead. */
177
+ export type Outbound = ContactUser$Outbound;
178
+ }
179
+
180
+ export function contactUserToJSON(contactUser: ContactUser): string {
181
+ return JSON.stringify(ContactUser$outboundSchema.parse(contactUser));
182
+ }
183
+
184
+ export function contactUserFromJSON(
185
+ jsonString: string,
186
+ ): SafeParseResult<ContactUser, SDKValidationError> {
187
+ return safeParse(
188
+ jsonString,
189
+ (x) => ContactUser$inboundSchema.parse(JSON.parse(x)),
190
+ `Failed to parse 'ContactUser' from JSON`,
191
+ );
192
+ }
193
+
140
194
  /** @internal */
141
195
  export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
142
196
  .nativeEnum(Status);
@@ -207,9 +261,14 @@ export function contactDepartmentFromJSON(
207
261
  /** @internal */
208
262
  export const Contact$inboundSchema: z.ZodType<Contact, z.ZodTypeDef, unknown> =
209
263
  z.object({
210
- facility: z.union([FacilitySummary$inboundSchema, z.number().int()])
264
+ id: z.number().int().optional(),
265
+ facility: z.nullable(
266
+ z.union([FacilitySummary$inboundSchema, z.number().int()]),
267
+ ).optional(),
268
+ system: z.nullable(z.union([SystemSummary$inboundSchema, z.number().int()]))
269
+ .optional(),
270
+ user: z.nullable(z.union([UserSummary$inboundSchema, z.number().int()]))
211
271
  .optional(),
212
- system: z.union([SystemSummary$inboundSchema, z.number().int()]).optional(),
213
272
  status: Status$inboundSchema,
214
273
  position: z.nullable(z.string()).optional(),
215
274
  department: z.nullable(
@@ -219,8 +278,10 @@ export const Contact$inboundSchema: z.ZodType<Contact, z.ZodTypeDef, unknown> =
219
278
 
220
279
  /** @internal */
221
280
  export type Contact$Outbound = {
222
- facility?: FacilitySummary$Outbound | number | undefined;
223
- system?: SystemSummary$Outbound | number | undefined;
281
+ id?: number | undefined;
282
+ facility?: FacilitySummary$Outbound | number | null | undefined;
283
+ system?: SystemSummary$Outbound | number | null | undefined;
284
+ user?: UserSummary$Outbound | number | null | undefined;
224
285
  status: string;
225
286
  position?: string | null | undefined;
226
287
  department?: DepartmentSummary$Outbound | number | null | undefined;
@@ -232,9 +293,14 @@ export const Contact$outboundSchema: z.ZodType<
232
293
  z.ZodTypeDef,
233
294
  Contact
234
295
  > = z.object({
235
- facility: z.union([FacilitySummary$outboundSchema, z.number().int()])
296
+ id: z.number().int().optional(),
297
+ facility: z.nullable(
298
+ z.union([FacilitySummary$outboundSchema, z.number().int()]),
299
+ ).optional(),
300
+ system: z.nullable(z.union([SystemSummary$outboundSchema, z.number().int()]))
301
+ .optional(),
302
+ user: z.nullable(z.union([UserSummary$outboundSchema, z.number().int()]))
236
303
  .optional(),
237
- system: z.union([SystemSummary$outboundSchema, z.number().int()]).optional(),
238
304
  status: Status$outboundSchema,
239
305
  position: z.nullable(z.string()).optional(),
240
306
  department: z.nullable(