import * as z from "zod";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
/**
 * The type of the metadata field.
 */
export declare const MetadataFieldType: {
    readonly String: "string";
    readonly Integer: "integer";
    readonly Date: "date";
    readonly Enum: "enum";
    readonly Set: "set";
};
/**
 * The type of the metadata field.
 */
export type MetadataFieldType = ClosedEnum<typeof MetadataFieldType>;
export type DefaultValue = string | number;
/**
 * The validation defined for the metadata field.
 */
export type Validation = {};
/**
 * The restrictions defined for the metadata field.
 */
export type Restrictions = {
    /**
     * Whether the metadata field is read-only in the UI. when true, the metadata field can only be updated via the API.
     */
    readonlyUi?: boolean | undefined;
};
/**
 * The state of the option.
 */
export declare const MetadataFieldState: {
    readonly Active: "active";
    readonly Inactive: "inactive";
};
/**
 * The state of the option.
 */
export type MetadataFieldState = ClosedEnum<typeof MetadataFieldState>;
export type Value = {
    /**
     * The external ID of the option.
     */
    externalId?: string | undefined;
    /**
     * The value of the option.
     */
    value?: string | undefined;
    /**
     * The position of the option.
     */
    position?: number | undefined;
    /**
     * The state of the option.
     */
    state?: MetadataFieldState | undefined;
};
/**
 * The datasource defined for the metadata field.
 */
export type Datasource = {
    values?: Array<Value> | undefined;
};
export type MetadataField = {
    /**
     * The type of the metadata field.
     */
    type: MetadataFieldType;
    /**
     * The external ID of the metadata field.
     */
    externalId?: string | undefined;
    /**
     * The label of the metadata field.
     */
    label: string;
    /**
     * Whether the metadata field is mandatory.
     */
    mandatory?: boolean | null | undefined;
    /**
     * The default value of the metadata field.
     */
    defaultValue?: string | number | null | undefined;
    /**
     * Whether the default value is disabled.
     */
    defaultDisabled?: boolean | null | undefined;
    /**
     * The validation defined for the metadata field.
     */
    validation?: Validation | null | undefined;
    /**
     * The restrictions defined for the metadata field.
     */
    restrictions?: Restrictions | null | undefined;
    /**
     * The datasource defined for the metadata field.
     */
    datasource?: Datasource | null | undefined;
    /**
     * Whether the metadata field allows adding new options to the datasource dynamically.
     */
    allowDynamicListValues?: boolean | null | undefined;
};
/** @internal */
export declare const MetadataFieldType$inboundSchema: z.ZodNativeEnum<typeof MetadataFieldType>;
/** @internal */
export declare const MetadataFieldType$outboundSchema: z.ZodNativeEnum<typeof MetadataFieldType>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace MetadataFieldType$ {
    /** @deprecated use `MetadataFieldType$inboundSchema` instead. */
    const inboundSchema: z.ZodNativeEnum<{
        readonly String: "string";
        readonly Integer: "integer";
        readonly Date: "date";
        readonly Enum: "enum";
        readonly Set: "set";
    }>;
    /** @deprecated use `MetadataFieldType$outboundSchema` instead. */
    const outboundSchema: z.ZodNativeEnum<{
        readonly String: "string";
        readonly Integer: "integer";
        readonly Date: "date";
        readonly Enum: "enum";
        readonly Set: "set";
    }>;
}
/** @internal */
export declare const DefaultValue$inboundSchema: z.ZodType<DefaultValue, z.ZodTypeDef, unknown>;
/** @internal */
export type DefaultValue$Outbound = string | number;
/** @internal */
export declare const DefaultValue$outboundSchema: z.ZodType<DefaultValue$Outbound, z.ZodTypeDef, DefaultValue>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace DefaultValue$ {
    /** @deprecated use `DefaultValue$inboundSchema` instead. */
    const inboundSchema: z.ZodType<DefaultValue, z.ZodTypeDef, unknown>;
    /** @deprecated use `DefaultValue$outboundSchema` instead. */
    const outboundSchema: z.ZodType<DefaultValue$Outbound, z.ZodTypeDef, DefaultValue>;
    /** @deprecated use `DefaultValue$Outbound` instead. */
    type Outbound = DefaultValue$Outbound;
}
export declare function defaultValueToJSON(defaultValue: DefaultValue): string;
export declare function defaultValueFromJSON(jsonString: string): SafeParseResult<DefaultValue, SDKValidationError>;
/** @internal */
export declare const Validation$inboundSchema: z.ZodType<Validation, z.ZodTypeDef, unknown>;
/** @internal */
export type Validation$Outbound = {};
/** @internal */
export declare const Validation$outboundSchema: z.ZodType<Validation$Outbound, z.ZodTypeDef, Validation>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace Validation$ {
    /** @deprecated use `Validation$inboundSchema` instead. */
    const inboundSchema: z.ZodType<Validation, z.ZodTypeDef, unknown>;
    /** @deprecated use `Validation$outboundSchema` instead. */
    const outboundSchema: z.ZodType<Validation$Outbound, z.ZodTypeDef, Validation>;
    /** @deprecated use `Validation$Outbound` instead. */
    type Outbound = Validation$Outbound;
}
export declare function validationToJSON(validation: Validation): string;
export declare function validationFromJSON(jsonString: string): SafeParseResult<Validation, SDKValidationError>;
/** @internal */
export declare const Restrictions$inboundSchema: z.ZodType<Restrictions, z.ZodTypeDef, unknown>;
/** @internal */
export type Restrictions$Outbound = {
    readonly_ui?: boolean | undefined;
};
/** @internal */
export declare const Restrictions$outboundSchema: z.ZodType<Restrictions$Outbound, z.ZodTypeDef, Restrictions>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace Restrictions$ {
    /** @deprecated use `Restrictions$inboundSchema` instead. */
    const inboundSchema: z.ZodType<Restrictions, z.ZodTypeDef, unknown>;
    /** @deprecated use `Restrictions$outboundSchema` instead. */
    const outboundSchema: z.ZodType<Restrictions$Outbound, z.ZodTypeDef, Restrictions>;
    /** @deprecated use `Restrictions$Outbound` instead. */
    type Outbound = Restrictions$Outbound;
}
export declare function restrictionsToJSON(restrictions: Restrictions): string;
export declare function restrictionsFromJSON(jsonString: string): SafeParseResult<Restrictions, SDKValidationError>;
/** @internal */
export declare const MetadataFieldState$inboundSchema: z.ZodNativeEnum<typeof MetadataFieldState>;
/** @internal */
export declare const MetadataFieldState$outboundSchema: z.ZodNativeEnum<typeof MetadataFieldState>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace MetadataFieldState$ {
    /** @deprecated use `MetadataFieldState$inboundSchema` instead. */
    const inboundSchema: z.ZodNativeEnum<{
        readonly Active: "active";
        readonly Inactive: "inactive";
    }>;
    /** @deprecated use `MetadataFieldState$outboundSchema` instead. */
    const outboundSchema: z.ZodNativeEnum<{
        readonly Active: "active";
        readonly Inactive: "inactive";
    }>;
}
/** @internal */
export declare const Value$inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown>;
/** @internal */
export type Value$Outbound = {
    external_id?: string | undefined;
    value?: string | undefined;
    position?: number | undefined;
    state?: string | undefined;
};
/** @internal */
export declare const Value$outboundSchema: z.ZodType<Value$Outbound, z.ZodTypeDef, Value>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace Value$ {
    /** @deprecated use `Value$inboundSchema` instead. */
    const inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown>;
    /** @deprecated use `Value$outboundSchema` instead. */
    const outboundSchema: z.ZodType<Value$Outbound, z.ZodTypeDef, Value>;
    /** @deprecated use `Value$Outbound` instead. */
    type Outbound = Value$Outbound;
}
export declare function valueToJSON(value: Value): string;
export declare function valueFromJSON(jsonString: string): SafeParseResult<Value, SDKValidationError>;
/** @internal */
export declare const Datasource$inboundSchema: z.ZodType<Datasource, z.ZodTypeDef, unknown>;
/** @internal */
export type Datasource$Outbound = {
    values?: Array<Value$Outbound> | undefined;
};
/** @internal */
export declare const Datasource$outboundSchema: z.ZodType<Datasource$Outbound, z.ZodTypeDef, Datasource>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace Datasource$ {
    /** @deprecated use `Datasource$inboundSchema` instead. */
    const inboundSchema: z.ZodType<Datasource, z.ZodTypeDef, unknown>;
    /** @deprecated use `Datasource$outboundSchema` instead. */
    const outboundSchema: z.ZodType<Datasource$Outbound, z.ZodTypeDef, Datasource>;
    /** @deprecated use `Datasource$Outbound` instead. */
    type Outbound = Datasource$Outbound;
}
export declare function datasourceToJSON(datasource: Datasource): string;
export declare function datasourceFromJSON(jsonString: string): SafeParseResult<Datasource, SDKValidationError>;
/** @internal */
export declare const MetadataField$inboundSchema: z.ZodType<MetadataField, z.ZodTypeDef, unknown>;
/** @internal */
export type MetadataField$Outbound = {
    type: string;
    external_id?: string | undefined;
    label: string;
    mandatory?: boolean | null | undefined;
    default_value?: string | number | null | undefined;
    default_disabled?: boolean | null | undefined;
    validation?: Validation$Outbound | null | undefined;
    restrictions?: Restrictions$Outbound | null | undefined;
    datasource?: Datasource$Outbound | null | undefined;
    allow_dynamic_list_values?: boolean | null | undefined;
};
/** @internal */
export declare const MetadataField$outboundSchema: z.ZodType<MetadataField$Outbound, z.ZodTypeDef, MetadataField>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace MetadataField$ {
    /** @deprecated use `MetadataField$inboundSchema` instead. */
    const inboundSchema: z.ZodType<MetadataField, z.ZodTypeDef, unknown>;
    /** @deprecated use `MetadataField$outboundSchema` instead. */
    const outboundSchema: z.ZodType<MetadataField$Outbound, z.ZodTypeDef, MetadataField>;
    /** @deprecated use `MetadataField$Outbound` instead. */
    type Outbound = MetadataField$Outbound;
}
export declare function metadataFieldToJSON(metadataField: MetadataField): string;
export declare function metadataFieldFromJSON(jsonString: string): SafeParseResult<MetadataField, SDKValidationError>;
//# sourceMappingURL=metadatafield.d.ts.map