payload 3.0.0-beta.11 → 3.0.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/auth/cookies.d.ts +16 -4
  2. package/dist/auth/cookies.d.ts.map +1 -1
  3. package/dist/auth/cookies.js +45 -14
  4. package/dist/auth/cookies.js.map +1 -1
  5. package/dist/auth/operations/forgotPassword.js +3 -3
  6. package/dist/auth/operations/forgotPassword.js.map +1 -1
  7. package/dist/auth/operations/login.d.ts.map +1 -1
  8. package/dist/auth/operations/login.js +17 -1
  9. package/dist/auth/operations/login.js.map +1 -1
  10. package/dist/auth/sendVerificationEmail.d.ts +5 -6
  11. package/dist/auth/sendVerificationEmail.d.ts.map +1 -1
  12. package/dist/auth/sendVerificationEmail.js +4 -5
  13. package/dist/auth/sendVerificationEmail.js.map +1 -1
  14. package/dist/collections/config/client.d.ts +4 -1
  15. package/dist/collections/config/client.d.ts.map +1 -1
  16. package/dist/collections/config/client.js +2 -1
  17. package/dist/collections/config/client.js.map +1 -1
  18. package/dist/collections/config/defaults.d.ts +1 -0
  19. package/dist/collections/config/defaults.d.ts.map +1 -1
  20. package/dist/collections/config/defaults.js +1 -0
  21. package/dist/collections/config/defaults.js.map +1 -1
  22. package/dist/collections/config/schema.d.ts.map +1 -1
  23. package/dist/collections/config/schema.js +1 -0
  24. package/dist/collections/config/schema.js.map +1 -1
  25. package/dist/collections/config/types.d.ts +5 -2
  26. package/dist/collections/config/types.d.ts.map +1 -1
  27. package/dist/collections/config/types.js.map +1 -1
  28. package/dist/collections/operations/count.d.ts +13 -0
  29. package/dist/collections/operations/count.d.ts.map +1 -0
  30. package/dist/collections/operations/count.js +75 -0
  31. package/dist/collections/operations/count.js.map +1 -0
  32. package/dist/collections/operations/create.d.ts.map +1 -1
  33. package/dist/collections/operations/create.js +3 -4
  34. package/dist/collections/operations/create.js.map +1 -1
  35. package/dist/collections/operations/local/count.d.ts +20 -0
  36. package/dist/collections/operations/local/count.d.ts.map +1 -0
  37. package/dist/collections/operations/local/count.js +19 -0
  38. package/dist/collections/operations/local/count.js.map +1 -0
  39. package/dist/collections/operations/local/index.d.ts +2 -0
  40. package/dist/collections/operations/local/index.d.ts.map +1 -1
  41. package/dist/collections/operations/local/index.js +2 -0
  42. package/dist/collections/operations/local/index.js.map +1 -1
  43. package/dist/collections/operations/update.d.ts.map +1 -1
  44. package/dist/collections/operations/update.js +2 -2
  45. package/dist/collections/operations/update.js.map +1 -1
  46. package/dist/collections/operations/updateByID.js +1 -1
  47. package/dist/collections/operations/updateByID.js.map +1 -1
  48. package/dist/collections/operations/utils.d.ts +6 -0
  49. package/dist/collections/operations/utils.d.ts.map +1 -1
  50. package/dist/collections/operations/utils.js.map +1 -1
  51. package/dist/config/client.d.ts +2 -1
  52. package/dist/config/client.d.ts.map +1 -1
  53. package/dist/config/client.js +2 -1
  54. package/dist/config/client.js.map +1 -1
  55. package/dist/config/defaults.d.ts.map +1 -1
  56. package/dist/config/defaults.js +1 -0
  57. package/dist/config/defaults.js.map +1 -1
  58. package/dist/config/schema.d.ts.map +1 -1
  59. package/dist/config/schema.js +1 -0
  60. package/dist/config/schema.js.map +1 -1
  61. package/dist/config/types.d.ts +7 -36
  62. package/dist/config/types.d.ts.map +1 -1
  63. package/dist/config/types.js +0 -12
  64. package/dist/config/types.js.map +1 -1
  65. package/dist/database/types.d.ts +10 -0
  66. package/dist/database/types.d.ts.map +1 -1
  67. package/dist/database/types.js.map +1 -1
  68. package/dist/email/consoleEmailAdapter.d.ts +3 -0
  69. package/dist/email/consoleEmailAdapter.d.ts.map +1 -0
  70. package/dist/email/consoleEmailAdapter.js +16 -0
  71. package/dist/email/consoleEmailAdapter.js.map +1 -0
  72. package/dist/email/defaults.d.ts +2 -2
  73. package/dist/email/defaults.d.ts.map +1 -1
  74. package/dist/email/defaults.js +3 -3
  75. package/dist/email/defaults.js.map +1 -1
  76. package/dist/email/getStringifiedToAddress.d.ts +3 -0
  77. package/dist/email/getStringifiedToAddress.d.ts.map +1 -0
  78. package/dist/email/getStringifiedToAddress.js +20 -0
  79. package/dist/email/getStringifiedToAddress.js.map +1 -0
  80. package/dist/email/sendEmail.d.ts +3 -2
  81. package/dist/email/sendEmail.d.ts.map +1 -1
  82. package/dist/email/sendEmail.js +8 -4
  83. package/dist/email/sendEmail.js.map +1 -1
  84. package/dist/email/types.d.ts +25 -18
  85. package/dist/email/types.d.ts.map +1 -1
  86. package/dist/email/types.js +5 -1
  87. package/dist/email/types.js.map +1 -1
  88. package/dist/exports/database.d.ts +1 -1
  89. package/dist/exports/database.d.ts.map +1 -1
  90. package/dist/exports/database.js.map +1 -1
  91. package/dist/exports/node.d.ts +3 -0
  92. package/dist/exports/node.d.ts.map +1 -1
  93. package/dist/exports/node.js +3 -1
  94. package/dist/exports/node.js.map +1 -1
  95. package/dist/exports/operations.d.ts +1 -0
  96. package/dist/exports/operations.d.ts.map +1 -1
  97. package/dist/exports/operations.js +1 -0
  98. package/dist/exports/operations.js.map +1 -1
  99. package/dist/exports/types.d.ts +1 -0
  100. package/dist/exports/types.d.ts.map +1 -1
  101. package/dist/exports/types.js.map +1 -1
  102. package/dist/exports/utilities.d.ts +3 -0
  103. package/dist/exports/utilities.d.ts.map +1 -1
  104. package/dist/exports/utilities.js +3 -1
  105. package/dist/exports/utilities.js.map +1 -1
  106. package/dist/fields/config/client.d.ts +26 -1
  107. package/dist/fields/config/client.d.ts.map +1 -1
  108. package/dist/fields/config/client.js +2 -1
  109. package/dist/fields/config/client.js.map +1 -1
  110. package/dist/fields/config/schema.d.ts.map +1 -1
  111. package/dist/fields/config/schema.js +7 -1
  112. package/dist/fields/config/schema.js.map +1 -1
  113. package/dist/fields/config/types.d.ts +12 -3
  114. package/dist/fields/config/types.d.ts.map +1 -1
  115. package/dist/fields/config/types.js.map +1 -1
  116. package/dist/fields/validations.d.ts +2 -0
  117. package/dist/fields/validations.d.ts.map +1 -1
  118. package/dist/fields/validations.js +44 -1
  119. package/dist/fields/validations.js.map +1 -1
  120. package/dist/globals/config/client.d.ts +1 -1
  121. package/dist/globals/config/client.d.ts.map +1 -1
  122. package/dist/globals/config/client.js +2 -1
  123. package/dist/globals/config/client.js.map +1 -1
  124. package/dist/globals/config/schema.d.ts.map +1 -1
  125. package/dist/globals/config/schema.js +1 -0
  126. package/dist/globals/config/schema.js.map +1 -1
  127. package/dist/globals/config/types.d.ts +3 -1
  128. package/dist/globals/config/types.d.ts.map +1 -1
  129. package/dist/globals/config/types.js.map +1 -1
  130. package/dist/index.d.ts +13 -6
  131. package/dist/index.d.ts.map +1 -1
  132. package/dist/index.js +25 -13
  133. package/dist/index.js.map +1 -1
  134. package/dist/uploads/getExternalFile.d.ts +1 -1
  135. package/dist/uploads/getExternalFile.d.ts.map +1 -1
  136. package/dist/uploads/getExternalFile.js +1 -1
  137. package/dist/uploads/getExternalFile.js.map +1 -1
  138. package/dist/utilities/importWithoutClientFiles.d.ts.map +1 -1
  139. package/dist/utilities/importWithoutClientFiles.js +8 -5
  140. package/dist/utilities/importWithoutClientFiles.js.map +1 -1
  141. package/dist/utilities/telemetry/index.d.ts +3 -0
  142. package/dist/utilities/telemetry/index.d.ts.map +1 -1
  143. package/dist/utilities/telemetry/index.js +32 -6
  144. package/dist/utilities/telemetry/index.js.map +1 -1
  145. package/package.json +5 -5
  146. package/dist/email/build.d.ts +0 -5
  147. package/dist/email/build.d.ts.map +0 -1
  148. package/dist/email/build.js +0 -63
  149. package/dist/email/build.js.map +0 -1
  150. package/dist/email/mockHandler.d.ts +0 -5
  151. package/dist/email/mockHandler.d.ts.map +0 -1
  152. package/dist/email/mockHandler.js +0 -24
  153. package/dist/email/mockHandler.js.map +0 -1
  154. package/src/index.ts +0 -499
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/schema.ts"],"sourcesContent":["import joi from 'joi'\n\nimport { adminViewSchema } from './shared/adminViewSchema.js'\nimport { componentSchema, livePreviewSchema } from './shared/componentSchema.js'\n\nconst component = joi.alternatives().try(joi.object().unknown(), joi.func())\n\nexport const endpointsSchema = joi.alternatives().try(\n joi.array().items(\n joi.object({\n custom: joi.object().pattern(joi.string(), joi.any()),\n handler: joi.alternatives().try(joi.array().items(joi.func()), joi.func()),\n method: joi\n .string()\n .valid('get', 'head', 'post', 'put', 'patch', 'delete', 'connect', 'options'),\n path: joi.string(),\n root: joi.bool(),\n }),\n ),\n joi.boolean(),\n)\n\nexport default joi.object({\n admin: joi.object({\n autoLogin: joi.alternatives().try(\n joi.object().keys({\n email: joi.string(),\n password: joi.string(),\n prefillOnly: joi.boolean(),\n }),\n joi.boolean(),\n ),\n avatar: joi.alternatives().try(joi.string(), component),\n buildPath: joi.string(),\n components: joi.object().keys({\n Nav: component,\n actions: joi.array().items(component),\n afterDashboard: joi.array().items(component),\n afterLogin: joi.array().items(component),\n afterNavLinks: joi.array().items(component),\n beforeDashboard: joi.array().items(component),\n beforeLogin: joi.array().items(component),\n beforeNavLinks: joi.array().items(component),\n graphics: joi.object({\n Icon: component,\n Logo: component,\n }),\n logout: joi.object({\n Button: component,\n }),\n providers: joi.array().items(component),\n views: joi.alternatives().try(\n joi.object({\n Account: joi.alternatives().try(component, adminViewSchema),\n Dashboard: joi.alternatives().try(component, adminViewSchema),\n }),\n joi.object().pattern(joi.string(), component),\n ),\n }),\n dateFormat: joi.string(),\n disable: joi.bool(),\n inactivityRoute: joi.string(),\n livePreview: joi.object({\n ...livePreviewSchema,\n collections: joi.array().items(joi.string()),\n globals: joi.array().items(joi.string()),\n }),\n logoutRoute: joi.string(),\n meta: joi.object().keys({\n favicon: joi.string(),\n ogImage: joi.string(),\n titleSuffix: joi.string(),\n }),\n user: joi.string(),\n }),\n bin: joi.array().items(\n joi.object().keys({\n key: joi.string(),\n scriptPath: joi.string(),\n }),\n ),\n collections: joi.array(),\n cookiePrefix: joi.string(),\n cors: [joi.string().valid('*'), joi.array().items(joi.string())],\n csrf: joi.array().items(joi.string().allow('')).sparse(),\n custom: joi.object().pattern(joi.string(), joi.any()),\n db: joi.any(),\n debug: joi.boolean(),\n defaultDepth: joi.number().min(0).max(30),\n defaultMaxTextLength: joi.number(),\n editor: joi\n .object()\n .required()\n .keys({\n CellComponent: componentSchema.optional(),\n FieldComponent: componentSchema.optional(),\n afterReadPromise: joi.func().optional(),\n outputSchema: joi.func().optional(),\n populationPromise: joi.func().optional(),\n validate: joi.func().required(),\n })\n .unknown(),\n email: joi.object(),\n endpoints: endpointsSchema,\n globals: joi.array(),\n graphQL: joi.object().keys({\n disable: joi.boolean(),\n disablePlaygroundInProduction: joi.boolean(),\n maxComplexity: joi.number(),\n mutations: joi.function(),\n queries: joi.function(),\n }),\n hooks: joi.object().keys({\n afterError: joi.func(),\n }),\n i18n: joi.object(),\n indexSortableFields: joi.boolean(),\n local: joi.boolean(),\n localization: joi.alternatives().try(\n joi.object().keys({\n defaultLocale: joi.string(),\n fallback: joi.boolean(),\n localeCodes: joi.array().items(joi.string()),\n locales: joi.alternatives().try(\n joi.array().items(\n joi.object().keys({\n code: joi.string(),\n fallbackLocale: joi.string(),\n label: joi\n .alternatives()\n .try(\n joi.object().pattern(joi.string(), [joi.string()]),\n joi.string(),\n joi.valid(false),\n ),\n rtl: joi.boolean(),\n toString: joi.func(),\n }),\n ),\n joi.array().items(joi.string()),\n ),\n }),\n joi.boolean(),\n ),\n maxDepth: joi.number().min(0).max(100),\n onInit: joi.func(),\n plugins: joi.array().items(joi.func()),\n routes: joi.object({\n admin: joi.string(),\n api: joi.string(),\n graphQL: joi.string(),\n graphQLPlayground: joi.string(),\n }),\n secret: joi.string(),\n serverURL: joi\n .string()\n .uri()\n .allow('')\n .custom((value, helper) => {\n const urlWithoutProtocol = value.split('//')[1]\n\n if (!urlWithoutProtocol) {\n return helper.message({\n custom: 'You need to include either \"https://\" or \"http://\" in your serverURL.',\n })\n }\n\n if (urlWithoutProtocol.indexOf('/') > -1) {\n return helper.message({\n custom:\n 'Your serverURL cannot have a path. It can only contain a protocol, a domain, and an optional port.',\n })\n }\n\n return value\n }),\n sharp: joi.any(),\n telemetry: joi.boolean(),\n typescript: joi.object({\n declare: joi.boolean(),\n outputFile: joi.string(),\n }),\n upload: joi.object(),\n})\n"],"names":["joi","adminViewSchema","componentSchema","livePreviewSchema","component","alternatives","try","object","unknown","func","endpointsSchema","array","items","custom","pattern","string","any","handler","method","valid","path","root","bool","boolean","admin","autoLogin","keys","email","password","prefillOnly","avatar","buildPath","components","Nav","actions","afterDashboard","afterLogin","afterNavLinks","beforeDashboard","beforeLogin","beforeNavLinks","graphics","Icon","Logo","logout","Button","providers","views","Account","Dashboard","dateFormat","disable","inactivityRoute","livePreview","collections","globals","logoutRoute","meta","favicon","ogImage","titleSuffix","user","bin","key","scriptPath","cookiePrefix","cors","csrf","allow","sparse","db","debug","defaultDepth","number","min","max","defaultMaxTextLength","editor","required","CellComponent","optional","FieldComponent","afterReadPromise","outputSchema","populationPromise","validate","endpoints","graphQL","disablePlaygroundInProduction","maxComplexity","mutations","function","queries","hooks","afterError","i18n","indexSortableFields","local","localization","defaultLocale","fallback","localeCodes","locales","code","fallbackLocale","label","rtl","toString","maxDepth","onInit","plugins","routes","api","graphQLPlayground","secret","serverURL","uri","value","helper","urlWithoutProtocol","split","message","indexOf","sharp","telemetry","typescript","declare","outputFile","upload"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,SAAS,MAAK;AAErB,SAASC,eAAe,QAAQ,8BAA6B;AAC7D,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,8BAA6B;AAEhF,MAAMC,YAAYJ,IAAIK,YAAY,GAAGC,GAAG,CAACN,IAAIO,MAAM,GAAGC,OAAO,IAAIR,IAAIS,IAAI;AAEzE,OAAO,MAAMC,kBAAkBV,IAAIK,Y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5G,QAAQ;YACV;QACF;QAEA,IAAI0G,mBAAmBG,OAAO,CAAC,OAAO,CAAC,GAAG;YACxC,OAAOJ,OAAOG,OAAO,CAAC;gBACpB5G,QACE;YACJ;QACF;QAEA,OAAOwG;IACT;IACFM,OAAO3H,IAAIgB,GAAG;IACd4G,WAAW5H,IAAIuB,OAAO;IACtBsG,YAAY7H,IAAIO,MAAM,CAAC;QACrBuH,SAAS9H,IAAIuB,OAAO;QACpBwG,YAAY/H,IAAIe,MAAM;IACxB;IACAiH,QAAQhI,IAAIO,MAAM;AACpB,GAAE"}
1
+ {"version":3,"sources":["../../src/config/schema.ts"],"sourcesContent":["import joi from 'joi'\n\nimport { adminViewSchema } from './shared/adminViewSchema.js'\nimport { componentSchema, livePreviewSchema } from './shared/componentSchema.js'\n\nconst component = joi.alternatives().try(joi.object().unknown(), joi.func())\n\nexport const endpointsSchema = joi.alternatives().try(\n joi.array().items(\n joi.object({\n custom: joi.object().pattern(joi.string(), joi.any()),\n handler: joi.alternatives().try(joi.array().items(joi.func()), joi.func()),\n method: joi\n .string()\n .valid('get', 'head', 'post', 'put', 'patch', 'delete', 'connect', 'options'),\n path: joi.string(),\n root: joi.bool(),\n }),\n ),\n joi.boolean(),\n)\n\nexport default joi.object({\n admin: joi.object({\n autoLogin: joi.alternatives().try(\n joi.object().keys({\n email: joi.string(),\n password: joi.string(),\n prefillOnly: joi.boolean(),\n }),\n joi.boolean(),\n ),\n avatar: joi.alternatives().try(joi.string(), component),\n buildPath: joi.string(),\n components: joi.object().keys({\n Nav: component,\n actions: joi.array().items(component),\n afterDashboard: joi.array().items(component),\n afterLogin: joi.array().items(component),\n afterNavLinks: joi.array().items(component),\n beforeDashboard: joi.array().items(component),\n beforeLogin: joi.array().items(component),\n beforeNavLinks: joi.array().items(component),\n graphics: joi.object({\n Icon: component,\n Logo: component,\n }),\n logout: joi.object({\n Button: component,\n }),\n providers: joi.array().items(component),\n views: joi.alternatives().try(\n joi.object({\n Account: joi.alternatives().try(component, adminViewSchema),\n Dashboard: joi.alternatives().try(component, adminViewSchema),\n }),\n joi.object().pattern(joi.string(), component),\n ),\n }),\n custom: joi.object().pattern(joi.string(), joi.any()),\n dateFormat: joi.string(),\n disable: joi.bool(),\n inactivityRoute: joi.string(),\n livePreview: joi.object({\n ...livePreviewSchema,\n collections: joi.array().items(joi.string()),\n globals: joi.array().items(joi.string()),\n }),\n logoutRoute: joi.string(),\n meta: joi.object().keys({\n favicon: joi.string(),\n ogImage: joi.string(),\n titleSuffix: joi.string(),\n }),\n user: joi.string(),\n }),\n bin: joi.array().items(\n joi.object().keys({\n key: joi.string(),\n scriptPath: joi.string(),\n }),\n ),\n collections: joi.array(),\n cookiePrefix: joi.string(),\n cors: [joi.string().valid('*'), joi.array().items(joi.string())],\n csrf: joi.array().items(joi.string().allow('')).sparse(),\n custom: joi.object().pattern(joi.string(), joi.any()),\n db: joi.any(),\n debug: joi.boolean(),\n defaultDepth: joi.number().min(0).max(30),\n defaultMaxTextLength: joi.number(),\n editor: joi\n .object()\n .required()\n .keys({\n CellComponent: componentSchema.optional(),\n FieldComponent: componentSchema.optional(),\n afterReadPromise: joi.func().optional(),\n outputSchema: joi.func().optional(),\n populationPromise: joi.func().optional(),\n validate: joi.func().required(),\n })\n .unknown(),\n email: joi.object(),\n endpoints: endpointsSchema,\n globals: joi.array(),\n graphQL: joi.object().keys({\n disable: joi.boolean(),\n disablePlaygroundInProduction: joi.boolean(),\n maxComplexity: joi.number(),\n mutations: joi.function(),\n queries: joi.function(),\n }),\n hooks: joi.object().keys({\n afterError: joi.func(),\n }),\n i18n: joi.object(),\n indexSortableFields: joi.boolean(),\n local: joi.boolean(),\n localization: joi.alternatives().try(\n joi.object().keys({\n defaultLocale: joi.string(),\n fallback: joi.boolean(),\n localeCodes: joi.array().items(joi.string()),\n locales: joi.alternatives().try(\n joi.array().items(\n joi.object().keys({\n code: joi.string(),\n fallbackLocale: joi.string(),\n label: joi\n .alternatives()\n .try(\n joi.object().pattern(joi.string(), [joi.string()]),\n joi.string(),\n joi.valid(false),\n ),\n rtl: joi.boolean(),\n toString: joi.func(),\n }),\n ),\n joi.array().items(joi.string()),\n ),\n }),\n joi.boolean(),\n ),\n maxDepth: joi.number().min(0).max(100),\n onInit: joi.func(),\n plugins: joi.array().items(joi.func()),\n routes: joi.object({\n admin: joi.string(),\n api: joi.string(),\n graphQL: joi.string(),\n graphQLPlayground: joi.string(),\n }),\n secret: joi.string(),\n serverURL: joi\n .string()\n .uri()\n .allow('')\n .custom((value, helper) => {\n const urlWithoutProtocol = value.split('//')[1]\n\n if (!urlWithoutProtocol) {\n return helper.message({\n custom: 'You need to include either \"https://\" or \"http://\" in your serverURL.',\n })\n }\n\n if (urlWithoutProtocol.indexOf('/') > -1) {\n return helper.message({\n custom:\n 'Your serverURL cannot have a path. It can only contain a protocol, a domain, and an optional port.',\n })\n }\n\n return value\n }),\n sharp: joi.any(),\n telemetry: joi.boolean(),\n typescript: joi.object({\n declare: joi.boolean(),\n outputFile: joi.string(),\n }),\n upload: joi.object(),\n})\n"],"names":["joi","adminViewSchema","componentSchema","livePreviewSchema","component","alternatives","try","object","unknown","func","endpointsSchema","array","items","custom","pattern","string","any","handler","method","valid","path","root","bool","boolean","admin","autoLogin","keys","email","password","prefillOnly","avatar","buildPath","components","Nav","actions","afterDashboard","afterLogin","afterNavLinks","beforeDashboard","beforeLogin","beforeNavLinks","graphics","Icon","Logo","logout","Button","providers","views","Account","Dashboard","dateFormat","disable","inactivityRoute","livePreview","collections","globals","logoutRoute","meta","favicon","ogImage","titleSuffix","user","bin","key","scriptPath","cookiePrefix","cors","csrf","allow","sparse","db","debug","defaultDepth","number","min","max","defaultMaxTextLength","editor","required","CellComponent","optional","FieldComponent","afterReadPromise","outputSchema","populationPromise","validate","endpoints","graphQL","disablePlaygroundInProduction","maxComplexity","mutations","function","queries","hooks","afterError","i18n","indexSortableFields","local","localization","defaultLocale","fallback","localeCodes","locales","code","fallbackLocale","label","rtl","toString","maxDepth","onInit","plugins","routes","api","graphQLPlayground","secret","serverURL","uri","value","helper","urlWithoutProtocol","split","message","indexOf","sharp","telemetry","typescript","declare","outputFile","upload"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,SAAS,MAAK;AAErB,SAASC,eAAe,QAAQ,8BAA6B;AAC7D,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,8BAA6B;AAEhF,MAAMC,YAAYJ,IAAIK,YAAY,GAAGC,GAAG,CAACN,IAAIO,MAAM,GAAGC,OAAO,IAAIR,IAAIS,IAAI;AAEzE,OAAO,MAAMC,kBAAkBV,IAAIK,YAAY,GAAGC,GAAG,CACnDN,IAAIW,KAAK,GAAGC,KAAK,CACfZ,IAAIO,MAAM,CAAC;IACTM,QAAQb,IAAIO,MAAM,GAAGO,OAAO,CAACd,IAAIe,MAAM,IAAIf,IAAIgB,GAAG;IAClDC,SAASjB,IAAIK,YAAY,GAAGC,GAAG,CAACN,IAAIW,KAAK,GAAGC,KAAK,CAACZ,IAAIS,IAAI,KAAKT,IAAIS,IAAI;IACvES,QAAQlB,IACLe,MAAM,GACNI,KAAK,CAAC,OAAO,QAAQ,QAAQ,OAAO,SAAS,UAAU,WAAW;IACrEC,MAAMpB,IAAIe,MAAM;IAChBM,MAAMrB,IAAIsB,IAAI;AAChB,KAEFtB,IAAIuB,OAAO,IACZ;AAED,eAAevB,IAAIO,MAAM,CAAC;IACxBiB,OAAOxB,IAAIO,MAAM,CAAC;QAChBkB,WAAWzB,IAAIK,YAAY,GAAGC,GAAG,CAC/BN,IAAIO,MAAM,GAAGmB,IAAI,CAAC;YAChBC,OAAO3B,IAAIe,MAAM;YACjBa,UAAU5B,IAAIe,MAAM;YACpBc,aAAa7B,IAAIuB,OAAO;QA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e,MAAM;IAEhC,IACAf,IAAIuB,OAAO;IAEbqF,UAAU5G,IAAIyE,MAAM,GAAGC,GAAG,CAAC,GAAGC,GAAG,CAAC;IAClCkC,QAAQ7G,IAAIS,IAAI;IAChBqG,SAAS9G,IAAIW,KAAK,GAAGC,KAAK,CAACZ,IAAIS,IAAI;IACnCsG,QAAQ/G,IAAIO,MAAM,CAAC;QACjBiB,OAAOxB,IAAIe,MAAM;QACjBiG,KAAKhH,IAAIe,MAAM;QACfwE,SAASvF,IAAIe,MAAM;QACnBkG,mBAAmBjH,IAAIe,MAAM;IAC/B;IACAmG,QAAQlH,IAAIe,MAAM;IAClBoG,WAAWnH,IACRe,MAAM,GACNqG,GAAG,GACHhD,KAAK,CAAC,IACNvD,MAAM,CAAC,CAACwG,OAAOC;QACd,MAAMC,qBAAqBF,MAAMG,KAAK,CAAC,KAAK,CAAC,EAAE;QAE/C,IAAI,CAACD,oBAAoB;YACvB,OAAOD,OAAOG,OAAO,CAAC;gBACpB5G,QAAQ;YACV;QACF;QAEA,IAAI0G,mBAAmBG,OAAO,CAAC,OAAO,CAAC,GAAG;YACxC,OAAOJ,OAAOG,OAAO,CAAC;gBACpB5G,QACE;YACJ;QACF;QAEA,OAAOwG;IACT;IACFM,OAAO3H,IAAIgB,GAAG;IACd4G,WAAW5H,IAAIuB,OAAO;IACtBsG,YAAY7H,IAAIO,MAAM,CAAC;QACrBuH,SAAS9H,IAAIuB,OAAO;QACpBwG,YAAY/H,IAAIe,MAAM;IACxB;IACAiH,QAAQhI,IAAIO,MAAM;AACpB,GAAE"}
@@ -2,8 +2,6 @@
2
2
  import type { I18nOptions, TFunction } from '@payloadcms/translations';
3
3
  import type { Options as ExpressFileUploadOptions } from 'express-fileupload';
4
4
  import type GraphQL from 'graphql';
5
- import type { Transporter } from 'nodemailer';
6
- import type SMTPConnection from 'nodemailer/lib/smtp-connection';
7
5
  import type { DestinationStream, LoggerOptions } from 'pino';
8
6
  import type React from 'react';
9
7
  import type { default as sharp } from 'sharp';
@@ -13,6 +11,7 @@ import type { AdminView, ServerSideEditViewProps } from '../admin/views/types.js
13
11
  import type { User } from '../auth/types.js';
14
12
  import type { AfterErrorHook, Collection, CollectionConfig, SanitizedCollectionConfig } from '../collections/config/types.js';
15
13
  import type { DatabaseAdapterResult } from '../database/types.js';
14
+ import type { EmailAdapter, SendEmailOptions } from '../email/types.js';
16
15
  import type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js';
17
16
  import type { Payload } from '../index.js';
18
17
  import type { PayloadRequest, Where } from '../types/index.js';
@@ -25,11 +24,6 @@ export type BinScript = (config: SanitizedConfig) => Promise<void> | void;
25
24
  type Prettify<T> = {
26
25
  [K in keyof T]: T[K];
27
26
  } & NonNullable<unknown>;
28
- type Email = {
29
- fromAddress: string;
30
- fromName: string;
31
- logMockCredentials?: boolean;
32
- };
33
27
  export type Plugin = (config: Config) => Config | Promise<Config>;
34
28
  export type LivePreviewConfig = {
35
29
  /**
@@ -64,25 +58,6 @@ type GeneratePreviewURLOptions = {
64
58
  token: null | string;
65
59
  };
66
60
  export type GeneratePreviewURL = (doc: Record<string, unknown>, options: GeneratePreviewURLOptions) => Promise<null | string> | null | string;
67
- export type EmailTransport = Email & {
68
- transport: Transporter;
69
- transportOptions?: SMTPConnection.Options;
70
- };
71
- export type EmailTransportOptions = Email & {
72
- transport?: Transporter;
73
- transportOptions: SMTPConnection.Options;
74
- };
75
- export type EmailOptions = Email | EmailTransport | EmailTransportOptions;
76
- /**
77
- * type guard for EmailOptions
78
- * @param emailConfig
79
- */
80
- export declare function hasTransport(emailConfig: EmailOptions): emailConfig is EmailTransport;
81
- /**
82
- * type guard for EmailOptions
83
- * @param emailConfig
84
- */
85
- export declare function hasTransportOptions(emailConfig: EmailOptions): emailConfig is EmailTransportOptions;
86
61
  export type GraphQLInfo = {
87
62
  Mutation: {
88
63
  fields: Record<string, any>;
@@ -124,12 +99,6 @@ export type InitOptions = {
124
99
  * Disable running of the `onInit` function
125
100
  */
126
101
  disableOnInit?: boolean;
127
- /**
128
- * Configuration for Payload's email functionality
129
- *
130
- * @see https://payloadcms.com/docs/email/overview
131
- */
132
- email?: EmailOptions;
133
102
  /**
134
103
  * A previously instantiated logger instance. Must conform to the PayloadLogger interface which uses Pino
135
104
  * This allows you to bring your own logger instance and let payload use it
@@ -400,6 +369,8 @@ export type Config = {
400
369
  Dashboard?: AdminView;
401
370
  };
402
371
  };
372
+ /** Extension point to add your custom data. Available in server and client. */
373
+ custom?: Record<string, any>;
403
374
  /** Global date format that will be used for all dates in the Admin panel. Any valid date-fns format pattern can be used. */
404
375
  dateFormat?: string;
405
376
  /** If set to true, the entire Admin panel will be disabled. */
@@ -459,7 +430,7 @@ export type Config = {
459
430
  cors?: '*' | string[];
460
431
  /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */
461
432
  csrf?: string[];
462
- /** Extension point to add your custom data. */
433
+ /** Extension point to add your custom data. Server only. */
463
434
  custom?: Record<string, any>;
464
435
  /** Pass in a database adapter for use on this project. */
465
436
  db: DatabaseAdapterResult;
@@ -482,11 +453,11 @@ export type Config = {
482
453
  /** Default richtext editor to use for richText fields */
483
454
  editor: RichTextAdapter<any, any, any>;
484
455
  /**
485
- * Email configuration options. This value is overridden by `email` in Payload.init if passed.
456
+ * Email Adapter
486
457
  *
487
458
  * @see https://payloadcms.com/docs/email/overview
488
459
  */
489
- email?: EmailOptions;
460
+ email?: EmailAdapter | Promise<EmailAdapter>;
490
461
  /** Custom REST endpoints */
491
462
  endpoints?: Endpoint[];
492
463
  /**
@@ -625,5 +596,5 @@ export type EditConfig = ({
625
596
  export type EntityDescriptionComponent = CustomComponent;
626
597
  export type EntityDescriptionFunction = () => string;
627
598
  export type EntityDescription = EntityDescriptionComponent | EntityDescriptionFunction | Record<string, string> | string;
628
- export {};
599
+ export type { EmailAdapter, SendEmailOptions };
629
600
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","source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;QACL,MAAM,EAAE,MAAM,CAAA;QACd,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,UAAU,GAClB,CACI;IACE;;;;;;;;;;OAUG;IACH,GAAG,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IACjD,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IACrD,WAAW,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IACzD,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IACrD,QAAQ,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;CAIvD,GACD;IACE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;CAC9B,CACJ,GACD,iBAAiB,CAAA;AAErB,MAAM,MAAM,0BAA0B,GAAG,eAAe,CAAA;AAExD,MAAM,MAAM,yBAAyB,GAAG,MAAM,MAAM,CAAA;AAEpD,MAAM,MAAM,iBAAiB,GACzB,0BAA0B,GAC1B,yBAAyB,GACzB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACtB,MAAM,CAAA;AAEV,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1,15 +1,3 @@
1
- /**
2
- * type guard for EmailOptions
3
- * @param emailConfig
4
- */ export function hasTransport(emailConfig) {
5
- return emailConfig.transport !== undefined;
6
- }
7
- /**
8
- * type guard for EmailOptions
9
- * @param emailConfig
10
- */ export function hasTransportOptions(emailConfig) {
11
- return emailConfig.transportOptions !== undefined;
12
- }
13
1
  export const serverProps = [
14
2
  'payload'
15
3
  ];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type { I18nOptions, TFunction } from '@payloadcms/translations'\nimport type { Options as ExpressFileUploadOptions } from 'express-fileupload'\nimport type GraphQL from 'graphql'\nimport type { Transporter } from 'nodemailer'\nimport type SMTPConnection from 'nodemailer/lib/smtp-connection'\nimport type { DestinationStream, LoggerOptions } from 'pino'\nimport type React from 'react'\nimport type { default as sharp } from 'sharp'\nimport type { DeepRequired } from 'ts-essentials'\n\nimport type { DocumentTab, RichTextAdapter } from '../admin/types.js'\nimport type { AdminView, ServerSideEditViewProps } from '../admin/views/types.js'\nimport type { User } from '../auth/types.js'\nimport type {\n AfterErrorHook,\n Collection,\n CollectionConfig,\n SanitizedCollectionConfig,\n} from '../collections/config/types.js'\nimport type { DatabaseAdapterResult } from '../database/types.js'\nimport type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { Payload } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\nimport type { PayloadLogger } from '../utilities/logger.js'\n\nexport type BinScriptConfig = {\n key: string\n scriptPath: string\n}\n\nexport type BinScript = (config: SanitizedConfig) => Promise<void> | void\n\ntype Prettify<T> = {\n [K in keyof T]: T[K]\n} & NonNullable<unknown>\n\ntype Email = {\n fromAddress: string\n fromName: string\n logMockCredentials?: boolean\n}\n\n// eslint-disable-next-line no-use-before-define\nexport type Plugin = (config: Config) => Config | Promise<Config>\n\nexport type LivePreviewConfig = {\n /**\n Device breakpoints to use for the `iframe` of the Live Preview window.\n Options are displayed in the Live Preview toolbar.\n The `responsive` breakpoint is included by default.\n */\n breakpoints?: {\n height: number | string\n label: string\n name: string\n width: number | string\n }[]\n /**\n The URL of the frontend application. This will be rendered within an `iframe` as its `src`.\n Payload will send a `window.postMessage()` to this URL with the document data in real-time.\n The frontend application is responsible for receiving the message and updating the UI accordingly.\n Use the `useLivePreview` hook to get started in React applications.\n */\n url?:\n | ((args: {\n collectionConfig?: SanitizedCollectionConfig\n data: Record<string, any>\n globalConfig?: SanitizedGlobalConfig\n locale: Locale\n payload: Payload\n }) => Promise<string> | string)\n | string\n}\n\nexport type ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequest\n token: null | string\n}\n\nexport type GeneratePreviewURL = (\n doc: Record<string, unknown>,\n options: GeneratePreviewURLOptions,\n) => Promise<null | string> | null | string\n\nexport type EmailTransport = Email & {\n transport: Transporter\n transportOptions?: SMTPConnection.Options\n}\n\nexport type EmailTransportOptions = Email & {\n transport?: Transporter\n transportOptions: SMTPConnection.Options\n}\n\nexport type EmailOptions = Email | EmailTransport | EmailTransportOptions\n\n/**\n * type guard for EmailOptions\n * @param emailConfig\n */\nexport function hasTransport(emailConfig: EmailOptions): emailConfig is EmailTransport {\n return (emailConfig as EmailTransport).transport !== undefined\n}\n\n/**\n * type guard for EmailOptions\n * @param emailConfig\n */\nexport function hasTransportOptions(\n emailConfig: EmailOptions,\n): emailConfig is EmailTransportOptions {\n return (emailConfig as EmailTransportOptions).transportOptions !== undefined\n}\n\nexport type GraphQLInfo = {\n Mutation: {\n fields: Record<string, any>\n name: string\n }\n Query: {\n fields: Record<string, any>\n name: string\n }\n collections: {\n [slug: number | string | symbol]: Collection\n }\n globals: Globals\n types: {\n arrayTypes: Record<string, GraphQL.GraphQLType>\n blockInputTypes: Record<string, GraphQL.GraphQLInputObjectType>\n blockTypes: Record<string, GraphQL.GraphQLObjectType>\n fallbackLocaleInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n groupTypes: Record<string, GraphQL.GraphQLObjectType>\n localeInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n tabTypes: Record<string, GraphQL.GraphQLObjectType>\n }\n}\nexport type GraphQLExtension = (\n graphQL: typeof GraphQL,\n context: {\n config: SanitizedConfig\n } & GraphQLInfo,\n) => Record<string, unknown>\n\nexport type InitOptions = {\n /**\n * Sometimes, with the local API, you might need to pass a config file directly, for example, serverless on Vercel\n * The passed config should match the config file, and if it doesn't, there could be mismatches between the admin UI\n * and the backend functionality\n */\n config: Promise<SanitizedConfig> | SanitizedConfig\n /**\n * Disable connect to the database on init\n */\n disableDBConnect?: boolean\n\n /**\n * Disable running of the `onInit` function\n */\n disableOnInit?: boolean\n\n /**\n * Configuration for Payload's email functionality\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailOptions\n\n /**\n * A previously instantiated logger instance. Must conform to the PayloadLogger interface which uses Pino\n * This allows you to bring your own logger instance and let payload use it\n */\n logger?: PayloadLogger\n\n loggerDestination?: DestinationStream\n\n /**\n * Specify options for the built-in Pino logger that Payload uses for internal logging.\n *\n * See Pino Docs for options: https://getpino.io/#/docs/api?id=options\n */\n loggerOptions?: LoggerOptions\n /**\n * A function that is called immediately following startup that receives the Payload instance as it's only argument.\n */\n onInit?: (payload: Payload) => Promise<void> | void\n}\n\n/**\n * This result is calculated on the server\n * and then sent to the client allowing the dashboard to show accessible data and actions.\n *\n * If the result is `true`, the user has access.\n * If the result is an object, it is interpreted as a MongoDB query.\n *\n * @example `{ createdBy: { equals: id } }`\n *\n * @example `{ tenant: { in: tenantIds } }`\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type AccessResult = Where | boolean\n\nexport type AccessArgs<T = any, U = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: T\n /** ID of the resource being accessed */\n id?: number | string\n /** If true, the request is for a static file */\n isReadingStaticFile?: boolean\n /** The original request that requires an access check */\n req: PayloadRequest<U>\n}\n\n/**\n * Access function runs on the server\n * and is sent to the client allowing the dashboard to show accessible data and actions.\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type Access<T = any, U = any> = (\n args: AccessArgs<T, U>,\n) => AccessResult | Promise<AccessResult>\n\n/** Web Request/Response model, but the the req has more payload specific properties added to it. */\nexport type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response\n\n/**\n * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints\n */\nexport type Endpoint<U = User> = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /**\n * Middleware that will be called when the path/method matches\n *\n * Compatible with Web Request/Response Model\n */\n handler: PayloadHandler\n /** HTTP method (or \"all\") */\n method: 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put'\n /**\n * Pattern that should match the path of the incoming request\n *\n * Compatible with the Express router\n */\n path: string\n /**\n * Please add \"root\" routes under the /api folder in the Payload Project.\n * https://nextjs.org/docs/app/api-reference/file-conventions/route\n *\n * @deprecated in 3.0\n */\n root?: never\n}\n\nexport type EditViewComponent = React.ComponentType<ServerSideEditViewProps>\n\nexport type EditViewConfig =\n | {\n /**\n * Add a new Edit view to the admin panel\n * i.e. you can render a custom view that has no tab, if desired\n * Or override a specific properties of an existing one\n * i.e. you can customize the `Default` view tab label, if desired\n */\n Tab?: DocumentTab\n path?: string\n }\n | {\n Component: EditViewComponent\n path: string\n }\n | {\n actions?: CustomComponent[]\n }\n\n/**\n * Override existing views\n * i.e. Dashboard, Account, API, LivePreview, etc.\n * Path is not available here\n * All Tab properties become optional\n * i.e. you can change just the label, if desired\n */\nexport type EditView = EditViewComponent | EditViewConfig\n\nexport type ServerProps = {\n payload: Payload\n}\n\nexport const serverProps: (keyof ServerProps)[] = ['payload']\n\nexport type CustomComponent<T extends any = any> = React.ComponentType<T & ServerProps>\n\nexport type Locale = {\n /**\n * value of supported locale\n * @example \"en\"\n */\n code: string\n /**\n * Code of another locale to use when reading documents with fallback, if not specified defaultLocale is used\n */\n fallbackLocale?: string\n /**\n * label of supported locale\n * @example \"English\"\n */\n label: Record<string, string> | string\n /**\n * if true, defaults textAligmnent on text fields to RTL\n */\n rtl?: boolean\n}\n\nexport type BaseLocalizationConfig = {\n /**\n * Locale for users that have not expressed their preference for a specific locale\n * @example `\"en\"`\n */\n defaultLocale: string\n /** Set to `true` to let missing values in localised fields fall back to the values in `defaultLocale` */\n fallback?: boolean\n}\n\nexport type LocalizationConfigWithNoLabels = Prettify<\n BaseLocalizationConfig & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n }\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n BaseLocalizationConfig & {\n /**\n * List of supported locales with labels\n * @example {\n * label: 'English',\n * value: 'en',\n * rtl: false\n * }\n */\n locales: Locale[]\n }\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n LocalizationConfigWithLabels & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n }\n>\n\n/**\n * @see https://payloadcms.com/docs/configuration/localization#localization\n */\nexport type LocalizationConfig = Prettify<\n LocalizationConfigWithLabels | LocalizationConfigWithNoLabels\n>\n\nexport type LabelFunction = ({ t }: { t: TFunction }) => string\n\nexport type SharpDependency = (\n input?:\n | ArrayBuffer\n | Buffer\n | Float32Array\n | Float64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | string,\n options?: sharp.SharpOptions,\n) => sharp.Sharp\n\n/**\n * This is the central configuration\n *\n * @see https://payloadcms.com/docs/configuration/overview\n */\nexport type Config = {\n /** Configure admin dashboard */\n admin?: {\n /** Automatically log in as a user when visiting the admin dashboard. */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n *\n */\n email: string\n /** The password of the user to login as */\n password: string\n /**\n * If set to true, the login credentials will be prefilled but the user will still need to click the login button.\n *\n * @default false\n */\n prefillOnly?: boolean\n }\n | false\n\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?: 'default' | 'gravatar' | React.ComponentType<any>\n /**\n * Add extra and/or replace built-in components with custom components\n *\n * @see https://payloadcms.com/docs/admin/components\n */\n components?: {\n /**\n * Replace the navigation with a custom component\n */\n Nav?: CustomComponent\n /**\n * Add custom components to the top right of the Admin Panel\n */\n actions?: CustomComponent[]\n /**\n * Add custom components after the collection overview\n */\n afterDashboard?: CustomComponent[]\n /**\n * Add custom components after the email/password field\n */\n afterLogin?: CustomComponent[]\n /**\n * Add custom components after the navigation links\n */\n afterNavLinks?: CustomComponent[]\n /**\n * Add custom components before the collection overview\n */\n beforeDashboard?: CustomComponent[]\n /**\n * Add custom components before the email/password field\n */\n beforeLogin?: CustomComponent[]\n /**\n * Add custom components before the navigation links\n */\n beforeNavLinks?: CustomComponent[]\n /** Replace graphical components */\n graphics?: {\n /** Replace the icon in the navigation */\n Icon?: CustomComponent\n /** Replace the logo on the login page */\n Logo?: CustomComponent\n }\n /** Replace logout related components */\n logout?: {\n /** Replace the logout button */\n Button?: CustomComponent\n }\n /**\n * Wrap the admin dashboard in custom context providers\n */\n providers?: React.ComponentType<{ children?: React.ReactNode }>[]\n /**\n * Replace or modify top-level admin routes, or add new ones:\n * + `Account` - `/admin/account`\n * + `Dashboard` - `/admin`\n * + `:path` - `/admin/:path`\n */\n views?: {\n /** Add custom admin views */\n [key: string]: AdminView\n /** Replace the account screen */\n Account?: AdminView\n /** Replace the admin homepage */\n Dashboard?: AdminView\n }\n }\n /** Global date format that will be used for all dates in the Admin panel. Any valid date-fns format pattern can be used. */\n dateFormat?: string\n /** If set to true, the entire Admin panel will be disabled. */\n disable?: boolean\n /** The route the user will be redirected to after being inactive for too long. */\n inactivityRoute?: string\n livePreview?: LivePreviewConfig & {\n collections?: string[]\n globals?: string[]\n }\n /** The route for the logout page. */\n logoutRoute?: string\n /** Base meta data to use for the Admin panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: {\n /**\n * Public path to an icon\n *\n * This image may be displayed in the browser next to the title of the page\n */\n favicon?: string\n /**\n * Public path to an image\n *\n * This image may be displayed as preview when the link is shared on social media\n */\n ogImage?: string\n /**\n * String to append to the <title> of admin pages\n * @example `\" - My Brand\"`\n */\n titleSuffix?: string\n }\n /** The slug of a Collection that you want be used to log in to the Admin dashboard. */\n user?: string\n }\n /** Custom Payload bin scripts can be injected via the config. */\n bin?: BinScriptConfig[]\n /**\n * Manage the datamodel of your application\n *\n * @see https://payloadcms.com/docs/configuration/collections#collection-configs\n */\n collections?: CollectionConfig[]\n /**\n * Replace the built-in components with custom ones\n */\n components?: { [key: string]: (() => JSX.Element) | JSX.Element }\n /**\n * Prefix a string to all cookies that Payload sets.\n *\n * @default \"payload\"\n */\n cookiePrefix?: string\n /** Either a whitelist array of URLS to allow CORS requests from, or a wildcard string ('*') to accept incoming requests from any domain. */\n cors?: '*' | string[]\n /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */\n csrf?: string[]\n\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /** Pass in a database adapter for use on this project. */\n db: DatabaseAdapterResult\n /** Enable to expose more detailed error information. */\n debug?: boolean\n /**\n * If a user does not specify `depth` while requesting a resource, this depth will be used.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 2\n */\n defaultDepth?: number\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @default 40000\n */\n defaultMaxTextLength?: number\n /** Default richtext editor to use for richText fields */\n editor: RichTextAdapter<any, any, any>\n /**\n * Email configuration options. This value is overridden by `email` in Payload.init if passed.\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailOptions\n /** Custom REST endpoints */\n endpoints?: Endpoint[]\n /**\n * @see https://payloadcms.com/docs/configuration/globals#global-configs\n */\n globals?: GlobalConfig[]\n /**\n * Manage the GraphQL API\n *\n * You can add your own GraphQL queries and mutations to Payload, making use of all the types that Payload has defined for you.\n *\n * @see https://payloadcms.com/docs/graphql/overview\n */\n graphQL?: {\n disable?: boolean\n disablePlaygroundInProduction?: boolean\n maxComplexity?: number\n /**\n * Function that returns an object containing keys to custom GraphQL mutations\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n mutations?: GraphQLExtension\n /**\n * Function that returns an object containing keys to custom GraphQL queries\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n queries?: GraphQLExtension\n }\n /**\n * Tap into Payload-wide hooks.\n *\n * @see https://payloadcms.com/docs/hooks/overview\n */\n hooks?: {\n afterError?: AfterErrorHook\n }\n /** i18n config settings */\n i18n?: I18nOptions\n /** Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. */\n indexSortableFields?: boolean\n /**\n * Translate your content to different languages/locales.\n *\n * @default false // disable localization\n */\n localization?: LocalizationConfig | false\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 10\n */\n maxDepth?: number\n /** A function that is called immediately following startup that receives the Payload instance as its only argument. */\n onInit?: (payload: Payload) => Promise<void> | void\n /**\n * An array of Payload plugins.\n *\n * @see https://payloadcms.com/docs/plugins/overview\n */\n plugins?: Plugin[]\n /** Control the routing structure that Payload binds itself to. */\n routes?: {\n /** @default \"/admin\" */\n admin?: string\n /** @default \"/api\" */\n api?: string\n /** @default \"/graphql\" */\n graphQL?: string\n /** @default \"/graphql-playground\" */\n graphQLPlayground?: string\n }\n /** Secure string that Payload will use for any encryption workflows */\n secret: string\n /**\n * Define the absolute URL of your app including the protocol, for example `https://example.org`.\n * No paths allowed, only protocol, domain and (optionally) port.\n *\n * @see https://payloadcms.com/docs/configuration/overview#options\n */\n serverURL?: string\n /**\n * Pass in a local copy of Sharp if you'd like to use it.\n *\n */\n sharp?: SharpDependency\n /** Send anonymous telemetry data about general usage. */\n telemetry?: boolean\n /** Control how typescript interfaces are generated from your collections. */\n typescript?: {\n /** Disable declare block in generated types file */\n declare?: false\n /** Filename to write the generated types to */\n outputFile?: string\n }\n /**\n * Customize the handling of incoming file uploads for collections that have uploads enabled.\n */\n upload?: ExpressFileUploadOptions\n}\n\nexport type SanitizedConfig = Omit<\n DeepRequired<Config>,\n 'collections' | 'endpoint' | 'globals' | 'i18n' | 'localization'\n> & {\n collections: SanitizedCollectionConfig[]\n endpoints: Endpoint[]\n globals: SanitizedGlobalConfig[]\n i18n: Required<I18nOptions>\n localization: SanitizedLocalizationConfig | false\n paths: {\n config: string\n configDir: string\n rawConfig: string\n }\n}\n\nexport type EditConfig =\n | (\n | {\n /**\n * Replace or modify individual nested routes, or add new ones:\n * + `Default` - `/admin/collections/:collection/:id`\n * + `API` - `/admin/collections/:collection/:id/api`\n * + `LivePreview` - `/admin/collections/:collection/:id/preview`\n * + `References` - `/admin/collections/:collection/:id/references`\n * + `Relationships` - `/admin/collections/:collection/:id/relationships`\n * + `Versions` - `/admin/collections/:collection/:id/versions`\n * + `Version` - `/admin/collections/:collection/:id/versions/:version`\n * + `CustomView` - `/admin/collections/:collection/:id/:path`\n */\n API?: EditViewComponent | Partial<EditViewConfig>\n Default?: EditViewComponent | Partial<EditViewConfig>\n LivePreview?: EditViewComponent | Partial<EditViewConfig>\n Version?: EditViewComponent | Partial<EditViewConfig>\n Versions?: EditViewComponent | Partial<EditViewConfig>\n // TODO: uncomment these as they are built\n // References?: EditView\n // Relationships?: EditView\n }\n | {\n [key: string]: EditViewConfig\n }\n )\n | EditViewComponent\n\nexport type EntityDescriptionComponent = CustomComponent\n\nexport type EntityDescriptionFunction = () => string\n\nexport type EntityDescription =\n | EntityDescriptionComponent\n | EntityDescriptionFunction\n | Record<string, string>\n | string\n"],"names":["hasTransport","emailConfig","transport","undefined","hasTransportOptions","transportOptions","serverProps"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAmGA;;;CAGC,GACD,OAAO,SAASA,aAAaC,WAAyB;IACpD,OAAO,AAACA,YAA+BC,SAAS,KAAKC;AACvD;AAEA;;;CAGC,GACD,OAAO,SAASC,oBACdH,WAAyB;IAEzB,OAAO,AAACA,YAAsCI,gBAAgB,KAAKF;AACrE;AAuLA,OAAO,MAAMG,cAAqC;IAAC;CAAU,CAAA"}
1
+ {"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type { I18nOptions, TFunction } from '@payloadcms/translations'\nimport type { Options as ExpressFileUploadOptions } from 'express-fileupload'\nimport type GraphQL from 'graphql'\nimport type { DestinationStream, LoggerOptions, P } from 'pino'\nimport type React from 'react'\nimport type { default as sharp } from 'sharp'\nimport type { DeepRequired } from 'ts-essentials'\n\nimport type { DocumentTab, RichTextAdapter } from '../admin/types.js'\nimport type { AdminView, ServerSideEditViewProps } from '../admin/views/types.js'\nimport type { User } from '../auth/types.js'\nimport type {\n AfterErrorHook,\n Collection,\n CollectionConfig,\n SanitizedCollectionConfig,\n} from '../collections/config/types.js'\nimport type { DatabaseAdapterResult } from '../database/types.js'\nimport type { EmailAdapter, SendEmailOptions } from '../email/types.js'\nimport type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { Payload } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\nimport type { PayloadLogger } from '../utilities/logger.js'\n\nexport type BinScriptConfig = {\n key: string\n scriptPath: string\n}\n\nexport type BinScript = (config: SanitizedConfig) => Promise<void> | void\n\ntype Prettify<T> = {\n [K in keyof T]: T[K]\n} & NonNullable<unknown>\n\n// eslint-disable-next-line no-use-before-define\nexport type Plugin = (config: Config) => Config | Promise<Config>\n\nexport type LivePreviewConfig = {\n /**\n Device breakpoints to use for the `iframe` of the Live Preview window.\n Options are displayed in the Live Preview toolbar.\n The `responsive` breakpoint is included by default.\n */\n breakpoints?: {\n height: number | string\n label: string\n name: string\n width: number | string\n }[]\n /**\n The URL of the frontend application. This will be rendered within an `iframe` as its `src`.\n Payload will send a `window.postMessage()` to this URL with the document data in real-time.\n The frontend application is responsible for receiving the message and updating the UI accordingly.\n Use the `useLivePreview` hook to get started in React applications.\n */\n url?:\n | ((args: {\n collectionConfig?: SanitizedCollectionConfig\n data: Record<string, any>\n globalConfig?: SanitizedGlobalConfig\n locale: Locale\n payload: Payload\n }) => Promise<string> | string)\n | string\n}\n\nexport type ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequest\n token: null | string\n}\n\nexport type GeneratePreviewURL = (\n doc: Record<string, unknown>,\n options: GeneratePreviewURLOptions,\n) => Promise<null | string> | null | string\n\nexport type GraphQLInfo = {\n Mutation: {\n fields: Record<string, any>\n name: string\n }\n Query: {\n fields: Record<string, any>\n name: string\n }\n collections: {\n [slug: number | string | symbol]: Collection\n }\n globals: Globals\n types: {\n arrayTypes: Record<string, GraphQL.GraphQLType>\n blockInputTypes: Record<string, GraphQL.GraphQLInputObjectType>\n blockTypes: Record<string, GraphQL.GraphQLObjectType>\n fallbackLocaleInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n groupTypes: Record<string, GraphQL.GraphQLObjectType>\n localeInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n tabTypes: Record<string, GraphQL.GraphQLObjectType>\n }\n}\nexport type GraphQLExtension = (\n graphQL: typeof GraphQL,\n context: {\n config: SanitizedConfig\n } & GraphQLInfo,\n) => Record<string, unknown>\n\nexport type InitOptions = {\n /**\n * Sometimes, with the local API, you might need to pass a config file directly, for example, serverless on Vercel\n * The passed config should match the config file, and if it doesn't, there could be mismatches between the admin UI\n * and the backend functionality\n */\n config: Promise<SanitizedConfig> | SanitizedConfig\n /**\n * Disable connect to the database on init\n */\n disableDBConnect?: boolean\n\n /**\n * Disable running of the `onInit` function\n */\n disableOnInit?: boolean\n\n /**\n * A previously instantiated logger instance. Must conform to the PayloadLogger interface which uses Pino\n * This allows you to bring your own logger instance and let payload use it\n */\n logger?: PayloadLogger\n\n loggerDestination?: DestinationStream\n\n /**\n * Specify options for the built-in Pino logger that Payload uses for internal logging.\n *\n * See Pino Docs for options: https://getpino.io/#/docs/api?id=options\n */\n loggerOptions?: LoggerOptions\n /**\n * A function that is called immediately following startup that receives the Payload instance as it's only argument.\n */\n onInit?: (payload: Payload) => Promise<void> | void\n}\n\n/**\n * This result is calculated on the server\n * and then sent to the client allowing the dashboard to show accessible data and actions.\n *\n * If the result is `true`, the user has access.\n * If the result is an object, it is interpreted as a MongoDB query.\n *\n * @example `{ createdBy: { equals: id } }`\n *\n * @example `{ tenant: { in: tenantIds } }`\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type AccessResult = Where | boolean\n\nexport type AccessArgs<T = any, U = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: T\n /** ID of the resource being accessed */\n id?: number | string\n /** If true, the request is for a static file */\n isReadingStaticFile?: boolean\n /** The original request that requires an access check */\n req: PayloadRequest<U>\n}\n\n/**\n * Access function runs on the server\n * and is sent to the client allowing the dashboard to show accessible data and actions.\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type Access<T = any, U = any> = (\n args: AccessArgs<T, U>,\n) => AccessResult | Promise<AccessResult>\n\n/** Web Request/Response model, but the the req has more payload specific properties added to it. */\nexport type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response\n\n/**\n * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints\n */\nexport type Endpoint<U = User> = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /**\n * Middleware that will be called when the path/method matches\n *\n * Compatible with Web Request/Response Model\n */\n handler: PayloadHandler\n /** HTTP method (or \"all\") */\n method: 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put'\n /**\n * Pattern that should match the path of the incoming request\n *\n * Compatible with the Express router\n */\n path: string\n /**\n * Please add \"root\" routes under the /api folder in the Payload Project.\n * https://nextjs.org/docs/app/api-reference/file-conventions/route\n *\n * @deprecated in 3.0\n */\n root?: never\n}\n\nexport type EditViewComponent = React.ComponentType<ServerSideEditViewProps>\n\nexport type EditViewConfig =\n | {\n /**\n * Add a new Edit view to the admin panel\n * i.e. you can render a custom view that has no tab, if desired\n * Or override a specific properties of an existing one\n * i.e. you can customize the `Default` view tab label, if desired\n */\n Tab?: DocumentTab\n path?: string\n }\n | {\n Component: EditViewComponent\n path: string\n }\n | {\n actions?: CustomComponent[]\n }\n\n/**\n * Override existing views\n * i.e. Dashboard, Account, API, LivePreview, etc.\n * Path is not available here\n * All Tab properties become optional\n * i.e. you can change just the label, if desired\n */\nexport type EditView = EditViewComponent | EditViewConfig\n\nexport type ServerProps = {\n payload: Payload\n}\n\nexport const serverProps: (keyof ServerProps)[] = ['payload']\n\nexport type CustomComponent<T extends any = any> = React.ComponentType<T & ServerProps>\n\nexport type Locale = {\n /**\n * value of supported locale\n * @example \"en\"\n */\n code: string\n /**\n * Code of another locale to use when reading documents with fallback, if not specified defaultLocale is used\n */\n fallbackLocale?: string\n /**\n * label of supported locale\n * @example \"English\"\n */\n label: Record<string, string> | string\n /**\n * if true, defaults textAligmnent on text fields to RTL\n */\n rtl?: boolean\n}\n\nexport type BaseLocalizationConfig = {\n /**\n * Locale for users that have not expressed their preference for a specific locale\n * @example `\"en\"`\n */\n defaultLocale: string\n /** Set to `true` to let missing values in localised fields fall back to the values in `defaultLocale` */\n fallback?: boolean\n}\n\nexport type LocalizationConfigWithNoLabels = Prettify<\n BaseLocalizationConfig & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n }\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n BaseLocalizationConfig & {\n /**\n * List of supported locales with labels\n * @example {\n * label: 'English',\n * value: 'en',\n * rtl: false\n * }\n */\n locales: Locale[]\n }\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n LocalizationConfigWithLabels & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n }\n>\n\n/**\n * @see https://payloadcms.com/docs/configuration/localization#localization\n */\nexport type LocalizationConfig = Prettify<\n LocalizationConfigWithLabels | LocalizationConfigWithNoLabels\n>\n\nexport type LabelFunction = ({ t }: { t: TFunction }) => string\n\nexport type SharpDependency = (\n input?:\n | ArrayBuffer\n | Buffer\n | Float32Array\n | Float64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | string,\n options?: sharp.SharpOptions,\n) => sharp.Sharp\n\n/**\n * This is the central configuration\n *\n * @see https://payloadcms.com/docs/configuration/overview\n */\nexport type Config = {\n /** Configure admin dashboard */\n admin?: {\n /** Automatically log in as a user when visiting the admin dashboard. */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n *\n */\n email: string\n /** The password of the user to login as */\n password: string\n /**\n * If set to true, the login credentials will be prefilled but the user will still need to click the login button.\n *\n * @default false\n */\n prefillOnly?: boolean\n }\n | false\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?: 'default' | 'gravatar' | React.ComponentType<any>\n\n /**\n * Add extra and/or replace built-in components with custom components\n *\n * @see https://payloadcms.com/docs/admin/components\n */\n components?: {\n /**\n * Replace the navigation with a custom component\n */\n Nav?: CustomComponent\n /**\n * Add custom components to the top right of the Admin Panel\n */\n actions?: CustomComponent[]\n /**\n * Add custom components after the collection overview\n */\n afterDashboard?: CustomComponent[]\n /**\n * Add custom components after the email/password field\n */\n afterLogin?: CustomComponent[]\n /**\n * Add custom components after the navigation links\n */\n afterNavLinks?: CustomComponent[]\n /**\n * Add custom components before the collection overview\n */\n beforeDashboard?: CustomComponent[]\n /**\n * Add custom components before the email/password field\n */\n beforeLogin?: CustomComponent[]\n /**\n * Add custom components before the navigation links\n */\n beforeNavLinks?: CustomComponent[]\n /** Replace graphical components */\n graphics?: {\n /** Replace the icon in the navigation */\n Icon?: CustomComponent\n /** Replace the logo on the login page */\n Logo?: CustomComponent\n }\n /** Replace logout related components */\n logout?: {\n /** Replace the logout button */\n Button?: CustomComponent\n }\n /**\n * Wrap the admin dashboard in custom context providers\n */\n providers?: React.ComponentType<{ children?: React.ReactNode }>[]\n /**\n * Replace or modify top-level admin routes, or add new ones:\n * + `Account` - `/admin/account`\n * + `Dashboard` - `/admin`\n * + `:path` - `/admin/:path`\n */\n views?: {\n /** Add custom admin views */\n [key: string]: AdminView\n /** Replace the account screen */\n Account?: AdminView\n /** Replace the admin homepage */\n Dashboard?: AdminView\n }\n }\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /** Global date format that will be used for all dates in the Admin panel. Any valid date-fns format pattern can be used. */\n dateFormat?: string\n /** If set to true, the entire Admin panel will be disabled. */\n disable?: boolean\n /** The route the user will be redirected to after being inactive for too long. */\n inactivityRoute?: string\n livePreview?: LivePreviewConfig & {\n collections?: string[]\n globals?: string[]\n }\n /** The route for the logout page. */\n logoutRoute?: string\n /** Base meta data to use for the Admin panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: {\n /**\n * Public path to an icon\n *\n * This image may be displayed in the browser next to the title of the page\n */\n favicon?: string\n /**\n * Public path to an image\n *\n * This image may be displayed as preview when the link is shared on social media\n */\n ogImage?: string\n /**\n * String to append to the <title> of admin pages\n * @example `\" - My Brand\"`\n */\n titleSuffix?: string\n }\n /** The slug of a Collection that you want be used to log in to the Admin dashboard. */\n user?: string\n }\n /** Custom Payload bin scripts can be injected via the config. */\n bin?: BinScriptConfig[]\n /**\n * Manage the datamodel of your application\n *\n * @see https://payloadcms.com/docs/configuration/collections#collection-configs\n */\n collections?: CollectionConfig[]\n /**\n * Replace the built-in components with custom ones\n */\n components?: { [key: string]: (() => JSX.Element) | JSX.Element }\n /**\n * Prefix a string to all cookies that Payload sets.\n *\n * @default \"payload\"\n */\n cookiePrefix?: string\n /** Either a whitelist array of URLS to allow CORS requests from, or a wildcard string ('*') to accept incoming requests from any domain. */\n cors?: '*' | string[]\n /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */\n csrf?: string[]\n\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n\n /** Pass in a database adapter for use on this project. */\n db: DatabaseAdapterResult\n /** Enable to expose more detailed error information. */\n debug?: boolean\n /**\n * If a user does not specify `depth` while requesting a resource, this depth will be used.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 2\n */\n defaultDepth?: number\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @default 40000\n */\n defaultMaxTextLength?: number\n /** Default richtext editor to use for richText fields */\n editor: RichTextAdapter<any, any, any>\n /**\n * Email Adapter\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailAdapter | Promise<EmailAdapter>\n /** Custom REST endpoints */\n endpoints?: Endpoint[]\n /**\n * @see https://payloadcms.com/docs/configuration/globals#global-configs\n */\n globals?: GlobalConfig[]\n /**\n * Manage the GraphQL API\n *\n * You can add your own GraphQL queries and mutations to Payload, making use of all the types that Payload has defined for you.\n *\n * @see https://payloadcms.com/docs/graphql/overview\n */\n graphQL?: {\n disable?: boolean\n disablePlaygroundInProduction?: boolean\n maxComplexity?: number\n /**\n * Function that returns an object containing keys to custom GraphQL mutations\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n mutations?: GraphQLExtension\n /**\n * Function that returns an object containing keys to custom GraphQL queries\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n queries?: GraphQLExtension\n }\n /**\n * Tap into Payload-wide hooks.\n *\n * @see https://payloadcms.com/docs/hooks/overview\n */\n hooks?: {\n afterError?: AfterErrorHook\n }\n /** i18n config settings */\n i18n?: I18nOptions\n /** Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. */\n indexSortableFields?: boolean\n /**\n * Translate your content to different languages/locales.\n *\n * @default false // disable localization\n */\n localization?: LocalizationConfig | false\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 10\n */\n maxDepth?: number\n /** A function that is called immediately following startup that receives the Payload instance as its only argument. */\n onInit?: (payload: Payload) => Promise<void> | void\n /**\n * An array of Payload plugins.\n *\n * @see https://payloadcms.com/docs/plugins/overview\n */\n plugins?: Plugin[]\n /** Control the routing structure that Payload binds itself to. */\n routes?: {\n /** @default \"/admin\" */\n admin?: string\n /** @default \"/api\" */\n api?: string\n /** @default \"/graphql\" */\n graphQL?: string\n /** @default \"/graphql-playground\" */\n graphQLPlayground?: string\n }\n /** Secure string that Payload will use for any encryption workflows */\n secret: string\n /**\n * Define the absolute URL of your app including the protocol, for example `https://example.org`.\n * No paths allowed, only protocol, domain and (optionally) port.\n *\n * @see https://payloadcms.com/docs/configuration/overview#options\n */\n serverURL?: string\n /**\n * Pass in a local copy of Sharp if you'd like to use it.\n *\n */\n sharp?: SharpDependency\n /** Send anonymous telemetry data about general usage. */\n telemetry?: boolean\n /** Control how typescript interfaces are generated from your collections. */\n typescript?: {\n /** Disable declare block in generated types file */\n declare?: false\n /** Filename to write the generated types to */\n outputFile?: string\n }\n /**\n * Customize the handling of incoming file uploads for collections that have uploads enabled.\n */\n upload?: ExpressFileUploadOptions\n}\n\nexport type SanitizedConfig = Omit<\n DeepRequired<Config>,\n 'collections' | 'endpoint' | 'globals' | 'i18n' | 'localization'\n> & {\n collections: SanitizedCollectionConfig[]\n endpoints: Endpoint[]\n globals: SanitizedGlobalConfig[]\n i18n: Required<I18nOptions>\n localization: SanitizedLocalizationConfig | false\n paths: {\n config: string\n configDir: string\n rawConfig: string\n }\n}\n\nexport type EditConfig =\n | (\n | {\n /**\n * Replace or modify individual nested routes, or add new ones:\n * + `Default` - `/admin/collections/:collection/:id`\n * + `API` - `/admin/collections/:collection/:id/api`\n * + `LivePreview` - `/admin/collections/:collection/:id/preview`\n * + `References` - `/admin/collections/:collection/:id/references`\n * + `Relationships` - `/admin/collections/:collection/:id/relationships`\n * + `Versions` - `/admin/collections/:collection/:id/versions`\n * + `Version` - `/admin/collections/:collection/:id/versions/:version`\n * + `CustomView` - `/admin/collections/:collection/:id/:path`\n */\n API?: EditViewComponent | Partial<EditViewConfig>\n Default?: EditViewComponent | Partial<EditViewConfig>\n LivePreview?: EditViewComponent | Partial<EditViewConfig>\n Version?: EditViewComponent | Partial<EditViewConfig>\n Versions?: EditViewComponent | Partial<EditViewConfig>\n // TODO: uncomment these as they are built\n // References?: EditView\n // Relationships?: EditView\n }\n | {\n [key: string]: EditViewConfig\n }\n )\n | EditViewComponent\n\nexport type EntityDescriptionComponent = CustomComponent\n\nexport type EntityDescriptionFunction = () => string\n\nexport type EntityDescription =\n | EntityDescriptionComponent\n | EntityDescriptionFunction\n | Record<string, string>\n | string\n\nexport type { EmailAdapter, SendEmailOptions }\n"],"names":["serverProps"],"rangeMappings":";;","mappings":"AA8PA,OAAO,MAAMA,cAAqC;IAAC;CAAU,CAAA"}
@@ -17,6 +17,7 @@ export interface BaseDatabaseAdapter {
17
17
  * Open the connection to the database
18
18
  */
19
19
  connect?: Connect;
20
+ count: Count;
20
21
  create: Create;
21
22
  createGlobal: CreateGlobal;
22
23
  createGlobalVersion: CreateGlobalVersion;
@@ -154,6 +155,15 @@ export type FindArgs = {
154
155
  where?: Where;
155
156
  };
156
157
  export type Find = <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>;
158
+ export type CountArgs = {
159
+ collection: string;
160
+ locale?: string;
161
+ req: PayloadRequest;
162
+ where?: Where;
163
+ };
164
+ export type Count = (args: CountArgs) => Promise<{
165
+ totalDocs: number;
166
+ }>;
157
167
  type BaseVersionArgs = {
158
168
  limit?: number;
159
169
  locale?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/database/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACjF,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,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,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,qBAAqB,CAAC,CAAC,GAAG,mBAAmB,IAAI;IAC3D,aAAa,EAAE,QAAQ,GAAG,MAAM,CAAA;IAChC,IAAI,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,CAAC,CAAA;CACxC,CAAA;AAED,MAAM,MAAM,gBAAgB,GACxB,CAAC,CAAC,IAAI,EAAE;IACN,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,KAAK,MAAM,CAAC,GACb,MAAM,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/database/types.ts"],"sourcesContent":["import type { TypeWithID } from '../collections/config/types.js'\nimport type { TypeWithID as GlobalsTypeWithID } from '../globals/config/types.js'\nimport type { Document, Payload, PayloadRequest, Where } from '../types/index.js'\nimport type { TypeWithVersion } from '../versions/types.js'\n\nexport type { TypeWithVersion }\n\nexport interface BaseDatabaseAdapter {\n /**\n * Start a transaction, requiring commitTransaction() to be called for any changes to be made.\n * @returns an identifier for the transaction or null if one cannot be established\n */\n beginTransaction?: BeginTransaction\n /**\n * Persist the changes made since the start of the transaction.\n */\n commitTransaction?: CommitTransaction\n\n /**\n * Open the connection to the database\n */\n connect?: Connect\n\n create: Create\n\n createGlobal: CreateGlobal\n\n createGlobalVersion: CreateGlobalVersion\n /**\n * Output a migration file\n */\n createMigration: CreateMigration\n\n createVersion: CreateVersion\n\n /**\n * Specify if the ID is a text or number field by default within this database adapter.\n */\n defaultIDType: 'number' | 'text'\n\n deleteMany: DeleteMany\n\n deleteOne: DeleteOne\n\n deleteVersions: DeleteVersions\n\n /**\n * Terminate the connection with the database\n */\n destroy?: Destroy\n\n find: <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>\n\n findGlobal: FindGlobal\n\n findGlobalVersions: FindGlobalVersions\n\n findOne: FindOne\n\n findVersions: FindVersions\n\n /**\n * Perform startup tasks required to interact with the database such as building Schema and models\n */\n init?: Init\n\n /**\n * Run any migration up functions that have not yet been performed and update the status\n */\n migrate: () => Promise<void>\n\n /**\n * Run any migration down functions that have been performed\n */\n migrateDown: () => Promise<void>\n\n /**\n * Drop the current database and run all migrate up functions\n */\n migrateFresh: (args: { forceAcceptWarning?: boolean }) => Promise<void>\n /**\n * Run all migration down functions before running up\n */\n migrateRefresh: () => Promise<void>\n\n /**\n * Run all migrate down functions\n */\n migrateReset: () => Promise<void>\n /**\n * Read the current state of migrations and output the result to show which have been run\n */\n migrateStatus: () => Promise<void>\n /**\n * Path to read and write migration files from\n */\n migrationDir: string\n /**\n * The name of the database adapter\n */\n name: string\n /**\n * reference to the instance of payload\n */\n payload: Payload\n\n queryDrafts: QueryDrafts\n /**\n * Abort any changes since the start of the transaction.\n */\n rollbackTransaction?: RollbackTransaction\n /**\n * A key-value store of all sessions open (used for transactions)\n */\n sessions?: {\n [id: string]: {\n db: unknown\n reject: () => Promise<void>\n resolve: () => Promise<void>\n }\n }\n\n updateGlobal: UpdateGlobal\n\n updateGlobalVersion: UpdateGlobalVersion\n\n updateOne: UpdateOne\n\n updateVersion: UpdateVersion\n}\n\nexport type Init = () => Promise<void> | void\n\ntype ConnectArgs = {\n hotReload: boolean\n}\n\nexport type Connect = (args?: ConnectArgs) => Promise<void>\n\nexport type Destroy = () => Promise<void>\n\nexport type CreateMigration = (args: {\n file?: string\n /**\n * Skips the prompt asking to create empty migrations\n */\n forceAcceptWarning?: boolean\n migrationName?: string\n payload: Payload\n}) => Promise<void>\n\nexport type Transaction = (\n callback: () => Promise<void>,\n options?: Record<string, unknown>,\n) => Promise<void>\n\nexport type BeginTransaction = (\n options?: Record<string, unknown>,\n) => Promise<null | number | string>\n\nexport type RollbackTransaction = (id: number | string) => Promise<void>\n\nexport type CommitTransaction = (id: number | string) => Promise<void>\n\nexport type QueryDraftsArgs = {\n collection: string\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequest\n sort?: string\n where?: Where\n}\n\nexport type QueryDrafts = <T = TypeWithID>(args: QueryDraftsArgs) => Promise<PaginatedDocs<T>>\n\nexport type FindOneArgs = {\n collection: string\n locale?: string\n req: PayloadRequest\n where?: Where\n}\n\nexport type FindOne = <T extends TypeWithID>(args: FindOneArgs) => Promise<T | null>\n\nexport type FindArgs = {\n collection: string\n /** Setting limit to 1 is equal to the previous Model.findOne(). Setting limit to 0 disables the limit */\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequest\n skip?: number\n sort?: string\n versions?: boolean\n where?: Where\n}\n\nexport type Find = <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>\n\ntype BaseVersionArgs = {\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequest\n skip?: number\n sort?: string\n versions?: boolean\n where?: Where\n}\n\nexport type FindVersionsArgs = BaseVersionArgs & {\n collection: string\n}\n\nexport type FindVersions = <T = TypeWithID>(\n args: FindVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type FindGlobalVersionsArgs = BaseVersionArgs & {\n global: string\n}\n\nexport type FindGlobalArgs = {\n locale?: string\n req: PayloadRequest\n slug: string\n where?: Where\n}\n\nexport type UpdateGlobalVersionArgs<T = TypeWithID> = {\n global: string\n locale?: string\n req: PayloadRequest\n versionData: T\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateGlobalVersion = <T extends TypeWithID = TypeWithID>(\n args: UpdateGlobalVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type FindGlobal = <T extends GlobalsTypeWithID = any>(args: FindGlobalArgs) => Promise<T>\n\nexport type CreateGlobalArgs<T extends GlobalsTypeWithID = any> = {\n data: T\n req: PayloadRequest\n slug: string\n}\nexport type CreateGlobal = <T extends GlobalsTypeWithID = any>(\n args: CreateGlobalArgs<T>,\n) => Promise<T>\n\nexport type UpdateGlobalArgs<T extends GlobalsTypeWithID = any> = {\n data: T\n req: PayloadRequest\n slug: string\n}\nexport type UpdateGlobal = <T extends GlobalsTypeWithID = any>(\n args: UpdateGlobalArgs<T>,\n) => Promise<T>\n// export type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type FindGlobalVersions = <T = TypeWithID>(\n args: FindGlobalVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type DeleteVersionsArgs = {\n collection: string\n locale?: string\n req: PayloadRequest\n sort?: {\n [key: string]: string\n }\n where: Where\n}\n\nexport type CreateVersionArgs<T = TypeWithID> = {\n autosave: boolean\n collectionSlug: string\n createdAt: string\n /** ID of the parent document for which the version should be created for */\n parent: number | string\n req: PayloadRequest\n updatedAt: string\n versionData: T\n}\n\nexport type CreateVersion = <T extends TypeWithID = TypeWithID>(\n args: CreateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateGlobalVersionArgs<T = TypeWithID> = {\n autosave: boolean\n createdAt: string\n globalSlug: string\n /** ID of the parent document for which the version should be created for */\n parent: number | string\n req: PayloadRequest\n updatedAt: string\n versionData: T\n}\n\nexport type CreateGlobalVersion = <T extends TypeWithID = TypeWithID>(\n args: CreateGlobalVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type DeleteVersions = (args: DeleteVersionsArgs) => Promise<void>\n\nexport type UpdateVersionArgs<T = TypeWithID> = {\n collection: string\n locale?: string\n req: PayloadRequest\n versionData: T\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateVersion = <T extends TypeWithID = TypeWithID>(\n args: UpdateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateArgs = {\n collection: string\n data: Record<string, unknown>\n draft?: boolean\n locale?: string\n req: PayloadRequest\n}\n\nexport type Create = (args: CreateArgs) => Promise<Document>\n\nexport type UpdateOneArgs = {\n collection: string\n data: Record<string, unknown>\n draft?: boolean\n locale?: string\n req: PayloadRequest\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type DeleteOneArgs = {\n collection: string\n req: PayloadRequest\n where: Where\n}\n\nexport type DeleteOne = (args: DeleteOneArgs) => Promise<Document>\n\nexport type DeleteManyArgs = {\n collection: string\n req: PayloadRequest\n where: Where\n}\n\nexport type DeleteMany = (args: DeleteManyArgs) => Promise<void>\n\nexport type Migration = MigrationData & {\n down: ({ payload, req }: { payload: Payload; req: PayloadRequest }) => Promise<boolean>\n up: ({ payload, req }: { payload: Payload; req: PayloadRequest }) => Promise<boolean>\n}\n\nexport type MigrationData = {\n batch?: number\n id?: string\n name: string\n}\n\nexport type PaginatedDocs<T = any> = {\n docs: T[]\n hasNextPage: boolean\n hasPrevPage: boolean\n limit: number\n nextPage?: null | number | undefined\n page?: number\n pagingCounter: number\n prevPage?: null | number | undefined\n totalDocs: number\n totalPages: number\n}\n\nexport type DatabaseAdapterResult<T = BaseDatabaseAdapter> = {\n defaultIDType: 'number' | 'text'\n init: (args: { payload: Payload }) => T\n}\n\nexport type DBIdentifierName =\n | ((Args: {\n /** The name of the parent table when using relational DBs */\n tableName?: string\n }) => string)\n | string\n"],"names":[],"rangeMappings":"","mappings":"AA8ZA,WAKU"}
1
+ {"version":3,"sources":["../../src/database/types.ts"],"sourcesContent":["import type { TypeWithID } from '../collections/config/types.js'\nimport type { TypeWithID as GlobalsTypeWithID } from '../globals/config/types.js'\nimport type { Document, Payload, PayloadRequest, Where } from '../types/index.js'\nimport type { TypeWithVersion } from '../versions/types.js'\n\nexport type { TypeWithVersion }\n\nexport interface BaseDatabaseAdapter {\n /**\n * Start a transaction, requiring commitTransaction() to be called for any changes to be made.\n * @returns an identifier for the transaction or null if one cannot be established\n */\n beginTransaction?: BeginTransaction\n /**\n * Persist the changes made since the start of the transaction.\n */\n commitTransaction?: CommitTransaction\n\n /**\n * Open the connection to the database\n */\n connect?: Connect\n\n count: Count\n\n create: Create\n\n createGlobal: CreateGlobal\n\n createGlobalVersion: CreateGlobalVersion\n /**\n * Output a migration file\n */\n createMigration: CreateMigration\n\n createVersion: CreateVersion\n\n /**\n * Specify if the ID is a text or number field by default within this database adapter.\n */\n defaultIDType: 'number' | 'text'\n\n deleteMany: DeleteMany\n\n deleteOne: DeleteOne\n\n deleteVersions: DeleteVersions\n\n /**\n * Terminate the connection with the database\n */\n destroy?: Destroy\n\n find: <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>\n\n findGlobal: FindGlobal\n\n findGlobalVersions: FindGlobalVersions\n\n findOne: FindOne\n\n findVersions: FindVersions\n\n /**\n * Perform startup tasks required to interact with the database such as building Schema and models\n */\n init?: Init\n\n /**\n * Run any migration up functions that have not yet been performed and update the status\n */\n migrate: () => Promise<void>\n\n /**\n * Run any migration down functions that have been performed\n */\n migrateDown: () => Promise<void>\n\n /**\n * Drop the current database and run all migrate up functions\n */\n migrateFresh: (args: { forceAcceptWarning?: boolean }) => Promise<void>\n /**\n * Run all migration down functions before running up\n */\n migrateRefresh: () => Promise<void>\n\n /**\n * Run all migrate down functions\n */\n migrateReset: () => Promise<void>\n /**\n * Read the current state of migrations and output the result to show which have been run\n */\n migrateStatus: () => Promise<void>\n /**\n * Path to read and write migration files from\n */\n migrationDir: string\n /**\n * The name of the database adapter\n */\n name: string\n /**\n * reference to the instance of payload\n */\n payload: Payload\n\n queryDrafts: QueryDrafts\n /**\n * Abort any changes since the start of the transaction.\n */\n rollbackTransaction?: RollbackTransaction\n /**\n * A key-value store of all sessions open (used for transactions)\n */\n sessions?: {\n [id: string]: {\n db: unknown\n reject: () => Promise<void>\n resolve: () => Promise<void>\n }\n }\n\n updateGlobal: UpdateGlobal\n\n updateGlobalVersion: UpdateGlobalVersion\n\n updateOne: UpdateOne\n\n updateVersion: UpdateVersion\n}\n\nexport type Init = () => Promise<void> | void\n\ntype ConnectArgs = {\n hotReload: boolean\n}\n\nexport type Connect = (args?: ConnectArgs) => Promise<void>\n\nexport type Destroy = () => Promise<void>\n\nexport type CreateMigration = (args: {\n file?: string\n /**\n * Skips the prompt asking to create empty migrations\n */\n forceAcceptWarning?: boolean\n migrationName?: string\n payload: Payload\n}) => Promise<void>\n\nexport type Transaction = (\n callback: () => Promise<void>,\n options?: Record<string, unknown>,\n) => Promise<void>\n\nexport type BeginTransaction = (\n options?: Record<string, unknown>,\n) => Promise<null | number | string>\n\nexport type RollbackTransaction = (id: number | string) => Promise<void>\n\nexport type CommitTransaction = (id: number | string) => Promise<void>\n\nexport type QueryDraftsArgs = {\n collection: string\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequest\n sort?: string\n where?: Where\n}\n\nexport type QueryDrafts = <T = TypeWithID>(args: QueryDraftsArgs) => Promise<PaginatedDocs<T>>\n\nexport type FindOneArgs = {\n collection: string\n locale?: string\n req: PayloadRequest\n where?: Where\n}\n\nexport type FindOne = <T extends TypeWithID>(args: FindOneArgs) => Promise<T | null>\n\nexport type FindArgs = {\n collection: string\n /** Setting limit to 1 is equal to the previous Model.findOne(). Setting limit to 0 disables the limit */\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequest\n skip?: number\n sort?: string\n versions?: boolean\n where?: Where\n}\n\nexport type Find = <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>\n\nexport type CountArgs = {\n collection: string\n locale?: string\n req: PayloadRequest\n where?: Where\n}\n\nexport type Count = (args: CountArgs) => Promise<{ totalDocs: number }>\n\ntype BaseVersionArgs = {\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequest\n skip?: number\n sort?: string\n versions?: boolean\n where?: Where\n}\n\nexport type FindVersionsArgs = BaseVersionArgs & {\n collection: string\n}\n\nexport type FindVersions = <T = TypeWithID>(\n args: FindVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type FindGlobalVersionsArgs = BaseVersionArgs & {\n global: string\n}\n\nexport type FindGlobalArgs = {\n locale?: string\n req: PayloadRequest\n slug: string\n where?: Where\n}\n\nexport type UpdateGlobalVersionArgs<T = TypeWithID> = {\n global: string\n locale?: string\n req: PayloadRequest\n versionData: T\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateGlobalVersion = <T extends TypeWithID = TypeWithID>(\n args: UpdateGlobalVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type FindGlobal = <T extends GlobalsTypeWithID = any>(args: FindGlobalArgs) => Promise<T>\n\nexport type CreateGlobalArgs<T extends GlobalsTypeWithID = any> = {\n data: T\n req: PayloadRequest\n slug: string\n}\nexport type CreateGlobal = <T extends GlobalsTypeWithID = any>(\n args: CreateGlobalArgs<T>,\n) => Promise<T>\n\nexport type UpdateGlobalArgs<T extends GlobalsTypeWithID = any> = {\n data: T\n req: PayloadRequest\n slug: string\n}\nexport type UpdateGlobal = <T extends GlobalsTypeWithID = any>(\n args: UpdateGlobalArgs<T>,\n) => Promise<T>\n// export type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type FindGlobalVersions = <T = TypeWithID>(\n args: FindGlobalVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type DeleteVersionsArgs = {\n collection: string\n locale?: string\n req: PayloadRequest\n sort?: {\n [key: string]: string\n }\n where: Where\n}\n\nexport type CreateVersionArgs<T = TypeWithID> = {\n autosave: boolean\n collectionSlug: string\n createdAt: string\n /** ID of the parent document for which the version should be created for */\n parent: number | string\n req: PayloadRequest\n updatedAt: string\n versionData: T\n}\n\nexport type CreateVersion = <T extends TypeWithID = TypeWithID>(\n args: CreateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateGlobalVersionArgs<T = TypeWithID> = {\n autosave: boolean\n createdAt: string\n globalSlug: string\n /** ID of the parent document for which the version should be created for */\n parent: number | string\n req: PayloadRequest\n updatedAt: string\n versionData: T\n}\n\nexport type CreateGlobalVersion = <T extends TypeWithID = TypeWithID>(\n args: CreateGlobalVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type DeleteVersions = (args: DeleteVersionsArgs) => Promise<void>\n\nexport type UpdateVersionArgs<T = TypeWithID> = {\n collection: string\n locale?: string\n req: PayloadRequest\n versionData: T\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateVersion = <T extends TypeWithID = TypeWithID>(\n args: UpdateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateArgs = {\n collection: string\n data: Record<string, unknown>\n draft?: boolean\n locale?: string\n req: PayloadRequest\n}\n\nexport type Create = (args: CreateArgs) => Promise<Document>\n\nexport type UpdateOneArgs = {\n collection: string\n data: Record<string, unknown>\n draft?: boolean\n locale?: string\n req: PayloadRequest\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type DeleteOneArgs = {\n collection: string\n req: PayloadRequest\n where: Where\n}\n\nexport type DeleteOne = (args: DeleteOneArgs) => Promise<Document>\n\nexport type DeleteManyArgs = {\n collection: string\n req: PayloadRequest\n where: Where\n}\n\nexport type DeleteMany = (args: DeleteManyArgs) => Promise<void>\n\nexport type Migration = MigrationData & {\n down: ({ payload, req }: { payload: Payload; req: PayloadRequest }) => Promise<boolean>\n up: ({ payload, req }: { payload: Payload; req: PayloadRequest }) => Promise<boolean>\n}\n\nexport type MigrationData = {\n batch?: number\n id?: string\n name: string\n}\n\nexport type PaginatedDocs<T = any> = {\n docs: T[]\n hasNextPage: boolean\n hasPrevPage: boolean\n limit: number\n nextPage?: null | number | undefined\n page?: number\n pagingCounter: number\n prevPage?: null | number | undefined\n totalDocs: number\n totalPages: number\n}\n\nexport type DatabaseAdapterResult<T = BaseDatabaseAdapter> = {\n defaultIDType: 'number' | 'text'\n init: (args: { payload: Payload }) => T\n}\n\nexport type DBIdentifierName =\n | ((Args: {\n /** The name of the parent table when using relational DBs */\n tableName?: string\n }) => string)\n | string\n"],"names":[],"rangeMappings":"","mappings":"AAyaA,WAKU"}
@@ -0,0 +1,3 @@
1
+ import type { EmailAdapter } from './types.js';
2
+ export declare const consoleEmailAdapter: EmailAdapter<void>;
3
+ //# sourceMappingURL=consoleEmailAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consoleEmailAdapter.d.ts","sourceRoot":"","sources":["../../src/email/consoleEmailAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAK9C,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,IAAI,CASjD,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { emailDefaults } from './defaults.js';
2
+ import { getStringifiedToAddress } from './getStringifiedToAddress.js';
3
+ export const consoleEmailAdapter = ({ payload })=>({
4
+ defaultFromAddress: emailDefaults.defaultFromAddress,
5
+ defaultFromName: emailDefaults.defaultFromName,
6
+ sendEmail: async (message)=>{
7
+ const stringifiedTo = getStringifiedToAddress(message);
8
+ const res = `Email attempted without being configured. To: '${stringifiedTo}', Subject: '${message.subject}'`;
9
+ payload.logger.info({
10
+ msg: res
11
+ });
12
+ return Promise.resolve();
13
+ }
14
+ });
15
+
16
+ //# sourceMappingURL=consoleEmailAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/email/consoleEmailAdapter.ts"],"sourcesContent":["import type { EmailAdapter } from './types.js'\n\nimport { emailDefaults } from './defaults.js'\nimport { getStringifiedToAddress } from './getStringifiedToAddress.js'\n\nexport const consoleEmailAdapter: EmailAdapter<void> = ({ payload }) => ({\n defaultFromAddress: emailDefaults.defaultFromAddress,\n defaultFromName: emailDefaults.defaultFromName,\n sendEmail: async (message) => {\n const stringifiedTo = getStringifiedToAddress(message)\n const res = `Email attempted without being configured. To: '${stringifiedTo}', Subject: '${message.subject}'`\n payload.logger.info({ msg: res })\n return Promise.resolve()\n },\n})\n"],"names":["emailDefaults","getStringifiedToAddress","consoleEmailAdapter","payload","defaultFromAddress","defaultFromName","sendEmail","message","stringifiedTo","res","subject","logger","info","msg","Promise","resolve"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAEA,SAASA,aAAa,QAAQ,gBAAe;AAC7C,SAASC,uBAAuB,QAAQ,+BAA8B;AAEtE,OAAO,MAAMC,sBAA0C,CAAC,EAAEC,OAAO,EAAE,GAAM,CAAA;QACvEC,oBAAoBJ,cAAcI,kBAAkB;QACpDC,iBAAiBL,cAAcK,eAAe;QAC9CC,WAAW,OAAOC;YAChB,MAAMC,gBAAgBP,wBAAwBM;YAC9C,MAAME,MAAM,CAAC,+CAA+C,EAAED,cAAc,aAAa,EAAED,QAAQG,OAAO,CAAC,CAAC,CAAC;YAC7GP,QAAQQ,MAAM,CAACC,IAAI,CAAC;gBAAEC,KAAKJ;YAAI;YAC/B,OAAOK,QAAQC,OAAO;QACxB;IACF,CAAA,EAAE"}
@@ -1,3 +1,3 @@
1
- import type { EmailOptions } from '../config/types.js';
2
- export declare const defaults: EmailOptions;
1
+ import type { InitializedEmailAdapter } from './types.js';
2
+ export declare const emailDefaults: Pick<InitializedEmailAdapter, 'defaultFromAddress' | 'defaultFromName'>;
3
3
  //# sourceMappingURL=defaults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/email/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,eAAO,MAAM,QAAQ,EAAE,YAGtB,CAAA"}
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/email/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAEzD,eAAO,MAAM,aAAa,EAAE,IAAI,CAC9B,uBAAuB,EACvB,oBAAoB,GAAG,iBAAiB,CAIzC,CAAA"}
@@ -1,6 +1,6 @@
1
- export const defaults = {
2
- fromAddress: 'info@payloadcms.com',
3
- fromName: 'Payload'
1
+ export const emailDefaults = {
2
+ defaultFromAddress: 'info@payloadcms.com',
3
+ defaultFromName: 'Payload'
4
4
  };
5
5
 
6
6
  //# sourceMappingURL=defaults.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/email/defaults.ts"],"sourcesContent":["import type { EmailOptions } from '../config/types.js'\n\nexport const defaults: EmailOptions = {\n fromAddress: 'info@payloadcms.com',\n fromName: 'Payload',\n}\n"],"names":["defaults","fromAddress","fromName"],"rangeMappings":";;;","mappings":"AAEA,OAAO,MAAMA,WAAyB;IACpCC,aAAa;IACbC,UAAU;AACZ,EAAC"}
1
+ {"version":3,"sources":["../../src/email/defaults.ts"],"sourcesContent":["import type { InitializedEmailAdapter } from './types.js'\n\nexport const emailDefaults: Pick<\n InitializedEmailAdapter,\n 'defaultFromAddress' | 'defaultFromName'\n> = {\n defaultFromAddress: 'info@payloadcms.com',\n defaultFromName: 'Payload',\n}\n"],"names":["emailDefaults","defaultFromAddress","defaultFromName"],"rangeMappings":";;;","mappings":"AAEA,OAAO,MAAMA,gBAGT;IACFC,oBAAoB;IACpBC,iBAAiB;AACnB,EAAC"}
@@ -0,0 +1,3 @@
1
+ import type { SendEmailOptions } from './types.js';
2
+ export declare const getStringifiedToAddress: (message: SendEmailOptions) => string | undefined;
3
+ //# sourceMappingURL=getStringifiedToAddress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStringifiedToAddress.d.ts","sourceRoot":"","sources":["../../src/email/getStringifiedToAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,eAAO,MAAM,uBAAuB,YAAa,gBAAgB,KAAG,MAAM,GAAG,SAoB5E,CAAA"}
@@ -0,0 +1,20 @@
1
+ export const getStringifiedToAddress = (message)=>{
2
+ let stringifiedTo;
3
+ if (typeof message.to === 'string') {
4
+ stringifiedTo = message.to;
5
+ } else if (Array.isArray(message.to)) {
6
+ stringifiedTo = message.to.map((to)=>{
7
+ if (typeof to === 'string') {
8
+ return to;
9
+ } else if (to.address) {
10
+ return to.address;
11
+ }
12
+ return '';
13
+ }).join(', ');
14
+ } else if (message.to.address) {
15
+ stringifiedTo = message.to.address;
16
+ }
17
+ return stringifiedTo;
18
+ };
19
+
20
+ //# sourceMappingURL=getStringifiedToAddress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/email/getStringifiedToAddress.ts"],"sourcesContent":["import type { SendEmailOptions } from './types.js'\n\nexport const getStringifiedToAddress = (message: SendEmailOptions): string | undefined => {\n let stringifiedTo: string | undefined\n\n if (typeof message.to === 'string') {\n stringifiedTo = message.to\n } else if (Array.isArray(message.to)) {\n stringifiedTo = message.to\n .map((to) => {\n if (typeof to === 'string') {\n return to\n } else if (to.address) {\n return to.address\n }\n return ''\n })\n .join(', ')\n } else if (message.to.address) {\n stringifiedTo = message.to.address\n }\n return stringifiedTo\n}\n"],"names":["getStringifiedToAddress","message","stringifiedTo","to","Array","isArray","map","address","join"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,0BAA0B,CAACC;IACtC,IAAIC;IAEJ,IAAI,OAAOD,QAAQE,EAAE,KAAK,UAAU;QAClCD,gBAAgBD,QAAQE,EAAE;IAC5B,OAAO,IAAIC,MAAMC,OAAO,CAACJ,QAAQE,EAAE,GAAG;QACpCD,gBAAgBD,QAAQE,EAAE,CACvBG,GAAG,CAAC,CAACH;YACJ,IAAI,OAAOA,OAAO,UAAU;gBAC1B,OAAOA;YACT,OAAO,IAAIA,GAAGI,OAAO,EAAE;gBACrB,OAAOJ,GAAGI,OAAO;YACnB;YACA,OAAO;QACT,GACCC,IAAI,CAAC;IACV,OAAO,IAAIP,QAAQE,EAAE,CAACI,OAAO,EAAE;QAC7BL,gBAAgBD,QAAQE,EAAE,CAACI,OAAO;IACpC;IACA,OAAOL;AACT,EAAC"}
@@ -1,3 +1,4 @@
1
- import type { SendMailOptions } from 'nodemailer';
2
- export default function sendEmail(message: SendMailOptions): Promise<unknown>;
1
+ import type { Payload } from '../types/index.js';
2
+ import type { SendEmailOptions } from './types.js';
3
+ export declare function sendEmail(this: Payload, message: SendEmailOptions): Promise<unknown>;
3
4
  //# sourceMappingURL=sendEmail.d.ts.map