Skip to main content

@hiven-energy/hiven-client

Enumerations

Interfaces

Type Aliases

ChargerPreferences

Ƭ ChargerPreferences: Object

Type declaration

NameType
associatedDeviceId?string
chargingBehavior?ChargerChargingBehavior
locationId?string
minimalSoC?SoC<PERCENT>
minimumEnergyTransfer?EnergyTransfer<KWH>
readyTime?Time
spotPriceAreaId?SpotPriceArea
targetEnergyTransfer?EnergyTransfer<KWH>
targetSoC?SoC<PERCENT>
weekDaySpecificReadyTimes?Record<Day, Time> | Record<string, unknown>

Defined in

core/Charger/types.ts:101


ChargerStatus

Ƭ ChargerStatus: { errorCode: string ; firmwareVersion: string ; heartbeatTimestamp: string ; statusTimestamp: string ; vendorErrorCode: string ; vendorId: string } & { measurement: ChargerMeasurement ; status: CHARGING } | { measurement: null ; status: Exclude<ChargerChargingStatus, CHARGING> }

Defined in

core/Charger/types.ts:45


ChargingSession

Ƭ ChargingSession: { createdAt: string ; hourlyCharges: Record<string, number> ; id: string ; readyTime: string ; spotPriceAreaId: SpotPriceArea ; timeZone: string } & { endDateTime: null ; status: ACTIVE } | { endDateTime: string ; status: Exclude<ChargingSessionStatus, ACTIVE> }

Defined in

core/Schedule/types.ts:18


Client

Ƭ Client: ReturnType<typeof createClient>

Defined in

main/client.ts:11


Day

Ƭ Day: typeof days[number]

Defined in

core/types.ts:24


Device

Ƭ Device: Charger | Vehicle

Defined in

core/Devices/types.ts:4


EnodeEnvironment

Ƭ EnodeEnvironment: "PRODUCTION" | "SANDBOX"

Defined in

core/Vehicle/types.ts:54


RegisterChargerPayload

Ƭ RegisterChargerPayload: RegisterChargerManuallyPayload | RegisterChargerAutomaticallyPayload

Defined in

core/Charger/types.ts:82


SetUserLocationPayload

Ƭ SetUserLocationPayload: Omit<UserLocation, "id" | "spotPriceAreaId">

Defined in

core/Users/types.ts:18


SmartcarVehicleAuthorizationMode

Ƭ SmartcarVehicleAuthorizationMode: "live" | "test" | "simulated"

Defined in

core/Vehicle/types.ts:72


SoC

Ƭ SoC<T>: Object

Type parameters

Name
T

Type declaration

NameType
unitT
valuenumber

Defined in

core/types.ts:31


SteveUrl

Ƭ SteveUrl: Object

Type declaration

NameType
urlstring

Defined in

core/Charger/types.ts:97


TariffInfo

Ƭ TariffInfo: Partial<{ electricalUtilityProvider: string ; meterId: string ; tariff: string }>

Defined in

core/Users/types.ts:22


Time

Ƭ Time: `${number}:${number}`

Defined in

core/types.ts:12


UpdateUserLocationPayload

Ƭ UpdateUserLocationPayload: Partial<SetUserLocationPayload>

Defined in

core/Users/types.ts:20


VehicleCapability

Ƭ VehicleCapability: "READ_LOCATION" | "EXECUTE_START_AND_STOP" | "READ_BATTERY_CAPACITY"

Defined in

core/Vehicle/types.ts:146


VehicleType

Ƭ VehicleType: "BEV" | "PHEV"

Defined in

core/Vehicle/types.ts:151

Variables

days

Const days: readonly ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]

Defined in

core/types.ts:14

Functions

createClient

createClient(«destructured»): Object

Parameters

NameType
«destructured»ClientConfiguration

Returns

Object

NameType
deleteDevice(deviceId: string, options?: Options) => Promise<string>
deleteUserLocation(userId: string, locationId: string, options?: Options) => Promise<string>
getChargerPreferences(deviceId: string, options?: Options) => Promise<ChargerPreferences>
getChargerStatus(deviceId: string, options?: Options) => Promise<ChargerStatus>
getChargingSchedule(deviceId: string, options?: Options) => Promise<ChargingSchedule>
getChargingSessionHistory(deviceId: string, options?: Options) => Promise<ChargingSession[]>
getDeviceDetails(deviceId: string, options?: Options) => Promise<Device>
getDeviceStatus(deviceId: string, options?: Options) => Promise<GetDeviceStatusResult>
getDevicesList(userId: string, options?: Options) => Promise<Device[]>
getElectricalUtilityProviders(options?: Options) => Promise<string[]>
getEnodeAuthorizationUrl(vendor: VehicleManufacturer, redirectUri: string, environment?: EnodeEnvironment, options?: Options) => Promise<EnodeVehicleAuthorizationUrl>
getEnodeVehicleVendors(environment?: EnodeEnvironment, options?: Options) => Promise<EnodeVehicleVendor[]>
getSmartcarAuthorizationUrl(manufacturer: VehicleManufacturer, redirectUri: string, countryCode: string, mode?: SmartcarVehicleAuthorizationMode, options?: Options) => Promise<SmartcarVehicleAuthorizationUrl>
getSpotPriceAreaId(countryCode: string, postalCode: string, options?: Options) => Promise<SpotPriceArea>
getSpotPrices(areaId: SpotPriceArea, startDateTime?: string, endDateTime?: string, options?: Options) => Promise<Record<string, number>>
getSteveUrl(options?: Options) => Promise<SteveUrl>
getSupportedCountries(options?: Options) => Promise<string[]>
getSupportedVehicleBrands(options?: Options) => Promise<string[]>
getUserLocations(userId: string, options?: Options) => Promise<UserLocation[]>
getVehicleCapabilities(deviceId: string, forceRefresh: boolean, options?: Options) => Promise<VehicleCapability[]>
getVehiclePreferences(deviceId: string, options?: Options) => Promise<VehiclePreferences>
getVehicleStatus(deviceId: string, options?: Options) => Promise<VehicleStatus>
getVehiclesWithCapabilities(supporting?: VehicleCapability[], notSupporting?: VehicleCapability[], options?: Options) => Promise<VehicleWithCapabilities[]>
getWallboxChargers(options?: Options) => Promise<WallboxCharger[]>
registerCharger(payload: RegisterChargerPayload, options?: Options) => Promise<string>
registerSmartcarVehicle(authCode: string, redirectUrl: string, options?: Options) => Promise<RegisterSmartcarVehicleResponse>
registerWallboxAccount(username: string, password: string, options?: Options) => Promise<string>
setChargerPreferences(preferences: ChargerPreferences, deviceId: string, options?: Options) => Promise<string>
setTariffInfo(userId: string, locationId: string, payload: Partial<{ electricalUtilityProvider: string ; meterId: string ; tariff: string }>, options?: Options) => Promise<UserLocation>
setUserLocation(userId: string, payload: SetUserLocationPayload, options?: Options) => Promise<UserLocation>
setVehiclePreferences(deviceId: string, preferences: VehiclePreferences, options?: Options) => Promise<string>
signOut(userId: string, options?: Options) => Promise<string>
startImmediateCharging(deviceId: string, options?: Options) => Promise<string>
stopImmediateCharging(deviceId: string, options?: Options) => Promise<string>
updateUserLocation(userId: string, locationId: string, payload: Partial<SetUserLocationPayload>, options?: Options) => Promise<UserLocation>

Defined in

main/client.ts:18