payload-auth 1.4.0 → 1.4.1

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 (22) hide show
  1. package/dist/better-auth/adapter/index.d.ts +10 -0
  2. package/dist/better-auth/adapter/index.d.ts.map +1 -1
  3. package/dist/better-auth/adapter/index.js +151 -125
  4. package/dist/better-auth/adapter/transform/index.d.ts +2 -4
  5. package/dist/better-auth/adapter/transform/index.d.ts.map +1 -1
  6. package/dist/better-auth/adapter/transform/index.js +433 -309
  7. package/dist/better-auth/plugin/constants.d.ts +1 -0
  8. package/dist/better-auth/plugin/constants.d.ts.map +1 -1
  9. package/dist/better-auth/plugin/constants.js +2 -1
  10. package/dist/better-auth/plugin/helpers/prepare-session-data.d.ts +52 -6
  11. package/dist/better-auth/plugin/helpers/prepare-session-data.d.ts.map +1 -1
  12. package/dist/better-auth/plugin/helpers/prepare-session-data.js +52 -35
  13. package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts.map +1 -1
  14. package/dist/better-auth/plugin/lib/build-collections/sessions.js +3 -1
  15. package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.d.ts.map +1 -1
  16. package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.js +2 -2
  17. package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.d.ts.map +1 -1
  18. package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.js +6 -4
  19. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts +1 -1
  20. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts.map +1 -1
  21. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.js +16 -14
  22. package/package.json +9 -4
@@ -1,6 +1,16 @@
1
1
  import { generateSchema } from './generate-schema';
2
2
  import type { PayloadAdapter } from './types';
3
3
  export declare const BETTER_AUTH_CONTEXT_KEY = "payload-db-adapter";
4
+ /**
5
+ * Payload adapter for Better Auth
6
+ *
7
+ * This adapter connects Better Auth to Payload CMS, allowing authentication
8
+ * operations to be performed against Payload collections.
9
+ *
10
+ * @param payloadClient - The Payload CMS client instance or a function that returns it
11
+ * @param config - Configuration options for the adapter
12
+ * @returns A function that creates a Better Auth adapter
13
+ */
4
14
  declare const payloadAdapter: PayloadAdapter;
5
15
  export { generateSchema, payloadAdapter };
6
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/better-auth/adapter/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,eAAO,MAAM,uBAAuB,uBAAuB,CAAA;AAG3D,QAAA,MAAM,cAAc,EAAE,cAgerB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/better-auth/adapter/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,eAAO,MAAM,uBAAuB,uBAAuB,CAAA;AAG3D;;;;;;;;;GASG;AACH,QAAA,MAAM,cAAc,EAAE,cAkkBrB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}