@kohost/api-client 7.6.1 → 7.7.1
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/index.d.ts +1 -0
- package/dist/lib/index.js +3 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/messageAttachments.d.ts +1 -0
- package/dist/lib/messageAttachments.js +6 -0
- package/dist/lib/messageAttachments.js.map +1 -0
- package/dist/lib/policy-resolvers.js.map +1 -1
- package/dist/models/mediaFile.d.ts +1 -0
- package/dist/models/mediaFile.js +15 -3
- package/dist/models/mediaFile.js.map +1 -1
- package/dist/schemas/definitions.d.ts +1 -1
- package/dist/schemas/definitions.js +1 -0
- package/dist/schemas/definitions.js.map +1 -1
- package/dist/schemas/mediaFile.d.ts +15 -1
- package/dist/schemas/mediaFile.js +38 -5
- package/dist/schemas/mediaFile.js.map +1 -1
- package/dist/schemas/ticket.d.ts +253 -1
- package/dist/schemas/ticket.js +138 -1
- package/dist/schemas/ticket.js.map +1 -1
- package/dist/useCases/index.d.ts +0 -2
- package/dist/useCases/index.js +1 -5
- package/dist/useCases/index.js.map +1 -1
- package/package.json +10 -9
- package/dist/useCases/createImageUploadEndpoint.d.ts +0 -27
- package/dist/useCases/createImageUploadEndpoint.js +0 -47
- package/dist/useCases/createImageUploadEndpoint.js.map +0 -1
- package/dist/useCases/uploadImage.d.ts +0 -27
- package/dist/useCases/uploadImage.js +0 -47
- package/dist/useCases/uploadImage.js.map +0 -1
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { inferDeviceNotifications, type DeviceNotificationName, type InferDeviceNotificationsInput, } from "./deviceNotifications.js";
|
|
2
2
|
export { categoryForDevice, SYSTEM_CATEGORIES, SYSTEM_CATEGORY_LABELS, type SystemCategory, type CategoryForDeviceInput, } from "./systemCategories.js";
|
|
3
3
|
export { getAllowedResourceIds, getAllowedDeviceTypes, getAllowedFeatures, type PolicyLike, type PolicyPermissionLike, } from "./policy-resolvers.js";
|
|
4
|
+
export { MAX_MESSAGE_ATTACHMENTS } from "./messageAttachments.js";
|
package/dist/lib/index.js
CHANGED
|
@@ -2,8 +2,10 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { inferDeviceNotifications } from "./deviceNotifications.js";
|
|
3
3
|
import { SYSTEM_CATEGORIES, SYSTEM_CATEGORY_LABELS, categoryForDevice } from "./systemCategories.js";
|
|
4
4
|
import { getAllowedDeviceTypes, getAllowedFeatures, getAllowedResourceIds } from "./policy-resolvers.js";
|
|
5
|
+
import { MAX_MESSAGE_ATTACHMENTS } from "./messageAttachments.js";
|
|
5
6
|
//#region .generated/lib/index.ts
|
|
6
7
|
var lib_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
MAX_MESSAGE_ATTACHMENTS: () => 15,
|
|
7
9
|
SYSTEM_CATEGORIES: () => SYSTEM_CATEGORIES,
|
|
8
10
|
SYSTEM_CATEGORY_LABELS: () => SYSTEM_CATEGORY_LABELS,
|
|
9
11
|
categoryForDevice: () => categoryForDevice,
|
|
@@ -13,6 +15,6 @@ var lib_exports = /* @__PURE__ */ __exportAll({
|
|
|
13
15
|
inferDeviceNotifications: () => inferDeviceNotifications
|
|
14
16
|
});
|
|
15
17
|
//#endregion
|
|
16
|
-
export { SYSTEM_CATEGORIES, SYSTEM_CATEGORY_LABELS, categoryForDevice, getAllowedDeviceTypes, getAllowedFeatures, getAllowedResourceIds, inferDeviceNotifications, lib_exports };
|
|
18
|
+
export { MAX_MESSAGE_ATTACHMENTS, SYSTEM_CATEGORIES, SYSTEM_CATEGORY_LABELS, categoryForDevice, getAllowedDeviceTypes, getAllowedFeatures, getAllowedResourceIds, inferDeviceNotifications, lib_exports };
|
|
17
19
|
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
package/dist/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../.generated/lib/index.ts"],"sourcesContent":["export {\n inferDeviceNotifications,\n type DeviceNotificationName,\n type InferDeviceNotificationsInput,\n} from \"./deviceNotifications.js\";\nexport {\n categoryForDevice,\n SYSTEM_CATEGORIES,\n SYSTEM_CATEGORY_LABELS,\n type SystemCategory,\n type CategoryForDeviceInput,\n} from \"./systemCategories.js\";\nexport {\n getAllowedResourceIds,\n getAllowedDeviceTypes,\n getAllowedFeatures,\n type PolicyLike,\n type PolicyPermissionLike,\n} from \"./policy-resolvers.js\";\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../.generated/lib/index.ts"],"sourcesContent":["export {\n inferDeviceNotifications,\n type DeviceNotificationName,\n type InferDeviceNotificationsInput,\n} from \"./deviceNotifications.js\";\nexport {\n categoryForDevice,\n SYSTEM_CATEGORIES,\n SYSTEM_CATEGORY_LABELS,\n type SystemCategory,\n type CategoryForDeviceInput,\n} from \"./systemCategories.js\";\nexport {\n getAllowedResourceIds,\n getAllowedDeviceTypes,\n getAllowedFeatures,\n type PolicyLike,\n type PolicyPermissionLike,\n} from \"./policy-resolvers.js\";\nexport { MAX_MESSAGE_ATTACHMENTS } from \"./messageAttachments.js\";\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MAX_MESSAGE_ATTACHMENTS = 15;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messageAttachments.js","names":[],"sources":["../../.generated/lib/messageAttachments.ts"],"sourcesContent":["// Shared across the API and app: the API enforces this as a write-time guard\n// (see @kohost/api-client consumers in apps/api/src/lib/domain/tickets.ts) and\n// the app enforces it client-side before upload (apps/app/src/lib/data/files.ts).\n// Not encoded in the ticket schema itself — policy lives in code, not the contract.\nexport const MAX_MESSAGE_ATTACHMENTS = 15;\n"],"mappings":";AAIA,MAAa,0BAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy-resolvers.js","names":[],"sources":["../../.generated/lib/policy-resolvers.ts"],"sourcesContent":["export interface PolicyPermissionLike {\n entities: string[];\n effect: \"Allow\" | \"Deny\";\n}\n\nexport interface PolicyLike {\n permissions: PolicyPermissionLike[];\n}\n\nconst FEATURE_PREFIX = \"feature:\";\n\nexport function getAllowedResourceIds(\n policies: PolicyLike[],\n resource: string,\n): string[] {\n const allowed: string[] = [];\n const denied: string[] = [];\n\n for (const policy of policies) {\n for (const permission of policy.permissions) {\n for (const entity of permission.entities) {\n if (!entity.startsWith(resource)) continue;\n\n const [, id, subsystem, deviceId] = entity.split(\":\");\n const hasFinerSegment = Boolean(subsystem) || Boolean(deviceId);\n\n if (permission.effect === \"Allow\") {\n allowed.push(id);\n } else if (!hasFinerSegment) {\n denied.push(id);\n }\n }\n }\n }\n\n return denied.length > 0\n ? allowed.filter((id) => !denied.includes(id))\n : allowed;\n}\n\nexport function getAllowedDeviceTypes(\n policies: PolicyLike[],\n spaceId: string,\n): string[] {\n const prefix = `space:${spaceId}:`;\n const exactMatch = `space:${spaceId}`;\n const matchesSpace = (res: string) =>\n res === exactMatch || res.startsWith(prefix) || res.startsWith(\"space:*\");\n\n const allowed: string[] = [];\n const denied: string[] = [];\n\n for (const policy of policies) {\n for (const permission of policy.permissions) {\n for (const entity of permission.entities) {\n if (!matchesSpace(entity)) continue;\n\n const [, , deviceType] = entity.split(\":\");\n if (permission.effect === \"Allow\") {\n if (!deviceType) {\n if (!allowed.includes(\"*\")) allowed.push(\"*\");\n } else {\n allowed.push(deviceType);\n }\n } else {\n denied.push(deviceType);\n }\n }\n }\n }\n\n return allowed.filter((id) => !denied.includes(id));\n}\n\nexport function getAllowedFeatures(policies: PolicyLike[]): string[] {\n const allowed: string[] = [];\n const denied: string[] = [];\n\n for (const policy of policies) {\n for (const permission of policy.permissions) {\n for (const entity of permission.entities) {\n if (!entity.startsWith(FEATURE_PREFIX)) continue;\n\n const key = entity.slice(FEATURE_PREFIX.length);\n if (!key) continue;\n\n if (permission.effect === \"Allow\") {\n if (!allowed.includes(key)) allowed.push(key);\n } else if (!denied.includes(key)) {\n denied.push(key);\n }\n }\n }\n }\n\n return allowed.filter((key) => !denied.includes(key));\n}\n"],"mappings":";AASA,MAAM,iBAAiB;AAEvB,SAAgB,sBACd,UACA,UACU;CACV,MAAM,UAAoB,CAAC;CAC3B,MAAM,SAAmB,CAAC;CAE1B,KAAK,MAAM,UAAU,UACnB,KAAK,MAAM,cAAc,OAAO,aAC9B,KAAK,MAAM,UAAU,WAAW,UAAU;EACxC,IAAI,CAAC,OAAO,WAAW,QAAQ,GAAG;EAElC,MAAM,GAAG,IAAI,WAAW,YAAY,OAAO,MAAM,GAAG;EACpD,MAAM,kBAAkB,QAAQ,SAAS,KAAK,QAAQ,QAAQ;EAE9D,IAAI,WAAW,WAAW,SACxB,QAAQ,KAAK,EAAE;OACV,IAAI,CAAC,iBACV,OAAO,KAAK,EAAE;CAElB;CAIJ,OAAO,OAAO,SAAS,IACnB,QAAQ,QAAQ,OAAO,CAAC,OAAO,SAAS,EAAE,CAAC,IAC3C;AACN;AAEA,SAAgB,sBACd,UACA,SACU;CACV,MAAM,SAAS,SAAS,QAAQ;CAChC,MAAM,aAAa,SAAS;CAC5B,MAAM,gBAAgB,QACpB,QAAQ,cAAc,IAAI,WAAW,MAAM,KAAK,IAAI,WAAW,SAAS;CAE1E,MAAM,UAAoB,CAAC;CAC3B,MAAM,SAAmB,CAAC;CAE1B,KAAK,MAAM,UAAU,UACnB,KAAK,MAAM,cAAc,OAAO,aAC9B,KAAK,MAAM,UAAU,WAAW,UAAU;EACxC,IAAI,CAAC,aAAa,MAAM,GAAG;EAE3B,MAAM,KAAK,cAAc,OAAO,MAAM,GAAG;EACzC,IAAI,WAAW,WAAW,SACxB,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"policy-resolvers.js","names":[],"sources":["../../.generated/lib/policy-resolvers.ts"],"sourcesContent":["export interface PolicyPermissionLike {\n entities: string[];\n effect: \"Allow\" | \"Deny\";\n}\n\nexport interface PolicyLike {\n permissions: PolicyPermissionLike[];\n}\n\nconst FEATURE_PREFIX = \"feature:\";\n\nexport function getAllowedResourceIds(\n policies: PolicyLike[],\n resource: string,\n): string[] {\n const allowed: string[] = [];\n const denied: string[] = [];\n\n for (const policy of policies) {\n for (const permission of policy.permissions) {\n for (const entity of permission.entities) {\n if (!entity.startsWith(resource)) continue;\n\n const [, id, subsystem, deviceId] = entity.split(\":\");\n const hasFinerSegment = Boolean(subsystem) || Boolean(deviceId);\n\n if (permission.effect === \"Allow\") {\n allowed.push(id);\n } else if (!hasFinerSegment) {\n denied.push(id);\n }\n }\n }\n }\n\n return denied.length > 0\n ? allowed.filter((id) => !denied.includes(id))\n : allowed;\n}\n\nexport function getAllowedDeviceTypes(\n policies: PolicyLike[],\n spaceId: string,\n): string[] {\n const prefix = `space:${spaceId}:`;\n const exactMatch = `space:${spaceId}`;\n const matchesSpace = (res: string) =>\n res === exactMatch || res.startsWith(prefix) || res.startsWith(\"space:*\");\n\n const allowed: string[] = [];\n const denied: string[] = [];\n\n for (const policy of policies) {\n for (const permission of policy.permissions) {\n for (const entity of permission.entities) {\n if (!matchesSpace(entity)) continue;\n\n const [, , deviceType] = entity.split(\":\");\n if (permission.effect === \"Allow\") {\n if (!deviceType) {\n if (!allowed.includes(\"*\")) allowed.push(\"*\");\n } else {\n allowed.push(deviceType);\n }\n } else {\n denied.push(deviceType);\n }\n }\n }\n }\n\n return allowed.filter((id) => !denied.includes(id));\n}\n\nexport function getAllowedFeatures(policies: PolicyLike[]): string[] {\n const allowed: string[] = [];\n const denied: string[] = [];\n\n for (const policy of policies) {\n for (const permission of policy.permissions) {\n for (const entity of permission.entities) {\n if (!entity.startsWith(FEATURE_PREFIX)) continue;\n\n const key = entity.slice(FEATURE_PREFIX.length);\n if (!key) continue;\n\n if (permission.effect === \"Allow\") {\n if (!allowed.includes(key)) allowed.push(key);\n } else if (!denied.includes(key)) {\n denied.push(key);\n }\n }\n }\n }\n\n return allowed.filter((key) => !denied.includes(key));\n}\n"],"mappings":";AASA,MAAM,iBAAiB;AAEvB,SAAgB,sBACd,UACA,UACU;CACV,MAAM,UAAoB,CAAC;CAC3B,MAAM,SAAmB,CAAC;CAE1B,KAAK,MAAM,UAAU,UACnB,KAAK,MAAM,cAAc,OAAO,aAC9B,KAAK,MAAM,UAAU,WAAW,UAAU;EACxC,IAAI,CAAC,OAAO,WAAW,QAAQ,GAAG;EAElC,MAAM,GAAG,IAAI,WAAW,YAAY,OAAO,MAAM,GAAG;EACpD,MAAM,kBAAkB,QAAQ,SAAS,KAAK,QAAQ,QAAQ;EAE9D,IAAI,WAAW,WAAW,SACxB,QAAQ,KAAK,EAAE;OACV,IAAI,CAAC,iBACV,OAAO,KAAK,EAAE;CAElB;CAIJ,OAAO,OAAO,SAAS,IACnB,QAAQ,QAAQ,OAAO,CAAC,OAAO,SAAS,EAAE,CAAC,IAC3C;AACN;AAEA,SAAgB,sBACd,UACA,SACU;CACV,MAAM,SAAS,SAAS,QAAQ;CAChC,MAAM,aAAa,SAAS;CAC5B,MAAM,gBAAgB,QACpB,QAAQ,cAAc,IAAI,WAAW,MAAM,KAAK,IAAI,WAAW,SAAS;CAE1E,MAAM,UAAoB,CAAC;CAC3B,MAAM,SAAmB,CAAC;CAE1B,KAAK,MAAM,UAAU,UACnB,KAAK,MAAM,cAAc,OAAO,aAC9B,KAAK,MAAM,UAAU,WAAW,UAAU;EACxC,IAAI,CAAC,aAAa,MAAM,GAAG;EAE3B,MAAM,KAAK,cAAc,OAAO,MAAM,GAAG;EACzC,IAAI,WAAW,WAAW,SACxB,IAAI,CAAC,YACC;OAAA,CAAC,QAAQ,SAAS,GAAG,GAAG,QAAQ,KAAK,GAAG;EAAA,OAE5C,QAAQ,KAAK,UAAU;OAGzB,OAAO,KAAK,UAAU;CAE1B;CAIJ,OAAO,QAAQ,QAAQ,OAAO,CAAC,OAAO,SAAS,EAAE,CAAC;AACpD;AAEA,SAAgB,mBAAmB,UAAkC;CACnE,MAAM,UAAoB,CAAC;CAC3B,MAAM,SAAmB,CAAC;CAE1B,KAAK,MAAM,UAAU,UACnB,KAAK,MAAM,cAAc,OAAO,aAC9B,KAAK,MAAM,UAAU,WAAW,UAAU;EACxC,IAAI,CAAC,OAAO,WAAW,cAAc,GAAG;EAExC,MAAM,MAAM,OAAO,MAAM,CAAqB;EAC9C,IAAI,CAAC,KAAK;EAEV,IAAI,WAAW,WAAW,SACpB;OAAA,CAAC,QAAQ,SAAS,GAAG,GAAG,QAAQ,KAAK,GAAG;EAAA,OACvC,IAAI,CAAC,OAAO,SAAS,GAAG,GAC7B,OAAO,KAAK,GAAG;CAEnB;CAIJ,OAAO,QAAQ,QAAQ,QAAQ,CAAC,OAAO,SAAS,GAAG,CAAC;AACtD"}
|
package/dist/models/mediaFile.js
CHANGED
|
@@ -16,6 +16,9 @@ var MediaFile = class extends Entity {
|
|
|
16
16
|
if (data.url !== void 0) this.url = data.url;
|
|
17
17
|
if (data.width !== void 0) this.width = data.width;
|
|
18
18
|
if (data.height !== void 0) this.height = data.height;
|
|
19
|
+
if (data.previewUrl !== void 0) this.previewUrl = data.previewUrl;
|
|
20
|
+
if (data.previewWidth !== void 0) this.previewWidth = data.previewWidth;
|
|
21
|
+
if (data.previewHeight !== void 0) this.previewHeight = data.previewHeight;
|
|
19
22
|
if (data.size !== void 0) this.size = data.size;
|
|
20
23
|
if (data.uploadUrl !== void 0) this.uploadUrl = data.uploadUrl;
|
|
21
24
|
if (data.uploadUrlExpires !== void 0) this.uploadUrlExpires = data.uploadUrlExpires;
|
|
@@ -26,10 +29,19 @@ var MediaFile = class extends Entity {
|
|
|
26
29
|
if (data.deletedAt !== void 0) this.deletedAt = data.deletedAt;
|
|
27
30
|
}
|
|
28
31
|
createImageVariant(params) {
|
|
29
|
-
if (this.mimeType != "image/*") throw new Error("Only dynamic images can have variants");
|
|
30
32
|
if (!this.url) throw new Error("MediaFile has no url");
|
|
31
|
-
const
|
|
32
|
-
return this.url
|
|
33
|
+
const { pathname } = new URL(this.url, "http://localhost");
|
|
34
|
+
if (pathname.includes("/files/")) return this.url + "?" + new URLSearchParams(params);
|
|
35
|
+
if (this.mimeType === "image/*") {
|
|
36
|
+
const query = Object.keys(params).map((key) => `${key}=${params[key]}`).join(",");
|
|
37
|
+
return this.url.replace(/\/public$/, `/${query}`);
|
|
38
|
+
}
|
|
39
|
+
throw new Error("Only dynamic images can have variants");
|
|
40
|
+
}
|
|
41
|
+
supportsImageVariants() {
|
|
42
|
+
if (this.mimeType === "image/*") return true;
|
|
43
|
+
if (!this.url || !this.url.includes("/files/")) return false;
|
|
44
|
+
return typeof this.mimeType === "string" && this.mimeType.startsWith("image/") && this.mimeType !== "image/svg+xml" && this.mimeType !== "image/avif";
|
|
33
45
|
}
|
|
34
46
|
};
|
|
35
47
|
Object.defineProperty(MediaFile.prototype, "schema", { value: mediaFileSchema });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mediaFile.js","names":["validate"],"sources":["../../.generated/models/mediaFile.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateMediaFile as validate } from \"../validate.js\";\nimport { mediaFileSchema, type MediaFileSchema } from \"../schemas/mediaFile.js\";\n\n/**\n * Data type for MediaFile constructor - exported for backwards compatibility\n */\nexport type MediaFileData = MediaFileSchema;\n\n/**\n * Any media file\n */\nexport interface MediaFile extends MediaFileSchema {}\nexport class MediaFile extends Entity {\n declare schema: typeof mediaFileSchema;\n declare validator: typeof validate;\n\n constructor(data: MediaFileSchema) {\n super(data);\n this.id = data.id;\n if (data.propertyId !== undefined) this.propertyId = data.propertyId;\n this.type = data.type;\n if (data.name !== undefined) this.name = data.name;\n if (data.fileHash !== undefined) this.fileHash = data.fileHash;\n if (data.category !== undefined) this.category = data.category;\n if (data.mimeType !== undefined) this.mimeType = data.mimeType;\n if (data.data !== undefined) this.data = data.data;\n if (data.url !== undefined) this.url = data.url;\n if (data.width !== undefined) this.width = data.width;\n if (data.height !== undefined) this.height = data.height;\n if (data.size !== undefined) this.size = data.size;\n if (data.uploadUrl !== undefined) this.uploadUrl = data.uploadUrl;\n if (data.uploadUrlExpires !== undefined) this.uploadUrlExpires = data.uploadUrlExpires;\n if (data.createdBy !== undefined) this.createdBy = data.createdBy;\n if (data.systemId !== undefined) this.systemId = data.systemId;\n if (data.createdAt !== undefined) this.createdAt = data.createdAt;\n if (data.updatedAt !== undefined) this.updatedAt = data.updatedAt;\n if (data.deletedAt !== undefined) this.deletedAt = data.deletedAt;\n }\n\n\n\n createImageVariant(params){if(this.
|
|
1
|
+
{"version":3,"file":"mediaFile.js","names":["validate"],"sources":["../../.generated/models/mediaFile.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateMediaFile as validate } from \"../validate.js\";\nimport { mediaFileSchema, type MediaFileSchema } from \"../schemas/mediaFile.js\";\n\n/**\n * Data type for MediaFile constructor - exported for backwards compatibility\n */\nexport type MediaFileData = MediaFileSchema;\n\n/**\n * Any media file\n */\nexport interface MediaFile extends MediaFileSchema {}\nexport class MediaFile extends Entity {\n declare schema: typeof mediaFileSchema;\n declare validator: typeof validate;\n\n constructor(data: MediaFileSchema) {\n super(data);\n this.id = data.id;\n if (data.propertyId !== undefined) this.propertyId = data.propertyId;\n this.type = data.type;\n if (data.name !== undefined) this.name = data.name;\n if (data.fileHash !== undefined) this.fileHash = data.fileHash;\n if (data.category !== undefined) this.category = data.category;\n if (data.mimeType !== undefined) this.mimeType = data.mimeType;\n if (data.data !== undefined) this.data = data.data;\n if (data.url !== undefined) this.url = data.url;\n if (data.width !== undefined) this.width = data.width;\n if (data.height !== undefined) this.height = data.height;\n if (data.previewUrl !== undefined) this.previewUrl = data.previewUrl;\n if (data.previewWidth !== undefined) this.previewWidth = data.previewWidth;\n if (data.previewHeight !== undefined) this.previewHeight = data.previewHeight;\n if (data.size !== undefined) this.size = data.size;\n if (data.uploadUrl !== undefined) this.uploadUrl = data.uploadUrl;\n if (data.uploadUrlExpires !== undefined) this.uploadUrlExpires = data.uploadUrlExpires;\n if (data.createdBy !== undefined) this.createdBy = data.createdBy;\n if (data.systemId !== undefined) this.systemId = data.systemId;\n if (data.createdAt !== undefined) this.createdAt = data.createdAt;\n if (data.updatedAt !== undefined) this.updatedAt = data.updatedAt;\n if (data.deletedAt !== undefined) this.deletedAt = data.deletedAt;\n }\n\n\n\n createImageVariant(params){if(!this.url)throw new Error(\"MediaFile has no url\");const{pathname}=new URL(this.url,\"http://localhost\");if(pathname.includes(\"/files/\")){return this.url+\"?\"+new URLSearchParams(params)}if(this.mimeType===\"image/*\"){const query=Object.keys(params).map(key=>`${key}=${params[key]}`).join(\",\");return this.url.replace(/\\/public$/,`/${query}`)}throw new Error(\"Only dynamic images can have variants\")}\n\n supportsImageVariants(){if(this.mimeType===\"image/*\")return true;if(!this.url||!this.url.includes(\"/files/\"))return false;return typeof this.mimeType===\"string\"&&this.mimeType.startsWith(\"image/\")&&this.mimeType!==\"image/svg+xml\"&&this.mimeType!==\"image/avif\"}\n\n\n\n\n}\n\nObject.defineProperty(MediaFile.prototype, \"schema\", {\n value: mediaFileSchema\n});\n\nObject.defineProperty(MediaFile.prototype, \"validator\", {\n get: function() { return validate; }\n});\n"],"mappings":";;;;AAeA,IAAa,YAAb,cAA+B,OAAO;CAIpC,YAAY,MAAuB;EACjC,MAAM,IAAI;EACV,KAAK,KAAK,KAAK;EACf,IAAI,KAAK,eAAe,KAAA,GAAW,KAAK,aAAa,KAAK;EAC1D,KAAK,OAAO,KAAK;EACjB,IAAI,KAAK,SAAS,KAAA,GAAW,KAAK,OAAO,KAAK;EAC9C,IAAI,KAAK,aAAa,KAAA,GAAW,KAAK,WAAW,KAAK;EACtD,IAAI,KAAK,aAAa,KAAA,GAAW,KAAK,WAAW,KAAK;EACtD,IAAI,KAAK,aAAa,KAAA,GAAW,KAAK,WAAW,KAAK;EACtD,IAAI,KAAK,SAAS,KAAA,GAAW,KAAK,OAAO,KAAK;EAC9C,IAAI,KAAK,QAAQ,KAAA,GAAW,KAAK,MAAM,KAAK;EAC5C,IAAI,KAAK,UAAU,KAAA,GAAW,KAAK,QAAQ,KAAK;EAChD,IAAI,KAAK,WAAW,KAAA,GAAW,KAAK,SAAS,KAAK;EAClD,IAAI,KAAK,eAAe,KAAA,GAAW,KAAK,aAAa,KAAK;EAC1D,IAAI,KAAK,iBAAiB,KAAA,GAAW,KAAK,eAAe,KAAK;EAC9D,IAAI,KAAK,kBAAkB,KAAA,GAAW,KAAK,gBAAgB,KAAK;EAChE,IAAI,KAAK,SAAS,KAAA,GAAW,KAAK,OAAO,KAAK;EAC9C,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;EACxD,IAAI,KAAK,qBAAqB,KAAA,GAAW,KAAK,mBAAmB,KAAK;EACtE,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;EACxD,IAAI,KAAK,aAAa,KAAA,GAAW,KAAK,WAAW,KAAK;EACtD,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;EACxD,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;EACxD,IAAI,KAAK,cAAc,KAAA,GAAW,KAAK,YAAY,KAAK;CAC1D;CAIA,mBAAmB,QAAO;EAAC,IAAG,CAAC,KAAK,KAAI,MAAM,IAAI,MAAM,sBAAsB;EAAE,MAAK,EAAC,aAAU,IAAI,IAAI,KAAK,KAAI,kBAAkB;EAAE,IAAG,SAAS,SAAS,SAAS,GAAG,OAAO,KAAK,MAAI,MAAI,IAAI,gBAAgB,MAAM;EAAE,IAAG,KAAK,aAAW,WAAU;GAAC,MAAM,QAAM,OAAO,KAAK,MAAM,CAAC,CAAC,KAAI,QAAK,GAAG,IAAI,GAAG,OAAO,MAAM,CAAC,CAAC,KAAK,GAAG;GAAE,OAAO,KAAK,IAAI,QAAQ,aAAY,IAAI,OAAO;EAAC;EAAC,MAAM,IAAI,MAAM,uCAAuC;CAAC;CAEza,wBAAuB;EAAC,IAAG,KAAK,aAAW,WAAU,OAAO;EAAK,IAAG,CAAC,KAAK,OAAK,CAAC,KAAK,IAAI,SAAS,SAAS,GAAE,OAAO;EAAM,OAAO,OAAO,KAAK,aAAW,YAAU,KAAK,SAAS,WAAW,QAAQ,KAAG,KAAK,aAAW,mBAAiB,KAAK,aAAW;CAAY;AAKrQ;AAEA,OAAO,eAAe,UAAU,WAAW,UAAU,EACnD,OAAO,gBACT,CAAC;AAED,OAAO,eAAe,UAAU,WAAW,aAAa,EACtD,KAAK,WAAW;CAAE,OAAOA;AAAU,EACrC,CAAC"}
|
|
@@ -79,7 +79,7 @@ declare const defs: {
|
|
|
79
79
|
readonly driver: {
|
|
80
80
|
readonly type: "string";
|
|
81
81
|
readonly description: "Driver used to communicate with the object.";
|
|
82
|
-
readonly enum: readonly ["adlink", "avigilon-alta", "aws-kinesis", "bacnet", "benq", "butler", "comelit", "cool-automation", "crestron", "dell", "digital-watchdog", "distech", "dmp", "doorbird", "dormakaba", "dsc", "dsc-itv2", "earbridge", "ecobee", "epson", "geovision-rs", "geovision-as-manager", "honeywell-vista", "honeywell-resideo", "igor", "inncom", "isapi", "kohost-k7", "kohost", "lapi", "lg", "lg-webos", "linortek", "lirc", "mews", "mht", "mobile-mule", "mock", "modbus", "napco", "newline", "obix", "one-roster", "onvif", "orchid-fusion", "paxton", "pdk", "pelican-wireless", "power-shades", "rachio", "rebrandly", "relay", "reolink", "rtsp", "salto", "salto-irn", "samsung", "se", "sendgrid", "singlewire", "smartboard", "sonifi", "stay-n-touch", "storable", "twilio", "unifi", "valcom", "veracross", "verkada", "vivotek", "vizio", "wisenet", "zkteco", "cloudflare-images", "cloudflare-stream", "insperia-privacy"];
|
|
82
|
+
readonly enum: readonly ["adlink", "apex-american-audio", "avigilon-alta", "aws-kinesis", "bacnet", "benq", "butler", "comelit", "cool-automation", "crestron", "dell", "digital-watchdog", "distech", "dmp", "doorbird", "dormakaba", "dsc", "dsc-itv2", "earbridge", "ecobee", "epson", "geovision-rs", "geovision-as-manager", "honeywell-vista", "honeywell-resideo", "igor", "inncom", "isapi", "kohost-k7", "kohost", "lapi", "lg", "lg-webos", "linortek", "lirc", "mews", "mht", "mobile-mule", "mock", "modbus", "napco", "newline", "obix", "one-roster", "onvif", "orchid-fusion", "paxton", "pdk", "pelican-wireless", "power-shades", "rachio", "rebrandly", "relay", "reolink", "rtsp", "salto", "salto-irn", "samsung", "se", "sendgrid", "singlewire", "smartboard", "sonifi", "stay-n-touch", "storable", "twilio", "unifi", "valcom", "veracross", "verkada", "vivotek", "vizio", "wisenet", "zkteco", "cloudflare-images", "cloudflare-stream", "insperia-privacy"];
|
|
83
83
|
};
|
|
84
84
|
readonly type: {
|
|
85
85
|
readonly type: "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","names":[],"sources":["../../.generated/schemas/definitions.ts"],"sourcesContent":["export const TICKET_NOTIFICATION_EVENTS = [\n \"ticketCreated\",\n \"ticketAssignedToMe\",\n \"addedAsCollaborator\",\n \"mentionedInTicket\",\n \"messageOnMyTicket\",\n \"ticketResolved\",\n \"ticketCreatedAsObserver\",\n \"messageAsObserver\",\n \"ticketResolvedAsObserver\",\n] as const;\n\nexport type TicketNotificationEvent =\n (typeof TICKET_NOTIFICATION_EVENTS)[number];\n\nexport const NOTIFICATION_CHANNELS = [\"email\", \"sms\", \"push\"] as const;\n\nexport type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number];\n\nconst 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 \"cool-automation\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"earbridge\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"honeywell-resideo\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lapi\",\n \"lg\",\n \"lg-webos\",\n \"linortek\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"mock\",\n \"modbus\",\n \"napco\",\n \"newline\",\n \"obix\",\n \"one-roster\",\n \"onvif\",\n \"orchid-fusion\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"reolink\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"singlewire\",\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 \"zkteco\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"camera\",\n \"courtesy\",\n \"dimmer\",\n \"gateway\",\n \"lock\",\n \"mediaSource\",\n \"motionSensor\",\n \"switch\",\n \"thermostat\",\n \"windowCovering\",\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 \"Button\",\n \"Communication\",\n \"Config\",\n \"Cost\",\n \"Door Ajar\",\n \"Equipment\",\n \"Maintenance\",\n \"Motion\",\n \"Registration\",\n \"Temperature\",\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 \"replaceBattery\",\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 \"powerTrouble\",\n \"monitoringTrouble\",\n \"bellTrouble\",\n \"configIssue\",\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 ticketNotificationEvent: {\n type: \"string\",\n enum: TICKET_NOTIFICATION_EVENTS,\n },\n notificationChannel: {\n type: \"string\",\n enum: NOTIFICATION_CHANNELS,\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";AAAA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAKA,MAAa,wBAAwB;CAAC;CAAS;CAAO;AAAM;AAI5D,MAAM,OAAO;CACX,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;EACX,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,aAAa;EACf;EACA,YAAY,EACV,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,SAAS,CAAC;EACZ;EACA,MAAM;GACJ,MAAM,CAAC,UAAU,QAAQ;GACzB,QAAQ;EACV;EACA,MAAM;GACJ,MAAM;GACN,UAAU;IAAC;IAAQ;IAAQ;GAAM;GACjC,YAAY;IACV,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;GACF;EACF;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,IAAI,EACF,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,MAAM,EACJ,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,aAAa;KACX,MAAM;KACN,WAAW;KACX,WAAW;IACb;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU;KAAC;KAAQ;KAAU;IAAS;IACtC,YAAY;KACV,IAAI,EACF,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;KACF;KACA,QAAQ;MACN,MAAM;MACN,MAAM,CAAC,UAAU,UAAU;KAC7B;KACA,SAAS,EACP,MAAM,SACR;IACF;GACF;EACF;EACA,wBAAwB;GACtB,MAAM;GACN,aAAa;GACb,OAAO,EACL,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,EACF;EACF;EACA,cAAc;GACZ,MAAM,CAAC,UAAU,MAAM;GACvB,YAAY;IACV,MAAM;KACJ,MAAM;KACN,MAAM;IACR;IACA,WAAW;KACT,MAAM;KACN,SAAS;IACX;IACA,aAAa,EACX,MAAM,SACR;GACF;EACF;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,OAAO;IACL,MAAM;IACN,YAAY;KACV,IAAI,EACF,MAAM,mCACR;KACA,MAAM,EACJ,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,QAAQ;KACV;KACA,OAAO,EACL,MAAM,SACR;KACA,KAAK,EACH,MAAM,CAAC,UAAU,MAAM,EACzB;IACF;GACF;EACF;EACA,yBAAyB;GACvB,MAAM;GACN,MAAM;EACR;EACA,qBAAqB;GACnB,MAAM;GACN,MAAM;EACR;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"definitions.js","names":[],"sources":["../../.generated/schemas/definitions.ts"],"sourcesContent":["export const TICKET_NOTIFICATION_EVENTS = [\n \"ticketCreated\",\n \"ticketAssignedToMe\",\n \"addedAsCollaborator\",\n \"mentionedInTicket\",\n \"messageOnMyTicket\",\n \"ticketResolved\",\n \"ticketCreatedAsObserver\",\n \"messageAsObserver\",\n \"ticketResolvedAsObserver\",\n] as const;\n\nexport type TicketNotificationEvent =\n (typeof TICKET_NOTIFICATION_EVENTS)[number];\n\nexport const NOTIFICATION_CHANNELS = [\"email\", \"sms\", \"push\"] as const;\n\nexport type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number];\n\nconst 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 \"apex-american-audio\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"cool-automation\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"earbridge\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"honeywell-vista\",\n \"honeywell-resideo\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lapi\",\n \"lg\",\n \"lg-webos\",\n \"linortek\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"mock\",\n \"modbus\",\n \"napco\",\n \"newline\",\n \"obix\",\n \"one-roster\",\n \"onvif\",\n \"orchid-fusion\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"reolink\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"singlewire\",\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 \"zkteco\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"camera\",\n \"courtesy\",\n \"dimmer\",\n \"gateway\",\n \"lock\",\n \"mediaSource\",\n \"motionSensor\",\n \"switch\",\n \"thermostat\",\n \"windowCovering\",\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 \"Button\",\n \"Communication\",\n \"Config\",\n \"Cost\",\n \"Door Ajar\",\n \"Equipment\",\n \"Maintenance\",\n \"Motion\",\n \"Registration\",\n \"Temperature\",\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 \"replaceBattery\",\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 \"powerTrouble\",\n \"monitoringTrouble\",\n \"bellTrouble\",\n \"configIssue\",\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 ticketNotificationEvent: {\n type: \"string\",\n enum: TICKET_NOTIFICATION_EVENTS,\n },\n notificationChannel: {\n type: \"string\",\n enum: NOTIFICATION_CHANNELS,\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";AAAA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAKA,MAAa,wBAAwB;CAAC;CAAS;CAAO;AAAM;AAI5D,MAAM,OAAO;CACX,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;EACX,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,aAAa;EACf;EACA,YAAY,EACV,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,SAAS,CAAC;EACZ;EACA,MAAM;GACJ,MAAM,CAAC,UAAU,QAAQ;GACzB,QAAQ;EACV;EACA,MAAM;GACJ,MAAM;GACN,UAAU;IAAC;IAAQ;IAAQ;GAAM;GACjC,YAAY;IACV,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;GACF;EACF;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,IAAI,EACF,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,MAAM,EACJ,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,aAAa;KACX,MAAM;KACN,WAAW;KACX,WAAW;IACb;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU;KAAC;KAAQ;KAAU;IAAS;IACtC,YAAY;KACV,IAAI,EACF,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;KACF;KACA,QAAQ;MACN,MAAM;MACN,MAAM,CAAC,UAAU,UAAU;KAC7B;KACA,SAAS,EACP,MAAM,SACR;IACF;GACF;EACF;EACA,wBAAwB;GACtB,MAAM;GACN,aAAa;GACb,OAAO,EACL,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,EACF;EACF;EACA,cAAc;GACZ,MAAM,CAAC,UAAU,MAAM;GACvB,YAAY;IACV,MAAM;KACJ,MAAM;KACN,MAAM;IACR;IACA,WAAW;KACT,MAAM;KACN,SAAS;IACX;IACA,aAAa,EACX,MAAM,SACR;GACF;EACF;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,OAAO;IACL,MAAM;IACN,YAAY;KACV,IAAI,EACF,MAAM,mCACR;KACA,MAAM,EACJ,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,QAAQ;KACV;KACA,OAAO,EACL,MAAM,SACR;KACA,KAAK,EACH,MAAM,CAAC,UAAU,MAAM,EACzB;IACF;GACF;EACF;EACA,yBAAyB;GACvB,MAAM;GACN,MAAM;EACR;EACA,qBAAqB;GACnB,MAAM;GACN,MAAM;EACR;CACF;AACF"}
|
|
@@ -32,7 +32,7 @@ export declare const mediaFileSchema: {
|
|
|
32
32
|
};
|
|
33
33
|
readonly mimeType: {
|
|
34
34
|
readonly type: "string";
|
|
35
|
-
readonly enum: readonly ["image/*", "image/jpeg", "image/png", "image/gif", "image/webp", "image/avif", "image/svg+xml", "application/pdf"];
|
|
35
|
+
readonly enum: readonly ["image/*", "image/jpeg", "image/png", "image/gif", "image/webp", "image/avif", "image/svg+xml", "image/heic", "application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "text/plain", "text/csv"];
|
|
36
36
|
};
|
|
37
37
|
readonly data: {
|
|
38
38
|
readonly type: "string";
|
|
@@ -49,6 +49,18 @@ export declare const mediaFileSchema: {
|
|
|
49
49
|
readonly type: "integer";
|
|
50
50
|
readonly minimum: 0;
|
|
51
51
|
};
|
|
52
|
+
readonly previewUrl: {
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
readonly format: "uri";
|
|
55
|
+
};
|
|
56
|
+
readonly previewWidth: {
|
|
57
|
+
readonly type: "integer";
|
|
58
|
+
readonly minimum: 0;
|
|
59
|
+
};
|
|
60
|
+
readonly previewHeight: {
|
|
61
|
+
readonly type: "integer";
|
|
62
|
+
readonly minimum: 0;
|
|
63
|
+
};
|
|
52
64
|
readonly size: {
|
|
53
65
|
readonly type: "integer";
|
|
54
66
|
readonly minimum: 0;
|
|
@@ -92,7 +104,9 @@ export type MediaFileSchema = FromSchema<typeof mediaFileSchema, {
|
|
|
92
104
|
];
|
|
93
105
|
}>;
|
|
94
106
|
declare function createImageVariant(params: any): any;
|
|
107
|
+
declare function supportsImageVariants(): boolean;
|
|
95
108
|
export declare const methods: {
|
|
96
109
|
createImageVariant: typeof createImageVariant;
|
|
110
|
+
supportsImageVariants: typeof supportsImageVariants;
|
|
97
111
|
};
|
|
98
112
|
export {};
|
|
@@ -35,7 +35,16 @@ const mediaFileSchema = {
|
|
|
35
35
|
"image/webp",
|
|
36
36
|
"image/avif",
|
|
37
37
|
"image/svg+xml",
|
|
38
|
-
"
|
|
38
|
+
"image/heic",
|
|
39
|
+
"application/pdf",
|
|
40
|
+
"application/msword",
|
|
41
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
42
|
+
"application/vnd.ms-excel",
|
|
43
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
44
|
+
"application/vnd.ms-powerpoint",
|
|
45
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
46
|
+
"text/plain",
|
|
47
|
+
"text/csv"
|
|
39
48
|
]
|
|
40
49
|
},
|
|
41
50
|
data: { type: "string" },
|
|
@@ -51,6 +60,18 @@ const mediaFileSchema = {
|
|
|
51
60
|
type: "integer",
|
|
52
61
|
minimum: 0
|
|
53
62
|
},
|
|
63
|
+
previewUrl: {
|
|
64
|
+
type: "string",
|
|
65
|
+
format: "uri"
|
|
66
|
+
},
|
|
67
|
+
previewWidth: {
|
|
68
|
+
type: "integer",
|
|
69
|
+
minimum: 0
|
|
70
|
+
},
|
|
71
|
+
previewHeight: {
|
|
72
|
+
type: "integer",
|
|
73
|
+
minimum: 0
|
|
74
|
+
},
|
|
54
75
|
size: {
|
|
55
76
|
type: "integer",
|
|
56
77
|
minimum: 0,
|
|
@@ -71,12 +92,24 @@ const mediaFileSchema = {
|
|
|
71
92
|
required: ["id", "type"]
|
|
72
93
|
};
|
|
73
94
|
function createImageVariant(params) {
|
|
74
|
-
if (this.mimeType != "image/*") throw new Error("Only dynamic images can have variants");
|
|
75
95
|
if (!this.url) throw new Error("MediaFile has no url");
|
|
76
|
-
const
|
|
77
|
-
return this.url
|
|
96
|
+
const { pathname } = new URL(this.url, "http://localhost");
|
|
97
|
+
if (pathname.includes("/files/")) return this.url + "?" + new URLSearchParams(params);
|
|
98
|
+
if (this.mimeType === "image/*") {
|
|
99
|
+
const query = Object.keys(params).map((key) => `${key}=${params[key]}`).join(",");
|
|
100
|
+
return this.url.replace(/\/public$/, `/${query}`);
|
|
101
|
+
}
|
|
102
|
+
throw new Error("Only dynamic images can have variants");
|
|
78
103
|
}
|
|
79
|
-
|
|
104
|
+
function supportsImageVariants() {
|
|
105
|
+
if (this.mimeType === "image/*") return true;
|
|
106
|
+
if (!this.url || !this.url.includes("/files/")) return false;
|
|
107
|
+
return typeof this.mimeType === "string" && this.mimeType.startsWith("image/") && this.mimeType !== "image/svg+xml" && this.mimeType !== "image/avif";
|
|
108
|
+
}
|
|
109
|
+
const methods = {
|
|
110
|
+
createImageVariant,
|
|
111
|
+
supportsImageVariants
|
|
112
|
+
};
|
|
80
113
|
//#endregion
|
|
81
114
|
export { mediaFileSchema, methods };
|
|
82
115
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mediaFile.js","names":[],"sources":["../../.generated/schemas/mediaFile.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const mediaFileSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"mediaFile.json\",\n title: \"Media File\",\n description: \"Any media file\",\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n default: \"\",\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: \"mediaFile\",\n enum: [\"mediaFile\"],\n },\n name: {\n type: \"string\",\n },\n fileHash: {\n type: \"string\",\n },\n category: {\n type: \"string\",\n description: \"This is the category id\",\n },\n mimeType: {\n type: \"string\",\n enum: [\n \"image/*\",\n \"image/jpeg\",\n \"image/png\",\n \"image/gif\",\n \"image/webp\",\n \"image/avif\",\n \"image/svg+xml\",\n \"application/pdf\",\n ],\n },\n data: {\n type: \"string\",\n },\n url: {\n type: \"string\",\n format: \"uri\",\n },\n width: {\n type: \"integer\",\n minimum: 0,\n },\n height: {\n type: \"integer\",\n minimum: 0,\n },\n size: {\n type: \"integer\",\n minimum: 0,\n description: \"Size in bytes\",\n },\n uploadUrl: {\n type: \"string\",\n format: \"uri\",\n },\n uploadUrlExpires: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdBy: {\n type: \"string\",\n },\n systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\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 required: [\"id\", \"type\"],\n} as const;\n\nexport type MediaFileSchema = FromSchema<\n typeof mediaFileSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\nfunction createImageVariant(params) {\n if (this.
|
|
1
|
+
{"version":3,"file":"mediaFile.js","names":[],"sources":["../../.generated/schemas/mediaFile.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const mediaFileSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"mediaFile.json\",\n title: \"Media File\",\n description: \"Any media file\",\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n default: \"\",\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: \"mediaFile\",\n enum: [\"mediaFile\"],\n },\n name: {\n type: \"string\",\n },\n fileHash: {\n type: \"string\",\n },\n category: {\n type: \"string\",\n description: \"This is the category id\",\n },\n mimeType: {\n type: \"string\",\n enum: [\n \"image/*\",\n \"image/jpeg\",\n \"image/png\",\n \"image/gif\",\n \"image/webp\",\n \"image/avif\",\n \"image/svg+xml\",\n \"image/heic\",\n \"application/pdf\",\n \"application/msword\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"application/vnd.ms-excel\",\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n \"application/vnd.ms-powerpoint\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"text/plain\",\n \"text/csv\",\n ],\n },\n data: {\n type: \"string\",\n },\n url: {\n type: \"string\",\n format: \"uri\",\n },\n width: {\n type: \"integer\",\n minimum: 0,\n },\n height: {\n type: \"integer\",\n minimum: 0,\n },\n previewUrl: {\n type: \"string\",\n format: \"uri\",\n },\n previewWidth: {\n type: \"integer\",\n minimum: 0,\n },\n previewHeight: {\n type: \"integer\",\n minimum: 0,\n },\n size: {\n type: \"integer\",\n minimum: 0,\n description: \"Size in bytes\",\n },\n uploadUrl: {\n type: \"string\",\n format: \"uri\",\n },\n uploadUrlExpires: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdBy: {\n type: \"string\",\n },\n systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\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 required: [\"id\", \"type\"],\n} as const;\n\nexport type MediaFileSchema = FromSchema<\n typeof mediaFileSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\nfunction createImageVariant(params) {\n if (!this.url) throw new Error(\"MediaFile has no url\");\n\n const { pathname } = new URL(this.url, \"http://localhost\");\n if (pathname.includes(\"/files/\")) {\n return this.url + \"?\" + new URLSearchParams(params);\n }\n\n if (this.mimeType === \"image/*\") {\n const query = Object.keys(params)\n .map((key) => `${key}=${params[key]}`)\n .join(\",\");\n return this.url.replace(/\\/public$/, `/${query}`);\n }\n\n throw new Error(\"Only dynamic images can have variants\");\n}\n\nfunction supportsImageVariants(): boolean {\n if (this.mimeType === \"image/*\") return true;\n if (!this.url || !this.url.includes(\"/files/\")) return false;\n return (\n typeof this.mimeType === \"string\" &&\n this.mimeType.startsWith(\"image/\") &&\n this.mimeType !== \"image/svg+xml\" &&\n this.mimeType !== \"image/avif\"\n );\n}\n\nexport const methods = {\n createImageVariant: createImageVariant,\n supportsImageVariants: supportsImageVariants,\n};\n"],"mappings":";AAGA,MAAa,kBAAkB;CAC7B,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;CACb,MAAM;CACN,YAAY;EACV,IAAI;GACF,MAAM;GACN,SAAS;EACX;EACA,YAAY;GACV,MAAM;GACN,aAAa;EACf;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,WAAW;EACpB;EACA,MAAM,EACJ,MAAM,SACR;EACA,UAAU,EACR,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,KAAK;GACH,MAAM;GACN,QAAQ;EACV;EACA,OAAO;GACL,MAAM;GACN,SAAS;EACX;EACA,QAAQ;GACN,MAAM;GACN,SAAS;EACX;EACA,YAAY;GACV,MAAM;GACN,QAAQ;EACV;EACA,cAAc;GACZ,MAAM;GACN,SAAS;EACX;EACA,eAAe;GACb,MAAM;GACN,SAAS;EACX;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,aAAa;EACf;EACA,WAAW;GACT,MAAM;GACN,QAAQ;EACV;EACA,kBAAkB,EAChB,MAAM,qCACR;EACA,WAAW,EACT,MAAM,SACR;EACA,UAAU,EACR,MAAM,yCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;CACA,sBAAsB;CACtB,UAAU,CAAC,MAAM,MAAM;AACzB;AAiBA,SAAS,mBAAmB,QAAQ;CAClC,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI,MAAM,sBAAsB;CAErD,MAAM,EAAE,aAAa,IAAI,IAAI,KAAK,KAAK,kBAAkB;CACzD,IAAI,SAAS,SAAS,SAAS,GAC7B,OAAO,KAAK,MAAM,MAAM,IAAI,gBAAgB,MAAM;CAGpD,IAAI,KAAK,aAAa,WAAW;EAC/B,MAAM,QAAQ,OAAO,KAAK,MAAM,CAAC,CAC9B,KAAK,QAAQ,GAAG,IAAI,GAAG,OAAO,MAAM,CAAC,CACrC,KAAK,GAAG;EACX,OAAO,KAAK,IAAI,QAAQ,aAAa,IAAI,OAAO;CAClD;CAEA,MAAM,IAAI,MAAM,uCAAuC;AACzD;AAEA,SAAS,wBAAiC;CACxC,IAAI,KAAK,aAAa,WAAW,OAAO;CACxC,IAAI,CAAC,KAAK,OAAO,CAAC,KAAK,IAAI,SAAS,SAAS,GAAG,OAAO;CACvD,OACE,OAAO,KAAK,aAAa,YACzB,KAAK,SAAS,WAAW,QAAQ,KACjC,KAAK,aAAa,mBAClB,KAAK,aAAa;AAEtB;AAEA,MAAa,UAAU;CACD;CACG;AACzB"}
|