UNPKG

payload

Version:

Node, React, Headless CMS and Application Framework built on Next.js

1,025 lines (1,005 loc) • 538 kB
import { Locale as Locale$1 } from 'date-fns'; import DataLoader from 'dataloader'; import { URL } from 'url'; import GraphQL, { GraphQLNonNull, GraphQLObjectType, GraphQLFormattedError, GraphQLInputObjectType, ExecutionResult, GraphQLSchema, ValidationRule } from 'graphql'; import React$1, { CSSProperties } from 'react'; import { BusboyConfig } from 'busboy'; import { JSONSchema4, JSONSchema4TypeName } from 'json-schema'; import { Metadata } from 'next'; import { Logger, DestinationStream, LoggerOptions, Level } from 'pino'; import sharp, { Metadata as Metadata$1, SharpOptions, Sharp, ResizeOptions } from 'sharp'; import { EditorProps } from '@monaco-editor/react'; import { OperationArgs as OperationArgs$1, Request as Request$1 } from 'graphql-http'; import { SendMailOptions } from 'nodemailer'; import { ParsedArgs } from 'minimist'; import { lookup } from 'dns'; import deepMerge from 'deepmerge'; export { default as deepMerge } from 'deepmerge'; import { ReadonlyRequestCookies } from 'next/dist/server/web/spec-extension/adapters/request-cookies.js'; import { PinoPretty } from 'pino-pretty'; import { DatePickerProps } from 'react-datepicker'; declare const clientTranslationKeys: ("authentication:account" | "authentication:accountOfCurrentUser" | "authentication:accountVerified" | "authentication:alreadyActivated" | "authentication:alreadyLoggedIn" | "authentication:apiKey" | "authentication:authenticated" | "authentication:backToLogin" | "authentication:beginCreateFirstUser" | "authentication:changePassword" | "authentication:checkYourEmailForPasswordReset" | "authentication:confirmGeneration" | "authentication:confirmPassword" | "authentication:createFirstUser" | "authentication:emailNotValid" | "authentication:emailOrUsername" | "authentication:emailSent" | "authentication:emailVerified" | "authentication:enableAPIKey" | "authentication:failedToUnlock" | "authentication:forceUnlock" | "authentication:forgotPassword" | "authentication:forgotPasswordEmailInstructions" | "authentication:forgotPasswordUsernameInstructions" | "authentication:usernameNotValid" | "authentication:forgotPasswordQuestion" | "authentication:generate" | "authentication:generateNewAPIKey" | "authentication:generatingNewAPIKeyWillInvalidate" | "authentication:logBackIn" | "authentication:loggedIn" | "authentication:loggedInChangePassword" | "authentication:loggedOutInactivity" | "authentication:loggedOutSuccessfully" | "authentication:loggingOut" | "authentication:login" | "authentication:logOut" | "authentication:logout" | "authentication:logoutSuccessful" | "authentication:logoutUser" | "authentication:newAPIKeyGenerated" | "authentication:newPassword" | "authentication:passed" | "authentication:passwordResetSuccessfully" | "authentication:resetPassword" | "authentication:stayLoggedIn" | "authentication:successfullyRegisteredFirstUser" | "authentication:successfullyUnlocked" | "authentication:tokenRefreshSuccessful" | "authentication:unableToVerify" | "authentication:username" | "authentication:verified" | "authentication:verifiedSuccessfully" | "authentication:verify" | "authentication:verifyUser" | "authentication:youAreInactive" | "dashboard:addWidget" | "dashboard:deleteWidget" | "dashboard:searchWidgets" | "error:autosaving" | "error:correctInvalidFields" | "error:deletingTitle" | "error:documentNotFound" | "error:emailOrPasswordIncorrect" | "error:insufficientClipboardPermissions" | "error:invalidClipboardData" | "error:invalidFileType" | "error:invalidRequestArgs" | "error:loadingDocument" | "error:logoutFailed" | "error:noMatchedField" | "error:notAllowedToAccessPage" | "error:previewing" | "error:problemUploadingFile" | "error:restoringTitle" | "error:tokenNotProvided" | "error:unableToCopy" | "error:unableToDeleteCount" | "error:unableToReindexCollection" | "error:unableToUpdateCount" | "error:unauthorized" | "error:unauthorizedAdmin" | "error:unknown" | "error:unPublishingDocument" | "error:unspecific" | "error:unverifiedEmail" | "error:userEmailAlreadyRegistered" | "error:usernameAlreadyRegistered" | "error:usernameOrPasswordIncorrect" | "fields:blocks" | "fields:addLabel" | "fields:addLink" | "fields:addNew" | "fields:addNewLabel" | "fields:addRelationship" | "fields:addUpload" | "fields:block" | "fields:blockType" | "fields:chooseBetweenCustomTextOrDocument" | "fields:chooseDocumentToLink" | "fields:chooseFromExisting" | "fields:collapseAll" | "fields:customURL" | "fields:editLink" | "fields:editRelationship" | "fields:enterURL" | "fields:internalLink" | "fields:itemsAndMore" | "fields:labelRelationship" | "fields:latitude" | "fields:linkedTo" | "fields:linkType" | "fields:longitude" | "fields:openInNewTab" | "fields:passwordsDoNotMatch" | "fields:removeRelationship" | "fields:removeUpload" | "fields:saveChanges" | "fields:searchForBlock" | "fields:searchForLanguage" | "fields:selectFieldsToEdit" | "fields:showAll" | "fields:swapRelationship" | "fields:swapUpload" | "fields:textToDisplay" | "fields:toggleBlock" | "fields:uploadNewLabel" | "folder:browseByFolder" | "folder:byFolder" | "folder:deleteFolder" | "folder:folderName" | "folder:folders" | "folder:folderTypeDescription" | "folder:itemHasBeenMoved" | "folder:itemHasBeenMovedToRoot" | "folder:itemsMovedToFolder" | "folder:itemsMovedToRoot" | "folder:moveFolder" | "folder:moveItemsToFolderConfirmation" | "folder:moveItemsToRootConfirmation" | "folder:moveItemToFolderConfirmation" | "folder:moveItemToRootConfirmation" | "folder:movingFromFolder" | "folder:newFolder" | "folder:noFolder" | "folder:renameFolder" | "folder:searchByNameInFolder" | "folder:selectFolderForItem" | "general:items" | "general:of" | "general:language" | "general:dashboard" | "general:error" | "general:username" | "general:notFound" | "general:unauthorized" | "general:newLabel" | "general:name" | "general:aboutToDelete" | "general:aboutToPermanentlyDelete" | "general:aboutToPermanentlyDeleteTrash" | "general:aboutToRestore" | "general:aboutToRestoreAsDraft" | "general:aboutToRestoreAsDraftCount" | "general:aboutToRestoreCount" | "general:aboutToTrash" | "general:aboutToTrashCount" | "general:addBelow" | "general:addFilter" | "general:adminTheme" | "general:all" | "general:allCollections" | "general:allLocales" | "general:and" | "general:anotherUser" | "general:anotherUserTakenOver" | "general:applyChanges" | "general:ascending" | "general:automatic" | "general:backToDashboard" | "general:cancel" | "general:changesNotSaved" | "general:clear" | "general:clearAll" | "general:close" | "general:collapse" | "general:collections" | "general:columns" | "general:columnToSort" | "general:confirm" | "general:confirmCopy" | "general:confirmDeletion" | "general:confirmDuplication" | "general:confirmMove" | "general:confirmReindex" | "general:confirmReindexAll" | "general:confirmReindexDescription" | "general:confirmReindexDescriptionAll" | "general:confirmRestoration" | "general:copied" | "general:copy" | "general:copyField" | "general:copying" | "general:copyRow" | "general:copyWarning" | "general:create" | "general:created" | "general:createdAt" | "general:createNew" | "general:createNewLabel" | "general:creating" | "general:creatingNewLabel" | "general:currentlyEditing" | "general:custom" | "general:dark" | "general:delete" | "general:deleted" | "general:deletedAt" | "general:deletedCountSuccessfully" | "general:deletedSuccessfully" | "general:deleteLabel" | "general:deletePermanently" | "general:deleting" | "general:depth" | "general:descending" | "general:deselectAllRows" | "general:document" | "general:documentIsTrashed" | "general:documentLocked" | "general:documents" | "general:duplicate" | "general:duplicateWithoutSaving" | "general:edit" | "general:editAll" | "general:editedSince" | "general:editing" | "general:editingTakenOver" | "general:editLabel" | "general:email" | "general:emailAddress" | "general:emptyTrash" | "general:emptyTrashLabel" | "general:enterAValue" | "general:errors" | "general:exitLivePreview" | "general:export" | "general:fallbackToDefaultLocale" | "general:false" | "general:filters" | "general:filterWhere" | "general:globals" | "general:goBack" | "general:groupByLabel" | "general:import" | "general:isEditing" | "general:item" | "general:lastModified" | "general:leaveAnyway" | "general:leaveWithoutSaving" | "general:light" | "general:livePreview" | "general:loading" | "general:locale" | "general:locales" | "general:lock" | "general:menu" | "general:moreOptions" | "general:move" | "general:moveConfirm" | "general:moveCount" | "general:moveDown" | "general:moveUp" | "general:moving" | "general:movingCount" | "general:next" | "general:no" | "general:noDateSelected" | "general:noFiltersSet" | "general:noLabel" | "general:none" | "general:noOptions" | "general:noResults" | "general:nothingFound" | "general:noTrashResults" | "general:noUpcomingEventsScheduled" | "general:noValue" | "general:only" | "general:open" | "general:or" | "general:order" | "general:overwriteExistingData" | "general:pageNotFound" | "general:password" | "general:pasteField" | "general:pasteRow" | "general:payloadSettings" | "general:permanentlyDelete" | "general:permanentlyDeletedCountSuccessfully" | "general:perPage" | "general:previous" | "general:reindex" | "general:reindexingAll" | "general:remove" | "general:rename" | "general:reset" | "general:resetPreferences" | "general:resetPreferencesDescription" | "general:resettingPreferences" | "general:restore" | "general:restoreAsPublished" | "general:restoredCountSuccessfully" | "general:restoring" | "general:row" | "general:rows" | "general:save" | "general:saving" | "general:schedulePublishFor" | "general:searchBy" | "general:select" | "general:selectAll" | "general:selectAllRows" | "general:selectedCount" | "general:selectLabel" | "general:selectValue" | "general:showAllLabel" | "general:sorryNotFound" | "general:sort" | "general:sortByLabelDirection" | "general:stayOnThisPage" | "general:submissionSuccessful" | "general:submit" | "general:submitting" | "general:success" | "general:successfullyCreated" | "general:successfullyDuplicated" | "general:successfullyReindexed" | "general:takeOver" | "general:thisLanguage" | "general:time" | "general:timezone" | "general:titleDeleted" | "general:titleRestored" | "general:titleTrashed" | "general:trash" | "general:trashedCountSuccessfully" | "general:true" | "general:unlock" | "general:unsavedChanges" | "general:unsavedChangesDuplicate" | "general:untitled" | "general:upcomingEvents" | "general:updatedAt" | "general:updatedCountSuccessfully" | "general:updatedLabelSuccessfully" | "general:updatedSuccessfully" | "general:updateForEveryone" | "general:updating" | "general:uploading" | "general:uploadingBulk" | "general:user" | "general:users" | "general:value" | "general:viewing" | "general:viewReadOnly" | "general:welcome" | "general:yes" | "localization:cannotCopySameLocale" | "localization:copyFrom" | "localization:copyFromTo" | "localization:copyTo" | "localization:copyToLocale" | "localization:localeToPublish" | "localization:selectedLocales" | "localization:selectLocaleToCopy" | "localization:selectLocaleToDuplicate" | "operators:contains" | "operators:equals" | "operators:exists" | "operators:intersects" | "operators:near" | "operators:within" | "operators:isGreaterThan" | "operators:isGreaterThanOrEqualTo" | "operators:isIn" | "operators:isLessThan" | "operators:isLessThanOrEqualTo" | "operators:isLike" | "operators:isNotEqualTo" | "operators:isNotIn" | "operators:isNotLike" | "upload:addFile" | "upload:addFiles" | "upload:bulkUpload" | "upload:crop" | "upload:cropToolDescription" | "upload:download" | "upload:dragAndDrop" | "upload:editImage" | "upload:fileName" | "upload:fileSize" | "upload:filesToUpload" | "upload:fileToUpload" | "upload:focalPoint" | "upload:focalPointDescription" | "upload:height" | "upload:noFile" | "upload:pasteURL" | "upload:previewSizes" | "upload:selectCollectionToBrowse" | "upload:selectFile" | "upload:setCropArea" | "upload:setFocalPoint" | "upload:sizes" | "upload:sizesFor" | "upload:width" | "validation:username" | "validation:emailAddress" | "validation:enterNumber" | "validation:fieldHasNo" | "validation:greaterThanMax" | "validation:invalidBlock" | "validation:invalidBlocks" | "validation:invalidInput" | "validation:invalidSelection" | "validation:invalidSelections" | "validation:latitudeOutOfBounds" | "validation:lessThanMin" | "validation:limitReached" | "validation:longerThanMin" | "validation:longitudeOutOfBounds" | "validation:notValidDate" | "validation:required" | "validation:requiresAtLeast" | "validation:requiresNoMoreThan" | "validation:requiresTwoNumbers" | "validation:shorterThanMax" | "validation:timezoneRequired" | "validation:trueOrFalse" | "validation:validUploadID" | "version:version" | "version:aboutToRestore" | "version:restoring" | "version:type" | "version:aboutToPublishSelection" | "version:aboutToRestoreGlobal" | "version:aboutToRevertToPublished" | "version:aboutToUnpublish" | "version:aboutToUnpublishSelection" | "version:autosave" | "version:autosavedSuccessfully" | "version:autosavedVersion" | "version:changed" | "version:compareVersions" | "version:comparingAgainst" | "version:confirmPublish" | "version:confirmRevertToSaved" | "version:confirmUnpublish" | "version:confirmVersionRestoration" | "version:currentDraft" | "version:currentlyPublished" | "version:currentlyViewing" | "version:currentPublishedVersion" | "version:draft" | "version:draftHasPublishedVersion" | "version:draftSavedSuccessfully" | "version:lastSavedAgo" | "version:modifiedOnly" | "version:moreVersions" | "version:noFurtherVersionsFound" | "version:noLabelGroup" | "version:noRowsFound" | "version:noRowsSelected" | "version:preview" | "version:previouslyDraft" | "version:previouslyPublished" | "version:previousVersion" | "version:problemRestoringVersion" | "version:publish" | "version:publishAllLocales" | "version:publishChanges" | "version:published" | "version:publishIn" | "version:publishing" | "version:restoreAsDraft" | "version:restoredSuccessfully" | "version:restoreThisVersion" | "version:reverting" | "version:revertToPublished" | "version:saveDraft" | "version:scheduledSuccessfully" | "version:schedulePublish" | "version:selectLocales" | "version:selectVersionToCompare" | "version:showLocales" | "version:specificVersion" | "version:status" | "version:unpublish" | "version:unpublishing" | "version:versionAgo" | "version:versionID" | "version:versions" | "version:viewingVersion" | "version:viewingVersionGlobal" | "version:viewingVersions" | "version:viewingVersionsGlobal" | "general:aboutToDeleteCount" | "general:editingLabel" | "version:changedFieldsCount")[]; declare const enTranslations: { authentication: { account: string; accountOfCurrentUser: string; accountVerified: string; alreadyActivated: string; alreadyLoggedIn: string; apiKey: string; authenticated: string; backToLogin: string; beginCreateFirstUser: string; changePassword: string; checkYourEmailForPasswordReset: string; confirmGeneration: string; confirmPassword: string; createFirstUser: string; emailNotValid: string; emailOrUsername: string; emailSent: string; emailVerified: string; enableAPIKey: string; failedToUnlock: string; forceUnlock: string; forgotPassword: string; forgotPasswordEmailInstructions: string; forgotPasswordUsernameInstructions: string; usernameNotValid: string; forgotPasswordQuestion: string; generate: string; generateNewAPIKey: string; generatingNewAPIKeyWillInvalidate: string; lockUntil: string; logBackIn: string; loggedIn: string; loggedInChangePassword: string; loggedOutInactivity: string; loggedOutSuccessfully: string; loggingOut: string; login: string; loginAttempts: string; loginUser: string; loginWithAnotherUser: string; logOut: string; logout: string; logoutSuccessful: string; logoutUser: string; newAccountCreated: string; newAPIKeyGenerated: string; newPassword: string; passed: string; passwordResetSuccessfully: string; resetPassword: string; resetPasswordExpiration: string; resetPasswordToken: string; resetYourPassword: string; stayLoggedIn: string; successfullyRegisteredFirstUser: string; successfullyUnlocked: string; tokenRefreshSuccessful: string; unableToVerify: string; username: string; verified: string; verifiedSuccessfully: string; verify: string; verifyUser: string; verifyYourEmail: string; youAreInactive: string; youAreReceivingResetPassword: string; youDidNotRequestPassword: string; }; dashboard: { addWidget: string; deleteWidget: string; searchWidgets: string; }; error: { accountAlreadyActivated: string; autosaving: string; correctInvalidFields: string; deletingFile: string; deletingTitle: string; documentNotFound: string; emailOrPasswordIncorrect: string; followingFieldsInvalid_one: string; followingFieldsInvalid_other: string; incorrectCollection: string; insufficientClipboardPermissions: string; invalidClipboardData: string; invalidFileType: string; invalidFileTypeValue: string; invalidRequestArgs: string; loadingDocument: string; localesNotSaved_one: string; localesNotSaved_other: string; logoutFailed: string; missingEmail: string; missingIDOfDocument: string; missingIDOfVersion: string; missingRequiredData: string; noFilesUploaded: string; noMatchedField: string; notAllowedToAccessPage: string; notAllowedToPerformAction: string; notFound: string; noUser: string; previewing: string; problemUploadingFile: string; restoringTitle: string; tokenInvalidOrExpired: string; tokenNotProvided: string; unableToCopy: string; unableToDeleteCount: string; unableToReindexCollection: string; unableToUpdateCount: string; unauthorized: string; unauthorizedAdmin: string; unknown: string; unPublishingDocument: string; unspecific: string; unverifiedEmail: string; userEmailAlreadyRegistered: string; userLocked: string; usernameAlreadyRegistered: string; usernameOrPasswordIncorrect: string; valueMustBeUnique: string; verificationTokenInvalid: string; }; fields: { addLabel: string; addLink: string; addNew: string; addNewLabel: string; addRelationship: string; addUpload: string; block: string; blocks: string; blockType: string; chooseBetweenCustomTextOrDocument: string; chooseDocumentToLink: string; chooseFromExisting: string; chooseLabel: string; collapseAll: string; customURL: string; editLabelData: string; editLink: string; editRelationship: string; enterURL: string; internalLink: string; itemsAndMore: string; labelRelationship: string; latitude: string; linkedTo: string; linkType: string; longitude: string; newLabel: string; openInNewTab: string; passwordsDoNotMatch: string; relatedDocument: string; relationTo: string; removeRelationship: string; removeUpload: string; saveChanges: string; searchForBlock: string; searchForLanguage: string; selectExistingLabel: string; selectFieldsToEdit: string; showAll: string; swapRelationship: string; swapUpload: string; textToDisplay: string; toggleBlock: string; uploadNewLabel: string; }; folder: { browseByFolder: string; byFolder: string; deleteFolder: string; folderName: string; folders: string; folderTypeDescription: string; itemHasBeenMoved: string; itemHasBeenMovedToRoot: string; itemsMovedToFolder: string; itemsMovedToRoot: string; moveFolder: string; moveItemsToFolderConfirmation: string; moveItemsToRootConfirmation: string; moveItemToFolderConfirmation: string; moveItemToRootConfirmation: string; movingFromFolder: string; newFolder: string; noFolder: string; renameFolder: string; searchByNameInFolder: string; selectFolderForItem: string; }; general: { name: string; aboutToDelete: string; aboutToDeleteCount_many: string; aboutToDeleteCount_one: string; aboutToDeleteCount_other: string; aboutToPermanentlyDelete: string; aboutToPermanentlyDeleteTrash: string; aboutToRestore: string; aboutToRestoreAsDraft: string; aboutToRestoreAsDraftCount: string; aboutToRestoreCount: string; aboutToTrash: string; aboutToTrashCount: string; addBelow: string; addFilter: string; adminTheme: string; all: string; allCollections: string; allLocales: string; and: string; anotherUser: string; anotherUserTakenOver: string; applyChanges: string; ascending: string; automatic: string; backToDashboard: string; cancel: string; changesNotSaved: string; clear: string; clearAll: string; close: string; collapse: string; collections: string; columns: string; columnToSort: string; confirm: string; confirmCopy: string; confirmDeletion: string; confirmDuplication: string; confirmMove: string; confirmReindex: string; confirmReindexAll: string; confirmReindexDescription: string; confirmReindexDescriptionAll: string; confirmRestoration: string; copied: string; copy: string; copyField: string; copying: string; copyRow: string; copyWarning: string; create: string; created: string; createdAt: string; createNew: string; createNewLabel: string; creating: string; creatingNewLabel: string; currentlyEditing: string; custom: string; dark: string; dashboard: string; delete: string; deleted: string; deletedAt: string; deletedCountSuccessfully: string; deletedSuccessfully: string; deleteLabel: string; deletePermanently: string; deleting: string; depth: string; descending: string; deselectAllRows: string; document: string; documentIsTrashed: string; documentLocked: string; documents: string; duplicate: string; duplicateWithoutSaving: string; edit: string; editAll: string; editedSince: string; editing: string; editingLabel_many: string; editingLabel_one: string; editingLabel_other: string; editingTakenOver: string; editLabel: string; email: string; emailAddress: string; emptyTrash: string; emptyTrashLabel: string; enterAValue: string; error: string; errors: string; exitLivePreview: string; export: string; fallbackToDefaultLocale: string; false: string; filter: string; filters: string; filterWhere: string; globals: string; goBack: string; groupByLabel: string; import: string; isEditing: string; item: string; items: string; language: string; lastModified: string; leaveAnyway: string; leaveWithoutSaving: string; light: string; livePreview: string; loading: string; locale: string; locales: string; lock: string; menu: string; moreOptions: string; move: string; moveConfirm: string; moveCount: string; moveDown: string; moveUp: string; moving: string; movingCount: string; newLabel: string; newPassword: string; next: string; no: string; noDateSelected: string; noFiltersSet: string; noLabel: string; none: string; noOptions: string; noResults: string; notFound: string; nothingFound: string; noTrashResults: string; noUpcomingEventsScheduled: string; noValue: string; of: string; only: string; open: string; or: string; order: string; overwriteExistingData: string; pageNotFound: string; password: string; pasteField: string; pasteRow: string; payloadSettings: string; permanentlyDelete: string; permanentlyDeletedCountSuccessfully: string; perPage: string; previous: string; reindex: string; reindexingAll: string; remove: string; rename: string; reset: string; resetPreferences: string; resetPreferencesDescription: string; resettingPreferences: string; restore: string; restoreAsPublished: string; restoredCountSuccessfully: string; restoring: string; row: string; rows: string; save: string; saving: string; schedulePublishFor: string; searchBy: string; select: string; selectAll: string; selectAllRows: string; selectedCount: string; selectLabel: string; selectValue: string; showAllLabel: string; sorryNotFound: string; sort: string; sortByLabelDirection: string; stayOnThisPage: string; submissionSuccessful: string; submit: string; submitting: string; success: string; successfullyCreated: string; successfullyDuplicated: string; successfullyReindexed: string; takeOver: string; thisLanguage: string; time: string; timezone: string; titleDeleted: string; titleRestored: string; titleTrashed: string; trash: string; trashedCountSuccessfully: string; true: string; unauthorized: string; unlock: string; unsavedChanges: string; unsavedChangesDuplicate: string; untitled: string; upcomingEvents: string; updatedAt: string; updatedCountSuccessfully: string; updatedLabelSuccessfully: string; updatedSuccessfully: string; updateForEveryone: string; updating: string; uploading: string; uploadingBulk: string; user: string; username: string; users: string; value: string; viewing: string; viewReadOnly: string; welcome: string; yes: string; }; localization: { cannotCopySameLocale: string; copyFrom: string; copyFromTo: string; copyTo: string; copyToLocale: string; localeToPublish: string; selectedLocales: string; selectLocaleToCopy: string; selectLocaleToDuplicate: string; }; operators: { contains: string; equals: string; exists: string; intersects: string; isGreaterThan: string; isGreaterThanOrEqualTo: string; isIn: string; isLessThan: string; isLessThanOrEqualTo: string; isLike: string; isNotEqualTo: string; isNotIn: string; isNotLike: string; near: string; within: string; }; upload: { addFile: string; addFiles: string; bulkUpload: string; crop: string; cropToolDescription: string; download: string; dragAndDrop: string; dragAndDropHere: string; editImage: string; fileName: string; fileSize: string; filesToUpload: string; fileToUpload: string; focalPoint: string; focalPointDescription: string; height: string; lessInfo: string; moreInfo: string; noFile: string; pasteURL: string; previewSizes: string; selectCollectionToBrowse: string; selectFile: string; setCropArea: string; setFocalPoint: string; sizes: string; sizesFor: string; width: string; }; validation: { emailAddress: string; enterNumber: string; fieldHasNo: string; greaterThanMax: string; invalidBlock: string; invalidBlocks: string; invalidInput: string; invalidSelection: string; invalidSelections: string; latitudeOutOfBounds: string; lessThanMin: string; limitReached: string; longerThanMin: string; longitudeOutOfBounds: string; notValidDate: string; required: string; requiresAtLeast: string; requiresNoMoreThan: string; requiresTwoNumbers: string; shorterThanMax: string; timezoneRequired: string; trueOrFalse: string; username: string; validUploadID: string; }; version: { type: string; aboutToPublishSelection: string; aboutToRestore: string; aboutToRestoreGlobal: string; aboutToRevertToPublished: string; aboutToUnpublish: string; aboutToUnpublishSelection: string; autosave: string; autosavedSuccessfully: string; autosavedVersion: string; changed: string; changedFieldsCount_one: string; changedFieldsCount_other: string; compareVersion: string; compareVersions: string; comparingAgainst: string; confirmPublish: string; confirmRevertToSaved: string; confirmUnpublish: string; confirmVersionRestoration: string; currentDocumentStatus: string; currentDraft: string; currentlyPublished: string; currentlyViewing: string; currentPublishedVersion: string; draft: string; draftHasPublishedVersion: string; draftSavedSuccessfully: string; lastSavedAgo: string; modifiedOnly: string; moreVersions: string; noFurtherVersionsFound: string; noLabelGroup: string; noRowsFound: string; noRowsSelected: string; preview: string; previouslyDraft: string; previouslyPublished: string; previousVersion: string; problemRestoringVersion: string; publish: string; publishAllLocales: string; publishChanges: string; published: string; publishIn: string; publishing: string; restoreAsDraft: string; restoredSuccessfully: string; restoreThisVersion: string; restoring: string; reverting: string; revertToPublished: string; saveDraft: string; scheduledSuccessfully: string; schedulePublish: string; selectLocales: string; selectVersionToCompare: string; showingVersionsFor: string; showLocales: string; specificVersion: string; status: string; unpublish: string; unpublishing: string; version: string; versionAgo: string; versionCount_many: string; versionCount_none: string; versionCount_one: string; versionCount_other: string; versionID: string; versions: string; viewingVersion: string; viewingVersionGlobal: string; viewingVersions: string; viewingVersionsGlobal: string; }; }; declare const acceptedLanguages: readonly ["ar", "az", "bg", "bn-BD", "bn-IN", "ca", "cs", "bn-BD", "bn-IN", "da", "de", "en", "es", "et", "fa", "fr", "he", "hr", "hu", "hy", "id", "is", "it", "ja", "ko", "lt", "lv", "my", "nb", "nl", "pl", "pt", "ro", "rs", "rs-latin", "ru", "sk", "sl", "sv", "ta", "th", "tr", "uk", "vi", "zh", "zh-TW"]; type DateFNSKeys = 'ar' | 'az' | 'bg' | 'bn-BD' | 'bn-IN' | 'ca' | 'cs' | 'da' | 'de' | 'en-US' | 'es' | 'et' | 'fa-IR' | 'fr' | 'he' | 'hr' | 'hu' | 'hy-AM' | 'id' | 'is' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'nb' | 'nl' | 'pl' | 'pt' | 'ro' | 'rs' | 'rs-Latin' | 'ru' | 'sk' | 'sl-SI' | 'sv' | 'ta' | 'th' | 'tr' | 'uk' | 'vi' | 'zh-CN' | 'zh-TW'; type Language<TDefaultTranslations = DefaultTranslationsObject> = { dateFNSKey: DateFNSKeys; translations: TDefaultTranslations; }; type GenericTranslationsObject = { [key: string]: GenericTranslationsObject | string; }; type GenericLanguages = { [key in AcceptedLanguages]?: GenericTranslationsObject; }; type AcceptedLanguages = (typeof acceptedLanguages)[number]; type SupportedLanguages<TDefaultTranslations = DefaultTranslationsObject> = { [key in AcceptedLanguages]?: Language<TDefaultTranslations>; }; type StripCountVariants<TKey> = TKey extends `${infer Base}_many` | `${infer Base}_one` | `${infer Base}_other` ? Base : TKey; type NestedKeysStripped<T> = T extends object ? { [K in keyof T]-?: K extends string ? T[K] extends object ? `${K}:${NestedKeysStripped<T[K]>}` : `${StripCountVariants<K>}` : never; }[keyof T] : ''; /** * Default nested translations object */ type DefaultTranslationsObject = typeof enTranslations; /** * All translation keys sanitized. E.g. 'general:aboutToDeleteCount' */ type DefaultTranslationKeys = NestedKeysStripped<DefaultTranslationsObject>; type ClientTranslationKeys<TExtraProps = (typeof clientTranslationKeys)[number]> = TExtraProps; type ClientTranslationsObject = GenericTranslationsObject; type TFunction<TTranslationKeys = DefaultTranslationKeys> = (key: TTranslationKeys, options?: Record<string, any>) => string; type I18n<TTranslations = DefaultTranslationsObject, TTranslationKeys = DefaultTranslationKeys> = { dateFNS: Locale$1; /** Corresponding dateFNS key */ dateFNSKey: DateFNSKeys; /** The fallback language */ fallbackLanguage: string; /** The language of the request */ language: string; /** Translate function */ t: TFunction<TTranslationKeys>; translations: Language<TTranslations>['translations']; }; type I18nOptions<TTranslations = DefaultTranslationsObject> = { fallbackLanguage?: AcceptedLanguages; supportedLanguages?: SupportedLanguages; translations?: Partial<{ [key in AcceptedLanguages]?: Language<TTranslations>['translations']; }>; }; type I18nClient<TAdditionalTranslations = {}, TAdditionalKeys extends string = never> = I18n<TAdditionalTranslations extends object ? ClientTranslationsObject & TAdditionalTranslations : ClientTranslationsObject, [ TAdditionalKeys ] extends [never] ? ClientTranslationKeys : ClientTranslationKeys | TAdditionalKeys>; type Primitive = string | number | boolean | bigint | symbol | undefined | null; type Builtin = Primitive | Function | Date | Error | RegExp; type NonNever<Type extends {}> = Pick<Type, { [Key in keyof Type]: Type[Key] extends never ? never : Key; }[keyof Type]>; type IsAny$1<Type> = 0 extends 1 & Type ? true : false; type IsUnknown<Type> = IsAny$1<Type> extends true ? false : unknown extends Type ? true : false; type MarkOptional<Type, Keys extends keyof Type> = Type extends Type ? Omit<Type, Keys> & Partial<Pick<Type, Keys>> : never; type MarkRequired<Type, Keys extends keyof Type> = Type extends Type ? Type & Required<Pick<Type, Keys>> : never; type IsTuple<Type> = Type extends readonly any[] ? (any[] extends Type ? never : Type) : never; type DeepPartial<Type> = Type extends Exclude<Builtin, Error> ? Type : Type extends Map<infer Keys, infer Values> ? Map<DeepPartial<Keys>, DeepPartial<Values>> : Type extends ReadonlyMap<infer Keys, infer Values> ? ReadonlyMap<DeepPartial<Keys>, DeepPartial<Values>> : Type extends WeakMap<infer Keys, infer Values> ? WeakMap<DeepPartial<Keys>, DeepPartial<Values>> : Type extends Set<infer Values> ? Set<DeepPartial<Values>> : Type extends ReadonlySet<infer Values> ? ReadonlySet<DeepPartial<Values>> : Type extends WeakSet<infer Values> ? WeakSet<DeepPartial<Values>> : Type extends ReadonlyArray<infer Values> ? Type extends IsTuple<Type> ? { [Key in keyof Type]?: DeepPartial<Type[Key]>; } : Type extends Array<Values> ? Array<DeepPartial<Values> | undefined> : ReadonlyArray<DeepPartial<Values> | undefined> : Type extends Promise<infer Value> ? Promise<DeepPartial<Value>> : Type extends {} ? { [Key in keyof Type]?: DeepPartial<Type[Key]>; } : IsUnknown<Type> extends true ? unknown : Partial<Type>; type DeepRequired<Type> = Type extends Error ? Required<Type> : Type extends Builtin ? Type : Type extends Map<infer Keys, infer Values> ? Map<DeepRequired<Keys>, DeepRequired<Values>> : Type extends ReadonlyMap<infer Keys, infer Values> ? ReadonlyMap<DeepRequired<Keys>, DeepRequired<Values>> : Type extends WeakMap<infer Keys, infer Values> ? WeakMap<DeepRequired<Keys>, DeepRequired<Values>> : Type extends Set<infer Values> ? Set<DeepRequired<Values>> : Type extends ReadonlySet<infer Values> ? ReadonlySet<DeepRequired<Values>> : Type extends WeakSet<infer Values> ? WeakSet<DeepRequired<Values>> : Type extends Promise<infer Value> ? Promise<DeepRequired<Value>> : Type extends ReadonlyArray<infer Values> ? Type extends IsTuple<Type> ? { [Key in keyof Type]-?: DeepRequired<Type[Key]>; } : Type extends Array<Values> ? Array<Exclude<DeepRequired<Values>, undefined>> : ReadonlyArray<Exclude<DeepRequired<Values>, undefined>> : Type extends {} ? { [Key in keyof Type]-?: DeepRequired<Type[Key]>; } : Required<Type>; type DeepUndefinable<Type> = Type extends Builtin ? Type | undefined : Type extends Map<infer Keys, infer Values> ? Map<DeepUndefinable<Keys>, DeepUndefinable<Values>> : Type extends ReadonlyMap<infer Keys, infer Values> ? ReadonlyMap<DeepUndefinable<Keys>, DeepUndefinable<Values>> : Type extends WeakMap<infer Keys, infer Values> ? DeepUndefinable<Keys> extends object ? WeakMap<DeepUndefinable<Keys>, DeepUndefinable<Values>> : never : Type extends Set<infer Values> ? Set<DeepUndefinable<Values>> : Type extends ReadonlySet<infer Values> ? ReadonlySet<DeepUndefinable<Values>> : Type extends WeakSet<infer Values> ? DeepUndefinable<Values> extends object ? WeakSet<DeepUndefinable<Values>> : never : Type extends ReadonlyArray<infer Values> ? Type extends IsTuple<Type> ? { [Key in keyof Type]: DeepUndefinable<Type[Key]> | undefined; } : Type extends Array<Values> ? Array<DeepUndefinable<Values>> : ReadonlyArray<DeepUndefinable<Values>> : Type extends Promise<infer Value> ? Promise<DeepUndefinable<Value>> : Type extends {} ? { [Key in keyof Type]: DeepUndefinable<Type[Key]>; } : Type | undefined; type OptionalKeys<Type> = Type extends object ? keyof { [Key in keyof Type as Type extends Required<Pick<Type, Key>> ? never : Key]: never; } : never; type RequiredKeys<Type> = Type extends unknown ? Exclude<keyof Type, OptionalKeys<Type>> : never; declare let APIErrorName: string; declare class ExtendableError<TData extends object = { [key: string]: unknown; }> extends Error { data: TData; isOperational: boolean; isPublic: boolean; status: number; constructor(message: string, status: number, data: TData, isPublic: boolean); } /** * Class representing an API error. * @extends ExtendableError */ declare class APIError<TData extends null | object = { [key: string]: unknown; } | null> extends ExtendableError<TData> { /** * Creates an API error. * @param {string} message - Error message. * @param {number} status - HTTP status code of error. * @param {object} data - response data to be returned. * @param {boolean} isPublic - Whether the message should be visible to user or not. */ constructor(message: string, status?: number, data?: TData, isPublic?: boolean); } declare let ValidationErrorName: string; type ValidationFieldError = { label?: LabelFunction | StaticLabel; message: string; path: string; }; declare class ValidationError extends APIError<{ collection?: string; errors: ValidationFieldError[]; global?: string; }> { constructor(results: { collection?: string; errors: ValidationFieldError[]; global?: string; id?: number | string; /** * req needs to be passed through (if you have one) in order to resolve label functions that may be part of the errors array */ req?: Partial<PayloadRequest>; }, t?: TFunction); } /** * A permission object that can be used to determine if a user has access to a specific operation. */ type Permission = { permission: boolean; where?: Where; }; type FieldsPermissions = { [fieldName: string]: FieldPermissions; }; type BlockPermissions = { create: Permission; fields: FieldsPermissions; read: Permission; update: Permission; }; type SanitizedBlockPermissions = { fields: SanitizedFieldsPermissions; } | true; type BlocksPermissions = { [blockSlug: string]: BlockPermissions; }; type SanitizedBlocksPermissions = { [blockSlug: string]: SanitizedBlockPermissions; } | true; type FieldPermissions = { blocks?: BlocksPermissions; create?: Permission; fields?: FieldsPermissions; read?: Permission; update?: Permission; }; type SanitizedFieldPermissions = { blocks?: SanitizedBlocksPermissions; create: true; fields?: SanitizedFieldsPermissions; read: true; update: true; } | true; type SanitizedFieldsPermissions = { [fieldName: string]: SanitizedFieldPermissions; } | true; type CollectionPermission = { create?: Permission; delete?: Permission; fields: FieldsPermissions; read?: Permission; readVersions?: Permission; unlock?: Permission; update?: Permission; }; type SanitizedCollectionPermission = { create?: true; delete?: true; fields: SanitizedFieldsPermissions; read?: true; readVersions?: true; unlock?: true; update?: true; }; type GlobalPermission = { fields: FieldsPermissions; read?: Permission; readVersions?: Permission; update?: Permission; }; type SanitizedGlobalPermission = { fields: SanitizedFieldsPermissions; read?: true; readVersions?: true; update?: true; }; type DocumentPermissions = CollectionPermission | GlobalPermission; type SanitizedDocumentPermissions = SanitizedCollectionPermission | SanitizedGlobalPermission; type Permissions = { canAccessAdmin: boolean; collections?: Record<CollectionSlug, CollectionPermission>; globals?: Record<GlobalSlug, GlobalPermission>; }; type SanitizedPermissions = { canAccessAdmin?: boolean; collections?: { [collectionSlug: string]: SanitizedCollectionPermission; }; globals?: { [globalSlug: string]: SanitizedGlobalPermission; }; }; type BaseUser = { collection: string; email?: string; id: number | string; sessions?: Array<UserSession>; username?: string; }; /** * @deprecated Use `TypedUser` instead. This will be removed in 4.0. */ type UntypedUser = { [key: string]: any; } & BaseUser; /** * `collection` is not available one the client. It's only available on the server (req.user) * On the client, you can access the collection via config.admin.user. Config can be accessed using the useConfig() hook */ type ClientUser = { [key: string]: any; } & BaseUser; type UserSession = { createdAt: Date | string; expiresAt: Date | string; id: string; }; type GenerateVerifyEmailHTML<TUser = any> = (args: { req: PayloadRequest; token: string; user: TUser; }) => Promise<string> | string; type GenerateVerifyEmailSubject<TUser = any> = (args: { req: PayloadRequest; token: string; user: TUser; }) => Promise<string> | string; type GenerateForgotPasswordEmailHTML<TUser = any> = (args?: { req?: PayloadRequest; token?: string; user?: TUser; }) => Promise<string> | string; type GenerateForgotPasswordEmailSubject<TUser = any> = (args?: { req?: PayloadRequest; token?: string; user?: TUser; }) => Promise<string> | string; type AuthStrategyFunctionArgs = { /** * Specifies whether or not response headers can be set from this strategy. */ canSetHeaders?: boolean; headers: Request['headers']; isGraphQL?: boolean; payload: Payload; /** * The AuthStrategy name property from the payload config. */ strategyName?: string; }; type AuthStrategyResult = { responseHeaders?: Headers; user: ({ _strategy?: string; collection?: string; } & TypedUser) | null; }; type AuthStrategyFunction = (args: AuthStrategyFunctionArgs) => AuthStrategyResult | Promise<AuthStrategyResult>; type AuthStrategy = { authenticate: AuthStrategyFunction; name: string; }; type LoginWithUsernameOptions = { allowEmailLogin?: false; requireEmail?: boolean; requireUsername?: true; } | { allowEmailLogin?: true; requireEmail?: boolean; requireUsername?: boolean; }; interface IncomingAuthType { /** * Set cookie options, including secure, sameSite, and domain. For advanced users. */ cookies?: { domain?: string; sameSite?: 'Lax' | 'None' | 'Strict' | boolean; secure?: boolean; }; /** * How many levels deep a user document should be populated when creating the JWT and binding the user to the req. Defaults to 0 and should only be modified if absolutely necessary, as this will affect performance. * @default 0 */ depth?: number; /** * Advanced - disable Payload's built-in local auth strategy. Only use this property if you have replaced Payload's auth mechanisms with your own. */ disableLocalStrategy?: { /** * Include auth fields on the collection even though the local strategy is disabled. * Useful when you do not want the database or types to vary depending on the auth configuration. */ enableFields?: true; optionalPassword?: true; } | true; /** * Customize the way that the forgotPassword operation functions. * @link https://payloadcms.com/docs/authentication/email#forgot-password */ forgotPassword?: { /** * The number of milliseconds that the forgot password token should be valid for. * @default 3600000 // 1 hour */ expiration?: number; generateEmailHTML?: GenerateForgotPasswordEmailHTML; generateEmailSubject?: GenerateForgotPasswordEmailSubject; }; /** * Set the time (in milliseconds) that a user should be locked out if they fail authentication more times than maxLoginAttempts allows for. */ lockTime?: number; /** * Ability to allow users to login with username/password. * * @link https://payloadcms.com/docs/authentication/overview#login-with-username */ loginWithUsername?: boolean | LoginWithUsernameOptions; /** * Only allow a user to attempt logging in X amount of times. Automatically locks out a user from authenticating if this limit is passed. Set to 0 to disable. */ maxLoginAttempts?: number; /*** * Set to true if you want to remove the token from the returned authentication API responses such as login or refresh. */ removeTokenFromResponses?: true; /** * Advanced - an array of custom authentification strategies to extend this collection's authentication with. * @link https://payloadcms.com/docs/authentication/custom-strategies */ strategies?: AuthStrategy[]; /** * Controls how many seconds the token will be valid for. Default is 2 hours. * @default 7200 * @link https://payloadcms.com/docs/authentication/overview#config-options */ tokenExpiration?: number; /** * Payload Authentication provides for API keys to be set on each user within an Authentication-enabled Collection. * @default false * @link https://payloadcms.com/docs/authentication/api-keys */ useAPIKey?: boolean; /** * Use sessions for authentication. Enabled by default. * @default true */ useSessions?: boolean; /** * Set to true or pass an object with verification options to require users to verify by email before they are allowed to log into your app. * @link https://payloadcms.com/docs/authentication/email#email-verification */ verify?: { generateEmailHTML?: GenerateVerifyEmailHTML; generateEmailSubject?: GenerateVerifyEmailSubject; } | boolean; } type VerifyConfig = { generateEmailHTML?: GenerateVerifyEmailHTML; generateEmailSubject?: GenerateVerifyEmailSubject; }; interface Auth extends Omit<DeepRequired<IncomingAuthType>, 'forgotPassword' | 'loginWithUsername' | 'verify'> { forgotPassword?: { expiration?: number; generateEmailHTML?: GenerateForgotPasswordEmailHTML; generateEmailSubject?: GenerateForgotPasswordEmailSubject; }; loginWithUsername: false | LoginWithUsernameOptions; verify?: boolean | VerifyConfig; } declare function hasWhereAccessResult(result: bo