@puzzle-ui/media 0.0.0-stage → 0.17.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.
Files changed (55) hide show
  1. package/README.md +305 -2
  2. package/ai/instructions.md +70 -0
  3. package/ai/manifest.json +10 -0
  4. package/dist/LICENSE +21 -0
  5. package/dist/adapters-Bon320yF.js +481 -0
  6. package/dist/adapters-Bon320yF.js.map +1 -0
  7. package/dist/adapters-C4N2gqSK.d.cts +63 -0
  8. package/dist/adapters-DXycRsjJ.cjs +492 -0
  9. package/dist/adapters-DXycRsjJ.cjs.map +1 -0
  10. package/dist/adapters-DhPviL_C.d.ts +63 -0
  11. package/dist/browser/index.cjs +200 -0
  12. package/dist/browser/index.cjs.map +1 -0
  13. package/dist/browser/index.d.cts +89 -0
  14. package/dist/browser/index.d.ts +89 -0
  15. package/dist/browser/index.js +195 -0
  16. package/dist/browser/index.js.map +1 -0
  17. package/dist/image-processing-B1lRPpsg.cjs +444 -0
  18. package/dist/image-processing-B1lRPpsg.cjs.map +1 -0
  19. package/dist/image-processing-XkoQ8NT7.js +400 -0
  20. package/dist/image-processing-XkoQ8NT7.js.map +1 -0
  21. package/dist/image-worker.cjs +36 -0
  22. package/dist/image-worker.cjs.map +1 -0
  23. package/dist/image-worker.d.cts +1 -0
  24. package/dist/image-worker.d.ts +1 -0
  25. package/dist/image-worker.js +37 -0
  26. package/dist/image-worker.js.map +1 -0
  27. package/dist/index-8Seqy-LJ.d.ts +297 -0
  28. package/dist/index-BP0ikbAS.d.cts +297 -0
  29. package/dist/index.cjs +38 -0
  30. package/dist/index.d.cts +4 -0
  31. package/dist/index.d.ts +4 -0
  32. package/dist/index.js +3 -0
  33. package/dist/media-validation-By6karZu.cjs +361 -0
  34. package/dist/media-validation-By6karZu.cjs.map +1 -0
  35. package/dist/media-validation-OyjGVUq3.js +230 -0
  36. package/dist/media-validation-OyjGVUq3.js.map +1 -0
  37. package/dist/media.types-dzfu0Nep.d.cts +127 -0
  38. package/dist/media.types-dzfu0Nep.d.ts +127 -0
  39. package/dist/processing.types-CPaSB88L.d.ts +238 -0
  40. package/dist/processing.types-Dd2XT8Qr.d.cts +238 -0
  41. package/dist/src-8d6s1iWH.js +1286 -0
  42. package/dist/src-8d6s1iWH.js.map +1 -0
  43. package/dist/src-C7WU7ovP.cjs +1363 -0
  44. package/dist/src-C7WU7ovP.cjs.map +1 -0
  45. package/dist/testing/adapters.cjs +4 -0
  46. package/dist/testing/adapters.d.cts +2 -0
  47. package/dist/testing/adapters.d.ts +2 -0
  48. package/dist/testing/adapters.js +1 -0
  49. package/dist/testing/index.cjs +264 -0
  50. package/dist/testing/index.cjs.map +1 -0
  51. package/dist/testing/index.d.cts +14 -0
  52. package/dist/testing/index.d.ts +14 -0
  53. package/dist/testing/index.js +260 -0
  54. package/dist/testing/index.js.map +1 -0
  55. package/package.json +84 -4
@@ -0,0 +1,297 @@
1
+ import { a as MediaAssetUsage, c as MediaFileMetadata, d as MediaHotspot, f as MediaKind, i as MediaAssetStatus, l as MediaFocalPoint, o as MediaChecksum, p as MediaObjectReference, r as MediaAsset, s as MediaCrop, u as MediaFolder } from "./media.types-dzfu0Nep.js";
2
+ import { C as MediaObjectStorageAdapter, f as MediaProcessingServiceOptions, g as MediaVideoRenditionProfile, r as MediaProcessingJob, t as MediaImageProfile } from "./processing.types-CPaSB88L.js";
3
+ import { StorageAdapter, StorageRecord } from "@puzzle-ui/storage";
4
+ type MediaErrorCode = "INVALID_FILE" | "QUOTA_EXCEEDED" | "UNSUPPORTED_MEDIA" | "UPLOAD_EXPIRED" | "CHECKSUM_MISMATCH" | "PROCESSING_FAILED" | "PERMISSION_DENIED" | "ASSET_CONFLICT" | "NOT_FOUND" | "VALIDATION" | "CAPABILITY" | "OBJECT_STORAGE" | "UNKNOWN";
5
+ type MediaErrorOptions = {
6
+ readonly cause?: unknown;
7
+ readonly details?: Readonly<Record<string, unknown>>;
8
+ };
9
+ declare class MediaError extends Error {
10
+ readonly code: MediaErrorCode;
11
+ override readonly cause?: unknown;
12
+ readonly details?: Readonly<Record<string, unknown>>;
13
+ constructor(code: MediaErrorCode, message: string, options?: MediaErrorOptions);
14
+ }
15
+ declare class InvalidMediaFileError extends MediaError {
16
+ constructor(message: string, options?: MediaErrorOptions);
17
+ }
18
+ declare class MediaQuotaExceededError extends MediaError {
19
+ constructor(message?: string);
20
+ }
21
+ declare class UnsupportedMediaError extends MediaError {
22
+ constructor(message: string, options?: MediaErrorOptions);
23
+ }
24
+ declare class MediaUploadExpiredError extends MediaError {
25
+ constructor(message?: string);
26
+ }
27
+ declare class MediaChecksumMismatchError extends MediaError {
28
+ constructor(message?: string);
29
+ }
30
+ declare class MediaProcessingError extends MediaError {
31
+ readonly retryable: boolean;
32
+ constructor(message: string, options?: MediaErrorOptions & {
33
+ readonly retryable?: boolean;
34
+ });
35
+ }
36
+ declare class MediaPermissionDeniedError extends MediaError {
37
+ constructor(message?: string);
38
+ }
39
+ declare class MediaAssetConflictError extends MediaError {
40
+ constructor(message: string, options?: MediaErrorOptions);
41
+ }
42
+ declare class MediaNotFoundError extends MediaError {
43
+ constructor(resource?: string);
44
+ }
45
+ declare class MediaValidationError extends MediaError {
46
+ constructor(message: string, details?: Readonly<Record<string, unknown>>);
47
+ }
48
+ declare class MediaCapabilityError extends MediaError {
49
+ readonly capability: string;
50
+ constructor(capability: string);
51
+ }
52
+ declare class MediaObjectStorageError extends MediaError {
53
+ constructor(message: string, options?: MediaErrorOptions);
54
+ }
55
+ declare const normalizeMediaChecksum: (input: unknown) => MediaChecksum;
56
+ declare const normalizeMediaObjectReference: (input: unknown) => MediaObjectReference;
57
+ declare const normalizeMediaCrop: (input: unknown) => MediaCrop;
58
+ declare const normalizeMediaFocalPoint: (input: unknown) => MediaFocalPoint;
59
+ declare const normalizeMediaHotspots: (input: unknown) => readonly MediaHotspot[];
60
+ declare const normalizeMediaTags: (input: unknown) => readonly string[];
61
+ declare const validateMediaFileMetadata: (input: unknown) => MediaFileMetadata;
62
+ declare const validateMediaImageProfiles: (profiles: readonly MediaImageProfile[]) => readonly MediaImageProfile[];
63
+ declare const validateMediaVideoProfiles: (profiles: readonly MediaVideoRenditionProfile[]) => readonly MediaVideoRenditionProfile[];
64
+ type MediaServiceRuntime = {
65
+ readonly idFactory?: () => string;
66
+ readonly now?: () => Date;
67
+ };
68
+ type MediaAssetCreateInput = {
69
+ readonly tenantId: string;
70
+ readonly folderId?: string | null;
71
+ readonly originalName: string;
72
+ readonly displayName?: string;
73
+ readonly metadata: MediaFileMetadata;
74
+ readonly object: MediaObjectReference;
75
+ readonly altText?: string | null;
76
+ readonly caption?: string | null;
77
+ readonly title?: string | null;
78
+ readonly description?: string | null;
79
+ readonly tags?: readonly string[];
80
+ readonly crop?: MediaCrop | null;
81
+ readonly focalPoint?: MediaFocalPoint | null;
82
+ readonly hotspots?: readonly MediaHotspot[];
83
+ readonly actorId?: string | null;
84
+ };
85
+ type MediaAssetMetadataUpdate = {
86
+ readonly tenantId: string;
87
+ readonly assetId: string;
88
+ readonly expectedRevision: number;
89
+ readonly actorId?: string | null;
90
+ readonly folderId?: string | null;
91
+ readonly displayName?: string;
92
+ readonly altText?: string | null;
93
+ readonly caption?: string | null;
94
+ readonly title?: string | null;
95
+ readonly description?: string | null;
96
+ readonly tags?: readonly string[];
97
+ readonly crop?: MediaCrop | null;
98
+ readonly focalPoint?: MediaFocalPoint | null;
99
+ readonly hotspots?: readonly MediaHotspot[];
100
+ };
101
+ type MediaAssetListInput = {
102
+ readonly tenantId: string;
103
+ readonly folderId?: string | null;
104
+ readonly kind?: MediaKind;
105
+ readonly status?: MediaAssetStatus;
106
+ readonly first?: number;
107
+ readonly after?: string;
108
+ readonly orderBy?: "createdAt" | "updatedAt" | "displayName" | "size";
109
+ readonly direction?: "asc" | "desc";
110
+ readonly tagsAny?: readonly string[];
111
+ readonly tagsAll?: readonly string[];
112
+ readonly checksum?: MediaChecksum;
113
+ };
114
+ type MediaAssetPage = {
115
+ readonly items: readonly MediaAsset[];
116
+ readonly nextCursor: string | null;
117
+ };
118
+ type MediaUsageInput = {
119
+ readonly tenantId: string;
120
+ readonly assetId: string;
121
+ readonly resourceType: string;
122
+ readonly resourceId: string;
123
+ readonly fieldKey?: string;
124
+ readonly actorId?: string | null;
125
+ };
126
+ type MediaAssetService = {
127
+ readonly ready: Promise<void>;
128
+ create(input: MediaAssetCreateInput): Promise<MediaAsset>;
129
+ get(tenantId: string, assetId: string, options?: {
130
+ readonly includeDeleted?: boolean;
131
+ }): Promise<MediaAsset>;
132
+ list(input: MediaAssetListInput): Promise<MediaAssetPage>;
133
+ update(input: MediaAssetMetadataUpdate): Promise<MediaAsset>;
134
+ softDelete(input: {
135
+ readonly tenantId: string;
136
+ readonly assetId: string;
137
+ readonly expectedRevision: number;
138
+ readonly actorId?: string | null;
139
+ }): Promise<MediaAsset>;
140
+ restore(input: {
141
+ readonly tenantId: string;
142
+ readonly assetId: string;
143
+ readonly expectedRevision: number;
144
+ readonly actorId?: string | null;
145
+ }): Promise<MediaAsset>;
146
+ permanentlyDelete(input: {
147
+ readonly tenantId: string;
148
+ readonly assetId: string;
149
+ readonly expectedRevision: number;
150
+ }): Promise<MediaPermanentDeleteResult>;
151
+ registerUsage(input: MediaUsageInput): Promise<MediaAssetUsage>;
152
+ removeUsage(input: Omit<MediaUsageInput, "actorId">): Promise<number>;
153
+ listUsage(tenantId: string, assetId: string): Promise<readonly MediaAssetUsage[]>;
154
+ };
155
+ type MediaPermanentDeleteResult = {
156
+ readonly deleted: true;
157
+ readonly objectDeletionFailures: readonly {
158
+ readonly key: string;
159
+ readonly error: string;
160
+ }[];
161
+ };
162
+ type MediaAssetServiceOptions = {
163
+ readonly storage: StorageAdapter;
164
+ readonly objectStorage: MediaObjectStorageAdapter;
165
+ } & MediaServiceRuntime;
166
+ declare const createMediaAssetService: (options: MediaAssetServiceOptions) => MediaAssetService;
167
+ type MediaObjectCleanupResult = {
168
+ readonly examined: number;
169
+ readonly deleted: number;
170
+ readonly failures: readonly {
171
+ readonly key: string;
172
+ readonly error: string;
173
+ }[];
174
+ readonly complete: boolean;
175
+ };
176
+ declare const cleanupOrphanedMediaObjects: (options: {
177
+ readonly storage: StorageAdapter;
178
+ readonly objectStorage: MediaObjectStorageAdapter;
179
+ readonly olderThan: Date;
180
+ readonly maxObjects?: number;
181
+ }) => Promise<MediaObjectCleanupResult>;
182
+ type ExpiredUploadCleanupResult = {
183
+ readonly examined: number;
184
+ readonly aborted: number;
185
+ readonly failures: readonly {
186
+ readonly sessionId: string;
187
+ readonly error: string;
188
+ }[];
189
+ };
190
+ declare const cleanupExpiredMediaUploads: (options: {
191
+ readonly objectStorage: MediaObjectStorageAdapter;
192
+ readonly before: Date;
193
+ readonly first?: number;
194
+ }) => Promise<ExpiredUploadCleanupResult>;
195
+ type MediaFolderCreateInput = {
196
+ readonly tenantId: string;
197
+ readonly parentId?: string | null;
198
+ readonly name: string;
199
+ readonly actorId?: string | null;
200
+ };
201
+ type MediaFolderPageInput = {
202
+ readonly tenantId: string;
203
+ readonly parentId?: string | null;
204
+ readonly first?: number;
205
+ readonly after?: string;
206
+ };
207
+ type MediaFolderPage = {
208
+ readonly items: readonly MediaFolder[];
209
+ readonly nextCursor: string | null;
210
+ };
211
+ type MediaFolderMutationInput = {
212
+ readonly tenantId: string;
213
+ readonly folderId: string;
214
+ readonly expectedRevision: number;
215
+ readonly actorId?: string | null;
216
+ };
217
+ type MediaFolderService = {
218
+ readonly ready: Promise<void>;
219
+ create(input: MediaFolderCreateInput): Promise<MediaFolder>;
220
+ get(tenantId: string, folderId: string): Promise<MediaFolder>;
221
+ list(input: MediaFolderPageInput): Promise<MediaFolderPage>;
222
+ rename(input: MediaFolderMutationInput & {
223
+ readonly name: string;
224
+ }): Promise<MediaFolder>;
225
+ move(input: MediaFolderMutationInput & {
226
+ readonly parentId: string | null;
227
+ }): Promise<MediaFolder>;
228
+ delete(input: MediaFolderMutationInput): Promise<MediaFolder>;
229
+ restore(input: MediaFolderMutationInput): Promise<MediaFolder>;
230
+ permanentlyDelete(input: MediaFolderMutationInput): Promise<boolean>;
231
+ };
232
+ type MediaFolderServiceOptions = {
233
+ readonly storage: StorageAdapter;
234
+ } & MediaServiceRuntime;
235
+ declare const createMediaFolderService: (options: MediaFolderServiceOptions) => MediaFolderService;
236
+ declare const MEDIA_AUDIT_EVENTS_COLLECTION = "media_audit_events";
237
+ type MediaAuditEventInput = {
238
+ readonly tenantId: string;
239
+ readonly actorId: string | null;
240
+ readonly resource: "upload" | "asset" | "folder";
241
+ readonly resourceId?: string;
242
+ readonly relatedAssetId?: string;
243
+ readonly action: string;
244
+ readonly timestamp: Date;
245
+ readonly result: "success" | "denied" | "failure";
246
+ };
247
+ type MediaAuditRecord = StorageRecord & MediaAuditEventInput;
248
+ type MediaAuditServiceOptions = {
249
+ readonly storage: StorageAdapter;
250
+ readonly authorize: (input: {
251
+ readonly tenantId: string;
252
+ readonly actorId: string;
253
+ readonly action: "audit:read" | "audit:write";
254
+ }) => boolean | Promise<boolean>;
255
+ } & MediaServiceRuntime;
256
+ type MediaAuditListInput = {
257
+ readonly tenantId: string;
258
+ readonly actorId: string;
259
+ readonly resource?: MediaAuditEventInput["resource"];
260
+ readonly resourceId?: string;
261
+ readonly result?: MediaAuditEventInput["result"];
262
+ readonly first?: number;
263
+ readonly after?: string;
264
+ };
265
+ type MediaAuditService = {
266
+ readonly ready: Promise<void>;
267
+ record(input: {
268
+ readonly event: MediaAuditEventInput;
269
+ readonly actorId: string;
270
+ }): Promise<MediaAuditRecord>;
271
+ list(input: MediaAuditListInput): Promise<{
272
+ readonly items: readonly MediaAuditRecord[];
273
+ readonly nextCursor: string | null;
274
+ }>;
275
+ };
276
+ declare const createMediaAuditService: (options: MediaAuditServiceOptions) => MediaAuditService;
277
+ type EnqueueMediaProcessingInput = {
278
+ readonly tenantId: string;
279
+ readonly assetId: string;
280
+ readonly kind: "image" | "video";
281
+ readonly profiles: readonly (MediaImageProfile | MediaVideoRenditionProfile)[];
282
+ readonly idempotencyKey: string;
283
+ readonly maxAttempts?: number;
284
+ readonly availableAt?: Date;
285
+ };
286
+ type MediaProcessingService = {
287
+ readonly ready: Promise<void>;
288
+ enqueue(input: EnqueueMediaProcessingInput): Promise<MediaProcessingJob>;
289
+ runNext(workerId: string): Promise<MediaProcessingJob | null>;
290
+ cancel(jobId: string): Promise<MediaProcessingJob | null>;
291
+ };
292
+ declare const createMediaProcessingService: (options: MediaProcessingServiceOptions) => MediaProcessingService;
293
+ declare const MEDIA_ASSETS_COLLECTION = "media_assets";
294
+ declare const MEDIA_FOLDERS_COLLECTION = "media_folders";
295
+ declare const MEDIA_ASSET_USAGES_COLLECTION = "media_asset_usages";
296
+ declare const registerMediaCollections: (storage: StorageAdapter) => Promise<void>;
297
+ export { MediaPermissionDeniedError as $, MediaPermanentDeleteResult as A, normalizeMediaTags as B, MediaAssetCreateInput as C, MediaAssetService as D, MediaAssetPage as E, normalizeMediaChecksum as F, MediaAssetConflictError as G, validateMediaImageProfiles as H, normalizeMediaCrop as I, MediaError as J, MediaCapabilityError as K, normalizeMediaFocalPoint as L, cleanupExpiredMediaUploads as M, cleanupOrphanedMediaObjects as N, MediaAssetServiceOptions as O, createMediaAssetService as P, MediaObjectStorageError as Q, normalizeMediaHotspots as R, ExpiredUploadCleanupResult as S, MediaAssetMetadataUpdate as T, validateMediaVideoProfiles as U, validateMediaFileMetadata as V, InvalidMediaFileError as W, MediaErrorOptions as X, MediaErrorCode as Y, MediaNotFoundError as Z, MediaFolderPage as _, EnqueueMediaProcessingInput as a, MediaFolderServiceOptions as b, MEDIA_AUDIT_EVENTS_COLLECTION as c, MediaAuditRecord as d, MediaProcessingError as et, MediaAuditService as f, MediaFolderMutationInput as g, MediaFolderCreateInput as h, registerMediaCollections as i, UnsupportedMediaError as it, MediaUsageInput as j, MediaObjectCleanupResult as k, MediaAuditEventInput as l, createMediaAuditService as m, MEDIA_ASSET_USAGES_COLLECTION as n, MediaUploadExpiredError as nt, MediaProcessingService as o, MediaAuditServiceOptions as p, MediaChecksumMismatchError as q, MEDIA_FOLDERS_COLLECTION as r, MediaValidationError as rt, createMediaProcessingService as s, MEDIA_ASSETS_COLLECTION as t, MediaQuotaExceededError as tt, MediaAuditListInput as u, MediaFolderPageInput as v, MediaAssetListInput as w, createMediaFolderService as x, MediaFolderService as y, normalizeMediaObjectReference as z };
@@ -0,0 +1,297 @@
1
+ import { a as MediaAssetUsage, c as MediaFileMetadata, d as MediaHotspot, f as MediaKind, i as MediaAssetStatus, l as MediaFocalPoint, o as MediaChecksum, p as MediaObjectReference, r as MediaAsset, s as MediaCrop, u as MediaFolder } from "./media.types-dzfu0Nep.cjs";
2
+ import { C as MediaObjectStorageAdapter, f as MediaProcessingServiceOptions, g as MediaVideoRenditionProfile, r as MediaProcessingJob, t as MediaImageProfile } from "./processing.types-Dd2XT8Qr.cjs";
3
+ import { StorageAdapter, StorageRecord } from "@puzzle-ui/storage";
4
+ type MediaErrorCode = "INVALID_FILE" | "QUOTA_EXCEEDED" | "UNSUPPORTED_MEDIA" | "UPLOAD_EXPIRED" | "CHECKSUM_MISMATCH" | "PROCESSING_FAILED" | "PERMISSION_DENIED" | "ASSET_CONFLICT" | "NOT_FOUND" | "VALIDATION" | "CAPABILITY" | "OBJECT_STORAGE" | "UNKNOWN";
5
+ type MediaErrorOptions = {
6
+ readonly cause?: unknown;
7
+ readonly details?: Readonly<Record<string, unknown>>;
8
+ };
9
+ declare class MediaError extends Error {
10
+ readonly code: MediaErrorCode;
11
+ override readonly cause?: unknown;
12
+ readonly details?: Readonly<Record<string, unknown>>;
13
+ constructor(code: MediaErrorCode, message: string, options?: MediaErrorOptions);
14
+ }
15
+ declare class InvalidMediaFileError extends MediaError {
16
+ constructor(message: string, options?: MediaErrorOptions);
17
+ }
18
+ declare class MediaQuotaExceededError extends MediaError {
19
+ constructor(message?: string);
20
+ }
21
+ declare class UnsupportedMediaError extends MediaError {
22
+ constructor(message: string, options?: MediaErrorOptions);
23
+ }
24
+ declare class MediaUploadExpiredError extends MediaError {
25
+ constructor(message?: string);
26
+ }
27
+ declare class MediaChecksumMismatchError extends MediaError {
28
+ constructor(message?: string);
29
+ }
30
+ declare class MediaProcessingError extends MediaError {
31
+ readonly retryable: boolean;
32
+ constructor(message: string, options?: MediaErrorOptions & {
33
+ readonly retryable?: boolean;
34
+ });
35
+ }
36
+ declare class MediaPermissionDeniedError extends MediaError {
37
+ constructor(message?: string);
38
+ }
39
+ declare class MediaAssetConflictError extends MediaError {
40
+ constructor(message: string, options?: MediaErrorOptions);
41
+ }
42
+ declare class MediaNotFoundError extends MediaError {
43
+ constructor(resource?: string);
44
+ }
45
+ declare class MediaValidationError extends MediaError {
46
+ constructor(message: string, details?: Readonly<Record<string, unknown>>);
47
+ }
48
+ declare class MediaCapabilityError extends MediaError {
49
+ readonly capability: string;
50
+ constructor(capability: string);
51
+ }
52
+ declare class MediaObjectStorageError extends MediaError {
53
+ constructor(message: string, options?: MediaErrorOptions);
54
+ }
55
+ declare const normalizeMediaChecksum: (input: unknown) => MediaChecksum;
56
+ declare const normalizeMediaObjectReference: (input: unknown) => MediaObjectReference;
57
+ declare const normalizeMediaCrop: (input: unknown) => MediaCrop;
58
+ declare const normalizeMediaFocalPoint: (input: unknown) => MediaFocalPoint;
59
+ declare const normalizeMediaHotspots: (input: unknown) => readonly MediaHotspot[];
60
+ declare const normalizeMediaTags: (input: unknown) => readonly string[];
61
+ declare const validateMediaFileMetadata: (input: unknown) => MediaFileMetadata;
62
+ declare const validateMediaImageProfiles: (profiles: readonly MediaImageProfile[]) => readonly MediaImageProfile[];
63
+ declare const validateMediaVideoProfiles: (profiles: readonly MediaVideoRenditionProfile[]) => readonly MediaVideoRenditionProfile[];
64
+ type MediaServiceRuntime = {
65
+ readonly idFactory?: () => string;
66
+ readonly now?: () => Date;
67
+ };
68
+ type MediaAssetCreateInput = {
69
+ readonly tenantId: string;
70
+ readonly folderId?: string | null;
71
+ readonly originalName: string;
72
+ readonly displayName?: string;
73
+ readonly metadata: MediaFileMetadata;
74
+ readonly object: MediaObjectReference;
75
+ readonly altText?: string | null;
76
+ readonly caption?: string | null;
77
+ readonly title?: string | null;
78
+ readonly description?: string | null;
79
+ readonly tags?: readonly string[];
80
+ readonly crop?: MediaCrop | null;
81
+ readonly focalPoint?: MediaFocalPoint | null;
82
+ readonly hotspots?: readonly MediaHotspot[];
83
+ readonly actorId?: string | null;
84
+ };
85
+ type MediaAssetMetadataUpdate = {
86
+ readonly tenantId: string;
87
+ readonly assetId: string;
88
+ readonly expectedRevision: number;
89
+ readonly actorId?: string | null;
90
+ readonly folderId?: string | null;
91
+ readonly displayName?: string;
92
+ readonly altText?: string | null;
93
+ readonly caption?: string | null;
94
+ readonly title?: string | null;
95
+ readonly description?: string | null;
96
+ readonly tags?: readonly string[];
97
+ readonly crop?: MediaCrop | null;
98
+ readonly focalPoint?: MediaFocalPoint | null;
99
+ readonly hotspots?: readonly MediaHotspot[];
100
+ };
101
+ type MediaAssetListInput = {
102
+ readonly tenantId: string;
103
+ readonly folderId?: string | null;
104
+ readonly kind?: MediaKind;
105
+ readonly status?: MediaAssetStatus;
106
+ readonly first?: number;
107
+ readonly after?: string;
108
+ readonly orderBy?: "createdAt" | "updatedAt" | "displayName" | "size";
109
+ readonly direction?: "asc" | "desc";
110
+ readonly tagsAny?: readonly string[];
111
+ readonly tagsAll?: readonly string[];
112
+ readonly checksum?: MediaChecksum;
113
+ };
114
+ type MediaAssetPage = {
115
+ readonly items: readonly MediaAsset[];
116
+ readonly nextCursor: string | null;
117
+ };
118
+ type MediaUsageInput = {
119
+ readonly tenantId: string;
120
+ readonly assetId: string;
121
+ readonly resourceType: string;
122
+ readonly resourceId: string;
123
+ readonly fieldKey?: string;
124
+ readonly actorId?: string | null;
125
+ };
126
+ type MediaAssetService = {
127
+ readonly ready: Promise<void>;
128
+ create(input: MediaAssetCreateInput): Promise<MediaAsset>;
129
+ get(tenantId: string, assetId: string, options?: {
130
+ readonly includeDeleted?: boolean;
131
+ }): Promise<MediaAsset>;
132
+ list(input: MediaAssetListInput): Promise<MediaAssetPage>;
133
+ update(input: MediaAssetMetadataUpdate): Promise<MediaAsset>;
134
+ softDelete(input: {
135
+ readonly tenantId: string;
136
+ readonly assetId: string;
137
+ readonly expectedRevision: number;
138
+ readonly actorId?: string | null;
139
+ }): Promise<MediaAsset>;
140
+ restore(input: {
141
+ readonly tenantId: string;
142
+ readonly assetId: string;
143
+ readonly expectedRevision: number;
144
+ readonly actorId?: string | null;
145
+ }): Promise<MediaAsset>;
146
+ permanentlyDelete(input: {
147
+ readonly tenantId: string;
148
+ readonly assetId: string;
149
+ readonly expectedRevision: number;
150
+ }): Promise<MediaPermanentDeleteResult>;
151
+ registerUsage(input: MediaUsageInput): Promise<MediaAssetUsage>;
152
+ removeUsage(input: Omit<MediaUsageInput, "actorId">): Promise<number>;
153
+ listUsage(tenantId: string, assetId: string): Promise<readonly MediaAssetUsage[]>;
154
+ };
155
+ type MediaPermanentDeleteResult = {
156
+ readonly deleted: true;
157
+ readonly objectDeletionFailures: readonly {
158
+ readonly key: string;
159
+ readonly error: string;
160
+ }[];
161
+ };
162
+ type MediaAssetServiceOptions = {
163
+ readonly storage: StorageAdapter;
164
+ readonly objectStorage: MediaObjectStorageAdapter;
165
+ } & MediaServiceRuntime;
166
+ declare const createMediaAssetService: (options: MediaAssetServiceOptions) => MediaAssetService;
167
+ type MediaObjectCleanupResult = {
168
+ readonly examined: number;
169
+ readonly deleted: number;
170
+ readonly failures: readonly {
171
+ readonly key: string;
172
+ readonly error: string;
173
+ }[];
174
+ readonly complete: boolean;
175
+ };
176
+ declare const cleanupOrphanedMediaObjects: (options: {
177
+ readonly storage: StorageAdapter;
178
+ readonly objectStorage: MediaObjectStorageAdapter;
179
+ readonly olderThan: Date;
180
+ readonly maxObjects?: number;
181
+ }) => Promise<MediaObjectCleanupResult>;
182
+ type ExpiredUploadCleanupResult = {
183
+ readonly examined: number;
184
+ readonly aborted: number;
185
+ readonly failures: readonly {
186
+ readonly sessionId: string;
187
+ readonly error: string;
188
+ }[];
189
+ };
190
+ declare const cleanupExpiredMediaUploads: (options: {
191
+ readonly objectStorage: MediaObjectStorageAdapter;
192
+ readonly before: Date;
193
+ readonly first?: number;
194
+ }) => Promise<ExpiredUploadCleanupResult>;
195
+ type MediaFolderCreateInput = {
196
+ readonly tenantId: string;
197
+ readonly parentId?: string | null;
198
+ readonly name: string;
199
+ readonly actorId?: string | null;
200
+ };
201
+ type MediaFolderPageInput = {
202
+ readonly tenantId: string;
203
+ readonly parentId?: string | null;
204
+ readonly first?: number;
205
+ readonly after?: string;
206
+ };
207
+ type MediaFolderPage = {
208
+ readonly items: readonly MediaFolder[];
209
+ readonly nextCursor: string | null;
210
+ };
211
+ type MediaFolderMutationInput = {
212
+ readonly tenantId: string;
213
+ readonly folderId: string;
214
+ readonly expectedRevision: number;
215
+ readonly actorId?: string | null;
216
+ };
217
+ type MediaFolderService = {
218
+ readonly ready: Promise<void>;
219
+ create(input: MediaFolderCreateInput): Promise<MediaFolder>;
220
+ get(tenantId: string, folderId: string): Promise<MediaFolder>;
221
+ list(input: MediaFolderPageInput): Promise<MediaFolderPage>;
222
+ rename(input: MediaFolderMutationInput & {
223
+ readonly name: string;
224
+ }): Promise<MediaFolder>;
225
+ move(input: MediaFolderMutationInput & {
226
+ readonly parentId: string | null;
227
+ }): Promise<MediaFolder>;
228
+ delete(input: MediaFolderMutationInput): Promise<MediaFolder>;
229
+ restore(input: MediaFolderMutationInput): Promise<MediaFolder>;
230
+ permanentlyDelete(input: MediaFolderMutationInput): Promise<boolean>;
231
+ };
232
+ type MediaFolderServiceOptions = {
233
+ readonly storage: StorageAdapter;
234
+ } & MediaServiceRuntime;
235
+ declare const createMediaFolderService: (options: MediaFolderServiceOptions) => MediaFolderService;
236
+ declare const MEDIA_AUDIT_EVENTS_COLLECTION = "media_audit_events";
237
+ type MediaAuditEventInput = {
238
+ readonly tenantId: string;
239
+ readonly actorId: string | null;
240
+ readonly resource: "upload" | "asset" | "folder";
241
+ readonly resourceId?: string;
242
+ readonly relatedAssetId?: string;
243
+ readonly action: string;
244
+ readonly timestamp: Date;
245
+ readonly result: "success" | "denied" | "failure";
246
+ };
247
+ type MediaAuditRecord = StorageRecord & MediaAuditEventInput;
248
+ type MediaAuditServiceOptions = {
249
+ readonly storage: StorageAdapter;
250
+ readonly authorize: (input: {
251
+ readonly tenantId: string;
252
+ readonly actorId: string;
253
+ readonly action: "audit:read" | "audit:write";
254
+ }) => boolean | Promise<boolean>;
255
+ } & MediaServiceRuntime;
256
+ type MediaAuditListInput = {
257
+ readonly tenantId: string;
258
+ readonly actorId: string;
259
+ readonly resource?: MediaAuditEventInput["resource"];
260
+ readonly resourceId?: string;
261
+ readonly result?: MediaAuditEventInput["result"];
262
+ readonly first?: number;
263
+ readonly after?: string;
264
+ };
265
+ type MediaAuditService = {
266
+ readonly ready: Promise<void>;
267
+ record(input: {
268
+ readonly event: MediaAuditEventInput;
269
+ readonly actorId: string;
270
+ }): Promise<MediaAuditRecord>;
271
+ list(input: MediaAuditListInput): Promise<{
272
+ readonly items: readonly MediaAuditRecord[];
273
+ readonly nextCursor: string | null;
274
+ }>;
275
+ };
276
+ declare const createMediaAuditService: (options: MediaAuditServiceOptions) => MediaAuditService;
277
+ type EnqueueMediaProcessingInput = {
278
+ readonly tenantId: string;
279
+ readonly assetId: string;
280
+ readonly kind: "image" | "video";
281
+ readonly profiles: readonly (MediaImageProfile | MediaVideoRenditionProfile)[];
282
+ readonly idempotencyKey: string;
283
+ readonly maxAttempts?: number;
284
+ readonly availableAt?: Date;
285
+ };
286
+ type MediaProcessingService = {
287
+ readonly ready: Promise<void>;
288
+ enqueue(input: EnqueueMediaProcessingInput): Promise<MediaProcessingJob>;
289
+ runNext(workerId: string): Promise<MediaProcessingJob | null>;
290
+ cancel(jobId: string): Promise<MediaProcessingJob | null>;
291
+ };
292
+ declare const createMediaProcessingService: (options: MediaProcessingServiceOptions) => MediaProcessingService;
293
+ declare const MEDIA_ASSETS_COLLECTION = "media_assets";
294
+ declare const MEDIA_FOLDERS_COLLECTION = "media_folders";
295
+ declare const MEDIA_ASSET_USAGES_COLLECTION = "media_asset_usages";
296
+ declare const registerMediaCollections: (storage: StorageAdapter) => Promise<void>;
297
+ export { MediaPermissionDeniedError as $, MediaPermanentDeleteResult as A, normalizeMediaTags as B, MediaAssetCreateInput as C, MediaAssetService as D, MediaAssetPage as E, normalizeMediaChecksum as F, MediaAssetConflictError as G, validateMediaImageProfiles as H, normalizeMediaCrop as I, MediaError as J, MediaCapabilityError as K, normalizeMediaFocalPoint as L, cleanupExpiredMediaUploads as M, cleanupOrphanedMediaObjects as N, MediaAssetServiceOptions as O, createMediaAssetService as P, MediaObjectStorageError as Q, normalizeMediaHotspots as R, ExpiredUploadCleanupResult as S, MediaAssetMetadataUpdate as T, validateMediaVideoProfiles as U, validateMediaFileMetadata as V, InvalidMediaFileError as W, MediaErrorOptions as X, MediaErrorCode as Y, MediaNotFoundError as Z, MediaFolderPage as _, EnqueueMediaProcessingInput as a, MediaFolderServiceOptions as b, MEDIA_AUDIT_EVENTS_COLLECTION as c, MediaAuditRecord as d, MediaProcessingError as et, MediaAuditService as f, MediaFolderMutationInput as g, MediaFolderCreateInput as h, registerMediaCollections as i, UnsupportedMediaError as it, MediaUsageInput as j, MediaObjectCleanupResult as k, MediaAuditEventInput as l, createMediaAuditService as m, MEDIA_ASSET_USAGES_COLLECTION as n, MediaUploadExpiredError as nt, MediaProcessingService as o, MediaAuditServiceOptions as p, MediaChecksumMismatchError as q, MEDIA_FOLDERS_COLLECTION as r, MediaValidationError as rt, createMediaProcessingService as s, MEDIA_ASSETS_COLLECTION as t, MediaQuotaExceededError as tt, MediaAuditListInput as u, MediaFolderPageInput as v, MediaAssetListInput as w, createMediaFolderService as x, MediaFolderService as y, normalizeMediaObjectReference as z };
package/dist/index.cjs ADDED
@@ -0,0 +1,38 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_media_validation = require("./media-validation-By6karZu.cjs");
3
+ const require_src = require("./src-C7WU7ovP.cjs");
4
+ exports.InvalidMediaFileError = require_media_validation.InvalidMediaFileError;
5
+ exports.MEDIA_ASSETS_COLLECTION = require_src.MEDIA_ASSETS_COLLECTION;
6
+ exports.MEDIA_ASSET_STATUSES = require_src.MEDIA_ASSET_STATUSES;
7
+ exports.MEDIA_ASSET_USAGES_COLLECTION = require_src.MEDIA_ASSET_USAGES_COLLECTION;
8
+ exports.MEDIA_AUDIT_EVENTS_COLLECTION = require_src.MEDIA_AUDIT_EVENTS_COLLECTION;
9
+ exports.MEDIA_FOLDERS_COLLECTION = require_src.MEDIA_FOLDERS_COLLECTION;
10
+ exports.MEDIA_KINDS = require_src.MEDIA_KINDS;
11
+ exports.MediaAssetConflictError = require_media_validation.MediaAssetConflictError;
12
+ exports.MediaCapabilityError = require_media_validation.MediaCapabilityError;
13
+ exports.MediaChecksumMismatchError = require_media_validation.MediaChecksumMismatchError;
14
+ exports.MediaError = require_media_validation.MediaError;
15
+ exports.MediaNotFoundError = require_media_validation.MediaNotFoundError;
16
+ exports.MediaObjectStorageError = require_media_validation.MediaObjectStorageError;
17
+ exports.MediaPermissionDeniedError = require_media_validation.MediaPermissionDeniedError;
18
+ exports.MediaProcessingError = require_media_validation.MediaProcessingError;
19
+ exports.MediaQuotaExceededError = require_media_validation.MediaQuotaExceededError;
20
+ exports.MediaUploadExpiredError = require_media_validation.MediaUploadExpiredError;
21
+ exports.MediaValidationError = require_media_validation.MediaValidationError;
22
+ exports.UnsupportedMediaError = require_media_validation.UnsupportedMediaError;
23
+ exports.cleanupExpiredMediaUploads = require_src.cleanupExpiredMediaUploads;
24
+ exports.cleanupOrphanedMediaObjects = require_src.cleanupOrphanedMediaObjects;
25
+ exports.createMediaAssetService = require_src.createMediaAssetService;
26
+ exports.createMediaAuditService = require_src.createMediaAuditService;
27
+ exports.createMediaFolderService = require_src.createMediaFolderService;
28
+ exports.createMediaProcessingService = require_src.createMediaProcessingService;
29
+ exports.normalizeMediaChecksum = require_media_validation.normalizeMediaChecksum;
30
+ exports.normalizeMediaCrop = require_media_validation.normalizeMediaCrop;
31
+ exports.normalizeMediaFocalPoint = require_media_validation.normalizeMediaFocalPoint;
32
+ exports.normalizeMediaHotspots = require_media_validation.normalizeMediaHotspots;
33
+ exports.normalizeMediaObjectReference = require_media_validation.normalizeMediaObjectReference;
34
+ exports.normalizeMediaTags = require_media_validation.normalizeMediaTags;
35
+ exports.registerMediaCollections = require_src.registerMediaCollections;
36
+ exports.validateMediaFileMetadata = require_media_validation.validateMediaFileMetadata;
37
+ exports.validateMediaImageProfiles = require_media_validation.validateMediaImageProfiles;
38
+ exports.validateMediaVideoProfiles = require_media_validation.validateMediaVideoProfiles;
@@ -0,0 +1,4 @@
1
+ import { $ as MediaPermissionDeniedError, A as MediaPermanentDeleteResult, B as normalizeMediaTags, C as MediaAssetCreateInput, D as MediaAssetService, E as MediaAssetPage, F as normalizeMediaChecksum, G as MediaAssetConflictError, H as validateMediaImageProfiles, I as normalizeMediaCrop, J as MediaError, K as MediaCapabilityError, L as normalizeMediaFocalPoint, M as cleanupExpiredMediaUploads, N as cleanupOrphanedMediaObjects, O as MediaAssetServiceOptions, P as createMediaAssetService, Q as MediaObjectStorageError, R as normalizeMediaHotspots, S as ExpiredUploadCleanupResult, T as MediaAssetMetadataUpdate, U as validateMediaVideoProfiles, V as validateMediaFileMetadata, W as InvalidMediaFileError, X as MediaErrorOptions, Y as MediaErrorCode, Z as MediaNotFoundError, _ as MediaFolderPage, a as EnqueueMediaProcessingInput, b as MediaFolderServiceOptions, c as MEDIA_AUDIT_EVENTS_COLLECTION, d as MediaAuditRecord, et as MediaProcessingError, f as MediaAuditService, g as MediaFolderMutationInput, h as MediaFolderCreateInput, i as registerMediaCollections, it as UnsupportedMediaError, j as MediaUsageInput, k as MediaObjectCleanupResult, l as MediaAuditEventInput, m as createMediaAuditService, n as MEDIA_ASSET_USAGES_COLLECTION, nt as MediaUploadExpiredError, o as MediaProcessingService, p as MediaAuditServiceOptions, q as MediaChecksumMismatchError, r as MEDIA_FOLDERS_COLLECTION, rt as MediaValidationError, s as createMediaProcessingService, t as MEDIA_ASSETS_COLLECTION, tt as MediaQuotaExceededError, u as MediaAuditListInput, v as MediaFolderPageInput, w as MediaAssetListInput, x as createMediaFolderService, y as MediaFolderService, z as normalizeMediaObjectReference } from "./index-BP0ikbAS.cjs";
2
+ import { a as MediaAssetUsage, c as MediaFileMetadata, d as MediaHotspot, f as MediaKind, h as MediaVariantStatus, i as MediaAssetStatus, l as MediaFocalPoint, m as MediaVariant, n as MEDIA_KINDS, o as MediaChecksum, p as MediaObjectReference, r as MediaAsset, s as MediaCrop, t as MEDIA_ASSET_STATUSES, u as MediaFolder } from "./media.types-dzfu0Nep.cjs";
3
+ import { A as MediaUploadState, C as MediaObjectStorageAdapter, D as MediaUploadConstraints, E as MediaStoredObject, O as MediaUploadMode, S as MediaObjectPage, T as MediaReadTarget, _ as VideoTranscoder, a as MediaProcessingJobKind, b as MediaMultipartPartTarget, c as MediaProcessingOutputVariant, d as MediaProcessingQueueClaim, f as MediaProcessingServiceOptions, g as MediaVideoRenditionProfile, h as MediaProcessorProgress, i as MediaProcessingJobInput, j as MediaUploadTarget, k as MediaUploadSession, l as MediaProcessingProfile, m as MediaProcessorInput, n as MediaProcessingFailure, o as MediaProcessingJobStatus, p as MediaProcessor, r as MediaProcessingJob, s as MediaProcessingOutput, t as MediaImageProfile, u as MediaProcessingQueueAdapter, v as VideoTranscoderInput, w as MediaObjectSummary, x as MediaObjectListInput, y as MediaMultipartCompletedPart } from "./processing.types-Dd2XT8Qr.cjs";
4
+ export { type EnqueueMediaProcessingInput, type ExpiredUploadCleanupResult, InvalidMediaFileError, MEDIA_ASSETS_COLLECTION, MEDIA_ASSET_STATUSES, MEDIA_ASSET_USAGES_COLLECTION, MEDIA_AUDIT_EVENTS_COLLECTION, MEDIA_FOLDERS_COLLECTION, MEDIA_KINDS, type MediaAsset, MediaAssetConflictError, type MediaAssetCreateInput, type MediaAssetListInput, type MediaAssetMetadataUpdate, type MediaAssetPage, type MediaAssetService, type MediaAssetServiceOptions, type MediaAssetStatus, type MediaAssetUsage, type MediaAuditEventInput, type MediaAuditListInput, type MediaAuditRecord, type MediaAuditService, type MediaAuditServiceOptions, MediaCapabilityError, type MediaChecksum, MediaChecksumMismatchError, type MediaCrop, MediaError, type MediaErrorCode, type MediaErrorOptions, type MediaFileMetadata, type MediaFocalPoint, type MediaFolder, type MediaFolderCreateInput, type MediaFolderMutationInput, type MediaFolderPage, type MediaFolderPageInput, type MediaFolderService, type MediaFolderServiceOptions, type MediaHotspot, type MediaImageProfile, type MediaKind, type MediaMultipartCompletedPart, type MediaMultipartPartTarget, MediaNotFoundError, type MediaObjectCleanupResult, type MediaObjectListInput, type MediaObjectPage, type MediaObjectReference, type MediaObjectStorageAdapter, MediaObjectStorageError, type MediaObjectSummary, type MediaPermanentDeleteResult, MediaPermissionDeniedError, MediaProcessingError, type MediaProcessingFailure, type MediaProcessingJob, type MediaProcessingJobInput, type MediaProcessingJobKind, type MediaProcessingJobStatus, type MediaProcessingOutput, type MediaProcessingOutputVariant, type MediaProcessingProfile, type MediaProcessingQueueAdapter, type MediaProcessingQueueClaim, type MediaProcessingService, type MediaProcessingServiceOptions, type MediaProcessor, type MediaProcessorInput, type MediaProcessorProgress, MediaQuotaExceededError, type MediaReadTarget, type MediaStoredObject, type MediaUploadConstraints, MediaUploadExpiredError, type MediaUploadMode, type MediaUploadSession, type MediaUploadState, type MediaUploadTarget, type MediaUsageInput, MediaValidationError, type MediaVariant, type MediaVariantStatus, type MediaVideoRenditionProfile, UnsupportedMediaError, type VideoTranscoder, type VideoTranscoderInput, cleanupExpiredMediaUploads, cleanupOrphanedMediaObjects, createMediaAssetService, createMediaAuditService, createMediaFolderService, createMediaProcessingService, normalizeMediaChecksum, normalizeMediaCrop, normalizeMediaFocalPoint, normalizeMediaHotspots, normalizeMediaObjectReference, normalizeMediaTags, registerMediaCollections, validateMediaFileMetadata, validateMediaImageProfiles, validateMediaVideoProfiles };
@@ -0,0 +1,4 @@
1
+ import { a as MediaAssetUsage, c as MediaFileMetadata, d as MediaHotspot, f as MediaKind, h as MediaVariantStatus, i as MediaAssetStatus, l as MediaFocalPoint, m as MediaVariant, n as MEDIA_KINDS, o as MediaChecksum, p as MediaObjectReference, r as MediaAsset, s as MediaCrop, t as MEDIA_ASSET_STATUSES, u as MediaFolder } from "./media.types-dzfu0Nep.js";
2
+ import { $ as MediaPermissionDeniedError, A as MediaPermanentDeleteResult, B as normalizeMediaTags, C as MediaAssetCreateInput, D as MediaAssetService, E as MediaAssetPage, F as normalizeMediaChecksum, G as MediaAssetConflictError, H as validateMediaImageProfiles, I as normalizeMediaCrop, J as MediaError, K as MediaCapabilityError, L as normalizeMediaFocalPoint, M as cleanupExpiredMediaUploads, N as cleanupOrphanedMediaObjects, O as MediaAssetServiceOptions, P as createMediaAssetService, Q as MediaObjectStorageError, R as normalizeMediaHotspots, S as ExpiredUploadCleanupResult, T as MediaAssetMetadataUpdate, U as validateMediaVideoProfiles, V as validateMediaFileMetadata, W as InvalidMediaFileError, X as MediaErrorOptions, Y as MediaErrorCode, Z as MediaNotFoundError, _ as MediaFolderPage, a as EnqueueMediaProcessingInput, b as MediaFolderServiceOptions, c as MEDIA_AUDIT_EVENTS_COLLECTION, d as MediaAuditRecord, et as MediaProcessingError, f as MediaAuditService, g as MediaFolderMutationInput, h as MediaFolderCreateInput, i as registerMediaCollections, it as UnsupportedMediaError, j as MediaUsageInput, k as MediaObjectCleanupResult, l as MediaAuditEventInput, m as createMediaAuditService, n as MEDIA_ASSET_USAGES_COLLECTION, nt as MediaUploadExpiredError, o as MediaProcessingService, p as MediaAuditServiceOptions, q as MediaChecksumMismatchError, r as MEDIA_FOLDERS_COLLECTION, rt as MediaValidationError, s as createMediaProcessingService, t as MEDIA_ASSETS_COLLECTION, tt as MediaQuotaExceededError, u as MediaAuditListInput, v as MediaFolderPageInput, w as MediaAssetListInput, x as createMediaFolderService, y as MediaFolderService, z as normalizeMediaObjectReference } from "./index-8Seqy-LJ.js";
3
+ import { A as MediaUploadState, C as MediaObjectStorageAdapter, D as MediaUploadConstraints, E as MediaStoredObject, O as MediaUploadMode, S as MediaObjectPage, T as MediaReadTarget, _ as VideoTranscoder, a as MediaProcessingJobKind, b as MediaMultipartPartTarget, c as MediaProcessingOutputVariant, d as MediaProcessingQueueClaim, f as MediaProcessingServiceOptions, g as MediaVideoRenditionProfile, h as MediaProcessorProgress, i as MediaProcessingJobInput, j as MediaUploadTarget, k as MediaUploadSession, l as MediaProcessingProfile, m as MediaProcessorInput, n as MediaProcessingFailure, o as MediaProcessingJobStatus, p as MediaProcessor, r as MediaProcessingJob, s as MediaProcessingOutput, t as MediaImageProfile, u as MediaProcessingQueueAdapter, v as VideoTranscoderInput, w as MediaObjectSummary, x as MediaObjectListInput, y as MediaMultipartCompletedPart } from "./processing.types-CPaSB88L.js";
4
+ export { type EnqueueMediaProcessingInput, type ExpiredUploadCleanupResult, InvalidMediaFileError, MEDIA_ASSETS_COLLECTION, MEDIA_ASSET_STATUSES, MEDIA_ASSET_USAGES_COLLECTION, MEDIA_AUDIT_EVENTS_COLLECTION, MEDIA_FOLDERS_COLLECTION, MEDIA_KINDS, type MediaAsset, MediaAssetConflictError, type MediaAssetCreateInput, type MediaAssetListInput, type MediaAssetMetadataUpdate, type MediaAssetPage, type MediaAssetService, type MediaAssetServiceOptions, type MediaAssetStatus, type MediaAssetUsage, type MediaAuditEventInput, type MediaAuditListInput, type MediaAuditRecord, type MediaAuditService, type MediaAuditServiceOptions, MediaCapabilityError, type MediaChecksum, MediaChecksumMismatchError, type MediaCrop, MediaError, type MediaErrorCode, type MediaErrorOptions, type MediaFileMetadata, type MediaFocalPoint, type MediaFolder, type MediaFolderCreateInput, type MediaFolderMutationInput, type MediaFolderPage, type MediaFolderPageInput, type MediaFolderService, type MediaFolderServiceOptions, type MediaHotspot, type MediaImageProfile, type MediaKind, type MediaMultipartCompletedPart, type MediaMultipartPartTarget, MediaNotFoundError, type MediaObjectCleanupResult, type MediaObjectListInput, type MediaObjectPage, type MediaObjectReference, type MediaObjectStorageAdapter, MediaObjectStorageError, type MediaObjectSummary, type MediaPermanentDeleteResult, MediaPermissionDeniedError, MediaProcessingError, type MediaProcessingFailure, type MediaProcessingJob, type MediaProcessingJobInput, type MediaProcessingJobKind, type MediaProcessingJobStatus, type MediaProcessingOutput, type MediaProcessingOutputVariant, type MediaProcessingProfile, type MediaProcessingQueueAdapter, type MediaProcessingQueueClaim, type MediaProcessingService, type MediaProcessingServiceOptions, type MediaProcessor, type MediaProcessorInput, type MediaProcessorProgress, MediaQuotaExceededError, type MediaReadTarget, type MediaStoredObject, type MediaUploadConstraints, MediaUploadExpiredError, type MediaUploadMode, type MediaUploadSession, type MediaUploadState, type MediaUploadTarget, type MediaUsageInput, MediaValidationError, type MediaVariant, type MediaVariantStatus, type MediaVideoRenditionProfile, UnsupportedMediaError, type VideoTranscoder, type VideoTranscoderInput, cleanupExpiredMediaUploads, cleanupOrphanedMediaObjects, createMediaAssetService, createMediaAuditService, createMediaFolderService, createMediaProcessingService, normalizeMediaChecksum, normalizeMediaCrop, normalizeMediaFocalPoint, normalizeMediaHotspots, normalizeMediaObjectReference, normalizeMediaTags, registerMediaCollections, validateMediaFileMetadata, validateMediaImageProfiles, validateMediaVideoProfiles };
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { S as UnsupportedMediaError, _ as MediaPermissionDeniedError, a as normalizeMediaObjectReference, b as MediaUploadExpiredError, c as validateMediaImageProfiles, d as MediaAssetConflictError, f as MediaCapabilityError, g as MediaObjectStorageError, h as MediaNotFoundError, i as normalizeMediaHotspots, l as validateMediaVideoProfiles, m as MediaError, n as normalizeMediaCrop, o as normalizeMediaTags, p as MediaChecksumMismatchError, r as normalizeMediaFocalPoint, s as validateMediaFileMetadata, t as normalizeMediaChecksum, u as InvalidMediaFileError, v as MediaProcessingError, x as MediaValidationError, y as MediaQuotaExceededError } from "./media-validation-OyjGVUq3.js";
2
+ import { a as cleanupExpiredMediaUploads, c as MEDIA_ASSETS_COLLECTION, d as registerMediaCollections, f as MEDIA_ASSET_STATUSES, i as createMediaFolderService, l as MEDIA_ASSET_USAGES_COLLECTION, n as MEDIA_AUDIT_EVENTS_COLLECTION, o as cleanupOrphanedMediaObjects, p as MEDIA_KINDS, r as createMediaAuditService, s as createMediaAssetService, t as createMediaProcessingService, u as MEDIA_FOLDERS_COLLECTION } from "./src-8d6s1iWH.js";
3
+ export { InvalidMediaFileError, MEDIA_ASSETS_COLLECTION, MEDIA_ASSET_STATUSES, MEDIA_ASSET_USAGES_COLLECTION, MEDIA_AUDIT_EVENTS_COLLECTION, MEDIA_FOLDERS_COLLECTION, MEDIA_KINDS, MediaAssetConflictError, MediaCapabilityError, MediaChecksumMismatchError, MediaError, MediaNotFoundError, MediaObjectStorageError, MediaPermissionDeniedError, MediaProcessingError, MediaQuotaExceededError, MediaUploadExpiredError, MediaValidationError, UnsupportedMediaError, cleanupExpiredMediaUploads, cleanupOrphanedMediaObjects, createMediaAssetService, createMediaAuditService, createMediaFolderService, createMediaProcessingService, normalizeMediaChecksum, normalizeMediaCrop, normalizeMediaFocalPoint, normalizeMediaHotspots, normalizeMediaObjectReference, normalizeMediaTags, registerMediaCollections, validateMediaFileMetadata, validateMediaImageProfiles, validateMediaVideoProfiles };