heatzy-api 4.15.0
Install from the command line:
Learn more about npm packages
$ npm install @olivierzal/heatzy-api@4.15.0
Install via package.json:
"@olivierzal/heatzy-api": "4.15.0"
About this version
Enumeration Member | Value | Defined in |
---|---|---|
boost |
2 |
src/enums.ts:2 |
off |
0 |
src/enums.ts:3 |
presence |
3 |
src/enums.ts:6 |
vacation |
1 |
src/enums.ts:4 |
Enumeration Member | Value | Defined in |
---|---|---|
cft |
"cft" |
src/enums.ts:10 |
cft1 |
"cft1" |
src/enums.ts:15 |
cft2 |
"cft2" |
src/enums.ts:16 |
eco |
"eco" |
src/enums.ts:11 |
fro |
"fro" |
src/enums.ts:12 |
stop |
"stop" |
src/enums.ts:13 |
Enumeration Member | Value | Defined in |
---|---|---|
cft |
0 |
src/enums.ts:20 |
eco |
1 |
src/enums.ts:21 |
fro |
2 |
src/enums.ts:22 |
stop |
3 |
src/enums.ts:23 |
Enumeration Member | Value | Defined in |
---|---|---|
glow |
5 |
src/models/interfaces.ts:7 |
pro |
6 |
src/models/interfaces.ts:8 |
v1 |
1 |
src/models/interfaces.ts:9 |
v2 |
2 |
src/models/interfaces.ts:10 |
v4 |
4 |
src/models/interfaces.ts:11 |
Enumeration Member | Value | Defined in |
---|---|---|
off |
0 |
src/enums.ts:27 |
on |
1 |
src/enums.ts:28 |
Enumeration Member | Value | Defined in |
---|---|---|
minus5C |
0 |
src/enums.ts:32 |
noChange |
50 |
src/enums.ts:33 |
plus5C |
100 |
src/enums.ts:34 |
Property | Modifier | Type | Defined in |
---|---|---|---|
id |
readonly |
string |
src/models/device.ts:17 |
name |
readonly |
string |
src/models/device.ts:19 |
product |
readonly |
Product |
src/models/device.ts:21 |
productKey |
readonly |
string |
src/models/device.ts:23 |
productName |
readonly |
string |
src/models/device.ts:25 |
get data(): Attrs
IDeviceModel
.data
get derogationEndDate(): null | DateTime
null
| DateTime
IDeviceModel
.derogationEndDate
get previousMode(): PreviousMode
IDeviceModel
.previousMode
update(data: Partial<Attrs>): void
Parameter | Type |
---|---|
data |
Partial <Attrs > |
void
IDeviceModel
.update
static getAll(): DeviceModel[]
static getById(id: string): undefined | DeviceModel
Parameter | Type |
---|---|
id |
string |
undefined
| DeviceModel
static getByName(name: string): undefined | DeviceModel
Parameter | Type |
---|---|
name |
string |
undefined
| DeviceModel
static sync(devices: readonly Device[], data: Record<string, Attrs>): void
Parameter | Type |
---|---|
devices |
readonly Device [] |
data |
Record <string , Attrs > |
void
new FacadeManager(api: IAPI): FacadeManager
Parameter | Type |
---|---|
api |
IAPI |
Property | Modifier | Type | Defined in |
---|---|---|---|
api |
readonly |
IAPI |
src/facades/manager.ts:13 |
get(): null
null
IFacadeManager
.get
get(instance: IDeviceModel): IDeviceFacadeAny
Parameter | Type |
---|---|
instance |
IDeviceModel |
IFacadeManager.get
new HeatzyAPI(config: APIConfig): HeatzyAPI
Parameter | Type |
---|---|
config |
APIConfig |
Property | Modifier | Type | Defined in |
---|---|---|---|
onSync? |
readonly |
() => Promise <void > |
src/services/api.ts:69 |
settingManager? |
readonly |
SettingManager |
src/services/api.ts:71 |
authenticate(data?: LoginPostData): Promise<boolean>
Parameter | Type |
---|---|
data ? |
LoginPostData |
Promise
<boolean
>
IAPI
.authenticate
bindings(): Promise<{
data: Bindings;
}>
Promise
<{
data
: Bindings
;
}>
IAPI
.bindings
clearSync(): void
void
IAPI
.clearSync
control(__namedParameters: {
id: string;
postData: DevicePostDataAny;
}): Promise<{
data: Data;
}>
Parameter | Type |
---|---|
__namedParameters |
{ id : string ; postData : DevicePostDataAny ; } |
__namedParameters.id |
string |
__namedParameters.postData |
DevicePostDataAny |
Promise
<{
data
: Data
;
}>
IAPI
.control
deviceData(__namedParameters: {
id: string;
}): Promise<{
data: DeviceData;
}>
Parameter | Type |
---|---|
__namedParameters |
{ id : string ; } |
__namedParameters.id |
string |
Promise
<{
data
: DeviceData
;
}>
IAPI
.deviceData
fetch(): Promise<readonly Device[]>
Promise
<readonly Device
[]>
IAPI
.fetch
login(__namedParameters: {
postData: LoginPostData;
}): Promise<{
data: LoginData;
}>
Parameter | Type |
---|---|
__namedParameters |
{ postData : LoginPostData ; } |
__namedParameters.postData |
LoginPostData |
Promise
<{
data
: LoginData
;
}>
IAPI
.login
static create(config: APIConfig): Promise<HeatzyAPI>
Parameter | Type |
---|---|
config |
APIConfig |
Promise
<HeatzyAPI
>
-
Partial
<LoginPostData
>
Property | Modifier | Type | Inherited from | Defined in |
---|---|---|---|---|
autoSyncInterval? |
public |
null | number
|
- | src/services/interfaces.ts:29 |
language? |
public |
string |
- | src/services/interfaces.ts:30 |
logger? |
public |
Logger |
- | src/services/interfaces.ts:31 |
onSync? |
public |
OnSyncFunction |
- | src/services/interfaces.ts:32 |
password? |
readonly |
string |
Partial.password |
src/types.ts:55 |
settingManager? |
public |
SettingManager |
- | src/services/interfaces.ts:33 |
shouldVerifySSL? |
public |
boolean |
- | src/services/interfaces.ts:34 |
timezone? |
public |
string |
- | src/services/interfaces.ts:35 |
username? |
readonly |
string |
Partial.username |
src/types.ts:56 |
Property | Type | Defined in |
---|---|---|
expireAt? |
null | string
|
src/services/interfaces.ts:12 |
password? |
null | string
|
src/services/interfaces.ts:13 |
token? |
null | string
|
src/services/interfaces.ts:14 |
username? |
null | string
|
src/services/interfaces.ts:15 |
Property | Modifier | Type | Overrides | Inherited from | Defined in |
---|---|---|---|---|---|
cft_temp? |
readonly |
number |
- |
PostAttrs .cft_temp
|
src/types.ts:77 |
cft_tempH? |
readonly |
number |
- |
PostAttrs .cft_tempH
|
src/types.ts:70 |
cft_tempL? |
readonly |
number |
- |
PostAttrs .cft_tempL
|
src/types.ts:71 |
com_temp? |
readonly |
TemperatureCompensation |
- |
PostAttrs .com_temp
|
src/types.ts:68 |
cur_humi? |
readonly |
number |
- | - | src/types.ts:16 |
cur_mode? |
readonly |
Mode |
- | - | src/types.ts:17 |
cur_temp? |
readonly |
number |
- | - | src/types.ts:18 |
cur_tempH? |
readonly |
number |
- | - | src/types.ts:13 |
cur_tempL? |
readonly |
number |
- | - | src/types.ts:14 |
derog_mode? |
readonly |
DerogationMode |
- |
PostAttrs .derog_mode
|
src/types.ts:62 |
derog_time? |
readonly |
number |
- |
PostAttrs .derog_time
|
src/types.ts:63 |
eco_temp? |
readonly |
number |
- |
PostAttrs .eco_temp
|
src/types.ts:78 |
eco_tempH? |
readonly |
number |
- |
PostAttrs .eco_tempH
|
src/types.ts:72 |
eco_tempL? |
readonly |
number |
- |
PostAttrs .eco_tempL
|
src/types.ts:73 |
lock_c? |
readonly |
Switch |
- |
PostAttrs .lock_c
|
src/types.ts:74 |
lock_switch? |
readonly |
Switch |
- |
PostAttrs .lock_switch
|
src/types.ts:66 |
mode |
readonly |
Mode |
PostAttrs .mode
|
- | src/types.ts:11 |
on_off? |
readonly |
Switch |
- |
PostAttrs .on_off
|
src/types.ts:75 |
timer_switch? |
readonly |
Switch |
- |
PostAttrs .timer_switch
|
src/types.ts:64 |
window_switch? |
readonly |
Switch |
- |
PostAttrs .window_switch
|
src/types.ts:79 |
Property | Modifier | Type | Defined in |
---|---|---|---|
devices |
readonly |
readonly Device [] |
src/types.ts:22 |
Property | Modifier | Type | Defined in |
---|---|---|---|
dev_alias |
readonly |
string |
src/types.ts:26 |
did |
readonly |
string |
src/types.ts:27 |
product_key |
readonly |
string |
src/types.ts:28 |
product_name |
readonly |
string |
src/types.ts:29 |
Property | Modifier | Type | Defined in |
---|---|---|---|
attr |
readonly |
Attrs |
src/types.ts:33 |
Property | Modifier | Type | Defined in |
---|---|---|---|
attrs |
readonly |
PostAttrs |
src/types.ts:37 |
Property | Modifier | Type | Defined in |
---|---|---|---|
raw |
readonly |
[1 , 1 , ModeV1 ] |
src/types.ts:41 |
Property | Modifier | Type | Defined in |
---|---|---|---|
detail_message |
readonly |
null | string
|
src/types.ts:45 |
error_message |
readonly |
null | string
|
src/types.ts:46 |
Property | Type | Defined in |
---|---|---|
authenticate |
(data ?: LoginPostData ) => Promise <boolean > |
src/services/interfaces.ts:40 |
bindings |
() => Promise <{ data : Bindings ; }> |
src/services/interfaces.ts:41 |
clearSync |
() => void
|
src/services/interfaces.ts:42 |
control |
(__namedParameters : { id : string ; postData : DevicePostDataAny ; }) => Promise <{ data : Data ; }> |
src/services/interfaces.ts:43 |
deviceData |
(__namedParameters : { id : string ; }) => Promise <{ data : DeviceData ; }> |
src/services/interfaces.ts:50 |
fetch |
() => Promise <readonly Device []> |
src/services/interfaces.ts:51 |
login |
(__namedParameters : { postData : LoginPostData ; }) => Promise <{ data : LoginData ; }> |
src/services/interfaces.ts:52 |
onSync? |
OnSyncFunction |
src/services/interfaces.ts:39 |
IBaseDeviceModel
Property | Type | Inherited from | Defined in |
---|---|---|---|
derogationEndDate |
null | DateTime
|
IBaseDeviceModel.derogationEndDate |
src/models/interfaces.ts:15 |
id |
string |
IBaseDeviceModel.id |
src/models/interfaces.ts:16 |
isOn |
boolean |
- | src/facades/interfaces.ts:13 |
mode |
Mode |
- | src/facades/interfaces.ts:14 |
name |
string |
IBaseDeviceModel.name |
src/models/interfaces.ts:17 |
onSync |
() => Promise <void > |
- | src/facades/interfaces.ts:15 |
previousMode |
PreviousMode |
IBaseDeviceModel.previousMode |
src/models/interfaces.ts:18 |
product |
Product |
IBaseDeviceModel.product |
src/models/interfaces.ts:19 |
setValues |
(data : PostAttrs ) => Promise <Partial <Attrs >> |
- | src/facades/interfaces.ts:16 |
update |
(data : Partial <Attrs >) => void
|
IBaseDeviceModel.update |
src/models/interfaces.ts:20 |
values |
() => Promise <Attrs > |
- | src/facades/interfaces.ts:17 |
IBaseDeviceModel
Property | Type | Inherited from | Defined in |
---|---|---|---|
data |
Attrs |
- | src/models/interfaces.ts:24 |
derogationEndDate |
null | DateTime
|
IBaseDeviceModel.derogationEndDate |
src/models/interfaces.ts:15 |
id |
string |
IBaseDeviceModel.id |
src/models/interfaces.ts:16 |
name |
string |
IBaseDeviceModel.name |
src/models/interfaces.ts:17 |
previousMode |
PreviousMode |
IBaseDeviceModel.previousMode |
src/models/interfaces.ts:18 |
product |
Product |
IBaseDeviceModel.product |
src/models/interfaces.ts:19 |
productKey |
string |
- | src/models/interfaces.ts:25 |
productName |
string |
- | src/models/interfaces.ts:26 |
update |
(data : Partial <Attrs >) => void
|
IBaseDeviceModel.update |
src/models/interfaces.ts:20 |
Property | Type | Defined in |
---|---|---|
get |
(instance ?: IDeviceModel ) => null | IDeviceFacade
|
src/facades/interfaces.ts:44 |
Property | Type | Defined in |
---|---|---|
error |
(message ?: any , ...optionalParams : any []) => void
|
src/services/interfaces.ts:60 |
log |
(message ?: any , ...optionalParams : any []) => void
|
src/services/interfaces.ts:61 |
Property | Modifier | Type | Defined in |
---|---|---|---|
expire_at |
readonly |
number |
src/types.ts:50 |
token |
readonly |
string |
src/types.ts:51 |
Property | Modifier | Type | Defined in |
---|---|---|---|
password |
readonly |
string |
src/types.ts:55 |
username |
readonly |
string |
src/types.ts:56 |
Property | Modifier | Type | Defined in |
---|---|---|---|
cft_temp? |
readonly |
number |
src/types.ts:77 |
cft_tempH? |
readonly |
number |
src/types.ts:70 |
cft_tempL? |
readonly |
number |
src/types.ts:71 |
com_temp? |
readonly |
TemperatureCompensation |
src/types.ts:68 |
derog_mode? |
readonly |
DerogationMode |
src/types.ts:62 |
derog_time? |
readonly |
number |
src/types.ts:63 |
eco_temp? |
readonly |
number |
src/types.ts:78 |
eco_tempH? |
readonly |
number |
src/types.ts:72 |
eco_tempL? |
readonly |
number |
src/types.ts:73 |
lock_c? |
readonly |
Switch |
src/types.ts:74 |
lock_switch? |
readonly |
Switch |
src/types.ts:66 |
mode? |
readonly |
Mode |
src/types.ts:60 |
on_off? |
readonly |
Switch |
src/types.ts:75 |
timer_switch? |
readonly |
Switch |
src/types.ts:64 |
window_switch? |
readonly |
Switch |
src/types.ts:79 |
Property | Type | Defined in |
---|---|---|
get |
<K >(key : K ) => APISettings [K ] |
src/services/interfaces.ts:65 |
set |
<K >(key : K , value : APISettings [K ]) => void
|
src/services/interfaces.ts:66 |
type Data = Record<string, never>
type DevicePostDataAny = DevicePostData | DeviceV1PostData
type IDeviceFacadeAny =
| IDeviceFacade
| IDeviceGlowFacade
| IDeviceProFacade
| IDeviceV2Facade
type OnSyncFunction = (params?: { ids: string[] }) => Promise<void>
Parameter | Type |
---|---|
params ? |
{ ids : string []; } |
params.ids ? |
string [] |
Promise
<void
>
type PreviousMode = Exclude<Mode, Mode.stop>
const UNIT: 1 = 1
function getTargetTemperature(
product: Product,
temperature: 'cft_temp' | 'eco_temp',
value: number,
): PostAttrs
Parameter | Type |
---|---|
product |
Product |
temperature |
"cft_temp" | "eco_temp"
|
value |
number |
function supportsGlow(device: IDeviceFacadeAny): device is IDeviceGlowFacade
Parameter | Type |
---|---|
device |
IDeviceFacadeAny |
device is IDeviceGlowFacade
function supportsPro(device: IDeviceFacadeAny): device is IDeviceProFacade
Parameter | Type |
---|---|
device |
IDeviceFacadeAny |
device is IDeviceProFacade
function supportsV2(device: IDeviceFacadeAny): device is IDeviceV2Facade
Parameter | Type |
---|---|
device |
IDeviceFacadeAny |
device is IDeviceV2Facade
function syncDevices<T>(
target: (...args: any[]) => Promise<T>,
_context: ClassMethodDecoratorContext<(this: unknown, ...args: any) => any>,
): (...args: unknown[]) => Promise<T>
Type Parameter |
---|
T extends | readonly Device [] | Partial <Attrs > |
Parameter | Type |
---|---|
target |
(...args : any []) => Promise <T > |
_context |
ClassMethodDecoratorContext <(this : unknown , ...args : any ) => any > |
Function
Parameter | Type |
---|---|
...args
|
unknown [] |
Promise
<T
>
src/decorators/sync-devices.ts:5
function updateDevice<T>(
target: (...args: any[]) => Promise<T>,
_context: ClassMethodDecoratorContext<(this: unknown, ...args: any) => any>,
): (...args: unknown[]) => Promise<T>
Type Parameter |
---|
T extends Partial <Attrs > |
Parameter | Type |
---|---|
target |
(...args : any []) => Promise <T > |
_context |
ClassMethodDecoratorContext <(this : unknown , ...args : any ) => any > |
Function
Parameter | Type |
---|---|
...args
|
unknown [] |
Promise
<T
>