@scality/data-browser-library 1.0.0-preview.2 → 1.0.0-preview.5
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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This file contains hooks for managing bucket configuration settings
|
|
5
5
|
* like ACL, policies, versioning, CORS, lifecycle, etc.
|
|
6
6
|
*/
|
|
7
|
-
import { GetBucketAclCommandInput, GetBucketAclCommandOutput, PutBucketAclCommandInput, PutBucketAclCommandOutput, GetBucketPolicyCommandInput, GetBucketPolicyCommandOutput, PutBucketPolicyCommandInput, PutBucketPolicyCommandOutput, DeleteBucketPolicyCommandInput, DeleteBucketPolicyCommandOutput, GetBucketVersioningCommandInput, GetBucketVersioningCommandOutput, PutBucketVersioningCommandInput, PutBucketVersioningCommandOutput, GetBucketCorsCommandInput, GetBucketCorsCommandOutput, PutBucketCorsCommandInput, PutBucketCorsCommandOutput, DeleteBucketCorsCommandInput, DeleteBucketCorsCommandOutput, GetBucketLifecycleConfigurationCommandInput, GetBucketLifecycleConfigurationCommandOutput, PutBucketLifecycleConfigurationCommandInput, PutBucketLifecycleConfigurationCommandOutput, DeleteBucketLifecycleCommandInput, DeleteBucketLifecycleCommandOutput, GetBucketNotificationConfigurationCommandInput, GetBucketNotificationConfigurationCommandOutput, PutBucketNotificationConfigurationCommandInput, PutBucketNotificationConfigurationCommandOutput, GetBucketEncryptionCommandInput, GetBucketEncryptionCommandOutput, PutBucketEncryptionCommandInput, PutBucketEncryptionCommandOutput, GetBucketTaggingCommandInput, GetBucketTaggingCommandOutput, PutBucketTaggingCommandInput, PutBucketTaggingCommandOutput, DeleteBucketTaggingCommandInput, DeleteBucketTaggingCommandOutput, GetObjectLockConfigurationCommandInput, GetObjectLockConfigurationCommandOutput, PutObjectLockConfigurationCommandInput, PutObjectLockConfigurationCommandOutput } from "@aws-sdk/client-s3";
|
|
7
|
+
import { GetBucketAclCommandInput, GetBucketAclCommandOutput, PutBucketAclCommandInput, PutBucketAclCommandOutput, GetBucketPolicyCommandInput, GetBucketPolicyCommandOutput, PutBucketPolicyCommandInput, PutBucketPolicyCommandOutput, DeleteBucketPolicyCommandInput, DeleteBucketPolicyCommandOutput, GetBucketVersioningCommandInput, GetBucketVersioningCommandOutput, PutBucketVersioningCommandInput, PutBucketVersioningCommandOutput, GetBucketCorsCommandInput, GetBucketCorsCommandOutput, PutBucketCorsCommandInput, PutBucketCorsCommandOutput, DeleteBucketCorsCommandInput, DeleteBucketCorsCommandOutput, GetBucketLifecycleConfigurationCommandInput, GetBucketLifecycleConfigurationCommandOutput, PutBucketLifecycleConfigurationCommandInput, PutBucketLifecycleConfigurationCommandOutput, DeleteBucketLifecycleCommandInput, DeleteBucketLifecycleCommandOutput, GetBucketNotificationConfigurationCommandInput, GetBucketNotificationConfigurationCommandOutput, PutBucketNotificationConfigurationCommandInput, PutBucketNotificationConfigurationCommandOutput, GetBucketEncryptionCommandInput, GetBucketEncryptionCommandOutput, PutBucketEncryptionCommandInput, PutBucketEncryptionCommandOutput, GetBucketTaggingCommandInput, GetBucketTaggingCommandOutput, PutBucketTaggingCommandInput, PutBucketTaggingCommandOutput, DeleteBucketTaggingCommandInput, DeleteBucketTaggingCommandOutput, GetObjectLockConfigurationCommandInput, GetObjectLockConfigurationCommandOutput, PutObjectLockConfigurationCommandInput, PutObjectLockConfigurationCommandOutput, GetBucketReplicationCommandInput, GetBucketReplicationCommandOutput, PutBucketReplicationCommandInput, PutBucketReplicationCommandOutput, DeleteBucketReplicationCommandInput, DeleteBucketReplicationCommandOutput } from "@aws-sdk/client-s3";
|
|
8
8
|
/**
|
|
9
9
|
* Hook for retrieving S3 bucket access control list (ACL) settings
|
|
10
10
|
*
|
|
@@ -145,3 +145,24 @@ export declare const useSetBucketTagging: (options?: Omit<import("@tanstack/reac
|
|
|
145
145
|
export declare const useDeleteBucketTagging: (options?: Omit<import("@tanstack/react-query").UseMutationOptions<DeleteBucketTaggingCommandOutput, import("..").EnhancedS3Error, DeleteBucketTaggingCommandInput, unknown>, "mutationFn"> | undefined) => import("@tanstack/react-query").UseMutationResult<DeleteBucketTaggingCommandOutput, import("..").EnhancedS3Error, DeleteBucketTaggingCommandInput>;
|
|
146
146
|
export declare const useGetBucketObjectLockConfiguration: (params?: GetObjectLockConfigurationCommandInput | undefined, options?: Omit<import("@tanstack/react-query").UseQueryOptions<GetObjectLockConfigurationCommandOutput, import("..").EnhancedS3Error, GetObjectLockConfigurationCommandOutput, readonly unknown[]>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<GetObjectLockConfigurationCommandOutput, import("..").EnhancedS3Error>;
|
|
147
147
|
export declare const useSetBucketObjectLockConfiguration: (options?: Omit<import("@tanstack/react-query").UseMutationOptions<PutObjectLockConfigurationCommandOutput, import("..").EnhancedS3Error, PutObjectLockConfigurationCommandInput, unknown>, "mutationFn"> | undefined) => import("@tanstack/react-query").UseMutationResult<PutObjectLockConfigurationCommandOutput, import("..").EnhancedS3Error, PutObjectLockConfigurationCommandInput>;
|
|
148
|
+
/**
|
|
149
|
+
* Hook for retrieving S3 bucket replication configuration
|
|
150
|
+
*
|
|
151
|
+
* Fetches the replication configuration for an S3 bucket. Replication enables
|
|
152
|
+
* automatic, asynchronous copying of objects across buckets in different or same regions.
|
|
153
|
+
*/
|
|
154
|
+
export declare const useGetBucketReplication: (params?: GetBucketReplicationCommandInput | undefined, options?: Omit<import("@tanstack/react-query").UseQueryOptions<GetBucketReplicationCommandOutput, import("..").EnhancedS3Error, GetBucketReplicationCommandOutput, readonly unknown[]>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<GetBucketReplicationCommandOutput, import("..").EnhancedS3Error>;
|
|
155
|
+
/**
|
|
156
|
+
* Hook for setting S3 bucket replication configuration
|
|
157
|
+
*
|
|
158
|
+
* Sets the replication configuration for an S3 bucket. Requires versioning to be
|
|
159
|
+
* enabled on both source and destination buckets.
|
|
160
|
+
*/
|
|
161
|
+
export declare const useSetBucketReplication: (options?: Omit<import("@tanstack/react-query").UseMutationOptions<PutBucketReplicationCommandOutput, import("..").EnhancedS3Error, PutBucketReplicationCommandInput, unknown>, "mutationFn"> | undefined) => import("@tanstack/react-query").UseMutationResult<PutBucketReplicationCommandOutput, import("..").EnhancedS3Error, PutBucketReplicationCommandInput>;
|
|
162
|
+
/**
|
|
163
|
+
* Hook for deleting S3 bucket replication configuration
|
|
164
|
+
*
|
|
165
|
+
* Removes the replication configuration from an S3 bucket. Objects that have already
|
|
166
|
+
* been replicated remain in the destination bucket.
|
|
167
|
+
*/
|
|
168
|
+
export declare const useDeleteBucketReplication: (options?: Omit<import("@tanstack/react-query").UseMutationOptions<DeleteBucketReplicationCommandOutput, import("..").EnhancedS3Error, DeleteBucketReplicationCommandInput, unknown>, "mutationFn"> | undefined) => import("@tanstack/react-query").UseMutationResult<DeleteBucketReplicationCommandOutput, import("..").EnhancedS3Error, DeleteBucketReplicationCommandInput>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeleteBucketCorsCommand, DeleteBucketLifecycleCommand, DeleteBucketPolicyCommand, DeleteBucketTaggingCommand, GetBucketAclCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketNotificationConfigurationCommand, GetBucketPolicyCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetObjectLockConfigurationCommand, PutBucketAclCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketLifecycleConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketPolicyCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutObjectLockConfigurationCommand } from "@aws-sdk/client-s3";
|
|
1
|
+
import { DeleteBucketCorsCommand, DeleteBucketLifecycleCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, GetBucketAclCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketNotificationConfigurationCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetObjectLockConfigurationCommand, PutBucketAclCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketLifecycleConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutObjectLockConfigurationCommand } from "@aws-sdk/client-s3";
|
|
2
2
|
import { useCreateS3QueryHook } from "./factories/useCreateS3QueryHook.js";
|
|
3
3
|
import { useCreateS3MutationHook } from "./factories/useCreateS3MutationHook.js";
|
|
4
4
|
const useGetBucketAcl = useCreateS3QueryHook(GetBucketAclCommand, "GetBucketAcl");
|
|
@@ -56,4 +56,12 @@ const useGetBucketObjectLockConfiguration = useCreateS3QueryHook(GetObjectLockCo
|
|
|
56
56
|
const useSetBucketObjectLockConfiguration = useCreateS3MutationHook(PutObjectLockConfigurationCommand, "PutObjectLockConfiguration", [
|
|
57
57
|
"GetObjectLockConfiguration"
|
|
58
58
|
]);
|
|
59
|
-
|
|
59
|
+
const useGetBucketReplication = useCreateS3QueryHook(GetBucketReplicationCommand, "GetBucketReplication");
|
|
60
|
+
const useSetBucketReplication = useCreateS3MutationHook(PutBucketReplicationCommand, "PutBucketReplication", [
|
|
61
|
+
"GetBucketReplication",
|
|
62
|
+
"ListBuckets"
|
|
63
|
+
]);
|
|
64
|
+
const useDeleteBucketReplication = useCreateS3MutationHook(DeleteBucketReplicationCommand, "DeleteBucketReplication", [
|
|
65
|
+
"GetBucketReplication"
|
|
66
|
+
]);
|
|
67
|
+
export { useDeleteBucketCors, useDeleteBucketLifecycle, useDeleteBucketPolicy, useDeleteBucketReplication, useDeleteBucketTagging, useGetBucketAcl, useGetBucketCors, useGetBucketEncryption, useGetBucketLifecycle, useGetBucketNotification, useGetBucketObjectLockConfiguration, useGetBucketPolicy, useGetBucketReplication, useGetBucketTagging, useGetBucketVersioning, useSetBucketAcl, useSetBucketCors, useSetBucketEncryption, useSetBucketLifecycle, useSetBucketNotification, useSetBucketObjectLockConfiguration, useSetBucketPolicy, useSetBucketReplication, useSetBucketTagging, useSetBucketVersioning };
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ export type { LoginConfig, LoginMutationResult } from "./useLoginMutation";
|
|
|
3
3
|
export { useLoginMutation } from "./loginOperations";
|
|
4
4
|
export { useIsBucketEmpty } from "./useIsBucketEmpty";
|
|
5
5
|
export { useBuckets, useGetBucketLocation, useCreateBucket, useDeleteBucket, } from "./bucketOperations";
|
|
6
|
-
export { useGetBucketAcl, useSetBucketAcl, useGetBucketPolicy, useSetBucketPolicy, useDeleteBucketPolicy, useGetBucketVersioning, useSetBucketVersioning, useGetBucketCors, useSetBucketCors, useDeleteBucketCors, useGetBucketLifecycle, useSetBucketLifecycle, useDeleteBucketLifecycle, useGetBucketNotification, useSetBucketNotification, useGetBucketEncryption, useSetBucketEncryption, useGetBucketTagging, useSetBucketTagging, useDeleteBucketTagging, useGetBucketObjectLockConfiguration, useSetBucketObjectLockConfiguration, } from "./bucketConfiguration";
|
|
6
|
+
export { useGetBucketAcl, useSetBucketAcl, useGetBucketPolicy, useSetBucketPolicy, useDeleteBucketPolicy, useGetBucketVersioning, useSetBucketVersioning, useGetBucketCors, useSetBucketCors, useDeleteBucketCors, useGetBucketLifecycle, useSetBucketLifecycle, useDeleteBucketLifecycle, useGetBucketNotification, useSetBucketNotification, useGetBucketEncryption, useSetBucketEncryption, useGetBucketTagging, useSetBucketTagging, useDeleteBucketTagging, useGetBucketObjectLockConfiguration, useSetBucketObjectLockConfiguration, useGetBucketReplication, useSetBucketReplication, useDeleteBucketReplication, } from "./bucketConfiguration";
|
|
7
7
|
export { useListObjects, useListObjectVersions, useObjectMetadata, useObjectRetention, useGetObject, usePutObject, useCreateFolder, useUploadObjects, useDeleteObject, useDeleteObjects, useCopyObject, useSetObjectRetention, useObjectLegalHold, useSetObjectLegalHold, useObjectTagging, useSetObjectTagging, useDeleteObjectTagging, useObjectAcl, useSetObjectAcl, useGetObjectAttributes, useGetObjectTorrent, useRestoreObject, useSelectObjectContent, useListMultipartUploads, useSearchObjects, useSearchObjectsVersions, } from "./objectOperations";
|
|
8
8
|
export { useGetPresignedDownload, useGetPresignedUpload, useGetPresignedPost, } from "./presignedOperations";
|
package/dist/hooks/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { useS3Client } from "./useS3Client.js";
|
|
|
2
2
|
import { useLoginMutation } from "./loginOperations.js";
|
|
3
3
|
import { useIsBucketEmpty } from "./useIsBucketEmpty.js";
|
|
4
4
|
import { useBuckets, useCreateBucket, useDeleteBucket, useGetBucketLocation } from "./bucketOperations.js";
|
|
5
|
-
import { useDeleteBucketCors, useDeleteBucketLifecycle, useDeleteBucketPolicy, useDeleteBucketTagging, useGetBucketAcl, useGetBucketCors, useGetBucketEncryption, useGetBucketLifecycle, useGetBucketNotification, useGetBucketObjectLockConfiguration, useGetBucketPolicy, useGetBucketTagging, useGetBucketVersioning, useSetBucketAcl, useSetBucketCors, useSetBucketEncryption, useSetBucketLifecycle, useSetBucketNotification, useSetBucketObjectLockConfiguration, useSetBucketPolicy, useSetBucketTagging, useSetBucketVersioning } from "./bucketConfiguration.js";
|
|
5
|
+
import { useDeleteBucketCors, useDeleteBucketLifecycle, useDeleteBucketPolicy, useDeleteBucketReplication, useDeleteBucketTagging, useGetBucketAcl, useGetBucketCors, useGetBucketEncryption, useGetBucketLifecycle, useGetBucketNotification, useGetBucketObjectLockConfiguration, useGetBucketPolicy, useGetBucketReplication, useGetBucketTagging, useGetBucketVersioning, useSetBucketAcl, useSetBucketCors, useSetBucketEncryption, useSetBucketLifecycle, useSetBucketNotification, useSetBucketObjectLockConfiguration, useSetBucketPolicy, useSetBucketReplication, useSetBucketTagging, useSetBucketVersioning } from "./bucketConfiguration.js";
|
|
6
6
|
import { useCopyObject, useCreateFolder, useDeleteObject, useDeleteObjectTagging, useDeleteObjects, useGetObject, useGetObjectAttributes, useGetObjectTorrent, useListMultipartUploads, useListObjectVersions, useListObjects, useObjectAcl, useObjectLegalHold, useObjectMetadata, useObjectRetention, useObjectTagging, usePutObject, useRestoreObject, useSearchObjects, useSearchObjectsVersions, useSelectObjectContent, useSetObjectAcl, useSetObjectLegalHold, useSetObjectRetention, useSetObjectTagging, useUploadObjects } from "./objectOperations.js";
|
|
7
7
|
import { useGetPresignedDownload, useGetPresignedPost, useGetPresignedUpload } from "./presignedOperations.js";
|
|
8
|
-
export { useBuckets, useCopyObject, useCreateBucket, useCreateFolder, useDeleteBucket, useDeleteBucketCors, useDeleteBucketLifecycle, useDeleteBucketPolicy, useDeleteBucketTagging, useDeleteObject, useDeleteObjectTagging, useDeleteObjects, useGetBucketAcl, useGetBucketCors, useGetBucketEncryption, useGetBucketLifecycle, useGetBucketLocation, useGetBucketNotification, useGetBucketObjectLockConfiguration, useGetBucketPolicy, useGetBucketTagging, useGetBucketVersioning, useGetObject, useGetObjectAttributes, useGetObjectTorrent, useGetPresignedDownload, useGetPresignedPost, useGetPresignedUpload, useIsBucketEmpty, useListMultipartUploads, useListObjectVersions, useListObjects, useLoginMutation, useObjectAcl, useObjectLegalHold, useObjectMetadata, useObjectRetention, useObjectTagging, usePutObject, useRestoreObject, useS3Client, useSearchObjects, useSearchObjectsVersions, useSelectObjectContent, useSetBucketAcl, useSetBucketCors, useSetBucketEncryption, useSetBucketLifecycle, useSetBucketNotification, useSetBucketObjectLockConfiguration, useSetBucketPolicy, useSetBucketTagging, useSetBucketVersioning, useSetObjectAcl, useSetObjectLegalHold, useSetObjectRetention, useSetObjectTagging, useUploadObjects };
|
|
8
|
+
export { useBuckets, useCopyObject, useCreateBucket, useCreateFolder, useDeleteBucket, useDeleteBucketCors, useDeleteBucketLifecycle, useDeleteBucketPolicy, useDeleteBucketReplication, useDeleteBucketTagging, useDeleteObject, useDeleteObjectTagging, useDeleteObjects, useGetBucketAcl, useGetBucketCors, useGetBucketEncryption, useGetBucketLifecycle, useGetBucketLocation, useGetBucketNotification, useGetBucketObjectLockConfiguration, useGetBucketPolicy, useGetBucketReplication, useGetBucketTagging, useGetBucketVersioning, useGetObject, useGetObjectAttributes, useGetObjectTorrent, useGetPresignedDownload, useGetPresignedPost, useGetPresignedUpload, useIsBucketEmpty, useListMultipartUploads, useListObjectVersions, useListObjects, useLoginMutation, useObjectAcl, useObjectLegalHold, useObjectMetadata, useObjectRetention, useObjectTagging, usePutObject, useRestoreObject, useS3Client, useSearchObjects, useSearchObjectsVersions, useSelectObjectContent, useSetBucketAcl, useSetBucketCors, useSetBucketEncryption, useSetBucketLifecycle, useSetBucketNotification, useSetBucketObjectLockConfiguration, useSetBucketPolicy, useSetBucketReplication, useSetBucketTagging, useSetBucketVersioning, useSetObjectAcl, useSetObjectLegalHold, useSetObjectRetention, useSetObjectTagging, useUploadObjects };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { S3ClientConfig } from "@aws-sdk/client-s3";
|
|
2
2
|
import type { AwsCredentialIdentity } from "@aws-sdk/types";
|
|
3
|
+
export type { CreateBucketCommandInput, CreateBucketCommandOutput, DeleteBucketCommandInput, DeleteBucketCommandOutput, ListBucketsCommandOutput, GetBucketLocationCommandInput, GetBucketLocationCommandOutput, PutBucketTaggingCommandInput, PutBucketTaggingCommandOutput, GetBucketTaggingCommandOutput, DeleteBucketTaggingCommandOutput, PutBucketPolicyCommandInput, GetBucketPolicyCommandOutput, DeleteBucketPolicyCommandOutput, PutBucketVersioningCommandInput, GetBucketVersioningCommandOutput, PutBucketCorsCommandInput, GetBucketCorsCommandOutput, DeleteBucketCorsCommandOutput, PutBucketLifecycleConfigurationCommandInput, GetBucketLifecycleConfigurationCommandOutput, DeleteBucketLifecycleCommandOutput, PutBucketEncryptionCommandInput, GetBucketEncryptionCommandOutput, PutBucketAclCommandInput, GetBucketAclCommandOutput, PutBucketNotificationConfigurationCommandInput, GetBucketNotificationConfigurationCommandOutput, PutObjectLockConfigurationCommandInput, GetObjectLockConfigurationCommandOutput, PutBucketReplicationCommandInput, GetBucketReplicationCommandOutput, DeleteBucketReplicationCommandOutput, PutObjectCommandInput, PutObjectCommandOutput, GetObjectCommandInput, GetObjectCommandOutput, HeadObjectCommandInput, HeadObjectCommandOutput, DeleteObjectCommandInput, DeleteObjectCommandOutput, DeleteObjectsCommandInput, DeleteObjectsCommandOutput, CopyObjectCommandInput, CopyObjectCommandOutput, ListObjectsV2CommandInput, ListObjectsV2CommandOutput, ListObjectVersionsCommandInput, ListObjectVersionsCommandOutput, PutObjectRetentionCommandInput, GetObjectRetentionCommandOutput, PutObjectLegalHoldCommandInput, GetObjectLegalHoldCommandOutput, PutObjectTaggingCommandInput, GetObjectTaggingCommandOutput, DeleteObjectTaggingCommandOutput, PutObjectAclCommandInput, GetObjectAclCommandOutput, GetObjectAttributesCommandInput, GetObjectAttributesCommandOutput, GetObjectTorrentCommandOutput, RestoreObjectCommandInput, RestoreObjectCommandOutput, SelectObjectContentCommandInput, SelectObjectContentCommandOutput, ListMultipartUploadsCommandInput, ListMultipartUploadsCommandOutput, BucketLocationConstraint, ObjectCannedACL, BucketCannedACL, } from "@aws-sdk/client-s3";
|
|
3
4
|
export interface S3BrowserConfig extends Omit<S3ClientConfig, "credentials"> {
|
|
4
5
|
endpoint?: string;
|
|
5
6
|
region: string;
|
package/package.json
CHANGED