import { createEntityType, definitionSchema, featureEntityType, VALIDATORS, } from '@baseplate-dev/project-builder-lib';
import z from 'zod';
export const storageAdapterEntityType = createEntityType('plugin-storage/storage-adapter');
export const createStoragePluginDefinitionSchema = definitionSchema((ctx) => z.object({
    storageFeatureRef: ctx.withRef({
        type: featureEntityType,
        onDelete: 'RESTRICT',
    }),
    s3Adapters: z.array(ctx.withEnt(z.object({
        id: z.string(),
        name: VALIDATORS.CAMEL_CASE_STRING,
        bucketConfigVar: VALIDATORS.CONSTANT_CASE_STRING,
        hostedUrlConfigVar: VALIDATORS.OPTIONAL_CONSTANT_CASE_STRING,
    }), { type: storageAdapterEntityType })),
}));
//# sourceMappingURL=plugin-definition.js.map