export interface ObjectSchema {
  name: string;
  description: string;
  optional: boolean;
  fields: (ArraySchema | ValueSchema | ObjectSchema)[];
}

export interface ArraySchema {
  name: string;
  description: string;
  type: "ARRAY";
  itemSchema: ObjectSchema | ValueSchema;
}

export interface ValueSchema {
  name: string;
  description: string;
  optional: boolean;
  type: ValueType;
}

export const ValueType = {
  STRING: "STRING",
  EMAIL: "EMAIL",
  NUMBER: "NUMBER",
  BOOLEAN: "BOOLEAN",
  URL: "URL",
} as const;
export type ValueType = keyof typeof ValueType;

export const FieldType = {
  ARRAY: "ARRAY",
  OBJECT: "OBJECT",
  ...ValueType,
} as const;
export type FieldType = keyof typeof FieldType;
