payload 3.86.0 → 3.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/collections/operations/count.d.ts.map +1 -1
  2. package/dist/collections/operations/count.js +1 -0
  3. package/dist/collections/operations/count.js.map +1 -1
  4. package/dist/collections/operations/updateByID.d.ts.map +1 -1
  5. package/dist/collections/operations/updateByID.js +1 -0
  6. package/dist/collections/operations/updateByID.js.map +1 -1
  7. package/dist/fields/config/types.js +1 -1
  8. package/dist/fields/config/types.js.map +1 -1
  9. package/dist/fields/hooks/beforeValidate/promise.d.ts.map +1 -1
  10. package/dist/fields/hooks/beforeValidate/promise.js +5 -3
  11. package/dist/fields/hooks/beforeValidate/promise.js.map +1 -1
  12. package/dist/fields/hooks/beforeValidate/stripNullRows.d.ts +10 -0
  13. package/dist/fields/hooks/beforeValidate/stripNullRows.d.ts.map +1 -0
  14. package/dist/fields/hooks/beforeValidate/stripNullRows.js +18 -0
  15. package/dist/fields/hooks/beforeValidate/stripNullRows.js.map +1 -0
  16. package/dist/fields/hooks/beforeValidate/traverseFields.d.ts.map +1 -1
  17. package/dist/fields/hooks/beforeValidate/traverseFields.js +2 -0
  18. package/dist/fields/hooks/beforeValidate/traverseFields.js.map +1 -1
  19. package/dist/folders/utils/getFoldersAndDocumentsFromJoin.d.ts.map +1 -1
  20. package/dist/folders/utils/getFoldersAndDocumentsFromJoin.js +1 -0
  21. package/dist/folders/utils/getFoldersAndDocumentsFromJoin.js.map +1 -1
  22. package/dist/globals/operations/countGlobalVersions.d.ts.map +1 -1
  23. package/dist/globals/operations/countGlobalVersions.js +1 -0
  24. package/dist/globals/operations/countGlobalVersions.js.map +1 -1
  25. package/dist/index.bundled.d.ts +71 -15
  26. package/dist/index.d.ts +4 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +2 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/uploads/generateFileData.js +4 -1
  31. package/dist/uploads/generateFileData.js.map +1 -1
  32. package/dist/uploads/getImageSize.d.ts +12 -1
  33. package/dist/uploads/getImageSize.d.ts.map +1 -1
  34. package/dist/uploads/getImageSize.js +20 -18
  35. package/dist/uploads/getImageSize.js.map +1 -1
  36. package/dist/uploads/getImageSize.spec.js +298 -0
  37. package/dist/uploads/getImageSize.spec.js.map +1 -0
  38. package/dist/uploads/probeImageSize.d.ts +39 -0
  39. package/dist/uploads/probeImageSize.d.ts.map +1 -0
  40. package/dist/uploads/probeImageSize.js +374 -0
  41. package/dist/uploads/probeImageSize.js.map +1 -0
  42. package/dist/uploads/probeImageSize.spec.js +366 -0
  43. package/dist/uploads/probeImageSize.spec.js.map +1 -0
  44. package/dist/utilities/parseParams/index.d.ts +2 -3
  45. package/dist/utilities/parseParams/index.d.ts.map +1 -1
  46. package/dist/utilities/parseParams/index.js.map +1 -1
  47. package/dist/utilities/traverseFields.d.ts.map +1 -1
  48. package/dist/utilities/traverseFields.js +20 -22
  49. package/dist/utilities/traverseFields.js.map +1 -1
  50. package/dist/utilities/traverseFields.spec.js +112 -0
  51. package/dist/utilities/traverseFields.spec.js.map +1 -1
  52. package/dist/utilities/unflattenData.d.ts +3 -0
  53. package/dist/utilities/unflattenData.d.ts.map +1 -0
  54. package/dist/utilities/unflattenData.js +14 -0
  55. package/dist/utilities/unflattenData.js.map +1 -0
  56. package/package.json +3 -3
@@ -3,6 +3,7 @@ import { fieldAffectsData, tabHasName, valueIsValueWithRelation } from '../../co
3
3
  import { getFieldPaths } from '../../getFieldPaths.js';
4
4
  import { getExistingRowDoc } from '../beforeChange/getExistingRowDoc.js';
5
5
  import { getFallbackValue } from './getFallbackValue.js';
6
+ import { stripNullRows } from './stripNullRows.js';
6
7
  import { traverseFields } from './traverseFields.js';
7
8
  // This function is responsible for the following actions, in order:
8
9
  // - Sanitize incoming data
@@ -240,8 +241,9 @@ export const promise = async ({ id, blockData, collection, context, data, doc, f
240
241
  {
241
242
  const rows = siblingData[field.name];
242
243
  if (Array.isArray(rows)) {
244
+ const filteredRows = stripNullRows(rows, 'array', field.name, req.payload.logger, siblingData);
243
245
  const promises = [];
244
- rows.forEach((row, rowIndex)=>{
246
+ filteredRows.forEach((row, rowIndex)=>{
245
247
  promises.push(traverseFields({
246
248
  id,
247
249
  blockData,
@@ -270,13 +272,13 @@ export const promise = async ({ id, blockData, collection, context, data, doc, f
270
272
  {
271
273
  const rows = siblingData[field.name];
272
274
  if (Array.isArray(rows)) {
275
+ const filteredRows = stripNullRows(rows, 'blocks', field.name, req.payload.logger, siblingData);
273
276
  const promises = [];
274
- rows.forEach((row, rowIndex)=>{
277
+ filteredRows.forEach((row, rowIndex)=>{
275
278
  const rowSiblingDoc = getExistingRowDoc(row, siblingDoc[field.name]);
276
279
  const blockTypeToMatch = row.blockType || rowSiblingDoc.blockType;
277
280
  const block = req.payload.blocks[blockTypeToMatch] ?? (field.blockReferences ?? field.blocks).find((curBlock)=>typeof curBlock !== 'string' && curBlock.slug === blockTypeToMatch);
278
281
  if (block) {
279
- ;
280
282
  row.blockType = blockTypeToMatch;
281
283
  promises.push(traverseFields({
282
284
  id,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/fields/hooks/beforeValidate/promise.ts"],"sourcesContent":["import type { RichTextAdapter } from '../../../admin/RichText.js'\nimport type { SanitizedCollectionConfig, TypeWithID } from '../../../collections/config/types.js'\nimport type { SanitizedGlobalConfig } from '../../../globals/config/types.js'\nimport type { RequestContext } from '../../../index.js'\nimport type { JsonObject, JsonValue, PayloadRequest } from '../../../types/index.js'\nimport type { Block, Field, TabAsField } from '../../config/types.js'\n\nimport { MissingEditorProp } from '../../../errors/index.js'\nimport { fieldAffectsData, tabHasName, valueIsValueWithRelation } from '../../config/types.js'\nimport { getFieldPaths } from '../../getFieldPaths.js'\nimport { getExistingRowDoc } from '../beforeChange/getExistingRowDoc.js'\nimport { getFallbackValue } from './getFallbackValue.js'\nimport { traverseFields } from './traverseFields.js'\n\ntype Args<T> = {\n /**\n * Data of the nearest parent block. If no parent block exists, this will be the `undefined`\n */\n blockData?: JsonObject\n collection: null | SanitizedCollectionConfig\n context: RequestContext\n data: T\n /**\n * The original data (not modified by any hooks)\n */\n doc: T\n field: Field | TabAsField\n fieldIndex: number\n global: null | SanitizedGlobalConfig\n id?: number | string\n operation: 'create' | 'update'\n overrideAccess: boolean\n parentIndexPath: string\n parentIsLocalized: boolean\n parentPath: string\n parentSchemaPath: string\n req: PayloadRequest\n siblingData: JsonObject\n /**\n * The original siblingData (not modified by any hooks)\n */\n siblingDoc: JsonObject\n siblingFields?: (Field | TabAsField)[]\n}\n\n// This function is responsible for the following actions, in order:\n// - Sanitize incoming data\n// - Execute field hooks\n// - Execute field access control\n// - Merge original document data into incoming data\n// - Compute default values for undefined fields\n\nexport const promise = async <T>({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n field,\n fieldIndex,\n global,\n operation,\n overrideAccess,\n parentIndexPath,\n parentIsLocalized,\n parentPath,\n parentSchemaPath,\n req,\n siblingData,\n siblingDoc,\n siblingFields,\n}: Args<T>): Promise<void> => {\n const { indexPath, path, schemaPath } = getFieldPaths({\n field,\n index: fieldIndex,\n parentIndexPath,\n parentPath,\n parentSchemaPath,\n })\n\n const pathSegments = path ? path.split('.') : []\n const schemaPathSegments = schemaPath ? schemaPath.split('.') : []\n const indexPathSegments = indexPath ? indexPath.split('-').filter(Boolean)?.map(Number) : []\n\n if (fieldAffectsData(field)) {\n if (field.name === 'id') {\n if (field.type === 'number' && typeof siblingData[field.name] === 'string') {\n const value = siblingData[field.name] as string\n\n siblingData[field.name] = parseFloat(value)\n }\n\n if (\n field.type === 'text' &&\n typeof siblingData[field.name]?.toString === 'function' &&\n typeof siblingData[field.name] !== 'string'\n ) {\n siblingData[field.name] = siblingData[field.name].toString()\n }\n }\n\n // Sanitize incoming data\n switch (field.type) {\n case 'array':\n case 'blocks': {\n // Handle cases of arrays being intentionally set to 0\n if (siblingData[field.name] === '0' || siblingData[field.name] === 0) {\n siblingData[field.name] = []\n }\n\n break\n }\n\n case 'checkbox': {\n if (siblingData[field.name] === 'true') {\n siblingData[field.name] = true\n }\n if (siblingData[field.name] === 'false') {\n siblingData[field.name] = false\n }\n if (siblingData[field.name] === '') {\n siblingData[field.name] = false\n }\n\n break\n }\n\n case 'number': {\n if (typeof siblingData[field.name] === 'string') {\n const value = siblingData[field.name] as string\n const trimmed = value.trim()\n siblingData[field.name] = trimmed.length === 0 ? null : parseFloat(trimmed)\n }\n\n break\n }\n\n case 'point': {\n if (Array.isArray(siblingData[field.name])) {\n siblingData[field.name] = (siblingData[field.name] as string[]).map((coordinate, i) => {\n if (typeof coordinate === 'string') {\n const value = siblingData[field.name][i] as string\n const trimmed = value.trim()\n return trimmed.length === 0 ? null : parseFloat(trimmed)\n }\n return coordinate\n })\n }\n\n break\n }\n case 'relationship':\n case 'upload': {\n if (\n siblingData[field.name] === '' ||\n siblingData[field.name] === 'none' ||\n siblingData[field.name] === 'null' ||\n siblingData[field.name] === null\n ) {\n if (field.hasMany === true) {\n siblingData[field.name] = []\n } else {\n siblingData[field.name] = null\n }\n }\n\n const value = siblingData[field.name]\n\n if (Array.isArray(field.relationTo)) {\n if (Array.isArray(value)) {\n value.forEach((relatedDoc: { relationTo: string; value: JsonValue }, i) => {\n const relatedCollection = req.payload.collections?.[relatedDoc.relationTo]?.config\n\n if (\n typeof relatedDoc.value === 'object' &&\n relatedDoc.value &&\n 'id' in relatedDoc.value\n ) {\n relatedDoc.value = relatedDoc.value.id\n }\n\n if (relatedCollection?.fields) {\n const relationshipIDField = relatedCollection.fields.find(\n (collectionField) =>\n fieldAffectsData(collectionField) && collectionField.name === 'id',\n )\n if (relationshipIDField?.type === 'number') {\n siblingData[field.name][i] = {\n ...relatedDoc,\n value: parseFloat(relatedDoc.value as string),\n }\n }\n }\n })\n }\n if (field.hasMany !== true && valueIsValueWithRelation(value)) {\n const relatedCollection = req.payload.collections?.[value.relationTo]?.config\n\n if (typeof value.value === 'object' && value.value && 'id' in value.value) {\n value.value = (value.value as TypeWithID).id\n }\n\n if (relatedCollection?.fields) {\n const relationshipIDField = relatedCollection.fields.find(\n (collectionField) =>\n fieldAffectsData(collectionField) && collectionField.name === 'id',\n )\n if (relationshipIDField?.type === 'number') {\n siblingData[field.name] = { ...value, value: parseFloat(value.value as string) }\n }\n }\n }\n } else {\n if (Array.isArray(value)) {\n value.forEach((relatedDoc: unknown, i) => {\n const relatedCollection = Array.isArray(field.relationTo)\n ? undefined\n : req.payload.collections?.[field.relationTo]?.config\n\n if (typeof relatedDoc === 'object' && relatedDoc && 'id' in relatedDoc) {\n value[i] = relatedDoc.id\n }\n\n if (relatedCollection?.fields) {\n const relationshipIDField = relatedCollection.fields.find(\n (collectionField) =>\n fieldAffectsData(collectionField) && collectionField.name === 'id',\n )\n if (relationshipIDField?.type === 'number') {\n siblingData[field.name][i] = parseFloat(relatedDoc as string)\n }\n }\n })\n }\n if (field.hasMany !== true && value) {\n const relatedCollection = req.payload.collections?.[field.relationTo]?.config\n\n if (typeof value === 'object' && value && 'id' in value) {\n siblingData[field.name] = value.id\n }\n\n if (relatedCollection?.fields) {\n const relationshipIDField = relatedCollection.fields.find(\n (collectionField) =>\n fieldAffectsData(collectionField) && collectionField.name === 'id',\n )\n if (relationshipIDField?.type === 'number') {\n siblingData[field.name] = parseFloat(value as string)\n }\n }\n }\n }\n break\n }\n case 'richText': {\n if (typeof siblingData[field.name] === 'string') {\n try {\n const richTextJSON = JSON.parse(siblingData[field.name] as string)\n siblingData[field.name] = richTextJSON\n } catch {\n // Disregard this data as it is not valid.\n // Will be reported to user by field validation\n }\n }\n\n break\n }\n\n default: {\n break\n }\n }\n\n // ensure the fallback value is only computed one time\n // either here or when access control returns false\n const fallbackResult: { executed: boolean; value: unknown } = {\n executed: false,\n value: undefined,\n }\n if (typeof siblingData[field.name!] === 'undefined' && !req.context?.isRestoringVersion) {\n fallbackResult.value = await getFallbackValue({ field, req, siblingDoc })\n fallbackResult.executed = true\n }\n\n // Execute hooks\n if ('hooks' in field && field.hooks?.beforeValidate) {\n for (const hook of field.hooks.beforeValidate) {\n const hookedValue = await hook({\n blockData,\n collection,\n context,\n data: data as Partial<T>,\n field,\n global,\n indexPath: indexPathSegments,\n operation,\n originalDoc: doc,\n overrideAccess,\n path: pathSegments,\n previousSiblingDoc: siblingDoc,\n previousValue: siblingDoc[field.name],\n req,\n schemaPath: schemaPathSegments,\n siblingData,\n siblingFields: siblingFields!,\n value:\n typeof siblingData[field.name] === 'undefined'\n ? fallbackResult.value\n : siblingData[field.name],\n })\n\n if (hookedValue !== undefined) {\n siblingData[field.name] = hookedValue\n }\n }\n }\n\n // Execute access control\n if (field.access && field.access[operation]) {\n const result = overrideAccess\n ? true\n : await field.access[operation]({\n id,\n blockData,\n data: data as Partial<T>,\n doc,\n req,\n siblingData,\n })\n\n if (!result) {\n delete siblingData[field.name!]\n }\n }\n\n if (typeof siblingData[field.name!] === 'undefined' && !req.context?.isRestoringVersion) {\n siblingData[field.name!] = !fallbackResult.executed\n ? await getFallbackValue({ field, req, siblingDoc })\n : fallbackResult.value\n }\n }\n\n // Traverse subfields\n switch (field.type) {\n case 'array': {\n const rows = siblingData[field.name]\n\n if (Array.isArray(rows)) {\n const promises: Promise<void>[] = []\n\n rows.forEach((row, rowIndex) => {\n promises.push(\n traverseFields({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields: field.fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath: '',\n parentIsLocalized: parentIsLocalized || field.localized,\n parentPath: path + '.' + rowIndex,\n parentSchemaPath: schemaPath,\n req,\n siblingData: row as JsonObject,\n siblingDoc: getExistingRowDoc(row as JsonObject, siblingDoc[field.name]),\n }),\n )\n })\n\n await Promise.all(promises)\n }\n break\n }\n\n case 'blocks': {\n const rows = siblingData[field.name]\n\n if (Array.isArray(rows)) {\n const promises: Promise<void>[] = []\n\n rows.forEach((row, rowIndex) => {\n const rowSiblingDoc = getExistingRowDoc(row as JsonObject, siblingDoc[field.name])\n const blockTypeToMatch = (row as JsonObject).blockType || rowSiblingDoc.blockType\n\n const block: Block | undefined =\n req.payload.blocks[blockTypeToMatch] ??\n ((field.blockReferences ?? field.blocks).find(\n (curBlock) => typeof curBlock !== 'string' && curBlock.slug === blockTypeToMatch,\n ) as Block | undefined)\n\n if (block) {\n ;(row as JsonObject).blockType = blockTypeToMatch\n\n promises.push(\n traverseFields({\n id,\n blockData: row,\n collection,\n context,\n data,\n doc,\n fields: block.fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath: '',\n parentIsLocalized: parentIsLocalized || field.localized,\n parentPath: path + '.' + rowIndex,\n parentSchemaPath: schemaPath + '.' + block.slug,\n req,\n siblingData: row as JsonObject,\n siblingDoc: rowSiblingDoc,\n }),\n )\n }\n })\n\n await Promise.all(promises)\n }\n\n break\n }\n\n case 'collapsible':\n case 'row': {\n await traverseFields({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields: field.fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath: indexPath,\n parentIsLocalized,\n parentPath,\n parentSchemaPath: schemaPath,\n req,\n siblingData,\n siblingDoc,\n })\n\n break\n }\n\n case 'group': {\n let groupSiblingData = siblingData\n let groupSiblingDoc = siblingDoc\n\n const isNamedGroup = fieldAffectsData(field)\n\n if (isNamedGroup) {\n if (typeof siblingData[field.name] !== 'object') {\n siblingData[field.name] = {}\n }\n\n if (typeof siblingDoc[field.name] !== 'object') {\n siblingDoc[field.name] = {}\n }\n\n groupSiblingData = siblingData[field.name] as Record<string, unknown>\n groupSiblingDoc = siblingDoc[field.name] as Record<string, unknown>\n }\n\n await traverseFields({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields: field.fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath: isNamedGroup ? '' : indexPath,\n parentIsLocalized: parentIsLocalized || field.localized,\n parentPath: isNamedGroup ? path : parentPath,\n parentSchemaPath: schemaPath,\n req,\n siblingData: groupSiblingData,\n siblingDoc: groupSiblingDoc,\n })\n\n break\n }\n\n case 'richText': {\n if (!field?.editor) {\n throw new MissingEditorProp(field) // while we allow disabling editor functionality, you should not have any richText fields defined if you do not have an editor\n }\n\n if (typeof field?.editor === 'function') {\n throw new Error('Attempted to access unsanitized rich text editor.')\n }\n\n const editor: RichTextAdapter = field?.editor\n\n if (editor?.hooks?.beforeValidate?.length) {\n for (const hook of editor.hooks.beforeValidate) {\n const hookedValue = await hook({\n collection,\n context,\n data: data as Partial<T>,\n field,\n global,\n indexPath: indexPathSegments,\n operation,\n originalDoc: doc,\n overrideAccess,\n parentIsLocalized,\n path: pathSegments,\n previousSiblingDoc: siblingDoc,\n previousValue: siblingData[field.name],\n req,\n schemaPath: schemaPathSegments,\n siblingData,\n value: siblingData[field.name],\n })\n\n if (hookedValue !== undefined) {\n siblingData[field.name] = hookedValue\n }\n }\n }\n break\n }\n\n case 'tab': {\n let tabSiblingData\n let tabSiblingDoc\n\n const isNamedTab = tabHasName(field)\n\n if (isNamedTab) {\n if (typeof siblingData[field.name] !== 'object') {\n siblingData[field.name] = {}\n }\n\n if (typeof siblingDoc[field.name] !== 'object') {\n siblingDoc[field.name] = {}\n }\n\n tabSiblingData = siblingData[field.name] as Record<string, unknown>\n tabSiblingDoc = siblingDoc[field.name] as Record<string, unknown>\n } else {\n tabSiblingData = siblingData\n tabSiblingDoc = siblingDoc\n }\n\n await traverseFields({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields: field.fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath: isNamedTab ? '' : indexPath,\n parentIsLocalized: parentIsLocalized || field.localized,\n parentPath: isNamedTab ? path : parentPath,\n parentSchemaPath: schemaPath,\n req,\n siblingData: tabSiblingData,\n siblingDoc: tabSiblingDoc,\n })\n\n break\n }\n\n case 'tabs': {\n await traverseFields({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields: field.tabs.map((tab) => ({ ...tab, type: 'tab' })),\n global,\n operation,\n overrideAccess,\n parentIndexPath: indexPath,\n parentIsLocalized,\n parentPath: path,\n parentSchemaPath: schemaPath,\n req,\n siblingData,\n siblingDoc,\n })\n\n break\n }\n\n default: {\n break\n }\n }\n}\n"],"names":["MissingEditorProp","fieldAffectsData","tabHasName","valueIsValueWithRelation","getFieldPaths","getExistingRowDoc","getFallbackValue","traverseFields","promise","id","blockData","collection","context","data","doc","field","fieldIndex","global","operation","overrideAccess","parentIndexPath","parentIsLocalized","parentPath","parentSchemaPath","req","siblingData","siblingDoc","siblingFields","indexPath","path","schemaPath","index","pathSegments","split","schemaPathSegments","indexPathSegments","filter","Boolean","map","Number","name","type","value","parseFloat","toString","trimmed","trim","length","Array","isArray","coordinate","i","hasMany","relationTo","forEach","relatedDoc","relatedCollection","payload","collections","config","fields","relationshipIDField","find","collectionField","undefined","richTextJSON","JSON","parse","fallbackResult","executed","isRestoringVersion","hooks","beforeValidate","hook","hookedValue","originalDoc","previousSiblingDoc","previousValue","access","result","rows","promises","row","rowIndex","push","localized","Promise","all","rowSiblingDoc","blockTypeToMatch","blockType","block","blocks","blockReferences","curBlock","slug","groupSiblingData","groupSiblingDoc","isNamedGroup","editor","Error","tabSiblingData","tabSiblingDoc","isNamedTab","tabs","tab"],"mappings":"AAOA,SAASA,iBAAiB,QAAQ,2BAA0B;AAC5D,SAASC,gBAAgB,EAAEC,UAAU,EAAEC,wBAAwB,QAAQ,wBAAuB;AAC9F,SAASC,aAAa,QAAQ,yBAAwB;AACtD,SAASC,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,gBAAgB,QAAQ,wBAAuB;AACxD,SAASC,cAAc,QAAQ,sBAAqB;AAiCpD,oEAAoE;AACpE,2BAA2B;AAC3B,wBAAwB;AACxB,iCAAiC;AACjC,oDAAoD;AACpD,gDAAgD;AAEhD,OAAO,MAAMC,UAAU,OAAU,EAC/BC,EAAE,EACFC,SAAS,EACTC,UAAU,EACVC,OAAO,EACPC,IAAI,EACJC,GAAG,EACHC,KAAK,EACLC,UAAU,EACVC,MAAM,EACNC,SAAS,EACTC,cAAc,EAC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oBACL6D,iBAAiB5E;oBACjB6E,gBAAgB5E;gBAClB;gBAEA,MAAMnB,eAAe;oBACnBE;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACA8C,QAAQ7C,MAAM6C,MAAM;oBACpB3C;oBACAC;oBACAC;oBACAC,iBAAiBmF,aAAa,KAAK3E;oBACnCP,mBAAmBA,qBAAqBN,MAAMsE,SAAS;oBACvD/D,YAAYiF,aAAa1E,OAAOP;oBAChCC,kBAAkBO;oBAClBN;oBACAC,aAAa4E;oBACb3E,YAAY4E;gBACd;gBAEA;YACF;QAEA,KAAK;YAAQ;gBACX,MAAM/F,eAAe;oBACnBE;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACA8C,QAAQ7C,MAAMyF,IAAI,CAAClE,GAAG,CAAC,CAACmE,MAAS,CAAA;4BAAE,GAAGA,GAAG;4BAAEhE,MAAM;wBAAM,CAAA;oBACvDxB;oBACAC;oBACAC;oBACAC,iBAAiBQ;oBACjBP;oBACAC,YAAYO;oBACZN,kBAAkBO;oBAClBN;oBACAC;oBACAC;gBACF;gBAEA;YACF;QAEA;YAAS;gBACP;YACF;IACF;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/fields/hooks/beforeValidate/promise.ts"],"sourcesContent":["import type { RichTextAdapter } from '../../../admin/RichText.js'\nimport type { SanitizedCollectionConfig, TypeWithID } from '../../../collections/config/types.js'\nimport type { SanitizedGlobalConfig } from '../../../globals/config/types.js'\nimport type { RequestContext } from '../../../index.js'\nimport type { JsonObject, JsonValue, PayloadRequest } from '../../../types/index.js'\nimport type { Block, Field, TabAsField } from '../../config/types.js'\n\nimport { MissingEditorProp } from '../../../errors/index.js'\nimport { fieldAffectsData, tabHasName, valueIsValueWithRelation } from '../../config/types.js'\nimport { getFieldPaths } from '../../getFieldPaths.js'\nimport { getExistingRowDoc } from '../beforeChange/getExistingRowDoc.js'\nimport { getFallbackValue } from './getFallbackValue.js'\nimport { stripNullRows } from './stripNullRows.js'\nimport { traverseFields } from './traverseFields.js'\n\ntype Args<T> = {\n /**\n * Data of the nearest parent block. If no parent block exists, this will be the `undefined`\n */\n blockData?: JsonObject\n collection: null | SanitizedCollectionConfig\n context: RequestContext\n data: T\n /**\n * The original data (not modified by any hooks)\n */\n doc: T\n field: Field | TabAsField\n fieldIndex: number\n global: null | SanitizedGlobalConfig\n id?: number | string\n operation: 'create' | 'update'\n overrideAccess: boolean\n parentIndexPath: string\n parentIsLocalized: boolean\n parentPath: string\n parentSchemaPath: string\n req: PayloadRequest\n siblingData: JsonObject\n /**\n * The original siblingData (not modified by any hooks)\n */\n siblingDoc: JsonObject\n siblingFields?: (Field | TabAsField)[]\n}\n\n// This function is responsible for the following actions, in order:\n// - Sanitize incoming data\n// - Execute field hooks\n// - Execute field access control\n// - Merge original document data into incoming data\n// - Compute default values for undefined fields\n\nexport const promise = async <T>({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n field,\n fieldIndex,\n global,\n operation,\n overrideAccess,\n parentIndexPath,\n parentIsLocalized,\n parentPath,\n parentSchemaPath,\n req,\n siblingData,\n siblingDoc,\n siblingFields,\n}: Args<T>): Promise<void> => {\n const { indexPath, path, schemaPath } = getFieldPaths({\n field,\n index: fieldIndex,\n parentIndexPath,\n parentPath,\n parentSchemaPath,\n })\n\n const pathSegments = path ? path.split('.') : []\n const schemaPathSegments = schemaPath ? schemaPath.split('.') : []\n const indexPathSegments = indexPath ? indexPath.split('-').filter(Boolean)?.map(Number) : []\n\n if (fieldAffectsData(field)) {\n if (field.name === 'id') {\n if (field.type === 'number' && typeof siblingData[field.name] === 'string') {\n const value = siblingData[field.name] as string\n\n siblingData[field.name] = parseFloat(value)\n }\n\n if (\n field.type === 'text' &&\n typeof siblingData[field.name]?.toString === 'function' &&\n typeof siblingData[field.name] !== 'string'\n ) {\n siblingData[field.name] = siblingData[field.name].toString()\n }\n }\n\n // Sanitize incoming data\n switch (field.type) {\n case 'array':\n case 'blocks': {\n // Handle cases of arrays being intentionally set to 0\n if (siblingData[field.name] === '0' || siblingData[field.name] === 0) {\n siblingData[field.name] = []\n }\n\n break\n }\n\n case 'checkbox': {\n if (siblingData[field.name] === 'true') {\n siblingData[field.name] = true\n }\n if (siblingData[field.name] === 'false') {\n siblingData[field.name] = false\n }\n if (siblingData[field.name] === '') {\n siblingData[field.name] = false\n }\n\n break\n }\n\n case 'number': {\n if (typeof siblingData[field.name] === 'string') {\n const value = siblingData[field.name] as string\n const trimmed = value.trim()\n siblingData[field.name] = trimmed.length === 0 ? null : parseFloat(trimmed)\n }\n\n break\n }\n\n case 'point': {\n if (Array.isArray(siblingData[field.name])) {\n siblingData[field.name] = (siblingData[field.name] as string[]).map((coordinate, i) => {\n if (typeof coordinate === 'string') {\n const value = siblingData[field.name][i] as string\n const trimmed = value.trim()\n return trimmed.length === 0 ? null : parseFloat(trimmed)\n }\n return coordinate\n })\n }\n\n break\n }\n case 'relationship':\n case 'upload': {\n if (\n siblingData[field.name] === '' ||\n siblingData[field.name] === 'none' ||\n siblingData[field.name] === 'null' ||\n siblingData[field.name] === null\n ) {\n if (field.hasMany === true) {\n siblingData[field.name] = []\n } else {\n siblingData[field.name] = null\n }\n }\n\n const value = siblingData[field.name]\n\n if (Array.isArray(field.relationTo)) {\n if (Array.isArray(value)) {\n value.forEach((relatedDoc: { relationTo: string; value: JsonValue }, i) => {\n const relatedCollection = req.payload.collections?.[relatedDoc.relationTo]?.config\n\n if (\n typeof relatedDoc.value === 'object' &&\n relatedDoc.value &&\n 'id' in relatedDoc.value\n ) {\n relatedDoc.value = relatedDoc.value.id\n }\n\n if (relatedCollection?.fields) {\n const relationshipIDField = relatedCollection.fields.find(\n (collectionField) =>\n fieldAffectsData(collectionField) && collectionField.name === 'id',\n )\n if (relationshipIDField?.type === 'number') {\n siblingData[field.name][i] = {\n ...relatedDoc,\n value: parseFloat(relatedDoc.value as string),\n }\n }\n }\n })\n }\n if (field.hasMany !== true && valueIsValueWithRelation(value)) {\n const relatedCollection = req.payload.collections?.[value.relationTo]?.config\n\n if (typeof value.value === 'object' && value.value && 'id' in value.value) {\n value.value = (value.value as TypeWithID).id\n }\n\n if (relatedCollection?.fields) {\n const relationshipIDField = relatedCollection.fields.find(\n (collectionField) =>\n fieldAffectsData(collectionField) && collectionField.name === 'id',\n )\n if (relationshipIDField?.type === 'number') {\n siblingData[field.name] = { ...value, value: parseFloat(value.value as string) }\n }\n }\n }\n } else {\n if (Array.isArray(value)) {\n value.forEach((relatedDoc: unknown, i) => {\n const relatedCollection = Array.isArray(field.relationTo)\n ? undefined\n : req.payload.collections?.[field.relationTo]?.config\n\n if (typeof relatedDoc === 'object' && relatedDoc && 'id' in relatedDoc) {\n value[i] = relatedDoc.id\n }\n\n if (relatedCollection?.fields) {\n const relationshipIDField = relatedCollection.fields.find(\n (collectionField) =>\n fieldAffectsData(collectionField) && collectionField.name === 'id',\n )\n if (relationshipIDField?.type === 'number') {\n siblingData[field.name][i] = parseFloat(relatedDoc as string)\n }\n }\n })\n }\n if (field.hasMany !== true && value) {\n const relatedCollection = req.payload.collections?.[field.relationTo]?.config\n\n if (typeof value === 'object' && value && 'id' in value) {\n siblingData[field.name] = value.id\n }\n\n if (relatedCollection?.fields) {\n const relationshipIDField = relatedCollection.fields.find(\n (collectionField) =>\n fieldAffectsData(collectionField) && collectionField.name === 'id',\n )\n if (relationshipIDField?.type === 'number') {\n siblingData[field.name] = parseFloat(value as string)\n }\n }\n }\n }\n break\n }\n case 'richText': {\n if (typeof siblingData[field.name] === 'string') {\n try {\n const richTextJSON = JSON.parse(siblingData[field.name] as string)\n siblingData[field.name] = richTextJSON\n } catch {\n // Disregard this data as it is not valid.\n // Will be reported to user by field validation\n }\n }\n\n break\n }\n\n default: {\n break\n }\n }\n\n // ensure the fallback value is only computed one time\n // either here or when access control returns false\n const fallbackResult: { executed: boolean; value: unknown } = {\n executed: false,\n value: undefined,\n }\n if (typeof siblingData[field.name!] === 'undefined' && !req.context?.isRestoringVersion) {\n fallbackResult.value = await getFallbackValue({ field, req, siblingDoc })\n fallbackResult.executed = true\n }\n\n // Execute hooks\n if ('hooks' in field && field.hooks?.beforeValidate) {\n for (const hook of field.hooks.beforeValidate) {\n const hookedValue = await hook({\n blockData,\n collection,\n context,\n data: data as Partial<T>,\n field,\n global,\n indexPath: indexPathSegments,\n operation,\n originalDoc: doc,\n overrideAccess,\n path: pathSegments,\n previousSiblingDoc: siblingDoc,\n previousValue: siblingDoc[field.name],\n req,\n schemaPath: schemaPathSegments,\n siblingData,\n siblingFields: siblingFields!,\n value:\n typeof siblingData[field.name] === 'undefined'\n ? fallbackResult.value\n : siblingData[field.name],\n })\n\n if (hookedValue !== undefined) {\n siblingData[field.name] = hookedValue\n }\n }\n }\n\n // Execute access control\n if (field.access && field.access[operation]) {\n const result = overrideAccess\n ? true\n : await field.access[operation]({\n id,\n blockData,\n data: data as Partial<T>,\n doc,\n req,\n siblingData,\n })\n\n if (!result) {\n delete siblingData[field.name!]\n }\n }\n\n if (typeof siblingData[field.name!] === 'undefined' && !req.context?.isRestoringVersion) {\n siblingData[field.name!] = !fallbackResult.executed\n ? await getFallbackValue({ field, req, siblingDoc })\n : fallbackResult.value\n }\n }\n\n // Traverse subfields\n switch (field.type) {\n case 'array': {\n const rows = siblingData[field.name]\n\n if (Array.isArray(rows)) {\n const filteredRows = stripNullRows(\n rows,\n 'array',\n field.name,\n req.payload.logger,\n siblingData,\n )\n const promises: Promise<void>[] = []\n\n filteredRows.forEach((row, rowIndex) => {\n promises.push(\n traverseFields({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields: field.fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath: '',\n parentIsLocalized: parentIsLocalized || field.localized,\n parentPath: path + '.' + rowIndex,\n parentSchemaPath: schemaPath,\n req,\n siblingData: row,\n siblingDoc: getExistingRowDoc(row, siblingDoc[field.name]),\n }),\n )\n })\n\n await Promise.all(promises)\n }\n break\n }\n\n case 'blocks': {\n const rows = siblingData[field.name]\n\n if (Array.isArray(rows)) {\n const filteredRows = stripNullRows(\n rows,\n 'blocks',\n field.name,\n req.payload.logger,\n siblingData,\n )\n const promises: Promise<void>[] = []\n\n filteredRows.forEach((row, rowIndex) => {\n const rowSiblingDoc = getExistingRowDoc(row, siblingDoc[field.name])\n const blockTypeToMatch = row.blockType || rowSiblingDoc.blockType\n\n const block: Block | undefined =\n req.payload.blocks[blockTypeToMatch] ??\n ((field.blockReferences ?? field.blocks).find(\n (curBlock) => typeof curBlock !== 'string' && curBlock.slug === blockTypeToMatch,\n ) as Block | undefined)\n\n if (block) {\n row.blockType = blockTypeToMatch\n\n promises.push(\n traverseFields({\n id,\n blockData: row,\n collection,\n context,\n data,\n doc,\n fields: block.fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath: '',\n parentIsLocalized: parentIsLocalized || field.localized,\n parentPath: path + '.' + rowIndex,\n parentSchemaPath: schemaPath + '.' + block.slug,\n req,\n siblingData: row,\n siblingDoc: rowSiblingDoc,\n }),\n )\n }\n })\n\n await Promise.all(promises)\n }\n\n break\n }\n\n case 'collapsible':\n case 'row': {\n await traverseFields({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields: field.fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath: indexPath,\n parentIsLocalized,\n parentPath,\n parentSchemaPath: schemaPath,\n req,\n siblingData,\n siblingDoc,\n })\n\n break\n }\n\n case 'group': {\n let groupSiblingData = siblingData\n let groupSiblingDoc = siblingDoc\n\n const isNamedGroup = fieldAffectsData(field)\n\n if (isNamedGroup) {\n if (typeof siblingData[field.name] !== 'object') {\n siblingData[field.name] = {}\n }\n\n if (typeof siblingDoc[field.name] !== 'object') {\n siblingDoc[field.name] = {}\n }\n\n groupSiblingData = siblingData[field.name] as Record<string, unknown>\n groupSiblingDoc = siblingDoc[field.name] as Record<string, unknown>\n }\n\n await traverseFields({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields: field.fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath: isNamedGroup ? '' : indexPath,\n parentIsLocalized: parentIsLocalized || field.localized,\n parentPath: isNamedGroup ? path : parentPath,\n parentSchemaPath: schemaPath,\n req,\n siblingData: groupSiblingData,\n siblingDoc: groupSiblingDoc,\n })\n\n break\n }\n\n case 'richText': {\n if (!field?.editor) {\n throw new MissingEditorProp(field) // while we allow disabling editor functionality, you should not have any richText fields defined if you do not have an editor\n }\n\n if (typeof field?.editor === 'function') {\n throw new Error('Attempted to access unsanitized rich text editor.')\n }\n\n const editor: RichTextAdapter = field?.editor\n\n if (editor?.hooks?.beforeValidate?.length) {\n for (const hook of editor.hooks.beforeValidate) {\n const hookedValue = await hook({\n collection,\n context,\n data: data as Partial<T>,\n field,\n global,\n indexPath: indexPathSegments,\n operation,\n originalDoc: doc,\n overrideAccess,\n parentIsLocalized,\n path: pathSegments,\n previousSiblingDoc: siblingDoc,\n previousValue: siblingData[field.name],\n req,\n schemaPath: schemaPathSegments,\n siblingData,\n value: siblingData[field.name],\n })\n\n if (hookedValue !== undefined) {\n siblingData[field.name] = hookedValue\n }\n }\n }\n break\n }\n\n case 'tab': {\n let tabSiblingData\n let tabSiblingDoc\n\n const isNamedTab = tabHasName(field)\n\n if (isNamedTab) {\n if (typeof siblingData[field.name] !== 'object') {\n siblingData[field.name] = {}\n }\n\n if (typeof siblingDoc[field.name] !== 'object') {\n siblingDoc[field.name] = {}\n }\n\n tabSiblingData = siblingData[field.name] as Record<string, unknown>\n tabSiblingDoc = siblingDoc[field.name] as Record<string, unknown>\n } else {\n tabSiblingData = siblingData\n tabSiblingDoc = siblingDoc\n }\n\n await traverseFields({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields: field.fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath: isNamedTab ? '' : indexPath,\n parentIsLocalized: parentIsLocalized || field.localized,\n parentPath: isNamedTab ? path : parentPath,\n parentSchemaPath: schemaPath,\n req,\n siblingData: tabSiblingData,\n siblingDoc: tabSiblingDoc,\n })\n\n break\n }\n\n case 'tabs': {\n await traverseFields({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields: field.tabs.map((tab) => ({ ...tab, type: 'tab' })),\n global,\n operation,\n overrideAccess,\n parentIndexPath: indexPath,\n parentIsLocalized,\n parentPath: path,\n parentSchemaPath: schemaPath,\n req,\n siblingData,\n siblingDoc,\n })\n\n break\n }\n\n default: {\n break\n }\n }\n}\n"],"names":["MissingEditorProp","fieldAffectsData","tabHasName","valueIsValueWithRelation","getFieldPaths","getExistingRowDoc","getFallbackValue","stripNullRows","traverseFields","promise","id","blockData","collection","context","data","doc","field","fieldIndex","global","operation","overrideAccess","parentIndexPath","parentIsLocalized","parentPath","parentSchemaPath","req","siblingData","siblingDoc","siblingFields","indexPath","path","schemaPath","index","pathSegments","split","schemaPathSegments","indexPathSegments","filter","Boolean","map","Number","name","type","value","parseFloat","toString","trimmed","trim","length","Array","isArray","coordinate","i","hasMany","relationTo","forEach","relatedDoc","relatedCollection","payload","collections","config","fields","relationshipIDField","find","collectionField","undefined","richTextJSON","JSON","parse","fallbackResult","executed","isRestoringVersion","hooks","beforeValidate","hook","hookedValue","originalDoc","previousSiblingDoc","previousValue","access","result","rows","filteredRows","logger","promises","row","rowIndex","push","localized","Promise","all","rowSiblingDoc","blockTypeToMatch","blockType","block","blocks","blockReferences","curBlock","slug","groupSiblingData","groupSiblingDoc","isNamedGroup","editor","Error","tabSiblingData","tabSiblingDoc","isNamedTab","tabs","tab"],"mappings":"AAOA,SAASA,iBAAiB,QAAQ,2BAA0B;AAC5D,SAASC,gBAAgB,EAAEC,UAAU,EAAEC,wBAAwB,QAAQ,wBAAuB;AAC9F,SAASC,aAAa,QAAQ,yBAAwB;AACtD,SAASC,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,gBAAgB,QAAQ,wBAAuB;AACxD,SAASC,aAAa,QAAQ,qBAAoB;AAClD,SAASC,cAAc,QAAQ,sBAAqB;AAiCpD,oEAAoE;AACpE,2BAA2B;AAC3B,wBAAwB;AACxB,iCAAiC;AACjC,oDAAoD;AACpD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YAAY;oBACd,IAAI,OAAOhF,WAAW,CAACV,MAAMyB,IAAI,CAAC,KAAK,UAAU;wBAC/Cf,WAAW,CAACV,MAAMyB,IAAI,CAAC,GAAG,CAAC;oBAC7B;oBAEA,IAAI,OAAOd,UAAU,CAACX,MAAMyB,IAAI,CAAC,KAAK,UAAU;wBAC9Cd,UAAU,CAACX,MAAMyB,IAAI,CAAC,GAAG,CAAC;oBAC5B;oBAEA+D,iBAAiB9E,WAAW,CAACV,MAAMyB,IAAI,CAAC;oBACxCgE,gBAAgB9E,UAAU,CAACX,MAAMyB,IAAI,CAAC;gBACxC,OAAO;oBACL+D,iBAAiB9E;oBACjB+E,gBAAgB9E;gBAClB;gBAEA,MAAMnB,eAAe;oBACnBE;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACA8C,QAAQ7C,MAAM6C,MAAM;oBACpB3C;oBACAC;oBACAC;oBACAC,iBAAiBqF,aAAa,KAAK7E;oBACnCP,mBAAmBA,qBAAqBN,MAAMwE,SAAS;oBACvDjE,YAAYmF,aAAa5E,OAAOP;oBAChCC,kBAAkBO;oBAClBN;oBACAC,aAAa8E;oBACb7E,YAAY8E;gBACd;gBAEA;YACF;QAEA,KAAK;YAAQ;gBACX,MAAMjG,eAAe;oBACnBE;oBACAC;oBACAC;oBACAC;oBACAC;oBACAC;oBACA8C,QAAQ7C,MAAM2F,IAAI,CAACpE,GAAG,CAAC,CAACqE,MAAS,CAAA;4BAAE,GAAGA,GAAG;4BAAElE,MAAM;wBAAM,CAAA;oBACvDxB;oBACAC;oBACAC;oBACAC,iBAAiBQ;oBACjBP;oBACAC,YAAYO;oBACZN,kBAAkBO;oBAClBN;oBACAC;oBACAC;gBACF;gBAEA;YACF;QAEA;YAAS;gBACP;YACF;IACF;AACF,EAAC"}
@@ -0,0 +1,10 @@
1
+ import type { JsonObject, PayloadRequest } from '../../../types/index.js';
2
+ /**
3
+ * Strips invalid rows (null, undefined, primitives, arrays) from an array or blocks field
4
+ * value in place and warns if any were found. Rows must be plain objects; anything else
5
+ * can crash downstream code that assigns properties to them (e.g. `row.blockType = ...`).
6
+ *
7
+ * Returns the cleaned array typed as JsonObject[].
8
+ */
9
+ export declare function stripNullRows(rows: unknown[], fieldType: string, fieldName: string, logger: PayloadRequest['payload']['logger'], siblingData: JsonObject): JsonObject[];
10
+ //# sourceMappingURL=stripNullRows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripNullRows.d.ts","sourceRoot":"","sources":["../../../../src/fields/hooks/beforeValidate/stripNullRows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAEzE;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,OAAO,EAAE,EACf,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EAC3C,WAAW,EAAE,UAAU,GACtB,UAAU,EAAE,CAWd"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Strips invalid rows (null, undefined, primitives, arrays) from an array or blocks field
3
+ * value in place and warns if any were found. Rows must be plain objects; anything else
4
+ * can crash downstream code that assigns properties to them (e.g. `row.blockType = ...`).
5
+ *
6
+ * Returns the cleaned array typed as JsonObject[].
7
+ */ export function stripNullRows(rows, fieldType, fieldName, logger, siblingData) {
8
+ const filteredRows = rows.filter((row)=>row != null && typeof row === 'object' && !Array.isArray(row));
9
+ if (filteredRows.length !== rows.length) {
10
+ logger.warn({
11
+ msg: `Stripped ${rows.length - filteredRows.length} invalid row(s) from ${fieldType} field "${fieldName}". Rows must be plain objects.`
12
+ });
13
+ siblingData[fieldName] = filteredRows;
14
+ }
15
+ return siblingData[fieldName];
16
+ }
17
+
18
+ //# sourceMappingURL=stripNullRows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/fields/hooks/beforeValidate/stripNullRows.ts"],"sourcesContent":["import type { JsonObject, PayloadRequest } from '../../../types/index.js'\n\n/**\n * Strips invalid rows (null, undefined, primitives, arrays) from an array or blocks field\n * value in place and warns if any were found. Rows must be plain objects; anything else\n * can crash downstream code that assigns properties to them (e.g. `row.blockType = ...`).\n *\n * Returns the cleaned array typed as JsonObject[].\n */\nexport function stripNullRows(\n rows: unknown[],\n fieldType: string,\n fieldName: string,\n logger: PayloadRequest['payload']['logger'],\n siblingData: JsonObject,\n): JsonObject[] {\n const filteredRows = rows.filter(\n (row): row is JsonObject => row != null && typeof row === 'object' && !Array.isArray(row),\n )\n if (filteredRows.length !== rows.length) {\n logger.warn({\n msg: `Stripped ${rows.length - filteredRows.length} invalid row(s) from ${fieldType} field \"${fieldName}\". Rows must be plain objects.`,\n })\n siblingData[fieldName] = filteredRows\n }\n return siblingData[fieldName] as JsonObject[]\n}\n"],"names":["stripNullRows","rows","fieldType","fieldName","logger","siblingData","filteredRows","filter","row","Array","isArray","length","warn","msg"],"mappings":"AAEA;;;;;;CAMC,GACD,OAAO,SAASA,cACdC,IAAe,EACfC,SAAiB,EACjBC,SAAiB,EACjBC,MAA2C,EAC3CC,WAAuB;IAEvB,MAAMC,eAAeL,KAAKM,MAAM,CAC9B,CAACC,MAA2BA,OAAO,QAAQ,OAAOA,QAAQ,YAAY,CAACC,MAAMC,OAAO,CAACF;IAEvF,IAAIF,aAAaK,MAAM,KAAKV,KAAKU,MAAM,EAAE;QACvCP,OAAOQ,IAAI,CAAC;YACVC,KAAK,CAAC,SAAS,EAAEZ,KAAKU,MAAM,GAAGL,aAAaK,MAAM,CAAC,qBAAqB,EAAET,UAAU,QAAQ,EAAEC,UAAU,8BAA8B,CAAC;QACzI;QACAE,WAAW,CAACF,UAAU,GAAGG;IAC3B;IACA,OAAOD,WAAW,CAACF,UAAU;AAC/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../../../src/fields/hooks/beforeValidate/traverseFields.ts"],"names":[],"m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export const traverseFields = async ({ id, blockData, collection, context, data, doc, fields, global, operation, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, req, siblingData, siblingDoc })=>{
4
+ unflattenData(siblingData);
3
5
  const promises = [];
4
6
  fields.forEach((field, fieldIndex)=>{
5
7
  promises.push(promise({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/fields/hooks/beforeValidate/traverseFields.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../../collections/config/types.js'\nimport type { SanitizedGlobalConfig } from '../../../globals/config/types.js'\nimport type { RequestContext } from '../../../index.js'\nimport type { JsonObject, PayloadRequest } from '../../../types/index.js'\nimport type { Field, TabAsField } from '../../config/types.js'\n\nimport { promise } from './promise.js'\n\ntype Args<T> = {\n /**\n * Data of the nearest parent block. If no parent block exists, this will be the `undefined`\n */\n blockData?: JsonObject\n collection: null | SanitizedCollectionConfig\n context: RequestContext\n data: T\n /**\n * The original data (not modified by any hooks)\n */\n doc: T\n fields: (Field | TabAsField)[]\n global: null | SanitizedGlobalConfig\n id?: number | string\n operation: 'create' | 'update'\n overrideAccess: boolean\n parentIndexPath: string\n /**\n * @todo make required in v4.0\n */\n parentIsLocalized?: boolean\n parentPath: string\n parentSchemaPath: string\n req: PayloadRequest\n siblingData: JsonObject\n /**\n * The original siblingData (not modified by any hooks)\n */\n siblingDoc: JsonObject\n}\n\nexport const traverseFields = async <T>({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath,\n parentIsLocalized,\n parentPath,\n parentSchemaPath,\n req,\n siblingData,\n siblingDoc,\n}: Args<T>): Promise<void> => {\n const promises: Promise<void>[] = []\n\n fields.forEach((field, fieldIndex) => {\n promises.push(\n promise({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n field,\n fieldIndex,\n global,\n operation,\n overrideAccess,\n parentIndexPath,\n parentIsLocalized: parentIsLocalized!,\n parentPath,\n parentSchemaPath,\n req,\n siblingData,\n siblingDoc,\n siblingFields: fields,\n }),\n )\n })\n\n await Promise.all(promises)\n}\n"],"names":["promise","traverseFields","id","blockData","collection","context","data","doc","fields","global","operation","overrideAccess","parentIndexPath","parentIsLocalized","parentPath","parentSchemaPath","req","siblingData","siblingDoc","promises","forEach","field","fieldIndex","push","siblingFields","Promise","all"],"mappings":"AAMA,SAASA,OAAO,QAAQ,eAAc;AAkCtC,OAAO,MAAMC,iBAAiB,OAAU,EACtCC,EAAE,EACFC,SAAS,EACTC,UAAU,EACVC,OAAO,EACPC,IAAI,EACJC,GAAG,EACHC,MAAM,EACNC,MAAM,EACNC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,UAAU,EACVC,gBAAgB,EAChBC,GAAG,EACHC,WAAW,EACXC,UAAU,EACF;IACR,MAAMC,WAA4B,EAAE;IAEpCX,OAAOY,OAAO,CAAC,CAACC,OAAOC;QACrBH,SAASI,IAAI,CACXvB,QAAQ;YACNE;YACAC;YACAC;YACAC;YACAC;YACAC;YACAc;YACAC;YACAb;YACAC;YACAC;YACAC;YACAC,mBAAmBA;YACnBC;YACAC;YACAC;YACAC;YACAC;YACAM,eAAehB;QACjB;IAEJ;IAEA,MAAMiB,QAAQC,GAAG,CAACP;AACpB,EAAC"}
1
+ {"version":3,"sources":["../../../../src/fields/hooks/beforeValidate/traverseFields.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../../collections/config/types.js'\nimport type { SanitizedGlobalConfig } from '../../../globals/config/types.js'\nimport type { RequestContext } from '../../../index.js'\nimport type { JsonObject, PayloadRequest } from '../../../types/index.js'\nimport type { Field, TabAsField } from '../../config/types.js'\n\nimport { unflattenData } from '../../../utilities/unflattenData.js'\nimport { promise } from './promise.js'\n\ntype Args<T> = {\n /**\n * Data of the nearest parent block. If no parent block exists, this will be the `undefined`\n */\n blockData?: JsonObject\n collection: null | SanitizedCollectionConfig\n context: RequestContext\n data: T\n /**\n * The original data (not modified by any hooks)\n */\n doc: T\n fields: (Field | TabAsField)[]\n global: null | SanitizedGlobalConfig\n id?: number | string\n operation: 'create' | 'update'\n overrideAccess: boolean\n parentIndexPath: string\n /**\n * @todo make required in v4.0\n */\n parentIsLocalized?: boolean\n parentPath: string\n parentSchemaPath: string\n req: PayloadRequest\n siblingData: JsonObject\n /**\n * The original siblingData (not modified by any hooks)\n */\n siblingDoc: JsonObject\n}\n\nexport const traverseFields = async <T>({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath,\n parentIsLocalized,\n parentPath,\n parentSchemaPath,\n req,\n siblingData,\n siblingDoc,\n}: Args<T>): Promise<void> => {\n unflattenData(siblingData)\n const promises: Promise<void>[] = []\n\n fields.forEach((field, fieldIndex) => {\n promises.push(\n promise({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n field,\n fieldIndex,\n global,\n operation,\n overrideAccess,\n parentIndexPath,\n parentIsLocalized: parentIsLocalized!,\n parentPath,\n parentSchemaPath,\n req,\n siblingData,\n siblingDoc,\n siblingFields: fields,\n }),\n )\n })\n\n await Promise.all(promises)\n}\n"],"names":["unflattenData","promise","traverseFields","id","blockData","collection","context","data","doc","fields","global","operation","overrideAccess","parentIndexPath","parentIsLocalized","parentPath","parentSchemaPath","req","siblingData","siblingDoc","promises","forEach","field","fieldIndex","push","siblingFields","Promise","all"],"mappings":"AAMA,SAASA,aAAa,QAAQ,sCAAqC;AACnE,SAASC,OAAO,QAAQ,eAAc;AAkCtC,OAAO,MAAMC,iBAAiB,OAAU,EACtCC,EAAE,EACFC,SAAS,EACTC,UAAU,EACVC,OAAO,EACPC,IAAI,EACJC,GAAG,EACHC,MAAM,EACNC,MAAM,EACNC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,UAAU,EACVC,gBAAgB,EAChBC,GAAG,EACHC,WAAW,EACXC,UAAU,EACF;IACRnB,cAAckB;IACd,MAAME,WAA4B,EAAE;IAEpCX,OAAOY,OAAO,CAAC,CAACC,OAAOC;QACrBH,SAASI,IAAI,CACXvB,QAAQ;YACNE;YACAC;YACAC;YACAC;YACAC;YACAC;YACAc;YACAC;YACAb;YACAC;YACAC;YACAC;YACAC,mBAAmBA;YACnBC;YACAC;YACAC;YACAC;YACAC;YACAM,eAAehB;QACjB;IAEJ;IAEA,MAAMiB,QAAQC,GAAG,CAACP;AACpB,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getFoldersAndDocumentsFromJoin.d.ts","sourceRoot":"","sources":["../../../src/folders/utils/getFoldersAndDocumentsFromJoin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAY,cAAc,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAMnD,KAAK,+BAA+B,GAAG;IACrC,SAAS,EAAE,gBAAgB,EAAE,CAAA;IAC7B,yBAAyB,EAAE,cAAc,EAAE,CAAA;IAC3C,UAAU,EAAE,gBAAgB,EAAE,CAAA;CAC/B,CAAA;AACD,KAAK,4BAA4B,GAAG;IAClC;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAA;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,cAAc,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AACD,wBAAsB,gCAAgC,CAAC,EACrD,aAAa,EACb,WAAW,EACX,cAAc,EACd,GAAG,GACJ,EAAE,4BAA4B,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAmEzE"}
1
+ {"version":3,"file":"getFoldersAndDocumentsFromJoin.d.ts","sourceRoot":"","sources":["../../../src/folders/utils/getFoldersAndDocumentsFromJoin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAY,cAAc,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAMnD,KAAK,+BAA+B,GAAG;IACrC,SAAS,EAAE,gBAAgB,EAAE,CAAA;IAC7B,yBAAyB,EAAE,cAAc,EAAE,CAAA;IAC3C,UAAU,EAAE,gBAAgB,EAAE,CAAA;CAC/B,CAAA;AACD,KAAK,4BAA4B,GAAG;IAClC;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAA;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,cAAc,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AACD,wBAAsB,gCAAgC,CAAC,EACrD,aAAa,EACb,WAAW,EACX,cAAc,EACd,GAAG,GACJ,EAAE,4BAA4B,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAoEzE"}
@@ -9,6 +9,7 @@ export async function queryDocumentsAndFoldersFromJoin({ documentWhere, folderWh
9
9
  const subfolderDoc = await payload.find({
10
10
  collection: payload.config.folders.slug,
11
11
  depth: 1,
12
+ draft: true,
12
13
  joins: {
13
14
  documentsAndFolders: {
14
15
  limit: 100_000_000,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/folders/utils/getFoldersAndDocumentsFromJoin.ts"],"sourcesContent":["import type { PaginatedDocs } from '../../database/types.js'\nimport type { CollectionSlug } from '../../index.js'\nimport type { Document, PayloadRequest, Where } from '../../types/index.js'\nimport type { FolderOrDocument } from '../types.js'\n\nimport { APIError } from '../../errors/APIError.js'\nimport { combineWhereConstraints } from '../../utilities/combineWhereConstraints.js'\nimport { formatFolderOrDocumentItem } from './formatFolderOrDocumentItem.js'\n\ntype QueryDocumentsAndFoldersResults = {\n documents: FolderOrDocument[]\n folderAssignedCollections: CollectionSlug[]\n subfolders: FolderOrDocument[]\n}\ntype QueryDocumentsAndFoldersArgs = {\n /**\n * Optional where clause to filter documents by\n * @default undefined\n */\n documentWhere?: Where\n /** Optional where clause to filter subfolders by\n * @default undefined\n */\n folderWhere?: Where\n parentFolderID: number | string\n req: PayloadRequest\n}\nexport async function queryDocumentsAndFoldersFromJoin({\n documentWhere,\n folderWhere,\n parentFolderID,\n req,\n}: QueryDocumentsAndFoldersArgs): Promise<QueryDocumentsAndFoldersResults> {\n const { payload, user } = req\n\n if (payload.config.folders === false) {\n throw new APIError('Folders are not enabled', 500)\n }\n\n const subfolderDoc = (await payload.find({\n collection: payload.config.folders.slug,\n depth: 1,\n joins: {\n documentsAndFolders: {\n limit: 100_000_000,\n sort: 'name',\n where: combineWhereConstraints([folderWhere, documentWhere], 'or'),\n },\n },\n limit: 1,\n overrideAccess: false,\n req,\n select: {\n documentsAndFolders: true,\n folderType: true,\n },\n user,\n where: {\n id: {\n equals: parentFolderID,\n },\n },\n })) as PaginatedDocs<Document>\n\n const childrenDocs = subfolderDoc?.docs[0]?.documentsAndFolders?.docs || []\n\n const results: QueryDocumentsAndFoldersResults = childrenDocs.reduce(\n (acc: QueryDocumentsAndFoldersResults, doc: Document) => {\n if (!payload.config.folders) {\n return acc\n }\n const { relationTo, value } = doc\n const item = formatFolderOrDocumentItem({\n folderFieldName: payload.config.folders.fieldName,\n isUpload: Boolean(payload.collections[relationTo]!.config.upload),\n relationTo,\n useAsTitle: payload.collections[relationTo]!.config.admin?.useAsTitle,\n value,\n })\n\n if (relationTo === payload.config.folders.slug) {\n acc.subfolders.push(item)\n } else {\n acc.documents.push(item)\n }\n\n return acc\n },\n {\n documents: [],\n subfolders: [],\n },\n )\n\n return {\n documents: results.documents,\n folderAssignedCollections: subfolderDoc?.docs[0]?.folderType || [],\n subfolders: results.subfolders,\n }\n}\n"],"names":["APIError","combineWhereConstraints","formatFolderOrDocumentItem","queryDocumentsAndFoldersFromJoin","documentWhere","folderWhere","parentFolderID","req","payload","user","config","folders","subfolderDoc","find","collection","slug","depth","joins","documentsAndFolders","limit","sort","where","overrideAccess","select","folderType","id","equals","childrenDocs","docs","results","reduce","acc","doc","relationTo","value","item","folderFieldName","fieldName","isUpload","Boolean","collections","upload","useAsTitle","admin","subfolders","push","documents","folderAssignedCollections"],"mappings":"AAKA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,uBAAuB,QAAQ,6CAA4C;AACpF,SAASC,0BAA0B,QAAQ,kCAAiC;AAoB5E,OAAO,eAAeC,iCAAiC,EACrDC,aAAa,EACbC,WAAW,EACXC,cAAc,EACdC,GAAG,EAC0B;IAC7B,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAE,GAAGF;IAE1B,IAAIC,QAAQE,MAAM,CAACC,OAAO,KAAK,OAAO;QACpC,MAAM,IAAIX,SAAS,2BAA2B;IAChD;IAEA,MAAMY,eAAgB,MAAMJ,QAAQK,IAAI,CAAC;QACvCC,YAAYN,QAAQE,MAAM,CAACC,OAAO,CAACI,IAAI;QACvCC,OAAO;QACPC,OAAO;YACLC,qBAAqB;gBACnBC,OAAO;gBACPC,MAAM;gBACNC,OAAOpB,wBAAwB;oBAACI;oBAAaD;iBAAc,EAAE;YAC/D;QACF;QACAe,OAAO;QACPG,gBAAgB;QAChBf;QACAgB,QAAQ;YACNL,qBAAqB;YACrBM,YAAY;QACd;QACAf;QACAY,OAAO;YACLI,IAAI;gBACFC,QAAQpB;YACV;QACF;IACF;IAEA,MAAMqB,eAAef,cAAcgB,IAAI,CAAC,EAAE,EAAEV,qBAAqBU,QAAQ,EAAE;IAE3E,MAAMC,UAA2CF,aAAaG,MAAM,CAClE,CAACC,KAAsCC;QACrC,IAAI,CAACxB,QAAQE,MAAM,CAACC,OAAO,EAAE;YAC3B,OAAOoB;QACT;QACA,MAAM,EAAEE,UAAU,EAAEC,KAAK,EAAE,GAAGF;QAC9B,MAAMG,OAAOjC,2BAA2B;YACtCkC,iBAAiB5B,QAAQE,MAAM,CAACC,OAAO,CAAC0B,SAAS;YACjDC,UAAUC,QAAQ/B,QAAQgC,WAAW,CAACP,WAAW,CAAEvB,MAAM,CAAC+B,MAAM;YAChER;YACAS,YAAYlC,QAAQgC,WAAW,CAACP,WAAW,CAAEvB,MAAM,CAACiC,KAAK,EAAED;YAC3DR;QACF;QAEA,IAAID,eAAezB,QAAQE,MAAM,CAACC,OAAO,CAACI,IAAI,EAAE;YAC9CgB,IAAIa,UAAU,CAACC,IAAI,CAACV;QACtB,OAAO;YACLJ,IAAIe,SAAS,CAACD,IAAI,CAACV;QACrB;QAEA,OAAOJ;IACT,GACA;QACEe,WAAW,EAAE;QACbF,YAAY,EAAE;IAChB;IAGF,OAAO;QACLE,WAAWjB,QAAQiB,SAAS;QAC5BC,2BAA2BnC,cAAcgB,IAAI,CAAC,EAAE,EAAEJ,cAAc,EAAE;QAClEoB,YAAYf,QAAQe,UAAU;IAChC;AACF"}
1
+ {"version":3,"sources":["../../../src/folders/utils/getFoldersAndDocumentsFromJoin.ts"],"sourcesContent":["import type { PaginatedDocs } from '../../database/types.js'\nimport type { CollectionSlug } from '../../index.js'\nimport type { Document, PayloadRequest, Where } from '../../types/index.js'\nimport type { FolderOrDocument } from '../types.js'\n\nimport { APIError } from '../../errors/APIError.js'\nimport { combineWhereConstraints } from '../../utilities/combineWhereConstraints.js'\nimport { formatFolderOrDocumentItem } from './formatFolderOrDocumentItem.js'\n\ntype QueryDocumentsAndFoldersResults = {\n documents: FolderOrDocument[]\n folderAssignedCollections: CollectionSlug[]\n subfolders: FolderOrDocument[]\n}\ntype QueryDocumentsAndFoldersArgs = {\n /**\n * Optional where clause to filter documents by\n * @default undefined\n */\n documentWhere?: Where\n /** Optional where clause to filter subfolders by\n * @default undefined\n */\n folderWhere?: Where\n parentFolderID: number | string\n req: PayloadRequest\n}\nexport async function queryDocumentsAndFoldersFromJoin({\n documentWhere,\n folderWhere,\n parentFolderID,\n req,\n}: QueryDocumentsAndFoldersArgs): Promise<QueryDocumentsAndFoldersResults> {\n const { payload, user } = req\n\n if (payload.config.folders === false) {\n throw new APIError('Folders are not enabled', 500)\n }\n\n const subfolderDoc = (await payload.find({\n collection: payload.config.folders.slug,\n depth: 1,\n draft: true,\n joins: {\n documentsAndFolders: {\n limit: 100_000_000,\n sort: 'name',\n where: combineWhereConstraints([folderWhere, documentWhere], 'or'),\n },\n },\n limit: 1,\n overrideAccess: false,\n req,\n select: {\n documentsAndFolders: true,\n folderType: true,\n },\n user,\n where: {\n id: {\n equals: parentFolderID,\n },\n },\n })) as PaginatedDocs<Document>\n\n const childrenDocs = subfolderDoc?.docs[0]?.documentsAndFolders?.docs || []\n\n const results: QueryDocumentsAndFoldersResults = childrenDocs.reduce(\n (acc: QueryDocumentsAndFoldersResults, doc: Document) => {\n if (!payload.config.folders) {\n return acc\n }\n const { relationTo, value } = doc\n const item = formatFolderOrDocumentItem({\n folderFieldName: payload.config.folders.fieldName,\n isUpload: Boolean(payload.collections[relationTo]!.config.upload),\n relationTo,\n useAsTitle: payload.collections[relationTo]!.config.admin?.useAsTitle,\n value,\n })\n\n if (relationTo === payload.config.folders.slug) {\n acc.subfolders.push(item)\n } else {\n acc.documents.push(item)\n }\n\n return acc\n },\n {\n documents: [],\n subfolders: [],\n },\n )\n\n return {\n documents: results.documents,\n folderAssignedCollections: subfolderDoc?.docs[0]?.folderType || [],\n subfolders: results.subfolders,\n }\n}\n"],"names":["APIError","combineWhereConstraints","formatFolderOrDocumentItem","queryDocumentsAndFoldersFromJoin","documentWhere","folderWhere","parentFolderID","req","payload","user","config","folders","subfolderDoc","find","collection","slug","depth","draft","joins","documentsAndFolders","limit","sort","where","overrideAccess","select","folderType","id","equals","childrenDocs","docs","results","reduce","acc","doc","relationTo","value","item","folderFieldName","fieldName","isUpload","Boolean","collections","upload","useAsTitle","admin","subfolders","push","documents","folderAssignedCollections"],"mappings":"AAKA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,uBAAuB,QAAQ,6CAA4C;AACpF,SAASC,0BAA0B,QAAQ,kCAAiC;AAoB5E,OAAO,eA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;YACLJ,IAAIe,SAAS,CAACD,IAAI,CAACV;QACrB;QAEA,OAAOJ;IACT,GACA;QACEe,WAAW,EAAE;QACbF,YAAY,EAAE;IAChB;IAGF,OAAO;QACLE,WAAWjB,QAAQiB,SAAS;QAC5BC,2BAA2BpC,cAAciB,IAAI,CAAC,EAAE,EAAEJ,cAAc,EAAE;QAClEoB,YAAYf,QAAQe,UAAU;IAChC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"countGlobalVersions.d.ts","sourceRoot":"","sources":["../../../src/globals/operations/countGlobalVersions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAKjE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAA;AAGvB,MAAM,MAAM,SAAS,GAAG;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,MAAM,EAAE,qBAAqB,CAAA;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,GAAG,CAAC,EAAE,cAAc,CAAA;IACpB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAGD,eAAO,MAAM,4BAA4B,GAAU,KAAK,SAAS,UAAU,QACnE,SAAS,KACd,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAoE/B,CAAA"}
1
+ {"version":3,"file":"countGlobalVersions.d.ts","sourceRoot":"","sources":["../../../src/globals/operations/countGlobalVersions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAKjE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAA;AAGvB,MAAM,MAAM,SAAS,GAAG;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,MAAM,EAAE,qBAAqB,CAAA;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,GAAG,CAAC,EAAE,cAAc,CAAA;IACpB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAGD,eAAO,MAAM,4BAA4B,GAAU,KAAK,SAAS,UAAU,QACnE,SAAS,KACd,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAqE/B,CAAA"}
@@ -51,6 +51,7 @@ export const countGlobalVersionsOperation = async (args)=>{
51
51
  });
52
52
  const result = await payload.db.countGlobalVersions({
53
53
  global: global.slug,
54
+ locale: req?.locale || undefined,
54
55
  req,
55
56
  where: fullWhere
56
57
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/globals/operations/countGlobalVersions.ts"],"sourcesContent":["import type { AccessResult } from '../../config/types.js'\nimport type { PayloadRequest, Where } from '../../types/index.js'\n\nimport { executeAccess } from '../../auth/executeAccess.js'\nimport { combineQueries } from '../../database/combineQueries.js'\nimport { validateQueryPaths } from '../../database/queryValidation/validateQueryPaths.js'\nimport {\n buildVersionGlobalFields,\n type GlobalSlug,\n type SanitizedGlobalConfig,\n} from '../../index.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\n\nexport type Arguments = {\n disableErrors?: boolean\n global: SanitizedGlobalConfig\n overrideAccess?: boolean\n req?: PayloadRequest\n where?: Where\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const countGlobalVersionsOperation = async <TSlug extends GlobalSlug>(\n args: Arguments,\n): Promise<{ totalDocs: number }> => {\n try {\n const { disableErrors, global, overrideAccess, where } = args\n const req = args.req!\n const { payload } = req\n\n // /////////////////////////////////////\n // beforeOperation - Global\n // /////////////////////////////////////\n\n if (global.hooks?.beforeOperation?.length) {\n for (const hook of global.hooks.beforeOperation) {\n args =\n (await hook({\n args,\n context: req.context,\n global,\n operation: 'countVersions',\n overrideAccess,\n req,\n })) || args\n }\n }\n\n // /////////////////////////////////////\n // Access\n // /////////////////////////////////////\n\n let accessResult: AccessResult\n\n if (!overrideAccess) {\n accessResult = await executeAccess({ disableErrors, req }, global.access.readVersions)\n\n // If errors are disabled, and access returns false, return empty results\n if (accessResult === false) {\n return {\n totalDocs: 0,\n }\n }\n }\n\n const fullWhere = combineQueries(where!, accessResult!)\n\n const versionFields = buildVersionGlobalFields(payload.config, global, true)\n\n await validateQueryPaths({\n globalConfig: global,\n overrideAccess: overrideAccess!,\n req,\n versionFields,\n where: where!,\n })\n\n const result = await payload.db.countGlobalVersions({\n global: global.slug,\n req,\n where: fullWhere,\n })\n\n // /////////////////////////////////////\n // Return results\n // /////////////////////////////////////\n\n return result\n } catch (error: unknown) {\n await killTransaction(args.req!)\n throw error\n }\n}\n"],"names":["executeAccess","combineQueries","validateQueryPaths","buildVersionGlobalFields","killTransaction","countGlobalVersionsOperation","args","disableErrors","global","overrideAccess","where","req","payload","hooks","beforeOperation","length","hook","context","operation","accessResult","access","readVersions","totalDocs","fullWhere","versionFields","config","globalConfig","result","db","countGlobalVersions","slug","error"],"mappings":"AAGA,SAASA,aAAa,QAAQ,8BAA6B;AAC3D,SAASC,cAAc,QAAQ,mCAAkC;AACjE,SAASC,kBAAkB,QAAQ,uDAAsD;AACzF,SACEC,wBAAwB,QAGnB,iBAAgB;AACvB,SAASC,eAAe,QAAQ,qCAAoC;AAUpE,6DAA6D;AAC7D,OAAO,MAAMC,+BAA+B,OAC1CC;IAEA,IAAI;QACF,MAAM,EAAEC,aAAa,EAAEC,MAAM,EAAEC,cAAc,EAAEC,KAAK,EAAE,GAAGJ;QACzD,MAAMK,MAAML,KAAKK,GAAG;QACpB,MAAM,EAAEC,OAAO,EAAE,GAAGD;QAEpB,wCAAwC;QACxC,2BAA2B;QAC3B,wCAAwC;QAExC,IAAIH,OAAOK,KAAK,EAAEC,iBAAiBC,QAAQ;YACzC,KAAK,MAAMC,QAAQR,OAAOK,KAAK,CAACC,eAAe,CAAE;gBAC/CR,OACE,AAAC,MAAMU,KAAK;oBACVV;oBACAW,SAASN,IAAIM,OAAO;oBACpBT;oBACAU,WAAW;oBACXT;oBACAE;gBACF,MAAOL;YACX;QACF;QAEA,wCAAwC;QACxC,SAAS;QACT,wCAAwC;QAExC,IAAIa;QAEJ,IAAI,CAACV,gBAAgB;YACnBU,eAAe,MAAMnB,cAAc;gBAAEO;gBAAeI;YAAI,GAAGH,OAAOY,MAAM,CAACC,YAAY;YAErF,yEAAyE;YACzE,IAAIF,iBAAiB,OAAO;gBAC1B,OAAO;oBACLG,WAAW;gBACb;YACF;QACF;QAEA,MAAMC,YAAYtB,eAAeS,OAAQS;QAEzC,MAAMK,gBAAgBrB,yBAAyBS,QAAQa,MAAM,EAAEjB,QAAQ;QAEvE,MAAMN,mBAAmB;YACvBwB,cAAclB;YACdC,gBAAgBA;YAChBE;YACAa;YACAd,OAAOA;QACT;QAEA,MAAMiB,SAAS,MAAMf,QAAQgB,EAAE,CAACC,mBAAmB,CAAC;YAClDrB,QAAQA,OAAOsB,IAAI;YACnBnB;YACAD,OAAOa;QACT;QAEA,wCAAwC;QACxC,iBAAiB;QACjB,wCAAwC;QAExC,OAAOI;IACT,EAAE,OAAOI,OAAgB;QACvB,MAAM3B,gBAAgBE,KAAKK,GAAG;QAC9B,MAAMoB;IACR;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/globals/operations/countGlobalVersions.ts"],"sourcesContent":["import type { AccessResult } from '../../config/types.js'\nimport type { PayloadRequest, Where } from '../../types/index.js'\n\nimport { executeAccess } from '../../auth/executeAccess.js'\nimport { combineQueries } from '../../database/combineQueries.js'\nimport { validateQueryPaths } from '../../database/queryValidation/validateQueryPaths.js'\nimport {\n buildVersionGlobalFields,\n type GlobalSlug,\n type SanitizedGlobalConfig,\n} from '../../index.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\n\nexport type Arguments = {\n disableErrors?: boolean\n global: SanitizedGlobalConfig\n overrideAccess?: boolean\n req?: PayloadRequest\n where?: Where\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const countGlobalVersionsOperation = async <TSlug extends GlobalSlug>(\n args: Arguments,\n): Promise<{ totalDocs: number }> => {\n try {\n const { disableErrors, global, overrideAccess, where } = args\n const req = args.req!\n const { payload } = req\n\n // /////////////////////////////////////\n // beforeOperation - Global\n // /////////////////////////////////////\n\n if (global.hooks?.beforeOperation?.length) {\n for (const hook of global.hooks.beforeOperation) {\n args =\n (await hook({\n args,\n context: req.context,\n global,\n operation: 'countVersions',\n overrideAccess,\n req,\n })) || args\n }\n }\n\n // /////////////////////////////////////\n // Access\n // /////////////////////////////////////\n\n let accessResult: AccessResult\n\n if (!overrideAccess) {\n accessResult = await executeAccess({ disableErrors, req }, global.access.readVersions)\n\n // If errors are disabled, and access returns false, return empty results\n if (accessResult === false) {\n return {\n totalDocs: 0,\n }\n }\n }\n\n const fullWhere = combineQueries(where!, accessResult!)\n\n const versionFields = buildVersionGlobalFields(payload.config, global, true)\n\n await validateQueryPaths({\n globalConfig: global,\n overrideAccess: overrideAccess!,\n req,\n versionFields,\n where: where!,\n })\n\n const result = await payload.db.countGlobalVersions({\n global: global.slug,\n locale: req?.locale || undefined,\n req,\n where: fullWhere,\n })\n\n // /////////////////////////////////////\n // Return results\n // /////////////////////////////////////\n\n return result\n } catch (error: unknown) {\n await killTransaction(args.req!)\n throw error\n }\n}\n"],"names":["executeAccess","combineQueries","validateQueryPaths","buildVersionGlobalFields","killTransaction","countGlobalVersionsOperation","args","disableErrors","global","overrideAccess","where","req","payload","hooks","beforeOperation","length","hook","context","operation","accessResult","access","readVersions","totalDocs","fullWhere","versionFields","config","globalConfig","result","db","countGlobalVersions","slug","locale","undefined","error"],"mappings":"AAGA,SAASA,aAAa,QAAQ,8BAA6B;AAC3D,SAASC,cAAc,QAAQ,mCAAkC;AACjE,SAASC,kBAAkB,QAAQ,uDAAsD;AACzF,SACEC,wBAAwB,QAGnB,iBAAgB;AACvB,SAASC,eAAe,QAAQ,qCAAoC;AAUpE,6DAA6D;AAC7D,OAAO,MAAMC,+BAA+B,OAC1CC;IAEA,IAAI;QACF,MAAM,EAAEC,aAAa,EAAEC,MAAM,EAAEC,cAAc,EAAEC,KAAK,EAAE,GAAGJ;QACzD,MAAMK,MAAML,KAAKK,GAAG;QACpB,MAAM,EAAEC,OAAO,EAAE,GAAGD;QAEpB,wCAAwC;QACxC,2BAA2B;QAC3B,wCAAwC;QAExC,IAAIH,OAAOK,KAAK,EAAEC,iBAAiBC,QAAQ;YACzC,KAAK,MAAMC,QAAQR,OAAOK,KAAK,CAACC,eAAe,CAAE;gBAC/CR,OACE,AAAC,MAAMU,KAAK;oBACVV;oBACAW,SAASN,IAAIM,OAAO;oBACpBT;oBACAU,WAAW;oBACXT;oBACAE;gBACF,MAAOL;YACX;QACF;QAEA,wCAAwC;QACxC,SAAS;QACT,wCAAwC;QAExC,IAAIa;QAEJ,IAAI,CAACV,gBAAgB;YACnBU,eAAe,MAAMnB,cAAc;gBAAEO;gBAAeI;YAAI,GAAGH,OAAOY,MAAM,CAACC,YAAY;YAErF,yEAAyE;YACzE,IAAIF,iBAAiB,OAAO;gBAC1B,OAAO;oBACLG,WAAW;gBACb;YACF;QACF;QAEA,MAAMC,YAAYtB,eAAeS,OAAQS;QAEzC,MAAMK,gBAAgBrB,yBAAyBS,QAAQa,MAAM,EAAEjB,QAAQ;QAEvE,MAAMN,mBAAmB;YACvBwB,cAAclB;YACdC,gBAAgBA;YAChBE;YACAa;YACAd,OAAOA;QACT;QAEA,MAAMiB,SAAS,MAAMf,QAAQgB,EAAE,CAACC,mBAAmB,CAAC;YAClDrB,QAAQA,OAAOsB,IAAI;YACnBC,QAAQpB,KAAKoB,UAAUC;YACvBrB;YACAD,OAAOa;QACT;QAEA,wCAAwC;QACxC,iBAAiB;QACjB,wCAAwC;QAExC,OAAOI;IACT,EAAE,OAAOM,OAAgB;QACvB,MAAM7B,gBAAgBE,KAAKK,GAAG;QAC9B,MAAMsB;IACR;AACF,EAAC"}
@@ -13495,6 +13495,73 @@ type ParseDocumentIDArgs = {
13495
13495
  };
13496
13496
  declare function parseDocumentID({ id, collectionSlug, payload }: ParseDocumentIDArgs): string | number | undefined;
13497
13497
 
13498
+ type JoinParams = {
13499
+ [schemaPath: string]: {
13500
+ limit?: unknown;
13501
+ sort?: string;
13502
+ where?: unknown;
13503
+ } | false;
13504
+ } | false;
13505
+ /**
13506
+ * Convert request JoinQuery object from strings to numbers
13507
+ * @param joins
13508
+ */
13509
+ declare const sanitizeJoinParams: (_joins?: JoinParams) => JoinQuery;
13510
+
13511
+ type RawParams = {
13512
+ [key: string]: unknown;
13513
+ autosave?: string;
13514
+ data?: string;
13515
+ depth?: string;
13516
+ draft?: string;
13517
+ field?: string;
13518
+ flattenLocales?: string;
13519
+ joins?: JoinParams;
13520
+ limit?: string;
13521
+ overrideLock?: string;
13522
+ page?: string;
13523
+ pagination?: string;
13524
+ populate?: unknown;
13525
+ publishAllLocales?: string;
13526
+ publishSpecificLocale?: string;
13527
+ select?: unknown;
13528
+ selectedLocales?: string;
13529
+ sort?: string | string[];
13530
+ trash?: string;
13531
+ unpublishAllLocales?: string;
13532
+ where?: string | Where;
13533
+ };
13534
+ type ParsedParams = {
13535
+ autosave?: boolean;
13536
+ data?: Record<string, unknown>;
13537
+ depth?: number;
13538
+ draft?: boolean;
13539
+ field?: string;
13540
+ flattenLocales?: boolean;
13541
+ joins?: JoinQuery;
13542
+ limit?: number;
13543
+ overrideLock?: boolean;
13544
+ page?: number;
13545
+ pagination?: boolean;
13546
+ populate?: PopulateType;
13547
+ publishAllLocales?: boolean;
13548
+ publishSpecificLocale?: string;
13549
+ select?: SelectType;
13550
+ selectedLocales?: string[];
13551
+ sort?: string[];
13552
+ trash?: boolean;
13553
+ unpublishAllLocales?: boolean;
13554
+ where?: Where;
13555
+ } & Record<string, unknown>;
13556
+ /**
13557
+ * Takes raw query parameters and parses them into the correct types that Payload expects.
13558
+ * Examples:
13559
+ * a. `draft` provided as a string of "true" is converted to a boolean
13560
+ * b. `depth` provided as a string of "0" is converted to a number
13561
+ * c. `sort` provided as a comma-separated string or array is converted to an array of strings
13562
+ */
13563
+ declare const parseParams: (params: RawParams) => ParsedParams;
13564
+
13498
13565
  interface Args$5 {
13499
13566
  fallbackLocale: TypedFallbackLocale;
13500
13567
  locale: string;
@@ -13510,19 +13577,6 @@ interface Args$5 {
13510
13577
  */
13511
13578
  declare const sanitizeFallbackLocale: ({ fallbackLocale, locale, localization, }: Args$5) => TypedFallbackLocale;
13512
13579
 
13513
- type JoinParams = {
13514
- [schemaPath: string]: {
13515
- limit?: unknown;
13516
- sort?: string;
13517
- where?: unknown;
13518
- } | false;
13519
- } | false;
13520
- /**
13521
- * Convert request JoinQuery object from strings to numbers
13522
- * @param joins
13523
- */
13524
- declare const sanitizeJoinParams: (_joins?: JoinParams) => JoinQuery;
13525
-
13526
13580
  /**
13527
13581
  * Sanitizes REST populate query to PopulateType
13528
13582
  */
@@ -13533,6 +13587,8 @@ declare const sanitizePopulateParam: (unsanitizedPopulate: unknown) => PopulateT
13533
13587
  */
13534
13588
  declare const sanitizeSelectParam: (unsanitizedSelect: unknown) => SelectType | undefined;
13535
13589
 
13590
+ declare const sanitizeSortParams: (sort: unknown) => string[] | undefined;
13591
+
13536
13592
  /**
13537
13593
  * This is used for the Select API to strip out fields that are not selected.
13538
13594
  * It will mutate the given data object and determine if your recursive function should continue to run.
@@ -14171,5 +14227,5 @@ interface GlobalCustom extends Record<string, any> {
14171
14227
  interface GlobalAdminCustom extends Record<string, any> {
14172
14228
  }
14173
14229
 
14174
- export { APIError, APIErrorName, Action, AuthenticationError, BasePayload, DatabaseKVAdapter, DiffMethod, DuplicateCollection, DuplicateFieldName, DuplicateGlobal, EntityType, ErrorDeletingFile, FileRetrievalError, FileUploadError, Forbidden, InMemoryKVAdapter, InvalidConfiguration, InvalidFieldName, InvalidFieldRelationship, JWTAuthentication, JobCancelledError, Locked, LockedAuth, MissingCollectionLabel, MissingEditorProp, MissingFieldInputOptions, MissingFieldType, MissingFile, NotFound, QueryError, UnauthorizedError, UnverifiedEmail, ValidationError, ValidationErrorName, _internal_jobSystemGlobals, _internal_resetJobSystemGlobals, _internal_safeFetchGlobal, accessOperation, addDataAndFileToRequest, addLocalesToRequestFromData, traverseFields$4 as afterChangeTraverseFields, promise as afterReadPromise, traverseFields$3 as afterReadTraverseFields, appendVersionToQueryKey, apiKeyFields as baseAPIKeyFields, accountLockFields as baseAccountLockFields, baseAuthFields, baseBlockFields, emailFieldConfig as baseEmailField, baseIDField, sessionsFieldConfig as baseSessionsField, usernameFieldConfig as baseUsernameField, verificationFields as baseVerificationFields, traverseFields$2 as beforeChangeTraverseFields, traverseFields$1 as beforeValidateTraverseFields, buildConfig, buildVersionCollectionFields, buildVersionCompoundIndexes, buildVersionGlobalFields, canAccessAdmin, checkDependencies, checkLoginPermission, combineQueries, commitTransaction, configToJSONSchema, countOperation, countRunnableOrActiveJobsForQueue, createArrayFromCommaDelineated, createClientBlocks, createClientCollectionConfig, createClientCollectionConfigs, createClientConfig, createClientField, createClientFields, createClientGlobalConfig, createClientGlobalConfigs, createDatabaseAdapter, createDataloaderCacheKey, createLocalReq, createMigration, createOperation, createPayloadRequest, createUnauthenticatedClientConfig, databaseKVAdapter, deepCopyObject, deepCopyObjectComplex, deepCopyObjectSimple, deepMergeSimple, deepMergeWithCombinedArrays, deepMergeWithReactComponents, deepMergeWithSourceArrays, initialized as default, defaultBeginTransaction, defaultLoggerOptions, defaults, definePlugin, deleteByIDOperation, deleteCollectionVersions, deleteOperation, docAccessOperation$1 as docAccessOperation, docAccessOperation as docAccessOperationGlobal, docHasTimestamps, duplicateOperation, dynamicImport, enforceMaxVersions, entityToJSONSchema, escapeRegExp, executeAccess, executeAuthStrategies, extractAccessFromPermission, extractJWT, fieldsToJSONSchema, findByIDOperation, findMigrationDir, findOneOperation, findOperation, findUp, findUpSync, findVersionByIDOperation$1 as findVersionByIDOperation, findVersionByIDOperation as findVersionByIDOperationGlobal, findVersionsOperation$1 as findVersionsOperation, findVersionsOperation as findVersionsOperationGlobal, flattenAllFields, flattenTopLevelFields, flattenWhereToOperators, forgotPasswordOperation, formatErrors, formatLabels, formatNames, genImportMapIterateFields, generateCookie, generateExpiredPayloadCookie, generateImportMap, generatePayloadCookie, getAccessResults, getBlockSelect, getCollectionIDFieldTypes, getCookieExpiration, getCurrentDate, getDataLoader, getDefaultValue, getDependencies, getFieldByPath, getFieldsToSign, getFileByPath, getFolderData, getLatestCollectionVersion, getLatestGlobalVersion, getLocalI18n, getLocalizedPaths, getLoginOptions, getMigrations, getObjectDotNotation, getPayload, getPredefinedMigration, getQueryDraftsSort, getRequestLanguage, handleEndpoints, hasWhereAccessResult, headersWithCors, importHandlerPath, inMemoryKVAdapter, incrementLoginAttempts, initOperation, initTransaction, isEntityHidden, isPlainObject, isValidID, isolateObjectProperty, jobAfterRead, jwtSign, killTransaction, localizeStatus, logError, loginOperation, logoutOperation, mapAsync, meOperation, mergeHeaders, migrate, migrate$1 as migrateCLI, migrateDown, migrateRefresh, migrateReset, migrateStatus, migrationTemplate, migrationsCollection, parseCookies, parseDocumentID, pathExistsAndIsAccessible, pathExistsAndIsAccessibleSync, readMigrationFiles, refreshOperation, registerFirstUserOperation, reload, resetLoginAttempts, resetPasswordOperation, restoreVersionOperation$1 as restoreVersionOperation, restoreVersionOperation as restoreVersionOperationGlobal, sanitizeConfig, sanitizeFallbackLocale, sanitizeField, sanitizeFields, sanitizeJoinParams, sanitizeLocales, sanitizePopulateParam, sanitizeSelectParam, saveVersion, serverOnlyAdminConfigProperties, serverOnlyConfigProperties, serverProps, slugField, sortableFieldTypes, stripUnselectedFields, toWords, traverseFields, unlockOperation, updateByIDOperation, updateOperation$1 as updateOperation, updateOperation as updateOperationGlobal, validateBlocksFilterOptions, validateQueryPaths, validateSearchParam, validations, verifyEmailOperation, versionDefaults, withNullableJSONSchemaType, writeMigrationIndex };
14175
- export type { Access, AccessArgs, AccessResult, AdminClient, AdminComponent, AdminDependencies, AdminFunction, AdminViewClientProps, AdminViewComponent, AdminViewConfig, AdminViewServerProps as AdminViewProps, AdminViewServerProps, AdminViewServerPropsOnly, AfterErrorHook$1 as AfterErrorHook, AfterErrorHookArgs, AfterErrorResult, AfterFolderListClientProps, AfterFolderListServerProps, AfterFolderListServerPropsOnly, AfterFolderListTableClientProps, AfterFolderListTableServerProps, AfterFolderListTableServerPropsOnly, AfterListClientProps, AfterListServerProps, AfterListServerPropsOnly, AfterListTableClientProps, AfterListTableServerProps, AfterListTableServerPropsOnly, AllOperations, AllowList, ApplyDisableErrors, ArrayField, ArrayFieldClient, ArrayFieldClientComponent, ArrayFieldClientProps, ArrayFieldDescriptionClientComponent, ArrayFieldDescriptionServerComponent, ArrayFieldDiffClientComponent, ArrayFieldDiffServerComponent, ArrayFieldErrorClientComponent, ArrayFieldErrorServerComponent, ArrayFieldLabelClientComponent, ArrayFieldLabelServerComponent, ArrayFieldServerComponent, ArrayFieldServerProps, ArrayFieldValidation, Auth, AuthCollection, AuthCollectionSlug, AuthOperations, AuthOperationsFromCollectionSlug, AuthStrategy, AuthStrategyFunction, AuthStrategyFunctionArgs, AuthStrategyResult, BaseDatabaseAdapter, BaseFilter, BaseJob, BaseListFilter, BaseLocalizationConfig, BaseValidateOptions, BaseVersionField, BeforeDocumentControlsClientProps, BeforeDocumentControlsServerProps, BeforeDocumentControlsServerPropsOnly, BeforeFolderListClientProps, BeforeFolderListServerProps, BeforeFolderListServerPropsOnly, BeforeFolderListTableClientProps, BeforeFolderListTableServerProps, BeforeFolderListTableServerPropsOnly, BeforeListClientProps, BeforeListServerProps, BeforeListServerPropsOnly, BeforeListTableClientProps, BeforeListTableServerProps, BeforeListTableServerPropsOnly, BeginTransaction, BinScript, BinScriptConfig, Block, BlockJSX, BlockPermissions, BlockRowLabelClientComponent, BlockRowLabelServerComponent, BlockSlug, BlocksField, BlocksFieldClient, BlocksFieldClientComponent, BlocksFieldClientProps, BlocksFieldDescriptionClientComponent, BlocksFieldDescriptionServerComponent, BlocksFieldDiffClientComponent, BlocksFieldDiffServerComponent, BlocksFieldErrorClientComponent, BlocksFieldErrorServerComponent, BlocksFieldLabelClientComponent, BlocksFieldLabelServerComponent, BlocksFieldServerComponent, BlocksFieldServerProps, BlocksFieldValidation, BlocksPermissions, BuildCollectionFolderViewResult, BuildFormStateArgs, BuildTableStateArgs, BulkOperationResult, CORSConfig, CheckboxField, CheckboxFieldClient, CheckboxFieldClientComponent, CheckboxFieldClientProps, CheckboxFieldDescriptionClientComponent, CheckboxFieldDescriptionServerComponent, CheckboxFieldDiffClientComponent, CheckboxFieldDiffServerComponent, CheckboxFieldErrorClientComponent, CheckboxFieldErrorServerComponent, CheckboxFieldLabelClientComponent, CheckboxFieldLabelServerComponent, CheckboxFieldServerComponent, CheckboxFieldServerProps, CheckboxFieldValidation, ClientBlock, ClientCollectionConfig, ClientComponentProps, ClientConfig, ClientField, ClientFieldBase, ClientFieldProps, ClientFieldSchemaMap, ClientFieldWithOptionalType, ClientGlobalConfig, DocumentViewClientProps as ClientSideEditViewProps, ClientTab, ClientUser, ClientWidget, CodeField, CodeFieldClient, CodeFieldClientComponent, CodeFieldClientProps, CodeFieldDescriptionClientComponent, CodeFieldDescriptionServerComponent, CodeFieldDiffClientComponent, CodeFieldDiffServerComponent, CodeFieldErrorClientComponent, CodeFieldErrorServerComponent, CodeFieldLabelClientComponent, CodeFieldLabelServerComponent, CodeFieldServerComponent, CodeFieldServerProps, CodeFieldValidation, CollapsedPreferences, CollapsibleField, CollapsibleFieldClient, CollapsibleFieldClientComponent, CollapsibleFieldClientProps, CollapsibleFieldDescriptionClientComponent, CollapsibleFieldDescriptionServerComponent, CollapsibleFieldDiffClientComponent, CollapsibleFieldDiffServerComponent, CollapsibleFieldErrorClientComponent, CollapsibleFieldErrorServerComponent, CollapsibleFieldLabelClientComponent, CollapsibleFieldLabelServerComponent, CollapsibleFieldServerComponent, CollapsibleFieldServerProps, Collection, CollectionAdminCustom, CollectionAdminOptions, AfterChangeHook as CollectionAfterChangeHook, AfterDeleteHook as CollectionAfterDeleteHook, AfterErrorHook as CollectionAfterErrorHook, AfterForgotPasswordHook as CollectionAfterForgotPasswordHook, AfterLoginHook as CollectionAfterLoginHook, AfterLogoutHook as CollectionAfterLogoutHook, AfterMeHook as CollectionAfterMeHook, AfterOperationHook as CollectionAfterOperationHook, AfterReadHook as CollectionAfterReadHook, AfterRefreshHook as CollectionAfterRefreshHook, BeforeChangeHook as CollectionBeforeChangeHook, BeforeDeleteHook as CollectionBeforeDeleteHook, BeforeLoginHook as CollectionBeforeLoginHook, BeforeOperationHook as CollectionBeforeOperationHook, BeforeReadHook as CollectionBeforeReadHook, BeforeValidateHook as CollectionBeforeValidateHook, CollectionConfig, CollectionCustom, MeHook as CollectionMeHook, CollectionPermission, CollectionPreferences, RefreshHook as CollectionRefreshHook, CollectionSlug, Column, ColumnPreference, CommitTransaction, CompoundIndex, ConcurrencyConfig, Condition, ConditionalDateProps, Config, ConfirmPasswordFieldValidation, Connect, Count, CountArgs, CountGlobalVersionArgs, CountGlobalVersions, CountVersions, Create, CreateArgs, CreateClientConfigArgs, CreateGlobal, CreateGlobalArgs, CreateGlobalVersion, CreateGlobalVersionArgs, CreateMigration, CreateVersion, CreateVersionArgs, CustomComponent, CustomDocumentViewConfig, CustomPayloadRequestProperties, CustomComponent as CustomPreviewButton, CustomComponent as CustomPublishButton, CustomComponent as CustomSaveButton, CustomComponent as CustomSaveDraftButton, CustomStatus, CustomUpload, CustomVersionParser, DBIdentifierName, DashboardConfig, Data, DataFromCollectionSlug, DataFromGlobalSlug, DataFromWidgetSlug, DatabaseAdapter, DatabaseAdapterResult as DatabaseAdapterObj, DatabaseKVAdapterOptions, DateField, DateFieldClient, DateFieldClientComponent, DateFieldClientProps, DateFieldDescriptionClientComponent, DateFieldDescriptionServerComponent, DateFieldDiffClientComponent, DateFieldDiffServerComponent, DateFieldErrorClientComponent, DateFieldErrorServerComponent, DateFieldLabelClientComponent, DateFieldLabelServerComponent, DateFieldServerComponent, DateFieldServerProps, DateFieldValidation, DayPickerProps, DefaultCellComponentProps, DefaultDocumentIDType, DefaultDocumentViewConfig, DefaultServerCellComponentProps, DefaultServerFunctionArgs, DefaultValue, DeleteMany, DeleteManyArgs, DeleteOne, DeleteOneArgs, DeleteVersions, DeleteVersionsArgs, Description, DescriptionFunction, Destroy, Document, DocumentEvent, DocumentPermissions, DocumentPreferences, DocumentSlots, DocumentSubViewTypes, DocumentTabClientProps, DocumentTabComponent, DocumentTabCondition, DocumentTabConfig, DocumentTabServerProps as DocumentTabProps, DocumentTabServerProps, DocumentTabServerPropsOnly, DocumentViewClientProps, DocumentViewComponent, DocumentViewConfig, DocumentViewServerProps, DocumentViewServerPropsOnly, DraftTransformCollectionWithSelect, DynamicMigrationTemplate, EditConfig, EditConfigWithRoot, EditConfigWithoutRoot, EditMenuItemsClientProps, EditMenuItemsServerProps, EditMenuItemsServerPropsOnly, EditViewComponent, EditViewConfig, EditViewProps, EmailAdapter, EmailField, EmailFieldClient, EmailFieldClientComponent, EmailFieldClientProps, EmailFieldDescriptionClientComponent, EmailFieldDescriptionServerComponent, EmailFieldDiffClientComponent, EmailFieldDiffServerComponent, EmailFieldErrorClientComponent, EmailFieldErrorServerComponent, EmailFieldLabelClientComponent, EmailFieldLabelServerComponent, EmailFieldServerComponent, EmailFieldServerProps, EmailFieldValidation, Endpoint, EntityDescription, EntityDescriptionComponent, EntityDescriptionFunction, EntityPolicies, ErrorResult, FetchAPIFileUploadOptions, Field, FieldAccess, FieldAccessArgs, FieldAffectingData, FieldAffectingDataClient, FieldBase, FieldBaseClient, FieldClientComponent, FieldCustom, FieldDescriptionClientComponent, FieldDescriptionClientProps, FieldDescriptionServerComponent, FieldDescriptionServerProps, FieldDiffClientComponent, FieldDiffClientProps, FieldDiffServerComponent, FieldDiffServerProps, FieldErrorClientComponent, FieldErrorClientProps, FieldErrorServerComponent, FieldErrorServerProps, FieldHook, FieldHookArgs, FieldLabelClientComponent, FieldLabelClientProps, FieldLabelServerComponent, FieldLabelServerProps, FieldPaths, FieldPermissions, FieldPosition, FieldPresentationalOnly, FieldPresentationalOnlyClient, FieldRow, FieldSchemaMap, FieldServerComponent, FieldState, FieldTypes, FieldWithMany, FieldWithManyClient, FieldWithMaxDepth, FieldWithMaxDepthClient, FieldWithPath, FieldWithPathClient, FieldWithSubFields, FieldWithSubFieldsClient, FieldsPermissions, FieldsPreferences, File$1 as File, FileAllowList, FileData, FileSize, FileSizeImproved, FileSizes, FileToSave, FilterOptions, FilterOptionsProps, FilterOptionsResult, Find, FindArgs, FindDistinct, FindGlobal, FindGlobalArgs, FindGlobalVersions, FindGlobalVersionsArgs, FindOne, FindOneArgs, FindOptions, FindVersions, FindVersionsArgs, FlattenedArrayField, FlattenedBlock, FlattenedBlocksField, FlattenedField$1 as FlattenedField, FlattenedGroupField, FlattenedJoinField, FlattenedTabAsField, FocalPoint, FolderListViewClientProps, FolderListViewServerProps, FolderListViewServerPropsOnly, FolderListViewSlotSharedClientProps, FolderListViewSlots, FolderSortKeys, FieldState as FormField, FieldStateWithoutComponents as FormFieldWithoutComponents, FormState, FormStateWithoutComponents, GenerateImageName, GeneratePreviewURL, GenerateSchema, GeneratedTypes, GenericDescriptionProps, GenericErrorProps, GenericLabelProps, GetAdminThumbnail, GetFolderResultsComponentAndDataArgs, GlobalAdminCustom, GlobalAdminOptions, AfterChangeHook$1 as GlobalAfterChangeHook, AfterReadHook$1 as GlobalAfterReadHook, BeforeChangeHook$1 as GlobalBeforeChangeHook, BeforeOperationHook$1 as GlobalBeforeOperationHook, BeforeReadHook$1 as GlobalBeforeReadHook, BeforeValidateHook$1 as GlobalBeforeValidateHook, GlobalConfig, GlobalCustom, GlobalPermission, GlobalSlug, GraphQLExtension, GraphQLInfo, GroupField, GroupFieldClient, GroupFieldClientComponent, GroupFieldClientProps, GroupFieldDescriptionClientComponent, GroupFieldDescriptionServerComponent, GroupFieldDiffClientComponent, GroupFieldDiffServerComponent, GroupFieldErrorClientComponent, GroupFieldErrorServerComponent, GroupFieldLabelClientComponent, GroupFieldLabelServerComponent, GroupFieldServerComponent, GroupFieldServerProps, HiddenFieldProps, HookName, HookOperationType, IfAny, ImageSize, ImageUploadFormatOptions, ImageUploadTrimOptions, ImportMap, ImportMapGenerators, IncomingAuthType, Init, InitOptions, InitPageResult, InitReqResult, InsideFieldsPreferences, IsAny, JSONField, JSONFieldClient, JSONFieldClientComponent, JSONFieldClientProps, JSONFieldDescriptionClientComponent, JSONFieldDescriptionServerComponent, JSONFieldDiffClientComponent, JSONFieldDiffServerComponent, JSONFieldErrorClientComponent, JSONFieldErrorServerComponent, JSONFieldLabelClientComponent, JSONFieldLabelServerComponent, JSONFieldServerComponent, JSONFieldServerProps, JSONFieldValidation, Job, JobLog, JobTaskStatus, JobsConfig, JoinField, JoinFieldClient, JoinFieldClientComponent, JoinFieldClientProps, JoinFieldDescriptionClientComponent, JoinFieldDescriptionServerComponent, JoinFieldDiffClientComponent, JoinFieldDiffServerComponent, JoinFieldErrorClientComponent, JoinFieldErrorServerComponent, JoinFieldLabelClientComponent, JoinFieldLabelServerComponent, JoinFieldServerComponent, JoinFieldServerProps, JoinQuery, JsonArray, JsonObject, JsonValue, KVAdapter, KVAdapterResult, KVStoreValue, LabelFunction, Labels, LabelsClient, LanguageOptions, CollectionPreferences as ListPreferences, ListQuery, ListViewClientProps, ListViewServerProps, ListViewServerPropsOnly, ListViewSlotSharedClientProps, ListViewSlots, LivePreviewConfig, LivePreviewURLType, Locale, LocalizationConfig, LocalizationConfigWithLabels, LocalizationConfigWithNoLabels, LoginResult, LoginWithUsernameOptions, MappedClientComponent, MappedEmptyComponent, MappedServerComponent, MaybePromise, MeOperationResult, MetaConfig, Migration, MigrationData, MigrationTemplateArgs, LocalizeStatusArgs$1 as MongoLocalizeStatusArgs, NamedGroupField, NamedGroupFieldClient, NamedTab, NavGroupPreferences, NavPreferences, NonPresentationalField, NonPresentationalFieldClient, NumberField, NumberFieldClient, NumberFieldClientComponent, NumberFieldClientProps, NumberFieldDescriptionClientComponent, NumberFieldDescriptionServerComponent, NumberFieldDiffClientComponent, NumberFieldDiffServerComponent, NumberFieldErrorClientComponent, NumberFieldErrorServerComponent, NumberFieldLabelClientComponent, NumberFieldLabelServerComponent, NumberFieldManyValidation, NumberFieldServerComponent, NumberFieldServerProps, NumberFieldSingleValidation, NumberFieldValidation, OGImageConfig, Operation, Operator, Option, OptionLabel, OptionObject, OrderableEndpointBody, PaginatedDistinctDocs, PaginatedDocs, Params, PasswordFieldValidation, PathToQuery, Payload, PayloadClientComponentProps, PayloadClientReactComponent, PayloadComponent, PayloadComponentProps, EmailAdapter as PayloadEmailAdapter, PayloadHandler, PayloadLogger, PayloadReactComponent, PayloadRequest, PayloadServerAction, PayloadServerComponentProps, PayloadServerReactComponent, PayloadTypes, PayloadTypesShape, Permission, Permissions, PickPreserveOptional, Plugin, PluginsMap, PointField, PointFieldClient, PointFieldClientComponent, PointFieldClientProps, PointFieldDescriptionClientComponent, PointFieldDescriptionServerComponent, PointFieldDiffClientComponent, PointFieldDiffServerComponent, PointFieldErrorClientComponent, PointFieldErrorServerComponent, PointFieldLabelClientComponent, PointFieldLabelServerComponent, PointFieldServerComponent, PointFieldServerProps, PointFieldValidation, PolymorphicRelationshipField, PolymorphicRelationshipFieldClient, PopulateType, PreferenceRequest, PreferenceUpdateRequest, PreviewButtonClientProps, PreviewButtonServerProps, PreviewButtonServerPropsOnly, ProbedImageSize, PublishButtonClientProps, PublishButtonServerProps, PublishButtonServerPropsOnly, QueryDrafts, QueryDraftsArgs, QueryPreset, RadioField, RadioFieldClient, RadioFieldClientComponent, RadioFieldClientProps, RadioFieldDescriptionClientComponent, RadioFieldDescriptionServerComponent, RadioFieldDiffClientComponent, RadioFieldDiffServerComponent, RadioFieldErrorClientComponent, RadioFieldErrorServerComponent, RadioFieldLabelClientComponent, RadioFieldLabelServerComponent, RadioFieldServerComponent, RadioFieldServerProps, RadioFieldValidation, RawPayloadComponent, RegisteredPlugins, RelationshipField, RelationshipFieldClient, RelationshipFieldClientComponent, RelationshipFieldClientProps, RelationshipFieldDescriptionClientComponent, RelationshipFieldDescriptionServerComponent, RelationshipFieldDiffClientComponent, RelationshipFieldDiffServerComponent, RelationshipFieldErrorClientComponent, RelationshipFieldErrorServerComponent, RelationshipFieldLabelClientComponent, RelationshipFieldLabelServerComponent, RelationshipFieldManyValidation, RelationshipFieldServerComponent, RelationshipFieldServerProps, RelationshipFieldSingleValidation, RelationshipFieldValidation, RelationshipValue, RenderConfigArgs, RenderDocumentVersionsProperties, RenderEntityConfigArgs, RenderFieldConfigArgs, RenderRootConfigArgs, RenderedField, ReplaceAny, RequestContext, RequiredDataFromCollection, RequiredDataFromCollectionSlug, ResolvedComponent, ResolvedFilterOptions, RichTextAdapter, RichTextAdapterProvider, RichTextField, RichTextFieldClient, RichTextFieldClientComponent, RichTextFieldClientProps, RichTextFieldDescriptionClientComponent, RichTextFieldDescriptionServerComponent, RichTextFieldDiffClientComponent, RichTextFieldDiffServerComponent, RichTextFieldErrorClientComponent, RichTextFieldErrorServerComponent, RichTextFieldLabelClientComponent, RichTextFieldLabelServerComponent, RichTextFieldServerComponent, RichTextFieldServerProps, RichTextFieldValidation, RichTextHooks, RollbackTransaction, RootLivePreviewConfig, Row, RowField, RowFieldClient, RowFieldClientComponent, RowFieldClientProps, RowFieldDescriptionClientComponent, RowFieldDescriptionServerComponent, RowFieldDiffClientComponent, RowFieldDiffServerComponent, RowFieldErrorClientComponent, RowFieldErrorServerComponent, RowFieldLabelClientComponent, RowFieldLabelServerComponent, RowFieldServerComponent, RowFieldServerProps, RowLabel, RowLabelComponent, RunInlineTaskFunction, RunJobAccess, RunJobAccessArgs, RunTaskFunction, RunTaskFunctions, RunningJob, SanitizeFieldArgs, SanitizedBlockPermissions, SanitizedBlocksPermissions, SanitizedCollectionConfig, SanitizedCollectionPermission, SanitizedCompoundIndex, SanitizedConfig, SanitizedDashboardConfig, SanitizedDocumentPermissions, SanitizedFieldPermissions, SanitizedFieldsPermissions, SanitizedGlobalConfig, SanitizedGlobalPermission, SanitizedJoins, SanitizedLabelProps, SanitizedLocalizationConfig, SanitizedPermissions, SanitizedUploadConfig, SaveButtonClientProps, SaveButtonServerProps, SaveButtonServerPropsOnly, SaveDraftButtonClientProps, SaveDraftButtonServerProps, SaveDraftButtonServerPropsOnly, SchedulePublish, SchedulePublishTaskInput, SelectExcludeType, SelectField, SelectFieldClient, SelectFieldClientComponent, SelectFieldClientProps, SelectFieldDescriptionClientComponent, SelectFieldDescriptionServerComponent, SelectFieldDiffClientComponent, SelectFieldDiffServerComponent, SelectFieldErrorClientComponent, SelectFieldErrorServerComponent, SelectFieldLabelClientComponent, SelectFieldLabelServerComponent, SelectFieldManyValidation, SelectFieldServerComponent, SelectFieldServerProps, SelectFieldSingleValidation, SelectFieldValidation, SelectIncludeType, SelectMode, SelectType, SendEmailOptions, ServerComponentProps, ServerFieldBase, ServerFunction, ServerFunctionArgs, ServerFunctionClient, ServerFunctionClientArgs, ServerFunctionConfig, ServerFunctionHandler, ServerOnlyCollectionAdminProperties, ServerOnlyCollectionProperties, ServerOnlyFieldAdminProperties, ServerOnlyFieldProperties, ServerOnlyGlobalAdminProperties, ServerOnlyGlobalProperties, ServerOnlyLivePreviewProperties, ServerOnlyUploadProperties, ServerProps, ServerPropsFromView, DocumentViewServerProps as ServerSideEditViewProps, SharedProps, SharpDependency, SingleRelationshipField, SingleRelationshipFieldClient, SingleTaskStatus, SlugField, SlugFieldClientProps, SlugifyServerFunctionArgs, Sort, LocalizeStatusArgs as SqlLocalizeStatusArgs, StaticDescription, StaticLabel, StringKeyOf, Tab, TabAsField, TabAsFieldClient, TabsField, TabsFieldClient, TabsFieldClientComponent, TabsFieldClientProps, TabsFieldDescriptionClientComponent, TabsFieldDescriptionServerComponent, TabsFieldDiffClientComponent, TabsFieldDiffServerComponent, TabsFieldErrorClientComponent, TabsFieldErrorServerComponent, TabsFieldLabelClientComponent, TabsFieldLabelServerComponent, TabsFieldServerComponent, TabsFieldServerProps, TabsPreferences, TaskConfig, TaskHandler, TaskHandlerArgs, TaskHandlerResult, TaskHandlerResults, TaskInput, TaskOutput, TaskType, TextField, TextFieldClient, TextFieldClientComponent, TextFieldClientProps, TextFieldDescriptionClientComponent, TextFieldDescriptionServerComponent, TextFieldDiffClientComponent, TextFieldDiffServerComponent, TextFieldErrorClientComponent, TextFieldErrorServerComponent, TextFieldLabelClientComponent, TextFieldLabelServerComponent, TextFieldManyValidation, TextFieldServerComponent, TextFieldServerProps, TextFieldSingleValidation, TextFieldValidation, TextareaField, TextareaFieldClient, TextareaFieldClientComponent, TextareaFieldClientProps, TextareaFieldDescriptionClientComponent, TextareaFieldDescriptionServerComponent, TextareaFieldDiffClientComponent, TextareaFieldDiffServerComponent, TextareaFieldErrorClientComponent, TextareaFieldErrorServerComponent, TextareaFieldLabelClientComponent, TextareaFieldLabelServerComponent, TextareaFieldServerComponent, TextareaFieldServerProps, TextareaFieldValidation, TimePickerProps, Timezone, TimezonesConfig, Transaction, TransformCollectionWithSelect, TransformDataWithSelect, TransformGlobalWithSelect, TraverseFieldsCallback, TypeWithID, TypeWithTimestamps, TypeWithVersion, TypedAuthOperations, TypedBlock, TypedCollection, TypedCollectionJoins, TypedCollectionSelect, TypedFallbackLocale, TypedGlobal, TypedGlobalSelect, TypedJobs, TypedLocale, TypedUploadCollection, TypedUser, TypedWidget, UIField, UIFieldClient, UIFieldClientComponent, UIFieldClientProps, UIFieldDiffClientComponent, UIFieldDiffServerComponent, UIFieldServerComponent, UIFieldServerProps, UnauthenticatedClientConfig, UnnamedGroupField, UnnamedGroupFieldClient, UnnamedTab, UnpublishButtonClientProps, UnpublishButtonServerProps, UnpublishButtonServerPropsOnly, UntypedPayloadTypes, UntypedUser, UpdateGlobal, UpdateGlobalArgs, UpdateGlobalVersion, UpdateGlobalVersionArgs, UpdateJobs, UpdateJobsArgs, UpdateMany, UpdateManyArgs, UpdateOne, UpdateOneArgs, UpdateVersion, UpdateVersionArgs, UploadCollectionSlug, UploadConfig, UploadEdits, UploadField, UploadFieldClient, UploadFieldClientComponent, UploadFieldClientProps, UploadFieldDescriptionClientComponent, UploadFieldDescriptionServerComponent, UploadFieldDiffClientComponent, UploadFieldDiffServerComponent, UploadFieldErrorClientComponent, UploadFieldErrorServerComponent, UploadFieldLabelClientComponent, UploadFieldLabelServerComponent, UploadFieldManyValidation, UploadFieldServerComponent, UploadFieldServerProps, UploadFieldSingleValidation, UploadFieldValidation, Upsert, UpsertArgs, UntypedUser as User, UserSession, UsernameFieldValidation, Validate, ValidateOptions, ValidationFieldError, ValueWithRelation, VerifyConfig, VersionField, VersionOperations, VersionTab, ViewDescriptionClientProps, ViewDescriptionServerProps, ViewDescriptionServerPropsOnly, ViewTypes, VisibleEntities, Where, WhereField, Widget, WidgetInstance, WidgetServerProps, WidgetSlug, WidgetWidth, WithServerSidePropsComponent, WithServerSidePropsComponentProps, WorkflowConfig, WorkflowHandler, WorkflowTypes, checkFileRestrictionsParams };
14230
+ export { APIError, APIErrorName, Action, AuthenticationError, BasePayload, DatabaseKVAdapter, DiffMethod, DuplicateCollection, DuplicateFieldName, DuplicateGlobal, EntityType, ErrorDeletingFile, FileRetrievalError, FileUploadError, Forbidden, InMemoryKVAdapter, InvalidConfiguration, InvalidFieldName, InvalidFieldRelationship, JWTAuthentication, JobCancelledError, Locked, LockedAuth, MissingCollectionLabel, MissingEditorProp, MissingFieldInputOptions, MissingFieldType, MissingFile, NotFound, QueryError, UnauthorizedError, UnverifiedEmail, ValidationError, ValidationErrorName, _internal_jobSystemGlobals, _internal_resetJobSystemGlobals, _internal_safeFetchGlobal, accessOperation, addDataAndFileToRequest, addLocalesToRequestFromData, traverseFields$4 as afterChangeTraverseFields, promise as afterReadPromise, traverseFields$3 as afterReadTraverseFields, appendVersionToQueryKey, apiKeyFields as baseAPIKeyFields, accountLockFields as baseAccountLockFields, baseAuthFields, baseBlockFields, emailFieldConfig as baseEmailField, baseIDField, sessionsFieldConfig as baseSessionsField, usernameFieldConfig as baseUsernameField, verificationFields as baseVerificationFields, traverseFields$2 as beforeChangeTraverseFields, traverseFields$1 as beforeValidateTraverseFields, buildConfig, buildVersionCollectionFields, buildVersionCompoundIndexes, buildVersionGlobalFields, canAccessAdmin, checkDependencies, checkLoginPermission, combineQueries, commitTransaction, configToJSONSchema, countOperation, countRunnableOrActiveJobsForQueue, createArrayFromCommaDelineated, createClientBlocks, createClientCollectionConfig, createClientCollectionConfigs, createClientConfig, createClientField, createClientFields, createClientGlobalConfig, createClientGlobalConfigs, createDatabaseAdapter, createDataloaderCacheKey, createLocalReq, createMigration, createOperation, createPayloadRequest, createUnauthenticatedClientConfig, databaseKVAdapter, deepCopyObject, deepCopyObjectComplex, deepCopyObjectSimple, deepMergeSimple, deepMergeWithCombinedArrays, deepMergeWithReactComponents, deepMergeWithSourceArrays, initialized as default, defaultBeginTransaction, defaultLoggerOptions, defaults, definePlugin, deleteByIDOperation, deleteCollectionVersions, deleteOperation, docAccessOperation$1 as docAccessOperation, docAccessOperation as docAccessOperationGlobal, docHasTimestamps, duplicateOperation, dynamicImport, enforceMaxVersions, entityToJSONSchema, escapeRegExp, executeAccess, executeAuthStrategies, extractAccessFromPermission, extractJWT, fieldsToJSONSchema, findByIDOperation, findMigrationDir, findOneOperation, findOperation, findUp, findUpSync, findVersionByIDOperation$1 as findVersionByIDOperation, findVersionByIDOperation as findVersionByIDOperationGlobal, findVersionsOperation$1 as findVersionsOperation, findVersionsOperation as findVersionsOperationGlobal, flattenAllFields, flattenTopLevelFields, flattenWhereToOperators, forgotPasswordOperation, formatErrors, formatLabels, formatNames, genImportMapIterateFields, generateCookie, generateExpiredPayloadCookie, generateImportMap, generatePayloadCookie, getAccessResults, getBlockSelect, getCollectionIDFieldTypes, getCookieExpiration, getCurrentDate, getDataLoader, getDefaultValue, getDependencies, getFieldByPath, getFieldsToSign, getFileByPath, getFolderData, getLatestCollectionVersion, getLatestGlobalVersion, getLocalI18n, getLocalizedPaths, getLoginOptions, getMigrations, getObjectDotNotation, getPayload, getPredefinedMigration, getQueryDraftsSort, getRequestLanguage, handleEndpoints, hasWhereAccessResult, headersWithCors, importHandlerPath, inMemoryKVAdapter, incrementLoginAttempts, initOperation, initTransaction, isEntityHidden, isPlainObject, isValidID, isolateObjectProperty, jobAfterRead, jwtSign, killTransaction, localizeStatus, logError, loginOperation, logoutOperation, mapAsync, meOperation, mergeHeaders, migrate, migrate$1 as migrateCLI, migrateDown, migrateRefresh, migrateReset, migrateStatus, migrationTemplate, migrationsCollection, parseCookies, parseDocumentID, parseParams, pathExistsAndIsAccessible, pathExistsAndIsAccessibleSync, readMigrationFiles, refreshOperation, registerFirstUserOperation, reload, resetLoginAttempts, resetPasswordOperation, restoreVersionOperation$1 as restoreVersionOperation, restoreVersionOperation as restoreVersionOperationGlobal, sanitizeConfig, sanitizeFallbackLocale, sanitizeField, sanitizeFields, sanitizeJoinParams, sanitizeLocales, sanitizePopulateParam, sanitizeSelectParam, sanitizeSortParams, saveVersion, serverOnlyAdminConfigProperties, serverOnlyConfigProperties, serverProps, slugField, sortableFieldTypes, stripUnselectedFields, toWords, traverseFields, unlockOperation, updateByIDOperation, updateOperation$1 as updateOperation, updateOperation as updateOperationGlobal, validateBlocksFilterOptions, validateQueryPaths, validateSearchParam, validations, verifyEmailOperation, versionDefaults, withNullableJSONSchemaType, writeMigrationIndex };
14231
+ export type { Access, AccessArgs, AccessResult, AdminClient, AdminComponent, AdminDependencies, AdminFunction, AdminViewClientProps, AdminViewComponent, AdminViewConfig, AdminViewServerProps as AdminViewProps, AdminViewServerProps, AdminViewServerPropsOnly, AfterErrorHook$1 as AfterErrorHook, AfterErrorHookArgs, AfterErrorResult, AfterFolderListClientProps, AfterFolderListServerProps, AfterFolderListServerPropsOnly, AfterFolderListTableClientProps, AfterFolderListTableServerProps, AfterFolderListTableServerPropsOnly, AfterListClientProps, AfterListServerProps, AfterListServerPropsOnly, AfterListTableClientProps, AfterListTableServerProps, AfterListTableServerPropsOnly, AllOperations, AllowList, ApplyDisableErrors, ArrayField, ArrayFieldClient, ArrayFieldClientComponent, ArrayFieldClientProps, ArrayFieldDescriptionClientComponent, ArrayFieldDescriptionServerComponent, ArrayFieldDiffClientComponent, ArrayFieldDiffServerComponent, ArrayFieldErrorClientComponent, ArrayFieldErrorServerComponent, ArrayFieldLabelClientComponent, ArrayFieldLabelServerComponent, ArrayFieldServerComponent, ArrayFieldServerProps, ArrayFieldValidation, Auth, AuthCollection, AuthCollectionSlug, AuthOperations, AuthOperationsFromCollectionSlug, AuthStrategy, AuthStrategyFunction, AuthStrategyFunctionArgs, AuthStrategyResult, BaseDatabaseAdapter, BaseFilter, BaseJob, BaseListFilter, BaseLocalizationConfig, BaseValidateOptions, BaseVersionField, BeforeDocumentControlsClientProps, BeforeDocumentControlsServerProps, BeforeDocumentControlsServerPropsOnly, BeforeFolderListClientProps, BeforeFolderListServerProps, BeforeFolderListServerPropsOnly, BeforeFolderListTableClientProps, BeforeFolderListTableServerProps, BeforeFolderListTableServerPropsOnly, BeforeListClientProps, BeforeListServerProps, BeforeListServerPropsOnly, BeforeListTableClientProps, BeforeListTableServerProps, BeforeListTableServerPropsOnly, BeginTransaction, BinScript, BinScriptConfig, Block, BlockJSX, BlockPermissions, BlockRowLabelClientComponent, BlockRowLabelServerComponent, BlockSlug, BlocksField, BlocksFieldClient, BlocksFieldClientComponent, BlocksFieldClientProps, BlocksFieldDescriptionClientComponent, BlocksFieldDescriptionServerComponent, BlocksFieldDiffClientComponent, BlocksFieldDiffServerComponent, BlocksFieldErrorClientComponent, BlocksFieldErrorServerComponent, BlocksFieldLabelClientComponent, BlocksFieldLabelServerComponent, BlocksFieldServerComponent, BlocksFieldServerProps, BlocksFieldValidation, BlocksPermissions, BuildCollectionFolderViewResult, BuildFormStateArgs, BuildTableStateArgs, BulkOperationResult, CORSConfig, CheckboxField, CheckboxFieldClient, CheckboxFieldClientComponent, CheckboxFieldClientProps, CheckboxFieldDescriptionClientComponent, CheckboxFieldDescriptionServerComponent, CheckboxFieldDiffClientComponent, CheckboxFieldDiffServerComponent, CheckboxFieldErrorClientComponent, CheckboxFieldErrorServerComponent, CheckboxFieldLabelClientComponent, CheckboxFieldLabelServerComponent, CheckboxFieldServerComponent, CheckboxFieldServerProps, CheckboxFieldValidation, ClientBlock, ClientCollectionConfig, ClientComponentProps, ClientConfig, ClientField, ClientFieldBase, ClientFieldProps, ClientFieldSchemaMap, ClientFieldWithOptionalType, ClientGlobalConfig, DocumentViewClientProps as ClientSideEditViewProps, ClientTab, ClientUser, ClientWidget, CodeField, CodeFieldClient, CodeFieldClientComponent, CodeFieldClientProps, CodeFieldDescriptionClientComponent, CodeFieldDescriptionServerComponent, CodeFieldDiffClientComponent, CodeFieldDiffServerComponent, CodeFieldErrorClientComponent, CodeFieldErrorServerComponent, CodeFieldLabelClientComponent, CodeFieldLabelServerComponent, CodeFieldServerComponent, CodeFieldServerProps, CodeFieldValidation, CollapsedPreferences, CollapsibleField, CollapsibleFieldClient, CollapsibleFieldClientComponent, CollapsibleFieldClientProps, CollapsibleFieldDescriptionClientComponent, CollapsibleFieldDescriptionServerComponent, CollapsibleFieldDiffClientComponent, CollapsibleFieldDiffServerComponent, CollapsibleFieldErrorClientComponent, CollapsibleFieldErrorServerComponent, CollapsibleFieldLabelClientComponent, CollapsibleFieldLabelServerComponent, CollapsibleFieldServerComponent, CollapsibleFieldServerProps, Collection, CollectionAdminCustom, CollectionAdminOptions, AfterChangeHook as CollectionAfterChangeHook, AfterDeleteHook as CollectionAfterDeleteHook, AfterErrorHook as CollectionAfterErrorHook, AfterForgotPasswordHook as CollectionAfterForgotPasswordHook, AfterLoginHook as CollectionAfterLoginHook, AfterLogoutHook as CollectionAfterLogoutHook, AfterMeHook as CollectionAfterMeHook, AfterOperationHook as CollectionAfterOperationHook, AfterReadHook as CollectionAfterReadHook, AfterRefreshHook as CollectionAfterRefreshHook, BeforeChangeHook as CollectionBeforeChangeHook, BeforeDeleteHook as CollectionBeforeDeleteHook, BeforeLoginHook as CollectionBeforeLoginHook, BeforeOperationHook as CollectionBeforeOperationHook, BeforeReadHook as CollectionBeforeReadHook, BeforeValidateHook as CollectionBeforeValidateHook, CollectionConfig, CollectionCustom, MeHook as CollectionMeHook, CollectionPermission, CollectionPreferences, RefreshHook as CollectionRefreshHook, CollectionSlug, Column, ColumnPreference, CommitTransaction, CompoundIndex, ConcurrencyConfig, Condition, ConditionalDateProps, Config, ConfirmPasswordFieldValidation, Connect, Count, CountArgs, CountGlobalVersionArgs, CountGlobalVersions, CountVersions, Create, CreateArgs, CreateClientConfigArgs, CreateGlobal, CreateGlobalArgs, CreateGlobalVersion, CreateGlobalVersionArgs, CreateMigration, CreateVersion, CreateVersionArgs, CustomComponent, CustomDocumentViewConfig, CustomPayloadRequestProperties, CustomComponent as CustomPreviewButton, CustomComponent as CustomPublishButton, CustomComponent as CustomSaveButton, CustomComponent as CustomSaveDraftButton, CustomStatus, CustomUpload, CustomVersionParser, DBIdentifierName, DashboardConfig, Data, DataFromCollectionSlug, DataFromGlobalSlug, DataFromWidgetSlug, DatabaseAdapter, DatabaseAdapterResult as DatabaseAdapterObj, DatabaseKVAdapterOptions, DateField, DateFieldClient, DateFieldClientComponent, DateFieldClientProps, DateFieldDescriptionClientComponent, DateFieldDescriptionServerComponent, DateFieldDiffClientComponent, DateFieldDiffServerComponent, DateFieldErrorClientComponent, DateFieldErrorServerComponent, DateFieldLabelClientComponent, DateFieldLabelServerComponent, DateFieldServerComponent, DateFieldServerProps, DateFieldValidation, DayPickerProps, DefaultCellComponentProps, DefaultDocumentIDType, DefaultDocumentViewConfig, DefaultServerCellComponentProps, DefaultServerFunctionArgs, DefaultValue, DeleteMany, DeleteManyArgs, DeleteOne, DeleteOneArgs, DeleteVersions, DeleteVersionsArgs, Description, DescriptionFunction, Destroy, Document, DocumentEvent, DocumentPermissions, DocumentPreferences, DocumentSlots, DocumentSubViewTypes, DocumentTabClientProps, DocumentTabComponent, DocumentTabCondition, DocumentTabConfig, DocumentTabServerProps as DocumentTabProps, DocumentTabServerProps, DocumentTabServerPropsOnly, DocumentViewClientProps, DocumentViewComponent, DocumentViewConfig, DocumentViewServerProps, DocumentViewServerPropsOnly, DraftTransformCollectionWithSelect, DynamicMigrationTemplate, EditConfig, EditConfigWithRoot, EditConfigWithoutRoot, EditMenuItemsClientProps, EditMenuItemsServerProps, EditMenuItemsServerPropsOnly, EditViewComponent, EditViewConfig, EditViewProps, EmailAdapter, EmailField, EmailFieldClient, EmailFieldClientComponent, EmailFieldClientProps, EmailFieldDescriptionClientComponent, EmailFieldDescriptionServerComponent, EmailFieldDiffClientComponent, EmailFieldDiffServerComponent, EmailFieldErrorClientComponent, EmailFieldErrorServerComponent, EmailFieldLabelClientComponent, EmailFieldLabelServerComponent, EmailFieldServerComponent, EmailFieldServerProps, EmailFieldValidation, Endpoint, EntityDescription, EntityDescriptionComponent, EntityDescriptionFunction, EntityPolicies, ErrorResult, FetchAPIFileUploadOptions, Field, FieldAccess, FieldAccessArgs, FieldAffectingData, FieldAffectingDataClient, FieldBase, FieldBaseClient, FieldClientComponent, FieldCustom, FieldDescriptionClientComponent, FieldDescriptionClientProps, FieldDescriptionServerComponent, FieldDescriptionServerProps, FieldDiffClientComponent, FieldDiffClientProps, FieldDiffServerComponent, FieldDiffServerProps, FieldErrorClientComponent, FieldErrorClientProps, FieldErrorServerComponent, FieldErrorServerProps, FieldHook, FieldHookArgs, FieldLabelClientComponent, FieldLabelClientProps, FieldLabelServerComponent, FieldLabelServerProps, FieldPaths, FieldPermissions, FieldPosition, FieldPresentationalOnly, FieldPresentationalOnlyClient, FieldRow, FieldSchemaMap, FieldServerComponent, FieldState, FieldTypes, FieldWithMany, FieldWithManyClient, FieldWithMaxDepth, FieldWithMaxDepthClient, FieldWithPath, FieldWithPathClient, FieldWithSubFields, FieldWithSubFieldsClient, FieldsPermissions, FieldsPreferences, File$1 as File, FileAllowList, FileData, FileSize, FileSizeImproved, FileSizes, FileToSave, FilterOptions, FilterOptionsProps, FilterOptionsResult, Find, FindArgs, FindDistinct, FindGlobal, FindGlobalArgs, FindGlobalVersions, FindGlobalVersionsArgs, FindOne, FindOneArgs, FindOptions, FindVersions, FindVersionsArgs, FlattenedArrayField, FlattenedBlock, FlattenedBlocksField, FlattenedField$1 as FlattenedField, FlattenedGroupField, FlattenedJoinField, FlattenedTabAsField, FocalPoint, FolderListViewClientProps, FolderListViewServerProps, FolderListViewServerPropsOnly, FolderListViewSlotSharedClientProps, FolderListViewSlots, FolderSortKeys, FieldState as FormField, FieldStateWithoutComponents as FormFieldWithoutComponents, FormState, FormStateWithoutComponents, GenerateImageName, GeneratePreviewURL, GenerateSchema, GeneratedTypes, GenericDescriptionProps, GenericErrorProps, GenericLabelProps, GetAdminThumbnail, GetFolderResultsComponentAndDataArgs, GlobalAdminCustom, GlobalAdminOptions, AfterChangeHook$1 as GlobalAfterChangeHook, AfterReadHook$1 as GlobalAfterReadHook, BeforeChangeHook$1 as GlobalBeforeChangeHook, BeforeOperationHook$1 as GlobalBeforeOperationHook, BeforeReadHook$1 as GlobalBeforeReadHook, BeforeValidateHook$1 as GlobalBeforeValidateHook, GlobalConfig, GlobalCustom, GlobalPermission, GlobalSlug, GraphQLExtension, GraphQLInfo, GroupField, GroupFieldClient, GroupFieldClientComponent, GroupFieldClientProps, GroupFieldDescriptionClientComponent, GroupFieldDescriptionServerComponent, GroupFieldDiffClientComponent, GroupFieldDiffServerComponent, GroupFieldErrorClientComponent, GroupFieldErrorServerComponent, GroupFieldLabelClientComponent, GroupFieldLabelServerComponent, GroupFieldServerComponent, GroupFieldServerProps, HiddenFieldProps, HookName, HookOperationType, IfAny, ImageSize, ImageUploadFormatOptions, ImageUploadTrimOptions, ImportMap, ImportMapGenerators, IncomingAuthType, Init, InitOptions, InitPageResult, InitReqResult, InsideFieldsPreferences, IsAny, JSONField, JSONFieldClient, JSONFieldClientComponent, JSONFieldClientProps, JSONFieldDescriptionClientComponent, JSONFieldDescriptionServerComponent, JSONFieldDiffClientComponent, JSONFieldDiffServerComponent, JSONFieldErrorClientComponent, JSONFieldErrorServerComponent, JSONFieldLabelClientComponent, JSONFieldLabelServerComponent, JSONFieldServerComponent, JSONFieldServerProps, JSONFieldValidation, Job, JobLog, JobTaskStatus, JobsConfig, JoinField, JoinFieldClient, JoinFieldClientComponent, JoinFieldClientProps, JoinFieldDescriptionClientComponent, JoinFieldDescriptionServerComponent, JoinFieldDiffClientComponent, JoinFieldDiffServerComponent, JoinFieldErrorClientComponent, JoinFieldErrorServerComponent, JoinFieldLabelClientComponent, JoinFieldLabelServerComponent, JoinFieldServerComponent, JoinFieldServerProps, JoinParams, JoinQuery, JsonArray, JsonObject, JsonValue, KVAdapter, KVAdapterResult, KVStoreValue, LabelFunction, Labels, LabelsClient, LanguageOptions, CollectionPreferences as ListPreferences, ListQuery, ListViewClientProps, ListViewServerProps, ListViewServerPropsOnly, ListViewSlotSharedClientProps, ListViewSlots, LivePreviewConfig, LivePreviewURLType, Locale, LocalizationConfig, LocalizationConfigWithLabels, LocalizationConfigWithNoLabels, LoginResult, LoginWithUsernameOptions, MappedClientComponent, MappedEmptyComponent, MappedServerComponent, MaybePromise, MeOperationResult, MetaConfig, Migration, MigrationData, MigrationTemplateArgs, LocalizeStatusArgs$1 as MongoLocalizeStatusArgs, NamedGroupField, NamedGroupFieldClient, NamedTab, NavGroupPreferences, NavPreferences, NonPresentationalField, NonPresentationalFieldClient, NumberField, NumberFieldClient, NumberFieldClientComponent, NumberFieldClientProps, NumberFieldDescriptionClientComponent, NumberFieldDescriptionServerComponent, NumberFieldDiffClientComponent, NumberFieldDiffServerComponent, NumberFieldErrorClientComponent, NumberFieldErrorServerComponent, NumberFieldLabelClientComponent, NumberFieldLabelServerComponent, NumberFieldManyValidation, NumberFieldServerComponent, NumberFieldServerProps, NumberFieldSingleValidation, NumberFieldValidation, OGImageConfig, Operation, Operator, Option, OptionLabel, OptionObject, OrderableEndpointBody, PaginatedDistinctDocs, PaginatedDocs, Params, ParsedParams, PasswordFieldValidation, PathToQuery, Payload, PayloadClientComponentProps, PayloadClientReactComponent, PayloadComponent, PayloadComponentProps, EmailAdapter as PayloadEmailAdapter, PayloadHandler, PayloadLogger, PayloadReactComponent, PayloadRequest, PayloadServerAction, PayloadServerComponentProps, PayloadServerReactComponent, PayloadTypes, PayloadTypesShape, Permission, Permissions, PickPreserveOptional, Plugin, PluginsMap, PointField, PointFieldClient, PointFieldClientComponent, PointFieldClientProps, PointFieldDescriptionClientComponent, PointFieldDescriptionServerComponent, PointFieldDiffClientComponent, PointFieldDiffServerComponent, PointFieldErrorClientComponent, PointFieldErrorServerComponent, PointFieldLabelClientComponent, PointFieldLabelServerComponent, PointFieldServerComponent, PointFieldServerProps, PointFieldValidation, PolymorphicRelationshipField, PolymorphicRelationshipFieldClient, PopulateType, PreferenceRequest, PreferenceUpdateRequest, PreviewButtonClientProps, PreviewButtonServerProps, PreviewButtonServerPropsOnly, ProbedImageSize, PublishButtonClientProps, PublishButtonServerProps, PublishButtonServerPropsOnly, QueryDrafts, QueryDraftsArgs, QueryPreset, RadioField, RadioFieldClient, RadioFieldClientComponent, RadioFieldClientProps, RadioFieldDescriptionClientComponent, RadioFieldDescriptionServerComponent, RadioFieldDiffClientComponent, RadioFieldDiffServerComponent, RadioFieldErrorClientComponent, RadioFieldErrorServerComponent, RadioFieldLabelClientComponent, RadioFieldLabelServerComponent, RadioFieldServerComponent, RadioFieldServerProps, RadioFieldValidation, RawParams, RawPayloadComponent, RegisteredPlugins, RelationshipField, RelationshipFieldClient, RelationshipFieldClientComponent, RelationshipFieldClientProps, RelationshipFieldDescriptionClientComponent, RelationshipFieldDescriptionServerComponent, RelationshipFieldDiffClientComponent, RelationshipFieldDiffServerComponent, RelationshipFieldErrorClientComponent, RelationshipFieldErrorServerComponent, RelationshipFieldLabelClientComponent, RelationshipFieldLabelServerComponent, RelationshipFieldManyValidation, RelationshipFieldServerComponent, RelationshipFieldServerProps, RelationshipFieldSingleValidation, RelationshipFieldValidation, RelationshipValue, RenderConfigArgs, RenderDocumentVersionsProperties, RenderEntityConfigArgs, RenderFieldConfigArgs, RenderRootConfigArgs, RenderedField, ReplaceAny, RequestContext, RequiredDataFromCollection, RequiredDataFromCollectionSlug, ResolvedComponent, ResolvedFilterOptions, RichTextAdapter, RichTextAdapterProvider, RichTextField, RichTextFieldClient, RichTextFieldClientComponent, RichTextFieldClientProps, RichTextFieldDescriptionClientComponent, RichTextFieldDescriptionServerComponent, RichTextFieldDiffClientComponent, RichTextFieldDiffServerComponent, RichTextFieldErrorClientComponent, RichTextFieldErrorServerComponent, RichTextFieldLabelClientComponent, RichTextFieldLabelServerComponent, RichTextFieldServerComponent, RichTextFieldServerProps, RichTextFieldValidation, RichTextHooks, RollbackTransaction, RootLivePreviewConfig, Row, RowField, RowFieldClient, RowFieldClientComponent, RowFieldClientProps, RowFieldDescriptionClientComponent, RowFieldDescriptionServerComponent, RowFieldDiffClientComponent, RowFieldDiffServerComponent, RowFieldErrorClientComponent, RowFieldErrorServerComponent, RowFieldLabelClientComponent, RowFieldLabelServerComponent, RowFieldServerComponent, RowFieldServerProps, RowLabel, RowLabelComponent, RunInlineTaskFunction, RunJobAccess, RunJobAccessArgs, RunTaskFunction, RunTaskFunctions, RunningJob, SanitizeFieldArgs, SanitizedBlockPermissions, SanitizedBlocksPermissions, SanitizedCollectionConfig, SanitizedCollectionPermission, SanitizedCompoundIndex, SanitizedConfig, SanitizedDashboardConfig, SanitizedDocumentPermissions, SanitizedFieldPermissions, SanitizedFieldsPermissions, SanitizedGlobalConfig, SanitizedGlobalPermission, SanitizedJoins, SanitizedLabelProps, SanitizedLocalizationConfig, SanitizedPermissions, SanitizedUploadConfig, SaveButtonClientProps, SaveButtonServerProps, SaveButtonServerPropsOnly, SaveDraftButtonClientProps, SaveDraftButtonServerProps, SaveDraftButtonServerPropsOnly, SchedulePublish, SchedulePublishTaskInput, SelectExcludeType, SelectField, SelectFieldClient, SelectFieldClientComponent, SelectFieldClientProps, SelectFieldDescriptionClientComponent, SelectFieldDescriptionServerComponent, SelectFieldDiffClientComponent, SelectFieldDiffServerComponent, SelectFieldErrorClientComponent, SelectFieldErrorServerComponent, SelectFieldLabelClientComponent, SelectFieldLabelServerComponent, SelectFieldManyValidation, SelectFieldServerComponent, SelectFieldServerProps, SelectFieldSingleValidation, SelectFieldValidation, SelectIncludeType, SelectMode, SelectType, SendEmailOptions, ServerComponentProps, ServerFieldBase, ServerFunction, ServerFunctionArgs, ServerFunctionClient, ServerFunctionClientArgs, ServerFunctionConfig, ServerFunctionHandler, ServerOnlyCollectionAdminProperties, ServerOnlyCollectionProperties, ServerOnlyFieldAdminProperties, ServerOnlyFieldProperties, ServerOnlyGlobalAdminProperties, ServerOnlyGlobalProperties, ServerOnlyLivePreviewProperties, ServerOnlyUploadProperties, ServerProps, ServerPropsFromView, DocumentViewServerProps as ServerSideEditViewProps, SharedProps, SharpDependency, SingleRelationshipField, SingleRelationshipFieldClient, SingleTaskStatus, SlugField, SlugFieldClientProps, SlugifyServerFunctionArgs, Sort, LocalizeStatusArgs as SqlLocalizeStatusArgs, StaticDescription, StaticLabel, StringKeyOf, Tab, TabAsField, TabAsFieldClient, TabsField, TabsFieldClient, TabsFieldClientComponent, TabsFieldClientProps, TabsFieldDescriptionClientComponent, TabsFieldDescriptionServerComponent, TabsFieldDiffClientComponent, TabsFieldDiffServerComponent, TabsFieldErrorClientComponent, TabsFieldErrorServerComponent, TabsFieldLabelClientComponent, TabsFieldLabelServerComponent, TabsFieldServerComponent, TabsFieldServerProps, TabsPreferences, TaskConfig, TaskHandler, TaskHandlerArgs, TaskHandlerResult, TaskHandlerResults, TaskInput, TaskOutput, TaskType, TextField, TextFieldClient, TextFieldClientComponent, TextFieldClientProps, TextFieldDescriptionClientComponent, TextFieldDescriptionServerComponent, TextFieldDiffClientComponent, TextFieldDiffServerComponent, TextFieldErrorClientComponent, TextFieldErrorServerComponent, TextFieldLabelClientComponent, TextFieldLabelServerComponent, TextFieldManyValidation, TextFieldServerComponent, TextFieldServerProps, TextFieldSingleValidation, TextFieldValidation, TextareaField, TextareaFieldClient, TextareaFieldClientComponent, TextareaFieldClientProps, TextareaFieldDescriptionClientComponent, TextareaFieldDescriptionServerComponent, TextareaFieldDiffClientComponent, TextareaFieldDiffServerComponent, TextareaFieldErrorClientComponent, TextareaFieldErrorServerComponent, TextareaFieldLabelClientComponent, TextareaFieldLabelServerComponent, TextareaFieldServerComponent, TextareaFieldServerProps, TextareaFieldValidation, TimePickerProps, Timezone, TimezonesConfig, Transaction, TransformCollectionWithSelect, TransformDataWithSelect, TransformGlobalWithSelect, TraverseFieldsCallback, TypeWithID, TypeWithTimestamps, TypeWithVersion, TypedAuthOperations, TypedBlock, TypedCollection, TypedCollectionJoins, TypedCollectionSelect, TypedFallbackLocale, TypedGlobal, TypedGlobalSelect, TypedJobs, TypedLocale, TypedUploadCollection, TypedUser, TypedWidget, UIField, UIFieldClient, UIFieldClientComponent, UIFieldClientProps, UIFieldDiffClientComponent, UIFieldDiffServerComponent, UIFieldServerComponent, UIFieldServerProps, UnauthenticatedClientConfig, UnnamedGroupField, UnnamedGroupFieldClient, UnnamedTab, UnpublishButtonClientProps, UnpublishButtonServerProps, UnpublishButtonServerPropsOnly, UntypedPayloadTypes, UntypedUser, UpdateGlobal, UpdateGlobalArgs, UpdateGlobalVersion, UpdateGlobalVersionArgs, UpdateJobs, UpdateJobsArgs, UpdateMany, UpdateManyArgs, UpdateOne, UpdateOneArgs, UpdateVersion, UpdateVersionArgs, UploadCollectionSlug, UploadConfig, UploadEdits, UploadField, UploadFieldClient, UploadFieldClientComponent, UploadFieldClientProps, UploadFieldDescriptionClientComponent, UploadFieldDescriptionServerComponent, UploadFieldDiffClientComponent, UploadFieldDiffServerComponent, UploadFieldErrorClientComponent, UploadFieldErrorServerComponent, UploadFieldLabelClientComponent, UploadFieldLabelServerComponent, UploadFieldManyValidation, UploadFieldServerComponent, UploadFieldServerProps, UploadFieldSingleValidation, UploadFieldValidation, Upsert, UpsertArgs, UntypedUser as User, UserSession, UsernameFieldValidation, Validate, ValidateOptions, ValidationFieldError, ValueWithRelation, VerifyConfig, VersionField, VersionOperations, VersionTab, ViewDescriptionClientProps, ViewDescriptionServerProps, ViewDescriptionServerPropsOnly, ViewTypes, VisibleEntities, Where, WhereField, Widget, WidgetInstance, WidgetServerProps, WidgetSlug, WidgetWidth, WithServerSidePropsComponent, WithServerSidePropsComponentProps, WorkflowConfig, WorkflowHandler, WorkflowTypes, checkFileRestrictionsParams };