UNPKG

@prismicio/client

Version:

The official JavaScript + TypeScript client library for Prismic

202 lines (201 loc) 12.7 kB
import type { CustomTypeModelIntegrationField } from "./types/model/integration"; import type { IntegrationField } from "./types/value/integration"; import { RichTextNodeType } from "./types/value/richText"; import type { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer } from "./helpers/asHTML"; import { mapSliceZone } from "./helpers/mapSliceZone"; import { filter } from "./filter"; export { createClient } from "./createClient"; export { Client } from "./Client"; export { createWriteClient } from "./createWriteClient"; export { WriteClient } from "./WriteClient"; export { createMigration } from "./createMigration"; export { Migration } from "./Migration"; export { getRepositoryEndpoint } from "./getRepositoryEndpoint"; export { getRepositoryName } from "./getRepositoryName"; export { getGraphQLEndpoint } from "./getGraphQLEndpoint"; export { isRepositoryName } from "./isRepositoryName"; export { isRepositoryEndpoint } from "./isRepositoryEndpoint"; export { buildQueryURL } from "./buildQueryURL"; export { getToolbarSrc } from "./getToolbarSrc"; /** * @deprecated Renamed to `filter` */ declare const predicate: { at: (path: string, value: string | number | boolean | string[] | Date) => string; not: (path: string, value: string | number | boolean | string[] | Date) => 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; }; export { filter, predicate }; export * as cookie from "./cookie"; export type { CreateClient } from "./createClient"; export type { ClientConfig } from "./Client"; export type { CreateWriteClient } from "./createWriteClient"; export type { WriteClientConfig, MigrateReporterEvents } from "./WriteClient"; export type { AbortSignalLike, FetchLike, HttpRequestLike, RequestInitLike, ResponseLike, } from "./BaseClient"; export type { BuildQueryURLArgs, Ordering, QueryParams, Route, } from "./buildQueryURL"; export type { CreateMigration } from "./createMigration"; export { asDate } from "./helpers/asDate"; export { asLink } from "./helpers/asLink"; export { asLinkAttrs } from "./helpers/asLinkAttrs"; export { asText } from "./helpers/asText"; export { asHTML } from "./helpers/asHTML"; export { asImageSrc } from "./helpers/asImageSrc"; export { asImageWidthSrcSet } from "./helpers/asImageWidthSrcSet"; export { asImagePixelDensitySrcSet } from "./helpers/asImagePixelDensitySrcSet"; export * as isFilled from "./helpers/isFilled"; /** * @deprecated Renamed to `mapSliceZone` */ declare const unstable_mapSliceZone: typeof mapSliceZone; export { mapSliceZone, unstable_mapSliceZone }; export { documentToLinkField } from "./helpers/documentToLinkField"; export type { LinkResolverFunction } from "./helpers/asLink"; export type { AsLinkAttrsConfig } from "./helpers/asLinkAttrs"; export type { SliceMapper } from "./helpers/mapSliceZone"; /** * @deprecated Renamed to `HTMLRichTextMapSerializer` */ type HTMLMapSerializer = HTMLRichTextMapSerializer; /** * @deprecated Renamed to `HTMLRichTextFunctionSerializer` */ type HTMLFunctionSerializer = HTMLRichTextFunctionSerializer; export type { HTMLRichTextMapSerializer, HTMLRichTextFunctionSerializer, HTMLMapSerializer, HTMLFunctionSerializer, }; export type { HTMLRichTextSerializer } from "./helpers/asHTML"; export { PrismicError } from "./errors/PrismicError"; export { ForbiddenError } from "./errors/ForbiddenError"; export { NotFoundError } from "./errors/NotFoundError"; export { RefNotFoundError } from "./errors/RefNotFoundError"; export { RefExpiredError } from "./errors/RefExpiredError"; export { PreviewTokenExpiredError } from "./errors/PreviewTokenExpired"; export { ParsingError } from "./errors/ParsingError"; export { RepositoryNotFoundError } from "./errors/RepositoryNotFoundError"; /** * @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"; }; export { RichTextNodeType, Element }; export { LinkType } from "./types/value/link"; export { OEmbedType } from "./types/value/embed"; export type { PrismicDocument, PrismicDocumentWithUID, PrismicDocumentWithoutUID, PrismicDocumentHeader, AlternateLanguage, } from "./types/value/document"; export type { RichTextField, RTTextNodeBase, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTParagraphNode, RTPreformattedNode, RTListItemNode, RTOListItemNode, RTSpanNodeBase, RTStrongNode, RTEmNode, RTLabelNode, RTImageNode, RTEmbedNode, RTLinkNode, RTListNode, RTOListNode, RTSpanNode, RTNode, RTTextNode, RTBlockNode, RTInlineNode, RTAnyNode, RichTextNodeTypes, } from "./types/value/richText"; export type { TitleField } from "./types/value/title"; export type { ImageField, ImageFieldImage, FilledImageFieldImage, EmptyImageFieldImage, } from "./types/value/image"; export type { EmptyLinkField, LinkField, FilledLinkToWebField, } from "./types/value/link"; export type { ContentRelationshipField, FilledContentRelationshipField, } from "./types/value/contentRelationship"; export type { LinkToMediaField, FilledLinkToMediaField, } from "./types/value/linkToMedia"; export type { OEmbedExtra, PhotoOEmbed, VideoOEmbed, LinkOEmbed, RichOEmbed, AnyOEmbed, EmbedField, } from "./types/value/embed"; export type { TableField, TableFieldHead, TableFieldHeadRow, TableFieldBody, TableFieldBodyRow, TableFieldHeaderCell, TableFieldDataCell, } from "./types/value/table"; export type { BooleanField } from "./types/value/boolean"; export type { ColorField } from "./types/value/color"; export type { DateField } from "./types/value/date"; export type { KeyTextField } from "./types/value/keyText"; export type { NumberField } from "./types/value/number"; export type { SelectField } from "./types/value/select"; export type { TimestampField } from "./types/value/timestamp"; export type { GeoPointField } from "./types/value/geoPoint"; /** * @deprecated Renamed to `IntegrationField` */ type IntegrationFields = IntegrationField; export { IntegrationField, IntegrationFields }; export type { GroupField, NestedGroupField } from "./types/value/group"; export type { SliceZone } from "./types/value/sliceZone"; export type { Slice } from "./types/value/slice"; export type { SharedSlice } from "./types/value/sharedSlice"; export type { SharedSliceVariation } from "./types/value/sharedSliceVariation"; export type { FieldState, AnyRegularField, AnySlicePrimaryField, Repeatable, } from "./types/value/types"; export { CustomTypeModelFieldType } from "./types/model/types"; export { CustomTypeModelLinkSelectType } from "./types/model/link"; export { CustomTypeModelSliceType } from "./types/model/sliceZone"; export { CustomTypeModelSliceDisplay } from "./types/model/slice"; export type { CustomTypeModel, CustomTypeModelDefinition, CustomTypeModelTab, } from "./types/model/customType"; export type { CustomTypeModelRichTextField, CustomTypeModelRichTextMultiField, CustomTypeModelRichTextSingleField, } from "./types/model/richText"; export type { CustomTypeModelTitleField } from "./types/model/title"; export type { CustomTypeModelImageField, CustomTypeModelImageConstraint, CustomTypeModelImageThumbnail, } from "./types/model/image"; export type { CustomTypeModelFetchCustomTypeLevel1, CustomTypeModelFetchContentRelationshipLevel1, CustomTypeModelFetchGroupLevel1, CustomTypeModelFetchCustomTypeLevel2, CustomTypeModelFetchGroupLevel2, CustomTypeModelContentRelationshipField, } from "./types/model/contentRelationship"; export type { CustomTypeModelLinkField } from "./types/model/link"; export type { CustomTypeModelLinkToMediaField } from "./types/model/linkToMedia"; export type { CustomTypeModelEmbedField } from "./types/model/embed"; export type { CustomTypeModelBooleanField } from "./types/model/boolean"; export type { CustomTypeModelColorField } from "./types/model/color"; export type { CustomTypeModelDateField } from "./types/model/date"; export type { CustomTypeModelKeyTextField } from "./types/model/keyText"; export type { CustomTypeModelNumberField } from "./types/model/number"; export type { CustomTypeModelSelectField } from "./types/model/select"; export type { CustomTypeModelTimestampField } from "./types/model/timestamp"; export type { CustomTypeModelGeoPointField } from "./types/model/geoPoint"; export type { CustomTypeModelTableField } from "./types/model/table"; /** * @deprecated Renamed to `CustomTypeModelIntegrationField`. */ type CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField; export { CustomTypeModelIntegrationField, CustomTypeModelIntegrationFieldsField, }; export type { CustomTypeModelGroupField, CustomTypeModelNestedGroupField, } from "./types/model/group"; export type { CustomTypeModelSliceZoneField, CustomTypeModelSliceLabel, CustomTypeModelSharedSlice, } from "./types/model/sliceZone"; export type { CustomTypeModelSlice, CustomTypeModelLegacySlice, } from "./types/model/slice"; export type { SharedSliceModel } from "./types/model/sharedSlice"; export type { SharedSliceModelVariation } from "./types/model/sharedSliceVariation"; export type { CustomTypeModelUIDField } from "./types/model/uid"; export type { CustomTypeModelRangeField } from "./types/model/range"; export type { CustomTypeModelSeparatorField } from "./types/model/separator"; export type { CustomTypeModelField, CustomTypeModelFieldForGroup, CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary, } from "./types/model/types"; export { PrismicMigrationDocument } from "./types/migration/Document"; export type { PendingPrismicDocument, ExistingPrismicDocument, InjectMigrationSpecificTypes, } from "./types/migration/Document"; export { PrismicMigrationAsset } from "./types/migration/Asset"; export type { MigrationImage, MigrationLinkToMedia, MigrationRTImageNode, } from "./types/migration/Asset"; export type { MigrationContentRelationship } from "./types/migration/ContentRelationship"; export type { Query } from "./types/api/query"; export type { Ref } from "./types/api/ref"; export type { Release } from "./types/api/release"; export type { Repository, Language, Form, FormField, } from "./types/api/repository"; export type { Tags } from "./types/api/tags"; export { WebhookType } from "./types/webhook/types"; export type { WebhookBody } from "./types/webhook/types"; export type { WebhookBodyAPIUpdate } from "./types/webhook/apiUpdate"; export type { WebhookBodyTestTrigger } from "./types/webhook/testTrigger";