@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,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A simplified representation of a Facility, typically used in list views.
|
|
12
|
+
*/
|
|
13
|
+
export type FacilitySummary = {
|
|
14
|
+
id?: number | undefined;
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const FacilitySummary$inboundSchema: z.ZodType<
|
|
20
|
+
FacilitySummary,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
id: z.number().int().optional(),
|
|
25
|
+
name: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type FacilitySummary$Outbound = {
|
|
30
|
+
id?: number | undefined;
|
|
31
|
+
name?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const FacilitySummary$outboundSchema: z.ZodType<
|
|
36
|
+
FacilitySummary$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
FacilitySummary
|
|
39
|
+
> = z.object({
|
|
40
|
+
id: z.number().int().optional(),
|
|
41
|
+
name: z.string().optional(),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
47
|
+
*/
|
|
48
|
+
export namespace FacilitySummary$ {
|
|
49
|
+
/** @deprecated use `FacilitySummary$inboundSchema` instead. */
|
|
50
|
+
export const inboundSchema = FacilitySummary$inboundSchema;
|
|
51
|
+
/** @deprecated use `FacilitySummary$outboundSchema` instead. */
|
|
52
|
+
export const outboundSchema = FacilitySummary$outboundSchema;
|
|
53
|
+
/** @deprecated use `FacilitySummary$Outbound` instead. */
|
|
54
|
+
export type Outbound = FacilitySummary$Outbound;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function facilitySummaryToJSON(
|
|
58
|
+
facilitySummary: FacilitySummary,
|
|
59
|
+
): string {
|
|
60
|
+
return JSON.stringify(FacilitySummary$outboundSchema.parse(facilitySummary));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function facilitySummaryFromJSON(
|
|
64
|
+
jsonString: string,
|
|
65
|
+
): SafeParseResult<FacilitySummary, SDKValidationError> {
|
|
66
|
+
return safeParse(
|
|
67
|
+
jsonString,
|
|
68
|
+
(x) => FacilitySummary$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
+
`Failed to parse 'FacilitySummary' from JSON`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A set of images in different sizes
|
|
12
|
+
*/
|
|
13
|
+
export type ImageSet = {
|
|
14
|
+
tiny?: string | undefined;
|
|
15
|
+
thumb?: string | undefined;
|
|
16
|
+
large?: string | undefined;
|
|
17
|
+
original?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ImageSet$inboundSchema: z.ZodType<
|
|
22
|
+
ImageSet,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
tiny: z.string().optional(),
|
|
27
|
+
thumb: z.string().optional(),
|
|
28
|
+
large: z.string().optional(),
|
|
29
|
+
original: z.string().optional(),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type ImageSet$Outbound = {
|
|
34
|
+
tiny?: string | undefined;
|
|
35
|
+
thumb?: string | undefined;
|
|
36
|
+
large?: string | undefined;
|
|
37
|
+
original?: string | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ImageSet$outboundSchema: z.ZodType<
|
|
42
|
+
ImageSet$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
ImageSet
|
|
45
|
+
> = z.object({
|
|
46
|
+
tiny: z.string().optional(),
|
|
47
|
+
thumb: z.string().optional(),
|
|
48
|
+
large: z.string().optional(),
|
|
49
|
+
original: z.string().optional(),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export namespace ImageSet$ {
|
|
57
|
+
/** @deprecated use `ImageSet$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = ImageSet$inboundSchema;
|
|
59
|
+
/** @deprecated use `ImageSet$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = ImageSet$outboundSchema;
|
|
61
|
+
/** @deprecated use `ImageSet$Outbound` instead. */
|
|
62
|
+
export type Outbound = ImageSet$Outbound;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function imageSetToJSON(imageSet: ImageSet): string {
|
|
66
|
+
return JSON.stringify(ImageSet$outboundSchema.parse(imageSet));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function imageSetFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<ImageSet, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => ImageSet$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'ImageSet' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from "./contact.js";
|
|
6
|
+
export * from "./departmentsummary.js";
|
|
7
|
+
export * from "./desc.js";
|
|
8
|
+
export * from "./expand.js";
|
|
9
|
+
export * from "./facility.js";
|
|
10
|
+
export * from "./facilitysummary.js";
|
|
11
|
+
export * from "./imageset.js";
|
|
12
|
+
export * from "./loginemailandpassword.js";
|
|
13
|
+
export * from "./loginrequirementsfromemail.js";
|
|
14
|
+
export * from "./mfarequiredresponse.js";
|
|
15
|
+
export * from "./pager.js";
|
|
16
|
+
export * from "./passwordrequiredresponse.js";
|
|
17
|
+
export * from "./samlloginrequiredresponse.js";
|
|
18
|
+
export * from "./security.js";
|
|
19
|
+
export * from "./status.js";
|
|
20
|
+
export * from "./systemsummary.js";
|
|
21
|
+
export * from "./user.js";
|
|
22
|
+
export * from "./vendorjobtitle.js";
|
|
23
|
+
export * from "./vendortype.js";
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Login a user with Email, Password and optional MFA
|
|
13
|
+
*/
|
|
14
|
+
export type LoginEmailAndPassword = {
|
|
15
|
+
/**
|
|
16
|
+
* A valid email address
|
|
17
|
+
*/
|
|
18
|
+
email: string;
|
|
19
|
+
/**
|
|
20
|
+
* MFA Code as entered by the user. Typically a 6 digit code treated as a string.
|
|
21
|
+
*/
|
|
22
|
+
mfaCode?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Password as entered by the user
|
|
25
|
+
*/
|
|
26
|
+
password: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const LoginEmailAndPassword$inboundSchema: z.ZodType<
|
|
31
|
+
LoginEmailAndPassword,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
email: z.string(),
|
|
36
|
+
mfa_code: z.string().optional(),
|
|
37
|
+
password: z.string(),
|
|
38
|
+
}).transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"mfa_code": "mfaCode",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type LoginEmailAndPassword$Outbound = {
|
|
46
|
+
email: string;
|
|
47
|
+
mfa_code?: string | undefined;
|
|
48
|
+
password: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const LoginEmailAndPassword$outboundSchema: z.ZodType<
|
|
53
|
+
LoginEmailAndPassword$Outbound,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
LoginEmailAndPassword
|
|
56
|
+
> = z.object({
|
|
57
|
+
email: z.string(),
|
|
58
|
+
mfaCode: z.string().optional(),
|
|
59
|
+
password: z.string(),
|
|
60
|
+
}).transform((v) => {
|
|
61
|
+
return remap$(v, {
|
|
62
|
+
mfaCode: "mfa_code",
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
69
|
+
*/
|
|
70
|
+
export namespace LoginEmailAndPassword$ {
|
|
71
|
+
/** @deprecated use `LoginEmailAndPassword$inboundSchema` instead. */
|
|
72
|
+
export const inboundSchema = LoginEmailAndPassword$inboundSchema;
|
|
73
|
+
/** @deprecated use `LoginEmailAndPassword$outboundSchema` instead. */
|
|
74
|
+
export const outboundSchema = LoginEmailAndPassword$outboundSchema;
|
|
75
|
+
/** @deprecated use `LoginEmailAndPassword$Outbound` instead. */
|
|
76
|
+
export type Outbound = LoginEmailAndPassword$Outbound;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function loginEmailAndPasswordToJSON(
|
|
80
|
+
loginEmailAndPassword: LoginEmailAndPassword,
|
|
81
|
+
): string {
|
|
82
|
+
return JSON.stringify(
|
|
83
|
+
LoginEmailAndPassword$outboundSchema.parse(loginEmailAndPassword),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function loginEmailAndPasswordFromJSON(
|
|
88
|
+
jsonString: string,
|
|
89
|
+
): SafeParseResult<LoginEmailAndPassword, SDKValidationError> {
|
|
90
|
+
return safeParse(
|
|
91
|
+
jsonString,
|
|
92
|
+
(x) => LoginEmailAndPassword$inboundSchema.parse(JSON.parse(x)),
|
|
93
|
+
`Failed to parse 'LoginEmailAndPassword' from JSON`,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Given a user email, checks whether SAML or Password is required.
|
|
13
|
+
*/
|
|
14
|
+
export type LoginRequirementsFromEmail = {
|
|
15
|
+
/**
|
|
16
|
+
* Properly formatted email address
|
|
17
|
+
*/
|
|
18
|
+
email: string;
|
|
19
|
+
/**
|
|
20
|
+
* A proper URI where the user should be sent after completing a SAML login. This is encoded into the response you will get if the user requires a SAML login.
|
|
21
|
+
*/
|
|
22
|
+
returnUrl: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const LoginRequirementsFromEmail$inboundSchema: z.ZodType<
|
|
27
|
+
LoginRequirementsFromEmail,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
email: z.string(),
|
|
32
|
+
return_url: z.string(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"return_url": "returnUrl",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type LoginRequirementsFromEmail$Outbound = {
|
|
41
|
+
email: string;
|
|
42
|
+
return_url: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const LoginRequirementsFromEmail$outboundSchema: z.ZodType<
|
|
47
|
+
LoginRequirementsFromEmail$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
LoginRequirementsFromEmail
|
|
50
|
+
> = z.object({
|
|
51
|
+
email: z.string(),
|
|
52
|
+
returnUrl: z.string(),
|
|
53
|
+
}).transform((v) => {
|
|
54
|
+
return remap$(v, {
|
|
55
|
+
returnUrl: "return_url",
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
62
|
+
*/
|
|
63
|
+
export namespace LoginRequirementsFromEmail$ {
|
|
64
|
+
/** @deprecated use `LoginRequirementsFromEmail$inboundSchema` instead. */
|
|
65
|
+
export const inboundSchema = LoginRequirementsFromEmail$inboundSchema;
|
|
66
|
+
/** @deprecated use `LoginRequirementsFromEmail$outboundSchema` instead. */
|
|
67
|
+
export const outboundSchema = LoginRequirementsFromEmail$outboundSchema;
|
|
68
|
+
/** @deprecated use `LoginRequirementsFromEmail$Outbound` instead. */
|
|
69
|
+
export type Outbound = LoginRequirementsFromEmail$Outbound;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function loginRequirementsFromEmailToJSON(
|
|
73
|
+
loginRequirementsFromEmail: LoginRequirementsFromEmail,
|
|
74
|
+
): string {
|
|
75
|
+
return JSON.stringify(
|
|
76
|
+
LoginRequirementsFromEmail$outboundSchema.parse(loginRequirementsFromEmail),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function loginRequirementsFromEmailFromJSON(
|
|
81
|
+
jsonString: string,
|
|
82
|
+
): SafeParseResult<LoginRequirementsFromEmail, SDKValidationError> {
|
|
83
|
+
return safeParse(
|
|
84
|
+
jsonString,
|
|
85
|
+
(x) => LoginRequirementsFromEmail$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
+
`Failed to parse 'LoginRequirementsFromEmail' from JSON`,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const MfaRequiredResponseRequires = {
|
|
13
|
+
MfaCode: "mfa_code",
|
|
14
|
+
} as const;
|
|
15
|
+
export type MfaRequiredResponseRequires = ClosedEnum<
|
|
16
|
+
typeof MfaRequiredResponseRequires
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
export const MfaMethod = {
|
|
20
|
+
Text: "text",
|
|
21
|
+
Email: "email",
|
|
22
|
+
} as const;
|
|
23
|
+
export type MfaMethod = ClosedEnum<typeof MfaMethod>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The response is sent when a login is successful, but requires more information such as a MFA.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
*
|
|
30
|
+
* If the `mfa_method` is text or email, it's best to show helper text to the user to notify them that a code was sent via mobile or email and they should enter it to proceed.
|
|
31
|
+
*/
|
|
32
|
+
export type MfaRequiredResponse = {
|
|
33
|
+
requires: MfaRequiredResponseRequires;
|
|
34
|
+
success: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Error describing the exact condition of what further steps are needed to finish the login process.
|
|
37
|
+
*/
|
|
38
|
+
error: string;
|
|
39
|
+
/**
|
|
40
|
+
* A redacted version of the phone number such as `###-###-1234`
|
|
41
|
+
*/
|
|
42
|
+
mobilePhone?: string | undefined;
|
|
43
|
+
mfaMethod?: MfaMethod | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const MfaRequiredResponseRequires$inboundSchema: z.ZodNativeEnum<
|
|
48
|
+
typeof MfaRequiredResponseRequires
|
|
49
|
+
> = z.nativeEnum(MfaRequiredResponseRequires);
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const MfaRequiredResponseRequires$outboundSchema: z.ZodNativeEnum<
|
|
53
|
+
typeof MfaRequiredResponseRequires
|
|
54
|
+
> = MfaRequiredResponseRequires$inboundSchema;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
|
+
*/
|
|
60
|
+
export namespace MfaRequiredResponseRequires$ {
|
|
61
|
+
/** @deprecated use `MfaRequiredResponseRequires$inboundSchema` instead. */
|
|
62
|
+
export const inboundSchema = MfaRequiredResponseRequires$inboundSchema;
|
|
63
|
+
/** @deprecated use `MfaRequiredResponseRequires$outboundSchema` instead. */
|
|
64
|
+
export const outboundSchema = MfaRequiredResponseRequires$outboundSchema;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const MfaMethod$inboundSchema: z.ZodNativeEnum<typeof MfaMethod> = z
|
|
69
|
+
.nativeEnum(MfaMethod);
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const MfaMethod$outboundSchema: z.ZodNativeEnum<typeof MfaMethod> =
|
|
73
|
+
MfaMethod$inboundSchema;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
78
|
+
*/
|
|
79
|
+
export namespace MfaMethod$ {
|
|
80
|
+
/** @deprecated use `MfaMethod$inboundSchema` instead. */
|
|
81
|
+
export const inboundSchema = MfaMethod$inboundSchema;
|
|
82
|
+
/** @deprecated use `MfaMethod$outboundSchema` instead. */
|
|
83
|
+
export const outboundSchema = MfaMethod$outboundSchema;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const MfaRequiredResponse$inboundSchema: z.ZodType<
|
|
88
|
+
MfaRequiredResponse,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
unknown
|
|
91
|
+
> = z.object({
|
|
92
|
+
requires: MfaRequiredResponseRequires$inboundSchema,
|
|
93
|
+
success: z.boolean(),
|
|
94
|
+
error: z.string(),
|
|
95
|
+
mobile_phone: z.string().optional(),
|
|
96
|
+
mfa_method: MfaMethod$inboundSchema.optional(),
|
|
97
|
+
}).transform((v) => {
|
|
98
|
+
return remap$(v, {
|
|
99
|
+
"mobile_phone": "mobilePhone",
|
|
100
|
+
"mfa_method": "mfaMethod",
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export type MfaRequiredResponse$Outbound = {
|
|
106
|
+
requires: string;
|
|
107
|
+
success: boolean;
|
|
108
|
+
error: string;
|
|
109
|
+
mobile_phone?: string | undefined;
|
|
110
|
+
mfa_method?: string | undefined;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const MfaRequiredResponse$outboundSchema: z.ZodType<
|
|
115
|
+
MfaRequiredResponse$Outbound,
|
|
116
|
+
z.ZodTypeDef,
|
|
117
|
+
MfaRequiredResponse
|
|
118
|
+
> = z.object({
|
|
119
|
+
requires: MfaRequiredResponseRequires$outboundSchema,
|
|
120
|
+
success: z.boolean(),
|
|
121
|
+
error: z.string(),
|
|
122
|
+
mobilePhone: z.string().optional(),
|
|
123
|
+
mfaMethod: MfaMethod$outboundSchema.optional(),
|
|
124
|
+
}).transform((v) => {
|
|
125
|
+
return remap$(v, {
|
|
126
|
+
mobilePhone: "mobile_phone",
|
|
127
|
+
mfaMethod: "mfa_method",
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
134
|
+
*/
|
|
135
|
+
export namespace MfaRequiredResponse$ {
|
|
136
|
+
/** @deprecated use `MfaRequiredResponse$inboundSchema` instead. */
|
|
137
|
+
export const inboundSchema = MfaRequiredResponse$inboundSchema;
|
|
138
|
+
/** @deprecated use `MfaRequiredResponse$outboundSchema` instead. */
|
|
139
|
+
export const outboundSchema = MfaRequiredResponse$outboundSchema;
|
|
140
|
+
/** @deprecated use `MfaRequiredResponse$Outbound` instead. */
|
|
141
|
+
export type Outbound = MfaRequiredResponse$Outbound;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function mfaRequiredResponseToJSON(
|
|
145
|
+
mfaRequiredResponse: MfaRequiredResponse,
|
|
146
|
+
): string {
|
|
147
|
+
return JSON.stringify(
|
|
148
|
+
MfaRequiredResponse$outboundSchema.parse(mfaRequiredResponse),
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function mfaRequiredResponseFromJSON(
|
|
153
|
+
jsonString: string,
|
|
154
|
+
): SafeParseResult<MfaRequiredResponse, SDKValidationError> {
|
|
155
|
+
return safeParse(
|
|
156
|
+
jsonString,
|
|
157
|
+
(x) => MfaRequiredResponse$inboundSchema.parse(JSON.parse(x)),
|
|
158
|
+
`Failed to parse 'MfaRequiredResponse' from JSON`,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Pagination information for a pageable list
|
|
13
|
+
*/
|
|
14
|
+
export type Pager = {
|
|
15
|
+
/**
|
|
16
|
+
* Url path of where to fetch this or other pages of the same objects
|
|
17
|
+
*/
|
|
18
|
+
baseUrl: string;
|
|
19
|
+
/**
|
|
20
|
+
* A comma-separated list of column names signifying which columns the `items` are sorted by.
|
|
21
|
+
*/
|
|
22
|
+
sort: string;
|
|
23
|
+
/**
|
|
24
|
+
* `0` signifies the items are sorted in ascending order, `1` signifies the items are sorted in descending order
|
|
25
|
+
*/
|
|
26
|
+
desc: number;
|
|
27
|
+
/**
|
|
28
|
+
* Number of total items for all pages
|
|
29
|
+
*/
|
|
30
|
+
itemCount: number;
|
|
31
|
+
itemsPerPage: number;
|
|
32
|
+
/**
|
|
33
|
+
* The page represented by the current `items` list. Pages are 1-based for easy display to the user.
|
|
34
|
+
*/
|
|
35
|
+
page: number;
|
|
36
|
+
/**
|
|
37
|
+
* When `true`, the following fields may be updated by adding query string parameters to the request (via GET)
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
*
|
|
41
|
+
* - sort
|
|
42
|
+
* - desc
|
|
43
|
+
* - page
|
|
44
|
+
* - items_per_page
|
|
45
|
+
*/
|
|
46
|
+
useUrlParams: boolean;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const Pager$inboundSchema: z.ZodType<Pager, z.ZodTypeDef, unknown> = z
|
|
51
|
+
.object({
|
|
52
|
+
base_url: z.string(),
|
|
53
|
+
sort: z.string(),
|
|
54
|
+
desc: z.number().int(),
|
|
55
|
+
item_count: z.number().int(),
|
|
56
|
+
items_per_page: z.number().int(),
|
|
57
|
+
page: z.number().int(),
|
|
58
|
+
use_url_params: z.boolean(),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
"base_url": "baseUrl",
|
|
62
|
+
"item_count": "itemCount",
|
|
63
|
+
"items_per_page": "itemsPerPage",
|
|
64
|
+
"use_url_params": "useUrlParams",
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type Pager$Outbound = {
|
|
70
|
+
base_url: string;
|
|
71
|
+
sort: string;
|
|
72
|
+
desc: number;
|
|
73
|
+
item_count: number;
|
|
74
|
+
items_per_page: number;
|
|
75
|
+
page: number;
|
|
76
|
+
use_url_params: boolean;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const Pager$outboundSchema: z.ZodType<
|
|
81
|
+
Pager$Outbound,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
Pager
|
|
84
|
+
> = z.object({
|
|
85
|
+
baseUrl: z.string(),
|
|
86
|
+
sort: z.string(),
|
|
87
|
+
desc: z.number().int(),
|
|
88
|
+
itemCount: z.number().int(),
|
|
89
|
+
itemsPerPage: z.number().int(),
|
|
90
|
+
page: z.number().int(),
|
|
91
|
+
useUrlParams: z.boolean(),
|
|
92
|
+
}).transform((v) => {
|
|
93
|
+
return remap$(v, {
|
|
94
|
+
baseUrl: "base_url",
|
|
95
|
+
itemCount: "item_count",
|
|
96
|
+
itemsPerPage: "items_per_page",
|
|
97
|
+
useUrlParams: "use_url_params",
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
104
|
+
*/
|
|
105
|
+
export namespace Pager$ {
|
|
106
|
+
/** @deprecated use `Pager$inboundSchema` instead. */
|
|
107
|
+
export const inboundSchema = Pager$inboundSchema;
|
|
108
|
+
/** @deprecated use `Pager$outboundSchema` instead. */
|
|
109
|
+
export const outboundSchema = Pager$outboundSchema;
|
|
110
|
+
/** @deprecated use `Pager$Outbound` instead. */
|
|
111
|
+
export type Outbound = Pager$Outbound;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function pagerToJSON(pager: Pager): string {
|
|
115
|
+
return JSON.stringify(Pager$outboundSchema.parse(pager));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function pagerFromJSON(
|
|
119
|
+
jsonString: string,
|
|
120
|
+
): SafeParseResult<Pager, SDKValidationError> {
|
|
121
|
+
return safeParse(
|
|
122
|
+
jsonString,
|
|
123
|
+
(x) => Pager$inboundSchema.parse(JSON.parse(x)),
|
|
124
|
+
`Failed to parse 'Pager' from JSON`,
|
|
125
|
+
);
|
|
126
|
+
}
|