@prismicio/client
Version:
The official JavaScript + TypeScript client library for Prismic
173 lines (172 loc) • 16.3 kB
TypeScript
import { CustomTypeModelBooleanField } from "./types/model/boolean.js";
import { CustomTypeModelColorField } from "./types/model/color.js";
import { CustomTypeModelLinkField, CustomTypeModelLinkSelectType } from "./types/model/link.js";
import { CustomTypeModelContentRelationshipField, CustomTypeModelFetchContentRelationshipLevel1, CustomTypeModelFetchCustomTypeLevel1, CustomTypeModelFetchCustomTypeLevel2, CustomTypeModelFetchGroupLevel1, CustomTypeModelFetchGroupLevel2 } from "./types/model/contentRelationship.js";
import { CustomTypeModelDateField } from "./types/model/date.js";
import { CustomTypeModelEmbedField } from "./types/model/embed.js";
import { CustomTypeModelGeoPointField } from "./types/model/geoPoint.js";
import { CustomTypeModelGroupField, CustomTypeModelNestedGroupField } from "./types/model/group.js";
import { CustomTypeModelImageConstraint, CustomTypeModelImageField, CustomTypeModelImageThumbnail } from "./types/model/image.js";
import { CustomTypeModelKeyTextField } from "./types/model/keyText.js";
import { CustomTypeModelLinkToMediaField } from "./types/model/linkToMedia.js";
import { CustomTypeModelNumberField } from "./types/model/number.js";
import { CustomTypeModelRangeField } from "./types/model/range.js";
import { CustomTypeModelRichTextField, CustomTypeModelRichTextMultiField, CustomTypeModelRichTextSingleField } from "./types/model/richText.js";
import { CustomTypeModelSelectField } from "./types/model/select.js";
import { CustomTypeModelSeparatorField } from "./types/model/separator.js";
import { CustomTypeModelLegacySlice, CustomTypeModelSlice, CustomTypeModelSliceDisplay } from "./types/model/slice.js";
import { CustomTypeModelSharedSlice, CustomTypeModelSliceLabel, CustomTypeModelSliceType, CustomTypeModelSliceZoneField } from "./types/model/sliceZone.js";
import { CustomTypeModelTableField } from "./types/model/table.js";
import { CustomTypeModelTimestampField } from "./types/model/timestamp.js";
import { CustomTypeModelTitleField } from "./types/model/title.js";
import { CustomTypeModelUIDField } from "./types/model/uid.js";
import { CustomTypeModelField, CustomTypeModelFieldForGroup, CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary, CustomTypeModelFieldType } from "./types/model/types.js";
import { CustomTypeModelIntegrationField } from "./types/model/integration.js";
import { BooleanField } from "./types/value/boolean.js";
import { ColorField } from "./types/value/color.js";
import { GroupField, NestedGroupField } from "./types/value/group.js";
import { SharedSliceVariation } from "./types/value/sharedSliceVariation.js";
import { SharedSlice } from "./types/value/sharedSlice.js";
import { Slice } from "./types/value/slice.js";
import { SliceZone } from "./types/value/sliceZone.js";
import { ContentRelationshipField, FilledContentRelationshipField } from "./types/value/contentRelationship.js";
import { DateField } from "./types/value/date.js";
import { AnyOEmbed, EmbedField, LinkOEmbed, OEmbedExtra, OEmbedType, PhotoOEmbed, RichOEmbed, VideoOEmbed } from "./types/value/embed.js";
import { GeoPointField } from "./types/value/geoPoint.js";
import { EmptyImageFieldImage, FilledImageFieldImage, ImageField, ImageFieldImage } from "./types/value/image.js";
import { KeyTextField } from "./types/value/keyText.js";
import { FilledLinkToMediaField, LinkToMediaField } from "./types/value/linkToMedia.js";
import { EmptyLinkField, FilledLinkToWebField, LinkField, LinkType } from "./types/value/link.js";
import { NumberField } from "./types/value/number.js";
import { RTAnyNode, RTBlockNode, RTEmNode, RTEmbedNode, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTImageNode, RTInlineNode, RTLabelNode, RTLinkNode, RTListItemNode, RTListNode, RTNode, RTOListItemNode, RTOListNode, RTParagraphNode, RTPreformattedNode, RTSpanNode, RTSpanNodeBase, RTStrongNode, RTTextNode, RTTextNodeBase, RichTextField, RichTextNodeType, RichTextNodeTypes } from "./types/value/richText.js";
import { SelectField } from "./types/value/select.js";
import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, TableFieldHead, TableFieldHeadRow, TableFieldHeaderCell } from "./types/value/table.js";
import { TimestampField } from "./types/value/timestamp.js";
import { TitleField } from "./types/value/title.js";
import { AnyRegularField, AnySlicePrimaryField, FieldState, Repeatable } from "./types/value/types.js";
import { IntegrationField, IntegrationFieldData } from "./types/value/integration.js";
import { AlternateLanguage, PrismicDocument, PrismicDocumentHeader, PrismicDocumentWithUID, PrismicDocumentWithoutUID } from "./types/value/document.js";
import { LinkResolverFunction, asLink } from "./helpers/asLink.js";
import { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer, HTMLRichTextSerializer, asHTML } from "./helpers/asHTML.js";
import { SliceMapper, mapSliceZone } from "./helpers/mapSliceZone.js";
import { filter } from "./filter.js";
import { AbortSignalLike, FetchLike, RequestInitLike, ResponseLike } from "./lib/request.js";
import { Query } from "./types/api/query.js";
import { Ref } from "./types/api/ref.js";
import { Form, FormField, Language, Repository } from "./types/api/repository.js";
import { BuildQueryURLArgs, Ordering, QueryParams, Route, buildQueryURL } from "./buildQueryURL.js";
import { Client, ClientConfig, HttpRequestLike } from "./Client.js";
import { CreateClient, createClient } from "./createClient.js";
import { MigrationContentRelationship } from "./types/migration/ContentRelationship.js";
import { ExistingPrismicDocument, InjectMigrationSpecificTypes, PendingPrismicDocument, PrismicMigrationDocument } from "./types/migration/Document.js";
import { MigrationImage, MigrationLinkToMedia, MigrationRTImageNode, PrismicMigrationAsset } from "./types/migration/Asset.js";
import { Migration } from "./Migration.js";
import { MigrateReporterEvents, WriteClient, WriteClientConfig } from "./WriteClient.js";
import { CreateWriteClient, createWriteClient } from "./createWriteClient.js";
import { CreateMigration, createMigration } from "./createMigration.js";
import { getRepositoryEndpoint } from "./getRepositoryEndpoint.js";
import { getRepositoryName } from "./getRepositoryName.js";
import { getGraphQLEndpoint } from "./getGraphQLEndpoint.js";
import { isRepositoryName } from "./isRepositoryName.js";
import { isRepositoryEndpoint } from "./isRepositoryEndpoint.js";
import { getToolbarSrc } from "./getToolbarSrc.js";
import { cookie_d_exports } from "./cookie.js";
import { asDate } from "./helpers/asDate.js";
import { AsLinkAttrsConfig, asLinkAttrs } from "./helpers/asLinkAttrs.js";
import { asText } from "./helpers/asText.js";
import { asImageSrc } from "./helpers/asImageSrc.js";
import { asImageWidthSrcSet } from "./helpers/asImageWidthSrcSet.js";
import { asImagePixelDensitySrcSet } from "./helpers/asImagePixelDensitySrcSet.js";
import { isFilled_d_exports } from "./helpers/isFilled.js";
import { documentToLinkField } from "./helpers/documentToLinkField.js";
import { ForbiddenError, InvalidDataError, NotFoundError, ParsingError, PreviewTokenExpiredError, PrismicError, RefExpiredError, RefNotFoundError, RepositoryNotFoundError } from "./errors.js";
import { CustomTypeModel, CustomTypeModelDefinition, CustomTypeModelTab } from "./types/model/customType.js";
import { SharedSliceModelVariation } from "./types/model/sharedSliceVariation.js";
import { SharedSliceModel } from "./types/model/sharedSlice.js";
import { Release } from "./types/api/release.js";
import { Tags } from "./types/api/tags.js";
import { IntegrationAPIItem, IntegrationAPIResults } from "./types/api/integration.js";
import { WebhookBodyAPIUpdate } from "./types/webhook/apiUpdate.js";
import { WebhookBodyTestTrigger } from "./types/webhook/testTrigger.js";
import { WebhookBody, WebhookType } from "./types/webhook/types.js";
//#region src/index.d.ts
/**
* @deprecated Renamed to `filter`
*/
declare const predicate: {
at: (path: string, value: string | number | boolean | Date | string[]) => string;
not: (path: string, value: string | number | boolean | Date | string[]) => string;
any: (path: string, values: (string | number | boolean | Date)[]) => string;
in: (path: string, values: string[]) => string;
fulltext: (path: string, searchTerms: string) => string;
has: (path: string) => string;
missing: (path: string) => string;
similar: (id: string, value: number) => string;
geopointNear: (path: string, latitude: number, longitude: number, radius: number) => string;
numberLessThan: (path: string, value: number) => string;
numberGreaterThan: (path: string, value: number) => string;
numberInRange: (path: string, lowerLimit: number, upperLimit: number) => string;
dateAfter: (path: string, date: string | number | Date) => string;
dateBefore: (path: string, date: string | number | Date) => string;
dateBetween: (path: string, startDate: string | number | Date, endDate: string | number | Date) => string;
dateDayOfMonth: (path: string, day: number) => string;
dateDayOfMonthAfter: (path: string, day: number) => string;
dateDayOfMonthBefore: (path: string, day: number) => string;
dateDayOfWeek: (path: string, day: string | number) => string;
dateDayOfWeekAfter: (path: string, day: string | number) => string;
dateDayOfWeekBefore: (path: string, day: string | number) => string;
dateMonth: (path: string, month: string | number) => string;
dateMonthAfter: (path: string, month: string | number) => string;
dateMonthBefore: (path: string, month: string | number) => string;
dateYear: (path: string, year: number) => string;
dateHour: (path: string, hour: number) => string;
dateHourAfter: (path: string, hour: number) => string;
dateHourBefore: (path: string, hour: number) => string;
};
/**
* @deprecated Renamed to `mapSliceZone`
*/
declare const unstable_mapSliceZone: typeof mapSliceZone;
/**
* @deprecated Renamed to `HTMLRichTextMapSerializer`
*/
type HTMLMapSerializer = HTMLRichTextMapSerializer;
/**
* @deprecated Renamed to `HTMLRichTextFunctionSerializer`
*/
type HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;
/**
* @deprecated Use {@link RichTextNodeType} instead.
*/
declare const Element: {
readonly heading1: "heading1";
readonly heading2: "heading2";
readonly heading3: "heading3";
readonly heading4: "heading4";
readonly heading5: "heading5";
readonly heading6: "heading6";
readonly paragraph: "paragraph";
readonly preformatted: "preformatted";
readonly strong: "strong";
readonly em: "em";
readonly listItem: "list-item";
readonly oListItem: "o-list-item";
readonly list: "group-list-item";
readonly oList: "group-o-list-item";
readonly image: "image";
readonly embed: "embed";
readonly hyperlink: "hyperlink";
readonly label: "label";
readonly span: "span";
};
/**
* @deprecated Renamed to `IntegrationField`
*/
type IntegrationFields = IntegrationField;
/**
* @deprecated Renamed to `CustomTypeModelIntegrationField`.
*/
type CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField;
//#endregion
export { type AbortSignalLike, type AlternateLanguage, type AnyOEmbed, type AnyRegularField, type AnySlicePrimaryField, type AsLinkAttrsConfig, type BooleanField, type BuildQueryURLArgs, Client, type ClientConfig, type ColorField, type ContentRelationshipField, type CreateClient, type CreateMigration, type CreateWriteClient, type CustomTypeModel, type CustomTypeModelBooleanField, type CustomTypeModelColorField, type CustomTypeModelContentRelationshipField, type CustomTypeModelDateField, type CustomTypeModelDefinition, type CustomTypeModelEmbedField, type CustomTypeModelFetchContentRelationshipLevel1, type CustomTypeModelFetchCustomTypeLevel1, type CustomTypeModelFetchCustomTypeLevel2, type CustomTypeModelFetchGroupLevel1, type CustomTypeModelFetchGroupLevel2, type CustomTypeModelField, type CustomTypeModelFieldForGroup, type CustomTypeModelFieldForNestedGroup, type CustomTypeModelFieldForSlicePrimary, CustomTypeModelFieldType, type CustomTypeModelGeoPointField, type CustomTypeModelGroupField, type CustomTypeModelImageConstraint, type CustomTypeModelImageField, type CustomTypeModelImageThumbnail, CustomTypeModelIntegrationField, CustomTypeModelIntegrationFieldsField, type CustomTypeModelKeyTextField, type CustomTypeModelLegacySlice, type CustomTypeModelLinkField, CustomTypeModelLinkSelectType, type CustomTypeModelLinkToMediaField, type CustomTypeModelNestedGroupField, type CustomTypeModelNumberField, type CustomTypeModelRangeField, type CustomTypeModelRichTextField, type CustomTypeModelRichTextMultiField, type CustomTypeModelRichTextSingleField, type CustomTypeModelSelectField, type CustomTypeModelSeparatorField, type CustomTypeModelSharedSlice, type CustomTypeModelSlice, CustomTypeModelSliceDisplay, type CustomTypeModelSliceLabel, CustomTypeModelSliceType, type CustomTypeModelSliceZoneField, type CustomTypeModelTab, type CustomTypeModelTableField, type CustomTypeModelTimestampField, type CustomTypeModelTitleField, type CustomTypeModelUIDField, type DateField, Element, type EmbedField, type EmptyImageFieldImage, type EmptyLinkField, type ExistingPrismicDocument, type FetchLike, type FieldState, type FilledContentRelationshipField, type FilledImageFieldImage, type FilledLinkToMediaField, type FilledLinkToWebField, ForbiddenError, type Form, type FormField, type GeoPointField, type GroupField, type HTMLFunctionSerializer, type HTMLMapSerializer, type HTMLRichTextFunctionSerializer, type HTMLRichTextMapSerializer, type HTMLRichTextSerializer, type HttpRequestLike, type ImageField, type ImageFieldImage, type InjectMigrationSpecificTypes, type IntegrationAPIItem, type IntegrationAPIResults, type IntegrationField, type IntegrationFieldData, type IntegrationFields, InvalidDataError, type KeyTextField, type Language, type LinkField, type LinkOEmbed, type LinkResolverFunction, type LinkToMediaField, LinkType, type MigrateReporterEvents, Migration, type MigrationContentRelationship, type MigrationImage, type MigrationLinkToMedia, type MigrationRTImageNode, type NestedGroupField, NotFoundError, type NumberField, type OEmbedExtra, OEmbedType, type Ordering, ParsingError, type PendingPrismicDocument, type PhotoOEmbed, PreviewTokenExpiredError, type PrismicDocument, type PrismicDocumentHeader, type PrismicDocumentWithUID, type PrismicDocumentWithoutUID, PrismicError, PrismicMigrationAsset, PrismicMigrationDocument, type Query, type QueryParams, type RTAnyNode, type RTBlockNode, type RTEmNode, type RTEmbedNode, type RTHeading1Node, type RTHeading2Node, type RTHeading3Node, type RTHeading4Node, type RTHeading5Node, type RTHeading6Node, type RTImageNode, type RTInlineNode, type RTLabelNode, type RTLinkNode, type RTListItemNode, type RTListNode, type RTNode, type RTOListItemNode, type RTOListNode, type RTParagraphNode, type RTPreformattedNode, type RTSpanNode, type RTSpanNodeBase, type RTStrongNode, type RTTextNode, type RTTextNodeBase, type Ref, RefExpiredError, RefNotFoundError, type Release, type Repeatable, type Repository, RepositoryNotFoundError, type RequestInitLike, type ResponseLike, type RichOEmbed, type RichTextField, RichTextNodeType, type RichTextNodeTypes, type Route, type SelectField, type SharedSlice, type SharedSliceModel, type SharedSliceModelVariation, type SharedSliceVariation, type Slice, type SliceMapper, type SliceZone, type TableField, type TableFieldBody, type TableFieldBodyRow, type TableFieldDataCell, type TableFieldHead, type TableFieldHeadRow, type TableFieldHeaderCell, type Tags, type TimestampField, type TitleField, type VideoOEmbed, type WebhookBody, type WebhookBodyAPIUpdate, type WebhookBodyTestTrigger, WebhookType, WriteClient, type WriteClientConfig, asDate, asHTML, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet, asLink, asLinkAttrs, asText, buildQueryURL, cookie_d_exports as cookie, createClient, createMigration, createWriteClient, documentToLinkField, filter, getGraphQLEndpoint, getRepositoryEndpoint, getRepositoryName, getToolbarSrc, isFilled_d_exports as isFilled, isRepositoryEndpoint, isRepositoryName, mapSliceZone, predicate, unstable_mapSliceZone };
//# sourceMappingURL=index.d.ts.map