@settlemint/sdk-minio 2.6.1-prd8cf44b4 → 2.6.2
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/README.md +16 -16
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ The SettleMint MinIO SDK provides a simple way to interact with MinIO object sto
|
|
|
54
54
|
|
|
55
55
|
> **createPresignedUploadUrl**(`client`, `fileName`, `path`, `bucket`, `expirySeconds`): `Promise`\<`string`\>
|
|
56
56
|
|
|
57
|
-
Defined in: [sdk/minio/src/helpers/functions.ts:261](https://github.com/settlemint/sdk/blob/v2.6.
|
|
57
|
+
Defined in: [sdk/minio/src/helpers/functions.ts:261](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/functions.ts#L261)
|
|
58
58
|
|
|
59
59
|
Creates a presigned upload URL for direct browser uploads
|
|
60
60
|
|
|
@@ -111,7 +111,7 @@ await fetch(uploadUrl, {
|
|
|
111
111
|
|
|
112
112
|
> **createServerMinioClient**(`options`): `object`
|
|
113
113
|
|
|
114
|
-
Defined in: [sdk/minio/src/minio.ts:23](https://github.com/settlemint/sdk/blob/v2.6.
|
|
114
|
+
Defined in: [sdk/minio/src/minio.ts:23](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/minio.ts#L23)
|
|
115
115
|
|
|
116
116
|
Creates a MinIO client for server-side use with authentication.
|
|
117
117
|
|
|
@@ -132,7 +132,7 @@ An object containing the initialized MinIO client
|
|
|
132
132
|
|
|
133
133
|
| Name | Type | Defined in |
|
|
134
134
|
| ------ | ------ | ------ |
|
|
135
|
-
| `client` | `Client` | [sdk/minio/src/minio.ts:23](https://github.com/settlemint/sdk/blob/v2.6.
|
|
135
|
+
| `client` | `Client` | [sdk/minio/src/minio.ts:23](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/minio.ts#L23) |
|
|
136
136
|
|
|
137
137
|
##### Throws
|
|
138
138
|
|
|
@@ -157,7 +157,7 @@ client.listBuckets();
|
|
|
157
157
|
|
|
158
158
|
> **deleteFile**(`client`, `fileId`, `bucket`): `Promise`\<`boolean`\>
|
|
159
159
|
|
|
160
|
-
Defined in: [sdk/minio/src/helpers/functions.ts:214](https://github.com/settlemint/sdk/blob/v2.6.
|
|
160
|
+
Defined in: [sdk/minio/src/helpers/functions.ts:214](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/functions.ts#L214)
|
|
161
161
|
|
|
162
162
|
Deletes a file from storage
|
|
163
163
|
|
|
@@ -199,7 +199,7 @@ await deleteFile(client, "documents/report.pdf");
|
|
|
199
199
|
|
|
200
200
|
> **getFileById**(`client`, `fileId`, `bucket`): `Promise`\<[`FileMetadata`](#filemetadata)\>
|
|
201
201
|
|
|
202
|
-
Defined in: [sdk/minio/src/helpers/functions.ts:141](https://github.com/settlemint/sdk/blob/v2.6.
|
|
202
|
+
Defined in: [sdk/minio/src/helpers/functions.ts:141](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/functions.ts#L141)
|
|
203
203
|
|
|
204
204
|
Gets a single file by its object name
|
|
205
205
|
|
|
@@ -241,7 +241,7 @@ const file = await getFileByObjectName(client, "documents/report.pdf");
|
|
|
241
241
|
|
|
242
242
|
> **getFilesList**(`client`, `prefix`, `bucket`): `Promise`\<[`FileMetadata`](#filemetadata)[]\>
|
|
243
243
|
|
|
244
|
-
Defined in: [sdk/minio/src/helpers/functions.ts:62](https://github.com/settlemint/sdk/blob/v2.6.
|
|
244
|
+
Defined in: [sdk/minio/src/helpers/functions.ts:62](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/functions.ts#L62)
|
|
245
245
|
|
|
246
246
|
Gets a list of files with optional prefix filter
|
|
247
247
|
|
|
@@ -283,7 +283,7 @@ const files = await getFilesList(client, "documents/");
|
|
|
283
283
|
|
|
284
284
|
> **uploadFile**(`client`, `buffer`, `objectName`, `contentType`, `bucket`): `Promise`\<[`FileMetadata`](#filemetadata)\>
|
|
285
285
|
|
|
286
|
-
Defined in: [sdk/minio/src/helpers/functions.ts:311](https://github.com/settlemint/sdk/blob/v2.6.
|
|
286
|
+
Defined in: [sdk/minio/src/helpers/functions.ts:311](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/functions.ts#L311)
|
|
287
287
|
|
|
288
288
|
Uploads a buffer directly to storage
|
|
289
289
|
|
|
@@ -326,7 +326,7 @@ const uploadedFile = await uploadFile(client, buffer, "documents/hello.txt", "te
|
|
|
326
326
|
|
|
327
327
|
#### FileMetadata
|
|
328
328
|
|
|
329
|
-
Defined in: [sdk/minio/src/helpers/schema.ts:29](https://github.com/settlemint/sdk/blob/v2.6.
|
|
329
|
+
Defined in: [sdk/minio/src/helpers/schema.ts:29](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/schema.ts#L29)
|
|
330
330
|
|
|
331
331
|
Type representing file metadata after validation.
|
|
332
332
|
|
|
@@ -334,13 +334,13 @@ Type representing file metadata after validation.
|
|
|
334
334
|
|
|
335
335
|
| Property | Type | Description | Defined in |
|
|
336
336
|
| ------ | ------ | ------ | ------ |
|
|
337
|
-
| <a id="contenttype"></a> `contentType` | `string` | The content type of the file. | [sdk/minio/src/helpers/schema.ts:41](https://github.com/settlemint/sdk/blob/v2.6.
|
|
338
|
-
| <a id="etag"></a> `etag` | `string` | The ETag of the file. | [sdk/minio/src/helpers/schema.ts:56](https://github.com/settlemint/sdk/blob/v2.6.
|
|
339
|
-
| <a id="id"></a> `id` | `string` | The unique identifier for the file. | [sdk/minio/src/helpers/schema.ts:33](https://github.com/settlemint/sdk/blob/v2.6.
|
|
340
|
-
| <a id="name"></a> `name` | `string` | The name of the file. | [sdk/minio/src/helpers/schema.ts:37](https://github.com/settlemint/sdk/blob/v2.6.
|
|
341
|
-
| <a id="size"></a> `size` | `number` | The size of the file in bytes. | [sdk/minio/src/helpers/schema.ts:46](https://github.com/settlemint/sdk/blob/v2.6.
|
|
342
|
-
| <a id="uploadedat"></a> `uploadedAt` | `string` | The date and time the file was uploaded. | [sdk/minio/src/helpers/schema.ts:51](https://github.com/settlemint/sdk/blob/v2.6.
|
|
343
|
-
| <a id="url"></a> `url?` | `string` | The URL of the file. | [sdk/minio/src/helpers/schema.ts:61](https://github.com/settlemint/sdk/blob/v2.6.
|
|
337
|
+
| <a id="contenttype"></a> `contentType` | `string` | The content type of the file. | [sdk/minio/src/helpers/schema.ts:41](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/schema.ts#L41) |
|
|
338
|
+
| <a id="etag"></a> `etag` | `string` | The ETag of the file. | [sdk/minio/src/helpers/schema.ts:56](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/schema.ts#L56) |
|
|
339
|
+
| <a id="id"></a> `id` | `string` | The unique identifier for the file. | [sdk/minio/src/helpers/schema.ts:33](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/schema.ts#L33) |
|
|
340
|
+
| <a id="name"></a> `name` | `string` | The name of the file. | [sdk/minio/src/helpers/schema.ts:37](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/schema.ts#L37) |
|
|
341
|
+
| <a id="size"></a> `size` | `number` | The size of the file in bytes. | [sdk/minio/src/helpers/schema.ts:46](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/schema.ts#L46) |
|
|
342
|
+
| <a id="uploadedat"></a> `uploadedAt` | `string` | The date and time the file was uploaded. | [sdk/minio/src/helpers/schema.ts:51](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/schema.ts#L51) |
|
|
343
|
+
| <a id="url"></a> `url?` | `string` | The URL of the file. | [sdk/minio/src/helpers/schema.ts:61](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/schema.ts#L61) |
|
|
344
344
|
|
|
345
345
|
### Variables
|
|
346
346
|
|
|
@@ -348,7 +348,7 @@ Type representing file metadata after validation.
|
|
|
348
348
|
|
|
349
349
|
> `const` **DEFAULT\_BUCKET**: `"uploads"` = `"uploads"`
|
|
350
350
|
|
|
351
|
-
Defined in: [sdk/minio/src/helpers/schema.ts:67](https://github.com/settlemint/sdk/blob/v2.6.
|
|
351
|
+
Defined in: [sdk/minio/src/helpers/schema.ts:67](https://github.com/settlemint/sdk/blob/v2.6.2/sdk/minio/src/helpers/schema.ts#L67)
|
|
352
352
|
|
|
353
353
|
Default bucket name to use for file storage when none is specified.
|
|
354
354
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@settlemint/sdk-minio",
|
|
3
3
|
"description": "MinIO integration module for SettleMint SDK, providing S3-compatible object storage capabilities",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"license": "FSL-1.1-MIT",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@settlemint/sdk-utils": "2.6.
|
|
56
|
+
"@settlemint/sdk-utils": "2.6.2",
|
|
57
57
|
"minio": "^8",
|
|
58
58
|
"zod": "^4"
|
|
59
59
|
},
|