@kohost/api-client 7.8.2 → 7.9.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/lib/deliveryStatus.d.ts +3 -0
- package/dist/lib/deliveryStatus.js +31 -0
- package/dist/lib/deliveryStatus.js.map +1 -0
- package/dist/lib/emergencyContacts.d.ts +14 -0
- package/dist/lib/emergencyContacts.js +1 -0
- package/dist/lib/index.d.ts +6 -1
- package/dist/lib/index.js +15 -2
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/messageErrorCodes.d.ts +4 -0
- package/dist/lib/messageErrorCodes.js +24 -0
- package/dist/lib/messageErrorCodes.js.map +1 -0
- package/dist/lib/money.d.ts +7 -1
- package/dist/lib/money.js +11 -2
- package/dist/lib/money.js.map +1 -1
- package/dist/lib/sisDrivers.d.ts +3 -0
- package/dist/lib/sisDrivers.js +9 -0
- package/dist/lib/sisDrivers.js.map +1 -0
- package/dist/lib/sosAudiences.d.ts +2 -0
- package/dist/lib/sosAudiences.js +6 -0
- package/dist/lib/sosAudiences.js.map +1 -0
- package/dist/models/announcement.js +4 -2
- package/dist/models/announcement.js.map +1 -1
- package/dist/models/category.js +2 -0
- package/dist/models/category.js.map +1 -1
- package/dist/models/emailMessage.js +1 -0
- package/dist/models/emailMessage.js.map +1 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +5 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/resource.d.ts +17 -0
- package/dist/models/resource.js +31 -0
- package/dist/models/resource.js.map +1 -0
- package/dist/models/smsMessage.js +1 -0
- package/dist/models/smsMessage.js.map +1 -1
- package/dist/models/sosEvent.d.ts +17 -0
- package/dist/models/sosEvent.js +29 -0
- package/dist/models/sosEvent.js.map +1 -0
- package/dist/models/systemUser.js +2 -0
- package/dist/models/systemUser.js.map +1 -1
- package/dist/schemas/announcement.d.ts +47 -3
- package/dist/schemas/announcement.js +50 -4
- package/dist/schemas/announcement.js.map +1 -1
- package/dist/schemas/category.d.ts +11 -1
- package/dist/schemas/category.js +12 -1
- package/dist/schemas/category.js.map +1 -1
- package/dist/schemas/definitions.d.ts +160 -0
- package/dist/schemas/definitions.js +104 -1
- package/dist/schemas/definitions.js.map +1 -1
- package/dist/schemas/emailMessage.d.ts +4 -0
- package/dist/schemas/emailMessage.js +4 -0
- package/dist/schemas/emailMessage.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +3 -1
- package/dist/schemas/organization.d.ts +19 -0
- package/dist/schemas/organization.js +13 -0
- package/dist/schemas/organization.js.map +1 -1
- package/dist/schemas/property.d.ts +14 -0
- package/dist/schemas/property.js +12 -0
- package/dist/schemas/property.js.map +1 -1
- package/dist/schemas/resource.d.ts +137 -0
- package/dist/schemas/resource.js +112 -0
- package/dist/schemas/resource.js.map +1 -0
- package/dist/schemas/smsMessage.d.ts +4 -0
- package/dist/schemas/smsMessage.js +4 -0
- package/dist/schemas/smsMessage.js.map +1 -1
- package/dist/schemas/sosEvent.d.ts +318 -0
- package/dist/schemas/sosEvent.js +267 -0
- package/dist/schemas/sosEvent.js.map +1 -0
- package/dist/schemas/systemUser.d.ts +8 -0
- package/dist/schemas/systemUser.js +9 -1
- package/dist/schemas/systemUser.js.map +1 -1
- package/dist/schemas/ticket.d.ts +1 -1
- package/dist/schemas/ticket.js +1 -0
- package/dist/schemas/ticket.js.map +1 -1
- package/dist/useCases/autoAssociateDiscoveredDevices.d.ts +3 -3
- package/dist/useCases/autoAssociateDiscoveredDevices.js.map +1 -1
- package/dist/useCases/bulkUpdateIssue.d.ts +3 -3
- package/dist/useCases/bulkUpdateIssue.js.map +1 -1
- package/dist/useCases/copyIssueRouting.d.ts +3 -3
- package/dist/useCases/copyIssueRouting.js.map +1 -1
- package/dist/useCases/createAutomation.d.ts +3 -3
- package/dist/useCases/createAutomation.js.map +1 -1
- package/dist/useCases/createBill.d.ts +3 -3
- package/dist/useCases/createBill.js.map +1 -1
- package/dist/useCases/createBillingCategory.d.ts +3 -3
- package/dist/useCases/createBillingCategory.js.map +1 -1
- package/dist/useCases/createCategory.d.ts +3 -3
- package/dist/useCases/createCategory.js.map +1 -1
- package/dist/useCases/createDefaultAutomations.d.ts +3 -3
- package/dist/useCases/createDefaultAutomations.js.map +1 -1
- package/dist/useCases/createDepartment.d.ts +3 -3
- package/dist/useCases/createDepartment.js.map +1 -1
- package/dist/useCases/createDiscoveredDevice.d.ts +3 -3
- package/dist/useCases/createDiscoveredDevice.js.map +1 -1
- package/dist/useCases/createDiscoveredDeviceAssociationMap.d.ts +3 -3
- package/dist/useCases/createDiscoveredDeviceAssociationMap.js.map +1 -1
- package/dist/useCases/createIssue.d.ts +3 -3
- package/dist/useCases/createIssue.js.map +1 -1
- package/dist/useCases/createOrganization.d.ts +3 -3
- package/dist/useCases/createOrganization.js.map +1 -1
- package/dist/useCases/createPolicy.d.ts +3 -3
- package/dist/useCases/createPolicy.js.map +1 -1
- package/dist/useCases/createProperty.d.ts +3 -3
- package/dist/useCases/createProperty.js.map +1 -1
- package/dist/useCases/createPwaHandoffToken.d.ts +3 -3
- package/dist/useCases/createPwaHandoffToken.js.map +1 -1
- package/dist/useCases/createResource.d.ts +27 -0
- package/dist/useCases/createResource.js +47 -0
- package/dist/useCases/createResource.js.map +1 -0
- package/dist/useCases/createServer.d.ts +3 -3
- package/dist/useCases/createServer.js.map +1 -1
- package/dist/useCases/createSpace.d.ts +3 -3
- package/dist/useCases/createSpace.js.map +1 -1
- package/dist/useCases/createSystem.d.ts +3 -3
- package/dist/useCases/createSystem.js.map +1 -1
- package/dist/useCases/createTicket.d.ts +3 -3
- package/dist/useCases/createTicket.js.map +1 -1
- package/dist/useCases/createTimeSheet.d.ts +3 -3
- package/dist/useCases/createTimeSheet.js.map +1 -1
- package/dist/useCases/createUser.d.ts +3 -3
- package/dist/useCases/createUser.js.map +1 -1
- package/dist/useCases/createVendor.d.ts +3 -3
- package/dist/useCases/createVendor.js.map +1 -1
- package/dist/useCases/deleteResource.d.ts +36 -0
- package/dist/useCases/deleteResource.js +47 -0
- package/dist/useCases/deleteResource.js.map +1 -0
- package/dist/useCases/describeConciergeFacilitiesViewer.d.ts +3 -3
- package/dist/useCases/describeConciergeFacilitiesViewer.js.map +1 -1
- package/dist/useCases/describeConciergeStatsFilters.d.ts +3 -3
- package/dist/useCases/describeConciergeStatsFilters.js.map +1 -1
- package/dist/useCases/describeConciergeStatsHeatmap.d.ts +3 -3
- package/dist/useCases/describeConciergeStatsHeatmap.js.map +1 -1
- package/dist/useCases/describeConciergeStatsSummary.d.ts +3 -3
- package/dist/useCases/describeConciergeStatsSummary.js.map +1 -1
- package/dist/useCases/describeConciergeStatsTickets.d.ts +3 -3
- package/dist/useCases/describeConciergeStatsTickets.js.map +1 -1
- package/dist/useCases/describeConciergeWorkspaceFilters.d.ts +3 -3
- package/dist/useCases/describeConciergeWorkspaceFilters.js.map +1 -1
- package/dist/useCases/describeMyAuth.d.ts +3 -3
- package/dist/useCases/describeMyAuth.js.map +1 -1
- package/dist/useCases/describeMyOrganization.d.ts +3 -3
- package/dist/useCases/describeMyOrganization.js.map +1 -1
- package/dist/useCases/describeMyPasskeyRegistrations.d.ts +3 -3
- package/dist/useCases/describeMyPasskeyRegistrations.js.map +1 -1
- package/dist/useCases/describeOrgNotificationDefaults.d.ts +3 -3
- package/dist/useCases/describeOrgNotificationDefaults.js.map +1 -1
- package/dist/useCases/describePushVapidPublicKey.d.ts +3 -3
- package/dist/useCases/describePushVapidPublicKey.js.map +1 -1
- package/dist/useCases/describeResource.d.ts +36 -0
- package/dist/useCases/describeResource.js +47 -0
- package/dist/useCases/describeResource.js.map +1 -0
- package/dist/useCases/describeSOS.d.ts +3 -3
- package/dist/useCases/describeSOS.js.map +1 -1
- package/dist/useCases/describeSOSEvent.d.ts +36 -0
- package/dist/useCases/describeSOSEvent.js +47 -0
- package/dist/useCases/describeSOSEvent.js.map +1 -0
- package/dist/useCases/describeSelf.d.ts +3 -3
- package/dist/useCases/describeSelf.js.map +1 -1
- package/dist/useCases/describeSelfAccess.d.ts +3 -3
- package/dist/useCases/describeSelfAccess.js.map +1 -1
- package/dist/useCases/describeStaffFunctions.d.ts +3 -3
- package/dist/useCases/describeStaffFunctions.js.map +1 -1
- package/dist/useCases/describeTicketFilters.d.ts +3 -3
- package/dist/useCases/describeTicketFilters.js.map +1 -1
- package/dist/useCases/describeTicketStats.d.ts +3 -3
- package/dist/useCases/describeTicketStats.js.map +1 -1
- package/dist/useCases/describeTicketStatsFilters.d.ts +3 -3
- package/dist/useCases/describeTicketStatsFilters.js.map +1 -1
- package/dist/useCases/describeTicketStatsHeatmap.d.ts +3 -3
- package/dist/useCases/describeTicketStatsHeatmap.js.map +1 -1
- package/dist/useCases/describeTicketStatsSummary.d.ts +3 -3
- package/dist/useCases/describeTicketStatsSummary.js.map +1 -1
- package/dist/useCases/describeTicketStatsTickets.d.ts +3 -3
- package/dist/useCases/describeTicketStatsTickets.js.map +1 -1
- package/dist/useCases/describeTimeSheetStats.d.ts +3 -3
- package/dist/useCases/describeTimeSheetStats.js.map +1 -1
- package/dist/useCases/fetchEmergencyContacts.d.ts +27 -0
- package/dist/useCases/fetchEmergencyContacts.js +47 -0
- package/dist/useCases/fetchEmergencyContacts.js.map +1 -0
- package/dist/useCases/index.d.ts +11 -0
- package/dist/useCases/index.js +23 -1
- package/dist/useCases/index.js.map +1 -1
- package/dist/useCases/listAutomations.d.ts +3 -3
- package/dist/useCases/listAutomations.js.map +1 -1
- package/dist/useCases/listBillingCategories.d.ts +3 -3
- package/dist/useCases/listBillingCategories.js.map +1 -1
- package/dist/useCases/listBills.d.ts +3 -3
- package/dist/useCases/listBills.js.map +1 -1
- package/dist/useCases/listCategories.d.ts +3 -3
- package/dist/useCases/listCategories.js.map +1 -1
- package/dist/useCases/listConciergeUninvoicedCosts.d.ts +3 -3
- package/dist/useCases/listConciergeUninvoicedCosts.js.map +1 -1
- package/dist/useCases/listConciergeWorkspaceBills.d.ts +3 -3
- package/dist/useCases/listConciergeWorkspaceBills.js.map +1 -1
- package/dist/useCases/listConciergeWorkspaceTickets.d.ts +3 -3
- package/dist/useCases/listConciergeWorkspaceTickets.js.map +1 -1
- package/dist/useCases/listDepartments.d.ts +3 -3
- package/dist/useCases/listDepartments.js.map +1 -1
- package/dist/useCases/listDiscoveredDevices.d.ts +3 -3
- package/dist/useCases/listDiscoveredDevices.js.map +1 -1
- package/dist/useCases/listFacilitiesStaffIds.d.ts +3 -3
- package/dist/useCases/listFacilitiesStaffIds.js.map +1 -1
- package/dist/useCases/listIntegrations.d.ts +3 -3
- package/dist/useCases/listIntegrations.js.map +1 -1
- package/dist/useCases/listIssues.d.ts +3 -3
- package/dist/useCases/listIssues.js.map +1 -1
- package/dist/useCases/listKohostStaff.d.ts +3 -3
- package/dist/useCases/listKohostStaff.js.map +1 -1
- package/dist/useCases/listMyOrganizations.d.ts +3 -3
- package/dist/useCases/listMyOrganizations.js.map +1 -1
- package/dist/useCases/listMyProperties.d.ts +3 -3
- package/dist/useCases/listMyProperties.js.map +1 -1
- package/dist/useCases/listMyPushSubscriptions.d.ts +3 -3
- package/dist/useCases/listMyPushSubscriptions.js.map +1 -1
- package/dist/useCases/listMyTimeSheets.d.ts +3 -3
- package/dist/useCases/listMyTimeSheets.js.map +1 -1
- package/dist/useCases/listOrganizationBills.d.ts +3 -3
- package/dist/useCases/listOrganizationBills.js.map +1 -1
- package/dist/useCases/listOrganizations.d.ts +3 -3
- package/dist/useCases/listOrganizations.js.map +1 -1
- package/dist/useCases/listPolicies.d.ts +3 -3
- package/dist/useCases/listPolicies.js.map +1 -1
- package/dist/useCases/listProperties.d.ts +3 -3
- package/dist/useCases/listProperties.js.map +1 -1
- package/dist/useCases/listResources.d.ts +27 -0
- package/dist/useCases/listResources.js +47 -0
- package/dist/useCases/listResources.js.map +1 -0
- package/dist/useCases/listSOSEvents.d.ts +27 -0
- package/dist/useCases/listSOSEvents.js +47 -0
- package/dist/useCases/listSOSEvents.js.map +1 -0
- package/dist/useCases/listServers.d.ts +3 -3
- package/dist/useCases/listServers.js.map +1 -1
- package/dist/useCases/listSessions.d.ts +3 -3
- package/dist/useCases/listSessions.js.map +1 -1
- package/dist/useCases/listSpaces.d.ts +3 -3
- package/dist/useCases/listSpaces.js.map +1 -1
- package/dist/useCases/listSystems.d.ts +3 -3
- package/dist/useCases/listSystems.js.map +1 -1
- package/dist/useCases/listTicketLocations.d.ts +3 -3
- package/dist/useCases/listTicketLocations.js.map +1 -1
- package/dist/useCases/listTickets.d.ts +3 -3
- package/dist/useCases/listTickets.js.map +1 -1
- package/dist/useCases/listTimeSheets.d.ts +3 -3
- package/dist/useCases/listTimeSheets.js.map +1 -1
- package/dist/useCases/listUsers.d.ts +3 -3
- package/dist/useCases/listUsers.js.map +1 -1
- package/dist/useCases/listVendors.d.ts +3 -3
- package/dist/useCases/listVendors.js.map +1 -1
- package/dist/useCases/mergeIssue.d.ts +3 -3
- package/dist/useCases/mergeIssue.js.map +1 -1
- package/dist/useCases/replaceDevice.d.ts +39 -0
- package/dist/useCases/replaceDevice.js +47 -0
- package/dist/useCases/replaceDevice.js.map +1 -0
- package/dist/useCases/selectOrganization.d.ts +3 -3
- package/dist/useCases/selectOrganization.js.map +1 -1
- package/dist/useCases/sendAnnouncement.d.ts +27 -0
- package/dist/useCases/sendAnnouncement.js +47 -0
- package/dist/useCases/sendAnnouncement.js.map +1 -0
- package/dist/useCases/sendNotification.d.ts +3 -3
- package/dist/useCases/sendNotification.js.map +1 -1
- package/dist/useCases/sendSOSUpdate.d.ts +27 -0
- package/dist/useCases/sendSOSUpdate.js +47 -0
- package/dist/useCases/sendSOSUpdate.js.map +1 -0
- package/dist/useCases/setDevices.d.ts +3 -3
- package/dist/useCases/setDevices.js.map +1 -1
- package/dist/useCases/startSOS.d.ts +3 -3
- package/dist/useCases/startSOS.js.map +1 -1
- package/dist/useCases/stopSOS.d.ts +3 -3
- package/dist/useCases/stopSOS.js.map +1 -1
- package/dist/useCases/subscribePushDevice.d.ts +3 -3
- package/dist/useCases/subscribePushDevice.js.map +1 -1
- package/dist/useCases/updateOrgNotificationDefaults.d.ts +3 -3
- package/dist/useCases/updateOrgNotificationDefaults.js.map +1 -1
- package/dist/useCases/updateResource.d.ts +36 -0
- package/dist/useCases/updateResource.js +47 -0
- package/dist/useCases/updateResource.js.map +1 -0
- package/dist/useCases/updateSelf.d.ts +3 -3
- package/dist/useCases/updateSelf.js.map +1 -1
- package/dist/useCases/upsertDiscoveredDevice.d.ts +3 -3
- package/dist/useCases/upsertDiscoveredDevice.js.map +1 -1
- package/dist/useCases/validateAuth.d.ts +3 -3
- package/dist/useCases/validateAuth.js.map +1 -1
- package/dist/validate.d.ts +34 -0
- package/dist/validate.js +7 -1
- package/dist/validate.js.map +1 -1
- package/package.json +1 -1
package/dist/schemas/index.d.ts
CHANGED
|
@@ -30,10 +30,12 @@ export { policySchema, type PolicySchema } from "./policy.js";
|
|
|
30
30
|
export { productSchema, type ProductSchema } from "./product.js";
|
|
31
31
|
export { propertySchema, type PropertySchema } from "./property.js";
|
|
32
32
|
export { reservationSchema, type ReservationSchema } from "./reservation.js";
|
|
33
|
+
export { resourceSchema, type ResourceSchema } from "./resource.js";
|
|
33
34
|
export { serverSchema, type ServerSchema } from "./server.js";
|
|
34
35
|
export { sessionSchema, type SessionSchema } from "./session.js";
|
|
35
36
|
export { shortLinkSchema, type ShortLinkSchema } from "./shortLink.js";
|
|
36
37
|
export { smsMessageSchema, type SmsMessageSchema } from "./smsMessage.js";
|
|
38
|
+
export { sosEventSchema, type SOSEventSchema } from "./sosEvent.js";
|
|
37
39
|
export { sosTypeSchema, type SOSTypeSchema } from "./sosType.js";
|
|
38
40
|
export { spaceSchema, type SpaceSchema } from "./space.js";
|
|
39
41
|
export { switchSchema, type SwitchSchema } from "./switch.js";
|
package/dist/schemas/index.js
CHANGED
|
@@ -30,10 +30,12 @@ import { policySchema } from "./policy.js";
|
|
|
30
30
|
import { productSchema } from "./product.js";
|
|
31
31
|
import { propertySchema } from "./property.js";
|
|
32
32
|
import { reservationSchema } from "./reservation.js";
|
|
33
|
+
import { resourceSchema } from "./resource.js";
|
|
33
34
|
import { serverSchema } from "./server.js";
|
|
34
35
|
import { sessionSchema } from "./session.js";
|
|
35
36
|
import { shortLinkSchema } from "./shortLink.js";
|
|
36
37
|
import { smsMessageSchema } from "./smsMessage.js";
|
|
38
|
+
import { sosEventSchema } from "./sosEvent.js";
|
|
37
39
|
import { sosTypeSchema } from "./sosType.js";
|
|
38
40
|
import { spaceSchema } from "./space.js";
|
|
39
41
|
import { switchSchema } from "./switch.js";
|
|
@@ -45,4 +47,4 @@ import { timeSheetSchema } from "./timeSheet.js";
|
|
|
45
47
|
import { getters, userSchema } from "./user.js";
|
|
46
48
|
import { vendorSchema } from "./vendor.js";
|
|
47
49
|
import { windowCoveringSchema } from "./windowCovering.js";
|
|
48
|
-
export { alarmSchema, announcementSchema, automationSchema, billSchema, billingCategorySchema, cameraSchema, categorySchema, courtesySchema, credentialSchema, departmentSchema, dimmerSchema, discoveredDeviceSchema, emailMessageSchema, energyReportSchema, energyReportShardSchema, gatewaySchema, groupSchema, identificationSchema, integrationSchema, issueSchema, lockSchema, logSchema, methods as mediaFileMethods, mediaFileSchema, mediaSourceSchema, motionSensorSchema, notificationSchema, organizationSchema, paymentSchema, policySchema, productSchema, propertySchema, reservationSchema, serverSchema, sessionSchema, shortLinkSchema, smsMessageSchema, sosTypeSchema, spaceSchema, switchSchema, systemSchema, systemUserSchema, thermostatSchema, ticketSchema, timeSheetSchema, getters as userGetters, userSchema, vendorSchema, windowCoveringSchema };
|
|
50
|
+
export { alarmSchema, announcementSchema, automationSchema, billSchema, billingCategorySchema, cameraSchema, categorySchema, courtesySchema, credentialSchema, departmentSchema, dimmerSchema, discoveredDeviceSchema, emailMessageSchema, energyReportSchema, energyReportShardSchema, gatewaySchema, groupSchema, identificationSchema, integrationSchema, issueSchema, lockSchema, logSchema, methods as mediaFileMethods, mediaFileSchema, mediaSourceSchema, motionSensorSchema, notificationSchema, organizationSchema, paymentSchema, policySchema, productSchema, propertySchema, reservationSchema, resourceSchema, serverSchema, sessionSchema, shortLinkSchema, smsMessageSchema, sosEventSchema, sosTypeSchema, spaceSchema, switchSchema, systemSchema, systemUserSchema, thermostatSchema, ticketSchema, timeSheetSchema, getters as userGetters, userSchema, vendorSchema, windowCoveringSchema };
|
|
@@ -302,6 +302,25 @@ export declare const organizationSchema: {
|
|
|
302
302
|
};
|
|
303
303
|
};
|
|
304
304
|
};
|
|
305
|
+
readonly Resources: {
|
|
306
|
+
readonly type: "object";
|
|
307
|
+
readonly additionalProperties: false;
|
|
308
|
+
readonly properties: {
|
|
309
|
+
readonly categories: {
|
|
310
|
+
readonly type: "object";
|
|
311
|
+
readonly additionalProperties: false;
|
|
312
|
+
readonly properties: {
|
|
313
|
+
readonly order: {
|
|
314
|
+
readonly type: "array";
|
|
315
|
+
readonly description: string;
|
|
316
|
+
readonly items: {
|
|
317
|
+
readonly type: "string";
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
};
|
|
305
324
|
};
|
|
306
325
|
};
|
|
307
326
|
readonly credentials: {
|
|
@@ -248,6 +248,19 @@ const organizationSchema = {
|
|
|
248
248
|
items: { type: "string" }
|
|
249
249
|
} }
|
|
250
250
|
} }
|
|
251
|
+
},
|
|
252
|
+
Resources: {
|
|
253
|
+
type: "object",
|
|
254
|
+
additionalProperties: false,
|
|
255
|
+
properties: { categories: {
|
|
256
|
+
type: "object",
|
|
257
|
+
additionalProperties: false,
|
|
258
|
+
properties: { order: {
|
|
259
|
+
type: "array",
|
|
260
|
+
description: "Org-wide curated Resource Category ID order, shared by every Property's view of the Resource Library. IDs for deleted Categories are ignored on read; Categories not yet listed sort to the end alphabetically.",
|
|
261
|
+
items: { type: "string" }
|
|
262
|
+
} }
|
|
263
|
+
} }
|
|
251
264
|
}
|
|
252
265
|
}
|
|
253
266
|
},
|
|
@@ -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 // Widening this enum requires a minor-units exponent table first:\n // parseMoneyToCents and centsToInput both assume 2 decimal places.\n currency: {\n type: \"string\",\n enum: [\"USD\"],\n default: \"USD\",\n description:\n \"ISO 4217 currency code for all of the organization's money amounts. USD only in v1.\",\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 autoCloseAfterMinutes: {\n type: \"integer\",\n description:\n \"Minutes a solved Ticket waits before it is automatically closed. Always on; read when the close job is scheduled.\",\n default: 10080,\n minimum: 5,\n },\n notifications: {\n type: \"array\",\n description:\n \"Org-wide ticket notification defaults: the starting channel set per event, and whether members may turn an event off. Read when resolving a member's effective channels.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"discriminator\", \"channels\", \"locked\"],\n properties: {\n discriminator: {\n $ref: \"definitions.json#/definitions/ticketNotificationEvent\",\n },\n channels: {\n type: \"array\",\n items: {\n $ref: \"definitions.json#/definitions/notificationChannel\",\n },\n },\n locked: {\n type: \"boolean\",\n },\n },\n },\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 facilities: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n enabled: {\n type: \"boolean\",\n default: false,\n },\n agentUserId: {\n type: [\"string\", \"null\"],\n default: null,\n },\n },\n },\n approvals: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n dneAmount: {\n type: [\"integer\", \"null\"],\n minimum: 0,\n default: null,\n description:\n \"Do-not-exceed amount in integer cents. Tickets whose marked-up estimate total exceeds it require approval; null or unset means the gate is off.\",\n },\n approverUserIds: {\n type: \"array\",\n default: [],\n description:\n \"Org users asked to approve when the gate trips; the effective set freezes onto each approval record at request time.\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n costs: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n markupTiers: {\n type: \"array\",\n default: [],\n lowerBoundTable: { key: \"minAmount\" },\n description:\n \"Lower-bound markup rows keyed per cost entry by its vendor-cost estimate: first row minAmount 0, minAmounts strictly ascending, so gaps and overlaps are impossible. No property override; visible to roster agents and superadmins only, never to org-side viewers.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"minAmount\", \"percent\"],\n properties: {\n minAmount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"Inclusive lower bound of the tier in integer cents.\",\n },\n percent: {\n type: \"number\",\n minimum: 0,\n description: \"Markup percent for the tier, uncapped.\",\n },\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 taxExempt: {\n type: \"boolean\",\n default: false,\n description:\n \"Whether OneBill bills to this organization carry no tax. Kohost \" +\n \"staff-edited; a draft bill live-reads it and snapshots it at \" +\n \"mark-sent.\",\n },\n billingAddress: {\n $ref: \"definitions.json#/definitions/address\",\n description:\n \"Postal address printed on OneBill bills. Org administrators edit it; \" +\n \"a bill live-reads it while draft and snapshots it at mark-sent, which \" +\n \"requires line1, city, state, and postalCode to be non-empty.\",\n },\n billingContacts: {\n type: \"array\",\n description:\n \"Recipients of the bill-sent email. KFC-edited only; plain name/email \" +\n \"pairs, recipients need not be platform users. Mark-sent requires at \" +\n \"least one contact.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"name\", \"email\"],\n properties: {\n name: {\n type: \"string\",\n minLength: 1,\n },\n email: {\n type: \"string\",\n format: \"email\",\n },\n },\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\ntype ConciergeFeatures = NonNullable<\n NonNullable<OrganizationSchema[\"features\"]>[\"Concierge\"]\n>;\n\ntype ConciergeTickets = NonNullable<ConciergeFeatures[\"tickets\"]>;\n\n/** Org-level DNE approval gate config: amount plus default approver set. */\nexport type ConciergeApprovalsConfig = NonNullable<\n ConciergeFeatures[\"approvals\"]\n>;\n\n/**\n * The ISO 4217 code every money amount an organization owns is denominated in.\n * USD alone in v1: widening the enum needs a minor-units exponent table first.\n */\nexport type Currency = NonNullable<OrganizationSchema[\"currency\"]>;\n\n/** One lower-bound markup tier row. */\nexport type MarkupTier = NonNullable<\n NonNullable<ConciergeFeatures[\"costs\"]>[\"markupTiers\"]\n>[number];\n\n/** One OneBill billing contact: a plain name/email pair, KFC-edited. */\nexport type OrganizationBillingContact = NonNullable<\n OrganizationSchema[\"billingContacts\"]\n>[number];\n\n/** One org-wide ticket notification default: channels + lock for a single event. */\nexport type OrgNotificationDefaultEntry = NonNullable<\n ConciergeTickets[\"notifications\"]\n>[number];\n\n/** Response envelope for the org notification defaults endpoints. */\nexport interface OrgNotificationDefaults {\n organizationId: string;\n notifications: OrgNotificationDefaultEntry[];\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;EAGA,UAAU;GACR,MAAM;GACN,MAAM,CAAC,KAAK;GACZ,SAAS;GACT,aACE;EACJ;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;QACV,kBAAkB;SAChB,MAAM,CAAC,UAAU,SAAS;SAC1B,SAAS;QACX;QACA,uBAAuB;SACrB,MAAM;SACN,aACE;SACF,SAAS;SACT,SAAS;QACX;QACA,eAAe;SACb,MAAM;SACN,aACE;SACF,OAAO;UACL,MAAM;UACN,sBAAsB;UACtB,UAAU;WAAC;WAAiB;WAAY;UAAQ;UAChD,YAAY;WACV,eAAe,EACb,MAAM,wDACR;WACA,UAAU;YACR,MAAM;YACN,OAAO,EACL,MAAM,oDACR;WACF;WACA,QAAQ,EACN,MAAM,UACR;UACF;SACF;QACF;OACF;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;MACA,YAAY;OACV,MAAM;OACN,sBAAsB;OACtB,YAAY;QACV,SAAS;SACP,MAAM;SACN,SAAS;QACX;QACA,aAAa;SACX,MAAM,CAAC,UAAU,MAAM;SACvB,SAAS;QACX;OACF;MACF;MACA,WAAW;OACT,MAAM;OACN,sBAAsB;OACtB,YAAY;QACV,WAAW;SACT,MAAM,CAAC,WAAW,MAAM;SACxB,SAAS;SACT,SAAS;SACT,aACE;QACJ;QACA,iBAAiB;SACf,MAAM;SACN,SAAS,CAAC;SACV,aACE;SACF,OAAO,EACL,MAAM,SACR;QACF;OACF;MACF;MACA,OAAO;OACL,MAAM;OACN,sBAAsB;OACtB,YAAY,EACV,aAAa;QACX,MAAM;QACN,SAAS,CAAC;QACV,iBAAiB,EAAE,KAAK,YAAY;QACpC,aACE;QACF,OAAO;SACL,MAAM;SACN,sBAAsB;SACtB,UAAU,CAAC,aAAa,SAAS;SACjC,YAAY;UACV,WAAW;WACT,MAAM;WACN,SAAS;WACT,aACE;UACJ;UACA,SAAS;WACP,MAAM;WACN,SAAS;WACT,aAAa;UACf;SACF;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;GACT,MAAM;GACN,SAAS;GACT,aACE;EAGJ;EACA,gBAAgB;GACd,MAAM;GACN,aACE;EAGJ;EACA,iBAAiB;GACf,MAAM;GACN,aACE;GAGF,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU,CAAC,QAAQ,OAAO;IAC1B,YAAY;KACV,MAAM;MACJ,MAAM;MACN,WAAW;KACb;KACA,OAAO;MACL,MAAM;MACN,QAAQ;KACV;IACF;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
|
|
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 // Widening this enum requires a minor-units exponent table first:\n // parseMoneyToCents and centsToInput both assume 2 decimal places.\n currency: {\n type: \"string\",\n enum: [\"USD\"],\n default: \"USD\",\n description:\n \"ISO 4217 currency code for all of the organization's money amounts. USD only in v1.\",\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 autoCloseAfterMinutes: {\n type: \"integer\",\n description:\n \"Minutes a solved Ticket waits before it is automatically closed. Always on; read when the close job is scheduled.\",\n default: 10080,\n minimum: 5,\n },\n notifications: {\n type: \"array\",\n description:\n \"Org-wide ticket notification defaults: the starting channel set per event, and whether members may turn an event off. Read when resolving a member's effective channels.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"discriminator\", \"channels\", \"locked\"],\n properties: {\n discriminator: {\n $ref: \"definitions.json#/definitions/ticketNotificationEvent\",\n },\n channels: {\n type: \"array\",\n items: {\n $ref: \"definitions.json#/definitions/notificationChannel\",\n },\n },\n locked: {\n type: \"boolean\",\n },\n },\n },\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 facilities: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n enabled: {\n type: \"boolean\",\n default: false,\n },\n agentUserId: {\n type: [\"string\", \"null\"],\n default: null,\n },\n },\n },\n approvals: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n dneAmount: {\n type: [\"integer\", \"null\"],\n minimum: 0,\n default: null,\n description:\n \"Do-not-exceed amount in integer cents. Tickets whose marked-up estimate total exceeds it require approval; null or unset means the gate is off.\",\n },\n approverUserIds: {\n type: \"array\",\n default: [],\n description:\n \"Org users asked to approve when the gate trips; the effective set freezes onto each approval record at request time.\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n costs: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n markupTiers: {\n type: \"array\",\n default: [],\n lowerBoundTable: { key: \"minAmount\" },\n description:\n \"Lower-bound markup rows keyed per cost entry by its vendor-cost estimate: first row minAmount 0, minAmounts strictly ascending, so gaps and overlaps are impossible. No property override; visible to roster agents and superadmins only, never to org-side viewers.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"minAmount\", \"percent\"],\n properties: {\n minAmount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"Inclusive lower bound of the tier in integer cents.\",\n },\n percent: {\n type: \"number\",\n minimum: 0,\n description: \"Markup percent for the tier, uncapped.\",\n },\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 Resources: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n categories: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n order: {\n type: \"array\",\n description:\n \"Org-wide curated Resource Category ID order, shared by every \" +\n \"Property's view of the Resource Library. IDs for deleted Categories \" +\n \"are ignored on read; Categories not yet listed sort to the end \" +\n \"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 taxExempt: {\n type: \"boolean\",\n default: false,\n description:\n \"Whether OneBill bills to this organization carry no tax. Kohost \" +\n \"staff-edited; a draft bill live-reads it and snapshots it at \" +\n \"mark-sent.\",\n },\n billingAddress: {\n $ref: \"definitions.json#/definitions/address\",\n description:\n \"Postal address printed on OneBill bills. Org administrators edit it; \" +\n \"a bill live-reads it while draft and snapshots it at mark-sent, which \" +\n \"requires line1, city, state, and postalCode to be non-empty.\",\n },\n billingContacts: {\n type: \"array\",\n description:\n \"Recipients of the bill-sent email. KFC-edited only; plain name/email \" +\n \"pairs, recipients need not be platform users. Mark-sent requires at \" +\n \"least one contact.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"name\", \"email\"],\n properties: {\n name: {\n type: \"string\",\n minLength: 1,\n },\n email: {\n type: \"string\",\n format: \"email\",\n },\n },\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\ntype ConciergeFeatures = NonNullable<\n NonNullable<OrganizationSchema[\"features\"]>[\"Concierge\"]\n>;\n\ntype ConciergeTickets = NonNullable<ConciergeFeatures[\"tickets\"]>;\n\n/** Org-level DNE approval gate config: amount plus default approver set. */\nexport type ConciergeApprovalsConfig = NonNullable<\n ConciergeFeatures[\"approvals\"]\n>;\n\n/**\n * The ISO 4217 code every money amount an organization owns is denominated in.\n * USD alone in v1: widening the enum needs a minor-units exponent table first.\n */\nexport type Currency = NonNullable<OrganizationSchema[\"currency\"]>;\n\n/** One lower-bound markup tier row. */\nexport type MarkupTier = NonNullable<\n NonNullable<ConciergeFeatures[\"costs\"]>[\"markupTiers\"]\n>[number];\n\n/** One OneBill billing contact: a plain name/email pair, KFC-edited. */\nexport type OrganizationBillingContact = NonNullable<\n OrganizationSchema[\"billingContacts\"]\n>[number];\n\n/** One org-wide ticket notification default: channels + lock for a single event. */\nexport type OrgNotificationDefaultEntry = NonNullable<\n ConciergeTickets[\"notifications\"]\n>[number];\n\n/** Response envelope for the org notification defaults endpoints. */\nexport interface OrgNotificationDefaults {\n organizationId: string;\n notifications: OrgNotificationDefaultEntry[];\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;EAGA,UAAU;GACR,MAAM;GACN,MAAM,CAAC,KAAK;GACZ,SAAS;GACT,aACE;EACJ;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;QACV,kBAAkB;SAChB,MAAM,CAAC,UAAU,SAAS;SAC1B,SAAS;QACX;QACA,uBAAuB;SACrB,MAAM;SACN,aACE;SACF,SAAS;SACT,SAAS;QACX;QACA,eAAe;SACb,MAAM;SACN,aACE;SACF,OAAO;UACL,MAAM;UACN,sBAAsB;UACtB,UAAU;WAAC;WAAiB;WAAY;UAAQ;UAChD,YAAY;WACV,eAAe,EACb,MAAM,wDACR;WACA,UAAU;YACR,MAAM;YACN,OAAO,EACL,MAAM,oDACR;WACF;WACA,QAAQ,EACN,MAAM,UACR;UACF;SACF;QACF;OACF;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;MACA,YAAY;OACV,MAAM;OACN,sBAAsB;OACtB,YAAY;QACV,SAAS;SACP,MAAM;SACN,SAAS;QACX;QACA,aAAa;SACX,MAAM,CAAC,UAAU,MAAM;SACvB,SAAS;QACX;OACF;MACF;MACA,WAAW;OACT,MAAM;OACN,sBAAsB;OACtB,YAAY;QACV,WAAW;SACT,MAAM,CAAC,WAAW,MAAM;SACxB,SAAS;SACT,SAAS;SACT,aACE;QACJ;QACA,iBAAiB;SACf,MAAM;SACN,SAAS,CAAC;SACV,aACE;SACF,OAAO,EACL,MAAM,SACR;QACF;OACF;MACF;MACA,OAAO;OACL,MAAM;OACN,sBAAsB;OACtB,YAAY,EACV,aAAa;QACX,MAAM;QACN,SAAS,CAAC;QACV,iBAAiB,EAAE,KAAK,YAAY;QACpC,aACE;QACF,OAAO;SACL,MAAM;SACN,sBAAsB;SACtB,UAAU,CAAC,aAAa,SAAS;SACjC,YAAY;UACV,WAAW;WACT,MAAM;WACN,SAAS;WACT,aACE;UACJ;UACA,SAAS;WACP,MAAM;WACN,SAAS;WACT,aAAa;UACf;SACF;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;IACA,WAAW;KACT,MAAM;KACN,sBAAsB;KACtB,YAAY,EACV,YAAY;MACV,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;GACT,MAAM;GACN,SAAS;GACT,aACE;EAGJ;EACA,gBAAgB;GACd,MAAM;GACN,aACE;EAGJ;EACA,iBAAiB;GACf,MAAM;GACN,aACE;GAGF,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU,CAAC,QAAQ,OAAO;IAC1B,YAAY;KACV,MAAM;MACJ,MAAM;MACN,WAAW;KACb;KACA,OAAO;MACL,MAAM;MACN,QAAQ;KACV;IACF;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
|
|
@@ -243,6 +243,10 @@ export declare const propertySchema: {
|
|
|
243
243
|
};
|
|
244
244
|
};
|
|
245
245
|
};
|
|
246
|
+
readonly currentEventId: {
|
|
247
|
+
readonly type: readonly ["string", "null"];
|
|
248
|
+
readonly description: "ID of the sosEvent record for the in-progress activation. Set while active, cleared when the SOS is stopped.";
|
|
249
|
+
};
|
|
246
250
|
};
|
|
247
251
|
};
|
|
248
252
|
readonly Automations: {
|
|
@@ -264,6 +268,16 @@ export declare const propertySchema: {
|
|
|
264
268
|
};
|
|
265
269
|
readonly additionalProperties: false;
|
|
266
270
|
};
|
|
271
|
+
readonly Announcements: {
|
|
272
|
+
readonly type: "object";
|
|
273
|
+
readonly properties: {
|
|
274
|
+
readonly enabled: {
|
|
275
|
+
readonly type: "boolean";
|
|
276
|
+
readonly default: true;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
readonly additionalProperties: false;
|
|
280
|
+
};
|
|
267
281
|
};
|
|
268
282
|
readonly additionalProperties: false;
|
|
269
283
|
readonly default: {
|
package/dist/schemas/property.js
CHANGED
|
@@ -194,6 +194,10 @@ const propertySchema = {
|
|
|
194
194
|
"automation"
|
|
195
195
|
] }
|
|
196
196
|
}
|
|
197
|
+
},
|
|
198
|
+
currentEventId: {
|
|
199
|
+
type: ["string", "null"],
|
|
200
|
+
description: "ID of the sosEvent record for the in-progress activation. Set while active, cleared when the SOS is stopped."
|
|
197
201
|
}
|
|
198
202
|
}
|
|
199
203
|
},
|
|
@@ -209,6 +213,14 @@ const propertySchema = {
|
|
|
209
213
|
default: true
|
|
210
214
|
} },
|
|
211
215
|
additionalProperties: false
|
|
216
|
+
},
|
|
217
|
+
Announcements: {
|
|
218
|
+
type: "object",
|
|
219
|
+
properties: { enabled: {
|
|
220
|
+
type: "boolean",
|
|
221
|
+
default: true
|
|
222
|
+
} },
|
|
223
|
+
additionalProperties: false
|
|
212
224
|
}
|
|
213
225
|
},
|
|
214
226
|
additionalProperties: false,
|
|
@@ -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 facilities: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-property override of the organization's facilities (KFC) config; fields are deliberately default-free so absence inherits the organization value\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n agentUserId: {\n type: [\"string\", \"null\"],\n },\n },\n },\n approvals: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-property override of the organization's approvals config; fields are deliberately default-free so absence inherits the organization value. Values only: the gate cannot be disabled per property, and markup tiers are org-only.\",\n properties: {\n dneAmount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"Do-not-exceed amount in integer cents for this property.\",\n },\n approverUserIds: {\n type: \"array\",\n description:\n \"Org users asked to approve for this property, replacing the org list when present.\",\n items: {\n type: \"string\",\n },\n },\n },\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,YAAY;OACV,MAAM;OACN,sBAAsB;OACtB,aACE;OACF,YAAY;QACV,SAAS,EACP,MAAM,UACR;QACA,aAAa,EACX,MAAM,CAAC,UAAU,MAAM,EACzB;OACF;MACF;MACA,WAAW;OACT,MAAM;OACN,sBAAsB;OACtB,aACE;OACF,YAAY;QACV,WAAW;SACT,MAAM;SACN,SAAS;SACT,aACE;QACJ;QACA,iBAAiB;SACf,MAAM;SACN,aACE;SACF,OAAO,EACL,MAAM,SACR;QACF;OACF;MACF;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"}
|
|
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 facilities: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-property override of the organization's facilities (KFC) config; fields are deliberately default-free so absence inherits the organization value\",\n properties: {\n enabled: {\n type: \"boolean\",\n },\n agentUserId: {\n type: [\"string\", \"null\"],\n },\n },\n },\n approvals: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-property override of the organization's approvals config; fields are deliberately default-free so absence inherits the organization value. Values only: the gate cannot be disabled per property, and markup tiers are org-only.\",\n properties: {\n dneAmount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"Do-not-exceed amount in integer cents for this property.\",\n },\n approverUserIds: {\n type: \"array\",\n description:\n \"Org users asked to approve for this property, replacing the org list when present.\",\n items: {\n type: \"string\",\n },\n },\n },\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 currentEventId: {\n type: [\"string\", \"null\"],\n description:\n \"ID of the sosEvent record for the in-progress activation. Set while active, cleared when the SOS is stopped.\",\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 Announcements: {\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,YAAY;OACV,MAAM;OACN,sBAAsB;OACtB,aACE;OACF,YAAY;QACV,SAAS,EACP,MAAM,UACR;QACA,aAAa,EACX,MAAM,CAAC,UAAU,MAAM,EACzB;OACF;MACF;MACA,WAAW;OACT,MAAM;OACN,sBAAsB;OACtB,aACE;OACF,YAAY;QACV,WAAW;SACT,MAAM;SACN,SAAS;SACT,aACE;QACJ;QACA,iBAAiB;SACf,MAAM;SACN,aACE;SACF,OAAO,EACL,MAAM,SACR;QACF;OACF;MACF;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;MACA,gBAAgB;OACd,MAAM,CAAC,UAAU,MAAM;OACvB,aACE;MACJ;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;IACA,eAAe;KACb,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,137 @@
|
|
|
1
|
+
import defs, { ISODateString } from "./definitions.js";
|
|
2
|
+
import type { mediaFileSchema } from "./mediaFile.js";
|
|
3
|
+
import type { FromSchema } from "json-schema-to-ts";
|
|
4
|
+
export declare const resourceSchema: {
|
|
5
|
+
readonly $schema: "http://json-schema.org/draft-07/schema";
|
|
6
|
+
readonly $id: "resource.json";
|
|
7
|
+
readonly title: "Resource";
|
|
8
|
+
readonly description: "An entry in the organization's resource library — an uploaded file or an external link.";
|
|
9
|
+
readonly type: "object";
|
|
10
|
+
readonly required: readonly ["id", "type", "discriminator", "name", "scope"];
|
|
11
|
+
readonly properties: {
|
|
12
|
+
readonly id: {
|
|
13
|
+
readonly $ref: "definitions.json#/definitions/id";
|
|
14
|
+
};
|
|
15
|
+
readonly type: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly enum: readonly ["resource"];
|
|
18
|
+
readonly default: "resource";
|
|
19
|
+
};
|
|
20
|
+
readonly discriminator: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
readonly enum: readonly ["file", "link"];
|
|
23
|
+
readonly description: "Which payload the resource carries: `file` an uploaded document in `media`, `link` an external address in `url`.";
|
|
24
|
+
};
|
|
25
|
+
readonly name: {
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
readonly minLength: 1;
|
|
28
|
+
readonly description: "Display name. A file resource defaults to its filename at creation and is editable independently of it.";
|
|
29
|
+
};
|
|
30
|
+
readonly description: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
};
|
|
33
|
+
readonly url: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
readonly format: "uri";
|
|
36
|
+
readonly description: "The external address a `link` resource points at.";
|
|
37
|
+
};
|
|
38
|
+
readonly media: {
|
|
39
|
+
readonly $ref: "mediaFile.json";
|
|
40
|
+
readonly description: "The uploaded document a `file` resource carries.";
|
|
41
|
+
};
|
|
42
|
+
readonly preview: {
|
|
43
|
+
readonly type: "object";
|
|
44
|
+
readonly additionalProperties: false;
|
|
45
|
+
readonly required: readonly ["url"];
|
|
46
|
+
readonly description: "The generated Open Graph preview image for a `link` resource, stored in the file store's org tier. Written by the system after the link is saved, never by the caller.";
|
|
47
|
+
readonly properties: {
|
|
48
|
+
readonly url: {
|
|
49
|
+
readonly type: "string";
|
|
50
|
+
readonly format: "uri";
|
|
51
|
+
};
|
|
52
|
+
readonly width: {
|
|
53
|
+
readonly type: "number";
|
|
54
|
+
};
|
|
55
|
+
readonly height: {
|
|
56
|
+
readonly type: "number";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
readonly categoryIds: {
|
|
61
|
+
readonly type: "array";
|
|
62
|
+
readonly items: {
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
};
|
|
65
|
+
readonly default: readonly [];
|
|
66
|
+
readonly description: "The `resource` categories this resource appears under. Empty means uncategorized.";
|
|
67
|
+
};
|
|
68
|
+
readonly scope: {
|
|
69
|
+
readonly type: "object";
|
|
70
|
+
readonly description: "Where this resource is available: an org-wide `default` plus a sparse map of per-Property overrides. Mirrors an SOS Type's scope; `false` suppresses, an absent key inherits `default`.";
|
|
71
|
+
readonly additionalProperties: false;
|
|
72
|
+
readonly properties: {
|
|
73
|
+
readonly default: {
|
|
74
|
+
readonly type: "boolean";
|
|
75
|
+
readonly default: false;
|
|
76
|
+
readonly description: "Org-wide baseline: whether the resource is available at Properties with no override, including Properties added later.";
|
|
77
|
+
};
|
|
78
|
+
readonly properties: {
|
|
79
|
+
readonly type: "object";
|
|
80
|
+
readonly additionalProperties: {
|
|
81
|
+
readonly type: "boolean";
|
|
82
|
+
};
|
|
83
|
+
readonly default: {};
|
|
84
|
+
readonly description: "Sparse per-Property overrides keyed by Property ID: `true` opts in, `false` opts out, an absent key inherits `default`.";
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
readonly createdBy: {
|
|
89
|
+
readonly type: "object";
|
|
90
|
+
readonly additionalProperties: false;
|
|
91
|
+
readonly required: readonly ["id", "discriminator", "name"];
|
|
92
|
+
readonly description: "Who added the resource, embedded at creation so the library shows provenance without a join.";
|
|
93
|
+
readonly properties: {
|
|
94
|
+
readonly id: {
|
|
95
|
+
readonly type: "string";
|
|
96
|
+
};
|
|
97
|
+
readonly discriminator: {
|
|
98
|
+
readonly type: "string";
|
|
99
|
+
readonly enum: readonly ["user", "system"];
|
|
100
|
+
};
|
|
101
|
+
readonly name: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
};
|
|
104
|
+
readonly photo: {
|
|
105
|
+
readonly anyOf: readonly [{
|
|
106
|
+
readonly $ref: "mediaFile.json";
|
|
107
|
+
}, {
|
|
108
|
+
readonly type: "null";
|
|
109
|
+
}, {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
}];
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
readonly createdAt: {
|
|
116
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
117
|
+
};
|
|
118
|
+
readonly updatedAt: {
|
|
119
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
120
|
+
};
|
|
121
|
+
readonly deletedAt: {
|
|
122
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
readonly additionalProperties: false;
|
|
126
|
+
};
|
|
127
|
+
export type ResourceSchema = FromSchema<typeof resourceSchema, {
|
|
128
|
+
references: [typeof defs, typeof mediaFileSchema];
|
|
129
|
+
deserialize: [
|
|
130
|
+
{
|
|
131
|
+
pattern: {
|
|
132
|
+
format: "date-time";
|
|
133
|
+
};
|
|
134
|
+
output: Date | ISODateString;
|
|
135
|
+
}
|
|
136
|
+
];
|
|
137
|
+
}>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
//#region .generated/schemas/resource.ts
|
|
2
|
+
const resourceSchema = {
|
|
3
|
+
$schema: "http://json-schema.org/draft-07/schema",
|
|
4
|
+
$id: "resource.json",
|
|
5
|
+
title: "Resource",
|
|
6
|
+
description: "An entry in the organization's resource library — an uploaded file or an external link.",
|
|
7
|
+
type: "object",
|
|
8
|
+
required: [
|
|
9
|
+
"id",
|
|
10
|
+
"type",
|
|
11
|
+
"discriminator",
|
|
12
|
+
"name",
|
|
13
|
+
"scope"
|
|
14
|
+
],
|
|
15
|
+
properties: {
|
|
16
|
+
id: { $ref: "definitions.json#/definitions/id" },
|
|
17
|
+
type: {
|
|
18
|
+
type: "string",
|
|
19
|
+
enum: ["resource"],
|
|
20
|
+
default: "resource"
|
|
21
|
+
},
|
|
22
|
+
discriminator: {
|
|
23
|
+
type: "string",
|
|
24
|
+
enum: ["file", "link"],
|
|
25
|
+
description: "Which payload the resource carries: `file` an uploaded document in `media`, `link` an external address in `url`."
|
|
26
|
+
},
|
|
27
|
+
name: {
|
|
28
|
+
type: "string",
|
|
29
|
+
minLength: 1,
|
|
30
|
+
description: "Display name. A file resource defaults to its filename at creation and is editable independently of it."
|
|
31
|
+
},
|
|
32
|
+
description: { type: "string" },
|
|
33
|
+
url: {
|
|
34
|
+
type: "string",
|
|
35
|
+
format: "uri",
|
|
36
|
+
description: "The external address a `link` resource points at."
|
|
37
|
+
},
|
|
38
|
+
media: {
|
|
39
|
+
$ref: "mediaFile.json",
|
|
40
|
+
description: "The uploaded document a `file` resource carries."
|
|
41
|
+
},
|
|
42
|
+
preview: {
|
|
43
|
+
type: "object",
|
|
44
|
+
additionalProperties: false,
|
|
45
|
+
required: ["url"],
|
|
46
|
+
description: "The generated Open Graph preview image for a `link` resource, stored in the file store's org tier. Written by the system after the link is saved, never by the caller.",
|
|
47
|
+
properties: {
|
|
48
|
+
url: {
|
|
49
|
+
type: "string",
|
|
50
|
+
format: "uri"
|
|
51
|
+
},
|
|
52
|
+
width: { type: "number" },
|
|
53
|
+
height: { type: "number" }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
categoryIds: {
|
|
57
|
+
type: "array",
|
|
58
|
+
items: { type: "string" },
|
|
59
|
+
default: [],
|
|
60
|
+
description: "The `resource` categories this resource appears under. Empty means uncategorized."
|
|
61
|
+
},
|
|
62
|
+
scope: {
|
|
63
|
+
type: "object",
|
|
64
|
+
description: "Where this resource is available: an org-wide `default` plus a sparse map of per-Property overrides. Mirrors an SOS Type's scope; `false` suppresses, an absent key inherits `default`.",
|
|
65
|
+
additionalProperties: false,
|
|
66
|
+
properties: {
|
|
67
|
+
default: {
|
|
68
|
+
type: "boolean",
|
|
69
|
+
default: false,
|
|
70
|
+
description: "Org-wide baseline: whether the resource is available at Properties with no override, including Properties added later."
|
|
71
|
+
},
|
|
72
|
+
properties: {
|
|
73
|
+
type: "object",
|
|
74
|
+
additionalProperties: { type: "boolean" },
|
|
75
|
+
default: {},
|
|
76
|
+
description: "Sparse per-Property overrides keyed by Property ID: `true` opts in, `false` opts out, an absent key inherits `default`."
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
createdBy: {
|
|
81
|
+
type: "object",
|
|
82
|
+
additionalProperties: false,
|
|
83
|
+
required: [
|
|
84
|
+
"id",
|
|
85
|
+
"discriminator",
|
|
86
|
+
"name"
|
|
87
|
+
],
|
|
88
|
+
description: "Who added the resource, embedded at creation so the library shows provenance without a join.",
|
|
89
|
+
properties: {
|
|
90
|
+
id: { type: "string" },
|
|
91
|
+
discriminator: {
|
|
92
|
+
type: "string",
|
|
93
|
+
enum: ["user", "system"]
|
|
94
|
+
},
|
|
95
|
+
name: { type: "string" },
|
|
96
|
+
photo: { anyOf: [
|
|
97
|
+
{ $ref: "mediaFile.json" },
|
|
98
|
+
{ type: "null" },
|
|
99
|
+
{ type: "string" }
|
|
100
|
+
] }
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
createdAt: { $ref: "definitions.json#/definitions/date" },
|
|
104
|
+
updatedAt: { $ref: "definitions.json#/definitions/date" },
|
|
105
|
+
deletedAt: { $ref: "definitions.json#/definitions/date" }
|
|
106
|
+
},
|
|
107
|
+
additionalProperties: false
|
|
108
|
+
};
|
|
109
|
+
//#endregion
|
|
110
|
+
export { resourceSchema };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.js","names":[],"sources":["../../.generated/schemas/resource.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { mediaFileSchema } from \"./mediaFile\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const resourceSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"resource.json\",\n title: \"Resource\",\n description:\n \"An entry in the organization's resource library — an uploaded file or an external link.\",\n type: \"object\",\n required: [\"id\", \"type\", \"discriminator\", \"name\", \"scope\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n enum: [\"resource\"],\n default: \"resource\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"file\", \"link\"],\n description:\n \"Which payload the resource carries: `file` an uploaded document in `media`, `link` an external address in `url`.\",\n },\n name: {\n type: \"string\",\n minLength: 1,\n description:\n \"Display name. A file resource defaults to its filename at creation and is editable independently of it.\",\n },\n description: {\n type: \"string\",\n },\n url: {\n type: \"string\",\n format: \"uri\",\n description: \"The external address a `link` resource points at.\",\n },\n media: {\n $ref: \"mediaFile.json\",\n description: \"The uploaded document a `file` resource carries.\",\n },\n preview: {\n type: \"object\",\n additionalProperties: false,\n required: [\"url\"],\n description:\n \"The generated Open Graph preview image for a `link` resource, stored in the file store's org tier. Written by the system after the link is saved, never by the caller.\",\n properties: {\n url: {\n type: \"string\",\n format: \"uri\",\n },\n width: {\n type: \"number\",\n },\n height: {\n type: \"number\",\n },\n },\n },\n categoryIds: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n default: [],\n description:\n \"The `resource` categories this resource appears under. Empty means uncategorized.\",\n },\n scope: {\n type: \"object\",\n description:\n \"Where this resource is available: an org-wide `default` plus a sparse map of per-Property overrides. Mirrors an SOS Type's scope; `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 resource is available 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 createdBy: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n description:\n \"Who added the resource, embedded at creation so the library shows provenance without a join.\",\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"system\"],\n },\n name: {\n type: \"string\",\n },\n photo: {\n anyOf: [\n {\n $ref: \"mediaFile.json\",\n },\n {\n type: \"null\",\n },\n {\n type: \"string\",\n },\n ],\n },\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 additionalProperties: false,\n} as const;\n\nexport type ResourceSchema = FromSchema<\n typeof resourceSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAIA,MAAa,iBAAiB;CAC5B,SAAS;CACT,KAAK;CACL,OAAO;CACP,aACE;CACF,MAAM;CACN,UAAU;EAAC;EAAM;EAAQ;EAAiB;EAAQ;CAAO;CACzD,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM;GACJ,MAAM;GACN,MAAM,CAAC,UAAU;GACjB,SAAS;EACX;EACA,eAAe;GACb,MAAM;GACN,MAAM,CAAC,QAAQ,MAAM;GACrB,aACE;EACJ;EACA,MAAM;GACJ,MAAM;GACN,WAAW;GACX,aACE;EACJ;EACA,aAAa,EACX,MAAM,SACR;EACA,KAAK;GACH,MAAM;GACN,QAAQ;GACR,aAAa;EACf;EACA,OAAO;GACL,MAAM;GACN,aAAa;EACf;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,UAAU,CAAC,KAAK;GAChB,aACE;GACF,YAAY;IACV,KAAK;KACH,MAAM;KACN,QAAQ;IACV;IACA,OAAO,EACL,MAAM,SACR;IACA,QAAQ,EACN,MAAM,SACR;GACF;EACF;EACA,aAAa;GACX,MAAM;GACN,OAAO,EACL,MAAM,SACR;GACA,SAAS,CAAC;GACV,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,sBAAsB;GACtB,UAAU;IAAC;IAAM;IAAiB;GAAM;GACxC,aACE;GACF,YAAY;IACV,IAAI,EACF,MAAM,SACR;IACA,eAAe;KACb,MAAM;KACN,MAAM,CAAC,QAAQ,QAAQ;IACzB;IACA,MAAM,EACJ,MAAM,SACR;IACA,OAAO,EACL,OAAO;KACL,EACE,MAAM,iBACR;KACA,EACE,MAAM,OACR;KACA,EACE,MAAM,SACR;IACF,EACF;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;CACA,sBAAsB;AACxB"}
|
|
@@ -34,6 +34,10 @@ export declare const smsMessageSchema: {
|
|
|
34
34
|
readonly type: "string";
|
|
35
35
|
readonly enum: readonly ["queued", "accepted", "sending", "sent", "failed", "delivered", "undelivered", "receiving", "received", "read"];
|
|
36
36
|
};
|
|
37
|
+
readonly errorCode: {
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
readonly description: "Raw vendor delivery-failure code, e.g. Twilio 21610.";
|
|
40
|
+
};
|
|
37
41
|
readonly body: {
|
|
38
42
|
readonly type: "string";
|
|
39
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smsMessage.js","names":[],"sources":["../../.generated/schemas/smsMessage.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const smsMessageSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"smsMessage.json\",\n title: \"Sms Message\",\n type: \"object\",\n required: [\"id\", \"type\", \"to\", \"from\", \"status\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description: \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n default: \"smsMessage\",\n enum: [\"smsMessage\", \"whatsappMessage\"],\n },\n to: {\n type: \"string\",\n },\n from: {\n type: \"string\",\n },\n media: {\n type: \"string\",\n format: \"uri\",\n },\n status: {\n type: \"string\",\n enum: [\n \"queued\",\n \"accepted\",\n \"sending\",\n \"sent\",\n \"failed\",\n \"delivered\",\n \"undelivered\",\n \"receiving\",\n \"received\",\n \"read\",\n ],\n },\n body: {\n type: \"string\",\n },\n driver: {\n type: \"string\",\n },\n appData: {\n type: \"object\",\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 systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\n },\n },\n} as const;\n\nexport type SmsMessageSchema = FromSchema<\n typeof smsMessageSchema,\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,mBAAmB;CAC9B,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,UAAU;EAAC;EAAM;EAAQ;EAAM;EAAQ;CAAQ;CAC/C,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,YAAY;GACV,MAAM;GACN,aAAa;EACf;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,cAAc,iBAAiB;EACxC;EACA,IAAI,EACF,MAAM,SACR;EACA,MAAM,EACJ,MAAM,SACR;EACA,OAAO;GACL,MAAM;GACN,QAAQ;EACV;EACA,QAAQ;GACN,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ,EACN,MAAM,SACR;EACA,SAAS,EACP,MAAM,SACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,yCACR;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"smsMessage.js","names":[],"sources":["../../.generated/schemas/smsMessage.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const smsMessageSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"smsMessage.json\",\n title: \"Sms Message\",\n type: \"object\",\n required: [\"id\", \"type\", \"to\", \"from\", \"status\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description: \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n default: \"smsMessage\",\n enum: [\"smsMessage\", \"whatsappMessage\"],\n },\n to: {\n type: \"string\",\n },\n from: {\n type: \"string\",\n },\n media: {\n type: \"string\",\n format: \"uri\",\n },\n status: {\n type: \"string\",\n enum: [\n \"queued\",\n \"accepted\",\n \"sending\",\n \"sent\",\n \"failed\",\n \"delivered\",\n \"undelivered\",\n \"receiving\",\n \"received\",\n \"read\",\n ],\n },\n errorCode: {\n type: \"string\",\n description: \"Raw vendor delivery-failure code, e.g. Twilio 21610.\",\n },\n body: {\n type: \"string\",\n },\n driver: {\n type: \"string\",\n },\n appData: {\n type: \"object\",\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 systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\n },\n },\n} as const;\n\nexport type SmsMessageSchema = FromSchema<\n typeof smsMessageSchema,\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,mBAAmB;CAC9B,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,UAAU;EAAC;EAAM;EAAQ;EAAM;EAAQ;CAAQ;CAC/C,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,YAAY;GACV,MAAM;GACN,aAAa;EACf;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,cAAc,iBAAiB;EACxC;EACA,IAAI,EACF,MAAM,SACR;EACA,MAAM,EACJ,MAAM,SACR;EACA,OAAO;GACL,MAAM;GACN,QAAQ;EACV;EACA,QAAQ;GACN,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,WAAW;GACT,MAAM;GACN,aAAa;EACf;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ,EACN,MAAM,SACR;EACA,SAAS,EACP,MAAM,SACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,yCACR;CACF;AACF"}
|