@greensecurity/javascript-sdk 0.45.0-beta.13 → 0.45.0-beta.15
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 +7 -1
- package/dist/commonjs/__tests__/companies.test.js +17 -0
- package/dist/commonjs/__tests__/companies.test.js.map +1 -1
- package/dist/commonjs/__tests__/doAdmin.test.js +51 -0
- package/dist/commonjs/__tests__/doAdmin.test.js.map +1 -1
- package/dist/commonjs/__tests__/kiosk.test.d.ts +2 -0
- package/dist/commonjs/__tests__/kiosk.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/kiosk.test.js +123 -0
- package/dist/commonjs/__tests__/kiosk.test.js.map +1 -0
- package/dist/commonjs/__tests__/lookups.test.js +21 -0
- package/dist/commonjs/__tests__/lookups.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +5 -4
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +12 -9
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/admin-funcs/dismissCommunication.d.ts +3 -0
- package/dist/commonjs/admin-funcs/dismissCommunication.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/dismissCommunication.js +20 -0
- package/dist/commonjs/admin-funcs/dismissCommunication.js.map +1 -0
- package/dist/commonjs/admin-funcs/doAdmin.d.ts +4 -0
- package/dist/commonjs/admin-funcs/doAdmin.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/doAdmin.js +58 -0
- package/dist/commonjs/admin-funcs/doAdmin.js.map +1 -1
- package/dist/commonjs/admin-funcs/kioskCreateEvent.d.ts +3 -0
- package/dist/commonjs/admin-funcs/kioskCreateEvent.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/kioskCreateEvent.js +11 -0
- package/dist/commonjs/admin-funcs/kioskCreateEvent.js.map +1 -0
- package/dist/commonjs/admin-funcs/kioskCreateKioskDevice.d.ts +7 -0
- package/dist/commonjs/admin-funcs/kioskCreateKioskDevice.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/kioskCreateKioskDevice.js +11 -0
- package/dist/commonjs/admin-funcs/kioskCreateKioskDevice.js.map +1 -0
- package/dist/commonjs/admin-funcs/kioskCreateZoneDevice.d.ts +3 -0
- package/dist/commonjs/admin-funcs/kioskCreateZoneDevice.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/kioskCreateZoneDevice.js +11 -0
- package/dist/commonjs/admin-funcs/kioskCreateZoneDevice.js.map +1 -0
- package/dist/commonjs/admin-funcs/kioskGetKioskDevice.d.ts +3 -0
- package/dist/commonjs/admin-funcs/kioskGetKioskDevice.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/kioskGetKioskDevice.js +11 -0
- package/dist/commonjs/admin-funcs/kioskGetKioskDevice.js.map +1 -0
- package/dist/commonjs/admin-funcs/kioskHeartbeat.d.ts +8 -0
- package/dist/commonjs/admin-funcs/kioskHeartbeat.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/kioskHeartbeat.js +11 -0
- package/dist/commonjs/admin-funcs/kioskHeartbeat.js.map +1 -0
- package/dist/commonjs/admin-funcs/kioskPing2.d.ts +4 -0
- package/dist/commonjs/admin-funcs/kioskPing2.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/kioskPing2.js +10 -0
- package/dist/commonjs/admin-funcs/kioskPing2.js.map +1 -0
- package/dist/commonjs/admin-funcs/kioskUpdateKioskDevice.d.ts +9 -0
- package/dist/commonjs/admin-funcs/kioskUpdateKioskDevice.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/kioskUpdateKioskDevice.js +10 -0
- package/dist/commonjs/admin-funcs/kioskUpdateKioskDevice.js.map +1 -0
- package/dist/commonjs/admin-funcs/listCommunications.d.ts +3 -0
- package/dist/commonjs/admin-funcs/listCommunications.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/listCommunications.js +25 -0
- package/dist/commonjs/admin-funcs/listCommunications.js.map +1 -0
- package/dist/commonjs/funcs/companiesListCompanyManagerContacts.d.ts +18 -0
- package/dist/commonjs/funcs/companiesListCompanyManagerContacts.d.ts.map +1 -0
- package/dist/commonjs/funcs/companiesListCompanyManagerContacts.js +124 -0
- package/dist/commonjs/funcs/companiesListCompanyManagerContacts.js.map +1 -0
- package/dist/commonjs/funcs/lookupsLookupPostalCode.d.ts +35 -0
- package/dist/commonjs/funcs/lookupsLookupPostalCode.d.ts.map +1 -0
- package/dist/commonjs/funcs/lookupsLookupPostalCode.js +140 -0
- package/dist/commonjs/funcs/lookupsLookupPostalCode.js.map +1 -0
- package/dist/commonjs/funcs/usersUpdateUser.d.ts +6 -0
- package/dist/commonjs/funcs/usersUpdateUser.d.ts.map +1 -1
- package/dist/commonjs/funcs/usersUpdateUser.js +6 -0
- package/dist/commonjs/funcs/usersUpdateUser.js.map +1 -1
- package/dist/commonjs/funcs/vendorsCreateVendor.d.ts +4 -0
- package/dist/commonjs/funcs/vendorsCreateVendor.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsCreateVendor.js +4 -0
- package/dist/commonjs/funcs/vendorsCreateVendor.js.map +1 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts +9 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js +9 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/commonjs/index.extras.d.ts +22 -0
- package/dist/commonjs/index.extras.d.ts.map +1 -1
- package/dist/commonjs/index.extras.js +24 -0
- package/dist/commonjs/index.extras.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/companymanagercontact.d.ts +19 -0
- package/dist/commonjs/models/components/companymanagercontact.d.ts.map +1 -0
- package/dist/commonjs/models/components/companymanagercontact.js +60 -0
- package/dist/commonjs/models/components/companymanagercontact.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/operations/createvendorcompany.d.ts +7 -1
- package/dist/commonjs/models/operations/createvendorcompany.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createvendorcompany.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listcompanymanagercontacts.d.ts +27 -0
- package/dist/commonjs/models/operations/listcompanymanagercontacts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listcompanymanagercontacts.js +65 -0
- package/dist/commonjs/models/operations/listcompanymanagercontacts.js.map +1 -0
- package/dist/commonjs/models/operations/lookuppostalcode.d.ts +59 -0
- package/dist/commonjs/models/operations/lookuppostalcode.d.ts.map +1 -0
- package/dist/commonjs/models/operations/lookuppostalcode.js +81 -0
- package/dist/commonjs/models/operations/lookuppostalcode.js.map +1 -0
- package/dist/commonjs/react-query/companiesListCompanyManagerContacts.core.d.ts +12 -0
- package/dist/commonjs/react-query/companiesListCompanyManagerContacts.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/companiesListCompanyManagerContacts.core.js +39 -0
- package/dist/commonjs/react-query/companiesListCompanyManagerContacts.core.js.map +1 -0
- package/dist/commonjs/react-query/companiesListCompanyManagerContacts.d.ts +29 -0
- package/dist/commonjs/react-query/companiesListCompanyManagerContacts.d.ts.map +1 -0
- package/dist/commonjs/react-query/companiesListCompanyManagerContacts.js +69 -0
- package/dist/commonjs/react-query/companiesListCompanyManagerContacts.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +2 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +2 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/lookupsLookupPostalCode.core.d.ts +16 -0
- package/dist/commonjs/react-query/lookupsLookupPostalCode.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/lookupsLookupPostalCode.core.js +43 -0
- package/dist/commonjs/react-query/lookupsLookupPostalCode.core.js.map +1 -0
- package/dist/commonjs/react-query/lookupsLookupPostalCode.d.ts +71 -0
- package/dist/commonjs/react-query/lookupsLookupPostalCode.d.ts.map +1 -0
- package/dist/commonjs/react-query/lookupsLookupPostalCode.js +95 -0
- package/dist/commonjs/react-query/lookupsLookupPostalCode.js.map +1 -0
- package/dist/commonjs/react-query/usersUpdateUser.d.ts +6 -0
- package/dist/commonjs/react-query/usersUpdateUser.d.ts.map +1 -1
- package/dist/commonjs/react-query/usersUpdateUser.js +6 -0
- package/dist/commonjs/react-query/usersUpdateUser.js.map +1 -1
- package/dist/commonjs/react-query/vendorsCreateVendor.d.ts +4 -0
- package/dist/commonjs/react-query/vendorsCreateVendor.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsCreateVendor.js +4 -0
- package/dist/commonjs/react-query/vendorsCreateVendor.js.map +1 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts +9 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js +9 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/commonjs/sdk/companies.d.ts +7 -0
- package/dist/commonjs/sdk/companies.d.ts.map +1 -1
- package/dist/commonjs/sdk/companies.js +10 -0
- package/dist/commonjs/sdk/companies.js.map +1 -1
- package/dist/commonjs/sdk/lookups.d.ts +22 -0
- package/dist/commonjs/sdk/lookups.d.ts.map +1 -1
- package/dist/commonjs/sdk/lookups.js +25 -0
- package/dist/commonjs/sdk/lookups.js.map +1 -1
- package/dist/commonjs/sdk/users.d.ts +6 -0
- package/dist/commonjs/sdk/users.d.ts.map +1 -1
- package/dist/commonjs/sdk/users.js +6 -0
- package/dist/commonjs/sdk/users.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +13 -1
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +13 -1
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/companies.test.js +17 -0
- package/dist/esm/__tests__/companies.test.js.map +1 -1
- package/dist/esm/__tests__/doAdmin.test.js +53 -2
- package/dist/esm/__tests__/doAdmin.test.js.map +1 -1
- package/dist/esm/__tests__/kiosk.test.d.ts +2 -0
- package/dist/esm/__tests__/kiosk.test.d.ts.map +1 -0
- package/dist/esm/__tests__/kiosk.test.js +121 -0
- package/dist/esm/__tests__/kiosk.test.js.map +1 -0
- package/dist/esm/__tests__/lookups.test.js +21 -0
- package/dist/esm/__tests__/lookups.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js +5 -4
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +12 -9
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/admin-funcs/dismissCommunication.d.ts +3 -0
- package/dist/esm/admin-funcs/dismissCommunication.d.ts.map +1 -0
- package/dist/esm/admin-funcs/dismissCommunication.js +17 -0
- package/dist/esm/admin-funcs/dismissCommunication.js.map +1 -0
- package/dist/esm/admin-funcs/doAdmin.d.ts +4 -0
- package/dist/esm/admin-funcs/doAdmin.d.ts.map +1 -1
- package/dist/esm/admin-funcs/doAdmin.js +57 -0
- package/dist/esm/admin-funcs/doAdmin.js.map +1 -1
- package/dist/esm/admin-funcs/kioskCreateEvent.d.ts +3 -0
- package/dist/esm/admin-funcs/kioskCreateEvent.d.ts.map +1 -0
- package/dist/esm/admin-funcs/kioskCreateEvent.js +8 -0
- package/dist/esm/admin-funcs/kioskCreateEvent.js.map +1 -0
- package/dist/esm/admin-funcs/kioskCreateKioskDevice.d.ts +7 -0
- package/dist/esm/admin-funcs/kioskCreateKioskDevice.d.ts.map +1 -0
- package/dist/esm/admin-funcs/kioskCreateKioskDevice.js +8 -0
- package/dist/esm/admin-funcs/kioskCreateKioskDevice.js.map +1 -0
- package/dist/esm/admin-funcs/kioskCreateZoneDevice.d.ts +3 -0
- package/dist/esm/admin-funcs/kioskCreateZoneDevice.d.ts.map +1 -0
- package/dist/esm/admin-funcs/kioskCreateZoneDevice.js +8 -0
- package/dist/esm/admin-funcs/kioskCreateZoneDevice.js.map +1 -0
- package/dist/esm/admin-funcs/kioskGetKioskDevice.d.ts +3 -0
- package/dist/esm/admin-funcs/kioskGetKioskDevice.d.ts.map +1 -0
- package/dist/esm/admin-funcs/kioskGetKioskDevice.js +8 -0
- package/dist/esm/admin-funcs/kioskGetKioskDevice.js.map +1 -0
- package/dist/esm/admin-funcs/kioskHeartbeat.d.ts +8 -0
- package/dist/esm/admin-funcs/kioskHeartbeat.d.ts.map +1 -0
- package/dist/esm/admin-funcs/kioskHeartbeat.js +8 -0
- package/dist/esm/admin-funcs/kioskHeartbeat.js.map +1 -0
- package/dist/esm/admin-funcs/kioskPing2.d.ts +4 -0
- package/dist/esm/admin-funcs/kioskPing2.d.ts.map +1 -0
- package/dist/esm/admin-funcs/kioskPing2.js +7 -0
- package/dist/esm/admin-funcs/kioskPing2.js.map +1 -0
- package/dist/esm/admin-funcs/kioskUpdateKioskDevice.d.ts +9 -0
- package/dist/esm/admin-funcs/kioskUpdateKioskDevice.d.ts.map +1 -0
- package/dist/esm/admin-funcs/kioskUpdateKioskDevice.js +7 -0
- package/dist/esm/admin-funcs/kioskUpdateKioskDevice.js.map +1 -0
- package/dist/esm/admin-funcs/listCommunications.d.ts +3 -0
- package/dist/esm/admin-funcs/listCommunications.d.ts.map +1 -0
- package/dist/esm/admin-funcs/listCommunications.js +22 -0
- package/dist/esm/admin-funcs/listCommunications.js.map +1 -0
- package/dist/esm/funcs/companiesListCompanyManagerContacts.d.ts +18 -0
- package/dist/esm/funcs/companiesListCompanyManagerContacts.d.ts.map +1 -0
- package/dist/esm/funcs/companiesListCompanyManagerContacts.js +88 -0
- package/dist/esm/funcs/companiesListCompanyManagerContacts.js.map +1 -0
- package/dist/esm/funcs/lookupsLookupPostalCode.d.ts +35 -0
- package/dist/esm/funcs/lookupsLookupPostalCode.d.ts.map +1 -0
- package/dist/esm/funcs/lookupsLookupPostalCode.js +104 -0
- package/dist/esm/funcs/lookupsLookupPostalCode.js.map +1 -0
- package/dist/esm/funcs/usersUpdateUser.d.ts +6 -0
- package/dist/esm/funcs/usersUpdateUser.d.ts.map +1 -1
- package/dist/esm/funcs/usersUpdateUser.js +6 -0
- package/dist/esm/funcs/usersUpdateUser.js.map +1 -1
- package/dist/esm/funcs/vendorsCreateVendor.d.ts +4 -0
- package/dist/esm/funcs/vendorsCreateVendor.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsCreateVendor.js +4 -0
- package/dist/esm/funcs/vendorsCreateVendor.js.map +1 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts +9 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.js +9 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/esm/index.extras.d.ts +22 -0
- package/dist/esm/index.extras.d.ts.map +1 -1
- package/dist/esm/index.extras.js +24 -0
- package/dist/esm/index.extras.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/companymanagercontact.d.ts +19 -0
- package/dist/esm/models/components/companymanagercontact.d.ts.map +1 -0
- package/dist/esm/models/components/companymanagercontact.js +23 -0
- package/dist/esm/models/components/companymanagercontact.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/operations/createvendorcompany.d.ts +7 -1
- package/dist/esm/models/operations/createvendorcompany.d.ts.map +1 -1
- package/dist/esm/models/operations/createvendorcompany.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listcompanymanagercontacts.d.ts +27 -0
- package/dist/esm/models/operations/listcompanymanagercontacts.d.ts.map +1 -0
- package/dist/esm/models/operations/listcompanymanagercontacts.js +27 -0
- package/dist/esm/models/operations/listcompanymanagercontacts.js.map +1 -0
- package/dist/esm/models/operations/lookuppostalcode.d.ts +59 -0
- package/dist/esm/models/operations/lookuppostalcode.d.ts.map +1 -0
- package/dist/esm/models/operations/lookuppostalcode.js +43 -0
- package/dist/esm/models/operations/lookuppostalcode.js.map +1 -0
- package/dist/esm/react-query/companiesListCompanyManagerContacts.core.d.ts +12 -0
- package/dist/esm/react-query/companiesListCompanyManagerContacts.core.d.ts.map +1 -0
- package/dist/esm/react-query/companiesListCompanyManagerContacts.core.js +34 -0
- package/dist/esm/react-query/companiesListCompanyManagerContacts.core.js.map +1 -0
- package/dist/esm/react-query/companiesListCompanyManagerContacts.d.ts +29 -0
- package/dist/esm/react-query/companiesListCompanyManagerContacts.d.ts.map +1 -0
- package/dist/esm/react-query/companiesListCompanyManagerContacts.js +59 -0
- package/dist/esm/react-query/companiesListCompanyManagerContacts.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +2 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +2 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/lookupsLookupPostalCode.core.d.ts +16 -0
- package/dist/esm/react-query/lookupsLookupPostalCode.core.d.ts.map +1 -0
- package/dist/esm/react-query/lookupsLookupPostalCode.core.js +38 -0
- package/dist/esm/react-query/lookupsLookupPostalCode.core.js.map +1 -0
- package/dist/esm/react-query/lookupsLookupPostalCode.d.ts +71 -0
- package/dist/esm/react-query/lookupsLookupPostalCode.d.ts.map +1 -0
- package/dist/esm/react-query/lookupsLookupPostalCode.js +85 -0
- package/dist/esm/react-query/lookupsLookupPostalCode.js.map +1 -0
- package/dist/esm/react-query/usersUpdateUser.d.ts +6 -0
- package/dist/esm/react-query/usersUpdateUser.d.ts.map +1 -1
- package/dist/esm/react-query/usersUpdateUser.js +6 -0
- package/dist/esm/react-query/usersUpdateUser.js.map +1 -1
- package/dist/esm/react-query/vendorsCreateVendor.d.ts +4 -0
- package/dist/esm/react-query/vendorsCreateVendor.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsCreateVendor.js +4 -0
- package/dist/esm/react-query/vendorsCreateVendor.js.map +1 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts +9 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.js +9 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/esm/sdk/companies.d.ts +7 -0
- package/dist/esm/sdk/companies.d.ts.map +1 -1
- package/dist/esm/sdk/companies.js +10 -0
- package/dist/esm/sdk/companies.js.map +1 -1
- package/dist/esm/sdk/lookups.d.ts +22 -0
- package/dist/esm/sdk/lookups.d.ts.map +1 -1
- package/dist/esm/sdk/lookups.js +25 -0
- package/dist/esm/sdk/lookups.js.map +1 -1
- package/dist/esm/sdk/users.d.ts +6 -0
- package/dist/esm/sdk/users.d.ts.map +1 -1
- package/dist/esm/sdk/users.js +6 -0
- package/dist/esm/sdk/users.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +13 -1
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +13 -1
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/companies.test.ts +20 -0
- package/src/__tests__/doAdmin.test.ts +74 -1
- package/src/__tests__/kiosk.test.ts +163 -0
- package/src/__tests__/lookups.test.ts +24 -0
- package/src/__tests__/vendors.test.ts +1 -1
- package/src/__tests__/webhooks.test.ts +5 -4
- package/src/__tests__/zones.test.ts +12 -9
- package/src/admin-funcs/dismissCommunication.ts +20 -0
- package/src/admin-funcs/doAdmin.ts +107 -0
- package/src/admin-funcs/kioskCreateEvent.ts +18 -0
- package/src/admin-funcs/kioskCreateKioskDevice.ts +17 -0
- package/src/admin-funcs/kioskCreateZoneDevice.ts +17 -0
- package/src/admin-funcs/kioskGetKioskDevice.ts +16 -0
- package/src/admin-funcs/kioskHeartbeat.ts +23 -0
- package/src/admin-funcs/kioskPing2.ts +10 -0
- package/src/admin-funcs/kioskUpdateKioskDevice.ts +23 -0
- package/src/admin-funcs/listCommunications.ts +29 -0
- package/src/funcs/companiesListCompanyManagerContacts.ts +182 -0
- package/src/funcs/lookupsLookupPostalCode.ts +193 -0
- package/src/funcs/usersUpdateUser.ts +6 -0
- package/src/funcs/vendorsCreateVendor.ts +4 -0
- package/src/funcs/vendorsUpdateVendorDetails.ts +9 -1
- package/src/index.extras.ts +27 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/companymanagercontact.ts +50 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/createvendorcompany.ts +7 -1
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listcompanymanagercontacts.ts +77 -0
- package/src/models/operations/lookuppostalcode.ts +118 -0
- package/src/react-query/companiesListCompanyManagerContacts.core.ts +78 -0
- package/src/react-query/companiesListCompanyManagerContacts.ts +150 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/lookupsLookupPostalCode.core.ts +82 -0
- package/src/react-query/lookupsLookupPostalCode.ts +177 -0
- package/src/react-query/usersUpdateUser.ts +6 -0
- package/src/react-query/vendorsCreateVendor.ts +4 -0
- package/src/react-query/vendorsUpdateVendorDetails.ts +9 -1
- package/src/sdk/companies.ts +20 -0
- package/src/sdk/lookups.ts +33 -0
- package/src/sdk/users.ts +6 -0
- package/src/sdk/vendors.ts +13 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
10
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
|
+
import * as types from "../../types/primitives.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
|
+
|
|
14
|
+
export type LookupPostalCodeRequest = {
|
|
15
|
+
/**
|
|
16
|
+
* The zip / postal code to check.
|
|
17
|
+
*/
|
|
18
|
+
postalCode: string;
|
|
19
|
+
/**
|
|
20
|
+
* The state or province, as a code or full name, entered alongside the postal code.
|
|
21
|
+
*/
|
|
22
|
+
state: string;
|
|
23
|
+
/**
|
|
24
|
+
* The country entered alongside the postal code (e.g. US, CA).
|
|
25
|
+
*/
|
|
26
|
+
country: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const LookupPostalCodeStatus = {
|
|
30
|
+
Ok: "ok",
|
|
31
|
+
Invalid: "invalid",
|
|
32
|
+
Mismatch: "mismatch",
|
|
33
|
+
Unknown: "unknown",
|
|
34
|
+
} as const;
|
|
35
|
+
export type LookupPostalCodeStatus = OpenEnum<typeof LookupPostalCodeStatus>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The request was successful, and the server has returned the check result in the response body.
|
|
39
|
+
*/
|
|
40
|
+
export type LookupPostalCodeLookupPostalCodeOk = {
|
|
41
|
+
status: LookupPostalCodeStatus;
|
|
42
|
+
/**
|
|
43
|
+
* The state(s)/province(s) the postal code actually belongs to. Populated whenever the
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* postal code is well-formed and a state/province was checked against it — so this is
|
|
47
|
+
* non-empty for `ok` (it names the state that matched) as well as for `mismatch`, and
|
|
48
|
+
* empty for `invalid` and `unknown`.
|
|
49
|
+
*/
|
|
50
|
+
expectedStates: Array<string>;
|
|
51
|
+
/**
|
|
52
|
+
* A human-readable explanation of the problem. `null` unless `status` is `invalid` or `mismatch`.
|
|
53
|
+
*/
|
|
54
|
+
error: string | null;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export type LookupPostalCodeRequest$Outbound = {
|
|
59
|
+
postal_code: string;
|
|
60
|
+
state: string;
|
|
61
|
+
country: string;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const LookupPostalCodeRequest$outboundSchema: z.ZodType<
|
|
66
|
+
LookupPostalCodeRequest$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
LookupPostalCodeRequest
|
|
69
|
+
> = z.object({
|
|
70
|
+
postalCode: z.string(),
|
|
71
|
+
state: z.string(),
|
|
72
|
+
country: z.string(),
|
|
73
|
+
}).transform((v) => {
|
|
74
|
+
return remap$(v, {
|
|
75
|
+
postalCode: "postal_code",
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export function lookupPostalCodeRequestToJSON(
|
|
80
|
+
lookupPostalCodeRequest: LookupPostalCodeRequest,
|
|
81
|
+
): string {
|
|
82
|
+
return JSON.stringify(
|
|
83
|
+
LookupPostalCodeRequest$outboundSchema.parse(lookupPostalCodeRequest),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const LookupPostalCodeStatus$inboundSchema: z.ZodType<
|
|
89
|
+
LookupPostalCodeStatus,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
unknown
|
|
92
|
+
> = openEnums.inboundSchema(LookupPostalCodeStatus);
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const LookupPostalCodeLookupPostalCodeOk$inboundSchema: z.ZodType<
|
|
96
|
+
LookupPostalCodeLookupPostalCodeOk,
|
|
97
|
+
z.ZodTypeDef,
|
|
98
|
+
unknown
|
|
99
|
+
> = z.object({
|
|
100
|
+
status: LookupPostalCodeStatus$inboundSchema,
|
|
101
|
+
expected_states: z.array(types.string()),
|
|
102
|
+
error: types.nullable(types.string()),
|
|
103
|
+
}).transform((v) => {
|
|
104
|
+
return remap$(v, {
|
|
105
|
+
"expected_states": "expectedStates",
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export function lookupPostalCodeLookupPostalCodeOkFromJSON(
|
|
110
|
+
jsonString: string,
|
|
111
|
+
): SafeParseResult<LookupPostalCodeLookupPostalCodeOk, SDKValidationError> {
|
|
112
|
+
return safeParse(
|
|
113
|
+
jsonString,
|
|
114
|
+
(x) =>
|
|
115
|
+
LookupPostalCodeLookupPostalCodeOk$inboundSchema.parse(JSON.parse(x)),
|
|
116
|
+
`Failed to parse 'LookupPostalCodeLookupPostalCodeOk' from JSON`,
|
|
117
|
+
);
|
|
118
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
QueryClient,
|
|
7
|
+
QueryFunctionContext,
|
|
8
|
+
QueryKey,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { GreenSecurityCore } from "../core.js";
|
|
11
|
+
import { companiesListCompanyManagerContacts } from "../funcs/companiesListCompanyManagerContacts.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
16
|
+
export type CompaniesListCompanyManagerContactsQueryData =
|
|
17
|
+
operations.ListCompanyManagerContactsListCompanyManagerContactsOk;
|
|
18
|
+
|
|
19
|
+
export function prefetchCompaniesListCompanyManagerContacts(
|
|
20
|
+
queryClient: QueryClient,
|
|
21
|
+
client$: GreenSecurityCore,
|
|
22
|
+
request: operations.ListCompanyManagerContactsRequest,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): Promise<void> {
|
|
25
|
+
return queryClient.prefetchQuery({
|
|
26
|
+
...buildCompaniesListCompanyManagerContactsQuery(
|
|
27
|
+
client$,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function buildCompaniesListCompanyManagerContactsQuery(
|
|
35
|
+
client$: GreenSecurityCore,
|
|
36
|
+
request: operations.ListCompanyManagerContactsRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): {
|
|
39
|
+
queryKey: QueryKey;
|
|
40
|
+
queryFn: (
|
|
41
|
+
context: QueryFunctionContext,
|
|
42
|
+
) => Promise<CompaniesListCompanyManagerContactsQueryData>;
|
|
43
|
+
} {
|
|
44
|
+
return {
|
|
45
|
+
queryKey: queryKeyCompaniesListCompanyManagerContacts(request.companyId),
|
|
46
|
+
queryFn: async function companiesListCompanyManagerContactsQueryFn(
|
|
47
|
+
ctx,
|
|
48
|
+
): Promise<CompaniesListCompanyManagerContactsQueryData> {
|
|
49
|
+
const sig = combineSignals(
|
|
50
|
+
ctx.signal,
|
|
51
|
+
options?.signal,
|
|
52
|
+
options?.fetchOptions?.signal,
|
|
53
|
+
);
|
|
54
|
+
const mergedOptions = {
|
|
55
|
+
...options?.fetchOptions,
|
|
56
|
+
...options,
|
|
57
|
+
signal: sig,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return unwrapAsync(companiesListCompanyManagerContacts(
|
|
61
|
+
client$,
|
|
62
|
+
request,
|
|
63
|
+
mergedOptions,
|
|
64
|
+
));
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function queryKeyCompaniesListCompanyManagerContacts(
|
|
70
|
+
companyId: number,
|
|
71
|
+
): QueryKey {
|
|
72
|
+
return [
|
|
73
|
+
"@greensecurity/javascript-sdk",
|
|
74
|
+
"companies",
|
|
75
|
+
"listCompanyManagerContacts",
|
|
76
|
+
companyId,
|
|
77
|
+
];
|
|
78
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
InvalidateQueryFilters,
|
|
7
|
+
QueryClient,
|
|
8
|
+
useQuery,
|
|
9
|
+
UseQueryResult,
|
|
10
|
+
useSuspenseQuery,
|
|
11
|
+
UseSuspenseQueryResult,
|
|
12
|
+
} from "@tanstack/react-query";
|
|
13
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
26
|
+
import {
|
|
27
|
+
QueryHookOptions,
|
|
28
|
+
SuspenseQueryHookOptions,
|
|
29
|
+
TupleToPrefixes,
|
|
30
|
+
} from "./_types.js";
|
|
31
|
+
import {
|
|
32
|
+
buildCompaniesListCompanyManagerContactsQuery,
|
|
33
|
+
CompaniesListCompanyManagerContactsQueryData,
|
|
34
|
+
prefetchCompaniesListCompanyManagerContacts,
|
|
35
|
+
queryKeyCompaniesListCompanyManagerContacts,
|
|
36
|
+
} from "./companiesListCompanyManagerContacts.core.js";
|
|
37
|
+
export {
|
|
38
|
+
buildCompaniesListCompanyManagerContactsQuery,
|
|
39
|
+
type CompaniesListCompanyManagerContactsQueryData,
|
|
40
|
+
prefetchCompaniesListCompanyManagerContacts,
|
|
41
|
+
queryKeyCompaniesListCompanyManagerContacts,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type CompaniesListCompanyManagerContactsQueryError =
|
|
45
|
+
| errors.ApiErrorResponse
|
|
46
|
+
| GreenSecurityError
|
|
47
|
+
| ResponseValidationError
|
|
48
|
+
| ConnectionError
|
|
49
|
+
| RequestAbortedError
|
|
50
|
+
| RequestTimeoutError
|
|
51
|
+
| InvalidRequestError
|
|
52
|
+
| UnexpectedClientError
|
|
53
|
+
| SDKValidationError;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* List the contact details of a company's managers
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* List the active managers of a company who have an email address, so someone who belongs to that company can contact them. Readable by a vendor of the company, a manager of the company, or an admin; every other caller receives a 404. Carries only the fields needed to address a message, not the full company manager or user record. Distinct from `/companies/{company_id}/managers`, which is the administration listing and is gated on the `company_managers` view permission.
|
|
60
|
+
*/
|
|
61
|
+
export function useCompaniesListCompanyManagerContacts(
|
|
62
|
+
request: operations.ListCompanyManagerContactsRequest,
|
|
63
|
+
options?: QueryHookOptions<
|
|
64
|
+
CompaniesListCompanyManagerContactsQueryData,
|
|
65
|
+
CompaniesListCompanyManagerContactsQueryError
|
|
66
|
+
>,
|
|
67
|
+
): UseQueryResult<
|
|
68
|
+
CompaniesListCompanyManagerContactsQueryData,
|
|
69
|
+
CompaniesListCompanyManagerContactsQueryError
|
|
70
|
+
> {
|
|
71
|
+
const client = useGreenSecurityContext();
|
|
72
|
+
return useQuery({
|
|
73
|
+
...buildCompaniesListCompanyManagerContactsQuery(
|
|
74
|
+
client,
|
|
75
|
+
request,
|
|
76
|
+
options,
|
|
77
|
+
),
|
|
78
|
+
...options,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* List the contact details of a company's managers
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
* List the active managers of a company who have an email address, so someone who belongs to that company can contact them. Readable by a vendor of the company, a manager of the company, or an admin; every other caller receives a 404. Carries only the fields needed to address a message, not the full company manager or user record. Distinct from `/companies/{company_id}/managers`, which is the administration listing and is gated on the `company_managers` view permission.
|
|
87
|
+
*/
|
|
88
|
+
export function useCompaniesListCompanyManagerContactsSuspense(
|
|
89
|
+
request: operations.ListCompanyManagerContactsRequest,
|
|
90
|
+
options?: SuspenseQueryHookOptions<
|
|
91
|
+
CompaniesListCompanyManagerContactsQueryData,
|
|
92
|
+
CompaniesListCompanyManagerContactsQueryError
|
|
93
|
+
>,
|
|
94
|
+
): UseSuspenseQueryResult<
|
|
95
|
+
CompaniesListCompanyManagerContactsQueryData,
|
|
96
|
+
CompaniesListCompanyManagerContactsQueryError
|
|
97
|
+
> {
|
|
98
|
+
const client = useGreenSecurityContext();
|
|
99
|
+
return useSuspenseQuery({
|
|
100
|
+
...buildCompaniesListCompanyManagerContactsQuery(
|
|
101
|
+
client,
|
|
102
|
+
request,
|
|
103
|
+
options,
|
|
104
|
+
),
|
|
105
|
+
...options,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function setCompaniesListCompanyManagerContactsData(
|
|
110
|
+
client: QueryClient,
|
|
111
|
+
queryKeyBase: [companyId: number],
|
|
112
|
+
data: CompaniesListCompanyManagerContactsQueryData,
|
|
113
|
+
): CompaniesListCompanyManagerContactsQueryData | undefined {
|
|
114
|
+
const key = queryKeyCompaniesListCompanyManagerContacts(...queryKeyBase);
|
|
115
|
+
|
|
116
|
+
return client.setQueryData<CompaniesListCompanyManagerContactsQueryData>(
|
|
117
|
+
key,
|
|
118
|
+
data,
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function invalidateCompaniesListCompanyManagerContacts(
|
|
123
|
+
client: QueryClient,
|
|
124
|
+
queryKeyBase: TupleToPrefixes<[companyId: number]>,
|
|
125
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
126
|
+
): Promise<void> {
|
|
127
|
+
return client.invalidateQueries({
|
|
128
|
+
...filters,
|
|
129
|
+
queryKey: [
|
|
130
|
+
"@greensecurity/javascript-sdk",
|
|
131
|
+
"companies",
|
|
132
|
+
"listCompanyManagerContacts",
|
|
133
|
+
...queryKeyBase,
|
|
134
|
+
],
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function invalidateAllCompaniesListCompanyManagerContacts(
|
|
139
|
+
client: QueryClient,
|
|
140
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
141
|
+
): Promise<void> {
|
|
142
|
+
return client.invalidateQueries({
|
|
143
|
+
...filters,
|
|
144
|
+
queryKey: [
|
|
145
|
+
"@greensecurity/javascript-sdk",
|
|
146
|
+
"companies",
|
|
147
|
+
"listCompanyManagerContacts",
|
|
148
|
+
],
|
|
149
|
+
});
|
|
150
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./companiesAddCompanyManager.js";
|
|
|
11
11
|
export * from "./companiesGetCompany.js";
|
|
12
12
|
export * from "./companiesListCompanyCredentials.js";
|
|
13
13
|
export * from "./companiesListCompanyCredits.js";
|
|
14
|
+
export * from "./companiesListCompanyManagerContacts.js";
|
|
14
15
|
export * from "./companiesListCompanyManagers.js";
|
|
15
16
|
export * from "./companiesListOrSearchCompanies.js";
|
|
16
17
|
export * from "./companiesLookupCompanies.js";
|
|
@@ -43,6 +44,7 @@ export * from "./invoicesListInvoices.js";
|
|
|
43
44
|
export * from "./invoicesMakePayment.js";
|
|
44
45
|
export * from "./invoicesUpdateInvoice.js";
|
|
45
46
|
export * from "./lookupsListLookupSystems.js";
|
|
47
|
+
export * from "./lookupsLookupPostalCode.js";
|
|
46
48
|
export * from "./medicalProductsCreateDistributor.js";
|
|
47
49
|
export * from "./medicalProductsCreateManufacturer.js";
|
|
48
50
|
export * from "./medicalProductsCreateMedicalProduct.js";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
QueryClient,
|
|
7
|
+
QueryFunctionContext,
|
|
8
|
+
QueryKey,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { GreenSecurityCore } from "../core.js";
|
|
11
|
+
import { lookupsLookupPostalCode } from "../funcs/lookupsLookupPostalCode.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
16
|
+
export type LookupsLookupPostalCodeQueryData =
|
|
17
|
+
operations.LookupPostalCodeLookupPostalCodeOk;
|
|
18
|
+
|
|
19
|
+
export function prefetchLookupsLookupPostalCode(
|
|
20
|
+
queryClient: QueryClient,
|
|
21
|
+
client$: GreenSecurityCore,
|
|
22
|
+
request: operations.LookupPostalCodeRequest,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): Promise<void> {
|
|
25
|
+
return queryClient.prefetchQuery({
|
|
26
|
+
...buildLookupsLookupPostalCodeQuery(
|
|
27
|
+
client$,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function buildLookupsLookupPostalCodeQuery(
|
|
35
|
+
client$: GreenSecurityCore,
|
|
36
|
+
request: operations.LookupPostalCodeRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): {
|
|
39
|
+
queryKey: QueryKey;
|
|
40
|
+
queryFn: (
|
|
41
|
+
context: QueryFunctionContext,
|
|
42
|
+
) => Promise<LookupsLookupPostalCodeQueryData>;
|
|
43
|
+
} {
|
|
44
|
+
return {
|
|
45
|
+
queryKey: queryKeyLookupsLookupPostalCode({
|
|
46
|
+
postalCode: request.postalCode,
|
|
47
|
+
state: request.state,
|
|
48
|
+
country: request.country,
|
|
49
|
+
}),
|
|
50
|
+
queryFn: async function lookupsLookupPostalCodeQueryFn(
|
|
51
|
+
ctx,
|
|
52
|
+
): Promise<LookupsLookupPostalCodeQueryData> {
|
|
53
|
+
const sig = combineSignals(
|
|
54
|
+
ctx.signal,
|
|
55
|
+
options?.signal,
|
|
56
|
+
options?.fetchOptions?.signal,
|
|
57
|
+
);
|
|
58
|
+
const mergedOptions = {
|
|
59
|
+
...options?.fetchOptions,
|
|
60
|
+
...options,
|
|
61
|
+
signal: sig,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
return unwrapAsync(lookupsLookupPostalCode(
|
|
65
|
+
client$,
|
|
66
|
+
request,
|
|
67
|
+
mergedOptions,
|
|
68
|
+
));
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function queryKeyLookupsLookupPostalCode(
|
|
74
|
+
parameters: { postalCode: string; state: string; country: string },
|
|
75
|
+
): QueryKey {
|
|
76
|
+
return [
|
|
77
|
+
"@greensecurity/javascript-sdk",
|
|
78
|
+
"lookups",
|
|
79
|
+
"lookupPostalCode",
|
|
80
|
+
parameters,
|
|
81
|
+
];
|
|
82
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
InvalidateQueryFilters,
|
|
7
|
+
QueryClient,
|
|
8
|
+
useQuery,
|
|
9
|
+
UseQueryResult,
|
|
10
|
+
useSuspenseQuery,
|
|
11
|
+
UseSuspenseQueryResult,
|
|
12
|
+
} from "@tanstack/react-query";
|
|
13
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
26
|
+
import {
|
|
27
|
+
QueryHookOptions,
|
|
28
|
+
SuspenseQueryHookOptions,
|
|
29
|
+
TupleToPrefixes,
|
|
30
|
+
} from "./_types.js";
|
|
31
|
+
import {
|
|
32
|
+
buildLookupsLookupPostalCodeQuery,
|
|
33
|
+
LookupsLookupPostalCodeQueryData,
|
|
34
|
+
prefetchLookupsLookupPostalCode,
|
|
35
|
+
queryKeyLookupsLookupPostalCode,
|
|
36
|
+
} from "./lookupsLookupPostalCode.core.js";
|
|
37
|
+
export {
|
|
38
|
+
buildLookupsLookupPostalCodeQuery,
|
|
39
|
+
type LookupsLookupPostalCodeQueryData,
|
|
40
|
+
prefetchLookupsLookupPostalCode,
|
|
41
|
+
queryKeyLookupsLookupPostalCode,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type LookupsLookupPostalCodeQueryError =
|
|
45
|
+
| errors.ApiErrorResponse
|
|
46
|
+
| GreenSecurityError
|
|
47
|
+
| ResponseValidationError
|
|
48
|
+
| ConnectionError
|
|
49
|
+
| RequestAbortedError
|
|
50
|
+
| RequestTimeoutError
|
|
51
|
+
| InvalidRequestError
|
|
52
|
+
| UnexpectedClientError
|
|
53
|
+
| SDKValidationError;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check a postal code against a state and country
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* Cross-checks a postal code against a state/province and country, the same check
|
|
60
|
+
* every write path that stores a US or Canadian address enforces server-side (e.g.
|
|
61
|
+
* `PUT /users/{id}`, `PUT /vendors/{vendor_id_or_me}`). Useful for validating an
|
|
62
|
+
* address before submitting it elsewhere.
|
|
63
|
+
*
|
|
64
|
+
* `status` is one of:
|
|
65
|
+
* - `ok` — the postal code belongs to the given state/province.
|
|
66
|
+
* - `invalid` — the postal code is not shaped like a real one for the given country.
|
|
67
|
+
* - `mismatch` — the postal code is well-formed but belongs to a different state or
|
|
68
|
+
* province. `expected_states` names the state(s) it actually maps to.
|
|
69
|
+
* - `unknown` — nothing to check against (an unsupported country, or a postal code
|
|
70
|
+
* absent from the US ZIP dataset). Treated as acceptable by every write path that
|
|
71
|
+
* uses this check.
|
|
72
|
+
*
|
|
73
|
+
* Only the US and Canada have a real code-to-subdivision map; every other country
|
|
74
|
+
* always returns `unknown`.
|
|
75
|
+
*/
|
|
76
|
+
export function useLookupsLookupPostalCode(
|
|
77
|
+
request: operations.LookupPostalCodeRequest,
|
|
78
|
+
options?: QueryHookOptions<
|
|
79
|
+
LookupsLookupPostalCodeQueryData,
|
|
80
|
+
LookupsLookupPostalCodeQueryError
|
|
81
|
+
>,
|
|
82
|
+
): UseQueryResult<
|
|
83
|
+
LookupsLookupPostalCodeQueryData,
|
|
84
|
+
LookupsLookupPostalCodeQueryError
|
|
85
|
+
> {
|
|
86
|
+
const client = useGreenSecurityContext();
|
|
87
|
+
return useQuery({
|
|
88
|
+
...buildLookupsLookupPostalCodeQuery(
|
|
89
|
+
client,
|
|
90
|
+
request,
|
|
91
|
+
options,
|
|
92
|
+
),
|
|
93
|
+
...options,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Check a postal code against a state and country
|
|
99
|
+
*
|
|
100
|
+
* @remarks
|
|
101
|
+
* Cross-checks a postal code against a state/province and country, the same check
|
|
102
|
+
* every write path that stores a US or Canadian address enforces server-side (e.g.
|
|
103
|
+
* `PUT /users/{id}`, `PUT /vendors/{vendor_id_or_me}`). Useful for validating an
|
|
104
|
+
* address before submitting it elsewhere.
|
|
105
|
+
*
|
|
106
|
+
* `status` is one of:
|
|
107
|
+
* - `ok` — the postal code belongs to the given state/province.
|
|
108
|
+
* - `invalid` — the postal code is not shaped like a real one for the given country.
|
|
109
|
+
* - `mismatch` — the postal code is well-formed but belongs to a different state or
|
|
110
|
+
* province. `expected_states` names the state(s) it actually maps to.
|
|
111
|
+
* - `unknown` — nothing to check against (an unsupported country, or a postal code
|
|
112
|
+
* absent from the US ZIP dataset). Treated as acceptable by every write path that
|
|
113
|
+
* uses this check.
|
|
114
|
+
*
|
|
115
|
+
* Only the US and Canada have a real code-to-subdivision map; every other country
|
|
116
|
+
* always returns `unknown`.
|
|
117
|
+
*/
|
|
118
|
+
export function useLookupsLookupPostalCodeSuspense(
|
|
119
|
+
request: operations.LookupPostalCodeRequest,
|
|
120
|
+
options?: SuspenseQueryHookOptions<
|
|
121
|
+
LookupsLookupPostalCodeQueryData,
|
|
122
|
+
LookupsLookupPostalCodeQueryError
|
|
123
|
+
>,
|
|
124
|
+
): UseSuspenseQueryResult<
|
|
125
|
+
LookupsLookupPostalCodeQueryData,
|
|
126
|
+
LookupsLookupPostalCodeQueryError
|
|
127
|
+
> {
|
|
128
|
+
const client = useGreenSecurityContext();
|
|
129
|
+
return useSuspenseQuery({
|
|
130
|
+
...buildLookupsLookupPostalCodeQuery(
|
|
131
|
+
client,
|
|
132
|
+
request,
|
|
133
|
+
options,
|
|
134
|
+
),
|
|
135
|
+
...options,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function setLookupsLookupPostalCodeData(
|
|
140
|
+
client: QueryClient,
|
|
141
|
+
queryKeyBase: [
|
|
142
|
+
parameters: { postalCode: string; state: string; country: string },
|
|
143
|
+
],
|
|
144
|
+
data: LookupsLookupPostalCodeQueryData,
|
|
145
|
+
): LookupsLookupPostalCodeQueryData | undefined {
|
|
146
|
+
const key = queryKeyLookupsLookupPostalCode(...queryKeyBase);
|
|
147
|
+
|
|
148
|
+
return client.setQueryData<LookupsLookupPostalCodeQueryData>(key, data);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function invalidateLookupsLookupPostalCode(
|
|
152
|
+
client: QueryClient,
|
|
153
|
+
queryKeyBase: TupleToPrefixes<
|
|
154
|
+
[parameters: { postalCode: string; state: string; country: string }]
|
|
155
|
+
>,
|
|
156
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
157
|
+
): Promise<void> {
|
|
158
|
+
return client.invalidateQueries({
|
|
159
|
+
...filters,
|
|
160
|
+
queryKey: [
|
|
161
|
+
"@greensecurity/javascript-sdk",
|
|
162
|
+
"lookups",
|
|
163
|
+
"lookupPostalCode",
|
|
164
|
+
...queryKeyBase,
|
|
165
|
+
],
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export function invalidateAllLookupsLookupPostalCode(
|
|
170
|
+
client: QueryClient,
|
|
171
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
172
|
+
): Promise<void> {
|
|
173
|
+
return client.invalidateQueries({
|
|
174
|
+
...filters,
|
|
175
|
+
queryKey: ["@greensecurity/javascript-sdk", "lookups", "lookupPostalCode"],
|
|
176
|
+
});
|
|
177
|
+
}
|
|
@@ -56,6 +56,12 @@ export type UsersUpdateUserMutationError =
|
|
|
56
56
|
* Only submitted fields are applied — unrecognised fields are silently ignored.
|
|
57
57
|
* Changing `email` automatically resets `bounced_email` to `false`.
|
|
58
58
|
*
|
|
59
|
+
* Submitting `zip`, `state`, or `country` cross-checks the postal code against the
|
|
60
|
+
* resulting state/country (using the existing value for any of the three left out
|
|
61
|
+
* of the request). A code that is not shaped like a real postal code, or that
|
|
62
|
+
* provably belongs to a different state, is rejected with `422` naming the correct
|
|
63
|
+
* state.
|
|
64
|
+
*
|
|
59
65
|
* Each subkey of `email_preferences` is independently optional; sending
|
|
60
66
|
* `{ "email_preferences": { "send_weekly_summary_email": true } }` flips
|
|
61
67
|
* only that flag and leaves the others unchanged.
|
|
@@ -55,6 +55,10 @@ export type VendorsCreateVendorMutationError =
|
|
|
55
55
|
* `company_id` is optional for company managers — it defaults to their own company.
|
|
56
56
|
* All other callers must provide `company_id`. The caller must have access to the
|
|
57
57
|
* specified company (verified via scoped access policy) and the `vendors:add` permission.
|
|
58
|
+
*
|
|
59
|
+
* `zip` is cross-checked against `state`: a code that is not shaped like a real postal
|
|
60
|
+
* code, or that provably belongs to a different state, is rejected with `422` naming
|
|
61
|
+
* the correct state.
|
|
58
62
|
*/
|
|
59
63
|
export function useVendorsCreateVendorMutation(
|
|
60
64
|
options?: MutationHookOptions<
|
|
@@ -56,7 +56,15 @@ export type VendorsUpdateVendorDetailsMutationError =
|
|
|
56
56
|
* From `location` this endpoint reads only `timezone`, `address1`, `address2`,
|
|
57
57
|
* `city`, `state`, `zip`, `phone`, `mobile_phone` and `fax`. The `address` and
|
|
58
58
|
* `country` properties of the shared `UserLocation` schema are ignored here and
|
|
59
|
-
* updating them is not supported.
|
|
59
|
+
* updating them is not supported. `state` accepts a US state or a Canadian
|
|
60
|
+
* province — the vendor's country, set only at registration, is not editable
|
|
61
|
+
* through this endpoint.
|
|
62
|
+
*
|
|
63
|
+
* Submitting `location.zip` or `location.state` cross-checks the postal code
|
|
64
|
+
* against the resulting state (using the vendor's existing value for whichever
|
|
65
|
+
* of the two is left out of the request). A code that is not shaped like a real
|
|
66
|
+
* postal code, or that provably belongs to a different state, is rejected with
|
|
67
|
+
* `422` naming the correct state.
|
|
60
68
|
*
|
|
61
69
|
* For `title`, the `supervisor` fields, and every `location` field except
|
|
62
70
|
* `timezone`, the value sent is the value stored: omit a field to leave it
|