@kohost/api-client 7.1.1 → 7.3.0
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/models/index.d.ts +1 -0
- package/dist/models/index.js +3 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/sosType.d.ts +17 -0
- package/dist/models/sosType.js +25 -0
- package/dist/models/sosType.js.map +1 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +2 -1
- package/dist/schemas/organization.d.ts +19 -0
- package/dist/schemas/organization.js +42 -27
- package/dist/schemas/organization.js.map +1 -1
- package/dist/schemas/property.d.ts +1 -2
- package/dist/schemas/property.js +2 -12
- package/dist/schemas/property.js.map +1 -1
- package/dist/schemas/sosType.d.ts +76 -0
- package/dist/schemas/sosType.js +76 -0
- package/dist/schemas/sosType.js.map +1 -0
- package/dist/validate.d.ts +17 -0
- package/dist/validate.js +4 -1
- package/dist/validate.js.map +1 -1
- package/package.json +21 -20
package/dist/models/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export { Server, type ServerData } from "./server.js";
|
|
|
34
34
|
export { Session, type SessionData } from "./session.js";
|
|
35
35
|
export { ShortLink, type ShortLinkData } from "./shortLink.js";
|
|
36
36
|
export { SmsMessage, type SmsMessageData } from "./smsMessage.js";
|
|
37
|
+
export { SOSType, type SOSTypeData } from "./sosType.js";
|
|
37
38
|
export { Space, type SpaceData } from "./space.js";
|
|
38
39
|
export { Switch, type SwitchData } from "./switch.js";
|
|
39
40
|
export { System, type SystemData } from "./system.js";
|
package/dist/models/index.js
CHANGED
|
@@ -35,6 +35,7 @@ import { Server } from "./server.js";
|
|
|
35
35
|
import { Session } from "./session.js";
|
|
36
36
|
import { ShortLink } from "./shortLink.js";
|
|
37
37
|
import { SmsMessage } from "./smsMessage.js";
|
|
38
|
+
import { SOSType } from "./sosType.js";
|
|
38
39
|
import { Space } from "./space.js";
|
|
39
40
|
import { Switch } from "./switch.js";
|
|
40
41
|
import { System } from "./system.js";
|
|
@@ -79,6 +80,7 @@ var models_exports = /* @__PURE__ */ __exportAll({
|
|
|
79
80
|
Product: () => Product,
|
|
80
81
|
Property: () => Property,
|
|
81
82
|
Reservation: () => Reservation,
|
|
83
|
+
SOSType: () => SOSType,
|
|
82
84
|
Server: () => Server,
|
|
83
85
|
Session: () => Session,
|
|
84
86
|
ShortLink: () => ShortLink,
|
|
@@ -95,6 +97,6 @@ var models_exports = /* @__PURE__ */ __exportAll({
|
|
|
95
97
|
WindowCovering: () => WindowCovering
|
|
96
98
|
});
|
|
97
99
|
//#endregion
|
|
98
|
-
export { Alarm, Announcement, Automation, Camera, Category, Courtesy, Credential, Department, Dimmer, DiscoveredDevice, EmailMessage, EnergyReport, EnergyReportShard, Entity, Gateway, Group, Identification, Integration, Issue, Lock, Log, MediaFile, MediaSource, MotionSensor, Notification, Order, Organization, Payment, Policy, Product, Property, Reservation, Server, Session, ShortLink, SmsMessage, Space, Switch, System, SystemUser, Thermostat, Ticket, TimeSheet, User, Vendor, WindowCovering, models_exports };
|
|
100
|
+
export { Alarm, Announcement, Automation, Camera, Category, Courtesy, Credential, Department, Dimmer, DiscoveredDevice, EmailMessage, EnergyReport, EnergyReportShard, Entity, Gateway, Group, Identification, Integration, Issue, Lock, Log, MediaFile, MediaSource, MotionSensor, Notification, Order, Organization, Payment, Policy, Product, Property, Reservation, SOSType, Server, Session, ShortLink, SmsMessage, Space, Switch, System, SystemUser, Thermostat, Ticket, TimeSheet, User, Vendor, WindowCovering, models_exports };
|
|
99
101
|
|
|
100
102
|
//# sourceMappingURL=index.js.map
|
package/dist/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../.generated/models/index.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport { Entity } from \"./entity.js\";\n\nexport { Alarm, type AlarmData } from \"./alarm.js\";\nexport { Announcement, type AnnouncementData } from \"./announcement.js\";\nexport { Automation, type AutomationData } from \"./automation.js\";\nexport { Camera, type CameraData } from \"./camera.js\";\nexport { Category, type CategoryData } from \"./category.js\";\nexport { Courtesy, type CourtesyData } from \"./courtesy.js\";\nexport { Credential, type CredentialData } from \"./credential.js\";\nexport { Department, type DepartmentData } from \"./department.js\";\nexport { Dimmer, type DimmerData } from \"./dimmer.js\";\nexport {\n DiscoveredDevice,\n type DiscoveredDeviceData,\n} from \"./discoveredDevice.js\";\nexport { EmailMessage, type EmailMessageData } from \"./emailMessage.js\";\nexport { EnergyReport, type EnergyReportData } from \"./energyReport.js\";\nexport {\n EnergyReportShard,\n type EnergyReportShardData,\n} from \"./energyReportShard.js\";\nexport { Gateway, type GatewayData } from \"./gateway.js\";\nexport { Group, type GroupData } from \"./group.js\";\nexport { Identification, type IdentificationData } from \"./identification.js\";\nexport { Integration, type IntegrationData } from \"./integration.js\";\nexport { Issue, type IssueData } from \"./issue.js\";\nexport { Lock, type LockData } from \"./lock.js\";\nexport { Log, type LogData } from \"./log.js\";\nexport { MediaFile, type MediaFileData } from \"./mediaFile.js\";\nexport { MediaSource, type MediaSourceData } from \"./mediaSource.js\";\nexport { MotionSensor, type MotionSensorData } from \"./motionSensor.js\";\nexport { Notification, type NotificationData } from \"./notification.js\";\nexport { Order, type OrderData } from \"./order.js\";\nexport { Organization, type OrganizationData } from \"./organization.js\";\nexport { Payment, type PaymentData } from \"./payment.js\";\nexport { Policy, type PolicyData } from \"./policy.js\";\nexport { Product, type ProductData } from \"./product.js\";\nexport { Property, type PropertyData } from \"./property.js\";\nexport { Reservation, type ReservationData } from \"./reservation.js\";\nexport { Server, type ServerData } from \"./server.js\";\nexport { Session, type SessionData } from \"./session.js\";\nexport { ShortLink, type ShortLinkData } from \"./shortLink.js\";\nexport { SmsMessage, type SmsMessageData } from \"./smsMessage.js\";\nexport { Space, type SpaceData } from \"./space.js\";\nexport { Switch, type SwitchData } from \"./switch.js\";\nexport { System, type SystemData } from \"./system.js\";\nexport { SystemUser, type SystemUserData } from \"./systemUser.js\";\nexport { Thermostat, type ThermostatData } from \"./thermostat.js\";\nexport { Ticket, type TicketData } from \"./ticket.js\";\nexport { TimeSheet, type TimeSheetData } from \"./timeSheet.js\";\nexport { User, type UserData } from \"./user.js\";\nexport { Vendor, type VendorData } from \"./vendor.js\";\nexport { WindowCovering, type WindowCoveringData } from \"./windowCovering.js\";\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../.generated/models/index.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport { Entity } from \"./entity.js\";\n\nexport { Alarm, type AlarmData } from \"./alarm.js\";\nexport { Announcement, type AnnouncementData } from \"./announcement.js\";\nexport { Automation, type AutomationData } from \"./automation.js\";\nexport { Camera, type CameraData } from \"./camera.js\";\nexport { Category, type CategoryData } from \"./category.js\";\nexport { Courtesy, type CourtesyData } from \"./courtesy.js\";\nexport { Credential, type CredentialData } from \"./credential.js\";\nexport { Department, type DepartmentData } from \"./department.js\";\nexport { Dimmer, type DimmerData } from \"./dimmer.js\";\nexport {\n DiscoveredDevice,\n type DiscoveredDeviceData,\n} from \"./discoveredDevice.js\";\nexport { EmailMessage, type EmailMessageData } from \"./emailMessage.js\";\nexport { EnergyReport, type EnergyReportData } from \"./energyReport.js\";\nexport {\n EnergyReportShard,\n type EnergyReportShardData,\n} from \"./energyReportShard.js\";\nexport { Gateway, type GatewayData } from \"./gateway.js\";\nexport { Group, type GroupData } from \"./group.js\";\nexport { Identification, type IdentificationData } from \"./identification.js\";\nexport { Integration, type IntegrationData } from \"./integration.js\";\nexport { Issue, type IssueData } from \"./issue.js\";\nexport { Lock, type LockData } from \"./lock.js\";\nexport { Log, type LogData } from \"./log.js\";\nexport { MediaFile, type MediaFileData } from \"./mediaFile.js\";\nexport { MediaSource, type MediaSourceData } from \"./mediaSource.js\";\nexport { MotionSensor, type MotionSensorData } from \"./motionSensor.js\";\nexport { Notification, type NotificationData } from \"./notification.js\";\nexport { Order, type OrderData } from \"./order.js\";\nexport { Organization, type OrganizationData } from \"./organization.js\";\nexport { Payment, type PaymentData } from \"./payment.js\";\nexport { Policy, type PolicyData } from \"./policy.js\";\nexport { Product, type ProductData } from \"./product.js\";\nexport { Property, type PropertyData } from \"./property.js\";\nexport { Reservation, type ReservationData } from \"./reservation.js\";\nexport { Server, type ServerData } from \"./server.js\";\nexport { Session, type SessionData } from \"./session.js\";\nexport { ShortLink, type ShortLinkData } from \"./shortLink.js\";\nexport { SmsMessage, type SmsMessageData } from \"./smsMessage.js\";\nexport { SOSType, type SOSTypeData } from \"./sosType.js\";\nexport { Space, type SpaceData } from \"./space.js\";\nexport { Switch, type SwitchData } from \"./switch.js\";\nexport { System, type SystemData } from \"./system.js\";\nexport { SystemUser, type SystemUserData } from \"./systemUser.js\";\nexport { Thermostat, type ThermostatData } from \"./thermostat.js\";\nexport { Ticket, type TicketData } from \"./ticket.js\";\nexport { TimeSheet, type TimeSheetData } from \"./timeSheet.js\";\nexport { User, type UserData } from \"./user.js\";\nexport { Vendor, type VendorData } from \"./vendor.js\";\nexport { WindowCovering, type WindowCoveringData } from \"./windowCovering.js\";\n"],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Entity } from "./entity.js";
|
|
2
|
+
import { validateSOSType as validate } from "../validate.js";
|
|
3
|
+
import { sosTypeSchema, type SOSTypeSchema } from "../schemas/sosType.js";
|
|
4
|
+
/**
|
|
5
|
+
* Data type for SOSType constructor - exported for backwards compatibility
|
|
6
|
+
*/
|
|
7
|
+
export type SOSTypeData = SOSTypeSchema;
|
|
8
|
+
/**
|
|
9
|
+
* A customizable emergency category in an organization's SOS library.
|
|
10
|
+
*/
|
|
11
|
+
export interface SOSType extends SOSTypeSchema {
|
|
12
|
+
}
|
|
13
|
+
export declare class SOSType extends Entity {
|
|
14
|
+
schema: typeof sosTypeSchema;
|
|
15
|
+
validator: typeof validate;
|
|
16
|
+
constructor(data: SOSTypeSchema);
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Entity } from "./entity.js";
|
|
2
|
+
import { sosTypeSchema } from "../schemas/sosType.js";
|
|
3
|
+
import { validateSOSType } from "../validate.js";
|
|
4
|
+
//#region .generated/models/sosType.ts
|
|
5
|
+
var SOSType = class extends Entity {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
super(data);
|
|
8
|
+
this.id = data.id;
|
|
9
|
+
this.name = data.name;
|
|
10
|
+
this.nameKey = data.nameKey;
|
|
11
|
+
this.iconKey = data.iconKey;
|
|
12
|
+
this.scope = data.scope;
|
|
13
|
+
if (data.createdAt !== void 0) this.createdAt = data.createdAt;
|
|
14
|
+
if (data.updatedAt !== void 0) this.updatedAt = data.updatedAt;
|
|
15
|
+
if (data.deletedAt !== void 0) this.deletedAt = data.deletedAt;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(SOSType.prototype, "schema", { value: sosTypeSchema });
|
|
19
|
+
Object.defineProperty(SOSType.prototype, "validator", { get: function() {
|
|
20
|
+
return validateSOSType;
|
|
21
|
+
} });
|
|
22
|
+
//#endregion
|
|
23
|
+
export { SOSType };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=sosType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sosType.js","names":["validate"],"sources":["../../.generated/models/sosType.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateSOSType as validate } from \"../validate.js\";\nimport { sosTypeSchema, type SOSTypeSchema } from \"../schemas/sosType.js\";\n\n/**\n * Data type for SOSType constructor - exported for backwards compatibility\n */\nexport type SOSTypeData = SOSTypeSchema;\n\n/**\n * A customizable emergency category in an organization's SOS library.\n */\nexport interface SOSType extends SOSTypeSchema {}\nexport class SOSType extends Entity {\n declare schema: typeof sosTypeSchema;\n declare validator: typeof validate;\n\n constructor(data: SOSTypeSchema) {\n super(data);\n this.id = data.id;\n this.name = data.name;\n this.nameKey = data.nameKey;\n this.iconKey = data.iconKey;\n this.scope = data.scope;\n if (data.createdAt !== undefined) this.createdAt = data.createdAt;\n if (data.updatedAt !== undefined) this.updatedAt = data.updatedAt;\n if (data.deletedAt !== undefined) this.deletedAt = data.deletedAt;\n }\n}\n\nObject.defineProperty(SOSType.prototype, \"schema\", {\n value: sosTypeSchema,\n});\n\nObject.defineProperty(SOSType.prototype, \"validator\", {\n get: function () {\n return validate;\n },\n});\n"],"mappings":";;;;AAeA,IAAa,UAAb,cAA6B,OAAO;CAIlC,YAAY,MAAqB;EAC/B,MAAM,IAAI;EACV,KAAK,KAAK,KAAK;EACf,KAAK,OAAO,KAAK;EACjB,KAAK,UAAU,KAAK;EACpB,KAAK,UAAU,KAAK;EACpB,KAAK,QAAQ,KAAK;EAClB,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;EACxD,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;EACxD,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;CAC1D;AACF;AAEA,OAAO,eAAe,QAAQ,WAAW,UAAU,EACjD,OAAO,cACT,CAAC;AAED,OAAO,eAAe,QAAQ,WAAW,aAAa,EACpD,KAAK,WAAY;CACf,OAAOA;AACT,EACF,CAAC"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export { serverSchema, type ServerSchema } from "./server.js";
|
|
|
33
33
|
export { sessionSchema, type SessionSchema } from "./session.js";
|
|
34
34
|
export { shortLinkSchema, type ShortLinkSchema } from "./shortLink.js";
|
|
35
35
|
export { smsMessageSchema, type SmsMessageSchema } from "./smsMessage.js";
|
|
36
|
+
export { sosTypeSchema, type SOSTypeSchema } from "./sosType.js";
|
|
36
37
|
export { spaceSchema, type SpaceSchema } from "./space.js";
|
|
37
38
|
export { switchSchema, type SwitchSchema } from "./switch.js";
|
|
38
39
|
export { systemSchema, type SystemSchema } from "./system.js";
|
package/dist/schemas/index.js
CHANGED
|
@@ -33,6 +33,7 @@ import { serverSchema } from "./server.js";
|
|
|
33
33
|
import { sessionSchema } from "./session.js";
|
|
34
34
|
import { shortLinkSchema } from "./shortLink.js";
|
|
35
35
|
import { smsMessageSchema } from "./smsMessage.js";
|
|
36
|
+
import { sosTypeSchema } from "./sosType.js";
|
|
36
37
|
import { spaceSchema } from "./space.js";
|
|
37
38
|
import { switchSchema } from "./switch.js";
|
|
38
39
|
import { systemSchema } from "./system.js";
|
|
@@ -43,4 +44,4 @@ import { timeSheetSchema } from "./timeSheet.js";
|
|
|
43
44
|
import { getters, userSchema } from "./user.js";
|
|
44
45
|
import { vendorSchema } from "./vendor.js";
|
|
45
46
|
import { windowCoveringSchema } from "./windowCovering.js";
|
|
46
|
-
export { alarmSchema, announcementSchema, automationSchema, cameraSchema, categorySchema, courtesySchema, credentialSchema, departmentSchema, dimmerSchema, discoveredDeviceSchema, emailMessageSchema, energyReportSchema, energyReportShardSchema, gatewaySchema, groupSchema, identificationSchema, integrationSchema, issueSchema, lockSchema, logSchema, methods as mediaFileMethods, mediaFileSchema, mediaSourceSchema, motionSensorSchema, notificationSchema, orderSchema, organizationSchema, paymentSchema, policySchema, productSchema, propertySchema, reservationSchema, serverSchema, sessionSchema, shortLinkSchema, smsMessageSchema, spaceSchema, switchSchema, systemSchema, systemUserSchema, thermostatSchema, ticketSchema, timeSheetSchema, getters as userGetters, userSchema, vendorSchema, windowCoveringSchema };
|
|
47
|
+
export { alarmSchema, announcementSchema, automationSchema, cameraSchema, categorySchema, courtesySchema, credentialSchema, departmentSchema, dimmerSchema, discoveredDeviceSchema, emailMessageSchema, energyReportSchema, energyReportShardSchema, gatewaySchema, groupSchema, identificationSchema, integrationSchema, issueSchema, lockSchema, logSchema, methods as mediaFileMethods, mediaFileSchema, mediaSourceSchema, motionSensorSchema, notificationSchema, orderSchema, organizationSchema, paymentSchema, policySchema, productSchema, propertySchema, reservationSchema, serverSchema, sessionSchema, shortLinkSchema, smsMessageSchema, sosTypeSchema, spaceSchema, switchSchema, systemSchema, systemUserSchema, thermostatSchema, ticketSchema, timeSheetSchema, getters as userGetters, userSchema, vendorSchema, windowCoveringSchema };
|
|
@@ -183,6 +183,25 @@ export declare const organizationSchema: {
|
|
|
183
183
|
};
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
|
+
readonly SOS: {
|
|
187
|
+
readonly type: "object";
|
|
188
|
+
readonly additionalProperties: false;
|
|
189
|
+
readonly properties: {
|
|
190
|
+
readonly types: {
|
|
191
|
+
readonly type: "object";
|
|
192
|
+
readonly additionalProperties: false;
|
|
193
|
+
readonly properties: {
|
|
194
|
+
readonly order: {
|
|
195
|
+
readonly type: "array";
|
|
196
|
+
readonly description: string;
|
|
197
|
+
readonly items: {
|
|
198
|
+
readonly type: "string";
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
186
205
|
};
|
|
187
206
|
};
|
|
188
207
|
readonly credentials: {
|
|
@@ -107,40 +107,55 @@ const organizationSchema = {
|
|
|
107
107
|
features: {
|
|
108
108
|
type: "object",
|
|
109
109
|
additionalProperties: false,
|
|
110
|
-
properties: {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
110
|
+
properties: {
|
|
111
|
+
Concierge: {
|
|
112
|
+
type: "object",
|
|
113
|
+
additionalProperties: false,
|
|
114
|
+
properties: {
|
|
115
|
+
tickets: {
|
|
116
|
+
type: "object",
|
|
117
|
+
properties: { nextTicketNumber: {
|
|
118
|
+
type: ["string", "integer"],
|
|
119
|
+
default: 1
|
|
120
|
+
} }
|
|
121
|
+
},
|
|
122
|
+
departments: {
|
|
123
|
+
type: "object",
|
|
124
|
+
additionalProperties: false,
|
|
125
|
+
properties: { order: {
|
|
126
|
+
type: "array",
|
|
127
|
+
description: "Org-wide curated Department ID order for the Concierge settings UI. The `Unassigned` and `System` pseudo-groups are pinned at the bottom by the UI and have no entries here.",
|
|
128
|
+
items: { type: "string" }
|
|
129
|
+
} }
|
|
130
|
+
},
|
|
131
|
+
issues: {
|
|
132
|
+
type: "object",
|
|
133
|
+
additionalProperties: false,
|
|
134
|
+
properties: { order: {
|
|
135
|
+
type: "object",
|
|
136
|
+
description: "Org-wide curated Issue ordering for the Concierge settings UI, mapping each Department ID to its ordered Issue IDs.",
|
|
137
|
+
additionalProperties: {
|
|
138
|
+
type: "array",
|
|
139
|
+
items: { type: "string" }
|
|
140
|
+
}
|
|
141
|
+
} }
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
SOS: {
|
|
146
|
+
type: "object",
|
|
147
|
+
additionalProperties: false,
|
|
148
|
+
properties: { types: {
|
|
122
149
|
type: "object",
|
|
123
150
|
additionalProperties: false,
|
|
124
151
|
properties: { order: {
|
|
125
152
|
type: "array",
|
|
126
|
-
description: "Org-wide curated
|
|
153
|
+
description: "Org-wide curated SOS Type ID order. Each Property renders its subset of SOS Types in this order; org-wide and per-property-selected types share one order. IDs for deleted SOS Types are ignored on read; SOS Types not yet listed sort to the end alphabetically.",
|
|
127
154
|
items: { type: "string" }
|
|
128
155
|
} }
|
|
129
|
-
}
|
|
130
|
-
issues: {
|
|
131
|
-
type: "object",
|
|
132
|
-
additionalProperties: false,
|
|
133
|
-
properties: { order: {
|
|
134
|
-
type: "object",
|
|
135
|
-
description: "Org-wide curated Issue ordering for the Concierge settings UI, mapping each Department ID to its ordered Issue IDs.",
|
|
136
|
-
additionalProperties: {
|
|
137
|
-
type: "array",
|
|
138
|
-
items: { type: "string" }
|
|
139
|
-
}
|
|
140
|
-
} }
|
|
141
|
-
}
|
|
156
|
+
} }
|
|
142
157
|
}
|
|
143
|
-
}
|
|
158
|
+
}
|
|
144
159
|
},
|
|
145
160
|
credentials: {
|
|
146
161
|
type: "object",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.js","names":[],"sources":["../../.generated/schemas/organization.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const organizationSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"organization.json\",\n title: \"Organization\",\n type: \"object\",\n description:\n \"An organization is a group or entity that subscribes to Kohost software.\",\n required: [\"id\", \"type\", \"accountNumber\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"organization\",\n enum: [\"organization\"],\n },\n accountNumber: {\n type: [\"number\", \"null\"],\n },\n name: {\n type: \"string\",\n },\n smsNumber: {\n type: \"string\",\n },\n properties: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n appManifest: {\n type: \"object\",\n\n properties: {\n name: {\n type: \"string\",\n },\n short_name: {\n type: \"string\",\n },\n scope: {\n type: \"string\",\n },\n start_url: {\n type: \"string\",\n },\n themeColor: {\n type: \"string\",\n },\n backgroundColor: {\n type: \"string\",\n },\n display: {\n type: \"string\",\n enum: [\"fullscreen\", \"standalone\", \"minimal-ui\", \"browser\"],\n default: \"fullscreen\",\n },\n orientation: {\n type: \"string\",\n enum: [\"portrait\", \"landscape\"],\n default: \"portrait\",\n },\n splash: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n },\n },\n icons: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n },\n },\n },\n logo: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n },\n },\n },\n default: {\n name: \"Kohost\",\n short_name: \"Kohost\",\n start_url: \"/\",\n scope: \"/\",\n display: \"fullscreen\",\n orientation: \"portrait\",\n theme_color: \"#1d1f22\",\n background_color: \"#1d1f22\",\n icons: [\n {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512\",\n sizes: \"512x512\",\n type: \"image/png\",\n },\n ],\n splash: {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500\",\n sizes: \"1500x800\",\n type: \"image/jpg\",\n },\n logo: {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75\",\n sizes: \"300x75\",\n type: \"image/png\",\n },\n },\n },\n features: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n Concierge: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n tickets: {\n type: \"object\",\n properties: {\n nextTicketNumber: {\n type: [\"string\", \"integer\"],\n default: 1,\n },\n },\n },\n departments: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"array\",\n description:\n \"Org-wide curated Department ID order for the Concierge settings UI. The `Unassigned` and `System` pseudo-groups are pinned at the bottom by the UI and have no entries here.\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n issues: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"object\",\n description:\n \"Org-wide curated Issue ordering for the Concierge settings UI, mapping each Department ID to its ordered Issue IDs.\",\n additionalProperties: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n },\n },\n },\n },\n },\n credentials: {\n type: \"object\",\n additionalProperties: true,\n properties: {\n webhookToken: { type: \"string\" },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type OrganizationSchema = FromSchema<\n typeof organizationSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,qBAAqB;CAChC,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAM;EAAQ;EAAiB;CAAM;CAChD,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,cAAc;EACvB;EACA,eAAe,EACb,MAAM,CAAC,UAAU,MAAM,EACzB;EACA,MAAM,EACJ,MAAM,SACR;EACA,WAAW,EACT,MAAM,SACR;EACA,YAAY;GACV,MAAM;GACN,OAAO,EACL,MAAM,SACR;EACF;EACA,aAAa;GACX,MAAM;GAEN,YAAY;IACV,MAAM,EACJ,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,WAAW,EACT,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,iBAAiB,EACf,MAAM,SACR;IACA,SAAS;KACP,MAAM;KACN,MAAM;MAAC;MAAc;MAAc;MAAc;KAAS;KAC1D,SAAS;IACX;IACA,aAAa;KACX,MAAM;KACN,MAAM,CAAC,YAAY,WAAW;KAC9B,SAAS;IACX;IACA,QAAQ;KACN,MAAM;KACN,YAAY;MACV,KAAK,EACH,MAAM,SACR;MACA,MAAM,EACJ,MAAM,SACR;MACA,OAAO,EACL,MAAM,SACR;KACF;IACF;IACA,OAAO;KACL,MAAM;KACN,OAAO;MACL,MAAM;MACN,YAAY;OACV,KAAK,EACH,MAAM,SACR;OACA,OAAO,EACL,MAAM,SACR;OACA,MAAM,EACJ,MAAM,SACR;MACF;KACF;IACF;IACA,MAAM;KACJ,MAAM;KACN,YAAY;MACV,KAAK,EACH,MAAM,SACR;MACA,MAAM,EACJ,MAAM,SACR;MACA,OAAO,EACL,MAAM,SACR;KACF;IACF;GACF;GACA,SAAS;IACP,MAAM;IACN,YAAY;IACZ,WAAW;IACX,OAAO;IACP,SAAS;IACT,aAAa;IACb,aAAa;IACb,kBAAkB;IAClB,OAAO,CACL;KACE,KAAK;KACL,OAAO;KACP,MAAM;IACR,CACF;IACA,QAAQ;KACN,KAAK;KACL,OAAO;KACP,MAAM;IACR;IACA,MAAM;KACJ,KAAK;KACL,OAAO;KACP,MAAM;IACR;GACF;EACF;EACA,UAAU;GACR,MAAM;GACN,sBAAsB;GACtB,YAAY,
|
|
1
|
+
{"version":3,"file":"organization.js","names":[],"sources":["../../.generated/schemas/organization.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const organizationSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"organization.json\",\n title: \"Organization\",\n type: \"object\",\n description:\n \"An organization is a group or entity that subscribes to Kohost software.\",\n required: [\"id\", \"type\", \"accountNumber\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"organization\",\n enum: [\"organization\"],\n },\n accountNumber: {\n type: [\"number\", \"null\"],\n },\n name: {\n type: \"string\",\n },\n smsNumber: {\n type: \"string\",\n },\n properties: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n appManifest: {\n type: \"object\",\n\n properties: {\n name: {\n type: \"string\",\n },\n short_name: {\n type: \"string\",\n },\n scope: {\n type: \"string\",\n },\n start_url: {\n type: \"string\",\n },\n themeColor: {\n type: \"string\",\n },\n backgroundColor: {\n type: \"string\",\n },\n display: {\n type: \"string\",\n enum: [\"fullscreen\", \"standalone\", \"minimal-ui\", \"browser\"],\n default: \"fullscreen\",\n },\n orientation: {\n type: \"string\",\n enum: [\"portrait\", \"landscape\"],\n default: \"portrait\",\n },\n splash: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n },\n },\n icons: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n },\n },\n },\n logo: {\n type: \"object\",\n properties: {\n src: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n sizes: {\n type: \"string\",\n },\n },\n },\n },\n default: {\n name: \"Kohost\",\n short_name: \"Kohost\",\n start_url: \"/\",\n scope: \"/\",\n display: \"fullscreen\",\n orientation: \"portrait\",\n theme_color: \"#1d1f22\",\n background_color: \"#1d1f22\",\n icons: [\n {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512\",\n sizes: \"512x512\",\n type: \"image/png\",\n },\n ],\n splash: {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500\",\n sizes: \"1500x800\",\n type: \"image/jpg\",\n },\n logo: {\n src: \"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75\",\n sizes: \"300x75\",\n type: \"image/png\",\n },\n },\n },\n features: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n Concierge: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n tickets: {\n type: \"object\",\n properties: {\n nextTicketNumber: {\n type: [\"string\", \"integer\"],\n default: 1,\n },\n },\n },\n departments: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"array\",\n description:\n \"Org-wide curated Department ID order for the Concierge settings UI. The `Unassigned` and `System` pseudo-groups are pinned at the bottom by the UI and have no entries here.\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n issues: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"object\",\n description:\n \"Org-wide curated Issue ordering for the Concierge settings UI, mapping each Department ID to its ordered Issue IDs.\",\n additionalProperties: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n },\n },\n },\n SOS: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n types: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"array\",\n description:\n \"Org-wide curated SOS Type ID order. Each Property renders its subset of \" +\n \"SOS Types in this order; org-wide and per-property-selected types share one \" +\n \"order. IDs for deleted SOS Types are ignored on read; SOS Types not yet listed \" +\n \"sort to the end alphabetically.\",\n items: { type: \"string\" },\n },\n },\n },\n },\n },\n },\n },\n credentials: {\n type: \"object\",\n additionalProperties: true,\n properties: {\n webhookToken: { type: \"string\" },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type OrganizationSchema = FromSchema<\n typeof organizationSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,qBAAqB;CAChC,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAM;EAAQ;EAAiB;CAAM;CAChD,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,cAAc;EACvB;EACA,eAAe,EACb,MAAM,CAAC,UAAU,MAAM,EACzB;EACA,MAAM,EACJ,MAAM,SACR;EACA,WAAW,EACT,MAAM,SACR;EACA,YAAY;GACV,MAAM;GACN,OAAO,EACL,MAAM,SACR;EACF;EACA,aAAa;GACX,MAAM;GAEN,YAAY;IACV,MAAM,EACJ,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,WAAW,EACT,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,iBAAiB,EACf,MAAM,SACR;IACA,SAAS;KACP,MAAM;KACN,MAAM;MAAC;MAAc;MAAc;MAAc;KAAS;KAC1D,SAAS;IACX;IACA,aAAa;KACX,MAAM;KACN,MAAM,CAAC,YAAY,WAAW;KAC9B,SAAS;IACX;IACA,QAAQ;KACN,MAAM;KACN,YAAY;MACV,KAAK,EACH,MAAM,SACR;MACA,MAAM,EACJ,MAAM,SACR;MACA,OAAO,EACL,MAAM,SACR;KACF;IACF;IACA,OAAO;KACL,MAAM;KACN,OAAO;MACL,MAAM;MACN,YAAY;OACV,KAAK,EACH,MAAM,SACR;OACA,OAAO,EACL,MAAM,SACR;OACA,MAAM,EACJ,MAAM,SACR;MACF;KACF;IACF;IACA,MAAM;KACJ,MAAM;KACN,YAAY;MACV,KAAK,EACH,MAAM,SACR;MACA,MAAM,EACJ,MAAM,SACR;MACA,OAAO,EACL,MAAM,SACR;KACF;IACF;GACF;GACA,SAAS;IACP,MAAM;IACN,YAAY;IACZ,WAAW;IACX,OAAO;IACP,SAAS;IACT,aAAa;IACb,aAAa;IACb,kBAAkB;IAClB,OAAO,CACL;KACE,KAAK;KACL,OAAO;KACP,MAAM;IACR,CACF;IACA,QAAQ;KACN,KAAK;KACL,OAAO;KACP,MAAM;IACR;IACA,MAAM;KACJ,KAAK;KACL,OAAO;KACP,MAAM;IACR;GACF;EACF;EACA,UAAU;GACR,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,WAAW;KACT,MAAM;KACN,sBAAsB;KACtB,YAAY;MACV,SAAS;OACP,MAAM;OACN,YAAY,EACV,kBAAkB;QAChB,MAAM,CAAC,UAAU,SAAS;QAC1B,SAAS;OACX,EACF;MACF;MACA,aAAa;OACX,MAAM;OACN,sBAAsB;OACtB,YAAY,EACV,OAAO;QACL,MAAM;QACN,aACE;QACF,OAAO,EACL,MAAM,SACR;OACF,EACF;MACF;MACA,QAAQ;OACN,MAAM;OACN,sBAAsB;OACtB,YAAY,EACV,OAAO;QACL,MAAM;QACN,aACE;QACF,sBAAsB;SACpB,MAAM;SACN,OAAO,EACL,MAAM,SACR;QACF;OACF,EACF;MACF;KACF;IACF;IACA,KAAK;KACH,MAAM;KACN,sBAAsB;KACtB,YAAY,EACV,OAAO;MACL,MAAM;MACN,sBAAsB;MACtB,YAAY,EACV,OAAO;OACL,MAAM;OACN,aACE;OAIF,OAAO,EAAE,MAAM,SAAS;MAC1B,EACF;KACF,EACF;IACF;GACF;EACF;EACA,aAAa;GACX,MAAM;GACN,sBAAsB;GACtB,YAAY,EACV,cAAc,EAAE,MAAM,SAAS,EACjC;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
|
|
@@ -196,11 +196,10 @@ export declare const propertySchema: {
|
|
|
196
196
|
readonly activatedMessage: {
|
|
197
197
|
readonly type: readonly ["string", "null"];
|
|
198
198
|
};
|
|
199
|
-
readonly
|
|
199
|
+
readonly activeSOSTypeIds: {
|
|
200
200
|
readonly type: "array";
|
|
201
201
|
readonly items: {
|
|
202
202
|
readonly type: "string";
|
|
203
|
-
readonly enum: readonly ["medical", "fire", "suspiciousPerson", "other", "conflict", "shooter"];
|
|
204
203
|
};
|
|
205
204
|
};
|
|
206
205
|
readonly deactivatedAt: {
|
package/dist/schemas/property.js
CHANGED
|
@@ -156,19 +156,9 @@ const propertySchema = {
|
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
158
|
activatedMessage: { type: ["string", "null"] },
|
|
159
|
-
|
|
159
|
+
activeSOSTypeIds: {
|
|
160
160
|
type: "array",
|
|
161
|
-
items: {
|
|
162
|
-
type: "string",
|
|
163
|
-
enum: [
|
|
164
|
-
"medical",
|
|
165
|
-
"fire",
|
|
166
|
-
"suspiciousPerson",
|
|
167
|
-
"other",
|
|
168
|
-
"conflict",
|
|
169
|
-
"shooter"
|
|
170
|
-
]
|
|
171
|
-
}
|
|
161
|
+
items: { type: "string" }
|
|
172
162
|
},
|
|
173
163
|
deactivatedAt: {
|
|
174
164
|
type: ["string", "null"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property.js","names":[],"sources":["../../.generated/schemas/property.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const propertySchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"property.json\",\n title: \"Property\",\n type: \"object\",\n description: \"A property is a physical asset or building\",\n required: [\"id\", \"name\", \"type\", \"organization\", \"timezone\", \"discriminator\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n default: \"property\",\n enum: [\"property\"],\n },\n discriminator: {\n type: \"string\",\n enum: [\"education\", \"commercial\"],\n },\n organization: {\n type: \"string\",\n description: \"Reference (id) to the organization that owns this property\",\n },\n testModeEnabled: {\n type: \"boolean\",\n },\n testMode: {\n type: \"object\",\n properties: {\n notificationEmails: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n description:\n \"Only users with these email addresses will receive notifications in test mode, including sms, email, or push.\",\n },\n notificationEmailDomains: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n description:\n \"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push.\",\n },\n },\n },\n timezone: {\n type: \"string\",\n description: \"IANA timezone string\",\n pattern: \"^([a-zA-Z]+/[a-zA-Z_]+)$\",\n examples: [\"America/New_York\", \"America/Los_Angeles\"],\n },\n smsNumber: {\n type: \"string\",\n },\n voiceNumber: {\n type: \"string\",\n },\n tags: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n address: {\n $ref: \"definitions.json#/definitions/address\",\n },\n latitude: {\n type: \"number\",\n },\n longitude: {\n type: \"number\",\n },\n features: {\n type: \"object\",\n properties: {\n SmartBuilding: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n alarmConfig: {\n type: \"object\",\n patternProperties: {\n \"^[a-zA-Z0-9]+$\": {\n type: \"object\",\n properties: {\n zoneLockMap: {\n type: \"object\",\n description: \"Maps zone numbers to lock ids\",\n additionalProperties: { type: \"string\" },\n },\n },\n },\n },\n examples: [\n {\n wZz7hucY: {\n zoneLockMap: {\n 1: \"wc87hucc\",\n 2: \"bc86hzxc\",\n 3: \"zv5ah5jv\",\n },\n },\n },\n ],\n },\n cameraConfig: {\n type: \"object\",\n doorStationConfig: {\n type: \"object\",\n patternProperties: {\n \"^[a-zA-Z0-9]+$\": {\n type: \"object\",\n properties: {\n lockIds: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n default: [],\n description:\n \"List of lock ids that will be available for control from this door station\",\n },\n },\n },\n },\n },\n examples: [\n {\n wZz7hucY: {\n lockIds: [\"wc87hucb\", \"wc87hucd\"],\n },\n },\n ],\n },\n },\n additionalProperties: false,\n },\n Concierge: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n timeTracking: {\n type: \"boolean\",\n default: false,\n },\n feedback: {\n type: \"boolean\",\n default: true,\n },\n ratings: {\n type: \"boolean\",\n default: true,\n },\n newMessageChannel: {\n type: [\"string\", \"null\"],\n enum: [\"sms\", \"email\"],\n default: \"sms\",\n description:\n \"Determines how users should be notified of new messages in the concierge system\",\n },\n },\n },\n SOS: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n active: {\n type: \"boolean\",\n },\n activatedAt: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n },\n activatedBy: {\n type: [\"object\", \"null\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n enum: [\"user\", \"device\", \"automation\"],\n },\n },\n },\n activatedMessage: {\n type: [\"string\", \"null\"],\n },\n activeEmergencies: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\n \"medical\",\n \"fire\",\n \"suspiciousPerson\",\n \"other\",\n \"conflict\",\n \"shooter\",\n ],\n },\n },\n deactivatedAt: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n },\n deactivatedBy: {\n type: [\"object\", \"null\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n enum: [\"user\", \"device\", \"automation\"],\n },\n },\n },\n },\n },\n Automations: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n Resources: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n default: {\n SmartBuilding: {},\n },\n },\n notifications: {\n type: \"object\",\n properties: {\n email: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n sms: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n push: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n default: {\n email: {\n enabled: false,\n },\n sms: {\n enabled: false,\n },\n push: {\n enabled: false,\n },\n },\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n credentials: {\n type: \"object\",\n additionalProperties: true,\n },\n },\n} as const;\n\nexport type PropertySchema = FromSchema<\n typeof propertySchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,iBAAiB;CAC5B,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,aAAa;CACb,UAAU;EAAC;EAAM;EAAQ;EAAQ;EAAgB;EAAY;CAAe;CAC5E,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM,EACJ,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,UAAU;EACnB;EACA,eAAe;GACb,MAAM;GACN,MAAM,CAAC,aAAa,YAAY;EAClC;EACA,cAAc;GACZ,MAAM;GACN,aAAa;EACf;EACA,iBAAiB,EACf,MAAM,UACR;EACA,UAAU;GACR,MAAM;GACN,YAAY;IACV,oBAAoB;KAClB,MAAM;KACN,OAAO,EACL,MAAM,SACR;KACA,aACE;IACJ;IACA,0BAA0B;KACxB,MAAM;KACN,OAAO,EACL,MAAM,SACR;KACA,aACE;IACJ;GACF;EACF;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,SAAS;GACT,UAAU,CAAC,oBAAoB,qBAAqB;EACtD;EACA,WAAW,EACT,MAAM,SACR;EACA,aAAa,EACX,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,OAAO,EACL,MAAM,SACR;EACF;EACA,SAAS,EACP,MAAM,wCACR;EACA,UAAU,EACR,MAAM,SACR;EACA,WAAW,EACT,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,YAAY;IACV,eAAe;KACb,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,aAAa;OACX,MAAM;OACN,mBAAmB,EACjB,kBAAkB;QAChB,MAAM;QACN,YAAY,EACV,aAAa;SACX,MAAM;SACN,aAAa;SACb,sBAAsB,EAAE,MAAM,SAAS;QACzC,EACF;OACF,EACF;OACA,UAAU,CACR,EACE,UAAU,EACR,aAAa;QACX,GAAG;QACH,GAAG;QACH,GAAG;OACL,EACF,EACF,CACF;MACF;MACA,cAAc;OACZ,MAAM;OACN,mBAAmB;QACjB,MAAM;QACN,mBAAmB,EACjB,kBAAkB;SAChB,MAAM;SACN,YAAY,EACV,SAAS;UACP,MAAM;UACN,OAAO,EACL,MAAM,SACR;UACA,SAAS,CAAC;UACV,aACE;SACJ,EACF;QACF,EACF;OACF;OACA,UAAU,CACR,EACE,UAAU,EACR,SAAS,CAAC,YAAY,UAAU,EAClC,EACF,CACF;MACF;KACF;KACA,sBAAsB;IACxB;IACA,WAAW;KACT,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,cAAc;OACZ,MAAM;OACN,SAAS;MACX;MACA,UAAU;OACR,MAAM;OACN,SAAS;MACX;MACA,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,mBAAmB;OACjB,MAAM,CAAC,UAAU,MAAM;OACvB,MAAM,CAAC,OAAO,OAAO;OACrB,SAAS;OACT,aACE;MACJ;KACF;IACF;IACA,KAAK;KACH,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,QAAQ,EACN,MAAM,UACR;MACA,aAAa;OACX,MAAM,CAAC,UAAU,MAAM;OACvB,QAAQ;MACV;MACA,aAAa;OACX,MAAM,CAAC,UAAU,MAAM;OACvB,YAAY;QACV,IAAI,EACF,MAAM,SACR;QACA,eAAe,EACb,MAAM;SAAC;SAAQ;SAAU;QAAY,EACvC;OACF;MACF;MACA,kBAAkB,EAChB,MAAM,CAAC,UAAU,MAAM,EACzB;MACA,mBAAmB;OACjB,MAAM;OACN,OAAO;QACL,MAAM;QACN,MAAM;SACJ;SACA;SACA;SACA;SACA;SACA;QACF;OACF;MACF;MACA,eAAe;OACb,MAAM,CAAC,UAAU,MAAM;OACvB,QAAQ;MACV;MACA,eAAe;OACb,MAAM,CAAC,UAAU,MAAM;OACvB,YAAY;QACV,IAAI,EACF,MAAM,SACR;QACA,eAAe,EACb,MAAM;SAAC;SAAQ;SAAU;QAAY,EACvC;OACF;MACF;KACF;IACF;IACA,aAAa;KACX,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,WAAW;KACT,MAAM;KACN,YAAY,EACV,SAAS;MACP,MAAM;MACN,SAAS;KACX,EACF;KACA,sBAAsB;IACxB;GACF;GACA,sBAAsB;GACtB,SAAS,EACP,eAAe,CAAC,EAClB;EACF;EACA,eAAe;GACb,MAAM;GACN,YAAY;IACV,OAAO;KACL,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,KAAK;KACH,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,MAAM;KACJ,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;GACF;GACA,sBAAsB;GACtB,SAAS;IACP,OAAO,EACL,SAAS,MACX;IACA,KAAK,EACH,SAAS,MACX;IACA,MAAM,EACJ,SAAS,MACX;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,aAAa;GACX,MAAM;GACN,sBAAsB;EACxB;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"property.js","names":[],"sources":["../../.generated/schemas/property.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const propertySchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"property.json\",\n title: \"Property\",\n type: \"object\",\n description: \"A property is a physical asset or building\",\n required: [\"id\", \"name\", \"type\", \"organization\", \"timezone\", \"discriminator\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n default: \"property\",\n enum: [\"property\"],\n },\n discriminator: {\n type: \"string\",\n enum: [\"education\", \"commercial\"],\n },\n organization: {\n type: \"string\",\n description: \"Reference (id) to the organization that owns this property\",\n },\n testModeEnabled: {\n type: \"boolean\",\n },\n testMode: {\n type: \"object\",\n properties: {\n notificationEmails: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n description:\n \"Only users with these email addresses will receive notifications in test mode, including sms, email, or push.\",\n },\n notificationEmailDomains: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n description:\n \"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push.\",\n },\n },\n },\n timezone: {\n type: \"string\",\n description: \"IANA timezone string\",\n pattern: \"^([a-zA-Z]+/[a-zA-Z_]+)$\",\n examples: [\"America/New_York\", \"America/Los_Angeles\"],\n },\n smsNumber: {\n type: \"string\",\n },\n voiceNumber: {\n type: \"string\",\n },\n tags: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n address: {\n $ref: \"definitions.json#/definitions/address\",\n },\n latitude: {\n type: \"number\",\n },\n longitude: {\n type: \"number\",\n },\n features: {\n type: \"object\",\n properties: {\n SmartBuilding: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n alarmConfig: {\n type: \"object\",\n patternProperties: {\n \"^[a-zA-Z0-9]+$\": {\n type: \"object\",\n properties: {\n zoneLockMap: {\n type: \"object\",\n description: \"Maps zone numbers to lock ids\",\n additionalProperties: { type: \"string\" },\n },\n },\n },\n },\n examples: [\n {\n wZz7hucY: {\n zoneLockMap: {\n 1: \"wc87hucc\",\n 2: \"bc86hzxc\",\n 3: \"zv5ah5jv\",\n },\n },\n },\n ],\n },\n cameraConfig: {\n type: \"object\",\n doorStationConfig: {\n type: \"object\",\n patternProperties: {\n \"^[a-zA-Z0-9]+$\": {\n type: \"object\",\n properties: {\n lockIds: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n default: [],\n description:\n \"List of lock ids that will be available for control from this door station\",\n },\n },\n },\n },\n },\n examples: [\n {\n wZz7hucY: {\n lockIds: [\"wc87hucb\", \"wc87hucd\"],\n },\n },\n ],\n },\n },\n additionalProperties: false,\n },\n Concierge: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n timeTracking: {\n type: \"boolean\",\n default: false,\n },\n feedback: {\n type: \"boolean\",\n default: true,\n },\n ratings: {\n type: \"boolean\",\n default: true,\n },\n newMessageChannel: {\n type: [\"string\", \"null\"],\n enum: [\"sms\", \"email\"],\n default: \"sms\",\n description:\n \"Determines how users should be notified of new messages in the concierge system\",\n },\n },\n },\n SOS: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n active: {\n type: \"boolean\",\n },\n activatedAt: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n },\n activatedBy: {\n type: [\"object\", \"null\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n enum: [\"user\", \"device\", \"automation\"],\n },\n },\n },\n activatedMessage: {\n type: [\"string\", \"null\"],\n },\n activeSOSTypeIds: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n deactivatedAt: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n },\n deactivatedBy: {\n type: [\"object\", \"null\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n enum: [\"user\", \"device\", \"automation\"],\n },\n },\n },\n },\n },\n Automations: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n Resources: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n default: true,\n },\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n default: {\n SmartBuilding: {},\n },\n },\n notifications: {\n type: \"object\",\n properties: {\n email: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n sms: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n push: {\n type: \"object\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n default: {\n email: {\n enabled: false,\n },\n sms: {\n enabled: false,\n },\n push: {\n enabled: false,\n },\n },\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n credentials: {\n type: \"object\",\n additionalProperties: true,\n },\n },\n} as const;\n\nexport type PropertySchema = FromSchema<\n typeof propertySchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,iBAAiB;CAC5B,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,aAAa;CACb,UAAU;EAAC;EAAM;EAAQ;EAAQ;EAAgB;EAAY;CAAe;CAC5E,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM,EACJ,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,UAAU;EACnB;EACA,eAAe;GACb,MAAM;GACN,MAAM,CAAC,aAAa,YAAY;EAClC;EACA,cAAc;GACZ,MAAM;GACN,aAAa;EACf;EACA,iBAAiB,EACf,MAAM,UACR;EACA,UAAU;GACR,MAAM;GACN,YAAY;IACV,oBAAoB;KAClB,MAAM;KACN,OAAO,EACL,MAAM,SACR;KACA,aACE;IACJ;IACA,0BAA0B;KACxB,MAAM;KACN,OAAO,EACL,MAAM,SACR;KACA,aACE;IACJ;GACF;EACF;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,SAAS;GACT,UAAU,CAAC,oBAAoB,qBAAqB;EACtD;EACA,WAAW,EACT,MAAM,SACR;EACA,aAAa,EACX,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,OAAO,EACL,MAAM,SACR;EACF;EACA,SAAS,EACP,MAAM,wCACR;EACA,UAAU,EACR,MAAM,SACR;EACA,WAAW,EACT,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,YAAY;IACV,eAAe;KACb,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,aAAa;OACX,MAAM;OACN,mBAAmB,EACjB,kBAAkB;QAChB,MAAM;QACN,YAAY,EACV,aAAa;SACX,MAAM;SACN,aAAa;SACb,sBAAsB,EAAE,MAAM,SAAS;QACzC,EACF;OACF,EACF;OACA,UAAU,CACR,EACE,UAAU,EACR,aAAa;QACX,GAAG;QACH,GAAG;QACH,GAAG;OACL,EACF,EACF,CACF;MACF;MACA,cAAc;OACZ,MAAM;OACN,mBAAmB;QACjB,MAAM;QACN,mBAAmB,EACjB,kBAAkB;SAChB,MAAM;SACN,YAAY,EACV,SAAS;UACP,MAAM;UACN,OAAO,EACL,MAAM,SACR;UACA,SAAS,CAAC;UACV,aACE;SACJ,EACF;QACF,EACF;OACF;OACA,UAAU,CACR,EACE,UAAU,EACR,SAAS,CAAC,YAAY,UAAU,EAClC,EACF,CACF;MACF;KACF;KACA,sBAAsB;IACxB;IACA,WAAW;KACT,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,cAAc;OACZ,MAAM;OACN,SAAS;MACX;MACA,UAAU;OACR,MAAM;OACN,SAAS;MACX;MACA,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,mBAAmB;OACjB,MAAM,CAAC,UAAU,MAAM;OACvB,MAAM,CAAC,OAAO,OAAO;OACrB,SAAS;OACT,aACE;MACJ;KACF;IACF;IACA,KAAK;KACH,MAAM;KACN,YAAY;MACV,SAAS;OACP,MAAM;OACN,SAAS;MACX;MACA,QAAQ,EACN,MAAM,UACR;MACA,aAAa;OACX,MAAM,CAAC,UAAU,MAAM;OACvB,QAAQ;MACV;MACA,aAAa;OACX,MAAM,CAAC,UAAU,MAAM;OACvB,YAAY;QACV,IAAI,EACF,MAAM,SACR;QACA,eAAe,EACb,MAAM;SAAC;SAAQ;SAAU;QAAY,EACvC;OACF;MACF;MACA,kBAAkB,EAChB,MAAM,CAAC,UAAU,MAAM,EACzB;MACA,kBAAkB;OAChB,MAAM;OACN,OAAO,EACL,MAAM,SACR;MACF;MACA,eAAe;OACb,MAAM,CAAC,UAAU,MAAM;OACvB,QAAQ;MACV;MACA,eAAe;OACb,MAAM,CAAC,UAAU,MAAM;OACvB,YAAY;QACV,IAAI,EACF,MAAM,SACR;QACA,eAAe,EACb,MAAM;SAAC;SAAQ;SAAU;QAAY,EACvC;OACF;MACF;KACF;IACF;IACA,aAAa;KACX,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,WAAW;KACT,MAAM;KACN,YAAY,EACV,SAAS;MACP,MAAM;MACN,SAAS;KACX,EACF;KACA,sBAAsB;IACxB;GACF;GACA,sBAAsB;GACtB,SAAS,EACP,eAAe,CAAC,EAClB;EACF;EACA,eAAe;GACb,MAAM;GACN,YAAY;IACV,OAAO;KACL,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,KAAK;KACH,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;IACA,MAAM;KACJ,MAAM;KACN,YAAY,EACV,SAAS,EACP,MAAM,UACR,EACF;KACA,sBAAsB;IACxB;GACF;GACA,sBAAsB;GACtB,SAAS;IACP,OAAO,EACL,SAAS,MACX;IACA,KAAK,EACH,SAAS,MACX;IACA,MAAM,EACJ,SAAS,MACX;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,aAAa;GACX,MAAM;GACN,sBAAsB;EACxB;CACF;AACF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import defs, { ISODateString } from "./definitions.js";
|
|
2
|
+
import type { FromSchema } from "json-schema-to-ts";
|
|
3
|
+
export declare const sosTypeSchema: {
|
|
4
|
+
readonly $schema: "http://json-schema.org/draft-07/schema";
|
|
5
|
+
readonly $id: "sosType.json";
|
|
6
|
+
readonly title: "SOS Type";
|
|
7
|
+
readonly description: "A customizable emergency category in an organization's SOS library.";
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly required: readonly ["id", "name", "nameKey", "iconKey", "scope"];
|
|
10
|
+
readonly additionalProperties: false;
|
|
11
|
+
readonly properties: {
|
|
12
|
+
readonly id: {
|
|
13
|
+
readonly $ref: "definitions.json#/definitions/id";
|
|
14
|
+
readonly description: "Unique identifier for the SOS Type.";
|
|
15
|
+
};
|
|
16
|
+
readonly name: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly minLength: 1;
|
|
19
|
+
readonly description: "Display name of the emergency category, rendered on the panic-grid tile (e.g. \"Medical\", \"Lockdown\").";
|
|
20
|
+
};
|
|
21
|
+
readonly nameKey: {
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
readonly minLength: 1;
|
|
24
|
+
readonly description: "Normalized name (trimmed, whitespace-collapsed, lowercased) used for case-insensitive uniqueness within the organization's library. Derived from `name` on create; unique among non-deleted types.";
|
|
25
|
+
};
|
|
26
|
+
readonly iconKey: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly minLength: 1;
|
|
29
|
+
readonly description: "Key into the app's curated SOS icon gallery, selecting the glyph shown on the tile.";
|
|
30
|
+
};
|
|
31
|
+
readonly scope: {
|
|
32
|
+
readonly type: "object";
|
|
33
|
+
readonly description: "Where this SOS Type is offered: an org-wide `default` plus a sparse map of per-Property overrides. Mirrors an Issue's routing shape; `false` suppresses, an absent key inherits `default`.";
|
|
34
|
+
readonly additionalProperties: false;
|
|
35
|
+
readonly properties: {
|
|
36
|
+
readonly default: {
|
|
37
|
+
readonly type: "boolean";
|
|
38
|
+
readonly default: false;
|
|
39
|
+
readonly description: "Org-wide baseline: whether the type is offered at Properties with no override, including Properties added later.";
|
|
40
|
+
};
|
|
41
|
+
readonly properties: {
|
|
42
|
+
readonly type: "object";
|
|
43
|
+
readonly additionalProperties: {
|
|
44
|
+
readonly type: "boolean";
|
|
45
|
+
};
|
|
46
|
+
readonly default: {};
|
|
47
|
+
readonly description: "Sparse per-Property overrides keyed by Property ID: `true` opts in, `false` opts out, an absent key inherits `default`.";
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
readonly createdAt: {
|
|
52
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
53
|
+
readonly description: "When the SOS Type was created.";
|
|
54
|
+
};
|
|
55
|
+
readonly updatedAt: {
|
|
56
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
57
|
+
readonly description: "When the SOS Type was last modified.";
|
|
58
|
+
};
|
|
59
|
+
readonly deletedAt: {
|
|
60
|
+
readonly type: readonly ["string", "object", "null"];
|
|
61
|
+
readonly format: "date-time";
|
|
62
|
+
readonly description: "Soft-delete tombstone. Deleted types are hidden from the library and release their `nameKey` for reuse.";
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export type SOSTypeSchema = FromSchema<typeof sosTypeSchema, {
|
|
67
|
+
references: [typeof defs];
|
|
68
|
+
deserialize: [
|
|
69
|
+
{
|
|
70
|
+
pattern: {
|
|
71
|
+
format: "date-time";
|
|
72
|
+
};
|
|
73
|
+
output: Date | ISODateString;
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
}>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//#region .generated/schemas/sosType.ts
|
|
2
|
+
const sosTypeSchema = {
|
|
3
|
+
$schema: "http://json-schema.org/draft-07/schema",
|
|
4
|
+
$id: "sosType.json",
|
|
5
|
+
title: "SOS Type",
|
|
6
|
+
description: "A customizable emergency category in an organization's SOS library.",
|
|
7
|
+
type: "object",
|
|
8
|
+
required: [
|
|
9
|
+
"id",
|
|
10
|
+
"name",
|
|
11
|
+
"nameKey",
|
|
12
|
+
"iconKey",
|
|
13
|
+
"scope"
|
|
14
|
+
],
|
|
15
|
+
additionalProperties: false,
|
|
16
|
+
properties: {
|
|
17
|
+
id: {
|
|
18
|
+
$ref: "definitions.json#/definitions/id",
|
|
19
|
+
description: "Unique identifier for the SOS Type."
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
type: "string",
|
|
23
|
+
minLength: 1,
|
|
24
|
+
description: "Display name of the emergency category, rendered on the panic-grid tile (e.g. \"Medical\", \"Lockdown\")."
|
|
25
|
+
},
|
|
26
|
+
nameKey: {
|
|
27
|
+
type: "string",
|
|
28
|
+
minLength: 1,
|
|
29
|
+
description: "Normalized name (trimmed, whitespace-collapsed, lowercased) used for case-insensitive uniqueness within the organization's library. Derived from `name` on create; unique among non-deleted types."
|
|
30
|
+
},
|
|
31
|
+
iconKey: {
|
|
32
|
+
type: "string",
|
|
33
|
+
minLength: 1,
|
|
34
|
+
description: "Key into the app's curated SOS icon gallery, selecting the glyph shown on the tile."
|
|
35
|
+
},
|
|
36
|
+
scope: {
|
|
37
|
+
type: "object",
|
|
38
|
+
description: "Where this SOS Type is offered: an org-wide `default` plus a sparse map of per-Property overrides. Mirrors an Issue's routing shape; `false` suppresses, an absent key inherits `default`.",
|
|
39
|
+
additionalProperties: false,
|
|
40
|
+
properties: {
|
|
41
|
+
default: {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
default: false,
|
|
44
|
+
description: "Org-wide baseline: whether the type is offered at Properties with no override, including Properties added later."
|
|
45
|
+
},
|
|
46
|
+
properties: {
|
|
47
|
+
type: "object",
|
|
48
|
+
additionalProperties: { type: "boolean" },
|
|
49
|
+
default: {},
|
|
50
|
+
description: "Sparse per-Property overrides keyed by Property ID: `true` opts in, `false` opts out, an absent key inherits `default`."
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
createdAt: {
|
|
55
|
+
$ref: "definitions.json#/definitions/date",
|
|
56
|
+
description: "When the SOS Type was created."
|
|
57
|
+
},
|
|
58
|
+
updatedAt: {
|
|
59
|
+
$ref: "definitions.json#/definitions/date",
|
|
60
|
+
description: "When the SOS Type was last modified."
|
|
61
|
+
},
|
|
62
|
+
deletedAt: {
|
|
63
|
+
type: [
|
|
64
|
+
"string",
|
|
65
|
+
"object",
|
|
66
|
+
"null"
|
|
67
|
+
],
|
|
68
|
+
format: "date-time",
|
|
69
|
+
description: "Soft-delete tombstone. Deleted types are hidden from the library and release their `nameKey` for reuse."
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
export { sosTypeSchema };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=sosType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sosType.js","names":[],"sources":["../../.generated/schemas/sosType.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const sosTypeSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"sosType.json\",\n title: \"SOS Type\",\n description:\n \"A customizable emergency category in an organization's SOS library.\",\n type: \"object\",\n required: [\"id\", \"name\", \"nameKey\", \"iconKey\", \"scope\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n description: \"Unique identifier for the SOS Type.\",\n },\n name: {\n type: \"string\",\n minLength: 1,\n description:\n \"Display name of the emergency category, rendered on the panic-grid tile (e.g. \\\"Medical\\\", \\\"Lockdown\\\").\",\n },\n nameKey: {\n type: \"string\",\n minLength: 1,\n description:\n \"Normalized name (trimmed, whitespace-collapsed, lowercased) used for case-insensitive uniqueness within the organization's library. Derived from `name` on create; unique among non-deleted types.\",\n },\n iconKey: {\n type: \"string\",\n minLength: 1,\n description:\n \"Key into the app's curated SOS icon gallery, selecting the glyph shown on the tile.\",\n },\n scope: {\n type: \"object\",\n description:\n \"Where this SOS Type is offered: an org-wide `default` plus a sparse map of per-Property overrides. Mirrors an Issue's routing shape; `false` suppresses, an absent key inherits `default`.\",\n additionalProperties: false,\n properties: {\n default: {\n type: \"boolean\",\n default: false,\n description:\n \"Org-wide baseline: whether the type is offered at Properties with no override, including Properties added later.\",\n },\n properties: {\n type: \"object\",\n additionalProperties: {\n type: \"boolean\",\n },\n default: {},\n description:\n \"Sparse per-Property overrides keyed by Property ID: `true` opts in, `false` opts out, an absent key inherits `default`.\",\n },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the SOS Type was created.\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the SOS Type was last modified.\",\n },\n deletedAt: {\n type: [\"string\", \"object\", \"null\"],\n format: \"date-time\",\n description:\n \"Soft-delete tombstone. Deleted types are hidden from the library and release their `nameKey` for reuse.\",\n },\n },\n} as const;\n\nexport type SOSTypeSchema = FromSchema<\n typeof sosTypeSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,gBAAgB;CAC3B,SAAS;CACT,KAAK;CACL,OAAO;CACP,aACE;CACF,MAAM;CACN,UAAU;EAAC;EAAM;EAAQ;EAAW;EAAW;CAAO;CACtD,sBAAsB;CACtB,YAAY;EACV,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,MAAM;GACJ,MAAM;GACN,WAAW;GACX,aACE;EACJ;EACA,SAAS;GACP,MAAM;GACN,WAAW;GACX,aACE;EACJ;EACA,SAAS;GACP,MAAM;GACN,WAAW;GACX,aACE;EACJ;EACA,OAAO;GACL,MAAM;GACN,aACE;GACF,sBAAsB;GACtB,YAAY;IACV,SAAS;KACP,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,YAAY;KACV,MAAM;KACN,sBAAsB,EACpB,MAAM,UACR;KACA,SAAS,CAAC;KACV,aACE;IACJ;GACF;EACF;EACA,WAAW;GACT,MAAM;GACN,aAAa;EACf;EACA,WAAW;GACT,MAAM;GACN,aAAa;EACf;EACA,WAAW;GACT,MAAM;IAAC;IAAU;IAAU;GAAM;GACjC,QAAQ;GACR,aACE;EACJ;CACF;AACF"}
|
package/dist/validate.d.ts
CHANGED
|
@@ -508,6 +508,23 @@ export declare const validateSmsMessage: import("ajv").ValidateFunction<{
|
|
|
508
508
|
} & {
|
|
509
509
|
from: any;
|
|
510
510
|
}>;
|
|
511
|
+
export declare const validateSOSType: import("ajv").ValidateFunction<{
|
|
512
|
+
id: any;
|
|
513
|
+
name: any;
|
|
514
|
+
scope: any;
|
|
515
|
+
nameKey: any;
|
|
516
|
+
iconKey: any;
|
|
517
|
+
} & {
|
|
518
|
+
id: any;
|
|
519
|
+
} & {
|
|
520
|
+
name: any;
|
|
521
|
+
} & {
|
|
522
|
+
scope: any;
|
|
523
|
+
} & {
|
|
524
|
+
nameKey: any;
|
|
525
|
+
} & {
|
|
526
|
+
iconKey: any;
|
|
527
|
+
}>;
|
|
511
528
|
export declare const validateSpace: import("ajv").ValidateFunction<{
|
|
512
529
|
id: any;
|
|
513
530
|
type: any;
|
package/dist/validate.js
CHANGED
|
@@ -34,6 +34,7 @@ import { serverSchema } from "./schemas/server.js";
|
|
|
34
34
|
import { sessionSchema } from "./schemas/session.js";
|
|
35
35
|
import { shortLinkSchema } from "./schemas/shortLink.js";
|
|
36
36
|
import { smsMessageSchema } from "./schemas/smsMessage.js";
|
|
37
|
+
import { sosTypeSchema } from "./schemas/sosType.js";
|
|
37
38
|
import { spaceSchema } from "./schemas/space.js";
|
|
38
39
|
import { switchSchema } from "./schemas/switch.js";
|
|
39
40
|
import { systemSchema } from "./schemas/system.js";
|
|
@@ -92,6 +93,7 @@ const ajv = new Ajv({
|
|
|
92
93
|
sessionSchema,
|
|
93
94
|
shortLinkSchema,
|
|
94
95
|
smsMessageSchema,
|
|
96
|
+
sosTypeSchema,
|
|
95
97
|
spaceSchema,
|
|
96
98
|
switchSchema,
|
|
97
99
|
systemSchema,
|
|
@@ -140,6 +142,7 @@ const validateServer = ajv.compile(serverSchema);
|
|
|
140
142
|
const validateSession = ajv.compile(sessionSchema);
|
|
141
143
|
const validateShortLink = ajv.compile(shortLinkSchema);
|
|
142
144
|
const validateSmsMessage = ajv.compile(smsMessageSchema);
|
|
145
|
+
const validateSOSType = ajv.compile(sosTypeSchema);
|
|
143
146
|
const validateSpace = ajv.compile(spaceSchema);
|
|
144
147
|
const validateSwitch = ajv.compile(switchSchema);
|
|
145
148
|
const validateSystem = ajv.compile(systemSchema);
|
|
@@ -151,6 +154,6 @@ const validateUser = ajv.compile(userSchema);
|
|
|
151
154
|
const validateVendor = ajv.compile(vendorSchema);
|
|
152
155
|
const validateWindowCovering = ajv.compile(windowCoveringSchema);
|
|
153
156
|
//#endregion
|
|
154
|
-
export { validateAlarm, validateAnnouncement, validateAutomation, validateCamera, validateCategory, validateCourtesy, validateCredential, validateDepartment, validateDimmer, validateDiscoveredDevice, validateEmailMessage, validateEnergyReport, validateEnergyReportShard, validateGateway, validateGroup, validateIdentification, validateIntegration, validateIssue, validateLock, validateLog, validateMediaFile, validateMediaSource, validateMotionSensor, validateNotification, validateOrder, validateOrganization, validatePayment, validatePolicy, validateProduct, validateProperty, validateReservation, validateServer, validateSession, validateShortLink, validateSmsMessage, validateSpace, validateSwitch, validateSystem, validateSystemUser, validateThermostat, validateTicket, validateTimeSheet, validateUser, validateVendor, validateWindowCovering };
|
|
157
|
+
export { validateAlarm, validateAnnouncement, validateAutomation, validateCamera, validateCategory, validateCourtesy, validateCredential, validateDepartment, validateDimmer, validateDiscoveredDevice, validateEmailMessage, validateEnergyReport, validateEnergyReportShard, validateGateway, validateGroup, validateIdentification, validateIntegration, validateIssue, validateLock, validateLog, validateMediaFile, validateMediaSource, validateMotionSensor, validateNotification, validateOrder, validateOrganization, validatePayment, validatePolicy, validateProduct, validateProperty, validateReservation, validateSOSType, validateServer, validateSession, validateShortLink, validateSmsMessage, validateSpace, validateSwitch, validateSystem, validateSystemUser, validateThermostat, validateTicket, validateTimeSheet, validateUser, validateVendor, validateWindowCovering };
|
|
155
158
|
|
|
156
159
|
//# sourceMappingURL=validate.js.map
|
package/dist/validate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","names":[],"sources":["../.generated/validate.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\nimport { Ajv } from \"ajv\";\nimport addFormats from \"ajv-formats\";\n\nimport { definitionsSchema as defs } from \"./schemas/definitions.js\";\nimport { alarmSchema } from \"./schemas/alarm.js\";\nimport { announcementSchema } from \"./schemas/announcement.js\";\nimport { automationSchema } from \"./schemas/automation.js\";\nimport { cameraSchema } from \"./schemas/camera.js\";\nimport { categorySchema } from \"./schemas/category.js\";\nimport { courtesySchema } from \"./schemas/courtesy.js\";\nimport { credentialSchema } from \"./schemas/credential.js\";\nimport { departmentSchema } from \"./schemas/department.js\";\nimport { dimmerSchema } from \"./schemas/dimmer.js\";\nimport { discoveredDeviceSchema } from \"./schemas/discoveredDevice.js\";\nimport { emailMessageSchema } from \"./schemas/emailMessage.js\";\nimport { energyReportSchema } from \"./schemas/energyReport.js\";\nimport { energyReportShardSchema } from \"./schemas/energyReportShard.js\";\nimport { gatewaySchema } from \"./schemas/gateway.js\";\nimport { groupSchema } from \"./schemas/group.js\";\nimport { identificationSchema } from \"./schemas/identification.js\";\nimport { integrationSchema } from \"./schemas/integration.js\";\nimport { issueSchema } from \"./schemas/issue.js\";\nimport { lockSchema } from \"./schemas/lock.js\";\nimport { logSchema } from \"./schemas/log.js\";\nimport { mediaFileSchema } from \"./schemas/mediaFile.js\";\nimport { mediaSourceSchema } from \"./schemas/mediaSource.js\";\nimport { motionSensorSchema } from \"./schemas/motionSensor.js\";\nimport { notificationSchema } from \"./schemas/notification.js\";\nimport { orderSchema } from \"./schemas/order.js\";\nimport { organizationSchema } from \"./schemas/organization.js\";\nimport { paymentSchema } from \"./schemas/payment.js\";\nimport { policySchema } from \"./schemas/policy.js\";\nimport { productSchema } from \"./schemas/product.js\";\nimport { propertySchema } from \"./schemas/property.js\";\nimport { reservationSchema } from \"./schemas/reservation.js\";\nimport { serverSchema } from \"./schemas/server.js\";\nimport { sessionSchema } from \"./schemas/session.js\";\nimport { shortLinkSchema } from \"./schemas/shortLink.js\";\nimport { smsMessageSchema } from \"./schemas/smsMessage.js\";\nimport { spaceSchema } from \"./schemas/space.js\";\nimport { switchSchema } from \"./schemas/switch.js\";\nimport { systemSchema } from \"./schemas/system.js\";\nimport { systemUserSchema } from \"./schemas/systemUser.js\";\nimport { thermostatSchema } from \"./schemas/thermostat.js\";\nimport { ticketSchema } from \"./schemas/ticket.js\";\nimport { timeSheetSchema } from \"./schemas/timeSheet.js\";\nimport { userSchema } from \"./schemas/user.js\";\nimport { vendorSchema } from \"./schemas/vendor.js\";\nimport { windowCoveringSchema } from \"./schemas/windowCovering.js\";\n\nconst schemas = [\n defs,\n alarmSchema,\n announcementSchema,\n automationSchema,\n cameraSchema,\n categorySchema,\n courtesySchema,\n credentialSchema,\n departmentSchema,\n dimmerSchema,\n discoveredDeviceSchema,\n emailMessageSchema,\n energyReportSchema,\n energyReportShardSchema,\n gatewaySchema,\n groupSchema,\n identificationSchema,\n integrationSchema,\n issueSchema,\n lockSchema,\n logSchema,\n mediaFileSchema,\n mediaSourceSchema,\n motionSensorSchema,\n notificationSchema,\n orderSchema,\n organizationSchema,\n paymentSchema,\n policySchema,\n productSchema,\n propertySchema,\n reservationSchema,\n serverSchema,\n sessionSchema,\n shortLinkSchema,\n smsMessageSchema,\n spaceSchema,\n switchSchema,\n systemSchema,\n systemUserSchema,\n thermostatSchema,\n ticketSchema,\n timeSheetSchema,\n userSchema,\n vendorSchema,\n windowCoveringSchema,\n];\n\nconst ajv = new Ajv({\n allErrors: true,\n useDefaults: true,\n strict: false,\n allowMatchingProperties: true,\n allowUnionTypes: true,\n strictRequired: false,\n discriminator: true,\n schemas: schemas,\n});\n\naddFormats(ajv);\n\nexport const validateAlarm = ajv.compile(alarmSchema);\nexport const validateAnnouncement = ajv.compile(announcementSchema);\nexport const validateAutomation = ajv.compile(automationSchema);\nexport const validateCamera = ajv.compile(cameraSchema);\nexport const validateCategory = ajv.compile(categorySchema);\nexport const validateCourtesy = ajv.compile(courtesySchema);\nexport const validateCredential = ajv.compile(credentialSchema);\nexport const validateDepartment = ajv.compile(departmentSchema);\nexport const validateDimmer = ajv.compile(dimmerSchema);\nexport const validateDiscoveredDevice = ajv.compile(discoveredDeviceSchema);\nexport const validateEmailMessage = ajv.compile(emailMessageSchema);\nexport const validateEnergyReport = ajv.compile(energyReportSchema);\nexport const validateEnergyReportShard = ajv.compile(energyReportShardSchema);\nexport const validateGateway = ajv.compile(gatewaySchema);\nexport const validateGroup = ajv.compile(groupSchema);\nexport const validateIdentification = ajv.compile(identificationSchema);\nexport const validateIntegration = ajv.compile(integrationSchema);\nexport const validateIssue = ajv.compile(issueSchema);\nexport const validateLock = ajv.compile(lockSchema);\nexport const validateLog = ajv.compile(logSchema);\nexport const validateMediaFile = ajv.compile(mediaFileSchema);\nexport const validateMediaSource = ajv.compile(mediaSourceSchema);\nexport const validateMotionSensor = ajv.compile(motionSensorSchema);\nexport const validateNotification = ajv.compile(notificationSchema);\nexport const validateOrder = ajv.compile(orderSchema);\nexport const validateOrganization = ajv.compile(organizationSchema);\nexport const validatePayment = ajv.compile(paymentSchema);\nexport const validatePolicy = ajv.compile(policySchema);\nexport const validateProduct = ajv.compile(productSchema);\nexport const validateProperty = ajv.compile(propertySchema);\nexport const validateReservation = ajv.compile(reservationSchema);\nexport const validateServer = ajv.compile(serverSchema);\nexport const validateSession = ajv.compile(sessionSchema);\nexport const validateShortLink = ajv.compile(shortLinkSchema);\nexport const validateSmsMessage = ajv.compile(smsMessageSchema);\nexport const validateSpace = ajv.compile(spaceSchema);\nexport const validateSwitch = ajv.compile(switchSchema);\nexport const validateSystem = ajv.compile(systemSchema);\nexport const validateSystemUser = ajv.compile(systemUserSchema);\nexport const validateThermostat = ajv.compile(thermostatSchema);\nexport const validateTicket = ajv.compile(ticketSchema);\nexport const validateTimeSheet = ajv.compile(timeSheetSchema);\nexport const validateUser = ajv.compile(userSchema);\nexport const validateVendor = ajv.compile(vendorSchema);\nexport const validateWindowCovering = ajv.compile(windowCoveringSchema);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.js","names":[],"sources":["../.generated/validate.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\nimport { Ajv } from \"ajv\";\nimport addFormats from \"ajv-formats\";\n\nimport { definitionsSchema as defs } from \"./schemas/definitions.js\";\nimport { alarmSchema } from \"./schemas/alarm.js\";\nimport { announcementSchema } from \"./schemas/announcement.js\";\nimport { automationSchema } from \"./schemas/automation.js\";\nimport { cameraSchema } from \"./schemas/camera.js\";\nimport { categorySchema } from \"./schemas/category.js\";\nimport { courtesySchema } from \"./schemas/courtesy.js\";\nimport { credentialSchema } from \"./schemas/credential.js\";\nimport { departmentSchema } from \"./schemas/department.js\";\nimport { dimmerSchema } from \"./schemas/dimmer.js\";\nimport { discoveredDeviceSchema } from \"./schemas/discoveredDevice.js\";\nimport { emailMessageSchema } from \"./schemas/emailMessage.js\";\nimport { energyReportSchema } from \"./schemas/energyReport.js\";\nimport { energyReportShardSchema } from \"./schemas/energyReportShard.js\";\nimport { gatewaySchema } from \"./schemas/gateway.js\";\nimport { groupSchema } from \"./schemas/group.js\";\nimport { identificationSchema } from \"./schemas/identification.js\";\nimport { integrationSchema } from \"./schemas/integration.js\";\nimport { issueSchema } from \"./schemas/issue.js\";\nimport { lockSchema } from \"./schemas/lock.js\";\nimport { logSchema } from \"./schemas/log.js\";\nimport { mediaFileSchema } from \"./schemas/mediaFile.js\";\nimport { mediaSourceSchema } from \"./schemas/mediaSource.js\";\nimport { motionSensorSchema } from \"./schemas/motionSensor.js\";\nimport { notificationSchema } from \"./schemas/notification.js\";\nimport { orderSchema } from \"./schemas/order.js\";\nimport { organizationSchema } from \"./schemas/organization.js\";\nimport { paymentSchema } from \"./schemas/payment.js\";\nimport { policySchema } from \"./schemas/policy.js\";\nimport { productSchema } from \"./schemas/product.js\";\nimport { propertySchema } from \"./schemas/property.js\";\nimport { reservationSchema } from \"./schemas/reservation.js\";\nimport { serverSchema } from \"./schemas/server.js\";\nimport { sessionSchema } from \"./schemas/session.js\";\nimport { shortLinkSchema } from \"./schemas/shortLink.js\";\nimport { smsMessageSchema } from \"./schemas/smsMessage.js\";\nimport { sosTypeSchema } from \"./schemas/sosType.js\";\nimport { spaceSchema } from \"./schemas/space.js\";\nimport { switchSchema } from \"./schemas/switch.js\";\nimport { systemSchema } from \"./schemas/system.js\";\nimport { systemUserSchema } from \"./schemas/systemUser.js\";\nimport { thermostatSchema } from \"./schemas/thermostat.js\";\nimport { ticketSchema } from \"./schemas/ticket.js\";\nimport { timeSheetSchema } from \"./schemas/timeSheet.js\";\nimport { userSchema } from \"./schemas/user.js\";\nimport { vendorSchema } from \"./schemas/vendor.js\";\nimport { windowCoveringSchema } from \"./schemas/windowCovering.js\";\n\nconst schemas = [\n defs,\n alarmSchema,\n announcementSchema,\n automationSchema,\n cameraSchema,\n categorySchema,\n courtesySchema,\n credentialSchema,\n departmentSchema,\n dimmerSchema,\n discoveredDeviceSchema,\n emailMessageSchema,\n energyReportSchema,\n energyReportShardSchema,\n gatewaySchema,\n groupSchema,\n identificationSchema,\n integrationSchema,\n issueSchema,\n lockSchema,\n logSchema,\n mediaFileSchema,\n mediaSourceSchema,\n motionSensorSchema,\n notificationSchema,\n orderSchema,\n organizationSchema,\n paymentSchema,\n policySchema,\n productSchema,\n propertySchema,\n reservationSchema,\n serverSchema,\n sessionSchema,\n shortLinkSchema,\n smsMessageSchema,\n sosTypeSchema,\n spaceSchema,\n switchSchema,\n systemSchema,\n systemUserSchema,\n thermostatSchema,\n ticketSchema,\n timeSheetSchema,\n userSchema,\n vendorSchema,\n windowCoveringSchema,\n];\n\nconst ajv = new Ajv({\n allErrors: true,\n useDefaults: true,\n strict: false,\n allowMatchingProperties: true,\n allowUnionTypes: true,\n strictRequired: false,\n discriminator: true,\n schemas: schemas,\n});\n\naddFormats(ajv);\n\nexport const validateAlarm = ajv.compile(alarmSchema);\nexport const validateAnnouncement = ajv.compile(announcementSchema);\nexport const validateAutomation = ajv.compile(automationSchema);\nexport const validateCamera = ajv.compile(cameraSchema);\nexport const validateCategory = ajv.compile(categorySchema);\nexport const validateCourtesy = ajv.compile(courtesySchema);\nexport const validateCredential = ajv.compile(credentialSchema);\nexport const validateDepartment = ajv.compile(departmentSchema);\nexport const validateDimmer = ajv.compile(dimmerSchema);\nexport const validateDiscoveredDevice = ajv.compile(discoveredDeviceSchema);\nexport const validateEmailMessage = ajv.compile(emailMessageSchema);\nexport const validateEnergyReport = ajv.compile(energyReportSchema);\nexport const validateEnergyReportShard = ajv.compile(energyReportShardSchema);\nexport const validateGateway = ajv.compile(gatewaySchema);\nexport const validateGroup = ajv.compile(groupSchema);\nexport const validateIdentification = ajv.compile(identificationSchema);\nexport const validateIntegration = ajv.compile(integrationSchema);\nexport const validateIssue = ajv.compile(issueSchema);\nexport const validateLock = ajv.compile(lockSchema);\nexport const validateLog = ajv.compile(logSchema);\nexport const validateMediaFile = ajv.compile(mediaFileSchema);\nexport const validateMediaSource = ajv.compile(mediaSourceSchema);\nexport const validateMotionSensor = ajv.compile(motionSensorSchema);\nexport const validateNotification = ajv.compile(notificationSchema);\nexport const validateOrder = ajv.compile(orderSchema);\nexport const validateOrganization = ajv.compile(organizationSchema);\nexport const validatePayment = ajv.compile(paymentSchema);\nexport const validatePolicy = ajv.compile(policySchema);\nexport const validateProduct = ajv.compile(productSchema);\nexport const validateProperty = ajv.compile(propertySchema);\nexport const validateReservation = ajv.compile(reservationSchema);\nexport const validateServer = ajv.compile(serverSchema);\nexport const validateSession = ajv.compile(sessionSchema);\nexport const validateShortLink = ajv.compile(shortLinkSchema);\nexport const validateSmsMessage = ajv.compile(smsMessageSchema);\nexport const validateSOSType = ajv.compile(sosTypeSchema);\nexport const validateSpace = ajv.compile(spaceSchema);\nexport const validateSwitch = ajv.compile(switchSchema);\nexport const validateSystem = ajv.compile(systemSchema);\nexport const validateSystemUser = ajv.compile(systemUserSchema);\nexport const validateThermostat = ajv.compile(thermostatSchema);\nexport const validateTicket = ajv.compile(ticketSchema);\nexport const validateTimeSheet = ajv.compile(timeSheetSchema);\nexport const validateUser = ajv.compile(userSchema);\nexport const validateVendor = ajv.compile(vendorSchema);\nexport const validateWindowCovering = ajv.compile(windowCoveringSchema);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGA,MAAM,MAAM,IAAI,IAAI;CAClB,WAAW;CACX,aAAa;CACb,QAAQ;CACR,yBAAyB;CACzB,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CACf,SAAS;EAzDT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAWe;AACjB,CAAC;AAED,WAAW,GAAG;AAEd,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,mBAAmB,IAAI,QAAQ,cAAc;AAC1D,MAAa,mBAAmB,IAAI,QAAQ,cAAc;AAC1D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,2BAA2B,IAAI,QAAQ,sBAAsB;AAC1E,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,4BAA4B,IAAI,QAAQ,uBAAuB;AAC5E,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,yBAAyB,IAAI,QAAQ,oBAAoB;AACtE,MAAa,sBAAsB,IAAI,QAAQ,iBAAiB;AAChE,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,eAAe,IAAI,QAAQ,UAAU;AAClD,MAAa,cAAc,IAAI,QAAQ,SAAS;AAChD,MAAa,oBAAoB,IAAI,QAAQ,eAAe;AAC5D,MAAa,sBAAsB,IAAI,QAAQ,iBAAiB;AAChE,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,uBAAuB,IAAI,QAAQ,kBAAkB;AAClE,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,mBAAmB,IAAI,QAAQ,cAAc;AAC1D,MAAa,sBAAsB,IAAI,QAAQ,iBAAiB;AAChE,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,oBAAoB,IAAI,QAAQ,eAAe;AAC5D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,kBAAkB,IAAI,QAAQ,aAAa;AACxD,MAAa,gBAAgB,IAAI,QAAQ,WAAW;AACpD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,qBAAqB,IAAI,QAAQ,gBAAgB;AAC9D,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,oBAAoB,IAAI,QAAQ,eAAe;AAC5D,MAAa,eAAe,IAAI,QAAQ,UAAU;AAClD,MAAa,iBAAiB,IAAI,QAAQ,YAAY;AACtD,MAAa,yBAAyB,IAAI,QAAQ,oBAAoB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kohost/api-client",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "API client, models, schemas, commands, and events for Kohost applications",
|
|
5
5
|
"author": "Ian Rogers",
|
|
6
6
|
"readme": "README.md",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
|
-
"test": "
|
|
84
|
-
"test:watch": "
|
|
83
|
+
"test": "vitest run --passWithNoTests",
|
|
84
|
+
"test:watch": "vitest --passWithNoTests",
|
|
85
85
|
"lint": "eslint --cache --cache-location node_modules/.cache/eslint/",
|
|
86
86
|
"lint:fix": "eslint --fix --cache --cache-location node_modules/.cache/eslint/ ./",
|
|
87
87
|
"prepare": "husky || true",
|
|
@@ -107,27 +107,28 @@
|
|
|
107
107
|
"access": "public"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
|
-
"@eslint/js": "10.0.1",
|
|
111
|
-
"@types/debug": "4.1.13",
|
|
112
|
-
"@types/events": "3.0.3",
|
|
113
|
-
"@types/node": "22.
|
|
114
|
-
"eslint": "10.5.0",
|
|
115
|
-
"eslint-config-prettier": "10.1.8",
|
|
116
|
-
"globals": "17.
|
|
117
|
-
"husky": "9.1.7",
|
|
118
|
-
"lint-staged": "17.0.
|
|
119
|
-
"prettier": "3.
|
|
120
|
-
"tsdown": "0.22.3",
|
|
121
|
-
"tsx": "4.
|
|
122
|
-
"typescript": "6.0.3"
|
|
110
|
+
"@eslint/js": "^10.0.1",
|
|
111
|
+
"@types/debug": "^4.1.13",
|
|
112
|
+
"@types/events": "^3.0.3",
|
|
113
|
+
"@types/node": "^22.20.0",
|
|
114
|
+
"eslint": "^10.5.0",
|
|
115
|
+
"eslint-config-prettier": "^10.1.8",
|
|
116
|
+
"globals": "^17.7.0",
|
|
117
|
+
"husky": "^9.1.7",
|
|
118
|
+
"lint-staged": "^17.0.8",
|
|
119
|
+
"prettier": "^3.9.4",
|
|
120
|
+
"tsdown": "^0.22.3",
|
|
121
|
+
"tsx": "^4.23.0",
|
|
122
|
+
"typescript": "^6.0.3",
|
|
123
|
+
"vitest": "^4.1.9"
|
|
123
124
|
},
|
|
124
125
|
"dependencies": {
|
|
125
|
-
"ajv": "8.20.0",
|
|
126
|
-
"ajv-formats": "3.0.1",
|
|
127
|
-
"json-schema-to-ts": "3.1.1"
|
|
126
|
+
"ajv": "^8.20.0",
|
|
127
|
+
"ajv-formats": "^3.0.1",
|
|
128
|
+
"json-schema-to-ts": "^3.1.1"
|
|
128
129
|
},
|
|
129
130
|
"optionalDependencies": {
|
|
130
|
-
"@rollup/rollup-linux-x64-gnu": "4.62.2"
|
|
131
|
+
"@rollup/rollup-linux-x64-gnu": "^4.62.2"
|
|
131
132
|
},
|
|
132
133
|
"lint-staged": {
|
|
133
134
|
"*.js": "eslint --cache --fix",
|