payload 3.59.0-internal.b804ca6 → 3.59.0-internal.c8403a3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"findDistinct.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/findDistinct.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAcpD,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,GAAG,CAAC,EAAE,cAAc,CAAA;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AACD,eAAO,MAAM,qBAAqB,iBAClB,SAAS,KACtB,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAuNxD,CAAA"}
1
+ {"version":3,"file":"findDistinct.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/findDistinct.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAcpD,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,GAAG,CAAC,EAAE,cAAc,CAAA;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AACD,eAAO,MAAM,qBAAqB,iBAClB,SAAS,KACtB,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAyNxD,CAAA"}
@@ -77,7 +77,9 @@ export const findDistinctOperation = async (incomingArgs)=>{
77
77
  where: where ?? {}
78
78
  });
79
79
  const fieldResult = getFieldByPath({
80
+ config: payload.config,
80
81
  fields: collectionConfig.flattenedFields,
82
+ includeRelationships: true,
81
83
  path: args.field
82
84
  });
83
85
  if (!fieldResult) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/collections/operations/findDistinct.ts"],"sourcesContent":["import httpStatus from 'http-status'\n\nimport type { AccessResult } from '../../config/types.js'\nimport type { PaginatedDistinctDocs } from '../../database/types.js'\nimport type { FlattenedField } from '../../fields/config/types.js'\nimport type { PayloadRequest, PopulateType, Sort, Where } from '../../types/index.js'\nimport type { Collection } from '../config/types.js'\n\nimport { executeAccess } from '../../auth/executeAccess.js'\nimport { combineQueries } from '../../database/combineQueries.js'\nimport { validateQueryPaths } from '../../database/queryValidation/validateQueryPaths.js'\nimport { sanitizeWhereQuery } from '../../database/sanitizeWhereQuery.js'\nimport { APIError } from '../../errors/APIError.js'\nimport { Forbidden } from '../../errors/Forbidden.js'\nimport { relationshipPopulationPromise } from '../../fields/hooks/afterRead/relationshipPopulationPromise.js'\nimport { appendNonTrashedFilter } from '../../utilities/appendNonTrashedFilter.js'\nimport { getFieldByPath } from '../../utilities/getFieldByPath.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { buildAfterOperation } from './utils.js'\n\nexport type Arguments = {\n collection: Collection\n depth?: number\n disableErrors?: boolean\n field: string\n limit?: number\n locale?: string\n overrideAccess?: boolean\n page?: number\n populate?: PopulateType\n req?: PayloadRequest\n showHiddenFields?: boolean\n sort?: Sort\n trash?: boolean\n where?: Where\n}\nexport const findDistinctOperation = async (\n incomingArgs: Arguments,\n): Promise<PaginatedDistinctDocs<Record<string, unknown>>> => {\n let args = incomingArgs\n\n try {\n // /////////////////////////////////////\n // beforeOperation - Collection\n // /////////////////////////////////////\n\n if (args.collection.config.hooks?.beforeOperation?.length) {\n for (const hook of args.collection.config.hooks.beforeOperation) {\n args =\n (await hook({\n args,\n collection: args.collection.config,\n context: args.req!.context,\n operation: 'readDistinct',\n req: args.req!,\n })) || args\n }\n }\n\n const {\n collection: { config: collectionConfig },\n disableErrors,\n overrideAccess,\n populate,\n showHiddenFields = false,\n trash = false,\n where,\n } = args\n\n const req = args.req!\n const { locale, payload } = req\n\n // /////////////////////////////////////\n // Access\n // /////////////////////////////////////\n\n let accessResult: AccessResult\n\n if (!overrideAccess) {\n accessResult = await executeAccess({ disableErrors, req }, collectionConfig.access.read)\n\n // If errors are disabled, and access returns false, return empty results\n if (accessResult === false) {\n return {\n hasNextPage: false,\n hasPrevPage: false,\n limit: args.limit || 0,\n nextPage: null,\n page: 1,\n pagingCounter: 1,\n prevPage: null,\n totalDocs: 0,\n totalPages: 0,\n values: [],\n }\n }\n }\n\n // /////////////////////////////////////\n // Find Distinct\n // /////////////////////////////////////\n\n let fullWhere = combineQueries(where!, accessResult!)\n sanitizeWhereQuery({ fields: collectionConfig.flattenedFields, payload, where: fullWhere })\n\n // Exclude trashed documents when trash: false\n fullWhere = appendNonTrashedFilter({\n enableTrash: collectionConfig.trash,\n trash,\n where: fullWhere,\n })\n\n await validateQueryPaths({\n collectionConfig,\n overrideAccess: overrideAccess!,\n req,\n where: where ?? {},\n })\n\n const fieldResult = getFieldByPath({\n fields: collectionConfig.flattenedFields,\n path: args.field,\n })\n\n if (!fieldResult) {\n throw new APIError(\n `Field ${args.field} was not found in the collection ${collectionConfig.slug}`,\n httpStatus.BAD_REQUEST,\n )\n }\n\n if (fieldResult.field.hidden && !showHiddenFields) {\n throw new Forbidden(req.t)\n }\n\n if (fieldResult.field.access?.read) {\n const hasAccess = await fieldResult.field.access.read({ req })\n if (!hasAccess) {\n throw new Forbidden(req.t)\n }\n }\n\n if ('virtual' in fieldResult.field && fieldResult.field.virtual) {\n if (typeof fieldResult.field.virtual !== 'string') {\n throw new APIError(\n `Cannot findDistinct by a virtual field that isn't linked to a relationship field.`,\n )\n }\n\n let relationPath: string = ''\n let currentFields: FlattenedField[] = collectionConfig.flattenedFields\n const fieldPathSegments = fieldResult.field.virtual.split('.')\n for (const segment of fieldResult.field.virtual.split('.')) {\n relationPath = `${relationPath}${segment}`\n fieldPathSegments.shift()\n const field = currentFields.find((e) => e.name === segment)!\n if (\n (field.type === 'relationship' || field.type === 'upload') &&\n typeof field.relationTo === 'string'\n ) {\n break\n }\n if ('flattenedFields' in field) {\n currentFields = field.flattenedFields\n }\n }\n\n const path = `${relationPath}.${fieldPathSegments.join('.')}`\n\n const result = await payload.findDistinct({\n collection: collectionConfig.slug,\n depth: args.depth,\n disableErrors,\n field: path,\n locale,\n overrideAccess,\n populate,\n req,\n showHiddenFields,\n sort: args.sort,\n trash,\n where,\n })\n\n for (const val of result.values) {\n val[args.field] = val[path]\n delete val[path]\n }\n\n return result\n }\n\n let result = await payload.db.findDistinct({\n collection: collectionConfig.slug,\n field: args.field,\n limit: args.limit,\n locale: locale!,\n page: args.page,\n req,\n sort: args.sort,\n where: fullWhere,\n })\n\n if (\n (fieldResult.field.type === 'relationship' || fieldResult.field.type === 'upload') &&\n args.depth\n ) {\n const populationPromises: Promise<void>[] = []\n const sanitizedField = { ...fieldResult.field }\n if (fieldResult.field.hasMany) {\n sanitizedField.hasMany = false\n }\n for (const doc of result.values) {\n populationPromises.push(\n relationshipPopulationPromise({\n currentDepth: 0,\n depth: args.depth,\n draft: false,\n fallbackLocale: req.fallbackLocale || null,\n field: sanitizedField,\n locale: req.locale || null,\n overrideAccess: args.overrideAccess ?? true,\n parentIsLocalized: false,\n populate,\n req,\n showHiddenFields: false,\n siblingDoc: doc,\n }),\n )\n }\n await Promise.all(populationPromises)\n }\n\n // /////////////////////////////////////\n // afterOperation - Collection\n // /////////////////////////////////////\n\n result = await buildAfterOperation({\n args,\n collection: collectionConfig,\n operation: 'findDistinct',\n result,\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":["httpStatus","executeAccess","combineQueries","validateQueryPaths","sanitizeWhereQuery","APIError","Forbidden","relationshipPopulationPromise","appendNonTrashedFilter","getFieldByPath","killTransaction","buildAfterOperation","findDistinctOperation","incomingArgs","args","collection","config","hooks","beforeOperation","length","hook","context","req","operation","collectionConfig","disableErrors","overrideAccess","populate","showHiddenFields","trash","where","locale","payload","accessResult","access","read","hasNextPage","hasPrevPage","limit","nextPage","page","pagingCounter","prevPage","totalDocs","totalPages","values","fullWhere","fields","flattenedFields","enableTrash","fieldResult","path","field","slug","BAD_REQUEST","hidden","t","hasAccess","virtual","relationPath","currentFields","fieldPathSegments","split","segment","shift","find","e","name","type","relationTo","join","result","findDistinct","depth","sort","val","db","populationPromises","sanitizedField","hasMany","doc","push","currentDepth","draft","fallbackLocale","parentIsLocalized","siblingDoc","Promise","all","error"],"mappings":"AAAA,OAAOA,gBAAgB,cAAa;AAQpC,SAASC,aAAa,QAAQ,8BAA6B;AAC3D,SAASC,cAAc,QAAQ,mCAAkC;AACjE,SAASC,kBAAkB,QAAQ,uDAAsD;AACzF,SAASC,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,SAAS,QAAQ,4BAA2B;AACrD,SAASC,6BAA6B,QAAQ,gEAA+D;AAC7G,SAASC,sBAAsB,QAAQ,4CAA2C;AAClF,SAASC,cAAc,QAAQ,oCAAmC;AAClE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,mBAAmB,QAAQ,aAAY;AAkBhD,OAAO,MAAMC,wBAAwB,OACnCC;IAEA,IAAIC,OAAOD;IAEX,IAAI;QACF,wCAAwC;QACxC,+BAA+B;QAC/B,wCAAwC;QAExC,IAAIC,KAAKC,UAAU,CAACC,MAAM,CAACC,KAAK,EAAEC,iBAAiBC,QAAQ;YACzD,KAAK,MAAMC,QAAQN,KAAKC,UAAU,CAACC,MAAM,CAACC,KAAK,CAACC,eAAe,CAAE;gBAC/DJ,OACE,AAAC,MAAMM,KAAK;oBACVN;oBACAC,YAAYD,KAAKC,UAAU,CAACC,MAAM;oBAClCK,SAASP,KAAKQ,GAAG,CAAED,OAAO;oBAC1BE,WAAW;oBACXD,KAAKR,KAAKQ,GAAG;gBACf,MAAOR;YACX;QACF;QAEA,MAAM,EACJC,YAAY,EAAEC,QAAQQ,gBAAgB,EAAE,EACxCC,aAAa,EACbC,cAAc,EACdC,QAAQ,EACRC,mBAAmB,KAAK,EACxBC,QAAQ,KAAK,EACbC,KAAK,EACN,GAAGhB;QAEJ,MAAMQ,MAAMR,KAAKQ,GAAG;QACpB,MAAM,EAAES,MAAM,EAAEC,OAAO,EAAE,G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AExC,OAAOA;IACT,EAAE,OAAOkB,OAAgB;QACvB,MAAM/E,gBAAgBI,KAAKQ,GAAG;QAC9B,MAAMmE;IACR;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/collections/operations/findDistinct.ts"],"sourcesContent":["import httpStatus from 'http-status'\n\nimport type { AccessResult } from '../../config/types.js'\nimport type { PaginatedDistinctDocs } from '../../database/types.js'\nimport type { FlattenedField } from '../../fields/config/types.js'\nimport type { PayloadRequest, PopulateType, Sort, Where } from '../../types/index.js'\nimport type { Collection } from '../config/types.js'\n\nimport { executeAccess } from '../../auth/executeAccess.js'\nimport { combineQueries } from '../../database/combineQueries.js'\nimport { validateQueryPaths } from '../../database/queryValidation/validateQueryPaths.js'\nimport { sanitizeWhereQuery } from '../../database/sanitizeWhereQuery.js'\nimport { APIError } from '../../errors/APIError.js'\nimport { Forbidden } from '../../errors/Forbidden.js'\nimport { relationshipPopulationPromise } from '../../fields/hooks/afterRead/relationshipPopulationPromise.js'\nimport { appendNonTrashedFilter } from '../../utilities/appendNonTrashedFilter.js'\nimport { getFieldByPath } from '../../utilities/getFieldByPath.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { buildAfterOperation } from './utils.js'\n\nexport type Arguments = {\n collection: Collection\n depth?: number\n disableErrors?: boolean\n field: string\n limit?: number\n locale?: string\n overrideAccess?: boolean\n page?: number\n populate?: PopulateType\n req?: PayloadRequest\n showHiddenFields?: boolean\n sort?: Sort\n trash?: boolean\n where?: Where\n}\nexport const findDistinctOperation = async (\n incomingArgs: Arguments,\n): Promise<PaginatedDistinctDocs<Record<string, unknown>>> => {\n let args = incomingArgs\n\n try {\n // /////////////////////////////////////\n // beforeOperation - Collection\n // /////////////////////////////////////\n\n if (args.collection.config.hooks?.beforeOperation?.length) {\n for (const hook of args.collection.config.hooks.beforeOperation) {\n args =\n (await hook({\n args,\n collection: args.collection.config,\n context: args.req!.context,\n operation: 'readDistinct',\n req: args.req!,\n })) || args\n }\n }\n\n const {\n collection: { config: collectionConfig },\n disableErrors,\n overrideAccess,\n populate,\n showHiddenFields = false,\n trash = false,\n where,\n } = args\n\n const req = args.req!\n const { locale, payload } = req\n\n // /////////////////////////////////////\n // Access\n // /////////////////////////////////////\n\n let accessResult: AccessResult\n\n if (!overrideAccess) {\n accessResult = await executeAccess({ disableErrors, req }, collectionConfig.access.read)\n\n // If errors are disabled, and access returns false, return empty results\n if (accessResult === false) {\n return {\n hasNextPage: false,\n hasPrevPage: false,\n limit: args.limit || 0,\n nextPage: null,\n page: 1,\n pagingCounter: 1,\n prevPage: null,\n totalDocs: 0,\n totalPages: 0,\n values: [],\n }\n }\n }\n\n // /////////////////////////////////////\n // Find Distinct\n // /////////////////////////////////////\n\n let fullWhere = combineQueries(where!, accessResult!)\n sanitizeWhereQuery({ fields: collectionConfig.flattenedFields, payload, where: fullWhere })\n\n // Exclude trashed documents when trash: false\n fullWhere = appendNonTrashedFilter({\n enableTrash: collectionConfig.trash,\n trash,\n where: fullWhere,\n })\n\n await validateQueryPaths({\n collectionConfig,\n overrideAccess: overrideAccess!,\n req,\n where: where ?? {},\n })\n\n const fieldResult = getFieldByPath({\n config: payload.config,\n fields: collectionConfig.flattenedFields,\n includeRelationships: true,\n path: args.field,\n })\n\n if (!fieldResult) {\n throw new APIError(\n `Field ${args.field} was not found in the collection ${collectionConfig.slug}`,\n httpStatus.BAD_REQUEST,\n )\n }\n\n if (fieldResult.field.hidden && !showHiddenFields) {\n throw new Forbidden(req.t)\n }\n\n if (fieldResult.field.access?.read) {\n const hasAccess = await fieldResult.field.access.read({ req })\n if (!hasAccess) {\n throw new Forbidden(req.t)\n }\n }\n\n if ('virtual' in fieldResult.field && fieldResult.field.virtual) {\n if (typeof fieldResult.field.virtual !== 'string') {\n throw new APIError(\n `Cannot findDistinct by a virtual field that isn't linked to a relationship field.`,\n )\n }\n\n let relationPath: string = ''\n let currentFields: FlattenedField[] = collectionConfig.flattenedFields\n const fieldPathSegments = fieldResult.field.virtual.split('.')\n for (const segment of fieldResult.field.virtual.split('.')) {\n relationPath = `${relationPath}${segment}`\n fieldPathSegments.shift()\n const field = currentFields.find((e) => e.name === segment)!\n if (\n (field.type === 'relationship' || field.type === 'upload') &&\n typeof field.relationTo === 'string'\n ) {\n break\n }\n if ('flattenedFields' in field) {\n currentFields = field.flattenedFields\n }\n }\n\n const path = `${relationPath}.${fieldPathSegments.join('.')}`\n\n const result = await payload.findDistinct({\n collection: collectionConfig.slug,\n depth: args.depth,\n disableErrors,\n field: path,\n locale,\n overrideAccess,\n populate,\n req,\n showHiddenFields,\n sort: args.sort,\n trash,\n where,\n })\n\n for (const val of result.values) {\n val[args.field] = val[path]\n delete val[path]\n }\n\n return result\n }\n\n let result = await payload.db.findDistinct({\n collection: collectionConfig.slug,\n field: args.field,\n limit: args.limit,\n locale: locale!,\n page: args.page,\n req,\n sort: args.sort,\n where: fullWhere,\n })\n\n if (\n (fieldResult.field.type === 'relationship' || fieldResult.field.type === 'upload') &&\n args.depth\n ) {\n const populationPromises: Promise<void>[] = []\n const sanitizedField = { ...fieldResult.field }\n if (fieldResult.field.hasMany) {\n sanitizedField.hasMany = false\n }\n for (const doc of result.values) {\n populationPromises.push(\n relationshipPopulationPromise({\n currentDepth: 0,\n depth: args.depth,\n draft: false,\n fallbackLocale: req.fallbackLocale || null,\n field: sanitizedField,\n locale: req.locale || null,\n overrideAccess: args.overrideAccess ?? true,\n parentIsLocalized: false,\n populate,\n req,\n showHiddenFields: false,\n siblingDoc: doc,\n }),\n )\n }\n await Promise.all(populationPromises)\n }\n\n // /////////////////////////////////////\n // afterOperation - Collection\n // /////////////////////////////////////\n\n result = await buildAfterOperation({\n args,\n collection: collectionConfig,\n operation: 'findDistinct',\n result,\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":["httpStatus","executeAccess","combineQueries","validateQueryPaths","sanitizeWhereQuery","APIError","Forbidden","relationshipPopulationPromise","appendNonTrashedFilter","getFieldByPath","killTransaction","buildAfterOperation","findDistinctOperation","incomingArgs","args","collection","config","hooks","beforeOperation","length","hook","context","req","operation","collectionConfig","disableErrors","overrideAccess","populate","showHiddenFields","trash","where","locale","payload","accessResult","access","read","hasNextPage","hasPrevPage","limit","nextPage","page","pagingCounter","prevPage","totalDocs","totalPages","values","fullWhere","fields","flattenedFields","enableTrash","fieldResult","includeRelationships","path","field","slug","BAD_REQUEST","hidden","t","hasAccess","virtual","relationPath","currentFields","fieldPathSegments","split","segment","shift","find","e","name","type","relationTo","join","result","findDistinct","depth","sort","val","db","populationPromises","sanitizedField","hasMany","doc","push","currentDepth","draft","fallbackLocale","parentIsLocalized","siblingDoc","Promise","all","error"],"mappings":"AAAA,OAAOA,gBAAgB,cAAa;AAQpC,SAASC,aAAa,QAAQ,8BAA6B;AAC3D,SAASC,cAAc,QAAQ,mCAAkC;AACjE,SAASC,kBAAkB,QAAQ,uDAAsD;AACzF,SAASC,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,SAAS,QAAQ,4BAA2B;AACrD,SAASC,6BAA6B,QAAQ,gEAA+D;AAC7G,SAASC,sBAAsB,QAAQ,4CAA2C;AAClF,SAASC,cAAc,QAAQ,oCAAmC;AAClE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,mBAAmB,QAAQ,aAAY;AAkBhD,OAAO,MAAMC,wBAAwB,OACnCC;IAEA,IAAIC,OAAOD;IAEX,IAAI;QACF,wCAAwC;QACxC,+BAA+B;QAC/B,wCAAwC;QAExC,IAAIC,KAAKC,UAAU,CAACC,MAAM,CAACC,KAAK,EAAEC,iBAAiBC,QAAQ;YACzD,KAAK,MAAMC,QAAQN,KAAKC,UAAU,CAACC,MAAM,CAACC,KAAK,CAACC,eAAe,CAAE;gBAC/DJ,OACE,AAAC,MAAMM,KAAK;oBACVN;oBACAC,YAAYD,KAAKC,UAAU,CAACC,MAAM;oB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+D,cAAc,IAAI;oBACtChC,OAAO0B;oBACPhD,QAAQT,IAAIS,MAAM,IAAI;oBACtBL,gBAAgBZ,KAAKY,cAAc,IAAI;oBACvC4D,mBAAmB;oBACnB3D;oBACAL;oBACAM,kBAAkB;oBAClB2D,YAAYN;gBACd;YAEJ;YACA,MAAMO,QAAQC,GAAG,CAACX;QACpB;QAEA,wCAAwC;QACxC,8BAA8B;QAC9B,wCAAwC;QAExCN,SAAS,MAAM7D,oBAAoB;YACjCG;YACAC,YAAYS;YACZD,WAAW;YACXiD;QACF;QAEA,wCAAwC;QACxC,iBAAiB;QACjB,wCAAwC;QAExC,OAAOA;IACT,EAAE,OAAOkB,OAAgB;QACvB,MAAMhF,gBAAgBI,KAAKQ,GAAG;QAC9B,MAAMoE;IACR;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getLocalizedPaths.d.ts","sourceRoot":"","sources":["../../src/database/getLocalizedPaths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAY,KAAK,OAAO,EAAkC,MAAM,aAAa,CAAA;AAEpF,wBAAgB,iBAAiB,CAAC,EAChC,cAAc,EACd,MAAM,EACN,UAAU,EACV,YAAY,EACZ,MAAM,EACN,cAAsB,EACtB,iBAAiB,EACjB,OAAO,GACR,EAAE;IACD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,WAAW,EAAE,CAsMhB"}
1
+ {"version":3,"file":"getLocalizedPaths.d.ts","sourceRoot":"","sources":["../../src/database/getLocalizedPaths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAY,KAAK,OAAO,EAAkC,MAAM,aAAa,CAAA;AAEpF,wBAAgB,iBAAiB,CAAC,EAChC,cAAc,EACd,MAAM,EACN,UAAU,EACV,YAAY,EACZ,MAAM,EACN,cAAsB,EACtB,iBAAiB,EACjB,OAAO,GACR,EAAE;IACD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,WAAW,EAAE,CA2MhB"}
@@ -154,6 +154,11 @@ export function getLocalizedPaths({ collectionSlug, fields, globalSlug, incoming
154
154
  case 'richText':
155
155
  {
156
156
  const upcomingSegments = pathSegments.slice(i + 1).join('.');
157
+ pathSegments.forEach((path)=>{
158
+ if (!/^\w+(?:\.\w+)*$/.test(path)) {
159
+ lastIncompletePath.invalid = true;
160
+ }
161
+ });
157
162
  lastIncompletePath.complete = true;
158
163
  lastIncompletePath.path = upcomingSegments ? `${currentPath}.${upcomingSegments}` : currentPath;
159
164
  return paths;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/database/getLocalizedPaths.ts"],"sourcesContent":["import type { PathToQuery } from './queryValidation/types.js'\n\nimport {\n type Field,\n fieldShouldBeLocalized,\n type FlattenedBlock,\n type FlattenedField,\n} from '../fields/config/types.js'\nimport { APIError, type Payload, type SanitizedCollectionConfig } from '../index.js'\n\nexport function getLocalizedPaths({\n collectionSlug,\n fields,\n globalSlug,\n incomingPath,\n locale,\n overrideAccess = false,\n parentIsLocalized,\n payload,\n}: {\n collectionSlug?: string\n fields: FlattenedField[]\n globalSlug?: string\n incomingPath: string\n locale?: string\n overrideAccess?: boolean\n /**\n * @todo make required in v4.0. Usually, you'd wanna pass this through\n */\n parentIsLocalized?: boolean\n payload: Payload\n}): PathToQuery[] {\n const pathSegments = incomingPath.split('.')\n const localizationConfig = payload.config.localization\n\n let paths: PathToQuery[] = [\n {\n collectionSlug,\n complete: false,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n field: undefined,\n fields,\n globalSlug,\n invalid: false,\n parentIsLocalized: parentIsLocalized!,\n path: '',\n },\n ]\n\n for (let i = 0; i < pathSegments.length; i += 1) {\n const segment = pathSegments[i]\n\n const lastIncompletePath = paths.find(({ complete }) => !complete)\n\n if (lastIncompletePath) {\n const { path } = lastIncompletePath\n let currentPath = path ? `${path}.${segment}` : segment\n\n let fieldsToSearch: FlattenedField[]\n let _parentIsLocalized = parentIsLocalized\n\n let matchedField!: FlattenedField\n\n if (lastIncompletePath?.field?.type === 'blocks') {\n if (segment === 'blockType') {\n matchedField = {\n name: 'blockType',\n type: 'text',\n }\n } else {\n for (const _block of lastIncompletePath.field.blockReferences ??\n lastIncompletePath.field.blocks) {\n let block: FlattenedBlock\n if (typeof _block === 'string') {\n block = payload.blocks[_block]!\n } else {\n block = _block\n }\n\n matchedField = block.flattenedFields.find((field) => field.name === segment)!\n if (matchedField) {\n break\n }\n }\n }\n } else {\n if (lastIncompletePath?.field && 'flattenedFields' in lastIncompletePath.field) {\n fieldsToSearch = lastIncompletePath.field.flattenedFields\n } else {\n fieldsToSearch = lastIncompletePath.fields!\n }\n _parentIsLocalized = parentIsLocalized || lastIncompletePath.field?.localized\n\n matchedField = fieldsToSearch.find((field) => field.name === segment)!\n }\n\n lastIncompletePath.field = matchedField!\n\n if (currentPath === 'globalType' && globalSlug) {\n lastIncompletePath.path = currentPath\n lastIncompletePath.complete = true\n lastIncompletePath.field = {\n name: 'globalType',\n type: 'text',\n }\n\n return paths\n }\n\n if (currentPath === 'relationTo') {\n lastIncompletePath.path = currentPath\n lastIncompletePath.complete = true\n lastIncompletePath.field = {\n name: 'relationTo',\n type: 'select',\n options: Object.keys(payload.collections),\n }\n\n return paths\n }\n\n if (!matchedField && currentPath === 'id' && i === pathSegments.length - 1) {\n lastIncompletePath.path = currentPath\n const idField: Field = {\n name: 'id',\n type: payload.db.defaultIDType as 'text',\n }\n lastIncompletePath.field = idField\n lastIncompletePath.complete = true\n return paths\n }\n\n if (matchedField) {\n if ('hidden' in matchedField && matchedField.hidden && !overrideAccess) {\n lastIncompletePath.invalid = true\n }\n\n const nextSegment = pathSegments[i + 1]!\n const nextSegmentIsLocale =\n localizationConfig && localizationConfig.localeCodes.includes(nextSegment)\n\n if (nextSegmentIsLocale) {\n // Skip the next iteration, because it's a locale\n i += 1\n currentPath = `${currentPath}.${nextSegment}`\n } else if (\n localizationConfig &&\n fieldShouldBeLocalized({ field: matchedField, parentIsLocalized: _parentIsLocalized! })\n ) {\n currentPath = `${currentPath}.${locale}`\n }\n\n switch (matchedField.type) {\n case 'join':\n case 'relationship':\n case 'upload': {\n // If this is a polymorphic relation,\n // We only support querying directly (no nested querying)\n if (matchedField.type !== 'join' && typeof matchedField.relationTo !== 'string') {\n lastIncompletePath.path = pathSegments.join('.')\n if (![matchedField.name, 'relationTo', 'value'].includes(pathSegments.at(-1)!)) {\n lastIncompletePath.invalid = true\n } else {\n lastIncompletePath.complete = true\n }\n } else {\n lastIncompletePath.complete = true\n lastIncompletePath.path = currentPath!\n\n const nestedPathToQuery = pathSegments\n .slice(nextSegmentIsLocale ? i + 2 : i + 1)\n .join('.')\n\n if (nestedPathToQuery) {\n let relatedCollection: SanitizedCollectionConfig\n if (matchedField.type === 'join') {\n if (Array.isArray(matchedField.collection)) {\n throw new APIError('Not supported')\n }\n\n relatedCollection = payload.collections[matchedField.collection]!.config\n } else {\n relatedCollection = payload.collections[matchedField.relationTo as string]!.config\n }\n\n const remainingPaths = getLocalizedPaths({\n collectionSlug: relatedCollection.slug,\n fields: relatedCollection.flattenedFields,\n globalSlug,\n incomingPath: nestedPathToQuery,\n locale,\n parentIsLocalized: false,\n payload,\n })\n\n paths = [...paths, ...remainingPaths]\n }\n\n return paths\n }\n\n break\n }\n case 'json':\n case 'richText': {\n const upcomingSegments = pathSegments.slice(i + 1).join('.')\n lastIncompletePath.complete = true\n lastIncompletePath.path = upcomingSegments\n ? `${currentPath}.${upcomingSegments}`\n : currentPath!\n return paths\n }\n\n default: {\n if (i + 1 === pathSegments.length) {\n lastIncompletePath.complete = true\n }\n lastIncompletePath.path = currentPath!\n }\n }\n } else {\n lastIncompletePath.invalid = true\n lastIncompletePath.path = currentPath!\n return paths\n }\n }\n }\n\n return paths\n}\n"],"names":["fieldShouldBeLocalized","APIError","getLocalizedPaths","collectionSlug","fields","globalSlug","incomingPath","locale","overrideAccess","parentIsLocalized","payload","pathSegments","split","localizationConfig","config","localization","paths","complete","field","undefined","invalid","path","i","length","segment","lastIncompletePath","find","currentPath","fieldsToSearch","_parentIsLocalized","matchedField","type","name","_block","blockReferences","blocks","block","flattenedFields","localized","options","Object","keys","collections","idField","db","defaultIDType","hidden","nextSegment","nextSegmentIsLocale","localeCodes","includes","relationTo","join","at","nestedPathToQuery","slice","relatedCollection","Array","isArray","collection","remainingPaths","slug","upcomingSegments"],"mappings":"AAEA,SAEEA,sBAAsB,QAGjB,4BAA2B;AAClC,SAASC,QAAQ,QAAsD,cAAa;AAEpF,OAAO,SAASC,kBAAkB,EAChCC,cAAc,EACdC,MAAM,EACNC,UAAU,EACVC,YAAY,EACZC,MAAM,EACNC,iBAAiB,KAAK,EACtBC,iBAAiB,EACjBC,OAAO,EAaR;IACC,MAAMC,eAAeL,aAAaM,KAAK,CAAC;IACxC,MAAMC,qBAAqBH,QAAQI,MAAM,CAACC,YAAY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AAO5C;4BACT;4BAEA;wBACF;oBACA,KAAK;oBACL,KAAK;wBAAY;4BACf,MAAM8C,mBAAmBnD,aAAa4C,KAAK,CAACjC,IAAI,GAAG8B,IAAI,CAAC;4BACxD3B,mBAAmBR,QAAQ,GAAG;4BAC9BQ,mBAAmBJ,IAAI,GAAGyC,mBACtB,GAAGnC,YAAY,CAAC,EAAEmC,kBAAkB,GACpCnC;4BACJ,OAAOX;wBACT;oBAEA;wBAAS;4BACP,IAAIM,IAAI,MAAMX,aAAaY,MAAM,EAAE;gCACjCE,mBAAmBR,QAAQ,GAAG;4BAChC;4BACAQ,mBAAmBJ,IAAI,GAAGM;wBAC5B;gBACF;YACF,OAAO;gBACLF,mBAAmBL,OAAO,GAAG;gBAC7BK,mBAAmBJ,IAAI,GAAGM;gBAC1B,OAAOX;YACT;QACF;IACF;IAEA,OAAOA;AACT"}
1
+ {"version":3,"sources":["../../src/database/getLocalizedPaths.ts"],"sourcesContent":["import type { PathToQuery } from './queryValidation/types.js'\n\nimport {\n type Field,\n fieldShouldBeLocalized,\n type FlattenedBlock,\n type FlattenedField,\n} from '../fields/config/types.js'\nimport { APIError, type Payload, type SanitizedCollectionConfig } from '../index.js'\n\nexport function getLocalizedPaths({\n collectionSlug,\n fields,\n globalSlug,\n incomingPath,\n locale,\n overrideAccess = false,\n parentIsLocalized,\n payload,\n}: {\n collectionSlug?: string\n fields: FlattenedField[]\n globalSlug?: string\n incomingPath: string\n locale?: string\n overrideAccess?: boolean\n /**\n * @todo make required in v4.0. Usually, you'd wanna pass this through\n */\n parentIsLocalized?: boolean\n payload: Payload\n}): PathToQuery[] {\n const pathSegments = incomingPath.split('.')\n const localizationConfig = payload.config.localization\n\n let paths: PathToQuery[] = [\n {\n collectionSlug,\n complete: false,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n field: undefined,\n fields,\n globalSlug,\n invalid: false,\n parentIsLocalized: parentIsLocalized!,\n path: '',\n },\n ]\n\n for (let i = 0; i < pathSegments.length; i += 1) {\n const segment = pathSegments[i]\n\n const lastIncompletePath = paths.find(({ complete }) => !complete)\n\n if (lastIncompletePath) {\n const { path } = lastIncompletePath\n let currentPath = path ? `${path}.${segment}` : segment\n\n let fieldsToSearch: FlattenedField[]\n let _parentIsLocalized = parentIsLocalized\n\n let matchedField!: FlattenedField\n\n if (lastIncompletePath?.field?.type === 'blocks') {\n if (segment === 'blockType') {\n matchedField = {\n name: 'blockType',\n type: 'text',\n }\n } else {\n for (const _block of lastIncompletePath.field.blockReferences ??\n lastIncompletePath.field.blocks) {\n let block: FlattenedBlock\n if (typeof _block === 'string') {\n block = payload.blocks[_block]!\n } else {\n block = _block\n }\n\n matchedField = block.flattenedFields.find((field) => field.name === segment)!\n if (matchedField) {\n break\n }\n }\n }\n } else {\n if (lastIncompletePath?.field && 'flattenedFields' in lastIncompletePath.field) {\n fieldsToSearch = lastIncompletePath.field.flattenedFields\n } else {\n fieldsToSearch = lastIncompletePath.fields!\n }\n _parentIsLocalized = parentIsLocalized || lastIncompletePath.field?.localized\n\n matchedField = fieldsToSearch.find((field) => field.name === segment)!\n }\n\n lastIncompletePath.field = matchedField!\n\n if (currentPath === 'globalType' && globalSlug) {\n lastIncompletePath.path = currentPath\n lastIncompletePath.complete = true\n lastIncompletePath.field = {\n name: 'globalType',\n type: 'text',\n }\n\n return paths\n }\n\n if (currentPath === 'relationTo') {\n lastIncompletePath.path = currentPath\n lastIncompletePath.complete = true\n lastIncompletePath.field = {\n name: 'relationTo',\n type: 'select',\n options: Object.keys(payload.collections),\n }\n\n return paths\n }\n\n if (!matchedField && currentPath === 'id' && i === pathSegments.length - 1) {\n lastIncompletePath.path = currentPath\n const idField: Field = {\n name: 'id',\n type: payload.db.defaultIDType as 'text',\n }\n lastIncompletePath.field = idField\n lastIncompletePath.complete = true\n return paths\n }\n\n if (matchedField) {\n if ('hidden' in matchedField && matchedField.hidden && !overrideAccess) {\n lastIncompletePath.invalid = true\n }\n\n const nextSegment = pathSegments[i + 1]!\n const nextSegmentIsLocale =\n localizationConfig && localizationConfig.localeCodes.includes(nextSegment)\n\n if (nextSegmentIsLocale) {\n // Skip the next iteration, because it's a locale\n i += 1\n currentPath = `${currentPath}.${nextSegment}`\n } else if (\n localizationConfig &&\n fieldShouldBeLocalized({ field: matchedField, parentIsLocalized: _parentIsLocalized! })\n ) {\n currentPath = `${currentPath}.${locale}`\n }\n\n switch (matchedField.type) {\n case 'join':\n case 'relationship':\n case 'upload': {\n // If this is a polymorphic relation,\n // We only support querying directly (no nested querying)\n if (matchedField.type !== 'join' && typeof matchedField.relationTo !== 'string') {\n lastIncompletePath.path = pathSegments.join('.')\n if (![matchedField.name, 'relationTo', 'value'].includes(pathSegments.at(-1)!)) {\n lastIncompletePath.invalid = true\n } else {\n lastIncompletePath.complete = true\n }\n } else {\n lastIncompletePath.complete = true\n lastIncompletePath.path = currentPath!\n\n const nestedPathToQuery = pathSegments\n .slice(nextSegmentIsLocale ? i + 2 : i + 1)\n .join('.')\n\n if (nestedPathToQuery) {\n let relatedCollection: SanitizedCollectionConfig\n if (matchedField.type === 'join') {\n if (Array.isArray(matchedField.collection)) {\n throw new APIError('Not supported')\n }\n\n relatedCollection = payload.collections[matchedField.collection]!.config\n } else {\n relatedCollection = payload.collections[matchedField.relationTo as string]!.config\n }\n\n const remainingPaths = getLocalizedPaths({\n collectionSlug: relatedCollection.slug,\n fields: relatedCollection.flattenedFields,\n globalSlug,\n incomingPath: nestedPathToQuery,\n locale,\n parentIsLocalized: false,\n payload,\n })\n\n paths = [...paths, ...remainingPaths]\n }\n\n return paths\n }\n\n break\n }\n case 'json':\n case 'richText': {\n const upcomingSegments = pathSegments.slice(i + 1).join('.')\n pathSegments.forEach((path) => {\n if (!/^\\w+(?:\\.\\w+)*$/.test(path)) {\n lastIncompletePath.invalid = true\n }\n })\n lastIncompletePath.complete = true\n lastIncompletePath.path = upcomingSegments\n ? `${currentPath}.${upcomingSegments}`\n : currentPath!\n return paths\n }\n\n default: {\n if (i + 1 === pathSegments.length) {\n lastIncompletePath.complete = true\n }\n lastIncompletePath.path = currentPath!\n }\n }\n } else {\n lastIncompletePath.invalid = true\n lastIncompletePath.path = currentPath!\n return paths\n }\n }\n }\n\n return paths\n}\n"],"names":["fieldShouldBeLocalized","APIError","getLocalizedPaths","collectionSlug","fields","globalSlug","incomingPath","locale","overrideAccess","parentIsLocalized","payload","pathSegments","split","localizationConfig","config","localization","paths","complete","field","undefined","invalid","path","i","length","segment","lastIncompletePath","find","currentPath","fieldsToSearch","_parentIsLocalized","matchedField","type","name","_block","blockReferences","blocks","block","flattenedFields","localized","options","Object","keys","collections","idField","db","defaultIDType","hidden","nextSegment","nextSegmentIsLocale","localeCodes","includes","relationTo","join","at","nestedPathToQuery","slice","relatedCollection","Array","isArray","collection","remainingPaths","slug","upcomingSegments","forEach","test"],"mappings":"AAEA,SAEEA,sBAAsB,QAGjB,4BAA2B;AAClC,SAASC,QAAQ,QAAsD,cAAa;AAEpF,OAAO,SAASC,kBAAkB,EAChCC,cAAc,EACdC,MAAM,EACNC,UAAU,EACVC,YAAY,EACZC,MAAM,EACNC,iBAAiB,KAAK,EACtBC,iBAAiB,EACjBC,OAAO,EAaR;IACC,MAAMC,eAAeL,aAAaM,KAAK,CAAC;IACxC,MAAMC,qBAAqBH,QAAQI,MAAM,CAACC,YAAY;IAEtD,IAAIC,QAAuB;QACzB;YACEb;YACAc,UAAU;YACV,oFAAoF;YACpFC,OAAOC;YACPf;YACAC;YACAe,SAAS;YACTX,mBAAmBA;YACnBY,MAAM;QACR;KACD;IAED,IAAK,IAAIC,IAAI,GAAGA,IAAIX,aAAaY,MAAM,EAAED,KAAK,EAAG;QAC/C,MAAME,UAAUb,YAAY,CAACW,EAAE;QAE/B,MAAMG,qBAAqBT,MAAMU,IAAI,CAAC,CAAC,EAAET,QAAQ,EAAE,GAAK,CAACA;QAEzD,IAAIQ,oBAAoB;YACtB,MAAM,EAAEJ,IAAI,EAAE,GAAGI;YACjB,IAAIE,cAAcN,OAA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AAS;4BACP,IAAIM,IAAI,MAAMX,aAAaY,MAAM,EAAE;gCACjCE,mBAAmBR,QAAQ,GAAG;4BAChC;4BACAQ,mBAAmBJ,IAAI,GAAGM;wBAC5B;gBACF;YACF,OAAO;gBACLF,mBAAmBL,OAAO,GAAG;gBAC7BK,mBAAmBJ,IAAI,GAAGM;gBAC1B,OAAOX;YACT;QACF;IACF;IAEA,OAAOA;AACT"}
@@ -19,7 +19,7 @@ import { ReadonlyRequestCookies } from 'next/dist/server/web/spec-extension/adap
19
19
  import { PinoPretty } from 'pino-pretty';
20
20
  import { DatePickerProps } from 'react-datepicker';
21
21
 
22
- declare const clientTranslationKeys: ("authentication:account" | "authentication:accountOfCurrentUser" | "authentication:accountVerified" | "authentication:alreadyActivated" | "authentication:alreadyLoggedIn" | "authentication:apiKey" | "authentication:authenticated" | "authentication:backToLogin" | "authentication:beginCreateFirstUser" | "authentication:changePassword" | "authentication:checkYourEmailForPasswordReset" | "authentication:confirmGeneration" | "authentication:confirmPassword" | "authentication:createFirstUser" | "authentication:emailNotValid" | "authentication:emailOrUsername" | "authentication:emailSent" | "authentication:emailVerified" | "authentication:enableAPIKey" | "authentication:failedToUnlock" | "authentication:forceUnlock" | "authentication:forgotPassword" | "authentication:forgotPasswordEmailInstructions" | "authentication:forgotPasswordUsernameInstructions" | "authentication:usernameNotValid" | "authentication:forgotPasswordQuestion" | "authentication:generate" | "authentication:generateNewAPIKey" | "authentication:generatingNewAPIKeyWillInvalidate" | "authentication:logBackIn" | "authentication:loggedIn" | "authentication:loggedInChangePassword" | "authentication:loggedOutInactivity" | "authentication:loggedOutSuccessfully" | "authentication:loggingOut" | "authentication:login" | "authentication:logOut" | "authentication:logout" | "authentication:logoutSuccessful" | "authentication:logoutUser" | "authentication:newAPIKeyGenerated" | "authentication:newPassword" | "authentication:passed" | "authentication:passwordResetSuccessfully" | "authentication:resetPassword" | "authentication:stayLoggedIn" | "authentication:successfullyRegisteredFirstUser" | "authentication:successfullyUnlocked" | "authentication:tokenRefreshSuccessful" | "authentication:unableToVerify" | "authentication:username" | "authentication:verified" | "authentication:verifiedSuccessfully" | "authentication:verify" | "authentication:verifyUser" | "authentication:youAreInactive" | "error:autosaving" | "error:correctInvalidFields" | "error:deletingTitle" | "error:documentNotFound" | "error:emailOrPasswordIncorrect" | "error:insufficientClipboardPermissions" | "error:invalidClipboardData" | "error:invalidFileType" | "error:invalidRequestArgs" | "error:loadingDocument" | "error:logoutFailed" | "error:noMatchedField" | "error:notAllowedToAccessPage" | "error:previewing" | "error:problemUploadingFile" | "error:restoringTitle" | "error:tokenNotProvided" | "error:unableToCopy" | "error:unableToDeleteCount" | "error:unableToReindexCollection" | "error:unableToUpdateCount" | "error:unauthorized" | "error:unauthorizedAdmin" | "error:unknown" | "error:unPublishingDocument" | "error:unspecific" | "error:unverifiedEmail" | "error:userEmailAlreadyRegistered" | "error:usernameAlreadyRegistered" | "error:usernameOrPasswordIncorrect" | "fields:blocks" | "fields:addLabel" | "fields:addLink" | "fields:addNew" | "fields:addNewLabel" | "fields:addRelationship" | "fields:addUpload" | "fields:block" | "fields:blockType" | "fields:chooseBetweenCustomTextOrDocument" | "fields:chooseDocumentToLink" | "fields:chooseFromExisting" | "fields:collapseAll" | "fields:customURL" | "fields:editLink" | "fields:editRelationship" | "fields:enterURL" | "fields:internalLink" | "fields:itemsAndMore" | "fields:labelRelationship" | "fields:latitude" | "fields:linkedTo" | "fields:linkType" | "fields:longitude" | "fields:openInNewTab" | "fields:passwordsDoNotMatch" | "fields:removeRelationship" | "fields:removeUpload" | "fields:saveChanges" | "fields:searchForBlock" | "fields:selectFieldsToEdit" | "fields:showAll" | "fields:swapRelationship" | "fields:swapUpload" | "fields:textToDisplay" | "fields:toggleBlock" | "fields:uploadNewLabel" | "folder:browseByFolder" | "folder:byFolder" | "folder:deleteFolder" | "folder:folderName" | "folder:folders" | "folder:folderTypeDescription" | "folder:itemHasBeenMoved" | "folder:itemHasBeenMovedToRoot" | "folder:itemsMovedToFolder" | "folder:itemsMovedToRoot" | "folder:moveFolder" | "folder:moveItemsToFolderConfirmation" | "folder:moveItemsToRootConfirmation" | "folder:moveItemToFolderConfirmation" | "folder:moveItemToRootConfirmation" | "folder:movingFromFolder" | "folder:newFolder" | "folder:noFolder" | "folder:renameFolder" | "folder:searchByNameInFolder" | "folder:selectFolderForItem" | "general:items" | "general:of" | "general:language" | "general:error" | "general:username" | "general:notFound" | "general:unauthorized" | "general:newLabel" | "general:name" | "general:aboutToDelete" | "general:aboutToPermanentlyDelete" | "general:aboutToPermanentlyDeleteTrash" | "general:aboutToRestore" | "general:aboutToRestoreAsDraft" | "general:aboutToRestoreAsDraftCount" | "general:aboutToRestoreCount" | "general:aboutToTrash" | "general:aboutToTrashCount" | "general:addBelow" | "general:addFilter" | "general:adminTheme" | "general:all" | "general:allCollections" | "general:allLocales" | "general:and" | "general:anotherUser" | "general:anotherUserTakenOver" | "general:applyChanges" | "general:ascending" | "general:automatic" | "general:backToDashboard" | "general:cancel" | "general:changesNotSaved" | "general:clear" | "general:clearAll" | "general:close" | "general:collapse" | "general:collections" | "general:columns" | "general:columnToSort" | "general:confirm" | "general:confirmCopy" | "general:confirmDeletion" | "general:confirmDuplication" | "general:confirmMove" | "general:confirmReindex" | "general:confirmReindexAll" | "general:confirmReindexDescription" | "general:confirmReindexDescriptionAll" | "general:confirmRestoration" | "general:copied" | "general:copy" | "general:copyField" | "general:copying" | "general:copyRow" | "general:copyWarning" | "general:create" | "general:created" | "general:createdAt" | "general:createNew" | "general:createNewLabel" | "general:creating" | "general:creatingNewLabel" | "general:currentlyEditing" | "general:custom" | "general:dark" | "general:dashboard" | "general:delete" | "general:deleted" | "general:deletedAt" | "general:deletedCountSuccessfully" | "general:deletedSuccessfully" | "general:deleteLabel" | "general:deletePermanently" | "general:deleting" | "general:depth" | "general:descending" | "general:deselectAllRows" | "general:document" | "general:documentIsTrashed" | "general:documentLocked" | "general:documents" | "general:duplicate" | "general:duplicateWithoutSaving" | "general:edit" | "general:editAll" | "general:editedSince" | "general:editing" | "general:editingTakenOver" | "general:editLabel" | "general:email" | "general:emailAddress" | "general:emptyTrash" | "general:emptyTrashLabel" | "general:enterAValue" | "general:errors" | "general:exitLivePreview" | "general:export" | "general:fallbackToDefaultLocale" | "general:false" | "general:filters" | "general:filterWhere" | "general:globals" | "general:goBack" | "general:groupByLabel" | "general:import" | "general:isEditing" | "general:item" | "general:lastModified" | "general:leaveAnyway" | "general:leaveWithoutSaving" | "general:light" | "general:livePreview" | "general:loading" | "general:locale" | "general:locales" | "general:menu" | "general:moreOptions" | "general:move" | "general:moveConfirm" | "general:moveCount" | "general:moveDown" | "general:moveUp" | "general:moving" | "general:movingCount" | "general:next" | "general:no" | "general:noDateSelected" | "general:noFiltersSet" | "general:noLabel" | "general:none" | "general:noOptions" | "general:noResults" | "general:nothingFound" | "general:noTrashResults" | "general:noUpcomingEventsScheduled" | "general:noValue" | "general:only" | "general:open" | "general:or" | "general:order" | "general:overwriteExistingData" | "general:pageNotFound" | "general:password" | "general:pasteField" | "general:pasteRow" | "general:payloadSettings" | "general:permanentlyDelete" | "general:permanentlyDeletedCountSuccessfully" | "general:perPage" | "general:previous" | "general:reindex" | "general:reindexingAll" | "general:remove" | "general:rename" | "general:reset" | "general:resetPreferences" | "general:resetPreferencesDescription" | "general:resettingPreferences" | "general:restore" | "general:restoreAsPublished" | "general:restoredCountSuccessfully" | "general:restoring" | "general:row" | "general:rows" | "general:save" | "general:saving" | "general:schedulePublishFor" | "general:searchBy" | "general:select" | "general:selectAll" | "general:selectAllRows" | "general:selectedCount" | "general:selectLabel" | "general:selectValue" | "general:showAllLabel" | "general:sorryNotFound" | "general:sort" | "general:sortByLabelDirection" | "general:stayOnThisPage" | "general:submissionSuccessful" | "general:submit" | "general:submitting" | "general:success" | "general:successfullyCreated" | "general:successfullyDuplicated" | "general:successfullyReindexed" | "general:takeOver" | "general:thisLanguage" | "general:time" | "general:timezone" | "general:titleDeleted" | "general:titleRestored" | "general:titleTrashed" | "general:trash" | "general:trashedCountSuccessfully" | "general:true" | "general:unsavedChanges" | "general:unsavedChangesDuplicate" | "general:untitled" | "general:upcomingEvents" | "general:updatedAt" | "general:updatedCountSuccessfully" | "general:updatedLabelSuccessfully" | "general:updatedSuccessfully" | "general:updateForEveryone" | "general:updating" | "general:uploading" | "general:uploadingBulk" | "general:user" | "general:users" | "general:value" | "general:viewing" | "general:viewReadOnly" | "general:welcome" | "general:yes" | "localization:cannotCopySameLocale" | "localization:copyFrom" | "localization:copyFromTo" | "localization:copyTo" | "localization:copyToLocale" | "localization:localeToPublish" | "localization:selectLocaleToCopy" | "operators:contains" | "operators:equals" | "operators:exists" | "operators:intersects" | "operators:near" | "operators:within" | "operators:isGreaterThan" | "operators:isGreaterThanOrEqualTo" | "operators:isIn" | "operators:isLessThan" | "operators:isLessThanOrEqualTo" | "operators:isLike" | "operators:isNotEqualTo" | "operators:isNotIn" | "operators:isNotLike" | "upload:addFile" | "upload:addFiles" | "upload:bulkUpload" | "upload:crop" | "upload:cropToolDescription" | "upload:download" | "upload:dragAndDrop" | "upload:editImage" | "upload:fileName" | "upload:fileSize" | "upload:filesToUpload" | "upload:fileToUpload" | "upload:focalPoint" | "upload:focalPointDescription" | "upload:height" | "upload:noFile" | "upload:pasteURL" | "upload:previewSizes" | "upload:selectCollectionToBrowse" | "upload:selectFile" | "upload:setCropArea" | "upload:setFocalPoint" | "upload:sizes" | "upload:sizesFor" | "upload:width" | "validation:username" | "validation:emailAddress" | "validation:enterNumber" | "validation:fieldHasNo" | "validation:greaterThanMax" | "validation:invalidBlock" | "validation:invalidBlocks" | "validation:invalidInput" | "validation:invalidSelection" | "validation:invalidSelections" | "validation:lessThanMin" | "validation:limitReached" | "validation:longerThanMin" | "validation:notValidDate" | "validation:required" | "validation:requiresAtLeast" | "validation:requiresNoMoreThan" | "validation:requiresTwoNumbers" | "validation:shorterThanMax" | "validation:timezoneRequired" | "validation:trueOrFalse" | "validation:validUploadID" | "version:version" | "version:aboutToRestore" | "version:restoring" | "version:type" | "version:aboutToPublishSelection" | "version:aboutToRestoreGlobal" | "version:aboutToRevertToPublished" | "version:aboutToUnpublish" | "version:aboutToUnpublishSelection" | "version:autosave" | "version:autosavedSuccessfully" | "version:autosavedVersion" | "version:changed" | "version:compareVersions" | "version:comparingAgainst" | "version:confirmPublish" | "version:confirmRevertToSaved" | "version:confirmUnpublish" | "version:confirmVersionRestoration" | "version:currentDraft" | "version:currentlyPublished" | "version:currentlyViewing" | "version:currentPublishedVersion" | "version:draft" | "version:draftSavedSuccessfully" | "version:lastSavedAgo" | "version:modifiedOnly" | "version:moreVersions" | "version:noFurtherVersionsFound" | "version:noLabelGroup" | "version:noRowsFound" | "version:noRowsSelected" | "version:preview" | "version:previouslyDraft" | "version:previouslyPublished" | "version:previousVersion" | "version:problemRestoringVersion" | "version:publish" | "version:publishAllLocales" | "version:publishChanges" | "version:published" | "version:publishIn" | "version:publishing" | "version:restoreAsDraft" | "version:restoredSuccessfully" | "version:restoreThisVersion" | "version:reverting" | "version:revertToPublished" | "version:saveDraft" | "version:scheduledSuccessfully" | "version:schedulePublish" | "version:selectLocales" | "version:selectVersionToCompare" | "version:showLocales" | "version:specificVersion" | "version:status" | "version:unpublish" | "version:unpublishing" | "version:versionAgo" | "version:versionID" | "version:versions" | "version:viewingVersion" | "version:viewingVersionGlobal" | "version:viewingVersions" | "version:viewingVersionsGlobal" | "general:aboutToDeleteCount" | "general:editingLabel" | "version:changedFieldsCount")[];
22
+ declare const clientTranslationKeys: ("authentication:account" | "authentication:accountOfCurrentUser" | "authentication:accountVerified" | "authentication:alreadyActivated" | "authentication:alreadyLoggedIn" | "authentication:apiKey" | "authentication:authenticated" | "authentication:backToLogin" | "authentication:beginCreateFirstUser" | "authentication:changePassword" | "authentication:checkYourEmailForPasswordReset" | "authentication:confirmGeneration" | "authentication:confirmPassword" | "authentication:createFirstUser" | "authentication:emailNotValid" | "authentication:emailOrUsername" | "authentication:emailSent" | "authentication:emailVerified" | "authentication:enableAPIKey" | "authentication:failedToUnlock" | "authentication:forceUnlock" | "authentication:forgotPassword" | "authentication:forgotPasswordEmailInstructions" | "authentication:forgotPasswordUsernameInstructions" | "authentication:usernameNotValid" | "authentication:forgotPasswordQuestion" | "authentication:generate" | "authentication:generateNewAPIKey" | "authentication:generatingNewAPIKeyWillInvalidate" | "authentication:logBackIn" | "authentication:loggedIn" | "authentication:loggedInChangePassword" | "authentication:loggedOutInactivity" | "authentication:loggedOutSuccessfully" | "authentication:loggingOut" | "authentication:login" | "authentication:logOut" | "authentication:logout" | "authentication:logoutSuccessful" | "authentication:logoutUser" | "authentication:newAPIKeyGenerated" | "authentication:newPassword" | "authentication:passed" | "authentication:passwordResetSuccessfully" | "authentication:resetPassword" | "authentication:stayLoggedIn" | "authentication:successfullyRegisteredFirstUser" | "authentication:successfullyUnlocked" | "authentication:tokenRefreshSuccessful" | "authentication:unableToVerify" | "authentication:username" | "authentication:verified" | "authentication:verifiedSuccessfully" | "authentication:verify" | "authentication:verifyUser" | "authentication:youAreInactive" | "error:autosaving" | "error:correctInvalidFields" | "error:deletingTitle" | "error:documentNotFound" | "error:emailOrPasswordIncorrect" | "error:insufficientClipboardPermissions" | "error:invalidClipboardData" | "error:invalidFileType" | "error:invalidRequestArgs" | "error:loadingDocument" | "error:logoutFailed" | "error:noMatchedField" | "error:notAllowedToAccessPage" | "error:previewing" | "error:problemUploadingFile" | "error:restoringTitle" | "error:tokenNotProvided" | "error:unableToCopy" | "error:unableToDeleteCount" | "error:unableToReindexCollection" | "error:unableToUpdateCount" | "error:unauthorized" | "error:unauthorizedAdmin" | "error:unknown" | "error:unPublishingDocument" | "error:unspecific" | "error:unverifiedEmail" | "error:userEmailAlreadyRegistered" | "error:usernameAlreadyRegistered" | "error:usernameOrPasswordIncorrect" | "fields:blocks" | "fields:addLabel" | "fields:addLink" | "fields:addNew" | "fields:addNewLabel" | "fields:addRelationship" | "fields:addUpload" | "fields:block" | "fields:blockType" | "fields:chooseBetweenCustomTextOrDocument" | "fields:chooseDocumentToLink" | "fields:chooseFromExisting" | "fields:collapseAll" | "fields:customURL" | "fields:editLink" | "fields:editRelationship" | "fields:enterURL" | "fields:internalLink" | "fields:itemsAndMore" | "fields:labelRelationship" | "fields:latitude" | "fields:linkedTo" | "fields:linkType" | "fields:longitude" | "fields:openInNewTab" | "fields:passwordsDoNotMatch" | "fields:removeRelationship" | "fields:removeUpload" | "fields:saveChanges" | "fields:searchForBlock" | "fields:searchForLanguage" | "fields:selectFieldsToEdit" | "fields:showAll" | "fields:swapRelationship" | "fields:swapUpload" | "fields:textToDisplay" | "fields:toggleBlock" | "fields:uploadNewLabel" | "folder:browseByFolder" | "folder:byFolder" | "folder:deleteFolder" | "folder:folderName" | "folder:folders" | "folder:folderTypeDescription" | "folder:itemHasBeenMoved" | "folder:itemHasBeenMovedToRoot" | "folder:itemsMovedToFolder" | "folder:itemsMovedToRoot" | "folder:moveFolder" | "folder:moveItemsToFolderConfirmation" | "folder:moveItemsToRootConfirmation" | "folder:moveItemToFolderConfirmation" | "folder:moveItemToRootConfirmation" | "folder:movingFromFolder" | "folder:newFolder" | "folder:noFolder" | "folder:renameFolder" | "folder:searchByNameInFolder" | "folder:selectFolderForItem" | "general:items" | "general:of" | "general:language" | "general:error" | "general:username" | "general:notFound" | "general:unauthorized" | "general:newLabel" | "general:name" | "general:aboutToDelete" | "general:aboutToPermanentlyDelete" | "general:aboutToPermanentlyDeleteTrash" | "general:aboutToRestore" | "general:aboutToRestoreAsDraft" | "general:aboutToRestoreAsDraftCount" | "general:aboutToRestoreCount" | "general:aboutToTrash" | "general:aboutToTrashCount" | "general:addBelow" | "general:addFilter" | "general:adminTheme" | "general:all" | "general:allCollections" | "general:allLocales" | "general:and" | "general:anotherUser" | "general:anotherUserTakenOver" | "general:applyChanges" | "general:ascending" | "general:automatic" | "general:backToDashboard" | "general:cancel" | "general:changesNotSaved" | "general:clear" | "general:clearAll" | "general:close" | "general:collapse" | "general:collections" | "general:columns" | "general:columnToSort" | "general:confirm" | "general:confirmCopy" | "general:confirmDeletion" | "general:confirmDuplication" | "general:confirmMove" | "general:confirmReindex" | "general:confirmReindexAll" | "general:confirmReindexDescription" | "general:confirmReindexDescriptionAll" | "general:confirmRestoration" | "general:copied" | "general:copy" | "general:copyField" | "general:copying" | "general:copyRow" | "general:copyWarning" | "general:create" | "general:created" | "general:createdAt" | "general:createNew" | "general:createNewLabel" | "general:creating" | "general:creatingNewLabel" | "general:currentlyEditing" | "general:custom" | "general:dark" | "general:dashboard" | "general:delete" | "general:deleted" | "general:deletedAt" | "general:deletedCountSuccessfully" | "general:deletedSuccessfully" | "general:deleteLabel" | "general:deletePermanently" | "general:deleting" | "general:depth" | "general:descending" | "general:deselectAllRows" | "general:document" | "general:documentIsTrashed" | "general:documentLocked" | "general:documents" | "general:duplicate" | "general:duplicateWithoutSaving" | "general:edit" | "general:editAll" | "general:editedSince" | "general:editing" | "general:editingTakenOver" | "general:editLabel" | "general:email" | "general:emailAddress" | "general:emptyTrash" | "general:emptyTrashLabel" | "general:enterAValue" | "general:errors" | "general:exitLivePreview" | "general:export" | "general:fallbackToDefaultLocale" | "general:false" | "general:filters" | "general:filterWhere" | "general:globals" | "general:goBack" | "general:groupByLabel" | "general:import" | "general:isEditing" | "general:item" | "general:lastModified" | "general:leaveAnyway" | "general:leaveWithoutSaving" | "general:light" | "general:livePreview" | "general:loading" | "general:locale" | "general:locales" | "general:menu" | "general:moreOptions" | "general:move" | "general:moveConfirm" | "general:moveCount" | "general:moveDown" | "general:moveUp" | "general:moving" | "general:movingCount" | "general:next" | "general:no" | "general:noDateSelected" | "general:noFiltersSet" | "general:noLabel" | "general:none" | "general:noOptions" | "general:noResults" | "general:nothingFound" | "general:noTrashResults" | "general:noUpcomingEventsScheduled" | "general:noValue" | "general:only" | "general:open" | "general:or" | "general:order" | "general:overwriteExistingData" | "general:pageNotFound" | "general:password" | "general:pasteField" | "general:pasteRow" | "general:payloadSettings" | "general:permanentlyDelete" | "general:permanentlyDeletedCountSuccessfully" | "general:perPage" | "general:previous" | "general:reindex" | "general:reindexingAll" | "general:remove" | "general:rename" | "general:reset" | "general:resetPreferences" | "general:resetPreferencesDescription" | "general:resettingPreferences" | "general:restore" | "general:restoreAsPublished" | "general:restoredCountSuccessfully" | "general:restoring" | "general:row" | "general:rows" | "general:save" | "general:saving" | "general:schedulePublishFor" | "general:searchBy" | "general:select" | "general:selectAll" | "general:selectAllRows" | "general:selectedCount" | "general:selectLabel" | "general:selectValue" | "general:showAllLabel" | "general:sorryNotFound" | "general:sort" | "general:sortByLabelDirection" | "general:stayOnThisPage" | "general:submissionSuccessful" | "general:submit" | "general:submitting" | "general:success" | "general:successfullyCreated" | "general:successfullyDuplicated" | "general:successfullyReindexed" | "general:takeOver" | "general:thisLanguage" | "general:time" | "general:timezone" | "general:titleDeleted" | "general:titleRestored" | "general:titleTrashed" | "general:trash" | "general:trashedCountSuccessfully" | "general:true" | "general:unsavedChanges" | "general:unsavedChangesDuplicate" | "general:untitled" | "general:upcomingEvents" | "general:updatedAt" | "general:updatedCountSuccessfully" | "general:updatedLabelSuccessfully" | "general:updatedSuccessfully" | "general:updateForEveryone" | "general:updating" | "general:uploading" | "general:uploadingBulk" | "general:user" | "general:users" | "general:value" | "general:viewing" | "general:viewReadOnly" | "general:welcome" | "general:yes" | "localization:cannotCopySameLocale" | "localization:copyFrom" | "localization:copyFromTo" | "localization:copyTo" | "localization:copyToLocale" | "localization:localeToPublish" | "localization:selectLocaleToCopy" | "operators:contains" | "operators:equals" | "operators:exists" | "operators:intersects" | "operators:near" | "operators:within" | "operators:isGreaterThan" | "operators:isGreaterThanOrEqualTo" | "operators:isIn" | "operators:isLessThan" | "operators:isLessThanOrEqualTo" | "operators:isLike" | "operators:isNotEqualTo" | "operators:isNotIn" | "operators:isNotLike" | "upload:addFile" | "upload:addFiles" | "upload:bulkUpload" | "upload:crop" | "upload:cropToolDescription" | "upload:download" | "upload:dragAndDrop" | "upload:editImage" | "upload:fileName" | "upload:fileSize" | "upload:filesToUpload" | "upload:fileToUpload" | "upload:focalPoint" | "upload:focalPointDescription" | "upload:height" | "upload:noFile" | "upload:pasteURL" | "upload:previewSizes" | "upload:selectCollectionToBrowse" | "upload:selectFile" | "upload:setCropArea" | "upload:setFocalPoint" | "upload:sizes" | "upload:sizesFor" | "upload:width" | "validation:username" | "validation:emailAddress" | "validation:enterNumber" | "validation:fieldHasNo" | "validation:greaterThanMax" | "validation:invalidBlock" | "validation:invalidBlocks" | "validation:invalidInput" | "validation:invalidSelection" | "validation:invalidSelections" | "validation:lessThanMin" | "validation:limitReached" | "validation:longerThanMin" | "validation:notValidDate" | "validation:required" | "validation:requiresAtLeast" | "validation:requiresNoMoreThan" | "validation:requiresTwoNumbers" | "validation:shorterThanMax" | "validation:timezoneRequired" | "validation:trueOrFalse" | "validation:validUploadID" | "version:version" | "version:aboutToRestore" | "version:restoring" | "version:type" | "version:aboutToPublishSelection" | "version:aboutToRestoreGlobal" | "version:aboutToRevertToPublished" | "version:aboutToUnpublish" | "version:aboutToUnpublishSelection" | "version:autosave" | "version:autosavedSuccessfully" | "version:autosavedVersion" | "version:changed" | "version:compareVersions" | "version:comparingAgainst" | "version:confirmPublish" | "version:confirmRevertToSaved" | "version:confirmUnpublish" | "version:confirmVersionRestoration" | "version:currentDraft" | "version:currentlyPublished" | "version:currentlyViewing" | "version:currentPublishedVersion" | "version:draft" | "version:draftSavedSuccessfully" | "version:lastSavedAgo" | "version:modifiedOnly" | "version:moreVersions" | "version:noFurtherVersionsFound" | "version:noLabelGroup" | "version:noRowsFound" | "version:noRowsSelected" | "version:preview" | "version:previouslyDraft" | "version:previouslyPublished" | "version:previousVersion" | "version:problemRestoringVersion" | "version:publish" | "version:publishAllLocales" | "version:publishChanges" | "version:published" | "version:publishIn" | "version:publishing" | "version:restoreAsDraft" | "version:restoredSuccessfully" | "version:restoreThisVersion" | "version:reverting" | "version:revertToPublished" | "version:saveDraft" | "version:scheduledSuccessfully" | "version:schedulePublish" | "version:selectLocales" | "version:selectVersionToCompare" | "version:showLocales" | "version:specificVersion" | "version:status" | "version:unpublish" | "version:unpublishing" | "version:versionAgo" | "version:versionID" | "version:versions" | "version:viewingVersion" | "version:viewingVersionGlobal" | "version:viewingVersions" | "version:viewingVersionsGlobal" | "general:aboutToDeleteCount" | "general:editingLabel" | "version:changedFieldsCount")[];
23
23
 
24
24
  declare const enTranslations: {
25
25
  authentication: {
@@ -179,6 +179,7 @@ declare const enTranslations: {
179
179
  removeUpload: string;
180
180
  saveChanges: string;
181
181
  searchForBlock: string;
182
+ searchForLanguage: string;
182
183
  selectExistingLabel: string;
183
184
  selectFieldsToEdit: string;
184
185
  showAll: string;
@@ -11794,8 +11795,10 @@ declare function getCollectionIDFieldTypes({ config, defaultIDType, }: {
11794
11795
  * If there were any localized on the path, pathHasLocalized will be true and localizedPath will look like:
11795
11796
  * group.<locale>.title // group is localized here
11796
11797
  */
11797
- declare const getFieldByPath: ({ fields, localizedPath, path, }: {
11798
+ declare const getFieldByPath: ({ config, fields, includeRelationships, localizedPath, path, }: {
11799
+ config?: SanitizedConfig;
11798
11800
  fields: FlattenedField$1[];
11801
+ includeRelationships?: boolean;
11799
11802
  localizedPath?: string;
11800
11803
  path: string;
11801
11804
  }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7E,OAAO,KAAK,EAAE,OAAO,IAAI,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAQ7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,IAAI,oBAAoB,EAAE,MAAM,qCAAqC,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AY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAA;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAA;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAA;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAA;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAA;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,YAAY,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AAC5E,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA"}
package/dist/index.js CHANGED
@@ -562,10 +562,12 @@ if (!_cached) {
562
562
  if (!cached.ws && process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test' && process.env.DISABLE_PAYLOAD_HMR !== 'true') {
563
563
  try {
564
564
  const port = process.env.PORT || '3000';
565
+ const hasHTTPS = process.env.USE_HTTPS === 'true' || process.argv.includes('--experimental-https');
566
+ const protocol = hasHTTPS ? 'wss' : 'ws';
565
567
  const path = '/_next/webpack-hmr';
566
568
  // The __NEXT_ASSET_PREFIX env variable is set for both assetPrefix and basePath (tested in Next.js 15.1.6)
567
569
  const prefix = process.env.__NEXT_ASSET_PREFIX ?? '';
568
- cached.ws = new WebSocket(process.env.PAYLOAD_HMR_URL_OVERRIDE ?? `ws://localhost:${port}${prefix}${path}`);
570
+ cached.ws = new WebSocket(process.env.PAYLOAD_HMR_URL_OVERRIDE ?? `${protocol}://localhost:${port}${prefix}${path}`);
569
571
  cached.ws.onmessage = (event)=>{
570
572
  if (typeof event.data === 'string') {
571
573
  const data = JSON.parse(event.data);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport type { ExecutionResult, GraphQLSchema, ValidationRule } from 'graphql'\nimport type { Request as graphQLRequest, OperationArgs } from 'graphql-http'\nimport type { Logger } from 'pino'\nimport type { NonNever } from 'ts-essentials'\n\nimport { spawn } from 'child_process'\nimport crypto from 'crypto'\nimport { fileURLToPath } from 'node:url'\nimport path from 'path'\nimport WebSocket from 'ws'\n\nimport type { AuthArgs } from './auth/operations/auth.js'\nimport type { Result as ForgotPasswordResult } from './auth/operations/forgotPassword.js'\nimport type { Result as LoginResult } from './auth/operations/login.js'\nimport type { Result as ResetPasswordResult } from './auth/operations/resetPassword.js'\nimport type { AuthStrategy, UntypedUser } from './auth/types.js'\nimport type {\n BulkOperationResult,\n Collection,\n DataFromCollectionSlug,\n SelectFromCollectionSlug,\n TypeWithID,\n} from './collections/config/types.js'\n\nimport {\n forgotPasswordLocal,\n type Options as ForgotPasswordOptions,\n} from './auth/operations/local/forgotPassword.js'\nimport { loginLocal, type Options as LoginOptions } from './auth/operations/local/login.js'\nimport {\n resetPasswordLocal,\n type Options as ResetPasswordOptions,\n} from './auth/operations/local/resetPassword.js'\nimport { unlockLocal, type Options as UnlockOptions } from './auth/operations/local/unlock.js'\nimport {\n verifyEmailLocal,\n type Options as VerifyEmailOptions,\n} from './auth/operations/local/verifyEmail.js'\nexport type { FieldState } from './admin/forms/Form.js'\nimport type { InitOptions, SanitizedConfig } from './config/types.js'\nimport type { BaseDatabaseAdapter, PaginatedDistinctDocs, PaginatedDocs } from './database/types.js'\nimport type { InitializedEmailAdapter } from './email/types.js'\nimport type { DataFromGlobalSlug, Globals, SelectFromGlobalSlug } from './globals/config/types.js'\nimport type {\n ApplyDisableErrors,\n JsonObject,\n SelectType,\n TransformCollectionWithSelect,\n TransformGlobalWithSelect,\n} from './types/index.js'\nimport type { TraverseFieldsCallback } from './utilities/traverseFields.js'\n\nimport { countLocal, type Options as CountOptions } from './collections/operations/local/count.js'\nimport {\n createLocal,\n type Options as CreateOptions,\n} from './collections/operations/local/create.js'\nimport {\n type ByIDOptions as DeleteByIDOptions,\n deleteLocal,\n type ManyOptions as DeleteManyOptions,\n type Options as DeleteOptions,\n} from './collections/operations/local/delete.js'\nimport {\n duplicateLocal,\n type Options as DuplicateOptions,\n} from './collections/operations/local/duplicate.js'\nimport { findLocal, type Options as FindOptions } from './collections/operations/local/find.js'\nimport {\n findByIDLocal,\n type Options as FindByIDOptions,\n} from './collections/operations/local/findByID.js'\nimport {\n findDistinct as findDistinctLocal,\n type Options as FindDistinctOptions,\n} from './collections/operations/local/findDistinct.js'\nimport {\n findVersionByIDLocal,\n type Options as FindVersionByIDOptions,\n} from './collections/operations/local/findVersionByID.js'\nimport {\n findVersionsLocal,\n type Options as FindVersionsOptions,\n} from './collections/operations/local/findVersions.js'\nimport {\n restoreVersionLocal,\n type Options as RestoreVersionOptions,\n} from './collections/operations/local/restoreVersion.js'\nimport {\n type ByIDOptions as UpdateByIDOptions,\n updateLocal,\n type ManyOptions as UpdateManyOptions,\n type Options as UpdateOptions,\n} from './collections/operations/local/update.js'\nimport {\n countGlobalVersionsLocal,\n type CountGlobalVersionsOptions,\n} from './globals/operations/local/countVersions.js'\nimport {\n type Options as FindGlobalOptions,\n findOneGlobalLocal,\n} from './globals/operations/local/findOne.js'\nimport {\n findGlobalVersionByIDLocal,\n type Options as FindGlobalVersionByIDOptions,\n} from './globals/operations/local/findVersionByID.js'\nimport {\n findGlobalVersionsLocal,\n type Options as FindGlobalVersionsOptions,\n} from './globals/operations/local/findVersions.js'\nimport {\n restoreGlobalVersionLocal,\n type Options as RestoreGlobalVersionOptions,\n} from './globals/operations/local/restoreVersion.js'\nimport {\n updateGlobalLocal,\n type Options as UpdateGlobalOptions,\n} from './globals/operations/local/update.js'\nexport type * from './admin/types.js'\nimport type { SupportedLanguages } from '@payloadcms/translations'\n\nimport { Cron } from 'croner'\n\nimport type { ClientConfig, CreateClientConfigArgs } from './config/client.js'\nimport type { BaseJob } from './queues/config/types/workflowTypes.js'\nimport type { TypeWithVersion } from './versions/types.js'\n\nimport { decrypt, encrypt } from './auth/crypto.js'\nimport { authLocal } from './auth/operations/local/auth.js'\nimport { APIKeyAuthentication } from './auth/strategies/apiKey.js'\nimport { JWTAuthentication } from './auth/strategies/jwt.js'\nimport { generateImportMap, type ImportMap } from './bin/generateImportMap/index.js'\nimport { checkPayloadDependencies } from './checkPayloadDependencies.js'\nimport { countVersionsLocal } from './collections/operations/local/countVersions.js'\nimport { consoleEmailAdapter } from './email/consoleEmailAdapter.js'\nimport { fieldAffectsData, type FlattenedBlock } from './fields/config/types.js'\nimport { getJobsLocalAPI } from './queues/localAPI.js'\nimport { _internal_jobSystemGlobals } from './queues/utilities/getCurrentDate.js'\nimport { isNextBuild } from './utilities/isNextBuild.js'\nimport { getLogger } from './utilities/logger.js'\nimport { serverInit as serverInitTelemetry } from './utilities/telemetry/events/serverInit.js'\nimport { traverseFields } from './utilities/traverseFields.js'\n\n/**\n * Export of all base fields that could potentially be\n * useful as users wish to extend built-in fields with custom logic\n */\nexport { accountLockFields as baseAccountLockFields } from './auth/baseFields/accountLock.js'\nexport { apiKeyFields as baseAPIKeyFields } from './auth/baseFields/apiKey.js'\nexport { baseAuthFields } from './auth/baseFields/auth.js'\nexport { emailFieldConfig as baseEmailField } from './auth/baseFields/email.js'\nexport { sessionsFieldConfig as baseSessionsField } from './auth/baseFields/sessions.js'\nexport { usernameFieldConfig as baseUsernameField } from './auth/baseFields/username.js'\n\nexport { verificationFields as baseVerificationFields } from './auth/baseFields/verification.js'\nexport { executeAccess } from './auth/executeAccess.js'\nexport { executeAuthStrategies } from './auth/executeAuthStrategies.js'\nexport { extractAccessFromPermission } from './auth/extractAccessFromPermission.js'\nexport { getAccessResults } from './auth/getAccessResults.js'\nexport { getFieldsToSign } from './auth/getFieldsToSign.js'\nexport { getLoginOptions } from './auth/getLoginOptions.js'\nexport interface GeneratedTypes {\n authUntyped: {\n [slug: string]: {\n forgotPassword: {\n email: string\n }\n login: {\n email: string\n password: string\n }\n registerFirstUser: {\n email: string\n password: string\n }\n unlock: {\n email: string\n }\n }\n }\n\n blocksUntyped: {\n [slug: string]: JsonObject\n }\n collectionsJoinsUntyped: {\n [slug: string]: {\n [schemaPath: string]: CollectionSlug\n }\n }\n collectionsSelectUntyped: {\n [slug: string]: SelectType\n }\n\n collectionsUntyped: {\n [slug: string]: JsonObject & TypeWithID\n }\n dbUntyped: {\n defaultIDType: number | string\n }\n globalsSelectUntyped: {\n [slug: string]: SelectType\n }\n\n globalsUntyped: {\n [slug: string]: JsonObject\n }\n jobsUntyped: {\n tasks: {\n [slug: string]: {\n input?: JsonObject\n output?: JsonObject\n }\n }\n workflows: {\n [slug: string]: {\n input: JsonObject\n }\n }\n }\n localeUntyped: null | string\n userUntyped: UntypedUser\n}\n\n// Helper type to resolve the correct type using conditional types\ntype ResolveCollectionType<T> = 'collections' extends keyof T\n ? T['collections']\n : // @ts-expect-error\n T['collectionsUntyped']\n\ntype ResolveBlockType<T> = 'blocks' extends keyof T\n ? T['blocks']\n : // @ts-expect-error\n T['blocksUntyped']\n\ntype ResolveCollectionSelectType<T> = 'collectionsSelect' extends keyof T\n ? T['collectionsSelect']\n : // @ts-expect-error\n T['collectionsSelectUntyped']\n\ntype ResolveCollectionJoinsType<T> = 'collectionsJoins' extends keyof T\n ? T['collectionsJoins']\n : // @ts-expect-error\n T['collectionsJoinsUntyped']\n\ntype ResolveGlobalType<T> = 'globals' extends keyof T\n ? T['globals']\n : // @ts-expect-error\n T['globalsUntyped']\n\ntype ResolveGlobalSelectType<T> = 'globalsSelect' extends keyof T\n ? T['globalsSelect']\n : // @ts-expect-error\n T['globalsSelectUntyped']\n\n// Applying helper types to GeneratedTypes\nexport type TypedCollection = ResolveCollectionType<GeneratedTypes>\n\nexport type TypedBlock = ResolveBlockType<GeneratedTypes>\n\nexport type TypedUploadCollection = NonNever<{\n [K in keyof TypedCollection]:\n | 'filename'\n | 'filesize'\n | 'mimeType'\n | 'url' extends keyof TypedCollection[K]\n ? TypedCollection[K]\n : never\n}>\n\nexport type TypedCollectionSelect = ResolveCollectionSelectType<GeneratedTypes>\n\nexport type TypedCollectionJoins = ResolveCollectionJoinsType<GeneratedTypes>\n\nexport type TypedGlobal = ResolveGlobalType<GeneratedTypes>\n\nexport type TypedGlobalSelect = ResolveGlobalSelectType<GeneratedTypes>\n\n// Extract string keys from the type\nexport type StringKeyOf<T> = Extract<keyof T, string>\n\n// Define the types for slugs using the appropriate collections and globals\nexport type CollectionSlug = StringKeyOf<TypedCollection>\n\nexport type BlockSlug = StringKeyOf<TypedBlock>\n\nexport type UploadCollectionSlug = StringKeyOf<TypedUploadCollection>\n\ntype ResolveDbType<T> = 'db' extends keyof T\n ? T['db']\n : // @ts-expect-error\n T['dbUntyped']\n\nexport type DefaultDocumentIDType = ResolveDbType<GeneratedTypes>['defaultIDType']\nexport type GlobalSlug = StringKeyOf<TypedGlobal>\n\n// now for locale and user\n\n// @ts-expect-error\ntype ResolveLocaleType<T> = 'locale' extends keyof T ? T['locale'] : T['localeUntyped']\n// @ts-expect-error\ntype ResolveUserType<T> = 'user' extends keyof T ? T['user'] : T['userUntyped']\n\nexport type TypedLocale = ResolveLocaleType<GeneratedTypes>\n\n/**\n * @todo rename to `User` in 4.0\n */\nexport type TypedUser = ResolveUserType<GeneratedTypes>\n\n// @ts-expect-error\ntype ResolveAuthOperationsType<T> = 'auth' extends keyof T ? T['auth'] : T['authUntyped']\nexport type TypedAuthOperations = ResolveAuthOperationsType<GeneratedTypes>\n\n// @ts-expect-error\ntype ResolveJobOperationsType<T> = 'jobs' extends keyof T ? T['jobs'] : T['jobsUntyped']\nexport type TypedJobs = ResolveJobOperationsType<GeneratedTypes>\n\ntype HasPayloadJobsType = 'collections' extends keyof GeneratedTypes\n ? 'payload-jobs' extends keyof TypedCollection\n ? true\n : false\n : false\n\n/**\n * Represents a job in the `payload-jobs` collection, referencing a queued workflow or task (= Job).\n * If a generated type for the `payload-jobs` collection is not available, falls back to the BaseJob type.\n *\n * `input` and `taksStatus` are always present here, as the job afterRead hook will always populate them.\n */\nexport type Job<\n TWorkflowSlugOrInput extends false | keyof TypedJobs['workflows'] | object = false,\n> = HasPayloadJobsType extends true\n ? {\n input: BaseJob<TWorkflowSlugOrInput>['input']\n taskStatus: BaseJob<TWorkflowSlugOrInput>['taskStatus']\n } & Omit<TypedCollection['payload-jobs'], 'input' | 'taskStatus'>\n : BaseJob<TWorkflowSlugOrInput>\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\nlet checkedDependencies = false\n\n/**\n * @description Payload\n */\nexport class BasePayload {\n /**\n * @description Authorization and Authentication using headers and cookies to run auth user strategies\n * @returns permissions: Permissions\n * @returns user: User\n */\n auth = async (options: AuthArgs) => {\n return authLocal(this, options)\n }\n\n authStrategies!: AuthStrategy[]\n\n blocks: Record<BlockSlug, FlattenedBlock> = {}\n\n collections: Record<CollectionSlug, Collection> = {}\n\n config!: SanitizedConfig\n /**\n * @description Performs count operation\n * @param options\n * @returns count of documents satisfying query\n */\n count = async <T extends CollectionSlug>(\n options: CountOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n return countLocal(this, options)\n }\n\n /**\n * @description Performs countGlobalVersions operation\n * @param options\n * @returns count of global document versions satisfying query\n */\n countGlobalVersions = async <T extends GlobalSlug>(\n options: CountGlobalVersionsOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n return countGlobalVersionsLocal(this, options)\n }\n\n /**\n * @description Performs countVersions operation\n * @param options\n * @returns count of document versions satisfying query\n */\n countVersions = async <T extends CollectionSlug>(\n options: CountOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n return countVersionsLocal(this, options)\n }\n\n /**\n * @description Performs create operation\n * @param options\n * @returns created document\n */\n create = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: CreateOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n return createLocal<TSlug, TSelect>(this, options)\n }\n\n crons: Cron[] = []\n db!: DatabaseAdapter\n\n decrypt = decrypt\n\n destroy = async () => {\n if (this.crons.length) {\n // Remove all crons from the list before stopping them\n const cronsToStop = this.crons.splice(0, this.crons.length)\n await Promise.all(cronsToStop.map((cron) => cron.stop()))\n }\n\n if (this.db?.destroy && typeof this.db.destroy === 'function') {\n await this.db.destroy()\n }\n }\n\n duplicate = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DuplicateOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n return duplicateLocal<TSlug, TSelect>(this, options)\n }\n\n email!: InitializedEmailAdapter\n\n // TODO: re-implement or remove?\n // errorHandler: ErrorHandler\n\n encrypt = encrypt\n\n extensions!: (args: {\n args: OperationArgs<any>\n req: graphQLRequest<unknown, unknown>\n result: ExecutionResult\n }) => Promise<any>\n\n /**\n * @description Find documents with criteria\n * @param options\n * @returns documents satisfying query\n */\n find = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: FindOptions<TSlug, TSelect>,\n ): Promise<PaginatedDocs<TransformCollectionWithSelect<TSlug, TSelect>>> => {\n return findLocal<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Find document by ID\n * @param options\n * @returns document with specified ID\n */\n findByID = async <\n TSlug extends CollectionSlug,\n TDisableErrors extends boolean,\n TSelect extends SelectFromCollectionSlug<TSlug>,\n >(\n options: FindByIDOptions<TSlug, TDisableErrors, TSelect>,\n ): Promise<ApplyDisableErrors<TransformCollectionWithSelect<TSlug, TSelect>, TDisableErrors>> => {\n return findByIDLocal<TSlug, TDisableErrors, TSelect>(this, options)\n }\n\n /**\n * @description Find distinct field values\n * @param options\n * @returns result with distinct field values\n */\n findDistinct = async <\n TSlug extends CollectionSlug,\n TField extends keyof DataFromCollectionSlug<TSlug> & string,\n >(\n options: FindDistinctOptions<TSlug, TField>,\n ): Promise<PaginatedDistinctDocs<Record<TField, DataFromCollectionSlug<TSlug>[TField]>>> => {\n return findDistinctLocal(this, options)\n }\n\n findGlobal = async <TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(\n options: FindGlobalOptions<TSlug, TSelect>,\n ): Promise<TransformGlobalWithSelect<TSlug, TSelect>> => {\n return findOneGlobalLocal<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Find global version by ID\n * @param options\n * @returns global version with specified ID\n */\n findGlobalVersionByID = async <TSlug extends GlobalSlug>(\n options: FindGlobalVersionByIDOptions<TSlug>,\n ): Promise<TypeWithVersion<DataFromGlobalSlug<TSlug>>> => {\n return findGlobalVersionByIDLocal<TSlug>(this, options)\n }\n\n /**\n * @description Find global versions with criteria\n * @param options\n * @returns versions satisfying query\n */\n findGlobalVersions = async <TSlug extends GlobalSlug>(\n options: FindGlobalVersionsOptions<TSlug>,\n ): Promise<PaginatedDocs<TypeWithVersion<DataFromGlobalSlug<TSlug>>>> => {\n return findGlobalVersionsLocal<TSlug>(this, options)\n }\n\n /**\n * @description Find version by ID\n * @param options\n * @returns version with specified ID\n */\n findVersionByID = async <TSlug extends CollectionSlug>(\n options: FindVersionByIDOptions<TSlug>,\n ): Promise<TypeWithVersion<DataFromCollectionSlug<TSlug>>> => {\n return findVersionByIDLocal<TSlug>(this, options)\n }\n\n /**\n * @description Find versions with criteria\n * @param options\n * @returns versions satisfying query\n */\n findVersions = async <TSlug extends CollectionSlug>(\n options: FindVersionsOptions<TSlug>,\n ): Promise<PaginatedDocs<TypeWithVersion<DataFromCollectionSlug<TSlug>>>> => {\n return findVersionsLocal<TSlug>(this, options)\n }\n\n forgotPassword = async <TSlug extends CollectionSlug>(\n options: ForgotPasswordOptions<TSlug>,\n ): Promise<ForgotPasswordResult> => {\n return forgotPasswordLocal<TSlug>(this, options)\n }\n\n getAdminURL = (): string => `${this.config.serverURL}${this.config.routes.admin}`\n\n getAPIURL = (): string => `${this.config.serverURL}${this.config.routes.api}`\n\n globals!: Globals\n\n importMap!: ImportMap\n\n jobs = getJobsLocalAPI(this)\n\n logger!: Logger\n\n login = async <TSlug extends CollectionSlug>(\n options: LoginOptions<TSlug>,\n ): Promise<{ user: DataFromCollectionSlug<TSlug> } & LoginResult> => {\n return loginLocal<TSlug>(this, options)\n }\n\n resetPassword = async <TSlug extends CollectionSlug>(\n options: ResetPasswordOptions<TSlug>,\n ): Promise<ResetPasswordResult> => {\n return resetPasswordLocal<TSlug>(this, options)\n }\n\n /**\n * @description Restore global version by ID\n * @param options\n * @returns version with specified ID\n */\n restoreGlobalVersion = async <TSlug extends GlobalSlug>(\n options: RestoreGlobalVersionOptions<TSlug>,\n ): Promise<DataFromGlobalSlug<TSlug>> => {\n return restoreGlobalVersionLocal<TSlug>(this, options)\n }\n\n /**\n * @description Restore version by ID\n * @param options\n * @returns version with specified ID\n */\n restoreVersion = async <TSlug extends CollectionSlug>(\n options: RestoreVersionOptions<TSlug>,\n ): Promise<DataFromCollectionSlug<TSlug>> => {\n return restoreVersionLocal<TSlug>(this, options)\n }\n\n schema!: GraphQLSchema\n\n secret!: string\n\n sendEmail!: InitializedEmailAdapter['sendEmail']\n\n types!: {\n arrayTypes: any\n blockInputTypes: any\n blockTypes: any\n fallbackLocaleInputType?: any\n groupTypes: any\n localeInputType?: any\n tabTypes: any\n }\n\n unlock = async <TSlug extends CollectionSlug>(\n options: UnlockOptions<TSlug>,\n ): Promise<boolean> => {\n return unlockLocal<TSlug>(this, options)\n }\n\n updateGlobal = async <TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(\n options: UpdateGlobalOptions<TSlug, TSelect>,\n ): Promise<TransformGlobalWithSelect<TSlug, TSelect>> => {\n return updateGlobalLocal<TSlug, TSelect>(this, options)\n }\n\n validationRules!: (args: OperationArgs<any>) => ValidationRule[]\n\n verifyEmail = async <TSlug extends CollectionSlug>(\n options: VerifyEmailOptions<TSlug>,\n ): Promise<boolean> => {\n return verifyEmailLocal(this, options)\n }\n\n versions: {\n [slug: string]: any // TODO: Type this\n } = {}\n\n async _initializeCrons() {\n if (this.config.jobs.enabled && this.config.jobs.autoRun && !isNextBuild()) {\n const DEFAULT_CRON = '* * * * *'\n const DEFAULT_LIMIT = 10\n\n const cronJobs =\n typeof this.config.jobs.autoRun === 'function'\n ? await this.config.jobs.autoRun(this)\n : this.config.jobs.autoRun\n\n await Promise.all(\n cronJobs.map((cronConfig) => {\n const jobAutorunCron = new Cron(\n cronConfig.cron ?? DEFAULT_CRON,\n async () => {\n if (\n _internal_jobSystemGlobals.shouldAutoSchedule &&\n !cronConfig.disableScheduling &&\n this.config.jobs.scheduling\n ) {\n await this.jobs.handleSchedules({\n allQueues: cronConfig.allQueues,\n queue: cronConfig.queue,\n })\n }\n\n if (!_internal_jobSystemGlobals.shouldAutoRun) {\n return\n }\n\n if (typeof this.config.jobs.shouldAutoRun === 'function') {\n const shouldAutoRun = await this.config.jobs.shouldAutoRun(this)\n\n if (!shouldAutoRun) {\n jobAutorunCron.stop()\n return\n }\n }\n\n await this.jobs.run({\n allQueues: cronConfig.allQueues,\n limit: cronConfig.limit ?? DEFAULT_LIMIT,\n queue: cronConfig.queue,\n silent: cronConfig.silent,\n })\n },\n {\n // Do not run consecutive crons if previous crons still ongoing\n protect: true,\n },\n )\n\n this.crons.push(jobAutorunCron)\n }),\n )\n }\n }\n\n async bin({\n args,\n cwd,\n log,\n }: {\n args: string[]\n cwd?: string\n log?: boolean\n }): Promise<{ code: number }> {\n return new Promise((resolve, reject) => {\n const spawned = spawn('node', [path.resolve(dirname, '../bin.js'), ...args], {\n cwd,\n stdio: log || log === undefined ? 'inherit' : 'ignore',\n })\n\n spawned.on('exit', (code) => {\n resolve({ code: code! })\n })\n\n spawned.on('error', (error) => {\n reject(error)\n })\n })\n }\n\n /**\n * @description delete one or more documents\n * @param options\n * @returns Updated document(s)\n */\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteByIDOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>>\n\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteManyOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect>>\n\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect> | TransformCollectionWithSelect<TSlug, TSelect>> {\n return deleteLocal<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Initializes Payload\n * @param options\n */\n async init(options: InitOptions): Promise<Payload> {\n if (\n process.env.NODE_ENV !== 'production' &&\n process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' &&\n !checkedDependencies\n ) {\n checkedDependencies = true\n void checkPayloadDependencies()\n }\n\n this.importMap = options.importMap!\n\n if (!options?.config) {\n throw new Error('Error: the payload config is required to initialize payload.')\n }\n\n this.config = await options.config\n this.logger = getLogger('payload', this.config.logger)\n\n if (!this.config.secret) {\n throw new Error('Error: missing secret key. A secret key is needed to secure Payload.')\n }\n\n this.secret = crypto.createHash('sha256').update(this.config.secret).digest('hex').slice(0, 32)\n\n this.globals = {\n config: this.config.globals,\n }\n\n for (const collection of this.config.collections) {\n let customIDType: string | undefined = undefined\n const findCustomID: TraverseFieldsCallback = ({ field }) => {\n if (\n ['array', 'blocks', 'group'].includes(field.type) ||\n (field.type === 'tab' && 'name' in field)\n ) {\n return true\n }\n\n if (!fieldAffectsData(field)) {\n return\n }\n\n if (field.name === 'id') {\n customIDType = field.type\n return true\n }\n }\n\n traverseFields({\n callback: findCustomID,\n config: this.config,\n fields: collection.fields,\n parentIsLocalized: false,\n })\n\n this.collections[collection.slug] = {\n config: collection,\n customIDType,\n }\n }\n\n this.blocks = this.config.blocks!.reduce(\n (blocks, block) => {\n blocks[block.slug] = block\n return blocks\n },\n {} as Record<string, FlattenedBlock>,\n )\n\n // Generate types on startup\n if (process.env.NODE_ENV !== 'production' && this.config.typescript.autoGenerate !== false) {\n // We cannot run it directly here, as generate-types imports json-schema-to-typescript, which breaks on turbopack.\n // see: https://github.com/vercel/next.js/issues/66723\n void this.bin({\n args: ['generate:types'],\n log: false,\n })\n }\n\n this.db = this.config.db.init({ payload: this })\n this.db.payload = this\n\n if (this.db?.init) {\n await this.db.init()\n }\n\n if (!options.disableDBConnect && this.db.connect) {\n await this.db.connect()\n }\n\n // Load email adapter\n if (this.config.email instanceof Promise) {\n const awaitedAdapter = await this.config.email\n this.email = awaitedAdapter({ payload: this })\n } else if (this.config.email) {\n this.email = this.config.email({ payload: this })\n } else {\n if (process.env.NEXT_PHASE !== 'phase-production-build') {\n this.logger.warn(\n `No email adapter provided. Email will be written to console. More info at https://payloadcms.com/docs/email/overview.`,\n )\n }\n\n this.email = consoleEmailAdapter({ payload: this })\n }\n\n // Warn if image resizing is enabled but sharp is not installed\n if (\n !this.config.sharp &&\n this.config.collections.some((c) => c.upload.imageSizes || c.upload.formatOptions)\n ) {\n this.logger.warn(\n `Image resizing is enabled for one or more collections, but sharp not installed. Please install 'sharp' and pass into the config.`,\n )\n }\n\n // Warn if user is deploying to Vercel, and any upload collection is missing a storage adapter\n if (process.env.VERCEL) {\n const uploadCollWithoutAdapter = this.config.collections.filter(\n (c) => c.upload && c.upload.adapter === undefined, // Uploads enabled, but no storage adapter provided\n )\n\n if (uploadCollWithoutAdapter.length) {\n const slugs = uploadCollWithoutAdapter.map((c) => c.slug).join(', ')\n this.logger.warn(\n `Collections with uploads enabled require a storage adapter when deploying to Vercel. Collection(s) without storage adapters: ${slugs}. See https://payloadcms.com/docs/upload/storage-adapters for more info.`,\n )\n }\n }\n\n this.sendEmail = this.email['sendEmail']\n\n serverInitTelemetry(this)\n\n // 1. loop over collections, if collection has auth strategy, initialize and push to array\n let jwtStrategyEnabled = false\n this.authStrategies = this.config.collections.reduce((authStrategies, collection) => {\n if (collection?.auth) {\n if (collection.auth.strategies.length > 0) {\n authStrategies.push(...collection.auth.strategies)\n }\n\n // 2. if api key enabled, push api key strategy into the array\n if (collection.auth?.useAPIKey) {\n authStrategies.push({\n name: `${collection.slug}-api-key`,\n authenticate: APIKeyAuthentication(collection),\n })\n }\n\n // 3. if localStrategy flag is true\n if (!collection.auth.disableLocalStrategy && !jwtStrategyEnabled) {\n jwtStrategyEnabled = true\n }\n }\n\n return authStrategies\n }, [] as AuthStrategy[])\n\n // 4. if enabled, push jwt strategy into authStrategies last\n if (jwtStrategyEnabled) {\n this.authStrategies.push({\n name: 'local-jwt',\n authenticate: JWTAuthentication,\n })\n }\n\n try {\n if (!options.disableOnInit) {\n if (typeof options.onInit === 'function') {\n await options.onInit(this)\n }\n if (typeof this.config.onInit === 'function') {\n await this.config.onInit(this)\n }\n }\n } catch (error) {\n this.logger.error({ err: error }, 'Error running onInit function')\n throw error\n }\n\n if (options.cron) {\n await this._initializeCrons()\n }\n\n return this\n }\n\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateManyOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect>>\n\n /**\n * @description Update one or more documents\n * @param options\n * @returns Updated document(s)\n */\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateByIDOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>>\n\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect> | TransformCollectionWithSelect<TSlug, TSelect>> {\n return updateLocal<TSlug, TSelect>(this, options)\n }\n}\n\nconst initialized = new BasePayload()\n\n// eslint-disable-next-line no-restricted-exports\nexport default initialized\n\nexport const reload = async (\n config: SanitizedConfig,\n payload: Payload,\n skipImportMapGeneration?: boolean,\n options?: InitOptions,\n): Promise<void> => {\n if (typeof payload.db.destroy === 'function') {\n // Only destroy db, as we then later only call payload.db.init and not payload.init\n await payload.db.destroy()\n }\n payload.config = config\n\n payload.collections = config.collections.reduce(\n (collections, collection) => {\n collections[collection.slug] = {\n config: collection,\n customIDType: payload.collections[collection.slug]?.customIDType,\n }\n return collections\n },\n {} as Record<string, any>,\n )\n\n payload.blocks = config.blocks!.reduce(\n (blocks, block) => {\n blocks[block.slug] = block\n return blocks\n },\n {} as Record<string, FlattenedBlock>,\n )\n\n payload.globals = {\n config: config.globals,\n }\n\n // TODO: support HMR for other props in the future (see payload/src/index init()) that may change on Payload singleton\n\n // Generate types\n if (config.typescript.autoGenerate !== false) {\n // We cannot run it directly here, as generate-types imports json-schema-to-typescript, which breaks on turbopack.\n // see: https://github.com/vercel/next.js/issues/66723\n void payload.bin({\n args: ['generate:types'],\n log: false,\n })\n }\n\n // Generate component map\n if (skipImportMapGeneration !== true && config.admin?.importMap?.autoGenerate !== false) {\n await generateImportMap(config, {\n log: true,\n })\n }\n\n if (payload.db?.init) {\n await payload.db.init()\n }\n\n if (!options?.disableDBConnect && payload.db.connect) {\n await payload.db.connect({ hotReload: true })\n }\n\n ;(global as any)._payload_clientConfigs = {} as Record<keyof SupportedLanguages, ClientConfig>\n ;(global as any)._payload_schemaMap = null\n ;(global as any)._payload_clientSchemaMap = null\n ;(global as any)._payload_doNotCacheClientConfig = true // This will help refreshing the client config cache more reliably. If you remove this, please test HMR + client config refreshing (do new fields appear in the document?)\n ;(global as any)._payload_doNotCacheSchemaMap = true\n ;(global as any)._payload_doNotCacheClientSchemaMap = true\n}\n\nlet _cached: Map<\n string,\n {\n initializedCrons: boolean\n payload: null | Payload\n promise: null | Promise<Payload>\n reload: boolean | Promise<void>\n ws: null | WebSocket\n }\n> = (global as any)._payload\n\nif (!_cached) {\n _cached = (global as any)._payload = new Map()\n}\n\n/**\n * Get a payload instance.\n * This function is a wrapper around new BasePayload().init() that adds the following functionality on top of that:\n *\n * - smartly caches Payload instance on the module scope. That way, we prevent unnecessarily initializing Payload over and over again\n * when calling getPayload multiple times or from multiple locations.\n * - adds HMR support and reloads the payload instance when the config changes.\n */\nexport const getPayload = async (\n options: {\n /**\n * A unique key to identify the payload instance. You can pass your own key if you want to cache this payload instance separately.\n * This is useful if you pass a different payload config for each instance.\n *\n * @default 'default'\n */\n key?: string\n } & InitOptions,\n): Promise<Payload> => {\n if (!options?.config) {\n throw new Error('Error: the payload config is required for getPayload to work.')\n }\n\n let alreadyCachedSameConfig = false\n\n let cached = _cached.get(options.key ?? 'default')\n if (!cached) {\n cached = {\n initializedCrons: Boolean(options.cron),\n payload: null,\n promise: null,\n reload: false,\n ws: null,\n }\n _cached.set(options.key ?? 'default', cached)\n } else {\n alreadyCachedSameConfig = true\n }\n\n if (alreadyCachedSameConfig) {\n // alreadyCachedSameConfig => already called onInit once, but same config => no need to call onInit again.\n // calling onInit again would only make sense if a different config was passed.\n options.disableOnInit = true\n }\n\n if (cached.payload) {\n if (options.cron && !cached.initializedCrons) {\n // getPayload called with crons enabled, but existing cached version does not have crons initialized. => Initialize crons in existing cached version\n cached.initializedCrons = true\n await cached.payload._initializeCrons()\n }\n\n if (cached.reload === true) {\n let resolve!: () => void\n\n // getPayload is called multiple times, in parallel. However, we only want to run `await reload` once. By immediately setting cached.reload to a promise,\n // we can ensure that all subsequent calls will wait for the first reload to finish. So if we set it here, the 2nd call of getPayload\n // will reach `if (cached.reload instanceof Promise) {` which then waits for the first reload to finish.\n cached.reload = new Promise((res) => (resolve = res))\n const config = await options.config\n await reload(config, cached.payload, !options.importMap, options)\n\n resolve()\n }\n\n if (cached.reload instanceof Promise) {\n await cached.reload\n }\n if (options?.importMap) {\n cached.payload.importMap = options.importMap\n }\n return cached.payload\n }\n\n if (!cached.promise) {\n // no need to await options.config here, as it's already awaited in the BasePayload.init\n cached.promise = new BasePayload().init(options)\n }\n\n try {\n cached.payload = await cached.promise\n\n if (\n !cached.ws &&\n process.env.NODE_ENV !== 'production' &&\n process.env.NODE_ENV !== 'test' &&\n process.env.DISABLE_PAYLOAD_HMR !== 'true'\n ) {\n try {\n const port = process.env.PORT || '3000'\n\n const path = '/_next/webpack-hmr'\n // The __NEXT_ASSET_PREFIX env variable is set for both assetPrefix and basePath (tested in Next.js 15.1.6)\n const prefix = process.env.__NEXT_ASSET_PREFIX ?? ''\n\n cached.ws = new WebSocket(\n process.env.PAYLOAD_HMR_URL_OVERRIDE ?? `ws://localhost:${port}${prefix}${path}`,\n )\n\n cached.ws.onmessage = (event) => {\n if (typeof event.data === 'string') {\n const data = JSON.parse(event.data)\n\n if ('action' in data && data.action === 'serverComponentChanges') {\n cached.reload = true\n }\n }\n }\n\n cached.ws.onerror = (_) => {\n // swallow any websocket connection error\n }\n } catch (_) {\n // swallow e\n }\n }\n } catch (e) {\n cached.promise = null\n // add identifier to error object, so that our error logger in routeError.ts does not attempt to re-initialize getPayload\n ;(e as { payloadInitError?: boolean }).payloadInitError = true\n throw e\n }\n\n if (options?.importMap) {\n cached.payload.importMap = options.importMap\n }\n\n return cached.payload\n}\n\ntype Payload = BasePayload\n\ninterface RequestContext {\n [key: string]: unknown\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DatabaseAdapter extends BaseDatabaseAdapter {}\nexport type { Payload, RequestContext }\nexport * from './auth/index.js'\nexport { jwtSign } from './auth/jwt.js'\nexport { accessOperation } from './auth/operations/access.js'\nexport { forgotPasswordOperation } from './auth/operations/forgotPassword.js'\nexport { initOperation } from './auth/operations/init.js'\nexport { checkLoginPermission } from './auth/operations/login.js'\nexport { loginOperation } from './auth/operations/login.js'\nexport { logoutOperation } from './auth/operations/logout.js'\nexport type { MeOperationResult } from './auth/operations/me.js'\nexport { meOperation } from './auth/operations/me.js'\nexport { refreshOperation } from './auth/operations/refresh.js'\nexport { registerFirstUserOperation } from './auth/operations/registerFirstUser.js'\nexport { resetPasswordOperation } from './auth/operations/resetPassword.js'\nexport { unlockOperation } from './auth/operations/unlock.js'\nexport { verifyEmailOperation } from './auth/operations/verifyEmail.js'\nexport { JWTAuthentication } from './auth/strategies/jwt.js'\nexport { incrementLoginAttempts } from './auth/strategies/local/incrementLoginAttempts.js'\nexport { resetLoginAttempts } from './auth/strategies/local/resetLoginAttempts.js'\nexport type {\n AuthStrategyFunction,\n AuthStrategyFunctionArgs,\n AuthStrategyResult,\n CollectionPermission,\n DocumentPermissions,\n FieldPermissions,\n GlobalPermission,\n IncomingAuthType,\n Permission,\n Permissions,\n SanitizedCollectionPermission,\n SanitizedDocumentPermissions,\n SanitizedFieldPermissions,\n SanitizedGlobalPermission,\n SanitizedPermissions,\n UntypedUser as User,\n VerifyConfig,\n} from './auth/types.js'\nexport { generateImportMap } from './bin/generateImportMap/index.js'\n\nexport type { ImportMap } from './bin/generateImportMap/index.js'\nexport { genImportMapIterateFields } from './bin/generateImportMap/iterateFields.js'\nexport { migrate as migrateCLI } from './bin/migrate.js'\n\nexport {\n type ClientCollectionConfig,\n createClientCollectionConfig,\n createClientCollectionConfigs,\n type ServerOnlyCollectionAdminProperties,\n type ServerOnlyCollectionProperties,\n type ServerOnlyUploadProperties,\n} from './collections/config/client.js'\n\nexport type {\n AfterChangeHook as CollectionAfterChangeHook,\n AfterDeleteHook as CollectionAfterDeleteHook,\n AfterErrorHook as CollectionAfterErrorHook,\n AfterForgotPasswordHook as CollectionAfterForgotPasswordHook,\n AfterLoginHook as CollectionAfterLoginHook,\n AfterLogoutHook as CollectionAfterLogoutHook,\n AfterMeHook as CollectionAfterMeHook,\n AfterOperationHook as CollectionAfterOperationHook,\n AfterReadHook as CollectionAfterReadHook,\n AfterRefreshHook as CollectionAfterRefreshHook,\n AuthCollection,\n AuthOperationsFromCollectionSlug,\n BaseFilter,\n BaseListFilter,\n BeforeChangeHook as CollectionBeforeChangeHook,\n BeforeDeleteHook as CollectionBeforeDeleteHook,\n BeforeLoginHook as CollectionBeforeLoginHook,\n BeforeOperationHook as CollectionBeforeOperationHook,\n BeforeReadHook as CollectionBeforeReadHook,\n BeforeValidateHook as CollectionBeforeValidateHook,\n BulkOperationResult,\n Collection,\n CollectionAdminOptions,\n CollectionConfig,\n DataFromCollectionSlug,\n HookOperationType,\n MeHook as CollectionMeHook,\n RefreshHook as CollectionRefreshHook,\n RequiredDataFromCollection,\n RequiredDataFromCollectionSlug,\n SanitizedCollectionConfig,\n SanitizedJoins,\n TypeWithID,\n TypeWithTimestamps,\n} from './collections/config/types.js'\n\nexport type { CompoundIndex } from './collections/config/types.js'\nexport type { SanitizedCompoundIndex } from './collections/config/types.js'\n\nexport { createDataloaderCacheKey, getDataLoader } from './collections/dataloader.js'\nexport { countOperation } from './collections/operations/count.js'\nexport { createOperation } from './collections/operations/create.js'\nexport { deleteOperation } from './collections/operations/delete.js'\nexport { deleteByIDOperation } from './collections/operations/deleteByID.js'\nexport { docAccessOperation } from './collections/operations/docAccess.js'\nexport { duplicateOperation } from './collections/operations/duplicate.js'\nexport { findOperation } from './collections/operations/find.js'\nexport { findByIDOperation } from './collections/operations/findByID.js'\nexport { findVersionByIDOperation } from './collections/operations/findVersionByID.js'\nexport { findVersionsOperation } from './collections/operations/findVersions.js'\nexport { restoreVersionOperation } from './collections/operations/restoreVersion.js'\nexport { updateOperation } from './collections/operations/update.js'\nexport { updateByIDOperation } from './collections/operations/updateByID.js'\nexport { buildConfig } from './config/build.js'\nexport {\n type ClientConfig,\n createClientConfig,\n type CreateClientConfigArgs,\n createUnauthenticatedClientConfig,\n serverOnlyAdminConfigProperties,\n serverOnlyConfigProperties,\n type UnauthenticatedClientConfig,\n} from './config/client.js'\nexport { defaults } from './config/defaults.js'\n\nexport { type OrderableEndpointBody } from './config/orderable/index.js'\nexport { sanitizeConfig } from './config/sanitize.js'\nexport type * from './config/types.js'\nexport { combineQueries } from './database/combineQueries.js'\nexport { createDatabaseAdapter } from './database/createDatabaseAdapter.js'\nexport { defaultBeginTransaction } from './database/defaultBeginTransaction.js'\nexport { flattenWhereToOperators } from './database/flattenWhereToOperators.js'\nexport { getLocalizedPaths } from './database/getLocalizedPaths.js'\nexport { createMigration } from './database/migrations/createMigration.js'\nexport { getMigrations } from './database/migrations/getMigrations.js'\nexport { getPredefinedMigration } from './database/migrations/getPredefinedMigration.js'\nexport { migrate } from './database/migrations/migrate.js'\nexport { migrateDown } from './database/migrations/migrateDown.js'\nexport { migrateRefresh } from './database/migrations/migrateRefresh.js'\nexport { migrateReset } from './database/migrations/migrateReset.js'\nexport { migrateStatus } from './database/migrations/migrateStatus.js'\nexport { migrationsCollection } from './database/migrations/migrationsCollection.js'\nexport { migrationTemplate } from './database/migrations/migrationTemplate.js'\nexport { readMigrationFiles } from './database/migrations/readMigrationFiles.js'\nexport { writeMigrationIndex } from './database/migrations/writeMigrationIndex.js'\nexport type * from './database/queryValidation/types.js'\nexport type { EntityPolicies, PathToQuery } from './database/queryValidation/types.js'\nexport { validateQueryPaths } from './database/queryValidation/validateQueryPaths.js'\nexport { validateSearchParam } from './database/queryValidation/validateSearchParams.js'\nexport type {\n BaseDatabaseAdapter,\n BeginTransaction,\n CommitTransaction,\n Connect,\n Count,\n CountArgs,\n CountGlobalVersionArgs,\n CountGlobalVersions,\n CountVersions,\n Create,\n CreateArgs,\n CreateGlobal,\n CreateGlobalArgs,\n CreateGlobalVersion,\n CreateGlobalVersionArgs,\n CreateMigration,\n CreateVersion,\n CreateVersionArgs,\n DatabaseAdapterResult as DatabaseAdapterObj,\n DBIdentifierName,\n DeleteMany,\n DeleteManyArgs,\n DeleteOne,\n DeleteOneArgs,\n DeleteVersions,\n DeleteVersionsArgs,\n Destroy,\n Find,\n FindArgs,\n FindDistinct,\n FindGlobal,\n FindGlobalArgs,\n FindGlobalVersions,\n FindGlobalVersionsArgs,\n FindOne,\n FindOneArgs,\n FindVersions,\n FindVersionsArgs,\n GenerateSchema,\n Init,\n Migration,\n MigrationData,\n MigrationTemplateArgs,\n PaginatedDistinctDocs,\n PaginatedDocs,\n QueryDrafts,\n QueryDraftsArgs,\n RollbackTransaction,\n Transaction,\n UpdateGlobal,\n UpdateGlobalArgs,\n UpdateGlobalVersion,\n UpdateGlobalVersionArgs,\n UpdateJobs,\n UpdateJobsArgs,\n UpdateMany,\n UpdateManyArgs,\n UpdateOne,\n UpdateOneArgs,\n UpdateVersion,\n UpdateVersionArgs,\n Upsert,\n UpsertArgs,\n} from './database/types.js'\nexport type { EmailAdapter as PayloadEmailAdapter, SendEmailOptions } from './email/types.js'\nexport {\n APIError,\n APIErrorName,\n AuthenticationError,\n DuplicateCollection,\n DuplicateFieldName,\n DuplicateGlobal,\n ErrorDeletingFile,\n FileRetrievalError,\n FileUploadError,\n Forbidden,\n InvalidConfiguration,\n InvalidFieldName,\n InvalidFieldRelationship,\n Locked,\n LockedAuth,\n MissingCollectionLabel,\n MissingEditorProp,\n MissingFieldInputOptions,\n MissingFieldType,\n MissingFile,\n NotFound,\n QueryError,\n UnverifiedEmail,\n ValidationError,\n ValidationErrorName,\n} from './errors/index.js'\n\nexport type { ValidationFieldError } from './errors/index.js'\nexport { baseBlockFields } from './fields/baseFields/baseBlockFields.js'\n\nexport { baseIDField } from './fields/baseFields/baseIDField.js'\n\nexport {\n createClientField,\n createClientFields,\n type ServerOnlyFieldAdminProperties,\n type ServerOnlyFieldProperties,\n} from './fields/config/client.js'\n\nexport interface FieldCustom extends Record<string, any> {}\n\nexport { sanitizeFields } from './fields/config/sanitize.js'\n\nexport type {\n AdminClient,\n ArrayField,\n ArrayFieldClient,\n BaseValidateOptions,\n Block,\n BlockJSX,\n BlocksField,\n BlocksFieldClient,\n CheckboxField,\n CheckboxFieldClient,\n ClientBlock,\n ClientField,\n ClientFieldProps,\n CodeField,\n CodeFieldClient,\n CollapsibleField,\n CollapsibleFieldClient,\n Condition,\n DateField,\n DateFieldClient,\n EmailField,\n EmailFieldClient,\n Field,\n FieldAccess,\n FieldAffectingData,\n FieldAffectingDataClient,\n FieldBase,\n FieldBaseClient,\n FieldHook,\n FieldHookArgs,\n FieldPresentationalOnly,\n FieldPresentationalOnlyClient,\n FieldTypes,\n FieldWithMany,\n FieldWithManyClient,\n FieldWithMaxDepth,\n FieldWithMaxDepthClient,\n FieldWithPath,\n FieldWithPathClient,\n FieldWithSubFields,\n FieldWithSubFieldsClient,\n FilterOptions,\n FilterOptionsProps,\n FlattenedArrayField,\n FlattenedBlock,\n FlattenedBlocksField,\n FlattenedField,\n FlattenedGroupField,\n FlattenedJoinField,\n FlattenedTabAsField,\n GroupField,\n GroupFieldClient,\n HookName,\n JoinField,\n JoinFieldClient,\n JSONField,\n JSONFieldClient,\n Labels,\n LabelsClient,\n NamedGroupField,\n NamedGroupFieldClient,\n NamedTab,\n NonPresentationalField,\n NonPresentationalFieldClient,\n NumberField,\n NumberFieldClient,\n Option,\n OptionLabel,\n OptionObject,\n PointField,\n PointFieldClient,\n PolymorphicRelationshipField,\n PolymorphicRelationshipFieldClient,\n RadioField,\n RadioFieldClient,\n RelationshipField,\n RelationshipFieldClient,\n RelationshipValue,\n RichTextField,\n RichTextFieldClient,\n RowField,\n RowFieldClient,\n SelectField,\n SelectFieldClient,\n SingleRelationshipField,\n SingleRelationshipFieldClient,\n Tab,\n TabAsField,\n TabAsFieldClient,\n TabsField,\n TabsFieldClient,\n TextareaField,\n TextareaFieldClient,\n TextField,\n TextFieldClient,\n UIField,\n UIFieldClient,\n UnnamedGroupField,\n UnnamedGroupFieldClient,\n UnnamedTab,\n UploadField,\n UploadFieldClient,\n Validate,\n ValidateOptions,\n ValueWithRelation,\n} from './fields/config/types.js'\n\nexport { getDefaultValue } from './fields/getDefaultValue.js'\nexport { traverseFields as afterChangeTraverseFields } from './fields/hooks/afterChange/traverseFields.js'\n\nexport { promise as afterReadPromise } from './fields/hooks/afterRead/promise.js'\nexport { traverseFields as afterReadTraverseFields } from './fields/hooks/afterRead/traverseFields.js'\nexport { traverseFields as beforeChangeTraverseFields } from './fields/hooks/beforeChange/traverseFields.js'\nexport { traverseFields as beforeValidateTraverseFields } from './fields/hooks/beforeValidate/traverseFields.js'\n\nexport { sortableFieldTypes } from './fields/sortableFieldTypes.js'\nexport { validateBlocksFilterOptions, validations } from './fields/validations.js'\n\nexport type {\n ArrayFieldValidation,\n BlocksFieldValidation,\n CheckboxFieldValidation,\n CodeFieldValidation,\n ConfirmPasswordFieldValidation,\n DateFieldValidation,\n EmailFieldValidation,\n JSONFieldValidation,\n NumberFieldManyValidation,\n NumberFieldSingleValidation,\n NumberFieldValidation,\n PasswordFieldValidation,\n PointFieldValidation,\n RadioFieldValidation,\n RelationshipFieldManyValidation,\n RelationshipFieldSingleValidation,\n RelationshipFieldValidation,\n RichTextFieldValidation,\n SelectFieldManyValidation,\n SelectFieldSingleValidation,\n SelectFieldValidation,\n TextareaFieldValidation,\n TextFieldManyValidation,\n TextFieldSingleValidation,\n TextFieldValidation,\n UploadFieldManyValidation,\n UploadFieldSingleValidation,\n UploadFieldValidation,\n UsernameFieldValidation,\n} from './fields/validations.js'\nexport type { FolderSortKeys } from './folders/types.js'\nexport { getFolderData } from './folders/utils/getFolderData.js'\nexport {\n type ClientGlobalConfig,\n createClientGlobalConfig,\n createClientGlobalConfigs,\n type ServerOnlyGlobalAdminProperties,\n type ServerOnlyGlobalProperties,\n} from './globals/config/client.js'\nexport type {\n AfterChangeHook as GlobalAfterChangeHook,\n AfterReadHook as GlobalAfterReadHook,\n BeforeChangeHook as GlobalBeforeChangeHook,\n BeforeOperationHook as GlobalBeforeOperationHook,\n BeforeReadHook as GlobalBeforeReadHook,\n BeforeValidateHook as GlobalBeforeValidateHook,\n DataFromGlobalSlug,\n GlobalAdminOptions,\n GlobalConfig,\n SanitizedGlobalConfig,\n} from './globals/config/types.js'\n\nexport { docAccessOperation as docAccessOperationGlobal } from './globals/operations/docAccess.js'\nexport { findOneOperation } from './globals/operations/findOne.js'\n\nexport { findVersionByIDOperation as findVersionByIDOperationGlobal } from './globals/operations/findVersionByID.js'\nexport { findVersionsOperation as findVersionsOperationGlobal } from './globals/operations/findVersions.js'\nexport { restoreVersionOperation as restoreVersionOperationGlobal } from './globals/operations/restoreVersion.js'\nexport { updateOperation as updateOperationGlobal } from './globals/operations/update.js'\nexport type {\n CollapsedPreferences,\n CollectionPreferences,\n /**\n * @deprecated Use `CollectionPreferences` instead.\n */\n CollectionPreferences as ListPreferences,\n ColumnPreference,\n DocumentPreferences,\n FieldsPreferences,\n InsideFieldsPreferences,\n PreferenceRequest,\n PreferenceUpdateRequest,\n TabsPreferences,\n} from './preferences/types.js'\nexport type { QueryPreset } from './query-presets/types.js'\nexport { jobAfterRead } from './queues/config/collection.js'\nexport type { JobsConfig, RunJobAccess, RunJobAccessArgs } from './queues/config/types/index.js'\nexport type {\n RunInlineTaskFunction,\n RunTaskFunction,\n RunTaskFunctions,\n TaskConfig,\n TaskHandler,\n TaskHandlerArgs,\n TaskHandlerResult,\n TaskHandlerResults,\n TaskInput,\n TaskOutput,\n TaskType,\n} from './queues/config/types/taskTypes.js'\n\nexport type {\n BaseJob,\n JobLog,\n JobTaskStatus,\n RunningJob,\n SingleTaskStatus,\n WorkflowConfig,\n WorkflowHandler,\n WorkflowTypes,\n} from './queues/config/types/workflowTypes.js'\nexport { countRunnableOrActiveJobsForQueue } from './queues/operations/handleSchedules/countRunnableOrActiveJobsForQueue.js'\nexport { importHandlerPath } from './queues/operations/runJobs/runJob/importHandlerPath.js'\n\nexport {\n _internal_jobSystemGlobals,\n _internal_resetJobSystemGlobals,\n getCurrentDate,\n} from './queues/utilities/getCurrentDate.js'\nexport { getLocalI18n } from './translations/getLocalI18n.js'\nexport * from './types/index.js'\nexport { getFileByPath } from './uploads/getFileByPath.js'\nexport { _internal_safeFetchGlobal } from './uploads/safeFetch.js'\n\nexport type * from './uploads/types.js'\nexport { addDataAndFileToRequest } from './utilities/addDataAndFileToRequest.js'\nexport { addLocalesToRequestFromData, sanitizeLocales } from './utilities/addLocalesToRequest.js'\nexport { canAccessAdmin } from './utilities/canAccessAdmin.js'\nexport { commitTransaction } from './utilities/commitTransaction.js'\nexport {\n configToJSONSchema,\n entityToJSONSchema,\n fieldsToJSONSchema,\n withNullableJSONSchemaType,\n} from './utilities/configToJSONSchema.js'\nexport { createArrayFromCommaDelineated } from './utilities/createArrayFromCommaDelineated.js'\nexport { createLocalReq } from './utilities/createLocalReq.js'\nexport { createPayloadRequest } from './utilities/createPayloadRequest.js'\nexport {\n deepCopyObject,\n deepCopyObjectComplex,\n deepCopyObjectSimple,\n} from './utilities/deepCopyObject.js'\nexport {\n deepMerge,\n deepMergeWithCombinedArrays,\n deepMergeWithReactComponents,\n deepMergeWithSourceArrays,\n} from './utilities/deepMerge.js'\nexport {\n checkDependencies,\n type CustomVersionParser,\n} from './utilities/dependencies/dependencyChecker.js'\nexport { getDependencies } from './utilities/dependencies/getDependencies.js'\nexport {\n findUp,\n findUpSync,\n pathExistsAndIsAccessible,\n pathExistsAndIsAccessibleSync,\n} from './utilities/findUp.js'\nexport { flattenAllFields } from './utilities/flattenAllFields.js'\nexport { flattenTopLevelFields } from './utilities/flattenTopLevelFields.js'\nexport { formatErrors } from './utilities/formatErrors.js'\nexport { formatLabels, formatNames, toWords } from './utilities/formatLabels.js'\nexport { getBlockSelect } from './utilities/getBlockSelect.js'\nexport { getCollectionIDFieldTypes } from './utilities/getCollectionIDFieldTypes.js'\nexport { getFieldByPath } from './utilities/getFieldByPath.js'\nexport { getObjectDotNotation } from './utilities/getObjectDotNotation.js'\nexport { getRequestLanguage } from './utilities/getRequestLanguage.js'\nexport { handleEndpoints } from './utilities/handleEndpoints.js'\nexport { headersWithCors } from './utilities/headersWithCors.js'\nexport { initTransaction } from './utilities/initTransaction.js'\nexport { isEntityHidden } from './utilities/isEntityHidden.js'\nexport { isolateObjectProperty } from './utilities/isolateObjectProperty.js'\nexport { isPlainObject } from './utilities/isPlainObject.js'\nexport { isValidID } from './utilities/isValidID.js'\nexport { killTransaction } from './utilities/killTransaction.js'\nexport { logError } from './utilities/logError.js'\nexport { defaultLoggerOptions } from './utilities/logger.js'\nexport { mapAsync } from './utilities/mapAsync.js'\nexport { mergeHeaders } from './utilities/mergeHeaders.js'\nexport { parseDocumentID } from './utilities/parseDocumentID.js'\nexport { sanitizeFallbackLocale } from './utilities/sanitizeFallbackLocale.js'\nexport { sanitizeJoinParams } from './utilities/sanitizeJoinParams.js'\nexport { sanitizePopulateParam } from './utilities/sanitizePopulateParam.js'\nexport { sanitizeSelectParam } from './utilities/sanitizeSelectParam.js'\nexport { stripUnselectedFields } from './utilities/stripUnselectedFields.js'\nexport { traverseFields } from './utilities/traverseFields.js'\nexport type { TraverseFieldsCallback } from './utilities/traverseFields.js'\nexport { buildVersionCollectionFields } from './versions/buildCollectionFields.js'\nexport { buildVersionGlobalFields } from './versions/buildGlobalFields.js'\nexport { buildVersionCompoundIndexes } from './versions/buildVersionCompoundIndexes.js'\nexport { versionDefaults } from './versions/defaults.js'\nexport { deleteCollectionVersions } from './versions/deleteCollectionVersions.js'\nexport { appendVersionToQueryKey } from './versions/drafts/appendVersionToQueryKey.js'\nexport { getQueryDraftsSort } from './versions/drafts/getQueryDraftsSort.js'\n\nexport { enforceMaxVersions } from './versions/enforceMaxVersions.js'\nexport { getLatestCollectionVersion } from './versions/getLatestCollectionVersion.js'\nexport { getLatestGlobalVersion } from './versions/getLatestGlobalVersion.js'\nexport { saveVersion } from './versions/saveVersion.js'\nexport type { SchedulePublishTaskInput } from './versions/schedule/types.js'\nexport type { SchedulePublish, TypeWithVersion } from './versions/types.js'\nexport { deepMergeSimple } from '@payloadcms/translations/utilities'\n"],"names":["spawn","crypto","fileURLToPath","path","WebSocket","forgotPasswordLocal","loginLocal","resetPasswordLocal","unlockLocal","verifyEmailLocal","countLocal","createLocal","deleteLocal","duplicateLocal","findLocal","findByIDLocal","findDistinct","findDistinctLocal","findVersionByIDLocal","findVersionsLocal","restoreVersionLocal","updateLocal","countGlobalVersionsLocal","findOneGlobalLocal","findGlobalVersionByIDLocal","findGlobalVersionsLocal","restoreGlobalVersionLocal","updateGlobalLocal","Cron","decrypt","encrypt","authLocal","APIKeyAuthentication","JWTAuthentication","generateImportMap","checkPayloadDependencies","countVersionsLocal","consoleEmailAdapter","fieldAffectsData","getJobsLocalAPI","_internal_jobSystemGlobals","isNextBuild","getLogger","serverInit","serverInitTelemetry","traverseFields","accountLockFields","baseAccountLockFields","apiKeyFields","baseAPIKeyFields","baseAuthFields","emailFieldConfig","baseEmailField","sessionsFieldConfig","baseSessionsField","usernameFieldConfig","baseUsernameField","verificationFields","baseVerificationFields","executeAccess","executeAuthStrategies","extractAccessFromPermission","getAccessResults","getFieldsToSign","getLoginOptions","filename","url","dirname","checkedDependencies","BasePayload","auth","options","authStrategies","blocks","collections","config","count","countGlobalVersions","countVersions","create","crons","db","destroy","length","cronsToStop","splice","Promise","all","map","cron","stop","duplicate","email","extensions","find","findByID","findGlobal","findGlobalVersionByID","findGlobalVersions","findVersionByID","findVersions","forgotPassword","getAdminURL","serverURL","routes","admin","getAPIURL","api","globals","importMap","jobs","logger","login","resetPassword","restoreGlobalVersion","restoreVersion","schema","secret","sendEmail","types","unlock","updateGlobal","validationRules","verifyEmail","versions","_initializeCrons","enabled","autoRun","DEFAULT_CRON","DEFAULT_LIMIT","cronJobs","cronConfig","jobAutorunCron","shouldAutoSchedule","disableScheduling","scheduling","handleSchedules","allQueues","queue","shouldAutoRun","run","limit","silent","protect","push","bin","args","cwd","log","resolve","reject","spawned","stdio","undefined","on","code","error","delete","init","process","env","NODE_ENV","PAYLOAD_DISABLE_DEPENDENCY_CHECKER","Error","createHash","update","digest","slice","collection","customIDType","findCustomID","field","includes","type","name","callback","fields","parentIsLocalized","slug","reduce","block","typescript","autoGenerate","payload","disableDBConnect","connect","awaitedAdapter","NEXT_PHASE","warn","sharp","some","c","upload","imageSizes","formatOptions","VERCEL","uploadCollWithoutAdapter","filter","adapter","slugs","join","jwtStrategyEnabled","strategies","useAPIKey","authenticate","disableLocalStrategy","disableOnInit","onInit","err","initialized","reload","skipImportMapGeneration","hotReload","global","_payload_clientConfigs","_payload_schemaMap","_payload_clientSchemaMap","_payload_doNotCacheClientConfig","_payload_doNotCacheSchemaMap","_payload_doNotCacheClientSchemaMap","_cached","_payload","Map","getPayload","alreadyCachedSameConfig","cached","get","key","initializedCrons","Boolean","promise","ws","set","res","DISABLE_PAYLOAD_HMR","port","PORT","prefix","__NEXT_ASSET_PREFIX","PAYLOAD_HMR_URL_OVERRIDE","onmessage","event","data","JSON","parse","action","onerror","_","e","payloadInitError","jwtSign","accessOperation","forgotPasswordOperation","initOperation","checkLoginPermission","loginOperation","logoutOperation","meOperation","refreshOperation","registerFirstUserOperation","resetPasswordOperation","unlockOperation","verifyEmailOperation","incrementLoginAttempts","resetLoginAttempts","genImportMapIterateFields","migrate","migrateCLI","createClientCollectionConfig","createClientCollectionConfigs","createDataloaderCacheKey","getDataLoader","countOperation","createOperation","deleteOperation","deleteByIDOperation","docAccessOperation","duplicateOperation","findOperation","findByIDOperation","findVersionByIDOperation","findVersionsOperation","restoreVersionOperation","updateOperation","updateByIDOperation","buildConfig","createClientConfig","createUnauthenticatedClientConfig","serverOnlyAdminConfigProperties","serverOnlyConfigProperties","defaults","sanitizeConfig","combineQueries","createDatabaseAdapter","defaultBeginTransaction","flattenWhereToOperators","getLocalizedPaths","createMigration","getMigrations","getPredefinedMigration","migrateDown","migrateRefresh","migrateReset","migrateStatus","migrationsCollection","migrationTemplate","readMigrationFiles","writeMigrationIndex","validateQueryPaths","validateSearchParam","APIError","APIErrorName","AuthenticationError","DuplicateCollection","DuplicateFieldName","DuplicateGlobal","ErrorDeletingFile","FileRetrievalError","FileUploadError","Forbidden","InvalidConfiguration","InvalidFieldName","InvalidFieldRelationship","Locked","LockedAuth","MissingCollectionLabel","MissingEditorProp","MissingFieldInputOptions","MissingFieldType","MissingFile","NotFound","QueryError","UnverifiedEmail","ValidationError","ValidationErrorName","baseBlockFields","baseIDField","createClientField","createClientFields","sanitizeFields","getDefaultValue","afterChangeTraverseFields","afterReadPromise","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","sortableFieldTypes","validateBlocksFilterOptions","validations","getFolderData","createClientGlobalConfig","createClientGlobalConfigs","docAccessOperationGlobal","findOneOperation","findVersionByIDOperationGlobal","findVersionsOperationGlobal","restoreVersionOperationGlobal","updateOperationGlobal","jobAfterRead","countRunnableOrActiveJobsForQueue","importHandlerPath","_internal_resetJobSystemGlobals","getCurrentDate","getLocalI18n","getFileByPath","_internal_safeFetchGlobal","addDataAndFileToRequest","addLocalesToRequestFromData","sanitizeLocales","canAccessAdmin","commitTransaction","configToJSONSchema","entityToJSONSchema","fieldsToJSONSchema","withNullableJSONSchemaType","createArrayFromCommaDelineated","createLocalReq","createPayloadRequest","deepCopyObject","deepCopyObjectComplex","deepCopyObjectSimple","deepMerge","deepMergeWithCombinedArrays","deepMergeWithReactComponents","deepMergeWithSourceArrays","checkDependencies","getDependencies","findUp","findUpSync","pathExistsAndIsAccessible","pathExistsAndIsAccessibleSync","flattenAllFields","flattenTopLevelFields","formatErrors","formatLabels","formatNames","toWords","getBlockSelect","getCollectionIDFieldTypes","getFieldByPath","getObjectDotNotation","getRequestLanguage","handleEndpoints","headersWithCors","initTransaction","isEntityHidden","isolateObjectProperty","isPlainObject","isValidID","killTransaction","logError","defaultLoggerOptions","mapAsync","mergeHeaders","parseDocumentID","sanitizeFallbackLocale","sanitizeJoinParams","sanitizePopulateParam","sanitizeSelectParam","stripUnselectedFields","buildVersionCollectionFields","buildVersionGlobalFields","buildVersionCompoundIndexes","versionDefaults","deleteCollectionVersions","appendVersionToQueryKey","getQueryDraftsSort","enforceMaxVersions","getLatestCollectionVersion","getLatestGlobalVersion","saveVersion","deepMergeSim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C;AAChE,SAASC,QAAQ,QAAQ,0BAAyB;AAClD,SAASC,oBAAoB,QAAQ,wBAAuB;AAC5D,SAASC,QAAQ,QAAQ,0BAAyB;AAClD,SAASC,YAAY,QAAQ,8BAA6B;AAC1D,SAASC,eAAe,QAAQ,iCAAgC;AAChE,SAASC,sBAAsB,QAAQ,wCAAuC;AAC9E,SAASC,kBAAkB,QAAQ,oCAAmC;AACtE,SAASC,qBAAqB,QAAQ,uCAAsC;AAC5E,SAASC,mBAAmB,QAAQ,qCAAoC;AACxE,SAASC,qBAAqB,QAAQ,uCAAsC;AAC5E,SAAStX,cAAc,QAAQ,gCAA+B;AAE9D,SAASuX,4BAA4B,QAAQ,sCAAqC;AAClF,SAASC,wBAAwB,QAAQ,kCAAiC;AAC1E,SAASC,2BAA2B,QAAQ,4CAA2C;AACvF,SAASC,eAAe,QAAQ,yBAAwB;AACxD,SAASC,wBAAwB,QAAQ,yCAAwC;AACjF,SAASC,uBAAuB,QAAQ,+CAA8C;AACtF,SAASC,kBAAkB,QAAQ,0CAAyC;AAE5E,SAASC,kBAAkB,QAAQ,mCAAkC;AACrE,SAASC,0BAA0B,QAAQ,2CAA0C;AACrF,SAASC,sBAAsB,QAAQ,uCAAsC;AAC7E,SAASC,WAAW,QAAQ,4BAA2B;AAGvD,SAASC,eAAe,QAAQ,qCAAoC"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport type { ExecutionResult, GraphQLSchema, ValidationRule } from 'graphql'\nimport type { Request as graphQLRequest, OperationArgs } from 'graphql-http'\nimport type { Logger } from 'pino'\nimport type { NonNever } from 'ts-essentials'\n\nimport { spawn } from 'child_process'\nimport crypto from 'crypto'\nimport { fileURLToPath } from 'node:url'\nimport path from 'path'\nimport WebSocket from 'ws'\n\nimport type { AuthArgs } from './auth/operations/auth.js'\nimport type { Result as ForgotPasswordResult } from './auth/operations/forgotPassword.js'\nimport type { Result as LoginResult } from './auth/operations/login.js'\nimport type { Result as ResetPasswordResult } from './auth/operations/resetPassword.js'\nimport type { AuthStrategy, UntypedUser } from './auth/types.js'\nimport type {\n BulkOperationResult,\n Collection,\n DataFromCollectionSlug,\n SelectFromCollectionSlug,\n TypeWithID,\n} from './collections/config/types.js'\n\nimport {\n forgotPasswordLocal,\n type Options as ForgotPasswordOptions,\n} from './auth/operations/local/forgotPassword.js'\nimport { loginLocal, type Options as LoginOptions } from './auth/operations/local/login.js'\nimport {\n resetPasswordLocal,\n type Options as ResetPasswordOptions,\n} from './auth/operations/local/resetPassword.js'\nimport { unlockLocal, type Options as UnlockOptions } from './auth/operations/local/unlock.js'\nimport {\n verifyEmailLocal,\n type Options as VerifyEmailOptions,\n} from './auth/operations/local/verifyEmail.js'\nexport type { FieldState } from './admin/forms/Form.js'\nimport type { InitOptions, SanitizedConfig } from './config/types.js'\nimport type { BaseDatabaseAdapter, PaginatedDistinctDocs, PaginatedDocs } from './database/types.js'\nimport type { InitializedEmailAdapter } from './email/types.js'\nimport type { DataFromGlobalSlug, Globals, SelectFromGlobalSlug } from './globals/config/types.js'\nimport type {\n ApplyDisableErrors,\n JsonObject,\n SelectType,\n TransformCollectionWithSelect,\n TransformGlobalWithSelect,\n} from './types/index.js'\nimport type { TraverseFieldsCallback } from './utilities/traverseFields.js'\n\nimport { countLocal, type Options as CountOptions } from './collections/operations/local/count.js'\nimport {\n createLocal,\n type Options as CreateOptions,\n} from './collections/operations/local/create.js'\nimport {\n type ByIDOptions as DeleteByIDOptions,\n deleteLocal,\n type ManyOptions as DeleteManyOptions,\n type Options as DeleteOptions,\n} from './collections/operations/local/delete.js'\nimport {\n duplicateLocal,\n type Options as DuplicateOptions,\n} from './collections/operations/local/duplicate.js'\nimport { findLocal, type Options as FindOptions } from './collections/operations/local/find.js'\nimport {\n findByIDLocal,\n type Options as FindByIDOptions,\n} from './collections/operations/local/findByID.js'\nimport {\n findDistinct as findDistinctLocal,\n type Options as FindDistinctOptions,\n} from './collections/operations/local/findDistinct.js'\nimport {\n findVersionByIDLocal,\n type Options as FindVersionByIDOptions,\n} from './collections/operations/local/findVersionByID.js'\nimport {\n findVersionsLocal,\n type Options as FindVersionsOptions,\n} from './collections/operations/local/findVersions.js'\nimport {\n restoreVersionLocal,\n type Options as RestoreVersionOptions,\n} from './collections/operations/local/restoreVersion.js'\nimport {\n type ByIDOptions as UpdateByIDOptions,\n updateLocal,\n type ManyOptions as UpdateManyOptions,\n type Options as UpdateOptions,\n} from './collections/operations/local/update.js'\nimport {\n countGlobalVersionsLocal,\n type CountGlobalVersionsOptions,\n} from './globals/operations/local/countVersions.js'\nimport {\n type Options as FindGlobalOptions,\n findOneGlobalLocal,\n} from './globals/operations/local/findOne.js'\nimport {\n findGlobalVersionByIDLocal,\n type Options as FindGlobalVersionByIDOptions,\n} from './globals/operations/local/findVersionByID.js'\nimport {\n findGlobalVersionsLocal,\n type Options as FindGlobalVersionsOptions,\n} from './globals/operations/local/findVersions.js'\nimport {\n restoreGlobalVersionLocal,\n type Options as RestoreGlobalVersionOptions,\n} from './globals/operations/local/restoreVersion.js'\nimport {\n updateGlobalLocal,\n type Options as UpdateGlobalOptions,\n} from './globals/operations/local/update.js'\nexport type * from './admin/types.js'\nimport type { SupportedLanguages } from '@payloadcms/translations'\n\nimport { Cron } from 'croner'\n\nimport type { ClientConfig, CreateClientConfigArgs } from './config/client.js'\nimport type { BaseJob } from './queues/config/types/workflowTypes.js'\nimport type { TypeWithVersion } from './versions/types.js'\n\nimport { decrypt, encrypt } from './auth/crypto.js'\nimport { authLocal } from './auth/operations/local/auth.js'\nimport { APIKeyAuthentication } from './auth/strategies/apiKey.js'\nimport { JWTAuthentication } from './auth/strategies/jwt.js'\nimport { generateImportMap, type ImportMap } from './bin/generateImportMap/index.js'\nimport { checkPayloadDependencies } from './checkPayloadDependencies.js'\nimport { countVersionsLocal } from './collections/operations/local/countVersions.js'\nimport { consoleEmailAdapter } from './email/consoleEmailAdapter.js'\nimport { fieldAffectsData, type FlattenedBlock } from './fields/config/types.js'\nimport { getJobsLocalAPI } from './queues/localAPI.js'\nimport { _internal_jobSystemGlobals } from './queues/utilities/getCurrentDate.js'\nimport { isNextBuild } from './utilities/isNextBuild.js'\nimport { getLogger } from './utilities/logger.js'\nimport { serverInit as serverInitTelemetry } from './utilities/telemetry/events/serverInit.js'\nimport { traverseFields } from './utilities/traverseFields.js'\n\n/**\n * Export of all base fields that could potentially be\n * useful as users wish to extend built-in fields with custom logic\n */\nexport { accountLockFields as baseAccountLockFields } from './auth/baseFields/accountLock.js'\nexport { apiKeyFields as baseAPIKeyFields } from './auth/baseFields/apiKey.js'\nexport { baseAuthFields } from './auth/baseFields/auth.js'\nexport { emailFieldConfig as baseEmailField } from './auth/baseFields/email.js'\nexport { sessionsFieldConfig as baseSessionsField } from './auth/baseFields/sessions.js'\nexport { usernameFieldConfig as baseUsernameField } from './auth/baseFields/username.js'\n\nexport { verificationFields as baseVerificationFields } from './auth/baseFields/verification.js'\nexport { executeAccess } from './auth/executeAccess.js'\nexport { executeAuthStrategies } from './auth/executeAuthStrategies.js'\nexport { extractAccessFromPermission } from './auth/extractAccessFromPermission.js'\nexport { getAccessResults } from './auth/getAccessResults.js'\nexport { getFieldsToSign } from './auth/getFieldsToSign.js'\nexport { getLoginOptions } from './auth/getLoginOptions.js'\nexport interface GeneratedTypes {\n authUntyped: {\n [slug: string]: {\n forgotPassword: {\n email: string\n }\n login: {\n email: string\n password: string\n }\n registerFirstUser: {\n email: string\n password: string\n }\n unlock: {\n email: string\n }\n }\n }\n\n blocksUntyped: {\n [slug: string]: JsonObject\n }\n collectionsJoinsUntyped: {\n [slug: string]: {\n [schemaPath: string]: CollectionSlug\n }\n }\n collectionsSelectUntyped: {\n [slug: string]: SelectType\n }\n\n collectionsUntyped: {\n [slug: string]: JsonObject & TypeWithID\n }\n dbUntyped: {\n defaultIDType: number | string\n }\n globalsSelectUntyped: {\n [slug: string]: SelectType\n }\n\n globalsUntyped: {\n [slug: string]: JsonObject\n }\n jobsUntyped: {\n tasks: {\n [slug: string]: {\n input?: JsonObject\n output?: JsonObject\n }\n }\n workflows: {\n [slug: string]: {\n input: JsonObject\n }\n }\n }\n localeUntyped: null | string\n userUntyped: UntypedUser\n}\n\n// Helper type to resolve the correct type using conditional types\ntype ResolveCollectionType<T> = 'collections' extends keyof T\n ? T['collections']\n : // @ts-expect-error\n T['collectionsUntyped']\n\ntype ResolveBlockType<T> = 'blocks' extends keyof T\n ? T['blocks']\n : // @ts-expect-error\n T['blocksUntyped']\n\ntype ResolveCollectionSelectType<T> = 'collectionsSelect' extends keyof T\n ? T['collectionsSelect']\n : // @ts-expect-error\n T['collectionsSelectUntyped']\n\ntype ResolveCollectionJoinsType<T> = 'collectionsJoins' extends keyof T\n ? T['collectionsJoins']\n : // @ts-expect-error\n T['collectionsJoinsUntyped']\n\ntype ResolveGlobalType<T> = 'globals' extends keyof T\n ? T['globals']\n : // @ts-expect-error\n T['globalsUntyped']\n\ntype ResolveGlobalSelectType<T> = 'globalsSelect' extends keyof T\n ? T['globalsSelect']\n : // @ts-expect-error\n T['globalsSelectUntyped']\n\n// Applying helper types to GeneratedTypes\nexport type TypedCollection = ResolveCollectionType<GeneratedTypes>\n\nexport type TypedBlock = ResolveBlockType<GeneratedTypes>\n\nexport type TypedUploadCollection = NonNever<{\n [K in keyof TypedCollection]:\n | 'filename'\n | 'filesize'\n | 'mimeType'\n | 'url' extends keyof TypedCollection[K]\n ? TypedCollection[K]\n : never\n}>\n\nexport type TypedCollectionSelect = ResolveCollectionSelectType<GeneratedTypes>\n\nexport type TypedCollectionJoins = ResolveCollectionJoinsType<GeneratedTypes>\n\nexport type TypedGlobal = ResolveGlobalType<GeneratedTypes>\n\nexport type TypedGlobalSelect = ResolveGlobalSelectType<GeneratedTypes>\n\n// Extract string keys from the type\nexport type StringKeyOf<T> = Extract<keyof T, string>\n\n// Define the types for slugs using the appropriate collections and globals\nexport type CollectionSlug = StringKeyOf<TypedCollection>\n\nexport type BlockSlug = StringKeyOf<TypedBlock>\n\nexport type UploadCollectionSlug = StringKeyOf<TypedUploadCollection>\n\ntype ResolveDbType<T> = 'db' extends keyof T\n ? T['db']\n : // @ts-expect-error\n T['dbUntyped']\n\nexport type DefaultDocumentIDType = ResolveDbType<GeneratedTypes>['defaultIDType']\nexport type GlobalSlug = StringKeyOf<TypedGlobal>\n\n// now for locale and user\n\n// @ts-expect-error\ntype ResolveLocaleType<T> = 'locale' extends keyof T ? T['locale'] : T['localeUntyped']\n// @ts-expect-error\ntype ResolveUserType<T> = 'user' extends keyof T ? T['user'] : T['userUntyped']\n\nexport type TypedLocale = ResolveLocaleType<GeneratedTypes>\n\n/**\n * @todo rename to `User` in 4.0\n */\nexport type TypedUser = ResolveUserType<GeneratedTypes>\n\n// @ts-expect-error\ntype ResolveAuthOperationsType<T> = 'auth' extends keyof T ? T['auth'] : T['authUntyped']\nexport type TypedAuthOperations = ResolveAuthOperationsType<GeneratedTypes>\n\n// @ts-expect-error\ntype ResolveJobOperationsType<T> = 'jobs' extends keyof T ? T['jobs'] : T['jobsUntyped']\nexport type TypedJobs = ResolveJobOperationsType<GeneratedTypes>\n\ntype HasPayloadJobsType = 'collections' extends keyof GeneratedTypes\n ? 'payload-jobs' extends keyof TypedCollection\n ? true\n : false\n : false\n\n/**\n * Represents a job in the `payload-jobs` collection, referencing a queued workflow or task (= Job).\n * If a generated type for the `payload-jobs` collection is not available, falls back to the BaseJob type.\n *\n * `input` and `taksStatus` are always present here, as the job afterRead hook will always populate them.\n */\nexport type Job<\n TWorkflowSlugOrInput extends false | keyof TypedJobs['workflows'] | object = false,\n> = HasPayloadJobsType extends true\n ? {\n input: BaseJob<TWorkflowSlugOrInput>['input']\n taskStatus: BaseJob<TWorkflowSlugOrInput>['taskStatus']\n } & Omit<TypedCollection['payload-jobs'], 'input' | 'taskStatus'>\n : BaseJob<TWorkflowSlugOrInput>\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\nlet checkedDependencies = false\n\n/**\n * @description Payload\n */\nexport class BasePayload {\n /**\n * @description Authorization and Authentication using headers and cookies to run auth user strategies\n * @returns permissions: Permissions\n * @returns user: User\n */\n auth = async (options: AuthArgs) => {\n return authLocal(this, options)\n }\n\n authStrategies!: AuthStrategy[]\n\n blocks: Record<BlockSlug, FlattenedBlock> = {}\n\n collections: Record<CollectionSlug, Collection> = {}\n\n config!: SanitizedConfig\n /**\n * @description Performs count operation\n * @param options\n * @returns count of documents satisfying query\n */\n count = async <T extends CollectionSlug>(\n options: CountOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n return countLocal(this, options)\n }\n\n /**\n * @description Performs countGlobalVersions operation\n * @param options\n * @returns count of global document versions satisfying query\n */\n countGlobalVersions = async <T extends GlobalSlug>(\n options: CountGlobalVersionsOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n return countGlobalVersionsLocal(this, options)\n }\n\n /**\n * @description Performs countVersions operation\n * @param options\n * @returns count of document versions satisfying query\n */\n countVersions = async <T extends CollectionSlug>(\n options: CountOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n return countVersionsLocal(this, options)\n }\n\n /**\n * @description Performs create operation\n * @param options\n * @returns created document\n */\n create = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: CreateOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n return createLocal<TSlug, TSelect>(this, options)\n }\n\n crons: Cron[] = []\n db!: DatabaseAdapter\n\n decrypt = decrypt\n\n destroy = async () => {\n if (this.crons.length) {\n // Remove all crons from the list before stopping them\n const cronsToStop = this.crons.splice(0, this.crons.length)\n await Promise.all(cronsToStop.map((cron) => cron.stop()))\n }\n\n if (this.db?.destroy && typeof this.db.destroy === 'function') {\n await this.db.destroy()\n }\n }\n\n duplicate = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DuplicateOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n return duplicateLocal<TSlug, TSelect>(this, options)\n }\n\n email!: InitializedEmailAdapter\n\n // TODO: re-implement or remove?\n // errorHandler: ErrorHandler\n\n encrypt = encrypt\n\n extensions!: (args: {\n args: OperationArgs<any>\n req: graphQLRequest<unknown, unknown>\n result: ExecutionResult\n }) => Promise<any>\n\n /**\n * @description Find documents with criteria\n * @param options\n * @returns documents satisfying query\n */\n find = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: FindOptions<TSlug, TSelect>,\n ): Promise<PaginatedDocs<TransformCollectionWithSelect<TSlug, TSelect>>> => {\n return findLocal<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Find document by ID\n * @param options\n * @returns document with specified ID\n */\n findByID = async <\n TSlug extends CollectionSlug,\n TDisableErrors extends boolean,\n TSelect extends SelectFromCollectionSlug<TSlug>,\n >(\n options: FindByIDOptions<TSlug, TDisableErrors, TSelect>,\n ): Promise<ApplyDisableErrors<TransformCollectionWithSelect<TSlug, TSelect>, TDisableErrors>> => {\n return findByIDLocal<TSlug, TDisableErrors, TSelect>(this, options)\n }\n\n /**\n * @description Find distinct field values\n * @param options\n * @returns result with distinct field values\n */\n findDistinct = async <\n TSlug extends CollectionSlug,\n TField extends keyof DataFromCollectionSlug<TSlug> & string,\n >(\n options: FindDistinctOptions<TSlug, TField>,\n ): Promise<PaginatedDistinctDocs<Record<TField, DataFromCollectionSlug<TSlug>[TField]>>> => {\n return findDistinctLocal(this, options)\n }\n\n findGlobal = async <TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(\n options: FindGlobalOptions<TSlug, TSelect>,\n ): Promise<TransformGlobalWithSelect<TSlug, TSelect>> => {\n return findOneGlobalLocal<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Find global version by ID\n * @param options\n * @returns global version with specified ID\n */\n findGlobalVersionByID = async <TSlug extends GlobalSlug>(\n options: FindGlobalVersionByIDOptions<TSlug>,\n ): Promise<TypeWithVersion<DataFromGlobalSlug<TSlug>>> => {\n return findGlobalVersionByIDLocal<TSlug>(this, options)\n }\n\n /**\n * @description Find global versions with criteria\n * @param options\n * @returns versions satisfying query\n */\n findGlobalVersions = async <TSlug extends GlobalSlug>(\n options: FindGlobalVersionsOptions<TSlug>,\n ): Promise<PaginatedDocs<TypeWithVersion<DataFromGlobalSlug<TSlug>>>> => {\n return findGlobalVersionsLocal<TSlug>(this, options)\n }\n\n /**\n * @description Find version by ID\n * @param options\n * @returns version with specified ID\n */\n findVersionByID = async <TSlug extends CollectionSlug>(\n options: FindVersionByIDOptions<TSlug>,\n ): Promise<TypeWithVersion<DataFromCollectionSlug<TSlug>>> => {\n return findVersionByIDLocal<TSlug>(this, options)\n }\n\n /**\n * @description Find versions with criteria\n * @param options\n * @returns versions satisfying query\n */\n findVersions = async <TSlug extends CollectionSlug>(\n options: FindVersionsOptions<TSlug>,\n ): Promise<PaginatedDocs<TypeWithVersion<DataFromCollectionSlug<TSlug>>>> => {\n return findVersionsLocal<TSlug>(this, options)\n }\n\n forgotPassword = async <TSlug extends CollectionSlug>(\n options: ForgotPasswordOptions<TSlug>,\n ): Promise<ForgotPasswordResult> => {\n return forgotPasswordLocal<TSlug>(this, options)\n }\n\n getAdminURL = (): string => `${this.config.serverURL}${this.config.routes.admin}`\n\n getAPIURL = (): string => `${this.config.serverURL}${this.config.routes.api}`\n\n globals!: Globals\n\n importMap!: ImportMap\n\n jobs = getJobsLocalAPI(this)\n\n logger!: Logger\n\n login = async <TSlug extends CollectionSlug>(\n options: LoginOptions<TSlug>,\n ): Promise<{ user: DataFromCollectionSlug<TSlug> } & LoginResult> => {\n return loginLocal<TSlug>(this, options)\n }\n\n resetPassword = async <TSlug extends CollectionSlug>(\n options: ResetPasswordOptions<TSlug>,\n ): Promise<ResetPasswordResult> => {\n return resetPasswordLocal<TSlug>(this, options)\n }\n\n /**\n * @description Restore global version by ID\n * @param options\n * @returns version with specified ID\n */\n restoreGlobalVersion = async <TSlug extends GlobalSlug>(\n options: RestoreGlobalVersionOptions<TSlug>,\n ): Promise<DataFromGlobalSlug<TSlug>> => {\n return restoreGlobalVersionLocal<TSlug>(this, options)\n }\n\n /**\n * @description Restore version by ID\n * @param options\n * @returns version with specified ID\n */\n restoreVersion = async <TSlug extends CollectionSlug>(\n options: RestoreVersionOptions<TSlug>,\n ): Promise<DataFromCollectionSlug<TSlug>> => {\n return restoreVersionLocal<TSlug>(this, options)\n }\n\n schema!: GraphQLSchema\n\n secret!: string\n\n sendEmail!: InitializedEmailAdapter['sendEmail']\n\n types!: {\n arrayTypes: any\n blockInputTypes: any\n blockTypes: any\n fallbackLocaleInputType?: any\n groupTypes: any\n localeInputType?: any\n tabTypes: any\n }\n\n unlock = async <TSlug extends CollectionSlug>(\n options: UnlockOptions<TSlug>,\n ): Promise<boolean> => {\n return unlockLocal<TSlug>(this, options)\n }\n\n updateGlobal = async <TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(\n options: UpdateGlobalOptions<TSlug, TSelect>,\n ): Promise<TransformGlobalWithSelect<TSlug, TSelect>> => {\n return updateGlobalLocal<TSlug, TSelect>(this, options)\n }\n\n validationRules!: (args: OperationArgs<any>) => ValidationRule[]\n\n verifyEmail = async <TSlug extends CollectionSlug>(\n options: VerifyEmailOptions<TSlug>,\n ): Promise<boolean> => {\n return verifyEmailLocal(this, options)\n }\n\n versions: {\n [slug: string]: any // TODO: Type this\n } = {}\n\n async _initializeCrons() {\n if (this.config.jobs.enabled && this.config.jobs.autoRun && !isNextBuild()) {\n const DEFAULT_CRON = '* * * * *'\n const DEFAULT_LIMIT = 10\n\n const cronJobs =\n typeof this.config.jobs.autoRun === 'function'\n ? await this.config.jobs.autoRun(this)\n : this.config.jobs.autoRun\n\n await Promise.all(\n cronJobs.map((cronConfig) => {\n const jobAutorunCron = new Cron(\n cronConfig.cron ?? DEFAULT_CRON,\n async () => {\n if (\n _internal_jobSystemGlobals.shouldAutoSchedule &&\n !cronConfig.disableScheduling &&\n this.config.jobs.scheduling\n ) {\n await this.jobs.handleSchedules({\n allQueues: cronConfig.allQueues,\n queue: cronConfig.queue,\n })\n }\n\n if (!_internal_jobSystemGlobals.shouldAutoRun) {\n return\n }\n\n if (typeof this.config.jobs.shouldAutoRun === 'function') {\n const shouldAutoRun = await this.config.jobs.shouldAutoRun(this)\n\n if (!shouldAutoRun) {\n jobAutorunCron.stop()\n return\n }\n }\n\n await this.jobs.run({\n allQueues: cronConfig.allQueues,\n limit: cronConfig.limit ?? DEFAULT_LIMIT,\n queue: cronConfig.queue,\n silent: cronConfig.silent,\n })\n },\n {\n // Do not run consecutive crons if previous crons still ongoing\n protect: true,\n },\n )\n\n this.crons.push(jobAutorunCron)\n }),\n )\n }\n }\n\n async bin({\n args,\n cwd,\n log,\n }: {\n args: string[]\n cwd?: string\n log?: boolean\n }): Promise<{ code: number }> {\n return new Promise((resolve, reject) => {\n const spawned = spawn('node', [path.resolve(dirname, '../bin.js'), ...args], {\n cwd,\n stdio: log || log === undefined ? 'inherit' : 'ignore',\n })\n\n spawned.on('exit', (code) => {\n resolve({ code: code! })\n })\n\n spawned.on('error', (error) => {\n reject(error)\n })\n })\n }\n\n /**\n * @description delete one or more documents\n * @param options\n * @returns Updated document(s)\n */\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteByIDOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>>\n\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteManyOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect>>\n\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect> | TransformCollectionWithSelect<TSlug, TSelect>> {\n return deleteLocal<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Initializes Payload\n * @param options\n */\n async init(options: InitOptions): Promise<Payload> {\n if (\n process.env.NODE_ENV !== 'production' &&\n process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' &&\n !checkedDependencies\n ) {\n checkedDependencies = true\n void checkPayloadDependencies()\n }\n\n this.importMap = options.importMap!\n\n if (!options?.config) {\n throw new Error('Error: the payload config is required to initialize payload.')\n }\n\n this.config = await options.config\n this.logger = getLogger('payload', this.config.logger)\n\n if (!this.config.secret) {\n throw new Error('Error: missing secret key. A secret key is needed to secure Payload.')\n }\n\n this.secret = crypto.createHash('sha256').update(this.config.secret).digest('hex').slice(0, 32)\n\n this.globals = {\n config: this.config.globals,\n }\n\n for (const collection of this.config.collections) {\n let customIDType: string | undefined = undefined\n const findCustomID: TraverseFieldsCallback = ({ field }) => {\n if (\n ['array', 'blocks', 'group'].includes(field.type) ||\n (field.type === 'tab' && 'name' in field)\n ) {\n return true\n }\n\n if (!fieldAffectsData(field)) {\n return\n }\n\n if (field.name === 'id') {\n customIDType = field.type\n return true\n }\n }\n\n traverseFields({\n callback: findCustomID,\n config: this.config,\n fields: collection.fields,\n parentIsLocalized: false,\n })\n\n this.collections[collection.slug] = {\n config: collection,\n customIDType,\n }\n }\n\n this.blocks = this.config.blocks!.reduce(\n (blocks, block) => {\n blocks[block.slug] = block\n return blocks\n },\n {} as Record<string, FlattenedBlock>,\n )\n\n // Generate types on startup\n if (process.env.NODE_ENV !== 'production' && this.config.typescript.autoGenerate !== false) {\n // We cannot run it directly here, as generate-types imports json-schema-to-typescript, which breaks on turbopack.\n // see: https://github.com/vercel/next.js/issues/66723\n void this.bin({\n args: ['generate:types'],\n log: false,\n })\n }\n\n this.db = this.config.db.init({ payload: this })\n this.db.payload = this\n\n if (this.db?.init) {\n await this.db.init()\n }\n\n if (!options.disableDBConnect && this.db.connect) {\n await this.db.connect()\n }\n\n // Load email adapter\n if (this.config.email instanceof Promise) {\n const awaitedAdapter = await this.config.email\n this.email = awaitedAdapter({ payload: this })\n } else if (this.config.email) {\n this.email = this.config.email({ payload: this })\n } else {\n if (process.env.NEXT_PHASE !== 'phase-production-build') {\n this.logger.warn(\n `No email adapter provided. Email will be written to console. More info at https://payloadcms.com/docs/email/overview.`,\n )\n }\n\n this.email = consoleEmailAdapter({ payload: this })\n }\n\n // Warn if image resizing is enabled but sharp is not installed\n if (\n !this.config.sharp &&\n this.config.collections.some((c) => c.upload.imageSizes || c.upload.formatOptions)\n ) {\n this.logger.warn(\n `Image resizing is enabled for one or more collections, but sharp not installed. Please install 'sharp' and pass into the config.`,\n )\n }\n\n // Warn if user is deploying to Vercel, and any upload collection is missing a storage adapter\n if (process.env.VERCEL) {\n const uploadCollWithoutAdapter = this.config.collections.filter(\n (c) => c.upload && c.upload.adapter === undefined, // Uploads enabled, but no storage adapter provided\n )\n\n if (uploadCollWithoutAdapter.length) {\n const slugs = uploadCollWithoutAdapter.map((c) => c.slug).join(', ')\n this.logger.warn(\n `Collections with uploads enabled require a storage adapter when deploying to Vercel. Collection(s) without storage adapters: ${slugs}. See https://payloadcms.com/docs/upload/storage-adapters for more info.`,\n )\n }\n }\n\n this.sendEmail = this.email['sendEmail']\n\n serverInitTelemetry(this)\n\n // 1. loop over collections, if collection has auth strategy, initialize and push to array\n let jwtStrategyEnabled = false\n this.authStrategies = this.config.collections.reduce((authStrategies, collection) => {\n if (collection?.auth) {\n if (collection.auth.strategies.length > 0) {\n authStrategies.push(...collection.auth.strategies)\n }\n\n // 2. if api key enabled, push api key strategy into the array\n if (collection.auth?.useAPIKey) {\n authStrategies.push({\n name: `${collection.slug}-api-key`,\n authenticate: APIKeyAuthentication(collection),\n })\n }\n\n // 3. if localStrategy flag is true\n if (!collection.auth.disableLocalStrategy && !jwtStrategyEnabled) {\n jwtStrategyEnabled = true\n }\n }\n\n return authStrategies\n }, [] as AuthStrategy[])\n\n // 4. if enabled, push jwt strategy into authStrategies last\n if (jwtStrategyEnabled) {\n this.authStrategies.push({\n name: 'local-jwt',\n authenticate: JWTAuthentication,\n })\n }\n\n try {\n if (!options.disableOnInit) {\n if (typeof options.onInit === 'function') {\n await options.onInit(this)\n }\n if (typeof this.config.onInit === 'function') {\n await this.config.onInit(this)\n }\n }\n } catch (error) {\n this.logger.error({ err: error }, 'Error running onInit function')\n throw error\n }\n\n if (options.cron) {\n await this._initializeCrons()\n }\n\n return this\n }\n\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateManyOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect>>\n\n /**\n * @description Update one or more documents\n * @param options\n * @returns Updated document(s)\n */\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateByIDOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>>\n\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect> | TransformCollectionWithSelect<TSlug, TSelect>> {\n return updateLocal<TSlug, TSelect>(this, options)\n }\n}\n\nconst initialized = new BasePayload()\n\n// eslint-disable-next-line no-restricted-exports\nexport default initialized\n\nexport const reload = async (\n config: SanitizedConfig,\n payload: Payload,\n skipImportMapGeneration?: boolean,\n options?: InitOptions,\n): Promise<void> => {\n if (typeof payload.db.destroy === 'function') {\n // Only destroy db, as we then later only call payload.db.init and not payload.init\n await payload.db.destroy()\n }\n payload.config = config\n\n payload.collections = config.collections.reduce(\n (collections, collection) => {\n collections[collection.slug] = {\n config: collection,\n customIDType: payload.collections[collection.slug]?.customIDType,\n }\n return collections\n },\n {} as Record<string, any>,\n )\n\n payload.blocks = config.blocks!.reduce(\n (blocks, block) => {\n blocks[block.slug] = block\n return blocks\n },\n {} as Record<string, FlattenedBlock>,\n )\n\n payload.globals = {\n config: config.globals,\n }\n\n // TODO: support HMR for other props in the future (see payload/src/index init()) that may change on Payload singleton\n\n // Generate types\n if (config.typescript.autoGenerate !== false) {\n // We cannot run it directly here, as generate-types imports json-schema-to-typescript, which breaks on turbopack.\n // see: https://github.com/vercel/next.js/issues/66723\n void payload.bin({\n args: ['generate:types'],\n log: false,\n })\n }\n\n // Generate component map\n if (skipImportMapGeneration !== true && config.admin?.importMap?.autoGenerate !== false) {\n await generateImportMap(config, {\n log: true,\n })\n }\n\n if (payload.db?.init) {\n await payload.db.init()\n }\n\n if (!options?.disableDBConnect && payload.db.connect) {\n await payload.db.connect({ hotReload: true })\n }\n\n ;(global as any)._payload_clientConfigs = {} as Record<keyof SupportedLanguages, ClientConfig>\n ;(global as any)._payload_schemaMap = null\n ;(global as any)._payload_clientSchemaMap = null\n ;(global as any)._payload_doNotCacheClientConfig = true // This will help refreshing the client config cache more reliably. If you remove this, please test HMR + client config refreshing (do new fields appear in the document?)\n ;(global as any)._payload_doNotCacheSchemaMap = true\n ;(global as any)._payload_doNotCacheClientSchemaMap = true\n}\n\nlet _cached: Map<\n string,\n {\n initializedCrons: boolean\n payload: null | Payload\n promise: null | Promise<Payload>\n reload: boolean | Promise<void>\n ws: null | WebSocket\n }\n> = (global as any)._payload\n\nif (!_cached) {\n _cached = (global as any)._payload = new Map()\n}\n\n/**\n * Get a payload instance.\n * This function is a wrapper around new BasePayload().init() that adds the following functionality on top of that:\n *\n * - smartly caches Payload instance on the module scope. That way, we prevent unnecessarily initializing Payload over and over again\n * when calling getPayload multiple times or from multiple locations.\n * - adds HMR support and reloads the payload instance when the config changes.\n */\nexport const getPayload = async (\n options: {\n /**\n * A unique key to identify the payload instance. You can pass your own key if you want to cache this payload instance separately.\n * This is useful if you pass a different payload config for each instance.\n *\n * @default 'default'\n */\n key?: string\n } & InitOptions,\n): Promise<Payload> => {\n if (!options?.config) {\n throw new Error('Error: the payload config is required for getPayload to work.')\n }\n\n let alreadyCachedSameConfig = false\n\n let cached = _cached.get(options.key ?? 'default')\n if (!cached) {\n cached = {\n initializedCrons: Boolean(options.cron),\n payload: null,\n promise: null,\n reload: false,\n ws: null,\n }\n _cached.set(options.key ?? 'default', cached)\n } else {\n alreadyCachedSameConfig = true\n }\n\n if (alreadyCachedSameConfig) {\n // alreadyCachedSameConfig => already called onInit once, but same config => no need to call onInit again.\n // calling onInit again would only make sense if a different config was passed.\n options.disableOnInit = true\n }\n\n if (cached.payload) {\n if (options.cron && !cached.initializedCrons) {\n // getPayload called with crons enabled, but existing cached version does not have crons initialized. => Initialize crons in existing cached version\n cached.initializedCrons = true\n await cached.payload._initializeCrons()\n }\n\n if (cached.reload === true) {\n let resolve!: () => void\n\n // getPayload is called multiple times, in parallel. However, we only want to run `await reload` once. By immediately setting cached.reload to a promise,\n // we can ensure that all subsequent calls will wait for the first reload to finish. So if we set it here, the 2nd call of getPayload\n // will reach `if (cached.reload instanceof Promise) {` which then waits for the first reload to finish.\n cached.reload = new Promise((res) => (resolve = res))\n const config = await options.config\n await reload(config, cached.payload, !options.importMap, options)\n\n resolve()\n }\n\n if (cached.reload instanceof Promise) {\n await cached.reload\n }\n if (options?.importMap) {\n cached.payload.importMap = options.importMap\n }\n return cached.payload\n }\n\n if (!cached.promise) {\n // no need to await options.config here, as it's already awaited in the BasePayload.init\n cached.promise = new BasePayload().init(options)\n }\n\n try {\n cached.payload = await cached.promise\n\n if (\n !cached.ws &&\n process.env.NODE_ENV !== 'production' &&\n process.env.NODE_ENV !== 'test' &&\n process.env.DISABLE_PAYLOAD_HMR !== 'true'\n ) {\n try {\n const port = process.env.PORT || '3000'\n const hasHTTPS =\n process.env.USE_HTTPS === 'true' || process.argv.includes('--experimental-https')\n const protocol = hasHTTPS ? 'wss' : 'ws'\n\n const path = '/_next/webpack-hmr'\n // The __NEXT_ASSET_PREFIX env variable is set for both assetPrefix and basePath (tested in Next.js 15.1.6)\n const prefix = process.env.__NEXT_ASSET_PREFIX ?? ''\n\n cached.ws = new WebSocket(\n process.env.PAYLOAD_HMR_URL_OVERRIDE ?? `${protocol}://localhost:${port}${prefix}${path}`,\n )\n\n cached.ws.onmessage = (event) => {\n if (typeof event.data === 'string') {\n const data = JSON.parse(event.data)\n\n if ('action' in data && data.action === 'serverComponentChanges') {\n cached.reload = true\n }\n }\n }\n\n cached.ws.onerror = (_) => {\n // swallow any websocket connection error\n }\n } catch (_) {\n // swallow e\n }\n }\n } catch (e) {\n cached.promise = null\n // add identifier to error object, so that our error logger in routeError.ts does not attempt to re-initialize getPayload\n ;(e as { payloadInitError?: boolean }).payloadInitError = true\n throw e\n }\n\n if (options?.importMap) {\n cached.payload.importMap = options.importMap\n }\n\n return cached.payload\n}\n\ntype Payload = BasePayload\n\ninterface RequestContext {\n [key: string]: unknown\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DatabaseAdapter extends BaseDatabaseAdapter {}\nexport type { Payload, RequestContext }\nexport * from './auth/index.js'\nexport { jwtSign } from './auth/jwt.js'\nexport { accessOperation } from './auth/operations/access.js'\nexport { forgotPasswordOperation } from './auth/operations/forgotPassword.js'\nexport { initOperation } from './auth/operations/init.js'\nexport { checkLoginPermission } from './auth/operations/login.js'\nexport { loginOperation } from './auth/operations/login.js'\nexport { logoutOperation } from './auth/operations/logout.js'\nexport type { MeOperationResult } from './auth/operations/me.js'\nexport { meOperation } from './auth/operations/me.js'\nexport { refreshOperation } from './auth/operations/refresh.js'\nexport { registerFirstUserOperation } from './auth/operations/registerFirstUser.js'\nexport { resetPasswordOperation } from './auth/operations/resetPassword.js'\nexport { unlockOperation } from './auth/operations/unlock.js'\nexport { verifyEmailOperation } from './auth/operations/verifyEmail.js'\nexport { JWTAuthentication } from './auth/strategies/jwt.js'\nexport { incrementLoginAttempts } from './auth/strategies/local/incrementLoginAttempts.js'\nexport { resetLoginAttempts } from './auth/strategies/local/resetLoginAttempts.js'\nexport type {\n AuthStrategyFunction,\n AuthStrategyFunctionArgs,\n AuthStrategyResult,\n CollectionPermission,\n DocumentPermissions,\n FieldPermissions,\n GlobalPermission,\n IncomingAuthType,\n Permission,\n Permissions,\n SanitizedCollectionPermission,\n SanitizedDocumentPermissions,\n SanitizedFieldPermissions,\n SanitizedGlobalPermission,\n SanitizedPermissions,\n UntypedUser as User,\n VerifyConfig,\n} from './auth/types.js'\nexport { generateImportMap } from './bin/generateImportMap/index.js'\n\nexport type { ImportMap } from './bin/generateImportMap/index.js'\nexport { genImportMapIterateFields } from './bin/generateImportMap/iterateFields.js'\nexport { migrate as migrateCLI } from './bin/migrate.js'\n\nexport {\n type ClientCollectionConfig,\n createClientCollectionConfig,\n createClientCollectionConfigs,\n type ServerOnlyCollectionAdminProperties,\n type ServerOnlyCollectionProperties,\n type ServerOnlyUploadProperties,\n} from './collections/config/client.js'\n\nexport type {\n AfterChangeHook as CollectionAfterChangeHook,\n AfterDeleteHook as CollectionAfterDeleteHook,\n AfterErrorHook as CollectionAfterErrorHook,\n AfterForgotPasswordHook as CollectionAfterForgotPasswordHook,\n AfterLoginHook as CollectionAfterLoginHook,\n AfterLogoutHook as CollectionAfterLogoutHook,\n AfterMeHook as CollectionAfterMeHook,\n AfterOperationHook as CollectionAfterOperationHook,\n AfterReadHook as CollectionAfterReadHook,\n AfterRefreshHook as CollectionAfterRefreshHook,\n AuthCollection,\n AuthOperationsFromCollectionSlug,\n BaseFilter,\n BaseListFilter,\n BeforeChangeHook as CollectionBeforeChangeHook,\n BeforeDeleteHook as CollectionBeforeDeleteHook,\n BeforeLoginHook as CollectionBeforeLoginHook,\n BeforeOperationHook as CollectionBeforeOperationHook,\n BeforeReadHook as CollectionBeforeReadHook,\n BeforeValidateHook as CollectionBeforeValidateHook,\n BulkOperationResult,\n Collection,\n CollectionAdminOptions,\n CollectionConfig,\n DataFromCollectionSlug,\n HookOperationType,\n MeHook as CollectionMeHook,\n RefreshHook as CollectionRefreshHook,\n RequiredDataFromCollection,\n RequiredDataFromCollectionSlug,\n SanitizedCollectionConfig,\n SanitizedJoins,\n TypeWithID,\n TypeWithTimestamps,\n} from './collections/config/types.js'\n\nexport type { CompoundIndex } from './collections/config/types.js'\nexport type { SanitizedCompoundIndex } from './collections/config/types.js'\n\nexport { createDataloaderCacheKey, getDataLoader } from './collections/dataloader.js'\nexport { countOperation } from './collections/operations/count.js'\nexport { createOperation } from './collections/operations/create.js'\nexport { deleteOperation } from './collections/operations/delete.js'\nexport { deleteByIDOperation } from './collections/operations/deleteByID.js'\nexport { docAccessOperation } from './collections/operations/docAccess.js'\nexport { duplicateOperation } from './collections/operations/duplicate.js'\nexport { findOperation } from './collections/operations/find.js'\nexport { findByIDOperation } from './collections/operations/findByID.js'\nexport { findVersionByIDOperation } from './collections/operations/findVersionByID.js'\nexport { findVersionsOperation } from './collections/operations/findVersions.js'\nexport { restoreVersionOperation } from './collections/operations/restoreVersion.js'\nexport { updateOperation } from './collections/operations/update.js'\nexport { updateByIDOperation } from './collections/operations/updateByID.js'\nexport { buildConfig } from './config/build.js'\nexport {\n type ClientConfig,\n createClientConfig,\n type CreateClientConfigArgs,\n createUnauthenticatedClientConfig,\n serverOnlyAdminConfigProperties,\n serverOnlyConfigProperties,\n type UnauthenticatedClientConfig,\n} from './config/client.js'\nexport { defaults } from './config/defaults.js'\n\nexport { type OrderableEndpointBody } from './config/orderable/index.js'\nexport { sanitizeConfig } from './config/sanitize.js'\nexport type * from './config/types.js'\nexport { combineQueries } from './database/combineQueries.js'\nexport { createDatabaseAdapter } from './database/createDatabaseAdapter.js'\nexport { defaultBeginTransaction } from './database/defaultBeginTransaction.js'\nexport { flattenWhereToOperators } from './database/flattenWhereToOperators.js'\nexport { getLocalizedPaths } from './database/getLocalizedPaths.js'\nexport { createMigration } from './database/migrations/createMigration.js'\nexport { getMigrations } from './database/migrations/getMigrations.js'\nexport { getPredefinedMigration } from './database/migrations/getPredefinedMigration.js'\nexport { migrate } from './database/migrations/migrate.js'\nexport { migrateDown } from './database/migrations/migrateDown.js'\nexport { migrateRefresh } from './database/migrations/migrateRefresh.js'\nexport { migrateReset } from './database/migrations/migrateReset.js'\nexport { migrateStatus } from './database/migrations/migrateStatus.js'\nexport { migrationsCollection } from './database/migrations/migrationsCollection.js'\nexport { migrationTemplate } from './database/migrations/migrationTemplate.js'\nexport { readMigrationFiles } from './database/migrations/readMigrationFiles.js'\nexport { writeMigrationIndex } from './database/migrations/writeMigrationIndex.js'\nexport type * from './database/queryValidation/types.js'\nexport type { EntityPolicies, PathToQuery } from './database/queryValidation/types.js'\nexport { validateQueryPaths } from './database/queryValidation/validateQueryPaths.js'\nexport { validateSearchParam } from './database/queryValidation/validateSearchParams.js'\nexport type {\n BaseDatabaseAdapter,\n BeginTransaction,\n CommitTransaction,\n Connect,\n Count,\n CountArgs,\n CountGlobalVersionArgs,\n CountGlobalVersions,\n CountVersions,\n Create,\n CreateArgs,\n CreateGlobal,\n CreateGlobalArgs,\n CreateGlobalVersion,\n CreateGlobalVersionArgs,\n CreateMigration,\n CreateVersion,\n CreateVersionArgs,\n DatabaseAdapterResult as DatabaseAdapterObj,\n DBIdentifierName,\n DeleteMany,\n DeleteManyArgs,\n DeleteOne,\n DeleteOneArgs,\n DeleteVersions,\n DeleteVersionsArgs,\n Destroy,\n Find,\n FindArgs,\n FindDistinct,\n FindGlobal,\n FindGlobalArgs,\n FindGlobalVersions,\n FindGlobalVersionsArgs,\n FindOne,\n FindOneArgs,\n FindVersions,\n FindVersionsArgs,\n GenerateSchema,\n Init,\n Migration,\n MigrationData,\n MigrationTemplateArgs,\n PaginatedDistinctDocs,\n PaginatedDocs,\n QueryDrafts,\n QueryDraftsArgs,\n RollbackTransaction,\n Transaction,\n UpdateGlobal,\n UpdateGlobalArgs,\n UpdateGlobalVersion,\n UpdateGlobalVersionArgs,\n UpdateJobs,\n UpdateJobsArgs,\n UpdateMany,\n UpdateManyArgs,\n UpdateOne,\n UpdateOneArgs,\n UpdateVersion,\n UpdateVersionArgs,\n Upsert,\n UpsertArgs,\n} from './database/types.js'\nexport type { EmailAdapter as PayloadEmailAdapter, SendEmailOptions } from './email/types.js'\nexport {\n APIError,\n APIErrorName,\n AuthenticationError,\n DuplicateCollection,\n DuplicateFieldName,\n DuplicateGlobal,\n ErrorDeletingFile,\n FileRetrievalError,\n FileUploadError,\n Forbidden,\n InvalidConfiguration,\n InvalidFieldName,\n InvalidFieldRelationship,\n Locked,\n LockedAuth,\n MissingCollectionLabel,\n MissingEditorProp,\n MissingFieldInputOptions,\n MissingFieldType,\n MissingFile,\n NotFound,\n QueryError,\n UnverifiedEmail,\n ValidationError,\n ValidationErrorName,\n} from './errors/index.js'\n\nexport type { ValidationFieldError } from './errors/index.js'\nexport { baseBlockFields } from './fields/baseFields/baseBlockFields.js'\n\nexport { baseIDField } from './fields/baseFields/baseIDField.js'\n\nexport {\n createClientField,\n createClientFields,\n type ServerOnlyFieldAdminProperties,\n type ServerOnlyFieldProperties,\n} from './fields/config/client.js'\n\nexport interface FieldCustom extends Record<string, any> {}\n\nexport { sanitizeFields } from './fields/config/sanitize.js'\n\nexport type {\n AdminClient,\n ArrayField,\n ArrayFieldClient,\n BaseValidateOptions,\n Block,\n BlockJSX,\n BlocksField,\n BlocksFieldClient,\n CheckboxField,\n CheckboxFieldClient,\n ClientBlock,\n ClientField,\n ClientFieldProps,\n CodeField,\n CodeFieldClient,\n CollapsibleField,\n CollapsibleFieldClient,\n Condition,\n DateField,\n DateFieldClient,\n EmailField,\n EmailFieldClient,\n Field,\n FieldAccess,\n FieldAffectingData,\n FieldAffectingDataClient,\n FieldBase,\n FieldBaseClient,\n FieldHook,\n FieldHookArgs,\n FieldPresentationalOnly,\n FieldPresentationalOnlyClient,\n FieldTypes,\n FieldWithMany,\n FieldWithManyClient,\n FieldWithMaxDepth,\n FieldWithMaxDepthClient,\n FieldWithPath,\n FieldWithPathClient,\n FieldWithSubFields,\n FieldWithSubFieldsClient,\n FilterOptions,\n FilterOptionsProps,\n FlattenedArrayField,\n FlattenedBlock,\n FlattenedBlocksField,\n FlattenedField,\n FlattenedGroupField,\n FlattenedJoinField,\n FlattenedTabAsField,\n GroupField,\n GroupFieldClient,\n HookName,\n JoinField,\n JoinFieldClient,\n JSONField,\n JSONFieldClient,\n Labels,\n LabelsClient,\n NamedGroupField,\n NamedGroupFieldClient,\n NamedTab,\n NonPresentationalField,\n NonPresentationalFieldClient,\n NumberField,\n NumberFieldClient,\n Option,\n OptionLabel,\n OptionObject,\n PointField,\n PointFieldClient,\n PolymorphicRelationshipField,\n PolymorphicRelationshipFieldClient,\n RadioField,\n RadioFieldClient,\n RelationshipField,\n RelationshipFieldClient,\n RelationshipValue,\n RichTextField,\n RichTextFieldClient,\n RowField,\n RowFieldClient,\n SelectField,\n SelectFieldClient,\n SingleRelationshipField,\n SingleRelationshipFieldClient,\n Tab,\n TabAsField,\n TabAsFieldClient,\n TabsField,\n TabsFieldClient,\n TextareaField,\n TextareaFieldClient,\n TextField,\n TextFieldClient,\n UIField,\n UIFieldClient,\n UnnamedGroupField,\n UnnamedGroupFieldClient,\n UnnamedTab,\n UploadField,\n UploadFieldClient,\n Validate,\n ValidateOptions,\n ValueWithRelation,\n} from './fields/config/types.js'\n\nexport { getDefaultValue } from './fields/getDefaultValue.js'\nexport { traverseFields as afterChangeTraverseFields } from './fields/hooks/afterChange/traverseFields.js'\n\nexport { promise as afterReadPromise } from './fields/hooks/afterRead/promise.js'\nexport { traverseFields as afterReadTraverseFields } from './fields/hooks/afterRead/traverseFields.js'\nexport { traverseFields as beforeChangeTraverseFields } from './fields/hooks/beforeChange/traverseFields.js'\nexport { traverseFields as beforeValidateTraverseFields } from './fields/hooks/beforeValidate/traverseFields.js'\n\nexport { sortableFieldTypes } from './fields/sortableFieldTypes.js'\nexport { validateBlocksFilterOptions, validations } from './fields/validations.js'\n\nexport type {\n ArrayFieldValidation,\n BlocksFieldValidation,\n CheckboxFieldValidation,\n CodeFieldValidation,\n ConfirmPasswordFieldValidation,\n DateFieldValidation,\n EmailFieldValidation,\n JSONFieldValidation,\n NumberFieldManyValidation,\n NumberFieldSingleValidation,\n NumberFieldValidation,\n PasswordFieldValidation,\n PointFieldValidation,\n RadioFieldValidation,\n RelationshipFieldManyValidation,\n RelationshipFieldSingleValidation,\n RelationshipFieldValidation,\n RichTextFieldValidation,\n SelectFieldManyValidation,\n SelectFieldSingleValidation,\n SelectFieldValidation,\n TextareaFieldValidation,\n TextFieldManyValidation,\n TextFieldSingleValidation,\n TextFieldValidation,\n UploadFieldManyValidation,\n UploadFieldSingleValidation,\n UploadFieldValidation,\n UsernameFieldValidation,\n} from './fields/validations.js'\nexport type { FolderSortKeys } from './folders/types.js'\nexport { getFolderData } from './folders/utils/getFolderData.js'\nexport {\n type ClientGlobalConfig,\n createClientGlobalConfig,\n createClientGlobalConfigs,\n type ServerOnlyGlobalAdminProperties,\n type ServerOnlyGlobalProperties,\n} from './globals/config/client.js'\nexport type {\n AfterChangeHook as GlobalAfterChangeHook,\n AfterReadHook as GlobalAfterReadHook,\n BeforeChangeHook as GlobalBeforeChangeHook,\n BeforeOperationHook as GlobalBeforeOperationHook,\n BeforeReadHook as GlobalBeforeReadHook,\n BeforeValidateHook as GlobalBeforeValidateHook,\n DataFromGlobalSlug,\n GlobalAdminOptions,\n GlobalConfig,\n SanitizedGlobalConfig,\n} from './globals/config/types.js'\n\nexport { docAccessOperation as docAccessOperationGlobal } from './globals/operations/docAccess.js'\nexport { findOneOperation } from './globals/operations/findOne.js'\n\nexport { findVersionByIDOperation as findVersionByIDOperationGlobal } from './globals/operations/findVersionByID.js'\nexport { findVersionsOperation as findVersionsOperationGlobal } from './globals/operations/findVersions.js'\nexport { restoreVersionOperation as restoreVersionOperationGlobal } from './globals/operations/restoreVersion.js'\nexport { updateOperation as updateOperationGlobal } from './globals/operations/update.js'\nexport type {\n CollapsedPreferences,\n CollectionPreferences,\n /**\n * @deprecated Use `CollectionPreferences` instead.\n */\n CollectionPreferences as ListPreferences,\n ColumnPreference,\n DocumentPreferences,\n FieldsPreferences,\n InsideFieldsPreferences,\n PreferenceRequest,\n PreferenceUpdateRequest,\n TabsPreferences,\n} from './preferences/types.js'\nexport type { QueryPreset } from './query-presets/types.js'\nexport { jobAfterRead } from './queues/config/collection.js'\nexport type { JobsConfig, RunJobAccess, RunJobAccessArgs } from './queues/config/types/index.js'\nexport type {\n RunInlineTaskFunction,\n RunTaskFunction,\n RunTaskFunctions,\n TaskConfig,\n TaskHandler,\n TaskHandlerArgs,\n TaskHandlerResult,\n TaskHandlerResults,\n TaskInput,\n TaskOutput,\n TaskType,\n} from './queues/config/types/taskTypes.js'\n\nexport type {\n BaseJob,\n JobLog,\n JobTaskStatus,\n RunningJob,\n SingleTaskStatus,\n WorkflowConfig,\n WorkflowHandler,\n WorkflowTypes,\n} from './queues/config/types/workflowTypes.js'\nexport { countRunnableOrActiveJobsForQueue } from './queues/operations/handleSchedules/countRunnableOrActiveJobsForQueue.js'\nexport { importHandlerPath } from './queues/operations/runJobs/runJob/importHandlerPath.js'\n\nexport {\n _internal_jobSystemGlobals,\n _internal_resetJobSystemGlobals,\n getCurrentDate,\n} from './queues/utilities/getCurrentDate.js'\nexport { getLocalI18n } from './translations/getLocalI18n.js'\nexport * from './types/index.js'\nexport { getFileByPath } from './uploads/getFileByPath.js'\nexport { _internal_safeFetchGlobal } from './uploads/safeFetch.js'\n\nexport type * from './uploads/types.js'\nexport { addDataAndFileToRequest } from './utilities/addDataAndFileToRequest.js'\nexport { addLocalesToRequestFromData, sanitizeLocales } from './utilities/addLocalesToRequest.js'\nexport { canAccessAdmin } from './utilities/canAccessAdmin.js'\nexport { commitTransaction } from './utilities/commitTransaction.js'\nexport {\n configToJSONSchema,\n entityToJSONSchema,\n fieldsToJSONSchema,\n withNullableJSONSchemaType,\n} from './utilities/configToJSONSchema.js'\nexport { createArrayFromCommaDelineated } from './utilities/createArrayFromCommaDelineated.js'\nexport { createLocalReq } from './utilities/createLocalReq.js'\nexport { createPayloadRequest } from './utilities/createPayloadRequest.js'\nexport {\n deepCopyObject,\n deepCopyObjectComplex,\n deepCopyObjectSimple,\n} from './utilities/deepCopyObject.js'\nexport {\n deepMerge,\n deepMergeWithCombinedArrays,\n deepMergeWithReactComponents,\n deepMergeWithSourceArrays,\n} from './utilities/deepMerge.js'\nexport {\n checkDependencies,\n type CustomVersionParser,\n} from './utilities/dependencies/dependencyChecker.js'\nexport { getDependencies } from './utilities/dependencies/getDependencies.js'\nexport {\n findUp,\n findUpSync,\n pathExistsAndIsAccessible,\n pathExistsAndIsAccessibleSync,\n} from './utilities/findUp.js'\nexport { flattenAllFields } from './utilities/flattenAllFields.js'\nexport { flattenTopLevelFields } from './utilities/flattenTopLevelFields.js'\nexport { formatErrors } from './utilities/formatErrors.js'\nexport { formatLabels, formatNames, toWords } from './utilities/formatLabels.js'\nexport { getBlockSelect } from './utilities/getBlockSelect.js'\nexport { getCollectionIDFieldTypes } from './utilities/getCollectionIDFieldTypes.js'\nexport { getFieldByPath } from './utilities/getFieldByPath.js'\nexport { getObjectDotNotation } from './utilities/getObjectDotNotation.js'\nexport { getRequestLanguage } from './utilities/getRequestLanguage.js'\nexport { handleEndpoints } from './utilities/handleEndpoints.js'\nexport { headersWithCors } from './utilities/headersWithCors.js'\nexport { initTransaction } from './utilities/initTransaction.js'\nexport { isEntityHidden } from './utilities/isEntityHidden.js'\nexport { isolateObjectProperty } from './utilities/isolateObjectProperty.js'\nexport { isPlainObject } from './utilities/isPlainObject.js'\nexport { isValidID } from './utilities/isValidID.js'\nexport { killTransaction } from './utilities/killTransaction.js'\nexport { logError } from './utilities/logError.js'\nexport { defaultLoggerOptions } from './utilities/logger.js'\nexport { mapAsync } from './utilities/mapAsync.js'\nexport { mergeHeaders } from './utilities/mergeHeaders.js'\nexport { parseDocumentID } from './utilities/parseDocumentID.js'\nexport { sanitizeFallbackLocale } from './utilities/sanitizeFallbackLocale.js'\nexport { sanitizeJoinParams } from './utilities/sanitizeJoinParams.js'\nexport { sanitizePopulateParam } from './utilities/sanitizePopulateParam.js'\nexport { sanitizeSelectParam } from './utilities/sanitizeSelectParam.js'\nexport { stripUnselectedFields } from './utilities/stripUnselectedFields.js'\nexport { traverseFields } from './utilities/traverseFields.js'\nexport type { TraverseFieldsCallback } from './utilities/traverseFields.js'\nexport { buildVersionCollectionFields } from './versions/buildCollectionFields.js'\nexport { buildVersionGlobalFields } from './versions/buildGlobalFields.js'\nexport { buildVersionCompoundIndexes } from './versions/buildVersionCompoundIndexes.js'\nexport { versionDefaults } from './versions/defaults.js'\nexport { deleteCollectionVersions } from './versions/deleteCollectionVersions.js'\nexport { appendVersionToQueryKey } from './versions/drafts/appendVersionToQueryKey.js'\nexport { getQueryDraftsSort } from './versions/drafts/getQueryDraftsSort.js'\n\nexport { enforceMaxVersions } from './versions/enforceMaxVersions.js'\nexport { getLatestCollectionVersion } from './versions/getLatestCollectionVersion.js'\nexport { getLatestGlobalVersion } from './versions/getLatestGlobalVersion.js'\nexport { saveVersion } from './versions/saveVersion.js'\nexport type { SchedulePublishTaskInput } from './versions/schedule/types.js'\nexport type { SchedulePublish, TypeWithVersion } from './versions/types.js'\nexport { deepMergeSimple } from '@payloadcms/translations/utilities'\n"],"names":["spawn","crypto","fileURLToPath","path","WebSocket","forgotPasswordLocal","loginLocal","resetPasswordLocal","unlockLocal","verifyEmailLocal","countLocal","createLocal","deleteLocal","duplicateLocal","findLocal","findByIDLocal","findDistinct","findDistinctLocal","findVersionByIDLocal","findVersionsLocal","restoreVersionLocal","updateLocal","countGlobalVersionsLocal","findOneGlobalLocal","findGlobalVersionByIDLocal","findGlobalVersionsLocal","restoreGlobalVersionLocal","updateGlobalLocal","Cron","decrypt","encrypt","authLocal","APIKeyAuthentication","JWTAuthentication","generateImportMap","checkPayloadDependencies","countVersionsLocal","consoleEmailAdapter","fieldAffectsData","getJobsLocalAPI","_internal_jobSystemGlobals","isNextBuild","getLogger","serverInit","serverInitTelemetry","traverseFields","accountLockFields","baseAccountLockFields","apiKeyFields","baseAPIKeyFields","baseAuthFields","emailFieldConfig","baseEmailField","sessionsFieldConfig","baseSessionsField","usernameFieldConfig","baseUsernameField","verificationFields","baseVerificationFields","executeAccess","executeAuthStrategies","extractAccessFromPermission","getAccessResults","getFieldsToSign","getLoginOptions","filename","url","dirname","checkedDependencies","BasePayload","auth","options","authStrategies","blocks","collections","config","count","countGlobalVersions","countVersions","create","crons","db","destroy","length","cronsToStop","splice","Promise","all","map","cron","stop","duplicate","email","extensions","find","findByID","findGlobal","findGlobalVersionByID","findGlobalVersions","findVersionByID","findVersions","forgotPassword","getAdminURL","serverURL","routes","admin","getAPIURL","api","globals","importMap","jobs","logger","login","resetPassword","restoreGlobalVersion","restoreVersion","schema","secret","sendEmail","types","unlock","updateGlobal","validationRules","verifyEmail","versions","_initializeCrons","enabled","autoRun","DEFAULT_CRON","DEFAULT_LIMIT","cronJobs","cronConfig","jobAutorunCron","shouldAutoSchedule","disableScheduling","scheduling","handleSchedules","allQueues","queue","shouldAutoRun","run","limit","silent","protect","push","bin","args","cwd","log","resolve","reject","spawned","stdio","undefined","on","code","error","delete","init","process","env","NODE_ENV","PAYLOAD_DISABLE_DEPENDENCY_CHECKER","Error","createHash","update","digest","slice","collection","customIDType","findCustomID","field","includes","type","name","callback","fields","parentIsLocalized","slug","reduce","block","typescript","autoGenerate","payload","disableDBConnect","connect","awaitedAdapter","NEXT_PHASE","warn","sharp","some","c","upload","imageSizes","formatOptions","VERCEL","uploadCollWithoutAdapter","filter","adapter","slugs","join","jwtStrategyEnabled","strategies","useAPIKey","authenticate","disableLocalStrategy","disableOnInit","onInit","err","initialized","reload","skipImportMapGeneration","hotReload","global","_payload_clientConfigs","_payload_schemaMap","_payload_clientSchemaMap","_payload_doNotCacheClientConfig","_payload_doNotCacheSchemaMap","_payload_doNotCacheClientSchemaMap","_cached","_payload","Map","getPayload","alreadyCachedSameConfig","cached","get","key","initializedCrons","Boolean","promise","ws","set","res","DISABLE_PAYLOAD_HMR","port","PORT","hasHTTPS","USE_HTTPS","argv","protocol","prefix","__NEXT_ASSET_PREFIX","PAYLOAD_HMR_URL_OVERRIDE","onmessage","event","data","JSON","parse","action","onerror","_","e","payloadInitError","jwtSign","accessOperation","forgotPasswordOperation","initOperation","checkLoginPermission","loginOperation","logoutOperation","meOperation","refreshOperation","registerFirstUserOperation","resetPasswordOperation","unlockOperation","verifyEmailOperation","incrementLoginAttempts","resetLoginAttempts","genImportMapIterateFields","migrate","migrateCLI","createClientCollectionConfig","createClientCollectionConfigs","createDataloaderCacheKey","getDataLoader","countOperation","createOperation","deleteOperation","deleteByIDOperation","docAccessOperation","duplicateOperation","findOperation","findByIDOperation","findVersionByIDOperation","findVersionsOperation","restoreVersionOperation","updateOperation","updateByIDOperation","buildConfig","createClientConfig","createUnauthenticatedClientConfig","serverOnlyAdminConfigProperties","serverOnlyConfigProperties","defaults","sanitizeConfig","combineQueries","createDatabaseAdapter","defaultBeginTransaction","flattenWhereToOperators","getLocalizedPaths","createMigration","getMigrations","getPredefinedMigration","migrateDown","migrateRefresh","migrateReset","migrateStatus","migrationsCollection","migrationTemplate","readMigrationFiles","writeMigrationIndex","validateQueryPaths","validateSearchParam","APIError","APIErrorName","AuthenticationError","DuplicateCollection","DuplicateFieldName","DuplicateGlobal","ErrorDeletingFile","FileRetrievalError","FileUploadError","Forbidden","InvalidConfiguration","InvalidFieldName","InvalidFieldRelationship","Locked","LockedAuth","MissingCollectionLabel","MissingEditorProp","MissingFieldInputOptions","MissingFieldType","MissingFile","NotFound","QueryError","UnverifiedEmail","ValidationError","ValidationErrorName","baseBlockFields","baseIDField","createClientField","createClientFields","sanitizeFields","getDefaultValue","afterChangeTraverseFields","afterReadPromise","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","sortableFieldTypes","validateBlocksFilterOptions","validations","getFolderData","createClientGlobalConfig","createClientGlobalConfigs","docAccessOperationGlobal","findOneOperation","findVersionByIDOperationGlobal","findVersionsOperationGlobal","restoreVersionOperationGlobal","updateOperationGlobal","jobAfterRead","countRunnableOrActiveJobsForQueue","importHandlerPath","_internal_resetJobSystemGlobals","getCurrentDate","getLocalI18n","getFileByPath","_internal_safeFetchGlobal","addDataAndFileToRequest","addLocalesToRequestFromData","sanitizeLocales","canAccessAdmin","commitTransaction","configToJSONSchema","entityToJSONSchema","fieldsToJSONSchema","withNullableJSONSchemaType","createArrayFromCommaDelineated","createLocalReq","createPayloadRequest","deepCopyObject","deepCopyObjectComplex","deepCopyObjectSimple","deepMerge","deepMergeWithCombinedArrays","deepMergeWithReactComponents","deepMergeWithSourceArrays","checkDependencies","getDependencies","findUp","findUpSync","pathExistsAndIsAccessible","pathExistsAndIsAccessibleSync","flattenAllFields","flattenTopLevelFields","formatErrors","formatLabels","formatNames","toWords","getBlockSelect","getCollectionIDFieldTypes","getFieldByPath","getObjectDotNotation","getRequestLanguage","handleEndpoints","headersWithCors","initTransaction","isEntityHidden","isolateObjectProperty","isPlainObject","isValidID","killTransaction","logError","defaultLoggerOptions","mapAsync","mergeHeaders","parseDocumentID","sanitizeFallbackLocale","sanitizeJoinParams","sanitizePopulateParam","sanitizeSelectParam","stripUnselectedFields","buildVersionCollectionFields","buildVersionGlobalFields","buildVersionCompoundIndexes","versionDefaults","deleteCollectionVersions","appendVersionToQueryKey","getQueryDraftsSort","enforceMaxVersions","getLatestCollectionVersion","getLatestGlobalVersion","saveVersion","deepMergeSimple"],"mappings":"AAAA,qDAAqD,GACrD,oDAAoD,GAMpD,SAASA,KAAK,QAAQ,gBAAe;AACrC,OAAOC,YAAY,SAAQ;AAC3B,SAASC,aAAa,QAAQ,WAAU;AACxC,OAAOC,UAAU,OAAM;AACvB,OAAOC,eAAe,KAAI;AAe1B,SACEC,mBAAmB,QAEd,4CAA2C;AAClD,SAASC,UAAU,QAAsC,mCAAkC;AAC3F,SACEC,kBAAkB,QAEb,2CAA0C;AACjD,SAASC,WAAW,QAAuC,oCAAmC;AAC9F,SACEC,gBAAgB,QAEX,yCAAwC;AAe/C,SAASC,UAAU,QAAsC,0CAAyC;AAClG,SACEC,WAAW,QAEN,2CAA0C;AACjD,SAEEC,WAAW,QAGN,2CAA0C;AACjD,SACEC,cAAc,QAET,8CAA6C;AACpD,SAASC,SAAS,QAAqC,yCAAwC;A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c,QAAQ,gCAA+B;AAE9D,SAAS2X,4BAA4B,QAAQ,sCAAqC;AAClF,SAASC,wBAAwB,QAAQ,kCAAiC;AAC1E,SAASC,2BAA2B,QAAQ,4CAA2C;AACvF,SAASC,eAAe,QAAQ,yBAAwB;AACxD,SAASC,wBAAwB,QAAQ,yCAAwC;AACjF,SAASC,uBAAuB,QAAQ,+CAA8C;AACtF,SAASC,kBAAkB,QAAQ,0CAAyC;AAE5E,SAASC,kBAAkB,QAAQ,mCAAkC;AACrE,SAASC,0BAA0B,QAAQ,2CAA0C;AACrF,SAASC,sBAAsB,QAAQ,uCAAsC;AAC7E,SAASC,WAAW,QAAQ,4BAA2B;AAGvD,SAASC,eAAe,QAAQ,qCAAoC"}
@@ -1,3 +1,4 @@
1
+ import type { SanitizedConfig } from '../config/types.js';
1
2
  import type { FlattenedField } from '../fields/config/types.js';
2
3
  /**
3
4
  * Get the field from by its path.
@@ -5,8 +6,10 @@ import type { FlattenedField } from '../fields/config/types.js';
5
6
  * If there were any localized on the path, pathHasLocalized will be true and localizedPath will look like:
6
7
  * group.<locale>.title // group is localized here
7
8
  */
8
- export declare const getFieldByPath: ({ fields, localizedPath, path, }: {
9
+ export declare const getFieldByPath: ({ config, fields, includeRelationships, localizedPath, path, }: {
10
+ config?: SanitizedConfig;
9
11
  fields: FlattenedField[];
12
+ includeRelationships?: boolean;
10
13
  localizedPath?: string;
11
14
  path: string;
12
15
  }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"getFieldByPath.d.ts","sourceRoot":"","sources":["../../src/utilities/getFieldByPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,cAAc,qCAIxB;IACD,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;CACb,KAAG;IACF,KAAK,EAAE,cAAc,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,OAAO,CAAA;CAC1B,GAAG,IAiDH,CAAA"}
1
+ {"version":3,"file":"getFieldByPath.d.ts","sourceRoot":"","sources":["../../src/utilities/getFieldByPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,cAAc,mEAMxB;IACD,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;CACb,KAAG;IACF,KAAK,EAAE,cAAc,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,OAAO,CAAA;CAC1B,GAAG,IAiEH,CAAA"}
@@ -3,7 +3,7 @@
3
3
  * Can accept nested paths, e.g: group.title, array.group.title
4
4
  * If there were any localized on the path, pathHasLocalized will be true and localizedPath will look like:
5
5
  * group.<locale>.title // group is localized here
6
- */ export const getFieldByPath = ({ fields, localizedPath = '', path })=>{
6
+ */ export const getFieldByPath = ({ config, fields, includeRelationships = false, localizedPath = '', path })=>{
7
7
  let currentFields = fields;
8
8
  let currentField = null;
9
9
  const segments = path.split('.');
@@ -22,10 +22,18 @@
22
22
  if ('flattenedFields' in field) {
23
23
  currentFields = field.flattenedFields;
24
24
  }
25
+ if (config && includeRelationships && (field.type === 'relationship' || field.type === 'upload') && !Array.isArray(field.relationTo)) {
26
+ const flattenedFields = config.collections.find((e)=>e.slug === field.relationTo)?.flattenedFields;
27
+ if (flattenedFields) {
28
+ currentFields = flattenedFields;
29
+ }
30
+ }
25
31
  if ('blocks' in field) {
26
32
  for (const block of field.blocks){
27
33
  const maybeField = getFieldByPath({
34
+ config,
28
35
  fields: block.flattenedFields,
36
+ includeRelationships,
29
37
  localizedPath,
30
38
  path: [
31
39
  ...segments
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utilities/getFieldByPath.ts"],"sourcesContent":["import type { FlattenedField } from '../fields/config/types.js'\n\n/**\n * Get the field from by its path.\n * Can accept nested paths, e.g: group.title, array.group.title\n * If there were any localized on the path, pathHasLocalized will be true and localizedPath will look like:\n * group.<locale>.title // group is localized here\n */\nexport const getFieldByPath = ({\n fields,\n localizedPath = '',\n path,\n}: {\n fields: FlattenedField[]\n localizedPath?: string\n path: string\n}): {\n field: FlattenedField\n localizedPath: string\n pathHasLocalized: boolean\n} | null => {\n let currentFields: FlattenedField[] = fields\n\n let currentField: FlattenedField | null = null\n\n const segments = path.split('.')\n\n let pathHasLocalized = false\n\n while (segments.length > 0) {\n const segment = segments.shift()\n localizedPath = `${localizedPath ? `${localizedPath}.` : ''}${segment}`\n const field = currentFields.find((each) => each.name === segment)\n\n if (!field) {\n return null\n }\n\n if (field.localized) {\n pathHasLocalized = true\n localizedPath = `${localizedPath}.<locale>`\n }\n\n if ('flattenedFields' in field) {\n currentFields = field.flattenedFields\n }\n\n if ('blocks' in field) {\n for (const block of field.blocks) {\n const maybeField = getFieldByPath({\n fields: block.flattenedFields,\n localizedPath,\n path: [...segments].join('.'),\n })\n\n if (maybeField) {\n return maybeField\n }\n }\n }\n\n currentField = field\n }\n\n if (!currentField) {\n return null\n }\n\n return { field: currentField, localizedPath, pathHasLocalized }\n}\n"],"names":["getFieldByPath","fields","localizedPath","path","currentFields","currentField","segments","split","pathHasLocalized","length","segment","shift","field","find","each","name","localized","flattenedFields","block","blocks","maybeField","join"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,MAAMA,iBAAiB,CAAC,EAC7BC,MAAM,EACNC,gBAAgB,EAAE,EAClBC,IAAI,EAKL;IAKC,IAAIC,gBAAkCH;IAEtC,IAAII,eAAsC;IAE1C,MAAMC,WAAWH,KAAKI,KAAK,CAAC;IAE5B,IAAIC,mBAAmB;IAEvB,MAAOF,SAASG,MAAM,GAAG,EAAG;QAC1B,MAAMC,UAAUJ,SAASK,KAAK;QAC9BT,gBAAgB,GAAGA,gBAAgB,GAAGA,cAAc,CAAC,CAAC,GAAG,KAAKQ,SAAS;QACvE,MAAME,QAAQR,cAAcS,IAAI,CAAC,CAACC,OAASA,KAAKC,IAAI,KAAKL;QAEzD,IAAI,CAACE,OAAO;YACV,OAAO;QACT;QAEA,IAAIA,MAAMI,SAAS,EAAE;YACnBR,mBAAmB;YACnBN,gBAAgB,GAAGA,cAAc,SAAS,CAAC;QAC7C;QAEA,IAAI,qBAAqBU,OAAO;YAC9BR,gBAAgBQ,MAAMK,eAAe;QACvC;QAEA,IAAI,YAAYL,OAAO;YACrB,KAAK,MAAMM,SAASN,MAAMO,MAAM,CAAE;gBAChC,MAAMC,aAAapB,eAAe;oBAChCC,QAAQiB,MAAMD,eAAe;oBAC7Bf;oBACAC,MAAM;2BAAIG;qBAAS,CAACe,IAAI,CAAC;gBAC3B;gBAEA,IAAID,YAAY;oBACd,OAAOA;gBACT;YACF;QACF;QAEAf,eAAeO;IACjB;IAEA,IAAI,CAACP,cAAc;QACjB,OAAO;IACT;IAEA,OAAO;QAAEO,OAAOP;QAAcH;QAAeM;IAAiB;AAChE,EAAC"}
1
+ {"version":3,"sources":["../../src/utilities/getFieldByPath.ts"],"sourcesContent":["import type { SanitizedConfig } from '../config/types.js'\nimport type { FlattenedField } from '../fields/config/types.js'\n\n/**\n * Get the field from by its path.\n * Can accept nested paths, e.g: group.title, array.group.title\n * If there were any localized on the path, pathHasLocalized will be true and localizedPath will look like:\n * group.<locale>.title // group is localized here\n */\nexport const getFieldByPath = ({\n config,\n fields,\n includeRelationships = false,\n localizedPath = '',\n path,\n}: {\n config?: SanitizedConfig\n fields: FlattenedField[]\n includeRelationships?: boolean\n localizedPath?: string\n path: string\n}): {\n field: FlattenedField\n localizedPath: string\n pathHasLocalized: boolean\n} | null => {\n let currentFields: FlattenedField[] = fields\n\n let currentField: FlattenedField | null = null\n\n const segments = path.split('.')\n\n let pathHasLocalized = false\n\n while (segments.length > 0) {\n const segment = segments.shift()\n localizedPath = `${localizedPath ? `${localizedPath}.` : ''}${segment}`\n const field = currentFields.find((each) => each.name === segment)\n\n if (!field) {\n return null\n }\n\n if (field.localized) {\n pathHasLocalized = true\n localizedPath = `${localizedPath}.<locale>`\n }\n\n if ('flattenedFields' in field) {\n currentFields = field.flattenedFields\n }\n\n if (\n config &&\n includeRelationships &&\n (field.type === 'relationship' || field.type === 'upload') &&\n !Array.isArray(field.relationTo)\n ) {\n const flattenedFields = config.collections.find(\n (e) => e.slug === field.relationTo,\n )?.flattenedFields\n if (flattenedFields) {\n currentFields = flattenedFields\n }\n }\n\n if ('blocks' in field) {\n for (const block of field.blocks) {\n const maybeField = getFieldByPath({\n config,\n fields: block.flattenedFields,\n includeRelationships,\n localizedPath,\n path: [...segments].join('.'),\n })\n\n if (maybeField) {\n return maybeField\n }\n }\n }\n\n currentField = field\n }\n\n if (!currentField) {\n return null\n }\n\n return { field: currentField, localizedPath, pathHasLocalized }\n}\n"],"names":["getFieldByPath","config","fields","includeRelationships","localizedPath","path","currentFields","currentField","segments","split","pathHasLocalized","length","segment","shift","field","find","each","name","localized","flattenedFields","type","Array","isArray","relationTo","collections","e","slug","block","blocks","maybeField","join"],"mappings":"AAGA;;;;;CAKC,GACD,OAAO,MAAMA,iBAAiB,CAAC,EAC7BC,MAAM,EACNC,MAAM,EACNC,uBAAuB,KAAK,EAC5BC,gBAAgB,EAAE,EAClBC,IAAI,EAOL;IAKC,IAAIC,gBAAkCJ;IAEtC,IAAIK,eAAsC;IAE1C,MAAMC,WAAWH,KAAKI,KAAK,CAAC;IAE5B,IAAIC,mBAAmB;IAEvB,MAAOF,SAASG,MAAM,GAAG,EAAG;QAC1B,MAAMC,UAAUJ,SAASK,KAAK;QAC9BT,gBAAgB,GAAGA,gBAAgB,GAAGA,cAAc,CAAC,CAAC,GAAG,KAAKQ,SAAS;QACvE,MAAME,QAAQR,cAAcS,IAAI,CAAC,CAACC,OAASA,KAAKC,IAAI,KAAKL;QAEzD,IAAI,CAACE,OAAO;YACV,OAAO;QACT;QAEA,IAAIA,MAAMI,SAAS,EAAE;YACnBR,mBAAmB;YACnBN,gBAAgB,GAAGA,cAAc,SAAS,CAAC;QAC7C;QAEA,IAAI,qBAAqBU,OAAO;YAC9BR,gBAAgBQ,MAAMK,eAAe;QACvC;QAEA,IACElB,UACAE,wBACCW,CAAAA,MAAMM,IAAI,KAAK,kBAAkBN,MAAMM,IAAI,KAAK,QAAO,KACxD,CAACC,MAAMC,OAAO,CAACR,MAAMS,UAAU,GAC/B;YACA,MAAMJ,kBAAkBlB,OAAOuB,WAAW,CAACT,IAAI,CAC7C,CAACU,IAAMA,EAAEC,IAAI,KAAKZ,MAAMS,UAAU,GACjCJ;YACH,IAAIA,iBAAiB;gBACnBb,gBAAgBa;YAClB;QACF;QAEA,IAAI,YAAYL,OAAO;YACrB,KAAK,MAAMa,SAASb,MAAMc,MAAM,CAAE;gBAChC,MAAMC,aAAa7B,eAAe;oBAChCC;oBACAC,QAAQyB,MAAMR,eAAe;oBAC7BhB;oBACAC;oBACAC,MAAM;2BAAIG;qBAAS,CAACsB,IAAI,CAAC;gBAC3B;gBAEA,IAAID,YAAY;oBACd,OAAOA;gBACT;YACF;QACF;QAEAtB,eAAeO;IACjB;IAEA,IAAI,CAACP,cAAc;QACjB,OAAO;IACT;IAEA,OAAO;QAAEO,OAAOP;QAAcH;QAAeM;IAAiB;AAChE,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload",
3
- "version": "3.59.0-internal.b804ca6",
3
+ "version": "3.59.0-internal.c8403a3",
4
4
  "description": "Node, React, Headless CMS and Application Framework built on Next.js",
5
5
  "keywords": [
6
6
  "admin panel",
@@ -101,7 +101,7 @@
101
101
  "undici": "7.10.0",
102
102
  "uuid": "10.0.0",
103
103
  "ws": "^8.16.0",
104
- "@payloadcms/translations": "3.59.0-internal.b804ca6"
104
+ "@payloadcms/translations": "3.59.0-internal.c8403a3"
105
105
  },
106
106
  "devDependencies": {
107
107
  "@hyrious/esbuild-plugin-commonjs": "0.2.6",