payload-auth 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authjs/index.d.ts +1 -0
- package/dist/authjs/index.d.ts.map +1 -0
- package/dist/authjs/index.js +1 -1
- package/dist/better-auth/adapter/generate-schema/generate-schema-builder.d.ts +1 -0
- package/dist/better-auth/adapter/generate-schema/generate-schema-builder.d.ts.map +1 -0
- package/dist/better-auth/adapter/generate-schema/generate-schema-builder.js +1 -1
- package/dist/better-auth/adapter/generate-schema/get-payload-schema.d.ts +1 -0
- package/dist/better-auth/adapter/generate-schema/get-payload-schema.d.ts.map +1 -0
- package/dist/better-auth/adapter/generate-schema/get-payload-schema.js +1 -1
- package/dist/better-auth/adapter/generate-schema/index.d.ts +1 -0
- package/dist/better-auth/adapter/generate-schema/index.d.ts.map +1 -0
- package/dist/better-auth/adapter/generate-schema/index.js +3 -3
- package/dist/better-auth/adapter/generate-schema/utils.d.ts +1 -0
- package/dist/better-auth/adapter/generate-schema/utils.d.ts.map +1 -0
- package/dist/better-auth/adapter/generate-schema/utils.js +1 -1
- package/dist/better-auth/adapter/index.d.ts +3 -2
- package/dist/better-auth/adapter/index.d.ts.map +1 -0
- package/dist/better-auth/adapter/index.js +115 -69
- package/dist/better-auth/adapter/transform/index.d.ts +19 -6
- package/dist/better-auth/adapter/transform/index.d.ts.map +1 -0
- package/dist/better-auth/adapter/transform/index.js +387 -96
- package/dist/better-auth/adapter/types.d.ts +3 -1
- package/dist/better-auth/adapter/types.d.ts.map +1 -0
- package/dist/better-auth/adapter/types.js +1 -1
- package/dist/better-auth/index.d.ts +1 -0
- package/dist/better-auth/index.d.ts.map +1 -0
- package/dist/better-auth/index.js +1 -1
- package/dist/better-auth/plugin/helpers/check-passkey-plugin.d.ts +3 -0
- package/dist/better-auth/plugin/helpers/check-passkey-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/check-passkey-plugin.js +5 -0
- package/dist/better-auth/plugin/helpers/check-username-plugin.d.ts +3 -0
- package/dist/better-auth/plugin/helpers/check-username-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/check-username-plugin.js +5 -0
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.d.ts +1 -0
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.js +8 -8
- package/dist/better-auth/plugin/helpers/get-admin-access.d.ts +8 -0
- package/dist/better-auth/plugin/helpers/get-admin-access.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/get-admin-access.js +22 -0
- package/dist/better-auth/plugin/helpers/get-admin-routes.d.ts +14 -0
- package/dist/better-auth/plugin/helpers/get-admin-routes.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/get-admin-routes.js +6 -0
- package/dist/better-auth/plugin/helpers/get-all-roles.d.ts +6 -0
- package/dist/better-auth/plugin/helpers/get-all-roles.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/get-all-roles.js +20 -0
- package/dist/better-auth/plugin/helpers/get-ip.d.ts +2 -1
- package/dist/better-auth/plugin/helpers/get-ip.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/get-ip.js +14 -14
- package/dist/better-auth/plugin/helpers/get-requst-collection.d.ts +3 -0
- package/dist/better-auth/plugin/helpers/get-requst-collection.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/get-requst-collection.js +14 -0
- package/dist/better-auth/plugin/helpers/index.d.ts +2 -1
- package/dist/better-auth/plugin/helpers/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/index.js +2 -2
- package/dist/better-auth/plugin/{lib → helpers}/prepare-session-data.d.ts +3 -2
- package/dist/better-auth/plugin/helpers/prepare-session-data.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/prepare-session-data.js +42 -0
- package/dist/better-auth/plugin/helpers/serialize-cookie.d.ts +3 -2
- package/dist/better-auth/plugin/helpers/serialize-cookie.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/serialize-cookie.js +34 -34
- package/dist/better-auth/plugin/index.d.ts +8 -7
- package/dist/better-auth/plugin/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/index.js +145 -37
- package/dist/better-auth/plugin/{collections → lib/build-collections}/accounts/hooks/sync-password-to-user.d.ts +2 -1
- package/dist/better-auth/plugin/lib/build-collections/accounts/hooks/sync-password-to-user.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/accounts/hooks/sync-password-to-user.js +47 -0
- package/dist/better-auth/plugin/lib/build-collections/accounts/index.d.ts +7 -0
- package/dist/better-auth/plugin/lib/build-collections/accounts/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/accounts/index.js +159 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.js +11 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.js +8 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.d.ts +7 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.js +107 -0
- package/dist/better-auth/plugin/lib/build-collections/api-keys.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/api-keys.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/api-keys.js +196 -0
- package/dist/better-auth/plugin/lib/build-collections/index.d.ts +12 -0
- package/dist/better-auth/plugin/lib/build-collections/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/index.js +96 -0
- package/dist/better-auth/plugin/lib/build-collections/invitations.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/invitations.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/invitations.js +91 -0
- package/dist/better-auth/plugin/lib/build-collections/jwks.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/jwks.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/jwks.js +43 -0
- package/dist/better-auth/plugin/lib/build-collections/members.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/members.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/members.js +71 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.js +98 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-applications.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-applications.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-applications.js +113 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-consents.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-consents.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-consents.js +67 -0
- package/dist/better-auth/plugin/lib/build-collections/organizations.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/organizations.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/organizations.js +59 -0
- package/dist/better-auth/plugin/lib/build-collections/passkeys.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/passkeys.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/passkeys.js +108 -0
- package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts +8 -0
- package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/sessions.js +123 -0
- package/dist/better-auth/plugin/lib/build-collections/sso-providers.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/sso-providers.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/sso-providers.js +83 -0
- package/dist/better-auth/plugin/lib/build-collections/teams.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/teams.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/teams.js +45 -0
- package/dist/better-auth/plugin/lib/build-collections/two-factors.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/two-factors.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/two-factors.js +56 -0
- package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.d.ts +8 -0
- package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.js +52 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.js +96 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.d.ts +13 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.js +67 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.d.ts +4 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.js +115 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.js +110 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.js +62 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.js +42 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.d.ts +4 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.js +79 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.d.ts +4 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.js +153 -0
- package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/after-login.d.ts +2 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.js +75 -0
- package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/after-logout.d.ts +2 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-logout.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-logout.js +74 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.d.ts +7 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.js +45 -0
- package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/before-login.d.ts +2 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-login.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-login.js +18 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.js +14 -0
- package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/sync-account.d.ts +2 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/sync-account.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/sync-account.js +82 -0
- package/dist/better-auth/plugin/lib/build-collections/users/index.d.ts +8 -0
- package/dist/better-auth/plugin/lib/build-collections/users/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/index.js +345 -0
- package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.d.ts +8 -0
- package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.js +31 -0
- package/dist/better-auth/plugin/lib/{payload-access.d.ts → build-collections/utils/payload-access.d.ts} +2 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/payload-access.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/utils/payload-access.js +64 -0
- package/dist/better-auth/plugin/lib/build-collections/verifications.d.ts +7 -0
- package/dist/better-auth/plugin/lib/build-collections/verifications.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/verifications.js +63 -0
- package/dist/better-auth/plugin/lib/{config.d.ts → constants.d.ts} +14 -0
- package/dist/better-auth/plugin/lib/constants.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/constants.js +56 -0
- package/dist/better-auth/plugin/lib/get-payload-auth.d.ts +3 -2
- package/dist/better-auth/plugin/lib/get-payload-auth.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/get-payload-auth.js +2 -2
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.d.ts +5 -4
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.js +26 -43
- package/dist/better-auth/plugin/lib/init-better-auth.d.ts +5 -3
- package/dist/better-auth/plugin/lib/init-better-auth.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/init-better-auth.js +6 -6
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.d.ts +3 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.js +8 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.d.ts +2 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.js +17 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.d.ts +10 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.js +118 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.d.ts +2 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.js +58 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.d.ts +2 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.js +86 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.d.ts +2 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.js +17 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.d.ts +2 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.js +17 -0
- package/dist/better-auth/plugin/lib/{ensure-password-set-before-create.d.ts → sanitize-better-auth-options/utils/ensure-password-set-before-create.d.ts} +2 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.js +23 -0
- package/dist/better-auth/plugin/lib/{password.d.ts → sanitize-better-auth-options/utils/password.d.ts} +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.js +62 -0
- package/dist/better-auth/plugin/lib/{respect-save-to-jwt-fields-middleware.d.ts → sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts} +6 -5
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.js +30 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.d.ts +8 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.js +115 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.scss +31 -0
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.d.ts +11 -0
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.js +196 -0
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.scss +131 -0
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.d.ts +14 -0
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.js +111 -0
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.scss +51 -0
- package/dist/better-auth/plugin/payload/components/form-header/index.d.ts +9 -0
- package/dist/better-auth/plugin/payload/components/form-header/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/form-header/index.js +23 -0
- package/dist/better-auth/plugin/payload/components/form-header/index.scss +8 -0
- package/dist/better-auth/plugin/payload/components/icons.d.ts +9 -0
- package/dist/better-auth/plugin/payload/components/icons.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/icons.js +437 -0
- package/dist/better-auth/plugin/payload/components/logo.d.ts +4 -1
- package/dist/better-auth/plugin/payload/components/logo.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/logo.js +22 -34
- package/dist/better-auth/plugin/payload/components/logout-button.d.ts +6 -0
- package/dist/better-auth/plugin/payload/components/logout-button.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/logout-button.js +27 -0
- package/dist/better-auth/plugin/payload/components/rsc-redirect.d.ts +7 -0
- package/dist/better-auth/plugin/payload/components/rsc-redirect.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/rsc-redirect.js +8 -0
- package/dist/better-auth/plugin/payload/components/styles.css +2 -2
- package/dist/better-auth/plugin/payload/components/token-field.d.ts +5 -0
- package/dist/better-auth/plugin/payload/components/token-field.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/token-field.js +30 -0
- package/dist/better-auth/plugin/payload/exports/client.d.ts +7 -3
- package/dist/better-auth/plugin/payload/exports/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/exports/client.js +7 -4
- package/dist/better-auth/plugin/payload/exports/rsc.d.ts +10 -5
- package/dist/better-auth/plugin/payload/exports/rsc.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/exports/rsc.js +10 -6
- package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.d.ts +3 -0
- package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.js +8 -0
- package/dist/better-auth/plugin/payload/utils/generate-metadata.d.ts +15 -0
- package/dist/better-auth/plugin/payload/utils/generate-metadata.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/utils/generate-metadata.js +74 -0
- package/dist/better-auth/plugin/payload/utils/get-safe-redirect.d.ts +2 -0
- package/dist/better-auth/plugin/payload/utils/get-safe-redirect.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/utils/get-safe-redirect.js +23 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/client.d.ts +12 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/client.js +92 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/index.d.ts +11 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/index.js +84 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/index.scss +25 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/client.d.ts +14 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/client.js +95 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.d.ts +11 -3
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.js +124 -92
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.scss +29 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/client.d.ts +8 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/client.js +119 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/index.d.ts +9 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/index.js +69 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/index.scss +0 -0
- package/dist/better-auth/plugin/payload/views/inactivity/index.d.ts +5 -0
- package/dist/better-auth/plugin/payload/views/inactivity/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/inactivity/index.js +12 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.d.ts +9 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.js +54 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.d.ts +1 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.js +121 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.scss +31 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.d.ts +56 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.js +3 -0
- package/dist/better-auth/plugin/payload/views/login/form/index.d.ts +17 -0
- package/dist/better-auth/plugin/payload/views/login/form/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/login/form/index.js +137 -0
- package/dist/better-auth/plugin/payload/views/login/form/index.scss +23 -0
- package/dist/better-auth/plugin/payload/views/login/index.d.ts +11 -4
- package/dist/better-auth/plugin/payload/views/login/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/login/index.js +81 -61
- package/dist/better-auth/plugin/payload/views/login/index.scss +10 -0
- package/dist/better-auth/plugin/payload/views/logout/client.d.ts +8 -0
- package/dist/better-auth/plugin/payload/views/logout/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/logout/client.js +76 -0
- package/dist/better-auth/plugin/payload/views/logout/index.d.ts +8 -0
- package/dist/better-auth/plugin/payload/views/logout/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/logout/index.js +14 -0
- package/dist/better-auth/plugin/payload/views/logout/index.scss +0 -0
- package/dist/better-auth/plugin/payload/views/reset-password/client.d.ts +7 -0
- package/dist/better-auth/plugin/payload/views/reset-password/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/reset-password/client.js +72 -0
- package/dist/better-auth/plugin/payload/views/reset-password/index.d.ts +5 -0
- package/dist/better-auth/plugin/payload/views/reset-password/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/reset-password/index.js +81 -0
- package/dist/better-auth/plugin/payload/views/reset-password/index.scss +9 -0
- package/dist/better-auth/plugin/payload/views/reset-password/metadata.d.ts +3 -0
- package/dist/better-auth/plugin/payload/views/reset-password/metadata.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/reset-password/metadata.js +11 -0
- package/dist/better-auth/plugin/types.d.ts +171 -33
- package/dist/better-auth/plugin/types.d.ts.map +1 -0
- package/dist/better-auth/plugin/types.js +1 -1
- package/dist/better-auth/types.d.ts +1 -0
- package/dist/better-auth/types.d.ts.map +1 -0
- package/dist/better-auth/types.js +1 -1
- package/dist/clerk/admin-ui.d.ts +4 -0
- package/dist/clerk/admin-ui.d.ts.map +1 -0
- package/dist/clerk/admin-ui.js +5 -0
- package/dist/clerk/index.d.ts +7 -1
- package/dist/clerk/index.d.ts.map +1 -0
- package/dist/clerk/index.js +7 -2
- package/dist/clerk/plugin/auth-strategy.d.ts +11 -0
- package/dist/clerk/plugin/auth-strategy.d.ts.map +1 -0
- package/dist/clerk/plugin/auth-strategy.js +45 -0
- package/dist/clerk/plugin/collections/users/access.d.ts +14 -0
- package/dist/clerk/plugin/collections/users/access.d.ts.map +1 -0
- package/dist/clerk/plugin/collections/users/access.js +36 -0
- package/dist/clerk/plugin/collections/users/endpoints/sync-from-clerk.d.ts +14 -0
- package/dist/clerk/plugin/collections/users/endpoints/sync-from-clerk.d.ts.map +1 -0
- package/dist/clerk/plugin/collections/users/endpoints/sync-from-clerk.js +108 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/index.d.ts +4 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/index.d.ts.map +1 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/index.js +5 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userCreated.d.ts +13 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userCreated.d.ts.map +1 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userCreated.js +33 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userDeleted.d.ts +11 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userDeleted.d.ts.map +1 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userDeleted.js +27 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userUpdated.d.ts +13 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userUpdated.d.ts.map +1 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userUpdated.js +35 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/index.d.ts +12 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/index.d.ts.map +1 -0
- package/dist/clerk/plugin/collections/users/endpoints/webhook/index.js +86 -0
- package/dist/clerk/plugin/collections/users/fields.d.ts +6 -0
- package/dist/clerk/plugin/collections/users/fields.d.ts.map +1 -0
- package/dist/clerk/plugin/collections/users/fields.js +81 -0
- package/dist/clerk/plugin/collections/users/index.d.ts +10 -0
- package/dist/clerk/plugin/collections/users/index.d.ts.map +1 -0
- package/dist/clerk/plugin/collections/users/index.js +95 -0
- package/dist/clerk/plugin/components/after-login-form.d.ts +4 -0
- package/dist/clerk/plugin/components/after-login-form.d.ts.map +1 -0
- package/dist/clerk/plugin/components/after-login-form.js +65 -0
- package/dist/clerk/plugin/components/logout-button.d.ts +2 -0
- package/dist/clerk/plugin/components/logout-button.d.ts.map +1 -0
- package/dist/clerk/plugin/components/logout-button.js +49 -0
- package/dist/clerk/plugin/components/sync-clerk-users-button.d.ts +6 -0
- package/dist/clerk/plugin/components/sync-clerk-users-button.d.ts.map +1 -0
- package/dist/clerk/plugin/components/sync-clerk-users-button.js +75 -0
- package/dist/clerk/plugin.d.ts +6 -0
- package/dist/clerk/plugin.d.ts.map +1 -0
- package/dist/clerk/plugin.js +63 -0
- package/dist/clerk/types.d.ts +63 -0
- package/dist/clerk/types.d.ts.map +1 -0
- package/dist/clerk/types.js +3 -0
- package/dist/clerk/utils/clerk-user.d.ts +21 -0
- package/dist/clerk/utils/clerk-user.d.ts.map +1 -0
- package/dist/clerk/utils/clerk-user.js +45 -0
- package/dist/clerk/utils/index.d.ts +4 -0
- package/dist/clerk/utils/index.d.ts.map +1 -0
- package/dist/clerk/utils/index.js +5 -0
- package/dist/clerk/utils/load-clerk-instance.d.ts +8 -0
- package/dist/clerk/utils/load-clerk-instance.d.ts.map +1 -0
- package/dist/clerk/utils/load-clerk-instance.js +11 -0
- package/dist/clerk/utils/svix.d.ts +9 -0
- package/dist/clerk/utils/svix.d.ts.map +1 -0
- package/dist/clerk/utils/svix.js +40 -0
- package/dist/clerk/utils/user.d.ts +17 -0
- package/dist/clerk/utils/user.d.ts.map +1 -0
- package/dist/clerk/utils/user.js +46 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -5
- package/dist/kinde/index.d.ts +1 -0
- package/dist/kinde/index.d.ts.map +1 -0
- package/dist/kinde/index.js +1 -1
- package/package.json +44 -18
- package/LICENSE.md +0 -17
- package/dist/authjs/index.js.map +0 -1
- package/dist/better-auth/adapter/dev/bin/run.d.ts +0 -1
- package/dist/better-auth/adapter/dev/bin/run.js +0 -64
- package/dist/better-auth/adapter/dev/bin/run.js.map +0 -1
- package/dist/better-auth/adapter/dev/bin/schema.d.ts +0 -22
- package/dist/better-auth/adapter/dev/bin/schema.js +0 -160
- package/dist/better-auth/adapter/dev/bin/schema.js.map +0 -1
- package/dist/better-auth/adapter/dev/collections.d.ts +0 -3
- package/dist/better-auth/adapter/dev/collections.js +0 -212
- package/dist/better-auth/adapter/dev/collections.js.map +0 -1
- package/dist/better-auth/adapter/dev/index.d.ts +0 -3
- package/dist/better-auth/adapter/dev/index.js +0 -168
- package/dist/better-auth/adapter/dev/index.js.map +0 -1
- package/dist/better-auth/adapter/generate-schema/generate-schema-builder.js.map +0 -1
- package/dist/better-auth/adapter/generate-schema/get-payload-schema.js.map +0 -1
- package/dist/better-auth/adapter/generate-schema/index.js.map +0 -1
- package/dist/better-auth/adapter/generate-schema/utils.js.map +0 -1
- package/dist/better-auth/adapter/index.js.map +0 -1
- package/dist/better-auth/adapter/test/adapter.test.d.ts +0 -1
- package/dist/better-auth/adapter/test/adapter.test.js +0 -181
- package/dist/better-auth/adapter/test/adapter.test.js.map +0 -1
- package/dist/better-auth/adapter/test/better-auth-adapter-test.d.ts +0 -7
- package/dist/better-auth/adapter/test/better-auth-adapter-test.js +0 -425
- package/dist/better-auth/adapter/test/better-auth-adapter-test.js.map +0 -1
- package/dist/better-auth/adapter/test/schema.test.d.ts +0 -1
- package/dist/better-auth/adapter/test/schema.test.js +0 -796
- package/dist/better-auth/adapter/test/schema.test.js.map +0 -1
- package/dist/better-auth/adapter/test/test_payload1/schema.d.ts +0 -23
- package/dist/better-auth/adapter/test/test_payload1/schema.js +0 -177
- package/dist/better-auth/adapter/test/test_payload1/schema.js.map +0 -1
- package/dist/better-auth/adapter/test/test_payload2/schema.d.ts +0 -23
- package/dist/better-auth/adapter/test/test_payload2/schema.js +0 -167
- package/dist/better-auth/adapter/test/test_payload2/schema.js.map +0 -1
- package/dist/better-auth/adapter/test/test_payload3/schema.d.ts +0 -23
- package/dist/better-auth/adapter/test/test_payload3/schema.js +0 -198
- package/dist/better-auth/adapter/test/test_payload3/schema.js.map +0 -1
- package/dist/better-auth/adapter/transform/index.js.map +0 -1
- package/dist/better-auth/adapter/types.js.map +0 -1
- package/dist/better-auth/index.js.map +0 -1
- package/dist/better-auth/plugin/collections/accounts/hooks/sync-password-to-user.js +0 -47
- package/dist/better-auth/plugin/collections/accounts/hooks/sync-password-to-user.js.map +0 -1
- package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.d.ts +0 -6
- package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.js +0 -106
- package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.js.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/after-login.js +0 -71
- package/dist/better-auth/plugin/collections/users/hooks/after-login.js.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/after-logout.js +0 -49
- package/dist/better-auth/plugin/collections/users/hooks/after-logout.js.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/before-login.js +0 -18
- package/dist/better-auth/plugin/collections/users/hooks/before-login.js.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.d.ts +0 -5
- package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.js +0 -33
- package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.js.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.d.ts +0 -2
- package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.js +0 -14
- package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.js.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/sync-account.js +0 -82
- package/dist/better-auth/plugin/collections/users/hooks/sync-account.js.map +0 -1
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.js.map +0 -1
- package/dist/better-auth/plugin/helpers/get-ip.js.map +0 -1
- package/dist/better-auth/plugin/helpers/index.js.map +0 -1
- package/dist/better-auth/plugin/helpers/serialize-cookie.js.map +0 -1
- package/dist/better-auth/plugin/index.js.map +0 -1
- package/dist/better-auth/plugin/lib/auth-strategy.d.ts +0 -8
- package/dist/better-auth/plugin/lib/auth-strategy.js +0 -48
- package/dist/better-auth/plugin/lib/auth-strategy.js.map +0 -1
- package/dist/better-auth/plugin/lib/build-collection-configs.d.ts +0 -11
- package/dist/better-auth/plugin/lib/build-collection-configs.js +0 -1558
- package/dist/better-auth/plugin/lib/build-collection-configs.js.map +0 -1
- package/dist/better-auth/plugin/lib/config.js +0 -43
- package/dist/better-auth/plugin/lib/config.js.map +0 -1
- package/dist/better-auth/plugin/lib/ensure-password-set-before-create.js +0 -24
- package/dist/better-auth/plugin/lib/ensure-password-set-before-create.js.map +0 -1
- package/dist/better-auth/plugin/lib/get-payload-auth.js.map +0 -1
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.js.map +0 -1
- package/dist/better-auth/plugin/lib/init-better-auth.js.map +0 -1
- package/dist/better-auth/plugin/lib/password.js +0 -63
- package/dist/better-auth/plugin/lib/password.js.map +0 -1
- package/dist/better-auth/plugin/lib/payload-access.js +0 -64
- package/dist/better-auth/plugin/lib/payload-access.js.map +0 -1
- package/dist/better-auth/plugin/lib/prepare-session-data.js +0 -42
- package/dist/better-auth/plugin/lib/prepare-session-data.js.map +0 -1
- package/dist/better-auth/plugin/lib/respect-save-to-jwt-fields-middleware.js +0 -30
- package/dist/better-auth/plugin/lib/respect-save-to-jwt-fields-middleware.js.map +0 -1
- package/dist/better-auth/plugin/lib/sanitize-auth-options.d.ts +0 -5
- package/dist/better-auth/plugin/lib/sanitize-auth-options.js +0 -298
- package/dist/better-auth/plugin/lib/sanitize-auth-options.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/admin-buttons.d.ts +0 -5
- package/dist/better-auth/plugin/payload/components/admin-buttons.js +0 -222
- package/dist/better-auth/plugin/payload/components/admin-buttons.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/login-redirect.d.ts +0 -1
- package/dist/better-auth/plugin/payload/components/login-redirect.js +0 -6
- package/dist/better-auth/plugin/payload/components/login-redirect.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/logo.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/logout.d.ts +0 -1
- package/dist/better-auth/plugin/payload/components/logout.js +0 -61
- package/dist/better-auth/plugin/payload/components/logout.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/sign-in.d.ts +0 -3
- package/dist/better-auth/plugin/payload/components/sign-in.js +0 -384
- package/dist/better-auth/plugin/payload/components/sign-in.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/sign-up.d.ts +0 -6
- package/dist/better-auth/plugin/payload/components/sign-up.js +0 -502
- package/dist/better-auth/plugin/payload/components/sign-up.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/button.d.ts +0 -10
- package/dist/better-auth/plugin/payload/components/ui/button.js +0 -42
- package/dist/better-auth/plugin/payload/components/ui/button.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/card.d.ts +0 -9
- package/dist/better-auth/plugin/payload/components/ui/card.js +0 -55
- package/dist/better-auth/plugin/payload/components/ui/card.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/checkbox.d.ts +0 -4
- package/dist/better-auth/plugin/payload/components/ui/checkbox.js +0 -23
- package/dist/better-auth/plugin/payload/components/ui/checkbox.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/cn.d.ts +0 -2
- package/dist/better-auth/plugin/payload/components/ui/cn.js +0 -7
- package/dist/better-auth/plugin/payload/components/ui/cn.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/input.d.ts +0 -3
- package/dist/better-auth/plugin/payload/components/ui/input.js +0 -14
- package/dist/better-auth/plugin/payload/components/ui/input.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/label.d.ts +0 -4
- package/dist/better-auth/plugin/payload/components/ui/label.js +0 -15
- package/dist/better-auth/plugin/payload/components/ui/label.js.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/password-input.d.ts +0 -2
- package/dist/better-auth/plugin/payload/components/ui/password-input.js +0 -55
- package/dist/better-auth/plugin/payload/components/ui/password-input.js.map +0 -1
- package/dist/better-auth/plugin/payload/exports/client.js.map +0 -1
- package/dist/better-auth/plugin/payload/exports/rsc.js.map +0 -1
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.js.map +0 -1
- package/dist/better-auth/plugin/payload/views/login/index.js.map +0 -1
- package/dist/better-auth/plugin/types.js.map +0 -1
- package/dist/better-auth/types.js.map +0 -1
- package/dist/clerk/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/kinde/index.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/adapter/test/schema.test.ts"],"sourcesContent":["import { describe, expect, it, test } from 'vitest'\nimport { format } from 'prettier'\nimport { getPayloadPath } from '../generate-schema/utils'\nimport { generateSchema } from '../generate-schema'\n\nconst PAYLOAD_TEST_DIR_PATH = getPayloadPath('./test/test_payload1')\nconst PAYLOAD_TEST_DIR_PATH2 = getPayloadPath('./test/test_payload2')\nconst PAYLOAD_TEST_DIR_PATH3 = getPayloadPath('./test/test_payload3')\n\ndescribe(`Handle schema generation`, async () => {\n it('should generate the correct schema with existing schema', async () => {\n const generate_schema = await generateSchema(\n {\n plugins: [\n {\n schema: {\n testTable: {\n fields: {\n hello: {\n type: 'boolean',\n required: false,\n },\n hello2: {\n type: 'string',\n required: true,\n },\n },\n },\n },\n id: 'test',\n },\n ],\n },\n {\n outputDir: PAYLOAD_TEST_DIR_PATH,\n },\n )\n\n // console.log(generate_schema);\n\n const hard_coded_schema = await format(\n `/**\n * EXAMPLE COLLECTIONS FOR BETTER AUTH\n *\n * Below is what your Payload collections should look like.\n * Please copy these to your actual collection configs.\n * Make sure to add an authStrategy for the users collection if there is one.\n *\n * Example auth strategy:\n * auth: {\n * disableLocalStrategy: true,\n * strategies: [\n * betterAuthStrategy(),\n * // Add other strategies as needed\n * ],\n * },\n */\nimport type { CollectionConfig } from \"payload\";\n\nconst User: CollectionConfig = {\n slug: \"user\",\n admin: {\n useAsTitle: \"name\",\n },\n fields: [\n {\n name: \"name\",\n type: \"text\",\n required: true,\n },\n {\n name: \"email\",\n type: \"email\",\n required: true,\n unique: true,\n },\n {\n name: \"emailVerified\",\n type: \"checkbox\",\n required: true,\n },\n {\n name: \"image\",\n type: \"upload\",\n relationTo: \"media\",\n },\n ],\n timestamps: true,\n} as const;\n\nconst Session: CollectionConfig = {\n slug: \"session\",\n admin: {\n useAsTitle: \"expiresAt\",\n },\n fields: [\n {\n name: \"expiresAt\",\n type: \"date\",\n required: true,\n },\n {\n name: \"token\",\n type: \"text\",\n required: true,\n unique: true,\n },\n {\n name: \"ipAddress\",\n type: \"text\",\n },\n {\n name: \"userAgent\",\n type: \"text\",\n },\n {\n name: \"userId\",\n type: \"relationship\",\n required: true,\n relationTo: \"user\",\n },\n ],\n timestamps: true,\n} as const;\n\nconst Account: CollectionConfig = {\n slug: \"account\",\n admin: {\n useAsTitle: \"accountId\",\n },\n fields: [\n {\n name: \"accountId\",\n type: \"text\",\n required: true,\n },\n {\n name: \"providerId\",\n type: \"text\",\n required: true,\n },\n {\n name: \"userId\",\n type: \"relationship\",\n required: true,\n relationTo: \"user\",\n },\n {\n name: \"accessToken\",\n type: \"text\",\n },\n {\n name: \"refreshToken\",\n type: \"text\",\n },\n {\n name: \"idToken\",\n type: \"text\",\n },\n {\n name: \"accessTokenExpiresAt\",\n type: \"date\",\n },\n {\n name: \"refreshTokenExpiresAt\",\n type: \"date\",\n },\n {\n name: \"scope\",\n type: \"text\",\n },\n {\n name: \"password\",\n type: \"text\",\n },\n ],\n timestamps: true,\n} as const;\n\nconst Verification: CollectionConfig = {\n slug: \"verification\",\n admin: {\n useAsTitle: \"identifier\",\n },\n fields: [\n {\n name: \"identifier\",\n type: \"text\",\n required: true,\n },\n {\n name: \"value\",\n type: \"text\",\n required: true,\n },\n {\n name: \"expiresAt\",\n type: \"date\",\n required: true,\n },\n ],\n timestamps: true,\n} as const;\n\nconst TestTable: CollectionConfig = {\n slug: \"testTable\",\n admin: {\n useAsTitle: \"hello\",\n },\n fields: [\n {\n name: \"hello\",\n type: \"checkbox\",\n },\n {\n name: \"hello2\",\n type: \"text\",\n required: true,\n },\n ],\n timestamps: true,\n} as const;\n\nexport { User, Session, Account, Verification, TestTable };\n\n`,\n { filepath: 'schema.ts' },\n )\n\n // if (generate_schema !== hard_coded_schema) {\n // console.log(`\\n\\n\\n--------------------------------- Generated:`);\n // console.log(generate_schema);\n // console.log(`--------------------------------- Hard-coded:`);\n // console.log(hard_coded_schema);\n // console.log(`---------------------------------\\n\\n\\n`);\n // }\n expect(generate_schema).toEqual(hard_coded_schema)\n })\n\n // it(\"should generate the correct schema based on multiple plugins\", async () => {\n // const generate_schema = await generateSchema(\n // {\n // plugins: [\n // {\n // schema: {\n // user: {\n // fields: {},\n // },\n // admins: {\n // fields: {},\n // },\n // },\n // id: \"test\",\n // },\n // ],\n // },\n // {\n // payload_dir_path: PAYLOAD_TEST_DIR_PATH2,\n // }\n // );\n\n // const hard_coded_schema = await format(\n // `/**\n // * EXAMPLE COLLECTIONS FOR BETTER AUTH\n // *\n // * Below is what your Payload collections should look like.\n // * Please copy these to your actual collection configs.\n // * Make sure to add an authStrategy for the users collection if there is one.\n // *\n // * Example auth strategy:\n // * auth: {\n // * disableLocalStrategy: true,\n // * strategies: [\n // * betterAuthStrategy(),\n // * // Add other strategies as needed\n // * ],\n // * },\n // */\n // import type { CollectionConfig } from \"payload\";\n\n // const User: CollectionConfig = {\n // slug: \"user\",\n // admin: {\n // useAsTitle: \"name\",\n // },\n // fields: [\n // {\n // name: \"name\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"email\",\n // type: \"email\",\n // required: true,\n // unique: true,\n // },\n // {\n // name: \"emailVerified\",\n // type: \"checkbox\",\n // required: true,\n // defaultValue: false,\n // },\n // {\n // name: \"image\",\n // type: \"upload\",\n // relationTo: \"media\",\n // },\n // ],\n // timestamps: true,\n // } as const;\n\n // const Session: CollectionConfig = {\n // slug: \"session\",\n // admin: {\n // useAsTitle: \"expiresAt\",\n // },\n // fields: [\n // {\n // name: \"expiresAt\",\n // type: \"date\",\n // required: true,\n // },\n // {\n // name: \"token\",\n // type: \"text\",\n // required: true,\n // unique: true,\n // },\n // {\n // name: \"ipAddress\",\n // type: \"text\",\n // },\n // {\n // name: \"userAgent\",\n // type: \"text\",\n // },\n // {\n // name: \"userId\",\n // type: \"relationship\",\n // relationTo: \"user\",\n // required: true,\n // },\n // ],\n // timestamps: true,\n // } as const;\n\n // const Account: CollectionConfig = {\n // slug: \"account\",\n // admin: {\n // useAsTitle: \"accountId\",\n // },\n // fields: [\n // {\n // name: \"accountId\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"providerId\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"userId\",\n // type: \"relationship\",\n // relationTo: \"user\",\n // required: true,\n // },\n // {\n // name: \"accessToken\",\n // type: \"text\",\n // },\n // {\n // name: \"refreshToken\",\n // type: \"text\",\n // },\n // {\n // name: \"idToken\",\n // type: \"text\",\n // },\n // {\n // name: \"accessTokenExpiresAt\",\n // type: \"date\",\n // },\n // {\n // name: \"refreshTokenExpiresAt\",\n // type: \"date\",\n // },\n // {\n // name: \"scope\",\n // type: \"text\",\n // },\n // {\n // name: \"password\",\n // type: \"text\",\n // },\n // ],\n // timestamps: true,\n // } as const;\n\n // const Verification: CollectionConfig = {\n // slug: \"verification\",\n // admin: {\n // useAsTitle: \"identifier\",\n // },\n // fields: [\n // {\n // name: \"identifier\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"value\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"expiresAt\",\n // type: \"date\",\n // required: true,\n // },\n // ],\n // timestamps: true,\n // } as const;\n\n // const Admins: CollectionConfig = {\n // slug: \"admins\",\n // admin: {\n // useAsTitle: \"id\",\n // },\n // fields: [],\n // timestamps: true,\n // } as const;\n\n // export { User, Session, Account, Verification, Admins };\n // `,\n // { filepath: \"schema.ts\" }\n // );\n\n // if (generate_schema !== hard_coded_schema) {\n // console.log(`\\n\\n\\n--------------------------------- Generated:`);\n // console.log(generate_schema);\n // console.log(`--------------------------------- Hard-coded:`);\n // console.log(hard_coded_schema);\n // console.log(`---------------------------------\\n\\n\\n`);\n // }\n\n // expect(generate_schema).toBe(hard_coded_schema);\n // });\n\n // it(`should generate the correct schema based on multiple different field types`, async () => {\n // const generate_schema = await generateSchema(\n // {\n // plugins: [\n // {\n // id: \"admin\",\n // schema: {\n // admin: {\n // fields: {\n // name: {\n // type: \"string\",\n // required: true,\n // },\n // id: {\n // type: \"string\",\n // required: true,\n // },\n // isAdmin: {\n // type: \"boolean\",\n // required: true,\n // },\n // status: {\n // type: \"string\",\n // required: false,\n // },\n // date: {\n // type: \"date\",\n // },\n // number: {\n // type: \"number\",\n // },\n // str_array: {\n // type: \"string[]\",\n // },\n // num_array: {\n // type: \"number[]\",\n // },\n // },\n // },\n // },\n // },\n // ],\n // },\n // {\n // payload_dir_path: PAYLOAD_TEST_DIR_PATH3,\n // }\n // );\n\n // const hard_coded_schema = await format(\n // `/**\n // * EXAMPLE COLLECTIONS FOR BETTER AUTH\n // *\n // * Below is what your Payload collections should look like.\n // * Please copy these to your actual collection configs.\n // * Make sure to add an authStrategy for the users collection if there is one.\n // *\n // * Example auth strategy:\n // * auth: {\n // * disableLocalStrategy: true,\n // * strategies: [\n // * betterAuthStrategy(),\n // * // Add other strategies as needed\n // * ],\n // * },\n // */\n // import type { CollectionConfig } from \"payload\";\n\n // const User: CollectionConfig = {\n // slug: \"user\",\n // admin: {\n // useAsTitle: \"name\",\n // },\n // fields: [\n // {\n // name: \"name\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"email\",\n // type: \"email\",\n // required: true,\n // unique: true,\n // },\n // {\n // name: \"emailVerified\",\n // type: \"checkbox\",\n // required: true,\n // defaultValue: false,\n // },\n // {\n // name: \"image\",\n // type: \"upload\",\n // relationTo: \"media\",\n // },\n // ],\n // timestamps: true,\n // } as const;\n\n // const Session: CollectionConfig = {\n // slug: \"session\",\n // admin: {\n // useAsTitle: \"expiresAt\",\n // },\n // fields: [\n // {\n // name: \"expiresAt\",\n // type: \"date\",\n // required: true,\n // },\n // {\n // name: \"token\",\n // type: \"text\",\n // required: true,\n // unique: true,\n // },\n // {\n // name: \"ipAddress\",\n // type: \"text\",\n // },\n // {\n // name: \"userAgent\",\n // type: \"text\",\n // },\n // {\n // name: \"userId\",\n // type: \"relationship\",\n // relationTo: \"user\",\n // required: true,\n // },\n // ],\n // timestamps: true,\n // } as const;\n\n // const Account: CollectionConfig = {\n // slug: \"account\",\n // admin: {\n // useAsTitle: \"accountId\",\n // },\n // fields: [\n // {\n // name: \"accountId\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"providerId\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"userId\",\n // type: \"relationship\",\n // relationTo: \"user\",\n // required: true,\n // },\n // {\n // name: \"accessToken\",\n // type: \"text\",\n // },\n // {\n // name: \"refreshToken\",\n // type: \"text\",\n // },\n // {\n // name: \"idToken\",\n // type: \"text\",\n // },\n // {\n // name: \"accessTokenExpiresAt\",\n // type: \"date\",\n // },\n // {\n // name: \"refreshTokenExpiresAt\",\n // type: \"date\",\n // },\n // {\n // name: \"scope\",\n // type: \"text\",\n // },\n // {\n // name: \"password\",\n // type: \"text\",\n // },\n // ],\n // timestamps: true,\n // } as const;\n\n // const Verification: CollectionConfig = {\n // slug: \"verification\",\n // admin: {\n // useAsTitle: \"identifier\",\n // },\n // fields: [\n // {\n // name: \"identifier\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"value\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"expiresAt\",\n // type: \"date\",\n // required: true,\n // },\n // ],\n // timestamps: true,\n // } as const;\n\n // const Admin: CollectionConfig = {\n // slug: \"admin\",\n // admin: {\n // useAsTitle: \"name\",\n // },\n // fields: [\n // {\n // name: \"name\",\n // type: \"text\",\n // required: true,\n // },\n // {\n // name: \"isAdmin\",\n // type: \"checkbox\",\n // required: true,\n // },\n // {\n // name: \"status\",\n // type: \"text\",\n // },\n // {\n // name: \"date\",\n // type: \"date\",\n // },\n // {\n // name: \"number\",\n // type: \"number\",\n // },\n // {\n // name: \"str_array\",\n // type: \"text\",\n // },\n // {\n // name: \"num_array\",\n // type: \"text\",\n // },\n // ],\n // timestamps: true,\n // } as const;\n\n // export { User, Session, Account, Verification, Admin };\n // `,\n // { filepath: \"schema.ts\" }\n // );\n\n // if (generate_schema !== hard_coded_schema) {\n // console.log(`\\n\\n\\n--------------------------------- Generated:`);\n // console.log(generate_schema);\n // console.log(`--------------------------------- Hard-coded:`);\n // console.log(hard_coded_schema);\n // console.log(`---------------------------------\\n\\n\\n`);\n // }\n\n // expect(generate_schema).toBe(hard_coded_schema);\n // });\n\n // test.skip(\"should support .index method after `defineTable`\", async () => {\n // const generate_schema = await generateSchema(\n // {\n // plugins: [\n // {\n // schema: {\n // testTable: {\n // fields: {},\n // },\n // },\n // id: \"test\",\n // },\n // ],\n // },\n // {\n // payload_dir_path: PAYLOAD_TEST_DIR_PATH3,\n // }\n // );\n\n // const hard_coded_schema = await format(\n // [\n // `import {defineSchema,defineTable} from \"convex/server\";`,\n // `import {v} from \"convex/values\";`,\n // ``,\n // `export default defineSchema({`,\n // default_tables,\n // `testTable: defineTable({`,\n // `}).index(\"by_something\", [\"email\"]),`,\n // `});`,\n // ].join(\"\\n\"),\n // { filepath: \"schema.ts\" }\n // );\n\n // if (generate_schema !== hard_coded_schema) {\n // console.log(`\\n\\n\\n--------------------------------- Generated:`);\n // console.log(generate_schema);\n // console.log(`--------------------------------- Hard-coded:`);\n // console.log(hard_coded_schema);\n // console.log(`---------------------------------\\n\\n\\n`);\n // }\n\n // expect(generate_schema).toBe(hard_coded_schema);\n // });\n\n // it(`should generate references correctly`, async () => {\n // const generate_schema = await generateSchema(\n // {\n // plugins: [\n // {\n // id: \"admin\",\n // schema: {\n // admin: {\n // fields: {\n // id: {\n // type: \"string\",\n // required: true,\n // },\n\n // reference_optional: {\n // type: \"string\",\n // references: {\n // field: \"something\",\n // model: \"something_else\",\n // },\n // },\n // reference_required: {\n // type: \"string\",\n // required: true,\n // references: {\n // field: \"something2\",\n // model: \"something2_else\",\n // },\n // },\n // },\n // },\n // },\n // },\n // ],\n // },\n // {\n // payload_dir_path: PAYLOAD_TEST_DIR_PATH3,\n // }\n // );\n\n // const hard_coded_schema = await format(\n // [\n // `import {defineSchema,defineTable} from \"convex/server\";`,\n // `import {v} from \"convex/values\";`,\n // ``,\n // `export default defineSchema({`,\n // default_tables,\n // `admin: defineTable({`,\n // `id: v.id(\"admin\"),`,\n // `reference_optional: v.id(\"something_else\"),`,\n // `reference_required: v.id(\"something2_else\"),`,\n // `}),`,\n // `});`,\n // ].join(\"\\n\"),\n // { filepath: \"schema.ts\" }\n // );\n\n // if (generate_schema !== hard_coded_schema) {\n // console.log(`\\n\\n\\n--------------------------------- Generated:`);\n // console.log(generate_schema);\n // console.log(`--------------------------------- Hard-coded:`);\n // console.log(hard_coded_schema);\n // console.log(`---------------------------------\\n\\n\\n`);\n // }\n // expect(generate_schema).toBe(hard_coded_schema);\n // });\n})\n"],"names":["describe","expect","it","format","getPayloadPath","generateSchema","PAYLOAD_TEST_DIR_PATH","PAYLOAD_TEST_DIR_PATH2","PAYLOAD_TEST_DIR_PATH3","generate_schema","plugins","schema","testTable","fields","hello","type","required","hello2","id","outputDir","hard_coded_schema","filepath","toEqual"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAc,SAAQ;AACnD,SAASC,MAAM,QAAQ,WAAU;AACjC,SAASC,cAAc,QAAQ,2BAA0B;AACzD,SAASC,cAAc,QAAQ,qBAAoB;AAEnD,MAAMC,wBAAwBF,eAAe;AAC7C,MAAMG,yBAAyBH,eAAe;AAC9C,MAAMI,yBAAyBJ,eAAe;AAE9CJ,SAAS,CAAC,wBAAwB,CAAC,E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AwC;AACxC,gEAAgE;AAChE,QAAQ;AAER,uDAAuD;AACvD,QAAQ;AAER,6DAA6D;AAC7D,oDAAoD;AACpD,UAAU;AACV,qBAAqB;AACrB,cAAc;AACd,2BAA2B;AAC3B,wBAAwB;AACxB,yBAAyB;AACzB,4BAA4B;AAC5B,0BAA0B;AAC1B,sCAAsC;AACtC,sCAAsC;AACtC,uBAAuB;AAEvB,0CAA0C;AAC1C,sCAAsC;AACtC,oCAAoC;AACpC,4CAA4C;AAC5C,iDAAiD;AACjD,yBAAyB;AACzB,uBAAuB;AACvB,0CAA0C;AAC1C,sCAAsC;AACtC,sCAAsC;AACtC,oCAAoC;AACpC,6CAA6C;AAC7C,kDAAkD;AAClD,yBAAyB;AACzB,uBAAuB;AACvB,qBAAqB;AACrB,mBAAmB;AACnB,iBAAiB;AACjB,eAAe;AACf,aAAa;AACb,WAAW;AACX,UAAU;AACV,oDAAoD;AACpD,UAAU;AACV,SAAS;AAET,8CAA8C;AAC9C,UAAU;AACV,qEAAqE;AACrE,8CAA8C;AAC9C,cAAc;AACd,2CAA2C;AAC3C,0BAA0B;AAC1B,kCAAkC;AAClC,gCAAgC;AAChC,yDAAyD;AACzD,0DAA0D;AAC1D,iBAAiB;AACjB,iBAAiB;AACjB,sBAAsB;AACtB,kCAAkC;AAClC,SAAS;AAET,mDAAmD;AACnD,2EAA2E;AAC3E,sCAAsC;AACtC,sEAAsE;AACtE,wCAAwC;AACxC,gEAAgE;AAChE,QAAQ;AACR,uDAAuD;AACvD,QAAQ;AACV"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EXAMPLE COLLECTIONS FOR BETTER AUTH
|
|
3
|
-
*
|
|
4
|
-
* Below is what your Payload collections should look like.
|
|
5
|
-
* Please copy these to your actual collection configs.
|
|
6
|
-
* Make sure to add an authStrategy for the users collection if there is one.
|
|
7
|
-
*
|
|
8
|
-
* Example auth strategy:
|
|
9
|
-
* auth: {
|
|
10
|
-
* disableLocalStrategy: true,
|
|
11
|
-
* strategies: [
|
|
12
|
-
* betterAuthStrategy(),
|
|
13
|
-
* // Add other strategies as needed
|
|
14
|
-
* ],
|
|
15
|
-
* },
|
|
16
|
-
*/
|
|
17
|
-
import type { CollectionConfig } from 'payload';
|
|
18
|
-
declare const User: CollectionConfig;
|
|
19
|
-
declare const Session: CollectionConfig;
|
|
20
|
-
declare const Account: CollectionConfig;
|
|
21
|
-
declare const Verification: CollectionConfig;
|
|
22
|
-
declare const TestTable: CollectionConfig;
|
|
23
|
-
export { User, Session, Account, Verification, TestTable };
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EXAMPLE COLLECTIONS FOR BETTER AUTH
|
|
3
|
-
*
|
|
4
|
-
* Below is what your Payload collections should look like.
|
|
5
|
-
* Please copy these to your actual collection configs.
|
|
6
|
-
* Make sure to add an authStrategy for the users collection if there is one.
|
|
7
|
-
*
|
|
8
|
-
* Example auth strategy:
|
|
9
|
-
* auth: {
|
|
10
|
-
* disableLocalStrategy: true,
|
|
11
|
-
* strategies: [
|
|
12
|
-
* betterAuthStrategy(),
|
|
13
|
-
* // Add other strategies as needed
|
|
14
|
-
* ],
|
|
15
|
-
* },
|
|
16
|
-
*/ const User = {
|
|
17
|
-
slug: 'user',
|
|
18
|
-
admin: {
|
|
19
|
-
useAsTitle: 'name'
|
|
20
|
-
},
|
|
21
|
-
fields: [
|
|
22
|
-
{
|
|
23
|
-
name: 'name',
|
|
24
|
-
type: 'text',
|
|
25
|
-
required: true
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'email',
|
|
29
|
-
type: 'email',
|
|
30
|
-
required: true,
|
|
31
|
-
unique: true
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'emailVerified',
|
|
35
|
-
type: 'checkbox',
|
|
36
|
-
required: true
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: 'image',
|
|
40
|
-
type: 'upload',
|
|
41
|
-
relationTo: 'media'
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
timestamps: true
|
|
45
|
-
};
|
|
46
|
-
const Session = {
|
|
47
|
-
slug: 'session',
|
|
48
|
-
admin: {
|
|
49
|
-
useAsTitle: 'expiresAt'
|
|
50
|
-
},
|
|
51
|
-
fields: [
|
|
52
|
-
{
|
|
53
|
-
name: 'expiresAt',
|
|
54
|
-
type: 'date',
|
|
55
|
-
required: true
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: 'token',
|
|
59
|
-
type: 'text',
|
|
60
|
-
required: true,
|
|
61
|
-
unique: true
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: 'ipAddress',
|
|
65
|
-
type: 'text'
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'userAgent',
|
|
69
|
-
type: 'text'
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
name: 'userId',
|
|
73
|
-
type: 'relationship',
|
|
74
|
-
required: true,
|
|
75
|
-
relationTo: 'user'
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
timestamps: true
|
|
79
|
-
};
|
|
80
|
-
const Account = {
|
|
81
|
-
slug: 'account',
|
|
82
|
-
admin: {
|
|
83
|
-
useAsTitle: 'accountId'
|
|
84
|
-
},
|
|
85
|
-
fields: [
|
|
86
|
-
{
|
|
87
|
-
name: 'accountId',
|
|
88
|
-
type: 'text',
|
|
89
|
-
required: true
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
name: 'providerId',
|
|
93
|
-
type: 'text',
|
|
94
|
-
required: true
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: 'userId',
|
|
98
|
-
type: 'relationship',
|
|
99
|
-
required: true,
|
|
100
|
-
relationTo: 'user'
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: 'accessToken',
|
|
104
|
-
type: 'text'
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
name: 'refreshToken',
|
|
108
|
-
type: 'text'
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: 'idToken',
|
|
112
|
-
type: 'text'
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: 'accessTokenExpiresAt',
|
|
116
|
-
type: 'date'
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: 'refreshTokenExpiresAt',
|
|
120
|
-
type: 'date'
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: 'scope',
|
|
124
|
-
type: 'text'
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
name: 'password',
|
|
128
|
-
type: 'text'
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
timestamps: true
|
|
132
|
-
};
|
|
133
|
-
const Verification = {
|
|
134
|
-
slug: 'verification',
|
|
135
|
-
admin: {
|
|
136
|
-
useAsTitle: 'identifier'
|
|
137
|
-
},
|
|
138
|
-
fields: [
|
|
139
|
-
{
|
|
140
|
-
name: 'identifier',
|
|
141
|
-
type: 'text',
|
|
142
|
-
required: true
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
name: 'value',
|
|
146
|
-
type: 'text',
|
|
147
|
-
required: true
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
name: 'expiresAt',
|
|
151
|
-
type: 'date',
|
|
152
|
-
required: true
|
|
153
|
-
}
|
|
154
|
-
],
|
|
155
|
-
timestamps: true
|
|
156
|
-
};
|
|
157
|
-
const TestTable = {
|
|
158
|
-
slug: 'testTable',
|
|
159
|
-
admin: {
|
|
160
|
-
useAsTitle: 'hello'
|
|
161
|
-
},
|
|
162
|
-
fields: [
|
|
163
|
-
{
|
|
164
|
-
name: 'hello',
|
|
165
|
-
type: 'checkbox'
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
name: 'hello2',
|
|
169
|
-
type: 'text',
|
|
170
|
-
required: true
|
|
171
|
-
}
|
|
172
|
-
],
|
|
173
|
-
timestamps: true
|
|
174
|
-
};
|
|
175
|
-
export { User, Session, Account, Verification, TestTable };
|
|
176
|
-
|
|
177
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/adapter/test/test_payload1/schema.ts"],"sourcesContent":["/**\n * EXAMPLE COLLECTIONS FOR BETTER AUTH\n *\n * Below is what your Payload collections should look like.\n * Please copy these to your actual collection configs.\n * Make sure to add an authStrategy for the users collection if there is one.\n *\n * Example auth strategy:\n * auth: {\n * disableLocalStrategy: true,\n * strategies: [\n * betterAuthStrategy(),\n * // Add other strategies as needed\n * ],\n * },\n */\nimport type { CollectionConfig } from 'payload'\n\nconst User: CollectionConfig = {\n slug: 'user',\n admin: {\n useAsTitle: 'name',\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n },\n {\n name: 'email',\n type: 'email',\n required: true,\n unique: true,\n },\n {\n name: 'emailVerified',\n type: 'checkbox',\n required: true,\n },\n {\n name: 'image',\n type: 'upload',\n relationTo: 'media',\n },\n ],\n timestamps: true,\n} as const\n\nconst Session: CollectionConfig = {\n slug: 'session',\n admin: {\n useAsTitle: 'expiresAt',\n },\n fields: [\n {\n name: 'expiresAt',\n type: 'date',\n required: true,\n },\n {\n name: 'token',\n type: 'text',\n required: true,\n unique: true,\n },\n {\n name: 'ipAddress',\n type: 'text',\n },\n {\n name: 'userAgent',\n type: 'text',\n },\n {\n name: 'userId',\n type: 'relationship',\n required: true,\n relationTo: 'user',\n },\n ],\n timestamps: true,\n} as const\n\nconst Account: CollectionConfig = {\n slug: 'account',\n admin: {\n useAsTitle: 'accountId',\n },\n fields: [\n {\n name: 'accountId',\n type: 'text',\n required: true,\n },\n {\n name: 'providerId',\n type: 'text',\n required: true,\n },\n {\n name: 'userId',\n type: 'relationship',\n required: true,\n relationTo: 'user',\n },\n {\n name: 'accessToken',\n type: 'text',\n },\n {\n name: 'refreshToken',\n type: 'text',\n },\n {\n name: 'idToken',\n type: 'text',\n },\n {\n name: 'accessTokenExpiresAt',\n type: 'date',\n },\n {\n name: 'refreshTokenExpiresAt',\n type: 'date',\n },\n {\n name: 'scope',\n type: 'text',\n },\n {\n name: 'password',\n type: 'text',\n },\n ],\n timestamps: true,\n} as const\n\nconst Verification: CollectionConfig = {\n slug: 'verification',\n admin: {\n useAsTitle: 'identifier',\n },\n fields: [\n {\n name: 'identifier',\n type: 'text',\n required: true,\n },\n {\n name: 'value',\n type: 'text',\n required: true,\n },\n {\n name: 'expiresAt',\n type: 'date',\n required: true,\n },\n ],\n timestamps: true,\n} as const\n\nconst TestTable: CollectionConfig = {\n slug: 'testTable',\n admin: {\n useAsTitle: 'hello',\n },\n fields: [\n {\n name: 'hello',\n type: 'checkbox',\n },\n {\n name: 'hello2',\n type: 'text',\n required: true,\n },\n ],\n timestamps: true,\n} as const\n\nexport { User, Session, Account, Verification, TestTable }\n"],"names":["User","slug","admin","useAsTitle","fields","name","type","required","unique","relationTo","timestamps","Session","Account","Verification","TestTable"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAGD,MAAMA,OAAyB;IAC7BC,MAAM;IACNC,OAAO;QACLC,YAAY;IACd;IACAC,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;YACVC,QAAQ;QACV;QACA;YACEH,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNG,YAAY;QACd;KACD;IACDC,YAAY;AACd;AAEA,MAAMC,UAA4B;IAChCV,MAAM;IACNC,OAAO;QACLC,YAAY;IACd;IACAC,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;YACVC,QAAQ;QACV;QACA;YACEH,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;YACNC,UAAU;YACVE,YAAY;QACd;KACD;IACDC,YAAY;AACd;AAEA,MAAME,UAA4B;IAChCX,MAAM;IACNC,OAAO;QACLC,YAAY;IACd;IACAC,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;YACVE,YAAY;QACd;QACA;YACEJ,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;KACD;IACDI,YAAY;AACd;AAEA,MAAMG,eAAiC;IACrCZ,MAAM;IACNC,OAAO;QACLC,YAAY;IACd;IACAC,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;KACD;IACDG,YAAY;AACd;AAEA,MAAMI,YAA8B;IAClCb,MAAM;IACNC,OAAO;QACLC,YAAY;IACd;IACAC,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;KACD;IACDG,YAAY;AACd;AAEA,SAASV,IAAI,EAAEW,OAAO,EAAEC,OAAO,EAAEC,YAAY,EAAEC,SAAS,GAAE"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EXAMPLE COLLECTIONS FOR BETTER AUTH
|
|
3
|
-
*
|
|
4
|
-
* Below is what your Payload collections should look like.
|
|
5
|
-
* Please copy these to your actual collection configs.
|
|
6
|
-
* Make sure to add an authStrategy for the users collection if there is one.
|
|
7
|
-
*
|
|
8
|
-
* Example auth strategy:
|
|
9
|
-
* auth: {
|
|
10
|
-
* disableLocalStrategy: true,
|
|
11
|
-
* strategies: [
|
|
12
|
-
* betterAuthStrategy(),
|
|
13
|
-
* // Add other strategies as needed
|
|
14
|
-
* ],
|
|
15
|
-
* },
|
|
16
|
-
*/
|
|
17
|
-
import type { CollectionConfig } from 'payload';
|
|
18
|
-
declare const User: CollectionConfig;
|
|
19
|
-
declare const Session: CollectionConfig;
|
|
20
|
-
declare const Account: CollectionConfig;
|
|
21
|
-
declare const Verification: CollectionConfig;
|
|
22
|
-
declare const Admins: CollectionConfig;
|
|
23
|
-
export { User, Session, Account, Verification, Admins };
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EXAMPLE COLLECTIONS FOR BETTER AUTH
|
|
3
|
-
*
|
|
4
|
-
* Below is what your Payload collections should look like.
|
|
5
|
-
* Please copy these to your actual collection configs.
|
|
6
|
-
* Make sure to add an authStrategy for the users collection if there is one.
|
|
7
|
-
*
|
|
8
|
-
* Example auth strategy:
|
|
9
|
-
* auth: {
|
|
10
|
-
* disableLocalStrategy: true,
|
|
11
|
-
* strategies: [
|
|
12
|
-
* betterAuthStrategy(),
|
|
13
|
-
* // Add other strategies as needed
|
|
14
|
-
* ],
|
|
15
|
-
* },
|
|
16
|
-
*/ const User = {
|
|
17
|
-
slug: 'user',
|
|
18
|
-
admin: {
|
|
19
|
-
useAsTitle: 'name'
|
|
20
|
-
},
|
|
21
|
-
fields: [
|
|
22
|
-
{
|
|
23
|
-
name: 'name',
|
|
24
|
-
type: 'text',
|
|
25
|
-
required: true
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'email',
|
|
29
|
-
type: 'email',
|
|
30
|
-
required: true,
|
|
31
|
-
unique: true
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'emailVerified',
|
|
35
|
-
type: 'checkbox',
|
|
36
|
-
required: true
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: 'image',
|
|
40
|
-
type: 'upload',
|
|
41
|
-
relationTo: 'media'
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
timestamps: true
|
|
45
|
-
};
|
|
46
|
-
const Session = {
|
|
47
|
-
slug: 'session',
|
|
48
|
-
admin: {
|
|
49
|
-
useAsTitle: 'expiresAt'
|
|
50
|
-
},
|
|
51
|
-
fields: [
|
|
52
|
-
{
|
|
53
|
-
name: 'expiresAt',
|
|
54
|
-
type: 'date',
|
|
55
|
-
required: true
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: 'token',
|
|
59
|
-
type: 'text',
|
|
60
|
-
required: true,
|
|
61
|
-
unique: true
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: 'ipAddress',
|
|
65
|
-
type: 'text'
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'userAgent',
|
|
69
|
-
type: 'text'
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
name: 'userId',
|
|
73
|
-
type: 'relationship',
|
|
74
|
-
required: true,
|
|
75
|
-
relationTo: 'user'
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
timestamps: true
|
|
79
|
-
};
|
|
80
|
-
const Account = {
|
|
81
|
-
slug: 'account',
|
|
82
|
-
admin: {
|
|
83
|
-
useAsTitle: 'accountId'
|
|
84
|
-
},
|
|
85
|
-
fields: [
|
|
86
|
-
{
|
|
87
|
-
name: 'accountId',
|
|
88
|
-
type: 'text',
|
|
89
|
-
required: true
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
name: 'providerId',
|
|
93
|
-
type: 'text',
|
|
94
|
-
required: true
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: 'userId',
|
|
98
|
-
type: 'relationship',
|
|
99
|
-
required: true,
|
|
100
|
-
relationTo: 'user'
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: 'accessToken',
|
|
104
|
-
type: 'text'
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
name: 'refreshToken',
|
|
108
|
-
type: 'text'
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: 'idToken',
|
|
112
|
-
type: 'text'
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: 'accessTokenExpiresAt',
|
|
116
|
-
type: 'date'
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: 'refreshTokenExpiresAt',
|
|
120
|
-
type: 'date'
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: 'scope',
|
|
124
|
-
type: 'text'
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
name: 'password',
|
|
128
|
-
type: 'text'
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
timestamps: true
|
|
132
|
-
};
|
|
133
|
-
const Verification = {
|
|
134
|
-
slug: 'verification',
|
|
135
|
-
admin: {
|
|
136
|
-
useAsTitle: 'identifier'
|
|
137
|
-
},
|
|
138
|
-
fields: [
|
|
139
|
-
{
|
|
140
|
-
name: 'identifier',
|
|
141
|
-
type: 'text',
|
|
142
|
-
required: true
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
name: 'value',
|
|
146
|
-
type: 'text',
|
|
147
|
-
required: true
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
name: 'expiresAt',
|
|
151
|
-
type: 'date',
|
|
152
|
-
required: true
|
|
153
|
-
}
|
|
154
|
-
],
|
|
155
|
-
timestamps: true
|
|
156
|
-
};
|
|
157
|
-
const Admins = {
|
|
158
|
-
slug: 'admins',
|
|
159
|
-
admin: {
|
|
160
|
-
useAsTitle: 'id'
|
|
161
|
-
},
|
|
162
|
-
fields: [],
|
|
163
|
-
timestamps: true
|
|
164
|
-
};
|
|
165
|
-
export { User, Session, Account, Verification, Admins };
|
|
166
|
-
|
|
167
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/adapter/test/test_payload2/schema.ts"],"sourcesContent":["/**\n * EXAMPLE COLLECTIONS FOR BETTER AUTH\n *\n * Below is what your Payload collections should look like.\n * Please copy these to your actual collection configs.\n * Make sure to add an authStrategy for the users collection if there is one.\n *\n * Example auth strategy:\n * auth: {\n * disableLocalStrategy: true,\n * strategies: [\n * betterAuthStrategy(),\n * // Add other strategies as needed\n * ],\n * },\n */\nimport type { CollectionConfig } from 'payload'\n\nconst User: CollectionConfig = {\n slug: 'user',\n admin: {\n useAsTitle: 'name',\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n },\n {\n name: 'email',\n type: 'email',\n required: true,\n unique: true,\n },\n {\n name: 'emailVerified',\n type: 'checkbox',\n required: true,\n },\n {\n name: 'image',\n type: 'upload',\n relationTo: 'media',\n },\n ],\n timestamps: true,\n} as const\n\nconst Session: CollectionConfig = {\n slug: 'session',\n admin: {\n useAsTitle: 'expiresAt',\n },\n fields: [\n {\n name: 'expiresAt',\n type: 'date',\n required: true,\n },\n {\n name: 'token',\n type: 'text',\n required: true,\n unique: true,\n },\n {\n name: 'ipAddress',\n type: 'text',\n },\n {\n name: 'userAgent',\n type: 'text',\n },\n {\n name: 'userId',\n type: 'relationship',\n required: true,\n relationTo: 'user',\n },\n ],\n timestamps: true,\n} as const\n\nconst Account: CollectionConfig = {\n slug: 'account',\n admin: {\n useAsTitle: 'accountId',\n },\n fields: [\n {\n name: 'accountId',\n type: 'text',\n required: true,\n },\n {\n name: 'providerId',\n type: 'text',\n required: true,\n },\n {\n name: 'userId',\n type: 'relationship',\n required: true,\n relationTo: 'user',\n },\n {\n name: 'accessToken',\n type: 'text',\n },\n {\n name: 'refreshToken',\n type: 'text',\n },\n {\n name: 'idToken',\n type: 'text',\n },\n {\n name: 'accessTokenExpiresAt',\n type: 'date',\n },\n {\n name: 'refreshTokenExpiresAt',\n type: 'date',\n },\n {\n name: 'scope',\n type: 'text',\n },\n {\n name: 'password',\n type: 'text',\n },\n ],\n timestamps: true,\n} as const\n\nconst Verification: CollectionConfig = {\n slug: 'verification',\n admin: {\n useAsTitle: 'identifier',\n },\n fields: [\n {\n name: 'identifier',\n type: 'text',\n required: true,\n },\n {\n name: 'value',\n type: 'text',\n required: true,\n },\n {\n name: 'expiresAt',\n type: 'date',\n required: true,\n },\n ],\n timestamps: true,\n} as const\n\nconst Admins: CollectionConfig = {\n slug: 'admins',\n admin: {\n useAsTitle: 'id',\n },\n fields: [],\n timestamps: true,\n} as const\n\nexport { User, Session, Account, Verification, Admins }\n"],"names":["User","slug","admin","useAsTitle","fields","name","type","required","unique","relationTo","timestamps","Session","Account","Verification","Admins"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAGD,MAAMA,OAAyB;IAC7BC,MAAM;IACNC,OAAO;QACLC,YAAY;IACd;IACAC,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;YACVC,QAAQ;QACV;QACA;YACEH,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNG,YAAY;QACd;KACD;IACDC,YAAY;AACd;AAEA,MAAMC,UAA4B;IAChCV,MAAM;IACNC,OAAO;QACLC,YAAY;IACd;IACAC,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;YACVC,QAAQ;QACV;QACA;YACEH,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;YACNC,UAAU;YACVE,YAAY;QACd;KACD;IACDC,YAAY;AACd;AAEA,MAAME,UAA4B;IAChCX,MAAM;IACNC,OAAO;QACLC,YAAY;IACd;IACAC,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;YACVE,YAAY;QACd;QACA;YACEJ,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNC,MAAM;QACR;KACD;IACDI,YAAY;AACd;AAEA,MAAMG,eAAiC;IACrCZ,MAAM;IACNC,OAAO;QACLC,YAAY;IACd;IACAC,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;QACA;YACEF,MAAM;YACNC,MAAM;YACNC,UAAU;QACZ;KACD;IACDG,YAAY;AACd;AAEA,MAAMI,SAA2B;IAC/Bb,MAAM;IACNC,OAAO;QACLC,YAAY;IACd;IACAC,QAAQ,EAAE;IACVM,YAAY;AACd;AAEA,SAASV,IAAI,EAAEW,OAAO,EAAEC,OAAO,EAAEC,YAAY,EAAEC,MAAM,GAAE"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EXAMPLE COLLECTIONS FOR BETTER AUTH
|
|
3
|
-
*
|
|
4
|
-
* Below is what your Payload collections should look like.
|
|
5
|
-
* Please copy these to your actual collection configs.
|
|
6
|
-
* Make sure to add an authStrategy for the users collection if there is one.
|
|
7
|
-
*
|
|
8
|
-
* Example auth strategy:
|
|
9
|
-
* auth: {
|
|
10
|
-
* disableLocalStrategy: true,
|
|
11
|
-
* strategies: [
|
|
12
|
-
* betterAuthStrategy(),
|
|
13
|
-
* // Add other strategies as needed
|
|
14
|
-
* ],
|
|
15
|
-
* },
|
|
16
|
-
*/
|
|
17
|
-
import type { CollectionConfig } from 'payload';
|
|
18
|
-
declare const User: CollectionConfig;
|
|
19
|
-
declare const Session: CollectionConfig;
|
|
20
|
-
declare const Account: CollectionConfig;
|
|
21
|
-
declare const Verification: CollectionConfig;
|
|
22
|
-
declare const Admin: CollectionConfig;
|
|
23
|
-
export { User, Session, Account, Verification, Admin };
|