/
types.ts
88 lines (71 loc) · 2.86 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { ModulePrefix } from '@fastybird/modules-metadata'
import { TJsonaModel } from 'jsona/lib/JsonaTypes'
import { DeviceEntityTypes } from '@/lib/models/devices/types'
import { DevicePropertyEntityTypes } from '@/lib/models/device-properties/types'
import { DeviceConfigurationEntityTypes } from '@/lib/models/device-configuration/types'
import { DeviceControlEntityTypes } from '@/lib/models/device-controls/types'
import { DeviceConnectorEntityTypes } from '@/lib/models/device-connector/types'
import { ChannelEntityTypes } from '@/lib/models/channels/types'
import { ChannelPropertyEntityTypes } from '@/lib/models/channel-properties/types'
import { ChannelConfigurationEntityTypes } from '@/lib/models/channel-configuration/types'
import { ChannelControlEntityTypes } from '@/lib/models/channel-controls/types'
import { ConnectorEntityTypes } from '@/lib/models/connectors/types'
import { ConnectorControlEntityTypes } from '@/lib/models/connector-controls/types'
export interface DeviceJsonModelInterface extends TJsonaModel {
id: string
type: DeviceEntityTypes
}
export interface DevicePropertyJsonModelInterface extends TJsonaModel {
id: string
type: DevicePropertyEntityTypes
}
export interface DeviceConfigurationJsonModelInterface extends TJsonaModel {
id: string
type: DeviceConfigurationEntityTypes
}
export interface DeviceControlJsonModelInterface extends TJsonaModel {
id: string
type: DeviceControlEntityTypes
}
export interface DeviceConnectorJsonModelInterface extends TJsonaModel {
id: string
type: DeviceConnectorEntityTypes
}
export interface ChannelJsonModelInterface extends TJsonaModel {
id: string
type: ChannelEntityTypes
}
export interface ChannelPropertyJsonModelInterface extends TJsonaModel {
id: string
type: ChannelPropertyEntityTypes
}
export interface ChannelConfigurationJsonModelInterface extends TJsonaModel {
id: string
type: ChannelConfigurationEntityTypes
}
export interface ChannelControlJsonModelInterface extends TJsonaModel {
id: string
type: ChannelControlEntityTypes
}
export interface ConnectorJsonModelInterface extends TJsonaModel {
id: string
type: ConnectorEntityTypes
}
export interface ConnectorControlJsonModelInterface extends TJsonaModel {
id: string
type: ConnectorControlEntityTypes
}
export interface RelationInterface extends TJsonaModel {
id: string
type: DeviceEntityTypes | ChannelEntityTypes | DevicePropertyEntityTypes | DeviceConfigurationEntityTypes | DeviceControlEntityTypes | DeviceConnectorEntityTypes | ChannelPropertyEntityTypes | ChannelConfigurationEntityTypes | ChannelControlEntityTypes | ConnectorEntityTypes | ConnectorControlEntityTypes
}
export const ModuleApiPrefix = `/${ModulePrefix.MODULE_DEVICES}`
// STORE
// =====
export enum SemaphoreTypes {
FETCHING = 'fetching',
GETTING = 'getting',
CREATING = 'creating',
UPDATING = 'updating',
DELETING = 'deleting',
}