@greensecurity/javascript-sdk 0.40.8-beta.3 → 0.40.8-beta.31

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 (365) hide show
  1. package/.devcontainer/README.md +35 -0
  2. package/README.md +14 -5
  3. package/dist/commonjs/__tests__/alerts.test.d.ts +2 -0
  4. package/dist/commonjs/__tests__/alerts.test.d.ts.map +1 -0
  5. package/dist/commonjs/__tests__/alerts.test.js +51 -0
  6. package/dist/commonjs/__tests__/alerts.test.js.map +1 -0
  7. package/dist/commonjs/__tests__/vendors.test.js +25 -0
  8. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  9. package/dist/commonjs/__tests__/zones.test.js +3 -2
  10. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  11. package/dist/commonjs/admin-funcs/registerCompanies.d.ts +16 -0
  12. package/dist/commonjs/admin-funcs/registerCompanies.d.ts.map +1 -0
  13. package/dist/commonjs/admin-funcs/registerCompanies.js +9 -0
  14. package/dist/commonjs/admin-funcs/registerCompanies.js.map +1 -0
  15. package/dist/commonjs/admin-funcs/registerEmail.d.ts +9 -0
  16. package/dist/commonjs/admin-funcs/registerEmail.d.ts.map +1 -0
  17. package/dist/commonjs/admin-funcs/registerEmail.js +9 -0
  18. package/dist/commonjs/admin-funcs/registerEmail.js.map +1 -0
  19. package/dist/commonjs/admin-funcs/registerGeneralInfo.d.ts +23 -0
  20. package/dist/commonjs/admin-funcs/registerGeneralInfo.d.ts.map +1 -0
  21. package/dist/commonjs/admin-funcs/registerGeneralInfo.js +9 -0
  22. package/dist/commonjs/admin-funcs/registerGeneralInfo.js.map +1 -0
  23. package/dist/commonjs/admin-funcs/registerPassword.d.ts +7 -0
  24. package/dist/commonjs/admin-funcs/registerPassword.d.ts.map +1 -0
  25. package/dist/commonjs/admin-funcs/registerPassword.js +9 -0
  26. package/dist/commonjs/admin-funcs/registerPassword.js.map +1 -0
  27. package/dist/commonjs/funcs/alertsListAlerts.d.ts +21 -0
  28. package/dist/commonjs/funcs/alertsListAlerts.d.ts.map +1 -0
  29. package/dist/commonjs/funcs/alertsListAlerts.js +154 -0
  30. package/dist/commonjs/funcs/alertsListAlerts.js.map +1 -0
  31. package/dist/commonjs/funcs/alertsUpdateUserAlerts.d.ts +18 -0
  32. package/dist/commonjs/funcs/alertsUpdateUserAlerts.d.ts.map +1 -0
  33. package/dist/commonjs/funcs/alertsUpdateUserAlerts.js +117 -0
  34. package/dist/commonjs/funcs/alertsUpdateUserAlerts.js.map +1 -0
  35. package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts +18 -0
  36. package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
  37. package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.js +126 -0
  38. package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
  39. package/dist/commonjs/funcs/vendorsGetVendorsDetails.d.ts +1 -0
  40. package/dist/commonjs/funcs/vendorsGetVendorsDetails.d.ts.map +1 -1
  41. package/dist/commonjs/funcs/vendorsGetVendorsDetails.js +1 -0
  42. package/dist/commonjs/funcs/vendorsGetVendorsDetails.js.map +1 -1
  43. package/dist/commonjs/index.extras.d.ts +10 -0
  44. package/dist/commonjs/index.extras.d.ts.map +1 -1
  45. package/dist/commonjs/index.extras.js +10 -0
  46. package/dist/commonjs/index.extras.js.map +1 -1
  47. package/dist/commonjs/lib/config.d.ts +4 -4
  48. package/dist/commonjs/lib/config.js +4 -4
  49. package/dist/commonjs/lib/config.js.map +1 -1
  50. package/dist/commonjs/lib/url.js +1 -1
  51. package/dist/commonjs/lib/url.js.map +1 -1
  52. package/dist/commonjs/models/components/alert.d.ts +79 -0
  53. package/dist/commonjs/models/components/alert.d.ts.map +1 -0
  54. package/dist/commonjs/models/components/alert.js +123 -0
  55. package/dist/commonjs/models/components/alert.js.map +1 -0
  56. package/dist/commonjs/models/components/credential.d.ts +6 -4
  57. package/dist/commonjs/models/components/credential.d.ts.map +1 -1
  58. package/dist/commonjs/models/components/credential.js +8 -4
  59. package/dist/commonjs/models/components/credential.js.map +1 -1
  60. package/dist/commonjs/models/components/credentialstatus.d.ts +3 -0
  61. package/dist/commonjs/models/components/credentialstatus.d.ts.map +1 -1
  62. package/dist/commonjs/models/components/credentialstatus.js +1 -0
  63. package/dist/commonjs/models/components/credentialstatus.js.map +1 -1
  64. package/dist/commonjs/models/components/expand.d.ts +6 -0
  65. package/dist/commonjs/models/components/expand.d.ts.map +1 -1
  66. package/dist/commonjs/models/components/expand.js +2 -0
  67. package/dist/commonjs/models/components/expand.js.map +1 -1
  68. package/dist/commonjs/models/components/facilitycalendarsummary.d.ts +68 -0
  69. package/dist/commonjs/models/components/facilitycalendarsummary.d.ts.map +1 -0
  70. package/dist/commonjs/models/components/facilitycalendarsummary.js +130 -0
  71. package/dist/commonjs/models/components/facilitycalendarsummary.js.map +1 -0
  72. package/dist/commonjs/models/components/facilitysummary.d.ts +2 -0
  73. package/dist/commonjs/models/components/facilitysummary.d.ts.map +1 -1
  74. package/dist/commonjs/models/components/facilitysummary.js +4 -0
  75. package/dist/commonjs/models/components/facilitysummary.js.map +1 -1
  76. package/dist/commonjs/models/components/index.d.ts +4 -0
  77. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  78. package/dist/commonjs/models/components/index.js +4 -0
  79. package/dist/commonjs/models/components/index.js.map +1 -1
  80. package/dist/commonjs/models/components/screeninganswer.d.ts +112 -0
  81. package/dist/commonjs/models/components/screeninganswer.d.ts.map +1 -0
  82. package/dist/commonjs/models/components/screeninganswer.js +138 -0
  83. package/dist/commonjs/models/components/screeninganswer.js.map +1 -0
  84. package/dist/commonjs/models/components/screeningquestion.d.ts +98 -0
  85. package/dist/commonjs/models/components/screeningquestion.d.ts.map +1 -0
  86. package/dist/commonjs/models/components/screeningquestion.js +125 -0
  87. package/dist/commonjs/models/components/screeningquestion.js.map +1 -0
  88. package/dist/commonjs/models/components/userlocation.d.ts +1 -5
  89. package/dist/commonjs/models/components/userlocation.d.ts.map +1 -1
  90. package/dist/commonjs/models/components/userlocation.js +2 -3
  91. package/dist/commonjs/models/components/userlocation.js.map +1 -1
  92. package/dist/commonjs/models/components/vendor.d.ts +7 -2
  93. package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
  94. package/dist/commonjs/models/components/vendor.js +11 -2
  95. package/dist/commonjs/models/components/vendor.js.map +1 -1
  96. package/dist/commonjs/models/errors/index.d.ts +1 -0
  97. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  98. package/dist/commonjs/models/errors/index.js +1 -0
  99. package/dist/commonjs/models/errors/index.js.map +1 -1
  100. package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.d.ts +70 -0
  101. package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.d.ts.map +1 -0
  102. package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.js +122 -0
  103. package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.js.map +1 -0
  104. package/dist/commonjs/models/operations/index.d.ts +3 -0
  105. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  106. package/dist/commonjs/models/operations/index.js +3 -0
  107. package/dist/commonjs/models/operations/index.js.map +1 -1
  108. package/dist/commonjs/models/operations/listalerts.d.ts +106 -0
  109. package/dist/commonjs/models/operations/listalerts.d.ts.map +1 -0
  110. package/dist/commonjs/models/operations/listalerts.js +149 -0
  111. package/dist/commonjs/models/operations/listalerts.js.map +1 -0
  112. package/dist/commonjs/models/operations/listvendorcredentials.d.ts +4 -4
  113. package/dist/commonjs/models/operations/listvendorcredentials.d.ts.map +1 -1
  114. package/dist/commonjs/models/operations/listvendorcredentials.js +4 -4
  115. package/dist/commonjs/models/operations/listvendorcredentials.js.map +1 -1
  116. package/dist/commonjs/models/operations/updateuseralerts.d.ts +57 -0
  117. package/dist/commonjs/models/operations/updateuseralerts.d.ts.map +1 -0
  118. package/dist/commonjs/models/operations/updateuseralerts.js +105 -0
  119. package/dist/commonjs/models/operations/updateuseralerts.js.map +1 -0
  120. package/dist/commonjs/react-query/alertsListAlerts.d.ts +75 -0
  121. package/dist/commonjs/react-query/alertsListAlerts.d.ts.map +1 -0
  122. package/dist/commonjs/react-query/alertsListAlerts.js +150 -0
  123. package/dist/commonjs/react-query/alertsListAlerts.js.map +1 -0
  124. package/dist/commonjs/react-query/alertsUpdateUserAlerts.d.ts +23 -0
  125. package/dist/commonjs/react-query/alertsUpdateUserAlerts.d.ts.map +1 -0
  126. package/dist/commonjs/react-query/alertsUpdateUserAlerts.js +47 -0
  127. package/dist/commonjs/react-query/alertsUpdateUserAlerts.js.map +1 -0
  128. package/dist/commonjs/react-query/index.d.ts +3 -0
  129. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  130. package/dist/commonjs/react-query/index.js +3 -0
  131. package/dist/commonjs/react-query/index.js.map +1 -1
  132. package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts +43 -0
  133. package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
  134. package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.js +97 -0
  135. package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
  136. package/dist/commonjs/react-query/vendorsGetVendorsDetails.d.ts +2 -0
  137. package/dist/commonjs/react-query/vendorsGetVendorsDetails.d.ts.map +1 -1
  138. package/dist/commonjs/react-query/vendorsGetVendorsDetails.js +2 -0
  139. package/dist/commonjs/react-query/vendorsGetVendorsDetails.js.map +1 -1
  140. package/dist/commonjs/react-query/vendorsListVendorCredentials.d.ts +3 -3
  141. package/dist/commonjs/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
  142. package/dist/commonjs/sdk/alerts.d.ts +22 -0
  143. package/dist/commonjs/sdk/alerts.d.ts.map +1 -0
  144. package/dist/commonjs/sdk/alerts.js +33 -0
  145. package/dist/commonjs/sdk/alerts.js.map +1 -0
  146. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  147. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  148. package/dist/commonjs/sdk/sdk.js +4 -0
  149. package/dist/commonjs/sdk/sdk.js.map +1 -1
  150. package/dist/commonjs/sdk/vendors.d.ts +8 -0
  151. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  152. package/dist/commonjs/sdk/vendors.js +11 -0
  153. package/dist/commonjs/sdk/vendors.js.map +1 -1
  154. package/dist/esm/__tests__/alerts.test.d.ts +2 -0
  155. package/dist/esm/__tests__/alerts.test.d.ts.map +1 -0
  156. package/dist/esm/__tests__/alerts.test.js +49 -0
  157. package/dist/esm/__tests__/alerts.test.js.map +1 -0
  158. package/dist/esm/__tests__/vendors.test.js +25 -0
  159. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  160. package/dist/esm/__tests__/zones.test.js +3 -2
  161. package/dist/esm/__tests__/zones.test.js.map +1 -1
  162. package/dist/esm/admin-funcs/registerCompanies.d.ts +16 -0
  163. package/dist/esm/admin-funcs/registerCompanies.d.ts.map +1 -0
  164. package/dist/esm/admin-funcs/registerCompanies.js +6 -0
  165. package/dist/esm/admin-funcs/registerCompanies.js.map +1 -0
  166. package/dist/esm/admin-funcs/registerEmail.d.ts +9 -0
  167. package/dist/esm/admin-funcs/registerEmail.d.ts.map +1 -0
  168. package/dist/esm/admin-funcs/registerEmail.js +6 -0
  169. package/dist/esm/admin-funcs/registerEmail.js.map +1 -0
  170. package/dist/esm/admin-funcs/registerGeneralInfo.d.ts +23 -0
  171. package/dist/esm/admin-funcs/registerGeneralInfo.d.ts.map +1 -0
  172. package/dist/esm/admin-funcs/registerGeneralInfo.js +6 -0
  173. package/dist/esm/admin-funcs/registerGeneralInfo.js.map +1 -0
  174. package/dist/esm/admin-funcs/registerPassword.d.ts +7 -0
  175. package/dist/esm/admin-funcs/registerPassword.d.ts.map +1 -0
  176. package/dist/esm/admin-funcs/registerPassword.js +6 -0
  177. package/dist/esm/admin-funcs/registerPassword.js.map +1 -0
  178. package/dist/esm/funcs/alertsListAlerts.d.ts +21 -0
  179. package/dist/esm/funcs/alertsListAlerts.d.ts.map +1 -0
  180. package/dist/esm/funcs/alertsListAlerts.js +118 -0
  181. package/dist/esm/funcs/alertsListAlerts.js.map +1 -0
  182. package/dist/esm/funcs/alertsUpdateUserAlerts.d.ts +18 -0
  183. package/dist/esm/funcs/alertsUpdateUserAlerts.d.ts.map +1 -0
  184. package/dist/esm/funcs/alertsUpdateUserAlerts.js +81 -0
  185. package/dist/esm/funcs/alertsUpdateUserAlerts.js.map +1 -0
  186. package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts +18 -0
  187. package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
  188. package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.js +90 -0
  189. package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
  190. package/dist/esm/funcs/vendorsGetVendorsDetails.d.ts +1 -0
  191. package/dist/esm/funcs/vendorsGetVendorsDetails.d.ts.map +1 -1
  192. package/dist/esm/funcs/vendorsGetVendorsDetails.js +1 -0
  193. package/dist/esm/funcs/vendorsGetVendorsDetails.js.map +1 -1
  194. package/dist/esm/index.extras.d.ts +10 -0
  195. package/dist/esm/index.extras.d.ts.map +1 -1
  196. package/dist/esm/index.extras.js +10 -0
  197. package/dist/esm/index.extras.js.map +1 -1
  198. package/dist/esm/lib/config.d.ts +4 -4
  199. package/dist/esm/lib/config.js +4 -4
  200. package/dist/esm/lib/config.js.map +1 -1
  201. package/dist/esm/lib/url.js +1 -1
  202. package/dist/esm/lib/url.js.map +1 -1
  203. package/dist/esm/models/components/alert.d.ts +79 -0
  204. package/dist/esm/models/components/alert.d.ts.map +1 -0
  205. package/dist/esm/models/components/alert.js +85 -0
  206. package/dist/esm/models/components/alert.js.map +1 -0
  207. package/dist/esm/models/components/credential.d.ts +6 -4
  208. package/dist/esm/models/components/credential.d.ts.map +1 -1
  209. package/dist/esm/models/components/credential.js +8 -4
  210. package/dist/esm/models/components/credential.js.map +1 -1
  211. package/dist/esm/models/components/credentialstatus.d.ts +3 -0
  212. package/dist/esm/models/components/credentialstatus.d.ts.map +1 -1
  213. package/dist/esm/models/components/credentialstatus.js +1 -0
  214. package/dist/esm/models/components/credentialstatus.js.map +1 -1
  215. package/dist/esm/models/components/expand.d.ts +6 -0
  216. package/dist/esm/models/components/expand.d.ts.map +1 -1
  217. package/dist/esm/models/components/expand.js +2 -0
  218. package/dist/esm/models/components/expand.js.map +1 -1
  219. package/dist/esm/models/components/facilitycalendarsummary.d.ts +68 -0
  220. package/dist/esm/models/components/facilitycalendarsummary.d.ts.map +1 -0
  221. package/dist/esm/models/components/facilitycalendarsummary.js +90 -0
  222. package/dist/esm/models/components/facilitycalendarsummary.js.map +1 -0
  223. package/dist/esm/models/components/facilitysummary.d.ts +2 -0
  224. package/dist/esm/models/components/facilitysummary.d.ts.map +1 -1
  225. package/dist/esm/models/components/facilitysummary.js +4 -0
  226. package/dist/esm/models/components/facilitysummary.js.map +1 -1
  227. package/dist/esm/models/components/index.d.ts +4 -0
  228. package/dist/esm/models/components/index.d.ts.map +1 -1
  229. package/dist/esm/models/components/index.js +4 -0
  230. package/dist/esm/models/components/index.js.map +1 -1
  231. package/dist/esm/models/components/screeninganswer.d.ts +112 -0
  232. package/dist/esm/models/components/screeninganswer.d.ts.map +1 -0
  233. package/dist/esm/models/components/screeninganswer.js +100 -0
  234. package/dist/esm/models/components/screeninganswer.js.map +1 -0
  235. package/dist/esm/models/components/screeningquestion.d.ts +98 -0
  236. package/dist/esm/models/components/screeningquestion.d.ts.map +1 -0
  237. package/dist/esm/models/components/screeningquestion.js +87 -0
  238. package/dist/esm/models/components/screeningquestion.js.map +1 -0
  239. package/dist/esm/models/components/userlocation.d.ts +1 -5
  240. package/dist/esm/models/components/userlocation.d.ts.map +1 -1
  241. package/dist/esm/models/components/userlocation.js +2 -3
  242. package/dist/esm/models/components/userlocation.js.map +1 -1
  243. package/dist/esm/models/components/vendor.d.ts +7 -2
  244. package/dist/esm/models/components/vendor.d.ts.map +1 -1
  245. package/dist/esm/models/components/vendor.js +11 -2
  246. package/dist/esm/models/components/vendor.js.map +1 -1
  247. package/dist/esm/models/errors/index.d.ts +1 -0
  248. package/dist/esm/models/errors/index.d.ts.map +1 -1
  249. package/dist/esm/models/errors/index.js +1 -0
  250. package/dist/esm/models/errors/index.js.map +1 -1
  251. package/dist/esm/models/operations/getnextunansweredscreeningquestion.d.ts +70 -0
  252. package/dist/esm/models/operations/getnextunansweredscreeningquestion.d.ts.map +1 -0
  253. package/dist/esm/models/operations/getnextunansweredscreeningquestion.js +82 -0
  254. package/dist/esm/models/operations/getnextunansweredscreeningquestion.js.map +1 -0
  255. package/dist/esm/models/operations/index.d.ts +3 -0
  256. package/dist/esm/models/operations/index.d.ts.map +1 -1
  257. package/dist/esm/models/operations/index.js +3 -0
  258. package/dist/esm/models/operations/index.js.map +1 -1
  259. package/dist/esm/models/operations/listalerts.d.ts +106 -0
  260. package/dist/esm/models/operations/listalerts.d.ts.map +1 -0
  261. package/dist/esm/models/operations/listalerts.js +107 -0
  262. package/dist/esm/models/operations/listalerts.js.map +1 -0
  263. package/dist/esm/models/operations/listvendorcredentials.d.ts +4 -4
  264. package/dist/esm/models/operations/listvendorcredentials.d.ts.map +1 -1
  265. package/dist/esm/models/operations/listvendorcredentials.js +4 -4
  266. package/dist/esm/models/operations/listvendorcredentials.js.map +1 -1
  267. package/dist/esm/models/operations/updateuseralerts.d.ts +57 -0
  268. package/dist/esm/models/operations/updateuseralerts.d.ts.map +1 -0
  269. package/dist/esm/models/operations/updateuseralerts.js +65 -0
  270. package/dist/esm/models/operations/updateuseralerts.js.map +1 -0
  271. package/dist/esm/react-query/alertsListAlerts.d.ts +75 -0
  272. package/dist/esm/react-query/alertsListAlerts.d.ts.map +1 -0
  273. package/dist/esm/react-query/alertsListAlerts.js +137 -0
  274. package/dist/esm/react-query/alertsListAlerts.js.map +1 -0
  275. package/dist/esm/react-query/alertsUpdateUserAlerts.d.ts +23 -0
  276. package/dist/esm/react-query/alertsUpdateUserAlerts.d.ts.map +1 -0
  277. package/dist/esm/react-query/alertsUpdateUserAlerts.js +42 -0
  278. package/dist/esm/react-query/alertsUpdateUserAlerts.js.map +1 -0
  279. package/dist/esm/react-query/index.d.ts +3 -0
  280. package/dist/esm/react-query/index.d.ts.map +1 -1
  281. package/dist/esm/react-query/index.js +3 -0
  282. package/dist/esm/react-query/index.js.map +1 -1
  283. package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts +43 -0
  284. package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
  285. package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.js +87 -0
  286. package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
  287. package/dist/esm/react-query/vendorsGetVendorsDetails.d.ts +2 -0
  288. package/dist/esm/react-query/vendorsGetVendorsDetails.d.ts.map +1 -1
  289. package/dist/esm/react-query/vendorsGetVendorsDetails.js +2 -0
  290. package/dist/esm/react-query/vendorsGetVendorsDetails.js.map +1 -1
  291. package/dist/esm/react-query/vendorsListVendorCredentials.d.ts +3 -3
  292. package/dist/esm/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
  293. package/dist/esm/sdk/alerts.d.ts +22 -0
  294. package/dist/esm/sdk/alerts.d.ts.map +1 -0
  295. package/dist/esm/sdk/alerts.js +29 -0
  296. package/dist/esm/sdk/alerts.js.map +1 -0
  297. package/dist/esm/sdk/sdk.d.ts +3 -0
  298. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  299. package/dist/esm/sdk/sdk.js +4 -0
  300. package/dist/esm/sdk/sdk.js.map +1 -1
  301. package/dist/esm/sdk/vendors.d.ts +8 -0
  302. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  303. package/dist/esm/sdk/vendors.js +11 -0
  304. package/dist/esm/sdk/vendors.js.map +1 -1
  305. package/docs/sdks/alerts/README.md +219 -0
  306. package/docs/sdks/companies/README.md +126 -0
  307. package/docs/sdks/datarequests/README.md +302 -0
  308. package/docs/sdks/events/README.md +1126 -0
  309. package/docs/sdks/fhirconfigs/README.md +551 -0
  310. package/docs/sdks/greensecurity/README.md +14 -0
  311. package/docs/sdks/invoices/README.md +324 -0
  312. package/docs/sdks/mobiledevices/README.md +100 -0
  313. package/docs/sdks/organizations/README.md +508 -0
  314. package/docs/sdks/supportarticles/README.md +249 -0
  315. package/docs/sdks/systems/README.md +136 -0
  316. package/docs/sdks/users/README.md +831 -0
  317. package/docs/sdks/vendors/README.md +4904 -0
  318. package/docs/sdks/vendorscans/README.md +104 -0
  319. package/docs/sdks/webhooks/README.md +352 -0
  320. package/docs/sdks/zones/README.md +344 -0
  321. package/examples/README.md +31 -0
  322. package/examples/package-lock.json +1 -1
  323. package/examples/vendorsCreateVendorRegistration.example.ts +1 -1
  324. package/jsr.json +1 -1
  325. package/package.json +1 -1
  326. package/src/__tests__/alerts.test.ts +55 -0
  327. package/src/__tests__/vendors.test.ts +32 -0
  328. package/src/__tests__/zones.test.ts +3 -2
  329. package/src/admin-funcs/registerCompanies.ts +23 -0
  330. package/src/admin-funcs/registerEmail.ts +16 -0
  331. package/src/admin-funcs/registerGeneralInfo.ts +30 -0
  332. package/src/admin-funcs/registerPassword.ts +14 -0
  333. package/src/funcs/alertsListAlerts.ts +245 -0
  334. package/src/funcs/alertsUpdateUserAlerts.ts +170 -0
  335. package/src/funcs/vendorsGetNextUnansweredScreeningQuestion.ts +188 -0
  336. package/src/funcs/vendorsGetVendorsDetails.ts +1 -0
  337. package/src/index.extras.ts +14 -1
  338. package/src/lib/config.ts +4 -4
  339. package/src/lib/url.ts +1 -1
  340. package/src/models/components/alert.ts +141 -0
  341. package/src/models/components/credential.ts +19 -10
  342. package/src/models/components/credentialstatus.ts +1 -0
  343. package/src/models/components/expand.ts +2 -0
  344. package/src/models/components/facilitycalendarsummary.ts +188 -0
  345. package/src/models/components/facilitysummary.ts +6 -0
  346. package/src/models/components/index.ts +4 -0
  347. package/src/models/components/screeninganswer.ts +195 -0
  348. package/src/models/components/screeningquestion.ts +163 -0
  349. package/src/models/components/userlocation.ts +3 -7
  350. package/src/models/components/vendor.ts +25 -4
  351. package/src/models/errors/index.ts +1 -0
  352. package/src/models/operations/getnextunansweredscreeningquestion.ts +191 -0
  353. package/src/models/operations/index.ts +3 -0
  354. package/src/models/operations/listalerts.ts +234 -0
  355. package/src/models/operations/listvendorcredentials.ts +8 -10
  356. package/src/models/operations/updateuseralerts.ts +140 -0
  357. package/src/react-query/alertsListAlerts.ts +308 -0
  358. package/src/react-query/alertsUpdateUserAlerts.ts +89 -0
  359. package/src/react-query/index.ts +3 -0
  360. package/src/react-query/vendorsGetNextUnansweredScreeningQuestion.ts +190 -0
  361. package/src/react-query/vendorsGetVendorsDetails.ts +2 -0
  362. package/src/react-query/vendorsListVendorCredentials.ts +3 -3
  363. package/src/sdk/alerts.ts +46 -0
  364. package/src/sdk/sdk.ts +6 -0
  365. package/src/sdk/vendors.ts +19 -0
@@ -0,0 +1,219 @@
1
+ # Alerts
2
+ (*alerts*)
3
+
4
+ ## Overview
5
+
6
+ ### Available Operations
7
+
8
+ * [listAlerts](#listalerts) - List alerts
9
+ * [updateUserAlerts](#updateuseralerts) - Update user alerts
10
+
11
+ ## listAlerts
12
+
13
+ List alerts for user.
14
+
15
+ ### Example Usage
16
+
17
+ <!-- UsageSnippet language="typescript" operationID="listAlerts" method="get" path="/alerts" -->
18
+ ```typescript
19
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
20
+
21
+ const greenSecurity = new GreenSecurity({
22
+ security: {
23
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
24
+ },
25
+ });
26
+
27
+ async function run() {
28
+ const result = await greenSecurity.alerts.listAlerts({
29
+ sort: "job",
30
+ desc: true,
31
+ itemsPerPage: 25,
32
+ });
33
+
34
+ for await (const page of result) {
35
+ console.log(page);
36
+ }
37
+ }
38
+
39
+ run();
40
+ ```
41
+
42
+ ### Standalone function
43
+
44
+ The standalone function version of this method:
45
+
46
+ ```typescript
47
+ import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
48
+ import { alertsListAlerts } from "@greensecurity/javascript-sdk/funcs/alertsListAlerts.js";
49
+
50
+ // Use `GreenSecurityCore` for best tree-shaking performance.
51
+ // You can create one instance of it to use across an application.
52
+ const greenSecurity = new GreenSecurityCore({
53
+ security: {
54
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
55
+ },
56
+ });
57
+
58
+ async function run() {
59
+ const res = await alertsListAlerts(greenSecurity, {
60
+ sort: "job",
61
+ desc: true,
62
+ itemsPerPage: 25,
63
+ });
64
+ if (res.ok) {
65
+ const { value: result } = res;
66
+ for await (const page of result) {
67
+ console.log(page);
68
+ }
69
+ } else {
70
+ console.log("alertsListAlerts failed:", res.error);
71
+ }
72
+ }
73
+
74
+ run();
75
+ ```
76
+
77
+ ### React hooks and utilities
78
+
79
+ This method can be used in React components through the following hooks and
80
+ associated utilities.
81
+
82
+ > Check out [this guide][hook-guide] for information about each of the utilities
83
+ > below and how to get started using React hooks.
84
+
85
+ [hook-guide]: ../../../REACT_QUERY.md
86
+
87
+ ```tsx
88
+ import {
89
+ // Query hooks for fetching data.
90
+ useAlertsListAlerts,
91
+ useAlertsListAlertsSuspense,
92
+ // Query hooks suitable for building infinite scrolling or "load more" UIs.
93
+ useAlertsListAlertsInfinite,
94
+ useAlertsListAlertsInfiniteSuspense,
95
+
96
+ // Utility for prefetching data during server-side rendering and in React
97
+ // Server Components that will be immediately available to client components
98
+ // using the hooks.
99
+ prefetchAlertsListAlerts,
100
+
101
+ // Utilities to invalidate the query cache for this query in response to
102
+ // mutations and other user actions.
103
+ invalidateAlertsListAlerts,
104
+ invalidateAllAlertsListAlerts,
105
+ } from "@greensecurity/javascript-sdk/react-query/alertsListAlerts.js";
106
+ ```
107
+
108
+ ### Parameters
109
+
110
+ | Parameter | Type | Required | Description |
111
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
112
+ | `request` | [operations.ListAlertsRequest](../../models/operations/listalertsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
113
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
114
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
115
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
116
+
117
+ ### Response
118
+
119
+ **Promise\<[operations.ListAlertsResponse](../../models/operations/listalertsresponse.md)\>**
120
+
121
+ ### Errors
122
+
123
+ | Error Type | Status Code | Content Type |
124
+ | ----------------------- | ----------------------- | ----------------------- |
125
+ | errors.ApiErrorResponse | 400, 401, 403 | application/json |
126
+ | errors.ApiErrorResponse | 500 | application/json |
127
+ | errors.APIError | 4XX, 5XX | \*/\* |
128
+
129
+ ## updateUserAlerts
130
+
131
+ Update user alerts
132
+
133
+ ### Example Usage
134
+
135
+ <!-- UsageSnippet language="typescript" operationID="updateUserAlerts" method="put" path="/user-alerts" -->
136
+ ```typescript
137
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
138
+
139
+ const greenSecurity = new GreenSecurity({
140
+ security: {
141
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
142
+ },
143
+ });
144
+
145
+ async function run() {
146
+ const result = await greenSecurity.alerts.updateUserAlerts({});
147
+
148
+ console.log(result);
149
+ }
150
+
151
+ run();
152
+ ```
153
+
154
+ ### Standalone function
155
+
156
+ The standalone function version of this method:
157
+
158
+ ```typescript
159
+ import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
160
+ import { alertsUpdateUserAlerts } from "@greensecurity/javascript-sdk/funcs/alertsUpdateUserAlerts.js";
161
+
162
+ // Use `GreenSecurityCore` for best tree-shaking performance.
163
+ // You can create one instance of it to use across an application.
164
+ const greenSecurity = new GreenSecurityCore({
165
+ security: {
166
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
167
+ },
168
+ });
169
+
170
+ async function run() {
171
+ const res = await alertsUpdateUserAlerts(greenSecurity, {});
172
+ if (res.ok) {
173
+ const { value: result } = res;
174
+ console.log(result);
175
+ } else {
176
+ console.log("alertsUpdateUserAlerts failed:", res.error);
177
+ }
178
+ }
179
+
180
+ run();
181
+ ```
182
+
183
+ ### React hooks and utilities
184
+
185
+ This method can be used in React components through the following hooks and
186
+ associated utilities.
187
+
188
+ > Check out [this guide][hook-guide] for information about each of the utilities
189
+ > below and how to get started using React hooks.
190
+
191
+ [hook-guide]: ../../../REACT_QUERY.md
192
+
193
+ ```tsx
194
+ import {
195
+ // Mutation hook for triggering the API call.
196
+ useAlertsUpdateUserAlertsMutation
197
+ } from "@greensecurity/javascript-sdk/react-query/alertsUpdateUserAlerts.js";
198
+ ```
199
+
200
+ ### Parameters
201
+
202
+ | Parameter | Type | Required | Description |
203
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
204
+ | `request` | [operations.UpdateUserAlertsRequestBody](../../models/operations/updateuseralertsrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
205
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
206
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
207
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
208
+
209
+ ### Response
210
+
211
+ **Promise\<[operations.UpdateUserAlertsResponseBody](../../models/operations/updateuseralertsresponsebody.md)\>**
212
+
213
+ ### Errors
214
+
215
+ | Error Type | Status Code | Content Type |
216
+ | ----------------------- | ----------------------- | ----------------------- |
217
+ | errors.ApiErrorResponse | 400, 401, 403, 404 | application/json |
218
+ | errors.ApiErrorResponse | 500 | application/json |
219
+ | errors.APIError | 4XX, 5XX | \*/\* |
@@ -0,0 +1,126 @@
1
+ # Companies
2
+ (*companies*)
3
+
4
+ ## Overview
5
+
6
+ ### Available Operations
7
+
8
+ * [listOrSearchCompanies](#listorsearchcompanies) - List or search companies
9
+
10
+ ## listOrSearchCompanies
11
+
12
+ List or search companies.
13
+
14
+ ### Example Usage
15
+
16
+ <!-- UsageSnippet language="typescript" operationID="listOrSearchCompanies" method="get" path="/companies" -->
17
+ ```typescript
18
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
19
+
20
+ const greenSecurity = new GreenSecurity({
21
+ security: {
22
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
23
+ },
24
+ });
25
+
26
+ async function run() {
27
+ const result = await greenSecurity.companies.listOrSearchCompanies({
28
+ sort: "job",
29
+ desc: true,
30
+ itemsPerPage: 25,
31
+ });
32
+
33
+ for await (const page of result) {
34
+ console.log(page);
35
+ }
36
+ }
37
+
38
+ run();
39
+ ```
40
+
41
+ ### Standalone function
42
+
43
+ The standalone function version of this method:
44
+
45
+ ```typescript
46
+ import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
47
+ import { companiesListOrSearchCompanies } from "@greensecurity/javascript-sdk/funcs/companiesListOrSearchCompanies.js";
48
+
49
+ // Use `GreenSecurityCore` for best tree-shaking performance.
50
+ // You can create one instance of it to use across an application.
51
+ const greenSecurity = new GreenSecurityCore({
52
+ security: {
53
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
54
+ },
55
+ });
56
+
57
+ async function run() {
58
+ const res = await companiesListOrSearchCompanies(greenSecurity, {
59
+ sort: "job",
60
+ desc: true,
61
+ itemsPerPage: 25,
62
+ });
63
+ if (res.ok) {
64
+ const { value: result } = res;
65
+ for await (const page of result) {
66
+ console.log(page);
67
+ }
68
+ } else {
69
+ console.log("companiesListOrSearchCompanies failed:", res.error);
70
+ }
71
+ }
72
+
73
+ run();
74
+ ```
75
+
76
+ ### React hooks and utilities
77
+
78
+ This method can be used in React components through the following hooks and
79
+ associated utilities.
80
+
81
+ > Check out [this guide][hook-guide] for information about each of the utilities
82
+ > below and how to get started using React hooks.
83
+
84
+ [hook-guide]: ../../../REACT_QUERY.md
85
+
86
+ ```tsx
87
+ import {
88
+ // Query hooks for fetching data.
89
+ useCompaniesListOrSearchCompanies,
90
+ useCompaniesListOrSearchCompaniesSuspense,
91
+ // Query hooks suitable for building infinite scrolling or "load more" UIs.
92
+ useCompaniesListOrSearchCompaniesInfinite,
93
+ useCompaniesListOrSearchCompaniesInfiniteSuspense,
94
+
95
+ // Utility for prefetching data during server-side rendering and in React
96
+ // Server Components that will be immediately available to client components
97
+ // using the hooks.
98
+ prefetchCompaniesListOrSearchCompanies,
99
+
100
+ // Utilities to invalidate the query cache for this query in response to
101
+ // mutations and other user actions.
102
+ invalidateCompaniesListOrSearchCompanies,
103
+ invalidateAllCompaniesListOrSearchCompanies,
104
+ } from "@greensecurity/javascript-sdk/react-query/companiesListOrSearchCompanies.js";
105
+ ```
106
+
107
+ ### Parameters
108
+
109
+ | Parameter | Type | Required | Description |
110
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
111
+ | `request` | [operations.ListOrSearchCompaniesRequest](../../models/operations/listorsearchcompaniesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
112
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
113
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
114
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
115
+
116
+ ### Response
117
+
118
+ **Promise\<[operations.ListOrSearchCompaniesResponse](../../models/operations/listorsearchcompaniesresponse.md)\>**
119
+
120
+ ### Errors
121
+
122
+ | Error Type | Status Code | Content Type |
123
+ | ----------------------- | ----------------------- | ----------------------- |
124
+ | errors.ApiErrorResponse | 400, 403 | application/json |
125
+ | errors.ApiErrorResponse | 500 | application/json |
126
+ | errors.APIError | 4XX, 5XX | \*/\* |
@@ -0,0 +1,302 @@
1
+ # DataRequests
2
+ (*dataRequests*)
3
+
4
+ ## Overview
5
+
6
+ ### Available Operations
7
+
8
+ * [addDataRequestFile](#adddatarequestfile) - Add vendor credential data request
9
+ * [deleteDataRequestFile](#deletedatarequestfile) - Delete vendor credential data request file
10
+ * [updateDataRequest](#updatedatarequest) - Update vendor credential data request
11
+
12
+ ## addDataRequestFile
13
+
14
+ It will set the vendor credential data request file attributes
15
+
16
+ ### Example Usage
17
+
18
+ <!-- UsageSnippet language="typescript" operationID="addDataRequestFile" method="post" path="/data_requests/{id}/file" -->
19
+ ```typescript
20
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
21
+
22
+ const greenSecurity = new GreenSecurity({
23
+ security: {
24
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
25
+ },
26
+ });
27
+
28
+ async function run() {
29
+ const result = await greenSecurity.dataRequests.addDataRequestFile({
30
+ id: 38177,
31
+ requestBody: {},
32
+ });
33
+
34
+ console.log(result);
35
+ }
36
+
37
+ run();
38
+ ```
39
+
40
+ ### Standalone function
41
+
42
+ The standalone function version of this method:
43
+
44
+ ```typescript
45
+ import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
46
+ import { dataRequestsAddDataRequestFile } from "@greensecurity/javascript-sdk/funcs/dataRequestsAddDataRequestFile.js";
47
+
48
+ // Use `GreenSecurityCore` for best tree-shaking performance.
49
+ // You can create one instance of it to use across an application.
50
+ const greenSecurity = new GreenSecurityCore({
51
+ security: {
52
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
53
+ },
54
+ });
55
+
56
+ async function run() {
57
+ const res = await dataRequestsAddDataRequestFile(greenSecurity, {
58
+ id: 38177,
59
+ requestBody: {},
60
+ });
61
+ if (res.ok) {
62
+ const { value: result } = res;
63
+ console.log(result);
64
+ } else {
65
+ console.log("dataRequestsAddDataRequestFile failed:", res.error);
66
+ }
67
+ }
68
+
69
+ run();
70
+ ```
71
+
72
+ ### React hooks and utilities
73
+
74
+ This method can be used in React components through the following hooks and
75
+ associated utilities.
76
+
77
+ > Check out [this guide][hook-guide] for information about each of the utilities
78
+ > below and how to get started using React hooks.
79
+
80
+ [hook-guide]: ../../../REACT_QUERY.md
81
+
82
+ ```tsx
83
+ import {
84
+ // Mutation hook for triggering the API call.
85
+ useDataRequestsAddDataRequestFileMutation
86
+ } from "@greensecurity/javascript-sdk/react-query/dataRequestsAddDataRequestFile.js";
87
+ ```
88
+
89
+ ### Parameters
90
+
91
+ | Parameter | Type | Required | Description |
92
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
93
+ | `request` | [operations.AddDataRequestFileRequest](../../models/operations/adddatarequestfilerequest.md) | :heavy_check_mark: | The request object to use for the request. |
94
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
95
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
96
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
97
+
98
+ ### Response
99
+
100
+ **Promise\<[boolean](../../models/.md)\>**
101
+
102
+ ### Errors
103
+
104
+ | Error Type | Status Code | Content Type |
105
+ | ----------------------- | ----------------------- | ----------------------- |
106
+ | errors.ApiErrorResponse | 400, 401, 403 | application/json |
107
+ | errors.ApiErrorResponse | 500 | application/json |
108
+ | errors.APIError | 4XX, 5XX | \*/\* |
109
+
110
+ ## deleteDataRequestFile
111
+
112
+ It will delete the vendor credential data request file
113
+
114
+ ### Example Usage
115
+
116
+ <!-- UsageSnippet language="typescript" operationID="deleteDataRequestFile" method="delete" path="/data_requests/{id}/file" -->
117
+ ```typescript
118
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
119
+
120
+ const greenSecurity = new GreenSecurity({
121
+ security: {
122
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
123
+ },
124
+ });
125
+
126
+ async function run() {
127
+ const result = await greenSecurity.dataRequests.deleteDataRequestFile({
128
+ id: 787566,
129
+ });
130
+
131
+ console.log(result);
132
+ }
133
+
134
+ run();
135
+ ```
136
+
137
+ ### Standalone function
138
+
139
+ The standalone function version of this method:
140
+
141
+ ```typescript
142
+ import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
143
+ import { dataRequestsDeleteDataRequestFile } from "@greensecurity/javascript-sdk/funcs/dataRequestsDeleteDataRequestFile.js";
144
+
145
+ // Use `GreenSecurityCore` for best tree-shaking performance.
146
+ // You can create one instance of it to use across an application.
147
+ const greenSecurity = new GreenSecurityCore({
148
+ security: {
149
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
150
+ },
151
+ });
152
+
153
+ async function run() {
154
+ const res = await dataRequestsDeleteDataRequestFile(greenSecurity, {
155
+ id: 787566,
156
+ });
157
+ if (res.ok) {
158
+ const { value: result } = res;
159
+ console.log(result);
160
+ } else {
161
+ console.log("dataRequestsDeleteDataRequestFile failed:", res.error);
162
+ }
163
+ }
164
+
165
+ run();
166
+ ```
167
+
168
+ ### React hooks and utilities
169
+
170
+ This method can be used in React components through the following hooks and
171
+ associated utilities.
172
+
173
+ > Check out [this guide][hook-guide] for information about each of the utilities
174
+ > below and how to get started using React hooks.
175
+
176
+ [hook-guide]: ../../../REACT_QUERY.md
177
+
178
+ ```tsx
179
+ import {
180
+ // Mutation hook for triggering the API call.
181
+ useDataRequestsDeleteDataRequestFileMutation
182
+ } from "@greensecurity/javascript-sdk/react-query/dataRequestsDeleteDataRequestFile.js";
183
+ ```
184
+
185
+ ### Parameters
186
+
187
+ | Parameter | Type | Required | Description |
188
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
189
+ | `request` | [operations.DeleteDataRequestFileRequest](../../models/operations/deletedatarequestfilerequest.md) | :heavy_check_mark: | The request object to use for the request. |
190
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
191
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
192
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
193
+
194
+ ### Response
195
+
196
+ **Promise\<[boolean](../../models/.md)\>**
197
+
198
+ ### Errors
199
+
200
+ | Error Type | Status Code | Content Type |
201
+ | ----------------------- | ----------------------- | ----------------------- |
202
+ | errors.ApiErrorResponse | 400, 401, 403 | application/json |
203
+ | errors.ApiErrorResponse | 500 | application/json |
204
+ | errors.APIError | 4XX, 5XX | \*/\* |
205
+
206
+ ## updateDataRequest
207
+
208
+ It will update the vendor credential data request attributes
209
+
210
+ ### Example Usage
211
+
212
+ <!-- UsageSnippet language="typescript" operationID="updateDataRequest" method="put" path="/data_requests/{id}" -->
213
+ ```typescript
214
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
215
+
216
+ const greenSecurity = new GreenSecurity({
217
+ security: {
218
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
219
+ },
220
+ });
221
+
222
+ async function run() {
223
+ const result = await greenSecurity.dataRequests.updateDataRequest({
224
+ id: 536149,
225
+ requestBody: {},
226
+ });
227
+
228
+ console.log(result);
229
+ }
230
+
231
+ run();
232
+ ```
233
+
234
+ ### Standalone function
235
+
236
+ The standalone function version of this method:
237
+
238
+ ```typescript
239
+ import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
240
+ import { dataRequestsUpdateDataRequest } from "@greensecurity/javascript-sdk/funcs/dataRequestsUpdateDataRequest.js";
241
+
242
+ // Use `GreenSecurityCore` for best tree-shaking performance.
243
+ // You can create one instance of it to use across an application.
244
+ const greenSecurity = new GreenSecurityCore({
245
+ security: {
246
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
247
+ },
248
+ });
249
+
250
+ async function run() {
251
+ const res = await dataRequestsUpdateDataRequest(greenSecurity, {
252
+ id: 536149,
253
+ requestBody: {},
254
+ });
255
+ if (res.ok) {
256
+ const { value: result } = res;
257
+ console.log(result);
258
+ } else {
259
+ console.log("dataRequestsUpdateDataRequest failed:", res.error);
260
+ }
261
+ }
262
+
263
+ run();
264
+ ```
265
+
266
+ ### React hooks and utilities
267
+
268
+ This method can be used in React components through the following hooks and
269
+ associated utilities.
270
+
271
+ > Check out [this guide][hook-guide] for information about each of the utilities
272
+ > below and how to get started using React hooks.
273
+
274
+ [hook-guide]: ../../../REACT_QUERY.md
275
+
276
+ ```tsx
277
+ import {
278
+ // Mutation hook for triggering the API call.
279
+ useDataRequestsUpdateDataRequestMutation
280
+ } from "@greensecurity/javascript-sdk/react-query/dataRequestsUpdateDataRequest.js";
281
+ ```
282
+
283
+ ### Parameters
284
+
285
+ | Parameter | Type | Required | Description |
286
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
287
+ | `request` | [operations.UpdateDataRequestRequest](../../models/operations/updatedatarequestrequest.md) | :heavy_check_mark: | The request object to use for the request. |
288
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
289
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
290
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
291
+
292
+ ### Response
293
+
294
+ **Promise\<[boolean](../../models/.md)\>**
295
+
296
+ ### Errors
297
+
298
+ | Error Type | Status Code | Content Type |
299
+ | ----------------------- | ----------------------- | ----------------------- |
300
+ | errors.ApiErrorResponse | 400, 401, 403 | application/json |
301
+ | errors.ApiErrorResponse | 500 | application/json |
302
+ | errors.APIError | 4XX, 5XX | \*/\* |