payload 3.74.0-internal.8fd38f1 → 3.74.0-internal.b0ecd5c

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 (139) hide show
  1. package/dist/admin/elements/PublishButton.d.ts +2 -4
  2. package/dist/admin/elements/PublishButton.d.ts.map +1 -1
  3. package/dist/admin/elements/PublishButton.js.map +1 -1
  4. package/dist/admin/elements/UnpublishButton.d.ts +5 -0
  5. package/dist/admin/elements/UnpublishButton.d.ts.map +1 -0
  6. package/dist/admin/elements/UnpublishButton.js +3 -0
  7. package/dist/admin/elements/UnpublishButton.js.map +1 -0
  8. package/dist/admin/types.d.ts +2 -0
  9. package/dist/admin/types.d.ts.map +1 -1
  10. package/dist/admin/types.js.map +1 -1
  11. package/dist/auth/operations/forgotPassword.d.ts +3 -3
  12. package/dist/auth/operations/forgotPassword.d.ts.map +1 -1
  13. package/dist/auth/operations/forgotPassword.js.map +1 -1
  14. package/dist/auth/operations/local/forgotPassword.d.ts +4 -4
  15. package/dist/auth/operations/local/forgotPassword.d.ts.map +1 -1
  16. package/dist/auth/operations/local/forgotPassword.js.map +1 -1
  17. package/dist/auth/operations/local/login.d.ts +4 -6
  18. package/dist/auth/operations/local/login.d.ts.map +1 -1
  19. package/dist/auth/operations/local/login.js.map +1 -1
  20. package/dist/auth/operations/local/resetPassword.d.ts +4 -4
  21. package/dist/auth/operations/local/resetPassword.d.ts.map +1 -1
  22. package/dist/auth/operations/local/resetPassword.js.map +1 -1
  23. package/dist/auth/operations/local/unlock.d.ts +3 -3
  24. package/dist/auth/operations/local/unlock.d.ts.map +1 -1
  25. package/dist/auth/operations/local/unlock.js.map +1 -1
  26. package/dist/auth/operations/local/verifyEmail.d.ts +4 -4
  27. package/dist/auth/operations/local/verifyEmail.d.ts.map +1 -1
  28. package/dist/auth/operations/local/verifyEmail.js.map +1 -1
  29. package/dist/auth/operations/login.d.ts +8 -10
  30. package/dist/auth/operations/login.d.ts.map +1 -1
  31. package/dist/auth/operations/login.js.map +1 -1
  32. package/dist/auth/operations/registerFirstUser.d.ts +3 -3
  33. package/dist/auth/operations/registerFirstUser.d.ts.map +1 -1
  34. package/dist/auth/operations/registerFirstUser.js.map +1 -1
  35. package/dist/auth/operations/resetPassword.d.ts +2 -2
  36. package/dist/auth/operations/resetPassword.d.ts.map +1 -1
  37. package/dist/auth/operations/resetPassword.js.map +1 -1
  38. package/dist/auth/operations/unlock.d.ts +3 -3
  39. package/dist/auth/operations/unlock.d.ts.map +1 -1
  40. package/dist/auth/operations/unlock.js.map +1 -1
  41. package/dist/bin/generateImportMap/iterateCollections.d.ts.map +1 -1
  42. package/dist/bin/generateImportMap/iterateCollections.js +1 -0
  43. package/dist/bin/generateImportMap/iterateCollections.js.map +1 -1
  44. package/dist/bin/generateImportMap/iterateGlobals.d.ts.map +1 -1
  45. package/dist/bin/generateImportMap/iterateGlobals.js +1 -0
  46. package/dist/bin/generateImportMap/iterateGlobals.js.map +1 -1
  47. package/dist/collections/config/types.d.ts +9 -4
  48. package/dist/collections/config/types.d.ts.map +1 -1
  49. package/dist/collections/config/types.js.map +1 -1
  50. package/dist/collections/operations/create.d.ts.map +1 -1
  51. package/dist/collections/operations/create.js +9 -0
  52. package/dist/collections/operations/create.js.map +1 -1
  53. package/dist/collections/operations/delete.d.ts.map +1 -1
  54. package/dist/collections/operations/delete.js +9 -0
  55. package/dist/collections/operations/delete.js.map +1 -1
  56. package/dist/collections/operations/deleteByID.d.ts.map +1 -1
  57. package/dist/collections/operations/deleteByID.js +9 -0
  58. package/dist/collections/operations/deleteByID.js.map +1 -1
  59. package/dist/collections/operations/find.d.ts.map +1 -1
  60. package/dist/collections/operations/find.js +9 -0
  61. package/dist/collections/operations/find.js.map +1 -1
  62. package/dist/collections/operations/findByID.d.ts.map +1 -1
  63. package/dist/collections/operations/findByID.js +9 -0
  64. package/dist/collections/operations/findByID.js.map +1 -1
  65. package/dist/collections/operations/local/count.d.ts.map +1 -1
  66. package/dist/collections/operations/local/count.js.map +1 -1
  67. package/dist/collections/operations/local/countVersions.d.ts.map +1 -1
  68. package/dist/collections/operations/local/countVersions.js.map +1 -1
  69. package/dist/collections/operations/local/create.d.ts.map +1 -1
  70. package/dist/collections/operations/local/create.js.map +1 -1
  71. package/dist/collections/operations/local/delete.d.ts.map +1 -1
  72. package/dist/collections/operations/local/delete.js.map +1 -1
  73. package/dist/collections/operations/local/duplicate.d.ts.map +1 -1
  74. package/dist/collections/operations/local/duplicate.js.map +1 -1
  75. package/dist/collections/operations/local/find.d.ts.map +1 -1
  76. package/dist/collections/operations/local/find.js.map +1 -1
  77. package/dist/collections/operations/local/findByID.d.ts.map +1 -1
  78. package/dist/collections/operations/local/findByID.js.map +1 -1
  79. package/dist/collections/operations/local/findDistinct.d.ts.map +1 -1
  80. package/dist/collections/operations/local/findDistinct.js.map +1 -1
  81. package/dist/collections/operations/local/findVersionByID.d.ts.map +1 -1
  82. package/dist/collections/operations/local/findVersionByID.js.map +1 -1
  83. package/dist/collections/operations/local/findVersions.d.ts.map +1 -1
  84. package/dist/collections/operations/local/findVersions.js.map +1 -1
  85. package/dist/collections/operations/local/restoreVersion.d.ts.map +1 -1
  86. package/dist/collections/operations/local/restoreVersion.js.map +1 -1
  87. package/dist/collections/operations/local/update.d.ts.map +1 -1
  88. package/dist/collections/operations/local/update.js.map +1 -1
  89. package/dist/collections/operations/update.d.ts.map +1 -1
  90. package/dist/collections/operations/update.js +10 -1
  91. package/dist/collections/operations/update.js.map +1 -1
  92. package/dist/collections/operations/updateByID.d.ts.map +1 -1
  93. package/dist/collections/operations/updateByID.js +9 -0
  94. package/dist/collections/operations/updateByID.js.map +1 -1
  95. package/dist/config/sanitize.js +1 -1
  96. package/dist/config/sanitize.js.map +1 -1
  97. package/dist/fields/baseFields/slug/index.js +1 -1
  98. package/dist/fields/baseFields/slug/index.js.map +1 -1
  99. package/dist/folders/addFolderFieldToCollection.js +2 -2
  100. package/dist/folders/addFolderFieldToCollection.js.map +1 -1
  101. package/dist/folders/createFolderCollection.js +1 -1
  102. package/dist/folders/createFolderCollection.js.map +1 -1
  103. package/dist/globals/config/types.d.ts +8 -3
  104. package/dist/globals/config/types.d.ts.map +1 -1
  105. package/dist/globals/config/types.js.map +1 -1
  106. package/dist/globals/operations/local/countVersions.d.ts.map +1 -1
  107. package/dist/globals/operations/local/countVersions.js.map +1 -1
  108. package/dist/globals/operations/local/findOne.d.ts.map +1 -1
  109. package/dist/globals/operations/local/findOne.js.map +1 -1
  110. package/dist/globals/operations/local/findVersionByID.d.ts.map +1 -1
  111. package/dist/globals/operations/local/findVersionByID.js.map +1 -1
  112. package/dist/globals/operations/local/findVersions.d.ts.map +1 -1
  113. package/dist/globals/operations/local/findVersions.js.map +1 -1
  114. package/dist/globals/operations/local/restoreVersion.d.ts.map +1 -1
  115. package/dist/globals/operations/local/restoreVersion.js.map +1 -1
  116. package/dist/globals/operations/local/update.d.ts.map +1 -1
  117. package/dist/globals/operations/local/update.js.map +1 -1
  118. package/dist/index.bundled.d.ts +55 -42
  119. package/dist/index.d.ts +9 -6
  120. package/dist/index.d.ts.map +1 -1
  121. package/dist/index.js +1 -1
  122. package/dist/index.js.map +1 -1
  123. package/dist/query-presets/config.js +6 -6
  124. package/dist/query-presets/config.js.map +1 -1
  125. package/dist/query-presets/constraints.js +1 -1
  126. package/dist/query-presets/constraints.js.map +1 -1
  127. package/dist/utilities/addSelectGenericsToGeneratedTypes.spec.js +4 -6
  128. package/dist/utilities/addSelectGenericsToGeneratedTypes.spec.js.map +1 -1
  129. package/dist/utilities/configToJSONSchema.d.ts.map +1 -1
  130. package/dist/utilities/configToJSONSchema.js +20 -21
  131. package/dist/utilities/configToJSONSchema.js.map +1 -1
  132. package/dist/utilities/createLocalReq.d.ts.map +1 -1
  133. package/dist/utilities/createLocalReq.js +8 -0
  134. package/dist/utilities/createLocalReq.js.map +1 -1
  135. package/dist/utilities/traverseFields.js +1 -1
  136. package/dist/utilities/traverseFields.js.map +1 -1
  137. package/dist/utilities/traverseFields.spec.js +53 -0
  138. package/dist/utilities/traverseFields.spec.js.map +1 -0
  139. package/package.json +3 -3
@@ -1,7 +1,5 @@
1
1
  import type { ServerProps } from '../../config/types.js';
2
- export type PublishButtonClientProps = {
3
- label?: string;
4
- };
2
+ export type PublishButtonClientProps = {};
5
3
  export type PublishButtonServerPropsOnly = {} & ServerProps;
6
- export type PublishButtonServerProps = PublishButtonClientProps & PublishButtonServerPropsOnly;
4
+ export type PublishButtonServerProps = PublishButtonServerPropsOnly;
7
5
  //# sourceMappingURL=PublishButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PublishButton.d.ts","sourceRoot":"","sources":["../../../src/admin/elements/PublishButton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,EAAE,GAAG,WAAW,CAAA;AAE3D,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,GAAG,4BAA4B,CAAA"}
1
+ {"version":3,"file":"PublishButton.d.ts","sourceRoot":"","sources":["../../../src/admin/elements/PublishButton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,MAAM,wBAAwB,GAAG,EAAE,CAAA;AAEzC,MAAM,MAAM,4BAA4B,GAAG,EAAE,GAAG,WAAW,CAAA;AAE3D,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/elements/PublishButton.ts"],"sourcesContent":["import type { ServerProps } from '../../config/types.js'\n\nexport type PublishButtonClientProps = {\n label?: string\n}\n\nexport type PublishButtonServerPropsOnly = {} & ServerProps\n\nexport type PublishButtonServerProps = PublishButtonClientProps & PublishButtonServerPropsOnly\n"],"names":[],"mappings":"AAQA,WAA8F"}
1
+ {"version":3,"sources":["../../../src/admin/elements/PublishButton.ts"],"sourcesContent":["import type { ServerProps } from '../../config/types.js'\n\nexport type PublishButtonClientProps = {}\n\nexport type PublishButtonServerPropsOnly = {} & ServerProps\n\nexport type PublishButtonServerProps = PublishButtonServerPropsOnly\n"],"names":[],"mappings":"AAMA,WAAmE"}
@@ -0,0 +1,5 @@
1
+ import type { ServerProps } from '../../config/types.js';
2
+ export type UnpublishButtonClientProps = {};
3
+ export type UnpublishButtonServerPropsOnly = {} & ServerProps;
4
+ export type UnpublishButtonServerProps = UnpublishButtonServerPropsOnly;
5
+ //# sourceMappingURL=UnpublishButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnpublishButton.d.ts","sourceRoot":"","sources":["../../../src/admin/elements/UnpublishButton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,MAAM,0BAA0B,GAAG,EAAE,CAAA;AAE3C,MAAM,MAAM,8BAA8B,GAAG,EAAE,GAAG,WAAW,CAAA;AAE7D,MAAM,MAAM,0BAA0B,GAAG,8BAA8B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=UnpublishButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/admin/elements/UnpublishButton.ts"],"sourcesContent":["import type { ServerProps } from '../../config/types.js'\n\nexport type UnpublishButtonClientProps = {}\n\nexport type UnpublishButtonServerPropsOnly = {} & ServerProps\n\nexport type UnpublishButtonServerProps = UnpublishButtonServerPropsOnly\n"],"names":[],"mappings":"AAMA,WAAuE"}
@@ -43,6 +43,7 @@ export type { SaveButtonClientProps, SaveButtonServerProps, SaveButtonServerProp
43
43
  export type { SaveDraftButtonClientProps, SaveDraftButtonServerProps, SaveDraftButtonServerPropsOnly, } from './elements/SaveDraftButton.js';
44
44
  export type { CustomStatus } from './elements/Status.js';
45
45
  export type { Column } from './elements/Table.js';
46
+ export type { UnpublishButtonClientProps, UnpublishButtonServerProps, UnpublishButtonServerPropsOnly, } from './elements/UnpublishButton.js';
46
47
  export type { CustomUpload } from './elements/Upload.js';
47
48
  export type { WithServerSidePropsComponent, WithServerSidePropsComponentProps, } from './elements/WithServerSideProps.js';
48
49
  export type { ArrayFieldClientComponent, ArrayFieldClientProps, ArrayFieldDescriptionClientComponent, ArrayFieldDescriptionServerComponent, ArrayFieldDiffClientComponent, ArrayFieldDiffServerComponent, ArrayFieldErrorClientComponent, ArrayFieldErrorServerComponent, ArrayFieldLabelClientComponent, ArrayFieldLabelServerComponent, ArrayFieldServerComponent, ArrayFieldServerProps, } from './fields/Array.js';
@@ -146,6 +147,7 @@ export type DocumentSlots = {
146
147
  SaveButton?: React.ReactNode;
147
148
  SaveDraftButton?: React.ReactNode;
148
149
  Status?: React.ReactNode;
150
+ UnpublishButton?: React.ReactNode;
149
151
  Upload?: React.ReactNode;
150
152
  UploadControls?: React.ReactNode;
151
153
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,WAAW,EACX,KAAK,EACL,UAAU,EACV,GAAG,EACJ,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,K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EACxB,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,EAC9B,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACb,6BAA6B,GAC9B,MAAM,iBAAiB,CAAA;AAExB,KAAK,UAAU,GAAG,EAAE,GAAG,MAAM,CAAA;AAC7B,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B,UAAU,EACR;IACE,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB,GACD,KAAK,GACL,KAAK,GACL,GAAG,CACN,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,GAAG,CACpC,UAAU,EACR;IACE,MAAM,EAAE,WAAW,EAAE,CAAA;CACtB,GACD,WAAW,GACX,WAAW,GACX,SAAS,CACZ,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,CAAC,EAAE,UAAU,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC9B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["import type { AcceptedLanguages, I18nClient } from '@payloadcms/translations'\nimport type React from 'react'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type { TypeWithID } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type {\n Block,\n ClientBlock,\n ClientField,\n Field,\n FieldTypes,\n Tab,\n} from '../fields/config/types.js'\nimport type { JsonObject } from '../types/index.js'\nimport type { ClientTab } from './fields/Tabs.js'\nimport type {\n BuildFormStateArgs,\n Data,\n FieldState,\n FieldStateWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n} from './forms/Form.js'\n\nexport type {\n /**\n * @deprecated\n * The `CustomPreviewButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPreviewButton,\n /**\n * @deprecated\n * The `CustomPublishButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPublishButton,\n /**\n * @deprecated\n * The `CustomSaveButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveButton,\n /**\n * @deprecated\n * The `CustomSaveDraftButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveDraftButton,\n} from '../config/types.js'\nexport type { DefaultCellComponentProps, DefaultServerCellComponentProps } from './elements/Cell.js'\nexport type { ConditionalDateProps } from './elements/DatePicker.js'\nexport type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js'\nexport type {\n EditMenuItemsClientProps,\n EditMenuItemsServerProps,\n EditMenuItemsServerPropsOnly,\n} from './elements/EditMenuItems.js'\nexport type { NavGroupPreferences, NavPreferences } from './elements/Nav.js'\nexport type {\n PreviewButtonClientProps,\n PreviewButtonServerProps,\n PreviewButtonServerPropsOnly,\n} from './elements/PreviewButton.js'\nexport type {\n PublishButtonClientProps,\n PublishButtonServerProps,\n PublishButtonServerPropsOnly,\n} from './elements/PublishButton.js'\nexport type {\n SaveButtonClientProps,\n SaveButtonServerProps,\n SaveButtonServerPropsOnly,\n} from './elements/SaveButton.js'\nexport type {\n SaveDraftButtonClientProps,\n SaveDraftButtonServerProps,\n SaveDraftButtonServerPropsOnly,\n} from './elements/SaveDraftButton.js'\n\nexport type { CustomStatus } from './elements/Status.js'\n\nexport type { Column } from './elements/Table.js'\n\nexport type { CustomUpload } from './elements/Upload.js'\n\nexport type {\n WithServerSidePropsComponent,\n WithServerSidePropsComponentProps,\n} from './elements/WithServerSideProps.js'\n\nexport type {\n ArrayFieldClientComponent,\n ArrayFieldClientProps,\n ArrayFieldDescriptionClientComponent,\n ArrayFieldDescriptionServerComponent,\n ArrayFieldDiffClientComponent,\n ArrayFieldDiffServerComponent,\n ArrayFieldErrorClientComponent,\n ArrayFieldErrorServerComponent,\n ArrayFieldLabelClientComponent,\n ArrayFieldLabelServerComponent,\n ArrayFieldServerComponent,\n ArrayFieldServerProps,\n} from './fields/Array.js'\n\nexport type {\n BlockRowLabelClientComponent,\n BlockRowLabelServerComponent,\n BlocksFieldClientComponent,\n BlocksFieldClientProps,\n BlocksFieldDescriptionClientComponent,\n BlocksFieldDescriptionServerComponent,\n BlocksFieldDiffClientComponent,\n BlocksFieldDiffServerComponent,\n BlocksFieldErrorClientComponent,\n BlocksFieldErrorServerComponent,\n BlocksFieldLabelClientComponent,\n BlocksFieldLabelServerComponent,\n BlocksFieldServerComponent,\n BlocksFieldServerProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldClientComponent,\n CheckboxFieldClientProps,\n CheckboxFieldDescriptionClientComponent,\n CheckboxFieldDescriptionServerComponent,\n CheckboxFieldDiffClientComponent,\n CheckboxFieldDiffServerComponent,\n CheckboxFieldErrorClientComponent,\n CheckboxFieldErrorServerComponent,\n CheckboxFieldLabelClientComponent,\n CheckboxFieldLabelServerComponent,\n CheckboxFieldServerComponent,\n CheckboxFieldServerProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldClientComponent,\n CodeFieldClientProps,\n CodeFieldDescriptionClientComponent,\n CodeFieldDescriptionServerComponent,\n CodeFieldDiffClientComponent,\n CodeFieldDiffServerComponent,\n CodeFieldErrorClientComponent,\n CodeFieldErrorServerComponent,\n CodeFieldLabelClientComponent,\n CodeFieldLabelServerComponent,\n CodeFieldServerComponent,\n CodeFieldServerProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldClientComponent,\n CollapsibleFieldClientProps,\n CollapsibleFieldDescriptionClientComponent,\n CollapsibleFieldDescriptionServerComponent,\n CollapsibleFieldDiffClientComponent,\n CollapsibleFieldDiffServerComponent,\n CollapsibleFieldErrorClientComponent,\n CollapsibleFieldErrorServerComponent,\n CollapsibleFieldLabelClientComponent,\n CollapsibleFieldLabelServerComponent,\n CollapsibleFieldServerComponent,\n CollapsibleFieldServerProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldClientComponent,\n DateFieldClientProps,\n DateFieldDescriptionClientComponent,\n DateFieldDescriptionServerComponent,\n DateFieldDiffClientComponent,\n DateFieldDiffServerComponent,\n DateFieldErrorClientComponent,\n DateFieldErrorServerComponent,\n DateFieldLabelClientComponent,\n DateFieldLabelServerComponent,\n DateFieldServerComponent,\n DateFieldServerProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldClientComponent,\n EmailFieldClientProps,\n EmailFieldDescriptionClientComponent,\n EmailFieldDescriptionServerComponent,\n EmailFieldDiffClientComponent,\n EmailFieldDiffServerComponent,\n EmailFieldErrorClientComponent,\n EmailFieldErrorServerComponent,\n EmailFieldLabelClientComponent,\n EmailFieldLabelServerComponent,\n EmailFieldServerComponent,\n EmailFieldServerProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldClientComponent,\n GroupFieldClientProps,\n GroupFieldDescriptionClientComponent,\n GroupFieldDescriptionServerComponent,\n GroupFieldDiffClientComponent,\n GroupFieldDiffServerComponent,\n GroupFieldErrorClientComponent,\n GroupFieldErrorServerComponent,\n GroupFieldLabelClientComponent,\n GroupFieldLabelServerComponent,\n GroupFieldServerComponent,\n GroupFieldServerProps,\n} from './fields/Group.js'\n\nexport type { HiddenFieldProps } from './fields/Hidden.js'\n\nexport type {\n JoinFieldClientComponent,\n JoinFieldClientProps,\n JoinFieldDescriptionClientComponent,\n JoinFieldDescriptionServerComponent,\n JoinFieldDiffClientComponent,\n JoinFieldDiffServerComponent,\n JoinFieldErrorClientComponent,\n JoinFieldErrorServerComponent,\n JoinFieldLabelClientComponent,\n JoinFieldLabelServerComponent,\n JoinFieldServerComponent,\n JoinFieldServerProps,\n} from './fields/Join.js'\n\nexport type {\n JSONFieldClientComponent,\n JSONFieldClientProps,\n JSONFieldDescriptionClientComponent,\n JSONFieldDescriptionServerComponent,\n JSONFieldDiffClientComponent,\n JSONFieldDiffServerComponent,\n JSONFieldErrorClientComponent,\n JSONFieldErrorServerComponent,\n JSONFieldLabelClientComponent,\n JSONFieldLabelServerComponent,\n JSONFieldServerComponent,\n JSONFieldServerProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldClientComponent,\n NumberFieldClientProps,\n NumberFieldDescriptionClientComponent,\n NumberFieldDescriptionServerComponent,\n NumberFieldDiffClientComponent,\n NumberFieldDiffServerComponent,\n NumberFieldErrorClientComponent,\n NumberFieldErrorServerComponent,\n NumberFieldLabelClientComponent,\n NumberFieldLabelServerComponent,\n NumberFieldServerComponent,\n NumberFieldServerProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldClientComponent,\n PointFieldClientProps,\n PointFieldDescriptionClientComponent,\n PointFieldDescriptionServerComponent,\n PointFieldDiffClientComponent,\n PointFieldDiffServerComponent,\n PointFieldErrorClientComponent,\n PointFieldErrorServerComponent,\n PointFieldLabelClientComponent,\n PointFieldLabelServerComponent,\n PointFieldServerComponent,\n PointFieldServerProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldClientComponent,\n RadioFieldClientProps,\n RadioFieldDescriptionClientComponent,\n RadioFieldDescriptionServerComponent,\n RadioFieldDiffClientComponent,\n RadioFieldDiffServerComponent,\n RadioFieldErrorClientComponent,\n RadioFieldErrorServerComponent,\n RadioFieldLabelClientComponent,\n RadioFieldLabelServerComponent,\n RadioFieldServerComponent,\n RadioFieldServerProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldClientComponent,\n RelationshipFieldClientProps,\n RelationshipFieldDescriptionClientComponent,\n RelationshipFieldDescriptionServerComponent,\n RelationshipFieldDiffClientComponent,\n RelationshipFieldDiffServerComponent,\n RelationshipFieldErrorClientComponent,\n RelationshipFieldErrorServerComponent,\n RelationshipFieldLabelClientComponent,\n RelationshipFieldLabelServerComponent,\n RelationshipFieldServerComponent,\n RelationshipFieldServerProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextFieldClientComponent,\n RichTextFieldClientProps,\n RichTextFieldDescriptionClientComponent,\n RichTextFieldDescriptionServerComponent,\n RichTextFieldDiffClientComponent,\n RichTextFieldDiffServerComponent,\n RichTextFieldErrorClientComponent,\n RichTextFieldErrorServerComponent,\n RichTextFieldLabelClientComponent,\n RichTextFieldLabelServerComponent,\n RichTextFieldServerComponent,\n RichTextFieldServerProps,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldClientComponent,\n RowFieldClientProps,\n RowFieldDescriptionClientComponent,\n RowFieldDescriptionServerComponent,\n RowFieldDiffClientComponent,\n RowFieldDiffServerComponent,\n RowFieldErrorClientComponent,\n RowFieldErrorServerComponent,\n RowFieldLabelClientComponent,\n RowFieldLabelServerComponent,\n RowFieldServerComponent,\n RowFieldServerProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldClientComponent,\n SelectFieldClientProps,\n SelectFieldDescriptionClientComponent,\n SelectFieldDescriptionServerComponent,\n SelectFieldDiffClientComponent,\n SelectFieldDiffServerComponent,\n SelectFieldErrorClientComponent,\n SelectFieldErrorServerComponent,\n SelectFieldLabelClientComponent,\n SelectFieldLabelServerComponent,\n SelectFieldServerComponent,\n SelectFieldServerProps,\n} from './fields/Select.js'\n\nexport type {\n ClientTab,\n TabsFieldClientComponent,\n TabsFieldClientProps,\n TabsFieldDescriptionClientComponent,\n TabsFieldDescriptionServerComponent,\n TabsFieldDiffClientComponent,\n TabsFieldDiffServerComponent,\n TabsFieldErrorClientComponent,\n TabsFieldErrorServerComponent,\n TabsFieldLabelClientComponent,\n TabsFieldLabelServerComponent,\n TabsFieldServerComponent,\n TabsFieldServerProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldClientComponent,\n TextFieldClientProps,\n TextFieldDescriptionClientComponent,\n TextFieldDescriptionServerComponent,\n TextFieldDiffClientComponent,\n TextFieldDiffServerComponent,\n TextFieldErrorClientComponent,\n TextFieldErrorServerComponent,\n TextFieldLabelClientComponent,\n TextFieldLabelServerComponent,\n TextFieldServerComponent,\n TextFieldServerProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldClientComponent,\n TextareaFieldClientProps,\n TextareaFieldDescriptionClientComponent,\n TextareaFieldDescriptionServerComponent,\n TextareaFieldDiffClientComponent,\n TextareaFieldDiffServerComponent,\n TextareaFieldErrorClientComponent,\n TextareaFieldErrorServerComponent,\n TextareaFieldLabelClientComponent,\n TextareaFieldLabelServerComponent,\n TextareaFieldServerComponent,\n TextareaFieldServerProps,\n} from './fields/Textarea.js'\n\nexport type {\n UIFieldClientComponent,\n UIFieldClientProps,\n UIFieldDiffClientComponent,\n UIFieldDiffServerComponent,\n UIFieldServerComponent,\n UIFieldServerProps,\n} from './fields/UI.js'\n\nexport type {\n UploadFieldClientComponent,\n UploadFieldClientProps,\n UploadFieldDescriptionClientComponent,\n UploadFieldDescriptionServerComponent,\n UploadFieldDiffClientComponent,\n UploadFieldDiffServerComponent,\n UploadFieldErrorClientComponent,\n UploadFieldErrorServerComponent,\n UploadFieldLabelClientComponent,\n UploadFieldLabelServerComponent,\n UploadFieldServerComponent,\n UploadFieldServerProps,\n} from './fields/Upload.js'\n\nexport type {\n Description,\n DescriptionFunction,\n FieldDescriptionClientComponent,\n FieldDescriptionClientProps,\n FieldDescriptionServerComponent,\n FieldDescriptionServerProps,\n GenericDescriptionProps,\n StaticDescription,\n} from './forms/Description.js'\n\nexport type {\n BaseVersionField,\n DiffMethod,\n FieldDiffClientComponent,\n FieldDiffClientProps,\n FieldDiffServerComponent,\n FieldDiffServerProps,\n VersionField,\n VersionTab,\n} from './forms/Diff.js'\n\nexport type {\n BuildFormStateArgs,\n Data,\n FieldState as FormField,\n FieldStateWithoutComponents as FormFieldWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n}\n\nexport type {\n FieldErrorClientComponent,\n FieldErrorClientProps,\n FieldErrorServerComponent,\n FieldErrorServerProps,\n GenericErrorProps,\n} from './forms/Error.js'\n\nexport type {\n ClientComponentProps,\n ClientFieldBase,\n ClientFieldWithOptionalType,\n FieldClientComponent,\n FieldPaths,\n FieldServerComponent,\n ServerComponentProps,\n ServerFieldBase,\n} from './forms/Field.js'\n\nexport type {\n FieldLabelClientComponent,\n FieldLabelClientProps,\n FieldLabelServerComponent,\n FieldLabelServerProps,\n GenericLabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<any>\n RenderedComponent: React.ReactNode\n type: 'server'\n}\n\nexport type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<TComponentClientProps>\n RenderedComponent?: React.ReactNode\n type: 'client'\n}\n\nexport type MappedEmptyComponent = {\n type: 'empty'\n}\n\nexport enum Action {\n RenderConfig = 'render-config',\n}\n\nexport type RenderEntityConfigArgs = {\n collectionSlug?: string\n data?: Data\n globalSlug?: string\n}\n\nexport type RenderRootConfigArgs = {}\n\nexport type RenderFieldConfigArgs = {\n collectionSlug?: string\n formState?: FormState\n globalSlug?: string\n schemaPath: string\n}\n\nexport type RenderConfigArgs = {\n action: Action.RenderConfig\n config: Promise<SanitizedConfig> | SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n languageCode: AcceptedLanguages\n serverProps?: any\n} & (RenderEntityConfigArgs | RenderFieldConfigArgs | RenderRootConfigArgs)\n\nexport type PayloadServerAction = (\n args:\n | {\n [key: string]: any\n action: Action\n i18n: I18nClient\n }\n | RenderConfigArgs,\n) => Promise<string>\n\nexport type RenderedField = {\n Field: React.ReactNode\n indexPath?: string\n initialSchemaPath?: string\n /**\n * @deprecated\n * This is a legacy property that will be removed in v4.\n * Please use `fieldIsSidebar(field)` from `payload` instead.\n * Or check `field.admin.position === 'sidebar'` directly.\n */\n isSidebar: boolean\n path: string\n schemaPath: string\n type: FieldTypes\n}\n\nexport type FieldRow = {\n RowLabel?: React.ReactNode\n}\n\nexport type DocumentSlots = {\n BeforeDocumentControls?: React.ReactNode\n Description?: React.ReactNode\n EditMenuItems?: React.ReactNode\n LivePreview?: React.ReactNode\n PreviewButton?: React.ReactNode\n PublishButton?: React.ReactNode\n SaveButton?: React.ReactNode\n SaveDraftButton?: React.ReactNode\n Status?: React.ReactNode\n Upload?: React.ReactNode\n UploadControls?: React.ReactNode\n}\n\nexport type {\n BuildCollectionFolderViewResult,\n BuildTableStateArgs,\n DefaultServerFunctionArgs,\n GetFolderResultsComponentAndDataArgs,\n ListQuery,\n ServerFunction,\n ServerFunctionArgs,\n ServerFunctionClient,\n ServerFunctionClientArgs,\n ServerFunctionConfig,\n ServerFunctionHandler,\n SlugifyServerFunctionArgs,\n} from './functions/index.js'\n\nexport type { LanguageOptions } from './LanguageOptions.js'\n\nexport type { RichTextAdapter, RichTextAdapterProvider, RichTextHooks } from './RichText.js'\n\nexport { type WidgetServerProps } from './views/dashboard.js'\n\nexport type {\n BeforeDocumentControlsClientProps,\n BeforeDocumentControlsServerProps,\n BeforeDocumentControlsServerPropsOnly,\n DocumentSubViewTypes,\n DocumentTabClientProps,\n /**\n * @deprecated\n * The `DocumentTabComponent` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps`or `DocumentTabClientProps` instead.\n */\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n /**\n * @deprecated\n * The `DocumentTabProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps` instead.\n */\n DocumentTabServerProps as DocumentTabProps,\n DocumentTabServerProps,\n DocumentTabServerPropsOnly,\n /**\n * @deprecated\n * The `ClientSideEditViewProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentViewClientProps` instead.\n */\n DocumentViewClientProps as ClientSideEditViewProps,\n DocumentViewClientProps,\n /**\n * @deprecated\n * The `ServerSideEditViewProps` is deprecated and will be removed in the next major version.\n * Use `DocumentViewServerProps` instead.\n */\n DocumentViewServerProps as ServerSideEditViewProps,\n DocumentViewServerProps,\n DocumentViewServerPropsOnly,\n EditViewProps,\n RenderDocumentVersionsProperties,\n} from './views/document.js'\n\nexport type {\n AfterFolderListClientProps,\n AfterFolderListServerProps,\n AfterFolderListServerPropsOnly,\n AfterFolderListTableClientProps,\n AfterFolderListTableServerProps,\n AfterFolderListTableServerPropsOnly,\n BeforeFolderListClientProps,\n BeforeFolderListServerProps,\n BeforeFolderListServerPropsOnly,\n BeforeFolderListTableClientProps,\n BeforeFolderListTableServerProps,\n BeforeFolderListTableServerPropsOnly,\n FolderListViewClientProps,\n FolderListViewServerProps,\n FolderListViewServerPropsOnly,\n FolderListViewSlots,\n FolderListViewSlotSharedClientProps,\n} from './views/folderList.js'\n\nexport type {\n AdminViewClientProps,\n /**\n * @deprecated\n * The `AdminViewComponent` type is deprecated and will be removed in the next major version.\n * Type your component props directly instead.\n */\n AdminViewComponent,\n AdminViewConfig,\n /**\n * @deprecated\n * The `AdminViewProps` type is deprecated and will be removed in the next major version.\n * Use `AdminViewServerProps` instead.\n */\n AdminViewServerProps as AdminViewProps,\n AdminViewServerProps,\n AdminViewServerPropsOnly,\n InitPageResult,\n ServerPropsFromView,\n ViewDescriptionClientProps,\n ViewDescriptionServerProps,\n ViewDescriptionServerPropsOnly,\n ViewTypes,\n VisibleEntities,\n} from './views/index.js'\n\nexport type {\n AfterListClientProps,\n AfterListServerProps,\n AfterListServerPropsOnly,\n AfterListTableClientProps,\n AfterListTableServerProps,\n AfterListTableServerPropsOnly,\n BeforeListClientProps,\n BeforeListServerProps,\n BeforeListServerPropsOnly,\n BeforeListTableClientProps,\n BeforeListTableServerProps,\n BeforeListTableServerPropsOnly,\n ListViewClientProps,\n ListViewServerProps,\n ListViewServerPropsOnly,\n ListViewSlots,\n ListViewSlotSharedClientProps,\n} from './views/list.js'\n\ntype SchemaPath = {} & string\nexport type FieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: Field[]\n }\n | Block\n | Field\n | Tab\n>\n\nexport type ClientFieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: ClientField[]\n }\n | ClientBlock\n | ClientField\n | ClientTab\n>\n\nexport type DocumentEvent = {\n doc?: TypeWithID\n drawerSlug?: string\n entitySlug: string\n id?: number | string\n operation: 'create' | 'update'\n updatedAt: string\n}\n"],"names":["Action"],"mappings":"AAwfA,OAAO,IAAA,AAAKA,gCAAAA;;WAAAA;MAEX"}
1
+ {"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["import type { AcceptedLanguages, I18nClient } from '@payloadcms/translations'\nimport type React from 'react'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type { TypeWithID } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type {\n Block,\n ClientBlock,\n ClientField,\n Field,\n FieldTypes,\n Tab,\n} from '../fields/config/types.js'\nimport type { JsonObject } from '../types/index.js'\nimport type { ClientTab } from './fields/Tabs.js'\nimport type {\n BuildFormStateArgs,\n Data,\n FieldState,\n FieldStateWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n} from './forms/Form.js'\n\nexport type {\n /**\n * @deprecated\n * The `CustomPreviewButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPreviewButton,\n /**\n * @deprecated\n * The `CustomPublishButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPublishButton,\n /**\n * @deprecated\n * The `CustomSaveButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveButton,\n /**\n * @deprecated\n * The `CustomSaveDraftButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveDraftButton,\n} from '../config/types.js'\nexport type { DefaultCellComponentProps, DefaultServerCellComponentProps } from './elements/Cell.js'\nexport type { ConditionalDateProps } from './elements/DatePicker.js'\nexport type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js'\nexport type {\n EditMenuItemsClientProps,\n EditMenuItemsServerProps,\n EditMenuItemsServerPropsOnly,\n} from './elements/EditMenuItems.js'\nexport type { NavGroupPreferences, NavPreferences } from './elements/Nav.js'\nexport type {\n PreviewButtonClientProps,\n PreviewButtonServerProps,\n PreviewButtonServerPropsOnly,\n} from './elements/PreviewButton.js'\nexport type {\n PublishButtonClientProps,\n PublishButtonServerProps,\n PublishButtonServerPropsOnly,\n} from './elements/PublishButton.js'\nexport type {\n SaveButtonClientProps,\n SaveButtonServerProps,\n SaveButtonServerPropsOnly,\n} from './elements/SaveButton.js'\nexport type {\n SaveDraftButtonClientProps,\n SaveDraftButtonServerProps,\n SaveDraftButtonServerPropsOnly,\n} from './elements/SaveDraftButton.js'\nexport type { CustomStatus } from './elements/Status.js'\n\nexport type { Column } from './elements/Table.js'\n\nexport type {\n UnpublishButtonClientProps,\n UnpublishButtonServerProps,\n UnpublishButtonServerPropsOnly,\n} from './elements/UnpublishButton.js'\n\nexport type { CustomUpload } from './elements/Upload.js'\n\nexport type {\n WithServerSidePropsComponent,\n WithServerSidePropsComponentProps,\n} from './elements/WithServerSideProps.js'\n\nexport type {\n ArrayFieldClientComponent,\n ArrayFieldClientProps,\n ArrayFieldDescriptionClientComponent,\n ArrayFieldDescriptionServerComponent,\n ArrayFieldDiffClientComponent,\n ArrayFieldDiffServerComponent,\n ArrayFieldErrorClientComponent,\n ArrayFieldErrorServerComponent,\n ArrayFieldLabelClientComponent,\n ArrayFieldLabelServerComponent,\n ArrayFieldServerComponent,\n ArrayFieldServerProps,\n} from './fields/Array.js'\n\nexport type {\n BlockRowLabelClientComponent,\n BlockRowLabelServerComponent,\n BlocksFieldClientComponent,\n BlocksFieldClientProps,\n BlocksFieldDescriptionClientComponent,\n BlocksFieldDescriptionServerComponent,\n BlocksFieldDiffClientComponent,\n BlocksFieldDiffServerComponent,\n BlocksFieldErrorClientComponent,\n BlocksFieldErrorServerComponent,\n BlocksFieldLabelClientComponent,\n BlocksFieldLabelServerComponent,\n BlocksFieldServerComponent,\n BlocksFieldServerProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldClientComponent,\n CheckboxFieldClientProps,\n CheckboxFieldDescriptionClientComponent,\n CheckboxFieldDescriptionServerComponent,\n CheckboxFieldDiffClientComponent,\n CheckboxFieldDiffServerComponent,\n CheckboxFieldErrorClientComponent,\n CheckboxFieldErrorServerComponent,\n CheckboxFieldLabelClientComponent,\n CheckboxFieldLabelServerComponent,\n CheckboxFieldServerComponent,\n CheckboxFieldServerProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldClientComponent,\n CodeFieldClientProps,\n CodeFieldDescriptionClientComponent,\n CodeFieldDescriptionServerComponent,\n CodeFieldDiffClientComponent,\n CodeFieldDiffServerComponent,\n CodeFieldErrorClientComponent,\n CodeFieldErrorServerComponent,\n CodeFieldLabelClientComponent,\n CodeFieldLabelServerComponent,\n CodeFieldServerComponent,\n CodeFieldServerProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldClientComponent,\n CollapsibleFieldClientProps,\n CollapsibleFieldDescriptionClientComponent,\n CollapsibleFieldDescriptionServerComponent,\n CollapsibleFieldDiffClientComponent,\n CollapsibleFieldDiffServerComponent,\n CollapsibleFieldErrorClientComponent,\n CollapsibleFieldErrorServerComponent,\n CollapsibleFieldLabelClientComponent,\n CollapsibleFieldLabelServerComponent,\n CollapsibleFieldServerComponent,\n CollapsibleFieldServerProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldClientComponent,\n DateFieldClientProps,\n DateFieldDescriptionClientComponent,\n DateFieldDescriptionServerComponent,\n DateFieldDiffClientComponent,\n DateFieldDiffServerComponent,\n DateFieldErrorClientComponent,\n DateFieldErrorServerComponent,\n DateFieldLabelClientComponent,\n DateFieldLabelServerComponent,\n DateFieldServerComponent,\n DateFieldServerProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldClientComponent,\n EmailFieldClientProps,\n EmailFieldDescriptionClientComponent,\n EmailFieldDescriptionServerComponent,\n EmailFieldDiffClientComponent,\n EmailFieldDiffServerComponent,\n EmailFieldErrorClientComponent,\n EmailFieldErrorServerComponent,\n EmailFieldLabelClientComponent,\n EmailFieldLabelServerComponent,\n EmailFieldServerComponent,\n EmailFieldServerProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldClientComponent,\n GroupFieldClientProps,\n GroupFieldDescriptionClientComponent,\n GroupFieldDescriptionServerComponent,\n GroupFieldDiffClientComponent,\n GroupFieldDiffServerComponent,\n GroupFieldErrorClientComponent,\n GroupFieldErrorServerComponent,\n GroupFieldLabelClientComponent,\n GroupFieldLabelServerComponent,\n GroupFieldServerComponent,\n GroupFieldServerProps,\n} from './fields/Group.js'\n\nexport type { HiddenFieldProps } from './fields/Hidden.js'\n\nexport type {\n JoinFieldClientComponent,\n JoinFieldClientProps,\n JoinFieldDescriptionClientComponent,\n JoinFieldDescriptionServerComponent,\n JoinFieldDiffClientComponent,\n JoinFieldDiffServerComponent,\n JoinFieldErrorClientComponent,\n JoinFieldErrorServerComponent,\n JoinFieldLabelClientComponent,\n JoinFieldLabelServerComponent,\n JoinFieldServerComponent,\n JoinFieldServerProps,\n} from './fields/Join.js'\n\nexport type {\n JSONFieldClientComponent,\n JSONFieldClientProps,\n JSONFieldDescriptionClientComponent,\n JSONFieldDescriptionServerComponent,\n JSONFieldDiffClientComponent,\n JSONFieldDiffServerComponent,\n JSONFieldErrorClientComponent,\n JSONFieldErrorServerComponent,\n JSONFieldLabelClientComponent,\n JSONFieldLabelServerComponent,\n JSONFieldServerComponent,\n JSONFieldServerProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldClientComponent,\n NumberFieldClientProps,\n NumberFieldDescriptionClientComponent,\n NumberFieldDescriptionServerComponent,\n NumberFieldDiffClientComponent,\n NumberFieldDiffServerComponent,\n NumberFieldErrorClientComponent,\n NumberFieldErrorServerComponent,\n NumberFieldLabelClientComponent,\n NumberFieldLabelServerComponent,\n NumberFieldServerComponent,\n NumberFieldServerProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldClientComponent,\n PointFieldClientProps,\n PointFieldDescriptionClientComponent,\n PointFieldDescriptionServerComponent,\n PointFieldDiffClientComponent,\n PointFieldDiffServerComponent,\n PointFieldErrorClientComponent,\n PointFieldErrorServerComponent,\n PointFieldLabelClientComponent,\n PointFieldLabelServerComponent,\n PointFieldServerComponent,\n PointFieldServerProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldClientComponent,\n RadioFieldClientProps,\n RadioFieldDescriptionClientComponent,\n RadioFieldDescriptionServerComponent,\n RadioFieldDiffClientComponent,\n RadioFieldDiffServerComponent,\n RadioFieldErrorClientComponent,\n RadioFieldErrorServerComponent,\n RadioFieldLabelClientComponent,\n RadioFieldLabelServerComponent,\n RadioFieldServerComponent,\n RadioFieldServerProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldClientComponent,\n RelationshipFieldClientProps,\n RelationshipFieldDescriptionClientComponent,\n RelationshipFieldDescriptionServerComponent,\n RelationshipFieldDiffClientComponent,\n RelationshipFieldDiffServerComponent,\n RelationshipFieldErrorClientComponent,\n RelationshipFieldErrorServerComponent,\n RelationshipFieldLabelClientComponent,\n RelationshipFieldLabelServerComponent,\n RelationshipFieldServerComponent,\n RelationshipFieldServerProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextFieldClientComponent,\n RichTextFieldClientProps,\n RichTextFieldDescriptionClientComponent,\n RichTextFieldDescriptionServerComponent,\n RichTextFieldDiffClientComponent,\n RichTextFieldDiffServerComponent,\n RichTextFieldErrorClientComponent,\n RichTextFieldErrorServerComponent,\n RichTextFieldLabelClientComponent,\n RichTextFieldLabelServerComponent,\n RichTextFieldServerComponent,\n RichTextFieldServerProps,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldClientComponent,\n RowFieldClientProps,\n RowFieldDescriptionClientComponent,\n RowFieldDescriptionServerComponent,\n RowFieldDiffClientComponent,\n RowFieldDiffServerComponent,\n RowFieldErrorClientComponent,\n RowFieldErrorServerComponent,\n RowFieldLabelClientComponent,\n RowFieldLabelServerComponent,\n RowFieldServerComponent,\n RowFieldServerProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldClientComponent,\n SelectFieldClientProps,\n SelectFieldDescriptionClientComponent,\n SelectFieldDescriptionServerComponent,\n SelectFieldDiffClientComponent,\n SelectFieldDiffServerComponent,\n SelectFieldErrorClientComponent,\n SelectFieldErrorServerComponent,\n SelectFieldLabelClientComponent,\n SelectFieldLabelServerComponent,\n SelectFieldServerComponent,\n SelectFieldServerProps,\n} from './fields/Select.js'\n\nexport type {\n ClientTab,\n TabsFieldClientComponent,\n TabsFieldClientProps,\n TabsFieldDescriptionClientComponent,\n TabsFieldDescriptionServerComponent,\n TabsFieldDiffClientComponent,\n TabsFieldDiffServerComponent,\n TabsFieldErrorClientComponent,\n TabsFieldErrorServerComponent,\n TabsFieldLabelClientComponent,\n TabsFieldLabelServerComponent,\n TabsFieldServerComponent,\n TabsFieldServerProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldClientComponent,\n TextFieldClientProps,\n TextFieldDescriptionClientComponent,\n TextFieldDescriptionServerComponent,\n TextFieldDiffClientComponent,\n TextFieldDiffServerComponent,\n TextFieldErrorClientComponent,\n TextFieldErrorServerComponent,\n TextFieldLabelClientComponent,\n TextFieldLabelServerComponent,\n TextFieldServerComponent,\n TextFieldServerProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldClientComponent,\n TextareaFieldClientProps,\n TextareaFieldDescriptionClientComponent,\n TextareaFieldDescriptionServerComponent,\n TextareaFieldDiffClientComponent,\n TextareaFieldDiffServerComponent,\n TextareaFieldErrorClientComponent,\n TextareaFieldErrorServerComponent,\n TextareaFieldLabelClientComponent,\n TextareaFieldLabelServerComponent,\n TextareaFieldServerComponent,\n TextareaFieldServerProps,\n} from './fields/Textarea.js'\n\nexport type {\n UIFieldClientComponent,\n UIFieldClientProps,\n UIFieldDiffClientComponent,\n UIFieldDiffServerComponent,\n UIFieldServerComponent,\n UIFieldServerProps,\n} from './fields/UI.js'\n\nexport type {\n UploadFieldClientComponent,\n UploadFieldClientProps,\n UploadFieldDescriptionClientComponent,\n UploadFieldDescriptionServerComponent,\n UploadFieldDiffClientComponent,\n UploadFieldDiffServerComponent,\n UploadFieldErrorClientComponent,\n UploadFieldErrorServerComponent,\n UploadFieldLabelClientComponent,\n UploadFieldLabelServerComponent,\n UploadFieldServerComponent,\n UploadFieldServerProps,\n} from './fields/Upload.js'\n\nexport type {\n Description,\n DescriptionFunction,\n FieldDescriptionClientComponent,\n FieldDescriptionClientProps,\n FieldDescriptionServerComponent,\n FieldDescriptionServerProps,\n GenericDescriptionProps,\n StaticDescription,\n} from './forms/Description.js'\n\nexport type {\n BaseVersionField,\n DiffMethod,\n FieldDiffClientComponent,\n FieldDiffClientProps,\n FieldDiffServerComponent,\n FieldDiffServerProps,\n VersionField,\n VersionTab,\n} from './forms/Diff.js'\n\nexport type {\n BuildFormStateArgs,\n Data,\n FieldState as FormField,\n FieldStateWithoutComponents as FormFieldWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n}\n\nexport type {\n FieldErrorClientComponent,\n FieldErrorClientProps,\n FieldErrorServerComponent,\n FieldErrorServerProps,\n GenericErrorProps,\n} from './forms/Error.js'\n\nexport type {\n ClientComponentProps,\n ClientFieldBase,\n ClientFieldWithOptionalType,\n FieldClientComponent,\n FieldPaths,\n FieldServerComponent,\n ServerComponentProps,\n ServerFieldBase,\n} from './forms/Field.js'\n\nexport type {\n FieldLabelClientComponent,\n FieldLabelClientProps,\n FieldLabelServerComponent,\n FieldLabelServerProps,\n GenericLabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<any>\n RenderedComponent: React.ReactNode\n type: 'server'\n}\n\nexport type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<TComponentClientProps>\n RenderedComponent?: React.ReactNode\n type: 'client'\n}\n\nexport type MappedEmptyComponent = {\n type: 'empty'\n}\n\nexport enum Action {\n RenderConfig = 'render-config',\n}\n\nexport type RenderEntityConfigArgs = {\n collectionSlug?: string\n data?: Data\n globalSlug?: string\n}\n\nexport type RenderRootConfigArgs = {}\n\nexport type RenderFieldConfigArgs = {\n collectionSlug?: string\n formState?: FormState\n globalSlug?: string\n schemaPath: string\n}\n\nexport type RenderConfigArgs = {\n action: Action.RenderConfig\n config: Promise<SanitizedConfig> | SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n languageCode: AcceptedLanguages\n serverProps?: any\n} & (RenderEntityConfigArgs | RenderFieldConfigArgs | RenderRootConfigArgs)\n\nexport type PayloadServerAction = (\n args:\n | {\n [key: string]: any\n action: Action\n i18n: I18nClient\n }\n | RenderConfigArgs,\n) => Promise<string>\n\nexport type RenderedField = {\n Field: React.ReactNode\n indexPath?: string\n initialSchemaPath?: string\n /**\n * @deprecated\n * This is a legacy property that will be removed in v4.\n * Please use `fieldIsSidebar(field)` from `payload` instead.\n * Or check `field.admin.position === 'sidebar'` directly.\n */\n isSidebar: boolean\n path: string\n schemaPath: string\n type: FieldTypes\n}\n\nexport type FieldRow = {\n RowLabel?: React.ReactNode\n}\n\nexport type DocumentSlots = {\n BeforeDocumentControls?: React.ReactNode\n Description?: React.ReactNode\n EditMenuItems?: React.ReactNode\n LivePreview?: React.ReactNode\n PreviewButton?: React.ReactNode\n PublishButton?: React.ReactNode\n SaveButton?: React.ReactNode\n SaveDraftButton?: React.ReactNode\n Status?: React.ReactNode\n UnpublishButton?: React.ReactNode\n Upload?: React.ReactNode\n UploadControls?: React.ReactNode\n}\n\nexport type {\n BuildCollectionFolderViewResult,\n BuildTableStateArgs,\n DefaultServerFunctionArgs,\n GetFolderResultsComponentAndDataArgs,\n ListQuery,\n ServerFunction,\n ServerFunctionArgs,\n ServerFunctionClient,\n ServerFunctionClientArgs,\n ServerFunctionConfig,\n ServerFunctionHandler,\n SlugifyServerFunctionArgs,\n} from './functions/index.js'\n\nexport type { LanguageOptions } from './LanguageOptions.js'\n\nexport type { RichTextAdapter, RichTextAdapterProvider, RichTextHooks } from './RichText.js'\n\nexport { type WidgetServerProps } from './views/dashboard.js'\n\nexport type {\n BeforeDocumentControlsClientProps,\n BeforeDocumentControlsServerProps,\n BeforeDocumentControlsServerPropsOnly,\n DocumentSubViewTypes,\n DocumentTabClientProps,\n /**\n * @deprecated\n * The `DocumentTabComponent` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps`or `DocumentTabClientProps` instead.\n */\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n /**\n * @deprecated\n * The `DocumentTabProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps` instead.\n */\n DocumentTabServerProps as DocumentTabProps,\n DocumentTabServerProps,\n DocumentTabServerPropsOnly,\n /**\n * @deprecated\n * The `ClientSideEditViewProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentViewClientProps` instead.\n */\n DocumentViewClientProps as ClientSideEditViewProps,\n DocumentViewClientProps,\n /**\n * @deprecated\n * The `ServerSideEditViewProps` is deprecated and will be removed in the next major version.\n * Use `DocumentViewServerProps` instead.\n */\n DocumentViewServerProps as ServerSideEditViewProps,\n DocumentViewServerProps,\n DocumentViewServerPropsOnly,\n EditViewProps,\n RenderDocumentVersionsProperties,\n} from './views/document.js'\n\nexport type {\n AfterFolderListClientProps,\n AfterFolderListServerProps,\n AfterFolderListServerPropsOnly,\n AfterFolderListTableClientProps,\n AfterFolderListTableServerProps,\n AfterFolderListTableServerPropsOnly,\n BeforeFolderListClientProps,\n BeforeFolderListServerProps,\n BeforeFolderListServerPropsOnly,\n BeforeFolderListTableClientProps,\n BeforeFolderListTableServerProps,\n BeforeFolderListTableServerPropsOnly,\n FolderListViewClientProps,\n FolderListViewServerProps,\n FolderListViewServerPropsOnly,\n FolderListViewSlots,\n FolderListViewSlotSharedClientProps,\n} from './views/folderList.js'\n\nexport type {\n AdminViewClientProps,\n /**\n * @deprecated\n * The `AdminViewComponent` type is deprecated and will be removed in the next major version.\n * Type your component props directly instead.\n */\n AdminViewComponent,\n AdminViewConfig,\n /**\n * @deprecated\n * The `AdminViewProps` type is deprecated and will be removed in the next major version.\n * Use `AdminViewServerProps` instead.\n */\n AdminViewServerProps as AdminViewProps,\n AdminViewServerProps,\n AdminViewServerPropsOnly,\n InitPageResult,\n ServerPropsFromView,\n ViewDescriptionClientProps,\n ViewDescriptionServerProps,\n ViewDescriptionServerPropsOnly,\n ViewTypes,\n VisibleEntities,\n} from './views/index.js'\n\nexport type {\n AfterListClientProps,\n AfterListServerProps,\n AfterListServerPropsOnly,\n AfterListTableClientProps,\n AfterListTableServerProps,\n AfterListTableServerPropsOnly,\n BeforeListClientProps,\n BeforeListServerProps,\n BeforeListServerPropsOnly,\n BeforeListTableClientProps,\n BeforeListTableServerProps,\n BeforeListTableServerPropsOnly,\n ListViewClientProps,\n ListViewServerProps,\n ListViewServerPropsOnly,\n ListViewSlots,\n ListViewSlotSharedClientProps,\n} from './views/list.js'\n\ntype SchemaPath = {} & string\nexport type FieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: Field[]\n }\n | Block\n | Field\n | Tab\n>\n\nexport type ClientFieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: ClientField[]\n }\n | ClientBlock\n | ClientField\n | ClientTab\n>\n\nexport type DocumentEvent = {\n doc?: TypeWithID\n drawerSlug?: string\n entitySlug: string\n id?: number | string\n operation: 'create' | 'update'\n updatedAt: string\n}\n"],"names":["Action"],"mappings":"AA6fA,OAAO,IAAA,AAAKA,gCAAAA;;WAAAA;MAEX"}
@@ -1,7 +1,7 @@
1
1
  import type { AuthOperationsFromCollectionSlug, Collection } from '../../collections/config/types.js';
2
- import type { CollectionSlug } from '../../index.js';
2
+ import type { AuthCollectionSlug } from '../../index.js';
3
3
  import type { PayloadRequest } from '../../types/index.js';
4
- export type Arguments<TSlug extends CollectionSlug> = {
4
+ export type Arguments<TSlug extends AuthCollectionSlug> = {
5
5
  collection: Collection;
6
6
  data: {
7
7
  [key: string]: unknown;
@@ -11,5 +11,5 @@ export type Arguments<TSlug extends CollectionSlug> = {
11
11
  req: PayloadRequest;
12
12
  };
13
13
  export type Result = string;
14
- export declare const forgotPasswordOperation: <TSlug extends CollectionSlug>(incomingArgs: Arguments<TSlug>) => Promise<null | string>;
14
+ export declare const forgotPasswordOperation: <TSlug extends AuthCollectionSlug>(incomingArgs: Arguments<TSlug>) => Promise<null | string>;
15
15
  //# sourceMappingURL=forgotPassword.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"forgotPassword.d.ts","sourceRoot":"","sources":["../../../src/auth/operations/forgotPassword.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gCAAgC,EAChC,UAAU,EACX,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAS,MAAM,sBAAsB,CAAA;AAajE,MAAM,MAAM,SAAS,CAAC,KAAK,SAAS,cAAc,IAAI;IACpD,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KACvB,GAAG,gCAAgC,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAA;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,CAAA;AAE3B,eAAO,MAAM,uBAAuB,GAAU,KAAK,SAAS,cAAc,gBAC1D,SAAS,CAAC,KAAK,CAAC,KAC7B,OAAO,CAAC,IAAI,GAAG,MAAM,CA6LvB,CAAA"}
1
+ {"version":3,"file":"forgotPassword.d.ts","sourceRoot":"","sources":["../../../src/auth/operations/forgotPassword.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gCAAgC,EAChC,UAAU,EACX,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAS,MAAM,sBAAsB,CAAA;AAajE,MAAM,MAAM,SAAS,CAAC,KAAK,SAAS,kBAAkB,IAAI;IACxD,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KACvB,GAAG,gCAAgC,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAA;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,CAAA;AAE3B,eAAO,MAAM,uBAAuB,GAAU,KAAK,SAAS,kBAAkB,gBAC9D,SAAS,CAAC,KAAK,CAAC,KAC7B,OAAO,CAAC,IAAI,GAAG,MAAM,CA6LvB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/auth/operations/forgotPassword.ts"],"sourcesContent":["import crypto from 'crypto'\nimport { status as httpStatus } from 'http-status'\nimport { URL } from 'url'\n\nimport type {\n AuthOperationsFromCollectionSlug,\n Collection,\n} from '../../collections/config/types.js'\nimport type { CollectionSlug } from '../../index.js'\nimport type { PayloadRequest, Where } from '../../types/index.js'\n\nimport { buildAfterOperation } from '../../collections/operations/utilities/buildAfterOperation.js'\nimport { buildBeforeOperation } from '../../collections/operations/utilities/buildBeforeOperation.js'\nimport { APIError } from '../../errors/index.js'\nimport { Forbidden } from '../../index.js'\nimport { appendNonTrashedFilter } from '../../utilities/appendNonTrashedFilter.js'\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { formatAdminURL } from '../../utilities/formatAdminURL.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { getLoginOptions } from '../getLoginOptions.js'\n\nexport type Arguments<TSlug extends CollectionSlug> = {\n collection: Collection\n data: {\n [key: string]: unknown\n } & AuthOperationsFromCollectionSlug<TSlug>['forgotPassword']\n disableEmail?: boolean\n expiration?: number\n req: PayloadRequest\n}\n\nexport type Result = string\n\nexport const forgotPasswordOperation = async <TSlug extends CollectionSlug>(\n incomingArgs: Arguments<TSlug>,\n): Promise<null | string> => {\n const loginWithUsername = incomingArgs.collection.config.auth.loginWithUsername\n const { data } = incomingArgs\n\n const { canLoginWithEmail, canLoginWithUsername } = getLoginOptions(loginWithUsername)\n\n const sanitizedEmail =\n (canLoginWithEmail && (incomingArgs.data.email || '').toLowerCase().trim()) || null\n const sanitizedUsername =\n 'username' in data && typeof data?.username === 'string'\n ? data.username.toLowerCase().trim()\n : null\n\n let args = incomingArgs\n\n if (incomingArgs.collection.config.auth.disableLocalStrategy) {\n throw new Forbidden(incomingArgs.req.t)\n }\n if (!sanitizedEmail && !sanitizedUsername) {\n throw new APIError(\n `Missing ${loginWithUsername ? 'username' : 'email'}.`,\n httpStatus.BAD_REQUEST,\n )\n }\n\n try {\n const shouldCommit = await initTransaction(args.req)\n\n // /////////////////////////////////////\n // beforeOperation - Collection\n // /////////////////////////////////////\n args = await buildBeforeOperation({\n args,\n collection: args.collection.config,\n operation: 'forgotPassword',\n })\n\n const {\n collection: { config: collectionConfig },\n disableEmail,\n expiration,\n req: {\n payload: { config, email },\n payload,\n },\n req,\n } = args\n\n // /////////////////////////////////////\n // Forget password\n // /////////////////////////////////////\n\n let token: string = crypto.randomBytes(20).toString('hex')\n type UserDoc = {\n email?: string\n id: number | string\n resetPasswordExpiration?: string\n resetPasswordToken?: string\n }\n\n if (!sanitizedEmail && !sanitizedUsername) {\n throw new APIError(\n `Missing ${loginWithUsername ? 'username' : 'email'}.`,\n httpStatus.BAD_REQUEST,\n )\n }\n\n let whereConstraint: Where = {}\n\n if (canLoginWithEmail && sanitizedEmail) {\n whereConstraint = {\n email: {\n equals: sanitizedEmail,\n },\n }\n } else if (canLoginWithUsername && sanitizedUsername) {\n whereConstraint = {\n username: {\n equals: sanitizedUsername,\n },\n }\n }\n\n // Exclude trashed users unless `trash: true`\n whereConstraint = appendNonTrashedFilter({\n enableTrash: collectionConfig.trash,\n trash: false,\n where: whereConstraint,\n })\n\n let user = await payload.db.findOne<UserDoc>({\n collection: collectionConfig.slug,\n req,\n where: whereConstraint,\n })\n\n // We don't want to indicate specifically that an email was not found,\n // as doing so could lead to the exposure of registered emails.\n // Therefore, we prefer to fail silently.\n if (!user) {\n await commitTransaction(args.req)\n return null\n }\n\n const resetPasswordExpiration = new Date(\n Date.now() + (collectionConfig.auth?.forgotPassword?.expiration ?? expiration ?? 3600000),\n ).toISOString()\n\n user = await payload.update({\n id: user.id,\n collection: collectionConfig.slug,\n data: {\n resetPasswordExpiration,\n resetPasswordToken: token,\n },\n req,\n })\n\n if (!disableEmail && user.email) {\n const protocol = new URL(req.url!).protocol // includes the final :\n const serverURL =\n config.serverURL !== null && config.serverURL !== ''\n ? config.serverURL\n : `${protocol}//${req.headers.get('host')}`\n const forgotURL = formatAdminURL({\n adminRoute: config.routes.admin,\n path: `${config.admin.routes.reset}/${token}`,\n serverURL,\n })\n let html = `${req.t('authentication:youAreReceivingResetPassword')}\n <a href=\"${forgotURL}\">${forgotURL}</a>\n ${req.t('authentication:youDidNotRequestPassword')}`\n\n if (typeof collectionConfig.auth.forgotPassword?.generateEmailHTML === 'function') {\n html = await collectionConfig.auth.forgotPassword.generateEmailHTML({\n req,\n token,\n user,\n })\n }\n\n let subject = req.t('authentication:resetYourPassword')\n\n if (typeof collectionConfig.auth.forgotPassword?.generateEmailSubject === 'function') {\n subject = await collectionConfig.auth.forgotPassword.generateEmailSubject({\n req,\n token,\n user,\n })\n }\n\n await email.sendEmail({\n from: `\"${email.defaultFromName}\" <${email.defaultFromAddress}>`,\n html,\n subject,\n to: user.email,\n })\n }\n\n // /////////////////////////////////////\n // afterForgotPassword - Collection\n // /////////////////////////////////////\n\n if (collectionConfig.hooks?.afterForgotPassword?.length) {\n for (const hook of collectionConfig.hooks.afterForgotPassword) {\n await hook({ args, collection: args.collection?.config, context: req.context })\n }\n }\n\n // /////////////////////////////////////\n // afterOperation - Collection\n // /////////////////////////////////////\n\n token = await buildAfterOperation({\n args,\n collection: args.collection?.config,\n operation: 'forgotPassword',\n result: token,\n })\n\n if (shouldCommit) {\n await commitTransaction(req)\n }\n\n return token\n } catch (error: unknown) {\n await killTransaction(args.req)\n throw error\n }\n}\n"],"names":["crypto","status","httpStatus","URL","buildAfterOperation","buildBeforeOperation","APIError","Forbidden","appendNonTrashedFilter","commitTransaction","formatAdminURL","initTransaction","killTransaction","getLoginOptions","forgotPasswordOperation","incomingArgs","loginWithUsername","collection","config","auth","data","canLoginWithEmail","canLoginWithUsername","sanitizedEmail","email","toLowerCase","trim","sanitizedUsername","username","args","disableLocalStrategy","req","t","BAD_REQUEST","shouldCommit","operation","collectionConfig","disableEmail","expiration","payload","token","randomBytes","toString","whereConstraint","equals","enableTrash","trash","where","user","db","findOne","slug","resetPasswordExpiration","Date","now","forgotPassword","toISOString","update","id","resetPasswordToken","protocol","url","serverURL","headers","get","forgotURL","adminRoute","routes","admin","path","reset","html","generateEmailHTML","subject","generateEmailSubject","sendEmail","from","defaultFromName","defaultFromAddress","to","hooks","afterForgotPassword","length","hook","context","result","error"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAC3B,SAASC,UAAUC,UAAU,QAAQ,cAAa;AAClD,SAASC,GAAG,QAAQ,MAAK;AASzB,SAASC,mBAAmB,QAAQ,gEAA+D;AACnG,SAASC,oBAAoB,QAAQ,iEAAgE;AACrG,SAASC,QAAQ,QAAQ,wBAAuB;AAChD,SAASC,SAAS,QAAQ,iBAAgB;AAC1C,SAASC,sBAAsB,QAAQ,4CAA2C;AAClF,SAASC,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,cAAc,QAAQ,oCAAmC;AAClE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,eAAe,QAAQ,wBAAuB;AAcvD,OAAO,MAAMC,0BAA0B,OACrCC;IAEA,MAAMC,oBAAoBD,aAAaE,UAAU,CAACC,MAAM,CAACC,IAAI,CAACH,iBAAiB;IAC/E,MAAM,EAAEI,IAAI,EAAE,GAAGL;IAEjB,MAAM,EAAEM,iBAAiB,EAAEC,oBAAoB,EAAE,GAAGT,gBAAgBG;IAEpE,MAAMO,iBACJ,AAACF,qBAAqB,AAACN,CAAAA,aAAaK,IAAI,CAACI,KAAK,IAAI,EAAC,EAAGC,WAAW,GAAGC,IAAI,MAAO;IACjF,MAAMC,oBACJ,cAAcP,QAAQ,OAAOA,MAAMQ,aAAa,WAC5CR,KAAKQ,QAAQ,CAACH,WAAW,GAAGC,IAAI,KAChC;IAEN,IAAIG,OAAOd;IAEX,IAAIA,aAAaE,UAAU,CAACC,MAAM,CAACC,IAAI,CAACW,oBAAoB,EAAE;QAC5D,MAAM,IAAIvB,UAAUQ,aAAagB,GAAG,CAACC,CAAC;IACxC;IACA,IAAI,CAACT,kBAAkB,CAACI,mBAAmB;QACzC,MAAM,IAAIrB,S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iBjB,IAAI,CAACoC,cAAc,EAAEmB,yBAAyB,YAAY;gBACpFD,UAAU,MAAMrC,iBAAiBjB,IAAI,CAACoC,cAAc,CAACmB,oBAAoB,CAAC;oBACxE3C;oBACAS;oBACAQ;gBACF;YACF;YAEA,MAAMxB,MAAMmD,SAAS,CAAC;gBACpBC,MAAM,CAAC,CAAC,EAAEpD,MAAMqD,eAAe,CAAC,GAAG,EAAErD,MAAMsD,kBAAkB,CAAC,CAAC,CAAC;gBAChEP;gBACAE;gBACAM,IAAI/B,KAAKxB,KAAK;YAChB;QACF;QAEA,wCAAwC;QACxC,mCAAmC;QACnC,wCAAwC;QAExC,IAAIY,iBAAiB4C,KAAK,EAAEC,qBAAqBC,QAAQ;YACvD,KAAK,MAAMC,QAAQ/C,iBAAiB4C,KAAK,CAACC,mBAAmB,CAAE;gBAC7D,MAAME,KAAK;oBAAEtD;oBAAMZ,YAAYY,KAAKZ,UAAU,EAAEC;oBAAQkE,SAASrD,IAAIqD,OAAO;gBAAC;YAC/E;QACF;QAEA,wCAAwC;QACxC,8BAA8B;QAC9B,wCAAwC;QAExC5C,QAAQ,MAAMpC,oBAAoB;YAChCyB;YACAZ,YAAYY,KAAKZ,UAAU,EAAEC;YAC7BiB,WAAW;YACXkD,QAAQ7C;QACV;QAEA,IAAIN,cAAc;YAChB,MAAMzB,kBAAkBsB;QAC1B;QAEA,OAAOS;IACT,EAAE,OAAO8C,OAAgB;QACvB,MAAM1E,gBAAgBiB,KAAKE,GAAG;QAC9B,MAAMuD;IACR;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/auth/operations/forgotPassword.ts"],"sourcesContent":["import crypto from 'crypto'\nimport { status as httpStatus } from 'http-status'\nimport { URL } from 'url'\n\nimport type {\n AuthOperationsFromCollectionSlug,\n Collection,\n} from '../../collections/config/types.js'\nimport type { AuthCollectionSlug } from '../../index.js'\nimport type { PayloadRequest, Where } from '../../types/index.js'\n\nimport { buildAfterOperation } from '../../collections/operations/utilities/buildAfterOperation.js'\nimport { buildBeforeOperation } from '../../collections/operations/utilities/buildBeforeOperation.js'\nimport { APIError } from '../../errors/index.js'\nimport { Forbidden } from '../../index.js'\nimport { appendNonTrashedFilter } from '../../utilities/appendNonTrashedFilter.js'\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { formatAdminURL } from '../../utilities/formatAdminURL.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { getLoginOptions } from '../getLoginOptions.js'\n\nexport type Arguments<TSlug extends AuthCollectionSlug> = {\n collection: Collection\n data: {\n [key: string]: unknown\n } & AuthOperationsFromCollectionSlug<TSlug>['forgotPassword']\n disableEmail?: boolean\n expiration?: number\n req: PayloadRequest\n}\n\nexport type Result = string\n\nexport const forgotPasswordOperation = async <TSlug extends AuthCollectionSlug>(\n incomingArgs: Arguments<TSlug>,\n): Promise<null | string> => {\n const loginWithUsername = incomingArgs.collection.config.auth.loginWithUsername\n const { data } = incomingArgs\n\n const { canLoginWithEmail, canLoginWithUsername } = getLoginOptions(loginWithUsername)\n\n const sanitizedEmail =\n (canLoginWithEmail && (incomingArgs.data.email || '').toLowerCase().trim()) || null\n const sanitizedUsername =\n 'username' in data && typeof data?.username === 'string'\n ? data.username.toLowerCase().trim()\n : null\n\n let args = incomingArgs\n\n if (incomingArgs.collection.config.auth.disableLocalStrategy) {\n throw new Forbidden(incomingArgs.req.t)\n }\n if (!sanitizedEmail && !sanitizedUsername) {\n throw new APIError(\n `Missing ${loginWithUsername ? 'username' : 'email'}.`,\n httpStatus.BAD_REQUEST,\n )\n }\n\n try {\n const shouldCommit = await initTransaction(args.req)\n\n // /////////////////////////////////////\n // beforeOperation - Collection\n // /////////////////////////////////////\n args = await buildBeforeOperation({\n args,\n collection: args.collection.config,\n operation: 'forgotPassword',\n })\n\n const {\n collection: { config: collectionConfig },\n disableEmail,\n expiration,\n req: {\n payload: { config, email },\n payload,\n },\n req,\n } = args\n\n // /////////////////////////////////////\n // Forget password\n // /////////////////////////////////////\n\n let token: string = crypto.randomBytes(20).toString('hex')\n type UserDoc = {\n email?: string\n id: number | string\n resetPasswordExpiration?: string\n resetPasswordToken?: string\n }\n\n if (!sanitizedEmail && !sanitizedUsername) {\n throw new APIError(\n `Missing ${loginWithUsername ? 'username' : 'email'}.`,\n httpStatus.BAD_REQUEST,\n )\n }\n\n let whereConstraint: Where = {}\n\n if (canLoginWithEmail && sanitizedEmail) {\n whereConstraint = {\n email: {\n equals: sanitizedEmail,\n },\n }\n } else if (canLoginWithUsername && sanitizedUsername) {\n whereConstraint = {\n username: {\n equals: sanitizedUsername,\n },\n }\n }\n\n // Exclude trashed users unless `trash: true`\n whereConstraint = appendNonTrashedFilter({\n enableTrash: collectionConfig.trash,\n trash: false,\n where: whereConstraint,\n })\n\n let user = await payload.db.findOne<UserDoc>({\n collection: collectionConfig.slug,\n req,\n where: whereConstraint,\n })\n\n // We don't want to indicate specifically that an email was not found,\n // as doing so could lead to the exposure of registered emails.\n // Therefore, we prefer to fail silently.\n if (!user) {\n await commitTransaction(args.req)\n return null\n }\n\n const resetPasswordExpiration = new Date(\n Date.now() + (collectionConfig.auth?.forgotPassword?.expiration ?? expiration ?? 3600000),\n ).toISOString()\n\n user = await payload.update({\n id: user.id,\n collection: collectionConfig.slug,\n data: {\n resetPasswordExpiration,\n resetPasswordToken: token,\n },\n req,\n })\n\n if (!disableEmail && user.email) {\n const protocol = new URL(req.url!).protocol // includes the final :\n const serverURL =\n config.serverURL !== null && config.serverURL !== ''\n ? config.serverURL\n : `${protocol}//${req.headers.get('host')}`\n const forgotURL = formatAdminURL({\n adminRoute: config.routes.admin,\n path: `${config.admin.routes.reset}/${token}`,\n serverURL,\n })\n let html = `${req.t('authentication:youAreReceivingResetPassword')}\n <a href=\"${forgotURL}\">${forgotURL}</a>\n ${req.t('authentication:youDidNotRequestPassword')}`\n\n if (typeof collectionConfig.auth.forgotPassword?.generateEmailHTML === 'function') {\n html = await collectionConfig.auth.forgotPassword.generateEmailHTML({\n req,\n token,\n user,\n })\n }\n\n let subject = req.t('authentication:resetYourPassword')\n\n if (typeof collectionConfig.auth.forgotPassword?.generateEmailSubject === 'function') {\n subject = await collectionConfig.auth.forgotPassword.generateEmailSubject({\n req,\n token,\n user,\n })\n }\n\n await email.sendEmail({\n from: `\"${email.defaultFromName}\" <${email.defaultFromAddress}>`,\n html,\n subject,\n to: user.email,\n })\n }\n\n // /////////////////////////////////////\n // afterForgotPassword - Collection\n // /////////////////////////////////////\n\n if (collectionConfig.hooks?.afterForgotPassword?.length) {\n for (const hook of collectionConfig.hooks.afterForgotPassword) {\n await hook({ args, collection: args.collection?.config, context: req.context })\n }\n }\n\n // /////////////////////////////////////\n // afterOperation - Collection\n // /////////////////////////////////////\n\n token = await buildAfterOperation({\n args,\n collection: args.collection?.config,\n operation: 'forgotPassword',\n result: token,\n })\n\n if (shouldCommit) {\n await commitTransaction(req)\n }\n\n return token\n } catch (error: unknown) {\n await killTransaction(args.req)\n throw error\n }\n}\n"],"names":["crypto","status","httpStatus","URL","buildAfterOperation","buildBeforeOperation","APIError","Forbidden","appendNonTrashedFilter","commitTransaction","formatAdminURL","initTransaction","killTransaction","getLoginOptions","forgotPasswordOperation","incomingArgs","loginWithUsername","collection","config","auth","data","canLoginWithEmail","canLoginWithUsername","sanitizedEmail","email","toLowerCase","trim","sanitizedUsername","username","args","disableLocalStrategy","req","t","BAD_REQUEST","shouldCommit","operation","collectionConfig","disableEmail","expiration","payload","token","randomBytes","toString","whereConstraint","equals","enableTrash","trash","where","user","db","findOne","slug","resetPasswordExpiration","Date","now","forgotPassword","toISOString","update","id","resetPasswordToken","protocol","url","serverURL","headers","get","forgotURL","adminRoute","routes","admin","path","reset","html","generateEmailHTML","subject","generateEmailSubject","sendEmail","from","defaultFromName","defaultFromAddress","to","hooks","afterForgotPassword","length","hook","context","result","error"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAC3B,SAASC,UAAUC,UAAU,QAAQ,cAAa;AAClD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gBACpBC,MAAM,CAAC,CAAC,EAAEpD,MAAMqD,eAAe,CAAC,GAAG,EAAErD,MAAMsD,kBAAkB,CAAC,CAAC,CAAC;gBAChEP;gBACAE;gBACAM,IAAI/B,KAAKxB,KAAK;YAChB;QACF;QAEA,wCAAwC;QACxC,mCAAmC;QACnC,wCAAwC;QAExC,IAAIY,iBAAiB4C,KAAK,EAAEC,qBAAqBC,QAAQ;YACvD,KAAK,MAAMC,QAAQ/C,iBAAiB4C,KAAK,CAACC,mBAAmB,CAAE;gBAC7D,MAAME,KAAK;oBAAEtD;oBAAMZ,YAAYY,KAAKZ,UAAU,EAAEC;oBAAQkE,SAASrD,IAAIqD,OAAO;gBAAC;YAC/E;QACF;QAEA,wCAAwC;QACxC,8BAA8B;QAC9B,wCAAwC;QAExC5C,QAAQ,MAAMpC,oBAAoB;YAChCyB;YACAZ,YAAYY,KAAKZ,UAAU,EAAEC;YAC7BiB,WAAW;YACXkD,QAAQ7C;QACV;QAEA,IAAIN,cAAc;YAChB,MAAMzB,kBAAkBsB;QAC1B;QAEA,OAAOS;IACT,EAAE,OAAO8C,OAAgB;QACvB,MAAM1E,gBAAgBiB,KAAKE,GAAG;QAC9B,MAAMuD;IACR;AACF,EAAC"}
@@ -1,8 +1,8 @@
1
- import type { CollectionSlug, Payload, RequestContext } from '../../../index.js';
1
+ import type { AuthCollectionSlug, Payload, RequestContext } from '../../../index.js';
2
2
  import type { PayloadRequest } from '../../../types/index.js';
3
3
  import type { Result } from '../forgotPassword.js';
4
- export type Options<T extends CollectionSlug> = {
5
- collection: T;
4
+ export type Options<TSlug extends AuthCollectionSlug> = {
5
+ collection: TSlug;
6
6
  context?: RequestContext;
7
7
  data: {
8
8
  email: string;
@@ -11,5 +11,5 @@ export type Options<T extends CollectionSlug> = {
11
11
  expiration?: number;
12
12
  req?: Partial<PayloadRequest>;
13
13
  };
14
- export declare function forgotPasswordLocal<T extends CollectionSlug>(payload: Payload, options: Options<T>): Promise<Result>;
14
+ export declare function forgotPasswordLocal<T extends AuthCollectionSlug>(payload: Payload, options: Options<T>): Promise<Result>;
15
15
  //# sourceMappingURL=forgotPassword.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"forgotPassword.d.ts","sourceRoot":"","sources":["../../../../src/auth/operations/local/forgotPassword.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAMlD,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,cAAc,IAAI;IAC9C,UAAU,EAAE,CAAC,CAAA;IACb,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CAC9B,CAAA;AAED,wBAAsB,mBAAmB,CAAC,CAAC,SAAS,cAAc,EAChE,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAClB,OAAO,CAAC,MAAM,CAAC,CAoBjB"}
1
+ {"version":3,"file":"forgotPassword.d.ts","sourceRoot":"","sources":["../../../../src/auth/operations/local/forgotPassword.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAMlD,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,kBAAkB,IAAI;IACtD,UAAU,EAAE,KAAK,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CAC9B,CAAA;AAED,wBAAsB,mBAAmB,CAAC,CAAC,SAAS,kBAAkB,EACpE,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAClB,OAAO,CAAC,MAAM,CAAC,CAoBjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/auth/operations/local/forgotPassword.ts"],"sourcesContent":["import type { CollectionSlug, Payload, RequestContext } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\nimport type { Result } from '../forgotPassword.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { forgotPasswordOperation } from '../forgotPassword.js'\n\nexport type Options<T extends CollectionSlug> = {\n collection: T\n context?: RequestContext\n data: {\n email: string\n }\n disableEmail?: boolean\n expiration?: number\n req?: Partial<PayloadRequest>\n}\n\nexport async function forgotPasswordLocal<T extends CollectionSlug>(\n payload: Payload,\n options: Options<T>,\n): Promise<Result> {\n const { collection: collectionSlug, data, disableEmail, expiration } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(\n collectionSlug,\n )} can't be found. Forgot Password Operation.`,\n )\n }\n\n return forgotPasswordOperation({\n collection,\n data,\n disableEmail,\n expiration,\n req: await createLocalReq(options, payload),\n }) as Promise<Result>\n}\n"],"names":["APIError","createLocalReq","forgotPasswordOperation","forgotPasswordLocal","payload","options","collection","collectionSlug","data","disableEmail","expiration","collections","String","req"],"mappings":"AAIA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,uBAAuB,QAAQ,uBAAsB;AAa9D,OAAO,eAAeC,oBACpBC,OAAgB,EAChBC,OAAmB;IAEnB,MAAM,EAAEC,YAAYC,cAAc,EAAEC,IAAI,EAAEC,YAAY,EAAEC,UAAU,EAAE,GAAGL;IAEvE,MAAMC,aAAaF,QAAQO,WAAW,CAACJ,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIN,SACR,CAAC,yBAAyB,EAAEY,OAC1BL,gBACA,2CAA2C,CAAC;IAElD;IAEA,OAAOL,wBAAwB;QAC7BI;QACAE;QACAC;QACAC;QACAG,KAAK,MAAMZ,eAAeI,SAASD;IACrC;AACF"}
1
+ {"version":3,"sources":["../../../../src/auth/operations/local/forgotPassword.ts"],"sourcesContent":["import type { AuthCollectionSlug, Payload, RequestContext } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\nimport type { Result } from '../forgotPassword.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { forgotPasswordOperation } from '../forgotPassword.js'\n\nexport type Options<TSlug extends AuthCollectionSlug> = {\n collection: TSlug\n context?: RequestContext\n data: {\n email: string\n }\n disableEmail?: boolean\n expiration?: number\n req?: Partial<PayloadRequest>\n}\n\nexport async function forgotPasswordLocal<T extends AuthCollectionSlug>(\n payload: Payload,\n options: Options<T>,\n): Promise<Result> {\n const { collection: collectionSlug, data, disableEmail, expiration } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(\n collectionSlug,\n )} can't be found. Forgot Password Operation.`,\n )\n }\n\n return forgotPasswordOperation({\n collection,\n data,\n disableEmail,\n expiration,\n req: await createLocalReq(options, payload),\n }) as Promise<Result>\n}\n"],"names":["APIError","createLocalReq","forgotPasswordOperation","forgotPasswordLocal","payload","options","collection","collectionSlug","data","disableEmail","expiration","collections","String","req"],"mappings":"AAIA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,uBAAuB,QAAQ,uBAAsB;AAa9D,OAAO,eAAeC,oBACpBC,OAAgB,EAChBC,OAAmB;IAEnB,MAAM,EAAEC,YAAYC,cAAc,EAAEC,IAAI,EAAEC,YAAY,EAAEC,UAAU,EAAE,GAAGL;IAEvE,MAAMC,aAAaF,QAAQO,WAAW,CAACJ,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIN,SACR,CAAC,yBAAyB,EAAEY,OAC1BL,gBACA,2CAA2C,CAAC;IAElD;IAEA,OAAOL,wBAAwB;QAC7BI;QACAE;QACAC;QACAC;QACAG,KAAK,MAAMZ,eAAeI,SAASD;IACrC;AACF"}
@@ -1,7 +1,7 @@
1
- import type { AuthOperationsFromCollectionSlug, CollectionSlug, DataFromCollectionSlug, Payload, RequestContext } from '../../../index.js';
1
+ import type { AuthCollectionSlug, AuthOperationsFromCollectionSlug, Payload, RequestContext } from '../../../index.js';
2
2
  import type { PayloadRequest } from '../../../types/index.js';
3
- import type { Result } from '../login.js';
4
- export type Options<TSlug extends CollectionSlug> = {
3
+ import type { LoginResult } from '../login.js';
4
+ export type Options<TSlug extends AuthCollectionSlug> = {
5
5
  collection: TSlug;
6
6
  context?: RequestContext;
7
7
  data: AuthOperationsFromCollectionSlug<TSlug>['login'];
@@ -13,7 +13,5 @@ export type Options<TSlug extends CollectionSlug> = {
13
13
  showHiddenFields?: boolean;
14
14
  trash?: boolean;
15
15
  };
16
- export declare function loginLocal<TSlug extends CollectionSlug>(payload: Payload, options: Options<TSlug>): Promise<{
17
- user: DataFromCollectionSlug<TSlug>;
18
- } & Result>;
16
+ export declare function loginLocal<TSlug extends AuthCollectionSlug>(payload: Payload, options: Options<TSlug>): Promise<LoginResult<TSlug>>;
19
17
  //# sourceMappingURL=login.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/auth/operations/local/login.ts"],"names":[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KAAK,SAAS,kBAAkB,IAAI;IACtD,UAAU,EAAE,KAAK,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,IAAI,EAAE,gCAAgC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAA;IACtD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,wBAAsB,UAAU,CAAC,KAAK,SAAS,kBAAkB,EAC/D,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,GACtB,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAiC7B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/auth/operations/local/login.ts"],"sourcesContent":["import type {\n AuthOperationsFromCollectionSlug,\n CollectionSlug,\n DataFromCollectionSlug,\n Payload,\n RequestContext,\n} from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\nimport type { Result } from '../login.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { loginOperation } from '../login.js'\n\nexport type Options<TSlug extends CollectionSlug> = {\n collection: TSlug\n context?: RequestContext\n data: AuthOperationsFromCollectionSlug<TSlug>['login']\n depth?: number\n fallbackLocale?: string\n locale?: string\n overrideAccess?: boolean\n req?: Partial<PayloadRequest>\n showHiddenFields?: boolean\n trash?: boolean\n}\n\nexport async function loginLocal<TSlug extends CollectionSlug>(\n payload: Payload,\n options: Options<TSlug>,\n): Promise<{ user: DataFromCollectionSlug<TSlug> } & Result> {\n const {\n collection: collectionSlug,\n data,\n depth,\n overrideAccess = true,\n showHiddenFields,\n } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(collectionSlug)} can't be found. Login Operation.`,\n )\n }\n\n const args = {\n collection,\n data,\n depth,\n overrideAccess,\n req: await createLocalReq(options, payload),\n showHiddenFields,\n }\n\n const result = await loginOperation<TSlug>(args)\n\n if (collection.config.auth.removeTokenFromResponses) {\n delete result.token\n }\n\n return result\n}\n"],"names":["APIError","createLocalReq","loginOperation","loginLocal","payload","options","collection","collectionSlug","data","depth","overrideAccess","showHiddenFields","collections","String","args","req","result","config","auth","removeTokenFromResponses","token"],"mappings":"AAUA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,cAAc,QAAQ,cAAa;AAe5C,OAAO,eAAeC,WACpBC,OAAgB,EAChBC,OAAuB;IAEvB,MAAM,EACJC,YAAYC,cAAc,EAC1BC,IAAI,EACJC,KAAK,EACLC,iBAAiB,IAAI,EACrBC,gBAAgB,EACjB,GAAGN;IAEJ,MAAMC,aAAaF,QAAQQ,WAAW,CAACL,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIN,SACR,CAAC,yBAAyB,EAAEa,OAAON,gBAAgB,iCAAiC,CAAC;IAEzF;IAEA,MAAMO,OAAO;QACXR;QACAE;QACAC;QACAC;QACAK,KAAK,MAAMd,eAAeI,SAASD;QACnCO;IACF;IAEA,MAAMK,SAAS,MAAMd,eAAsBY;IAE3C,IAAIR,WAAWW,MAAM,CAACC,IAAI,CAACC,wBAAwB,EAAE;QACnD,OAAOH,OAAOI,KAAK;IACrB;IAEA,OAAOJ;AACT"}
1
+ {"version":3,"sources":["../../../../src/auth/operations/local/login.ts"],"sourcesContent":["import type {\n AuthCollectionSlug,\n AuthOperationsFromCollectionSlug,\n Payload,\n RequestContext,\n} from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\nimport type { LoginResult } from '../login.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { loginOperation } from '../login.js'\n\nexport type Options<TSlug extends AuthCollectionSlug> = {\n collection: TSlug\n context?: RequestContext\n data: AuthOperationsFromCollectionSlug<TSlug>['login']\n depth?: number\n fallbackLocale?: string\n locale?: string\n overrideAccess?: boolean\n req?: Partial<PayloadRequest>\n showHiddenFields?: boolean\n trash?: boolean\n}\n\nexport async function loginLocal<TSlug extends AuthCollectionSlug>(\n payload: Payload,\n options: Options<TSlug>,\n): Promise<LoginResult<TSlug>> {\n const {\n collection: collectionSlug,\n data,\n depth,\n overrideAccess = true,\n showHiddenFields,\n } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(collectionSlug)} can't be found. Login Operation.`,\n )\n }\n\n const args = {\n collection,\n data,\n depth,\n overrideAccess,\n req: await createLocalReq(options, payload),\n showHiddenFields,\n }\n\n const result = await loginOperation<TSlug>(args)\n\n if (collection.config.auth.removeTokenFromResponses) {\n delete result.token\n }\n\n return result\n}\n"],"names":["APIError","createLocalReq","loginOperation","loginLocal","payload","options","collection","collectionSlug","data","depth","overrideAccess","showHiddenFields","collections","String","args","req","result","config","auth","removeTokenFromResponses","token"],"mappings":"AASA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,cAAc,QAAQ,cAAa;AAe5C,OAAO,eAAeC,WACpBC,OAAgB,EAChBC,OAAuB;IAEvB,MAAM,EACJC,YAAYC,cAAc,EAC1BC,IAAI,EACJC,KAAK,EACLC,iBAAiB,IAAI,EACrBC,gBAAgB,EACjB,GAAGN;IAEJ,MAAMC,aAAaF,QAAQQ,WAAW,CAACL,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIN,SACR,CAAC,yBAAyB,EAAEa,OAAON,gBAAgB,iCAAiC,CAAC;IAEzF;IAEA,MAAMO,OAAO;QACXR;QACAE;QACAC;QACAC;QACAK,KAAK,MAAMd,eAAeI,SAASD;QACnCO;IACF;IAEA,MAAMK,SAAS,MAAMd,eAAsBY;IAE3C,IAAIR,WAAWW,MAAM,CAACC,IAAI,CAACC,wBAAwB,EAAE;QACnD,OAAOH,OAAOI,KAAK;IACrB;IAEA,OAAOJ;AACT"}
@@ -1,8 +1,8 @@
1
- import type { CollectionSlug, Payload, RequestContext } from '../../../index.js';
1
+ import type { AuthCollectionSlug, Payload, RequestContext } from '../../../index.js';
2
2
  import type { PayloadRequest } from '../../../types/index.js';
3
3
  import type { Result } from '../resetPassword.js';
4
- export type Options<T extends CollectionSlug> = {
5
- collection: T;
4
+ export type Options<TSlug extends AuthCollectionSlug> = {
5
+ collection: TSlug;
6
6
  context?: RequestContext;
7
7
  data: {
8
8
  password: string;
@@ -11,5 +11,5 @@ export type Options<T extends CollectionSlug> = {
11
11
  overrideAccess: boolean;
12
12
  req?: Partial<PayloadRequest>;
13
13
  };
14
- export declare function resetPasswordLocal<TSlug extends CollectionSlug>(payload: Payload, options: Options<TSlug>): Promise<Result>;
14
+ export declare function resetPasswordLocal<TSlug extends AuthCollectionSlug>(payload: Payload, options: Options<TSlug>): Promise<Result>;
15
15
  //# sourceMappingURL=resetPassword.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resetPassword.d.ts","sourceRoot":"","sources":["../../../../src/auth/operations/local/resetPassword.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAMjD,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,cAAc,IAAI;IAC9C,UAAU,EAAE,CAAC,CAAA;IACb,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAA;QAChB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,cAAc,EAAE,OAAO,CAAA;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CAC9B,CAAA;AAED,wBAAsB,kBAAkB,CAAC,KAAK,SAAS,cAAc,EACnE,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,GACtB,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
1
+ {"version":3,"file":"resetPassword.d.ts","sourceRoot":"","sources":["../../../../src/auth/operations/local/resetPassword.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAMjD,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,kBAAkB,IAAI;IACtD,UAAU,EAAE,KAAK,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAA;QAChB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,cAAc,EAAE,OAAO,CAAA;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CAC9B,CAAA;AAED,wBAAsB,kBAAkB,CAAC,KAAK,SAAS,kBAAkB,EACvE,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,GACtB,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/auth/operations/local/resetPassword.ts"],"sourcesContent":["import type { CollectionSlug, Payload, RequestContext } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\nimport type { Result } from '../resetPassword.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { resetPasswordOperation } from '../resetPassword.js'\n\nexport type Options<T extends CollectionSlug> = {\n collection: T\n context?: RequestContext\n data: {\n password: string\n token: string\n }\n overrideAccess: boolean\n req?: Partial<PayloadRequest>\n}\n\nexport async function resetPasswordLocal<TSlug extends CollectionSlug>(\n payload: Payload,\n options: Options<TSlug>,\n): Promise<Result> {\n const { collection: collectionSlug, data, overrideAccess } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(\n collectionSlug,\n )} can't be found. Reset Password Operation.`,\n )\n }\n\n const result = await resetPasswordOperation<TSlug>({\n collection,\n data,\n overrideAccess,\n req: await createLocalReq(options, payload),\n })\n\n if (collection.config.auth.removeTokenFromResponses) {\n delete result.token\n }\n\n return result\n}\n"],"names":["APIError","createLocalReq","resetPasswordOperation","resetPasswordLocal","payload","options","collection","collectionSlug","data","overrideAccess","collections","String","result","req","config","auth","removeTokenFromResponses","token"],"mappings":"AAIA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,sBAAsB,QAAQ,sBAAqB;AAa5D,OAAO,eAAeC,mBACpBC,OAAgB,EAChBC,OAAuB;IAEvB,MAAM,EAAEC,YAAYC,cAAc,EAAEC,IAAI,EAAEC,cAAc,EAAE,GAAGJ;IAE7D,MAAMC,aAAaF,QAAQM,WAAW,CAACH,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIN,SACR,CAAC,yBAAyB,EAAEW,OAC1BJ,gBACA,0CAA0C,CAAC;IAEjD;IAEA,MAAMK,SAAS,MAAMV,uBAA8B;QACjDI;QACAE;QACAC;QACAI,KAAK,MAAMZ,eAAeI,SAASD;IACrC;IAEA,IAAIE,WAAWQ,MAAM,CAACC,IAAI,CAACC,wBAAwB,EAAE;QACnD,OAAOJ,OAAOK,KAAK;IACrB;IAEA,OAAOL;AACT"}
1
+ {"version":3,"sources":["../../../../src/auth/operations/local/resetPassword.ts"],"sourcesContent":["import type { AuthCollectionSlug, Payload, RequestContext } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\nimport type { Result } from '../resetPassword.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { resetPasswordOperation } from '../resetPassword.js'\n\nexport type Options<TSlug extends AuthCollectionSlug> = {\n collection: TSlug\n context?: RequestContext\n data: {\n password: string\n token: string\n }\n overrideAccess: boolean\n req?: Partial<PayloadRequest>\n}\n\nexport async function resetPasswordLocal<TSlug extends AuthCollectionSlug>(\n payload: Payload,\n options: Options<TSlug>,\n): Promise<Result> {\n const { collection: collectionSlug, data, overrideAccess } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(\n collectionSlug,\n )} can't be found. Reset Password Operation.`,\n )\n }\n\n const result = await resetPasswordOperation<TSlug>({\n collection,\n data,\n overrideAccess,\n req: await createLocalReq(options, payload),\n })\n\n if (collection.config.auth.removeTokenFromResponses) {\n delete result.token\n }\n\n return result\n}\n"],"names":["APIError","createLocalReq","resetPasswordOperation","resetPasswordLocal","payload","options","collection","collectionSlug","data","overrideAccess","collections","String","result","req","config","auth","removeTokenFromResponses","token"],"mappings":"AAIA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,sBAAsB,QAAQ,sBAAqB;AAa5D,OAAO,eAAeC,mBACpBC,OAAgB,EAChBC,OAAuB;IAEvB,MAAM,EAAEC,YAAYC,cAAc,EAAEC,IAAI,EAAEC,cAAc,EAAE,GAAGJ;IAE7D,MAAMC,aAAaF,QAAQM,WAAW,CAACH,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIN,SACR,CAAC,yBAAyB,EAAEW,OAC1BJ,gBACA,0CAA0C,CAAC;IAEjD;IAEA,MAAMK,SAAS,MAAMV,uBAA8B;QACjDI;QACAE;QACAC;QACAI,KAAK,MAAMZ,eAAeI,SAASD;IACrC;IAEA,IAAIE,WAAWQ,MAAM,CAACC,IAAI,CAACC,wBAAwB,EAAE;QACnD,OAAOJ,OAAOK,KAAK;IACrB;IAEA,OAAOL;AACT"}
@@ -1,11 +1,11 @@
1
- import type { AuthOperationsFromCollectionSlug, CollectionSlug, Payload, RequestContext } from '../../../index.js';
1
+ import type { AuthCollectionSlug, AuthOperationsFromCollectionSlug, Payload, RequestContext } from '../../../index.js';
2
2
  import type { PayloadRequest } from '../../../types/index.js';
3
- export type Options<TSlug extends CollectionSlug> = {
3
+ export type Options<TSlug extends AuthCollectionSlug> = {
4
4
  collection: TSlug;
5
5
  context?: RequestContext;
6
6
  data: AuthOperationsFromCollectionSlug<TSlug>['unlock'];
7
7
  overrideAccess: boolean;
8
8
  req?: Partial<PayloadRequest>;
9
9
  };
10
- export declare function unlockLocal<TSlug extends CollectionSlug>(payload: Payload, options: Options<TSlug>): Promise<boolean>;
10
+ export declare function unlockLocal<TSlug extends AuthCollectionSlug>(payload: Payload, options: Options<TSlug>): Promise<boolean>;
11
11
  //# sourceMappingURL=unlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unlock.d.ts","sourceRoot":"","sources":["../../../../src/auth/operations/local/unlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,cAAc,EACd,OAAO,EACP,cAAc,EACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAM7D,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,cAAc,IAAI;IAClD,UAAU,EAAE,KAAK,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,IAAI,EAAE,gCAAgC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAA;IACvD,cAAc,EAAE,OAAO,CAAA;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CAC9B,CAAA;AAED,wBAAsB,WAAW,CAAC,KAAK,SAAS,cAAc,EAC5D,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,GACtB,OAAO,CAAC,OAAO,CAAC,CAiBlB"}
1
+ {"version":3,"file":"unlock.d.ts","sourceRoot":"","sources":["../../../../src/auth/operations/local/unlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,gCAAgC,EAChC,OAAO,EACP,cAAc,EACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAM7D,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,kBAAkB,IAAI;IACtD,UAAU,EAAE,KAAK,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,IAAI,EAAE,gCAAgC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAA;IACvD,cAAc,EAAE,OAAO,CAAA;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CAC9B,CAAA;AAED,wBAAsB,WAAW,CAAC,KAAK,SAAS,kBAAkB,EAChE,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,GACtB,OAAO,CAAC,OAAO,CAAC,CAiBlB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/auth/operations/local/unlock.ts"],"sourcesContent":["import type {\n AuthOperationsFromCollectionSlug,\n CollectionSlug,\n Payload,\n RequestContext,\n} from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { unlockOperation } from '../unlock.js'\n\nexport type Options<TSlug extends CollectionSlug> = {\n collection: TSlug\n context?: RequestContext\n data: AuthOperationsFromCollectionSlug<TSlug>['unlock']\n overrideAccess: boolean\n req?: Partial<PayloadRequest>\n}\n\nexport async function unlockLocal<TSlug extends CollectionSlug>(\n payload: Payload,\n options: Options<TSlug>,\n): Promise<boolean> {\n const { collection: collectionSlug, data, overrideAccess = true } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(collectionSlug)} can't be found. Unlock Operation.`,\n )\n }\n\n return unlockOperation<TSlug>({\n collection,\n data,\n overrideAccess,\n req: await createLocalReq(options, payload),\n })\n}\n"],"names":["APIError","createLocalReq","unlockOperation","unlockLocal","payload","options","collection","collectionSlug","data","overrideAccess","collections","String","req"],"mappings":"AAQA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,eAAe,QAAQ,eAAc;AAU9C,OAAO,eAAeC,YACpBC,OAAgB,EAChBC,OAAuB;IAEvB,MAAM,EAAEC,YAAYC,cAAc,EAAEC,IAAI,EAAEC,iBAAiB,IAAI,EAAE,GAAGJ;IAEpE,MAAMC,aAAaF,QAAQM,WAAW,CAACH,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIN,SACR,CAAC,yBAAyB,EAAEW,OAAOJ,gBAAgB,kCAAkC,CAAC;IAE1F;IAEA,OAAOL,gBAAuB;QAC5BI;QACAE;QACAC;QACAG,KAAK,MAAMX,eAAeI,SAASD;IACrC;AACF"}
1
+ {"version":3,"sources":["../../../../src/auth/operations/local/unlock.ts"],"sourcesContent":["import type {\n AuthCollectionSlug,\n AuthOperationsFromCollectionSlug,\n Payload,\n RequestContext,\n} from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { unlockOperation } from '../unlock.js'\n\nexport type Options<TSlug extends AuthCollectionSlug> = {\n collection: TSlug\n context?: RequestContext\n data: AuthOperationsFromCollectionSlug<TSlug>['unlock']\n overrideAccess: boolean\n req?: Partial<PayloadRequest>\n}\n\nexport async function unlockLocal<TSlug extends AuthCollectionSlug>(\n payload: Payload,\n options: Options<TSlug>,\n): Promise<boolean> {\n const { collection: collectionSlug, data, overrideAccess = true } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(collectionSlug)} can't be found. Unlock Operation.`,\n )\n }\n\n return unlockOperation<TSlug>({\n collection,\n data,\n overrideAccess,\n req: await createLocalReq(options, payload),\n })\n}\n"],"names":["APIError","createLocalReq","unlockOperation","unlockLocal","payload","options","collection","collectionSlug","data","overrideAccess","collections","String","req"],"mappings":"AAQA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,eAAe,QAAQ,eAAc;AAU9C,OAAO,eAAeC,YACpBC,OAAgB,EAChBC,OAAuB;IAEvB,MAAM,EAAEC,YAAYC,cAAc,EAAEC,IAAI,EAAEC,iBAAiB,IAAI,EAAE,GAAGJ;IAEpE,MAAMC,aAAaF,QAAQM,WAAW,CAACH,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIN,SACR,CAAC,yBAAyB,EAAEW,OAAOJ,gBAAgB,kCAAkC,CAAC;IAE1F;IAEA,OAAOL,gBAAuB;QAC5BI;QACAE;QACAC;QACAG,KAAK,MAAMX,eAAeI,SAASD;IACrC;AACF"}
@@ -1,10 +1,10 @@
1
- import type { CollectionSlug, Payload, RequestContext } from '../../../index.js';
1
+ import type { AuthCollectionSlug, Payload, RequestContext } from '../../../index.js';
2
2
  import type { PayloadRequest } from '../../../types/index.js';
3
- export type Options<T extends CollectionSlug> = {
4
- collection: T;
3
+ export type Options<TSlug extends AuthCollectionSlug> = {
4
+ collection: TSlug;
5
5
  context?: RequestContext;
6
6
  req?: Partial<PayloadRequest>;
7
7
  token: string;
8
8
  };
9
- export declare function verifyEmailLocal<T extends CollectionSlug>(payload: Payload, options: Options<T>): Promise<boolean>;
9
+ export declare function verifyEmailLocal<T extends AuthCollectionSlug>(payload: Payload, options: Options<T>): Promise<boolean>;
10
10
  //# sourceMappingURL=verifyEmail.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verifyEmail.d.ts","sourceRoot":"","sources":["../../../../src/auth/operations/local/verifyEmail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAM7D,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,cAAc,IAAI;IAC9C,UAAU,EAAE,CAAC,CAAA;IACb,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,cAAc,EAC7D,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAClB,OAAO,CAAC,OAAO,CAAC,CAgBlB"}
1
+ {"version":3,"file":"verifyEmail.d.ts","sourceRoot":"","sources":["../../../../src/auth/operations/local/verifyEmail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAM7D,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,kBAAkB,IAAI;IACtD,UAAU,EAAE,KAAK,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,kBAAkB,EACjE,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAClB,OAAO,CAAC,OAAO,CAAC,CAgBlB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/auth/operations/local/verifyEmail.ts"],"sourcesContent":["import type { CollectionSlug, Payload, RequestContext } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { verifyEmailOperation } from '../verifyEmail.js'\n\nexport type Options<T extends CollectionSlug> = {\n collection: T\n context?: RequestContext\n req?: Partial<PayloadRequest>\n token: string\n}\n\nexport async function verifyEmailLocal<T extends CollectionSlug>(\n payload: Payload,\n options: Options<T>,\n): Promise<boolean> {\n const { collection: collectionSlug, token } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(collectionSlug)} can't be found. Verify Email Operation.`,\n )\n }\n\n return verifyEmailOperation({\n collection,\n req: await createLocalReq(options, payload),\n token,\n })\n}\n"],"names":["APIError","createLocalReq","verifyEmailOperation","verifyEmailLocal","payload","options","collection","collectionSlug","token","collections","String","req"],"mappings":"AAGA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,oBAAoB,QAAQ,oBAAmB;AASxD,OAAO,eAAeC,iBACpBC,OAAgB,EAChBC,OAAmB;IAEnB,MAAM,EAAEC,YAAYC,cAAc,EAAEC,KAAK,EAAE,GAAGH;IAE9C,MAAMC,aAAaF,QAAQK,WAAW,CAACF,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIN,SACR,CAAC,yBAAyB,EAAEU,OAAOH,gBAAgB,wCAAwC,CAAC;IAEhG;IAEA,OAAOL,qBAAqB;QAC1BI;QACAK,KAAK,MAAMV,eAAeI,SAASD;QACnCI;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../src/auth/operations/local/verifyEmail.ts"],"sourcesContent":["import type { AuthCollectionSlug, Payload, RequestContext } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { verifyEmailOperation } from '../verifyEmail.js'\n\nexport type Options<TSlug extends AuthCollectionSlug> = {\n collection: TSlug\n context?: RequestContext\n req?: Partial<PayloadRequest>\n token: string\n}\n\nexport async function verifyEmailLocal<T extends AuthCollectionSlug>(\n payload: Payload,\n options: Options<T>,\n): Promise<boolean> {\n const { collection: collectionSlug, token } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(collectionSlug)} can't be found. Verify Email Operation.`,\n )\n }\n\n return verifyEmailOperation({\n collection,\n req: await createLocalReq(options, payload),\n token,\n })\n}\n"],"names":["APIError","createLocalReq","verifyEmailOperation","verifyEmailLocal","payload","options","collection","collectionSlug","token","collections","String","req"],"mappings":"AAGA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,oBAAoB,QAAQ,oBAAmB;AASxD,OAAO,eAAeC,iBACpBC,OAAgB,EAChBC,OAAmB;IAEnB,MAAM,EAAEC,YAAYC,cAAc,EAAEC,KAAK,EAAE,GAAGH;IAE9C,MAAMC,aAAaF,QAAQK,WAAW,CAACF,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIN,SACR,CAAC,yBAAyB,EAAEU,OAAOH,gBAAgB,wCAAwC,CAAC;IAEhG;IAEA,OAAOL,qBAAqB;QAC1BI;QACAK,KAAK,MAAMV,eAAeI,SAASD;QACnCI;IACF;AACF"}
@@ -1,12 +1,12 @@
1
1
  import type { AuthOperationsFromCollectionSlug, Collection, DataFromCollectionSlug } from '../../collections/config/types.js';
2
- import type { CollectionSlug, TypedUser } from '../../index.js';
2
+ import type { AuthCollectionSlug } from '../../index.js';
3
3
  import type { PayloadRequest } from '../../types/index.js';
4
- export type Result = {
4
+ export type LoginResult<TSlug extends AuthCollectionSlug> = {
5
5
  exp?: number;
6
6
  token?: string;
7
- user?: TypedUser;
7
+ user?: DataFromCollectionSlug<TSlug>;
8
8
  };
9
- export type Arguments<TSlug extends CollectionSlug> = {
9
+ export type Arguments<TSlug extends AuthCollectionSlug> = {
10
10
  collection: Collection;
11
11
  data: AuthOperationsFromCollectionSlug<TSlug>['login'];
12
12
  depth?: number;
@@ -14,19 +14,17 @@ export type Arguments<TSlug extends CollectionSlug> = {
14
14
  req: PayloadRequest;
15
15
  showHiddenFields?: boolean;
16
16
  };
17
- type CheckLoginPermissionArgs = {
17
+ type CheckLoginPermissionArgs<TSlug extends AuthCollectionSlug> = {
18
18
  loggingInWithUsername?: boolean;
19
19
  req: PayloadRequest;
20
- user: any;
20
+ user: DataFromCollectionSlug<TSlug>;
21
21
  };
22
22
  /**
23
23
  * Throws an error if the user is locked or does not exist.
24
24
  * This does not check the login attempts, only the lock status. Whoever increments login attempts
25
25
  * is responsible for locking the user properly, not whoever checks the login permission.
26
26
  */
27
- export declare const checkLoginPermission: ({ loggingInWithUsername, req, user, }: CheckLoginPermissionArgs) => void;
28
- export declare const loginOperation: <TSlug extends CollectionSlug>(incomingArgs: Arguments<TSlug>) => Promise<{
29
- user: DataFromCollectionSlug<TSlug>;
30
- } & Result>;
27
+ export declare const checkLoginPermission: <TSlug extends AuthCollectionSlug>({ loggingInWithUsername, req, user, }: CheckLoginPermissionArgs<TSlug>) => void;
28
+ export declare const loginOperation: <TSlug extends AuthCollectionSlug>(incomingArgs: Arguments<TSlug>) => Promise<LoginResult<TSlug>>;
31
29
  export {};
32
30
  //# sourceMappingURL=login.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/auth/operations/login.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,UAAU,EACV,sBAAsB,EACvB,MAAM,mCAAmC,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