@greensecurity/javascript-sdk 0.9.1 → 0.11.0

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 (223) hide show
  1. package/README.md +81 -16
  2. package/bin/mcp-server.js +39384 -0
  3. package/bin/mcp-server.js.map +301 -0
  4. package/funcs/organizationsGetFacility.d.ts +2 -1
  5. package/funcs/organizationsGetFacility.d.ts.map +1 -1
  6. package/funcs/organizationsGetFacility.js +11 -7
  7. package/funcs/organizationsGetFacility.js.map +1 -1
  8. package/funcs/organizationsListOrSearchFacilities.d.ts +2 -1
  9. package/funcs/organizationsListOrSearchFacilities.d.ts.map +1 -1
  10. package/funcs/organizationsListOrSearchFacilities.js +11 -7
  11. package/funcs/organizationsListOrSearchFacilities.js.map +1 -1
  12. package/funcs/userGetCurrentUser.d.ts +2 -1
  13. package/funcs/userGetCurrentUser.d.ts.map +1 -1
  14. package/funcs/userGetCurrentUser.js +10 -6
  15. package/funcs/userGetCurrentUser.js.map +1 -1
  16. package/funcs/userGetUserById.d.ts +2 -1
  17. package/funcs/userGetUserById.d.ts.map +1 -1
  18. package/funcs/userGetUserById.js +11 -7
  19. package/funcs/userGetUserById.js.map +1 -1
  20. package/funcs/userLogsUserIntoTheSystem.d.ts +2 -1
  21. package/funcs/userLogsUserIntoTheSystem.d.ts.map +1 -1
  22. package/funcs/userLogsUserIntoTheSystem.js +11 -7
  23. package/funcs/userLogsUserIntoTheSystem.js.map +1 -1
  24. package/funcs/userMagiclink.d.ts +17 -0
  25. package/funcs/userMagiclink.d.ts.map +1 -0
  26. package/funcs/userMagiclink.js +115 -0
  27. package/funcs/userMagiclink.js.map +1 -0
  28. package/funcs/userPassword.d.ts +18 -0
  29. package/funcs/userPassword.d.ts.map +1 -0
  30. package/funcs/userPassword.js +116 -0
  31. package/funcs/userPassword.js.map +1 -0
  32. package/funcs/userPasswordResetRequest.d.ts +17 -0
  33. package/funcs/userPasswordResetRequest.d.ts.map +1 -0
  34. package/funcs/userPasswordResetRequest.js +115 -0
  35. package/funcs/userPasswordResetRequest.js.map +1 -0
  36. package/funcs/vendorsCreateVendorRegistration.d.ts +2 -1
  37. package/funcs/vendorsCreateVendorRegistration.d.ts.map +1 -1
  38. package/funcs/vendorsCreateVendorRegistration.js +11 -7
  39. package/funcs/vendorsCreateVendorRegistration.js.map +1 -1
  40. package/funcs/vendorsListVendorJobTitles.d.ts +2 -1
  41. package/funcs/vendorsListVendorJobTitles.d.ts.map +1 -1
  42. package/funcs/vendorsListVendorJobTitles.js +11 -7
  43. package/funcs/vendorsListVendorJobTitles.js.map +1 -1
  44. package/jsr.json +1 -1
  45. package/lib/config.d.ts +5 -5
  46. package/lib/config.d.ts.map +1 -1
  47. package/lib/config.js +3 -3
  48. package/lib/config.js.map +1 -1
  49. package/lib/files.js.map +1 -1
  50. package/lib/sdks.d.ts +1 -1
  51. package/lib/sdks.d.ts.map +1 -1
  52. package/mcp-server/build.d.mts.map +1 -0
  53. package/mcp-server/build.mjs +14 -0
  54. package/mcp-server/build.mjs.map +1 -0
  55. package/mcp-server/cli/start/command.d.ts +2 -0
  56. package/mcp-server/cli/start/command.d.ts.map +1 -0
  57. package/mcp-server/cli/start/command.js +99 -0
  58. package/mcp-server/cli/start/command.js.map +1 -0
  59. package/mcp-server/cli/start/impl.d.ts +15 -0
  60. package/mcp-server/cli/start/impl.d.ts.map +1 -0
  61. package/mcp-server/cli/start/impl.js +97 -0
  62. package/mcp-server/cli/start/impl.js.map +1 -0
  63. package/mcp-server/cli.d.ts +6 -0
  64. package/mcp-server/cli.d.ts.map +1 -0
  65. package/mcp-server/cli.js +10 -0
  66. package/mcp-server/cli.js.map +1 -0
  67. package/mcp-server/console-logger.d.ts +7 -0
  68. package/mcp-server/console-logger.d.ts.map +1 -0
  69. package/mcp-server/console-logger.js +59 -0
  70. package/mcp-server/console-logger.js.map +1 -0
  71. package/mcp-server/mcp-server.d.ts +2 -0
  72. package/mcp-server/mcp-server.d.ts.map +1 -0
  73. package/mcp-server/mcp-server.js +29 -0
  74. package/mcp-server/mcp-server.js.map +1 -0
  75. package/mcp-server/resources.d.ts +27 -0
  76. package/mcp-server/resources.d.ts.map +1 -0
  77. package/mcp-server/resources.js +51 -0
  78. package/mcp-server/resources.js.map +1 -0
  79. package/mcp-server/scopes.d.ts +3 -0
  80. package/mcp-server/scopes.d.ts.map +1 -0
  81. package/mcp-server/scopes.js +8 -0
  82. package/mcp-server/scopes.js.map +1 -0
  83. package/mcp-server/server.d.ts +11 -0
  84. package/mcp-server/server.d.ts.map +1 -0
  85. package/mcp-server/server.js +44 -0
  86. package/mcp-server/server.js.map +1 -0
  87. package/mcp-server/shared.d.ts +7 -0
  88. package/mcp-server/shared.d.ts.map +1 -0
  89. package/mcp-server/shared.js +98 -0
  90. package/mcp-server/shared.js.map +1 -0
  91. package/mcp-server/tools/organizationsGetFacility.d.ts +8 -0
  92. package/mcp-server/tools/organizationsGetFacility.d.ts.map +1 -0
  93. package/mcp-server/tools/organizationsGetFacility.js +64 -0
  94. package/mcp-server/tools/organizationsGetFacility.js.map +1 -0
  95. package/mcp-server/tools/organizationsListOrSearchFacilities.d.ts +8 -0
  96. package/mcp-server/tools/organizationsListOrSearchFacilities.d.ts.map +1 -0
  97. package/mcp-server/tools/organizationsListOrSearchFacilities.js +77 -0
  98. package/mcp-server/tools/organizationsListOrSearchFacilities.js.map +1 -0
  99. package/mcp-server/tools/userGetCurrentUser.d.ts +3 -0
  100. package/mcp-server/tools/userGetCurrentUser.d.ts.map +1 -0
  101. package/mcp-server/tools/userGetCurrentUser.js +26 -0
  102. package/mcp-server/tools/userGetCurrentUser.js.map +1 -0
  103. package/mcp-server/tools/userGetUserById.d.ts +8 -0
  104. package/mcp-server/tools/userGetUserById.d.ts.map +1 -0
  105. package/mcp-server/tools/userGetUserById.js +64 -0
  106. package/mcp-server/tools/userGetUserById.js.map +1 -0
  107. package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts +8 -0
  108. package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts.map +1 -0
  109. package/mcp-server/tools/userLogsUserIntoTheSystem.js +94 -0
  110. package/mcp-server/tools/userLogsUserIntoTheSystem.js.map +1 -0
  111. package/mcp-server/tools/userMagiclink.d.ts +8 -0
  112. package/mcp-server/tools/userMagiclink.d.ts.map +1 -0
  113. package/mcp-server/tools/userMagiclink.js +64 -0
  114. package/mcp-server/tools/userMagiclink.js.map +1 -0
  115. package/mcp-server/tools/userPassword.d.ts +8 -0
  116. package/mcp-server/tools/userPassword.d.ts.map +1 -0
  117. package/mcp-server/tools/userPassword.js +65 -0
  118. package/mcp-server/tools/userPassword.js.map +1 -0
  119. package/mcp-server/tools/userPasswordResetRequest.d.ts +8 -0
  120. package/mcp-server/tools/userPasswordResetRequest.d.ts.map +1 -0
  121. package/mcp-server/tools/userPasswordResetRequest.js +64 -0
  122. package/mcp-server/tools/userPasswordResetRequest.js.map +1 -0
  123. package/mcp-server/tools/vendorsCreateVendorRegistration.d.ts +8 -0
  124. package/mcp-server/tools/vendorsCreateVendorRegistration.d.ts.map +1 -0
  125. package/mcp-server/tools/vendorsCreateVendorRegistration.js +64 -0
  126. package/mcp-server/tools/vendorsCreateVendorRegistration.js.map +1 -0
  127. package/mcp-server/tools/vendorsListVendorJobTitles.d.ts +8 -0
  128. package/mcp-server/tools/vendorsListVendorJobTitles.d.ts.map +1 -0
  129. package/mcp-server/tools/vendorsListVendorJobTitles.js +64 -0
  130. package/mcp-server/tools/vendorsListVendorJobTitles.js.map +1 -0
  131. package/mcp-server/tools.d.ts +25 -0
  132. package/mcp-server/tools.d.ts.map +1 -0
  133. package/mcp-server/tools.js +74 -0
  134. package/mcp-server/tools.js.map +1 -0
  135. package/models/operations/index.d.ts +3 -0
  136. package/models/operations/index.d.ts.map +1 -1
  137. package/models/operations/index.js +3 -0
  138. package/models/operations/index.js.map +1 -1
  139. package/models/operations/magiclink.d.ts +57 -0
  140. package/models/operations/magiclink.d.ts.map +1 -0
  141. package/models/operations/magiclink.js +96 -0
  142. package/models/operations/magiclink.js.map +1 -0
  143. package/models/operations/password.d.ts +59 -0
  144. package/models/operations/password.d.ts.map +1 -0
  145. package/models/operations/password.js +107 -0
  146. package/models/operations/password.js.map +1 -0
  147. package/models/operations/passwordresetrequest.d.ts +57 -0
  148. package/models/operations/passwordresetrequest.d.ts.map +1 -0
  149. package/models/operations/passwordresetrequest.js +96 -0
  150. package/models/operations/passwordresetrequest.js.map +1 -0
  151. package/package.json +14 -2
  152. package/react-query/index.d.ts +3 -0
  153. package/react-query/index.d.ts.map +1 -1
  154. package/react-query/index.js +3 -0
  155. package/react-query/index.js.map +1 -1
  156. package/react-query/userMagiclink.d.ts +23 -0
  157. package/react-query/userMagiclink.d.ts.map +1 -0
  158. package/react-query/userMagiclink.js +47 -0
  159. package/react-query/userMagiclink.js.map +1 -0
  160. package/react-query/userPassword.d.ts +24 -0
  161. package/react-query/userPassword.d.ts.map +1 -0
  162. package/react-query/userPassword.js +48 -0
  163. package/react-query/userPassword.js.map +1 -0
  164. package/react-query/userPasswordResetRequest.d.ts +23 -0
  165. package/react-query/userPasswordResetRequest.d.ts.map +1 -0
  166. package/react-query/userPasswordResetRequest.js +47 -0
  167. package/react-query/userPasswordResetRequest.js.map +1 -0
  168. package/sdk/user.d.ts +22 -0
  169. package/sdk/user.d.ts.map +1 -1
  170. package/sdk/user.js +31 -0
  171. package/sdk/user.js.map +1 -1
  172. package/src/funcs/organizationsGetFacility.ts +37 -8
  173. package/src/funcs/organizationsListOrSearchFacilities.ts +35 -8
  174. package/src/funcs/userGetCurrentUser.ts +33 -7
  175. package/src/funcs/userGetUserById.ts +36 -8
  176. package/src/funcs/userLogsUserIntoTheSystem.ts +36 -8
  177. package/src/funcs/userMagiclink.ts +162 -0
  178. package/src/funcs/userPassword.ts +163 -0
  179. package/src/funcs/userPasswordResetRequest.ts +163 -0
  180. package/src/funcs/vendorsCreateVendorRegistration.ts +36 -8
  181. package/src/funcs/vendorsListVendorJobTitles.ts +37 -8
  182. package/src/lib/config.ts +5 -5
  183. package/src/lib/files.ts +1 -1
  184. package/src/lib/sdks.ts +1 -1
  185. package/src/mcp-server/cli/start/command.ts +67 -0
  186. package/src/mcp-server/cli/start/impl.ts +123 -0
  187. package/src/mcp-server/cli.ts +13 -0
  188. package/src/mcp-server/console-logger.ts +71 -0
  189. package/src/mcp-server/mcp-server.ts +26 -0
  190. package/src/mcp-server/resources.ts +96 -0
  191. package/src/mcp-server/scopes.ts +7 -0
  192. package/src/mcp-server/server.ts +52 -0
  193. package/src/mcp-server/shared.ts +75 -0
  194. package/src/mcp-server/tools/organizationsGetFacility.ts +37 -0
  195. package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +52 -0
  196. package/src/mcp-server/tools/userGetCurrentUser.ts +30 -0
  197. package/src/mcp-server/tools/userGetUserById.ts +37 -0
  198. package/src/mcp-server/tools/userLogsUserIntoTheSystem.ts +67 -0
  199. package/src/mcp-server/tools/userMagiclink.ts +37 -0
  200. package/src/mcp-server/tools/userPassword.ts +38 -0
  201. package/src/mcp-server/tools/userPasswordResetRequest.ts +37 -0
  202. package/src/mcp-server/tools/vendorsCreateVendorRegistration.ts +38 -0
  203. package/src/mcp-server/tools/vendorsListVendorJobTitles.ts +37 -0
  204. package/src/mcp-server/tools.ts +116 -0
  205. package/src/models/operations/index.ts +3 -0
  206. package/src/models/operations/magiclink.ts +127 -0
  207. package/src/models/operations/password.ts +140 -0
  208. package/src/models/operations/passwordresetrequest.ts +131 -0
  209. package/src/react-query/index.ts +3 -0
  210. package/src/react-query/userMagiclink.ts +88 -0
  211. package/src/react-query/userPassword.ts +89 -0
  212. package/src/react-query/userPasswordResetRequest.ts +89 -0
  213. package/src/sdk/user.ts +55 -0
  214. package/src/types/async.ts +68 -0
  215. package/types/async.d.ts +23 -0
  216. package/types/async.d.ts.map +1 -0
  217. package/types/async.js +44 -0
  218. package/types/async.js.map +1 -0
  219. package/.devcontainer/README.md +0 -35
  220. package/docs/sdks/greensecurity/README.md +0 -14
  221. package/docs/sdks/organizations/README.md +0 -252
  222. package/docs/sdks/user/README.md +0 -348
  223. package/docs/sdks/vendors/README.md +0 -219
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GACf;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GACD;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEN,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,OAAO,CAAC,CAAC,CAAC;;IAI9C,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB;gBAEjC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAQnD,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,EACjC,WAAW,CAAC,EACR,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAChD,IAAI,GACJ,SAAS,EACb,UAAU,CAAC,EACP,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GACnD,IAAI,GACJ,SAAS,GACZ,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAO/B,KAAK,CAAC,OAAO,GAAG,KAAK,EACnB,UAAU,CAAC,EACP,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GACjD,IAAI,GACJ,SAAS,GACZ,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC;IAIvB,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhE,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;CAGlC"}
package/types/async.js ADDED
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
6
+ if (kind === "m") throw new TypeError("Private method is not writable");
7
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
9
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10
+ };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _APIPromise_promise, _APIPromise_unwrapped, _a;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.APIPromise = void 0;
19
+ class APIPromise {
20
+ constructor(p) {
21
+ _APIPromise_promise.set(this, void 0);
22
+ _APIPromise_unwrapped.set(this, void 0);
23
+ this[_a] = "APIPromise";
24
+ __classPrivateFieldSet(this, _APIPromise_promise, p instanceof Promise ? p : Promise.resolve(p), "f");
25
+ __classPrivateFieldSet(this, _APIPromise_unwrapped, p instanceof Promise
26
+ ? __classPrivateFieldGet(this, _APIPromise_promise, "f").then(([value]) => value)
27
+ : Promise.resolve(p[0]), "f");
28
+ }
29
+ then(onfulfilled, onrejected) {
30
+ return __classPrivateFieldGet(this, _APIPromise_promise, "f").then(onfulfilled ? ([value]) => onfulfilled(value) : void 0, onrejected);
31
+ }
32
+ catch(onrejected) {
33
+ return __classPrivateFieldGet(this, _APIPromise_unwrapped, "f").catch(onrejected);
34
+ }
35
+ finally(onfinally) {
36
+ return __classPrivateFieldGet(this, _APIPromise_unwrapped, "f").finally(onfinally);
37
+ }
38
+ $inspect() {
39
+ return __classPrivateFieldGet(this, _APIPromise_promise, "f");
40
+ }
41
+ }
42
+ exports.APIPromise = APIPromise;
43
+ _APIPromise_promise = new WeakMap(), _APIPromise_unwrapped = new WeakMap(), _a = Symbol.toStringTag;
44
+ //# sourceMappingURL=async.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async.js","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;AAmBH,MAAa,UAAU;IAMrB,YAAY,CAAuC;QAL1C,sCAAgC;QAChC,wCAAuB;QAEvB,QAAoB,GAAG,YAAY,CAAC;QAG3C,uBAAA,IAAI,uBAAY,CAAC,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,MAAA,CAAC;QAC9D,uBAAA,IAAI,yBACF,CAAC,YAAY,OAAO;YAClB,CAAC,CAAC,uBAAA,IAAI,2BAAS,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC;YACxC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAA,CAAC;IAC9B,CAAC;IAED,IAAI,CACF,WAGa,EACb,UAGa;QAEb,OAAO,uBAAA,IAAI,2BAAS,CAAC,IAAI,CACvB,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EACtD,UAAU,CACX,CAAC;IACJ,CAAC;IAED,KAAK,CACH,UAGa;QAEb,OAAO,uBAAA,IAAI,6BAAW,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,CAAC,SAA2C;QACjD,OAAO,uBAAA,IAAI,6BAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IAED,QAAQ;QACN,OAAO,uBAAA,IAAI,2BAAS,CAAC;IACvB,CAAC;CACF;AA9CD,gCA8CC;iFA1CW,MAAM,CAAC,WAAW"}
@@ -1,35 +0,0 @@
1
-
2
- <div align="center">
3
- <a href="https://codespaces.new/repconnex/repconnex.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
4
- </div>
5
- <br>
6
-
7
- > **Remember to shutdown a GitHub Codespace when it is not in use!**
8
-
9
- # Dev Containers Quick Start
10
-
11
- The default location for usage snippets is the `samples` directory.
12
-
13
- ## Running a Usage Sample
14
-
15
- A sample usage example has been provided in a `root.ts` file. As you work with the SDK, it's expected that you will modify these samples to fit your needs. To execute this particular snippet, use the command below.
16
-
17
- ```
18
- ts-node root.ts
19
- ```
20
-
21
- ## Generating Additional Usage Samples
22
-
23
- The speakeasy CLI allows you to generate more usage snippets. Here's how:
24
-
25
- - To generate a sample for a specific operation by providing an operation ID, use:
26
-
27
- ```
28
- speakeasy generate usage -s https://example.com/OVERWRITE_WHEN_SAMPLE_SPEC_IS_WRITTEN -l typescript -i {INPUT_OPERATION_ID} -o ./samples
29
- ```
30
-
31
- - To generate samples for an entire namespace (like a tag or group name), use:
32
-
33
- ```
34
- speakeasy generate usage -s https://example.com/OVERWRITE_WHEN_SAMPLE_SPEC_IS_WRITTEN -l typescript -n {INPUT_TAG_NAME} -o ./samples
35
- ```
@@ -1,14 +0,0 @@
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
@@ -1,252 +0,0 @@
1
- # Organizations
2
- (*organizations*)
3
-
4
- ## Overview
5
-
6
- Organizations includes `Hospital Systems` and their component parts (such as `Facilities`, `Zones` and `Departments`)
7
-
8
- ### Available Operations
9
-
10
- * [listOrSearchFacilities](#listorsearchfacilities) - List or search facilities
11
- * [getFacility](#getfacility) - Get facility
12
-
13
- ## listOrSearchFacilities
14
-
15
- List or search facilities.
16
-
17
- Available `expand` scopes are:
18
-
19
- - facility.appointment_policy
20
- - facility.contacts
21
- - facility.vendor_counts
22
- - facility.flu_credential
23
- - facility.scrubs_policy
24
- - facility.system
25
- - facility.vendor_guest_policy
26
- - facility.vendor_policy
27
- - facility.visitor_policy
28
- - facility.workflow
29
-
30
- ### Example Usage
31
-
32
- ```typescript
33
- import { GreenSecurity } from "@greensecurity/javascript-sdk";
34
-
35
- const greenSecurity = new GreenSecurity({
36
- security: {
37
- token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
38
- },
39
- });
40
-
41
- async function run() {
42
- const result = await greenSecurity.organizations.listOrSearchFacilities({
43
- sort: "job",
44
- desc: true,
45
- itemsPerPage: 25,
46
- expand: [
47
- "facility.system",
48
- ],
49
- });
50
-
51
- // Handle the result
52
- console.log(result);
53
- }
54
-
55
- run();
56
- ```
57
-
58
- ### Standalone function
59
-
60
- The standalone function version of this method:
61
-
62
- ```typescript
63
- import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
64
- import { organizationsListOrSearchFacilities } from "@greensecurity/javascript-sdk/funcs/organizationsListOrSearchFacilities.js";
65
-
66
- // Use `GreenSecurityCore` for best tree-shaking performance.
67
- // You can create one instance of it to use across an application.
68
- const greenSecurity = new GreenSecurityCore({
69
- security: {
70
- token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
71
- },
72
- });
73
-
74
- async function run() {
75
- const res = await organizationsListOrSearchFacilities(greenSecurity, {
76
- sort: "job",
77
- desc: true,
78
- itemsPerPage: 25,
79
- expand: [
80
- "facility.system",
81
- ],
82
- });
83
-
84
- if (!res.ok) {
85
- throw res.error;
86
- }
87
-
88
- const { value: result } = res;
89
-
90
- // Handle the result
91
- console.log(result);
92
- }
93
-
94
- run();
95
- ```
96
-
97
- ### React hooks and utilities
98
-
99
- This method can be used in React components through the following hooks and
100
- associated utilities.
101
-
102
- > Check out [this guide][hook-guide] for information about each of the utilities
103
- > below and how to get started using React hooks.
104
-
105
- [hook-guide]: ../../../REACT_QUERY.md
106
-
107
- ```tsx
108
- import {
109
- // Query hooks for fetching data.
110
- useOrganizationsListOrSearchFacilities,
111
- useOrganizationsListOrSearchFacilitiesSuspense,
112
-
113
- // Utility for prefetching data during server-side rendering and in React
114
- // Server Components that will be immediately available to client components
115
- // using the hooks.
116
- prefetchOrganizationsListOrSearchFacilities,
117
-
118
- // Utilities to invalidate the query cache for this query in response to
119
- // mutations and other user actions.
120
- invalidateOrganizationsListOrSearchFacilities,
121
- invalidateAllOrganizationsListOrSearchFacilities,
122
- } from "@greensecurity/javascript-sdk/react-query/organizationsListOrSearchFacilities.js";
123
- ```
124
-
125
- ### Parameters
126
-
127
- | Parameter | Type | Required | Description |
128
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
129
- | `request` | [operations.ListOrSearchFacilitiesRequest](../../models/operations/listorsearchfacilitiesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
130
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
131
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
132
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
133
-
134
- ### Response
135
-
136
- **Promise\<[operations.ListOrSearchFacilitiesResponseBody](../../models/operations/listorsearchfacilitiesresponsebody.md)\>**
137
-
138
- ### Errors
139
-
140
- | Error Type | Status Code | Content Type |
141
- | --------------- | --------------- | --------------- |
142
- | errors.APIError | 4XX, 5XX | \*/\* |
143
-
144
- ## getFacility
145
-
146
- Retrieve an individual facility.
147
-
148
- ### Example Usage
149
-
150
- ```typescript
151
- import { GreenSecurity } from "@greensecurity/javascript-sdk";
152
-
153
- const greenSecurity = new GreenSecurity({
154
- security: {
155
- token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
156
- },
157
- });
158
-
159
- async function run() {
160
- const result = await greenSecurity.organizations.getFacility({
161
- id: 924512,
162
- });
163
-
164
- // Handle the result
165
- console.log(result);
166
- }
167
-
168
- run();
169
- ```
170
-
171
- ### Standalone function
172
-
173
- The standalone function version of this method:
174
-
175
- ```typescript
176
- import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
177
- import { organizationsGetFacility } from "@greensecurity/javascript-sdk/funcs/organizationsGetFacility.js";
178
-
179
- // Use `GreenSecurityCore` for best tree-shaking performance.
180
- // You can create one instance of it to use across an application.
181
- const greenSecurity = new GreenSecurityCore({
182
- security: {
183
- token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
184
- },
185
- });
186
-
187
- async function run() {
188
- const res = await organizationsGetFacility(greenSecurity, {
189
- id: 924512,
190
- });
191
-
192
- if (!res.ok) {
193
- throw res.error;
194
- }
195
-
196
- const { value: result } = res;
197
-
198
- // Handle the result
199
- console.log(result);
200
- }
201
-
202
- run();
203
- ```
204
-
205
- ### React hooks and utilities
206
-
207
- This method can be used in React components through the following hooks and
208
- associated utilities.
209
-
210
- > Check out [this guide][hook-guide] for information about each of the utilities
211
- > below and how to get started using React hooks.
212
-
213
- [hook-guide]: ../../../REACT_QUERY.md
214
-
215
- ```tsx
216
- import {
217
- // Query hooks for fetching data.
218
- useOrganizationsGetFacility,
219
- useOrganizationsGetFacilitySuspense,
220
-
221
- // Utility for prefetching data during server-side rendering and in React
222
- // Server Components that will be immediately available to client components
223
- // using the hooks.
224
- prefetchOrganizationsGetFacility,
225
-
226
- // Utilities to invalidate the query cache for this query in response to
227
- // mutations and other user actions.
228
- invalidateOrganizationsGetFacility,
229
- invalidateAllOrganizationsGetFacility,
230
- } from "@greensecurity/javascript-sdk/react-query/organizationsGetFacility.js";
231
- ```
232
-
233
- ### Parameters
234
-
235
- | Parameter | Type | Required | Description |
236
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
237
- | `request` | [operations.GetFacilityRequest](../../models/operations/getfacilityrequest.md) | :heavy_check_mark: | The request object to use for the request. |
238
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
239
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
240
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
241
-
242
- ### Response
243
-
244
- **Promise\<[components.Facility](../../models/components/facility.md)\>**
245
-
246
- ### Errors
247
-
248
- | Error Type | Status Code | Content Type |
249
- | ----------------------- | ----------------------- | ----------------------- |
250
- | errors.ApiErrorResponse | 401, 403, 404 | application/json |
251
- | errors.ApiErrorResponse | 500 | application/json |
252
- | errors.APIError | 4XX, 5XX | \*/\* |