@kohost/api-client 4.21.0 → 4.21.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/schemas/automation.cjs +2 -2
- package/dist/cjs/schemas/automation.cjs.map +1 -1
- package/dist/cjs/schemas/automation.d.cts +2 -2
- package/dist/cjs/schemas/definitions.cjs +3 -0
- package/dist/cjs/schemas/definitions.cjs.map +1 -1
- package/dist/cjs/schemas/definitions.d.cts +3 -0
- package/dist/esm/schemas/automation.d.ts +2 -2
- package/dist/esm/schemas/automation.js +2 -2
- package/dist/esm/schemas/automation.js.map +1 -1
- package/dist/esm/schemas/definitions.d.ts +3 -0
- package/dist/esm/schemas/definitions.js +3 -0
- package/dist/esm/schemas/definitions.js.map +1 -1
- package/package.json +1 -1
|
@@ -63,11 +63,11 @@ const automationSchema = {
|
|
|
63
63
|
type: "object",
|
|
64
64
|
additionalProperties: false,
|
|
65
65
|
description: "RFC 5545 recurrence rule with solar time support",
|
|
66
|
-
required: ["expression", "timezone"
|
|
66
|
+
required: ["expression", "timezone"],
|
|
67
67
|
properties: {
|
|
68
68
|
expression: {
|
|
69
69
|
type: "string",
|
|
70
|
-
description: "RFC 5545 RRULE string
|
|
70
|
+
description: "RFC 5545 RRULE string. Use BYHOUR/BYMINUTE for time when timeMode is omitted. Must not contain BYHOUR/BYMINUTE when timeMode is provided."
|
|
71
71
|
},
|
|
72
72
|
timezone: {
|
|
73
73
|
type: "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/schemas/automation.ts"],"sourcesContent":["import type { FromSchema } from \"json-schema-to-ts\";\nimport defs, { ISODateString } from \"./definitions\";\n\nexport const automationSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"automation.json\",\n title: \"Automation\",\n description: \"An automation is a collection of triggers and actions\",\n type: \"object\",\n required: [\"id\", \"type\", \"trigger\", \"actions\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n description: \"The friendly name of the automation\",\n },\n type: {\n type: \"string\",\n enum: [\"automation\"],\n default: \"automation\",\n },\n isEnabled: {\n type: \"boolean\",\n description: \"Whether the automation is currently enabled\",\n default: true,\n },\n description: {\n type: \"string\",\n description: \"The text description of the automation\",\n },\n trigger: {\n type: \"object\",\n description: \"The trigger that initiates the automation\",\n required: [\"discriminator\"],\n properties: {\n discriminator: {\n type: \"string\",\n enum: [\"schedule\", \"event\", \"rrule\"],\n description: \"Type of trigger\",\n },\n rrule: {\n type: \"object\",\n additionalProperties: false,\n description: \"RFC 5545 recurrence rule with solar time support\",\n required: [\"expression\", \"timezone\", \"timeMode\"],\n properties: {\n expression: {\n type: \"string\",\n description:\n \"RFC 5545 RRULE string (omit BYHOUR/BYMINUTE when using solar timeMode)\",\n },\n timezone: {\n type: \"string\",\n description: \"IANA timezone for rule evaluation\",\n },\n timeMode: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\"fixed\", \"sunrise\", \"sunset\"],\n description:\n \"How to determine execution time on matching days\",\n },\n time: {\n type: \"string\",\n description: \"HH:mm time for fixed mode\",\n },\n offsetSeconds: {\n type: \"integer\",\n description:\n \"Offset in seconds from time or solar event (negative = before)\",\n default: 0,\n },\n },\n },\n location: {\n type: \"object\",\n additionalProperties: false,\n description: \"Required when timeMode is sunrise or sunset\",\n required: [\"lat\", \"lng\"],\n properties: {\n lat: {\n type: \"number\",\n minimum: -90,\n maximum: 90,\n },\n lng: {\n type: \"number\",\n minimum: -180,\n maximum: 180,\n },\n },\n },\n },\n },\n // Time-based trigger properties\n schedule: {\n type: \"object\",\n additionalProperties: false,\n description: \"Schedule for time-based triggers\",\n required: [\"days\", \"time\", \"timezone\"],\n properties: {\n days: {\n type: \"array\",\n description: \"Days of the week (0 = Sunday, 6 = Saturday)\",\n items: {\n type: \"integer\",\n minimum: 0,\n maximum: 6,\n },\n },\n time: {\n type: \"string\",\n description: \"Time of day to trigger the automation\",\n },\n timeOffsetSeconds: {\n type: \"integer\",\n description: \"Offset in seconds from the scheduled time\",\n default: 0,\n },\n repeat: {\n type: \"boolean\",\n description: \"Whether the schedule repeats\",\n default: true,\n },\n timezone: {\n type: \"string\",\n description: \"Timezone for the schedule (IANA timezone format)\",\n },\n },\n },\n event: {\n type: \"object\",\n required: [\"eventType\", \"eventProperties\", \"match\"],\n additionalProperties: false,\n properties: {\n eventType: {\n type: \"string\",\n description:\n \"Name of the event that triggers the automation actions\",\n },\n eventProperties: {\n type: \"array\",\n description:\n \"Properties of the event that triggers the automation actions\",\n items: {\n type: \"object\",\n required: [\"property\", \"value\", \"operator\"],\n additionalProperties: false,\n properties: {\n property: {\n type: \"string\",\n description: \"Property of the event\",\n },\n value: {\n type: [\"string\", \"number\", \"boolean\"],\n description: \"Value of the property\",\n },\n operator: {\n type: \"string\",\n description: \"Operator of the property\",\n enum: [\n \"==\",\n \"!=\",\n \">\",\n \">=\",\n \"<\",\n \"<=\",\n \"contains\",\n \"notContains\",\n ],\n },\n },\n },\n },\n match: {\n type: \"string\",\n description:\n \"Match criteria for the event to trigger the automation actions\",\n enum: [\"any\", \"all\"],\n },\n },\n },\n },\n },\n actions: {\n type: \"array\",\n description: \"Actions to perform when the trigger conditions are met\",\n items: {\n type: \"object\",\n required: [\"useCase\", \"useCaseParams\"],\n additionalProperties: false,\n properties: {\n useCase: {\n type: \"string\",\n description: \"Name of the use case to call\",\n },\n useCaseParams: {\n type: \"object\",\n description: \"Parameters to pass to the use case\",\n required: [\"data\"],\n properties: {\n data: {\n type: [\"object\", \"array\"],\n description: \"Data to pass to the use case\",\n },\n },\n },\n },\n minItems: 1,\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was created\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was updated\",\n },\n nextRunAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation is scheduled to run next\",\n },\n lastRunAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was last triggered\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n webhookUrl: {\n type: \"string\",\n description: \"The URL of the webhook that triggers the automation\",\n format: \"uri\",\n },\n },\n additionalProperties: false,\n} as const;\n\nexport type AutomationSchema = FromSchema<\n typeof automationSchema,\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":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,mBAAmB;AAAA,EAC9B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,QAAQ,WAAW,SAAS;AAAA,EAC7C,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,MAAM,CAAC,YAAY;AAAA,MACnB,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,UAAU,CAAC,eAAe;AAAA,MAC1B,YAAY;AAAA,QACV,eAAe;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,YAAY,SAAS,OAAO;AAAA,UACnC,aAAa;AAAA,QACf;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,UACN,sBAAsB;AAAA,UACtB,aAAa;AAAA,UACb,UAAU,CAAC,cAAc,YAAY,UAAU;AAAA,UAC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tB,YAAY;AAAA,UACV,SAAS;AAAA,YACP,MAAM;AAAA,YACN,aAAa;AAAA,UACf;AAAA,UACA,eAAe;AAAA,YACb,MAAM;AAAA,YACN,aAAa;AAAA,YACb,UAAU,CAAC,MAAM;AAAA,YACjB,YAAY;AAAA,cACV,MAAM;AAAA,gBACJ,MAAM,CAAC,UAAU,OAAO;AAAA,gBACxB,aAAa;AAAA,cACf;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,QACA,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,MACb,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EACA,sBAAsB;AACxB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../.generated/schemas/automation.ts"],"sourcesContent":["import type { FromSchema } from \"json-schema-to-ts\";\nimport defs, { ISODateString } from \"./definitions\";\n\nexport const automationSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"automation.json\",\n title: \"Automation\",\n description: \"An automation is a collection of triggers and actions\",\n type: \"object\",\n required: [\"id\", \"type\", \"trigger\", \"actions\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n description: \"The friendly name of the automation\",\n },\n type: {\n type: \"string\",\n enum: [\"automation\"],\n default: \"automation\",\n },\n isEnabled: {\n type: \"boolean\",\n description: \"Whether the automation is currently enabled\",\n default: true,\n },\n description: {\n type: \"string\",\n description: \"The text description of the automation\",\n },\n trigger: {\n type: \"object\",\n description: \"The trigger that initiates the automation\",\n required: [\"discriminator\"],\n properties: {\n discriminator: {\n type: \"string\",\n enum: [\"schedule\", \"event\", \"rrule\"],\n description: \"Type of trigger\",\n },\n rrule: {\n type: \"object\",\n additionalProperties: false,\n description: \"RFC 5545 recurrence rule with solar time support\",\n required: [\"expression\", \"timezone\"],\n properties: {\n expression: {\n type: \"string\",\n description:\n \"RFC 5545 RRULE string. Use BYHOUR/BYMINUTE for time when timeMode is omitted. Must not contain BYHOUR/BYMINUTE when timeMode is provided.\",\n },\n timezone: {\n type: \"string\",\n description: \"IANA timezone for rule evaluation\",\n },\n timeMode: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\"fixed\", \"sunrise\", \"sunset\"],\n description:\n \"How to determine execution time on matching days\",\n },\n time: {\n type: \"string\",\n description: \"HH:mm time for fixed mode\",\n },\n offsetSeconds: {\n type: \"integer\",\n description:\n \"Offset in seconds from time or solar event (negative = before)\",\n default: 0,\n },\n },\n },\n location: {\n type: \"object\",\n additionalProperties: false,\n description: \"Required when timeMode is sunrise or sunset\",\n required: [\"lat\", \"lng\"],\n properties: {\n lat: {\n type: \"number\",\n minimum: -90,\n maximum: 90,\n },\n lng: {\n type: \"number\",\n minimum: -180,\n maximum: 180,\n },\n },\n },\n },\n },\n // Time-based trigger properties\n schedule: {\n type: \"object\",\n additionalProperties: false,\n description: \"Schedule for time-based triggers\",\n required: [\"days\", \"time\", \"timezone\"],\n properties: {\n days: {\n type: \"array\",\n description: \"Days of the week (0 = Sunday, 6 = Saturday)\",\n items: {\n type: \"integer\",\n minimum: 0,\n maximum: 6,\n },\n },\n time: {\n type: \"string\",\n description: \"Time of day to trigger the automation\",\n },\n timeOffsetSeconds: {\n type: \"integer\",\n description: \"Offset in seconds from the scheduled time\",\n default: 0,\n },\n repeat: {\n type: \"boolean\",\n description: \"Whether the schedule repeats\",\n default: true,\n },\n timezone: {\n type: \"string\",\n description: \"Timezone for the schedule (IANA timezone format)\",\n },\n },\n },\n event: {\n type: \"object\",\n required: [\"eventType\", \"eventProperties\", \"match\"],\n additionalProperties: false,\n properties: {\n eventType: {\n type: \"string\",\n description:\n \"Name of the event that triggers the automation actions\",\n },\n eventProperties: {\n type: \"array\",\n description:\n \"Properties of the event that triggers the automation actions\",\n items: {\n type: \"object\",\n required: [\"property\", \"value\", \"operator\"],\n additionalProperties: false,\n properties: {\n property: {\n type: \"string\",\n description: \"Property of the event\",\n },\n value: {\n type: [\"string\", \"number\", \"boolean\"],\n description: \"Value of the property\",\n },\n operator: {\n type: \"string\",\n description: \"Operator of the property\",\n enum: [\n \"==\",\n \"!=\",\n \">\",\n \">=\",\n \"<\",\n \"<=\",\n \"contains\",\n \"notContains\",\n ],\n },\n },\n },\n },\n match: {\n type: \"string\",\n description:\n \"Match criteria for the event to trigger the automation actions\",\n enum: [\"any\", \"all\"],\n },\n },\n },\n },\n },\n actions: {\n type: \"array\",\n description: \"Actions to perform when the trigger conditions are met\",\n items: {\n type: \"object\",\n required: [\"useCase\", \"useCaseParams\"],\n additionalProperties: false,\n properties: {\n useCase: {\n type: \"string\",\n description: \"Name of the use case to call\",\n },\n useCaseParams: {\n type: \"object\",\n description: \"Parameters to pass to the use case\",\n required: [\"data\"],\n properties: {\n data: {\n type: [\"object\", \"array\"],\n description: \"Data to pass to the use case\",\n },\n },\n },\n },\n minItems: 1,\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was created\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was updated\",\n },\n nextRunAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation is scheduled to run next\",\n },\n lastRunAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was last triggered\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n webhookUrl: {\n type: \"string\",\n description: \"The URL of the webhook that triggers the automation\",\n format: \"uri\",\n },\n },\n additionalProperties: false,\n} as const;\n\nexport type AutomationSchema = FromSchema<\n typeof automationSchema,\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":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,mBAAmB;AAAA,EAC9B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,QAAQ,WAAW,SAAS;AAAA,EAC7C,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,MAAM,CAAC,YAAY;AAAA,MACnB,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,UAAU,CAAC,eAAe;AAAA,MAC1B,YAAY;AAAA,QACV,eAAe;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,YAAY,SAAS,OAAO;AAAA,UACnC,aAAa;AAAA,QACf;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,UACN,sBAAsB;AAAA,UACtB,aAAa;AAAA,UACb,UAAU,CAAC,cAAc,UAAU;AAAA,UACnC,YAAY;AAAA,YACV,YAAY;AAAA,cACV,MAAM;AAAA,cACN,aACE;AAAA,YACJ;AAAA,YACA,UAAU;AAAA,cACR,MAAM;AAAA,cACN,aAAa;AAAA,YACf;AAAA,YACA,UAAU;AAAA,cACR,MAAM;AAAA,cACN,sBAA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AM;AAAA,gBACJ,MAAM,CAAC,UAAU,OAAO;AAAA,gBACxB,aAAa;AAAA,cACf;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,QACA,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,MACb,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EACA,sBAAsB;AACxB;","names":[]}
|
|
@@ -44,11 +44,11 @@ declare const automationSchema: {
|
|
|
44
44
|
readonly type: "object";
|
|
45
45
|
readonly additionalProperties: false;
|
|
46
46
|
readonly description: "RFC 5545 recurrence rule with solar time support";
|
|
47
|
-
readonly required: readonly ["expression", "timezone"
|
|
47
|
+
readonly required: readonly ["expression", "timezone"];
|
|
48
48
|
readonly properties: {
|
|
49
49
|
readonly expression: {
|
|
50
50
|
readonly type: "string";
|
|
51
|
-
readonly description: "RFC 5545 RRULE string
|
|
51
|
+
readonly description: "RFC 5545 RRULE string. Use BYHOUR/BYMINUTE for time when timeMode is omitted. Must not contain BYHOUR/BYMINUTE when timeMode is provided.";
|
|
52
52
|
};
|
|
53
53
|
readonly timezone: {
|
|
54
54
|
readonly type: "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/schemas/definitions.ts"],"sourcesContent":["const defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lg\",\n \"lg-webos\",\n \"lapi\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"newline\",\n \"obix\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"dimmer\",\n \"switch\",\n \"motionSensor\",\n \"windowCovering\",\n \"camera\",\n \"mediaSource\",\n \"thermostat\",\n \"lock\",\n \"courtesy\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Communication\",\n \"Config\",\n \"Door Ajar\",\n \"Equipment\",\n \"Temperature\",\n \"Maintenance\",\n \"Cost\",\n \"Registration\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,IACX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM,CAAC,UAAU,QAAQ;AAAA,MACzB,QAAQ;AAAA,IACV;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU,CAAC,QAAQ,QAAQ,MAAM;AAAA,MACjC,YAAY;AAAA,QACV,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,sB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AM;AAAA,UACN,MAAM;AAAA,QACR;AAAA,QACA,WAAW;AAAA,UACT,MAAM;AAAA,UACN,SAAS;AAAA,QACX;AAAA,QACA,aAAa;AAAA,UACX,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,IAAI;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,YACN,QAAQ;AAAA,UACV;AAAA,UACA,OAAO;AAAA,YACL,MAAM;AAAA,UACR;AAAA,UACA,KAAK;AAAA,YACH,MAAM,CAAC,UAAU,MAAM;AAAA,UACzB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAKA,IAAO,sBAAQ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../.generated/schemas/definitions.ts"],"sourcesContent":["const defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lg\",\n \"lg-webos\",\n \"lapi\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"newline\",\n \"obix\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"dimmer\",\n \"switch\",\n \"motionSensor\",\n \"windowCovering\",\n \"camera\",\n \"mediaSource\",\n \"thermostat\",\n \"lock\",\n \"courtesy\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n id: {\n type: \"string\"\n },\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Communication\",\n \"Config\",\n \"Door Ajar\",\n \"Equipment\",\n \"Temperature\",\n \"Maintenance\",\n \"Cost\",\n \"Registration\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,IACX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM,CAAC,UAAU,QAAQ;AAAA,MACzB,QAAQ;AAAA,IACV;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU,CAAC,QAAQ,QAAQ,MAAM;AAAA,MACjC,YAAY;AAAA,QACV,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,sBAAsB;AAAA,MACtB,YAAY;AAAA,QACV,IAAI;AAAA,UACF,MAAM;AAAA,QACR;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,QACR;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,QACR;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,QACR;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,QACR;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,QACR;AAAA,QACA,YA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MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,IAAI;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,YACN,QAAQ;AAAA,UACV;AAAA,UACA,OAAO;AAAA,YACL,MAAM;AAAA,UACR;AAAA,UACA,KAAK;AAAA,YACH,MAAM,CAAC,UAAU,MAAM;AAAA,UACzB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAKA,IAAO,sBAAQ;","names":[]}
|
|
@@ -92,6 +92,9 @@ declare const defs: {
|
|
|
92
92
|
readonly additionalProperties: false;
|
|
93
93
|
readonly required: readonly ["type", "status", "message"];
|
|
94
94
|
readonly properties: {
|
|
95
|
+
readonly id: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
};
|
|
95
98
|
readonly type: {
|
|
96
99
|
readonly type: "string";
|
|
97
100
|
readonly enum: readonly ["Battery", "Communication", "Config", "Door Ajar", "Equipment", "Temperature", "Maintenance", "Cost", "Registration"];
|
|
@@ -44,11 +44,11 @@ declare const automationSchema: {
|
|
|
44
44
|
readonly type: "object";
|
|
45
45
|
readonly additionalProperties: false;
|
|
46
46
|
readonly description: "RFC 5545 recurrence rule with solar time support";
|
|
47
|
-
readonly required: readonly ["expression", "timezone"
|
|
47
|
+
readonly required: readonly ["expression", "timezone"];
|
|
48
48
|
readonly properties: {
|
|
49
49
|
readonly expression: {
|
|
50
50
|
readonly type: "string";
|
|
51
|
-
readonly description: "RFC 5545 RRULE string
|
|
51
|
+
readonly description: "RFC 5545 RRULE string. Use BYHOUR/BYMINUTE for time when timeMode is omitted. Must not contain BYHOUR/BYMINUTE when timeMode is provided.";
|
|
52
52
|
};
|
|
53
53
|
readonly timezone: {
|
|
54
54
|
readonly type: "string";
|
|
@@ -41,11 +41,11 @@ const automationSchema = {
|
|
|
41
41
|
type: "object",
|
|
42
42
|
additionalProperties: false,
|
|
43
43
|
description: "RFC 5545 recurrence rule with solar time support",
|
|
44
|
-
required: ["expression", "timezone"
|
|
44
|
+
required: ["expression", "timezone"],
|
|
45
45
|
properties: {
|
|
46
46
|
expression: {
|
|
47
47
|
type: "string",
|
|
48
|
-
description: "RFC 5545 RRULE string
|
|
48
|
+
description: "RFC 5545 RRULE string. Use BYHOUR/BYMINUTE for time when timeMode is omitted. Must not contain BYHOUR/BYMINUTE when timeMode is provided."
|
|
49
49
|
},
|
|
50
50
|
timezone: {
|
|
51
51
|
type: "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/schemas/automation.ts"],"sourcesContent":["import type { FromSchema } from \"json-schema-to-ts\";\nimport defs, { ISODateString } from \"./definitions\";\n\nexport const automationSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"automation.json\",\n title: \"Automation\",\n description: \"An automation is a collection of triggers and actions\",\n type: \"object\",\n required: [\"id\", \"type\", \"trigger\", \"actions\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n description: \"The friendly name of the automation\",\n },\n type: {\n type: \"string\",\n enum: [\"automation\"],\n default: \"automation\",\n },\n isEnabled: {\n type: \"boolean\",\n description: \"Whether the automation is currently enabled\",\n default: true,\n },\n description: {\n type: \"string\",\n description: \"The text description of the automation\",\n },\n trigger: {\n type: \"object\",\n description: \"The trigger that initiates the automation\",\n required: [\"discriminator\"],\n properties: {\n discriminator: {\n type: \"string\",\n enum: [\"schedule\", \"event\", \"rrule\"],\n description: \"Type of trigger\",\n },\n rrule: {\n type: \"object\",\n additionalProperties: false,\n description: \"RFC 5545 recurrence rule with solar time support\",\n required: [\"expression\", \"timezone\", \"timeMode\"],\n properties: {\n expression: {\n type: \"string\",\n description:\n \"RFC 5545 RRULE string (omit BYHOUR/BYMINUTE when using solar timeMode)\",\n },\n timezone: {\n type: \"string\",\n description: \"IANA timezone for rule evaluation\",\n },\n timeMode: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\"fixed\", \"sunrise\", \"sunset\"],\n description:\n \"How to determine execution time on matching days\",\n },\n time: {\n type: \"string\",\n description: \"HH:mm time for fixed mode\",\n },\n offsetSeconds: {\n type: \"integer\",\n description:\n \"Offset in seconds from time or solar event (negative = before)\",\n default: 0,\n },\n },\n },\n location: {\n type: \"object\",\n additionalProperties: false,\n description: \"Required when timeMode is sunrise or sunset\",\n required: [\"lat\", \"lng\"],\n properties: {\n lat: {\n type: \"number\",\n minimum: -90,\n maximum: 90,\n },\n lng: {\n type: \"number\",\n minimum: -180,\n maximum: 180,\n },\n },\n },\n },\n },\n // Time-based trigger properties\n schedule: {\n type: \"object\",\n additionalProperties: false,\n description: \"Schedule for time-based triggers\",\n required: [\"days\", \"time\", \"timezone\"],\n properties: {\n days: {\n type: \"array\",\n description: \"Days of the week (0 = Sunday, 6 = Saturday)\",\n items: {\n type: \"integer\",\n minimum: 0,\n maximum: 6,\n },\n },\n time: {\n type: \"string\",\n description: \"Time of day to trigger the automation\",\n },\n timeOffsetSeconds: {\n type: \"integer\",\n description: \"Offset in seconds from the scheduled time\",\n default: 0,\n },\n repeat: {\n type: \"boolean\",\n description: \"Whether the schedule repeats\",\n default: true,\n },\n timezone: {\n type: \"string\",\n description: \"Timezone for the schedule (IANA timezone format)\",\n },\n },\n },\n event: {\n type: \"object\",\n required: [\"eventType\", \"eventProperties\", \"match\"],\n additionalProperties: false,\n properties: {\n eventType: {\n type: \"string\",\n description:\n \"Name of the event that triggers the automation actions\",\n },\n eventProperties: {\n type: \"array\",\n description:\n \"Properties of the event that triggers the automation actions\",\n items: {\n type: \"object\",\n required: [\"property\", \"value\", \"operator\"],\n additionalProperties: false,\n properties: {\n property: {\n type: \"string\",\n description: \"Property of the event\",\n },\n value: {\n type: [\"string\", \"number\", \"boolean\"],\n description: \"Value of the property\",\n },\n operator: {\n type: \"string\",\n description: \"Operator of the property\",\n enum: [\n \"==\",\n \"!=\",\n \">\",\n \">=\",\n \"<\",\n \"<=\",\n \"contains\",\n \"notContains\",\n ],\n },\n },\n },\n },\n match: {\n type: \"string\",\n description:\n \"Match criteria for the event to trigger the automation actions\",\n enum: [\"any\", \"all\"],\n },\n },\n },\n },\n },\n actions: {\n type: \"array\",\n description: \"Actions to perform when the trigger conditions are met\",\n items: {\n type: \"object\",\n required: [\"useCase\", \"useCaseParams\"],\n additionalProperties: false,\n properties: {\n useCase: {\n type: \"string\",\n description: \"Name of the use case to call\",\n },\n useCaseParams: {\n type: \"object\",\n description: \"Parameters to pass to the use case\",\n required: [\"data\"],\n properties: {\n data: {\n type: [\"object\", \"array\"],\n description: \"Data to pass to the use case\",\n },\n },\n },\n },\n minItems: 1,\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was created\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was updated\",\n },\n nextRunAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation is scheduled to run next\",\n },\n lastRunAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was last triggered\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n webhookUrl: {\n type: \"string\",\n description: \"The URL of the webhook that triggers the automation\",\n format: \"uri\",\n },\n },\n additionalProperties: false,\n} as const;\n\nexport type AutomationSchema = FromSchema<\n typeof automationSchema,\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":"AAGO,MAAM,mBAAmB;AAAA,EAC9B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,QAAQ,WAA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;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,MACb,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EACA,sBAAsB;AACxB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../.generated/schemas/automation.ts"],"sourcesContent":["import type { FromSchema } from \"json-schema-to-ts\";\nimport defs, { ISODateString } from \"./definitions\";\n\nexport const automationSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"automation.json\",\n title: \"Automation\",\n description: \"An automation is a collection of triggers and actions\",\n type: \"object\",\n required: [\"id\", \"type\", \"trigger\", \"actions\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n description: \"The friendly name of the automation\",\n },\n type: {\n type: \"string\",\n enum: [\"automation\"],\n default: \"automation\",\n },\n isEnabled: {\n type: \"boolean\",\n description: \"Whether the automation is currently enabled\",\n default: true,\n },\n description: {\n type: \"string\",\n description: \"The text description of the automation\",\n },\n trigger: {\n type: \"object\",\n description: \"The trigger that initiates the automation\",\n required: [\"discriminator\"],\n properties: {\n discriminator: {\n type: \"string\",\n enum: [\"schedule\", \"event\", \"rrule\"],\n description: \"Type of trigger\",\n },\n rrule: {\n type: \"object\",\n additionalProperties: false,\n description: \"RFC 5545 recurrence rule with solar time support\",\n required: [\"expression\", \"timezone\"],\n properties: {\n expression: {\n type: \"string\",\n description:\n \"RFC 5545 RRULE string. Use BYHOUR/BYMINUTE for time when timeMode is omitted. Must not contain BYHOUR/BYMINUTE when timeMode is provided.\",\n },\n timezone: {\n type: \"string\",\n description: \"IANA timezone for rule evaluation\",\n },\n timeMode: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\"fixed\", \"sunrise\", \"sunset\"],\n description:\n \"How to determine execution time on matching days\",\n },\n time: {\n type: \"string\",\n description: \"HH:mm time for fixed mode\",\n },\n offsetSeconds: {\n type: \"integer\",\n description:\n \"Offset in seconds from time or solar event (negative = before)\",\n default: 0,\n },\n },\n },\n location: {\n type: \"object\",\n additionalProperties: false,\n description: \"Required when timeMode is sunrise or sunset\",\n required: [\"lat\", \"lng\"],\n properties: {\n lat: {\n type: \"number\",\n minimum: -90,\n maximum: 90,\n },\n lng: {\n type: \"number\",\n minimum: -180,\n maximum: 180,\n },\n },\n },\n },\n },\n // Time-based trigger properties\n schedule: {\n type: \"object\",\n additionalProperties: false,\n description: \"Schedule for time-based triggers\",\n required: [\"days\", \"time\", \"timezone\"],\n properties: {\n days: {\n type: \"array\",\n description: \"Days of the week (0 = Sunday, 6 = Saturday)\",\n items: {\n type: \"integer\",\n minimum: 0,\n maximum: 6,\n },\n },\n time: {\n type: \"string\",\n description: \"Time of day to trigger the automation\",\n },\n timeOffsetSeconds: {\n type: \"integer\",\n description: \"Offset in seconds from the scheduled time\",\n default: 0,\n },\n repeat: {\n type: \"boolean\",\n description: \"Whether the schedule repeats\",\n default: true,\n },\n timezone: {\n type: \"string\",\n description: \"Timezone for the schedule (IANA timezone format)\",\n },\n },\n },\n event: {\n type: \"object\",\n required: [\"eventType\", \"eventProperties\", \"match\"],\n additionalProperties: false,\n properties: {\n eventType: {\n type: \"string\",\n description:\n \"Name of the event that triggers the automation actions\",\n },\n eventProperties: {\n type: \"array\",\n description:\n \"Properties of the event that triggers the automation actions\",\n items: {\n type: \"object\",\n required: [\"property\", \"value\", \"operator\"],\n additionalProperties: false,\n properties: {\n property: {\n type: \"string\",\n description: \"Property of the event\",\n },\n value: {\n type: [\"string\", \"number\", \"boolean\"],\n description: \"Value of the property\",\n },\n operator: {\n type: \"string\",\n description: \"Operator of the property\",\n enum: [\n \"==\",\n \"!=\",\n \">\",\n \">=\",\n \"<\",\n \"<=\",\n \"contains\",\n \"notContains\",\n ],\n },\n },\n },\n },\n match: {\n type: \"string\",\n description:\n \"Match criteria for the event to trigger the automation actions\",\n enum: [\"any\", \"all\"],\n },\n },\n },\n },\n },\n actions: {\n type: \"array\",\n description: \"Actions to perform when the trigger conditions are met\",\n items: {\n type: \"object\",\n required: [\"useCase\", \"useCaseParams\"],\n additionalProperties: false,\n properties: {\n useCase: {\n type: \"string\",\n description: \"Name of the use case to call\",\n },\n useCaseParams: {\n type: \"object\",\n description: \"Parameters to pass to the use case\",\n required: [\"data\"],\n properties: {\n data: {\n type: [\"object\", \"array\"],\n description: \"Data to pass to the use case\",\n },\n },\n },\n },\n minItems: 1,\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was created\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was updated\",\n },\n nextRunAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation is scheduled to run next\",\n },\n lastRunAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the automation was last triggered\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n webhookUrl: {\n type: \"string\",\n description: \"The URL of the webhook that triggers the automation\",\n format: \"uri\",\n },\n },\n additionalProperties: false,\n} as const;\n\nexport type AutomationSchema = FromSchema<\n typeof automationSchema,\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":"AAGO,MAAM,mBAAmB;AAAA,EAC9B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,QAAQ,WAAW,SAAS;AAAA,EAC7C,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,MAAM,CAAC,YAAY;AAAA,MACnB,SAAS;AAAA,I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|
|
|
92
92
|
readonly additionalProperties: false;
|
|
93
93
|
readonly required: readonly ["type", "status", "message"];
|
|
94
94
|
readonly properties: {
|
|
95
|
+
readonly id: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
};
|
|
95
98
|
readonly type: {
|
|
96
99
|
readonly type: "string";
|
|
97
100
|
readonly enum: readonly ["Battery", "Communication", "Config", "Door Ajar", "Equipment", "Temperature", "Maintenance", "Cost", "Registration"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/schemas/definitions.ts"],"sourcesContent":["const defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lg\",\n \"lg-webos\",\n \"lapi\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"newline\",\n \"obix\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"dimmer\",\n \"switch\",\n \"motionSensor\",\n \"windowCovering\",\n \"camera\",\n \"mediaSource\",\n \"thermostat\",\n \"lock\",\n \"courtesy\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Communication\",\n \"Config\",\n \"Door Ajar\",\n \"Equipment\",\n \"Temperature\",\n \"Maintenance\",\n \"Cost\",\n \"Registration\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":"AAAA,MAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,IACX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,IACZ;AAAA,IACA,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AAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,YAAY;AAAA,QACV,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,MAAM;AAAA,QACR;AAAA,QACA,WAAW;AAAA,UACT,MAAM;AAAA,UACN,SAAS;AAAA,QACX;AAAA,QACA,aAAa;AAAA,UACX,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,IAAI;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,YACJ,MAAM;AAAA,YACN,QAAQ;AAAA,UACV;AAAA,UACA,OAAO;AAAA,YACL,MAAM;AAAA,UACR;AAAA,UACA,KAAK;AAAA,YACH,MAAM,CAAC,UAAU,MAAM;AAAA,UACzB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAKA,IAAO,sBAAQ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../.generated/schemas/definitions.ts"],"sourcesContent":["const defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lg\",\n \"lg-webos\",\n \"lapi\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"newline\",\n \"obix\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"dimmer\",\n \"switch\",\n \"motionSensor\",\n \"windowCovering\",\n \"camera\",\n \"mediaSource\",\n \"thermostat\",\n \"lock\",\n \"courtesy\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n id: {\n type: \"string\"\n },\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Communication\",\n \"Config\",\n \"Door Ajar\",\n \"Equipment\",\n \"Temperature\",\n \"Maintenance\",\n \"Cost\",\n \"Registration\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":"AAAA,MAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,IACX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM,CAAC,UAAU,QAAQ;AAAA,MACzB,QAAQ;AAAA,IACV;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU,CAAC,QAAQ,QAAQ,MAAM;AAAA,MACjC,YAAY;AAAA,QACV,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAA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