@greensecurity/javascript-sdk 0.45.0-beta.1 → 0.45.0-beta.11
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__/fhirconfigs.test.js +21 -5
- package/dist/commonjs/__tests__/fhirconfigs.test.js.map +1 -1
- package/dist/commonjs/__tests__/invoices.test.js +18 -0
- package/dist/commonjs/__tests__/invoices.test.js.map +1 -1
- 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__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +17 -15
- 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/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/companiesListCompanyManagers.js +1 -0
- package/dist/commonjs/funcs/companiesListCompanyManagers.js.map +1 -1
- package/dist/commonjs/funcs/invoicesConvertQuote.d.ts +33 -0
- package/dist/commonjs/funcs/invoicesConvertQuote.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesConvertQuote.js +138 -0
- package/dist/commonjs/funcs/invoicesConvertQuote.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/vendorsGetVendorCredentialDetails.d.ts +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.js +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.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/funcs/vendorsVendorsExport.d.ts +4 -1
- package/dist/commonjs/funcs/vendorsVendorsExport.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsVendorsExport.js +5 -1
- package/dist/commonjs/funcs/vendorsVendorsExport.js.map +1 -1
- package/dist/commonjs/index.extras.d.ts +6 -0
- package/dist/commonjs/index.extras.d.ts.map +1 -1
- package/dist/commonjs/index.extras.js +6 -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/models/components/companymanager.d.ts +19 -1
- package/dist/commonjs/models/components/companymanager.d.ts.map +1 -1
- package/dist/commonjs/models/components/companymanager.js +13 -2
- package/dist/commonjs/models/components/companymanager.js.map +1 -1
- package/dist/commonjs/models/components/expand.d.ts +1 -0
- package/dist/commonjs/models/components/expand.d.ts.map +1 -1
- package/dist/commonjs/models/components/expand.js +1 -0
- package/dist/commonjs/models/components/expand.js.map +1 -1
- package/dist/commonjs/models/components/fhirconfig.d.ts +16 -0
- package/dist/commonjs/models/components/fhirconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/fhirconfig.js +4 -0
- package/dist/commonjs/models/components/fhirconfig.js.map +1 -1
- package/dist/commonjs/models/components/fhirconfigcreate.d.ts +18 -0
- package/dist/commonjs/models/components/fhirconfigcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/fhirconfigcreate.js +4 -0
- package/dist/commonjs/models/components/fhirconfigcreate.js.map +1 -1
- package/dist/commonjs/models/components/fhirextraentities.d.ts +9 -0
- package/dist/commonjs/models/components/fhirextraentities.d.ts.map +1 -1
- package/dist/commonjs/models/components/fhirextraentities.js +11 -0
- package/dist/commonjs/models/components/fhirextraentities.js.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts +5 -0
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.js +9 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.js.map +1 -1
- package/dist/commonjs/models/operations/convertquote.d.ts +46 -0
- package/dist/commonjs/models/operations/convertquote.d.ts.map +1 -0
- package/dist/commonjs/models/operations/convertquote.js +69 -0
- package/dist/commonjs/models/operations/convertquote.js.map +1 -0
- package/dist/commonjs/models/operations/createinvoice.d.ts +85 -0
- package/dist/commonjs/models/operations/createinvoice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createinvoice.js +56 -1
- package/dist/commonjs/models/operations/createinvoice.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/listcompanymanagers.d.ts +20 -0
- package/dist/commonjs/models/operations/listcompanymanagers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listcompanymanagers.js +12 -1
- package/dist/commonjs/models/operations/listcompanymanagers.js.map +1 -1
- 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/models/operations/vendorsexport.d.ts +6 -1
- package/dist/commonjs/models/operations/vendorsexport.d.ts.map +1 -1
- package/dist/commonjs/models/operations/vendorsexport.js +2 -0
- package/dist/commonjs/models/operations/vendorsexport.js.map +1 -1
- package/dist/commonjs/react-query/companiesListCompanyManagers.core.d.ts +2 -0
- package/dist/commonjs/react-query/companiesListCompanyManagers.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/companiesListCompanyManagers.core.js +2 -0
- package/dist/commonjs/react-query/companiesListCompanyManagers.core.js.map +1 -1
- package/dist/commonjs/react-query/companiesListCompanyManagers.d.ts +2 -0
- package/dist/commonjs/react-query/companiesListCompanyManagers.d.ts.map +1 -1
- package/dist/commonjs/react-query/companiesListCompanyManagers.js.map +1 -1
- 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/invoicesConvertQuote.d.ts +42 -0
- package/dist/commonjs/react-query/invoicesConvertQuote.d.ts.map +1 -0
- package/dist/commonjs/react-query/invoicesConvertQuote.js +60 -0
- package/dist/commonjs/react-query/invoicesConvertQuote.js.map +1 -0
- 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/vendorsGetVendorCredentialDetails.d.ts +2 -0
- package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.js +2 -0
- package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.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/react-query/vendorsVendorsExport.core.d.ts +1 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsVendorsExport.core.js +1 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.core.js.map +1 -1
- package/dist/commonjs/react-query/vendorsVendorsExport.d.ts +10 -2
- package/dist/commonjs/react-query/vendorsVendorsExport.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsVendorsExport.js +8 -2
- package/dist/commonjs/react-query/vendorsVendorsExport.js.map +1 -1
- package/dist/commonjs/sdk/invoices.d.ts +20 -0
- package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoices.js +23 -0
- package/dist/commonjs/sdk/invoices.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 +18 -2
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +18 -2
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/fhirconfigs.test.js +21 -5
- package/dist/esm/__tests__/fhirconfigs.test.js.map +1 -1
- package/dist/esm/__tests__/invoices.test.js +18 -0
- package/dist/esm/__tests__/invoices.test.js.map +1 -1
- 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__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +17 -15
- 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/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/companiesListCompanyManagers.js +1 -0
- package/dist/esm/funcs/companiesListCompanyManagers.js.map +1 -1
- package/dist/esm/funcs/invoicesConvertQuote.d.ts +33 -0
- package/dist/esm/funcs/invoicesConvertQuote.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesConvertQuote.js +102 -0
- package/dist/esm/funcs/invoicesConvertQuote.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/vendorsGetVendorCredentialDetails.d.ts +1 -0
- package/dist/esm/funcs/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsGetVendorCredentialDetails.js +1 -0
- package/dist/esm/funcs/vendorsGetVendorCredentialDetails.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/funcs/vendorsVendorsExport.d.ts +4 -1
- package/dist/esm/funcs/vendorsVendorsExport.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsVendorsExport.js +5 -1
- package/dist/esm/funcs/vendorsVendorsExport.js.map +1 -1
- package/dist/esm/index.extras.d.ts +6 -0
- package/dist/esm/index.extras.d.ts.map +1 -1
- package/dist/esm/index.extras.js +6 -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/models/components/companymanager.d.ts +19 -1
- package/dist/esm/models/components/companymanager.d.ts.map +1 -1
- package/dist/esm/models/components/companymanager.js +12 -1
- package/dist/esm/models/components/companymanager.js.map +1 -1
- package/dist/esm/models/components/expand.d.ts +1 -0
- package/dist/esm/models/components/expand.d.ts.map +1 -1
- package/dist/esm/models/components/expand.js +1 -0
- package/dist/esm/models/components/expand.js.map +1 -1
- package/dist/esm/models/components/fhirconfig.d.ts +16 -0
- package/dist/esm/models/components/fhirconfig.d.ts.map +1 -1
- package/dist/esm/models/components/fhirconfig.js +4 -0
- package/dist/esm/models/components/fhirconfig.js.map +1 -1
- package/dist/esm/models/components/fhirconfigcreate.d.ts +18 -0
- package/dist/esm/models/components/fhirconfigcreate.d.ts.map +1 -1
- package/dist/esm/models/components/fhirconfigcreate.js +4 -0
- package/dist/esm/models/components/fhirconfigcreate.js.map +1 -1
- package/dist/esm/models/components/fhirextraentities.d.ts +9 -0
- package/dist/esm/models/components/fhirextraentities.d.ts.map +1 -1
- package/dist/esm/models/components/fhirextraentities.js +11 -0
- package/dist/esm/models/components/fhirextraentities.js.map +1 -1
- package/dist/esm/models/components/vendorcredentialsummary.d.ts +5 -0
- package/dist/esm/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/esm/models/components/vendorcredentialsummary.js +7 -0
- package/dist/esm/models/components/vendorcredentialsummary.js.map +1 -1
- package/dist/esm/models/operations/convertquote.d.ts +46 -0
- package/dist/esm/models/operations/convertquote.d.ts.map +1 -0
- package/dist/esm/models/operations/convertquote.js +31 -0
- package/dist/esm/models/operations/convertquote.js.map +1 -0
- package/dist/esm/models/operations/createinvoice.d.ts +85 -0
- package/dist/esm/models/operations/createinvoice.d.ts.map +1 -1
- package/dist/esm/models/operations/createinvoice.js +55 -0
- package/dist/esm/models/operations/createinvoice.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/listcompanymanagers.d.ts +20 -0
- package/dist/esm/models/operations/listcompanymanagers.d.ts.map +1 -1
- package/dist/esm/models/operations/listcompanymanagers.js +11 -0
- package/dist/esm/models/operations/listcompanymanagers.js.map +1 -1
- 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/models/operations/vendorsexport.d.ts +6 -1
- package/dist/esm/models/operations/vendorsexport.d.ts.map +1 -1
- package/dist/esm/models/operations/vendorsexport.js +2 -0
- package/dist/esm/models/operations/vendorsexport.js.map +1 -1
- package/dist/esm/react-query/companiesListCompanyManagers.core.d.ts +2 -0
- package/dist/esm/react-query/companiesListCompanyManagers.core.d.ts.map +1 -1
- package/dist/esm/react-query/companiesListCompanyManagers.core.js +2 -0
- package/dist/esm/react-query/companiesListCompanyManagers.core.js.map +1 -1
- package/dist/esm/react-query/companiesListCompanyManagers.d.ts +2 -0
- package/dist/esm/react-query/companiesListCompanyManagers.d.ts.map +1 -1
- package/dist/esm/react-query/companiesListCompanyManagers.js.map +1 -1
- 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/invoicesConvertQuote.d.ts +42 -0
- package/dist/esm/react-query/invoicesConvertQuote.d.ts.map +1 -0
- package/dist/esm/react-query/invoicesConvertQuote.js +55 -0
- package/dist/esm/react-query/invoicesConvertQuote.js.map +1 -0
- 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/vendorsGetVendorCredentialDetails.d.ts +2 -0
- package/dist/esm/react-query/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsGetVendorCredentialDetails.js +2 -0
- package/dist/esm/react-query/vendorsGetVendorCredentialDetails.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/react-query/vendorsVendorsExport.core.d.ts +1 -0
- package/dist/esm/react-query/vendorsVendorsExport.core.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsVendorsExport.core.js +1 -0
- package/dist/esm/react-query/vendorsVendorsExport.core.js.map +1 -1
- package/dist/esm/react-query/vendorsVendorsExport.d.ts +10 -2
- package/dist/esm/react-query/vendorsVendorsExport.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsVendorsExport.js +8 -2
- package/dist/esm/react-query/vendorsVendorsExport.js.map +1 -1
- package/dist/esm/sdk/invoices.d.ts +20 -0
- package/dist/esm/sdk/invoices.d.ts.map +1 -1
- package/dist/esm/sdk/invoices.js +23 -0
- package/dist/esm/sdk/invoices.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 +18 -2
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +18 -2
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/fhirconfigs.test.ts +21 -5
- package/src/__tests__/invoices.test.ts +21 -0
- package/src/__tests__/lookups.test.ts +24 -0
- package/src/__tests__/vendors.test.ts +1 -1
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +17 -15
- package/src/admin-funcs/dismissCommunication.ts +20 -0
- package/src/admin-funcs/listCommunications.ts +29 -0
- package/src/funcs/companiesListCompanyManagers.ts +1 -0
- package/src/funcs/invoicesConvertQuote.ts +190 -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/vendorsGetVendorCredentialDetails.ts +1 -0
- package/src/funcs/vendorsUpdateVendorDetails.ts +9 -1
- package/src/funcs/vendorsVendorsExport.ts +6 -1
- package/src/index.extras.ts +8 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/companymanager.ts +27 -2
- package/src/models/components/expand.ts +1 -0
- package/src/models/components/fhirconfig.ts +20 -0
- package/src/models/components/fhirconfigcreate.ts +22 -0
- package/src/models/components/fhirextraentities.ts +20 -0
- package/src/models/components/vendorcredentialsummary.ts +19 -0
- package/src/models/operations/convertquote.ts +94 -0
- package/src/models/operations/createinvoice.ts +124 -0
- package/src/models/operations/createvendorcompany.ts +7 -1
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listcompanymanagers.ts +28 -0
- package/src/models/operations/lookuppostalcode.ts +118 -0
- package/src/models/operations/vendorsexport.ts +8 -1
- package/src/react-query/companiesListCompanyManagers.core.ts +4 -0
- package/src/react-query/companiesListCompanyManagers.ts +2 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/invoicesConvertQuote.ts +124 -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/vendorsGetVendorCredentialDetails.ts +2 -0
- package/src/react-query/vendorsUpdateVendorDetails.ts +9 -1
- package/src/react-query/vendorsVendorsExport.core.ts +2 -0
- package/src/react-query/vendorsVendorsExport.ts +10 -2
- package/src/sdk/invoices.ts +31 -0
- package/src/sdk/lookups.ts +33 -0
- package/src/sdk/users.ts +6 -0
- package/src/sdk/vendors.ts +18 -2
|
@@ -242,3 +242,24 @@ test("Invoices Get Invoice Id", async () => {
|
|
|
242
242
|
id: 892625,
|
|
243
243
|
});
|
|
244
244
|
});
|
|
245
|
+
|
|
246
|
+
test("Invoices Convert Quote", async () => {
|
|
247
|
+
const testHttpClient = createTestHTTPClient("convertQuote");
|
|
248
|
+
|
|
249
|
+
const greenSecurity = new GreenSecurity({
|
|
250
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
|
|
251
|
+
httpClient: testHttpClient,
|
|
252
|
+
security: {
|
|
253
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
|
|
254
|
+
},
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
const result = await greenSecurity.invoices.convertQuote({
|
|
258
|
+
id: 492224,
|
|
259
|
+
});
|
|
260
|
+
expect(result).toBeDefined();
|
|
261
|
+
expect(result).toEqual({
|
|
262
|
+
id: 11396,
|
|
263
|
+
success: true,
|
|
264
|
+
});
|
|
265
|
+
});
|
|
@@ -27,3 +27,27 @@ test("Lookups List Lookup Systems", async () => {
|
|
|
27
27
|
systems: [],
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
|
+
|
|
31
|
+
test("Lookups Lookup Postal Code", async () => {
|
|
32
|
+
const testHttpClient = createTestHTTPClient("lookupPostalCode");
|
|
33
|
+
|
|
34
|
+
const greenSecurity = new GreenSecurity({
|
|
35
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
|
|
36
|
+
httpClient: testHttpClient,
|
|
37
|
+
security: {
|
|
38
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const result = await greenSecurity.lookups.lookupPostalCode({
|
|
43
|
+
postalCode: "12383-0520",
|
|
44
|
+
state: "Rhode Island",
|
|
45
|
+
country: "Belgium",
|
|
46
|
+
});
|
|
47
|
+
expect(result).toBeDefined();
|
|
48
|
+
expect(result).toEqual({
|
|
49
|
+
status: "mismatch",
|
|
50
|
+
expectedStates: [],
|
|
51
|
+
error: "<value>",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -20,7 +20,7 @@ test("Webhooks List All Webhook Endpoints", async () => {
|
|
|
20
20
|
const testWebhookListForVendorUserResult = await greenSecurity.webhooks
|
|
21
21
|
.listAllWebhookEndpoints({
|
|
22
22
|
itemsPerPage: 25,
|
|
23
|
-
desc:
|
|
23
|
+
desc: 0,
|
|
24
24
|
sort: "",
|
|
25
25
|
});
|
|
26
26
|
expect(testWebhookListForVendorUserResult).toBeDefined();
|
|
@@ -35,37 +35,40 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
35
35
|
useUrlParams: false,
|
|
36
36
|
},
|
|
37
37
|
items: [
|
|
38
|
-
{
|
|
39
|
-
facility: {},
|
|
40
|
-
},
|
|
41
38
|
{
|
|
42
39
|
facility: {
|
|
43
40
|
contacts: {
|
|
44
41
|
contact: {
|
|
45
|
-
status: "
|
|
46
|
-
department:
|
|
42
|
+
status: "Inactive",
|
|
43
|
+
department: 123,
|
|
44
|
+
},
|
|
45
|
+
adminContact: {
|
|
46
|
+
status: "Active",
|
|
47
|
+
department: 123,
|
|
47
48
|
},
|
|
48
|
-
adminContact: null,
|
|
49
49
|
techContact: {
|
|
50
|
-
status: "
|
|
50
|
+
status: "Inactive",
|
|
51
51
|
department: 123,
|
|
52
52
|
},
|
|
53
53
|
greenSecurityCsm: {
|
|
54
|
-
status: "
|
|
55
|
-
department:
|
|
54
|
+
status: "Deleted",
|
|
55
|
+
department: 123,
|
|
56
56
|
},
|
|
57
57
|
accountManager: {
|
|
58
|
-
status: "
|
|
58
|
+
status: "Deleted",
|
|
59
59
|
department: 123,
|
|
60
60
|
},
|
|
61
61
|
},
|
|
62
62
|
vendorGuestPolicy: {
|
|
63
|
-
enabled:
|
|
63
|
+
enabled: true,
|
|
64
64
|
vendorGuestLimitAndOr: "and",
|
|
65
|
-
vendorGuestRequireEmail:
|
|
65
|
+
vendorGuestRequireEmail: true,
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
|
+
{
|
|
70
|
+
facility: {},
|
|
71
|
+
},
|
|
69
72
|
],
|
|
70
73
|
});
|
|
71
74
|
});
|
|
@@ -82,9 +85,8 @@ test("Zones Security Zone Checkin", async () => {
|
|
|
82
85
|
});
|
|
83
86
|
|
|
84
87
|
const result = await greenSecurity.zones.securityZoneCheckin({
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
zoneId: 654096,
|
|
88
|
+
qrCode: "<value>",
|
|
89
|
+
zoneId: 118821,
|
|
88
90
|
});
|
|
89
91
|
expect(result).toBeDefined();
|
|
90
92
|
expect(result).toEqual({});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { APIPromise } from "../types/async.js";
|
|
2
|
+
import { $doPost, internalApiResult } from "./doAdmin.js";
|
|
3
|
+
|
|
4
|
+
// Records that the caller dismissed a communication (GSSD-7336).
|
|
5
|
+
//
|
|
6
|
+
// Internal for the same reason as listCommunications: it only means anything to our own portal.
|
|
7
|
+
//
|
|
8
|
+
// The durable half of a two-layer dismissal — the client suppresses locally straight away so a
|
|
9
|
+
// banner does not flash back while this is in flight, and this row is what makes the timed
|
|
10
|
+
// rules ("after a week", "after a month") hold on a second device. Whether a past dismissal
|
|
11
|
+
// still suppresses anything is decided server-side on the next list call.
|
|
12
|
+
//
|
|
13
|
+
// The server re-checks the caller's audience before writing, so dismissing a communication that
|
|
14
|
+
// was never aimed at you answers 404 rather than creating a row.
|
|
15
|
+
export function dismissCommunication(communicationId: number): internalApiResult {
|
|
16
|
+
return new APIPromise($doPost(
|
|
17
|
+
`/communications/${communicationId}/dismiss`,
|
|
18
|
+
{},
|
|
19
|
+
));
|
|
20
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { APIPromise } from "../types/async.js";
|
|
2
|
+
import { $doGetSingle, hashToQueryString, internalApiResult } from "./doAdmin.js";
|
|
3
|
+
|
|
4
|
+
// The banners, pop-ups and in-app notifications aimed at the signed-in user (GSSD-7336).
|
|
5
|
+
//
|
|
6
|
+
// Internal rather than part of the public spec: "the adverts for whoever is holding this token"
|
|
7
|
+
// is only meaningful to our own portal, and a third-party SDK consumer has no use for it. See
|
|
8
|
+
// the public/app-only split in AGENTS.md.
|
|
9
|
+
//
|
|
10
|
+
// The response is already filtered and ordered by the server — audience matched per caller,
|
|
11
|
+
// page matched, anything still suppressed by a dismissal removed, and sorted by priority — so a
|
|
12
|
+
// caller renders the list as it arrives.
|
|
13
|
+
//
|
|
14
|
+
// pageKey narrows to the communications configured for one page. Omitting it returns every
|
|
15
|
+
// communication for the user, which is what a caller that does its own page matching wants.
|
|
16
|
+
export function listCommunications(
|
|
17
|
+
pageKey?: string | null,
|
|
18
|
+
itemsPerPage: number = 100,
|
|
19
|
+
): internalApiResult {
|
|
20
|
+
const query: Record<string, string | number> = { items_per_page: itemsPerPage };
|
|
21
|
+
if (pageKey) {
|
|
22
|
+
query["page_key"] = pageKey;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return new APIPromise($doGetSingle(
|
|
26
|
+
`/communications?${hashToQueryString(query)}`,
|
|
27
|
+
{},
|
|
28
|
+
));
|
|
29
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Convert a quote into an invoice
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Converts a quote into the real invoice its caller will be charged for, and
|
|
34
|
+
* returns the new invoice with its calculated totals. Any `VendorCredential`
|
|
35
|
+
* linked to the quote is re-pointed at the new invoice.
|
|
36
|
+
*
|
|
37
|
+
* The operation is idempotent: converting a quote that has already been
|
|
38
|
+
* processed returns the invoice previously created from it rather than
|
|
39
|
+
* creating a second one, so a retried request is safe.
|
|
40
|
+
*
|
|
41
|
+
* The referenced invoice must actually be a quote — a non-quote invoice id
|
|
42
|
+
* responds `400`. Requires a caller whose access scope permits creating
|
|
43
|
+
* invoices; a caller allowed to create the invoice but not to update the
|
|
44
|
+
* linked `VendorCredential` responds `401`.
|
|
45
|
+
*
|
|
46
|
+
* Takes no request body.
|
|
47
|
+
*
|
|
48
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
49
|
+
*/
|
|
50
|
+
export function invoicesConvertQuote(
|
|
51
|
+
client: GreenSecurityCore,
|
|
52
|
+
request: operations.ConvertQuoteRequest,
|
|
53
|
+
options?: RequestOptions,
|
|
54
|
+
): APIPromise<
|
|
55
|
+
Result<
|
|
56
|
+
operations.ConvertQuoteConvertQuoteOk,
|
|
57
|
+
| errors.ApiErrorResponse
|
|
58
|
+
| GreenSecurityError
|
|
59
|
+
| ResponseValidationError
|
|
60
|
+
| ConnectionError
|
|
61
|
+
| RequestAbortedError
|
|
62
|
+
| RequestTimeoutError
|
|
63
|
+
| InvalidRequestError
|
|
64
|
+
| UnexpectedClientError
|
|
65
|
+
| SDKValidationError
|
|
66
|
+
>
|
|
67
|
+
> {
|
|
68
|
+
return new APIPromise($do(
|
|
69
|
+
client,
|
|
70
|
+
request,
|
|
71
|
+
options,
|
|
72
|
+
));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function $do(
|
|
76
|
+
client: GreenSecurityCore,
|
|
77
|
+
request: operations.ConvertQuoteRequest,
|
|
78
|
+
options?: RequestOptions,
|
|
79
|
+
): Promise<
|
|
80
|
+
[
|
|
81
|
+
Result<
|
|
82
|
+
operations.ConvertQuoteConvertQuoteOk,
|
|
83
|
+
| errors.ApiErrorResponse
|
|
84
|
+
| GreenSecurityError
|
|
85
|
+
| ResponseValidationError
|
|
86
|
+
| ConnectionError
|
|
87
|
+
| RequestAbortedError
|
|
88
|
+
| RequestTimeoutError
|
|
89
|
+
| InvalidRequestError
|
|
90
|
+
| UnexpectedClientError
|
|
91
|
+
| SDKValidationError
|
|
92
|
+
>,
|
|
93
|
+
APICall,
|
|
94
|
+
]
|
|
95
|
+
> {
|
|
96
|
+
const parsed = safeParse(
|
|
97
|
+
request,
|
|
98
|
+
(value) => operations.ConvertQuoteRequest$outboundSchema.parse(value),
|
|
99
|
+
"Input validation failed",
|
|
100
|
+
);
|
|
101
|
+
if (!parsed.ok) {
|
|
102
|
+
return [parsed, { status: "invalid" }];
|
|
103
|
+
}
|
|
104
|
+
const payload = parsed.value;
|
|
105
|
+
const body = null;
|
|
106
|
+
|
|
107
|
+
const pathParams = {
|
|
108
|
+
id: encodeSimple("id", payload.id, {
|
|
109
|
+
explode: false,
|
|
110
|
+
charEncoding: "percent",
|
|
111
|
+
}),
|
|
112
|
+
};
|
|
113
|
+
const path = pathToFunc("/invoices/{id}/convert")(pathParams);
|
|
114
|
+
|
|
115
|
+
const headers = new Headers(compactMap({
|
|
116
|
+
Accept: "application/json",
|
|
117
|
+
}));
|
|
118
|
+
|
|
119
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
120
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
121
|
+
|
|
122
|
+
const context = {
|
|
123
|
+
options: client._options,
|
|
124
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
125
|
+
operationID: "convertQuote",
|
|
126
|
+
oAuth2Scopes: null,
|
|
127
|
+
|
|
128
|
+
resolvedSecurity: requestSecurity,
|
|
129
|
+
|
|
130
|
+
securitySource: client._options.security,
|
|
131
|
+
retryConfig: options?.retries
|
|
132
|
+
|| client._options.retryConfig
|
|
133
|
+
|| { strategy: "none" },
|
|
134
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const requestRes = client._createRequest(context, {
|
|
138
|
+
security: requestSecurity,
|
|
139
|
+
method: "POST",
|
|
140
|
+
baseURL: options?.serverURL,
|
|
141
|
+
path: path,
|
|
142
|
+
headers: headers,
|
|
143
|
+
body: body,
|
|
144
|
+
userAgent: client._options.userAgent,
|
|
145
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
146
|
+
}, options);
|
|
147
|
+
if (!requestRes.ok) {
|
|
148
|
+
return [requestRes, { status: "invalid" }];
|
|
149
|
+
}
|
|
150
|
+
const req = requestRes.value;
|
|
151
|
+
|
|
152
|
+
const doResult = await client._do(req, {
|
|
153
|
+
context,
|
|
154
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
155
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
156
|
+
retryConfig: context.retryConfig,
|
|
157
|
+
retryCodes: context.retryCodes,
|
|
158
|
+
});
|
|
159
|
+
if (!doResult.ok) {
|
|
160
|
+
return [doResult, { status: "request-error", request: req }];
|
|
161
|
+
}
|
|
162
|
+
const response = doResult.value;
|
|
163
|
+
|
|
164
|
+
const responseFields = {
|
|
165
|
+
HttpMeta: { Response: response, Request: req },
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
const [result] = await M.match<
|
|
169
|
+
operations.ConvertQuoteConvertQuoteOk,
|
|
170
|
+
| errors.ApiErrorResponse
|
|
171
|
+
| GreenSecurityError
|
|
172
|
+
| ResponseValidationError
|
|
173
|
+
| ConnectionError
|
|
174
|
+
| RequestAbortedError
|
|
175
|
+
| RequestTimeoutError
|
|
176
|
+
| InvalidRequestError
|
|
177
|
+
| UnexpectedClientError
|
|
178
|
+
| SDKValidationError
|
|
179
|
+
>(
|
|
180
|
+
M.json(200, operations.ConvertQuoteConvertQuoteOk$inboundSchema),
|
|
181
|
+
M.jsonErr([400, 401, 403, 404], errors.ApiErrorResponse$inboundSchema),
|
|
182
|
+
M.fail("4XX"),
|
|
183
|
+
M.fail([500, "5XX"]),
|
|
184
|
+
)(response, req, { extraFields: responseFields });
|
|
185
|
+
if (!result.ok) {
|
|
186
|
+
return [result, { status: "complete", request: req, response }];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return [result, { status: "complete", request: req, response }];
|
|
190
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Check a postal code against a state and country
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Cross-checks a postal code against a state/province and country, the same check
|
|
34
|
+
* every write path that stores a US or Canadian address enforces server-side (e.g.
|
|
35
|
+
* `PUT /users/{id}`, `PUT /vendors/{vendor_id_or_me}`). Useful for validating an
|
|
36
|
+
* address before submitting it elsewhere.
|
|
37
|
+
*
|
|
38
|
+
* `status` is one of:
|
|
39
|
+
* - `ok` — the postal code belongs to the given state/province.
|
|
40
|
+
* - `invalid` — the postal code is not shaped like a real one for the given country.
|
|
41
|
+
* - `mismatch` — the postal code is well-formed but belongs to a different state or
|
|
42
|
+
* province. `expected_states` names the state(s) it actually maps to.
|
|
43
|
+
* - `unknown` — nothing to check against (an unsupported country, or a postal code
|
|
44
|
+
* absent from the US ZIP dataset). Treated as acceptable by every write path that
|
|
45
|
+
* uses this check.
|
|
46
|
+
*
|
|
47
|
+
* Only the US and Canada have a real code-to-subdivision map; every other country
|
|
48
|
+
* always returns `unknown`.
|
|
49
|
+
*
|
|
50
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
51
|
+
*/
|
|
52
|
+
export function lookupsLookupPostalCode(
|
|
53
|
+
client: GreenSecurityCore,
|
|
54
|
+
request: operations.LookupPostalCodeRequest,
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): APIPromise<
|
|
57
|
+
Result<
|
|
58
|
+
operations.LookupPostalCodeLookupPostalCodeOk,
|
|
59
|
+
| errors.ApiErrorResponse
|
|
60
|
+
| GreenSecurityError
|
|
61
|
+
| ResponseValidationError
|
|
62
|
+
| ConnectionError
|
|
63
|
+
| RequestAbortedError
|
|
64
|
+
| RequestTimeoutError
|
|
65
|
+
| InvalidRequestError
|
|
66
|
+
| UnexpectedClientError
|
|
67
|
+
| SDKValidationError
|
|
68
|
+
>
|
|
69
|
+
> {
|
|
70
|
+
return new APIPromise($do(
|
|
71
|
+
client,
|
|
72
|
+
request,
|
|
73
|
+
options,
|
|
74
|
+
));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async function $do(
|
|
78
|
+
client: GreenSecurityCore,
|
|
79
|
+
request: operations.LookupPostalCodeRequest,
|
|
80
|
+
options?: RequestOptions,
|
|
81
|
+
): Promise<
|
|
82
|
+
[
|
|
83
|
+
Result<
|
|
84
|
+
operations.LookupPostalCodeLookupPostalCodeOk,
|
|
85
|
+
| errors.ApiErrorResponse
|
|
86
|
+
| GreenSecurityError
|
|
87
|
+
| ResponseValidationError
|
|
88
|
+
| ConnectionError
|
|
89
|
+
| RequestAbortedError
|
|
90
|
+
| RequestTimeoutError
|
|
91
|
+
| InvalidRequestError
|
|
92
|
+
| UnexpectedClientError
|
|
93
|
+
| SDKValidationError
|
|
94
|
+
>,
|
|
95
|
+
APICall,
|
|
96
|
+
]
|
|
97
|
+
> {
|
|
98
|
+
const parsed = safeParse(
|
|
99
|
+
request,
|
|
100
|
+
(value) => operations.LookupPostalCodeRequest$outboundSchema.parse(value),
|
|
101
|
+
"Input validation failed",
|
|
102
|
+
);
|
|
103
|
+
if (!parsed.ok) {
|
|
104
|
+
return [parsed, { status: "invalid" }];
|
|
105
|
+
}
|
|
106
|
+
const payload = parsed.value;
|
|
107
|
+
const body = null;
|
|
108
|
+
|
|
109
|
+
const path = pathToFunc("/lookups/postal-code")();
|
|
110
|
+
|
|
111
|
+
const query = encodeFormQuery({
|
|
112
|
+
"country": payload.country,
|
|
113
|
+
"postal_code": payload.postal_code,
|
|
114
|
+
"state": payload.state,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const headers = new Headers(compactMap({
|
|
118
|
+
Accept: "application/json",
|
|
119
|
+
}));
|
|
120
|
+
|
|
121
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
122
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
123
|
+
|
|
124
|
+
const context = {
|
|
125
|
+
options: client._options,
|
|
126
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
127
|
+
operationID: "lookupPostalCode",
|
|
128
|
+
oAuth2Scopes: null,
|
|
129
|
+
|
|
130
|
+
resolvedSecurity: requestSecurity,
|
|
131
|
+
|
|
132
|
+
securitySource: client._options.security,
|
|
133
|
+
retryConfig: options?.retries
|
|
134
|
+
|| client._options.retryConfig
|
|
135
|
+
|| { strategy: "none" },
|
|
136
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const requestRes = client._createRequest(context, {
|
|
140
|
+
security: requestSecurity,
|
|
141
|
+
method: "GET",
|
|
142
|
+
baseURL: options?.serverURL,
|
|
143
|
+
path: path,
|
|
144
|
+
headers: headers,
|
|
145
|
+
query: query,
|
|
146
|
+
body: body,
|
|
147
|
+
userAgent: client._options.userAgent,
|
|
148
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
149
|
+
}, options);
|
|
150
|
+
if (!requestRes.ok) {
|
|
151
|
+
return [requestRes, { status: "invalid" }];
|
|
152
|
+
}
|
|
153
|
+
const req = requestRes.value;
|
|
154
|
+
|
|
155
|
+
const doResult = await client._do(req, {
|
|
156
|
+
context,
|
|
157
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
158
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
159
|
+
retryConfig: context.retryConfig,
|
|
160
|
+
retryCodes: context.retryCodes,
|
|
161
|
+
});
|
|
162
|
+
if (!doResult.ok) {
|
|
163
|
+
return [doResult, { status: "request-error", request: req }];
|
|
164
|
+
}
|
|
165
|
+
const response = doResult.value;
|
|
166
|
+
|
|
167
|
+
const responseFields = {
|
|
168
|
+
HttpMeta: { Response: response, Request: req },
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const [result] = await M.match<
|
|
172
|
+
operations.LookupPostalCodeLookupPostalCodeOk,
|
|
173
|
+
| errors.ApiErrorResponse
|
|
174
|
+
| GreenSecurityError
|
|
175
|
+
| ResponseValidationError
|
|
176
|
+
| ConnectionError
|
|
177
|
+
| RequestAbortedError
|
|
178
|
+
| RequestTimeoutError
|
|
179
|
+
| InvalidRequestError
|
|
180
|
+
| UnexpectedClientError
|
|
181
|
+
| SDKValidationError
|
|
182
|
+
>(
|
|
183
|
+
M.json(200, operations.LookupPostalCodeLookupPostalCodeOk$inboundSchema),
|
|
184
|
+
M.jsonErr([400, 401, 422], errors.ApiErrorResponse$inboundSchema),
|
|
185
|
+
M.fail("4XX"),
|
|
186
|
+
M.fail([500, "5XX"]),
|
|
187
|
+
)(response, req, { extraFields: responseFields });
|
|
188
|
+
if (!result.ok) {
|
|
189
|
+
return [result, { status: "complete", request: req, response }];
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return [result, { status: "complete", request: req, response }];
|
|
193
|
+
}
|
|
@@ -37,6 +37,12 @@ import { Result } from "../types/fp.js";
|
|
|
37
37
|
* Only submitted fields are applied — unrecognised fields are silently ignored.
|
|
38
38
|
* Changing `email` automatically resets `bounced_email` to `false`.
|
|
39
39
|
*
|
|
40
|
+
* Submitting `zip`, `state`, or `country` cross-checks the postal code against the
|
|
41
|
+
* resulting state/country (using the existing value for any of the three left out
|
|
42
|
+
* of the request). A code that is not shaped like a real postal code, or that
|
|
43
|
+
* provably belongs to a different state, is rejected with `422` naming the correct
|
|
44
|
+
* state.
|
|
45
|
+
*
|
|
40
46
|
* Each subkey of `email_preferences` is independently optional; sending
|
|
41
47
|
* `{ "email_preferences": { "send_weekly_summary_email": true } }` flips
|
|
42
48
|
* only that flag and leaves the others unchanged.
|
|
@@ -36,6 +36,10 @@ import { Result } from "../types/fp.js";
|
|
|
36
36
|
* All other callers must provide `company_id`. The caller must have access to the
|
|
37
37
|
* specified company (verified via scoped access policy) and the `vendors:add` permission.
|
|
38
38
|
*
|
|
39
|
+
* `zip` is cross-checked against `state`: a code that is not shaped like a real postal
|
|
40
|
+
* code, or that provably belongs to a different state, is rejected with `422` naming
|
|
41
|
+
* the correct state.
|
|
42
|
+
*
|
|
39
43
|
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
40
44
|
*/
|
|
41
45
|
export function vendorsCreateVendor(
|
|
@@ -36,6 +36,7 @@ import { Result } from "../types/fp.js";
|
|
|
36
36
|
* - vendor_credential.credential
|
|
37
37
|
* - vendor_credential.vendor
|
|
38
38
|
* - vendor_credential.invoice
|
|
39
|
+
* - vendor_credential.quote
|
|
39
40
|
* - vendor_credential.vendor_credential_files
|
|
40
41
|
* - vendor_credential.latest_vendor_credential_id
|
|
41
42
|
* - vendor_credential.previously_approved
|
|
@@ -38,7 +38,15 @@ import * as types$ from "../types/primitives.js";
|
|
|
38
38
|
* From `location` this endpoint reads only `timezone`, `address1`, `address2`,
|
|
39
39
|
* `city`, `state`, `zip`, `phone`, `mobile_phone` and `fax`. The `address` and
|
|
40
40
|
* `country` properties of the shared `UserLocation` schema are ignored here and
|
|
41
|
-
* updating them is not supported.
|
|
41
|
+
* updating them is not supported. `state` accepts a US state or a Canadian
|
|
42
|
+
* province — the vendor's country, set only at registration, is not editable
|
|
43
|
+
* through this endpoint.
|
|
44
|
+
*
|
|
45
|
+
* Submitting `location.zip` or `location.state` cross-checks the postal code
|
|
46
|
+
* against the resulting state (using the vendor's existing value for whichever
|
|
47
|
+
* of the two is left out of the request). A code that is not shaped like a real
|
|
48
|
+
* postal code, or that provably belongs to a different state, is rejected with
|
|
49
|
+
* `422` naming the correct state.
|
|
42
50
|
*
|
|
43
51
|
* For `title`, the `supervisor` fields, and every `location` field except
|
|
44
52
|
* `timezone`, the value sent is the value stored: omit a field to leave it
|
|
@@ -32,7 +32,10 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
34
|
* Enqueues an asynchronous job to generate a CSV export of vendors based on the
|
|
35
|
-
* provided filters (the same filters supported by the vendors list endpoint)
|
|
35
|
+
* provided filters (the same filters supported by the vendors list endpoint), in the same
|
|
36
|
+
* credential-inclusive format as the portal's "Download Full Report" button - one column per
|
|
37
|
+
* applicable credential (status, due date, expiration), plus counts and percentage approved,
|
|
38
|
+
* alongside the vendor's identity, contact, and company details.
|
|
36
39
|
* Returns a `status_url` to poll until the export is ready, plus a
|
|
37
40
|
* `download_url` and `status_id`.
|
|
38
41
|
*
|
|
@@ -114,6 +117,8 @@ async function $do(
|
|
|
114
117
|
"desc": payload.desc,
|
|
115
118
|
"email_like": payload.email_like,
|
|
116
119
|
"expand": payload.expand,
|
|
120
|
+
"externally_managed_by_company_id":
|
|
121
|
+
payload.externally_managed_by_company_id,
|
|
117
122
|
"first_name_like": payload.first_name_like,
|
|
118
123
|
"full_name_like": payload.full_name_like,
|
|
119
124
|
"items_per_page": payload.items_per_page,
|
package/src/index.extras.ts
CHANGED
|
@@ -44,6 +44,9 @@ import { vendorGetPaymentForm } from "./admin-funcs/vendorGetPaymentForm.js";
|
|
|
44
44
|
import { vendorGetSystemsRequiringSmartBadge } from "./admin-funcs/vendorGetSystemsRequiringSmartBadge.js";
|
|
45
45
|
import { vendorGetCompanyCredentialsSummary } from "./admin-funcs/vendorGetCompanyCredentialsSummary.js";
|
|
46
46
|
|
|
47
|
+
import { listCommunications } from "./admin-funcs/listCommunications.js";
|
|
48
|
+
import { dismissCommunication } from "./admin-funcs/dismissCommunication.js";
|
|
49
|
+
|
|
47
50
|
export const __internal = {
|
|
48
51
|
getInternalCore,
|
|
49
52
|
initializeInternalCore,
|
|
@@ -102,6 +105,11 @@ export const __internal = {
|
|
|
102
105
|
notifyUploaded: notifyVendorCredentialFileUploaded
|
|
103
106
|
},
|
|
104
107
|
|
|
108
|
+
communications: {
|
|
109
|
+
list: listCommunications,
|
|
110
|
+
dismiss: dismissCommunication
|
|
111
|
+
},
|
|
112
|
+
|
|
105
113
|
companyManager: {
|
|
106
114
|
getPaymentForm: companyManagerGetPaymentForm,
|
|
107
115
|
},
|