From 9490181687993c37c784eafad811abe64502f778 Mon Sep 17 00:00:00 2001 From: Alex Freska Date: Mon, 16 Sep 2024 14:50:15 -0400 Subject: [PATCH] feat(renterd): list objects allows fetching across buckets --- .changeset/neat-foxes-carry.md | 7 +++++++ .changeset/spotty-sheep-raise.md | 7 +++++++ libs/renterd-types/src/bus.ts | 3 ++- libs/renterd-types/src/types.ts | 1 + package-lock.json | 6 ++---- 5 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 .changeset/neat-foxes-carry.md create mode 100644 .changeset/spotty-sheep-raise.md diff --git a/.changeset/neat-foxes-carry.md b/.changeset/neat-foxes-carry.md new file mode 100644 index 000000000..33b153082 --- /dev/null +++ b/.changeset/neat-foxes-carry.md @@ -0,0 +1,7 @@ +--- +'@siafoundation/renterd-js': minor +'@siafoundation/renterd-react': minor +'@siafoundation/renterd-types': minor +--- + +The list objects API now includes a slabEncryptionKey parameter. diff --git a/.changeset/spotty-sheep-raise.md b/.changeset/spotty-sheep-raise.md new file mode 100644 index 000000000..1103cc79c --- /dev/null +++ b/.changeset/spotty-sheep-raise.md @@ -0,0 +1,7 @@ +--- +'@siafoundation/renterd-js': minor +'@siafoundation/renterd-react': minor +'@siafoundation/renterd-types': minor +--- + +The list objects API bucket parameter is now optional, and bucket is returned in in the object metadata. diff --git a/libs/renterd-types/src/bus.ts b/libs/renterd-types/src/bus.ts index e652a16c9..8441d6d7b 100644 --- a/libs/renterd-types/src/bus.ts +++ b/libs/renterd-types/src/bus.ts @@ -400,14 +400,15 @@ export type BucketDeletePayload = void export type BucketDeleteResponse = void export type ObjectListParams = { + bucket?: string prefix?: string - bucket: string delimiter?: string limit?: number marker?: string sortBy?: 'name' | 'health' | 'size' sortDir?: 'asc' | 'desc' substring?: string + slabEncryptionKey?: string } export type ObjectListPayload = void export type ObjectListResponse = { diff --git a/libs/renterd-types/src/types.ts b/libs/renterd-types/src/types.ts index b9399f3c1..d4969580c 100644 --- a/libs/renterd-types/src/types.ts +++ b/libs/renterd-types/src/types.ts @@ -108,6 +108,7 @@ export type ObjectObject = { } export type ObjectMetadata = { + bucket: string key: string size: number health: number diff --git a/package-lock.json b/package-lock.json index 8638c8710..db887a4c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -561,8 +561,7 @@ "license": "MIT", "dependencies": { "@siafoundation/renterd-types": "0.7.0", - "@siafoundation/request": "0.2.0", - "axios": "^0.27.2" + "@siafoundation/request": "0.2.0" } }, "libs/renterd-react": { @@ -33968,8 +33967,7 @@ "version": "file:libs/renterd-js", "requires": { "@siafoundation/renterd-types": "0.7.0", - "@siafoundation/request": "0.2.0", - "axios": "^0.27.2" + "@siafoundation/request": "0.2.0" } }, "@siafoundation/renterd-react": {