@greensecurity/javascript-sdk 0.43.1-beta.124 → 0.43.1-beta.126
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/FUNCTIONS.md +2 -2
- package/README.md +12 -0
- package/dist/commonjs/__tests__/lookups.test.d.ts +2 -0
- package/dist/commonjs/__tests__/lookups.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/lookups.test.js +29 -0
- package/dist/commonjs/__tests__/lookups.test.js.map +1 -0
- package/dist/commonjs/__tests__/paymentprofile.test.js +13 -0
- package/dist/commonjs/__tests__/paymentprofile.test.js.map +1 -1
- package/dist/commonjs/__tests__/users.test.js +1 -0
- package/dist/commonjs/__tests__/users.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +59 -2
- 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 +4 -29
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/lookupsListLookupSystems.d.ts +27 -0
- package/dist/commonjs/funcs/lookupsListLookupSystems.d.ts.map +1 -0
- package/dist/commonjs/funcs/lookupsListLookupSystems.js +133 -0
- package/dist/commonjs/funcs/lookupsListLookupSystems.js.map +1 -0
- package/dist/commonjs/funcs/paymentProfileDeletePaymentProfile.d.ts +22 -0
- package/dist/commonjs/funcs/paymentProfileDeletePaymentProfile.d.ts.map +1 -0
- package/dist/commonjs/funcs/paymentProfileDeletePaymentProfile.js +113 -0
- package/dist/commonjs/funcs/paymentProfileDeletePaymentProfile.js.map +1 -0
- package/dist/commonjs/funcs/usersUpdateUserProfilePicture.d.ts +1 -1
- package/dist/commonjs/funcs/usersUpdateUserProfilePicture.js +1 -1
- package/dist/commonjs/funcs/vendorsCreateVendorByCompanyManager.d.ts +24 -0
- package/dist/commonjs/funcs/vendorsCreateVendorByCompanyManager.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsCreateVendorByCompanyManager.js +125 -0
- package/dist/commonjs/funcs/vendorsCreateVendorByCompanyManager.js.map +1 -0
- package/dist/commonjs/funcs/vendorsListVendorAdditionalFacilityFields.d.ts +10 -6
- package/dist/commonjs/funcs/vendorsListVendorAdditionalFacilityFields.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsListVendorAdditionalFacilityFields.js +50 -12
- package/dist/commonjs/funcs/vendorsListVendorAdditionalFacilityFields.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.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/facility.d.ts +4 -4
- package/dist/commonjs/models/components/facility.d.ts.map +1 -1
- package/dist/commonjs/models/components/facility.js +6 -6
- package/dist/commonjs/models/components/facility.js.map +1 -1
- package/dist/commonjs/models/components/facilitycalendarsummary.d.ts +1 -0
- package/dist/commonjs/models/components/facilitycalendarsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/facilitycalendarsummary.js +1 -0
- package/dist/commonjs/models/components/facilitycalendarsummary.js.map +1 -1
- package/dist/commonjs/models/components/facilitysummary.d.ts +1 -0
- package/dist/commonjs/models/components/facilitysummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/facilitysummary.js +1 -0
- package/dist/commonjs/models/components/facilitysummary.js.map +1 -1
- package/dist/commonjs/models/components/systemsummary.d.ts +9 -0
- package/dist/commonjs/models/components/systemsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/systemsummary.js +17 -1
- package/dist/commonjs/models/components/systemsummary.js.map +1 -1
- package/dist/commonjs/models/operations/createvendorbycompanymanager.d.ts +122 -0
- package/dist/commonjs/models/operations/createvendorbycompanymanager.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createvendorbycompanymanager.js +93 -0
- package/dist/commonjs/models/operations/createvendorbycompanymanager.js.map +1 -0
- package/dist/commonjs/models/operations/deletepaymentprofile.d.ts +11 -0
- package/dist/commonjs/models/operations/deletepaymentprofile.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletepaymentprofile.js +49 -0
- package/dist/commonjs/models/operations/deletepaymentprofile.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listlocations.d.ts +4 -4
- package/dist/commonjs/models/operations/listlocations.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listlocations.js +6 -7
- package/dist/commonjs/models/operations/listlocations.js.map +1 -1
- package/dist/commonjs/models/operations/listlookupsystems.d.ts +53 -0
- package/dist/commonjs/models/operations/listlookupsystems.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listlookupsystems.js +77 -0
- package/dist/commonjs/models/operations/listlookupsystems.js.map +1 -0
- package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.d.ts +50 -1
- package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.js +34 -2
- package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.js.map +1 -1
- package/dist/commonjs/models/operations/securityzonecheckin.d.ts +4 -4
- package/dist/commonjs/models/operations/securityzonecheckin.d.ts.map +1 -1
- package/dist/commonjs/models/operations/securityzonecheckin.js +5 -5
- package/dist/commonjs/models/operations/securityzonecheckin.js.map +1 -1
- package/dist/commonjs/models/operations/updateuserprofilepicture.d.ts +6 -2
- package/dist/commonjs/models/operations/updateuserprofilepicture.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateuserprofilepicture.js +5 -0
- package/dist/commonjs/models/operations/updateuserprofilepicture.js.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +3 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +3 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/lookupsListLookupSystems.core.d.ts +15 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.core.js +43 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.core.js.map +1 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.d.ts +53 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.d.ts.map +1 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.js +80 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.js.map +1 -0
- package/dist/commonjs/react-query/paymentProfileDeletePaymentProfile.d.ts +30 -0
- package/dist/commonjs/react-query/paymentProfileDeletePaymentProfile.d.ts.map +1 -0
- package/dist/commonjs/react-query/paymentProfileDeletePaymentProfile.js +54 -0
- package/dist/commonjs/react-query/paymentProfileDeletePaymentProfile.js.map +1 -0
- package/dist/commonjs/react-query/usersUpdateUserProfilePicture.d.ts +1 -1
- package/dist/commonjs/react-query/usersUpdateUserProfilePicture.js +1 -1
- package/dist/commonjs/react-query/vendorsCreateVendorByCompanyManager.d.ts +33 -0
- package/dist/commonjs/react-query/vendorsCreateVendorByCompanyManager.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsCreateVendorByCompanyManager.js +56 -0
- package/dist/commonjs/react-query/vendorsCreateVendorByCompanyManager.js.map +1 -0
- package/dist/commonjs/react-query/vendorsListVendorAdditionalFacilityFields.core.d.ts +26 -2
- package/dist/commonjs/react-query/vendorsListVendorAdditionalFacilityFields.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsListVendorAdditionalFacilityFields.core.js +56 -2
- package/dist/commonjs/react-query/vendorsListVendorAdditionalFacilityFields.core.js.map +1 -1
- package/dist/commonjs/react-query/vendorsListVendorAdditionalFacilityFields.d.ts +67 -16
- package/dist/commonjs/react-query/vendorsListVendorAdditionalFacilityFields.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsListVendorAdditionalFacilityFields.js +66 -11
- package/dist/commonjs/react-query/vendorsListVendorAdditionalFacilityFields.js.map +1 -1
- package/dist/commonjs/sdk/lookups.d.ts +19 -0
- package/dist/commonjs/sdk/lookups.d.ts.map +1 -0
- package/dist/commonjs/sdk/lookups.js +30 -0
- package/dist/commonjs/sdk/lookups.js.map +1 -0
- package/dist/commonjs/sdk/paymentprofile.d.ts +10 -0
- package/dist/commonjs/sdk/paymentprofile.d.ts.map +1 -1
- package/dist/commonjs/sdk/paymentprofile.js +12 -0
- package/dist/commonjs/sdk/paymentprofile.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/users.d.ts +1 -1
- package/dist/commonjs/sdk/users.js +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +20 -6
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +21 -6
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/commonjs/types/primitives.d.ts +1 -1
- package/dist/commonjs/types/primitives.d.ts.map +1 -1
- package/dist/commonjs/types/primitives.js +1 -2
- package/dist/commonjs/types/primitives.js.map +1 -1
- package/dist/esm/__tests__/lookups.test.d.ts +2 -0
- package/dist/esm/__tests__/lookups.test.d.ts.map +1 -0
- package/dist/esm/__tests__/lookups.test.js +27 -0
- package/dist/esm/__tests__/lookups.test.js.map +1 -0
- package/dist/esm/__tests__/paymentprofile.test.js +13 -0
- package/dist/esm/__tests__/paymentprofile.test.js.map +1 -1
- package/dist/esm/__tests__/users.test.js +1 -0
- package/dist/esm/__tests__/users.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +59 -2
- 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 +4 -29
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/lookupsListLookupSystems.d.ts +27 -0
- package/dist/esm/funcs/lookupsListLookupSystems.d.ts.map +1 -0
- package/dist/esm/funcs/lookupsListLookupSystems.js +97 -0
- package/dist/esm/funcs/lookupsListLookupSystems.js.map +1 -0
- package/dist/esm/funcs/paymentProfileDeletePaymentProfile.d.ts +22 -0
- package/dist/esm/funcs/paymentProfileDeletePaymentProfile.d.ts.map +1 -0
- package/dist/esm/funcs/paymentProfileDeletePaymentProfile.js +77 -0
- package/dist/esm/funcs/paymentProfileDeletePaymentProfile.js.map +1 -0
- package/dist/esm/funcs/usersUpdateUserProfilePicture.d.ts +1 -1
- package/dist/esm/funcs/usersUpdateUserProfilePicture.js +1 -1
- package/dist/esm/funcs/vendorsCreateVendorByCompanyManager.d.ts +24 -0
- package/dist/esm/funcs/vendorsCreateVendorByCompanyManager.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsCreateVendorByCompanyManager.js +89 -0
- package/dist/esm/funcs/vendorsCreateVendorByCompanyManager.js.map +1 -0
- package/dist/esm/funcs/vendorsListVendorAdditionalFacilityFields.d.ts +10 -6
- package/dist/esm/funcs/vendorsListVendorAdditionalFacilityFields.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsListVendorAdditionalFacilityFields.js +51 -13
- package/dist/esm/funcs/vendorsListVendorAdditionalFacilityFields.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.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/facility.d.ts +4 -4
- package/dist/esm/models/components/facility.d.ts.map +1 -1
- package/dist/esm/models/components/facility.js +4 -4
- package/dist/esm/models/components/facility.js.map +1 -1
- package/dist/esm/models/components/facilitycalendarsummary.d.ts +1 -0
- package/dist/esm/models/components/facilitycalendarsummary.d.ts.map +1 -1
- package/dist/esm/models/components/facilitycalendarsummary.js +1 -0
- package/dist/esm/models/components/facilitycalendarsummary.js.map +1 -1
- package/dist/esm/models/components/facilitysummary.d.ts +1 -0
- package/dist/esm/models/components/facilitysummary.d.ts.map +1 -1
- package/dist/esm/models/components/facilitysummary.js +1 -0
- package/dist/esm/models/components/facilitysummary.js.map +1 -1
- package/dist/esm/models/components/systemsummary.d.ts +9 -0
- package/dist/esm/models/components/systemsummary.d.ts.map +1 -1
- package/dist/esm/models/components/systemsummary.js +15 -0
- package/dist/esm/models/components/systemsummary.js.map +1 -1
- package/dist/esm/models/operations/createvendorbycompanymanager.d.ts +122 -0
- package/dist/esm/models/operations/createvendorbycompanymanager.d.ts.map +1 -0
- package/dist/esm/models/operations/createvendorbycompanymanager.js +55 -0
- package/dist/esm/models/operations/createvendorbycompanymanager.js.map +1 -0
- package/dist/esm/models/operations/deletepaymentprofile.d.ts +11 -0
- package/dist/esm/models/operations/deletepaymentprofile.d.ts.map +1 -0
- package/dist/esm/models/operations/deletepaymentprofile.js +12 -0
- package/dist/esm/models/operations/deletepaymentprofile.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listlocations.d.ts +4 -4
- package/dist/esm/models/operations/listlocations.d.ts.map +1 -1
- package/dist/esm/models/operations/listlocations.js +4 -5
- package/dist/esm/models/operations/listlocations.js.map +1 -1
- package/dist/esm/models/operations/listlookupsystems.d.ts +53 -0
- package/dist/esm/models/operations/listlookupsystems.d.ts.map +1 -0
- package/dist/esm/models/operations/listlookupsystems.js +39 -0
- package/dist/esm/models/operations/listlookupsystems.js.map +1 -0
- package/dist/esm/models/operations/listvendoradditionalfacilityfields.d.ts +50 -1
- package/dist/esm/models/operations/listvendoradditionalfacilityfields.d.ts.map +1 -1
- package/dist/esm/models/operations/listvendoradditionalfacilityfields.js +31 -1
- package/dist/esm/models/operations/listvendoradditionalfacilityfields.js.map +1 -1
- package/dist/esm/models/operations/securityzonecheckin.d.ts +4 -4
- package/dist/esm/models/operations/securityzonecheckin.d.ts.map +1 -1
- package/dist/esm/models/operations/securityzonecheckin.js +4 -4
- package/dist/esm/models/operations/securityzonecheckin.js.map +1 -1
- package/dist/esm/models/operations/updateuserprofilepicture.d.ts +6 -2
- package/dist/esm/models/operations/updateuserprofilepicture.d.ts.map +1 -1
- package/dist/esm/models/operations/updateuserprofilepicture.js +5 -0
- package/dist/esm/models/operations/updateuserprofilepicture.js.map +1 -1
- package/dist/esm/react-query/index.d.ts +3 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +3 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/lookupsListLookupSystems.core.d.ts +15 -0
- package/dist/esm/react-query/lookupsListLookupSystems.core.d.ts.map +1 -0
- package/dist/esm/react-query/lookupsListLookupSystems.core.js +38 -0
- package/dist/esm/react-query/lookupsListLookupSystems.core.js.map +1 -0
- package/dist/esm/react-query/lookupsListLookupSystems.d.ts +53 -0
- package/dist/esm/react-query/lookupsListLookupSystems.d.ts.map +1 -0
- package/dist/esm/react-query/lookupsListLookupSystems.js +70 -0
- package/dist/esm/react-query/lookupsListLookupSystems.js.map +1 -0
- package/dist/esm/react-query/paymentProfileDeletePaymentProfile.d.ts +30 -0
- package/dist/esm/react-query/paymentProfileDeletePaymentProfile.d.ts.map +1 -0
- package/dist/esm/react-query/paymentProfileDeletePaymentProfile.js +49 -0
- package/dist/esm/react-query/paymentProfileDeletePaymentProfile.js.map +1 -0
- package/dist/esm/react-query/usersUpdateUserProfilePicture.d.ts +1 -1
- package/dist/esm/react-query/usersUpdateUserProfilePicture.js +1 -1
- package/dist/esm/react-query/vendorsCreateVendorByCompanyManager.d.ts +33 -0
- package/dist/esm/react-query/vendorsCreateVendorByCompanyManager.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsCreateVendorByCompanyManager.js +51 -0
- package/dist/esm/react-query/vendorsCreateVendorByCompanyManager.js.map +1 -0
- package/dist/esm/react-query/vendorsListVendorAdditionalFacilityFields.core.d.ts +26 -2
- package/dist/esm/react-query/vendorsListVendorAdditionalFacilityFields.core.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsListVendorAdditionalFacilityFields.core.js +53 -2
- package/dist/esm/react-query/vendorsListVendorAdditionalFacilityFields.core.js.map +1 -1
- package/dist/esm/react-query/vendorsListVendorAdditionalFacilityFields.d.ts +67 -16
- package/dist/esm/react-query/vendorsListVendorAdditionalFacilityFields.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsListVendorAdditionalFacilityFields.js +63 -13
- package/dist/esm/react-query/vendorsListVendorAdditionalFacilityFields.js.map +1 -1
- package/dist/esm/sdk/lookups.d.ts +19 -0
- package/dist/esm/sdk/lookups.d.ts.map +1 -0
- package/dist/esm/sdk/lookups.js +26 -0
- package/dist/esm/sdk/lookups.js.map +1 -0
- package/dist/esm/sdk/paymentprofile.d.ts +10 -0
- package/dist/esm/sdk/paymentprofile.d.ts.map +1 -1
- package/dist/esm/sdk/paymentprofile.js +12 -0
- package/dist/esm/sdk/paymentprofile.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/users.d.ts +1 -1
- package/dist/esm/sdk/users.js +1 -1
- package/dist/esm/sdk/vendors.d.ts +20 -6
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +21 -6
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/dist/esm/types/primitives.d.ts +1 -1
- package/dist/esm/types/primitives.d.ts.map +1 -1
- package/dist/esm/types/primitives.js +1 -2
- package/dist/esm/types/primitives.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/lookups.test.ts +30 -0
- package/src/__tests__/paymentprofile.test.ts +16 -0
- package/src/__tests__/users.test.ts +1 -0
- package/src/__tests__/vendors.test.ts +67 -3
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +4 -29
- package/src/funcs/lookupsListLookupSystems.ts +189 -0
- package/src/funcs/paymentProfileDeletePaymentProfile.ts +160 -0
- package/src/funcs/usersUpdateUserProfilePicture.ts +1 -1
- package/src/funcs/vendorsCreateVendorByCompanyManager.ts +183 -0
- package/src/funcs/vendorsListVendorAdditionalFacilityFields.ts +115 -37
- package/src/lib/config.ts +3 -3
- package/src/models/components/expand.ts +1 -0
- package/src/models/components/facility.ts +9 -9
- package/src/models/components/facilitycalendarsummary.ts +2 -0
- package/src/models/components/facilitysummary.ts +2 -0
- package/src/models/components/systemsummary.ts +34 -0
- package/src/models/operations/createvendorbycompanymanager.ts +203 -0
- package/src/models/operations/deletepaymentprofile.ts +35 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/listlocations.ts +15 -12
- package/src/models/operations/listlookupsystems.ts +99 -0
- package/src/models/operations/listvendoradditionalfacilityfields.ts +104 -2
- package/src/models/operations/securityzonecheckin.ts +11 -6
- package/src/models/operations/updateuserprofilepicture.ts +11 -2
- package/src/react-query/index.ts +3 -0
- package/src/react-query/lookupsListLookupSystems.core.ts +85 -0
- package/src/react-query/lookupsListLookupSystems.ts +168 -0
- package/src/react-query/paymentProfileDeletePaymentProfile.ts +115 -0
- package/src/react-query/usersUpdateUserProfilePicture.ts +1 -1
- package/src/react-query/vendorsCreateVendorByCompanyManager.ts +120 -0
- package/src/react-query/vendorsListVendorAdditionalFacilityFields.core.ts +124 -1
- package/src/react-query/vendorsListVendorAdditionalFacilityFields.ts +151 -12
- package/src/sdk/lookups.ts +35 -0
- package/src/sdk/paymentprofile.ts +19 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/users.ts +1 -1
- package/src/sdk/vendors.ts +33 -7
- package/src/types/primitives.ts +1 -3
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: bca241d70364
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { GreenSecurityCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery, 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
|
+
|
|
30
|
+
/**
|
|
31
|
+
* List systems for dropdown/picker use
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Returns all credentialing-eligible systems (and optionally their facilities) for the authenticated user.
|
|
35
|
+
* Designed for lightweight dropdown and picker UIs.
|
|
36
|
+
*
|
|
37
|
+
* - **Company manager**: returns systems scoped to their site.
|
|
38
|
+
* - **Vendor**: returns systems available to that vendor.
|
|
39
|
+
* - **API user**: returns systems scoped to their MarketplaceAppActivation (facility, system, or site level).
|
|
40
|
+
*
|
|
41
|
+
* Use `expand=system.facilities` to include the facilities array on each system.
|
|
42
|
+
*
|
|
43
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
44
|
+
*/
|
|
45
|
+
export function lookupsListLookupSystems(
|
|
46
|
+
client: GreenSecurityCore,
|
|
47
|
+
request: operations.ListLookupSystemsRequest,
|
|
48
|
+
options?: RequestOptions,
|
|
49
|
+
): APIPromise<
|
|
50
|
+
Result<
|
|
51
|
+
operations.ListLookupSystemsResponseBody,
|
|
52
|
+
| errors.ApiErrorResponse
|
|
53
|
+
| GreenSecurityError
|
|
54
|
+
| ResponseValidationError
|
|
55
|
+
| ConnectionError
|
|
56
|
+
| RequestAbortedError
|
|
57
|
+
| RequestTimeoutError
|
|
58
|
+
| InvalidRequestError
|
|
59
|
+
| UnexpectedClientError
|
|
60
|
+
| SDKValidationError
|
|
61
|
+
>
|
|
62
|
+
> {
|
|
63
|
+
return new APIPromise($do(
|
|
64
|
+
client,
|
|
65
|
+
request,
|
|
66
|
+
options,
|
|
67
|
+
));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function $do(
|
|
71
|
+
client: GreenSecurityCore,
|
|
72
|
+
request: operations.ListLookupSystemsRequest,
|
|
73
|
+
options?: RequestOptions,
|
|
74
|
+
): Promise<
|
|
75
|
+
[
|
|
76
|
+
Result<
|
|
77
|
+
operations.ListLookupSystemsResponseBody,
|
|
78
|
+
| errors.ApiErrorResponse
|
|
79
|
+
| GreenSecurityError
|
|
80
|
+
| ResponseValidationError
|
|
81
|
+
| ConnectionError
|
|
82
|
+
| RequestAbortedError
|
|
83
|
+
| RequestTimeoutError
|
|
84
|
+
| InvalidRequestError
|
|
85
|
+
| UnexpectedClientError
|
|
86
|
+
| SDKValidationError
|
|
87
|
+
>,
|
|
88
|
+
APICall,
|
|
89
|
+
]
|
|
90
|
+
> {
|
|
91
|
+
const parsed = safeParse(
|
|
92
|
+
request,
|
|
93
|
+
(value) => operations.ListLookupSystemsRequest$outboundSchema.parse(value),
|
|
94
|
+
"Input validation failed",
|
|
95
|
+
);
|
|
96
|
+
if (!parsed.ok) {
|
|
97
|
+
return [parsed, { status: "invalid" }];
|
|
98
|
+
}
|
|
99
|
+
const payload = parsed.value;
|
|
100
|
+
const body = null;
|
|
101
|
+
|
|
102
|
+
const path = pathToFunc("/lookups/systems")();
|
|
103
|
+
|
|
104
|
+
const query = queryJoin(
|
|
105
|
+
encodeFormQuery({
|
|
106
|
+
"expand": payload.expand,
|
|
107
|
+
}, { explode: false }),
|
|
108
|
+
encodeFormQuery({
|
|
109
|
+
"use": payload.use,
|
|
110
|
+
}),
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
const headers = new Headers(compactMap({
|
|
114
|
+
Accept: "application/json",
|
|
115
|
+
}));
|
|
116
|
+
|
|
117
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
118
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
119
|
+
|
|
120
|
+
const context = {
|
|
121
|
+
options: client._options,
|
|
122
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
123
|
+
operationID: "listLookupSystems",
|
|
124
|
+
oAuth2Scopes: null,
|
|
125
|
+
|
|
126
|
+
resolvedSecurity: requestSecurity,
|
|
127
|
+
|
|
128
|
+
securitySource: client._options.security,
|
|
129
|
+
retryConfig: options?.retries
|
|
130
|
+
|| client._options.retryConfig
|
|
131
|
+
|| { strategy: "none" },
|
|
132
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const requestRes = client._createRequest(context, {
|
|
136
|
+
security: requestSecurity,
|
|
137
|
+
method: "GET",
|
|
138
|
+
baseURL: options?.serverURL,
|
|
139
|
+
path: path,
|
|
140
|
+
headers: headers,
|
|
141
|
+
query: query,
|
|
142
|
+
body: body,
|
|
143
|
+
userAgent: client._options.userAgent,
|
|
144
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
145
|
+
}, options);
|
|
146
|
+
if (!requestRes.ok) {
|
|
147
|
+
return [requestRes, { status: "invalid" }];
|
|
148
|
+
}
|
|
149
|
+
const req = requestRes.value;
|
|
150
|
+
|
|
151
|
+
const doResult = await client._do(req, {
|
|
152
|
+
context,
|
|
153
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
154
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
155
|
+
retryConfig: context.retryConfig,
|
|
156
|
+
retryCodes: context.retryCodes,
|
|
157
|
+
});
|
|
158
|
+
if (!doResult.ok) {
|
|
159
|
+
return [doResult, { status: "request-error", request: req }];
|
|
160
|
+
}
|
|
161
|
+
const response = doResult.value;
|
|
162
|
+
|
|
163
|
+
const responseFields = {
|
|
164
|
+
HttpMeta: { Response: response, Request: req },
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const [result] = await M.match<
|
|
168
|
+
operations.ListLookupSystemsResponseBody,
|
|
169
|
+
| errors.ApiErrorResponse
|
|
170
|
+
| GreenSecurityError
|
|
171
|
+
| ResponseValidationError
|
|
172
|
+
| ConnectionError
|
|
173
|
+
| RequestAbortedError
|
|
174
|
+
| RequestTimeoutError
|
|
175
|
+
| InvalidRequestError
|
|
176
|
+
| UnexpectedClientError
|
|
177
|
+
| SDKValidationError
|
|
178
|
+
>(
|
|
179
|
+
M.json(200, operations.ListLookupSystemsResponseBody$inboundSchema),
|
|
180
|
+
M.jsonErr([400, 401, 403, 422], errors.ApiErrorResponse$inboundSchema),
|
|
181
|
+
M.fail("4XX"),
|
|
182
|
+
M.fail([500, "5XX"]),
|
|
183
|
+
)(response, req, { extraFields: responseFields });
|
|
184
|
+
if (!result.ok) {
|
|
185
|
+
return [result, { status: "complete", request: req, response }];
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return [result, { status: "complete", request: req, response }];
|
|
189
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 1e20a09b10f1
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { GreenSecurityCore } from "../core.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 { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Delete payment profile
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Deletes the payment profile for the logged-in user (vendor or company manager).
|
|
33
|
+
*
|
|
34
|
+
* Only vendors and company managers can access this endpoint.
|
|
35
|
+
*
|
|
36
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
37
|
+
*/
|
|
38
|
+
export function paymentProfileDeletePaymentProfile(
|
|
39
|
+
client: GreenSecurityCore,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<
|
|
42
|
+
Result<
|
|
43
|
+
operations.DeletePaymentProfileDeletePaymentProfileOk,
|
|
44
|
+
| errors.ApiErrorResponse
|
|
45
|
+
| GreenSecurityError
|
|
46
|
+
| ResponseValidationError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
| RequestAbortedError
|
|
49
|
+
| RequestTimeoutError
|
|
50
|
+
| InvalidRequestError
|
|
51
|
+
| UnexpectedClientError
|
|
52
|
+
| SDKValidationError
|
|
53
|
+
>
|
|
54
|
+
> {
|
|
55
|
+
return new APIPromise($do(
|
|
56
|
+
client,
|
|
57
|
+
options,
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function $do(
|
|
62
|
+
client: GreenSecurityCore,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
operations.DeletePaymentProfileDeletePaymentProfileOk,
|
|
68
|
+
| errors.ApiErrorResponse
|
|
69
|
+
| GreenSecurityError
|
|
70
|
+
| ResponseValidationError
|
|
71
|
+
| ConnectionError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| InvalidRequestError
|
|
75
|
+
| UnexpectedClientError
|
|
76
|
+
| SDKValidationError
|
|
77
|
+
>,
|
|
78
|
+
APICall,
|
|
79
|
+
]
|
|
80
|
+
> {
|
|
81
|
+
const path = pathToFunc("/payment-profile")();
|
|
82
|
+
|
|
83
|
+
const headers = new Headers(compactMap({
|
|
84
|
+
Accept: "application/json",
|
|
85
|
+
}));
|
|
86
|
+
|
|
87
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
88
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
89
|
+
|
|
90
|
+
const context = {
|
|
91
|
+
options: client._options,
|
|
92
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
93
|
+
operationID: "deletePaymentProfile",
|
|
94
|
+
oAuth2Scopes: null,
|
|
95
|
+
|
|
96
|
+
resolvedSecurity: requestSecurity,
|
|
97
|
+
|
|
98
|
+
securitySource: client._options.security,
|
|
99
|
+
retryConfig: options?.retries
|
|
100
|
+
|| client._options.retryConfig
|
|
101
|
+
|| { strategy: "none" },
|
|
102
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const requestRes = client._createRequest(context, {
|
|
106
|
+
security: requestSecurity,
|
|
107
|
+
method: "DELETE",
|
|
108
|
+
baseURL: options?.serverURL,
|
|
109
|
+
path: path,
|
|
110
|
+
headers: headers,
|
|
111
|
+
userAgent: client._options.userAgent,
|
|
112
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
113
|
+
}, options);
|
|
114
|
+
if (!requestRes.ok) {
|
|
115
|
+
return [requestRes, { status: "invalid" }];
|
|
116
|
+
}
|
|
117
|
+
const req = requestRes.value;
|
|
118
|
+
|
|
119
|
+
const doResult = await client._do(req, {
|
|
120
|
+
context,
|
|
121
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
122
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
123
|
+
retryConfig: context.retryConfig,
|
|
124
|
+
retryCodes: context.retryCodes,
|
|
125
|
+
});
|
|
126
|
+
if (!doResult.ok) {
|
|
127
|
+
return [doResult, { status: "request-error", request: req }];
|
|
128
|
+
}
|
|
129
|
+
const response = doResult.value;
|
|
130
|
+
|
|
131
|
+
const responseFields = {
|
|
132
|
+
HttpMeta: { Response: response, Request: req },
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const [result] = await M.match<
|
|
136
|
+
operations.DeletePaymentProfileDeletePaymentProfileOk,
|
|
137
|
+
| errors.ApiErrorResponse
|
|
138
|
+
| GreenSecurityError
|
|
139
|
+
| ResponseValidationError
|
|
140
|
+
| ConnectionError
|
|
141
|
+
| RequestAbortedError
|
|
142
|
+
| RequestTimeoutError
|
|
143
|
+
| InvalidRequestError
|
|
144
|
+
| UnexpectedClientError
|
|
145
|
+
| SDKValidationError
|
|
146
|
+
>(
|
|
147
|
+
M.json(
|
|
148
|
+
200,
|
|
149
|
+
operations.DeletePaymentProfileDeletePaymentProfileOk$inboundSchema,
|
|
150
|
+
),
|
|
151
|
+
M.jsonErr([400, 401, 403, 404], errors.ApiErrorResponse$inboundSchema),
|
|
152
|
+
M.fail("4XX"),
|
|
153
|
+
M.fail([500, "5XX"]),
|
|
154
|
+
)(response, req, { extraFields: responseFields });
|
|
155
|
+
if (!result.ok) {
|
|
156
|
+
return [result, { status: "complete", request: req, response }];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return [result, { status: "complete", request: req, response }];
|
|
160
|
+
}
|
|
@@ -31,7 +31,7 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* Register profile picture metadata for S3 direct upload
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Register profile picture metadata for a user. The
|
|
34
|
+
* Register profile picture metadata for a user and obtain a presigned S3 upload URL. The flow is two-step: (1) call this endpoint with the image's file name, content type, and size; (2) PUT the file bytes to the returned upload_url with the matching Content-Type header. The file is stored at user_profile_image/{id}{ext} in the uploads bucket, where {ext} is derived from image_file_name and may be empty, and is processed asynchronously (resize to tiny/thumb/large variants). Use 'me' as the id for the authenticated user. Requires authentication and either self-ownership or 'users:edit' permission. API users must be authorized via MarketplaceAppActivation for the target user.
|
|
35
35
|
*
|
|
36
36
|
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
37
37
|
*/
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 3646515787f6
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { GreenSecurityCore } from "../core.js";
|
|
7
|
+
import { encodeJSON } 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
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Create vendor on behalf of company manager
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Creates a new vendor account on behalf of the authenticated company manager.
|
|
35
|
+
* The vendor is automatically linked to the company manager's company.
|
|
36
|
+
*
|
|
37
|
+
* For API users: `source_user_id` is required. The API user acts on behalf of a company manager user.
|
|
38
|
+
* The marketplace app must be activated for that user via MarketplaceAppActivation.
|
|
39
|
+
*
|
|
40
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
41
|
+
*/
|
|
42
|
+
export function vendorsCreateVendorByCompanyManager(
|
|
43
|
+
client: GreenSecurityCore,
|
|
44
|
+
request: operations.CreateVendorByCompanyManagerRequestBody,
|
|
45
|
+
options?: RequestOptions,
|
|
46
|
+
): APIPromise<
|
|
47
|
+
Result<
|
|
48
|
+
operations.CreateVendorByCompanyManagerResponseBody,
|
|
49
|
+
| errors.ApiErrorResponse
|
|
50
|
+
| GreenSecurityError
|
|
51
|
+
| ResponseValidationError
|
|
52
|
+
| ConnectionError
|
|
53
|
+
| RequestAbortedError
|
|
54
|
+
| RequestTimeoutError
|
|
55
|
+
| InvalidRequestError
|
|
56
|
+
| UnexpectedClientError
|
|
57
|
+
| SDKValidationError
|
|
58
|
+
>
|
|
59
|
+
> {
|
|
60
|
+
return new APIPromise($do(
|
|
61
|
+
client,
|
|
62
|
+
request,
|
|
63
|
+
options,
|
|
64
|
+
));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function $do(
|
|
68
|
+
client: GreenSecurityCore,
|
|
69
|
+
request: operations.CreateVendorByCompanyManagerRequestBody,
|
|
70
|
+
options?: RequestOptions,
|
|
71
|
+
): Promise<
|
|
72
|
+
[
|
|
73
|
+
Result<
|
|
74
|
+
operations.CreateVendorByCompanyManagerResponseBody,
|
|
75
|
+
| errors.ApiErrorResponse
|
|
76
|
+
| GreenSecurityError
|
|
77
|
+
| ResponseValidationError
|
|
78
|
+
| ConnectionError
|
|
79
|
+
| RequestAbortedError
|
|
80
|
+
| RequestTimeoutError
|
|
81
|
+
| InvalidRequestError
|
|
82
|
+
| UnexpectedClientError
|
|
83
|
+
| SDKValidationError
|
|
84
|
+
>,
|
|
85
|
+
APICall,
|
|
86
|
+
]
|
|
87
|
+
> {
|
|
88
|
+
const parsed = safeParse(
|
|
89
|
+
request,
|
|
90
|
+
(value) =>
|
|
91
|
+
operations.CreateVendorByCompanyManagerRequestBody$outboundSchema.parse(
|
|
92
|
+
value,
|
|
93
|
+
),
|
|
94
|
+
"Input validation failed",
|
|
95
|
+
);
|
|
96
|
+
if (!parsed.ok) {
|
|
97
|
+
return [parsed, { status: "invalid" }];
|
|
98
|
+
}
|
|
99
|
+
const payload = parsed.value;
|
|
100
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
101
|
+
|
|
102
|
+
const path = pathToFunc("/company-manager/vendors")();
|
|
103
|
+
|
|
104
|
+
const headers = new Headers(compactMap({
|
|
105
|
+
"Content-Type": "application/json",
|
|
106
|
+
Accept: "application/json",
|
|
107
|
+
}));
|
|
108
|
+
|
|
109
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
110
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
111
|
+
|
|
112
|
+
const context = {
|
|
113
|
+
options: client._options,
|
|
114
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
115
|
+
operationID: "createVendorByCompanyManager",
|
|
116
|
+
oAuth2Scopes: null,
|
|
117
|
+
|
|
118
|
+
resolvedSecurity: requestSecurity,
|
|
119
|
+
|
|
120
|
+
securitySource: client._options.security,
|
|
121
|
+
retryConfig: options?.retries
|
|
122
|
+
|| client._options.retryConfig
|
|
123
|
+
|| { strategy: "none" },
|
|
124
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const requestRes = client._createRequest(context, {
|
|
128
|
+
security: requestSecurity,
|
|
129
|
+
method: "POST",
|
|
130
|
+
baseURL: options?.serverURL,
|
|
131
|
+
path: path,
|
|
132
|
+
headers: headers,
|
|
133
|
+
body: body,
|
|
134
|
+
userAgent: client._options.userAgent,
|
|
135
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
136
|
+
}, options);
|
|
137
|
+
if (!requestRes.ok) {
|
|
138
|
+
return [requestRes, { status: "invalid" }];
|
|
139
|
+
}
|
|
140
|
+
const req = requestRes.value;
|
|
141
|
+
|
|
142
|
+
const doResult = await client._do(req, {
|
|
143
|
+
context,
|
|
144
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
145
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
146
|
+
retryConfig: context.retryConfig,
|
|
147
|
+
retryCodes: context.retryCodes,
|
|
148
|
+
});
|
|
149
|
+
if (!doResult.ok) {
|
|
150
|
+
return [doResult, { status: "request-error", request: req }];
|
|
151
|
+
}
|
|
152
|
+
const response = doResult.value;
|
|
153
|
+
|
|
154
|
+
const responseFields = {
|
|
155
|
+
HttpMeta: { Response: response, Request: req },
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const [result] = await M.match<
|
|
159
|
+
operations.CreateVendorByCompanyManagerResponseBody,
|
|
160
|
+
| errors.ApiErrorResponse
|
|
161
|
+
| GreenSecurityError
|
|
162
|
+
| ResponseValidationError
|
|
163
|
+
| ConnectionError
|
|
164
|
+
| RequestAbortedError
|
|
165
|
+
| RequestTimeoutError
|
|
166
|
+
| InvalidRequestError
|
|
167
|
+
| UnexpectedClientError
|
|
168
|
+
| SDKValidationError
|
|
169
|
+
>(
|
|
170
|
+
M.json(
|
|
171
|
+
201,
|
|
172
|
+
operations.CreateVendorByCompanyManagerResponseBody$inboundSchema,
|
|
173
|
+
),
|
|
174
|
+
M.jsonErr([400, 401, 409, 422], errors.ApiErrorResponse$inboundSchema),
|
|
175
|
+
M.fail("4XX"),
|
|
176
|
+
M.fail([500, "5XX"]),
|
|
177
|
+
)(response, req, { extraFields: responseFields });
|
|
178
|
+
if (!result.ok) {
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
|
+
}
|