@greensecurity/javascript-sdk 0.40.8-beta.3 → 0.40.8-beta.30
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/README.md +14 -5
- package/dist/commonjs/__tests__/alerts.test.d.ts +2 -0
- package/dist/commonjs/__tests__/alerts.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/alerts.test.js +51 -0
- package/dist/commonjs/__tests__/alerts.test.js.map +1 -0
- package/dist/commonjs/__tests__/vendors.test.js +25 -0
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +19 -4
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/admin-funcs/registerCompanies.d.ts +16 -0
- package/dist/commonjs/admin-funcs/registerCompanies.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/registerCompanies.js +9 -0
- package/dist/commonjs/admin-funcs/registerCompanies.js.map +1 -0
- package/dist/commonjs/admin-funcs/registerEmail.d.ts +9 -0
- package/dist/commonjs/admin-funcs/registerEmail.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/registerEmail.js +9 -0
- package/dist/commonjs/admin-funcs/registerEmail.js.map +1 -0
- package/dist/commonjs/admin-funcs/registerGeneralInfo.d.ts +23 -0
- package/dist/commonjs/admin-funcs/registerGeneralInfo.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/registerGeneralInfo.js +9 -0
- package/dist/commonjs/admin-funcs/registerGeneralInfo.js.map +1 -0
- package/dist/commonjs/admin-funcs/registerPassword.d.ts +7 -0
- package/dist/commonjs/admin-funcs/registerPassword.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/registerPassword.js +9 -0
- package/dist/commonjs/admin-funcs/registerPassword.js.map +1 -0
- package/dist/commonjs/funcs/alertsListAlerts.d.ts +21 -0
- package/dist/commonjs/funcs/alertsListAlerts.d.ts.map +1 -0
- package/dist/commonjs/funcs/alertsListAlerts.js +154 -0
- package/dist/commonjs/funcs/alertsListAlerts.js.map +1 -0
- package/dist/commonjs/funcs/alertsUpdateUserAlerts.d.ts +18 -0
- package/dist/commonjs/funcs/alertsUpdateUserAlerts.d.ts.map +1 -0
- package/dist/commonjs/funcs/alertsUpdateUserAlerts.js +117 -0
- package/dist/commonjs/funcs/alertsUpdateUserAlerts.js.map +1 -0
- package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts +18 -0
- package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.js +126 -0
- package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorsDetails.d.ts +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorsDetails.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsGetVendorsDetails.js +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorsDetails.js.map +1 -1
- package/dist/commonjs/index.extras.d.ts +10 -0
- package/dist/commonjs/index.extras.d.ts.map +1 -1
- package/dist/commonjs/index.extras.js +10 -0
- package/dist/commonjs/index.extras.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +4 -4
- package/dist/commonjs/lib/config.js +4 -4
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/url.js +1 -1
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/models/components/alert.d.ts +79 -0
- package/dist/commonjs/models/components/alert.d.ts.map +1 -0
- package/dist/commonjs/models/components/alert.js +123 -0
- package/dist/commonjs/models/components/alert.js.map +1 -0
- package/dist/commonjs/models/components/credential.d.ts +6 -4
- package/dist/commonjs/models/components/credential.d.ts.map +1 -1
- package/dist/commonjs/models/components/credential.js +8 -4
- package/dist/commonjs/models/components/credential.js.map +1 -1
- package/dist/commonjs/models/components/credentialstatus.d.ts +3 -0
- package/dist/commonjs/models/components/credentialstatus.d.ts.map +1 -1
- package/dist/commonjs/models/components/credentialstatus.js +1 -0
- package/dist/commonjs/models/components/credentialstatus.js.map +1 -1
- package/dist/commonjs/models/components/expand.d.ts +6 -0
- package/dist/commonjs/models/components/expand.d.ts.map +1 -1
- package/dist/commonjs/models/components/expand.js +2 -0
- package/dist/commonjs/models/components/expand.js.map +1 -1
- package/dist/commonjs/models/components/facilitycalendarsummary.d.ts +68 -0
- package/dist/commonjs/models/components/facilitycalendarsummary.d.ts.map +1 -0
- package/dist/commonjs/models/components/facilitycalendarsummary.js +130 -0
- package/dist/commonjs/models/components/facilitycalendarsummary.js.map +1 -0
- package/dist/commonjs/models/components/facilitysummary.d.ts +2 -0
- package/dist/commonjs/models/components/facilitysummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/facilitysummary.js +4 -0
- package/dist/commonjs/models/components/facilitysummary.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +4 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +4 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/screeninganswer.d.ts +112 -0
- package/dist/commonjs/models/components/screeninganswer.d.ts.map +1 -0
- package/dist/commonjs/models/components/screeninganswer.js +138 -0
- package/dist/commonjs/models/components/screeninganswer.js.map +1 -0
- package/dist/commonjs/models/components/screeningquestion.d.ts +98 -0
- package/dist/commonjs/models/components/screeningquestion.d.ts.map +1 -0
- package/dist/commonjs/models/components/screeningquestion.js +125 -0
- package/dist/commonjs/models/components/screeningquestion.js.map +1 -0
- package/dist/commonjs/models/components/userlocation.d.ts +1 -5
- package/dist/commonjs/models/components/userlocation.d.ts.map +1 -1
- package/dist/commonjs/models/components/userlocation.js +2 -3
- package/dist/commonjs/models/components/userlocation.js.map +1 -1
- package/dist/commonjs/models/components/vendor.d.ts +5 -2
- package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendor.js +7 -2
- package/dist/commonjs/models/components/vendor.js.map +1 -1
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.d.ts +70 -0
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.js +122 -0
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listalerts.d.ts +106 -0
- package/dist/commonjs/models/operations/listalerts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listalerts.js +149 -0
- package/dist/commonjs/models/operations/listalerts.js.map +1 -0
- package/dist/commonjs/models/operations/listvendorcredentials.d.ts +4 -4
- package/dist/commonjs/models/operations/listvendorcredentials.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listvendorcredentials.js +4 -4
- package/dist/commonjs/models/operations/listvendorcredentials.js.map +1 -1
- package/dist/commonjs/models/operations/updateuseralerts.d.ts +57 -0
- package/dist/commonjs/models/operations/updateuseralerts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updateuseralerts.js +105 -0
- package/dist/commonjs/models/operations/updateuseralerts.js.map +1 -0
- package/dist/commonjs/react-query/alertsListAlerts.d.ts +75 -0
- package/dist/commonjs/react-query/alertsListAlerts.d.ts.map +1 -0
- package/dist/commonjs/react-query/alertsListAlerts.js +150 -0
- package/dist/commonjs/react-query/alertsListAlerts.js.map +1 -0
- package/dist/commonjs/react-query/alertsUpdateUserAlerts.d.ts +23 -0
- package/dist/commonjs/react-query/alertsUpdateUserAlerts.d.ts.map +1 -0
- package/dist/commonjs/react-query/alertsUpdateUserAlerts.js +47 -0
- package/dist/commonjs/react-query/alertsUpdateUserAlerts.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +3 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +3 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts +43 -0
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.js +97 -0
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorsDetails.d.ts +2 -0
- package/dist/commonjs/react-query/vendorsGetVendorsDetails.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsGetVendorsDetails.js +2 -0
- package/dist/commonjs/react-query/vendorsGetVendorsDetails.js.map +1 -1
- package/dist/commonjs/react-query/vendorsListVendorCredentials.d.ts +3 -3
- package/dist/commonjs/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
- package/dist/commonjs/sdk/alerts.d.ts +22 -0
- package/dist/commonjs/sdk/alerts.d.ts.map +1 -0
- package/dist/commonjs/sdk/alerts.js +33 -0
- package/dist/commonjs/sdk/alerts.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +8 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +11 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/alerts.test.d.ts +2 -0
- package/dist/esm/__tests__/alerts.test.d.ts.map +1 -0
- package/dist/esm/__tests__/alerts.test.js +49 -0
- package/dist/esm/__tests__/alerts.test.js.map +1 -0
- package/dist/esm/__tests__/vendors.test.js +25 -0
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +19 -4
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/admin-funcs/registerCompanies.d.ts +16 -0
- package/dist/esm/admin-funcs/registerCompanies.d.ts.map +1 -0
- package/dist/esm/admin-funcs/registerCompanies.js +6 -0
- package/dist/esm/admin-funcs/registerCompanies.js.map +1 -0
- package/dist/esm/admin-funcs/registerEmail.d.ts +9 -0
- package/dist/esm/admin-funcs/registerEmail.d.ts.map +1 -0
- package/dist/esm/admin-funcs/registerEmail.js +6 -0
- package/dist/esm/admin-funcs/registerEmail.js.map +1 -0
- package/dist/esm/admin-funcs/registerGeneralInfo.d.ts +23 -0
- package/dist/esm/admin-funcs/registerGeneralInfo.d.ts.map +1 -0
- package/dist/esm/admin-funcs/registerGeneralInfo.js +6 -0
- package/dist/esm/admin-funcs/registerGeneralInfo.js.map +1 -0
- package/dist/esm/admin-funcs/registerPassword.d.ts +7 -0
- package/dist/esm/admin-funcs/registerPassword.d.ts.map +1 -0
- package/dist/esm/admin-funcs/registerPassword.js +6 -0
- package/dist/esm/admin-funcs/registerPassword.js.map +1 -0
- package/dist/esm/funcs/alertsListAlerts.d.ts +21 -0
- package/dist/esm/funcs/alertsListAlerts.d.ts.map +1 -0
- package/dist/esm/funcs/alertsListAlerts.js +118 -0
- package/dist/esm/funcs/alertsListAlerts.js.map +1 -0
- package/dist/esm/funcs/alertsUpdateUserAlerts.d.ts +18 -0
- package/dist/esm/funcs/alertsUpdateUserAlerts.d.ts.map +1 -0
- package/dist/esm/funcs/alertsUpdateUserAlerts.js +81 -0
- package/dist/esm/funcs/alertsUpdateUserAlerts.js.map +1 -0
- package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts +18 -0
- package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.js +90 -0
- package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
- package/dist/esm/funcs/vendorsGetVendorsDetails.d.ts +1 -0
- package/dist/esm/funcs/vendorsGetVendorsDetails.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsGetVendorsDetails.js +1 -0
- package/dist/esm/funcs/vendorsGetVendorsDetails.js.map +1 -1
- package/dist/esm/index.extras.d.ts +10 -0
- package/dist/esm/index.extras.d.ts.map +1 -1
- package/dist/esm/index.extras.js +10 -0
- package/dist/esm/index.extras.js.map +1 -1
- package/dist/esm/lib/config.d.ts +4 -4
- package/dist/esm/lib/config.js +4 -4
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/url.js +1 -1
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/models/components/alert.d.ts +79 -0
- package/dist/esm/models/components/alert.d.ts.map +1 -0
- package/dist/esm/models/components/alert.js +85 -0
- package/dist/esm/models/components/alert.js.map +1 -0
- package/dist/esm/models/components/credential.d.ts +6 -4
- package/dist/esm/models/components/credential.d.ts.map +1 -1
- package/dist/esm/models/components/credential.js +8 -4
- package/dist/esm/models/components/credential.js.map +1 -1
- package/dist/esm/models/components/credentialstatus.d.ts +3 -0
- package/dist/esm/models/components/credentialstatus.d.ts.map +1 -1
- package/dist/esm/models/components/credentialstatus.js +1 -0
- package/dist/esm/models/components/credentialstatus.js.map +1 -1
- package/dist/esm/models/components/expand.d.ts +6 -0
- package/dist/esm/models/components/expand.d.ts.map +1 -1
- package/dist/esm/models/components/expand.js +2 -0
- package/dist/esm/models/components/expand.js.map +1 -1
- package/dist/esm/models/components/facilitycalendarsummary.d.ts +68 -0
- package/dist/esm/models/components/facilitycalendarsummary.d.ts.map +1 -0
- package/dist/esm/models/components/facilitycalendarsummary.js +90 -0
- package/dist/esm/models/components/facilitycalendarsummary.js.map +1 -0
- package/dist/esm/models/components/facilitysummary.d.ts +2 -0
- package/dist/esm/models/components/facilitysummary.d.ts.map +1 -1
- package/dist/esm/models/components/facilitysummary.js +4 -0
- package/dist/esm/models/components/facilitysummary.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +4 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +4 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/screeninganswer.d.ts +112 -0
- package/dist/esm/models/components/screeninganswer.d.ts.map +1 -0
- package/dist/esm/models/components/screeninganswer.js +100 -0
- package/dist/esm/models/components/screeninganswer.js.map +1 -0
- package/dist/esm/models/components/screeningquestion.d.ts +98 -0
- package/dist/esm/models/components/screeningquestion.d.ts.map +1 -0
- package/dist/esm/models/components/screeningquestion.js +87 -0
- package/dist/esm/models/components/screeningquestion.js.map +1 -0
- package/dist/esm/models/components/userlocation.d.ts +1 -5
- package/dist/esm/models/components/userlocation.d.ts.map +1 -1
- package/dist/esm/models/components/userlocation.js +2 -3
- package/dist/esm/models/components/userlocation.js.map +1 -1
- package/dist/esm/models/components/vendor.d.ts +5 -2
- package/dist/esm/models/components/vendor.d.ts.map +1 -1
- package/dist/esm/models/components/vendor.js +7 -2
- package/dist/esm/models/components/vendor.js.map +1 -1
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.d.ts +70 -0
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.d.ts.map +1 -0
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.js +82 -0
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listalerts.d.ts +106 -0
- package/dist/esm/models/operations/listalerts.d.ts.map +1 -0
- package/dist/esm/models/operations/listalerts.js +107 -0
- package/dist/esm/models/operations/listalerts.js.map +1 -0
- package/dist/esm/models/operations/listvendorcredentials.d.ts +4 -4
- package/dist/esm/models/operations/listvendorcredentials.d.ts.map +1 -1
- package/dist/esm/models/operations/listvendorcredentials.js +4 -4
- package/dist/esm/models/operations/listvendorcredentials.js.map +1 -1
- package/dist/esm/models/operations/updateuseralerts.d.ts +57 -0
- package/dist/esm/models/operations/updateuseralerts.d.ts.map +1 -0
- package/dist/esm/models/operations/updateuseralerts.js +65 -0
- package/dist/esm/models/operations/updateuseralerts.js.map +1 -0
- package/dist/esm/react-query/alertsListAlerts.d.ts +75 -0
- package/dist/esm/react-query/alertsListAlerts.d.ts.map +1 -0
- package/dist/esm/react-query/alertsListAlerts.js +137 -0
- package/dist/esm/react-query/alertsListAlerts.js.map +1 -0
- package/dist/esm/react-query/alertsUpdateUserAlerts.d.ts +23 -0
- package/dist/esm/react-query/alertsUpdateUserAlerts.d.ts.map +1 -0
- package/dist/esm/react-query/alertsUpdateUserAlerts.js +42 -0
- package/dist/esm/react-query/alertsUpdateUserAlerts.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +3 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +3 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts +43 -0
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.js +87 -0
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorsDetails.d.ts +2 -0
- package/dist/esm/react-query/vendorsGetVendorsDetails.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsGetVendorsDetails.js +2 -0
- package/dist/esm/react-query/vendorsGetVendorsDetails.js.map +1 -1
- package/dist/esm/react-query/vendorsListVendorCredentials.d.ts +3 -3
- package/dist/esm/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
- package/dist/esm/sdk/alerts.d.ts +22 -0
- package/dist/esm/sdk/alerts.d.ts.map +1 -0
- package/dist/esm/sdk/alerts.js +29 -0
- package/dist/esm/sdk/alerts.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +8 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +11 -0
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/examples/vendorsCreateVendorRegistration.example.ts +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/alerts.test.ts +55 -0
- package/src/__tests__/vendors.test.ts +32 -0
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +19 -4
- package/src/admin-funcs/registerCompanies.ts +23 -0
- package/src/admin-funcs/registerEmail.ts +16 -0
- package/src/admin-funcs/registerGeneralInfo.ts +30 -0
- package/src/admin-funcs/registerPassword.ts +14 -0
- package/src/funcs/alertsListAlerts.ts +245 -0
- package/src/funcs/alertsUpdateUserAlerts.ts +170 -0
- package/src/funcs/vendorsGetNextUnansweredScreeningQuestion.ts +188 -0
- package/src/funcs/vendorsGetVendorsDetails.ts +1 -0
- package/src/index.extras.ts +14 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/url.ts +1 -1
- package/src/models/components/alert.ts +141 -0
- package/src/models/components/credential.ts +19 -10
- package/src/models/components/credentialstatus.ts +1 -0
- package/src/models/components/expand.ts +2 -0
- package/src/models/components/facilitycalendarsummary.ts +188 -0
- package/src/models/components/facilitysummary.ts +6 -0
- package/src/models/components/index.ts +4 -0
- package/src/models/components/screeninganswer.ts +195 -0
- package/src/models/components/screeningquestion.ts +163 -0
- package/src/models/components/userlocation.ts +3 -7
- package/src/models/components/vendor.ts +19 -4
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/getnextunansweredscreeningquestion.ts +191 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/listalerts.ts +234 -0
- package/src/models/operations/listvendorcredentials.ts +8 -10
- package/src/models/operations/updateuseralerts.ts +140 -0
- package/src/react-query/alertsListAlerts.ts +308 -0
- package/src/react-query/alertsUpdateUserAlerts.ts +89 -0
- package/src/react-query/index.ts +3 -0
- package/src/react-query/vendorsGetNextUnansweredScreeningQuestion.ts +190 -0
- package/src/react-query/vendorsGetVendorsDetails.ts +2 -0
- package/src/react-query/vendorsListVendorCredentials.ts +3 -3
- package/src/sdk/alerts.ts +46 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/vendors.ts +19 -0
|
@@ -0,0 +1,188 @@
|
|
|
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
|
+
import {
|
|
11
|
+
FacilityVendorType,
|
|
12
|
+
FacilityVendorType$inboundSchema,
|
|
13
|
+
FacilityVendorType$Outbound,
|
|
14
|
+
FacilityVendorType$outboundSchema,
|
|
15
|
+
} from "./facilityvendortype.js";
|
|
16
|
+
|
|
17
|
+
export type FacilityCalendarSummaryVendorPolicy = {
|
|
18
|
+
vendorTypes?: Array<FacilityVendorType> | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* FacilitySummary extended with appointment options for calendaring.
|
|
23
|
+
*/
|
|
24
|
+
export type FacilityCalendarSummary = {
|
|
25
|
+
id?: number | undefined;
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
systemId?: number | undefined;
|
|
28
|
+
vendorPolicy?: FacilityCalendarSummaryVendorPolicy | null | undefined;
|
|
29
|
+
allowUserAppointments?: boolean | undefined;
|
|
30
|
+
allowDeptAppointments?: boolean | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const FacilityCalendarSummaryVendorPolicy$inboundSchema: z.ZodType<
|
|
35
|
+
FacilityCalendarSummaryVendorPolicy,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
unknown
|
|
38
|
+
> = z.object({
|
|
39
|
+
vendor_types: z.array(FacilityVendorType$inboundSchema).optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"vendor_types": "vendorTypes",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type FacilityCalendarSummaryVendorPolicy$Outbound = {
|
|
48
|
+
vendor_types?: Array<FacilityVendorType$Outbound> | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const FacilityCalendarSummaryVendorPolicy$outboundSchema: z.ZodType<
|
|
53
|
+
FacilityCalendarSummaryVendorPolicy$Outbound,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
FacilityCalendarSummaryVendorPolicy
|
|
56
|
+
> = z.object({
|
|
57
|
+
vendorTypes: z.array(FacilityVendorType$outboundSchema).optional(),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
vendorTypes: "vendor_types",
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
+
*/
|
|
68
|
+
export namespace FacilityCalendarSummaryVendorPolicy$ {
|
|
69
|
+
/** @deprecated use `FacilityCalendarSummaryVendorPolicy$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema =
|
|
71
|
+
FacilityCalendarSummaryVendorPolicy$inboundSchema;
|
|
72
|
+
/** @deprecated use `FacilityCalendarSummaryVendorPolicy$outboundSchema` instead. */
|
|
73
|
+
export const outboundSchema =
|
|
74
|
+
FacilityCalendarSummaryVendorPolicy$outboundSchema;
|
|
75
|
+
/** @deprecated use `FacilityCalendarSummaryVendorPolicy$Outbound` instead. */
|
|
76
|
+
export type Outbound = FacilityCalendarSummaryVendorPolicy$Outbound;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function facilityCalendarSummaryVendorPolicyToJSON(
|
|
80
|
+
facilityCalendarSummaryVendorPolicy: FacilityCalendarSummaryVendorPolicy,
|
|
81
|
+
): string {
|
|
82
|
+
return JSON.stringify(
|
|
83
|
+
FacilityCalendarSummaryVendorPolicy$outboundSchema.parse(
|
|
84
|
+
facilityCalendarSummaryVendorPolicy,
|
|
85
|
+
),
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function facilityCalendarSummaryVendorPolicyFromJSON(
|
|
90
|
+
jsonString: string,
|
|
91
|
+
): SafeParseResult<FacilityCalendarSummaryVendorPolicy, SDKValidationError> {
|
|
92
|
+
return safeParse(
|
|
93
|
+
jsonString,
|
|
94
|
+
(x) =>
|
|
95
|
+
FacilityCalendarSummaryVendorPolicy$inboundSchema.parse(JSON.parse(x)),
|
|
96
|
+
`Failed to parse 'FacilityCalendarSummaryVendorPolicy' from JSON`,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const FacilityCalendarSummary$inboundSchema: z.ZodType<
|
|
102
|
+
FacilityCalendarSummary,
|
|
103
|
+
z.ZodTypeDef,
|
|
104
|
+
unknown
|
|
105
|
+
> = z.object({
|
|
106
|
+
id: z.number().int().optional(),
|
|
107
|
+
name: z.string().optional(),
|
|
108
|
+
system_id: z.number().int().optional(),
|
|
109
|
+
vendor_policy: z.nullable(
|
|
110
|
+
z.lazy(() => FacilityCalendarSummaryVendorPolicy$inboundSchema),
|
|
111
|
+
).optional(),
|
|
112
|
+
allow_user_appointments: z.boolean().optional(),
|
|
113
|
+
allow_dept_appointments: z.boolean().optional(),
|
|
114
|
+
}).transform((v) => {
|
|
115
|
+
return remap$(v, {
|
|
116
|
+
"system_id": "systemId",
|
|
117
|
+
"vendor_policy": "vendorPolicy",
|
|
118
|
+
"allow_user_appointments": "allowUserAppointments",
|
|
119
|
+
"allow_dept_appointments": "allowDeptAppointments",
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
/** @internal */
|
|
124
|
+
export type FacilityCalendarSummary$Outbound = {
|
|
125
|
+
id?: number | undefined;
|
|
126
|
+
name?: string | undefined;
|
|
127
|
+
system_id?: number | undefined;
|
|
128
|
+
vendor_policy?:
|
|
129
|
+
| FacilityCalendarSummaryVendorPolicy$Outbound
|
|
130
|
+
| null
|
|
131
|
+
| undefined;
|
|
132
|
+
allow_user_appointments?: boolean | undefined;
|
|
133
|
+
allow_dept_appointments?: boolean | undefined;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/** @internal */
|
|
137
|
+
export const FacilityCalendarSummary$outboundSchema: z.ZodType<
|
|
138
|
+
FacilityCalendarSummary$Outbound,
|
|
139
|
+
z.ZodTypeDef,
|
|
140
|
+
FacilityCalendarSummary
|
|
141
|
+
> = z.object({
|
|
142
|
+
id: z.number().int().optional(),
|
|
143
|
+
name: z.string().optional(),
|
|
144
|
+
systemId: z.number().int().optional(),
|
|
145
|
+
vendorPolicy: z.nullable(
|
|
146
|
+
z.lazy(() => FacilityCalendarSummaryVendorPolicy$outboundSchema),
|
|
147
|
+
).optional(),
|
|
148
|
+
allowUserAppointments: z.boolean().optional(),
|
|
149
|
+
allowDeptAppointments: z.boolean().optional(),
|
|
150
|
+
}).transform((v) => {
|
|
151
|
+
return remap$(v, {
|
|
152
|
+
systemId: "system_id",
|
|
153
|
+
vendorPolicy: "vendor_policy",
|
|
154
|
+
allowUserAppointments: "allow_user_appointments",
|
|
155
|
+
allowDeptAppointments: "allow_dept_appointments",
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @internal
|
|
161
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
162
|
+
*/
|
|
163
|
+
export namespace FacilityCalendarSummary$ {
|
|
164
|
+
/** @deprecated use `FacilityCalendarSummary$inboundSchema` instead. */
|
|
165
|
+
export const inboundSchema = FacilityCalendarSummary$inboundSchema;
|
|
166
|
+
/** @deprecated use `FacilityCalendarSummary$outboundSchema` instead. */
|
|
167
|
+
export const outboundSchema = FacilityCalendarSummary$outboundSchema;
|
|
168
|
+
/** @deprecated use `FacilityCalendarSummary$Outbound` instead. */
|
|
169
|
+
export type Outbound = FacilityCalendarSummary$Outbound;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function facilityCalendarSummaryToJSON(
|
|
173
|
+
facilityCalendarSummary: FacilityCalendarSummary,
|
|
174
|
+
): string {
|
|
175
|
+
return JSON.stringify(
|
|
176
|
+
FacilityCalendarSummary$outboundSchema.parse(facilityCalendarSummary),
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function facilityCalendarSummaryFromJSON(
|
|
181
|
+
jsonString: string,
|
|
182
|
+
): SafeParseResult<FacilityCalendarSummary, SDKValidationError> {
|
|
183
|
+
return safeParse(
|
|
184
|
+
jsonString,
|
|
185
|
+
(x) => FacilityCalendarSummary$inboundSchema.parse(JSON.parse(x)),
|
|
186
|
+
`Failed to parse 'FacilityCalendarSummary' from JSON`,
|
|
187
|
+
);
|
|
188
|
+
}
|
|
@@ -24,6 +24,7 @@ export type VendorPolicy = {
|
|
|
24
24
|
export type FacilitySummary = {
|
|
25
25
|
id?: number | undefined;
|
|
26
26
|
name?: string | undefined;
|
|
27
|
+
systemId?: number | undefined;
|
|
27
28
|
vendorPolicy?: VendorPolicy | null | undefined;
|
|
28
29
|
};
|
|
29
30
|
|
|
@@ -93,10 +94,12 @@ export const FacilitySummary$inboundSchema: z.ZodType<
|
|
|
93
94
|
> = z.object({
|
|
94
95
|
id: z.number().int().optional(),
|
|
95
96
|
name: z.string().optional(),
|
|
97
|
+
system_id: z.number().int().optional(),
|
|
96
98
|
vendor_policy: z.nullable(z.lazy(() => VendorPolicy$inboundSchema))
|
|
97
99
|
.optional(),
|
|
98
100
|
}).transform((v) => {
|
|
99
101
|
return remap$(v, {
|
|
102
|
+
"system_id": "systemId",
|
|
100
103
|
"vendor_policy": "vendorPolicy",
|
|
101
104
|
});
|
|
102
105
|
});
|
|
@@ -105,6 +108,7 @@ export const FacilitySummary$inboundSchema: z.ZodType<
|
|
|
105
108
|
export type FacilitySummary$Outbound = {
|
|
106
109
|
id?: number | undefined;
|
|
107
110
|
name?: string | undefined;
|
|
111
|
+
system_id?: number | undefined;
|
|
108
112
|
vendor_policy?: VendorPolicy$Outbound | null | undefined;
|
|
109
113
|
};
|
|
110
114
|
|
|
@@ -116,10 +120,12 @@ export const FacilitySummary$outboundSchema: z.ZodType<
|
|
|
116
120
|
> = z.object({
|
|
117
121
|
id: z.number().int().optional(),
|
|
118
122
|
name: z.string().optional(),
|
|
123
|
+
systemId: z.number().int().optional(),
|
|
119
124
|
vendorPolicy: z.nullable(z.lazy(() => VendorPolicy$outboundSchema))
|
|
120
125
|
.optional(),
|
|
121
126
|
}).transform((v) => {
|
|
122
127
|
return remap$(v, {
|
|
128
|
+
systemId: "system_id",
|
|
123
129
|
vendorPolicy: "vendor_policy",
|
|
124
130
|
});
|
|
125
131
|
});
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
export * from "./activestatus.js";
|
|
6
|
+
export * from "./alert.js";
|
|
6
7
|
export * from "./backgroundcheckresult.js";
|
|
7
8
|
export * from "./company.js";
|
|
8
9
|
export * from "./companyvendortyperestriction.js";
|
|
@@ -20,6 +21,7 @@ export * from "./departmentsummary.js";
|
|
|
20
21
|
export * from "./desc.js";
|
|
21
22
|
export * from "./expand.js";
|
|
22
23
|
export * from "./facility.js";
|
|
24
|
+
export * from "./facilitycalendarsummary.js";
|
|
23
25
|
export * from "./facilitystatus.js";
|
|
24
26
|
export * from "./facilitysummary.js";
|
|
25
27
|
export * from "./facilityvendortype.js";
|
|
@@ -45,6 +47,8 @@ export * from "./product.js";
|
|
|
45
47
|
export * from "./productvariant.js";
|
|
46
48
|
export * from "./samlloginrequiredresponse.js";
|
|
47
49
|
export * from "./scantype.js";
|
|
50
|
+
export * from "./screeninganswer.js";
|
|
51
|
+
export * from "./screeningquestion.js";
|
|
48
52
|
export * from "./screeningresponse.js";
|
|
49
53
|
export * from "./security.js";
|
|
50
54
|
export * from "./standingappointment.js";
|
|
@@ -0,0 +1,195 @@
|
|
|
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
|
+
import {
|
|
12
|
+
ScreeningQuestion,
|
|
13
|
+
ScreeningQuestion$inboundSchema,
|
|
14
|
+
ScreeningQuestion$Outbound,
|
|
15
|
+
ScreeningQuestion$outboundSchema,
|
|
16
|
+
} from "./screeningquestion.js";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The type of answer option.
|
|
20
|
+
*/
|
|
21
|
+
export const AnswerType = {
|
|
22
|
+
Preset: "preset",
|
|
23
|
+
Date: "date",
|
|
24
|
+
ShortAnswer: "short answer",
|
|
25
|
+
LongAnswer: "long answer",
|
|
26
|
+
} as const;
|
|
27
|
+
/**
|
|
28
|
+
* The type of answer option.
|
|
29
|
+
*/
|
|
30
|
+
export type AnswerType = ClosedEnum<typeof AnswerType>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Reduced list of attributes of ScreeningAnswer records
|
|
34
|
+
*/
|
|
35
|
+
export type ScreeningAnswer = {
|
|
36
|
+
id: number;
|
|
37
|
+
screeningQuestionId?: number | null | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* The content of the screening answer option.
|
|
40
|
+
*/
|
|
41
|
+
answer?: string | null | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The type of answer option.
|
|
44
|
+
*/
|
|
45
|
+
answerType?: AnswerType | null | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The title or label for the answer input field.
|
|
48
|
+
*/
|
|
49
|
+
answerTitle?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Whether or not to allow an empty answer for this option.
|
|
52
|
+
*/
|
|
53
|
+
allowEmptyAnswer: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* The error message to display if an empty answer is submitted when not allowed.
|
|
56
|
+
*/
|
|
57
|
+
emptyAnswerErrorMessage?: string | null | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Whether or not to show a confirmation prompt when this answer is selected.
|
|
60
|
+
*/
|
|
61
|
+
showConfirmation: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* The text to display in the confirmation prompt.
|
|
64
|
+
*/
|
|
65
|
+
confirmationText?: string | null | undefined;
|
|
66
|
+
priority?: number | null | undefined;
|
|
67
|
+
screeningQuestions?: Array<ScreeningQuestion> | null | undefined;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const AnswerType$inboundSchema: z.ZodNativeEnum<typeof AnswerType> = z
|
|
72
|
+
.nativeEnum(AnswerType);
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const AnswerType$outboundSchema: z.ZodNativeEnum<typeof AnswerType> =
|
|
76
|
+
AnswerType$inboundSchema;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
81
|
+
*/
|
|
82
|
+
export namespace AnswerType$ {
|
|
83
|
+
/** @deprecated use `AnswerType$inboundSchema` instead. */
|
|
84
|
+
export const inboundSchema = AnswerType$inboundSchema;
|
|
85
|
+
/** @deprecated use `AnswerType$outboundSchema` instead. */
|
|
86
|
+
export const outboundSchema = AnswerType$outboundSchema;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const ScreeningAnswer$inboundSchema: z.ZodType<
|
|
91
|
+
ScreeningAnswer,
|
|
92
|
+
z.ZodTypeDef,
|
|
93
|
+
unknown
|
|
94
|
+
> = z.object({
|
|
95
|
+
id: z.number().int(),
|
|
96
|
+
screening_question_id: z.nullable(z.number().int()).optional(),
|
|
97
|
+
answer: z.nullable(z.string()).optional(),
|
|
98
|
+
answer_type: z.nullable(AnswerType$inboundSchema).optional(),
|
|
99
|
+
answer_title: z.nullable(z.string()).optional(),
|
|
100
|
+
allow_empty_answer: z.boolean(),
|
|
101
|
+
empty_answer_error_message: z.nullable(z.string()).optional(),
|
|
102
|
+
show_confirmation: z.boolean(),
|
|
103
|
+
confirmation_text: z.nullable(z.string()).optional(),
|
|
104
|
+
priority: z.nullable(z.number().int()).optional(),
|
|
105
|
+
screening_questions: z.nullable(
|
|
106
|
+
z.array(z.lazy(() => ScreeningQuestion$inboundSchema)),
|
|
107
|
+
).optional(),
|
|
108
|
+
}).transform((v) => {
|
|
109
|
+
return remap$(v, {
|
|
110
|
+
"screening_question_id": "screeningQuestionId",
|
|
111
|
+
"answer_type": "answerType",
|
|
112
|
+
"answer_title": "answerTitle",
|
|
113
|
+
"allow_empty_answer": "allowEmptyAnswer",
|
|
114
|
+
"empty_answer_error_message": "emptyAnswerErrorMessage",
|
|
115
|
+
"show_confirmation": "showConfirmation",
|
|
116
|
+
"confirmation_text": "confirmationText",
|
|
117
|
+
"screening_questions": "screeningQuestions",
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export type ScreeningAnswer$Outbound = {
|
|
123
|
+
id: number;
|
|
124
|
+
screening_question_id?: number | null | undefined;
|
|
125
|
+
answer?: string | null | undefined;
|
|
126
|
+
answer_type?: string | null | undefined;
|
|
127
|
+
answer_title?: string | null | undefined;
|
|
128
|
+
allow_empty_answer: boolean;
|
|
129
|
+
empty_answer_error_message?: string | null | undefined;
|
|
130
|
+
show_confirmation: boolean;
|
|
131
|
+
confirmation_text?: string | null | undefined;
|
|
132
|
+
priority?: number | null | undefined;
|
|
133
|
+
screening_questions?: Array<ScreeningQuestion$Outbound> | null | undefined;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/** @internal */
|
|
137
|
+
export const ScreeningAnswer$outboundSchema: z.ZodType<
|
|
138
|
+
ScreeningAnswer$Outbound,
|
|
139
|
+
z.ZodTypeDef,
|
|
140
|
+
ScreeningAnswer
|
|
141
|
+
> = z.object({
|
|
142
|
+
id: z.number().int(),
|
|
143
|
+
screeningQuestionId: z.nullable(z.number().int()).optional(),
|
|
144
|
+
answer: z.nullable(z.string()).optional(),
|
|
145
|
+
answerType: z.nullable(AnswerType$outboundSchema).optional(),
|
|
146
|
+
answerTitle: z.nullable(z.string()).optional(),
|
|
147
|
+
allowEmptyAnswer: z.boolean(),
|
|
148
|
+
emptyAnswerErrorMessage: z.nullable(z.string()).optional(),
|
|
149
|
+
showConfirmation: z.boolean(),
|
|
150
|
+
confirmationText: z.nullable(z.string()).optional(),
|
|
151
|
+
priority: z.nullable(z.number().int()).optional(),
|
|
152
|
+
screeningQuestions: z.nullable(
|
|
153
|
+
z.array(z.lazy(() => ScreeningQuestion$outboundSchema)),
|
|
154
|
+
).optional(),
|
|
155
|
+
}).transform((v) => {
|
|
156
|
+
return remap$(v, {
|
|
157
|
+
screeningQuestionId: "screening_question_id",
|
|
158
|
+
answerType: "answer_type",
|
|
159
|
+
answerTitle: "answer_title",
|
|
160
|
+
allowEmptyAnswer: "allow_empty_answer",
|
|
161
|
+
emptyAnswerErrorMessage: "empty_answer_error_message",
|
|
162
|
+
showConfirmation: "show_confirmation",
|
|
163
|
+
confirmationText: "confirmation_text",
|
|
164
|
+
screeningQuestions: "screening_questions",
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @internal
|
|
170
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
171
|
+
*/
|
|
172
|
+
export namespace ScreeningAnswer$ {
|
|
173
|
+
/** @deprecated use `ScreeningAnswer$inboundSchema` instead. */
|
|
174
|
+
export const inboundSchema = ScreeningAnswer$inboundSchema;
|
|
175
|
+
/** @deprecated use `ScreeningAnswer$outboundSchema` instead. */
|
|
176
|
+
export const outboundSchema = ScreeningAnswer$outboundSchema;
|
|
177
|
+
/** @deprecated use `ScreeningAnswer$Outbound` instead. */
|
|
178
|
+
export type Outbound = ScreeningAnswer$Outbound;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export function screeningAnswerToJSON(
|
|
182
|
+
screeningAnswer: ScreeningAnswer,
|
|
183
|
+
): string {
|
|
184
|
+
return JSON.stringify(ScreeningAnswer$outboundSchema.parse(screeningAnswer));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export function screeningAnswerFromJSON(
|
|
188
|
+
jsonString: string,
|
|
189
|
+
): SafeParseResult<ScreeningAnswer, SDKValidationError> {
|
|
190
|
+
return safeParse(
|
|
191
|
+
jsonString,
|
|
192
|
+
(x) => ScreeningAnswer$inboundSchema.parse(JSON.parse(x)),
|
|
193
|
+
`Failed to parse 'ScreeningAnswer' from JSON`,
|
|
194
|
+
);
|
|
195
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
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
|
+
import {
|
|
12
|
+
ScreeningAnswer,
|
|
13
|
+
ScreeningAnswer$inboundSchema,
|
|
14
|
+
ScreeningAnswer$Outbound,
|
|
15
|
+
ScreeningAnswer$outboundSchema,
|
|
16
|
+
} from "./screeninganswer.js";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The display format for the question.
|
|
20
|
+
*/
|
|
21
|
+
export const PresetDisplayAs = {
|
|
22
|
+
FloatingButtons: "floating buttons",
|
|
23
|
+
LineButtons: "line buttons",
|
|
24
|
+
Radio: "radio",
|
|
25
|
+
Select: "select",
|
|
26
|
+
Checkbox: "checkbox",
|
|
27
|
+
Checkbox2Column: "checkbox (2-column)",
|
|
28
|
+
} as const;
|
|
29
|
+
/**
|
|
30
|
+
* The display format for the question.
|
|
31
|
+
*/
|
|
32
|
+
export type PresetDisplayAs = ClosedEnum<typeof PresetDisplayAs>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Reduced list of attributes of ScreeningQuestion record
|
|
36
|
+
*/
|
|
37
|
+
export type ScreeningQuestion = {
|
|
38
|
+
id: number;
|
|
39
|
+
screeningQuestionSeriesId: number;
|
|
40
|
+
screeningAnswerId?: number | null | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The order for displaying the question relative to other questions in the same series. Questions with lower priority values should be shown first.
|
|
43
|
+
*/
|
|
44
|
+
priority?: number | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The content of the screening question to be presented.
|
|
47
|
+
*/
|
|
48
|
+
question?: string | null | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* The display format for the question.
|
|
51
|
+
*/
|
|
52
|
+
presetDisplayAs?: PresetDisplayAs | null | undefined;
|
|
53
|
+
screeningAnswers?: Array<ScreeningAnswer> | undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const PresetDisplayAs$inboundSchema: z.ZodNativeEnum<
|
|
58
|
+
typeof PresetDisplayAs
|
|
59
|
+
> = z.nativeEnum(PresetDisplayAs);
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const PresetDisplayAs$outboundSchema: z.ZodNativeEnum<
|
|
63
|
+
typeof PresetDisplayAs
|
|
64
|
+
> = PresetDisplayAs$inboundSchema;
|
|
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 PresetDisplayAs$ {
|
|
71
|
+
/** @deprecated use `PresetDisplayAs$inboundSchema` instead. */
|
|
72
|
+
export const inboundSchema = PresetDisplayAs$inboundSchema;
|
|
73
|
+
/** @deprecated use `PresetDisplayAs$outboundSchema` instead. */
|
|
74
|
+
export const outboundSchema = PresetDisplayAs$outboundSchema;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const ScreeningQuestion$inboundSchema: z.ZodType<
|
|
79
|
+
ScreeningQuestion,
|
|
80
|
+
z.ZodTypeDef,
|
|
81
|
+
unknown
|
|
82
|
+
> = z.object({
|
|
83
|
+
id: z.number().int(),
|
|
84
|
+
screening_question_series_id: z.number().int(),
|
|
85
|
+
screening_answer_id: z.nullable(z.number().int()).optional(),
|
|
86
|
+
priority: z.nullable(z.number().int()).optional(),
|
|
87
|
+
question: z.nullable(z.string()).optional(),
|
|
88
|
+
preset_display_as: z.nullable(PresetDisplayAs$inboundSchema).optional(),
|
|
89
|
+
screening_answers: z.array(z.lazy(() => ScreeningAnswer$inboundSchema))
|
|
90
|
+
.optional(),
|
|
91
|
+
}).transform((v) => {
|
|
92
|
+
return remap$(v, {
|
|
93
|
+
"screening_question_series_id": "screeningQuestionSeriesId",
|
|
94
|
+
"screening_answer_id": "screeningAnswerId",
|
|
95
|
+
"preset_display_as": "presetDisplayAs",
|
|
96
|
+
"screening_answers": "screeningAnswers",
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export type ScreeningQuestion$Outbound = {
|
|
102
|
+
id: number;
|
|
103
|
+
screening_question_series_id: number;
|
|
104
|
+
screening_answer_id?: number | null | undefined;
|
|
105
|
+
priority?: number | null | undefined;
|
|
106
|
+
question?: string | null | undefined;
|
|
107
|
+
preset_display_as?: string | null | undefined;
|
|
108
|
+
screening_answers?: Array<ScreeningAnswer$Outbound> | undefined;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export const ScreeningQuestion$outboundSchema: z.ZodType<
|
|
113
|
+
ScreeningQuestion$Outbound,
|
|
114
|
+
z.ZodTypeDef,
|
|
115
|
+
ScreeningQuestion
|
|
116
|
+
> = z.object({
|
|
117
|
+
id: z.number().int(),
|
|
118
|
+
screeningQuestionSeriesId: z.number().int(),
|
|
119
|
+
screeningAnswerId: z.nullable(z.number().int()).optional(),
|
|
120
|
+
priority: z.nullable(z.number().int()).optional(),
|
|
121
|
+
question: z.nullable(z.string()).optional(),
|
|
122
|
+
presetDisplayAs: z.nullable(PresetDisplayAs$outboundSchema).optional(),
|
|
123
|
+
screeningAnswers: z.array(z.lazy(() => ScreeningAnswer$outboundSchema))
|
|
124
|
+
.optional(),
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
screeningQuestionSeriesId: "screening_question_series_id",
|
|
128
|
+
screeningAnswerId: "screening_answer_id",
|
|
129
|
+
presetDisplayAs: "preset_display_as",
|
|
130
|
+
screeningAnswers: "screening_answers",
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @internal
|
|
136
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
137
|
+
*/
|
|
138
|
+
export namespace ScreeningQuestion$ {
|
|
139
|
+
/** @deprecated use `ScreeningQuestion$inboundSchema` instead. */
|
|
140
|
+
export const inboundSchema = ScreeningQuestion$inboundSchema;
|
|
141
|
+
/** @deprecated use `ScreeningQuestion$outboundSchema` instead. */
|
|
142
|
+
export const outboundSchema = ScreeningQuestion$outboundSchema;
|
|
143
|
+
/** @deprecated use `ScreeningQuestion$Outbound` instead. */
|
|
144
|
+
export type Outbound = ScreeningQuestion$Outbound;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function screeningQuestionToJSON(
|
|
148
|
+
screeningQuestion: ScreeningQuestion,
|
|
149
|
+
): string {
|
|
150
|
+
return JSON.stringify(
|
|
151
|
+
ScreeningQuestion$outboundSchema.parse(screeningQuestion),
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function screeningQuestionFromJSON(
|
|
156
|
+
jsonString: string,
|
|
157
|
+
): SafeParseResult<ScreeningQuestion, SDKValidationError> {
|
|
158
|
+
return safeParse(
|
|
159
|
+
jsonString,
|
|
160
|
+
(x) => ScreeningQuestion$inboundSchema.parse(JSON.parse(x)),
|
|
161
|
+
`Failed to parse 'ScreeningQuestion' from JSON`,
|
|
162
|
+
);
|
|
163
|
+
}
|
|
@@ -8,7 +8,6 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
import { State, State$inboundSchema, State$outboundSchema } from "./state.js";
|
|
12
11
|
|
|
13
12
|
export const Timezone = {
|
|
14
13
|
InternationalDateLineWest: "International Date Line West",
|
|
@@ -173,10 +172,7 @@ export type UserLocation = {
|
|
|
173
172
|
address1?: string | null | undefined;
|
|
174
173
|
address2?: string | null | undefined;
|
|
175
174
|
city?: string | null | undefined;
|
|
176
|
-
|
|
177
|
-
* The list of states
|
|
178
|
-
*/
|
|
179
|
-
state?: State | null | undefined;
|
|
175
|
+
state?: string | null | undefined;
|
|
180
176
|
zip?: string | null | undefined;
|
|
181
177
|
phone?: string | null | undefined;
|
|
182
178
|
mobilePhone?: string | null | undefined;
|
|
@@ -214,7 +210,7 @@ export const UserLocation$inboundSchema: z.ZodType<
|
|
|
214
210
|
address1: z.nullable(z.string()).optional(),
|
|
215
211
|
address2: z.nullable(z.string()).optional(),
|
|
216
212
|
city: z.nullable(z.string()).optional(),
|
|
217
|
-
state: z.nullable(
|
|
213
|
+
state: z.nullable(z.string()).optional(),
|
|
218
214
|
zip: z.nullable(z.string()).optional(),
|
|
219
215
|
phone: z.nullable(z.string()).optional(),
|
|
220
216
|
mobile_phone: z.nullable(z.string()).optional(),
|
|
@@ -252,7 +248,7 @@ export const UserLocation$outboundSchema: z.ZodType<
|
|
|
252
248
|
address1: z.nullable(z.string()).optional(),
|
|
253
249
|
address2: z.nullable(z.string()).optional(),
|
|
254
250
|
city: z.nullable(z.string()).optional(),
|
|
255
|
-
state: z.nullable(
|
|
251
|
+
state: z.nullable(z.string()).optional(),
|
|
256
252
|
zip: z.nullable(z.string()).optional(),
|
|
257
253
|
phone: z.nullable(z.string()).optional(),
|
|
258
254
|
mobilePhone: z.nullable(z.string()).optional(),
|