ocpplab 0.1.2
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 +375 -0
- package/dist/cjs/BaseClient.d.ts +42 -0
- package/dist/cjs/BaseClient.js +63 -0
- package/dist/cjs/Client.d.ts +75 -0
- package/dist/cjs/Client.js +197 -0
- package/dist/cjs/api/errors/BadRequestError.d.ts +6 -0
- package/dist/cjs/api/errors/BadRequestError.js +54 -0
- package/dist/cjs/api/errors/ForbiddenError.d.ts +6 -0
- package/dist/cjs/api/errors/ForbiddenError.js +54 -0
- package/dist/cjs/api/errors/InternalServerError.d.ts +6 -0
- package/dist/cjs/api/errors/InternalServerError.js +54 -0
- package/dist/cjs/api/errors/NotFoundError.d.ts +6 -0
- package/dist/cjs/api/errors/NotFoundError.js +54 -0
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +6 -0
- package/dist/cjs/api/errors/UnauthorizedError.js +54 -0
- package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +6 -0
- package/dist/cjs/api/errors/UnprocessableEntityError.js +54 -0
- package/dist/cjs/api/errors/index.d.ts +6 -0
- package/dist/cjs/api/errors/index.js +22 -0
- package/dist/cjs/api/index.d.ts +3 -0
- package/dist/cjs/api/index.js +19 -0
- package/dist/cjs/api/resources/catalog/client/Client.d.ts +76 -0
- package/dist/cjs/api/resources/catalog/client/Client.js +265 -0
- package/dist/cjs/api/resources/catalog/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/catalog/client/index.js +17 -0
- package/dist/cjs/api/resources/catalog/client/requests/GetCatalogBrandModelRequest.d.ts +13 -0
- package/dist/cjs/api/resources/catalog/client/requests/GetCatalogBrandModelRequest.js +3 -0
- package/dist/cjs/api/resources/catalog/client/requests/ListCatalogBrandModelsRequest.d.ts +16 -0
- package/dist/cjs/api/resources/catalog/client/requests/ListCatalogBrandModelsRequest.js +3 -0
- package/dist/cjs/api/resources/catalog/client/requests/ListCatalogBrandsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/catalog/client/requests/ListCatalogBrandsRequest.js +3 -0
- package/dist/cjs/api/resources/catalog/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/catalog/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/catalog/exports.d.ts +2 -0
- package/dist/cjs/api/resources/catalog/exports.js +21 -0
- package/dist/cjs/api/resources/catalog/index.d.ts +1 -0
- package/dist/cjs/api/resources/catalog/index.js +17 -0
- package/dist/cjs/api/resources/chargerCommands/client/Client.d.ts +327 -0
- package/dist/cjs/api/resources/chargerCommands/client/Client.js +977 -0
- package/dist/cjs/api/resources/chargerCommands/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerCommands/client/index.js +17 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/AutoStartTransactionRequest.d.ts +14 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/AutoStartTransactionRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/AutoStopTransactionRequest.d.ts +12 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/AutoStopTransactionRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/EvRequestsEnergyRequest.d.ts +16 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/EvRequestsEnergyRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/EvStopsEnergyRequest.d.ts +16 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/EvStopsEnergyRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/IdTagRequest.d.ts +12 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/IdTagRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/PlugConnectorRequest.d.ts +25 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/PlugConnectorRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/PowerUpdateRequest.d.ts +24 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/PowerUpdateRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/ProxyMessageRequest.d.ts +46 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/ProxyMessageRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/StartTransactionRequest.d.ts +16 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/StartTransactionRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/StopTransactionRequest.d.ts +17 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/StopTransactionRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/UnlockConnectorRequest.d.ts +16 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/UnlockConnectorRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/UnplugConnectorRequest.d.ts +16 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/UnplugConnectorRequest.js +3 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/index.d.ts +12 -0
- package/dist/cjs/api/resources/chargerCommands/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/chargerCommands/exports.d.ts +2 -0
- package/dist/cjs/api/resources/chargerCommands/exports.js +21 -0
- package/dist/cjs/api/resources/chargerCommands/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerCommands/index.js +17 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/Client.d.ts +86 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/Client.js +277 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/index.js +17 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/requests/GetConfigurationRequest.d.ts +12 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/requests/GetConfigurationRequest.js +3 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/requests/ResetAuthCacheRequest.d.ts +10 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/requests/ResetAuthCacheRequest.js +3 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/requests/SetConfigurationRequest.d.ts +24 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/requests/SetConfigurationRequest.js +3 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/chargerConfiguration/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/chargerConfiguration/exports.d.ts +2 -0
- package/dist/cjs/api/resources/chargerConfiguration/exports.js +21 -0
- package/dist/cjs/api/resources/chargerConfiguration/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerConfiguration/index.js +17 -0
- package/dist/cjs/api/resources/chargerDeployments/client/Client.d.ts +205 -0
- package/dist/cjs/api/resources/chargerDeployments/client/Client.js +648 -0
- package/dist/cjs/api/resources/chargerDeployments/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerDeployments/client/index.js +17 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/DeleteChargerRequest.d.ts +10 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/DeleteChargerRequest.js +3 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/GetChargerRequest.d.ts +10 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/GetChargerRequest.js +3 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/ListChargersRequest.d.ts +12 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/ListChargersRequest.js +3 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/ResetChargerRuntimeRequest.d.ts +15 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/ResetChargerRuntimeRequest.js +3 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/StartChargerRuntimeRequest.d.ts +15 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/StartChargerRuntimeRequest.js +3 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/StopChargerRuntimeRequest.d.ts +15 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/StopChargerRuntimeRequest.js +3 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/UpdateChargerRequest.d.ts +26 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/UpdateChargerRequest.js +3 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/index.d.ts +7 -0
- package/dist/cjs/api/resources/chargerDeployments/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/chargerDeployments/exports.d.ts +2 -0
- package/dist/cjs/api/resources/chargerDeployments/exports.js +21 -0
- package/dist/cjs/api/resources/chargerDeployments/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerDeployments/index.js +17 -0
- package/dist/cjs/api/resources/chargerFaults/client/Client.d.ts +55 -0
- package/dist/cjs/api/resources/chargerFaults/client/Client.js +201 -0
- package/dist/cjs/api/resources/chargerFaults/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerFaults/client/index.js +17 -0
- package/dist/cjs/api/resources/chargerFaults/client/requests/ClearFaultRequest.d.ts +14 -0
- package/dist/cjs/api/resources/chargerFaults/client/requests/ClearFaultRequest.js +3 -0
- package/dist/cjs/api/resources/chargerFaults/client/requests/InjectFaultRequest.d.ts +17 -0
- package/dist/cjs/api/resources/chargerFaults/client/requests/InjectFaultRequest.js +3 -0
- package/dist/cjs/api/resources/chargerFaults/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/chargerFaults/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/chargerFaults/exports.d.ts +2 -0
- package/dist/cjs/api/resources/chargerFaults/exports.js +21 -0
- package/dist/cjs/api/resources/chargerFaults/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerFaults/index.js +17 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/Client.d.ts +82 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/Client.js +288 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/index.js +17 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/requests/DeleteLocalListRequest.d.ts +10 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/requests/DeleteLocalListRequest.js +3 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/requests/GetLocalAuthListRequest.d.ts +14 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/requests/GetLocalAuthListRequest.js +3 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/requests/LocalAuthListUpdateRequest.d.ts +21 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/requests/LocalAuthListUpdateRequest.js +3 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/exports.d.ts +2 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/exports.js +21 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerLocalAuthorization/index.js +17 -0
- package/dist/cjs/api/resources/chargerLogs/client/Client.d.ts +34 -0
- package/dist/cjs/api/resources/chargerLogs/client/Client.js +130 -0
- package/dist/cjs/api/resources/chargerLogs/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerLogs/client/index.js +17 -0
- package/dist/cjs/api/resources/chargerLogs/client/requests/ListChargerLogsRequest.d.ts +20 -0
- package/dist/cjs/api/resources/chargerLogs/client/requests/ListChargerLogsRequest.js +3 -0
- package/dist/cjs/api/resources/chargerLogs/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerLogs/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/chargerLogs/exports.d.ts +2 -0
- package/dist/cjs/api/resources/chargerLogs/exports.js +21 -0
- package/dist/cjs/api/resources/chargerLogs/index.d.ts +1 -0
- package/dist/cjs/api/resources/chargerLogs/index.js +17 -0
- package/dist/cjs/api/resources/health/client/Client.d.ts +31 -0
- package/dist/cjs/api/resources/health/client/Client.js +115 -0
- package/dist/cjs/api/resources/health/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/health/client/index.js +2 -0
- package/dist/cjs/api/resources/health/exports.d.ts +2 -0
- package/dist/cjs/api/resources/health/exports.js +21 -0
- package/dist/cjs/api/resources/health/index.d.ts +1 -0
- package/dist/cjs/api/resources/health/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +23 -0
- package/dist/cjs/api/resources/index.js +62 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/Client.d.ts +343 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/Client.js +960 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/index.js +17 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationAuthorizeIdTagRequest.d.ts +20 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationAuthorizeIdTagRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationAutoStartTransactionRequest.d.ts +23 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationAutoStartTransactionRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationAutoStopTransactionRequest.d.ts +20 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationAutoStopTransactionRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationEvRequestsEnergyRequest.d.ts +23 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationEvRequestsEnergyRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationEvStopsEnergyRequest.d.ts +23 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationEvStopsEnergyRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationPlugConnectorRequest.d.ts +23 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationPlugConnectorRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationPowerUpdateRequest.d.ts +26 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationPowerUpdateRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationStartTransactionRequest.d.ts +26 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationStartTransactionRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationStopTransactionRequest.d.ts +19 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationStopTransactionRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationUnlockConnectorRequest.d.ts +23 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationUnlockConnectorRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationUnplugConnectorRequest.d.ts +23 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/LocationUnplugConnectorRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/index.d.ts +11 -0
- package/dist/cjs/api/resources/locationChargerCommands/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/locationChargerCommands/exports.d.ts +2 -0
- package/dist/cjs/api/resources/locationChargerCommands/exports.js +21 -0
- package/dist/cjs/api/resources/locationChargerCommands/index.d.ts +1 -0
- package/dist/cjs/api/resources/locationChargerCommands/index.js +17 -0
- package/dist/cjs/api/resources/locationChargerFaults/client/Client.d.ts +78 -0
- package/dist/cjs/api/resources/locationChargerFaults/client/Client.js +236 -0
- package/dist/cjs/api/resources/locationChargerFaults/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/locationChargerFaults/client/index.js +17 -0
- package/dist/cjs/api/resources/locationChargerFaults/client/requests/LocationClearFaultRequest.d.ts +23 -0
- package/dist/cjs/api/resources/locationChargerFaults/client/requests/LocationClearFaultRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerFaults/client/requests/LocationInjectFaultRequest.d.ts +26 -0
- package/dist/cjs/api/resources/locationChargerFaults/client/requests/LocationInjectFaultRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerFaults/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/locationChargerFaults/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/locationChargerFaults/exports.d.ts +2 -0
- package/dist/cjs/api/resources/locationChargerFaults/exports.js +21 -0
- package/dist/cjs/api/resources/locationChargerFaults/index.d.ts +1 -0
- package/dist/cjs/api/resources/locationChargerFaults/index.js +17 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/Client.d.ts +207 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/Client.js +626 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/index.js +17 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/CreateLocationChargersRequest.d.ts +30 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/CreateLocationChargersRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/DeleteLocationChargersRequest.d.ts +13 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/DeleteLocationChargersRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/ListLocationChargersRequest.d.ts +16 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/ListLocationChargersRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/ResetLocationChargerRuntimesRequest.d.ts +21 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/ResetLocationChargerRuntimesRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/StartLocationChargerRuntimesRequest.d.ts +21 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/StartLocationChargerRuntimesRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/StopLocationChargerRuntimesRequest.d.ts +21 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/StopLocationChargerRuntimesRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/UpdateLocationChargersRequest.d.ts +22 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/UpdateLocationChargersRequest.js +3 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/index.d.ts +7 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/exports.d.ts +2 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/exports.js +21 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/index.d.ts +1 -0
- package/dist/cjs/api/resources/locationChargerProvisioning/index.js +17 -0
- package/dist/cjs/api/resources/locations/client/Client.d.ts +143 -0
- package/dist/cjs/api/resources/locations/client/Client.js +438 -0
- package/dist/cjs/api/resources/locations/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/locations/client/index.js +17 -0
- package/dist/cjs/api/resources/locations/client/requests/CreateLocationRequest.d.ts +46 -0
- package/dist/cjs/api/resources/locations/client/requests/CreateLocationRequest.js +3 -0
- package/dist/cjs/api/resources/locations/client/requests/DeleteLocationRequest.d.ts +10 -0
- package/dist/cjs/api/resources/locations/client/requests/DeleteLocationRequest.js +3 -0
- package/dist/cjs/api/resources/locations/client/requests/GetLocationRequest.d.ts +10 -0
- package/dist/cjs/api/resources/locations/client/requests/GetLocationRequest.js +3 -0
- package/dist/cjs/api/resources/locations/client/requests/ListLocationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/locations/client/requests/ListLocationsRequest.js +3 -0
- package/dist/cjs/api/resources/locations/client/requests/UpdateLocationRequest.d.ts +30 -0
- package/dist/cjs/api/resources/locations/client/requests/UpdateLocationRequest.js +3 -0
- package/dist/cjs/api/resources/locations/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/locations/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/locations/exports.d.ts +2 -0
- package/dist/cjs/api/resources/locations/exports.js +21 -0
- package/dist/cjs/api/resources/locations/index.d.ts +1 -0
- package/dist/cjs/api/resources/locations/index.js +17 -0
- package/dist/cjs/api/types/BrandListResponse.d.ts +10 -0
- package/dist/cjs/api/types/BrandListResponse.js +3 -0
- package/dist/cjs/api/types/BrandResponse.d.ts +10 -0
- package/dist/cjs/api/types/BrandResponse.js +3 -0
- package/dist/cjs/api/types/CacheResetResponse.d.ts +7 -0
- package/dist/cjs/api/types/CacheResetResponse.js +3 -0
- package/dist/cjs/api/types/ChargerLifecycleRequest.d.ts +4 -0
- package/dist/cjs/api/types/ChargerLifecycleRequest.js +3 -0
- package/dist/cjs/api/types/ChargerListResponse.d.ts +10 -0
- package/dist/cjs/api/types/ChargerListResponse.js +3 -0
- package/dist/cjs/api/types/ChargerLogEntry.d.ts +9 -0
- package/dist/cjs/api/types/ChargerLogEntry.js +3 -0
- package/dist/cjs/api/types/ChargerLogListResponse.d.ts +10 -0
- package/dist/cjs/api/types/ChargerLogListResponse.js +3 -0
- package/dist/cjs/api/types/ChargerResponse.d.ts +18 -0
- package/dist/cjs/api/types/ChargerResponse.js +3 -0
- package/dist/cjs/api/types/ConfigurationChangeResponse.d.ts +8 -0
- package/dist/cjs/api/types/ConfigurationChangeResponse.js +3 -0
- package/dist/cjs/api/types/ConfigurationEntry.d.ts +7 -0
- package/dist/cjs/api/types/ConfigurationEntry.js +3 -0
- package/dist/cjs/api/types/ConfigurationResponse.d.ts +7 -0
- package/dist/cjs/api/types/ConfigurationResponse.js +3 -0
- package/dist/cjs/api/types/ConfigurationUpdateRequest.d.ts +4 -0
- package/dist/cjs/api/types/ConfigurationUpdateRequest.js +3 -0
- package/dist/cjs/api/types/ConnectorSelectionRequest.d.ts +9 -0
- package/dist/cjs/api/types/ConnectorSelectionRequest.js +3 -0
- package/dist/cjs/api/types/Coordinates.d.ts +9 -0
- package/dist/cjs/api/types/Coordinates.js +3 -0
- package/dist/cjs/api/types/CreateChargerRequest.d.ts +19 -0
- package/dist/cjs/api/types/CreateChargerRequest.js +3 -0
- package/dist/cjs/api/types/CreateLocationChargersResponse.d.ts +10 -0
- package/dist/cjs/api/types/CreateLocationChargersResponse.js +3 -0
- package/dist/cjs/api/types/DeleteLocationChargersResponse.d.ts +10 -0
- package/dist/cjs/api/types/DeleteLocationChargersResponse.js +3 -0
- package/dist/cjs/api/types/FaultOperationResponse.d.ts +10 -0
- package/dist/cjs/api/types/FaultOperationResponse.js +3 -0
- package/dist/cjs/api/types/HttpErrorResponse.d.ts +7 -0
- package/dist/cjs/api/types/HttpErrorResponse.js +3 -0
- package/dist/cjs/api/types/HttpValidationError.d.ts +4 -0
- package/dist/cjs/api/types/HttpValidationError.js +3 -0
- package/dist/cjs/api/types/LocalAuthListEntry.d.ts +8 -0
- package/dist/cjs/api/types/LocalAuthListEntry.js +3 -0
- package/dist/cjs/api/types/LocalAuthorizationListResponse.d.ts +10 -0
- package/dist/cjs/api/types/LocalAuthorizationListResponse.js +3 -0
- package/dist/cjs/api/types/LocalListMutationResponse.d.ts +10 -0
- package/dist/cjs/api/types/LocalListMutationResponse.js +3 -0
- package/dist/cjs/api/types/LocationCommandFailure.d.ts +7 -0
- package/dist/cjs/api/types/LocationCommandFailure.js +3 -0
- package/dist/cjs/api/types/LocationCommandResponse.d.ts +11 -0
- package/dist/cjs/api/types/LocationCommandResponse.js +3 -0
- package/dist/cjs/api/types/LocationCreateChargerFailure.d.ts +7 -0
- package/dist/cjs/api/types/LocationCreateChargerFailure.js +3 -0
- package/dist/cjs/api/types/LocationDeleteChargerFailure.d.ts +7 -0
- package/dist/cjs/api/types/LocationDeleteChargerFailure.js +3 -0
- package/dist/cjs/api/types/LocationFaultResponse.d.ts +11 -0
- package/dist/cjs/api/types/LocationFaultResponse.js +3 -0
- package/dist/cjs/api/types/LocationFaultResult.d.ts +9 -0
- package/dist/cjs/api/types/LocationFaultResult.js +3 -0
- package/dist/cjs/api/types/LocationLifecycleRequest.d.ts +8 -0
- package/dist/cjs/api/types/LocationLifecycleRequest.js +3 -0
- package/dist/cjs/api/types/LocationListResponse.d.ts +10 -0
- package/dist/cjs/api/types/LocationListResponse.js +3 -0
- package/dist/cjs/api/types/LocationQueuedCommandResult.d.ts +9 -0
- package/dist/cjs/api/types/LocationQueuedCommandResult.js +3 -0
- package/dist/cjs/api/types/LocationResponse.d.ts +22 -0
- package/dist/cjs/api/types/LocationResponse.js +3 -0
- package/dist/cjs/api/types/LocationUpdateChargerFailure.d.ts +7 -0
- package/dist/cjs/api/types/LocationUpdateChargerFailure.js +3 -0
- package/dist/cjs/api/types/ModelListResponse.d.ts +10 -0
- package/dist/cjs/api/types/ModelListResponse.js +3 -0
- package/dist/cjs/api/types/ModelResponse.d.ts +16 -0
- package/dist/cjs/api/types/ModelResponse.js +3 -0
- package/dist/cjs/api/types/ProxyAction.d.ts +21 -0
- package/dist/cjs/api/types/ProxyAction.js +24 -0
- package/dist/cjs/api/types/ProxyOcppVersion.d.ts +5 -0
- package/dist/cjs/api/types/ProxyOcppVersion.js +8 -0
- package/dist/cjs/api/types/QueuedCommandResponse.d.ts +10 -0
- package/dist/cjs/api/types/QueuedCommandResponse.js +3 -0
- package/dist/cjs/api/types/UpdateLocationChargerItem.d.ts +15 -0
- package/dist/cjs/api/types/UpdateLocationChargerItem.js +3 -0
- package/dist/cjs/api/types/UpdateLocationChargersResponse.d.ts +10 -0
- package/dist/cjs/api/types/UpdateLocationChargersResponse.js +3 -0
- package/dist/cjs/api/types/ValidationError.d.ts +13 -0
- package/dist/cjs/api/types/ValidationError.js +3 -0
- package/dist/cjs/api/types/index.d.ts +42 -0
- package/dist/cjs/api/types/index.js +58 -0
- package/dist/cjs/auth/BearerAuthProvider.d.ts +20 -0
- package/dist/cjs/auth/BearerAuthProvider.js +79 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +33 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
- package/dist/cjs/core/auth/BearerToken.js +16 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +5 -0
- package/dist/cjs/core/auth/index.js +9 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/core/exports.js +17 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/APIResponse.js +2 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +19 -0
- package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +50 -0
- package/dist/cjs/core/fetcher/Fetcher.js +326 -0
- package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
- package/dist/cjs/core/fetcher/Headers.js +84 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/cjs/core/fetcher/RawResponse.js +44 -0
- package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
- package/dist/cjs/core/fetcher/Supplier.js +22 -0
- package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/cjs/core/fetcher/createRequestUrl.js +8 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +45 -0
- package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/cjs/core/fetcher/getFetchFn.js +17 -0
- package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
- package/dist/cjs/core/fetcher/getHeader.js +11 -0
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/cjs/core/fetcher/getRequestBody.js +27 -0
- package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +69 -0
- package/dist/cjs/core/fetcher/index.d.ts +13 -0
- package/dist/cjs/core/fetcher/index.js +19 -0
- package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -0
- package/dist/cjs/core/fetcher/makeRequest.js +61 -0
- package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/cjs/core/fetcher/requestWithRetries.js +67 -0
- package/dist/cjs/core/fetcher/signals.d.ts +5 -0
- package/dist/cjs/core/fetcher/signals.js +24 -0
- package/dist/cjs/core/headers.d.ts +2 -0
- package/dist/cjs/core/headers.js +31 -0
- package/dist/cjs/core/index.d.ts +6 -0
- package/dist/cjs/core/index.js +45 -0
- package/dist/cjs/core/json.d.ts +15 -0
- package/dist/cjs/core/json.js +24 -0
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/runtime/index.d.ts +1 -0
- package/dist/cjs/core/runtime/index.js +5 -0
- package/dist/cjs/core/runtime/runtime.d.ts +9 -0
- package/dist/cjs/core/runtime/runtime.js +104 -0
- package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
- package/dist/cjs/core/url/encodePathParam.js +21 -0
- package/dist/cjs/core/url/index.d.ts +3 -0
- package/dist/cjs/core/url/index.js +9 -0
- package/dist/cjs/core/url/join.d.ts +1 -0
- package/dist/cjs/core/url/join.js +68 -0
- package/dist/cjs/core/url/qs.d.ts +6 -0
- package/dist/cjs/core/url/qs.js +64 -0
- package/dist/cjs/errors/OcpplabError.d.ts +14 -0
- package/dist/cjs/errors/OcpplabError.js +35 -0
- package/dist/cjs/errors/OcpplabTimeoutError.d.ts +6 -0
- package/dist/cjs/errors/OcpplabTimeoutError.js +18 -0
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +68 -0
- package/dist/cjs/errors/index.d.ts +2 -0
- package/dist/cjs/errors/index.js +7 -0
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +5 -0
- package/dist/cjs/index.js +46 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +4 -0
- package/dist/esm/BaseClient.d.mts +42 -0
- package/dist/esm/BaseClient.mjs +26 -0
- package/dist/esm/Client.d.mts +75 -0
- package/dist/esm/Client.mjs +160 -0
- package/dist/esm/api/errors/BadRequestError.d.mts +6 -0
- package/dist/esm/api/errors/BadRequestError.mjs +17 -0
- package/dist/esm/api/errors/ForbiddenError.d.mts +6 -0
- package/dist/esm/api/errors/ForbiddenError.mjs +17 -0
- package/dist/esm/api/errors/InternalServerError.d.mts +6 -0
- package/dist/esm/api/errors/InternalServerError.mjs +17 -0
- package/dist/esm/api/errors/NotFoundError.d.mts +6 -0
- package/dist/esm/api/errors/NotFoundError.mjs +17 -0
- package/dist/esm/api/errors/UnauthorizedError.d.mts +6 -0
- package/dist/esm/api/errors/UnauthorizedError.mjs +17 -0
- package/dist/esm/api/errors/UnprocessableEntityError.d.mts +6 -0
- package/dist/esm/api/errors/UnprocessableEntityError.mjs +17 -0
- package/dist/esm/api/errors/index.d.mts +6 -0
- package/dist/esm/api/errors/index.mjs +6 -0
- package/dist/esm/api/index.d.mts +3 -0
- package/dist/esm/api/index.mjs +3 -0
- package/dist/esm/api/resources/catalog/client/Client.d.mts +76 -0
- package/dist/esm/api/resources/catalog/client/Client.mjs +228 -0
- package/dist/esm/api/resources/catalog/client/index.d.mts +1 -0
- package/dist/esm/api/resources/catalog/client/index.mjs +1 -0
- package/dist/esm/api/resources/catalog/client/requests/GetCatalogBrandModelRequest.d.mts +13 -0
- package/dist/esm/api/resources/catalog/client/requests/GetCatalogBrandModelRequest.mjs +2 -0
- package/dist/esm/api/resources/catalog/client/requests/ListCatalogBrandModelsRequest.d.mts +16 -0
- package/dist/esm/api/resources/catalog/client/requests/ListCatalogBrandModelsRequest.mjs +2 -0
- package/dist/esm/api/resources/catalog/client/requests/ListCatalogBrandsRequest.d.mts +13 -0
- package/dist/esm/api/resources/catalog/client/requests/ListCatalogBrandsRequest.mjs +2 -0
- package/dist/esm/api/resources/catalog/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/catalog/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/catalog/exports.d.mts +2 -0
- package/dist/esm/api/resources/catalog/exports.mjs +3 -0
- package/dist/esm/api/resources/catalog/index.d.mts +1 -0
- package/dist/esm/api/resources/catalog/index.mjs +1 -0
- package/dist/esm/api/resources/chargerCommands/client/Client.d.mts +327 -0
- package/dist/esm/api/resources/chargerCommands/client/Client.mjs +940 -0
- package/dist/esm/api/resources/chargerCommands/client/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerCommands/client/index.mjs +1 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/AutoStartTransactionRequest.d.mts +14 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/AutoStartTransactionRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/AutoStopTransactionRequest.d.mts +12 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/AutoStopTransactionRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/EvRequestsEnergyRequest.d.mts +16 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/EvRequestsEnergyRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/EvStopsEnergyRequest.d.mts +16 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/EvStopsEnergyRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/IdTagRequest.d.mts +12 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/IdTagRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/PlugConnectorRequest.d.mts +25 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/PlugConnectorRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/PowerUpdateRequest.d.mts +24 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/PowerUpdateRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/ProxyMessageRequest.d.mts +46 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/ProxyMessageRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/StartTransactionRequest.d.mts +16 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/StartTransactionRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/StopTransactionRequest.d.mts +17 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/StopTransactionRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/UnlockConnectorRequest.d.mts +16 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/UnlockConnectorRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/UnplugConnectorRequest.d.mts +16 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/UnplugConnectorRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/index.d.mts +12 -0
- package/dist/esm/api/resources/chargerCommands/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/chargerCommands/exports.d.mts +2 -0
- package/dist/esm/api/resources/chargerCommands/exports.mjs +3 -0
- package/dist/esm/api/resources/chargerCommands/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerCommands/index.mjs +1 -0
- package/dist/esm/api/resources/chargerConfiguration/client/Client.d.mts +86 -0
- package/dist/esm/api/resources/chargerConfiguration/client/Client.mjs +240 -0
- package/dist/esm/api/resources/chargerConfiguration/client/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerConfiguration/client/index.mjs +1 -0
- package/dist/esm/api/resources/chargerConfiguration/client/requests/GetConfigurationRequest.d.mts +12 -0
- package/dist/esm/api/resources/chargerConfiguration/client/requests/GetConfigurationRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerConfiguration/client/requests/ResetAuthCacheRequest.d.mts +10 -0
- package/dist/esm/api/resources/chargerConfiguration/client/requests/ResetAuthCacheRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerConfiguration/client/requests/SetConfigurationRequest.d.mts +24 -0
- package/dist/esm/api/resources/chargerConfiguration/client/requests/SetConfigurationRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerConfiguration/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/chargerConfiguration/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/chargerConfiguration/exports.d.mts +2 -0
- package/dist/esm/api/resources/chargerConfiguration/exports.mjs +3 -0
- package/dist/esm/api/resources/chargerConfiguration/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerConfiguration/index.mjs +1 -0
- package/dist/esm/api/resources/chargerDeployments/client/Client.d.mts +205 -0
- package/dist/esm/api/resources/chargerDeployments/client/Client.mjs +611 -0
- package/dist/esm/api/resources/chargerDeployments/client/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerDeployments/client/index.mjs +1 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/DeleteChargerRequest.d.mts +10 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/DeleteChargerRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/GetChargerRequest.d.mts +10 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/GetChargerRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/ListChargersRequest.d.mts +12 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/ListChargersRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/ResetChargerRuntimeRequest.d.mts +15 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/ResetChargerRuntimeRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/StartChargerRuntimeRequest.d.mts +15 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/StartChargerRuntimeRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/StopChargerRuntimeRequest.d.mts +15 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/StopChargerRuntimeRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/UpdateChargerRequest.d.mts +26 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/UpdateChargerRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/index.d.mts +7 -0
- package/dist/esm/api/resources/chargerDeployments/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/chargerDeployments/exports.d.mts +2 -0
- package/dist/esm/api/resources/chargerDeployments/exports.mjs +3 -0
- package/dist/esm/api/resources/chargerDeployments/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerDeployments/index.mjs +1 -0
- package/dist/esm/api/resources/chargerFaults/client/Client.d.mts +55 -0
- package/dist/esm/api/resources/chargerFaults/client/Client.mjs +164 -0
- package/dist/esm/api/resources/chargerFaults/client/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerFaults/client/index.mjs +1 -0
- package/dist/esm/api/resources/chargerFaults/client/requests/ClearFaultRequest.d.mts +14 -0
- package/dist/esm/api/resources/chargerFaults/client/requests/ClearFaultRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerFaults/client/requests/InjectFaultRequest.d.mts +17 -0
- package/dist/esm/api/resources/chargerFaults/client/requests/InjectFaultRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerFaults/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/chargerFaults/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/chargerFaults/exports.d.mts +2 -0
- package/dist/esm/api/resources/chargerFaults/exports.mjs +3 -0
- package/dist/esm/api/resources/chargerFaults/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerFaults/index.mjs +1 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/Client.d.mts +82 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/Client.mjs +251 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/index.mjs +1 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/requests/DeleteLocalListRequest.d.mts +10 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/requests/DeleteLocalListRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/requests/GetLocalAuthListRequest.d.mts +14 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/requests/GetLocalAuthListRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/requests/LocalAuthListUpdateRequest.d.mts +21 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/requests/LocalAuthListUpdateRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/exports.d.mts +2 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/exports.mjs +3 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerLocalAuthorization/index.mjs +1 -0
- package/dist/esm/api/resources/chargerLogs/client/Client.d.mts +34 -0
- package/dist/esm/api/resources/chargerLogs/client/Client.mjs +93 -0
- package/dist/esm/api/resources/chargerLogs/client/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerLogs/client/index.mjs +1 -0
- package/dist/esm/api/resources/chargerLogs/client/requests/ListChargerLogsRequest.d.mts +20 -0
- package/dist/esm/api/resources/chargerLogs/client/requests/ListChargerLogsRequest.mjs +2 -0
- package/dist/esm/api/resources/chargerLogs/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerLogs/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/chargerLogs/exports.d.mts +2 -0
- package/dist/esm/api/resources/chargerLogs/exports.mjs +3 -0
- package/dist/esm/api/resources/chargerLogs/index.d.mts +1 -0
- package/dist/esm/api/resources/chargerLogs/index.mjs +1 -0
- package/dist/esm/api/resources/health/client/Client.d.mts +31 -0
- package/dist/esm/api/resources/health/client/Client.mjs +78 -0
- package/dist/esm/api/resources/health/client/index.d.mts +1 -0
- package/dist/esm/api/resources/health/client/index.mjs +1 -0
- package/dist/esm/api/resources/health/exports.d.mts +2 -0
- package/dist/esm/api/resources/health/exports.mjs +3 -0
- package/dist/esm/api/resources/health/index.d.mts +1 -0
- package/dist/esm/api/resources/health/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +23 -0
- package/dist/esm/api/resources/index.mjs +23 -0
- package/dist/esm/api/resources/locationChargerCommands/client/Client.d.mts +343 -0
- package/dist/esm/api/resources/locationChargerCommands/client/Client.mjs +923 -0
- package/dist/esm/api/resources/locationChargerCommands/client/index.d.mts +1 -0
- package/dist/esm/api/resources/locationChargerCommands/client/index.mjs +1 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationAuthorizeIdTagRequest.d.mts +20 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationAuthorizeIdTagRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationAutoStartTransactionRequest.d.mts +23 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationAutoStartTransactionRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationAutoStopTransactionRequest.d.mts +20 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationAutoStopTransactionRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationEvRequestsEnergyRequest.d.mts +23 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationEvRequestsEnergyRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationEvStopsEnergyRequest.d.mts +23 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationEvStopsEnergyRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationPlugConnectorRequest.d.mts +23 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationPlugConnectorRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationPowerUpdateRequest.d.mts +26 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationPowerUpdateRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationStartTransactionRequest.d.mts +26 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationStartTransactionRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationStopTransactionRequest.d.mts +19 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationStopTransactionRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationUnlockConnectorRequest.d.mts +23 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationUnlockConnectorRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationUnplugConnectorRequest.d.mts +23 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/LocationUnplugConnectorRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/index.d.mts +11 -0
- package/dist/esm/api/resources/locationChargerCommands/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/locationChargerCommands/exports.d.mts +2 -0
- package/dist/esm/api/resources/locationChargerCommands/exports.mjs +3 -0
- package/dist/esm/api/resources/locationChargerCommands/index.d.mts +1 -0
- package/dist/esm/api/resources/locationChargerCommands/index.mjs +1 -0
- package/dist/esm/api/resources/locationChargerFaults/client/Client.d.mts +78 -0
- package/dist/esm/api/resources/locationChargerFaults/client/Client.mjs +199 -0
- package/dist/esm/api/resources/locationChargerFaults/client/index.d.mts +1 -0
- package/dist/esm/api/resources/locationChargerFaults/client/index.mjs +1 -0
- package/dist/esm/api/resources/locationChargerFaults/client/requests/LocationClearFaultRequest.d.mts +23 -0
- package/dist/esm/api/resources/locationChargerFaults/client/requests/LocationClearFaultRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerFaults/client/requests/LocationInjectFaultRequest.d.mts +26 -0
- package/dist/esm/api/resources/locationChargerFaults/client/requests/LocationInjectFaultRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerFaults/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/locationChargerFaults/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/locationChargerFaults/exports.d.mts +2 -0
- package/dist/esm/api/resources/locationChargerFaults/exports.mjs +3 -0
- package/dist/esm/api/resources/locationChargerFaults/index.d.mts +1 -0
- package/dist/esm/api/resources/locationChargerFaults/index.mjs +1 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/Client.d.mts +207 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/Client.mjs +589 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/index.d.mts +1 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/index.mjs +1 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/CreateLocationChargersRequest.d.mts +30 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/CreateLocationChargersRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/DeleteLocationChargersRequest.d.mts +13 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/DeleteLocationChargersRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/ListLocationChargersRequest.d.mts +16 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/ListLocationChargersRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/ResetLocationChargerRuntimesRequest.d.mts +21 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/ResetLocationChargerRuntimesRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/StartLocationChargerRuntimesRequest.d.mts +21 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/StartLocationChargerRuntimesRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/StopLocationChargerRuntimesRequest.d.mts +21 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/StopLocationChargerRuntimesRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/UpdateLocationChargersRequest.d.mts +22 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/UpdateLocationChargersRequest.mjs +2 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/index.d.mts +7 -0
- package/dist/esm/api/resources/locationChargerProvisioning/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/locationChargerProvisioning/exports.d.mts +2 -0
- package/dist/esm/api/resources/locationChargerProvisioning/exports.mjs +3 -0
- package/dist/esm/api/resources/locationChargerProvisioning/index.d.mts +1 -0
- package/dist/esm/api/resources/locationChargerProvisioning/index.mjs +1 -0
- package/dist/esm/api/resources/locations/client/Client.d.mts +143 -0
- package/dist/esm/api/resources/locations/client/Client.mjs +401 -0
- package/dist/esm/api/resources/locations/client/index.d.mts +1 -0
- package/dist/esm/api/resources/locations/client/index.mjs +1 -0
- package/dist/esm/api/resources/locations/client/requests/CreateLocationRequest.d.mts +46 -0
- package/dist/esm/api/resources/locations/client/requests/CreateLocationRequest.mjs +2 -0
- package/dist/esm/api/resources/locations/client/requests/DeleteLocationRequest.d.mts +10 -0
- package/dist/esm/api/resources/locations/client/requests/DeleteLocationRequest.mjs +2 -0
- package/dist/esm/api/resources/locations/client/requests/GetLocationRequest.d.mts +10 -0
- package/dist/esm/api/resources/locations/client/requests/GetLocationRequest.mjs +2 -0
- package/dist/esm/api/resources/locations/client/requests/ListLocationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/locations/client/requests/ListLocationsRequest.mjs +2 -0
- package/dist/esm/api/resources/locations/client/requests/UpdateLocationRequest.d.mts +30 -0
- package/dist/esm/api/resources/locations/client/requests/UpdateLocationRequest.mjs +2 -0
- package/dist/esm/api/resources/locations/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/locations/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/locations/exports.d.mts +2 -0
- package/dist/esm/api/resources/locations/exports.mjs +3 -0
- package/dist/esm/api/resources/locations/index.d.mts +1 -0
- package/dist/esm/api/resources/locations/index.mjs +1 -0
- package/dist/esm/api/types/BrandListResponse.d.mts +10 -0
- package/dist/esm/api/types/BrandListResponse.mjs +2 -0
- package/dist/esm/api/types/BrandResponse.d.mts +10 -0
- package/dist/esm/api/types/BrandResponse.mjs +2 -0
- package/dist/esm/api/types/CacheResetResponse.d.mts +7 -0
- package/dist/esm/api/types/CacheResetResponse.mjs +2 -0
- package/dist/esm/api/types/ChargerLifecycleRequest.d.mts +4 -0
- package/dist/esm/api/types/ChargerLifecycleRequest.mjs +2 -0
- package/dist/esm/api/types/ChargerListResponse.d.mts +10 -0
- package/dist/esm/api/types/ChargerListResponse.mjs +2 -0
- package/dist/esm/api/types/ChargerLogEntry.d.mts +9 -0
- package/dist/esm/api/types/ChargerLogEntry.mjs +2 -0
- package/dist/esm/api/types/ChargerLogListResponse.d.mts +10 -0
- package/dist/esm/api/types/ChargerLogListResponse.mjs +2 -0
- package/dist/esm/api/types/ChargerResponse.d.mts +18 -0
- package/dist/esm/api/types/ChargerResponse.mjs +2 -0
- package/dist/esm/api/types/ConfigurationChangeResponse.d.mts +8 -0
- package/dist/esm/api/types/ConfigurationChangeResponse.mjs +2 -0
- package/dist/esm/api/types/ConfigurationEntry.d.mts +7 -0
- package/dist/esm/api/types/ConfigurationEntry.mjs +2 -0
- package/dist/esm/api/types/ConfigurationResponse.d.mts +7 -0
- package/dist/esm/api/types/ConfigurationResponse.mjs +2 -0
- package/dist/esm/api/types/ConfigurationUpdateRequest.d.mts +4 -0
- package/dist/esm/api/types/ConfigurationUpdateRequest.mjs +2 -0
- package/dist/esm/api/types/ConnectorSelectionRequest.d.mts +9 -0
- package/dist/esm/api/types/ConnectorSelectionRequest.mjs +2 -0
- package/dist/esm/api/types/Coordinates.d.mts +9 -0
- package/dist/esm/api/types/Coordinates.mjs +2 -0
- package/dist/esm/api/types/CreateChargerRequest.d.mts +19 -0
- package/dist/esm/api/types/CreateChargerRequest.mjs +2 -0
- package/dist/esm/api/types/CreateLocationChargersResponse.d.mts +10 -0
- package/dist/esm/api/types/CreateLocationChargersResponse.mjs +2 -0
- package/dist/esm/api/types/DeleteLocationChargersResponse.d.mts +10 -0
- package/dist/esm/api/types/DeleteLocationChargersResponse.mjs +2 -0
- package/dist/esm/api/types/FaultOperationResponse.d.mts +10 -0
- package/dist/esm/api/types/FaultOperationResponse.mjs +2 -0
- package/dist/esm/api/types/HttpErrorResponse.d.mts +7 -0
- package/dist/esm/api/types/HttpErrorResponse.mjs +2 -0
- package/dist/esm/api/types/HttpValidationError.d.mts +4 -0
- package/dist/esm/api/types/HttpValidationError.mjs +2 -0
- package/dist/esm/api/types/LocalAuthListEntry.d.mts +8 -0
- package/dist/esm/api/types/LocalAuthListEntry.mjs +2 -0
- package/dist/esm/api/types/LocalAuthorizationListResponse.d.mts +10 -0
- package/dist/esm/api/types/LocalAuthorizationListResponse.mjs +2 -0
- package/dist/esm/api/types/LocalListMutationResponse.d.mts +10 -0
- package/dist/esm/api/types/LocalListMutationResponse.mjs +2 -0
- package/dist/esm/api/types/LocationCommandFailure.d.mts +7 -0
- package/dist/esm/api/types/LocationCommandFailure.mjs +2 -0
- package/dist/esm/api/types/LocationCommandResponse.d.mts +11 -0
- package/dist/esm/api/types/LocationCommandResponse.mjs +2 -0
- package/dist/esm/api/types/LocationCreateChargerFailure.d.mts +7 -0
- package/dist/esm/api/types/LocationCreateChargerFailure.mjs +2 -0
- package/dist/esm/api/types/LocationDeleteChargerFailure.d.mts +7 -0
- package/dist/esm/api/types/LocationDeleteChargerFailure.mjs +2 -0
- package/dist/esm/api/types/LocationFaultResponse.d.mts +11 -0
- package/dist/esm/api/types/LocationFaultResponse.mjs +2 -0
- package/dist/esm/api/types/LocationFaultResult.d.mts +9 -0
- package/dist/esm/api/types/LocationFaultResult.mjs +2 -0
- package/dist/esm/api/types/LocationLifecycleRequest.d.mts +8 -0
- package/dist/esm/api/types/LocationLifecycleRequest.mjs +2 -0
- package/dist/esm/api/types/LocationListResponse.d.mts +10 -0
- package/dist/esm/api/types/LocationListResponse.mjs +2 -0
- package/dist/esm/api/types/LocationQueuedCommandResult.d.mts +9 -0
- package/dist/esm/api/types/LocationQueuedCommandResult.mjs +2 -0
- package/dist/esm/api/types/LocationResponse.d.mts +22 -0
- package/dist/esm/api/types/LocationResponse.mjs +2 -0
- package/dist/esm/api/types/LocationUpdateChargerFailure.d.mts +7 -0
- package/dist/esm/api/types/LocationUpdateChargerFailure.mjs +2 -0
- package/dist/esm/api/types/ModelListResponse.d.mts +10 -0
- package/dist/esm/api/types/ModelListResponse.mjs +2 -0
- package/dist/esm/api/types/ModelResponse.d.mts +16 -0
- package/dist/esm/api/types/ModelResponse.mjs +2 -0
- package/dist/esm/api/types/ProxyAction.d.mts +21 -0
- package/dist/esm/api/types/ProxyAction.mjs +21 -0
- package/dist/esm/api/types/ProxyOcppVersion.d.mts +5 -0
- package/dist/esm/api/types/ProxyOcppVersion.mjs +5 -0
- package/dist/esm/api/types/QueuedCommandResponse.d.mts +10 -0
- package/dist/esm/api/types/QueuedCommandResponse.mjs +2 -0
- package/dist/esm/api/types/UpdateLocationChargerItem.d.mts +15 -0
- package/dist/esm/api/types/UpdateLocationChargerItem.mjs +2 -0
- package/dist/esm/api/types/UpdateLocationChargersResponse.d.mts +10 -0
- package/dist/esm/api/types/UpdateLocationChargersResponse.mjs +2 -0
- package/dist/esm/api/types/ValidationError.d.mts +13 -0
- package/dist/esm/api/types/ValidationError.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +42 -0
- package/dist/esm/api/types/index.mjs +42 -0
- package/dist/esm/auth/BearerAuthProvider.d.mts +20 -0
- package/dist/esm/auth/BearerAuthProvider.mjs +42 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +30 -0
- package/dist/esm/core/auth/BearerToken.d.mts +7 -0
- package/dist/esm/core/auth/BearerToken.mjs +13 -0
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +5 -0
- package/dist/esm/core/auth/index.mjs +3 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +19 -0
- package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
- package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
- package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +50 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +322 -0
- package/dist/esm/core/fetcher/Headers.d.mts +2 -0
- package/dist/esm/core/fetcher/Headers.mjs +82 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
- package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
- package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
- package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
- package/dist/esm/core/fetcher/Supplier.mjs +19 -0
- package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
- package/dist/esm/core/fetcher/createRequestUrl.mjs +5 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +42 -0
- package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -0
- package/dist/esm/core/fetcher/getFetchFn.mjs +14 -0
- package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
- package/dist/esm/core/fetcher/getHeader.mjs +8 -0
- package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
- package/dist/esm/core/fetcher/getRequestBody.mjs +24 -0
- package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +66 -0
- package/dist/esm/core/fetcher/index.d.mts +13 -0
- package/dist/esm/core/fetcher/index.mjs +7 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +6 -0
- package/dist/esm/core/fetcher/makeRequest.mjs +55 -0
- package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
- package/dist/esm/core/fetcher/requestWithRetries.mjs +64 -0
- package/dist/esm/core/fetcher/signals.d.mts +5 -0
- package/dist/esm/core/fetcher/signals.mjs +20 -0
- package/dist/esm/core/headers.d.mts +2 -0
- package/dist/esm/core/headers.mjs +27 -0
- package/dist/esm/core/index.d.mts +6 -0
- package/dist/esm/core/index.mjs +6 -0
- package/dist/esm/core/json.d.mts +15 -0
- package/dist/esm/core/json.mjs +19 -0
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/runtime/index.d.mts +1 -0
- package/dist/esm/core/runtime/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.d.mts +9 -0
- package/dist/esm/core/runtime/runtime.mjs +101 -0
- package/dist/esm/core/url/encodePathParam.d.mts +1 -0
- package/dist/esm/core/url/encodePathParam.mjs +18 -0
- package/dist/esm/core/url/index.d.mts +3 -0
- package/dist/esm/core/url/index.mjs +3 -0
- package/dist/esm/core/url/join.d.mts +1 -0
- package/dist/esm/core/url/join.mjs +65 -0
- package/dist/esm/core/url/qs.d.mts +6 -0
- package/dist/esm/core/url/qs.mjs +61 -0
- package/dist/esm/errors/OcpplabError.d.mts +14 -0
- package/dist/esm/errors/OcpplabError.mjs +31 -0
- package/dist/esm/errors/OcpplabTimeoutError.d.mts +6 -0
- package/dist/esm/errors/OcpplabTimeoutError.mjs +14 -0
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +32 -0
- package/dist/esm/errors/index.d.mts +2 -0
- package/dist/esm/errors/index.mjs +2 -0
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +5 -0
- package/dist/esm/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -0
- package/dist/esm/version.mjs +1 -0
- package/package.json +201 -0
- package/reference.md +3970 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { toJson } from "../json.mjs";
|
|
11
|
+
import { createLogger } from "../logging/logger.mjs";
|
|
12
|
+
import { createRequestUrl } from "./createRequestUrl.mjs";
|
|
13
|
+
import { EndpointSupplier } from "./EndpointSupplier.mjs";
|
|
14
|
+
import { getErrorResponseBody } from "./getErrorResponseBody.mjs";
|
|
15
|
+
import { getFetchFn } from "./getFetchFn.mjs";
|
|
16
|
+
import { getRequestBody } from "./getRequestBody.mjs";
|
|
17
|
+
import { getResponseBody } from "./getResponseBody.mjs";
|
|
18
|
+
import { Headers } from "./Headers.mjs";
|
|
19
|
+
import { makeRequest } from "./makeRequest.mjs";
|
|
20
|
+
import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
21
|
+
import { requestWithRetries } from "./requestWithRetries.mjs";
|
|
22
|
+
const SENSITIVE_HEADERS = new Set([
|
|
23
|
+
"authorization",
|
|
24
|
+
"www-authenticate",
|
|
25
|
+
"x-api-key",
|
|
26
|
+
"api-key",
|
|
27
|
+
"apikey",
|
|
28
|
+
"x-api-token",
|
|
29
|
+
"x-auth-token",
|
|
30
|
+
"auth-token",
|
|
31
|
+
"cookie",
|
|
32
|
+
"set-cookie",
|
|
33
|
+
"proxy-authorization",
|
|
34
|
+
"proxy-authenticate",
|
|
35
|
+
"x-csrf-token",
|
|
36
|
+
"x-xsrf-token",
|
|
37
|
+
"x-session-token",
|
|
38
|
+
"x-access-token",
|
|
39
|
+
]);
|
|
40
|
+
function redactHeaders(headers) {
|
|
41
|
+
const filtered = {};
|
|
42
|
+
for (const [key, value] of headers instanceof Headers ? headers.entries() : Object.entries(headers)) {
|
|
43
|
+
if (SENSITIVE_HEADERS.has(key.toLowerCase())) {
|
|
44
|
+
filtered[key] = "[REDACTED]";
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
filtered[key] = value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return filtered;
|
|
51
|
+
}
|
|
52
|
+
const SENSITIVE_QUERY_PARAMS = new Set([
|
|
53
|
+
"api_key",
|
|
54
|
+
"api-key",
|
|
55
|
+
"apikey",
|
|
56
|
+
"token",
|
|
57
|
+
"access_token",
|
|
58
|
+
"access-token",
|
|
59
|
+
"auth_token",
|
|
60
|
+
"auth-token",
|
|
61
|
+
"password",
|
|
62
|
+
"passwd",
|
|
63
|
+
"secret",
|
|
64
|
+
"api_secret",
|
|
65
|
+
"api-secret",
|
|
66
|
+
"apisecret",
|
|
67
|
+
"key",
|
|
68
|
+
"session",
|
|
69
|
+
"session_id",
|
|
70
|
+
"session-id",
|
|
71
|
+
]);
|
|
72
|
+
function redactQueryParameters(queryParameters) {
|
|
73
|
+
if (queryParameters == null) {
|
|
74
|
+
return queryParameters;
|
|
75
|
+
}
|
|
76
|
+
const redacted = {};
|
|
77
|
+
for (const [key, value] of Object.entries(queryParameters)) {
|
|
78
|
+
if (SENSITIVE_QUERY_PARAMS.has(key.toLowerCase())) {
|
|
79
|
+
redacted[key] = "[REDACTED]";
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
redacted[key] = value;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return redacted;
|
|
86
|
+
}
|
|
87
|
+
function redactUrl(url) {
|
|
88
|
+
const protocolIndex = url.indexOf("://");
|
|
89
|
+
if (protocolIndex === -1)
|
|
90
|
+
return url;
|
|
91
|
+
const afterProtocol = protocolIndex + 3;
|
|
92
|
+
// Find the first delimiter that marks the end of the authority section
|
|
93
|
+
const pathStart = url.indexOf("/", afterProtocol);
|
|
94
|
+
let queryStart = url.indexOf("?", afterProtocol);
|
|
95
|
+
let fragmentStart = url.indexOf("#", afterProtocol);
|
|
96
|
+
const firstDelimiter = Math.min(pathStart === -1 ? url.length : pathStart, queryStart === -1 ? url.length : queryStart, fragmentStart === -1 ? url.length : fragmentStart);
|
|
97
|
+
// Find the LAST @ before the delimiter (handles multiple @ in credentials)
|
|
98
|
+
let atIndex = -1;
|
|
99
|
+
for (let i = afterProtocol; i < firstDelimiter; i++) {
|
|
100
|
+
if (url[i] === "@") {
|
|
101
|
+
atIndex = i;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (atIndex !== -1) {
|
|
105
|
+
url = `${url.slice(0, afterProtocol)}[REDACTED]@${url.slice(atIndex + 1)}`;
|
|
106
|
+
}
|
|
107
|
+
// Recalculate queryStart since url might have changed
|
|
108
|
+
queryStart = url.indexOf("?");
|
|
109
|
+
if (queryStart === -1)
|
|
110
|
+
return url;
|
|
111
|
+
fragmentStart = url.indexOf("#", queryStart);
|
|
112
|
+
const queryEnd = fragmentStart !== -1 ? fragmentStart : url.length;
|
|
113
|
+
const queryString = url.slice(queryStart + 1, queryEnd);
|
|
114
|
+
if (queryString.length === 0)
|
|
115
|
+
return url;
|
|
116
|
+
// FAST PATH: Quick check if any sensitive keywords present
|
|
117
|
+
// Using indexOf is faster than regex for simple substring matching
|
|
118
|
+
const lower = queryString.toLowerCase();
|
|
119
|
+
const hasSensitive = lower.includes("token") ||
|
|
120
|
+
lower.includes("key") ||
|
|
121
|
+
lower.includes("password") ||
|
|
122
|
+
lower.includes("passwd") ||
|
|
123
|
+
lower.includes("secret") ||
|
|
124
|
+
lower.includes("session") ||
|
|
125
|
+
lower.includes("auth");
|
|
126
|
+
if (!hasSensitive) {
|
|
127
|
+
return url;
|
|
128
|
+
}
|
|
129
|
+
// SLOW PATH: Parse and redact
|
|
130
|
+
const redactedParams = [];
|
|
131
|
+
const params = queryString.split("&");
|
|
132
|
+
for (const param of params) {
|
|
133
|
+
const equalIndex = param.indexOf("=");
|
|
134
|
+
if (equalIndex === -1) {
|
|
135
|
+
redactedParams.push(param);
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
const key = param.slice(0, equalIndex);
|
|
139
|
+
let shouldRedact = SENSITIVE_QUERY_PARAMS.has(key.toLowerCase());
|
|
140
|
+
if (!shouldRedact && key.includes("%")) {
|
|
141
|
+
try {
|
|
142
|
+
const decodedKey = decodeURIComponent(key);
|
|
143
|
+
shouldRedact = SENSITIVE_QUERY_PARAMS.has(decodedKey.toLowerCase());
|
|
144
|
+
}
|
|
145
|
+
catch (_a) { }
|
|
146
|
+
}
|
|
147
|
+
redactedParams.push(shouldRedact ? `${key}=[REDACTED]` : param);
|
|
148
|
+
}
|
|
149
|
+
return url.slice(0, queryStart + 1) + redactedParams.join("&") + url.slice(queryEnd);
|
|
150
|
+
}
|
|
151
|
+
function getHeaders(args) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
var _a;
|
|
154
|
+
const newHeaders = new Headers();
|
|
155
|
+
newHeaders.set("Accept", args.responseType === "json"
|
|
156
|
+
? "application/json"
|
|
157
|
+
: args.responseType === "text"
|
|
158
|
+
? "text/plain"
|
|
159
|
+
: args.responseType === "sse"
|
|
160
|
+
? "text/event-stream"
|
|
161
|
+
: "*/*");
|
|
162
|
+
if (args.body !== undefined && args.contentType != null) {
|
|
163
|
+
newHeaders.set("Content-Type", args.contentType);
|
|
164
|
+
}
|
|
165
|
+
if (args.headers == null) {
|
|
166
|
+
return newHeaders;
|
|
167
|
+
}
|
|
168
|
+
for (const [key, value] of Object.entries(args.headers)) {
|
|
169
|
+
const result = yield EndpointSupplier.get(value, { endpointMetadata: (_a = args.endpointMetadata) !== null && _a !== void 0 ? _a : {} });
|
|
170
|
+
if (typeof result === "string") {
|
|
171
|
+
newHeaders.set(key, result);
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (result == null) {
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
newHeaders.set(key, `${result}`);
|
|
178
|
+
}
|
|
179
|
+
return newHeaders;
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
export function fetcherImpl(args) {
|
|
183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
184
|
+
var _a, _b, _c;
|
|
185
|
+
const url = createRequestUrl(args.url, args.queryParameters);
|
|
186
|
+
const requestBody = yield getRequestBody({
|
|
187
|
+
body: args.body,
|
|
188
|
+
type: (_a = args.requestType) !== null && _a !== void 0 ? _a : "other",
|
|
189
|
+
});
|
|
190
|
+
const fetchFn = (_b = args.fetchFn) !== null && _b !== void 0 ? _b : (yield getFetchFn());
|
|
191
|
+
const headers = yield getHeaders(args);
|
|
192
|
+
const logger = createLogger(args.logging);
|
|
193
|
+
if (logger.isDebug()) {
|
|
194
|
+
const metadata = {
|
|
195
|
+
method: args.method,
|
|
196
|
+
url: redactUrl(url),
|
|
197
|
+
headers: redactHeaders(headers),
|
|
198
|
+
queryParameters: redactQueryParameters(args.queryParameters),
|
|
199
|
+
hasBody: requestBody != null,
|
|
200
|
+
};
|
|
201
|
+
logger.debug("Making HTTP request", metadata);
|
|
202
|
+
}
|
|
203
|
+
try {
|
|
204
|
+
const response = yield requestWithRetries(() => __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
return makeRequest(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex, args.responseType === "streaming" || args.responseType === "sse");
|
|
206
|
+
}), args.maxRetries);
|
|
207
|
+
if (response.status >= 200 && response.status < 400) {
|
|
208
|
+
if (logger.isDebug()) {
|
|
209
|
+
const metadata = {
|
|
210
|
+
method: args.method,
|
|
211
|
+
url: redactUrl(url),
|
|
212
|
+
statusCode: response.status,
|
|
213
|
+
responseHeaders: redactHeaders(response.headers),
|
|
214
|
+
};
|
|
215
|
+
logger.debug("HTTP request succeeded", metadata);
|
|
216
|
+
}
|
|
217
|
+
const body = yield getResponseBody(response, args.responseType);
|
|
218
|
+
return {
|
|
219
|
+
ok: true,
|
|
220
|
+
body: body,
|
|
221
|
+
headers: response.headers,
|
|
222
|
+
rawResponse: toRawResponse(response),
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
if (logger.isError()) {
|
|
227
|
+
const metadata = {
|
|
228
|
+
method: args.method,
|
|
229
|
+
url: redactUrl(url),
|
|
230
|
+
statusCode: response.status,
|
|
231
|
+
responseHeaders: redactHeaders(Object.fromEntries(response.headers.entries())),
|
|
232
|
+
};
|
|
233
|
+
logger.error("HTTP request failed with error status", metadata);
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
ok: false,
|
|
237
|
+
error: {
|
|
238
|
+
reason: "status-code",
|
|
239
|
+
statusCode: response.status,
|
|
240
|
+
body: yield getErrorResponseBody(response),
|
|
241
|
+
},
|
|
242
|
+
rawResponse: toRawResponse(response),
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
catch (error) {
|
|
247
|
+
if ((_c = args.abortSignal) === null || _c === void 0 ? void 0 : _c.aborted) {
|
|
248
|
+
if (logger.isError()) {
|
|
249
|
+
const metadata = {
|
|
250
|
+
method: args.method,
|
|
251
|
+
url: redactUrl(url),
|
|
252
|
+
};
|
|
253
|
+
logger.error("HTTP request was aborted", metadata);
|
|
254
|
+
}
|
|
255
|
+
return {
|
|
256
|
+
ok: false,
|
|
257
|
+
error: {
|
|
258
|
+
reason: "unknown",
|
|
259
|
+
errorMessage: "The user aborted a request",
|
|
260
|
+
cause: error,
|
|
261
|
+
},
|
|
262
|
+
rawResponse: abortRawResponse,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
else if (error instanceof Error && error.name === "AbortError") {
|
|
266
|
+
if (logger.isError()) {
|
|
267
|
+
const metadata = {
|
|
268
|
+
method: args.method,
|
|
269
|
+
url: redactUrl(url),
|
|
270
|
+
timeoutMs: args.timeoutMs,
|
|
271
|
+
};
|
|
272
|
+
logger.error("HTTP request timed out", metadata);
|
|
273
|
+
}
|
|
274
|
+
return {
|
|
275
|
+
ok: false,
|
|
276
|
+
error: {
|
|
277
|
+
reason: "timeout",
|
|
278
|
+
cause: error,
|
|
279
|
+
},
|
|
280
|
+
rawResponse: abortRawResponse,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
else if (error instanceof Error) {
|
|
284
|
+
if (logger.isError()) {
|
|
285
|
+
const metadata = {
|
|
286
|
+
method: args.method,
|
|
287
|
+
url: redactUrl(url),
|
|
288
|
+
errorMessage: error.message,
|
|
289
|
+
};
|
|
290
|
+
logger.error("HTTP request failed with error", metadata);
|
|
291
|
+
}
|
|
292
|
+
return {
|
|
293
|
+
ok: false,
|
|
294
|
+
error: {
|
|
295
|
+
reason: "unknown",
|
|
296
|
+
errorMessage: error.message,
|
|
297
|
+
cause: error,
|
|
298
|
+
},
|
|
299
|
+
rawResponse: unknownRawResponse,
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
if (logger.isError()) {
|
|
303
|
+
const metadata = {
|
|
304
|
+
method: args.method,
|
|
305
|
+
url: redactUrl(url),
|
|
306
|
+
error: toJson(error),
|
|
307
|
+
};
|
|
308
|
+
logger.error("HTTP request failed with unknown error", metadata);
|
|
309
|
+
}
|
|
310
|
+
return {
|
|
311
|
+
ok: false,
|
|
312
|
+
error: {
|
|
313
|
+
reason: "unknown",
|
|
314
|
+
errorMessage: toJson(error),
|
|
315
|
+
cause: error,
|
|
316
|
+
},
|
|
317
|
+
rawResponse: unknownRawResponse,
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
export const fetcher = fetcherImpl;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
let Headers;
|
|
2
|
+
if (typeof globalThis.Headers !== "undefined") {
|
|
3
|
+
Headers = globalThis.Headers;
|
|
4
|
+
}
|
|
5
|
+
else {
|
|
6
|
+
Headers = class Headers {
|
|
7
|
+
constructor(init) {
|
|
8
|
+
this.headers = new Map();
|
|
9
|
+
if (init) {
|
|
10
|
+
if (init instanceof Headers) {
|
|
11
|
+
init.forEach((value, key) => this.append(key, value));
|
|
12
|
+
}
|
|
13
|
+
else if (Array.isArray(init)) {
|
|
14
|
+
for (const [key, value] of init) {
|
|
15
|
+
if (typeof key === "string" && typeof value === "string") {
|
|
16
|
+
this.append(key, value);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
throw new TypeError("Each header entry must be a [string, string] tuple");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
for (const [key, value] of Object.entries(init)) {
|
|
25
|
+
if (typeof value === "string") {
|
|
26
|
+
this.append(key, value);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
throw new TypeError("Header values must be strings");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
append(name, value) {
|
|
36
|
+
const key = name.toLowerCase();
|
|
37
|
+
const existing = this.headers.get(key) || [];
|
|
38
|
+
this.headers.set(key, [...existing, value]);
|
|
39
|
+
}
|
|
40
|
+
delete(name) {
|
|
41
|
+
const key = name.toLowerCase();
|
|
42
|
+
this.headers.delete(key);
|
|
43
|
+
}
|
|
44
|
+
get(name) {
|
|
45
|
+
const key = name.toLowerCase();
|
|
46
|
+
const values = this.headers.get(key);
|
|
47
|
+
return values ? values.join(", ") : null;
|
|
48
|
+
}
|
|
49
|
+
has(name) {
|
|
50
|
+
const key = name.toLowerCase();
|
|
51
|
+
return this.headers.has(key);
|
|
52
|
+
}
|
|
53
|
+
set(name, value) {
|
|
54
|
+
const key = name.toLowerCase();
|
|
55
|
+
this.headers.set(key, [value]);
|
|
56
|
+
}
|
|
57
|
+
forEach(callbackfn, thisArg) {
|
|
58
|
+
const boundCallback = thisArg ? callbackfn.bind(thisArg) : callbackfn;
|
|
59
|
+
this.headers.forEach((values, key) => boundCallback(values.join(", "), key, this));
|
|
60
|
+
}
|
|
61
|
+
getSetCookie() {
|
|
62
|
+
return this.headers.get("set-cookie") || [];
|
|
63
|
+
}
|
|
64
|
+
*entries() {
|
|
65
|
+
for (const [key, values] of this.headers.entries()) {
|
|
66
|
+
yield [key, values.join(", ")];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
*keys() {
|
|
70
|
+
yield* this.headers.keys();
|
|
71
|
+
}
|
|
72
|
+
*values() {
|
|
73
|
+
for (const values of this.headers.values()) {
|
|
74
|
+
yield values.join(", ");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
[Symbol.iterator]() {
|
|
78
|
+
return this.entries();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export { Headers };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { WithRawResponse } from "./RawResponse.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* A promise that returns the parsed response and lets you retrieve the raw response too.
|
|
4
|
+
*/
|
|
5
|
+
export declare class HttpResponsePromise<T> extends Promise<T> {
|
|
6
|
+
private innerPromise;
|
|
7
|
+
private unwrappedPromise;
|
|
8
|
+
private constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Creates an `HttpResponsePromise` from a function that returns a promise.
|
|
11
|
+
*
|
|
12
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
13
|
+
* @param args - Arguments to pass to the function.
|
|
14
|
+
* @returns An `HttpResponsePromise` instance.
|
|
15
|
+
*/
|
|
16
|
+
static fromFunction<F extends (...args: never[]) => Promise<WithRawResponse<T>>, T>(fn: F, ...args: Parameters<F>): HttpResponsePromise<T>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a function that returns an `HttpResponsePromise` from a function that returns a promise.
|
|
19
|
+
*
|
|
20
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
21
|
+
* @returns A function that returns an `HttpResponsePromise` instance.
|
|
22
|
+
*/
|
|
23
|
+
static interceptFunction<F extends (...args: never[]) => Promise<WithRawResponse<T>>, T = Awaited<ReturnType<F>>["data"]>(fn: F): (...args: Parameters<F>) => HttpResponsePromise<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Creates an `HttpResponsePromise` from an existing promise.
|
|
26
|
+
*
|
|
27
|
+
* @param promise - A promise resolving to a `WithRawResponse` object.
|
|
28
|
+
* @returns An `HttpResponsePromise` instance.
|
|
29
|
+
*/
|
|
30
|
+
static fromPromise<T>(promise: Promise<WithRawResponse<T>>): HttpResponsePromise<T>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates an `HttpResponsePromise` from an executor function.
|
|
33
|
+
*
|
|
34
|
+
* @param executor - A function that takes resolve and reject callbacks to create a promise.
|
|
35
|
+
* @returns An `HttpResponsePromise` instance.
|
|
36
|
+
*/
|
|
37
|
+
static fromExecutor<T>(executor: (resolve: (value: WithRawResponse<T>) => void, reject: (reason?: unknown) => void) => void): HttpResponsePromise<T>;
|
|
38
|
+
/**
|
|
39
|
+
* Creates an `HttpResponsePromise` from a resolved result.
|
|
40
|
+
*
|
|
41
|
+
* @param result - A `WithRawResponse` object to resolve immediately.
|
|
42
|
+
* @returns An `HttpResponsePromise` instance.
|
|
43
|
+
*/
|
|
44
|
+
static fromResult<T>(result: WithRawResponse<T>): HttpResponsePromise<T>;
|
|
45
|
+
private unwrap;
|
|
46
|
+
/** @inheritdoc */
|
|
47
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
48
|
+
/** @inheritdoc */
|
|
49
|
+
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
|
|
50
|
+
/** @inheritdoc */
|
|
51
|
+
finally(onfinally?: (() => void) | null): Promise<T>;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves the data and raw response.
|
|
54
|
+
*
|
|
55
|
+
* @returns A promise resolving to a `WithRawResponse` object.
|
|
56
|
+
*/
|
|
57
|
+
withRawResponse(): Promise<WithRawResponse<T>>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A promise that returns the parsed response and lets you retrieve the raw response too.
|
|
12
|
+
*/
|
|
13
|
+
export class HttpResponsePromise extends Promise {
|
|
14
|
+
constructor(promise) {
|
|
15
|
+
// Initialize with a no-op to avoid premature parsing
|
|
16
|
+
super((resolve) => {
|
|
17
|
+
resolve(undefined);
|
|
18
|
+
});
|
|
19
|
+
this.innerPromise = promise;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates an `HttpResponsePromise` from a function that returns a promise.
|
|
23
|
+
*
|
|
24
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
25
|
+
* @param args - Arguments to pass to the function.
|
|
26
|
+
* @returns An `HttpResponsePromise` instance.
|
|
27
|
+
*/
|
|
28
|
+
static fromFunction(fn, ...args) {
|
|
29
|
+
return new HttpResponsePromise(fn(...args));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates a function that returns an `HttpResponsePromise` from a function that returns a promise.
|
|
33
|
+
*
|
|
34
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
35
|
+
* @returns A function that returns an `HttpResponsePromise` instance.
|
|
36
|
+
*/
|
|
37
|
+
static interceptFunction(fn) {
|
|
38
|
+
return (...args) => {
|
|
39
|
+
return HttpResponsePromise.fromPromise(fn(...args));
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Creates an `HttpResponsePromise` from an existing promise.
|
|
44
|
+
*
|
|
45
|
+
* @param promise - A promise resolving to a `WithRawResponse` object.
|
|
46
|
+
* @returns An `HttpResponsePromise` instance.
|
|
47
|
+
*/
|
|
48
|
+
static fromPromise(promise) {
|
|
49
|
+
return new HttpResponsePromise(promise);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Creates an `HttpResponsePromise` from an executor function.
|
|
53
|
+
*
|
|
54
|
+
* @param executor - A function that takes resolve and reject callbacks to create a promise.
|
|
55
|
+
* @returns An `HttpResponsePromise` instance.
|
|
56
|
+
*/
|
|
57
|
+
static fromExecutor(executor) {
|
|
58
|
+
const promise = new Promise(executor);
|
|
59
|
+
return new HttpResponsePromise(promise);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Creates an `HttpResponsePromise` from a resolved result.
|
|
63
|
+
*
|
|
64
|
+
* @param result - A `WithRawResponse` object to resolve immediately.
|
|
65
|
+
* @returns An `HttpResponsePromise` instance.
|
|
66
|
+
*/
|
|
67
|
+
static fromResult(result) {
|
|
68
|
+
const promise = Promise.resolve(result);
|
|
69
|
+
return new HttpResponsePromise(promise);
|
|
70
|
+
}
|
|
71
|
+
unwrap() {
|
|
72
|
+
if (!this.unwrappedPromise) {
|
|
73
|
+
this.unwrappedPromise = this.innerPromise.then(({ data }) => data);
|
|
74
|
+
}
|
|
75
|
+
return this.unwrappedPromise;
|
|
76
|
+
}
|
|
77
|
+
/** @inheritdoc */
|
|
78
|
+
then(onfulfilled, onrejected) {
|
|
79
|
+
return this.unwrap().then(onfulfilled, onrejected);
|
|
80
|
+
}
|
|
81
|
+
/** @inheritdoc */
|
|
82
|
+
catch(onrejected) {
|
|
83
|
+
return this.unwrap().catch(onrejected);
|
|
84
|
+
}
|
|
85
|
+
/** @inheritdoc */
|
|
86
|
+
finally(onfinally) {
|
|
87
|
+
return this.unwrap().finally(onfinally);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Retrieves the data and raw response.
|
|
91
|
+
*
|
|
92
|
+
* @returns A promise resolving to a `WithRawResponse` object.
|
|
93
|
+
*/
|
|
94
|
+
withRawResponse() {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
return yield this.innerPromise;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The raw response from the fetch call excluding the body.
|
|
3
|
+
*/
|
|
4
|
+
export type RawResponse = Omit<{
|
|
5
|
+
[K in keyof Response as Response[K] extends Function ? never : K]: Response[K];
|
|
6
|
+
}, "ok" | "body" | "bodyUsed">;
|
|
7
|
+
/**
|
|
8
|
+
* A raw response indicating that the request was aborted.
|
|
9
|
+
*/
|
|
10
|
+
export declare const abortRawResponse: RawResponse;
|
|
11
|
+
/**
|
|
12
|
+
* A raw response indicating an unknown error.
|
|
13
|
+
*/
|
|
14
|
+
export declare const unknownRawResponse: RawResponse;
|
|
15
|
+
/**
|
|
16
|
+
* Converts a `RawResponse` object into a `RawResponse` by extracting its properties,
|
|
17
|
+
* excluding the `body` and `bodyUsed` fields.
|
|
18
|
+
*
|
|
19
|
+
* @param response - The `RawResponse` object to convert.
|
|
20
|
+
* @returns A `RawResponse` object containing the extracted properties of the input response.
|
|
21
|
+
*/
|
|
22
|
+
export declare function toRawResponse(response: Response): RawResponse;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a `RawResponse` from a standard `Response` object.
|
|
25
|
+
*/
|
|
26
|
+
export interface WithRawResponse<T> {
|
|
27
|
+
readonly data: T;
|
|
28
|
+
readonly rawResponse: RawResponse;
|
|
29
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Headers } from "./Headers.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* A raw response indicating that the request was aborted.
|
|
4
|
+
*/
|
|
5
|
+
export const abortRawResponse = {
|
|
6
|
+
headers: new Headers(),
|
|
7
|
+
redirected: false,
|
|
8
|
+
status: 499,
|
|
9
|
+
statusText: "Client Closed Request",
|
|
10
|
+
type: "error",
|
|
11
|
+
url: "",
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A raw response indicating an unknown error.
|
|
15
|
+
*/
|
|
16
|
+
export const unknownRawResponse = {
|
|
17
|
+
headers: new Headers(),
|
|
18
|
+
redirected: false,
|
|
19
|
+
status: 0,
|
|
20
|
+
statusText: "Unknown Error",
|
|
21
|
+
type: "error",
|
|
22
|
+
url: "",
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Converts a `RawResponse` object into a `RawResponse` by extracting its properties,
|
|
26
|
+
* excluding the `body` and `bodyUsed` fields.
|
|
27
|
+
*
|
|
28
|
+
* @param response - The `RawResponse` object to convert.
|
|
29
|
+
* @returns A `RawResponse` object containing the extracted properties of the input response.
|
|
30
|
+
*/
|
|
31
|
+
export function toRawResponse(response) {
|
|
32
|
+
return {
|
|
33
|
+
headers: response.headers,
|
|
34
|
+
redirected: response.redirected,
|
|
35
|
+
status: response.status,
|
|
36
|
+
statusText: response.statusText,
|
|
37
|
+
type: response.type,
|
|
38
|
+
url: response.url,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export const Supplier = {
|
|
11
|
+
get: (supplier) => __awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
+
if (typeof supplier === "function") {
|
|
13
|
+
return supplier();
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return supplier;
|
|
17
|
+
}
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createRequestUrl(baseUrl: string, queryParameters?: Record<string, unknown>): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getErrorResponseBody(response: Response): Promise<unknown>;
|