@tulip-systems/core 0.7.0 → 0.8.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.
- package/dist/auth/server.d.mts +3 -3
- package/dist/auth/server.mjs +3 -3
- package/dist/components/editor/components/editor.client.d.mts +4 -3
- package/dist/components/editor/components/editor.client.d.mts.map +1 -1
- package/dist/components/editor/components/editor.client.mjs +5 -2
- package/dist/components/editor/components/editor.client.mjs.map +1 -1
- package/dist/components/editor/extensions/file-handler/extension.d.mts +4 -4
- package/dist/components/editor/extensions/file-handler/extension.d.mts.map +1 -1
- package/dist/components/editor/extensions/file-handler/extension.mjs.map +1 -1
- package/dist/components/editor/extensions/file-handler/strategy.d.mts +4 -6
- package/dist/components/editor/extensions/file-handler/strategy.d.mts.map +1 -1
- package/dist/components/editor/extensions/file-handler/strategy.mjs +11 -11
- package/dist/components/editor/extensions/file-handler/strategy.mjs.map +1 -1
- package/dist/components/editor/extensions/file-handler/utils.mjs +1 -1
- package/dist/components/editor/extensions/file-handler/utils.mjs.map +1 -1
- package/dist/components/editor/extensions/image/extension.mjs +9 -9
- package/dist/components/editor/extensions/image/extension.mjs.map +1 -1
- package/dist/components/editor/lib/constants.d.mts +1 -1
- package/dist/components/editor/lib/constants.mjs +1 -1
- package/dist/components/editor/lib/extensions.d.mts +1 -1
- package/dist/components/editor/lib/helpers.d.mts +11 -3
- package/dist/components/editor/lib/helpers.d.mts.map +1 -1
- package/dist/components/editor/lib/helpers.mjs +27 -13
- package/dist/components/editor/lib/helpers.mjs.map +1 -1
- package/dist/components/ui/combobox-dropdown.client.mjs +1 -0
- package/dist/components/ui/combobox-dropdown.client.mjs.map +1 -1
- package/dist/components/ui/combobox.client.mjs +1 -1
- package/dist/components/ui/combobox.client.mjs.map +1 -1
- package/dist/components.d.mts +2 -2
- package/dist/components.mjs +2 -2
- package/dist/config/server.d.mts +1 -3
- package/dist/config/server.mjs +1 -4
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +1 -1
- package/dist/data-tables/client.d.mts +2 -1
- package/dist/data-tables/client.mjs +2 -1
- package/dist/data-tables.d.mts +1 -1
- package/dist/database/client.d.mts +1 -0
- package/dist/database/client.mjs +1 -0
- package/dist/database/server.d.mts +2 -0
- package/dist/database/server.mjs +3 -0
- package/dist/database.d.mts +3 -0
- package/dist/database.mjs +3 -0
- package/dist/emails/client.d.mts +1 -0
- package/dist/emails/client.mjs +1 -0
- package/dist/emails/server.d.mts +2 -0
- package/dist/emails/server.mjs +3 -0
- package/dist/emails.d.mts +1 -0
- package/dist/emails.mjs +1 -0
- package/dist/lib/utils/markdown.d.mts +10 -0
- package/dist/lib/utils/markdown.d.mts.map +1 -0
- package/dist/lib/utils/markdown.mjs +15 -0
- package/dist/lib/utils/markdown.mjs.map +1 -0
- package/dist/lib/utils/url.mjs +2 -1
- package/dist/lib/utils/url.mjs.map +1 -1
- package/dist/lib/utils/user-agent.mjs +15 -0
- package/dist/lib/utils/user-agent.mjs.map +1 -1
- package/dist/lib.d.mts +2 -2
- package/dist/lib.mjs +2 -2
- package/dist/modules/auth/components/create-first-user-guard.server.d.mts +16 -0
- package/dist/modules/auth/components/create-first-user-guard.server.d.mts.map +1 -0
- package/dist/modules/auth/components/create-first-user-guard.server.mjs +16 -0
- package/dist/modules/auth/components/create-first-user-guard.server.mjs.map +1 -0
- package/dist/modules/auth/components/guard.server.d.mts +2 -2
- package/dist/modules/auth/components/guard.server.mjs +1 -1
- package/dist/modules/auth/components/guard.server.mjs.map +1 -1
- package/dist/modules/auth/db/schema.d.mts +1 -1
- package/dist/modules/auth/db/schema.mjs +2 -2
- package/dist/modules/auth/handler/create-client.client.d.mts +4838 -229
- package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -1
- package/dist/modules/auth/handler/create-client.client.mjs.map +1 -1
- package/dist/modules/auth/handler/proxy.server.mjs +2 -2
- package/dist/modules/auth/handler/proxy.server.mjs.map +1 -1
- package/dist/modules/auth/handler/route.server.d.mts +2 -2
- package/dist/modules/auth/handler/route.server.d.mts.map +1 -1
- package/dist/modules/auth/handler/route.server.mjs.map +1 -1
- package/dist/modules/auth/handler/{init.d.mts → service.server.d.mts} +322 -90
- package/dist/modules/auth/handler/service.server.d.mts.map +1 -0
- package/dist/modules/auth/handler/{init.mjs → service.server.mjs} +19 -8
- package/dist/modules/auth/handler/service.server.mjs.map +1 -0
- package/dist/modules/auth/hooks/use-session.d.mts +9 -4
- package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
- package/dist/modules/auth/lib/helpers.server.d.mts +1 -1
- package/dist/modules/auth/lib/permissions.d.mts +1 -1
- package/dist/modules/auth/lib/validators.mjs +1 -1
- package/dist/modules/config/lib/context.d.mts +9 -10
- package/dist/modules/config/lib/context.d.mts.map +1 -1
- package/dist/modules/config/lib/context.mjs.map +1 -1
- package/dist/modules/data-tables/lib/converters/search.d.mts +1 -1
- package/dist/modules/data-tables/lib/converters/sorting.d.mts +1 -1
- package/dist/modules/data-tables/server/get-data.server.d.mts +3 -3
- package/dist/modules/data-tables/server/get-data.server.mjs +1 -1
- package/dist/modules/data-tables/server/get-data.server.mjs.map +1 -1
- package/dist/modules/data-tables/strategies/infinite/strategy.d.mts +1 -1
- package/dist/modules/data-tables/strategies/infinite/strategy.mjs +3 -0
- package/dist/modules/data-tables/strategies/infinite/strategy.mjs.map +1 -1
- package/dist/modules/data-tables/tables/data-table/components/row.mjs +5 -15
- package/dist/modules/data-tables/tables/data-table/components/row.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/body.mjs +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/body.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs +13 -23
- package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +1 -0
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.mjs +2 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +5 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.mjs +2 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.d.mts +30 -0
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.d.mts.map +1 -0
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs +77 -9
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs.map +1 -1
- package/dist/modules/{config/db → database/lib}/helpers.d.mts +2 -2
- package/dist/modules/database/lib/helpers.d.mts.map +1 -0
- package/dist/modules/{config/db → database/lib}/helpers.mjs +1 -1
- package/dist/modules/database/lib/helpers.mjs.map +1 -0
- package/dist/modules/database/lib/service.server.d.mts +34 -0
- package/dist/modules/database/lib/service.server.d.mts.map +1 -0
- package/dist/modules/database/lib/service.server.mjs +24 -0
- package/dist/modules/database/lib/service.server.mjs.map +1 -0
- package/dist/modules/{config/db → database/lib}/types.d.mts +1 -1
- package/dist/modules/database/lib/types.d.mts.map +1 -0
- package/dist/modules/emails/lib/service.server.d.mts +29 -0
- package/dist/modules/emails/lib/service.server.d.mts.map +1 -0
- package/dist/modules/emails/lib/service.server.mjs +21 -0
- package/dist/modules/emails/lib/service.server.mjs.map +1 -0
- package/dist/modules/inline-edit/components/date-input.client.mjs +1 -1
- package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.mjs +1 -0
- package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-time.client.mjs +1 -0
- package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/editor.client.mjs +1 -0
- package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.mjs +1 -0
- package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.mjs +1 -0
- package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input.client.mjs +3 -0
- package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/select.client.mjs +1 -0
- package/dist/modules/inline-edit/components/select.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.mjs +1 -0
- package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.mjs +1 -0
- package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
- package/dist/modules/router/handler/context.server.d.mts +12 -10
- package/dist/modules/router/handler/context.server.d.mts.map +1 -1
- package/dist/modules/router/handler/init.server.d.mts +13 -11
- package/dist/modules/router/handler/init.server.d.mts.map +1 -1
- package/dist/modules/router/handler/init.server.mjs +2 -2
- package/dist/modules/router/handler/init.server.mjs.map +1 -1
- package/dist/modules/router/handler/route.server.d.mts +1 -1
- package/dist/modules/storage/components/dropzone.client.d.mts +2 -2
- package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone.client.mjs.map +1 -1
- package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
- package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
- package/dist/modules/storage/components/image-grid.client.mjs +20 -22
- package/dist/modules/storage/components/image-grid.client.mjs.map +1 -1
- package/dist/modules/storage/components/image.client.d.mts +8 -0
- package/dist/modules/storage/components/image.client.d.mts.map +1 -0
- package/dist/modules/storage/components/image.client.mjs +17 -0
- package/dist/modules/storage/components/image.client.mjs.map +1 -0
- package/dist/modules/storage/components/upload-button.client.d.mts +12 -0
- package/dist/modules/storage/components/upload-button.client.d.mts.map +1 -0
- package/dist/modules/storage/components/upload-button.client.mjs +34 -0
- package/dist/modules/storage/components/upload-button.client.mjs.map +1 -0
- package/dist/modules/storage/components/upload-zone-context.client.d.mts +5 -5
- package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone-context.client.mjs +2 -2
- package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts +4 -4
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs +16 -9
- package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
- package/dist/modules/storage/lib/constants.d.mts +1 -5
- package/dist/modules/storage/lib/constants.d.mts.map +1 -1
- package/dist/modules/storage/lib/constants.mjs +1 -13
- package/dist/modules/storage/lib/constants.mjs.map +1 -1
- package/dist/modules/storage/lib/helpers.d.mts +14 -28
- package/dist/modules/storage/lib/helpers.d.mts.map +1 -1
- package/dist/modules/storage/lib/helpers.mjs +17 -75
- package/dist/modules/storage/lib/helpers.mjs.map +1 -1
- package/dist/modules/storage/lib/procedures.server.d.mts +1991 -0
- package/dist/modules/{auth/handler/init.d.mts.map → storage/lib/procedures.server.d.mts.map} +1 -1
- package/dist/modules/storage/lib/procedures.server.mjs +22 -0
- package/dist/modules/storage/lib/procedures.server.mjs.map +1 -0
- package/dist/modules/storage/lib/router-handlers.server.d.mts +41 -0
- package/dist/modules/storage/lib/router-handlers.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/router-handlers.server.mjs +124 -0
- package/dist/modules/storage/lib/router-handlers.server.mjs.map +1 -0
- package/dist/modules/storage/lib/schema.d.mts +68 -958
- package/dist/modules/storage/lib/schema.d.mts.map +1 -1
- package/dist/modules/storage/lib/schema.mjs +28 -65
- package/dist/modules/storage/lib/schema.mjs.map +1 -1
- package/dist/modules/storage/lib/service.server.d.mts +2155 -141
- package/dist/modules/storage/lib/service.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/service.server.mjs +453 -242
- package/dist/modules/storage/lib/service.server.mjs.map +1 -1
- package/dist/modules/storage/lib/upload.client.d.mts +58 -0
- package/dist/modules/storage/lib/upload.client.d.mts.map +1 -0
- package/dist/modules/storage/lib/upload.client.mjs +87 -0
- package/dist/modules/storage/lib/upload.client.mjs.map +1 -0
- package/dist/modules/storage/lib/validators.d.mts +297 -835
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/dist/modules/storage/lib/validators.mjs +32 -76
- package/dist/modules/storage/lib/validators.mjs.map +1 -1
- package/dist/modules/storage/providers/adapters/s3.server.d.mts +19 -0
- package/dist/modules/storage/providers/adapters/s3.server.d.mts.map +1 -0
- package/dist/modules/storage/providers/adapters/s3.server.mjs +173 -0
- package/dist/modules/storage/providers/adapters/s3.server.mjs.map +1 -0
- package/dist/modules/storage/providers/lib/constants.d.mts +6 -0
- package/dist/modules/storage/providers/lib/constants.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/constants.mjs +6 -0
- package/dist/modules/storage/providers/lib/constants.mjs.map +1 -0
- package/dist/modules/storage/providers/lib/errors.d.mts +12 -0
- package/dist/modules/storage/providers/lib/errors.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/errors.mjs +13 -0
- package/dist/modules/storage/providers/lib/errors.mjs.map +1 -0
- package/dist/modules/storage/providers/lib/types.d.mts +21 -0
- package/dist/modules/storage/providers/lib/types.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/validators.d.mts +112 -0
- package/dist/modules/storage/providers/lib/validators.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/validators.mjs +75 -0
- package/dist/modules/storage/providers/lib/validators.mjs.map +1 -0
- package/dist/router/server.d.mts +1 -1
- package/dist/storage/client.d.mts +4 -2
- package/dist/storage/client.mjs +4 -2
- package/dist/storage/server.d.mts +5 -4
- package/dist/storage/server.mjs +5 -4
- package/dist/storage.d.mts +9 -6
- package/dist/storage.mjs +8 -6
- package/package.json +18 -5
- package/src/components/editor/components/editor.client.tsx +9 -1
- package/src/components/editor/extensions/file-handler/extension.ts +4 -4
- package/src/components/editor/extensions/file-handler/strategy.ts +15 -40
- package/src/components/editor/extensions/file-handler/utils.ts +1 -1
- package/src/components/editor/extensions/image/extension.ts +10 -10
- package/src/components/editor/lib/helpers.ts +28 -11
- package/src/components/ui/combobox-dropdown.client.tsx +1 -0
- package/src/components/ui/combobox.client.tsx +1 -1
- package/src/entry.ts +12 -51
- package/src/lib/entry.ts +1 -5
- package/src/lib/utils/markdown.ts +10 -0
- package/src/lib/utils/url.ts +2 -1
- package/src/lib/utils/user-agent.ts +15 -0
- package/src/modules/auth/components/{guard-first-user.server.tsx → create-first-user-guard.server.tsx} +8 -8
- package/src/modules/auth/components/guard.server.tsx +1 -1
- package/src/modules/auth/entry.server.ts +4 -5
- package/src/modules/auth/handler/create-client.client.ts +2 -2
- package/src/modules/auth/handler/proxy.server.ts +1 -1
- package/src/modules/auth/handler/route.server.ts +2 -2
- package/src/modules/auth/handler/{init.ts → service.server.ts} +30 -9
- package/src/modules/config/entry.server.ts +0 -9
- package/src/modules/config/entry.ts +2 -2
- package/src/modules/config/lib/context.ts +9 -9
- package/src/modules/data-tables/entry.client.ts +1 -0
- package/src/modules/data-tables/server/get-data.server.ts +1 -1
- package/src/modules/data-tables/strategies/infinite/strategy.ts +4 -1
- package/src/modules/data-tables/tables/data-table/components/row.tsx +12 -21
- package/src/modules/data-tables/tables/inline-table/components/body.tsx +1 -1
- package/src/modules/data-tables/tables/inline-table/components/row.client.tsx +24 -30
- package/src/modules/data-tables/tables/inline-table/components/table.tsx +6 -1
- package/src/modules/data-tables/tables/inline-table/hooks/context.client.tsx +5 -0
- package/src/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.ts +119 -91
- package/src/modules/database/entry.client.ts +0 -0
- package/src/modules/database/entry.server.ts +4 -0
- package/src/modules/database/entry.ts +5 -0
- package/src/modules/database/lib/service.server.ts +33 -0
- package/src/modules/emails/entry.client.ts +0 -0
- package/src/modules/emails/entry.server.ts +4 -0
- package/src/modules/emails/entry.ts +0 -0
- package/src/modules/emails/lib/service.server.ts +29 -0
- package/src/modules/inline-edit/components/date-input.client.tsx +1 -1
- package/src/modules/inline-edit/components/date-picker.client.tsx +1 -0
- package/src/modules/inline-edit/components/date-time.client.tsx +1 -0
- package/src/modules/inline-edit/components/editor.client.tsx +3 -0
- package/src/modules/inline-edit/components/input-recipient.client.tsx +1 -0
- package/src/modules/inline-edit/components/input-toggle.client.tsx +1 -0
- package/src/modules/inline-edit/components/input.client.tsx +3 -0
- package/src/modules/inline-edit/components/select.client.tsx +5 -1
- package/src/modules/inline-edit/components/switch.client.tsx +1 -0
- package/src/modules/inline-edit/components/toggle.client.tsx +1 -0
- package/src/modules/router/handler/init.server.ts +2 -2
- package/src/modules/storage/components/dropzone.client.tsx +1 -1
- package/src/modules/storage/components/image-grid.client.tsx +23 -20
- package/src/modules/storage/components/image.client.tsx +8 -0
- package/src/modules/storage/components/upload-zone-context.client.tsx +11 -8
- package/src/modules/storage/components/upload-zone.client.tsx +22 -16
- package/src/modules/storage/entry.client.ts +3 -1
- package/src/modules/storage/entry.server.ts +9 -3
- package/src/modules/storage/entry.ts +13 -1
- package/src/modules/storage/lib/constants.ts +0 -11
- package/src/modules/storage/lib/helpers.ts +18 -65
- package/src/modules/storage/lib/procedures.server.ts +60 -0
- package/src/modules/storage/lib/router-handlers.server.ts +178 -0
- package/src/modules/storage/lib/schema.ts +26 -97
- package/src/modules/storage/lib/service.server.ts +636 -374
- package/src/modules/storage/lib/upload.client.ts +156 -0
- package/src/modules/storage/lib/validators.ts +50 -111
- package/src/modules/storage/providers/adapters/s3.server.ts +281 -0
- package/src/modules/storage/providers/lib/constants.ts +3 -0
- package/src/modules/storage/providers/lib/errors.ts +21 -0
- package/src/modules/storage/providers/lib/types.ts +28 -0
- package/src/modules/storage/providers/lib/validators.ts +122 -0
- package/dist/lib/config/constants.d.mts +0 -5
- package/dist/lib/config/constants.d.mts.map +0 -1
- package/dist/lib/config/constants.mjs +0 -6
- package/dist/lib/config/constants.mjs.map +0 -1
- package/dist/modules/auth/components/guard-first-user.server.d.mts +0 -18
- package/dist/modules/auth/components/guard-first-user.server.d.mts.map +0 -1
- package/dist/modules/auth/components/guard-first-user.server.mjs +0 -16
- package/dist/modules/auth/components/guard-first-user.server.mjs.map +0 -1
- package/dist/modules/auth/handler/init.mjs.map +0 -1
- package/dist/modules/config/db/helpers.d.mts.map +0 -1
- package/dist/modules/config/db/helpers.mjs.map +0 -1
- package/dist/modules/config/db/init.d.mts +0 -20
- package/dist/modules/config/db/init.d.mts.map +0 -1
- package/dist/modules/config/db/init.mjs +0 -15
- package/dist/modules/config/db/init.mjs.map +0 -1
- package/dist/modules/config/db/types.d.mts.map +0 -1
- package/dist/modules/config/providers/email.d.mts +0 -12
- package/dist/modules/config/providers/email.d.mts.map +0 -1
- package/dist/modules/config/providers/email.mjs +0 -11
- package/dist/modules/config/providers/email.mjs.map +0 -1
- package/dist/modules/storage/config/filters.d.mts +0 -17
- package/dist/modules/storage/config/filters.d.mts.map +0 -1
- package/dist/modules/storage/config/filters.mjs +0 -17
- package/dist/modules/storage/config/filters.mjs.map +0 -1
- package/dist/modules/storage/lib/create-client.server.d.mts +0 -11
- package/dist/modules/storage/lib/create-client.server.d.mts.map +0 -1
- package/dist/modules/storage/lib/create-client.server.mjs +0 -11
- package/dist/modules/storage/lib/create-client.server.mjs.map +0 -1
- package/dist/modules/storage/lib/create-upload.client.d.mts +0 -56
- package/dist/modules/storage/lib/create-upload.client.d.mts.map +0 -1
- package/dist/modules/storage/lib/create-upload.client.mjs +0 -98
- package/dist/modules/storage/lib/create-upload.client.mjs.map +0 -1
- package/dist/modules/storage/lib/proxy.server.d.mts +0 -21
- package/dist/modules/storage/lib/proxy.server.d.mts.map +0 -1
- package/dist/modules/storage/lib/proxy.server.mjs +0 -46
- package/dist/modules/storage/lib/proxy.server.mjs.map +0 -1
- package/dist/modules/storage/lib/router.server.d.mts +0 -31002
- package/dist/modules/storage/lib/router.server.d.mts.map +0 -1
- package/dist/modules/storage/lib/router.server.mjs +0 -86
- package/dist/modules/storage/lib/router.server.mjs.map +0 -1
- package/src/lib/config/constants.ts +0 -1
- package/src/lib/utils/time-picker.ts +0 -139
- package/src/modules/config/db/init.ts +0 -21
- package/src/modules/config/providers/email.ts +0 -13
- package/src/modules/storage/config/filters.ts +0 -12
- package/src/modules/storage/lib/create-client.server.ts +0 -14
- package/src/modules/storage/lib/create-upload.client.ts +0 -134
- package/src/modules/storage/lib/proxy.server.ts +0 -63
- package/src/modules/storage/lib/router.server.ts +0 -182
- /package/src/modules/{config/db → database/lib}/helpers.ts +0 -0
- /package/src/modules/{config/db → database/lib}/types.ts +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Role as Role$1, createAccessControl } from "../lib/permissions.mjs";
|
|
2
|
+
import { TDatabaseSchema } from "../../database/lib/types.mjs";
|
|
3
|
+
import { Database } from "../../database/lib/service.server.mjs";
|
|
2
4
|
import { TulipConfig } from "../../config/lib/config.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { DatabaseClient } from "../../config/db/init.mjs";
|
|
5
|
-
import { EmailClient } from "../../config/providers/email.mjs";
|
|
6
|
-
import "../../../config/server.mjs";
|
|
5
|
+
import { Email } from "../../emails/lib/service.server.mjs";
|
|
7
6
|
import "../../../config.mjs";
|
|
8
7
|
import * as zod from "zod";
|
|
9
8
|
import * as _better_auth_passkey_client0 from "@better-auth/passkey/client";
|
|
@@ -11,22 +10,30 @@ import * as _better_auth_passkey0 from "@better-auth/passkey";
|
|
|
11
10
|
import * as better_auth_plugins0 from "better-auth/plugins";
|
|
12
11
|
import * as better_auth0 from "better-auth";
|
|
13
12
|
|
|
14
|
-
//#region src/modules/auth/handler/
|
|
13
|
+
//#region src/modules/auth/handler/service.server.d.ts
|
|
15
14
|
declare const authCookiePrefix = "tulip";
|
|
16
15
|
type InitAuthProps<TSchema extends TDatabaseSchema> = {
|
|
17
|
-
db:
|
|
18
|
-
email:
|
|
16
|
+
db: Database<TSchema>;
|
|
17
|
+
email: Email;
|
|
19
18
|
config: TulipConfig;
|
|
20
19
|
ac: ReturnType<typeof createAccessControl>;
|
|
21
20
|
roles: { [key in string]?: Role$1 };
|
|
21
|
+
allowedHosts: string[];
|
|
22
|
+
defaultRole?: string;
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Create the Better Auth server instance.
|
|
26
|
+
*/
|
|
27
|
+
declare function createAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<TSchema>): better_auth0.Auth<{
|
|
24
28
|
advanced: {
|
|
25
29
|
cookiePrefix: string;
|
|
26
30
|
database: {
|
|
27
31
|
generateId: () => false;
|
|
28
32
|
};
|
|
29
33
|
};
|
|
34
|
+
baseURL: {
|
|
35
|
+
allowedHosts: string[];
|
|
36
|
+
};
|
|
30
37
|
database: (options: better_auth0.BetterAuthOptions) => better_auth0.DBAdapter<better_auth0.BetterAuthOptions>;
|
|
31
38
|
emailAndPassword: {
|
|
32
39
|
enabled: true;
|
|
@@ -52,14 +59,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
52
59
|
after: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
|
|
53
60
|
};
|
|
54
61
|
plugins: [{
|
|
55
|
-
id: "next-cookies";
|
|
56
|
-
hooks: {
|
|
57
|
-
after: {
|
|
58
|
-
matcher(ctx: better_auth0.HookEndpointContext): true;
|
|
59
|
-
handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
|
|
60
|
-
}[];
|
|
61
|
-
};
|
|
62
|
-
}, {
|
|
63
62
|
id: "passkey";
|
|
64
63
|
endpoints: {
|
|
65
64
|
generatePasskeyRegistrationOptions: better_auth0.StrictEndpoint<"/passkey/generate-register-options", {
|
|
@@ -356,7 +355,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
356
355
|
};
|
|
357
356
|
};
|
|
358
357
|
};
|
|
359
|
-
}, _better_auth_passkey0.Passkey
|
|
358
|
+
}, _better_auth_passkey0.Passkey>;
|
|
360
359
|
verifyPasskeyAuthentication: better_auth0.StrictEndpoint<"/passkey/verify-authentication", {
|
|
361
360
|
method: "POST";
|
|
362
361
|
body: zod.ZodObject<{
|
|
@@ -617,13 +616,13 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
617
616
|
};
|
|
618
617
|
};
|
|
619
618
|
$ERROR_CODES: {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
619
|
+
CHALLENGE_NOT_FOUND: better_auth0.RawError<"CHALLENGE_NOT_FOUND">;
|
|
620
|
+
YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
|
|
621
|
+
FAILED_TO_VERIFY_REGISTRATION: better_auth0.RawError<"FAILED_TO_VERIFY_REGISTRATION">;
|
|
622
|
+
PASSKEY_NOT_FOUND: better_auth0.RawError<"PASSKEY_NOT_FOUND">;
|
|
623
|
+
AUTHENTICATION_FAILED: better_auth0.RawError<"AUTHENTICATION_FAILED">;
|
|
624
|
+
UNABLE_TO_CREATE_SESSION: better_auth0.RawError<"UNABLE_TO_CREATE_SESSION">;
|
|
625
|
+
FAILED_TO_UPDATE_PASSKEY: better_auth0.RawError<"FAILED_TO_UPDATE_PASSKEY">;
|
|
627
626
|
};
|
|
628
627
|
options: _better_auth_passkey0.PasskeyOptions | undefined;
|
|
629
628
|
}, {
|
|
@@ -689,7 +688,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
689
688
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
690
689
|
session: {
|
|
691
690
|
user: better_auth_plugins0.UserWithRole;
|
|
692
|
-
session:
|
|
691
|
+
session: {
|
|
692
|
+
id: string;
|
|
693
|
+
createdAt: Date;
|
|
694
|
+
updatedAt: Date;
|
|
695
|
+
userId: string;
|
|
696
|
+
expiresAt: Date;
|
|
697
|
+
token: string;
|
|
698
|
+
ipAddress?: string | null | undefined;
|
|
699
|
+
userAgent?: string | null | undefined;
|
|
700
|
+
};
|
|
693
701
|
};
|
|
694
702
|
}>)[];
|
|
695
703
|
metadata: {
|
|
@@ -733,7 +741,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
733
741
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
734
742
|
session: {
|
|
735
743
|
user: better_auth_plugins0.UserWithRole;
|
|
736
|
-
session:
|
|
744
|
+
session: {
|
|
745
|
+
id: string;
|
|
746
|
+
createdAt: Date;
|
|
747
|
+
updatedAt: Date;
|
|
748
|
+
userId: string;
|
|
749
|
+
expiresAt: Date;
|
|
750
|
+
token: string;
|
|
751
|
+
ipAddress?: string | null | undefined;
|
|
752
|
+
userAgent?: string | null | undefined;
|
|
753
|
+
};
|
|
737
754
|
};
|
|
738
755
|
}>)[];
|
|
739
756
|
metadata: {
|
|
@@ -815,7 +832,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
815
832
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
816
833
|
session: {
|
|
817
834
|
user: better_auth_plugins0.UserWithRole;
|
|
818
|
-
session:
|
|
835
|
+
session: {
|
|
836
|
+
id: string;
|
|
837
|
+
createdAt: Date;
|
|
838
|
+
updatedAt: Date;
|
|
839
|
+
userId: string;
|
|
840
|
+
expiresAt: Date;
|
|
841
|
+
token: string;
|
|
842
|
+
ipAddress?: string | null | undefined;
|
|
843
|
+
userAgent?: string | null | undefined;
|
|
844
|
+
};
|
|
819
845
|
};
|
|
820
846
|
}>)[];
|
|
821
847
|
metadata: {
|
|
@@ -848,7 +874,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
848
874
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
849
875
|
session: {
|
|
850
876
|
user: better_auth_plugins0.UserWithRole;
|
|
851
|
-
session:
|
|
877
|
+
session: {
|
|
878
|
+
id: string;
|
|
879
|
+
createdAt: Date;
|
|
880
|
+
updatedAt: Date;
|
|
881
|
+
userId: string;
|
|
882
|
+
expiresAt: Date;
|
|
883
|
+
token: string;
|
|
884
|
+
ipAddress?: string | null | undefined;
|
|
885
|
+
userAgent?: string | null | undefined;
|
|
886
|
+
};
|
|
852
887
|
};
|
|
853
888
|
}>)[];
|
|
854
889
|
query: zod.ZodObject<{
|
|
@@ -870,15 +905,19 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
870
905
|
desc: "desc";
|
|
871
906
|
}>>;
|
|
872
907
|
filterField: zod.ZodOptional<zod.ZodString>;
|
|
873
|
-
filterValue: zod.ZodOptional<zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, zod.ZodBoolean]>>;
|
|
908
|
+
filterValue: zod.ZodOptional<zod.ZodUnion<[zod.ZodUnion<[zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, zod.ZodBoolean]>, zod.ZodArray<zod.ZodString>]>, zod.ZodArray<zod.ZodNumber>]>>;
|
|
874
909
|
filterOperator: zod.ZodOptional<zod.ZodEnum<{
|
|
875
910
|
eq: "eq";
|
|
876
911
|
ne: "ne";
|
|
877
|
-
lt: "lt";
|
|
878
|
-
lte: "lte";
|
|
879
912
|
gt: "gt";
|
|
880
913
|
gte: "gte";
|
|
914
|
+
lt: "lt";
|
|
915
|
+
lte: "lte";
|
|
916
|
+
in: "in";
|
|
917
|
+
not_in: "not_in";
|
|
881
918
|
contains: "contains";
|
|
919
|
+
starts_with: "starts_with";
|
|
920
|
+
ends_with: "ends_with";
|
|
882
921
|
}>>;
|
|
883
922
|
}, better_auth0.$strip>;
|
|
884
923
|
metadata: {
|
|
@@ -921,18 +960,22 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
921
960
|
}, {
|
|
922
961
|
users: better_auth_plugins0.UserWithRole[];
|
|
923
962
|
total: number;
|
|
924
|
-
limit: number | undefined;
|
|
925
|
-
offset: number | undefined;
|
|
926
|
-
} | {
|
|
927
|
-
users: never[];
|
|
928
|
-
total: number;
|
|
929
963
|
}>;
|
|
930
964
|
listUserSessions: better_auth0.StrictEndpoint<"/admin/list-user-sessions", {
|
|
931
965
|
method: "POST";
|
|
932
966
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
933
967
|
session: {
|
|
934
968
|
user: better_auth_plugins0.UserWithRole;
|
|
935
|
-
session:
|
|
969
|
+
session: {
|
|
970
|
+
id: string;
|
|
971
|
+
createdAt: Date;
|
|
972
|
+
updatedAt: Date;
|
|
973
|
+
userId: string;
|
|
974
|
+
expiresAt: Date;
|
|
975
|
+
token: string;
|
|
976
|
+
ipAddress?: string | null | undefined;
|
|
977
|
+
userAgent?: string | null | undefined;
|
|
978
|
+
};
|
|
936
979
|
};
|
|
937
980
|
}>)[];
|
|
938
981
|
body: zod.ZodObject<{
|
|
@@ -976,7 +1019,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
976
1019
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
977
1020
|
session: {
|
|
978
1021
|
user: better_auth_plugins0.UserWithRole;
|
|
979
|
-
session:
|
|
1022
|
+
session: {
|
|
1023
|
+
id: string;
|
|
1024
|
+
createdAt: Date;
|
|
1025
|
+
updatedAt: Date;
|
|
1026
|
+
userId: string;
|
|
1027
|
+
expiresAt: Date;
|
|
1028
|
+
token: string;
|
|
1029
|
+
ipAddress?: string | null | undefined;
|
|
1030
|
+
userAgent?: string | null | undefined;
|
|
1031
|
+
};
|
|
980
1032
|
};
|
|
981
1033
|
}>)[];
|
|
982
1034
|
metadata: {
|
|
@@ -1016,7 +1068,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1016
1068
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
1017
1069
|
session: {
|
|
1018
1070
|
user: better_auth_plugins0.UserWithRole;
|
|
1019
|
-
session:
|
|
1071
|
+
session: {
|
|
1072
|
+
id: string;
|
|
1073
|
+
createdAt: Date;
|
|
1074
|
+
updatedAt: Date;
|
|
1075
|
+
userId: string;
|
|
1076
|
+
expiresAt: Date;
|
|
1077
|
+
token: string;
|
|
1078
|
+
ipAddress?: string | null | undefined;
|
|
1079
|
+
userAgent?: string | null | undefined;
|
|
1080
|
+
};
|
|
1020
1081
|
};
|
|
1021
1082
|
}>)[];
|
|
1022
1083
|
metadata: {
|
|
@@ -1054,7 +1115,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1054
1115
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
1055
1116
|
session: {
|
|
1056
1117
|
user: better_auth_plugins0.UserWithRole;
|
|
1057
|
-
session:
|
|
1118
|
+
session: {
|
|
1119
|
+
id: string;
|
|
1120
|
+
createdAt: Date;
|
|
1121
|
+
updatedAt: Date;
|
|
1122
|
+
userId: string;
|
|
1123
|
+
expiresAt: Date;
|
|
1124
|
+
token: string;
|
|
1125
|
+
ipAddress?: string | null | undefined;
|
|
1126
|
+
userAgent?: string | null | undefined;
|
|
1127
|
+
};
|
|
1058
1128
|
};
|
|
1059
1129
|
}>)[];
|
|
1060
1130
|
metadata: {
|
|
@@ -1129,7 +1199,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1129
1199
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
1130
1200
|
session: {
|
|
1131
1201
|
user: better_auth_plugins0.UserWithRole;
|
|
1132
|
-
session:
|
|
1202
|
+
session: {
|
|
1203
|
+
id: string;
|
|
1204
|
+
createdAt: Date;
|
|
1205
|
+
updatedAt: Date;
|
|
1206
|
+
userId: string;
|
|
1207
|
+
expiresAt: Date;
|
|
1208
|
+
token: string;
|
|
1209
|
+
ipAddress?: string | null | undefined;
|
|
1210
|
+
userAgent?: string | null | undefined;
|
|
1211
|
+
};
|
|
1133
1212
|
};
|
|
1134
1213
|
}>)[];
|
|
1135
1214
|
metadata: {
|
|
@@ -1167,7 +1246,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1167
1246
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
1168
1247
|
session: {
|
|
1169
1248
|
user: better_auth_plugins0.UserWithRole;
|
|
1170
|
-
session:
|
|
1249
|
+
session: {
|
|
1250
|
+
id: string;
|
|
1251
|
+
createdAt: Date;
|
|
1252
|
+
updatedAt: Date;
|
|
1253
|
+
userId: string;
|
|
1254
|
+
expiresAt: Date;
|
|
1255
|
+
token: string;
|
|
1256
|
+
ipAddress?: string | null | undefined;
|
|
1257
|
+
userAgent?: string | null | undefined;
|
|
1258
|
+
};
|
|
1171
1259
|
};
|
|
1172
1260
|
}>)[];
|
|
1173
1261
|
metadata: {
|
|
@@ -1205,7 +1293,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1205
1293
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
1206
1294
|
session: {
|
|
1207
1295
|
user: better_auth_plugins0.UserWithRole;
|
|
1208
|
-
session:
|
|
1296
|
+
session: {
|
|
1297
|
+
id: string;
|
|
1298
|
+
createdAt: Date;
|
|
1299
|
+
updatedAt: Date;
|
|
1300
|
+
userId: string;
|
|
1301
|
+
expiresAt: Date;
|
|
1302
|
+
token: string;
|
|
1303
|
+
ipAddress?: string | null | undefined;
|
|
1304
|
+
userAgent?: string | null | undefined;
|
|
1305
|
+
};
|
|
1209
1306
|
};
|
|
1210
1307
|
}>)[];
|
|
1211
1308
|
metadata: {
|
|
@@ -1244,7 +1341,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1244
1341
|
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
1245
1342
|
session: {
|
|
1246
1343
|
user: better_auth_plugins0.UserWithRole;
|
|
1247
|
-
session:
|
|
1344
|
+
session: {
|
|
1345
|
+
id: string;
|
|
1346
|
+
createdAt: Date;
|
|
1347
|
+
updatedAt: Date;
|
|
1348
|
+
userId: string;
|
|
1349
|
+
expiresAt: Date;
|
|
1350
|
+
token: string;
|
|
1351
|
+
ipAddress?: string | null | undefined;
|
|
1352
|
+
userAgent?: string | null | undefined;
|
|
1353
|
+
};
|
|
1248
1354
|
};
|
|
1249
1355
|
}>)[];
|
|
1250
1356
|
metadata: {
|
|
@@ -1295,11 +1401,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1295
1401
|
schema: {
|
|
1296
1402
|
type: "object";
|
|
1297
1403
|
properties: {
|
|
1298
|
-
permission: {
|
|
1299
|
-
type: string;
|
|
1300
|
-
description: string;
|
|
1301
|
-
deprecated: boolean;
|
|
1302
|
-
};
|
|
1303
1404
|
permissions: {
|
|
1304
1405
|
type: string;
|
|
1305
1406
|
description: string;
|
|
@@ -1333,17 +1434,11 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1333
1434
|
};
|
|
1334
1435
|
};
|
|
1335
1436
|
$Infer: {
|
|
1336
|
-
body:
|
|
1337
|
-
permission: {
|
|
1338
|
-
readonly [x: string]: better_auth0.LiteralString[] | undefined;
|
|
1339
|
-
};
|
|
1340
|
-
permissions?: never | undefined;
|
|
1341
|
-
} | {
|
|
1437
|
+
body: {
|
|
1342
1438
|
permissions: {
|
|
1343
1439
|
readonly [x: string]: better_auth0.LiteralString[] | undefined;
|
|
1344
1440
|
};
|
|
1345
|
-
|
|
1346
|
-
}) & {
|
|
1441
|
+
} & {
|
|
1347
1442
|
userId?: string | undefined;
|
|
1348
1443
|
role?: string | undefined;
|
|
1349
1444
|
};
|
|
@@ -1355,27 +1450,27 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1355
1450
|
}>;
|
|
1356
1451
|
};
|
|
1357
1452
|
$ERROR_CODES: {
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1453
|
+
USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: better_auth0.RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
|
|
1454
|
+
FAILED_TO_CREATE_USER: better_auth0.RawError<"FAILED_TO_CREATE_USER">;
|
|
1455
|
+
USER_ALREADY_EXISTS: better_auth0.RawError<"USER_ALREADY_EXISTS">;
|
|
1456
|
+
YOU_CANNOT_BAN_YOURSELF: better_auth0.RawError<"YOU_CANNOT_BAN_YOURSELF">;
|
|
1457
|
+
YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
|
|
1458
|
+
YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
|
|
1459
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
|
|
1460
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
|
|
1461
|
+
YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
|
|
1462
|
+
YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
|
|
1463
|
+
YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
|
|
1464
|
+
YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
|
|
1465
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
|
|
1466
|
+
BANNED_USER: better_auth0.RawError<"BANNED_USER">;
|
|
1467
|
+
YOU_ARE_NOT_ALLOWED_TO_GET_USER: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
|
|
1468
|
+
NO_DATA_TO_UPDATE: better_auth0.RawError<"NO_DATA_TO_UPDATE">;
|
|
1469
|
+
YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
|
|
1470
|
+
YOU_CANNOT_REMOVE_YOURSELF: better_auth0.RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
|
|
1471
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: better_auth0.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
|
|
1472
|
+
YOU_CANNOT_IMPERSONATE_ADMINS: better_auth0.RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
|
|
1473
|
+
INVALID_ROLE_TYPE: better_auth0.RawError<"INVALID_ROLE_TYPE">;
|
|
1379
1474
|
};
|
|
1380
1475
|
schema: {
|
|
1381
1476
|
user: {
|
|
@@ -1427,6 +1522,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1427
1522
|
statements: better_auth_plugins0.Statements;
|
|
1428
1523
|
};
|
|
1429
1524
|
adminRoles: string[];
|
|
1525
|
+
defaultRole: string;
|
|
1430
1526
|
}>;
|
|
1431
1527
|
}, {
|
|
1432
1528
|
id: "email-otp";
|
|
@@ -1448,6 +1544,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1448
1544
|
email: zod.ZodString;
|
|
1449
1545
|
type: zod.ZodEnum<{
|
|
1450
1546
|
"sign-in": "sign-in";
|
|
1547
|
+
"change-email": "change-email";
|
|
1451
1548
|
"email-verification": "email-verification";
|
|
1452
1549
|
"forget-password": "forget-password";
|
|
1453
1550
|
}>;
|
|
@@ -1484,6 +1581,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1484
1581
|
email: zod.ZodString;
|
|
1485
1582
|
type: zod.ZodEnum<{
|
|
1486
1583
|
"sign-in": "sign-in";
|
|
1584
|
+
"change-email": "change-email";
|
|
1487
1585
|
"email-verification": "email-verification";
|
|
1488
1586
|
"forget-password": "forget-password";
|
|
1489
1587
|
}>;
|
|
@@ -1513,6 +1611,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1513
1611
|
email: zod.ZodString;
|
|
1514
1612
|
type: zod.ZodEnum<{
|
|
1515
1613
|
"sign-in": "sign-in";
|
|
1614
|
+
"change-email": "change-email";
|
|
1516
1615
|
"email-verification": "email-verification";
|
|
1517
1616
|
"forget-password": "forget-password";
|
|
1518
1617
|
}>;
|
|
@@ -1554,6 +1653,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1554
1653
|
email: zod.ZodString;
|
|
1555
1654
|
type: zod.ZodEnum<{
|
|
1556
1655
|
"sign-in": "sign-in";
|
|
1656
|
+
"change-email": "change-email";
|
|
1557
1657
|
"email-verification": "email-verification";
|
|
1558
1658
|
"forget-password": "forget-password";
|
|
1559
1659
|
}>;
|
|
@@ -1651,10 +1751,12 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1651
1751
|
}>;
|
|
1652
1752
|
signInEmailOTP: better_auth0.StrictEndpoint<"/sign-in/email-otp", {
|
|
1653
1753
|
method: "POST";
|
|
1654
|
-
body: zod.ZodObject<{
|
|
1754
|
+
body: zod.ZodIntersection<zod.ZodObject<{
|
|
1655
1755
|
email: zod.ZodString;
|
|
1656
1756
|
otp: zod.ZodString;
|
|
1657
|
-
|
|
1757
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
1758
|
+
image: zod.ZodOptional<zod.ZodString>;
|
|
1759
|
+
}, better_auth0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
|
|
1658
1760
|
metadata: {
|
|
1659
1761
|
openapi: {
|
|
1660
1762
|
operationId: string;
|
|
@@ -1773,10 +1875,120 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1773
1875
|
responses: {
|
|
1774
1876
|
200: {
|
|
1775
1877
|
description: string;
|
|
1776
|
-
|
|
1878
|
+
content: {
|
|
1777
1879
|
"application/json": {
|
|
1778
1880
|
schema: {
|
|
1779
|
-
type:
|
|
1881
|
+
type: "object";
|
|
1882
|
+
properties: {
|
|
1883
|
+
success: {
|
|
1884
|
+
type: string;
|
|
1885
|
+
};
|
|
1886
|
+
};
|
|
1887
|
+
};
|
|
1888
|
+
};
|
|
1889
|
+
};
|
|
1890
|
+
};
|
|
1891
|
+
};
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1894
|
+
}, {
|
|
1895
|
+
success: boolean;
|
|
1896
|
+
}>;
|
|
1897
|
+
requestEmailChangeEmailOTP: better_auth0.StrictEndpoint<"/email-otp/request-email-change", {
|
|
1898
|
+
method: "POST";
|
|
1899
|
+
body: zod.ZodObject<{
|
|
1900
|
+
newEmail: zod.ZodString;
|
|
1901
|
+
otp: zod.ZodOptional<zod.ZodString>;
|
|
1902
|
+
}, better_auth0.$strip>;
|
|
1903
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
1904
|
+
session: {
|
|
1905
|
+
session: Record<string, any> & {
|
|
1906
|
+
id: string;
|
|
1907
|
+
createdAt: Date;
|
|
1908
|
+
updatedAt: Date;
|
|
1909
|
+
userId: string;
|
|
1910
|
+
expiresAt: Date;
|
|
1911
|
+
token: string;
|
|
1912
|
+
ipAddress?: string | null | undefined;
|
|
1913
|
+
userAgent?: string | null | undefined;
|
|
1914
|
+
};
|
|
1915
|
+
user: Record<string, any> & {
|
|
1916
|
+
id: string;
|
|
1917
|
+
createdAt: Date;
|
|
1918
|
+
updatedAt: Date;
|
|
1919
|
+
email: string;
|
|
1920
|
+
emailVerified: boolean;
|
|
1921
|
+
name: string;
|
|
1922
|
+
image?: string | null | undefined;
|
|
1923
|
+
};
|
|
1924
|
+
};
|
|
1925
|
+
}>)[];
|
|
1926
|
+
metadata: {
|
|
1927
|
+
openapi: {
|
|
1928
|
+
operationId: string;
|
|
1929
|
+
description: string;
|
|
1930
|
+
responses: {
|
|
1931
|
+
200: {
|
|
1932
|
+
description: string;
|
|
1933
|
+
content: {
|
|
1934
|
+
"application/json": {
|
|
1935
|
+
schema: {
|
|
1936
|
+
type: "object";
|
|
1937
|
+
properties: {
|
|
1938
|
+
success: {
|
|
1939
|
+
type: string;
|
|
1940
|
+
};
|
|
1941
|
+
};
|
|
1942
|
+
};
|
|
1943
|
+
};
|
|
1944
|
+
};
|
|
1945
|
+
};
|
|
1946
|
+
};
|
|
1947
|
+
};
|
|
1948
|
+
};
|
|
1949
|
+
}, {
|
|
1950
|
+
success: boolean;
|
|
1951
|
+
}>;
|
|
1952
|
+
changeEmailEmailOTP: better_auth0.StrictEndpoint<"/email-otp/change-email", {
|
|
1953
|
+
method: "POST";
|
|
1954
|
+
body: zod.ZodObject<{
|
|
1955
|
+
newEmail: zod.ZodString;
|
|
1956
|
+
otp: zod.ZodString;
|
|
1957
|
+
}, better_auth0.$strip>;
|
|
1958
|
+
use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
|
|
1959
|
+
session: {
|
|
1960
|
+
session: Record<string, any> & {
|
|
1961
|
+
id: string;
|
|
1962
|
+
createdAt: Date;
|
|
1963
|
+
updatedAt: Date;
|
|
1964
|
+
userId: string;
|
|
1965
|
+
expiresAt: Date;
|
|
1966
|
+
token: string;
|
|
1967
|
+
ipAddress?: string | null | undefined;
|
|
1968
|
+
userAgent?: string | null | undefined;
|
|
1969
|
+
};
|
|
1970
|
+
user: Record<string, any> & {
|
|
1971
|
+
id: string;
|
|
1972
|
+
createdAt: Date;
|
|
1973
|
+
updatedAt: Date;
|
|
1974
|
+
email: string;
|
|
1975
|
+
emailVerified: boolean;
|
|
1976
|
+
name: string;
|
|
1977
|
+
image?: string | null | undefined;
|
|
1978
|
+
};
|
|
1979
|
+
};
|
|
1980
|
+
}>)[];
|
|
1981
|
+
metadata: {
|
|
1982
|
+
openapi: {
|
|
1983
|
+
operationId: string;
|
|
1984
|
+
description: string;
|
|
1985
|
+
responses: {
|
|
1986
|
+
200: {
|
|
1987
|
+
description: string;
|
|
1988
|
+
content: {
|
|
1989
|
+
"application/json": {
|
|
1990
|
+
schema: {
|
|
1991
|
+
type: "object";
|
|
1780
1992
|
properties: {
|
|
1781
1993
|
success: {
|
|
1782
1994
|
type: string;
|
|
@@ -1799,11 +2011,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1799
2011
|
handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
|
|
1800
2012
|
}[];
|
|
1801
2013
|
};
|
|
1802
|
-
$ERROR_CODES: {
|
|
1803
|
-
readonly OTP_EXPIRED: "OTP expired";
|
|
1804
|
-
readonly INVALID_OTP: "Invalid OTP";
|
|
1805
|
-
readonly TOO_MANY_ATTEMPTS: "Too many attempts";
|
|
1806
|
-
};
|
|
1807
2014
|
rateLimit: ({
|
|
1808
2015
|
pathMatcher(path: string): path is "/email-otp/send-verification-otp";
|
|
1809
2016
|
window: number;
|
|
@@ -1832,11 +2039,36 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1832
2039
|
pathMatcher(path: string): path is "/forget-password/email-otp";
|
|
1833
2040
|
window: number;
|
|
1834
2041
|
max: number;
|
|
2042
|
+
} | {
|
|
2043
|
+
pathMatcher(path: string): path is "/email-otp/request-email-change";
|
|
2044
|
+
window: number;
|
|
2045
|
+
max: number;
|
|
2046
|
+
} | {
|
|
2047
|
+
pathMatcher(path: string): path is "/email-otp/change-email";
|
|
2048
|
+
window: number;
|
|
2049
|
+
max: number;
|
|
1835
2050
|
})[];
|
|
1836
2051
|
options: better_auth_plugins0.EmailOTPOptions;
|
|
2052
|
+
$ERROR_CODES: {
|
|
2053
|
+
OTP_EXPIRED: better_auth0.RawError<"OTP_EXPIRED">;
|
|
2054
|
+
INVALID_OTP: better_auth0.RawError<"INVALID_OTP">;
|
|
2055
|
+
TOO_MANY_ATTEMPTS: better_auth0.RawError<"TOO_MANY_ATTEMPTS">;
|
|
2056
|
+
};
|
|
1837
2057
|
}];
|
|
1838
2058
|
}>;
|
|
1839
|
-
|
|
2059
|
+
/**
|
|
2060
|
+
* Better Auth instance type returned by `Auth.init()`.
|
|
2061
|
+
*/
|
|
2062
|
+
type Auth = ReturnType<typeof createAuth>;
|
|
2063
|
+
/**
|
|
2064
|
+
* Auth service namespace.
|
|
2065
|
+
*
|
|
2066
|
+
* @example
|
|
2067
|
+
* const auth = Auth.init({ db, email, config, ac, roles, allowedHosts });
|
|
2068
|
+
*/
|
|
2069
|
+
declare const Auth: {
|
|
2070
|
+
init: typeof createAuth;
|
|
2071
|
+
};
|
|
1840
2072
|
//#endregion
|
|
1841
|
-
export {
|
|
1842
|
-
//# sourceMappingURL=
|
|
2073
|
+
export { Auth, authCookiePrefix };
|
|
2074
|
+
//# sourceMappingURL=service.server.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.server.d.mts","names":[],"sources":["../../../../src/modules/auth/handler/service.server.ts"],"mappings":";;;;;;;;;;;;;cAea,gBAAA;AAAA,KAER,aAAA,iBAA8B,eAAA;EACjC,EAAA,EAAI,QAAA,CAAS,OAAA;EACb,KAAA,EAAO,KAAA;EACP,MAAA,EAAQ,WAAA;EACR,EAAA,EAAI,UAAA,QAAkB,mBAAA;EACtB,KAAA,sBACoB,MAAA;EAEpB,YAAA;EACA,WAAA;AAAA;;AAXsC;;iBAiB/B,UAAA,iBAA2B,eAAA,CAAA,CAAiB,KAAA,EAAO,aAAA,CAAc,OAAA,iBAAQ,IAAA;;;;;;;;;;sBAAT,YAAA,CAAA,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyF7D,IAAA,GAAO,UAAA,QAAkB,UAAA;;;;;;;cAQxB,IAAA;eAEZ,UAAA;AAAA"}
|