import { WellKnownAttributes } from './well-known-attributes';
export type RequiredWellKnownAttributes = {
    [K in keyof typeof WellKnownAttributes]: Omit<(typeof WellKnownAttributes)[K], 'required'> & {
        required: true;
    };
};
export declare const required: <T extends keyof typeof WellKnownAttributes>(...keys: T[]) => Pick<RequiredWellKnownAttributes, T>;
export declare const optional: <T extends keyof typeof WellKnownAttributes>(...keys: T[]) => Pick<typeof WellKnownAttributes, T>;
export type AttributeType = 'string' | 'enum' | 'number' | 'boolean' | 'object' | 'date' | 'json';
export type AttributeDefinition<T extends AttributeType = AttributeType, Enum = ReadonlyArray<string>> = {
    type: T;
    enum?: Enum;
    title?: string;
    description?: string;
    required?: boolean;
    default?: TypeForAttribute<T, Enum>;
};
export type SpanDefinition = {
    name: string;
    importance: 'debug' | 'low' | 'medium' | 'high';
    attributes: Record<string, AttributeDefinition>;
};
/**
 * Type representing valid span importance levels
 */
export type SpanImportanceLevel = SpanDefinition['importance'];
export type TypeForAttribute<T extends AttributeType, Enum = ReadonlyArray<string>> = T extends 'string' ? string : T extends 'enum' ? Enum extends ReadonlyArray<string> ? Enum[number] : never : T extends 'number' ? number : T extends 'boolean' ? boolean : T extends 'object' ? Record<string, any> : T extends 'date' ? Date : T extends 'json' ? any : never;
export type GetSpanType<T extends SpanDefinition> = {
    name: T['name'];
    attributes: {
        -readonly [K in keyof T['attributes'] as T['attributes'][K] extends {
            required: true;
        } ? K : never]: TypeForAttribute<T['attributes'][K]['type'], T['attributes'][K] extends {
            enum: infer E;
        } ? E : never>;
    } & {
        -readonly [K in keyof T['attributes'] as T['attributes'][K] extends {
            required: true;
        } ? never : K]?: TypeForAttribute<T['attributes'][K]['type'], T['attributes'][K] extends {
            enum: infer E;
        } ? E : never> | undefined;
    };
};
//# sourceMappingURL=factory.d.ts.map