@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.
- package/.devcontainer/README.md +35 -0
- package/.devcontainer/devcontainer.json +45 -0
- package/FUNCTIONS.md +109 -0
- package/REACT_QUERY.md +318 -0
- package/README.md +561 -0
- package/RUNTIMES.md +48 -0
- package/core.d.ts +10 -0
- package/core.d.ts.map +1 -0
- package/core.js +17 -0
- package/core.js.map +1 -0
- package/docs/sdks/greensecurity/README.md +14 -0
- package/docs/sdks/organizations/README.md +252 -0
- package/docs/sdks/user/README.md +348 -0
- package/docs/sdks/vendors/README.md +219 -0
- package/funcs/organizationsGetFacility.d.ts +17 -0
- package/funcs/organizationsGetFacility.d.ts.map +1 -0
- package/funcs/organizationsGetFacility.js +117 -0
- package/funcs/organizationsGetFacility.js.map +1 -0
- package/funcs/organizationsListOrSearchFacilities.d.ts +28 -0
- package/funcs/organizationsListOrSearchFacilities.d.ts.map +1 -0
- package/funcs/organizationsListOrSearchFacilities.js +131 -0
- package/funcs/organizationsListOrSearchFacilities.js.map +1 -0
- package/funcs/userGetCurrentUser.d.ts +16 -0
- package/funcs/userGetCurrentUser.d.ts.map +1 -0
- package/funcs/userGetCurrentUser.js +101 -0
- package/funcs/userGetCurrentUser.js.map +1 -0
- package/funcs/userGetUserById.d.ts +17 -0
- package/funcs/userGetUserById.d.ts.map +1 -0
- package/funcs/userGetUserById.js +117 -0
- package/funcs/userGetUserById.js.map +1 -0
- package/funcs/userLogsUserIntoTheSystem.d.ts +46 -0
- package/funcs/userLogsUserIntoTheSystem.d.ts.map +1 -0
- package/funcs/userLogsUserIntoTheSystem.js +137 -0
- package/funcs/userLogsUserIntoTheSystem.js.map +1 -0
- package/funcs/vendorsCreateVendorRegistration.d.ts +16 -0
- package/funcs/vendorsCreateVendorRegistration.d.ts.map +1 -0
- package/funcs/vendorsCreateVendorRegistration.js +107 -0
- package/funcs/vendorsCreateVendorRegistration.js.map +1 -0
- package/funcs/vendorsListVendorJobTitles.d.ts +16 -0
- package/funcs/vendorsListVendorJobTitles.d.ts.map +1 -0
- package/funcs/vendorsListVendorJobTitles.js +114 -0
- package/funcs/vendorsListVendorJobTitles.js.map +1 -0
- package/hooks/hooks.d.ts +24 -0
- package/hooks/hooks.d.ts.map +1 -0
- package/hooks/hooks.js +86 -0
- package/hooks/hooks.js.map +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/index.d.ts.map +1 -0
- package/hooks/index.js +22 -0
- package/hooks/index.js.map +1 -0
- package/hooks/registration.d.ts +3 -0
- package/hooks/registration.d.ts.map +1 -0
- package/hooks/registration.js +15 -0
- package/hooks/registration.js.map +1 -0
- package/hooks/types.d.ts +78 -0
- package/hooks/types.d.ts.map +1 -0
- package/hooks/types.js +6 -0
- package/hooks/types.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -0
- package/index.js +46 -0
- package/index.js.map +1 -0
- package/jsr.json +27 -0
- package/lib/base64.d.ts +10 -0
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +71 -0
- package/lib/base64.js.map +1 -0
- package/lib/config.d.ts +38 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +46 -0
- package/lib/config.js.map +1 -0
- package/lib/dlv.d.ts +14 -0
- package/lib/dlv.d.ts.map +1 -0
- package/lib/dlv.js +49 -0
- package/lib/dlv.js.map +1 -0
- package/lib/encodings.d.ts +52 -0
- package/lib/encodings.d.ts.map +1 -0
- package/lib/encodings.js +368 -0
- package/lib/encodings.js.map +1 -0
- package/lib/env.d.ts +16 -0
- package/lib/env.d.ts.map +1 -0
- package/lib/env.js +66 -0
- package/lib/env.js.map +1 -0
- package/lib/files.d.ts +8 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +36 -0
- package/lib/files.js.map +1 -0
- package/lib/http.d.ts +67 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +217 -0
- package/lib/http.js.map +1 -0
- package/lib/is-plain-object.d.ts +2 -0
- package/lib/is-plain-object.d.ts.map +1 -0
- package/lib/is-plain-object.js +41 -0
- package/lib/is-plain-object.js.map +1 -0
- package/lib/logger.d.ts +6 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +6 -0
- package/lib/logger.js.map +1 -0
- package/lib/matchers.d.ts +64 -0
- package/lib/matchers.d.ts.map +1 -0
- package/lib/matchers.js +204 -0
- package/lib/matchers.js.map +1 -0
- package/lib/primitives.d.ts +23 -0
- package/lib/primitives.d.ts.map +1 -0
- package/lib/primitives.js +104 -0
- package/lib/primitives.js.map +1 -0
- package/lib/retries.d.ts +38 -0
- package/lib/retries.d.ts.map +1 -0
- package/lib/retries.js +153 -0
- package/lib/retries.js.map +1 -0
- package/lib/schemas.d.ts +19 -0
- package/lib/schemas.d.ts.map +1 -0
- package/lib/schemas.js +62 -0
- package/lib/schemas.js.map +1 -0
- package/lib/sdks.d.ts +60 -0
- package/lib/sdks.d.ts.map +1 -0
- package/lib/sdks.js +280 -0
- package/lib/sdks.js.map +1 -0
- package/lib/security.d.ts +82 -0
- package/lib/security.d.ts.map +1 -0
- package/lib/security.js +145 -0
- package/lib/security.js.map +1 -0
- package/lib/url.d.ts +5 -0
- package/lib/url.d.ts.map +1 -0
- package/lib/url.js +25 -0
- package/lib/url.js.map +1 -0
- package/models/components/contact.d.ts +135 -0
- package/models/components/contact.d.ts.map +1 -0
- package/models/components/contact.js +172 -0
- package/models/components/contact.js.map +1 -0
- package/models/components/departmentsummary.d.ts +34 -0
- package/models/components/departmentsummary.d.ts.map +1 -0
- package/models/components/departmentsummary.js +71 -0
- package/models/components/departmentsummary.js.map +1 -0
- package/models/components/desc.d.ts +25 -0
- package/models/components/desc.d.ts.map +1 -0
- package/models/components/desc.js +66 -0
- package/models/components/desc.js.map +1 -0
- package/models/components/expand.d.ts +79 -0
- package/models/components/expand.d.ts.map +1 -0
- package/models/components/expand.js +79 -0
- package/models/components/expand.js.map +1 -0
- package/models/components/facility.d.ts +544 -0
- package/models/components/facility.d.ts.map +1 -0
- package/models/components/facility.js +797 -0
- package/models/components/facility.js.map +1 -0
- package/models/components/facilitysummary.d.ts +34 -0
- package/models/components/facilitysummary.d.ts.map +1 -0
- package/models/components/facilitysummary.js +71 -0
- package/models/components/facilitysummary.js.map +1 -0
- package/models/components/imageset.d.ts +38 -0
- package/models/components/imageset.d.ts.map +1 -0
- package/models/components/imageset.js +75 -0
- package/models/components/imageset.js.map +1 -0
- package/models/components/index.d.ts +20 -0
- package/models/components/index.d.ts.map +1 -0
- package/models/components/index.js +39 -0
- package/models/components/index.js.map +1 -0
- package/models/components/loginemailandpassword.d.ts +45 -0
- package/models/components/loginemailandpassword.d.ts.map +1 -0
- package/models/components/loginemailandpassword.js +82 -0
- package/models/components/loginemailandpassword.js.map +1 -0
- package/models/components/loginrequirementsfromemail.d.ts +40 -0
- package/models/components/loginrequirementsfromemail.d.ts.map +1 -0
- package/models/components/loginrequirementsfromemail.js +80 -0
- package/models/components/loginrequirementsfromemail.js.map +1 -0
- package/models/components/mfarequiredresponse.d.ts +98 -0
- package/models/components/mfarequiredresponse.d.ts.map +1 -0
- package/models/components/mfarequiredresponse.js +126 -0
- package/models/components/mfarequiredresponse.js.map +1 -0
- package/models/components/pager.d.ts +69 -0
- package/models/components/pager.d.ts.map +1 -0
- package/models/components/pager.js +97 -0
- package/models/components/pager.js.map +1 -0
- package/models/components/passwordrequiredresponse.d.ts +62 -0
- package/models/components/passwordrequiredresponse.d.ts.map +1 -0
- package/models/components/passwordrequiredresponse.js +92 -0
- package/models/components/passwordrequiredresponse.js.map +1 -0
- package/models/components/samlloginrequiredresponse.d.ts +73 -0
- package/models/components/samlloginrequiredresponse.d.ts.map +1 -0
- package/models/components/samlloginrequiredresponse.js +106 -0
- package/models/components/samlloginrequiredresponse.js.map +1 -0
- package/models/components/security.d.ts +31 -0
- package/models/components/security.d.ts.map +1 -0
- package/models/components/security.js +80 -0
- package/models/components/security.js.map +1 -0
- package/models/components/status.d.ts +37 -0
- package/models/components/status.d.ts.map +1 -0
- package/models/components/status.js +65 -0
- package/models/components/status.js.map +1 -0
- package/models/components/systemsummary.d.ts +34 -0
- package/models/components/systemsummary.d.ts.map +1 -0
- package/models/components/systemsummary.js +71 -0
- package/models/components/systemsummary.js.map +1 -0
- package/models/components/user.d.ts +265 -0
- package/models/components/user.d.ts.map +1 -0
- package/models/components/user.js +284 -0
- package/models/components/user.js.map +1 -0
- package/models/components/vendorjobtitle.d.ts +41 -0
- package/models/components/vendorjobtitle.d.ts.map +1 -0
- package/models/components/vendorjobtitle.js +71 -0
- package/models/components/vendorjobtitle.js.map +1 -0
- package/models/components/vendortype.d.ts +69 -0
- package/models/components/vendortype.d.ts.map +1 -0
- package/models/components/vendortype.js +135 -0
- package/models/components/vendortype.js.map +1 -0
- package/models/errors/apierror.d.ts +8 -0
- package/models/errors/apierror.d.ts.map +1 -0
- package/models/errors/apierror.js +21 -0
- package/models/errors/apierror.js.map +1 -0
- package/models/errors/apierrorresponse.d.ts +51 -0
- package/models/errors/apierrorresponse.d.ts.map +1 -0
- package/models/errors/apierrorresponse.js +91 -0
- package/models/errors/apierrorresponse.js.map +1 -0
- package/models/errors/httpclienterrors.d.ts +44 -0
- package/models/errors/httpclienterrors.d.ts.map +1 -0
- package/models/errors/httpclienterrors.js +78 -0
- package/models/errors/httpclienterrors.js.map +1 -0
- package/models/errors/index.d.ts +5 -0
- package/models/errors/index.d.ts.map +1 -0
- package/models/errors/index.js +24 -0
- package/models/errors/index.js.map +1 -0
- package/models/errors/sdkvalidationerror.d.ts +20 -0
- package/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/models/errors/sdkvalidationerror.js +115 -0
- package/models/errors/sdkvalidationerror.js.map +1 -0
- package/models/operations/createvendorregistration.d.ts +115 -0
- package/models/operations/createvendorregistration.d.ts.map +1 -0
- package/models/operations/createvendorregistration.js +143 -0
- package/models/operations/createvendorregistration.js.map +1 -0
- package/models/operations/getfacility.d.ts +32 -0
- package/models/operations/getfacility.d.ts.map +1 -0
- package/models/operations/getfacility.js +69 -0
- package/models/operations/getfacility.js.map +1 -0
- package/models/operations/getuserbyid.d.ts +32 -0
- package/models/operations/getuserbyid.d.ts.map +1 -0
- package/models/operations/getuserbyid.js +69 -0
- package/models/operations/getuserbyid.js.map +1 -0
- package/models/operations/index.d.ts +7 -0
- package/models/operations/index.d.ts.map +1 -0
- package/models/operations/index.js +26 -0
- package/models/operations/index.js.map +1 -0
- package/models/operations/listorsearchfacilities.d.ts +110 -0
- package/models/operations/listorsearchfacilities.d.ts.map +1 -0
- package/models/operations/listorsearchfacilities.js +130 -0
- package/models/operations/listorsearchfacilities.js.map +1 -0
- package/models/operations/listvendorjobtitles.d.ts +86 -0
- package/models/operations/listvendorjobtitles.d.ts.map +1 -0
- package/models/operations/listvendorjobtitles.js +118 -0
- package/models/operations/listvendorjobtitles.js.map +1 -0
- package/models/operations/logsuserintothesystem.d.ts +98 -0
- package/models/operations/logsuserintothesystem.d.ts.map +1 -0
- package/models/operations/logsuserintothesystem.js +164 -0
- package/models/operations/logsuserintothesystem.js.map +1 -0
- package/package.json +41 -0
- package/react-query/_context.d.ts +8 -0
- package/react-query/_context.d.ts.map +1 -0
- package/react-query/_context.js +21 -0
- package/react-query/_context.js.map +1 -0
- package/react-query/_types.d.ts +14 -0
- package/react-query/_types.d.ts.map +1 -0
- package/react-query/_types.js +6 -0
- package/react-query/_types.js.map +1 -0
- package/react-query/index.d.ts +10 -0
- package/react-query/index.d.ts.map +1 -0
- package/react-query/index.js +32 -0
- package/react-query/index.js.map +1 -0
- package/react-query/organizationsGetFacility.d.ts +31 -0
- package/react-query/organizationsGetFacility.d.ts.map +1 -0
- package/react-query/organizationsGetFacility.js +87 -0
- package/react-query/organizationsGetFacility.js.map +1 -0
- package/react-query/organizationsListOrSearchFacilities.d.ts +91 -0
- package/react-query/organizationsListOrSearchFacilities.d.ts.map +1 -0
- package/react-query/organizationsListOrSearchFacilities.js +132 -0
- package/react-query/organizationsListOrSearchFacilities.js.map +1 -0
- package/react-query/userGetCurrentUser.d.ts +29 -0
- package/react-query/userGetCurrentUser.d.ts.map +1 -0
- package/react-query/userGetCurrentUser.js +75 -0
- package/react-query/userGetCurrentUser.js.map +1 -0
- package/react-query/userGetUserById.d.ts +31 -0
- package/react-query/userGetUserById.d.ts.map +1 -0
- package/react-query/userGetUserById.js +87 -0
- package/react-query/userGetUserById.js.map +1 -0
- package/react-query/userLogsUserIntoTheSystem.d.ts +53 -0
- package/react-query/userLogsUserIntoTheSystem.d.ts.map +1 -0
- package/react-query/userLogsUserIntoTheSystem.js +77 -0
- package/react-query/userLogsUserIntoTheSystem.js.map +1 -0
- package/react-query/vendorsCreateVendorRegistration.d.ts +23 -0
- package/react-query/vendorsCreateVendorRegistration.d.ts.map +1 -0
- package/react-query/vendorsCreateVendorRegistration.js +51 -0
- package/react-query/vendorsCreateVendorRegistration.js.map +1 -0
- package/react-query/vendorsListVendorJobTitles.d.ts +53 -0
- package/react-query/vendorsListVendorJobTitles.d.ts.map +1 -0
- package/react-query/vendorsListVendorJobTitles.js +102 -0
- package/react-query/vendorsListVendorJobTitles.js.map +1 -0
- package/sdk/index.d.ts +2 -0
- package/sdk/index.d.ts.map +1 -0
- package/sdk/index.js +21 -0
- package/sdk/index.js.map +1 -0
- package/sdk/organizations.d.ts +33 -0
- package/sdk/organizations.d.ts.map +1 -0
- package/sdk/organizations.js +45 -0
- package/sdk/organizations.js.map +1 -0
- package/sdk/sdk.d.ts +13 -0
- package/sdk/sdk.d.ts.map +1 -0
- package/sdk/sdk.js +23 -0
- package/sdk/sdk.js.map +1 -0
- package/sdk/user.d.ts +57 -0
- package/sdk/user.d.ts.map +1 -0
- package/sdk/user.js +72 -0
- package/sdk/user.js.map +1 -0
- package/sdk/vendors.d.ts +19 -0
- package/sdk/vendors.d.ts.map +1 -0
- package/sdk/vendors.js +32 -0
- package/sdk/vendors.js.map +1 -0
- package/src/core.ts +13 -0
- package/src/funcs/organizationsGetFacility.ts +144 -0
- package/src/funcs/organizationsListOrSearchFacilities.ts +152 -0
- package/src/funcs/userGetCurrentUser.ts +118 -0
- package/src/funcs/userGetUserById.ts +141 -0
- package/src/funcs/userLogsUserIntoTheSystem.ts +161 -0
- package/src/funcs/vendorsCreateVendorRegistration.ts +132 -0
- package/src/funcs/vendorsListVendorJobTitles.ts +141 -0
- package/src/hooks/hooks.ts +132 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/registration.ts +14 -0
- package/src/hooks/types.ts +110 -0
- package/src/index.ts +7 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +76 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +483 -0
- package/src/lib/env.ts +43 -0
- package/src/lib/files.ts +40 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +322 -0
- package/src/lib/primitives.ts +136 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +91 -0
- package/src/lib/sdks.ts +400 -0
- package/src/lib/security.ts +260 -0
- package/src/lib/url.ts +33 -0
- package/src/models/components/contact.ts +268 -0
- package/src/models/components/departmentsummary.ts +73 -0
- package/src/models/components/desc.ts +48 -0
- package/src/models/components/expand.ts +52 -0
- package/src/models/components/facility.ts +1334 -0
- package/src/models/components/facilitysummary.ts +71 -0
- package/src/models/components/imageset.ts +77 -0
- package/src/models/components/index.ts +23 -0
- package/src/models/components/loginemailandpassword.ts +95 -0
- package/src/models/components/loginrequirementsfromemail.ts +88 -0
- package/src/models/components/mfarequiredresponse.ts +160 -0
- package/src/models/components/pager.ts +126 -0
- package/src/models/components/passwordrequiredresponse.ts +105 -0
- package/src/models/components/samlloginrequiredresponse.ts +136 -0
- package/src/models/components/security.ts +75 -0
- package/src/models/components/status.ts +38 -0
- package/src/models/components/systemsummary.ts +69 -0
- package/src/models/components/user.ts +451 -0
- package/src/models/components/vendorjobtitle.ts +76 -0
- package/src/models/components/vendortype.ts +170 -0
- package/src/models/errors/apierror.ts +27 -0
- package/src/models/errors/apierrorresponse.ts +95 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/index.ts +8 -0
- package/src/models/errors/sdkvalidationerror.ts +97 -0
- package/src/models/operations/createvendorregistration.ts +237 -0
- package/src/models/operations/getfacility.ts +69 -0
- package/src/models/operations/getuserbyid.ts +69 -0
- package/src/models/operations/index.ts +10 -0
- package/src/models/operations/listorsearchfacilities.ts +219 -0
- package/src/models/operations/listvendorjobtitles.ts +179 -0
- package/src/models/operations/logsuserintothesystem.ts +270 -0
- package/src/react-query/_types.ts +91 -0
- package/src/react-query/index.ts +14 -0
- package/src/react-query/organizationsGetFacility.ts +154 -0
- package/src/react-query/organizationsListOrSearchFacilities.ts +241 -0
- package/src/react-query/userGetCurrentUser.ts +124 -0
- package/src/react-query/userGetUserById.ts +152 -0
- package/src/react-query/userLogsUserIntoTheSystem.ts +119 -0
- package/src/react-query/vendorsCreateVendorRegistration.ts +93 -0
- package/src/react-query/vendorsListVendorJobTitles.ts +194 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/organizations.ts +59 -0
- package/src/sdk/sdk.ts +25 -0
- package/src/sdk/user.ts +92 -0
- package/src/sdk/vendors.ts +45 -0
- package/src/types/blobs.ts +31 -0
- package/src/types/constdatetime.ts +15 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +11 -0
- package/src/types/operations.ts +105 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/streams.ts +21 -0
- package/tsconfig.json +41 -0
- package/types/blobs.d.ts +4 -0
- package/types/blobs.d.ts.map +1 -0
- package/types/blobs.js +62 -0
- package/types/blobs.js.map +1 -0
- package/types/constdatetime.d.ts +3 -0
- package/types/constdatetime.d.ts.map +1 -0
- package/types/constdatetime.js +46 -0
- package/types/constdatetime.js.map +1 -0
- package/types/enums.d.ts +12 -0
- package/types/enums.d.ts.map +1 -0
- package/types/enums.js +10 -0
- package/types/enums.js.map +1 -0
- package/types/fp.d.ts +31 -0
- package/types/fp.d.ts.map +1 -0
- package/types/fp.js +37 -0
- package/types/fp.js.map +1 -0
- package/types/index.d.ts +8 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +16 -0
- package/types/index.js.map +1 -0
- package/types/operations.d.ts +27 -0
- package/types/operations.d.ts.map +1 -0
- package/types/operations.js +83 -0
- package/types/operations.js.map +1 -0
- package/types/rfcdate.d.ts +21 -0
- package/types/rfcdate.d.ts.map +1 -0
- package/types/rfcdate.js +46 -0
- package/types/rfcdate.js.map +1 -0
- package/types/streams.d.ts +2 -0
- package/types/streams.d.ts.map +1 -0
- package/types/streams.js +18 -0
- package/types/streams.js.map +1 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# Vendors
|
|
2
|
+
(*vendors*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
Vendors includes anyone that sells goods or services to `Organizations`. Someone is a vendor when they have a contract with a hospital (or looking to establish one).
|
|
7
|
+
|
|
8
|
+
### Available Operations
|
|
9
|
+
|
|
10
|
+
* [createVendorRegistration](#createvendorregistration) - Create vendor registration
|
|
11
|
+
* [listVendorJobTitles](#listvendorjobtitles) - List vendor job titles
|
|
12
|
+
|
|
13
|
+
## createVendorRegistration
|
|
14
|
+
|
|
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
|
+
### Example Usage
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { GreenSecurity } from "@greensecurity/javascript-sdk";
|
|
21
|
+
|
|
22
|
+
const greenSecurity = new GreenSecurity();
|
|
23
|
+
|
|
24
|
+
async function run() {
|
|
25
|
+
const result = await greenSecurity.vendors.createVendorRegistration({
|
|
26
|
+
email: "user@example.com",
|
|
27
|
+
password: "Abcdef123!",
|
|
28
|
+
timezone: "America/Chicago",
|
|
29
|
+
affiliateId: 123,
|
|
30
|
+
vendorGroupId: 123,
|
|
31
|
+
managingCompanyId: 123,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Handle the result
|
|
35
|
+
console.log(result);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
run();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Standalone function
|
|
42
|
+
|
|
43
|
+
The standalone function version of this method:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
|
|
47
|
+
import { vendorsCreateVendorRegistration } from "@greensecurity/javascript-sdk/funcs/vendorsCreateVendorRegistration.js";
|
|
48
|
+
|
|
49
|
+
// Use `GreenSecurityCore` for best tree-shaking performance.
|
|
50
|
+
// You can create one instance of it to use across an application.
|
|
51
|
+
const greenSecurity = new GreenSecurityCore();
|
|
52
|
+
|
|
53
|
+
async function run() {
|
|
54
|
+
const res = await vendorsCreateVendorRegistration(greenSecurity, {
|
|
55
|
+
email: "user@example.com",
|
|
56
|
+
password: "Abcdef123!",
|
|
57
|
+
timezone: "America/Chicago",
|
|
58
|
+
affiliateId: 123,
|
|
59
|
+
vendorGroupId: 123,
|
|
60
|
+
managingCompanyId: 123,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
if (!res.ok) {
|
|
64
|
+
throw res.error;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const { value: result } = res;
|
|
68
|
+
|
|
69
|
+
// Handle the result
|
|
70
|
+
console.log(result);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
run();
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### React hooks and utilities
|
|
77
|
+
|
|
78
|
+
This method can be used in React components through the following hooks and
|
|
79
|
+
associated utilities.
|
|
80
|
+
|
|
81
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
82
|
+
> below and how to get started using React hooks.
|
|
83
|
+
|
|
84
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
85
|
+
|
|
86
|
+
```tsx
|
|
87
|
+
import {
|
|
88
|
+
// Mutation hook for triggering the API call.
|
|
89
|
+
useVendorsCreateVendorRegistrationMutation
|
|
90
|
+
} from "@greensecurity/javascript-sdk/react-query/vendorsCreateVendorRegistration.js";
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Parameters
|
|
94
|
+
|
|
95
|
+
| Parameter | Type | Required | Description |
|
|
96
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
97
|
+
| `request` | [operations.CreateVendorRegistrationRequestBody](../../models/operations/createvendorregistrationrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
98
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
99
|
+
| `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. |
|
|
100
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
101
|
+
|
|
102
|
+
### Response
|
|
103
|
+
|
|
104
|
+
**Promise\<[operations.CreateVendorRegistrationResponseBody](../../models/operations/createvendorregistrationresponsebody.md)\>**
|
|
105
|
+
|
|
106
|
+
### Errors
|
|
107
|
+
|
|
108
|
+
| Error Type | Status Code | Content Type |
|
|
109
|
+
| ----------------------- | ----------------------- | ----------------------- |
|
|
110
|
+
| errors.ApiErrorResponse | 400, 401, 403, 409 | application/json |
|
|
111
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
112
|
+
|
|
113
|
+
## listVendorJobTitles
|
|
114
|
+
|
|
115
|
+
List valid job titles for Vendors. This can be used during sign up or in a filter.
|
|
116
|
+
|
|
117
|
+
### Example Usage
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
import { GreenSecurity } from "@greensecurity/javascript-sdk";
|
|
121
|
+
|
|
122
|
+
const greenSecurity = new GreenSecurity();
|
|
123
|
+
|
|
124
|
+
async function run() {
|
|
125
|
+
const result = await greenSecurity.vendors.listVendorJobTitles({
|
|
126
|
+
sort: "job",
|
|
127
|
+
desc: true,
|
|
128
|
+
itemsPerPage: 25,
|
|
129
|
+
jobLike: "job",
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// Handle the result
|
|
133
|
+
console.log(result);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
run();
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Standalone function
|
|
140
|
+
|
|
141
|
+
The standalone function version of this method:
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
|
|
145
|
+
import { vendorsListVendorJobTitles } from "@greensecurity/javascript-sdk/funcs/vendorsListVendorJobTitles.js";
|
|
146
|
+
|
|
147
|
+
// Use `GreenSecurityCore` for best tree-shaking performance.
|
|
148
|
+
// You can create one instance of it to use across an application.
|
|
149
|
+
const greenSecurity = new GreenSecurityCore();
|
|
150
|
+
|
|
151
|
+
async function run() {
|
|
152
|
+
const res = await vendorsListVendorJobTitles(greenSecurity, {
|
|
153
|
+
sort: "job",
|
|
154
|
+
desc: true,
|
|
155
|
+
itemsPerPage: 25,
|
|
156
|
+
jobLike: "job",
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
if (!res.ok) {
|
|
160
|
+
throw res.error;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const { value: result } = res;
|
|
164
|
+
|
|
165
|
+
// Handle the result
|
|
166
|
+
console.log(result);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
run();
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### React hooks and utilities
|
|
173
|
+
|
|
174
|
+
This method can be used in React components through the following hooks and
|
|
175
|
+
associated utilities.
|
|
176
|
+
|
|
177
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
178
|
+
> below and how to get started using React hooks.
|
|
179
|
+
|
|
180
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
181
|
+
|
|
182
|
+
```tsx
|
|
183
|
+
import {
|
|
184
|
+
// Query hooks for fetching data.
|
|
185
|
+
useVendorsListVendorJobTitles,
|
|
186
|
+
useVendorsListVendorJobTitlesSuspense,
|
|
187
|
+
|
|
188
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
189
|
+
// Server Components that will be immediately available to client components
|
|
190
|
+
// using the hooks.
|
|
191
|
+
prefetchVendorsListVendorJobTitles,
|
|
192
|
+
|
|
193
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
194
|
+
// mutations and other user actions.
|
|
195
|
+
invalidateVendorsListVendorJobTitles,
|
|
196
|
+
invalidateAllVendorsListVendorJobTitles,
|
|
197
|
+
} from "@greensecurity/javascript-sdk/react-query/vendorsListVendorJobTitles.js";
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Parameters
|
|
201
|
+
|
|
202
|
+
| Parameter | Type | Required | Description |
|
|
203
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
204
|
+
| `request` | [operations.ListVendorJobTitlesRequest](../../models/operations/listvendorjobtitlesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
205
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
206
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
207
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
208
|
+
|
|
209
|
+
### Response
|
|
210
|
+
|
|
211
|
+
**Promise\<[operations.ListVendorJobTitlesResponseBody](../../models/operations/listvendorjobtitlesresponsebody.md)\>**
|
|
212
|
+
|
|
213
|
+
### Errors
|
|
214
|
+
|
|
215
|
+
| Error Type | Status Code | Content Type |
|
|
216
|
+
| ----------------------- | ----------------------- | ----------------------- |
|
|
217
|
+
| errors.ApiErrorResponse | 403 | application/json |
|
|
218
|
+
| errors.ApiErrorResponse | 500 | application/json |
|
|
219
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GreenSecurityCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import * as components from "../models/components/index.js";
|
|
4
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
5
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
6
|
+
import * as errors from "../models/errors/index.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { Result } from "../types/fp.js";
|
|
10
|
+
/**
|
|
11
|
+
* Get facility
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Retrieve an individual facility.
|
|
15
|
+
*/
|
|
16
|
+
export declare function organizationsGetFacility(client: GreenSecurityCore, request: operations.GetFacilityRequest, options?: RequestOptions): Promise<Result<components.Facility, errors.ApiErrorResponse | errors.ApiErrorResponse | APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
17
|
+
//# sourceMappingURL=organizationsGetFacility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationsGetFacility.d.ts","sourceRoot":"","sources":["../src/funcs/organizationsGetFacility.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,QAAQ,EACjB,MAAM,CAAC,gBAAgB,GACvB,MAAM,CAAC,gBAAgB,GACvB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CA8FA"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.organizationsGetFacility = organizationsGetFacility;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
43
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
+
const security_js_1 = require("../lib/security.js");
|
|
45
|
+
const url_js_1 = require("../lib/url.js");
|
|
46
|
+
const components = __importStar(require("../models/components/index.js"));
|
|
47
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
48
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
|
+
/**
|
|
50
|
+
* Get facility
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Retrieve an individual facility.
|
|
54
|
+
*/
|
|
55
|
+
async function organizationsGetFacility(client, request, options) {
|
|
56
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.GetFacilityRequest$outboundSchema.parse(value), "Input validation failed");
|
|
57
|
+
if (!parsed.ok) {
|
|
58
|
+
return parsed;
|
|
59
|
+
}
|
|
60
|
+
const payload = parsed.value;
|
|
61
|
+
const body = null;
|
|
62
|
+
const pathParams = {
|
|
63
|
+
id: (0, encodings_js_1.encodeSimple)("id", payload.id, {
|
|
64
|
+
explode: false,
|
|
65
|
+
charEncoding: "percent",
|
|
66
|
+
}),
|
|
67
|
+
};
|
|
68
|
+
const path = (0, url_js_1.pathToFunc)("/facilities/{id}")(pathParams);
|
|
69
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
70
|
+
Accept: "application/json",
|
|
71
|
+
}));
|
|
72
|
+
const securityInput = await (0, security_js_1.extractSecurity)(client._options.security);
|
|
73
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
74
|
+
const context = {
|
|
75
|
+
baseURL: options?.serverURL ?? "",
|
|
76
|
+
operationID: "getFacility",
|
|
77
|
+
oAuth2Scopes: [],
|
|
78
|
+
resolvedSecurity: requestSecurity,
|
|
79
|
+
securitySource: client._options.security,
|
|
80
|
+
retryConfig: options?.retries
|
|
81
|
+
|| client._options.retryConfig
|
|
82
|
+
|| { strategy: "none" },
|
|
83
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
84
|
+
};
|
|
85
|
+
const requestRes = client._createRequest(context, {
|
|
86
|
+
security: requestSecurity,
|
|
87
|
+
method: "GET",
|
|
88
|
+
baseURL: options?.serverURL,
|
|
89
|
+
path: path,
|
|
90
|
+
headers: headers,
|
|
91
|
+
body: body,
|
|
92
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
93
|
+
}, options);
|
|
94
|
+
if (!requestRes.ok) {
|
|
95
|
+
return requestRes;
|
|
96
|
+
}
|
|
97
|
+
const req = requestRes.value;
|
|
98
|
+
const doResult = await client._do(req, {
|
|
99
|
+
context,
|
|
100
|
+
errorCodes: ["401", "403", "404", "4XX", "500", "5XX"],
|
|
101
|
+
retryConfig: context.retryConfig,
|
|
102
|
+
retryCodes: context.retryCodes,
|
|
103
|
+
});
|
|
104
|
+
if (!doResult.ok) {
|
|
105
|
+
return doResult;
|
|
106
|
+
}
|
|
107
|
+
const response = doResult.value;
|
|
108
|
+
const responseFields = {
|
|
109
|
+
HttpMeta: { Response: response, Request: req },
|
|
110
|
+
};
|
|
111
|
+
const [result] = await M.match(M.json(200, components.Facility$inboundSchema), M.jsonErr([401, 403, 404], errors.ApiErrorResponse$inboundSchema), M.jsonErr(500, errors.ApiErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, { extraFields: responseFields });
|
|
112
|
+
if (!result.ok) {
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=organizationsGetFacility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationsGetFacility.js","sourceRoot":"","sources":["../src/funcs/organizationsGetFacility.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BH,4DA+GC;AA1ID,sDAAmD;AACnD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAEpD,0EAA4D;AAG5D;;;;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AAC,EAC9C,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,8BAA8B,CAAC,EACjE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,8BAA8B,CAAC,EACrD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GreenSecurityCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
6
|
+
import * as operations from "../models/operations/index.js";
|
|
7
|
+
import { Result } from "../types/fp.js";
|
|
8
|
+
/**
|
|
9
|
+
* List or search facilities
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* List or search facilities.
|
|
13
|
+
*
|
|
14
|
+
* Available `expand` scopes are:
|
|
15
|
+
*
|
|
16
|
+
* - facility.appointment_policy
|
|
17
|
+
* - facility.contacts
|
|
18
|
+
* - facility.vendor_counts
|
|
19
|
+
* - facility.flu_credential
|
|
20
|
+
* - facility.scrubs_policy
|
|
21
|
+
* - facility.system
|
|
22
|
+
* - facility.vendor_guest_policy
|
|
23
|
+
* - facility.vendor_policy
|
|
24
|
+
* - facility.visitor_policy
|
|
25
|
+
* - facility.workflow
|
|
26
|
+
*/
|
|
27
|
+
export declare function organizationsListOrSearchFacilities(client: GreenSecurityCore, request: operations.ListOrSearchFacilitiesRequest, options?: RequestOptions): Promise<Result<operations.ListOrSearchFacilitiesResponseBody, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
28
|
+
//# sourceMappingURL=organizationsListOrSearchFacilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationsListOrSearchFacilities.d.ts","sourceRoot":"","sources":["../src/funcs/organizationsListOrSearchFacilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,mCAAmC,CACvD,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,kCAAkC,EAC3C,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CA6FA"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.organizationsListOrSearchFacilities = organizationsListOrSearchFacilities;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
43
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
+
const security_js_1 = require("../lib/security.js");
|
|
45
|
+
const url_js_1 = require("../lib/url.js");
|
|
46
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
47
|
+
/**
|
|
48
|
+
* List or search facilities
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* List or search facilities.
|
|
52
|
+
*
|
|
53
|
+
* Available `expand` scopes are:
|
|
54
|
+
*
|
|
55
|
+
* - facility.appointment_policy
|
|
56
|
+
* - facility.contacts
|
|
57
|
+
* - facility.vendor_counts
|
|
58
|
+
* - facility.flu_credential
|
|
59
|
+
* - facility.scrubs_policy
|
|
60
|
+
* - facility.system
|
|
61
|
+
* - facility.vendor_guest_policy
|
|
62
|
+
* - facility.vendor_policy
|
|
63
|
+
* - facility.visitor_policy
|
|
64
|
+
* - facility.workflow
|
|
65
|
+
*/
|
|
66
|
+
async function organizationsListOrSearchFacilities(client, request, options) {
|
|
67
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.ListOrSearchFacilitiesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
68
|
+
if (!parsed.ok) {
|
|
69
|
+
return parsed;
|
|
70
|
+
}
|
|
71
|
+
const payload = parsed.value;
|
|
72
|
+
const body = null;
|
|
73
|
+
const path = (0, url_js_1.pathToFunc)("/facilities")();
|
|
74
|
+
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
75
|
+
"desc": payload.desc,
|
|
76
|
+
"expand": payload.expand,
|
|
77
|
+
"items_per_page": payload.items_per_page,
|
|
78
|
+
"name_like": payload.name_like,
|
|
79
|
+
"page": payload.page,
|
|
80
|
+
"sort": payload.sort,
|
|
81
|
+
"state_like": payload.state_like,
|
|
82
|
+
"status": payload.status,
|
|
83
|
+
"system_id": payload.system_id,
|
|
84
|
+
});
|
|
85
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
86
|
+
Accept: "application/json",
|
|
87
|
+
}));
|
|
88
|
+
const securityInput = await (0, security_js_1.extractSecurity)(client._options.security);
|
|
89
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
90
|
+
const context = {
|
|
91
|
+
baseURL: options?.serverURL ?? "",
|
|
92
|
+
operationID: "listOrSearchFacilities",
|
|
93
|
+
oAuth2Scopes: [],
|
|
94
|
+
resolvedSecurity: requestSecurity,
|
|
95
|
+
securitySource: client._options.security,
|
|
96
|
+
retryConfig: options?.retries
|
|
97
|
+
|| client._options.retryConfig
|
|
98
|
+
|| { strategy: "none" },
|
|
99
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
100
|
+
};
|
|
101
|
+
const requestRes = client._createRequest(context, {
|
|
102
|
+
security: requestSecurity,
|
|
103
|
+
method: "GET",
|
|
104
|
+
baseURL: options?.serverURL,
|
|
105
|
+
path: path,
|
|
106
|
+
headers: headers,
|
|
107
|
+
query: query,
|
|
108
|
+
body: body,
|
|
109
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
110
|
+
}, options);
|
|
111
|
+
if (!requestRes.ok) {
|
|
112
|
+
return requestRes;
|
|
113
|
+
}
|
|
114
|
+
const req = requestRes.value;
|
|
115
|
+
const doResult = await client._do(req, {
|
|
116
|
+
context,
|
|
117
|
+
errorCodes: ["4XX", "5XX"],
|
|
118
|
+
retryConfig: context.retryConfig,
|
|
119
|
+
retryCodes: context.retryCodes,
|
|
120
|
+
});
|
|
121
|
+
if (!doResult.ok) {
|
|
122
|
+
return doResult;
|
|
123
|
+
}
|
|
124
|
+
const response = doResult.value;
|
|
125
|
+
const [result] = await M.match(M.json(200, operations.ListOrSearchFacilitiesResponseBody$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response);
|
|
126
|
+
if (!result.ok) {
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=organizationsListOrSearchFacilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationsListOrSearchFacilities.js","sourceRoot":"","sources":["../src/funcs/organizationsListOrSearchFacilities.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCH,kFA4GC;AAlJD,sDAAsD;AACtD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAG5D;;;;;;;;;;;;;;;;;;GAkBG;AACI,KAAK,UAAU,mCAAmC,CACvD,MAAyB,EACzB,OAAiD,EACjD,OAAwB;IAaxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,4CAA4C,CAAC,KAAK,CAAC,KAAK,CAAC,EACtE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,aAAa,CAAC,EAAE,CAAC;IAEzC,MAAM,KAAK,GAAG,IAAA,8BAAe,EAAC;QAC5B,MAAM,EAAE,OAAO,CAAC,IAAI;QACpB,QAAQ,EAAE,OAAO,CAAC,MAAM;QACxB,gBAAgB,EAAE,OAAO,CAAC,cAAc;QACxC,WAAW,EAAE,OAAO,CAAC,SAAS;QAC9B,MAAM,EAAE,OAAO,CAAC,IAAI;QACpB,MAAM,EAAE,OAAO,CAAC,IAAI;QACpB,YAAY,EAAE,OAAO,CAAC,UAAU;QAChC,QAAQ,EAAE,OAAO,CAAC,MAAM;QACxB,WAAW,EAAE,OAAO,CAAC,SAAS;KAC/B,CAAC,CAAC;IAEH,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AC,GAAG,CAAC,GAAG,EAAE;QACrC,OAAO;QACP,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAU5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,gDAAgD,CAAC,EACxE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,CAAC,CAAC;IACZ,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GreenSecurityCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import * as components from "../models/components/index.js";
|
|
4
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
5
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
6
|
+
import * as errors from "../models/errors/index.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import { Result } from "../types/fp.js";
|
|
9
|
+
/**
|
|
10
|
+
* Get current user
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Returns a user object for the user represented by the authorization token
|
|
14
|
+
*/
|
|
15
|
+
export declare function userGetCurrentUser(client: GreenSecurityCore, options?: RequestOptions): Promise<Result<components.User, errors.ApiErrorResponse | APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
16
|
+
//# sourceMappingURL=userGetCurrentUser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userGetCurrentUser.d.ts","sourceRoot":"","sources":["../src/funcs/userGetCurrentUser.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,IAAI,EACb,MAAM,CAAC,gBAAgB,GACvB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAyEA"}
|