@greensecurity/javascript-sdk 0.40.8-beta.3 → 0.40.8-beta.31
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/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__/zones.test.js +3 -2
- 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 +7 -2
- package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendor.js +11 -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__/zones.test.js +3 -2
- 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 +7 -2
- package/dist/esm/models/components/vendor.d.ts.map +1 -1
- package/dist/esm/models/components/vendor.js +11 -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/docs/sdks/alerts/README.md +219 -0
- package/docs/sdks/companies/README.md +126 -0
- package/docs/sdks/datarequests/README.md +302 -0
- package/docs/sdks/events/README.md +1126 -0
- package/docs/sdks/fhirconfigs/README.md +551 -0
- package/docs/sdks/greensecurity/README.md +14 -0
- package/docs/sdks/invoices/README.md +324 -0
- package/docs/sdks/mobiledevices/README.md +100 -0
- package/docs/sdks/organizations/README.md +508 -0
- package/docs/sdks/supportarticles/README.md +249 -0
- package/docs/sdks/systems/README.md +136 -0
- package/docs/sdks/users/README.md +831 -0
- package/docs/sdks/vendors/README.md +4904 -0
- package/docs/sdks/vendorscans/README.md +104 -0
- package/docs/sdks/webhooks/README.md +352 -0
- package/docs/sdks/zones/README.md +344 -0
- package/examples/README.md +31 -0
- 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__/zones.test.ts +3 -2
- 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 +25 -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,104 @@
|
|
|
1
|
+
# VendorScans
|
|
2
|
+
(*vendorScans*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [vendorScanOut](#vendorscanout) - Vendor scan out
|
|
9
|
+
|
|
10
|
+
## vendorScanOut
|
|
11
|
+
|
|
12
|
+
It scans out vendor from facility
|
|
13
|
+
|
|
14
|
+
### Example Usage
|
|
15
|
+
|
|
16
|
+
<!-- UsageSnippet language="typescript" operationID="vendorScanOut" method="post" path="/vendor-scans/{id}/scan-out" -->
|
|
17
|
+
```typescript
|
|
18
|
+
import { GreenSecurity } from "@greensecurity/javascript-sdk";
|
|
19
|
+
|
|
20
|
+
const greenSecurity = new GreenSecurity({
|
|
21
|
+
security: {
|
|
22
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
async function run() {
|
|
27
|
+
const result = await greenSecurity.vendorScans.vendorScanOut({
|
|
28
|
+
id: 716728,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
console.log(result);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
run();
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Standalone function
|
|
38
|
+
|
|
39
|
+
The standalone function version of this method:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
|
|
43
|
+
import { vendorScansVendorScanOut } from "@greensecurity/javascript-sdk/funcs/vendorScansVendorScanOut.js";
|
|
44
|
+
|
|
45
|
+
// Use `GreenSecurityCore` for best tree-shaking performance.
|
|
46
|
+
// You can create one instance of it to use across an application.
|
|
47
|
+
const greenSecurity = new GreenSecurityCore({
|
|
48
|
+
security: {
|
|
49
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
async function run() {
|
|
54
|
+
const res = await vendorScansVendorScanOut(greenSecurity, {
|
|
55
|
+
id: 716728,
|
|
56
|
+
});
|
|
57
|
+
if (res.ok) {
|
|
58
|
+
const { value: result } = res;
|
|
59
|
+
console.log(result);
|
|
60
|
+
} else {
|
|
61
|
+
console.log("vendorScansVendorScanOut failed:", res.error);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
run();
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### React hooks and utilities
|
|
69
|
+
|
|
70
|
+
This method can be used in React components through the following hooks and
|
|
71
|
+
associated utilities.
|
|
72
|
+
|
|
73
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
74
|
+
> below and how to get started using React hooks.
|
|
75
|
+
|
|
76
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
import {
|
|
80
|
+
// Mutation hook for triggering the API call.
|
|
81
|
+
useVendorScansVendorScanOutMutation
|
|
82
|
+
} from "@greensecurity/javascript-sdk/react-query/vendorScansVendorScanOut.js";
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Parameters
|
|
86
|
+
|
|
87
|
+
| Parameter | Type | Required | Description |
|
|
88
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
89
|
+
| `request` | [operations.VendorScanOutRequest](../../models/operations/vendorscanoutrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
90
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
91
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
92
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
93
|
+
|
|
94
|
+
### Response
|
|
95
|
+
|
|
96
|
+
**Promise\<[operations.VendorScanOutVendorScanOutOk](../../models/operations/vendorscanoutvendorscanoutok.md)\>**
|
|
97
|
+
|
|
98
|
+
### Errors
|
|
99
|
+
|
|
100
|
+
| Error Type | Status Code | Content Type |
|
|
101
|
+
| ----------------------- | ----------------------- | ----------------------- |
|
|
102
|
+
| errors.ApiErrorResponse | 400, 401, 403, 404 | application/json |
|
|
103
|
+
| errors.ApiErrorResponse | 500 | application/json |
|
|
104
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# Webhooks
|
|
2
|
+
(*webhooks*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [listAllWebhookEndpoints](#listallwebhookendpoints) - List all webhook endpoints
|
|
9
|
+
* [getWebhookEndpoint](#getwebhookendpoint) - Retrieves the webhook endpoint with the given ID.
|
|
10
|
+
* [updatesTheWebhookEndpointWithTheGivenId](#updatesthewebhookendpointwiththegivenid) - Updates the webhook endpoint with the given ID.
|
|
11
|
+
|
|
12
|
+
## listAllWebhookEndpoints
|
|
13
|
+
|
|
14
|
+
Returns a list of your webhook endpoints.
|
|
15
|
+
|
|
16
|
+
### Example Usage
|
|
17
|
+
|
|
18
|
+
<!-- UsageSnippet language="typescript" operationID="listAllWebhookEndpoints" method="get" path="/webhooks" -->
|
|
19
|
+
```typescript
|
|
20
|
+
import { GreenSecurity } from "@greensecurity/javascript-sdk";
|
|
21
|
+
|
|
22
|
+
const greenSecurity = new GreenSecurity({
|
|
23
|
+
security: {
|
|
24
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
async function run() {
|
|
29
|
+
const result = await greenSecurity.webhooks.listAllWebhookEndpoints({
|
|
30
|
+
itemsPerPage: 25,
|
|
31
|
+
desc: true,
|
|
32
|
+
sort: "job",
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
console.log(result);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
run();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Standalone function
|
|
42
|
+
|
|
43
|
+
The standalone function version of this method:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
|
|
47
|
+
import { webhooksListAllWebhookEndpoints } from "@greensecurity/javascript-sdk/funcs/webhooksListAllWebhookEndpoints.js";
|
|
48
|
+
|
|
49
|
+
// Use `GreenSecurityCore` for best tree-shaking performance.
|
|
50
|
+
// You can create one instance of it to use across an application.
|
|
51
|
+
const greenSecurity = new GreenSecurityCore({
|
|
52
|
+
security: {
|
|
53
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
async function run() {
|
|
58
|
+
const res = await webhooksListAllWebhookEndpoints(greenSecurity, {
|
|
59
|
+
itemsPerPage: 25,
|
|
60
|
+
desc: true,
|
|
61
|
+
sort: "job",
|
|
62
|
+
});
|
|
63
|
+
if (res.ok) {
|
|
64
|
+
const { value: result } = res;
|
|
65
|
+
console.log(result);
|
|
66
|
+
} else {
|
|
67
|
+
console.log("webhooksListAllWebhookEndpoints failed:", res.error);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
run();
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### React hooks and utilities
|
|
75
|
+
|
|
76
|
+
This method can be used in React components through the following hooks and
|
|
77
|
+
associated utilities.
|
|
78
|
+
|
|
79
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
80
|
+
> below and how to get started using React hooks.
|
|
81
|
+
|
|
82
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
83
|
+
|
|
84
|
+
```tsx
|
|
85
|
+
import {
|
|
86
|
+
// Query hooks for fetching data.
|
|
87
|
+
useWebhooksListAllWebhookEndpoints,
|
|
88
|
+
useWebhooksListAllWebhookEndpointsSuspense,
|
|
89
|
+
|
|
90
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
91
|
+
// Server Components that will be immediately available to client components
|
|
92
|
+
// using the hooks.
|
|
93
|
+
prefetchWebhooksListAllWebhookEndpoints,
|
|
94
|
+
|
|
95
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
96
|
+
// mutations and other user actions.
|
|
97
|
+
invalidateWebhooksListAllWebhookEndpoints,
|
|
98
|
+
invalidateAllWebhooksListAllWebhookEndpoints,
|
|
99
|
+
} from "@greensecurity/javascript-sdk/react-query/webhooksListAllWebhookEndpoints.js";
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Parameters
|
|
103
|
+
|
|
104
|
+
| Parameter | Type | Required | Description |
|
|
105
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
106
|
+
| `request` | [operations.ListAllWebhookEndpointsRequest](../../models/operations/listallwebhookendpointsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
107
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
108
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
109
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
110
|
+
|
|
111
|
+
### Response
|
|
112
|
+
|
|
113
|
+
**Promise\<[operations.ListAllWebhookEndpointsListAllWebhookEndpointsOk](../../models/operations/listallwebhookendpointslistallwebhookendpointsok.md)\>**
|
|
114
|
+
|
|
115
|
+
### Errors
|
|
116
|
+
|
|
117
|
+
| Error Type | Status Code | Content Type |
|
|
118
|
+
| ----------------------- | ----------------------- | ----------------------- |
|
|
119
|
+
| errors.ApiErrorResponse | 400, 401, 403 | application/json |
|
|
120
|
+
| errors.ApiErrorResponse | 500 | application/json |
|
|
121
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
122
|
+
|
|
123
|
+
## getWebhookEndpoint
|
|
124
|
+
|
|
125
|
+
Returns the definition of a webhook endpoint by ID.
|
|
126
|
+
|
|
127
|
+
### Example Usage
|
|
128
|
+
|
|
129
|
+
<!-- UsageSnippet language="typescript" operationID="getWebhookEndpoint" method="get" path="/webhooks/{id}" -->
|
|
130
|
+
```typescript
|
|
131
|
+
import { GreenSecurity } from "@greensecurity/javascript-sdk";
|
|
132
|
+
|
|
133
|
+
const greenSecurity = new GreenSecurity({
|
|
134
|
+
security: {
|
|
135
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
async function run() {
|
|
140
|
+
const result = await greenSecurity.webhooks.getWebhookEndpoint({
|
|
141
|
+
id: 304761,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
console.log(result);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
run();
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Standalone function
|
|
151
|
+
|
|
152
|
+
The standalone function version of this method:
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
|
|
156
|
+
import { webhooksGetWebhookEndpoint } from "@greensecurity/javascript-sdk/funcs/webhooksGetWebhookEndpoint.js";
|
|
157
|
+
|
|
158
|
+
// Use `GreenSecurityCore` for best tree-shaking performance.
|
|
159
|
+
// You can create one instance of it to use across an application.
|
|
160
|
+
const greenSecurity = new GreenSecurityCore({
|
|
161
|
+
security: {
|
|
162
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
async function run() {
|
|
167
|
+
const res = await webhooksGetWebhookEndpoint(greenSecurity, {
|
|
168
|
+
id: 304761,
|
|
169
|
+
});
|
|
170
|
+
if (res.ok) {
|
|
171
|
+
const { value: result } = res;
|
|
172
|
+
console.log(result);
|
|
173
|
+
} else {
|
|
174
|
+
console.log("webhooksGetWebhookEndpoint failed:", res.error);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
run();
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### React hooks and utilities
|
|
182
|
+
|
|
183
|
+
This method can be used in React components through the following hooks and
|
|
184
|
+
associated utilities.
|
|
185
|
+
|
|
186
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
187
|
+
> below and how to get started using React hooks.
|
|
188
|
+
|
|
189
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
190
|
+
|
|
191
|
+
```tsx
|
|
192
|
+
import {
|
|
193
|
+
// Query hooks for fetching data.
|
|
194
|
+
useWebhooksGetWebhookEndpoint,
|
|
195
|
+
useWebhooksGetWebhookEndpointSuspense,
|
|
196
|
+
|
|
197
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
198
|
+
// Server Components that will be immediately available to client components
|
|
199
|
+
// using the hooks.
|
|
200
|
+
prefetchWebhooksGetWebhookEndpoint,
|
|
201
|
+
|
|
202
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
203
|
+
// mutations and other user actions.
|
|
204
|
+
invalidateWebhooksGetWebhookEndpoint,
|
|
205
|
+
invalidateAllWebhooksGetWebhookEndpoint,
|
|
206
|
+
} from "@greensecurity/javascript-sdk/react-query/webhooksGetWebhookEndpoint.js";
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Parameters
|
|
210
|
+
|
|
211
|
+
| Parameter | Type | Required | Description |
|
|
212
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
213
|
+
| `request` | [operations.GetWebhookEndpointRequest](../../models/operations/getwebhookendpointrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
214
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
215
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
216
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
217
|
+
|
|
218
|
+
### Response
|
|
219
|
+
|
|
220
|
+
**Promise\<[components.WebhookEndpoint](../../models/components/webhookendpoint.md)\>**
|
|
221
|
+
|
|
222
|
+
### Errors
|
|
223
|
+
|
|
224
|
+
| Error Type | Status Code | Content Type |
|
|
225
|
+
| ----------------------- | ----------------------- | ----------------------- |
|
|
226
|
+
| errors.ApiErrorResponse | 400, 401, 403, 404 | application/json |
|
|
227
|
+
| errors.ApiErrorResponse | 500 | application/json |
|
|
228
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
229
|
+
|
|
230
|
+
## updatesTheWebhookEndpointWithTheGivenId
|
|
231
|
+
|
|
232
|
+
Updates the webhook endpoint with the given ID.
|
|
233
|
+
|
|
234
|
+
### Example Usage
|
|
235
|
+
|
|
236
|
+
<!-- UsageSnippet language="typescript" operationID="updatesTheWebhookEndpointWithTheGivenId" method="put" path="/webhooks/{id}" -->
|
|
237
|
+
```typescript
|
|
238
|
+
import { GreenSecurity } from "@greensecurity/javascript-sdk";
|
|
239
|
+
|
|
240
|
+
const greenSecurity = new GreenSecurity({
|
|
241
|
+
security: {
|
|
242
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
243
|
+
},
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
async function run() {
|
|
247
|
+
const result = await greenSecurity.webhooks.updatesTheWebhookEndpointWithTheGivenId({
|
|
248
|
+
id: 220782,
|
|
249
|
+
webhookEndpoint: {
|
|
250
|
+
id: 1,
|
|
251
|
+
webhookUrl: "https://example.com/webhook/incoming",
|
|
252
|
+
subscriptions: [
|
|
253
|
+
"<value 1>",
|
|
254
|
+
"<value 2>",
|
|
255
|
+
],
|
|
256
|
+
consumers: {
|
|
257
|
+
systemId: 1,
|
|
258
|
+
facilityId: 1,
|
|
259
|
+
companyId: 1,
|
|
260
|
+
userId: 1,
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
console.log(result);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
run();
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Standalone function
|
|
272
|
+
|
|
273
|
+
The standalone function version of this method:
|
|
274
|
+
|
|
275
|
+
```typescript
|
|
276
|
+
import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
|
|
277
|
+
import { webhooksUpdatesTheWebhookEndpointWithTheGivenId } from "@greensecurity/javascript-sdk/funcs/webhooksUpdatesTheWebhookEndpointWithTheGivenId.js";
|
|
278
|
+
|
|
279
|
+
// Use `GreenSecurityCore` for best tree-shaking performance.
|
|
280
|
+
// You can create one instance of it to use across an application.
|
|
281
|
+
const greenSecurity = new GreenSecurityCore({
|
|
282
|
+
security: {
|
|
283
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
284
|
+
},
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
async function run() {
|
|
288
|
+
const res = await webhooksUpdatesTheWebhookEndpointWithTheGivenId(greenSecurity, {
|
|
289
|
+
id: 220782,
|
|
290
|
+
webhookEndpoint: {
|
|
291
|
+
id: 1,
|
|
292
|
+
webhookUrl: "https://example.com/webhook/incoming",
|
|
293
|
+
subscriptions: [
|
|
294
|
+
"<value 1>",
|
|
295
|
+
"<value 2>",
|
|
296
|
+
],
|
|
297
|
+
consumers: {
|
|
298
|
+
systemId: 1,
|
|
299
|
+
facilityId: 1,
|
|
300
|
+
companyId: 1,
|
|
301
|
+
userId: 1,
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
});
|
|
305
|
+
if (res.ok) {
|
|
306
|
+
const { value: result } = res;
|
|
307
|
+
console.log(result);
|
|
308
|
+
} else {
|
|
309
|
+
console.log("webhooksUpdatesTheWebhookEndpointWithTheGivenId failed:", res.error);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
run();
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### React hooks and utilities
|
|
317
|
+
|
|
318
|
+
This method can be used in React components through the following hooks and
|
|
319
|
+
associated utilities.
|
|
320
|
+
|
|
321
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
322
|
+
> below and how to get started using React hooks.
|
|
323
|
+
|
|
324
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
325
|
+
|
|
326
|
+
```tsx
|
|
327
|
+
import {
|
|
328
|
+
// Mutation hook for triggering the API call.
|
|
329
|
+
useWebhooksUpdatesTheWebhookEndpointWithTheGivenIdMutation
|
|
330
|
+
} from "@greensecurity/javascript-sdk/react-query/webhooksUpdatesTheWebhookEndpointWithTheGivenId.js";
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Parameters
|
|
334
|
+
|
|
335
|
+
| Parameter | Type | Required | Description |
|
|
336
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
337
|
+
| `request` | [operations.UpdatesTheWebhookEndpointWithTheGivenIdRequest](../../models/operations/updatesthewebhookendpointwiththegivenidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
338
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
339
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
340
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
341
|
+
|
|
342
|
+
### Response
|
|
343
|
+
|
|
344
|
+
**Promise\<[components.WebhookEndpoint](../../models/components/webhookendpoint.md)\>**
|
|
345
|
+
|
|
346
|
+
### Errors
|
|
347
|
+
|
|
348
|
+
| Error Type | Status Code | Content Type |
|
|
349
|
+
| ----------------------- | ----------------------- | ----------------------- |
|
|
350
|
+
| errors.ApiErrorResponse | 400, 401, 403, 404 | application/json |
|
|
351
|
+
| errors.ApiErrorResponse | 500 | application/json |
|
|
352
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|