UNPKG

@prismicio/types-internal

Version:
1,071 lines (1,070 loc) 78.6 kB
import type { SharedSlice } from "../widgets/slices"; import { type DiffChange } from "./Changes"; import { VariationDiff } from "./Variation"; export declare type SliceMetadata = Omit<SharedSlice, "variations">; export declare type SliceDiff = DiffChange<SharedSlice, Partial<SliceMetadata & { variations?: Partial<Record<string, VariationDiff>>; }>>; export declare const SliceComparator: { compare(sliceA?: ({ id: string; type: "SharedSlice"; name: string; variations: readonly ({ id: string; name: string; description: string; imageUrl: string; docURL: string; version: string; } & { display?: string; primary?: { [x: string]: ({ type: "Boolean"; } & { config?: { label?: string | null | undefined; default_value?: boolean; placeholder_true?: string; placeholder_false?: string; }; }) | ({ type: "Color"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; }; }) | ({ type: "Date"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }) | ({ type: "Embed"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; }; }) | ({ type: "GeoPoint"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; }; }) | ({ type: "Image"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; constraint?: { width?: number | null; height?: number | null; }; thumbnails?: readonly ({ name: string; } & { width?: number | null; height?: number | null; })[]; }; }) | ({ type: "IntegrationFields"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; catalog?: string; }; }) | ({ type: "Link"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; useAsTitle?: boolean; placeholder?: string; select?: "media" | "document" | "web" | null; customtypes?: readonly (string | { id: string; fields: readonly (string | { id: string; customtypes: readonly (string | { id: string; fields: readonly (string | { id: string; fields: readonly string[]; })[]; })[]; } | { id: string; fields: readonly (string | { id: string; customtypes: readonly (string | { id: string; fields: readonly (string | { id: string; fields: readonly string[]; })[]; })[]; })[]; })[]; })[]; masks?: readonly string[]; tags?: readonly string[]; allowTargetBlank?: boolean; allowText?: boolean; repeat?: boolean; variants?: string[]; }; }) | ({ type: "Number"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; min?: number; max?: number; step?: number; }; }) | ({ type: "Range"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; min?: number; max?: number; step?: number; }; }) | ({ type: "StructuredText"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; single?: string; multi?: string; imageConstraint?: { width?: number | null; height?: number | null; }; labels?: readonly string[]; allowTargetBlank?: boolean; }; }) | ({ type: "Select"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default_value?: string; options?: readonly string[]; }; }) | ({ type: "Separator"; } & { config?: { label?: string | null | undefined; }; }) | ({ type: "Table"; } & { config?: { label?: string | null | undefined; }; }) | ({ type: "Text"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; useAsTitle?: boolean; placeholder?: string; }; }) | ({ type: "Timestamp"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }) | ({ type: "Group"; } & { fieldset?: string | null | undefined; icon?: string; description?: string; config?: { label?: string | null | undefined; repeat?: boolean; fields?: { [x: string]: ({ type: "Boolean"; } & { config?: { label?: string | null | undefined; default_value?: boolean; placeholder_true?: string; placeholder_false?: string; }; }) | ({ type: "Color"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; }; }) | ({ type: "Date"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }) | ({ type: "Embed"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; }; }) | ({ type: "GeoPoint"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; }; }) | ({ type: "Image"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; constraint?: { width?: number | null; height?: number | null; }; thumbnails?: readonly ({ name: string; } & { width?: number | null; height?: number | null; })[]; }; }) | ({ type: "IntegrationFields"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; catalog?: string; }; }) | ({ type: "Link"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; useAsTitle?: boolean; placeholder?: string; select?: "media" | "document" | "web" | null; customtypes?: readonly (string | { id: string; fields: readonly (string | { id: string; customtypes: readonly (string | { id: string; fields: readonly (string | { id: string; fields: readonly string[]; })[]; })[]; } | { id: string; fields: readonly (string | { id: string; customtypes: readonly (string | { id: string; fields: readonly (string | { id: string; fields: readonly string[]; })[]; })[]; })[]; })[]; })[]; masks?: readonly string[]; tags?: readonly string[]; allowTargetBlank?: boolean; allowText?: boolean; repeat?: boolean; variants?: string[]; }; }) | ({ type: "Number"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; min?: number; max?: number; step?: number; }; }) | ({ type: "Range"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; min?: number; max?: number; step?: number; }; }) | ({ type: "StructuredText"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; single?: string; multi?: string; imageConstraint?: { width?: number | null; height?: number | null; }; labels?: readonly string[]; allowTargetBlank?: boolean; }; }) | ({ type: "Select"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default_value?: string; options?: readonly string[]; }; }) | ({ type: "Separator"; } & { config?: { label?: string | null | undefined; }; }) | ({ type: "Table"; } & { config?: { label?: string | null | undefined; }; }) | ({ type: "Text"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; useAsTitle?: boolean; placeholder?: string; }; }) | ({ type: "Timestamp"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }) | ({ type: "Group"; } & { fieldset?: string | null | undefined; icon?: string; description?: string; config?: { label?: string | null | undefined; repeat?: boolean; fields?: { [x: string]: ({ type: "Boolean"; } & { config?: { label?: string | null | undefined; default_value?: boolean; placeholder_true?: string; placeholder_false?: string; }; }) | ({ type: "Color"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; }; }) | ({ type: "Date"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }) | ({ type: "Embed"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; }; }) | ({ type: "GeoPoint"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; }; }) | ({ type: "Image"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; constraint?: { width?: number | null; height?: number | null; }; thumbnails?: readonly ({ name: string; } & { width?: number | null; height?: number | null; })[]; }; }) | ({ type: "IntegrationFields"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; catalog?: string; }; }) | ({ type: "Link"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; useAsTitle?: boolean; placeholder?: string; select?: "media" | "document" | "web" | null; customtypes?: readonly (string | { id: string; fields: readonly (string | { id: string; customtypes: readonly (string | { id: string; fields: readonly (string | { id: string; fields: readonly string[]; })[]; })[]; } | { id: string; fields: readonly (string | { id: string; customtypes: readonly (string | { id: string; fields: readonly (string | { id: string; fields: readonly string[]; })[]; })[]; })[]; })[]; })[]; masks?: readonly string[]; tags?: readonly string[]; allowTargetBlank?: boolean; allowText?: boolean; repeat?: boolean; variants?: string[]; }; }) | ({ type: "Number"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; min?: number; max?: number; step?: number; }; }) | ({ type: "Range"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; min?: number; max?: number; step?: number; }; }) | ({ type: "StructuredText"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; single?: string; multi?: string; imageConstraint?: { width?: number | null; height?: number | null; }; labels?: readonly string[]; allowTargetBlank?: boolean; }; }) | ({ type: "Select"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default_value?: string; options?: readonly string[]; }; }) | ({ type: "Separator"; } & { config?: { label?: string | null | undefined; }; }) | ({ type: "Table"; } & { config?: { label?: string | null | undefined; }; }) | ({ type: "Text"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; useAsTitle?: boolean; placeholder?: string; }; }) | ({ type: "Timestamp"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }); }; }; }); }; }; }); }; items?: { [x: string]: ({ type: "Boolean"; } & { config?: { label?: string | null | undefined; default_value?: boolean; placeholder_true?: string; placeholder_false?: string; }; }) | ({ type: "Color"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; }; }) | ({ type: "Date"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }) | ({ type: "Embed"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; }; }) | ({ type: "GeoPoint"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; }; }) | ({ type: "Image"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; constraint?: { width?: number | null; height?: number | null; }; thumbnails?: readonly ({ name: string; } & { width?: number | null; height?: number | null; })[]; }; }) | ({ type: "IntegrationFields"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; catalog?: string; }; }) | ({ type: "Link"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; useAsTitle?: boolean; placeholder?: string; select?: "media" | "document" | "web" | null; customtypes?: readonly (string | { id: string; fields: readonly (string | { id: string; customtypes: readonly (string | { id: string; fields: readonly (string | { id: string; fields: readonly string[]; })[]; })[]; } | { id: string; fields: readonly (string | { id: string; customtypes: readonly (string | { id: string; fields: readonly (string | { id: string; fields: readonly string[]; })[]; })[]; })[]; })[]; })[]; masks?: readonly string[]; tags?: readonly string[]; allowTargetBlank?: boolean; allowText?: boolean; repeat?: boolean; variants?: string[]; }; }) | ({ type: "Number"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; min?: number; max?: number; step?: number; }; }) | ({ type: "Range"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; min?: number; max?: number; step?: number; }; }) | ({ type: "StructuredText"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; single?: string; multi?: string; imageConstraint?: { width?: number | null; height?: number | null; }; labels?: readonly string[]; allowTargetBlank?: boolean; }; }) | ({ type: "Select"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default_value?: string; options?: readonly string[]; }; }) | ({ type: "Separator"; } & { config?: { label?: string | null | undefined; }; }) | ({ type: "Table"; } & { config?: { label?: string | null | undefined; }; }) | ({ type: "Text"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; useAsTitle?: boolean; placeholder?: string; }; }) | ({ type: "Timestamp"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }); }; })[]; } & { description?: string; legacyPaths?: { [x: string]: string; }; }) | undefined, sliceB?: ({ id: string; type: "SharedSlice"; name: string; variations: readonly ({ id: string; name: string; description: string; imageUrl: string; docURL: string; version: string; } & { display?: string; primary?: { [x: string]: ({ type: "Boolean"; } & { config?: { label?: string | null | undefined; default_value?: boolean; placeholder_true?: string; placeholder_false?: string; }; }) | ({ type: "Color"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; }; }) | ({ type: "Date"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }) | ({ type: "Embed"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; }; }) | ({ type: "GeoPoint"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; }; }) | ({ type: "Image"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; constraint?: { width?: number | null; height?: number | null; }; thumbnails?: readonly ({ name: string; } & { width?: number | null; height?: number | null; })[]; }; }) | ({ type: "IntegrationFields"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; catalog?: string; }; }) | ({ type: "Link"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; useAsTitle?: boolean; placeholder?: string; select?: "media" | "document" | "web" | null; customtypes?: readonly (string | { id: string; fields: readonly (string | { id: string; customtypes: readonly (string | { id: string; fields: readonly (string | { id: string; fields: readonly string[]; })[]; })[]; } | { id: string; fields: readonly (string | { id: string; customtypes: readonly (string | { id: string; fields: readonly (string | { id: string; fields: readonly string[]; })[]; })[]; })[]; })[]; })[]; masks?: readonly string[]; tags?: readonly string[]; allowTargetBlank?: boolean; allowText?: boolean; repeat?: boolean; variants?: string[]; }; }) | ({ type: "Number"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; min?: number; max?: number; step?: number; }; }) | ({ type: "Range"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; min?: number; max?: number; step?: number; }; }) | ({ type: "StructuredText"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; single?: string; multi?: string; imageConstraint?: { width?: number | null; height?: number | null; }; labels?: readonly string[]; allowTargetBlank?: boolean; }; }) | ({ type: "Select"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default_value?: string; options?: readonly string[]; }; }) | ({ type: "Separator"; } & { config?: { label?: string | null | undefined; }; }) | ({ type: "Table"; } & { config?: { label?: string | null | undefined; }; }) | ({ type: "Text"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; useAsTitle?: boolean; placeholder?: string; }; }) | ({ type: "Timestamp"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }) | ({ type: "Group"; } & { fieldset?: string | null | undefined; icon?: string; description?: string; config?: { label?: string | null | undefined; repeat?: boolean; fields?: { [x: string]: ({ type: "Boolean"; } & { config?: { label?: string | null | undefined; default_value?: boolean; placeholder_true?: string; placeholder_false?: string; }; }) | ({ type: "Color"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; }; }) | ({ type: "Date"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; default?: string; }; }) | ({ type: "Embed"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; placeholder?: string; useAsTitle?: boolean; }; }) | ({ type: "GeoPoint"; } & { fieldset?: string | null | undefined; config?: { label?: string | null | undefined; };