@plyaz/core 1.13.4 → 1.14.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.
@@ -14613,7 +14613,8 @@ var init_BackendFilesDomainService = __esm({
14613
14613
  const startTime = Date.now();
14614
14614
  this.logDebug("Persisting uploaded file to DB", {
14615
14615
  fileId: metadata.fileId,
14616
- filename: metadata.filename
14616
+ filename: metadata.filename,
14617
+ storagePath: metadata.path
14617
14618
  });
14618
14619
  try {
14619
14620
  const dbRow = FilesMapper.toDbRow({ metadata, variants }, userId);
@@ -14657,6 +14658,20 @@ var init_BackendFilesDomainService = __esm({
14657
14658
  // - uploadFile(params) - for POST /files/upload
14658
14659
  // - generateFile(params) - for POST /files/generate-document
14659
14660
  // ─────────────────────────────────────────────────────────────────────────
14661
+ /**
14662
+ * Get file record by storage path
14663
+ * Used to retrieve the DB record after upload (since event handler persists it)
14664
+ */
14665
+ async getByStoragePath(storagePath) {
14666
+ const result = await this.repository.findMany({
14667
+ filter: { field: "storage_path", operator: "eq", value: storagePath }
14668
+ });
14669
+ const data = result.value?.data ?? [];
14670
+ if (result.success && data.length > 0) {
14671
+ return data[0];
14672
+ }
14673
+ return void 0;
14674
+ }
14660
14675
  };
14661
14676
  backendFilesDomainService = new BackendFilesDomainService();
14662
14677
  _instance2 = null;