/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { S3CompressionType, S3CompressionType$inboundSchema, } from "./s3-compression-type.js"; import { S3EncryptionType, S3EncryptionType$inboundSchema, } from "./s3-encryption-type.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type S3ExportConfig = { /** * S3 bucket name */ bucket?: string | undefined; compression?: S3CompressionType | undefined; encryption?: S3EncryptionType | undefined; /** * If true, use Flexprice-managed S3 credentials instead of user-provided */ isFlexpriceManaged?: boolean | undefined; /** * Optional prefix for S3 keys (e.g., "flexprice-exports/") */ keyPrefix?: string | undefined; /** * AWS region (e.g., "us-west-2") */ region?: string | undefined; }; /** @internal */ export const S3ExportConfig$inboundSchema: z.ZodMiniType< S3ExportConfig, unknown > = z.pipe( z.object({ bucket: types.optional(types.string()), compression: types.optional(S3CompressionType$inboundSchema), encryption: types.optional(S3EncryptionType$inboundSchema), is_flexprice_managed: types.optional(types.boolean()), key_prefix: types.optional(types.string()), region: types.optional(types.string()), }), z.transform((v) => { return remap$(v, { "is_flexprice_managed": "isFlexpriceManaged", "key_prefix": "keyPrefix", }); }), ); export function s3ExportConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => S3ExportConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'S3ExportConfig' from JSON`, ); }