@kohost/api-client 1.0.0-beta.3 → 1.0.0-beta.4
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/dist/Client.js +19632 -0
- package/dist/commands.js +568 -0
- package/dist/defs.js +196 -0
- package/dist/errors.js +174 -0
- package/dist/events.js +375 -0
- package/dist/models.js +3584 -0
- package/dist/useCases/AddDefaultScenesToRooms.js +39 -0
- package/dist/useCases/AddScenesToRoom.js +39 -0
- package/dist/useCases/AdminCreateProperty.js +39 -0
- package/dist/useCases/AdminDescribeProperty.js +39 -0
- package/dist/useCases/AdminListCustomers.js +39 -0
- package/dist/useCases/AdminListProperties.js +39 -0
- package/dist/useCases/AdminUpdateProperty.js +39 -0
- package/dist/useCases/BatchNotifyPreArrival.js +39 -0
- package/dist/useCases/CheckInReservation.js +39 -0
- package/dist/useCases/CheckVerificationCode.js +39 -0
- package/dist/useCases/CreateAlarm.js +39 -0
- package/dist/useCases/CreateCamera.js +39 -0
- package/dist/useCases/CreateCourtesy.js +39 -0
- package/dist/useCases/CreateDefaultScenes.js +39 -0
- package/dist/useCases/CreateDimmer.js +39 -0
- package/dist/useCases/CreateDiscoveredDevice.js +39 -0
- package/dist/useCases/CreateDiscoveredDeviceAssociation.js +39 -0
- package/dist/useCases/CreateIntegration.js +39 -0
- package/dist/useCases/CreateIntegrationDeviceMapEntry.js +39 -0
- package/dist/useCases/CreateLock.js +39 -0
- package/dist/useCases/CreateReservation.js +39 -0
- package/dist/useCases/CreateRoom.js +39 -0
- package/dist/useCases/CreateRoomInSpace.js +39 -0
- package/dist/useCases/CreateSource.js +39 -0
- package/dist/useCases/CreateSpace.js +39 -0
- package/dist/useCases/CreateSwitch.js +39 -0
- package/dist/useCases/CreateThermostat.js +39 -0
- package/dist/useCases/CreateTicket.js +39 -0
- package/dist/useCases/CreateTicketMessage.js +39 -0
- package/dist/useCases/CreateUser.js +39 -0
- package/dist/useCases/CreateWindowCovering.js +39 -0
- package/dist/useCases/DeleteAlarm.js +39 -0
- package/dist/useCases/DeleteCamera.js +39 -0
- package/dist/useCases/DeleteCourtesy.js +39 -0
- package/dist/useCases/DeleteDimmer.js +39 -0
- package/dist/useCases/DeleteDiscoveredDevice.js +39 -0
- package/dist/useCases/DeleteIntegration.js +39 -0
- package/dist/useCases/DeleteLock.js +39 -0
- package/dist/useCases/DeleteReservation.js +39 -0
- package/dist/useCases/DeleteRoom.js +39 -0
- package/dist/useCases/DeleteSource.js +39 -0
- package/dist/useCases/DeleteSpace.js +39 -0
- package/dist/useCases/DeleteSwitch.js +39 -0
- package/dist/useCases/DeleteThermostat.js +39 -0
- package/dist/useCases/DeleteTicket.js +39 -0
- package/dist/useCases/DeleteUser.js +39 -0
- package/dist/useCases/DeleteWindowCovering.js +39 -0
- package/dist/useCases/DescribeAlarm.js +39 -0
- package/dist/useCases/DescribeCamera.js +39 -0
- package/dist/useCases/DescribeCourtesy.js +39 -0
- package/dist/useCases/DescribeDimmer.js +39 -0
- package/dist/useCases/DescribeDiscoveredDevice.js +39 -0
- package/dist/useCases/DescribeIntegration.js +39 -0
- package/dist/useCases/DescribeLock.js +39 -0
- package/dist/useCases/DescribeMyProperty.js +39 -0
- package/dist/useCases/DescribeReservation.js +39 -0
- package/dist/useCases/DescribeReservationCheckinStatus.js +39 -0
- package/dist/useCases/DescribeRoom.js +39 -0
- package/dist/useCases/DescribeSelf.js +39 -0
- package/dist/useCases/DescribeSource.js +39 -0
- package/dist/useCases/DescribeSpace.js +39 -0
- package/dist/useCases/DescribeSwitch.js +39 -0
- package/dist/useCases/DescribeThermostat.js +39 -0
- package/dist/useCases/DescribeTicket.js +39 -0
- package/dist/useCases/DescribeUser.js +39 -0
- package/dist/useCases/DescribeWindowCovering.js +39 -0
- package/dist/useCases/DiscoverReservations.js +39 -0
- package/dist/useCases/EmailUserAccountSetup.js +39 -0
- package/dist/useCases/ListAlarms.js +39 -0
- package/dist/useCases/ListCameras.js +39 -0
- package/dist/useCases/ListCourtesy.js +39 -0
- package/dist/useCases/ListDimmers.js +39 -0
- package/dist/useCases/ListDiscoveredDevices.js +39 -0
- package/dist/useCases/ListIntegrations.js +39 -0
- package/dist/useCases/ListLocks.js +39 -0
- package/dist/useCases/ListMyReservations.js +39 -0
- package/dist/useCases/ListMySpaces.js +39 -0
- package/dist/useCases/ListReservations.js +39 -0
- package/dist/useCases/ListRooms.js +39 -0
- package/dist/useCases/ListRoomsInSpace.js +39 -0
- package/dist/useCases/ListSources.js +39 -0
- package/dist/useCases/ListSpaces.js +39 -0
- package/dist/useCases/ListSwitches.js +39 -0
- package/dist/useCases/ListThermostats.js +39 -0
- package/dist/useCases/ListTickets.js +39 -0
- package/dist/useCases/ListUserReservations.js +39 -0
- package/dist/useCases/ListUsers.js +39 -0
- package/dist/useCases/ListWindowCoverings.js +39 -0
- package/dist/useCases/LoginGateway.js +39 -0
- package/dist/useCases/LoginUser.js +39 -0
- package/dist/useCases/MatchUserIdentification.js +39 -0
- package/dist/useCases/OCRDocument.js +39 -0
- package/dist/useCases/RefreshToken.js +39 -0
- package/dist/useCases/RequestLoginLink.js +39 -0
- package/dist/useCases/SendPreArrivalEmail.js +39 -0
- package/dist/useCases/SendPreArrivalSMS.js +39 -0
- package/dist/useCases/SendVerificationCode.js +39 -0
- package/dist/useCases/SetCamera.js +39 -0
- package/dist/useCases/SetCourtesy.js +39 -0
- package/dist/useCases/SetLock.js +39 -0
- package/dist/useCases/SetSource.js +39 -0
- package/dist/useCases/SetSwitch.js +39 -0
- package/dist/useCases/SetThermostat.js +39 -0
- package/dist/useCases/SetWindowCovering.js +39 -0
- package/dist/useCases/UpdateAlarm.js +39 -0
- package/dist/useCases/UpdateCamera.js +39 -0
- package/dist/useCases/UpdateCourtesy.js +39 -0
- package/dist/useCases/UpdateDimmer.js +39 -0
- package/dist/useCases/UpdateDiscoveredDevice.js +39 -0
- package/dist/useCases/UpdateIntegration.js +39 -0
- package/dist/useCases/UpdateLock.js +39 -0
- package/dist/useCases/UpdateMessageReadStatus.js +39 -0
- package/dist/useCases/UpdateReservation.js +39 -0
- package/dist/useCases/UpdateRoom.js +39 -0
- package/dist/useCases/UpdateSelf.js +39 -0
- package/dist/useCases/UpdateSource.js +39 -0
- package/dist/useCases/UpdateSpace.js +39 -0
- package/dist/useCases/UpdateSwitch.js +39 -0
- package/dist/useCases/UpdateThermostat.js +39 -0
- package/dist/useCases/UpdateTicket.js +39 -0
- package/dist/useCases/UpdateTicketStatus.js +39 -0
- package/dist/useCases/UpdateUser.js +39 -0
- package/dist/useCases/UpdateWindowCovering.js +39 -0
- package/dist/useCases/UpsertDiscoveredDevice.js +39 -0
- package/dist/utils.js +53 -0
- package/package.json +8 -2
- package/.eslintrc.js +0 -10
- package/bitbucket-pipelines.yml +0 -71
- package/commands/CheckInReservationCommand.js +0 -23
- package/commands/Command.js +0 -38
- package/commands/DiscoverReservationsCommand.js +0 -24
- package/commands/DiscoverRoomsCommand.js +0 -21
- package/commands/DiscoverUsersCommand.js +0 -21
- package/commands/OCRDocumentCommand.js +0 -20
- package/commands/SendEmailCommand.js +0 -24
- package/commands/SendSMSCommand.js +0 -21
- package/commands/SetAlarmCommand.js +0 -21
- package/commands/SetCourtesyCommand.js +0 -21
- package/commands/SetDimmerCommand.js +0 -21
- package/commands/SetLockCommand.js +0 -21
- package/commands/SetSceneControllerCommand.js +0 -21
- package/commands/SetSwitchCommand.js +0 -21
- package/commands/SetThermostatCommand.js +0 -21
- package/commands/SetWindowCoveringCommand.js +0 -21
- package/commands/index.js +0 -31
- package/defs/deviceTypes.js +0 -15
- package/defs/formalDeviceTypes.js +0 -6
- package/defs/http.js +0 -7
- package/defs/index.js +0 -11
- package/errors/AppError.js +0 -8
- package/errors/AuthenticationError.js +0 -9
- package/errors/AuthorizationError.js +0 -9
- package/errors/DeviceCommError.js +0 -9
- package/errors/LoginError.js +0 -9
- package/errors/NotFoundError.js +0 -9
- package/errors/RequestError.js +0 -9
- package/errors/SystemCommError.js +0 -9
- package/errors/TokenExpiredError.js +0 -9
- package/errors/UnprocessableRequestError.js +0 -9
- package/errors/ValidationError.js +0 -9
- package/errors/index.js +0 -15
- package/events/EmailSentEvent.js +0 -17
- package/events/Event.js +0 -52
- package/events/SMSSentEvent.js +0 -17
- package/events/ShortLinkCreatedEvent.js +0 -17
- package/events/SystemCameraUpdatedEvent.js +0 -17
- package/events/SystemCourtesyUpdatedEvent.js +0 -17
- package/events/SystemDimmerUpdatedEvent.js +0 -17
- package/events/SystemLockUpdatedEvent.js +0 -17
- package/events/SystemReservationUpdatedEvent.js +0 -17
- package/events/SystemSceneControllerUpdatedEvent.js +0 -17
- package/events/SystemSourceUpdatedEvent.js +0 -17
- package/events/SystemSpaceUpdatedEvent.js +0 -17
- package/events/SystemSwitchUpdatedEvent.js +0 -17
- package/events/SystemThermostatUpdatedEvent.js +0 -17
- package/events/SystemUserUpdatedEvent.js +0 -17
- package/events/SystemWindowCoveringUpdatedEvent.js +0 -17
- package/events/index.js +0 -35
- package/http/handleResponseError.js +0 -33
- package/http/handleResponseSuccess.js +0 -15
- package/http/index.js +0 -169
- package/index.js +0 -23
- package/models/acl.js +0 -29
- package/models/admin/customer.js +0 -28
- package/models/admin/property.js +0 -28
- package/models/alarm.js +0 -29
- package/models/application.js +0 -28
- package/models/camera.js +0 -29
- package/models/courtesy.js +0 -33
- package/models/credential.js +0 -29
- package/models/dimmer.js +0 -49
- package/models/discoveredDevice.js +0 -30
- package/models/gateway.js +0 -29
- package/models/identification.js +0 -32
- package/models/index.js +0 -56
- package/models/integration.js +0 -76
- package/models/kohost.js +0 -96
- package/models/lock.js +0 -33
- package/models/mediaSource.js +0 -29
- package/models/motionSensor.js +0 -29
- package/models/product.js +0 -30
- package/models/reservation.js +0 -83
- package/models/room.js +0 -174
- package/models/scene.js +0 -28
- package/models/shortLink.js +0 -29
- package/models/space.js +0 -99
- package/models/switch.js +0 -33
- package/models/thermostat.js +0 -80
- package/models/ticket.js +0 -91
- package/models/user.js +0 -56
- package/models/windowCovering.js +0 -49
- package/prepare.js +0 -4
- package/schemas/acl.json +0 -111
- package/schemas/admin/customer.json +0 -32
- package/schemas/admin/property.json +0 -180
- package/schemas/alarm.json +0 -93
- package/schemas/application.json +0 -24
- package/schemas/camera.json +0 -41
- package/schemas/courtesy.json +0 -37
- package/schemas/credential.json +0 -28
- package/schemas/definitions/common.json +0 -74
- package/schemas/definitions/device.json +0 -76
- package/schemas/dimmer.json +0 -34
- package/schemas/discoveredDevice.json +0 -43
- package/schemas/gateway.json +0 -30
- package/schemas/identification.json +0 -49
- package/schemas/integration.json +0 -94
- package/schemas/lock.json +0 -36
- package/schemas/mediaSource.json +0 -151
- package/schemas/motionSensor.json +0 -26
- package/schemas/payment.json +0 -40
- package/schemas/product.json +0 -36
- package/schemas/reservation.json +0 -71
- package/schemas/room.json +0 -131
- package/schemas/scene.json +0 -118
- package/schemas/shortLink.json +0 -30
- package/schemas/space.json +0 -111
- package/schemas/switch.json +0 -33
- package/schemas/thermostat.json +0 -139
- package/schemas/ticket.json +0 -82
- package/schemas/user.json +0 -176
- package/schemas/windowCovering.json +0 -34
- package/tests/unit/models/space.test.js +0 -31
- package/tests/unit/models/thermostat.test.js +0 -146
- package/tests/unit/models/user.test.js +0 -28
- package/useCases/http.json +0 -1161
- package/utils/getDeviceTypes.js +0 -7
- package/utils/getFormalDeviceType.js +0 -5
- package/utils/schema.js +0 -28
package/schemas/mediaSource.json
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://api.kohost.app/schemas/v3/mediaSource.json",
|
|
4
|
-
"title": "Media Source",
|
|
5
|
-
"description": "Any media source",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"id": {
|
|
9
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/id"
|
|
10
|
-
},
|
|
11
|
-
"type": {
|
|
12
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/type"
|
|
13
|
-
},
|
|
14
|
-
"subType": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"enum": [
|
|
17
|
-
"tv",
|
|
18
|
-
"dvr",
|
|
19
|
-
"appleTv",
|
|
20
|
-
"discPlayer",
|
|
21
|
-
"mediaPlayer",
|
|
22
|
-
"uncontrolledDevice"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
"audio": {
|
|
26
|
-
"type": "boolean"
|
|
27
|
-
},
|
|
28
|
-
"video": {
|
|
29
|
-
"type": "boolean"
|
|
30
|
-
},
|
|
31
|
-
"powerFeedback": {
|
|
32
|
-
"type": "boolean"
|
|
33
|
-
},
|
|
34
|
-
"volumeFeedback": {
|
|
35
|
-
"type": "boolean"
|
|
36
|
-
},
|
|
37
|
-
"command": {
|
|
38
|
-
"type": ["string", "null"],
|
|
39
|
-
"enum": [
|
|
40
|
-
"mute",
|
|
41
|
-
"volumeUp",
|
|
42
|
-
"volumeDown",
|
|
43
|
-
"channelUp",
|
|
44
|
-
"channelDown",
|
|
45
|
-
"number0",
|
|
46
|
-
"number1",
|
|
47
|
-
"number2",
|
|
48
|
-
"number3",
|
|
49
|
-
"number4",
|
|
50
|
-
"number5",
|
|
51
|
-
"number6",
|
|
52
|
-
"number7",
|
|
53
|
-
"number8",
|
|
54
|
-
"number9",
|
|
55
|
-
"lastChannel",
|
|
56
|
-
"display",
|
|
57
|
-
"favoriteChannel",
|
|
58
|
-
"play",
|
|
59
|
-
"stop",
|
|
60
|
-
"pause",
|
|
61
|
-
"fastForward",
|
|
62
|
-
"rewind",
|
|
63
|
-
"instantReplay",
|
|
64
|
-
"record",
|
|
65
|
-
"ac3",
|
|
66
|
-
"pvrMenu",
|
|
67
|
-
"guide",
|
|
68
|
-
"menu",
|
|
69
|
-
"menuUp",
|
|
70
|
-
"menuDown",
|
|
71
|
-
"menuLeft",
|
|
72
|
-
"menuRight",
|
|
73
|
-
"pageUp",
|
|
74
|
-
"pageDown",
|
|
75
|
-
"select",
|
|
76
|
-
"exit",
|
|
77
|
-
"input",
|
|
78
|
-
"power",
|
|
79
|
-
"enterChannel",
|
|
80
|
-
"number10",
|
|
81
|
-
"number11",
|
|
82
|
-
"number12",
|
|
83
|
-
"number13",
|
|
84
|
-
"number14",
|
|
85
|
-
"number15",
|
|
86
|
-
"number16",
|
|
87
|
-
"number10Plus",
|
|
88
|
-
"number20Plus",
|
|
89
|
-
"number100",
|
|
90
|
-
"dash",
|
|
91
|
-
"threeChan",
|
|
92
|
-
"threeD",
|
|
93
|
-
"sixChan",
|
|
94
|
-
"a",
|
|
95
|
-
"add",
|
|
96
|
-
"alarm",
|
|
97
|
-
"am",
|
|
98
|
-
"analog",
|
|
99
|
-
"angle",
|
|
100
|
-
"antenna",
|
|
101
|
-
"antennaEast",
|
|
102
|
-
"antennaWest",
|
|
103
|
-
"aspect",
|
|
104
|
-
"audio1",
|
|
105
|
-
"audio2",
|
|
106
|
-
"audio3",
|
|
107
|
-
"audioDumming",
|
|
108
|
-
"audioLevelDown",
|
|
109
|
-
"audioLevelUp",
|
|
110
|
-
"b",
|
|
111
|
-
"back",
|
|
112
|
-
"c",
|
|
113
|
-
"component1",
|
|
114
|
-
"component2",
|
|
115
|
-
"component3",
|
|
116
|
-
"d",
|
|
117
|
-
"home",
|
|
118
|
-
"list",
|
|
119
|
-
"liveTv",
|
|
120
|
-
"discreteInputCable",
|
|
121
|
-
"powerOff",
|
|
122
|
-
"powerOn",
|
|
123
|
-
"setupMenu",
|
|
124
|
-
"skipForward",
|
|
125
|
-
"skipReverse",
|
|
126
|
-
"video1",
|
|
127
|
-
"video2",
|
|
128
|
-
"video3",
|
|
129
|
-
"video4",
|
|
130
|
-
"video5",
|
|
131
|
-
"details",
|
|
132
|
-
"hdmi1",
|
|
133
|
-
"hdmi2",
|
|
134
|
-
"hdmi3",
|
|
135
|
-
"cecDeviceList",
|
|
136
|
-
"mtsSap"
|
|
137
|
-
]
|
|
138
|
-
},
|
|
139
|
-
"supportedNotifications": {
|
|
140
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
|
|
141
|
-
},
|
|
142
|
-
"notification": {
|
|
143
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/notification"
|
|
144
|
-
},
|
|
145
|
-
"systemData": {
|
|
146
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/systemData"
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
"additionalProperties": false,
|
|
150
|
-
"required": ["id", "type", "systemData", "audio", "video"]
|
|
151
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://api.kohost.app/schemas/v3/motionSensor.json",
|
|
4
|
-
"title": "Motion Sensor",
|
|
5
|
-
"description": "Any smart motion sensor",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"id": {
|
|
9
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/id"
|
|
10
|
-
},
|
|
11
|
-
"type": {
|
|
12
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/type"
|
|
13
|
-
},
|
|
14
|
-
"systemData": {
|
|
15
|
-
"supportedNotifications": {
|
|
16
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
|
|
17
|
-
},
|
|
18
|
-
"notification": {
|
|
19
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/notification"
|
|
20
|
-
},
|
|
21
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/systemData"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"additionalProperties": false,
|
|
25
|
-
"required": ["id", "type", "systemData"]
|
|
26
|
-
}
|
package/schemas/payment.json
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://api.kohost.app/schemas/v3/payment.json",
|
|
4
|
-
"title": "Payment",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": ["type", "maskedNumber", "expires"],
|
|
7
|
-
"properties": {
|
|
8
|
-
"id": {
|
|
9
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
10
|
-
},
|
|
11
|
-
"type": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"enum": [
|
|
14
|
-
"amex",
|
|
15
|
-
"visa",
|
|
16
|
-
"masterCard",
|
|
17
|
-
"maestro",
|
|
18
|
-
"discover",
|
|
19
|
-
"diners",
|
|
20
|
-
"jcb",
|
|
21
|
-
"applePay",
|
|
22
|
-
"alipay",
|
|
23
|
-
"chinaUnionPay",
|
|
24
|
-
"vpay"
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"maskedNumber": {
|
|
28
|
-
"string": "string"
|
|
29
|
-
},
|
|
30
|
-
"issued": {
|
|
31
|
-
"type": ["string", "null"]
|
|
32
|
-
},
|
|
33
|
-
"expires": {
|
|
34
|
-
"string": "string"
|
|
35
|
-
},
|
|
36
|
-
"systemData": {
|
|
37
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/systemData"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
package/schemas/product.json
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://api.kohost.app/schemas/v3/product.json",
|
|
4
|
-
"title": "Product",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": ["name", "description", "price", "currency"],
|
|
7
|
-
"properties": {
|
|
8
|
-
"id": {
|
|
9
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
10
|
-
},
|
|
11
|
-
"type": {
|
|
12
|
-
"type": "string"
|
|
13
|
-
},
|
|
14
|
-
"name": {
|
|
15
|
-
"type": "string"
|
|
16
|
-
},
|
|
17
|
-
"description": {
|
|
18
|
-
"string": "string"
|
|
19
|
-
},
|
|
20
|
-
"price": {
|
|
21
|
-
"type": "number"
|
|
22
|
-
},
|
|
23
|
-
"currency": {
|
|
24
|
-
"type": "string",
|
|
25
|
-
"description": "ISO 4217 format",
|
|
26
|
-
"minLength": 3,
|
|
27
|
-
"maxLength": 3
|
|
28
|
-
},
|
|
29
|
-
"image": {
|
|
30
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/file"
|
|
31
|
-
},
|
|
32
|
-
"systemData": {
|
|
33
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/systemData"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
package/schemas/reservation.json
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://api.kohost.app/schemas/v3/reservation.json",
|
|
4
|
-
"title": "Reservation",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": ["type", "status", "checkInDateTime", "checkOutDateTime"],
|
|
7
|
-
"properties": {
|
|
8
|
-
"id": {
|
|
9
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
10
|
-
},
|
|
11
|
-
"primaryGuest": {
|
|
12
|
-
"type": "string"
|
|
13
|
-
},
|
|
14
|
-
"type": {
|
|
15
|
-
"type": "string"
|
|
16
|
-
},
|
|
17
|
-
"sharedGuests": {
|
|
18
|
-
"type": "array",
|
|
19
|
-
"items": {
|
|
20
|
-
"type": "string"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"space": {
|
|
24
|
-
"type": "string"
|
|
25
|
-
},
|
|
26
|
-
"status": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"enum": ["reserved", "checkedIn", "checkedOut", "cancelled", "noShow", "enquired", "requested", "optional"],
|
|
29
|
-
"description": " reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"
|
|
30
|
-
},
|
|
31
|
-
"confirmationNumber": {
|
|
32
|
-
"type": "string"
|
|
33
|
-
},
|
|
34
|
-
"checkInDateTime": {
|
|
35
|
-
"type": ["string", "object"],
|
|
36
|
-
"format": "date-time"
|
|
37
|
-
},
|
|
38
|
-
"checkOutDateTime": {
|
|
39
|
-
"type": ["string", "object"],
|
|
40
|
-
"format": "date-time"
|
|
41
|
-
},
|
|
42
|
-
"adultCount": {
|
|
43
|
-
"type": "number",
|
|
44
|
-
"default": 1,
|
|
45
|
-
"minimum": 1
|
|
46
|
-
},
|
|
47
|
-
"childCount": {
|
|
48
|
-
"type": "number",
|
|
49
|
-
"default": 0
|
|
50
|
-
},
|
|
51
|
-
"rateSuppressed": {
|
|
52
|
-
"type": "boolean"
|
|
53
|
-
},
|
|
54
|
-
"payment": {
|
|
55
|
-
"type": "string"
|
|
56
|
-
},
|
|
57
|
-
"company": {
|
|
58
|
-
"type": "string"
|
|
59
|
-
},
|
|
60
|
-
"travelAgent": {
|
|
61
|
-
"type": "string"
|
|
62
|
-
},
|
|
63
|
-
"systemData": {
|
|
64
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/systemData"
|
|
65
|
-
},
|
|
66
|
-
"metadata": {
|
|
67
|
-
"ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/metadata"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
package/schemas/room.json
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://api.kohost.app/schemas/v3/room.json",
|
|
4
|
-
"title": "Room",
|
|
5
|
-
"description": "A room represents a physical space of controllable IoT devices",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"id": {
|
|
9
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
10
|
-
},
|
|
11
|
-
"name": {
|
|
12
|
-
"type": "string"
|
|
13
|
-
},
|
|
14
|
-
"floor": {
|
|
15
|
-
"type": "string"
|
|
16
|
-
},
|
|
17
|
-
"dimmers": {
|
|
18
|
-
"type": "array",
|
|
19
|
-
"default": [],
|
|
20
|
-
"items": {
|
|
21
|
-
"$ref": "https://api.kohost.app/schemas/v3/dimmer.json"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"switches": {
|
|
25
|
-
"type": "array",
|
|
26
|
-
"default": [],
|
|
27
|
-
"items": {
|
|
28
|
-
"$ref": "https://api.kohost.app/schemas/v3/switch.json"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"thermostats": {
|
|
32
|
-
"type": "array",
|
|
33
|
-
"default": [],
|
|
34
|
-
"items": {
|
|
35
|
-
"$ref": "https://api.kohost.app/schemas/v3/thermostat.json"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"locks": {
|
|
39
|
-
"type": "array",
|
|
40
|
-
"default": [],
|
|
41
|
-
"items": {
|
|
42
|
-
"$ref": "https://api.kohost.app/schemas/v3/lock.json"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"windowCoverings": {
|
|
46
|
-
"type": "array",
|
|
47
|
-
"default": [],
|
|
48
|
-
"items": {
|
|
49
|
-
"$ref": "https://api.kohost.app/schemas/v3/windowCovering.json"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"courtesy": {
|
|
53
|
-
"type": "array",
|
|
54
|
-
"default": [],
|
|
55
|
-
"items": {
|
|
56
|
-
"$ref": "https://api.kohost.app/schemas/v3/courtesy.json"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"cameras": {
|
|
60
|
-
"type": "array",
|
|
61
|
-
"default": [],
|
|
62
|
-
"items": {
|
|
63
|
-
"$ref": "https://api.kohost.app/schemas/v3/camera.json"
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"sources": {
|
|
67
|
-
"type": "array",
|
|
68
|
-
"default": [],
|
|
69
|
-
"items": {
|
|
70
|
-
"$ref": "https://api.kohost.app/schemas/v3/mediaSource.json"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"motionSensors": {
|
|
74
|
-
"type": "array",
|
|
75
|
-
"default": [],
|
|
76
|
-
"items": {
|
|
77
|
-
"$ref": "https://api.kohost.app/schemas/v3/motionSensor.json"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"alarms": {
|
|
81
|
-
"type": "array",
|
|
82
|
-
"default": [],
|
|
83
|
-
"items": {
|
|
84
|
-
"$ref": "https://api.kohost.app/schemas/v3/alarm.json"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
"media": {
|
|
88
|
-
"type": "object",
|
|
89
|
-
"additionalProperties": false,
|
|
90
|
-
"default": {
|
|
91
|
-
"volume": 0,
|
|
92
|
-
"currentSource": null
|
|
93
|
-
},
|
|
94
|
-
"properties": {
|
|
95
|
-
"volume": {
|
|
96
|
-
"type": "number",
|
|
97
|
-
"minimum": 0,
|
|
98
|
-
"maximum": 100
|
|
99
|
-
},
|
|
100
|
-
"currentSource": {
|
|
101
|
-
"type": ["string", "null"]
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"scenes": {
|
|
106
|
-
"type": "array",
|
|
107
|
-
"default": [],
|
|
108
|
-
"items": {
|
|
109
|
-
"description": "A list of scene IDs for later population, or entire scene objects",
|
|
110
|
-
"oneOf": [
|
|
111
|
-
{
|
|
112
|
-
"$ref": "https://api.kohost.app/schemas/v3/scene.json"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"occupiedAt": {
|
|
121
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/createdAt"
|
|
122
|
-
},
|
|
123
|
-
"createdAt": {
|
|
124
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/createdAt"
|
|
125
|
-
},
|
|
126
|
-
"updatedAt": {
|
|
127
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/updatedAt"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"additionalProperties": false
|
|
131
|
-
}
|
package/schemas/scene.json
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://api.kohost.app/schemas/v3/scene.json",
|
|
4
|
-
"title": "Scene",
|
|
5
|
-
"description": "A room represents a physical space of controllable IoT devices",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"id": {
|
|
9
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
10
|
-
},
|
|
11
|
-
"name": {
|
|
12
|
-
"type": "string"
|
|
13
|
-
},
|
|
14
|
-
"devices": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"properties": {
|
|
17
|
-
"switches": {
|
|
18
|
-
"type": "array",
|
|
19
|
-
"items": {
|
|
20
|
-
"type": "object",
|
|
21
|
-
"properties": {
|
|
22
|
-
"id": {
|
|
23
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
24
|
-
},
|
|
25
|
-
"state": {
|
|
26
|
-
"$ref": "https://api.kohost.app/schemas/v3/switch.json#/properties/state"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"default": []
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"dimmers": {
|
|
33
|
-
"type": "array",
|
|
34
|
-
"items": {
|
|
35
|
-
"type": "object",
|
|
36
|
-
"properties": {
|
|
37
|
-
"id": {
|
|
38
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
39
|
-
},
|
|
40
|
-
"level": {
|
|
41
|
-
"$ref": "https://api.kohost.app/schemas/v3/dimmer.json#/properties/level"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"default": []
|
|
46
|
-
},
|
|
47
|
-
"windowCoverings": {
|
|
48
|
-
"type": "array",
|
|
49
|
-
"items": {
|
|
50
|
-
"type": "object",
|
|
51
|
-
"properties": {
|
|
52
|
-
"id": {
|
|
53
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
54
|
-
},
|
|
55
|
-
"position": {
|
|
56
|
-
"$ref": "https://api.kohost.app/schemas/v3/windowCovering.json#/properties/position"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"default": []
|
|
61
|
-
},
|
|
62
|
-
"thermostats": {
|
|
63
|
-
"type": "array",
|
|
64
|
-
"items": {
|
|
65
|
-
"type": "object",
|
|
66
|
-
"properties": {
|
|
67
|
-
"id": {
|
|
68
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
69
|
-
},
|
|
70
|
-
"hvacMode": {
|
|
71
|
-
"$ref": "https://api.kohost.app/schemas/v3/thermostat.json#/properties/hvacMode"
|
|
72
|
-
},
|
|
73
|
-
"setpoints": {
|
|
74
|
-
"$ref": "https://api.kohost.app/schemas/v3/thermostat.json#/properties/setpoints"
|
|
75
|
-
},
|
|
76
|
-
"fanMode": {
|
|
77
|
-
"$ref": "https://api.kohost.app/schemas/v3/thermostat.json#/properties/fanMode"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"default": []
|
|
82
|
-
},
|
|
83
|
-
"media": {
|
|
84
|
-
"type": "array",
|
|
85
|
-
"items": {
|
|
86
|
-
"type": "object",
|
|
87
|
-
"properties": {
|
|
88
|
-
"id": {
|
|
89
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
90
|
-
},
|
|
91
|
-
"volume": {
|
|
92
|
-
"type": "number",
|
|
93
|
-
"minimum": 0,
|
|
94
|
-
"maximum": 100
|
|
95
|
-
},
|
|
96
|
-
"commands": {
|
|
97
|
-
"type": "array",
|
|
98
|
-
"items": {
|
|
99
|
-
"type": "string"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
"additionalProperties": false
|
|
107
|
-
},
|
|
108
|
-
"isDefault": {
|
|
109
|
-
"type": "boolean",
|
|
110
|
-
"default": false
|
|
111
|
-
},
|
|
112
|
-
"showOnUi": {
|
|
113
|
-
"type": "boolean",
|
|
114
|
-
"default": true
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
"additionalProperties": false
|
|
118
|
-
}
|
package/schemas/shortLink.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://api.kohost.app/schemas/v3/shortLink.json",
|
|
4
|
-
"title": "Short Link",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": ["destination", "url"],
|
|
7
|
-
"properties": {
|
|
8
|
-
"id": {
|
|
9
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
10
|
-
},
|
|
11
|
-
"type": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"default": "shortLink"
|
|
14
|
-
},
|
|
15
|
-
"title": {
|
|
16
|
-
"type": "string"
|
|
17
|
-
},
|
|
18
|
-
"destination": {
|
|
19
|
-
"string": "string",
|
|
20
|
-
"format": "uri"
|
|
21
|
-
},
|
|
22
|
-
"url": {
|
|
23
|
-
"string": "string",
|
|
24
|
-
"format": "uri"
|
|
25
|
-
},
|
|
26
|
-
"systemData": {
|
|
27
|
-
"$ref": "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/systemData"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|