From 12db2ca8f1865cf30ce2b3596698cb3c5117b495 Mon Sep 17 00:00:00 2001 From: Roshane Pascual Date: Mon, 23 Sep 2024 10:12:54 -0700 Subject: [PATCH] add back read --- packages/backend-output-schemas/src/storage/v1.ts | 8 +++++++- packages/client-config/API.md | 4 ++-- .../src/client-config-schema/client_config_v1.2.ts | 7 ++++++- .../src/client-config-schema/schema_v1.2.json | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/packages/backend-output-schemas/src/storage/v1.ts b/packages/backend-output-schemas/src/storage/v1.ts index 0464e87600..0827b34d69 100644 --- a/packages/backend-output-schemas/src/storage/v1.ts +++ b/packages/backend-output-schemas/src/storage/v1.ts @@ -1,6 +1,12 @@ import { z } from 'zod'; -const storageAccessActionEnum = z.enum(['get', 'list', 'write', 'delete']); +const storageAccessActionEnum = z.enum([ + 'read', + 'get', + 'list', + 'write', + 'delete', +]); const pathSchema = z.record( z.string(), diff --git a/packages/client-config/API.md b/packages/client-config/API.md index 94aea5f016..ea25f09a2d 100644 --- a/packages/client-config/API.md +++ b/packages/client-config/API.md @@ -46,7 +46,7 @@ type AmazonPinpointChannels_2 = 'IN_APP_MESSAGING' | 'FCM' | 'APNS' | 'EMAIL' | type AmazonPinpointChannels_3 = 'IN_APP_MESSAGING' | 'FCM' | 'APNS' | 'EMAIL' | 'SMS'; // @public (undocumented) -type AmplifyStorageAccessActions = 'get' | 'list' | 'write' | 'delete'; +type AmplifyStorageAccessActions = 'read' | 'get' | 'list' | 'write' | 'delete'; // @public interface AmplifyStorageAccessRule { @@ -473,7 +473,7 @@ export type CustomClientConfig = { export const DEFAULT_CLIENT_CONFIG_VERSION: ClientConfigVersion; // @public -export const generateClientConfig: (backendIdentifier: DeployedBackendIdentifier, version: T, awsClientProvider?: AWSClientProvider<{ +export const generateClientConfig: (backendIdentifier: DeployedBackendIdentifier, version: T, awsClientProvider?: AWSClientProvider<{ getS3Client: S3Client; getAmplifyClient: AmplifyClient; getCloudFormationClient: CloudFormationClient; diff --git a/packages/client-config/src/client-config-schema/client_config_v1.2.ts b/packages/client-config/src/client-config-schema/client_config_v1.2.ts index 36af66f878..629894f90f 100644 --- a/packages/client-config/src/client-config-schema/client_config_v1.2.ts +++ b/packages/client-config/src/client-config-schema/client_config_v1.2.ts @@ -46,7 +46,12 @@ export type AmazonPinpointChannels = | 'APNS' | 'EMAIL' | 'SMS'; -export type AmplifyStorageAccessActions = 'get' | 'list' | 'write' | 'delete'; +export type AmplifyStorageAccessActions = + | 'read' + | 'get' + | 'list' + | 'write' + | 'delete'; /** * Config format for Amplify Gen 2 client libraries to communicate with backend services. diff --git a/packages/client-config/src/client-config-schema/schema_v1.2.json b/packages/client-config/src/client-config-schema/schema_v1.2.json index 77857d10aa..b85a10ff30 100644 --- a/packages/client-config/src/client-config-schema/schema_v1.2.json +++ b/packages/client-config/src/client-config-schema/schema_v1.2.json @@ -356,7 +356,7 @@ "$defs": { "amplify_storage_access_actions": { "type": "string", - "enum": ["get", "list", "write", "delete"] + "enum": ["read", "get", "list", "write", "delete"] }, "amplify_storage_access_rule": { "type": "object",