@kohost/api-client 7.6.1 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/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/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 +6 -6
- 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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K,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,GA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C,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"}
|
|
@@ -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"}
|
package/dist/schemas/ticket.d.ts
CHANGED
|
@@ -91,9 +91,254 @@ export declare const ticketSchema: {
|
|
|
91
91
|
readonly additionalProperties: false;
|
|
92
92
|
readonly description: "An object containing the parsed body of the message for mentions.";
|
|
93
93
|
readonly properties: {
|
|
94
|
+
readonly content: {
|
|
95
|
+
readonly type: "array";
|
|
96
|
+
readonly minItems: 1;
|
|
97
|
+
readonly description: "Rich-text block nodes (ADR 0012). Present = rich message: `body` is the server-derived plain-text projection of this tree, and the legacy text/mentions fields are not written.";
|
|
98
|
+
readonly items: {
|
|
99
|
+
readonly anyOf: readonly [{
|
|
100
|
+
readonly type: "object";
|
|
101
|
+
readonly additionalProperties: false;
|
|
102
|
+
readonly required: readonly ["type", "content"];
|
|
103
|
+
readonly properties: {
|
|
104
|
+
readonly type: {
|
|
105
|
+
readonly type: "string";
|
|
106
|
+
readonly enum: readonly ["paragraph"];
|
|
107
|
+
};
|
|
108
|
+
readonly content: {
|
|
109
|
+
readonly type: "array";
|
|
110
|
+
readonly minItems: 1;
|
|
111
|
+
readonly items: {
|
|
112
|
+
readonly anyOf: readonly [{
|
|
113
|
+
readonly type: "object";
|
|
114
|
+
readonly additionalProperties: false;
|
|
115
|
+
readonly required: readonly ["type", "text"];
|
|
116
|
+
readonly properties: {
|
|
117
|
+
readonly type: {
|
|
118
|
+
readonly type: "string";
|
|
119
|
+
readonly enum: readonly ["text"];
|
|
120
|
+
};
|
|
121
|
+
readonly text: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
};
|
|
124
|
+
readonly marks: {
|
|
125
|
+
readonly type: "array";
|
|
126
|
+
readonly uniqueItems: true;
|
|
127
|
+
readonly items: {
|
|
128
|
+
readonly type: "string";
|
|
129
|
+
readonly enum: readonly ["bold", "italic", "underline"];
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
}, {
|
|
134
|
+
readonly type: "object";
|
|
135
|
+
readonly additionalProperties: false;
|
|
136
|
+
readonly required: readonly ["type", "id", "discriminator", "label"];
|
|
137
|
+
readonly properties: {
|
|
138
|
+
readonly type: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
readonly enum: readonly ["mention"];
|
|
141
|
+
};
|
|
142
|
+
readonly id: {
|
|
143
|
+
readonly type: "string";
|
|
144
|
+
};
|
|
145
|
+
readonly discriminator: {
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly enum: readonly ["user", "vendor", "system"];
|
|
148
|
+
};
|
|
149
|
+
readonly label: {
|
|
150
|
+
readonly type: "string";
|
|
151
|
+
readonly description: "Display name of the mentioned entity, without the leading @.";
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
}, {
|
|
155
|
+
readonly type: "object";
|
|
156
|
+
readonly additionalProperties: false;
|
|
157
|
+
readonly required: readonly ["type"];
|
|
158
|
+
readonly properties: {
|
|
159
|
+
readonly type: {
|
|
160
|
+
readonly type: "string";
|
|
161
|
+
readonly enum: readonly ["hardBreak"];
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
}];
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}, {
|
|
169
|
+
readonly type: "object";
|
|
170
|
+
readonly additionalProperties: false;
|
|
171
|
+
readonly required: readonly ["type", "content"];
|
|
172
|
+
readonly properties: {
|
|
173
|
+
readonly type: {
|
|
174
|
+
readonly type: "string";
|
|
175
|
+
readonly enum: readonly ["bulletList"];
|
|
176
|
+
};
|
|
177
|
+
readonly content: {
|
|
178
|
+
readonly type: "array";
|
|
179
|
+
readonly minItems: 1;
|
|
180
|
+
readonly items: {
|
|
181
|
+
readonly type: "object";
|
|
182
|
+
readonly additionalProperties: false;
|
|
183
|
+
readonly required: readonly ["type", "content"];
|
|
184
|
+
readonly properties: {
|
|
185
|
+
readonly type: {
|
|
186
|
+
readonly type: "string";
|
|
187
|
+
readonly enum: readonly ["listItem"];
|
|
188
|
+
};
|
|
189
|
+
readonly content: {
|
|
190
|
+
readonly type: "array";
|
|
191
|
+
readonly minItems: 1;
|
|
192
|
+
readonly items: {
|
|
193
|
+
readonly anyOf: readonly [{
|
|
194
|
+
readonly type: "object";
|
|
195
|
+
readonly additionalProperties: false;
|
|
196
|
+
readonly required: readonly ["type", "text"];
|
|
197
|
+
readonly properties: {
|
|
198
|
+
readonly type: {
|
|
199
|
+
readonly type: "string";
|
|
200
|
+
readonly enum: readonly ["text"];
|
|
201
|
+
};
|
|
202
|
+
readonly text: {
|
|
203
|
+
readonly type: "string";
|
|
204
|
+
};
|
|
205
|
+
readonly marks: {
|
|
206
|
+
readonly type: "array";
|
|
207
|
+
readonly uniqueItems: true;
|
|
208
|
+
readonly items: {
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
readonly enum: readonly ["bold", "italic", "underline"];
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
}, {
|
|
215
|
+
readonly type: "object";
|
|
216
|
+
readonly additionalProperties: false;
|
|
217
|
+
readonly required: readonly ["type", "id", "discriminator", "label"];
|
|
218
|
+
readonly properties: {
|
|
219
|
+
readonly type: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
readonly enum: readonly ["mention"];
|
|
222
|
+
};
|
|
223
|
+
readonly id: {
|
|
224
|
+
readonly type: "string";
|
|
225
|
+
};
|
|
226
|
+
readonly discriminator: {
|
|
227
|
+
readonly type: "string";
|
|
228
|
+
readonly enum: readonly ["user", "vendor", "system"];
|
|
229
|
+
};
|
|
230
|
+
readonly label: {
|
|
231
|
+
readonly type: "string";
|
|
232
|
+
readonly description: "Display name of the mentioned entity, without the leading @.";
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
}, {
|
|
236
|
+
readonly type: "object";
|
|
237
|
+
readonly additionalProperties: false;
|
|
238
|
+
readonly required: readonly ["type"];
|
|
239
|
+
readonly properties: {
|
|
240
|
+
readonly type: {
|
|
241
|
+
readonly type: "string";
|
|
242
|
+
readonly enum: readonly ["hardBreak"];
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
}];
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
}, {
|
|
253
|
+
readonly type: "object";
|
|
254
|
+
readonly additionalProperties: false;
|
|
255
|
+
readonly required: readonly ["type", "content"];
|
|
256
|
+
readonly properties: {
|
|
257
|
+
readonly type: {
|
|
258
|
+
readonly type: "string";
|
|
259
|
+
readonly enum: readonly ["orderedList"];
|
|
260
|
+
};
|
|
261
|
+
readonly content: {
|
|
262
|
+
readonly type: "array";
|
|
263
|
+
readonly minItems: 1;
|
|
264
|
+
readonly items: {
|
|
265
|
+
readonly type: "object";
|
|
266
|
+
readonly additionalProperties: false;
|
|
267
|
+
readonly required: readonly ["type", "content"];
|
|
268
|
+
readonly properties: {
|
|
269
|
+
readonly type: {
|
|
270
|
+
readonly type: "string";
|
|
271
|
+
readonly enum: readonly ["listItem"];
|
|
272
|
+
};
|
|
273
|
+
readonly content: {
|
|
274
|
+
readonly type: "array";
|
|
275
|
+
readonly minItems: 1;
|
|
276
|
+
readonly items: {
|
|
277
|
+
readonly anyOf: readonly [{
|
|
278
|
+
readonly type: "object";
|
|
279
|
+
readonly additionalProperties: false;
|
|
280
|
+
readonly required: readonly ["type", "text"];
|
|
281
|
+
readonly properties: {
|
|
282
|
+
readonly type: {
|
|
283
|
+
readonly type: "string";
|
|
284
|
+
readonly enum: readonly ["text"];
|
|
285
|
+
};
|
|
286
|
+
readonly text: {
|
|
287
|
+
readonly type: "string";
|
|
288
|
+
};
|
|
289
|
+
readonly marks: {
|
|
290
|
+
readonly type: "array";
|
|
291
|
+
readonly uniqueItems: true;
|
|
292
|
+
readonly items: {
|
|
293
|
+
readonly type: "string";
|
|
294
|
+
readonly enum: readonly ["bold", "italic", "underline"];
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
}, {
|
|
299
|
+
readonly type: "object";
|
|
300
|
+
readonly additionalProperties: false;
|
|
301
|
+
readonly required: readonly ["type", "id", "discriminator", "label"];
|
|
302
|
+
readonly properties: {
|
|
303
|
+
readonly type: {
|
|
304
|
+
readonly type: "string";
|
|
305
|
+
readonly enum: readonly ["mention"];
|
|
306
|
+
};
|
|
307
|
+
readonly id: {
|
|
308
|
+
readonly type: "string";
|
|
309
|
+
};
|
|
310
|
+
readonly discriminator: {
|
|
311
|
+
readonly type: "string";
|
|
312
|
+
readonly enum: readonly ["user", "vendor", "system"];
|
|
313
|
+
};
|
|
314
|
+
readonly label: {
|
|
315
|
+
readonly type: "string";
|
|
316
|
+
readonly description: "Display name of the mentioned entity, without the leading @.";
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
}, {
|
|
320
|
+
readonly type: "object";
|
|
321
|
+
readonly additionalProperties: false;
|
|
322
|
+
readonly required: readonly ["type"];
|
|
323
|
+
readonly properties: {
|
|
324
|
+
readonly type: {
|
|
325
|
+
readonly type: "string";
|
|
326
|
+
readonly enum: readonly ["hardBreak"];
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
}];
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
}];
|
|
337
|
+
};
|
|
338
|
+
};
|
|
94
339
|
readonly text: {
|
|
95
340
|
readonly type: "string";
|
|
96
|
-
readonly description: "The mention text.";
|
|
341
|
+
readonly description: "The mention text (legacy tokenized format).";
|
|
97
342
|
};
|
|
98
343
|
readonly mentions: {
|
|
99
344
|
readonly type: "array";
|
|
@@ -163,6 +408,13 @@ export declare const ticketSchema: {
|
|
|
163
408
|
}];
|
|
164
409
|
readonly description: "The media file associated with the message.";
|
|
165
410
|
};
|
|
411
|
+
readonly attachments: {
|
|
412
|
+
readonly type: "array";
|
|
413
|
+
readonly items: {
|
|
414
|
+
readonly $ref: "mediaFile.json";
|
|
415
|
+
};
|
|
416
|
+
readonly description: "Files attached to the message. Supersedes the singular media.";
|
|
417
|
+
};
|
|
166
418
|
};
|
|
167
419
|
};
|
|
168
420
|
};
|
package/dist/schemas/ticket.js
CHANGED
|
@@ -1,4 +1,96 @@
|
|
|
1
1
|
//#region .generated/schemas/ticket.ts
|
|
2
|
+
const richTextInlineNodes = {
|
|
3
|
+
type: "array",
|
|
4
|
+
minItems: 1,
|
|
5
|
+
items: { anyOf: [
|
|
6
|
+
{
|
|
7
|
+
type: "object",
|
|
8
|
+
additionalProperties: false,
|
|
9
|
+
required: ["type", "text"],
|
|
10
|
+
properties: {
|
|
11
|
+
type: {
|
|
12
|
+
type: "string",
|
|
13
|
+
enum: ["text"]
|
|
14
|
+
},
|
|
15
|
+
text: { type: "string" },
|
|
16
|
+
marks: {
|
|
17
|
+
type: "array",
|
|
18
|
+
uniqueItems: true,
|
|
19
|
+
items: {
|
|
20
|
+
type: "string",
|
|
21
|
+
enum: [
|
|
22
|
+
"bold",
|
|
23
|
+
"italic",
|
|
24
|
+
"underline"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: "object",
|
|
32
|
+
additionalProperties: false,
|
|
33
|
+
required: [
|
|
34
|
+
"type",
|
|
35
|
+
"id",
|
|
36
|
+
"discriminator",
|
|
37
|
+
"label"
|
|
38
|
+
],
|
|
39
|
+
properties: {
|
|
40
|
+
type: {
|
|
41
|
+
type: "string",
|
|
42
|
+
enum: ["mention"]
|
|
43
|
+
},
|
|
44
|
+
id: { type: "string" },
|
|
45
|
+
discriminator: {
|
|
46
|
+
type: "string",
|
|
47
|
+
enum: [
|
|
48
|
+
"user",
|
|
49
|
+
"vendor",
|
|
50
|
+
"system"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
label: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Display name of the mentioned entity, without the leading @."
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: "object",
|
|
61
|
+
additionalProperties: false,
|
|
62
|
+
required: ["type"],
|
|
63
|
+
properties: { type: {
|
|
64
|
+
type: "string",
|
|
65
|
+
enum: ["hardBreak"]
|
|
66
|
+
} }
|
|
67
|
+
}
|
|
68
|
+
] }
|
|
69
|
+
};
|
|
70
|
+
const richTextParagraphNode = {
|
|
71
|
+
type: "object",
|
|
72
|
+
additionalProperties: false,
|
|
73
|
+
required: ["type", "content"],
|
|
74
|
+
properties: {
|
|
75
|
+
type: {
|
|
76
|
+
type: "string",
|
|
77
|
+
enum: ["paragraph"]
|
|
78
|
+
},
|
|
79
|
+
content: richTextInlineNodes
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const richTextListItemNode = {
|
|
83
|
+
type: "object",
|
|
84
|
+
additionalProperties: false,
|
|
85
|
+
required: ["type", "content"],
|
|
86
|
+
properties: {
|
|
87
|
+
type: {
|
|
88
|
+
type: "string",
|
|
89
|
+
enum: ["listItem"]
|
|
90
|
+
},
|
|
91
|
+
content: richTextInlineNodes
|
|
92
|
+
}
|
|
93
|
+
};
|
|
2
94
|
const ticketSchema = {
|
|
3
95
|
$schema: "http://json-schema.org/draft-07/schema",
|
|
4
96
|
$id: "ticket.json",
|
|
@@ -125,9 +217,49 @@ const ticketSchema = {
|
|
|
125
217
|
additionalProperties: false,
|
|
126
218
|
description: "An object containing the parsed body of the message for mentions.",
|
|
127
219
|
properties: {
|
|
220
|
+
content: {
|
|
221
|
+
type: "array",
|
|
222
|
+
minItems: 1,
|
|
223
|
+
description: "Rich-text block nodes (ADR 0012). Present = rich message: `body` is the server-derived plain-text projection of this tree, and the legacy text/mentions fields are not written.",
|
|
224
|
+
items: { anyOf: [
|
|
225
|
+
richTextParagraphNode,
|
|
226
|
+
{
|
|
227
|
+
type: "object",
|
|
228
|
+
additionalProperties: false,
|
|
229
|
+
required: ["type", "content"],
|
|
230
|
+
properties: {
|
|
231
|
+
type: {
|
|
232
|
+
type: "string",
|
|
233
|
+
enum: ["bulletList"]
|
|
234
|
+
},
|
|
235
|
+
content: {
|
|
236
|
+
type: "array",
|
|
237
|
+
minItems: 1,
|
|
238
|
+
items: richTextListItemNode
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
type: "object",
|
|
244
|
+
additionalProperties: false,
|
|
245
|
+
required: ["type", "content"],
|
|
246
|
+
properties: {
|
|
247
|
+
type: {
|
|
248
|
+
type: "string",
|
|
249
|
+
enum: ["orderedList"]
|
|
250
|
+
},
|
|
251
|
+
content: {
|
|
252
|
+
type: "array",
|
|
253
|
+
minItems: 1,
|
|
254
|
+
items: richTextListItemNode
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
] }
|
|
259
|
+
},
|
|
128
260
|
text: {
|
|
129
261
|
type: "string",
|
|
130
|
-
description: "The mention text."
|
|
262
|
+
description: "The mention text (legacy tokenized format)."
|
|
131
263
|
},
|
|
132
264
|
mentions: {
|
|
133
265
|
type: "array",
|
|
@@ -210,6 +342,11 @@ const ticketSchema = {
|
|
|
210
342
|
media: {
|
|
211
343
|
anyOf: [{ $ref: "mediaFile.json" }, { type: "null" }],
|
|
212
344
|
description: "The media file associated with the message."
|
|
345
|
+
},
|
|
346
|
+
attachments: {
|
|
347
|
+
type: "array",
|
|
348
|
+
items: { $ref: "mediaFile.json" },
|
|
349
|
+
description: "Files attached to the message. Supersedes the singular media."
|
|
213
350
|
}
|
|
214
351
|
}
|
|
215
352
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticket.js","names":[],"sources":["../../.generated/schemas/ticket.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\nexport const ticketSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"ticket.json\",\n title: \"Ticket\",\n description: \"A ticket is a request from a user.\",\n type: \"object\",\n required: [\n \"id\",\n \"conversation\",\n \"requester\",\n \"openedBy\",\n \"assignedTo\",\n \"status\",\n \"priority\",\n \"tags\",\n \"createdAt\",\n \"updatedAt\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description: \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n enum: [\"ticket\"],\n default: \"ticket\",\n },\n number: {\n type: \"string\",\n description: \"The number of the ticket.\",\n },\n issueId: {\n type: \"string\",\n description: \"The ID of the issue that this ticket is associated with.\",\n },\n parentAutomationId: {\n type: \"string\",\n description: \"The ID of the automation that created this ticket.\",\n },\n conversation: {\n type: \"array\",\n default: [],\n description: \"The conversation history of the ticket.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"timestamp\", \"body\", \"author\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\n \"message\",\n \"opened\",\n \"assigned\",\n \"rated\",\n \"scheduled\",\n \"collaboratorAdded\",\n \"collaboratorRemoved\",\n \"statusChanged\",\n \"priorityChanged\",\n \"scheduleDateChanged\",\n \"locationChanged\",\n \"nudged\",\n ],\n default: \"message\",\n description: \"The discriminator of the message.\",\n },\n isInternal: {\n type: \"boolean\",\n description: \"Whether the message is internal to the assignedTo and collaborators. Internal messages are not visible to the requester.\",\n default: false,\n },\n author: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the author of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description: \"The discriminator of the author of the message.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the author of the message.\",\n },\n },\n },\n timestamp: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"The ISO 8601 timestamp of the message.\",\n },\n body: {\n type: \"string\",\n description: \"The body of the message.\",\n },\n parsedBody: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"An object containing the parsed body of the message for mentions.\",\n properties: {\n text: {\n type: \"string\",\n description: \"The mention text.\",\n },\n mentions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\n \"discriminator\",\n \"id\",\n \"index\",\n \"length\",\n \"originalText\",\n ],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the mention.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description:\n \"The discriminator of entity that was mentioned.\",\n },\n index: {\n type: \"integer\",\n description: \"The index of the mention in the message.\",\n },\n length: {\n type: \"integer\",\n description: \"The length of the mention in the message.\",\n },\n originalText: {\n type: \"string\",\n description: \"The original text of the mention.\",\n },\n },\n },\n },\n },\n },\n statusChanged: {\n type: \"object\",\n additionalProperties: false,\n required: [\"from\", \"to\"],\n description:\n \"Structured status transition for `statusChanged` entries. Lets consumers detect reopens (from solved/closed to open) without parsing the body text.\",\n properties: {\n from: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned from.\",\n },\n to: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned to.\",\n },\n },\n },\n readBy: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n description: \"The IDs of the users who have read the message.\",\n },\n media: {\n anyOf: [{ $ref: \"mediaFile.json\" }, { type: \"null\" }],\n description: \"The media file associated with the message.\",\n },\n },\n },\n },\n subject: {\n type: \"string\",\n description: \"The subject of the ticket.\",\n },\n openedBy: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"system\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n requester: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the requester.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\", \"device\"],\n description: \"The discriminator of the requester.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the requester.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the requester.\",\n },\n },\n },\n assignedTo: {\n type: [\"object\", \"null\"],\n default: null,\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the assigned to.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n description: \"The discriminator of the assigned to.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the assigned to.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the assigned to.\",\n },\n },\n },\n notify: {\n type: \"array\",\n description:\n \"A list of entities to notify when this ticket is created or resolved.\",\n default: [],\n items: {\n type: \"object\",\n required: [\"id\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the entity to notify.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\"],\n },\n },\n },\n },\n collaborators: {\n type: \"array\",\n default: [],\n description: \"A list of entities who will collaborate on this ticket.\",\n items: {\n type: \"object\",\n required: [\"id\", \"name\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n },\n },\n },\n },\n location: {\n type: \"object\",\n required: [\"discriminator\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"space\", \"property\", \"customText\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n status: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n default: \"open\",\n },\n priority: {\n type: \"string\",\n enum: [\"low\", \"normal\", \"high\", \"critical\"],\n default: \"normal\",\n },\n priorityRank: {\n type: \"integer\",\n minimum: 1,\n maximum: 4,\n description:\n \"Server-derived numeric rank of priority (low=1, normal=2, high=3, critical=4). Denormalized to support priority sorting; never set by clients.\",\n },\n reopenCount: {\n type: \"integer\",\n minimum: 0,\n default: 0,\n description:\n \"Server-derived count of transitions back to \\\"open\\\" that followed a solve/close. reopenCount > 0 answers \\\"was this ticket ever reopened?\\\" in O(1); maintained at the repository layer across every status-write path. Never set by clients.\",\n },\n tags: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n },\n rating: {\n type: \"number\",\n minimum: 0,\n maximum: 5,\n },\n ratingComment: {\n type: \"string\",\n },\n scheduleDate: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n solvedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n lastMessageAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"Server-derived timestamp of the latest conversation message; initialized to createdAt when no message exists. Denormalized to support recency sorting; never set by clients.\",\n },\n closedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type TicketSchema = FromSchema<\n typeof ticketSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAIA,MAAa,eAAe;CAC1B,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;CACb,MAAM;CACN,UAAU;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,YAAY;GACV,MAAM;GACN,aAAa;EACf;EACA,MAAM;GACJ,MAAM;GACN,MAAM,CAAC,QAAQ;GACf,SAAS;EACX;EACA,QAAQ;GACN,MAAM;GACN,aAAa;EACf;EACA,SAAS;GACP,MAAM;GACN,aAAa;EACf;EACA,oBAAoB;GAClB,MAAM;GACN,aAAa;EACf;EACA,cAAc;GACZ,MAAM;GACN,SAAS,CAAC;GACV,aAAa;GACb,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU;KAAC;KAAM;KAAiB;KAAa;KAAQ;IAAQ;IAC/D,YAAY;KACV,IAAI;MACF,MAAM;MACN,aAAa;KACf;KACA,eAAe;MACb,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;MACA,SAAS;MACT,aAAa;KACf;KACA,YAAY;MACV,MAAM;MACN,aAAa;MACb,SAAS;KACX;KACA,QAAQ;MACN,MAAM;MACN,sBAAsB;MACtB,UAAU;OAAC;OAAM;OAAiB;MAAM;MACxC,YAAY;OACV,IAAI;QACF,MAAM;QACN,aAAa;OACf;OACA,eAAe;QACb,MAAM;QACN,MAAM;SAAC;SAAQ;SAAU;QAAQ;QACjC,aAAa;OACf;OACA,MAAM;QACJ,MAAM;QACN,aAAa;OACf;MACF;KACF;KACA,WAAW;MACT,MAAM;MACN,aAAa;KACf;KACA,MAAM;MACJ,MAAM;MACN,aAAa;KACf;KACA,YAAY;MACV,MAAM;MACN,sBAAsB;MACtB,aACE;MACF,YAAY;OACV,MAAM;QACJ,MAAM;QACN,aAAa;OACf;OACA,UAAU;QACR,MAAM;QACN,SAAS,CAAC;QACV,OAAO;SACL,MAAM;SACN,sBAAsB;SACtB,UAAU;UACR;UACA;UACA;UACA;UACA;SACF;SACA,YAAY;UACV,IAAI;WACF,MAAM;WACN,aAAa;UACf;UACA,eAAe;WACb,MAAM;WACN,MAAM;YAAC;YAAQ;YAAU;WAAQ;WACjC,aACE;UACJ;UACA,OAAO;WACL,MAAM;WACN,aAAa;UACf;UACA,QAAQ;WACN,MAAM;WACN,aAAa;UACf;UACA,cAAc;WACZ,MAAM;WACN,aAAa;UACf;SACF;QACF;OACF;MACF;KACF;KACA,eAAe;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ACV,OAAO,EACL,MAAM,SACR;EACF;EACA,QAAQ;GACN,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,eAAe,EACb,MAAM,SACR;EACA,cAAc,EACZ,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,qCACR;EACA,eAAe;GACb,MAAM;GACN,aACE;EACJ;EACA,UAAU,EACR,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"ticket.js","names":[],"sources":["../../.generated/schemas/ticket.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\n// Rich-text node vocabulary for parsedBody.content (ADR 0012). Deliberately\n// fixed-depth rather than recursive: json-schema-to-ts cannot derive types\n// from self-referencing schemas, so nested lists are excluded. These consts\n// must not be exported — the model generator treats the first export ending\n// in \"Schema\" as the entity schema.\nconst richTextTextNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"text\"],\n properties: {\n type: { type: \"string\", enum: [\"text\"] },\n text: { type: \"string\" },\n marks: {\n type: \"array\",\n uniqueItems: true,\n items: { type: \"string\", enum: [\"bold\", \"italic\", \"underline\"] },\n },\n },\n} as const;\n\nconst richTextMentionNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"id\", \"discriminator\", \"label\"],\n properties: {\n type: { type: \"string\", enum: [\"mention\"] },\n id: { type: \"string\" },\n discriminator: { type: \"string\", enum: [\"user\", \"vendor\", \"system\"] },\n label: {\n type: \"string\",\n description: \"Display name of the mentioned entity, without the leading @.\",\n },\n },\n} as const;\n\nconst richTextHardBreakNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\"],\n properties: {\n type: { type: \"string\", enum: [\"hardBreak\"] },\n },\n} as const;\n\nconst richTextInlineNodes = {\n type: \"array\",\n minItems: 1,\n items: {\n anyOf: [richTextTextNode, richTextMentionNode, richTextHardBreakNode],\n },\n} as const;\n\nconst richTextParagraphNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"paragraph\"] },\n content: richTextInlineNodes,\n },\n} as const;\n\nconst richTextListItemNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"listItem\"] },\n content: richTextInlineNodes,\n },\n} as const;\n\nconst richTextBulletListNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"bulletList\"] },\n content: { type: \"array\", minItems: 1, items: richTextListItemNode },\n },\n} as const;\n\nconst richTextOrderedListNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"orderedList\"] },\n content: { type: \"array\", minItems: 1, items: richTextListItemNode },\n },\n} as const;\n\nexport const ticketSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"ticket.json\",\n title: \"Ticket\",\n description: \"A ticket is a request from a user.\",\n type: \"object\",\n required: [\n \"id\",\n \"conversation\",\n \"requester\",\n \"openedBy\",\n \"assignedTo\",\n \"status\",\n \"priority\",\n \"tags\",\n \"createdAt\",\n \"updatedAt\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description: \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n enum: [\"ticket\"],\n default: \"ticket\",\n },\n number: {\n type: \"string\",\n description: \"The number of the ticket.\",\n },\n issueId: {\n type: \"string\",\n description: \"The ID of the issue that this ticket is associated with.\",\n },\n parentAutomationId: {\n type: \"string\",\n description: \"The ID of the automation that created this ticket.\",\n },\n conversation: {\n type: \"array\",\n default: [],\n description: \"The conversation history of the ticket.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"timestamp\", \"body\", \"author\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\n \"message\",\n \"opened\",\n \"assigned\",\n \"rated\",\n \"scheduled\",\n \"collaboratorAdded\",\n \"collaboratorRemoved\",\n \"statusChanged\",\n \"priorityChanged\",\n \"scheduleDateChanged\",\n \"locationChanged\",\n \"nudged\",\n ],\n default: \"message\",\n description: \"The discriminator of the message.\",\n },\n isInternal: {\n type: \"boolean\",\n description: \"Whether the message is internal to the assignedTo and collaborators. Internal messages are not visible to the requester.\",\n default: false,\n },\n author: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the author of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description: \"The discriminator of the author of the message.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the author of the message.\",\n },\n },\n },\n timestamp: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"The ISO 8601 timestamp of the message.\",\n },\n body: {\n type: \"string\",\n description: \"The body of the message.\",\n },\n parsedBody: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"An object containing the parsed body of the message for mentions.\",\n properties: {\n content: {\n type: \"array\",\n minItems: 1,\n description:\n \"Rich-text block nodes (ADR 0012). Present = rich message: `body` is the server-derived plain-text projection of this tree, and the legacy text/mentions fields are not written.\",\n items: {\n anyOf: [\n richTextParagraphNode,\n richTextBulletListNode,\n richTextOrderedListNode,\n ],\n },\n },\n text: {\n type: \"string\",\n description: \"The mention text (legacy tokenized format).\",\n },\n mentions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\n \"discriminator\",\n \"id\",\n \"index\",\n \"length\",\n \"originalText\",\n ],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the mention.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description:\n \"The discriminator of entity that was mentioned.\",\n },\n index: {\n type: \"integer\",\n description: \"The index of the mention in the message.\",\n },\n length: {\n type: \"integer\",\n description: \"The length of the mention in the message.\",\n },\n originalText: {\n type: \"string\",\n description: \"The original text of the mention.\",\n },\n },\n },\n },\n },\n },\n statusChanged: {\n type: \"object\",\n additionalProperties: false,\n required: [\"from\", \"to\"],\n description:\n \"Structured status transition for `statusChanged` entries. Lets consumers detect reopens (from solved/closed to open) without parsing the body text.\",\n properties: {\n from: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned from.\",\n },\n to: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned to.\",\n },\n },\n },\n readBy: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n description: \"The IDs of the users who have read the message.\",\n },\n media: {\n anyOf: [{ $ref: \"mediaFile.json\" }, { type: \"null\" }],\n description: \"The media file associated with the message.\",\n },\n attachments: {\n type: \"array\",\n items: { $ref: \"mediaFile.json\" },\n description:\n \"Files attached to the message. Supersedes the singular media.\",\n },\n },\n },\n },\n subject: {\n type: \"string\",\n description: \"The subject of the ticket.\",\n },\n openedBy: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"system\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n requester: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the requester.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\", \"device\"],\n description: \"The discriminator of the requester.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the requester.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the requester.\",\n },\n },\n },\n assignedTo: {\n type: [\"object\", \"null\"],\n default: null,\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the assigned to.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n description: \"The discriminator of the assigned to.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the assigned to.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the assigned to.\",\n },\n },\n },\n notify: {\n type: \"array\",\n description:\n \"A list of entities to notify when this ticket is created or resolved.\",\n default: [],\n items: {\n type: \"object\",\n required: [\"id\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the entity to notify.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\"],\n },\n },\n },\n },\n collaborators: {\n type: \"array\",\n default: [],\n description: \"A list of entities who will collaborate on this ticket.\",\n items: {\n type: \"object\",\n required: [\"id\", \"name\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n },\n },\n },\n },\n location: {\n type: \"object\",\n required: [\"discriminator\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"space\", \"property\", \"customText\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n status: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n default: \"open\",\n },\n priority: {\n type: \"string\",\n enum: [\"low\", \"normal\", \"high\", \"critical\"],\n default: \"normal\",\n },\n priorityRank: {\n type: \"integer\",\n minimum: 1,\n maximum: 4,\n description:\n \"Server-derived numeric rank of priority (low=1, normal=2, high=3, critical=4). Denormalized to support priority sorting; never set by clients.\",\n },\n reopenCount: {\n type: \"integer\",\n minimum: 0,\n default: 0,\n description:\n \"Server-derived count of transitions back to \\\"open\\\" that followed a solve/close. reopenCount > 0 answers \\\"was this ticket ever reopened?\\\" in O(1); maintained at the repository layer across every status-write path. Never set by clients.\",\n },\n tags: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n },\n rating: {\n type: \"number\",\n minimum: 0,\n maximum: 5,\n },\n ratingComment: {\n type: \"string\",\n },\n scheduleDate: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n solvedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n lastMessageAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"Server-derived timestamp of the latest conversation message; initialized to createdAt when no message exists. Denormalized to support recency sorting; never set by clients.\",\n },\n closedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type TicketSchema = FromSchema<\n typeof ticketSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAgDA,MAAM,sBAAsB;CAC1B,MAAM;CACN,UAAU;CACV,OAAO,EACL,OAAO;EAAC;GA1CV,MAAM;GACN,sBAAsB;GACtB,UAAU,CAAC,QAAQ,MAAM;GACzB,YAAY;IACV,MAAM;KAAE,MAAM;KAAU,MAAM,CAAC,MAAM;IAAE;IACvC,MAAM,EAAE,MAAM,SAAS;IACvB,OAAO;KACL,MAAM;KACN,aAAa;KACb,OAAO;MAAE,MAAM;MAAU,MAAM;OAAC;OAAQ;OAAU;MAAW;KAAE;IACjE;GACF;EA+ByB;EAAG;GA3B5B,MAAM;GACN,sBAAsB;GACtB,UAAU;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AM;MAAC;MAAS;MAAY;KAAY;IAC1C;IACA,MAAM,EACJ,MAAM,SACR;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,MAAM;IAAC;IAAQ;IAAW;IAAU;GAAQ;GAC5C,SAAS;EACX;EACA,UAAU;GACR,MAAM;GACN,MAAM;IAAC;IAAO;IAAU;IAAQ;GAAU;GAC1C,SAAS;EACX;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,SAAS;GACT,aACE;EACJ;EACA,aAAa;GACX,MAAM;GACN,SAAS;GACT,SAAS;GACT,aACE;EACJ;EACA,MAAM;GACJ,MAAM;GACN,SAAS,CAAC;GACV,OAAO,EACL,MAAM,SACR;EACF;EACA,QAAQ;GACN,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,eAAe,EACb,MAAM,SACR;EACA,cAAc,EACZ,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,qCACR;EACA,eAAe;GACb,MAAM;GACN,aACE;EACJ;EACA,UAAU,EACR,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
|
package/dist/useCases/index.d.ts
CHANGED
|
@@ -90,9 +90,7 @@ export { UpdatePropertyCommand } from "./updateProperty.js";
|
|
|
90
90
|
export { DescribePropertyCommand } from "./describeProperty.js";
|
|
91
91
|
export { UpdatePropertyFeaturesCommand } from "./updatePropertyFeatures.js";
|
|
92
92
|
export { EmailUserAccountSetupCommand } from "./emailUserAccountSetup.js";
|
|
93
|
-
export { CreateImageUploadEndpointCommand } from "./createImageUploadEndpoint.js";
|
|
94
93
|
export { DeleteMediaFileCommand } from "./deleteMediaFile.js";
|
|
95
|
-
export { UploadImageCommand } from "./uploadImage.js";
|
|
96
94
|
export { DescribeTimeSheetStatsCommand } from "./describeTimeSheetStats.js";
|
|
97
95
|
export { ListMyTimeSheetsCommand } from "./listMyTimeSheets.js";
|
|
98
96
|
export { DescribeTimeSheetCommand } from "./describeTimeSheet.js";
|
package/dist/useCases/index.js
CHANGED
|
@@ -91,9 +91,7 @@ import { UpdatePropertyCommand } from "./updateProperty.js";
|
|
|
91
91
|
import { DescribePropertyCommand } from "./describeProperty.js";
|
|
92
92
|
import { UpdatePropertyFeaturesCommand } from "./updatePropertyFeatures.js";
|
|
93
93
|
import { EmailUserAccountSetupCommand } from "./emailUserAccountSetup.js";
|
|
94
|
-
import { CreateImageUploadEndpointCommand } from "./createImageUploadEndpoint.js";
|
|
95
94
|
import { DeleteMediaFileCommand } from "./deleteMediaFile.js";
|
|
96
|
-
import { UploadImageCommand } from "./uploadImage.js";
|
|
97
95
|
import { DescribeTimeSheetStatsCommand } from "./describeTimeSheetStats.js";
|
|
98
96
|
import { ListMyTimeSheetsCommand } from "./listMyTimeSheets.js";
|
|
99
97
|
import { DescribeTimeSheetCommand } from "./describeTimeSheet.js";
|
|
@@ -164,7 +162,6 @@ var useCases_exports = /* @__PURE__ */ __exportAll({
|
|
|
164
162
|
CreateDiscoveredDeviceAssociationCommand: () => CreateDiscoveredDeviceAssociationCommand,
|
|
165
163
|
CreateDiscoveredDeviceAssociationMapCommand: () => CreateDiscoveredDeviceAssociationMapCommand,
|
|
166
164
|
CreateDiscoveredDeviceCommand: () => CreateDiscoveredDeviceCommand,
|
|
167
|
-
CreateImageUploadEndpointCommand: () => CreateImageUploadEndpointCommand,
|
|
168
165
|
CreateIssueCommand: () => CreateIssueCommand,
|
|
169
166
|
CreateOrganizationCommand: () => CreateOrganizationCommand,
|
|
170
167
|
CreatePolicyCommand: () => CreatePolicyCommand,
|
|
@@ -296,11 +293,10 @@ var useCases_exports = /* @__PURE__ */ __exportAll({
|
|
|
296
293
|
UpdateTimeSheetTimeEntryCommand: () => UpdateTimeSheetTimeEntryCommand,
|
|
297
294
|
UpdateUserCommand: () => UpdateUserCommand,
|
|
298
295
|
UpdateVendorCommand: () => UpdateVendorCommand,
|
|
299
|
-
UploadImageCommand: () => UploadImageCommand,
|
|
300
296
|
UpsertDiscoveredDeviceCommand: () => UpsertDiscoveredDeviceCommand,
|
|
301
297
|
ValidateAuthCommand: () => ValidateAuthCommand
|
|
302
298
|
});
|
|
303
299
|
//#endregion
|
|
304
|
-
export { AutoAssociateDiscoveredDevicesCommand, BulkUpdateIssueCommand, CheckVerificationCodeCommand, CopyIssueRoutingCommand, CreateApiKeyCommand, CreateAutomationCommand, CreateCategoryCommand, CreateDefaultAutomationsCommand, CreateDepartmentCommand, CreateDeviceCommand, CreateDeviceCredentialCommand, CreateDiscoveredDeviceAssociationCommand, CreateDiscoveredDeviceAssociationMapCommand, CreateDiscoveredDeviceCommand,
|
|
300
|
+
export { AutoAssociateDiscoveredDevicesCommand, BulkUpdateIssueCommand, CheckVerificationCodeCommand, CopyIssueRoutingCommand, CreateApiKeyCommand, CreateAutomationCommand, CreateCategoryCommand, CreateDefaultAutomationsCommand, CreateDepartmentCommand, CreateDeviceCommand, CreateDeviceCredentialCommand, CreateDiscoveredDeviceAssociationCommand, CreateDiscoveredDeviceAssociationMapCommand, CreateDiscoveredDeviceCommand, CreateIssueCommand, CreateOrganizationCommand, CreatePolicyCommand, CreatePropertyCommand, CreatePwaHandoffTokenCommand, CreateServerCommand, CreateSpaceCommand, CreateSystemCommand, CreateTicketCommand, CreateTicketMessageCommand, CreateTimeSheetCommand, CreateTimeSheetTimeEntryCommand, CreateUserCommand, CreateVendorCommand, DeleteAutomationCommand, DeleteCategoryCommand, DeleteDepartmentCommand, DeleteDeviceCommand, DeleteDeviceCredentialCommand, DeleteDiscoveredDeviceCommand, DeleteIssueCommand, DeleteMediaFileCommand, DeleteOrganizationCommand, DeletePolicyCommand, DeletePropertyCommand, DeleteServerCommand, DeleteSessionCommand, DeleteSpaceCommand, DeleteSystemCommand, DeleteTicketCommand, DeleteTimeSheetCommand, DeleteTimeSheetTimeEntryCommand, DeleteUserCommand, DeleteUserCredentialCommand, DeleteVendorCommand, DescribeAutomationCommand, DescribeCategoryCommand, DescribeDepartmentCommand, DescribeDeviceCommand, DescribeDeviceConfigCommand, DescribeDiscoveredDeviceCommand, DescribeIssueCommand, DescribeMyAuthCommand, DescribeMyOrganizationCommand, DescribeMyPasskeyRegistrationsCommand, DescribeOrgNotificationDefaultsCommand, DescribeOrganizationCommand, DescribePolicyCommand, DescribePropertyCommand, DescribePushVapidPublicKeyCommand, DescribeSOSCommand, DescribeSelfCommand, DescribeServerCommand, DescribeSessionCommand, DescribeSpaceCommand, DescribeSystemCommand, DescribeTicketCommand, DescribeTicketFiltersCommand, DescribeTicketStatsCommand, DescribeTimeSheetCommand, DescribeTimeSheetStatsCommand, DescribeUserCommand, DescribeVendorCommand, EmailUserAccountSetupCommand, GetApiKeyCommand, LeaveTicketCommand, ListAutomationsCommand, ListCameraStreamPreviewsCommand, ListCategoriesCommand, ListDepartmentsCommand, ListDeviceCredentialsCommand, ListDevicesCommand, ListDiscoveredDevicesCommand, ListIntegrationsCommand, ListIssuesCommand, ListMyOrganizationsCommand, ListMyPropertiesCommand, ListMyPushSubscriptionsCommand, ListMyTimeSheetsCommand, ListOrganizationsCommand, ListPoliciesCommand, ListPropertiesCommand, ListPropertyCredentialsCommand, ListServersCommand, ListSessionsCommand, ListSpacesCommand, ListSystemsCommand, ListTicketLocationsCommand, ListTicketsCommand, ListTimeSheetsCommand, ListUserSpacesCommand, ListUsersCommand, ListVendorsCommand, LogoutUserCommand, MergeIssueCommand, MoveDeviceCommand, RevokeApiKeyCommand, RotateApiKeyCommand, RunAutomationCommand, SelectOrganizationCommand, SendNotificationCommand, SendVerificationCodeCommand, SetDeviceCommand, SetDevicesCommand, StartSOSCommand, StopSOSCommand, SubscribePushDeviceCommand, UnsubscribePushDeviceCommand, UpdateAutomationCommand, UpdateCategoryCommand, UpdateDepartmentCommand, UpdateDeviceCommand, UpdateDeviceCredentialCommand, UpdateDiscoveredDeviceCommand, UpdateIssueCommand, UpdateMessageReadStatusCommand, UpdateOrgNotificationDefaultsCommand, UpdateOrganizationCommand, UpdateOrganizationFeaturesCommand, UpdatePolicyCommand, UpdatePropertyCommand, UpdatePropertyFeaturesCommand, UpdateSelfCommand, UpdateServerCommand, UpdateSpaceCommand, UpdateSystemCommand, UpdateTicketCommand, UpdateTimeSheetCommand, UpdateTimeSheetTimeEntryCommand, UpdateUserCommand, UpdateVendorCommand, UpsertDiscoveredDeviceCommand, ValidateAuthCommand, useCases_exports };
|
|
305
301
|
|
|
306
302
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../.generated/useCases/index.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport { CreatePwaHandoffTokenCommand } from \"./createPwaHandoffToken.js\";\nexport { LogoutUserCommand } from \"./logoutUser.js\";\nexport { DescribeMyAuthCommand } from \"./describeMyAuth.js\";\nexport { ValidateAuthCommand } from \"./validateAuth.js\";\nexport { SelectOrganizationCommand } from \"./selectOrganization.js\";\nexport { ListMyOrganizationsCommand } from \"./listMyOrganizations.js\";\nexport { DescribeSelfCommand } from \"./describeSelf.js\";\nexport { DescribeUserCommand } from \"./describeUser.js\";\nexport { CreateUserCommand } from \"./createUser.js\";\nexport { ListUsersCommand } from \"./listUsers.js\";\nexport { UpdateSelfCommand } from \"./updateSelf.js\";\nexport { UpdateUserCommand } from \"./updateUser.js\";\nexport { DeleteUserCommand } from \"./deleteUser.js\";\nexport { CreateApiKeyCommand } from \"./createApiKey.js\";\nexport { GetApiKeyCommand } from \"./getApiKey.js\";\nexport { RotateApiKeyCommand } from \"./rotateApiKey.js\";\nexport { RevokeApiKeyCommand } from \"./revokeApiKey.js\";\nexport { SendVerificationCodeCommand } from \"./sendVerificationCode.js\";\nexport { CheckVerificationCodeCommand } from \"./checkVerificationCode.js\";\nexport { ListUserSpacesCommand } from \"./listUserSpaces.js\";\nexport { DescribeMyPasskeyRegistrationsCommand } from \"./describeMyPasskeyRegistrations.js\";\nexport { DeleteUserCredentialCommand } from \"./deleteUserCredential.js\";\nexport { CreatePolicyCommand } from \"./createPolicy.js\";\nexport { ListPoliciesCommand } from \"./listPolicies.js\";\nexport { UpdatePolicyCommand } from \"./updatePolicy.js\";\nexport { DeletePolicyCommand } from \"./deletePolicy.js\";\nexport { DescribePolicyCommand } from \"./describePolicy.js\";\nexport { ListSpacesCommand } from \"./listSpaces.js\";\nexport { UpdateSpaceCommand } from \"./updateSpace.js\";\nexport { CreateSpaceCommand } from \"./createSpace.js\";\nexport { DescribeSpaceCommand } from \"./describeSpace.js\";\nexport { DeleteSpaceCommand } from \"./deleteSpace.js\";\nexport { CreateDeviceCommand } from \"./createDevice.js\";\nexport { CreateDeviceCredentialCommand } from \"./createDeviceCredential.js\";\nexport { ListDevicesCommand } from \"./listDevices.js\";\nexport { ListDeviceCredentialsCommand } from \"./listDeviceCredentials.js\";\nexport { ListCameraStreamPreviewsCommand } from \"./listCameraStreamPreviews.js\";\nexport { DescribeDeviceCommand } from \"./describeDevice.js\";\nexport { UpdateDeviceCommand } from \"./updateDevice.js\";\nexport { UpdateDeviceCredentialCommand } from \"./updateDeviceCredential.js\";\nexport { SetDeviceCommand } from \"./setDevice.js\";\nexport { DeleteDeviceCommand } from \"./deleteDevice.js\";\nexport { DeleteDeviceCredentialCommand } from \"./deleteDeviceCredential.js\";\nexport { MoveDeviceCommand } from \"./moveDevice.js\";\nexport { DescribeDeviceConfigCommand } from \"./describeDeviceConfig.js\";\nexport { CreateCategoryCommand } from \"./createCategory.js\";\nexport { DeleteCategoryCommand } from \"./deleteCategory.js\";\nexport { DescribeCategoryCommand } from \"./describeCategory.js\";\nexport { ListCategoriesCommand } from \"./listCategories.js\";\nexport { UpdateCategoryCommand } from \"./updateCategory.js\";\nexport { DescribeDepartmentCommand } from \"./describeDepartment.js\";\nexport { ListDepartmentsCommand } from \"./listDepartments.js\";\nexport { DeleteDepartmentCommand } from \"./deleteDepartment.js\";\nexport { CreateDepartmentCommand } from \"./createDepartment.js\";\nexport { UpdateDepartmentCommand } from \"./updateDepartment.js\";\nexport { DescribeTicketStatsCommand } from \"./describeTicketStats.js\";\nexport { CreateTicketCommand } from \"./createTicket.js\";\nexport { CreateTicketMessageCommand } from \"./createTicketMessage.js\";\nexport { DeleteTicketCommand } from \"./deleteTicket.js\";\nexport { ListTicketLocationsCommand } from \"./listTicketLocations.js\";\nexport { DescribeTicketFiltersCommand } from \"./describeTicketFilters.js\";\nexport { DescribeTicketCommand } from \"./describeTicket.js\";\nexport { ListTicketsCommand } from \"./listTickets.js\";\nexport { UpdateMessageReadStatusCommand } from \"./updateMessageReadStatus.js\";\nexport { UpdateTicketCommand } from \"./updateTicket.js\";\nexport { LeaveTicketCommand } from \"./leaveTicket.js\";\nexport { CreateDiscoveredDeviceAssociationMapCommand } from \"./createDiscoveredDeviceAssociationMap.js\";\nexport { AutoAssociateDiscoveredDevicesCommand } from \"./autoAssociateDiscoveredDevices.js\";\nexport { CreateDiscoveredDeviceCommand } from \"./createDiscoveredDevice.js\";\nexport { ListDiscoveredDevicesCommand } from \"./listDiscoveredDevices.js\";\nexport { UpdateDiscoveredDeviceCommand } from \"./updateDiscoveredDevice.js\";\nexport { DeleteDiscoveredDeviceCommand } from \"./deleteDiscoveredDevice.js\";\nexport { DescribeDiscoveredDeviceCommand } from \"./describeDiscoveredDevice.js\";\nexport { UpsertDiscoveredDeviceCommand } from \"./upsertDiscoveredDevice.js\";\nexport { CreateDiscoveredDeviceAssociationCommand } from \"./createDiscoveredDeviceAssociation.js\";\nexport { ListIntegrationsCommand } from \"./listIntegrations.js\";\nexport { DescribeMyOrganizationCommand } from \"./describeMyOrganization.js\";\nexport { CreateOrganizationCommand } from \"./createOrganization.js\";\nexport { UpdateOrganizationCommand } from \"./updateOrganization.js\";\nexport { UpdateOrganizationFeaturesCommand } from \"./updateOrganizationFeatures.js\";\nexport { DeleteOrganizationCommand } from \"./deleteOrganization.js\";\nexport { DescribeOrganizationCommand } from \"./describeOrganization.js\";\nexport { ListOrganizationsCommand } from \"./listOrganizations.js\";\nexport { ListPropertiesCommand } from \"./listProperties.js\";\nexport { ListPropertyCredentialsCommand } from \"./listPropertyCredentials.js\";\nexport { ListMyPropertiesCommand } from \"./listMyProperties.js\";\nexport { CreatePropertyCommand } from \"./createProperty.js\";\nexport { DeletePropertyCommand } from \"./deleteProperty.js\";\nexport { UpdatePropertyCommand } from \"./updateProperty.js\";\nexport { DescribePropertyCommand } from \"./describeProperty.js\";\nexport { UpdatePropertyFeaturesCommand } from \"./updatePropertyFeatures.js\";\nexport { EmailUserAccountSetupCommand } from \"./emailUserAccountSetup.js\";\nexport { CreateImageUploadEndpointCommand } from \"./createImageUploadEndpoint.js\";\nexport { DeleteMediaFileCommand } from \"./deleteMediaFile.js\";\nexport { UploadImageCommand } from \"./uploadImage.js\";\nexport { DescribeTimeSheetStatsCommand } from \"./describeTimeSheetStats.js\";\nexport { ListMyTimeSheetsCommand } from \"./listMyTimeSheets.js\";\nexport { DescribeTimeSheetCommand } from \"./describeTimeSheet.js\";\nexport { ListTimeSheetsCommand } from \"./listTimeSheets.js\";\nexport { CreateTimeSheetCommand } from \"./createTimeSheet.js\";\nexport { DeleteTimeSheetCommand } from \"./deleteTimeSheet.js\";\nexport { UpdateTimeSheetCommand } from \"./updateTimeSheet.js\";\nexport { CreateTimeSheetTimeEntryCommand } from \"./createTimeSheetTimeEntry.js\";\nexport { DeleteTimeSheetTimeEntryCommand } from \"./deleteTimeSheetTimeEntry.js\";\nexport { UpdateTimeSheetTimeEntryCommand } from \"./updateTimeSheetTimeEntry.js\";\nexport { StartSOSCommand } from \"./startSOS.js\";\nexport { StopSOSCommand } from \"./stopSOS.js\";\nexport { DescribeSOSCommand } from \"./describeSOS.js\";\nexport { DescribeIssueCommand } from \"./describeIssue.js\";\nexport { ListIssuesCommand } from \"./listIssues.js\";\nexport { DeleteIssueCommand } from \"./deleteIssue.js\";\nexport { CreateIssueCommand } from \"./createIssue.js\";\nexport { UpdateIssueCommand } from \"./updateIssue.js\";\nexport { MergeIssueCommand } from \"./mergeIssue.js\";\nexport { CopyIssueRoutingCommand } from \"./copyIssueRouting.js\";\nexport { BulkUpdateIssueCommand } from \"./bulkUpdateIssue.js\";\nexport { DescribeVendorCommand } from \"./describeVendor.js\";\nexport { ListVendorsCommand } from \"./listVendors.js\";\nexport { DeleteVendorCommand } from \"./deleteVendor.js\";\nexport { CreateVendorCommand } from \"./createVendor.js\";\nexport { UpdateVendorCommand } from \"./updateVendor.js\";\nexport { CreateAutomationCommand } from \"./createAutomation.js\";\nexport { ListAutomationsCommand } from \"./listAutomations.js\";\nexport { DescribeAutomationCommand } from \"./describeAutomation.js\";\nexport { UpdateAutomationCommand } from \"./updateAutomation.js\";\nexport { DeleteAutomationCommand } from \"./deleteAutomation.js\";\nexport { CreateDefaultAutomationsCommand } from \"./createDefaultAutomations.js\";\nexport { RunAutomationCommand } from \"./runAutomation.js\";\nexport { SendNotificationCommand } from \"./sendNotification.js\";\nexport { DescribeOrgNotificationDefaultsCommand } from \"./describeOrgNotificationDefaults.js\";\nexport { UpdateOrgNotificationDefaultsCommand } from \"./updateOrgNotificationDefaults.js\";\nexport { ListMyPushSubscriptionsCommand } from \"./listMyPushSubscriptions.js\";\nexport { DescribePushVapidPublicKeyCommand } from \"./describePushVapidPublicKey.js\";\nexport { SubscribePushDeviceCommand } from \"./subscribePushDevice.js\";\nexport { UnsubscribePushDeviceCommand } from \"./unsubscribePushDevice.js\";\nexport { ListSessionsCommand } from \"./listSessions.js\";\nexport { DescribeSessionCommand } from \"./describeSession.js\";\nexport { DeleteSessionCommand } from \"./deleteSession.js\";\nexport { SetDevicesCommand } from \"./setDevices.js\";\nexport { CreateSystemCommand } from \"./createSystem.js\";\nexport { DeleteSystemCommand } from \"./deleteSystem.js\";\nexport { DescribeSystemCommand } from \"./describeSystem.js\";\nexport { ListSystemsCommand } from \"./listSystems.js\";\nexport { UpdateSystemCommand } from \"./updateSystem.js\";\nexport { CreateServerCommand } from \"./createServer.js\";\nexport { DeleteServerCommand } from \"./deleteServer.js\";\nexport { DescribeServerCommand } from \"./describeServer.js\";\nexport { ListServersCommand } from \"./listServers.js\";\nexport { UpdateServerCommand } from \"./updateServer.js\";\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../.generated/useCases/index.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport { CreatePwaHandoffTokenCommand } from \"./createPwaHandoffToken.js\";\nexport { LogoutUserCommand } from \"./logoutUser.js\";\nexport { DescribeMyAuthCommand } from \"./describeMyAuth.js\";\nexport { ValidateAuthCommand } from \"./validateAuth.js\";\nexport { SelectOrganizationCommand } from \"./selectOrganization.js\";\nexport { ListMyOrganizationsCommand } from \"./listMyOrganizations.js\";\nexport { DescribeSelfCommand } from \"./describeSelf.js\";\nexport { DescribeUserCommand } from \"./describeUser.js\";\nexport { CreateUserCommand } from \"./createUser.js\";\nexport { ListUsersCommand } from \"./listUsers.js\";\nexport { UpdateSelfCommand } from \"./updateSelf.js\";\nexport { UpdateUserCommand } from \"./updateUser.js\";\nexport { DeleteUserCommand } from \"./deleteUser.js\";\nexport { CreateApiKeyCommand } from \"./createApiKey.js\";\nexport { GetApiKeyCommand } from \"./getApiKey.js\";\nexport { RotateApiKeyCommand } from \"./rotateApiKey.js\";\nexport { RevokeApiKeyCommand } from \"./revokeApiKey.js\";\nexport { SendVerificationCodeCommand } from \"./sendVerificationCode.js\";\nexport { CheckVerificationCodeCommand } from \"./checkVerificationCode.js\";\nexport { ListUserSpacesCommand } from \"./listUserSpaces.js\";\nexport { DescribeMyPasskeyRegistrationsCommand } from \"./describeMyPasskeyRegistrations.js\";\nexport { DeleteUserCredentialCommand } from \"./deleteUserCredential.js\";\nexport { CreatePolicyCommand } from \"./createPolicy.js\";\nexport { ListPoliciesCommand } from \"./listPolicies.js\";\nexport { UpdatePolicyCommand } from \"./updatePolicy.js\";\nexport { DeletePolicyCommand } from \"./deletePolicy.js\";\nexport { DescribePolicyCommand } from \"./describePolicy.js\";\nexport { ListSpacesCommand } from \"./listSpaces.js\";\nexport { UpdateSpaceCommand } from \"./updateSpace.js\";\nexport { CreateSpaceCommand } from \"./createSpace.js\";\nexport { DescribeSpaceCommand } from \"./describeSpace.js\";\nexport { DeleteSpaceCommand } from \"./deleteSpace.js\";\nexport { CreateDeviceCommand } from \"./createDevice.js\";\nexport { CreateDeviceCredentialCommand } from \"./createDeviceCredential.js\";\nexport { ListDevicesCommand } from \"./listDevices.js\";\nexport { ListDeviceCredentialsCommand } from \"./listDeviceCredentials.js\";\nexport { ListCameraStreamPreviewsCommand } from \"./listCameraStreamPreviews.js\";\nexport { DescribeDeviceCommand } from \"./describeDevice.js\";\nexport { UpdateDeviceCommand } from \"./updateDevice.js\";\nexport { UpdateDeviceCredentialCommand } from \"./updateDeviceCredential.js\";\nexport { SetDeviceCommand } from \"./setDevice.js\";\nexport { DeleteDeviceCommand } from \"./deleteDevice.js\";\nexport { DeleteDeviceCredentialCommand } from \"./deleteDeviceCredential.js\";\nexport { MoveDeviceCommand } from \"./moveDevice.js\";\nexport { DescribeDeviceConfigCommand } from \"./describeDeviceConfig.js\";\nexport { CreateCategoryCommand } from \"./createCategory.js\";\nexport { DeleteCategoryCommand } from \"./deleteCategory.js\";\nexport { DescribeCategoryCommand } from \"./describeCategory.js\";\nexport { ListCategoriesCommand } from \"./listCategories.js\";\nexport { UpdateCategoryCommand } from \"./updateCategory.js\";\nexport { DescribeDepartmentCommand } from \"./describeDepartment.js\";\nexport { ListDepartmentsCommand } from \"./listDepartments.js\";\nexport { DeleteDepartmentCommand } from \"./deleteDepartment.js\";\nexport { CreateDepartmentCommand } from \"./createDepartment.js\";\nexport { UpdateDepartmentCommand } from \"./updateDepartment.js\";\nexport { DescribeTicketStatsCommand } from \"./describeTicketStats.js\";\nexport { CreateTicketCommand } from \"./createTicket.js\";\nexport { CreateTicketMessageCommand } from \"./createTicketMessage.js\";\nexport { DeleteTicketCommand } from \"./deleteTicket.js\";\nexport { ListTicketLocationsCommand } from \"./listTicketLocations.js\";\nexport { DescribeTicketFiltersCommand } from \"./describeTicketFilters.js\";\nexport { DescribeTicketCommand } from \"./describeTicket.js\";\nexport { ListTicketsCommand } from \"./listTickets.js\";\nexport { UpdateMessageReadStatusCommand } from \"./updateMessageReadStatus.js\";\nexport { UpdateTicketCommand } from \"./updateTicket.js\";\nexport { LeaveTicketCommand } from \"./leaveTicket.js\";\nexport { CreateDiscoveredDeviceAssociationMapCommand } from \"./createDiscoveredDeviceAssociationMap.js\";\nexport { AutoAssociateDiscoveredDevicesCommand } from \"./autoAssociateDiscoveredDevices.js\";\nexport { CreateDiscoveredDeviceCommand } from \"./createDiscoveredDevice.js\";\nexport { ListDiscoveredDevicesCommand } from \"./listDiscoveredDevices.js\";\nexport { UpdateDiscoveredDeviceCommand } from \"./updateDiscoveredDevice.js\";\nexport { DeleteDiscoveredDeviceCommand } from \"./deleteDiscoveredDevice.js\";\nexport { DescribeDiscoveredDeviceCommand } from \"./describeDiscoveredDevice.js\";\nexport { UpsertDiscoveredDeviceCommand } from \"./upsertDiscoveredDevice.js\";\nexport { CreateDiscoveredDeviceAssociationCommand } from \"./createDiscoveredDeviceAssociation.js\";\nexport { ListIntegrationsCommand } from \"./listIntegrations.js\";\nexport { DescribeMyOrganizationCommand } from \"./describeMyOrganization.js\";\nexport { CreateOrganizationCommand } from \"./createOrganization.js\";\nexport { UpdateOrganizationCommand } from \"./updateOrganization.js\";\nexport { UpdateOrganizationFeaturesCommand } from \"./updateOrganizationFeatures.js\";\nexport { DeleteOrganizationCommand } from \"./deleteOrganization.js\";\nexport { DescribeOrganizationCommand } from \"./describeOrganization.js\";\nexport { ListOrganizationsCommand } from \"./listOrganizations.js\";\nexport { ListPropertiesCommand } from \"./listProperties.js\";\nexport { ListPropertyCredentialsCommand } from \"./listPropertyCredentials.js\";\nexport { ListMyPropertiesCommand } from \"./listMyProperties.js\";\nexport { CreatePropertyCommand } from \"./createProperty.js\";\nexport { DeletePropertyCommand } from \"./deleteProperty.js\";\nexport { UpdatePropertyCommand } from \"./updateProperty.js\";\nexport { DescribePropertyCommand } from \"./describeProperty.js\";\nexport { UpdatePropertyFeaturesCommand } from \"./updatePropertyFeatures.js\";\nexport { EmailUserAccountSetupCommand } from \"./emailUserAccountSetup.js\";\nexport { DeleteMediaFileCommand } from \"./deleteMediaFile.js\";\nexport { DescribeTimeSheetStatsCommand } from \"./describeTimeSheetStats.js\";\nexport { ListMyTimeSheetsCommand } from \"./listMyTimeSheets.js\";\nexport { DescribeTimeSheetCommand } from \"./describeTimeSheet.js\";\nexport { ListTimeSheetsCommand } from \"./listTimeSheets.js\";\nexport { CreateTimeSheetCommand } from \"./createTimeSheet.js\";\nexport { DeleteTimeSheetCommand } from \"./deleteTimeSheet.js\";\nexport { UpdateTimeSheetCommand } from \"./updateTimeSheet.js\";\nexport { CreateTimeSheetTimeEntryCommand } from \"./createTimeSheetTimeEntry.js\";\nexport { DeleteTimeSheetTimeEntryCommand } from \"./deleteTimeSheetTimeEntry.js\";\nexport { UpdateTimeSheetTimeEntryCommand } from \"./updateTimeSheetTimeEntry.js\";\nexport { StartSOSCommand } from \"./startSOS.js\";\nexport { StopSOSCommand } from \"./stopSOS.js\";\nexport { DescribeSOSCommand } from \"./describeSOS.js\";\nexport { DescribeIssueCommand } from \"./describeIssue.js\";\nexport { ListIssuesCommand } from \"./listIssues.js\";\nexport { DeleteIssueCommand } from \"./deleteIssue.js\";\nexport { CreateIssueCommand } from \"./createIssue.js\";\nexport { UpdateIssueCommand } from \"./updateIssue.js\";\nexport { MergeIssueCommand } from \"./mergeIssue.js\";\nexport { CopyIssueRoutingCommand } from \"./copyIssueRouting.js\";\nexport { BulkUpdateIssueCommand } from \"./bulkUpdateIssue.js\";\nexport { DescribeVendorCommand } from \"./describeVendor.js\";\nexport { ListVendorsCommand } from \"./listVendors.js\";\nexport { DeleteVendorCommand } from \"./deleteVendor.js\";\nexport { CreateVendorCommand } from \"./createVendor.js\";\nexport { UpdateVendorCommand } from \"./updateVendor.js\";\nexport { CreateAutomationCommand } from \"./createAutomation.js\";\nexport { ListAutomationsCommand } from \"./listAutomations.js\";\nexport { DescribeAutomationCommand } from \"./describeAutomation.js\";\nexport { UpdateAutomationCommand } from \"./updateAutomation.js\";\nexport { DeleteAutomationCommand } from \"./deleteAutomation.js\";\nexport { CreateDefaultAutomationsCommand } from \"./createDefaultAutomations.js\";\nexport { RunAutomationCommand } from \"./runAutomation.js\";\nexport { SendNotificationCommand } from \"./sendNotification.js\";\nexport { DescribeOrgNotificationDefaultsCommand } from \"./describeOrgNotificationDefaults.js\";\nexport { UpdateOrgNotificationDefaultsCommand } from \"./updateOrgNotificationDefaults.js\";\nexport { ListMyPushSubscriptionsCommand } from \"./listMyPushSubscriptions.js\";\nexport { DescribePushVapidPublicKeyCommand } from \"./describePushVapidPublicKey.js\";\nexport { SubscribePushDeviceCommand } from \"./subscribePushDevice.js\";\nexport { UnsubscribePushDeviceCommand } from \"./unsubscribePushDevice.js\";\nexport { ListSessionsCommand } from \"./listSessions.js\";\nexport { DescribeSessionCommand } from \"./describeSession.js\";\nexport { DeleteSessionCommand } from \"./deleteSession.js\";\nexport { SetDevicesCommand } from \"./setDevices.js\";\nexport { CreateSystemCommand } from \"./createSystem.js\";\nexport { DeleteSystemCommand } from \"./deleteSystem.js\";\nexport { DescribeSystemCommand } from \"./describeSystem.js\";\nexport { ListSystemsCommand } from \"./listSystems.js\";\nexport { UpdateSystemCommand } from \"./updateSystem.js\";\nexport { CreateServerCommand } from \"./createServer.js\";\nexport { DeleteServerCommand } from \"./deleteServer.js\";\nexport { DescribeServerCommand } from \"./describeServer.js\";\nexport { ListServersCommand } from \"./listServers.js\";\nexport { UpdateServerCommand } from \"./updateServer.js\";\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kohost/api-client",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.7.0",
|
|
4
4
|
"description": "API client, models, schemas, commands, and events for Kohost applications",
|
|
5
5
|
"author": "Ian Rogers",
|
|
6
6
|
"readme": "README.md",
|
|
@@ -110,17 +110,17 @@
|
|
|
110
110
|
"@eslint/js": "^10.0.1",
|
|
111
111
|
"@types/debug": "^4.1.13",
|
|
112
112
|
"@types/events": "^3.0.3",
|
|
113
|
-
"@types/node": "^22.20.
|
|
113
|
+
"@types/node": "^22.20.1",
|
|
114
114
|
"eslint": "^10.5.0",
|
|
115
115
|
"eslint-config-prettier": "^10.1.8",
|
|
116
116
|
"globals": "^17.7.0",
|
|
117
117
|
"husky": "^9.1.7",
|
|
118
118
|
"lint-staged": "^17.0.8",
|
|
119
|
-
"prettier": "^3.9.
|
|
120
|
-
"tsdown": "^0.22.
|
|
121
|
-
"tsx": "^4.23.
|
|
119
|
+
"prettier": "^3.9.5",
|
|
120
|
+
"tsdown": "^0.22.9",
|
|
121
|
+
"tsx": "^4.23.1",
|
|
122
122
|
"typescript": "^7.0.2",
|
|
123
|
-
"vitest": "^4.1.
|
|
123
|
+
"vitest": "^4.1.10"
|
|
124
124
|
},
|
|
125
125
|
"dependencies": {
|
|
126
126
|
"ajv": "^8.20.0",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface CreateImageUploadEndpointCommandConfig {
|
|
2
|
-
data?: Record<string, unknown> | null;
|
|
3
|
-
headers?: Record<string, string> | null;
|
|
4
|
-
query?: Record<string, unknown> | null;
|
|
5
|
-
}
|
|
6
|
-
export interface CreateImageUploadEndpointCommandRequestConfig {
|
|
7
|
-
method: "post";
|
|
8
|
-
url: string;
|
|
9
|
-
data: Record<string, unknown> | null;
|
|
10
|
-
params: Record<string, unknown> | null;
|
|
11
|
-
headers: Record<string, string> | null;
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
export declare class CreateImageUploadEndpointCommand {
|
|
18
|
-
url: string;
|
|
19
|
-
data: Record<string, unknown> | null;
|
|
20
|
-
query: Record<string, unknown> | null;
|
|
21
|
-
headers: Record<string, string> | null;
|
|
22
|
-
config: CreateImageUploadEndpointCommandRequestConfig;
|
|
23
|
-
static params: readonly [];
|
|
24
|
-
static url: string;
|
|
25
|
-
static method: "post";
|
|
26
|
-
constructor(commandConfig: CreateImageUploadEndpointCommandConfig, options?: Record<string, unknown>);
|
|
27
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
//#region .generated/useCases/createImageUploadEndpoint.ts
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
var CreateImageUploadEndpointCommand = class CreateImageUploadEndpointCommand {
|
|
6
|
-
url;
|
|
7
|
-
data;
|
|
8
|
-
query;
|
|
9
|
-
headers;
|
|
10
|
-
config;
|
|
11
|
-
static params = [];
|
|
12
|
-
static url = "/mediaFiles/imageUploadEndpoint";
|
|
13
|
-
static method = "post";
|
|
14
|
-
constructor(commandConfig, options = {}) {
|
|
15
|
-
const pathParams = CreateImageUploadEndpointCommand.params;
|
|
16
|
-
let { data, query, headers } = commandConfig ?? {};
|
|
17
|
-
if (typeof data === "undefined") data = null;
|
|
18
|
-
if (typeof query === "undefined") query = null;
|
|
19
|
-
if (typeof headers === "undefined") headers = null;
|
|
20
|
-
let url = CreateImageUploadEndpointCommand.url;
|
|
21
|
-
if (pathParams && data) for (const param of pathParams) {
|
|
22
|
-
const urlParam = ":" + param;
|
|
23
|
-
url = url.replace(urlParam, data[param]);
|
|
24
|
-
}
|
|
25
|
-
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
26
|
-
if (missingParams) {
|
|
27
|
-
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
28
|
-
throw new Error("Missing parameters: " + missing.join(", "));
|
|
29
|
-
}
|
|
30
|
-
this.url = url;
|
|
31
|
-
this.data = data;
|
|
32
|
-
this.query = query;
|
|
33
|
-
this.headers = headers;
|
|
34
|
-
this.config = {
|
|
35
|
-
method: CreateImageUploadEndpointCommand.method,
|
|
36
|
-
url,
|
|
37
|
-
data,
|
|
38
|
-
params: query,
|
|
39
|
-
headers,
|
|
40
|
-
...options
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
//#endregion
|
|
45
|
-
export { CreateImageUploadEndpointCommand };
|
|
46
|
-
|
|
47
|
-
//# sourceMappingURL=createImageUploadEndpoint.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createImageUploadEndpoint.js","names":[],"sources":["../../.generated/useCases/createImageUploadEndpoint.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface CreateImageUploadEndpointCommandConfig {\n data?: Record<string, unknown> | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface CreateImageUploadEndpointCommandRequestConfig {\n method: \"post\";\n url: string;\n data: Record<string, unknown> | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n * \n */\nexport class CreateImageUploadEndpointCommand {\n url: string;\n data: Record<string, unknown> | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: CreateImageUploadEndpointCommandRequestConfig;\n\n static params = [] as const;\n static url = \"/mediaFiles/imageUploadEndpoint\";\n static method = \"post\" as const;\n\n constructor(commandConfig: CreateImageUploadEndpointCommandConfig, options: Record<string, unknown> = {}) {\n const pathParams = CreateImageUploadEndpointCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = CreateImageUploadEndpointCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: CreateImageUploadEndpointCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;AAoBA,IAAa,mCAAb,MAAa,iCAAiC;CAC5C;CACA;CACA;CACA;CACA;CAEA,OAAO,SAAS,CAAC;CACjB,OAAO,MAAM;CACb,OAAO,SAAS;CAEhB,YAAY,eAAuD,UAAmC,CAAC,GAAG;EACxG,MAAM,aAAa,iCAAiC;EAEpD,IAAI,EAAE,MAAM,OAAO,YAAY,iBAAiB,CAAC;EAEjD,IAAI,OAAO,SAAS,aAAa,OAAO;EACxC,IAAI,OAAO,UAAU,aAAa,QAAQ;EAC1C,IAAI,OAAO,YAAY,aAAa,UAAU;EAG9C,IAAI,MAAc,iCAAiC;EAEnD,IAAI,cAAc,MAChB,KAAK,MAAM,SAAS,YAAY;GAC9B,MAAM,WAAW,MAAM;GACvB,MAAM,IAAI,QAAQ,UAAW,KAAgC,MAAM;EACrE;EAIF,MAAM,gBAAgB,IAAI,MAAM,gBAAgB;EAChD,IAAI,eAAe;GACjB,MAAM,UAAU,cAAc,KAAK,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;GACnE,MAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;EAC7D;EAEA,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;EAEf,KAAK,SAAS;GACZ,QAAQ,iCAAiC;GACpC;GACC;GACN,QAAQ;GACC;GACT,GAAG;EACL;CACF;AACF"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface UploadImageCommandConfig {
|
|
2
|
-
data?: Record<string, unknown> | null;
|
|
3
|
-
headers?: Record<string, string> | null;
|
|
4
|
-
query?: Record<string, unknown> | null;
|
|
5
|
-
}
|
|
6
|
-
export interface UploadImageCommandRequestConfig {
|
|
7
|
-
method: "post";
|
|
8
|
-
url: string;
|
|
9
|
-
data: Record<string, unknown> | null;
|
|
10
|
-
params: Record<string, unknown> | null;
|
|
11
|
-
headers: Record<string, string> | null;
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
export declare class UploadImageCommand {
|
|
18
|
-
url: string;
|
|
19
|
-
data: Record<string, unknown> | null;
|
|
20
|
-
query: Record<string, unknown> | null;
|
|
21
|
-
headers: Record<string, string> | null;
|
|
22
|
-
config: UploadImageCommandRequestConfig;
|
|
23
|
-
static params: readonly [];
|
|
24
|
-
static url: string;
|
|
25
|
-
static method: "post";
|
|
26
|
-
constructor(commandConfig: UploadImageCommandConfig, options?: Record<string, unknown>);
|
|
27
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
//#region .generated/useCases/uploadImage.ts
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
var UploadImageCommand = class UploadImageCommand {
|
|
6
|
-
url;
|
|
7
|
-
data;
|
|
8
|
-
query;
|
|
9
|
-
headers;
|
|
10
|
-
config;
|
|
11
|
-
static params = [];
|
|
12
|
-
static url = "/mediaFiles/uploadImage";
|
|
13
|
-
static method = "post";
|
|
14
|
-
constructor(commandConfig, options = {}) {
|
|
15
|
-
const pathParams = UploadImageCommand.params;
|
|
16
|
-
let { data, query, headers } = commandConfig ?? {};
|
|
17
|
-
if (typeof data === "undefined") data = null;
|
|
18
|
-
if (typeof query === "undefined") query = null;
|
|
19
|
-
if (typeof headers === "undefined") headers = null;
|
|
20
|
-
let url = UploadImageCommand.url;
|
|
21
|
-
if (pathParams && data) for (const param of pathParams) {
|
|
22
|
-
const urlParam = ":" + param;
|
|
23
|
-
url = url.replace(urlParam, data[param]);
|
|
24
|
-
}
|
|
25
|
-
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
26
|
-
if (missingParams) {
|
|
27
|
-
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
28
|
-
throw new Error("Missing parameters: " + missing.join(", "));
|
|
29
|
-
}
|
|
30
|
-
this.url = url;
|
|
31
|
-
this.data = data;
|
|
32
|
-
this.query = query;
|
|
33
|
-
this.headers = headers;
|
|
34
|
-
this.config = {
|
|
35
|
-
method: UploadImageCommand.method,
|
|
36
|
-
url,
|
|
37
|
-
data,
|
|
38
|
-
params: query,
|
|
39
|
-
headers,
|
|
40
|
-
...options
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
//#endregion
|
|
45
|
-
export { UploadImageCommand };
|
|
46
|
-
|
|
47
|
-
//# sourceMappingURL=uploadImage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uploadImage.js","names":[],"sources":["../../.generated/useCases/uploadImage.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface UploadImageCommandConfig {\n data?: Record<string, unknown> | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface UploadImageCommandRequestConfig {\n method: \"post\";\n url: string;\n data: Record<string, unknown> | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n * \n */\nexport class UploadImageCommand {\n url: string;\n data: Record<string, unknown> | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: UploadImageCommandRequestConfig;\n\n static params = [] as const;\n static url = \"/mediaFiles/uploadImage\";\n static method = \"post\" as const;\n\n constructor(commandConfig: UploadImageCommandConfig, options: Record<string, unknown> = {}) {\n const pathParams = UploadImageCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = UploadImageCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: UploadImageCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;AAoBA,IAAa,qBAAb,MAAa,mBAAmB;CAC9B;CACA;CACA;CACA;CACA;CAEA,OAAO,SAAS,CAAC;CACjB,OAAO,MAAM;CACb,OAAO,SAAS;CAEhB,YAAY,eAAyC,UAAmC,CAAC,GAAG;EAC1F,MAAM,aAAa,mBAAmB;EAEtC,IAAI,EAAE,MAAM,OAAO,YAAY,iBAAiB,CAAC;EAEjD,IAAI,OAAO,SAAS,aAAa,OAAO;EACxC,IAAI,OAAO,UAAU,aAAa,QAAQ;EAC1C,IAAI,OAAO,YAAY,aAAa,UAAU;EAG9C,IAAI,MAAc,mBAAmB;EAErC,IAAI,cAAc,MAChB,KAAK,MAAM,SAAS,YAAY;GAC9B,MAAM,WAAW,MAAM;GACvB,MAAM,IAAI,QAAQ,UAAW,KAAgC,MAAM;EACrE;EAIF,MAAM,gBAAgB,IAAI,MAAM,gBAAgB;EAChD,IAAI,eAAe;GACjB,MAAM,UAAU,cAAc,KAAK,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;GACnE,MAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;EAC7D;EAEA,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;EAEf,KAAK,SAAS;GACZ,QAAQ,mBAAmB;GACtB;GACC;GACN,QAAQ;GACC;GACT,GAAG;EACL;CACF;AACF"}
|