@zola_do/minio 0.2.15 → 0.2.16

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 (2) hide show
  1. package/README.md +22 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,6 +14,28 @@ MinIO object storage integration for NestJS applications.
14
14
  - **Presigned URLs** — Secure upload/download links
15
15
  - **Bucket Management** — Multiple predefined buckets
16
16
  - **Streaming** — Efficient file streaming
17
+ - **Storage contract types** — `ZolaObjectStorage` and `ZolaStoredFileRef` for swappable backends
18
+
19
+ ## Storage contract types
20
+
21
+ Use these interfaces when abstracting object storage in your domain layer (same shapes are exported from `@zola_do/seaweed`):
22
+
23
+ ```typescript
24
+ import {
25
+ ZolaObjectStorage,
26
+ ZolaStoredFileRef,
27
+ } from '@zola_do/minio';
28
+
29
+ // ZolaStoredFileRef — normalized file pointer after upload
30
+ // { bucket, key, url?, etag?, contentType?, size? }
31
+
32
+ // ZolaObjectStorage — minimal upload/read/delete surface
33
+ class MyService {
34
+ constructor(private readonly storage: ZolaObjectStorage) {}
35
+ }
36
+ ```
37
+
38
+ Implement `ZolaObjectStorage` against MinIO in this package or against Seaweed/S3 via `@zola_do/seaweed` without cross-package imports.
17
39
 
18
40
  ## Installation
19
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zola_do/minio",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "MinIO object storage for NestJS",
5
5
  "author": "zolaDO",
6
6
  "license": "ISC",