@greensecurity/javascript-sdk 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (432) hide show
  1. package/.devcontainer/README.md +35 -0
  2. package/.devcontainer/devcontainer.json +45 -0
  3. package/FUNCTIONS.md +109 -0
  4. package/REACT_QUERY.md +318 -0
  5. package/README.md +561 -0
  6. package/RUNTIMES.md +48 -0
  7. package/core.d.ts +10 -0
  8. package/core.d.ts.map +1 -0
  9. package/core.js +17 -0
  10. package/core.js.map +1 -0
  11. package/docs/sdks/greensecurity/README.md +14 -0
  12. package/docs/sdks/organizations/README.md +252 -0
  13. package/docs/sdks/user/README.md +348 -0
  14. package/docs/sdks/vendors/README.md +219 -0
  15. package/funcs/organizationsGetFacility.d.ts +17 -0
  16. package/funcs/organizationsGetFacility.d.ts.map +1 -0
  17. package/funcs/organizationsGetFacility.js +117 -0
  18. package/funcs/organizationsGetFacility.js.map +1 -0
  19. package/funcs/organizationsListOrSearchFacilities.d.ts +28 -0
  20. package/funcs/organizationsListOrSearchFacilities.d.ts.map +1 -0
  21. package/funcs/organizationsListOrSearchFacilities.js +131 -0
  22. package/funcs/organizationsListOrSearchFacilities.js.map +1 -0
  23. package/funcs/userGetCurrentUser.d.ts +16 -0
  24. package/funcs/userGetCurrentUser.d.ts.map +1 -0
  25. package/funcs/userGetCurrentUser.js +101 -0
  26. package/funcs/userGetCurrentUser.js.map +1 -0
  27. package/funcs/userGetUserById.d.ts +17 -0
  28. package/funcs/userGetUserById.d.ts.map +1 -0
  29. package/funcs/userGetUserById.js +117 -0
  30. package/funcs/userGetUserById.js.map +1 -0
  31. package/funcs/userLogsUserIntoTheSystem.d.ts +46 -0
  32. package/funcs/userLogsUserIntoTheSystem.d.ts.map +1 -0
  33. package/funcs/userLogsUserIntoTheSystem.js +137 -0
  34. package/funcs/userLogsUserIntoTheSystem.js.map +1 -0
  35. package/funcs/vendorsCreateVendorRegistration.d.ts +16 -0
  36. package/funcs/vendorsCreateVendorRegistration.d.ts.map +1 -0
  37. package/funcs/vendorsCreateVendorRegistration.js +107 -0
  38. package/funcs/vendorsCreateVendorRegistration.js.map +1 -0
  39. package/funcs/vendorsListVendorJobTitles.d.ts +16 -0
  40. package/funcs/vendorsListVendorJobTitles.d.ts.map +1 -0
  41. package/funcs/vendorsListVendorJobTitles.js +114 -0
  42. package/funcs/vendorsListVendorJobTitles.js.map +1 -0
  43. package/hooks/hooks.d.ts +24 -0
  44. package/hooks/hooks.d.ts.map +1 -0
  45. package/hooks/hooks.js +86 -0
  46. package/hooks/hooks.js.map +1 -0
  47. package/hooks/index.d.ts +3 -0
  48. package/hooks/index.d.ts.map +1 -0
  49. package/hooks/index.js +22 -0
  50. package/hooks/index.js.map +1 -0
  51. package/hooks/registration.d.ts +3 -0
  52. package/hooks/registration.d.ts.map +1 -0
  53. package/hooks/registration.js +15 -0
  54. package/hooks/registration.js.map +1 -0
  55. package/hooks/types.d.ts +78 -0
  56. package/hooks/types.d.ts.map +1 -0
  57. package/hooks/types.js +6 -0
  58. package/hooks/types.js.map +1 -0
  59. package/index.d.ts +4 -0
  60. package/index.d.ts.map +1 -0
  61. package/index.js +46 -0
  62. package/index.js.map +1 -0
  63. package/jsr.json +27 -0
  64. package/lib/base64.d.ts +10 -0
  65. package/lib/base64.d.ts.map +1 -0
  66. package/lib/base64.js +71 -0
  67. package/lib/base64.js.map +1 -0
  68. package/lib/config.d.ts +38 -0
  69. package/lib/config.d.ts.map +1 -0
  70. package/lib/config.js +46 -0
  71. package/lib/config.js.map +1 -0
  72. package/lib/dlv.d.ts +14 -0
  73. package/lib/dlv.d.ts.map +1 -0
  74. package/lib/dlv.js +49 -0
  75. package/lib/dlv.js.map +1 -0
  76. package/lib/encodings.d.ts +52 -0
  77. package/lib/encodings.d.ts.map +1 -0
  78. package/lib/encodings.js +368 -0
  79. package/lib/encodings.js.map +1 -0
  80. package/lib/env.d.ts +16 -0
  81. package/lib/env.d.ts.map +1 -0
  82. package/lib/env.js +66 -0
  83. package/lib/env.js.map +1 -0
  84. package/lib/files.d.ts +8 -0
  85. package/lib/files.d.ts.map +1 -0
  86. package/lib/files.js +36 -0
  87. package/lib/files.js.map +1 -0
  88. package/lib/http.d.ts +67 -0
  89. package/lib/http.d.ts.map +1 -0
  90. package/lib/http.js +217 -0
  91. package/lib/http.js.map +1 -0
  92. package/lib/is-plain-object.d.ts +2 -0
  93. package/lib/is-plain-object.d.ts.map +1 -0
  94. package/lib/is-plain-object.js +41 -0
  95. package/lib/is-plain-object.js.map +1 -0
  96. package/lib/logger.d.ts +6 -0
  97. package/lib/logger.d.ts.map +1 -0
  98. package/lib/logger.js +6 -0
  99. package/lib/logger.js.map +1 -0
  100. package/lib/matchers.d.ts +64 -0
  101. package/lib/matchers.d.ts.map +1 -0
  102. package/lib/matchers.js +204 -0
  103. package/lib/matchers.js.map +1 -0
  104. package/lib/primitives.d.ts +23 -0
  105. package/lib/primitives.d.ts.map +1 -0
  106. package/lib/primitives.js +104 -0
  107. package/lib/primitives.js.map +1 -0
  108. package/lib/retries.d.ts +38 -0
  109. package/lib/retries.d.ts.map +1 -0
  110. package/lib/retries.js +153 -0
  111. package/lib/retries.js.map +1 -0
  112. package/lib/schemas.d.ts +19 -0
  113. package/lib/schemas.d.ts.map +1 -0
  114. package/lib/schemas.js +62 -0
  115. package/lib/schemas.js.map +1 -0
  116. package/lib/sdks.d.ts +60 -0
  117. package/lib/sdks.d.ts.map +1 -0
  118. package/lib/sdks.js +280 -0
  119. package/lib/sdks.js.map +1 -0
  120. package/lib/security.d.ts +82 -0
  121. package/lib/security.d.ts.map +1 -0
  122. package/lib/security.js +145 -0
  123. package/lib/security.js.map +1 -0
  124. package/lib/url.d.ts +5 -0
  125. package/lib/url.d.ts.map +1 -0
  126. package/lib/url.js +25 -0
  127. package/lib/url.js.map +1 -0
  128. package/models/components/contact.d.ts +135 -0
  129. package/models/components/contact.d.ts.map +1 -0
  130. package/models/components/contact.js +172 -0
  131. package/models/components/contact.js.map +1 -0
  132. package/models/components/departmentsummary.d.ts +34 -0
  133. package/models/components/departmentsummary.d.ts.map +1 -0
  134. package/models/components/departmentsummary.js +71 -0
  135. package/models/components/departmentsummary.js.map +1 -0
  136. package/models/components/desc.d.ts +25 -0
  137. package/models/components/desc.d.ts.map +1 -0
  138. package/models/components/desc.js +66 -0
  139. package/models/components/desc.js.map +1 -0
  140. package/models/components/expand.d.ts +79 -0
  141. package/models/components/expand.d.ts.map +1 -0
  142. package/models/components/expand.js +79 -0
  143. package/models/components/expand.js.map +1 -0
  144. package/models/components/facility.d.ts +544 -0
  145. package/models/components/facility.d.ts.map +1 -0
  146. package/models/components/facility.js +797 -0
  147. package/models/components/facility.js.map +1 -0
  148. package/models/components/facilitysummary.d.ts +34 -0
  149. package/models/components/facilitysummary.d.ts.map +1 -0
  150. package/models/components/facilitysummary.js +71 -0
  151. package/models/components/facilitysummary.js.map +1 -0
  152. package/models/components/imageset.d.ts +38 -0
  153. package/models/components/imageset.d.ts.map +1 -0
  154. package/models/components/imageset.js +75 -0
  155. package/models/components/imageset.js.map +1 -0
  156. package/models/components/index.d.ts +20 -0
  157. package/models/components/index.d.ts.map +1 -0
  158. package/models/components/index.js +39 -0
  159. package/models/components/index.js.map +1 -0
  160. package/models/components/loginemailandpassword.d.ts +45 -0
  161. package/models/components/loginemailandpassword.d.ts.map +1 -0
  162. package/models/components/loginemailandpassword.js +82 -0
  163. package/models/components/loginemailandpassword.js.map +1 -0
  164. package/models/components/loginrequirementsfromemail.d.ts +40 -0
  165. package/models/components/loginrequirementsfromemail.d.ts.map +1 -0
  166. package/models/components/loginrequirementsfromemail.js +80 -0
  167. package/models/components/loginrequirementsfromemail.js.map +1 -0
  168. package/models/components/mfarequiredresponse.d.ts +98 -0
  169. package/models/components/mfarequiredresponse.d.ts.map +1 -0
  170. package/models/components/mfarequiredresponse.js +126 -0
  171. package/models/components/mfarequiredresponse.js.map +1 -0
  172. package/models/components/pager.d.ts +69 -0
  173. package/models/components/pager.d.ts.map +1 -0
  174. package/models/components/pager.js +97 -0
  175. package/models/components/pager.js.map +1 -0
  176. package/models/components/passwordrequiredresponse.d.ts +62 -0
  177. package/models/components/passwordrequiredresponse.d.ts.map +1 -0
  178. package/models/components/passwordrequiredresponse.js +92 -0
  179. package/models/components/passwordrequiredresponse.js.map +1 -0
  180. package/models/components/samlloginrequiredresponse.d.ts +73 -0
  181. package/models/components/samlloginrequiredresponse.d.ts.map +1 -0
  182. package/models/components/samlloginrequiredresponse.js +106 -0
  183. package/models/components/samlloginrequiredresponse.js.map +1 -0
  184. package/models/components/security.d.ts +31 -0
  185. package/models/components/security.d.ts.map +1 -0
  186. package/models/components/security.js +80 -0
  187. package/models/components/security.js.map +1 -0
  188. package/models/components/status.d.ts +37 -0
  189. package/models/components/status.d.ts.map +1 -0
  190. package/models/components/status.js +65 -0
  191. package/models/components/status.js.map +1 -0
  192. package/models/components/systemsummary.d.ts +34 -0
  193. package/models/components/systemsummary.d.ts.map +1 -0
  194. package/models/components/systemsummary.js +71 -0
  195. package/models/components/systemsummary.js.map +1 -0
  196. package/models/components/user.d.ts +265 -0
  197. package/models/components/user.d.ts.map +1 -0
  198. package/models/components/user.js +284 -0
  199. package/models/components/user.js.map +1 -0
  200. package/models/components/vendorjobtitle.d.ts +41 -0
  201. package/models/components/vendorjobtitle.d.ts.map +1 -0
  202. package/models/components/vendorjobtitle.js +71 -0
  203. package/models/components/vendorjobtitle.js.map +1 -0
  204. package/models/components/vendortype.d.ts +69 -0
  205. package/models/components/vendortype.d.ts.map +1 -0
  206. package/models/components/vendortype.js +135 -0
  207. package/models/components/vendortype.js.map +1 -0
  208. package/models/errors/apierror.d.ts +8 -0
  209. package/models/errors/apierror.d.ts.map +1 -0
  210. package/models/errors/apierror.js +21 -0
  211. package/models/errors/apierror.js.map +1 -0
  212. package/models/errors/apierrorresponse.d.ts +51 -0
  213. package/models/errors/apierrorresponse.d.ts.map +1 -0
  214. package/models/errors/apierrorresponse.js +91 -0
  215. package/models/errors/apierrorresponse.js.map +1 -0
  216. package/models/errors/httpclienterrors.d.ts +44 -0
  217. package/models/errors/httpclienterrors.d.ts.map +1 -0
  218. package/models/errors/httpclienterrors.js +78 -0
  219. package/models/errors/httpclienterrors.js.map +1 -0
  220. package/models/errors/index.d.ts +5 -0
  221. package/models/errors/index.d.ts.map +1 -0
  222. package/models/errors/index.js +24 -0
  223. package/models/errors/index.js.map +1 -0
  224. package/models/errors/sdkvalidationerror.d.ts +20 -0
  225. package/models/errors/sdkvalidationerror.d.ts.map +1 -0
  226. package/models/errors/sdkvalidationerror.js +115 -0
  227. package/models/errors/sdkvalidationerror.js.map +1 -0
  228. package/models/operations/createvendorregistration.d.ts +115 -0
  229. package/models/operations/createvendorregistration.d.ts.map +1 -0
  230. package/models/operations/createvendorregistration.js +143 -0
  231. package/models/operations/createvendorregistration.js.map +1 -0
  232. package/models/operations/getfacility.d.ts +32 -0
  233. package/models/operations/getfacility.d.ts.map +1 -0
  234. package/models/operations/getfacility.js +69 -0
  235. package/models/operations/getfacility.js.map +1 -0
  236. package/models/operations/getuserbyid.d.ts +32 -0
  237. package/models/operations/getuserbyid.d.ts.map +1 -0
  238. package/models/operations/getuserbyid.js +69 -0
  239. package/models/operations/getuserbyid.js.map +1 -0
  240. package/models/operations/index.d.ts +7 -0
  241. package/models/operations/index.d.ts.map +1 -0
  242. package/models/operations/index.js +26 -0
  243. package/models/operations/index.js.map +1 -0
  244. package/models/operations/listorsearchfacilities.d.ts +110 -0
  245. package/models/operations/listorsearchfacilities.d.ts.map +1 -0
  246. package/models/operations/listorsearchfacilities.js +130 -0
  247. package/models/operations/listorsearchfacilities.js.map +1 -0
  248. package/models/operations/listvendorjobtitles.d.ts +86 -0
  249. package/models/operations/listvendorjobtitles.d.ts.map +1 -0
  250. package/models/operations/listvendorjobtitles.js +118 -0
  251. package/models/operations/listvendorjobtitles.js.map +1 -0
  252. package/models/operations/logsuserintothesystem.d.ts +98 -0
  253. package/models/operations/logsuserintothesystem.d.ts.map +1 -0
  254. package/models/operations/logsuserintothesystem.js +164 -0
  255. package/models/operations/logsuserintothesystem.js.map +1 -0
  256. package/package.json +41 -0
  257. package/react-query/_context.d.ts +8 -0
  258. package/react-query/_context.d.ts.map +1 -0
  259. package/react-query/_context.js +21 -0
  260. package/react-query/_context.js.map +1 -0
  261. package/react-query/_types.d.ts +14 -0
  262. package/react-query/_types.d.ts.map +1 -0
  263. package/react-query/_types.js +6 -0
  264. package/react-query/_types.js.map +1 -0
  265. package/react-query/index.d.ts +10 -0
  266. package/react-query/index.d.ts.map +1 -0
  267. package/react-query/index.js +32 -0
  268. package/react-query/index.js.map +1 -0
  269. package/react-query/organizationsGetFacility.d.ts +31 -0
  270. package/react-query/organizationsGetFacility.d.ts.map +1 -0
  271. package/react-query/organizationsGetFacility.js +87 -0
  272. package/react-query/organizationsGetFacility.js.map +1 -0
  273. package/react-query/organizationsListOrSearchFacilities.d.ts +91 -0
  274. package/react-query/organizationsListOrSearchFacilities.d.ts.map +1 -0
  275. package/react-query/organizationsListOrSearchFacilities.js +132 -0
  276. package/react-query/organizationsListOrSearchFacilities.js.map +1 -0
  277. package/react-query/userGetCurrentUser.d.ts +29 -0
  278. package/react-query/userGetCurrentUser.d.ts.map +1 -0
  279. package/react-query/userGetCurrentUser.js +75 -0
  280. package/react-query/userGetCurrentUser.js.map +1 -0
  281. package/react-query/userGetUserById.d.ts +31 -0
  282. package/react-query/userGetUserById.d.ts.map +1 -0
  283. package/react-query/userGetUserById.js +87 -0
  284. package/react-query/userGetUserById.js.map +1 -0
  285. package/react-query/userLogsUserIntoTheSystem.d.ts +53 -0
  286. package/react-query/userLogsUserIntoTheSystem.d.ts.map +1 -0
  287. package/react-query/userLogsUserIntoTheSystem.js +77 -0
  288. package/react-query/userLogsUserIntoTheSystem.js.map +1 -0
  289. package/react-query/vendorsCreateVendorRegistration.d.ts +23 -0
  290. package/react-query/vendorsCreateVendorRegistration.d.ts.map +1 -0
  291. package/react-query/vendorsCreateVendorRegistration.js +51 -0
  292. package/react-query/vendorsCreateVendorRegistration.js.map +1 -0
  293. package/react-query/vendorsListVendorJobTitles.d.ts +53 -0
  294. package/react-query/vendorsListVendorJobTitles.d.ts.map +1 -0
  295. package/react-query/vendorsListVendorJobTitles.js +102 -0
  296. package/react-query/vendorsListVendorJobTitles.js.map +1 -0
  297. package/sdk/index.d.ts +2 -0
  298. package/sdk/index.d.ts.map +1 -0
  299. package/sdk/index.js +21 -0
  300. package/sdk/index.js.map +1 -0
  301. package/sdk/organizations.d.ts +33 -0
  302. package/sdk/organizations.d.ts.map +1 -0
  303. package/sdk/organizations.js +45 -0
  304. package/sdk/organizations.js.map +1 -0
  305. package/sdk/sdk.d.ts +13 -0
  306. package/sdk/sdk.d.ts.map +1 -0
  307. package/sdk/sdk.js +23 -0
  308. package/sdk/sdk.js.map +1 -0
  309. package/sdk/user.d.ts +57 -0
  310. package/sdk/user.d.ts.map +1 -0
  311. package/sdk/user.js +72 -0
  312. package/sdk/user.js.map +1 -0
  313. package/sdk/vendors.d.ts +19 -0
  314. package/sdk/vendors.d.ts.map +1 -0
  315. package/sdk/vendors.js +32 -0
  316. package/sdk/vendors.js.map +1 -0
  317. package/src/core.ts +13 -0
  318. package/src/funcs/organizationsGetFacility.ts +144 -0
  319. package/src/funcs/organizationsListOrSearchFacilities.ts +152 -0
  320. package/src/funcs/userGetCurrentUser.ts +118 -0
  321. package/src/funcs/userGetUserById.ts +141 -0
  322. package/src/funcs/userLogsUserIntoTheSystem.ts +161 -0
  323. package/src/funcs/vendorsCreateVendorRegistration.ts +132 -0
  324. package/src/funcs/vendorsListVendorJobTitles.ts +141 -0
  325. package/src/hooks/hooks.ts +132 -0
  326. package/src/hooks/index.ts +6 -0
  327. package/src/hooks/registration.ts +14 -0
  328. package/src/hooks/types.ts +110 -0
  329. package/src/index.ts +7 -0
  330. package/src/lib/base64.ts +37 -0
  331. package/src/lib/config.ts +76 -0
  332. package/src/lib/dlv.ts +53 -0
  333. package/src/lib/encodings.ts +483 -0
  334. package/src/lib/env.ts +43 -0
  335. package/src/lib/files.ts +40 -0
  336. package/src/lib/http.ts +323 -0
  337. package/src/lib/is-plain-object.ts +43 -0
  338. package/src/lib/logger.ts +9 -0
  339. package/src/lib/matchers.ts +322 -0
  340. package/src/lib/primitives.ts +136 -0
  341. package/src/lib/retries.ts +218 -0
  342. package/src/lib/schemas.ts +91 -0
  343. package/src/lib/sdks.ts +400 -0
  344. package/src/lib/security.ts +260 -0
  345. package/src/lib/url.ts +33 -0
  346. package/src/models/components/contact.ts +268 -0
  347. package/src/models/components/departmentsummary.ts +73 -0
  348. package/src/models/components/desc.ts +48 -0
  349. package/src/models/components/expand.ts +52 -0
  350. package/src/models/components/facility.ts +1334 -0
  351. package/src/models/components/facilitysummary.ts +71 -0
  352. package/src/models/components/imageset.ts +77 -0
  353. package/src/models/components/index.ts +23 -0
  354. package/src/models/components/loginemailandpassword.ts +95 -0
  355. package/src/models/components/loginrequirementsfromemail.ts +88 -0
  356. package/src/models/components/mfarequiredresponse.ts +160 -0
  357. package/src/models/components/pager.ts +126 -0
  358. package/src/models/components/passwordrequiredresponse.ts +105 -0
  359. package/src/models/components/samlloginrequiredresponse.ts +136 -0
  360. package/src/models/components/security.ts +75 -0
  361. package/src/models/components/status.ts +38 -0
  362. package/src/models/components/systemsummary.ts +69 -0
  363. package/src/models/components/user.ts +451 -0
  364. package/src/models/components/vendorjobtitle.ts +76 -0
  365. package/src/models/components/vendortype.ts +170 -0
  366. package/src/models/errors/apierror.ts +27 -0
  367. package/src/models/errors/apierrorresponse.ts +95 -0
  368. package/src/models/errors/httpclienterrors.ts +62 -0
  369. package/src/models/errors/index.ts +8 -0
  370. package/src/models/errors/sdkvalidationerror.ts +97 -0
  371. package/src/models/operations/createvendorregistration.ts +237 -0
  372. package/src/models/operations/getfacility.ts +69 -0
  373. package/src/models/operations/getuserbyid.ts +69 -0
  374. package/src/models/operations/index.ts +10 -0
  375. package/src/models/operations/listorsearchfacilities.ts +219 -0
  376. package/src/models/operations/listvendorjobtitles.ts +179 -0
  377. package/src/models/operations/logsuserintothesystem.ts +270 -0
  378. package/src/react-query/_types.ts +91 -0
  379. package/src/react-query/index.ts +14 -0
  380. package/src/react-query/organizationsGetFacility.ts +154 -0
  381. package/src/react-query/organizationsListOrSearchFacilities.ts +241 -0
  382. package/src/react-query/userGetCurrentUser.ts +124 -0
  383. package/src/react-query/userGetUserById.ts +152 -0
  384. package/src/react-query/userLogsUserIntoTheSystem.ts +119 -0
  385. package/src/react-query/vendorsCreateVendorRegistration.ts +93 -0
  386. package/src/react-query/vendorsListVendorJobTitles.ts +194 -0
  387. package/src/sdk/index.ts +5 -0
  388. package/src/sdk/organizations.ts +59 -0
  389. package/src/sdk/sdk.ts +25 -0
  390. package/src/sdk/user.ts +92 -0
  391. package/src/sdk/vendors.ts +45 -0
  392. package/src/types/blobs.ts +31 -0
  393. package/src/types/constdatetime.ts +15 -0
  394. package/src/types/enums.ts +16 -0
  395. package/src/types/fp.ts +50 -0
  396. package/src/types/index.ts +11 -0
  397. package/src/types/operations.ts +105 -0
  398. package/src/types/rfcdate.ts +54 -0
  399. package/src/types/streams.ts +21 -0
  400. package/tsconfig.json +41 -0
  401. package/types/blobs.d.ts +4 -0
  402. package/types/blobs.d.ts.map +1 -0
  403. package/types/blobs.js +62 -0
  404. package/types/blobs.js.map +1 -0
  405. package/types/constdatetime.d.ts +3 -0
  406. package/types/constdatetime.d.ts.map +1 -0
  407. package/types/constdatetime.js +46 -0
  408. package/types/constdatetime.js.map +1 -0
  409. package/types/enums.d.ts +12 -0
  410. package/types/enums.d.ts.map +1 -0
  411. package/types/enums.js +10 -0
  412. package/types/enums.js.map +1 -0
  413. package/types/fp.d.ts +31 -0
  414. package/types/fp.d.ts.map +1 -0
  415. package/types/fp.js +37 -0
  416. package/types/fp.js.map +1 -0
  417. package/types/index.d.ts +8 -0
  418. package/types/index.d.ts.map +1 -0
  419. package/types/index.js +16 -0
  420. package/types/index.js.map +1 -0
  421. package/types/operations.d.ts +27 -0
  422. package/types/operations.d.ts.map +1 -0
  423. package/types/operations.js +83 -0
  424. package/types/operations.js.map +1 -0
  425. package/types/rfcdate.d.ts +21 -0
  426. package/types/rfcdate.d.ts.map +1 -0
  427. package/types/rfcdate.js +46 -0
  428. package/types/rfcdate.js.map +1 -0
  429. package/types/streams.d.ts +2 -0
  430. package/types/streams.d.ts.map +1 -0
  431. package/types/streams.js +18 -0
  432. package/types/streams.js.map +1 -0
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useOrganizationsListOrSearchFacilities = useOrganizationsListOrSearchFacilities;
7
+ exports.useOrganizationsListOrSearchFacilitiesSuspense = useOrganizationsListOrSearchFacilitiesSuspense;
8
+ exports.prefetchOrganizationsListOrSearchFacilities = prefetchOrganizationsListOrSearchFacilities;
9
+ exports.setOrganizationsListOrSearchFacilitiesData = setOrganizationsListOrSearchFacilitiesData;
10
+ exports.invalidateOrganizationsListOrSearchFacilities = invalidateOrganizationsListOrSearchFacilities;
11
+ exports.invalidateAllOrganizationsListOrSearchFacilities = invalidateAllOrganizationsListOrSearchFacilities;
12
+ exports.buildOrganizationsListOrSearchFacilitiesQuery = buildOrganizationsListOrSearchFacilitiesQuery;
13
+ exports.queryKeyOrganizationsListOrSearchFacilities = queryKeyOrganizationsListOrSearchFacilities;
14
+ const react_query_1 = require("@tanstack/react-query");
15
+ const organizationsListOrSearchFacilities_js_1 = require("../funcs/organizationsListOrSearchFacilities.js");
16
+ const primitives_js_1 = require("../lib/primitives.js");
17
+ const fp_js_1 = require("../types/fp.js");
18
+ const _context_js_1 = require("./_context.js");
19
+ /**
20
+ * List or search facilities
21
+ *
22
+ * @remarks
23
+ * List or search facilities.
24
+ *
25
+ * Available `expand` scopes are:
26
+ *
27
+ * - facility.appointment_policy
28
+ * - facility.contacts
29
+ * - facility.vendor_counts
30
+ * - facility.flu_credential
31
+ * - facility.scrubs_policy
32
+ * - facility.system
33
+ * - facility.vendor_guest_policy
34
+ * - facility.vendor_policy
35
+ * - facility.visitor_policy
36
+ * - facility.workflow
37
+ */
38
+ function useOrganizationsListOrSearchFacilities(request, options) {
39
+ const client = (0, _context_js_1.useGreenSecurityContext)();
40
+ return (0, react_query_1.useQuery)({
41
+ ...buildOrganizationsListOrSearchFacilitiesQuery(client, request, options),
42
+ ...options,
43
+ });
44
+ }
45
+ /**
46
+ * List or search facilities
47
+ *
48
+ * @remarks
49
+ * List or search facilities.
50
+ *
51
+ * Available `expand` scopes are:
52
+ *
53
+ * - facility.appointment_policy
54
+ * - facility.contacts
55
+ * - facility.vendor_counts
56
+ * - facility.flu_credential
57
+ * - facility.scrubs_policy
58
+ * - facility.system
59
+ * - facility.vendor_guest_policy
60
+ * - facility.vendor_policy
61
+ * - facility.visitor_policy
62
+ * - facility.workflow
63
+ */
64
+ function useOrganizationsListOrSearchFacilitiesSuspense(request, options) {
65
+ const client = (0, _context_js_1.useGreenSecurityContext)();
66
+ return (0, react_query_1.useSuspenseQuery)({
67
+ ...buildOrganizationsListOrSearchFacilitiesQuery(client, request, options),
68
+ ...options,
69
+ });
70
+ }
71
+ function prefetchOrganizationsListOrSearchFacilities(queryClient, client$, request) {
72
+ return queryClient.prefetchQuery({
73
+ ...buildOrganizationsListOrSearchFacilitiesQuery(client$, request),
74
+ });
75
+ }
76
+ function setOrganizationsListOrSearchFacilitiesData(client, queryKeyBase, data) {
77
+ const key = queryKeyOrganizationsListOrSearchFacilities(...queryKeyBase);
78
+ return client.setQueryData(key, data);
79
+ }
80
+ function invalidateOrganizationsListOrSearchFacilities(client, queryKeyBase, filters) {
81
+ return client.invalidateQueries({
82
+ ...filters,
83
+ queryKey: [
84
+ "@greensecurity/javascript-sdk",
85
+ "organizations",
86
+ "listOrSearchFacilities",
87
+ ...queryKeyBase,
88
+ ],
89
+ });
90
+ }
91
+ function invalidateAllOrganizationsListOrSearchFacilities(client, filters) {
92
+ return client.invalidateQueries({
93
+ ...filters,
94
+ queryKey: [
95
+ "@greensecurity/javascript-sdk",
96
+ "organizations",
97
+ "listOrSearchFacilities",
98
+ ],
99
+ });
100
+ }
101
+ function buildOrganizationsListOrSearchFacilitiesQuery(client$, request, options) {
102
+ return {
103
+ queryKey: queryKeyOrganizationsListOrSearchFacilities({
104
+ sort: request.sort,
105
+ desc: request.desc,
106
+ page: request.page,
107
+ itemsPerPage: request.itemsPerPage,
108
+ expand: request.expand,
109
+ systemId: request.systemId,
110
+ nameLike: request.nameLike,
111
+ stateLike: request.stateLike,
112
+ status: request.status,
113
+ }),
114
+ queryFn: async function organizationsListOrSearchFacilitiesQueryFn(ctx) {
115
+ const sig = (0, primitives_js_1.combineSignals)(ctx.signal, options?.fetchOptions?.signal);
116
+ const mergedOptions = {
117
+ ...options,
118
+ fetchOptions: { ...options?.fetchOptions, signal: sig },
119
+ };
120
+ return (0, fp_js_1.unwrapAsync)((0, organizationsListOrSearchFacilities_js_1.organizationsListOrSearchFacilities)(client$, request, mergedOptions));
121
+ },
122
+ };
123
+ }
124
+ function queryKeyOrganizationsListOrSearchFacilities(parameters) {
125
+ return [
126
+ "@greensecurity/javascript-sdk",
127
+ "organizations",
128
+ "listOrSearchFacilities",
129
+ parameters,
130
+ ];
131
+ }
132
+ //# sourceMappingURL=organizationsListOrSearchFacilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsListOrSearchFacilities.js","sourceRoot":"","sources":["../src/react-query/organizationsListOrSearchFacilities.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAgDH,wFAaC;AAqBD,wGAeC;AAED,kGAWC;AAED,gGAuBC;AAED,sGA0BC;AAED,4GAYC;AAED,sGAsCC;AAED,kGAmBC;AA5OD,uDAS+B;AAE/B,4GAAsG;AACtG,wDAAsD;AAItD,0CAA6C;AAC7C,+CAAwD;AAUxD;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,sCAAsC,CACpD,OAAiD,EACjD,OAAwE;IAExE,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,sBAAQ,EAAC;QACd,GAAG,6CAA6C,CAC9C,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,8CAA8C,CAC5D,OAAiD,EACjD,OAEC;IAED,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,8BAAgB,EAAC;QACtB,GAAG,6CAA6C,CAC9C,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,2CAA2C,CACzD,WAAwB,EACxB,OAA0B,EAC1B,OAAiD;IAEjD,OAAO,WAAW,CAAC,aAAa,CAAC;QAC/B,GAAG,6CAA6C,CAC9C,OAAO,EACP,OAAO,CACR;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,0CAA0C,CACxD,MAAmB,EACnB,YAYC,EACD,IAAkD;IAElD,MAAM,GAAG,GAAG,2CAA2C,CAAC,GAAG,YAAY,CAAC,CAAC;IAEzE,OAAO,MAAM,CAAC,YAAY,CACxB,GAAG,EACH,IAAI,CACL,CAAC;AACJ,CAAC;AAED,SAAgB,6CAA6C,CAC3D,MAAmB,EACnB,YAYC,EACD,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,eAAe;YACf,wBAAwB;YACxB,GAAG,YAAY;SAChB;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,gDAAgD,CAC9D,MAAmB,EACnB,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,eAAe;YACf,wBAAwB;SACzB;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,6CAA6C,CAC3D,OAA0B,EAC1B,OAAiD,EACjD,OAAwB;IAOxB,OAAO;QACL,QAAQ,EAAE,2CAA2C,CAAC;YACpD,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC;QACF,OAAO,EAAE,KAAK,UAAU,0CAA0C,CAChE,GAAG;YAEH,MAAM,GAAG,GAAG,IAAA,8BAAc,EAAC,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;YACtE,MAAM,aAAa,GAAG;gBACpB,GAAG,OAAO;gBACV,YAAY,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE;aACxD,CAAC;YAEF,OAAO,IAAA,mBAAW,EAAC,IAAA,4EAAmC,EACpD,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,2CAA2C,CACzD,UAUC;IAED,OAAO;QACL,+BAA+B;QAC/B,eAAe;QACf,wBAAwB;QACxB,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { InvalidateQueryFilters, QueryClient, QueryFunctionContext, QueryKey, UseQueryResult, UseSuspenseQueryResult } from "@tanstack/react-query";
2
+ import { GreenSecurityCore } from "../core.js";
3
+ import { RequestOptions } from "../lib/sdks.js";
4
+ import * as components from "../models/components/index.js";
5
+ import { QueryHookOptions, SuspenseQueryHookOptions } from "./_types.js";
6
+ export type UserGetCurrentUserQueryData = components.User;
7
+ /**
8
+ * Get current user
9
+ *
10
+ * @remarks
11
+ * Returns a user object for the user represented by the authorization token
12
+ */
13
+ export declare function useUserGetCurrentUser(options?: QueryHookOptions<UserGetCurrentUserQueryData>): UseQueryResult<UserGetCurrentUserQueryData, Error>;
14
+ /**
15
+ * Get current user
16
+ *
17
+ * @remarks
18
+ * Returns a user object for the user represented by the authorization token
19
+ */
20
+ export declare function useUserGetCurrentUserSuspense(options?: SuspenseQueryHookOptions<UserGetCurrentUserQueryData>): UseSuspenseQueryResult<UserGetCurrentUserQueryData, Error>;
21
+ export declare function prefetchUserGetCurrentUser(queryClient: QueryClient, client$: GreenSecurityCore): Promise<void>;
22
+ export declare function setUserGetCurrentUserData(client: QueryClient, data: UserGetCurrentUserQueryData): UserGetCurrentUserQueryData | undefined;
23
+ export declare function invalidateAllUserGetCurrentUser(client: QueryClient, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
24
+ export declare function buildUserGetCurrentUserQuery(client$: GreenSecurityCore, options?: RequestOptions): {
25
+ queryKey: QueryKey;
26
+ queryFn: (context: QueryFunctionContext) => Promise<UserGetCurrentUserQueryData>;
27
+ };
28
+ export declare function queryKeyUserGetCurrentUser(): QueryKey;
29
+ //# sourceMappingURL=userGetCurrentUser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userGetCurrentUser.d.ts","sourceRoot":"","sources":["../src/react-query/userGetCurrentUser.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,oBAAoB,EACpB,QAAQ,EAER,cAAc,EAEd,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,IAAI,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,gBAAgB,CAAC,2BAA2B,CAAC,GACtD,cAAc,CAAC,2BAA2B,EAAE,KAAK,CAAC,CASpD;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,CAAC,EAAE,wBAAwB,CAAC,2BAA2B,CAAC,GAC9D,sBAAsB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAS5D;AAED,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,2BAA2B,GAChC,2BAA2B,GAAG,SAAS,CAIzC;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,iBAAiB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,CACP,OAAO,EAAE,oBAAoB,KAC1B,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAC3C,CAkBA;AAED,wBAAgB,0BAA0B,IAAI,QAAQ,CAErD"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useUserGetCurrentUser = useUserGetCurrentUser;
7
+ exports.useUserGetCurrentUserSuspense = useUserGetCurrentUserSuspense;
8
+ exports.prefetchUserGetCurrentUser = prefetchUserGetCurrentUser;
9
+ exports.setUserGetCurrentUserData = setUserGetCurrentUserData;
10
+ exports.invalidateAllUserGetCurrentUser = invalidateAllUserGetCurrentUser;
11
+ exports.buildUserGetCurrentUserQuery = buildUserGetCurrentUserQuery;
12
+ exports.queryKeyUserGetCurrentUser = queryKeyUserGetCurrentUser;
13
+ const react_query_1 = require("@tanstack/react-query");
14
+ const userGetCurrentUser_js_1 = require("../funcs/userGetCurrentUser.js");
15
+ const primitives_js_1 = require("../lib/primitives.js");
16
+ const fp_js_1 = require("../types/fp.js");
17
+ const _context_js_1 = require("./_context.js");
18
+ /**
19
+ * Get current user
20
+ *
21
+ * @remarks
22
+ * Returns a user object for the user represented by the authorization token
23
+ */
24
+ function useUserGetCurrentUser(options) {
25
+ const client = (0, _context_js_1.useGreenSecurityContext)();
26
+ return (0, react_query_1.useQuery)({
27
+ ...buildUserGetCurrentUserQuery(client, options),
28
+ ...options,
29
+ });
30
+ }
31
+ /**
32
+ * Get current user
33
+ *
34
+ * @remarks
35
+ * Returns a user object for the user represented by the authorization token
36
+ */
37
+ function useUserGetCurrentUserSuspense(options) {
38
+ const client = (0, _context_js_1.useGreenSecurityContext)();
39
+ return (0, react_query_1.useSuspenseQuery)({
40
+ ...buildUserGetCurrentUserQuery(client, options),
41
+ ...options,
42
+ });
43
+ }
44
+ function prefetchUserGetCurrentUser(queryClient, client$) {
45
+ return queryClient.prefetchQuery({
46
+ ...buildUserGetCurrentUserQuery(client$),
47
+ });
48
+ }
49
+ function setUserGetCurrentUserData(client, data) {
50
+ const key = queryKeyUserGetCurrentUser();
51
+ return client.setQueryData(key, data);
52
+ }
53
+ function invalidateAllUserGetCurrentUser(client, filters) {
54
+ return client.invalidateQueries({
55
+ ...filters,
56
+ queryKey: ["@greensecurity/javascript-sdk", "user", "getCurrentUser"],
57
+ });
58
+ }
59
+ function buildUserGetCurrentUserQuery(client$, options) {
60
+ return {
61
+ queryKey: queryKeyUserGetCurrentUser(),
62
+ queryFn: async function userGetCurrentUserQueryFn(ctx) {
63
+ const sig = (0, primitives_js_1.combineSignals)(ctx.signal, options?.fetchOptions?.signal);
64
+ const mergedOptions = {
65
+ ...options,
66
+ fetchOptions: { ...options?.fetchOptions, signal: sig },
67
+ };
68
+ return (0, fp_js_1.unwrapAsync)((0, userGetCurrentUser_js_1.userGetCurrentUser)(client$, mergedOptions));
69
+ },
70
+ };
71
+ }
72
+ function queryKeyUserGetCurrentUser() {
73
+ return ["@greensecurity/javascript-sdk", "user", "getCurrentUser"];
74
+ }
75
+ //# sourceMappingURL=userGetCurrentUser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userGetCurrentUser.js","sourceRoot":"","sources":["../src/react-query/userGetCurrentUser.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA6BH,sDAWC;AAQD,sEAWC;AAED,gEASC;AAED,8DAOC;AAED,0EAQC;AAED,oEA0BC;AAED,gEAEC;AAvHD,uDAS+B;AAE/B,0EAAoE;AACpE,wDAAsD;AAGtD,0CAA6C;AAC7C,+CAAwD;AAKxD;;;;;GAKG;AACH,SAAgB,qBAAqB,CACnC,OAAuD;IAEvD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,sBAAQ,EAAC;QACd,GAAG,4BAA4B,CAC7B,MAAM,EACN,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAgB,6BAA6B,CAC3C,OAA+D;IAE/D,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,8BAAgB,EAAC;QACtB,GAAG,4BAA4B,CAC7B,MAAM,EACN,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,0BAA0B,CACxC,WAAwB,EACxB,OAA0B;IAE1B,OAAO,WAAW,CAAC,aAAa,CAAC;QAC/B,GAAG,4BAA4B,CAC7B,OAAO,CACR;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,yBAAyB,CACvC,MAAmB,EACnB,IAAiC;IAEjC,MAAM,GAAG,GAAG,0BAA0B,EAAE,CAAC;IAEzC,OAAO,MAAM,CAAC,YAAY,CAA8B,GAAG,EAAE,IAAI,CAAC,CAAC;AACrE,CAAC;AAED,SAAgB,+BAA+B,CAC7C,MAAmB,EACnB,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE,CAAC,+BAA+B,EAAE,MAAM,EAAE,gBAAgB,CAAC;KACtE,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,4BAA4B,CAC1C,OAA0B,EAC1B,OAAwB;IAOxB,OAAO;QACL,QAAQ,EAAE,0BAA0B,EAAE;QACtC,OAAO,EAAE,KAAK,UAAU,yBAAyB,CAC/C,GAAG;YAEH,MAAM,GAAG,GAAG,IAAA,8BAAc,EAAC,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;YACtE,MAAM,aAAa,GAAG;gBACpB,GAAG,OAAO;gBACV,YAAY,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE;aACxD,CAAC;YAEF,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,0BAA0B;IACxC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { InvalidateQueryFilters, QueryClient, QueryFunctionContext, QueryKey, UseQueryResult, UseSuspenseQueryResult } from "@tanstack/react-query";
2
+ import { GreenSecurityCore } from "../core.js";
3
+ import { RequestOptions } from "../lib/sdks.js";
4
+ import * as components from "../models/components/index.js";
5
+ import * as operations from "../models/operations/index.js";
6
+ import { QueryHookOptions, SuspenseQueryHookOptions, TupleToPrefixes } from "./_types.js";
7
+ export type UserGetUserByIdQueryData = components.User;
8
+ /**
9
+ * Get user by id
10
+ *
11
+ * @remarks
12
+ * Returns a user object for the user represented by the identifier in the path.
13
+ */
14
+ export declare function useUserGetUserById(request: operations.GetUserByIdRequest, options?: QueryHookOptions<UserGetUserByIdQueryData>): UseQueryResult<UserGetUserByIdQueryData, Error>;
15
+ /**
16
+ * Get user by id
17
+ *
18
+ * @remarks
19
+ * Returns a user object for the user represented by the identifier in the path.
20
+ */
21
+ export declare function useUserGetUserByIdSuspense(request: operations.GetUserByIdRequest, options?: SuspenseQueryHookOptions<UserGetUserByIdQueryData>): UseSuspenseQueryResult<UserGetUserByIdQueryData, Error>;
22
+ export declare function prefetchUserGetUserById(queryClient: QueryClient, client$: GreenSecurityCore, request: operations.GetUserByIdRequest): Promise<void>;
23
+ export declare function setUserGetUserByIdData(client: QueryClient, queryKeyBase: [id: number], data: UserGetUserByIdQueryData): UserGetUserByIdQueryData | undefined;
24
+ export declare function invalidateUserGetUserById(client: QueryClient, queryKeyBase: TupleToPrefixes<[id: number]>, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
25
+ export declare function invalidateAllUserGetUserById(client: QueryClient, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
26
+ export declare function buildUserGetUserByIdQuery(client$: GreenSecurityCore, request: operations.GetUserByIdRequest, options?: RequestOptions): {
27
+ queryKey: QueryKey;
28
+ queryFn: (context: QueryFunctionContext) => Promise<UserGetUserByIdQueryData>;
29
+ };
30
+ export declare function queryKeyUserGetUserById(id: number): QueryKey;
31
+ //# sourceMappingURL=userGetUserById.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userGetUserById.d.ts","sourceRoot":"","sources":["../src/react-query/userGetUserById.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,oBAAoB,EACpB,QAAQ,EAER,cAAc,EAEd,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EAChB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,IAAI,CAAC;AAEvD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,GACnD,cAAc,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAUjD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,wBAAwB,CAAC,wBAAwB,CAAC,GAC3D,sBAAsB,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAUzD;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,UAAU,CAAC,kBAAkB,GACrC,OAAO,CAAC,IAAI,CAAC,CAOf;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,EAC1B,IAAI,EAAE,wBAAwB,GAC7B,wBAAwB,GAAG,SAAS,CAItC;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,eAAe,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,EAC3C,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC/E,CAmBA;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,CAE5D"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useUserGetUserById = useUserGetUserById;
7
+ exports.useUserGetUserByIdSuspense = useUserGetUserByIdSuspense;
8
+ exports.prefetchUserGetUserById = prefetchUserGetUserById;
9
+ exports.setUserGetUserByIdData = setUserGetUserByIdData;
10
+ exports.invalidateUserGetUserById = invalidateUserGetUserById;
11
+ exports.invalidateAllUserGetUserById = invalidateAllUserGetUserById;
12
+ exports.buildUserGetUserByIdQuery = buildUserGetUserByIdQuery;
13
+ exports.queryKeyUserGetUserById = queryKeyUserGetUserById;
14
+ const react_query_1 = require("@tanstack/react-query");
15
+ const userGetUserById_js_1 = require("../funcs/userGetUserById.js");
16
+ const primitives_js_1 = require("../lib/primitives.js");
17
+ const fp_js_1 = require("../types/fp.js");
18
+ const _context_js_1 = require("./_context.js");
19
+ /**
20
+ * Get user by id
21
+ *
22
+ * @remarks
23
+ * Returns a user object for the user represented by the identifier in the path.
24
+ */
25
+ function useUserGetUserById(request, options) {
26
+ const client = (0, _context_js_1.useGreenSecurityContext)();
27
+ return (0, react_query_1.useQuery)({
28
+ ...buildUserGetUserByIdQuery(client, request, options),
29
+ ...options,
30
+ });
31
+ }
32
+ /**
33
+ * Get user by id
34
+ *
35
+ * @remarks
36
+ * Returns a user object for the user represented by the identifier in the path.
37
+ */
38
+ function useUserGetUserByIdSuspense(request, options) {
39
+ const client = (0, _context_js_1.useGreenSecurityContext)();
40
+ return (0, react_query_1.useSuspenseQuery)({
41
+ ...buildUserGetUserByIdQuery(client, request, options),
42
+ ...options,
43
+ });
44
+ }
45
+ function prefetchUserGetUserById(queryClient, client$, request) {
46
+ return queryClient.prefetchQuery({
47
+ ...buildUserGetUserByIdQuery(client$, request),
48
+ });
49
+ }
50
+ function setUserGetUserByIdData(client, queryKeyBase, data) {
51
+ const key = queryKeyUserGetUserById(...queryKeyBase);
52
+ return client.setQueryData(key, data);
53
+ }
54
+ function invalidateUserGetUserById(client, queryKeyBase, filters) {
55
+ return client.invalidateQueries({
56
+ ...filters,
57
+ queryKey: [
58
+ "@greensecurity/javascript-sdk",
59
+ "user",
60
+ "getUserById",
61
+ ...queryKeyBase,
62
+ ],
63
+ });
64
+ }
65
+ function invalidateAllUserGetUserById(client, filters) {
66
+ return client.invalidateQueries({
67
+ ...filters,
68
+ queryKey: ["@greensecurity/javascript-sdk", "user", "getUserById"],
69
+ });
70
+ }
71
+ function buildUserGetUserByIdQuery(client$, request, options) {
72
+ return {
73
+ queryKey: queryKeyUserGetUserById(request.id),
74
+ queryFn: async function userGetUserByIdQueryFn(ctx) {
75
+ const sig = (0, primitives_js_1.combineSignals)(ctx.signal, options?.fetchOptions?.signal);
76
+ const mergedOptions = {
77
+ ...options,
78
+ fetchOptions: { ...options?.fetchOptions, signal: sig },
79
+ };
80
+ return (0, fp_js_1.unwrapAsync)((0, userGetUserById_js_1.userGetUserById)(client$, request, mergedOptions));
81
+ },
82
+ };
83
+ }
84
+ function queryKeyUserGetUserById(id) {
85
+ return ["@greensecurity/javascript-sdk", "user", "getUserById", id];
86
+ }
87
+ //# sourceMappingURL=userGetUserById.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userGetUserById.js","sourceRoot":"","sources":["../src/react-query/userGetUserById.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAkCH,gDAaC;AAQD,gEAaC;AAED,0DAWC;AAED,wDAQC;AAED,8DAcC;AAED,oEAQC;AAED,8DA0BC;AAED,0DAEC;AAnJD,uDAS+B;AAE/B,oEAA8D;AAC9D,wDAAsD;AAItD,0CAA6C;AAC7C,+CAAwD;AASxD;;;;;GAKG;AACH,SAAgB,kBAAkB,CAChC,OAAsC,EACtC,OAAoD;IAEpD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,sBAAQ,EAAC;QACd,GAAG,yBAAyB,CAC1B,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAgB,0BAA0B,CACxC,OAAsC,EACtC,OAA4D;IAE5D,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,8BAAgB,EAAC;QACtB,GAAG,yBAAyB,CAC1B,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,uBAAuB,CACrC,WAAwB,EACxB,OAA0B,EAC1B,OAAsC;IAEtC,OAAO,WAAW,CAAC,aAAa,CAAC;QAC/B,GAAG,yBAAyB,CAC1B,OAAO,EACP,OAAO,CACR;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,sBAAsB,CACpC,MAAmB,EACnB,YAA0B,EAC1B,IAA8B;IAE9B,MAAM,GAAG,GAAG,uBAAuB,CAAC,GAAG,YAAY,CAAC,CAAC;IAErD,OAAO,MAAM,CAAC,YAAY,CAA2B,GAAG,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC;AAED,SAAgB,yBAAyB,CACvC,MAAmB,EACnB,YAA2C,EAC3C,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,MAAM;YACN,aAAa;YACb,GAAG,YAAY;SAChB;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,4BAA4B,CAC1C,MAAmB,EACnB,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE,CAAC,+BAA+B,EAAE,MAAM,EAAE,aAAa,CAAC;KACnE,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,yBAAyB,CACvC,OAA0B,EAC1B,OAAsC,EACtC,OAAwB;IAKxB,OAAO;QACL,QAAQ,EAAE,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7C,OAAO,EAAE,KAAK,UAAU,sBAAsB,CAC5C,GAAG;YAEH,MAAM,GAAG,GAAG,IAAA,8BAAc,EAAC,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;YACtE,MAAM,aAAa,GAAG;gBACpB,GAAG,OAAO;gBACV,YAAY,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE;aACxD,CAAC;YAEF,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,uBAAuB,CAAC,EAAU;IAChD,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC;AACtE,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { MutationKey, UseMutationResult } from "@tanstack/react-query";
2
+ import { GreenSecurityCore } from "../core.js";
3
+ import { RequestOptions } from "../lib/sdks.js";
4
+ import * as operations from "../models/operations/index.js";
5
+ import { MutationHookOptions } from "./_types.js";
6
+ export type UserLogsUserIntoTheSystemMutationVariables = {
7
+ request: operations.LogsUserIntoTheSystemRequestBody;
8
+ options?: RequestOptions;
9
+ };
10
+ export type UserLogsUserIntoTheSystemMutationData = operations.LogsUserIntoTheSystemResponse;
11
+ /**
12
+ * Logs user into the system
13
+ *
14
+ * @remarks
15
+ * This endpoint allows a user to authenticate themselves and retrieve a permanent token for access.
16
+ *
17
+ * Permanent tokens should only ever be stored in an encrypted storage because they represent a fully logged in user.
18
+ *
19
+ * Users may log in with `email/password`, `SAML`, `magic link` or `mfa`. The application should handle all of the above as equally valid login methods.
20
+ *
21
+ * The most common way to authenticate a user is to log in with an email and password. If the user provides valid credentials, the server will either respond with a full user object including the token.
22
+ *
23
+ * When the user's account is protected via MFA, the server will send a 6 digit code to the user via their default MFA provider. You should collect that code and resend the email, password and mfa_code together to get a successful authentication.
24
+ *
25
+ * The ideal flow for a login sequence is the following:
26
+ *
27
+ * 1. Present an email address field only and allow the user to submit
28
+ * 2. Send `email` and `return_url` payload to this endpoint
29
+ * 3. Follow the flow based on the response `requires` field
30
+ *
31
+ * Requires: `password`
32
+ *
33
+ * 1. Show a password field for the user to fill out
34
+ * 2. Submit the `email` and `password` to this endpoint
35
+ * 3. If the response is `200`, the login is done. If the response is `201`, then check if `requires: mfa_code` is returned and show MFA flow
36
+ * 4. Submit `email`, `password`, `mfa_code` to this endpoint
37
+ * 5. If the response is `200`, the login is done. Otherwise, show the appropriate error to the user and go back to step 1 or 3 depending on the error.
38
+ *
39
+ * Requires: `saml_login`
40
+ *
41
+ * 1. [Open a browser](https://docs.expo.dev/versions/latest/sdk/webbrowser/#webbrowseropenauthsessionasyncurl-redirecturl-options) to the url returned in `sso_url`
42
+ * 2. User completes sign-in using their configured SAML IdP
43
+ * 3. Site redirects to your selected `return_url`
44
+ * 4. The `user_token` will be appended as a query string parameter to your `return_url` - you must parse this token and store it
45
+ * 5. Fetch the user object from `/users/me` using the token
46
+ */
47
+ export declare function useUserLogsUserIntoTheSystemMutation(options?: MutationHookOptions<UserLogsUserIntoTheSystemMutationData, Error, UserLogsUserIntoTheSystemMutationVariables>): UseMutationResult<UserLogsUserIntoTheSystemMutationData, Error, UserLogsUserIntoTheSystemMutationVariables>;
48
+ export declare function mutationKeyUserLogsUserIntoTheSystem(): MutationKey;
49
+ export declare function buildUserLogsUserIntoTheSystemMutation(client$: GreenSecurityCore, hookOptions?: RequestOptions): {
50
+ mutationKey: MutationKey;
51
+ mutationFn: (variables: UserLogsUserIntoTheSystemMutationVariables) => Promise<UserLogsUserIntoTheSystemMutationData>;
52
+ };
53
+ //# sourceMappingURL=userLogsUserIntoTheSystem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userLogsUserIntoTheSystem.d.ts","sourceRoot":"","sources":["../src/react-query/userLogsUserIntoTheSystem.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAEX,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,0CAA0C,GAAG;IACvD,OAAO,EAAE,UAAU,CAAC,gCAAgC,CAAC;IACrD,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAC/C,UAAU,CAAC,6BAA6B,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,oCAAoC,CAClD,OAAO,CAAC,EAAE,mBAAmB,CAC3B,qCAAqC,EACrC,KAAK,EACL,0CAA0C,CAC3C,GACA,iBAAiB,CAClB,qCAAqC,EACrC,KAAK,EACL,0CAA0C,CAC3C,CAMA;AAED,wBAAgB,oCAAoC,IAAI,WAAW,CAElE;AAED,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,iBAAiB,EAC1B,WAAW,CAAC,EAAE,cAAc,GAC3B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,CACV,SAAS,EAAE,0CAA0C,KAClD,OAAO,CAAC,qCAAqC,CAAC,CAAC;CACrD,CA0BA"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useUserLogsUserIntoTheSystemMutation = useUserLogsUserIntoTheSystemMutation;
7
+ exports.mutationKeyUserLogsUserIntoTheSystem = mutationKeyUserLogsUserIntoTheSystem;
8
+ exports.buildUserLogsUserIntoTheSystemMutation = buildUserLogsUserIntoTheSystemMutation;
9
+ const react_query_1 = require("@tanstack/react-query");
10
+ const userLogsUserIntoTheSystem_js_1 = require("../funcs/userLogsUserIntoTheSystem.js");
11
+ const primitives_js_1 = require("../lib/primitives.js");
12
+ const fp_js_1 = require("../types/fp.js");
13
+ const _context_js_1 = require("./_context.js");
14
+ /**
15
+ * Logs user into the system
16
+ *
17
+ * @remarks
18
+ * This endpoint allows a user to authenticate themselves and retrieve a permanent token for access.
19
+ *
20
+ * Permanent tokens should only ever be stored in an encrypted storage because they represent a fully logged in user.
21
+ *
22
+ * Users may log in with `email/password`, `SAML`, `magic link` or `mfa`. The application should handle all of the above as equally valid login methods.
23
+ *
24
+ * The most common way to authenticate a user is to log in with an email and password. If the user provides valid credentials, the server will either respond with a full user object including the token.
25
+ *
26
+ * When the user's account is protected via MFA, the server will send a 6 digit code to the user via their default MFA provider. You should collect that code and resend the email, password and mfa_code together to get a successful authentication.
27
+ *
28
+ * The ideal flow for a login sequence is the following:
29
+ *
30
+ * 1. Present an email address field only and allow the user to submit
31
+ * 2. Send `email` and `return_url` payload to this endpoint
32
+ * 3. Follow the flow based on the response `requires` field
33
+ *
34
+ * Requires: `password`
35
+ *
36
+ * 1. Show a password field for the user to fill out
37
+ * 2. Submit the `email` and `password` to this endpoint
38
+ * 3. If the response is `200`, the login is done. If the response is `201`, then check if `requires: mfa_code` is returned and show MFA flow
39
+ * 4. Submit `email`, `password`, `mfa_code` to this endpoint
40
+ * 5. If the response is `200`, the login is done. Otherwise, show the appropriate error to the user and go back to step 1 or 3 depending on the error.
41
+ *
42
+ * Requires: `saml_login`
43
+ *
44
+ * 1. [Open a browser](https://docs.expo.dev/versions/latest/sdk/webbrowser/#webbrowseropenauthsessionasyncurl-redirecturl-options) to the url returned in `sso_url`
45
+ * 2. User completes sign-in using their configured SAML IdP
46
+ * 3. Site redirects to your selected `return_url`
47
+ * 4. The `user_token` will be appended as a query string parameter to your `return_url` - you must parse this token and store it
48
+ * 5. Fetch the user object from `/users/me` using the token
49
+ */
50
+ function useUserLogsUserIntoTheSystemMutation(options) {
51
+ const client = (0, _context_js_1.useGreenSecurityContext)();
52
+ return (0, react_query_1.useMutation)({
53
+ ...buildUserLogsUserIntoTheSystemMutation(client, options),
54
+ ...options,
55
+ });
56
+ }
57
+ function mutationKeyUserLogsUserIntoTheSystem() {
58
+ return ["@greensecurity/javascript-sdk", "user", "logsUserIntoTheSystem"];
59
+ }
60
+ function buildUserLogsUserIntoTheSystemMutation(client$, hookOptions) {
61
+ return {
62
+ mutationKey: mutationKeyUserLogsUserIntoTheSystem(),
63
+ mutationFn: function userLogsUserIntoTheSystemMutationFn({ request, options, }) {
64
+ const mergedOptions = {
65
+ ...hookOptions,
66
+ ...options,
67
+ fetchOptions: {
68
+ ...hookOptions?.fetchOptions,
69
+ ...options?.fetchOptions,
70
+ signal: (0, primitives_js_1.combineSignals)(hookOptions?.fetchOptions?.signal, options?.fetchOptions?.signal),
71
+ },
72
+ };
73
+ return (0, fp_js_1.unwrapAsync)((0, userLogsUserIntoTheSystem_js_1.userLogsUserIntoTheSystem)(client$, request, mergedOptions));
74
+ },
75
+ };
76
+ }
77
+ //# sourceMappingURL=userLogsUserIntoTheSystem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userLogsUserIntoTheSystem.js","sourceRoot":"","sources":["../src/react-query/userLogsUserIntoTheSystem.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA4DH,oFAgBC;AAED,oFAEC;AAED,wFAkCC;AAlHD,uDAI+B;AAE/B,wFAAkF;AAClF,wDAAsD;AAGtD,0CAA6C;AAC7C,+CAAwD;AAWxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,SAAgB,oCAAoC,CAClD,OAIC;IAMD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,yBAAW,EAAC;QACjB,GAAG,sCAAsC,CAAC,MAAM,EAAE,OAAO,CAAC;QAC1D,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,oCAAoC;IAClD,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE,uBAAuB,CAAC,CAAC;AAC5E,CAAC;AAED,SAAgB,sCAAsC,CACpD,OAA0B,EAC1B,WAA4B;IAO5B,OAAO;QACL,WAAW,EAAE,oCAAoC,EAAE;QACnD,UAAU,EAAE,SAAS,mCAAmC,CAAC,EACvD,OAAO,EACP,OAAO,GACR;YACC,MAAM,aAAa,GAAG;gBACpB,GAAG,WAAW;gBACd,GAAG,OAAO;gBACV,YAAY,EAAE;oBACZ,GAAG,WAAW,EAAE,YAAY;oBAC5B,GAAG,OAAO,EAAE,YAAY;oBACxB,MAAM,EAAE,IAAA,8BAAc,EACpB,WAAW,EAAE,YAAY,EAAE,MAAM,EACjC,OAAO,EAAE,YAAY,EAAE,MAAM,CAC9B;iBACF;aACF,CAAC;YACF,OAAO,IAAA,mBAAW,EAAC,IAAA,wDAAyB,EAC1C,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { MutationKey, UseMutationResult } from "@tanstack/react-query";
2
+ import { GreenSecurityCore } from "../core.js";
3
+ import { RequestOptions } from "../lib/sdks.js";
4
+ import * as operations from "../models/operations/index.js";
5
+ import { MutationHookOptions } from "./_types.js";
6
+ export type VendorsCreateVendorRegistrationMutationVariables = {
7
+ request: operations.CreateVendorRegistrationRequestBody;
8
+ options?: RequestOptions;
9
+ };
10
+ export type VendorsCreateVendorRegistrationMutationData = operations.CreateVendorRegistrationResponseBody;
11
+ /**
12
+ * Create vendor registration
13
+ *
14
+ * @remarks
15
+ * Create an initial vendor registration. Once successful, the vendor will be able to continue to filling out the rest of their onboarding profile.
16
+ */
17
+ export declare function useVendorsCreateVendorRegistrationMutation(options?: MutationHookOptions<VendorsCreateVendorRegistrationMutationData, Error, VendorsCreateVendorRegistrationMutationVariables>): UseMutationResult<VendorsCreateVendorRegistrationMutationData, Error, VendorsCreateVendorRegistrationMutationVariables>;
18
+ export declare function mutationKeyVendorsCreateVendorRegistration(): MutationKey;
19
+ export declare function buildVendorsCreateVendorRegistrationMutation(client$: GreenSecurityCore, hookOptions?: RequestOptions): {
20
+ mutationKey: MutationKey;
21
+ mutationFn: (variables: VendorsCreateVendorRegistrationMutationVariables) => Promise<VendorsCreateVendorRegistrationMutationData>;
22
+ };
23
+ //# sourceMappingURL=vendorsCreateVendorRegistration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendorsCreateVendorRegistration.d.ts","sourceRoot":"","sources":["../src/react-query/vendorsCreateVendorRegistration.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAEX,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,gDAAgD,GAAG;IAC7D,OAAO,EAAE,UAAU,CAAC,mCAAmC,CAAC;IACxD,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,2CAA2C,GACrD,UAAU,CAAC,oCAAoC,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,0CAA0C,CACxD,OAAO,CAAC,EAAE,mBAAmB,CAC3B,2CAA2C,EAC3C,KAAK,EACL,gDAAgD,CACjD,GACA,iBAAiB,CAClB,2CAA2C,EAC3C,KAAK,EACL,gDAAgD,CACjD,CAMA;AAED,wBAAgB,0CAA0C,IAAI,WAAW,CAMxE;AAED,wBAAgB,4CAA4C,CAC1D,OAAO,EAAE,iBAAiB,EAC1B,WAAW,CAAC,EAAE,cAAc,GAC3B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,CACV,SAAS,EAAE,gDAAgD,KACxD,OAAO,CAAC,2CAA2C,CAAC,CAAC;CAC3D,CA0BA"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useVendorsCreateVendorRegistrationMutation = useVendorsCreateVendorRegistrationMutation;
7
+ exports.mutationKeyVendorsCreateVendorRegistration = mutationKeyVendorsCreateVendorRegistration;
8
+ exports.buildVendorsCreateVendorRegistrationMutation = buildVendorsCreateVendorRegistrationMutation;
9
+ const react_query_1 = require("@tanstack/react-query");
10
+ const vendorsCreateVendorRegistration_js_1 = require("../funcs/vendorsCreateVendorRegistration.js");
11
+ const primitives_js_1 = require("../lib/primitives.js");
12
+ const fp_js_1 = require("../types/fp.js");
13
+ const _context_js_1 = require("./_context.js");
14
+ /**
15
+ * Create vendor registration
16
+ *
17
+ * @remarks
18
+ * Create an initial vendor registration. Once successful, the vendor will be able to continue to filling out the rest of their onboarding profile.
19
+ */
20
+ function useVendorsCreateVendorRegistrationMutation(options) {
21
+ const client = (0, _context_js_1.useGreenSecurityContext)();
22
+ return (0, react_query_1.useMutation)({
23
+ ...buildVendorsCreateVendorRegistrationMutation(client, options),
24
+ ...options,
25
+ });
26
+ }
27
+ function mutationKeyVendorsCreateVendorRegistration() {
28
+ return [
29
+ "@greensecurity/javascript-sdk",
30
+ "vendors",
31
+ "createVendorRegistration",
32
+ ];
33
+ }
34
+ function buildVendorsCreateVendorRegistrationMutation(client$, hookOptions) {
35
+ return {
36
+ mutationKey: mutationKeyVendorsCreateVendorRegistration(),
37
+ mutationFn: function vendorsCreateVendorRegistrationMutationFn({ request, options, }) {
38
+ const mergedOptions = {
39
+ ...hookOptions,
40
+ ...options,
41
+ fetchOptions: {
42
+ ...hookOptions?.fetchOptions,
43
+ ...options?.fetchOptions,
44
+ signal: (0, primitives_js_1.combineSignals)(hookOptions?.fetchOptions?.signal, options?.fetchOptions?.signal),
45
+ },
46
+ };
47
+ return (0, fp_js_1.unwrapAsync)((0, vendorsCreateVendorRegistration_js_1.vendorsCreateVendorRegistration)(client$, request, mergedOptions));
48
+ },
49
+ };
50
+ }
51
+ //# sourceMappingURL=vendorsCreateVendorRegistration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendorsCreateVendorRegistration.js","sourceRoot":"","sources":["../src/react-query/vendorsCreateVendorRegistration.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA8BH,gGAgBC;AAED,gGAMC;AAED,oGAkCC;AAxFD,uDAI+B;AAE/B,oGAA8F;AAC9F,wDAAsD;AAGtD,0CAA6C;AAC7C,+CAAwD;AAWxD;;;;;GAKG;AACH,SAAgB,0CAA0C,CACxD,OAIC;IAMD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,yBAAW,EAAC;QACjB,GAAG,4CAA4C,CAAC,MAAM,EAAE,OAAO,CAAC;QAChE,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,0CAA0C;IACxD,OAAO;QACL,+BAA+B;QAC/B,SAAS;QACT,0BAA0B;KAC3B,CAAC;AACJ,CAAC;AAED,SAAgB,4CAA4C,CAC1D,OAA0B,EAC1B,WAA4B;IAO5B,OAAO;QACL,WAAW,EAAE,0CAA0C,EAAE;QACzD,UAAU,EAAE,SAAS,yCAAyC,CAAC,EAC7D,OAAO,EACP,OAAO,GACR;YACC,MAAM,aAAa,GAAG;gBACpB,GAAG,WAAW;gBACd,GAAG,OAAO;gBACV,YAAY,EAAE;oBACZ,GAAG,WAAW,EAAE,YAAY;oBAC5B,GAAG,OAAO,EAAE,YAAY;oBACxB,MAAM,EAAE,IAAA,8BAAc,EACpB,WAAW,EAAE,YAAY,EAAE,MAAM,EACjC,OAAO,EAAE,YAAY,EAAE,MAAM,CAC9B;iBACF;aACF,CAAC;YACF,OAAO,IAAA,mBAAW,EAAC,IAAA,oEAA+B,EAChD,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}