@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
package/README.md ADDED
@@ -0,0 +1,561 @@
1
+ # greensecurity
2
+
3
+ Developer-friendly & type-safe Typescript SDK specifically catered to leverage *greensecurity* API.
4
+
5
+ <div align="left">
6
+ <a href="https://www.speakeasy.com/?utm_source=greensecurity&utm_campaign=typescript"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
7
+ <a href="https://opensource.org/licenses/MIT">
8
+ <img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
9
+ </a>
10
+ </div>
11
+
12
+
13
+ <br /><br />
14
+ > [!IMPORTANT]
15
+ > This SDK is not yet ready for production use. To complete setup please follow the steps outlined in
16
+ > your [workspace](https://app.speakeasy.com/org/green-security-llc/repconnex). Delete this section before > publishing to
17
+ > a package manager.
18
+
19
+ <!-- Start Summary [summary] -->
20
+ ## Summary
21
+
22
+ API Reference: The Green Security API is organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer).
23
+ Our API has predictable resource-oriented URLs, accepts [JSON-encoded](http://www.json.org/) request bodies,
24
+ returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
25
+
26
+ The API is updated frequently, so be sure to check back often for the latest information.
27
+
28
+ Some useful links:
29
+ - [OpenAPI Reference](https://www.speakeasy.com/openapi)
30
+ <!-- End Summary [summary] -->
31
+
32
+ <!-- Start Table of Contents [toc] -->
33
+ ## Table of Contents
34
+ <!-- $toc-max-depth=2 -->
35
+ * [greensecurity](#greensecurity)
36
+ * [SDK Installation](#sdk-installation)
37
+ * [Requirements](#requirements)
38
+ * [SDK Example Usage](#sdk-example-usage)
39
+ * [Authentication](#authentication)
40
+ * [Available Resources and Operations](#available-resources-and-operations)
41
+ * [Standalone functions](#standalone-functions)
42
+ * [React hooks with TanStack Query](#react-hooks-with-tanstack-query)
43
+ * [Retries](#retries)
44
+ * [Error Handling](#error-handling)
45
+ * [Server Selection](#server-selection)
46
+ * [Custom HTTP Client](#custom-http-client)
47
+ * [Debugging](#debugging)
48
+ * [Development](#development)
49
+ * [Maturity](#maturity)
50
+ * [Contributions](#contributions)
51
+
52
+ <!-- End Table of Contents [toc] -->
53
+
54
+ <!-- Start SDK Installation [installation] -->
55
+ ## SDK Installation
56
+
57
+ The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.
58
+
59
+ ### NPM
60
+
61
+ ```bash
62
+ npm add @greensecurity/javascript-sdk
63
+ # Install optional peer dependencies if you plan to use React hooks
64
+ npm add @tanstack/react-query react react-dom
65
+ ```
66
+
67
+ ### PNPM
68
+
69
+ ```bash
70
+ pnpm add @greensecurity/javascript-sdk
71
+ # Install optional peer dependencies if you plan to use React hooks
72
+ pnpm add @tanstack/react-query react react-dom
73
+ ```
74
+
75
+ ### Bun
76
+
77
+ ```bash
78
+ bun add @greensecurity/javascript-sdk
79
+ # Install optional peer dependencies if you plan to use React hooks
80
+ bun add @tanstack/react-query react react-dom
81
+ ```
82
+
83
+ ### Yarn
84
+
85
+ ```bash
86
+ yarn add @greensecurity/javascript-sdk zod
87
+ # Install optional peer dependencies if you plan to use React hooks
88
+ yarn add @tanstack/react-query react react-dom
89
+
90
+ # Note that Yarn does not install peer dependencies automatically. You will need
91
+ # to install zod as shown above.
92
+ ```
93
+ <!-- End SDK Installation [installation] -->
94
+
95
+ <!-- Start Requirements [requirements] -->
96
+ ## Requirements
97
+
98
+ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
99
+ <!-- End Requirements [requirements] -->
100
+
101
+ <!-- Start SDK Example Usage [usage] -->
102
+ ## SDK Example Usage
103
+
104
+ ### Example
105
+
106
+ ```typescript
107
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
108
+
109
+ const greenSecurity = new GreenSecurity();
110
+
111
+ async function run() {
112
+ const result = await greenSecurity.vendors.createVendorRegistration({
113
+ email: "user@example.com",
114
+ password: "Abcdef123!",
115
+ timezone: "America/Chicago",
116
+ affiliateId: 123,
117
+ vendorGroupId: 123,
118
+ managingCompanyId: 123,
119
+ });
120
+
121
+ // Handle the result
122
+ console.log(result);
123
+ }
124
+
125
+ run();
126
+
127
+ ```
128
+ <!-- End SDK Example Usage [usage] -->
129
+
130
+ <!-- Start Authentication [security] -->
131
+ ## Authentication
132
+
133
+ ### Per-Client Security Schemes
134
+
135
+ This SDK supports the following security schemes globally:
136
+
137
+ | Name | Type | Scheme | Environment Variable |
138
+ | ----------- | ------ | ----------- | --------------------------- |
139
+ | `token` | apiKey | API key | `GREEN_SECURITY_TOKEN` |
140
+ | `bearerJwt` | http | HTTP Bearer | `GREEN_SECURITY_BEARER_JWT` |
141
+
142
+ You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
143
+ ```typescript
144
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
145
+
146
+ const greenSecurity = new GreenSecurity({
147
+ security: {
148
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
149
+ },
150
+ });
151
+
152
+ async function run() {
153
+ const result = await greenSecurity.vendors.createVendorRegistration({
154
+ email: "user@example.com",
155
+ password: "Abcdef123!",
156
+ timezone: "America/Chicago",
157
+ affiliateId: 123,
158
+ vendorGroupId: 123,
159
+ managingCompanyId: 123,
160
+ });
161
+
162
+ // Handle the result
163
+ console.log(result);
164
+ }
165
+
166
+ run();
167
+
168
+ ```
169
+ <!-- End Authentication [security] -->
170
+
171
+ <!-- Start Available Resources and Operations [operations] -->
172
+ ## Available Resources and Operations
173
+
174
+ <details open>
175
+ <summary>Available methods</summary>
176
+
177
+
178
+ ### [organizations](docs/sdks/organizations/README.md)
179
+
180
+ * [listOrSearchFacilities](docs/sdks/organizations/README.md#listorsearchfacilities) - List or search facilities
181
+ * [getFacility](docs/sdks/organizations/README.md#getfacility) - Get facility
182
+
183
+ ### [user](docs/sdks/user/README.md)
184
+
185
+ * [getCurrentUser](docs/sdks/user/README.md#getcurrentuser) - Get current user
186
+ * [getUserById](docs/sdks/user/README.md#getuserbyid) - Get user by id
187
+ * [logsUserIntoTheSystem](docs/sdks/user/README.md#logsuserintothesystem) - Logs user into the system
188
+
189
+ ### [vendors](docs/sdks/vendors/README.md)
190
+
191
+ * [createVendorRegistration](docs/sdks/vendors/README.md#createvendorregistration) - Create vendor registration
192
+ * [listVendorJobTitles](docs/sdks/vendors/README.md#listvendorjobtitles) - List vendor job titles
193
+
194
+ </details>
195
+ <!-- End Available Resources and Operations [operations] -->
196
+
197
+ <!-- Start Standalone functions [standalone-funcs] -->
198
+ ## Standalone functions
199
+
200
+ All the methods listed above are available as standalone functions. These
201
+ functions are ideal for use in applications running in the browser, serverless
202
+ runtimes or other environments where application bundle size is a primary
203
+ concern. When using a bundler to build your application, all unused
204
+ functionality will be either excluded from the final bundle or tree-shaken away.
205
+
206
+ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
207
+
208
+ <details>
209
+
210
+ <summary>Available standalone functions</summary>
211
+
212
+ - [`organizationsGetFacility`](docs/sdks/organizations/README.md#getfacility) - Get facility
213
+ - [`organizationsListOrSearchFacilities`](docs/sdks/organizations/README.md#listorsearchfacilities) - List or search facilities
214
+ - [`userGetCurrentUser`](docs/sdks/user/README.md#getcurrentuser) - Get current user
215
+ - [`userGetUserById`](docs/sdks/user/README.md#getuserbyid) - Get user by id
216
+ - [`userLogsUserIntoTheSystem`](docs/sdks/user/README.md#logsuserintothesystem) - Logs user into the system
217
+ - [`vendorsCreateVendorRegistration`](docs/sdks/vendors/README.md#createvendorregistration) - Create vendor registration
218
+ - [`vendorsListVendorJobTitles`](docs/sdks/vendors/README.md#listvendorjobtitles) - List vendor job titles
219
+
220
+ </details>
221
+ <!-- End Standalone functions [standalone-funcs] -->
222
+
223
+ <!-- Start React hooks with TanStack Query [react-query] -->
224
+ ## React hooks with TanStack Query
225
+
226
+ React hooks built on [TanStack Query][tanstack-query] are included in this SDK.
227
+ These hooks and the utility functions provided alongside them can be used to
228
+ build rich applications that pull data from the API using one of the most
229
+ popular asynchronous state management library.
230
+
231
+ [tanstack-query]: https://tanstack.com/query/v5/docs/framework/react/overview
232
+
233
+ To learn about this feature and how to get started, check
234
+ [REACT_QUERY.md](./REACT_QUERY.md).
235
+
236
+ > [!WARNING]
237
+ >
238
+ > This feature is currently in **preview** and is subject to breaking changes
239
+ > within the current major version of the SDK as we gather user feedback on it.
240
+
241
+ <details>
242
+
243
+ <summary>Available React hooks</summary>
244
+
245
+ - [`useOrganizationsGetFacility`](docs/sdks/organizations/README.md#getfacility) - Get facility
246
+ - [`useOrganizationsListOrSearchFacilities`](docs/sdks/organizations/README.md#listorsearchfacilities) - List or search facilities
247
+ - [`useUserGetCurrentUser`](docs/sdks/user/README.md#getcurrentuser) - Get current user
248
+ - [`useUserGetUserById`](docs/sdks/user/README.md#getuserbyid) - Get user by id
249
+ - [`useUserLogsUserIntoTheSystemMutation`](docs/sdks/user/README.md#logsuserintothesystem) - Logs user into the system
250
+ - [`useVendorsCreateVendorRegistrationMutation`](docs/sdks/vendors/README.md#createvendorregistration) - Create vendor registration
251
+ - [`useVendorsListVendorJobTitles`](docs/sdks/vendors/README.md#listvendorjobtitles) - List vendor job titles
252
+
253
+ </details>
254
+ <!-- End React hooks with TanStack Query [react-query] -->
255
+
256
+ <!-- Start Retries [retries] -->
257
+ ## Retries
258
+
259
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
260
+
261
+ To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
262
+ ```typescript
263
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
264
+
265
+ const greenSecurity = new GreenSecurity();
266
+
267
+ async function run() {
268
+ const result = await greenSecurity.vendors.createVendorRegistration({
269
+ email: "user@example.com",
270
+ password: "Abcdef123!",
271
+ timezone: "America/Chicago",
272
+ affiliateId: 123,
273
+ vendorGroupId: 123,
274
+ managingCompanyId: 123,
275
+ }, {
276
+ retries: {
277
+ strategy: "backoff",
278
+ backoff: {
279
+ initialInterval: 1,
280
+ maxInterval: 50,
281
+ exponent: 1.1,
282
+ maxElapsedTime: 100,
283
+ },
284
+ retryConnectionErrors: false,
285
+ },
286
+ });
287
+
288
+ // Handle the result
289
+ console.log(result);
290
+ }
291
+
292
+ run();
293
+
294
+ ```
295
+
296
+ If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
297
+ ```typescript
298
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
299
+
300
+ const greenSecurity = new GreenSecurity({
301
+ retryConfig: {
302
+ strategy: "backoff",
303
+ backoff: {
304
+ initialInterval: 1,
305
+ maxInterval: 50,
306
+ exponent: 1.1,
307
+ maxElapsedTime: 100,
308
+ },
309
+ retryConnectionErrors: false,
310
+ },
311
+ });
312
+
313
+ async function run() {
314
+ const result = await greenSecurity.vendors.createVendorRegistration({
315
+ email: "user@example.com",
316
+ password: "Abcdef123!",
317
+ timezone: "America/Chicago",
318
+ affiliateId: 123,
319
+ vendorGroupId: 123,
320
+ managingCompanyId: 123,
321
+ });
322
+
323
+ // Handle the result
324
+ console.log(result);
325
+ }
326
+
327
+ run();
328
+
329
+ ```
330
+ <!-- End Retries [retries] -->
331
+
332
+ <!-- Start Error Handling [errors] -->
333
+ ## Error Handling
334
+
335
+ Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `createVendorRegistration` method may throw the following errors:
336
+
337
+ | Error Type | Status Code | Content Type |
338
+ | ----------------------- | ------------------ | ---------------- |
339
+ | errors.ApiErrorResponse | 400, 401, 403, 409 | application/json |
340
+ | errors.APIError | 4XX, 5XX | \*/\* |
341
+
342
+ If the method throws an error and it is not captured by the known errors, it will default to throwing a `APIError`.
343
+
344
+ ```typescript
345
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
346
+ import {
347
+ ApiErrorResponse,
348
+ SDKValidationError,
349
+ } from "@greensecurity/javascript-sdk/models/errors";
350
+
351
+ const greenSecurity = new GreenSecurity();
352
+
353
+ async function run() {
354
+ let result;
355
+ try {
356
+ result = await greenSecurity.vendors.createVendorRegistration({
357
+ email: "user@example.com",
358
+ password: "Abcdef123!",
359
+ timezone: "America/Chicago",
360
+ affiliateId: 123,
361
+ vendorGroupId: 123,
362
+ managingCompanyId: 123,
363
+ });
364
+
365
+ // Handle the result
366
+ console.log(result);
367
+ } catch (err) {
368
+ switch (true) {
369
+ // The server response does not match the expected SDK schema
370
+ case (err instanceof SDKValidationError): {
371
+ // Pretty-print will provide a human-readable multi-line error message
372
+ console.error(err.pretty());
373
+ // Raw value may also be inspected
374
+ console.error(err.rawValue);
375
+ return;
376
+ }
377
+ case (err instanceof ApiErrorResponse): {
378
+ // Handle err.data$: ApiErrorResponseData
379
+ console.error(err);
380
+ return;
381
+ }
382
+ default: {
383
+ // Other errors such as network errors, see HTTPClientErrors for more details
384
+ throw err;
385
+ }
386
+ }
387
+ }
388
+ }
389
+
390
+ run();
391
+
392
+ ```
393
+
394
+ Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.
395
+
396
+ In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module:
397
+
398
+ | HTTP Client Error | Description |
399
+ | ---------------------------------------------------- | ---------------------------------------------------- |
400
+ | RequestAbortedError | HTTP request was aborted by the client |
401
+ | RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
402
+ | ConnectionError | HTTP client was unable to make a request to a server |
403
+ | InvalidRequestError | Any input used to create a request is invalid |
404
+ | UnexpectedClientError | Unrecognised or unexpected error |
405
+ <!-- End Error Handling [errors] -->
406
+
407
+ <!-- Start Server Selection [server] -->
408
+ ## Server Selection
409
+
410
+ ### Select Server by Index
411
+
412
+ You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
413
+
414
+ | # | Server |
415
+ | --- | ------------------------------------------ |
416
+ | 0 | `https://www.greensecurityllc.com/api` |
417
+ | 1 | `https://staging.greensecurityllc.com/api` |
418
+ | 2 | `https://localhost:3000/api` |
419
+
420
+ #### Example
421
+
422
+ ```typescript
423
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
424
+
425
+ const greenSecurity = new GreenSecurity({
426
+ serverIdx: 2,
427
+ });
428
+
429
+ async function run() {
430
+ const result = await greenSecurity.vendors.createVendorRegistration({
431
+ email: "user@example.com",
432
+ password: "Abcdef123!",
433
+ timezone: "America/Chicago",
434
+ affiliateId: 123,
435
+ vendorGroupId: 123,
436
+ managingCompanyId: 123,
437
+ });
438
+
439
+ // Handle the result
440
+ console.log(result);
441
+ }
442
+
443
+ run();
444
+
445
+ ```
446
+
447
+ ### Override Server URL Per-Client
448
+
449
+ The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
450
+ ```typescript
451
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
452
+
453
+ const greenSecurity = new GreenSecurity({
454
+ serverURL: "https://www.greensecurityllc.com/api",
455
+ });
456
+
457
+ async function run() {
458
+ const result = await greenSecurity.vendors.createVendorRegistration({
459
+ email: "user@example.com",
460
+ password: "Abcdef123!",
461
+ timezone: "America/Chicago",
462
+ affiliateId: 123,
463
+ vendorGroupId: 123,
464
+ managingCompanyId: 123,
465
+ });
466
+
467
+ // Handle the result
468
+ console.log(result);
469
+ }
470
+
471
+ run();
472
+
473
+ ```
474
+ <!-- End Server Selection [server] -->
475
+
476
+ <!-- Start Custom HTTP Client [http-client] -->
477
+ ## Custom HTTP Client
478
+
479
+ The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
480
+ [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
481
+ client is a thin wrapper around `fetch` and provides the ability to attach hooks
482
+ around the request lifecycle that can be used to modify the request or handle
483
+ errors and response.
484
+
485
+ The `HTTPClient` constructor takes an optional `fetcher` argument that can be
486
+ used to integrate a third-party HTTP client or when writing tests to mock out
487
+ the HTTP client and feed in fixtures.
488
+
489
+ The following example shows how to use the `"beforeRequest"` hook to to add a
490
+ custom header and a timeout to requests and how to use the `"requestError"` hook
491
+ to log errors:
492
+
493
+ ```typescript
494
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
495
+ import { HTTPClient } from "@greensecurity/javascript-sdk/lib/http";
496
+
497
+ const httpClient = new HTTPClient({
498
+ // fetcher takes a function that has the same signature as native `fetch`.
499
+ fetcher: (request) => {
500
+ return fetch(request);
501
+ }
502
+ });
503
+
504
+ httpClient.addHook("beforeRequest", (request) => {
505
+ const nextRequest = new Request(request, {
506
+ signal: request.signal || AbortSignal.timeout(5000)
507
+ });
508
+
509
+ nextRequest.headers.set("x-custom-header", "custom value");
510
+
511
+ return nextRequest;
512
+ });
513
+
514
+ httpClient.addHook("requestError", (error, request) => {
515
+ console.group("Request Error");
516
+ console.log("Reason:", `${error}`);
517
+ console.log("Endpoint:", `${request.method} ${request.url}`);
518
+ console.groupEnd();
519
+ });
520
+
521
+ const sdk = new GreenSecurity({ httpClient });
522
+ ```
523
+ <!-- End Custom HTTP Client [http-client] -->
524
+
525
+ <!-- Start Debugging [debug] -->
526
+ ## Debugging
527
+
528
+ You can setup your SDK to emit debug logs for SDK requests and responses.
529
+
530
+ You can pass a logger that matches `console`'s interface as an SDK option.
531
+
532
+ > [!WARNING]
533
+ > Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
534
+
535
+ ```typescript
536
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
537
+
538
+ const sdk = new GreenSecurity({ debugLogger: console });
539
+ ```
540
+
541
+ You can also enable a default debug logger by setting an environment variable `GREEN_SECURITY_DEBUG` to true.
542
+ <!-- End Debugging [debug] -->
543
+
544
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
545
+
546
+ # Development
547
+
548
+ ## Maturity
549
+
550
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we
551
+ recommend pinning usage
552
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you
553
+ are intentionally
554
+ looking for the latest version.
555
+
556
+ ## Contributions
557
+
558
+ While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes
559
+ added to internal files will be overwritten on the next generation.
560
+ We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our
561
+ best to include it in a future release.
package/RUNTIMES.md ADDED
@@ -0,0 +1,48 @@
1
+ # Supported JavaScript runtimes
2
+
3
+ This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
4
+
5
+ * [Web Fetch API][web-fetch]
6
+ * [Web Streams API][web-streams] and in particular `ReadableStream`
7
+ * [Async iterables][async-iter] using `Symbol.asyncIterator`
8
+
9
+ [web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
10
+ [web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
11
+ [async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
12
+
13
+ Runtime environments that are explicitly supported are:
14
+
15
+ - Evergreen browsers which include: Chrome, Safari, Edge, Firefox
16
+ - Node.js active and maintenance LTS releases
17
+ - Currently, this is v18 and v20
18
+ - Bun v1 and above
19
+ - Deno v1.39
20
+ - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
21
+
22
+ [deno-file-streaming]: https://github.com/denoland/deno/issues/11018
23
+
24
+ ## Recommended TypeScript compiler options
25
+
26
+ The following `tsconfig.json` options are recommended for projects using this
27
+ SDK in order to get static type support for features like async iterables,
28
+ streams and `fetch`-related APIs ([`for await...of`][for-await-of],
29
+ [`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
30
+ so on):
31
+
32
+ [for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
33
+ [abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
34
+ [request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
35
+ [response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
36
+
37
+ ```jsonc
38
+ {
39
+ "compilerOptions": {
40
+ "target": "es2020", // or higher
41
+ "lib": ["es2020", "dom", "dom.iterable"],
42
+ }
43
+ }
44
+ ```
45
+
46
+ While `target` can be set to older ECMAScript versions, it may result in extra,
47
+ unnecessary compatibility code being generated if you are not targeting old
48
+ runtimes.
package/core.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { ClientSDK } from "./lib/sdks.js";
2
+ /**
3
+ * A minimal client to use when calling standalone SDK functions. Typically, an
4
+ * instance of this class would be instantiated once at the start of an
5
+ * application and passed around through some dependency injection mechanism to
6
+ * parts of an application that need to make SDK calls.
7
+ */
8
+ export declare class GreenSecurityCore extends ClientSDK {
9
+ }
10
+ //# sourceMappingURL=core.d.ts.map
package/core.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;CAAG"}
package/core.js ADDED
@@ -0,0 +1,17 @@
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.GreenSecurityCore = void 0;
7
+ const sdks_js_1 = require("./lib/sdks.js");
8
+ /**
9
+ * A minimal client to use when calling standalone SDK functions. Typically, an
10
+ * instance of this class would be instantiated once at the start of an
11
+ * application and passed around through some dependency injection mechanism to
12
+ * parts of an application that need to make SDK calls.
13
+ */
14
+ class GreenSecurityCore extends sdks_js_1.ClientSDK {
15
+ }
16
+ exports.GreenSecurityCore = GreenSecurityCore;
17
+ //# sourceMappingURL=core.js.map
package/core.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2CAA0C;AAE1C;;;;;GAKG;AACH,MAAa,iBAAkB,SAAQ,mBAAS;CAAG;AAAnD,8CAAmD"}
@@ -0,0 +1,14 @@
1
+ # GreenSecurity SDK
2
+
3
+ ## Overview
4
+
5
+ API Reference: The Green Security API is organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer).
6
+ Our API has predictable resource-oriented URLs, accepts [JSON-encoded](http://www.json.org/) request bodies,
7
+ returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
8
+
9
+ The API is updated frequently, so be sure to check back often for the latest information.
10
+
11
+ Some useful links:
12
+ - [OpenAPI Reference](https://www.speakeasy.com/openapi)
13
+
14
+ ### Available Operations