@greensecurity/javascript-sdk 0.44.0-beta.3 → 0.44.0-beta.6
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 +21 -0
- package/dist/commonjs/__tests__/companies.test.js +29 -0
- package/dist/commonjs/__tests__/companies.test.js.map +1 -1
- package/dist/commonjs/__tests__/organizations.test.js +75 -0
- package/dist/commonjs/__tests__/organizations.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +51 -0
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +2 -9
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/companiesListCompanyCredentials.d.ts +23 -0
- package/dist/commonjs/funcs/companiesListCompanyCredentials.d.ts.map +1 -0
- package/dist/commonjs/funcs/companiesListCompanyCredentials.js +170 -0
- package/dist/commonjs/funcs/companiesListCompanyCredentials.js.map +1 -0
- package/dist/commonjs/funcs/organizationsCreateCompanyTargetFacility.d.ts +34 -0
- package/dist/commonjs/funcs/organizationsCreateCompanyTargetFacility.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsCreateCompanyTargetFacility.js +145 -0
- package/dist/commonjs/funcs/organizationsCreateCompanyTargetFacility.js.map +1 -0
- package/dist/commonjs/funcs/organizationsDeleteCompanyTargetFacility.d.ts +28 -0
- package/dist/commonjs/funcs/organizationsDeleteCompanyTargetFacility.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsDeleteCompanyTargetFacility.js +138 -0
- package/dist/commonjs/funcs/organizationsDeleteCompanyTargetFacility.js.map +1 -0
- package/dist/commonjs/funcs/organizationsListCompanyTargetFacilities.d.ts +38 -0
- package/dist/commonjs/funcs/organizationsListCompanyTargetFacilities.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsListCompanyTargetFacilities.js +186 -0
- package/dist/commonjs/funcs/organizationsListCompanyTargetFacilities.js.map +1 -0
- package/dist/commonjs/funcs/organizationsListOrSearchFacilities.js +1 -0
- package/dist/commonjs/funcs/organizationsListOrSearchFacilities.js.map +1 -1
- package/dist/commonjs/funcs/vendorScansGetVendorScan.d.ts +3 -0
- package/dist/commonjs/funcs/vendorScansGetVendorScan.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorScansGetVendorScan.js +3 -0
- package/dist/commonjs/funcs/vendorScansGetVendorScan.js.map +1 -1
- package/dist/commonjs/funcs/vendorsDownloadVendorsExport.d.ts +22 -0
- package/dist/commonjs/funcs/vendorsDownloadVendorsExport.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsDownloadVendorsExport.js +128 -0
- package/dist/commonjs/funcs/vendorsDownloadVendorsExport.js.map +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorsExportStatus.d.ts +21 -0
- package/dist/commonjs/funcs/vendorsGetVendorsExportStatus.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorsExportStatus.js +126 -0
- package/dist/commonjs/funcs/vendorsGetVendorsExportStatus.js.map +1 -0
- package/dist/commonjs/funcs/vendorsVendorsExport.d.ts +23 -0
- package/dist/commonjs/funcs/vendorsVendorsExport.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsVendorsExport.js +152 -0
- package/dist/commonjs/funcs/vendorsVendorsExport.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/appointmentsummary.d.ts +25 -0
- package/dist/commonjs/models/components/appointmentsummary.d.ts.map +1 -0
- package/dist/commonjs/models/components/appointmentsummary.js +63 -0
- package/dist/commonjs/models/components/appointmentsummary.js.map +1 -0
- package/dist/commonjs/models/components/companycredentiallistitem.d.ts +32 -0
- package/dist/commonjs/models/components/companycredentiallistitem.d.ts.map +1 -0
- package/dist/commonjs/models/components/companycredentiallistitem.js +84 -0
- package/dist/commonjs/models/components/companycredentiallistitem.js.map +1 -0
- package/dist/commonjs/models/components/companytargetfacility.d.ts +54 -0
- package/dist/commonjs/models/components/companytargetfacility.d.ts.map +1 -0
- package/dist/commonjs/models/components/companytargetfacility.js +80 -0
- package/dist/commonjs/models/components/companytargetfacility.js.map +1 -0
- package/dist/commonjs/models/components/emailpreferences.d.ts +0 -18
- package/dist/commonjs/models/components/emailpreferences.d.ts.map +1 -1
- package/dist/commonjs/models/components/emailpreferences.js +0 -9
- package/dist/commonjs/models/components/emailpreferences.js.map +1 -1
- package/dist/commonjs/models/components/expand.d.ts +5 -0
- package/dist/commonjs/models/components/expand.d.ts.map +1 -1
- package/dist/commonjs/models/components/expand.js +5 -0
- package/dist/commonjs/models/components/expand.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +4 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +4 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts +2 -0
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.js +2 -0
- package/dist/commonjs/models/components/vendorcredentialsummary.js.map +1 -1
- package/dist/commonjs/models/components/vendorscan.d.ts +47 -0
- package/dist/commonjs/models/components/vendorscan.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorscan.js +31 -1
- package/dist/commonjs/models/components/vendorscan.js.map +1 -1
- package/dist/commonjs/models/components/vendorscanscreeningresponse.d.ts +27 -0
- package/dist/commonjs/models/components/vendorscanscreeningresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/vendorscanscreeningresponse.js +63 -0
- package/dist/commonjs/models/components/vendorscanscreeningresponse.js.map +1 -0
- package/dist/commonjs/models/operations/createcompanytargetfacility.d.ts +50 -0
- package/dist/commonjs/models/operations/createcompanytargetfacility.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createcompanytargetfacility.js +84 -0
- package/dist/commonjs/models/operations/createcompanytargetfacility.js.map +1 -0
- package/dist/commonjs/models/operations/createinvoice.d.ts +6 -6
- package/dist/commonjs/models/operations/createinvoice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createinvoice.js +6 -6
- package/dist/commonjs/models/operations/createinvoice.js.map +1 -1
- package/dist/commonjs/models/operations/deletecompanytargetfacility.d.ts +20 -0
- package/dist/commonjs/models/operations/deletecompanytargetfacility.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletecompanytargetfacility.js +55 -0
- package/dist/commonjs/models/operations/deletecompanytargetfacility.js.map +1 -0
- package/dist/commonjs/models/operations/downloadvendorsexport.d.ts +42 -0
- package/dist/commonjs/models/operations/downloadvendorsexport.d.ts.map +1 -0
- package/dist/commonjs/models/operations/downloadvendorsexport.js +75 -0
- package/dist/commonjs/models/operations/downloadvendorsexport.js.map +1 -0
- package/dist/commonjs/models/operations/getinvoice.d.ts +4 -4
- package/dist/commonjs/models/operations/getinvoice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getinvoice.js +4 -4
- package/dist/commonjs/models/operations/getinvoice.js.map +1 -1
- package/dist/commonjs/models/operations/getvendorsexportstatus.d.ts +53 -0
- package/dist/commonjs/models/operations/getvendorsexportstatus.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getvendorsexportstatus.js +73 -0
- package/dist/commonjs/models/operations/getvendorsexportstatus.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +7 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +7 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/invoicesexport.d.ts +8 -8
- package/dist/commonjs/models/operations/invoicesexport.d.ts.map +1 -1
- package/dist/commonjs/models/operations/invoicesexport.js +9 -8
- package/dist/commonjs/models/operations/invoicesexport.js.map +1 -1
- package/dist/commonjs/models/operations/listcompanycredentials.d.ts +93 -0
- package/dist/commonjs/models/operations/listcompanycredentials.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listcompanycredentials.js +112 -0
- package/dist/commonjs/models/operations/listcompanycredentials.js.map +1 -0
- package/dist/commonjs/models/operations/listcompanycredits.d.ts +4 -4
- package/dist/commonjs/models/operations/listcompanycredits.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listcompanycredits.js +4 -4
- package/dist/commonjs/models/operations/listcompanycredits.js.map +1 -1
- package/dist/commonjs/models/operations/listcompanytargetfacilities.d.ts +138 -0
- package/dist/commonjs/models/operations/listcompanytargetfacilities.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listcompanytargetfacilities.js +130 -0
- package/dist/commonjs/models/operations/listcompanytargetfacilities.js.map +1 -0
- package/dist/commonjs/models/operations/listlookupsystems.d.ts +4 -4
- package/dist/commonjs/models/operations/listlookupsystems.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listlookupsystems.js +4 -5
- package/dist/commonjs/models/operations/listlookupsystems.js.map +1 -1
- package/dist/commonjs/models/operations/listorsearchfacilities.d.ts +18 -0
- package/dist/commonjs/models/operations/listorsearchfacilities.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listorsearchfacilities.js +11 -1
- package/dist/commonjs/models/operations/listorsearchfacilities.js.map +1 -1
- package/dist/commonjs/models/operations/securityzonecheckin.d.ts +18 -17
- package/dist/commonjs/models/operations/securityzonecheckin.d.ts.map +1 -1
- package/dist/commonjs/models/operations/securityzonecheckin.js +16 -15
- package/dist/commonjs/models/operations/securityzonecheckin.js.map +1 -1
- package/dist/commonjs/models/operations/vendorsexport.d.ts +184 -0
- package/dist/commonjs/models/operations/vendorsexport.d.ts.map +1 -0
- package/dist/commonjs/models/operations/vendorsexport.js +133 -0
- package/dist/commonjs/models/operations/vendorsexport.js.map +1 -0
- package/dist/commonjs/react-query/companiesListCompanyCredentials.core.d.ts +44 -0
- package/dist/commonjs/react-query/companiesListCompanyCredentials.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/companiesListCompanyCredentials.core.js +101 -0
- package/dist/commonjs/react-query/companiesListCompanyCredentials.core.js.map +1 -0
- package/dist/commonjs/react-query/companiesListCompanyCredentials.d.ts +68 -0
- package/dist/commonjs/react-query/companiesListCompanyCredentials.d.ts.map +1 -0
- package/dist/commonjs/react-query/companiesListCompanyCredentials.js +104 -0
- package/dist/commonjs/react-query/companiesListCompanyCredentials.js.map +1 -0
- package/dist/commonjs/react-query/companiesListCompanyCredits.core.d.ts +2 -2
- package/dist/commonjs/react-query/companiesListCompanyCredits.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/companiesListCompanyCredits.d.ts +2 -2
- package/dist/commonjs/react-query/companiesListCompanyCredits.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +7 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +7 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/invoicesGetInvoice.core.d.ts +1 -1
- package/dist/commonjs/react-query/invoicesGetInvoice.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/invoicesGetInvoice.d.ts +2 -2
- package/dist/commonjs/react-query/invoicesGetInvoice.d.ts.map +1 -1
- package/dist/commonjs/react-query/invoicesInvoicesExport.core.d.ts +1 -1
- package/dist/commonjs/react-query/invoicesInvoicesExport.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/invoicesInvoicesExport.d.ts +2 -2
- package/dist/commonjs/react-query/invoicesInvoicesExport.d.ts.map +1 -1
- package/dist/commonjs/react-query/lookupsListLookupSystems.core.d.ts +1 -1
- package/dist/commonjs/react-query/lookupsListLookupSystems.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/lookupsListLookupSystems.d.ts +2 -2
- package/dist/commonjs/react-query/lookupsListLookupSystems.d.ts.map +1 -1
- package/dist/commonjs/react-query/organizationsCreateCompanyTargetFacility.d.ts +43 -0
- package/dist/commonjs/react-query/organizationsCreateCompanyTargetFacility.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsCreateCompanyTargetFacility.js +65 -0
- package/dist/commonjs/react-query/organizationsCreateCompanyTargetFacility.js.map +1 -0
- package/dist/commonjs/react-query/organizationsDeleteCompanyTargetFacility.d.ts +37 -0
- package/dist/commonjs/react-query/organizationsDeleteCompanyTargetFacility.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsDeleteCompanyTargetFacility.js +59 -0
- package/dist/commonjs/react-query/organizationsDeleteCompanyTargetFacility.js.map +1 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.core.d.ts +46 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.core.js +103 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.core.js.map +1 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.d.ts +130 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.js +164 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.js.map +1 -0
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.core.d.ts +2 -0
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.core.js +2 -0
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.core.js.map +1 -1
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.d.ts +2 -0
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.js.map +1 -1
- package/dist/commonjs/react-query/vendorScansGetVendorScan.d.ts +6 -0
- package/dist/commonjs/react-query/vendorScansGetVendorScan.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorScansGetVendorScan.js +6 -0
- package/dist/commonjs/react-query/vendorScansGetVendorScan.js.map +1 -1
- package/dist/commonjs/react-query/vendorsDownloadVendorsExport.core.d.ts +12 -0
- package/dist/commonjs/react-query/vendorsDownloadVendorsExport.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsDownloadVendorsExport.core.js +39 -0
- package/dist/commonjs/react-query/vendorsDownloadVendorsExport.core.js.map +1 -0
- package/dist/commonjs/react-query/vendorsDownloadVendorsExport.d.ts +33 -0
- package/dist/commonjs/react-query/vendorsDownloadVendorsExport.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsDownloadVendorsExport.js +73 -0
- package/dist/commonjs/react-query/vendorsDownloadVendorsExport.js.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorsExportStatus.core.d.ts +12 -0
- package/dist/commonjs/react-query/vendorsGetVendorsExportStatus.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorsExportStatus.core.js +39 -0
- package/dist/commonjs/react-query/vendorsGetVendorsExportStatus.core.js.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorsExportStatus.d.ts +31 -0
- package/dist/commonjs/react-query/vendorsGetVendorsExportStatus.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorsExportStatus.js +71 -0
- package/dist/commonjs/react-query/vendorsGetVendorsExportStatus.js.map +1 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.core.d.ts +40 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.core.js +67 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.core.js.map +1 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.d.ts +95 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.js +71 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.js.map +1 -0
- package/dist/commonjs/sdk/companies.d.ts +9 -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/organizations.d.ts +60 -0
- package/dist/commonjs/sdk/organizations.d.ts.map +1 -1
- package/dist/commonjs/sdk/organizations.js +67 -0
- package/dist/commonjs/sdk/organizations.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +27 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +36 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/commonjs/sdk/vendorscans.d.ts +3 -0
- package/dist/commonjs/sdk/vendorscans.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendorscans.js +3 -0
- package/dist/commonjs/sdk/vendorscans.js.map +1 -1
- package/dist/commonjs/types/async.d.ts.map +1 -1
- package/dist/commonjs/types/async.js +8 -7
- package/dist/commonjs/types/async.js.map +1 -1
- package/dist/commonjs/types/primitives.d.ts +0 -2
- package/dist/commonjs/types/primitives.d.ts.map +1 -1
- package/dist/commonjs/types/primitives.js +0 -23
- package/dist/commonjs/types/primitives.js.map +1 -1
- package/dist/esm/__tests__/companies.test.js +29 -0
- package/dist/esm/__tests__/companies.test.js.map +1 -1
- package/dist/esm/__tests__/organizations.test.js +75 -0
- package/dist/esm/__tests__/organizations.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +51 -0
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +2 -9
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/companiesListCompanyCredentials.d.ts +23 -0
- package/dist/esm/funcs/companiesListCompanyCredentials.d.ts.map +1 -0
- package/dist/esm/funcs/companiesListCompanyCredentials.js +134 -0
- package/dist/esm/funcs/companiesListCompanyCredentials.js.map +1 -0
- package/dist/esm/funcs/organizationsCreateCompanyTargetFacility.d.ts +34 -0
- package/dist/esm/funcs/organizationsCreateCompanyTargetFacility.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsCreateCompanyTargetFacility.js +109 -0
- package/dist/esm/funcs/organizationsCreateCompanyTargetFacility.js.map +1 -0
- package/dist/esm/funcs/organizationsDeleteCompanyTargetFacility.d.ts +28 -0
- package/dist/esm/funcs/organizationsDeleteCompanyTargetFacility.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsDeleteCompanyTargetFacility.js +102 -0
- package/dist/esm/funcs/organizationsDeleteCompanyTargetFacility.js.map +1 -0
- package/dist/esm/funcs/organizationsListCompanyTargetFacilities.d.ts +38 -0
- package/dist/esm/funcs/organizationsListCompanyTargetFacilities.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsListCompanyTargetFacilities.js +150 -0
- package/dist/esm/funcs/organizationsListCompanyTargetFacilities.js.map +1 -0
- package/dist/esm/funcs/organizationsListOrSearchFacilities.js +1 -0
- package/dist/esm/funcs/organizationsListOrSearchFacilities.js.map +1 -1
- package/dist/esm/funcs/vendorScansGetVendorScan.d.ts +3 -0
- package/dist/esm/funcs/vendorScansGetVendorScan.d.ts.map +1 -1
- package/dist/esm/funcs/vendorScansGetVendorScan.js +3 -0
- package/dist/esm/funcs/vendorScansGetVendorScan.js.map +1 -1
- package/dist/esm/funcs/vendorsDownloadVendorsExport.d.ts +22 -0
- package/dist/esm/funcs/vendorsDownloadVendorsExport.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsDownloadVendorsExport.js +92 -0
- package/dist/esm/funcs/vendorsDownloadVendorsExport.js.map +1 -0
- package/dist/esm/funcs/vendorsGetVendorsExportStatus.d.ts +21 -0
- package/dist/esm/funcs/vendorsGetVendorsExportStatus.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsGetVendorsExportStatus.js +90 -0
- package/dist/esm/funcs/vendorsGetVendorsExportStatus.js.map +1 -0
- package/dist/esm/funcs/vendorsVendorsExport.d.ts +23 -0
- package/dist/esm/funcs/vendorsVendorsExport.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsVendorsExport.js +116 -0
- package/dist/esm/funcs/vendorsVendorsExport.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/appointmentsummary.d.ts +25 -0
- package/dist/esm/models/components/appointmentsummary.d.ts.map +1 -0
- package/dist/esm/models/components/appointmentsummary.js +26 -0
- package/dist/esm/models/components/appointmentsummary.js.map +1 -0
- package/dist/esm/models/components/companycredentiallistitem.d.ts +32 -0
- package/dist/esm/models/components/companycredentiallistitem.d.ts.map +1 -0
- package/dist/esm/models/components/companycredentiallistitem.js +45 -0
- package/dist/esm/models/components/companycredentiallistitem.js.map +1 -0
- package/dist/esm/models/components/companytargetfacility.d.ts +54 -0
- package/dist/esm/models/components/companytargetfacility.d.ts.map +1 -0
- package/dist/esm/models/components/companytargetfacility.js +41 -0
- package/dist/esm/models/components/companytargetfacility.js.map +1 -0
- package/dist/esm/models/components/emailpreferences.d.ts +0 -18
- package/dist/esm/models/components/emailpreferences.d.ts.map +1 -1
- package/dist/esm/models/components/emailpreferences.js +0 -9
- package/dist/esm/models/components/emailpreferences.js.map +1 -1
- package/dist/esm/models/components/expand.d.ts +5 -0
- package/dist/esm/models/components/expand.d.ts.map +1 -1
- package/dist/esm/models/components/expand.js +5 -0
- package/dist/esm/models/components/expand.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +4 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +4 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/vendorcredentialsummary.d.ts +2 -0
- package/dist/esm/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/esm/models/components/vendorcredentialsummary.js +2 -0
- package/dist/esm/models/components/vendorcredentialsummary.js.map +1 -1
- package/dist/esm/models/components/vendorscan.d.ts +47 -0
- package/dist/esm/models/components/vendorscan.d.ts.map +1 -1
- package/dist/esm/models/components/vendorscan.js +28 -0
- package/dist/esm/models/components/vendorscan.js.map +1 -1
- package/dist/esm/models/components/vendorscanscreeningresponse.d.ts +27 -0
- package/dist/esm/models/components/vendorscanscreeningresponse.d.ts.map +1 -0
- package/dist/esm/models/components/vendorscanscreeningresponse.js +26 -0
- package/dist/esm/models/components/vendorscanscreeningresponse.js.map +1 -0
- package/dist/esm/models/operations/createcompanytargetfacility.d.ts +50 -0
- package/dist/esm/models/operations/createcompanytargetfacility.d.ts.map +1 -0
- package/dist/esm/models/operations/createcompanytargetfacility.js +45 -0
- package/dist/esm/models/operations/createcompanytargetfacility.js.map +1 -0
- package/dist/esm/models/operations/createinvoice.d.ts +6 -6
- package/dist/esm/models/operations/createinvoice.d.ts.map +1 -1
- package/dist/esm/models/operations/createinvoice.js +4 -4
- package/dist/esm/models/operations/createinvoice.js.map +1 -1
- package/dist/esm/models/operations/deletecompanytargetfacility.d.ts +20 -0
- package/dist/esm/models/operations/deletecompanytargetfacility.d.ts.map +1 -0
- package/dist/esm/models/operations/deletecompanytargetfacility.js +18 -0
- package/dist/esm/models/operations/deletecompanytargetfacility.js.map +1 -0
- package/dist/esm/models/operations/downloadvendorsexport.d.ts +42 -0
- package/dist/esm/models/operations/downloadvendorsexport.d.ts.map +1 -0
- package/dist/esm/models/operations/downloadvendorsexport.js +36 -0
- package/dist/esm/models/operations/downloadvendorsexport.js.map +1 -0
- package/dist/esm/models/operations/getinvoice.d.ts +4 -4
- package/dist/esm/models/operations/getinvoice.d.ts.map +1 -1
- package/dist/esm/models/operations/getinvoice.js +3 -3
- package/dist/esm/models/operations/getinvoice.js.map +1 -1
- package/dist/esm/models/operations/getvendorsexportstatus.d.ts +53 -0
- package/dist/esm/models/operations/getvendorsexportstatus.d.ts.map +1 -0
- package/dist/esm/models/operations/getvendorsexportstatus.js +35 -0
- package/dist/esm/models/operations/getvendorsexportstatus.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +7 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +7 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/invoicesexport.d.ts +8 -8
- package/dist/esm/models/operations/invoicesexport.d.ts.map +1 -1
- package/dist/esm/models/operations/invoicesexport.js +7 -6
- package/dist/esm/models/operations/invoicesexport.js.map +1 -1
- package/dist/esm/models/operations/listcompanycredentials.d.ts +93 -0
- package/dist/esm/models/operations/listcompanycredentials.d.ts.map +1 -0
- package/dist/esm/models/operations/listcompanycredentials.js +73 -0
- package/dist/esm/models/operations/listcompanycredentials.js.map +1 -0
- package/dist/esm/models/operations/listcompanycredits.d.ts +4 -4
- package/dist/esm/models/operations/listcompanycredits.d.ts.map +1 -1
- package/dist/esm/models/operations/listcompanycredits.js +3 -3
- package/dist/esm/models/operations/listcompanycredits.js.map +1 -1
- package/dist/esm/models/operations/listcompanytargetfacilities.d.ts +138 -0
- package/dist/esm/models/operations/listcompanytargetfacilities.d.ts.map +1 -0
- package/dist/esm/models/operations/listcompanytargetfacilities.js +91 -0
- package/dist/esm/models/operations/listcompanytargetfacilities.js.map +1 -0
- package/dist/esm/models/operations/listlookupsystems.d.ts +4 -4
- package/dist/esm/models/operations/listlookupsystems.d.ts.map +1 -1
- package/dist/esm/models/operations/listlookupsystems.js +3 -4
- package/dist/esm/models/operations/listlookupsystems.js.map +1 -1
- package/dist/esm/models/operations/listorsearchfacilities.d.ts +18 -0
- package/dist/esm/models/operations/listorsearchfacilities.d.ts.map +1 -1
- package/dist/esm/models/operations/listorsearchfacilities.js +10 -0
- package/dist/esm/models/operations/listorsearchfacilities.js.map +1 -1
- package/dist/esm/models/operations/securityzonecheckin.d.ts +18 -17
- package/dist/esm/models/operations/securityzonecheckin.d.ts.map +1 -1
- package/dist/esm/models/operations/securityzonecheckin.js +14 -13
- package/dist/esm/models/operations/securityzonecheckin.js.map +1 -1
- package/dist/esm/models/operations/vendorsexport.d.ts +184 -0
- package/dist/esm/models/operations/vendorsexport.d.ts.map +1 -0
- package/dist/esm/models/operations/vendorsexport.js +94 -0
- package/dist/esm/models/operations/vendorsexport.js.map +1 -0
- package/dist/esm/react-query/companiesListCompanyCredentials.core.d.ts +44 -0
- package/dist/esm/react-query/companiesListCompanyCredentials.core.d.ts.map +1 -0
- package/dist/esm/react-query/companiesListCompanyCredentials.core.js +93 -0
- package/dist/esm/react-query/companiesListCompanyCredentials.core.js.map +1 -0
- package/dist/esm/react-query/companiesListCompanyCredentials.d.ts +68 -0
- package/dist/esm/react-query/companiesListCompanyCredentials.d.ts.map +1 -0
- package/dist/esm/react-query/companiesListCompanyCredentials.js +89 -0
- package/dist/esm/react-query/companiesListCompanyCredentials.js.map +1 -0
- package/dist/esm/react-query/companiesListCompanyCredits.core.d.ts +2 -2
- package/dist/esm/react-query/companiesListCompanyCredits.core.d.ts.map +1 -1
- package/dist/esm/react-query/companiesListCompanyCredits.d.ts +2 -2
- package/dist/esm/react-query/companiesListCompanyCredits.d.ts.map +1 -1
- package/dist/esm/react-query/index.d.ts +7 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +7 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/invoicesGetInvoice.core.d.ts +1 -1
- package/dist/esm/react-query/invoicesGetInvoice.core.d.ts.map +1 -1
- package/dist/esm/react-query/invoicesGetInvoice.d.ts +2 -2
- package/dist/esm/react-query/invoicesGetInvoice.d.ts.map +1 -1
- package/dist/esm/react-query/invoicesInvoicesExport.core.d.ts +1 -1
- package/dist/esm/react-query/invoicesInvoicesExport.core.d.ts.map +1 -1
- package/dist/esm/react-query/invoicesInvoicesExport.d.ts +2 -2
- package/dist/esm/react-query/invoicesInvoicesExport.d.ts.map +1 -1
- package/dist/esm/react-query/lookupsListLookupSystems.core.d.ts +1 -1
- package/dist/esm/react-query/lookupsListLookupSystems.core.d.ts.map +1 -1
- package/dist/esm/react-query/lookupsListLookupSystems.d.ts +2 -2
- package/dist/esm/react-query/lookupsListLookupSystems.d.ts.map +1 -1
- package/dist/esm/react-query/organizationsCreateCompanyTargetFacility.d.ts +43 -0
- package/dist/esm/react-query/organizationsCreateCompanyTargetFacility.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsCreateCompanyTargetFacility.js +60 -0
- package/dist/esm/react-query/organizationsCreateCompanyTargetFacility.js.map +1 -0
- package/dist/esm/react-query/organizationsDeleteCompanyTargetFacility.d.ts +37 -0
- package/dist/esm/react-query/organizationsDeleteCompanyTargetFacility.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsDeleteCompanyTargetFacility.js +54 -0
- package/dist/esm/react-query/organizationsDeleteCompanyTargetFacility.js.map +1 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.core.d.ts +46 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.core.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.core.js +95 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.core.js.map +1 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.d.ts +130 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.js +149 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.js.map +1 -0
- package/dist/esm/react-query/organizationsListOrSearchFacilities.core.d.ts +2 -0
- package/dist/esm/react-query/organizationsListOrSearchFacilities.core.d.ts.map +1 -1
- package/dist/esm/react-query/organizationsListOrSearchFacilities.core.js +2 -0
- package/dist/esm/react-query/organizationsListOrSearchFacilities.core.js.map +1 -1
- package/dist/esm/react-query/organizationsListOrSearchFacilities.d.ts +2 -0
- package/dist/esm/react-query/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/dist/esm/react-query/organizationsListOrSearchFacilities.js.map +1 -1
- package/dist/esm/react-query/vendorScansGetVendorScan.d.ts +6 -0
- package/dist/esm/react-query/vendorScansGetVendorScan.d.ts.map +1 -1
- package/dist/esm/react-query/vendorScansGetVendorScan.js +6 -0
- package/dist/esm/react-query/vendorScansGetVendorScan.js.map +1 -1
- package/dist/esm/react-query/vendorsDownloadVendorsExport.core.d.ts +12 -0
- package/dist/esm/react-query/vendorsDownloadVendorsExport.core.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsDownloadVendorsExport.core.js +34 -0
- package/dist/esm/react-query/vendorsDownloadVendorsExport.core.js.map +1 -0
- package/dist/esm/react-query/vendorsDownloadVendorsExport.d.ts +33 -0
- package/dist/esm/react-query/vendorsDownloadVendorsExport.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsDownloadVendorsExport.js +63 -0
- package/dist/esm/react-query/vendorsDownloadVendorsExport.js.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorsExportStatus.core.d.ts +12 -0
- package/dist/esm/react-query/vendorsGetVendorsExportStatus.core.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorsExportStatus.core.js +34 -0
- package/dist/esm/react-query/vendorsGetVendorsExportStatus.core.js.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorsExportStatus.d.ts +31 -0
- package/dist/esm/react-query/vendorsGetVendorsExportStatus.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorsExportStatus.js +61 -0
- package/dist/esm/react-query/vendorsGetVendorsExportStatus.js.map +1 -0
- package/dist/esm/react-query/vendorsVendorsExport.core.d.ts +40 -0
- package/dist/esm/react-query/vendorsVendorsExport.core.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsVendorsExport.core.js +62 -0
- package/dist/esm/react-query/vendorsVendorsExport.core.js.map +1 -0
- package/dist/esm/react-query/vendorsVendorsExport.d.ts +95 -0
- package/dist/esm/react-query/vendorsVendorsExport.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsVendorsExport.js +61 -0
- package/dist/esm/react-query/vendorsVendorsExport.js.map +1 -0
- package/dist/esm/sdk/companies.d.ts +9 -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/organizations.d.ts +60 -0
- package/dist/esm/sdk/organizations.d.ts.map +1 -1
- package/dist/esm/sdk/organizations.js +67 -0
- package/dist/esm/sdk/organizations.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +27 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +36 -0
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/dist/esm/sdk/vendorscans.d.ts +3 -0
- package/dist/esm/sdk/vendorscans.d.ts.map +1 -1
- package/dist/esm/sdk/vendorscans.js +3 -0
- package/dist/esm/sdk/vendorscans.js.map +1 -1
- package/dist/esm/types/async.d.ts.map +1 -1
- package/dist/esm/types/async.js +8 -7
- package/dist/esm/types/async.js.map +1 -1
- package/dist/esm/types/primitives.d.ts +0 -2
- package/dist/esm/types/primitives.d.ts.map +1 -1
- package/dist/esm/types/primitives.js +0 -21
- package/dist/esm/types/primitives.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/companies.test.ts +32 -0
- package/src/__tests__/organizations.test.ts +84 -0
- package/src/__tests__/vendors.test.ts +60 -0
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +2 -9
- package/src/funcs/companiesListCompanyCredentials.ts +265 -0
- package/src/funcs/organizationsCreateCompanyTargetFacility.ts +204 -0
- package/src/funcs/organizationsDeleteCompanyTargetFacility.ts +193 -0
- package/src/funcs/organizationsListCompanyTargetFacilities.ts +283 -0
- package/src/funcs/organizationsListOrSearchFacilities.ts +1 -0
- package/src/funcs/vendorScansGetVendorScan.ts +3 -0
- package/src/funcs/vendorsDownloadVendorsExport.ts +190 -0
- package/src/funcs/vendorsGetVendorsExportStatus.ts +179 -0
- package/src/funcs/vendorsVendorsExport.ts +207 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/appointmentsummary.ts +59 -0
- package/src/models/components/companycredentiallistitem.ts +110 -0
- package/src/models/components/companytargetfacility.ts +124 -0
- package/src/models/components/emailpreferences.ts +0 -18
- package/src/models/components/expand.ts +5 -0
- package/src/models/components/index.ts +4 -0
- package/src/models/components/vendorcredentialsummary.ts +3 -0
- package/src/models/components/vendorscan.ts +102 -0
- package/src/models/components/vendorscanscreeningresponse.ts +61 -0
- package/src/models/operations/createcompanytargetfacility.ts +132 -0
- package/src/models/operations/createinvoice.ts +14 -10
- package/src/models/operations/deletecompanytargetfacility.ts +47 -0
- package/src/models/operations/downloadvendorsexport.ts +107 -0
- package/src/models/operations/getinvoice.ts +9 -7
- package/src/models/operations/getvendorsexportstatus.ts +108 -0
- package/src/models/operations/index.ts +7 -0
- package/src/models/operations/invoicesexport.ts +15 -13
- package/src/models/operations/listcompanycredentials.ts +195 -0
- package/src/models/operations/listcompanycredits.ts +9 -7
- package/src/models/operations/listcompanytargetfacilities.ts +242 -0
- package/src/models/operations/listlookupsystems.ts +7 -6
- package/src/models/operations/listorsearchfacilities.ts +22 -0
- package/src/models/operations/securityzonecheckin.ts +37 -40
- package/src/models/operations/vendorsexport.ts +303 -0
- package/src/react-query/companiesListCompanyCredentials.core.ts +211 -0
- package/src/react-query/companiesListCompanyCredentials.ts +277 -0
- package/src/react-query/companiesListCompanyCredits.core.ts +2 -2
- package/src/react-query/companiesListCompanyCredits.ts +2 -2
- package/src/react-query/index.ts +7 -0
- package/src/react-query/invoicesGetInvoice.core.ts +1 -1
- package/src/react-query/invoicesGetInvoice.ts +2 -2
- package/src/react-query/invoicesInvoicesExport.core.ts +1 -1
- package/src/react-query/invoicesInvoicesExport.ts +2 -2
- package/src/react-query/lookupsListLookupSystems.core.ts +1 -1
- package/src/react-query/lookupsListLookupSystems.ts +2 -2
- package/src/react-query/organizationsCreateCompanyTargetFacility.ts +129 -0
- package/src/react-query/organizationsDeleteCompanyTargetFacility.ts +122 -0
- package/src/react-query/organizationsListCompanyTargetFacilities.core.ts +223 -0
- package/src/react-query/organizationsListCompanyTargetFacilities.ts +339 -0
- package/src/react-query/organizationsListOrSearchFacilities.core.ts +4 -0
- package/src/react-query/organizationsListOrSearchFacilities.ts +2 -0
- package/src/react-query/vendorScansGetVendorScan.ts +6 -0
- package/src/react-query/vendorsDownloadVendorsExport.core.ts +77 -0
- package/src/react-query/vendorsDownloadVendorsExport.ts +151 -0
- package/src/react-query/vendorsGetVendorsExportStatus.core.ts +76 -0
- package/src/react-query/vendorsGetVendorsExportStatus.ts +149 -0
- package/src/react-query/vendorsVendorsExport.core.ts +134 -0
- package/src/react-query/vendorsVendorsExport.ts +209 -0
- package/src/sdk/companies.ts +20 -0
- package/src/sdk/organizations.ts +98 -0
- package/src/sdk/vendors.ts +60 -0
- package/src/sdk/vendorscans.ts +3 -0
- package/src/types/async.ts +8 -7
- package/src/types/primitives.ts +0 -24
|
@@ -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 { 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
|
+
import * as types$ from "../types/primitives.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Remove a company target facility
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Removes a CompanyTargetFacility link. Blocked when any of the company's
|
|
35
|
+
* individuals still target the same facility (to avoid orphaning their
|
|
36
|
+
* vendor-scoped target rows). Only the link row is removed — the Facility
|
|
37
|
+
* entity itself is never touched.
|
|
38
|
+
*
|
|
39
|
+
* Access control: the URL's `company_id` must be in the caller's update
|
|
40
|
+
* scope for Company (a company manager's or vendor's own company, or a
|
|
41
|
+
* company whose app is activated for the API user). Callers outside that
|
|
42
|
+
* scope receive `404 Company not found`.
|
|
43
|
+
*
|
|
44
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
45
|
+
*/
|
|
46
|
+
export function organizationsDeleteCompanyTargetFacility(
|
|
47
|
+
client: GreenSecurityCore,
|
|
48
|
+
request: operations.DeleteCompanyTargetFacilityRequest,
|
|
49
|
+
options?: RequestOptions,
|
|
50
|
+
): APIPromise<
|
|
51
|
+
Result<
|
|
52
|
+
boolean,
|
|
53
|
+
| errors.ApiErrorResponse
|
|
54
|
+
| GreenSecurityError
|
|
55
|
+
| ResponseValidationError
|
|
56
|
+
| ConnectionError
|
|
57
|
+
| RequestAbortedError
|
|
58
|
+
| RequestTimeoutError
|
|
59
|
+
| InvalidRequestError
|
|
60
|
+
| UnexpectedClientError
|
|
61
|
+
| SDKValidationError
|
|
62
|
+
>
|
|
63
|
+
> {
|
|
64
|
+
return new APIPromise($do(
|
|
65
|
+
client,
|
|
66
|
+
request,
|
|
67
|
+
options,
|
|
68
|
+
));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function $do(
|
|
72
|
+
client: GreenSecurityCore,
|
|
73
|
+
request: operations.DeleteCompanyTargetFacilityRequest,
|
|
74
|
+
options?: RequestOptions,
|
|
75
|
+
): Promise<
|
|
76
|
+
[
|
|
77
|
+
Result<
|
|
78
|
+
boolean,
|
|
79
|
+
| errors.ApiErrorResponse
|
|
80
|
+
| GreenSecurityError
|
|
81
|
+
| ResponseValidationError
|
|
82
|
+
| ConnectionError
|
|
83
|
+
| RequestAbortedError
|
|
84
|
+
| RequestTimeoutError
|
|
85
|
+
| InvalidRequestError
|
|
86
|
+
| UnexpectedClientError
|
|
87
|
+
| SDKValidationError
|
|
88
|
+
>,
|
|
89
|
+
APICall,
|
|
90
|
+
]
|
|
91
|
+
> {
|
|
92
|
+
const parsed = safeParse(
|
|
93
|
+
request,
|
|
94
|
+
(value) =>
|
|
95
|
+
operations.DeleteCompanyTargetFacilityRequest$outboundSchema.parse(value),
|
|
96
|
+
"Input validation failed",
|
|
97
|
+
);
|
|
98
|
+
if (!parsed.ok) {
|
|
99
|
+
return [parsed, { status: "invalid" }];
|
|
100
|
+
}
|
|
101
|
+
const payload = parsed.value;
|
|
102
|
+
const body = null;
|
|
103
|
+
|
|
104
|
+
const pathParams = {
|
|
105
|
+
company_id: encodeSimple("company_id", payload.company_id, {
|
|
106
|
+
explode: false,
|
|
107
|
+
charEncoding: "percent",
|
|
108
|
+
}),
|
|
109
|
+
id: encodeSimple("id", payload.id, {
|
|
110
|
+
explode: false,
|
|
111
|
+
charEncoding: "percent",
|
|
112
|
+
}),
|
|
113
|
+
};
|
|
114
|
+
const path = pathToFunc("/companies/{company_id}/target-facilities/{id}")(
|
|
115
|
+
pathParams,
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
const headers = new Headers(compactMap({
|
|
119
|
+
Accept: "application/json",
|
|
120
|
+
}));
|
|
121
|
+
|
|
122
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
123
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
124
|
+
|
|
125
|
+
const context = {
|
|
126
|
+
options: client._options,
|
|
127
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
128
|
+
operationID: "deleteCompanyTargetFacility",
|
|
129
|
+
oAuth2Scopes: null,
|
|
130
|
+
|
|
131
|
+
resolvedSecurity: requestSecurity,
|
|
132
|
+
|
|
133
|
+
securitySource: client._options.security,
|
|
134
|
+
retryConfig: options?.retries
|
|
135
|
+
|| client._options.retryConfig
|
|
136
|
+
|| { strategy: "none" },
|
|
137
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const requestRes = client._createRequest(context, {
|
|
141
|
+
security: requestSecurity,
|
|
142
|
+
method: "DELETE",
|
|
143
|
+
baseURL: options?.serverURL,
|
|
144
|
+
path: path,
|
|
145
|
+
headers: headers,
|
|
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
|
+
boolean,
|
|
173
|
+
| errors.ApiErrorResponse
|
|
174
|
+
| GreenSecurityError
|
|
175
|
+
| ResponseValidationError
|
|
176
|
+
| ConnectionError
|
|
177
|
+
| RequestAbortedError
|
|
178
|
+
| RequestTimeoutError
|
|
179
|
+
| InvalidRequestError
|
|
180
|
+
| UnexpectedClientError
|
|
181
|
+
| SDKValidationError
|
|
182
|
+
>(
|
|
183
|
+
M.json(200, types$.boolean()),
|
|
184
|
+
M.jsonErr([400, 401, 403, 404, 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
|
+
}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { dlv } from "../lib/dlv.js";
|
|
7
|
+
import { encodeFormQuery, encodeSimple, queryJoin } from "../lib/encodings.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
16
|
+
import {
|
|
17
|
+
ConnectionError,
|
|
18
|
+
InvalidRequestError,
|
|
19
|
+
RequestAbortedError,
|
|
20
|
+
RequestTimeoutError,
|
|
21
|
+
UnexpectedClientError,
|
|
22
|
+
} from "../models/errors/httpclienterrors.js";
|
|
23
|
+
import * as errors from "../models/errors/index.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
import {
|
|
30
|
+
createPageIterator,
|
|
31
|
+
haltIterator,
|
|
32
|
+
PageIterator,
|
|
33
|
+
Paginator,
|
|
34
|
+
} from "../types/operations.js";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* List company target facilities
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Lists the CompanyTargetFacility links for a company — the facilities the
|
|
41
|
+
* company is targeting. Each row carries the linked facility (with location
|
|
42
|
+
* and parent system), the link status, and per-facility counts of the
|
|
43
|
+
* company's individuals targeting it.
|
|
44
|
+
*
|
|
45
|
+
* Access control: the URL's `company_id` must be in the caller's read scope
|
|
46
|
+
* for Company (a company manager's or vendor's own company, or a company
|
|
47
|
+
* whose app is activated for the API user). Callers outside that scope
|
|
48
|
+
* receive `404 Company not found`.
|
|
49
|
+
*
|
|
50
|
+
* Filter with `has_individual` / `has_active_individual` to drive the
|
|
51
|
+
* facility roster views.
|
|
52
|
+
*
|
|
53
|
+
* Available `expand` scopes are:
|
|
54
|
+
*
|
|
55
|
+
* - company_target_facility.facility
|
|
56
|
+
*
|
|
57
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
58
|
+
*/
|
|
59
|
+
export function organizationsListCompanyTargetFacilities(
|
|
60
|
+
client: GreenSecurityCore,
|
|
61
|
+
request: operations.ListCompanyTargetFacilitiesRequest,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): APIPromise<
|
|
64
|
+
PageIterator<
|
|
65
|
+
Result<
|
|
66
|
+
operations.ListCompanyTargetFacilitiesResponse,
|
|
67
|
+
| errors.ApiErrorResponse
|
|
68
|
+
| GreenSecurityError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
{ page: number }
|
|
78
|
+
>
|
|
79
|
+
> {
|
|
80
|
+
return new APIPromise($do(
|
|
81
|
+
client,
|
|
82
|
+
request,
|
|
83
|
+
options,
|
|
84
|
+
));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async function $do(
|
|
88
|
+
client: GreenSecurityCore,
|
|
89
|
+
request: operations.ListCompanyTargetFacilitiesRequest,
|
|
90
|
+
options?: RequestOptions,
|
|
91
|
+
): Promise<
|
|
92
|
+
[
|
|
93
|
+
PageIterator<
|
|
94
|
+
Result<
|
|
95
|
+
operations.ListCompanyTargetFacilitiesResponse,
|
|
96
|
+
| errors.ApiErrorResponse
|
|
97
|
+
| GreenSecurityError
|
|
98
|
+
| ResponseValidationError
|
|
99
|
+
| ConnectionError
|
|
100
|
+
| RequestAbortedError
|
|
101
|
+
| RequestTimeoutError
|
|
102
|
+
| InvalidRequestError
|
|
103
|
+
| UnexpectedClientError
|
|
104
|
+
| SDKValidationError
|
|
105
|
+
>,
|
|
106
|
+
{ page: number }
|
|
107
|
+
>,
|
|
108
|
+
APICall,
|
|
109
|
+
]
|
|
110
|
+
> {
|
|
111
|
+
const parsed = safeParse(
|
|
112
|
+
request,
|
|
113
|
+
(value) =>
|
|
114
|
+
operations.ListCompanyTargetFacilitiesRequest$outboundSchema.parse(value),
|
|
115
|
+
"Input validation failed",
|
|
116
|
+
);
|
|
117
|
+
if (!parsed.ok) {
|
|
118
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
119
|
+
}
|
|
120
|
+
const payload = parsed.value;
|
|
121
|
+
const body = null;
|
|
122
|
+
|
|
123
|
+
const pathParams = {
|
|
124
|
+
company_id: encodeSimple("company_id", payload.company_id, {
|
|
125
|
+
explode: false,
|
|
126
|
+
charEncoding: "percent",
|
|
127
|
+
}),
|
|
128
|
+
};
|
|
129
|
+
const path = pathToFunc("/companies/{company_id}/target-facilities")(
|
|
130
|
+
pathParams,
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
const query = queryJoin(
|
|
134
|
+
encodeFormQuery({
|
|
135
|
+
"expand": payload.expand,
|
|
136
|
+
}, { explode: false }),
|
|
137
|
+
encodeFormQuery({
|
|
138
|
+
"desc": payload.desc,
|
|
139
|
+
"facility_name_like": payload.facility_name_like,
|
|
140
|
+
"has_active_individual": payload.has_active_individual,
|
|
141
|
+
"has_individual": payload.has_individual,
|
|
142
|
+
"items_per_page": payload.items_per_page,
|
|
143
|
+
"page": payload.page,
|
|
144
|
+
"sort": payload.sort,
|
|
145
|
+
"status": payload.status,
|
|
146
|
+
}),
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
const headers = new Headers(compactMap({
|
|
150
|
+
Accept: "application/json",
|
|
151
|
+
}));
|
|
152
|
+
|
|
153
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
154
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
155
|
+
|
|
156
|
+
const context = {
|
|
157
|
+
options: client._options,
|
|
158
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
159
|
+
operationID: "listCompanyTargetFacilities",
|
|
160
|
+
oAuth2Scopes: null,
|
|
161
|
+
|
|
162
|
+
resolvedSecurity: requestSecurity,
|
|
163
|
+
|
|
164
|
+
securitySource: client._options.security,
|
|
165
|
+
retryConfig: options?.retries
|
|
166
|
+
|| client._options.retryConfig
|
|
167
|
+
|| { strategy: "none" },
|
|
168
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const requestRes = client._createRequest(context, {
|
|
172
|
+
security: requestSecurity,
|
|
173
|
+
method: "GET",
|
|
174
|
+
baseURL: options?.serverURL,
|
|
175
|
+
path: path,
|
|
176
|
+
headers: headers,
|
|
177
|
+
query: query,
|
|
178
|
+
body: body,
|
|
179
|
+
userAgent: client._options.userAgent,
|
|
180
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
181
|
+
}, options);
|
|
182
|
+
if (!requestRes.ok) {
|
|
183
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
184
|
+
}
|
|
185
|
+
const req = requestRes.value;
|
|
186
|
+
|
|
187
|
+
const doResult = await client._do(req, {
|
|
188
|
+
context,
|
|
189
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
190
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
191
|
+
retryConfig: context.retryConfig,
|
|
192
|
+
retryCodes: context.retryCodes,
|
|
193
|
+
});
|
|
194
|
+
if (!doResult.ok) {
|
|
195
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
196
|
+
}
|
|
197
|
+
const response = doResult.value;
|
|
198
|
+
|
|
199
|
+
const responseFields = {
|
|
200
|
+
HttpMeta: { Response: response, Request: req },
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const [result, raw] = await M.match<
|
|
204
|
+
operations.ListCompanyTargetFacilitiesResponse,
|
|
205
|
+
| errors.ApiErrorResponse
|
|
206
|
+
| GreenSecurityError
|
|
207
|
+
| ResponseValidationError
|
|
208
|
+
| ConnectionError
|
|
209
|
+
| RequestAbortedError
|
|
210
|
+
| RequestTimeoutError
|
|
211
|
+
| InvalidRequestError
|
|
212
|
+
| UnexpectedClientError
|
|
213
|
+
| SDKValidationError
|
|
214
|
+
>(
|
|
215
|
+
M.json(200, operations.ListCompanyTargetFacilitiesResponse$inboundSchema, {
|
|
216
|
+
key: "Result",
|
|
217
|
+
}),
|
|
218
|
+
M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema),
|
|
219
|
+
M.fail("4XX"),
|
|
220
|
+
M.fail([500, "5XX"]),
|
|
221
|
+
)(response, req, { extraFields: responseFields });
|
|
222
|
+
if (!result.ok) {
|
|
223
|
+
return [haltIterator(result), {
|
|
224
|
+
status: "complete",
|
|
225
|
+
request: req,
|
|
226
|
+
response,
|
|
227
|
+
}];
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const nextFunc = (
|
|
231
|
+
responseData: unknown,
|
|
232
|
+
): {
|
|
233
|
+
next: Paginator<
|
|
234
|
+
Result<
|
|
235
|
+
operations.ListCompanyTargetFacilitiesResponse,
|
|
236
|
+
| errors.ApiErrorResponse
|
|
237
|
+
| GreenSecurityError
|
|
238
|
+
| ResponseValidationError
|
|
239
|
+
| ConnectionError
|
|
240
|
+
| RequestAbortedError
|
|
241
|
+
| RequestTimeoutError
|
|
242
|
+
| InvalidRequestError
|
|
243
|
+
| UnexpectedClientError
|
|
244
|
+
| SDKValidationError
|
|
245
|
+
>
|
|
246
|
+
>;
|
|
247
|
+
"~next"?: { page: number };
|
|
248
|
+
} => {
|
|
249
|
+
const page = request?.page ?? 1;
|
|
250
|
+
const nextPage = page + 1;
|
|
251
|
+
|
|
252
|
+
if (!responseData) {
|
|
253
|
+
return { next: () => null };
|
|
254
|
+
}
|
|
255
|
+
const results = dlv(responseData, "items");
|
|
256
|
+
if (!Array.isArray(results) || !results.length) {
|
|
257
|
+
return { next: () => null };
|
|
258
|
+
}
|
|
259
|
+
const limit = request?.itemsPerPage ?? 0;
|
|
260
|
+
if (results.length < limit) {
|
|
261
|
+
return { next: () => null };
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
const nextVal = () =>
|
|
265
|
+
organizationsListCompanyTargetFacilities(
|
|
266
|
+
client,
|
|
267
|
+
{
|
|
268
|
+
...request,
|
|
269
|
+
page: nextPage,
|
|
270
|
+
},
|
|
271
|
+
options,
|
|
272
|
+
);
|
|
273
|
+
|
|
274
|
+
return { next: nextVal, "~next": { page: nextPage } };
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
278
|
+
return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
|
|
279
|
+
status: "complete",
|
|
280
|
+
request: req,
|
|
281
|
+
response,
|
|
282
|
+
}];
|
|
283
|
+
}
|
|
@@ -39,6 +39,9 @@ import { Result } from "../types/fp.js";
|
|
|
39
39
|
* - vendor_scan.zone
|
|
40
40
|
* - vendor_scan.department
|
|
41
41
|
* - vendor_scan.badge_data
|
|
42
|
+
* - vendor_scan.company
|
|
43
|
+
* - vendor_scan.appointment
|
|
44
|
+
* - vendor_scan.screening_responses
|
|
42
45
|
*
|
|
43
46
|
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
44
47
|
*/
|
|
@@ -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
|
+
import * as types$ from "../types/primitives.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Download vendors CSV
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Downloads the exported vendors CSV. When the export is ready the server
|
|
35
|
+
* responds with a 302 redirect to a short-lived presigned S3 URL. If the
|
|
36
|
+
* export job is still running, responds with 202.
|
|
37
|
+
*
|
|
38
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
39
|
+
*/
|
|
40
|
+
export function vendorsDownloadVendorsExport(
|
|
41
|
+
client: GreenSecurityCore,
|
|
42
|
+
request: operations.DownloadVendorsExportRequest,
|
|
43
|
+
options?: RequestOptions,
|
|
44
|
+
): APIPromise<
|
|
45
|
+
Result<
|
|
46
|
+
operations.DownloadVendorsExportResponse | undefined,
|
|
47
|
+
| errors.ApiErrorResponse
|
|
48
|
+
| GreenSecurityError
|
|
49
|
+
| ResponseValidationError
|
|
50
|
+
| ConnectionError
|
|
51
|
+
| RequestAbortedError
|
|
52
|
+
| RequestTimeoutError
|
|
53
|
+
| InvalidRequestError
|
|
54
|
+
| UnexpectedClientError
|
|
55
|
+
| SDKValidationError
|
|
56
|
+
>
|
|
57
|
+
> {
|
|
58
|
+
return new APIPromise($do(
|
|
59
|
+
client,
|
|
60
|
+
request,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function $do(
|
|
66
|
+
client: GreenSecurityCore,
|
|
67
|
+
request: operations.DownloadVendorsExportRequest,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): Promise<
|
|
70
|
+
[
|
|
71
|
+
Result<
|
|
72
|
+
operations.DownloadVendorsExportResponse | undefined,
|
|
73
|
+
| errors.ApiErrorResponse
|
|
74
|
+
| GreenSecurityError
|
|
75
|
+
| ResponseValidationError
|
|
76
|
+
| ConnectionError
|
|
77
|
+
| RequestAbortedError
|
|
78
|
+
| RequestTimeoutError
|
|
79
|
+
| InvalidRequestError
|
|
80
|
+
| UnexpectedClientError
|
|
81
|
+
| SDKValidationError
|
|
82
|
+
>,
|
|
83
|
+
APICall,
|
|
84
|
+
]
|
|
85
|
+
> {
|
|
86
|
+
const parsed = safeParse(
|
|
87
|
+
request,
|
|
88
|
+
(value) =>
|
|
89
|
+
operations.DownloadVendorsExportRequest$outboundSchema.parse(value),
|
|
90
|
+
"Input validation failed",
|
|
91
|
+
);
|
|
92
|
+
if (!parsed.ok) {
|
|
93
|
+
return [parsed, { status: "invalid" }];
|
|
94
|
+
}
|
|
95
|
+
const payload = parsed.value;
|
|
96
|
+
const body = null;
|
|
97
|
+
|
|
98
|
+
const pathParams = {
|
|
99
|
+
id: encodeSimple("id", payload.id, {
|
|
100
|
+
explode: false,
|
|
101
|
+
charEncoding: "percent",
|
|
102
|
+
}),
|
|
103
|
+
};
|
|
104
|
+
const path = pathToFunc("/vendors/export/{id}")(pathParams);
|
|
105
|
+
|
|
106
|
+
const headers = new Headers(compactMap({
|
|
107
|
+
Accept: "application/json",
|
|
108
|
+
}));
|
|
109
|
+
|
|
110
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
111
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
112
|
+
|
|
113
|
+
const context = {
|
|
114
|
+
options: client._options,
|
|
115
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
116
|
+
operationID: "downloadVendorsExport",
|
|
117
|
+
oAuth2Scopes: null,
|
|
118
|
+
|
|
119
|
+
resolvedSecurity: requestSecurity,
|
|
120
|
+
|
|
121
|
+
securitySource: client._options.security,
|
|
122
|
+
retryConfig: options?.retries
|
|
123
|
+
|| client._options.retryConfig
|
|
124
|
+
|| { strategy: "none" },
|
|
125
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const requestRes = client._createRequest(context, {
|
|
129
|
+
security: requestSecurity,
|
|
130
|
+
method: "GET",
|
|
131
|
+
baseURL: options?.serverURL,
|
|
132
|
+
path: path,
|
|
133
|
+
headers: headers,
|
|
134
|
+
body: body,
|
|
135
|
+
userAgent: client._options.userAgent,
|
|
136
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
137
|
+
}, options);
|
|
138
|
+
if (!requestRes.ok) {
|
|
139
|
+
return [requestRes, { status: "invalid" }];
|
|
140
|
+
}
|
|
141
|
+
const req = requestRes.value;
|
|
142
|
+
|
|
143
|
+
const doResult = await client._do(req, {
|
|
144
|
+
context,
|
|
145
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
146
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
147
|
+
retryConfig: context.retryConfig,
|
|
148
|
+
retryCodes: context.retryCodes,
|
|
149
|
+
});
|
|
150
|
+
if (!doResult.ok) {
|
|
151
|
+
return [doResult, { status: "request-error", request: req }];
|
|
152
|
+
}
|
|
153
|
+
const response = doResult.value;
|
|
154
|
+
|
|
155
|
+
const responseFields = {
|
|
156
|
+
HttpMeta: { Response: response, Request: req },
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
const [result] = await M.match<
|
|
160
|
+
operations.DownloadVendorsExportResponse | undefined,
|
|
161
|
+
| errors.ApiErrorResponse
|
|
162
|
+
| GreenSecurityError
|
|
163
|
+
| ResponseValidationError
|
|
164
|
+
| ConnectionError
|
|
165
|
+
| RequestAbortedError
|
|
166
|
+
| RequestTimeoutError
|
|
167
|
+
| InvalidRequestError
|
|
168
|
+
| UnexpectedClientError
|
|
169
|
+
| SDKValidationError
|
|
170
|
+
>(
|
|
171
|
+
M.json(
|
|
172
|
+
202,
|
|
173
|
+
types$.optional(operations.DownloadVendorsExportResponse$inboundSchema),
|
|
174
|
+
{ key: "Result" },
|
|
175
|
+
),
|
|
176
|
+
M.nil(
|
|
177
|
+
302,
|
|
178
|
+
types$.optional(operations.DownloadVendorsExportResponse$inboundSchema),
|
|
179
|
+
{ hdrs: true },
|
|
180
|
+
),
|
|
181
|
+
M.jsonErr([400, 401, 403, 404, 422], 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
|
+
}
|