import { importShared } from './__federation_fn_import-BY6M5C84.js';

const {createEntityType,definitionSchema,featureEntityType,VALIDATORS} = await importShared('@baseplate-dev/project-builder-lib');

const z = await importShared('zod');

const storageAdapterEntityType = createEntityType(
  "plugin-storage/storage-adapter"
);
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 }
      )
    )
  })
);

export { createStoragePluginDefinitionSchema as c, storageAdapterEntityType as s };
//# sourceMappingURL=plugin-definition-pEIqIxzw.js.map
