@authhero/kysely-adapter 11.3.0 → 11.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kysely-adapter.cjs +35 -35
- package/dist/kysely-adapter.d.ts +825 -5885
- package/dist/kysely-adapter.mjs +8882 -8314
- package/dist/types/migrate/ReferenceMigrationProvider.d.ts +6 -0
- package/dist/types/migrate/log.d.ts +3 -0
- package/dist/types/migrate/migrate.d.ts +4 -0
- package/dist/types/migrate/migrations/2022-12-11T09:17:35_init.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-09-21T10:12:15_support-url.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-10-26T06:57:21_updated_at.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-10-26T08:14:09_log_table.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-10-27T16:00:11_picture-length.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-11-02T23:18:12_sessions.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-11-07T23:18:12_passwords.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-11-08T17:12:09_logs-table-new-fields.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-11-16T14:27:00_passwords-table-password.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-11-17T10:34:00_codes-fields.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-11-19T20:53:00_univeral-login-session.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-11-21T12:30:00_user-fields.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-11-21T15:57:00_user-indexes.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-11-23T17:44:00_profile-data-field.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-12-08T15:59:00_user-linked-to-index.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-12-21T15:05:00_user-locale.d.ts +4 -0
- package/dist/types/migrate/migrations/2023-12-26T10:58:00_signing-keys.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-01-06T16:23:00_logs-fields.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-01-10T23:19:00_connections-userinfo.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-01-11T10:58:00_missing-fields.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-01-17T10:51:00_session-deleted-at.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-01-31T09:00:00_drop-logs-fields.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-02-02T15:55:00_drop-users-fields.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-02-02T16:55:00_logs-indexes.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-02-05T18:35:00_log-desc-max-length.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-02-08T12:45:00_logs-table-extra-fields.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-02-13T11:25:00_users-table-name-index.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-02-19T20:14:00_users-email-constrain.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-03-11T12:45:00_increase-otp-state-length.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-04-22T14:48:00_increase-ticket-state-length.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-05-09T08:50:00_branding.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-05-14T07:53:00_indexes_and_not_null.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-05-16T10:45:00_vendor_id_in_universal_login_session.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-05-23T15:53:00_auth0client_in_universal_login_session.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-05-24T16:25:00_increase-universal-auth-state-length.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-05-27T23:50:00_authentication_codes.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-06-03T10:00:00_disable-sign-ups.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-06-05T10:00:00_otp-ip-address.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-06-19T10:00:00_increase-user-agent-length.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-07-15T10:00:00_user_id.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-07-15T12:52:00_hooks.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-07-22T12:52:00_user-indexes.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-07-25T12:19:00_session_id.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-07-26T10:18:00_codes.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-07-26T14:18:00_hook-properties.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-08-01T14:19:00_login_auth0_client.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-08-01T15:52:00_login_state.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-08-16T13:45:00_saml.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-08-20T08:50:00_remove_fields.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-08-22T08:26:00_authparams_nonce.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-08-22T11:54:00_connection_id.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-08-26T18:38:00_cert.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-08-27T14:35:00_codes_primay_key.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-08-27T23:48:00_remove_unused.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-08-30T16:41:00_logs_index.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-09-03T08:48:00_application_fields.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-09-03T15:15:00_prompt_settings.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-09-04T08:41:00_connection_client_id.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-09-15T19:31:00_connection_options.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-09-16T17:02:00_users_metadata.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-10-01T9:09:00_ui_locales.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-10-19T07:47:00_prompt.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-10-22T09:01:00_connection_cleanup.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-11-18T10:37:00_act_as.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-11-22T17:48:00_code_verifier.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-12-04T23:34:00_email_provider.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-12-05T13:05:00_drop_tickets.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-12-05T13:20:00_login_useragent.d.ts +4 -0
- package/dist/types/migrate/migrations/2024-12-06T17:42:00_useragent_length.d.ts +0 -0
- package/dist/types/migrate/migrations/2025-01-14T17:51:00_password_key.d.ts +0 -0
- package/dist/types/migrate/migrations/2025-02-03T08:48:00_refresh_tokens.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-02-11T13:54:00_session_new_fields.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-02-12T13:15:00_session_primary_key.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-02-12T15:27:00_drop_sessions.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-02-21T23:45:00_custom_domains.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-03-10T11:20:00_organization.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-03-12T14:14:00_authorization_url_length.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-03-14T21:58:00_drop_session.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-03-14T22:41:00_login_sessions.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-03-19T15:47:00_drop_sessions_2.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-03-21T11:08:00_recreate_custom_domains.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-04-22T14:00:00_phone.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-05-21T10:00:00_forms.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-05-29T00:00:00_add_forms_id_to_hooks.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-05-30T00:00:00_login_completed.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-06-04T12:00:00_add_login_session_id_to_sessions.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-06-04T13:00:00_index_sessions_login_session_id.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-06-04T14:00:00_code_challenge.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-06-05T09:40:00_add_redirect_uri_to_codes.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-06-05T14:30:00_add_nonce_and_state_to_codes.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-07-23T14:30:00_themes.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-08-11T12:00:00_resource_servers_rules_permissions.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-08-13T15:00:00_role_user_permissions.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-08-14T09:30:00_user_roles.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-08-20T12:00:00_keys_connection_and_extend_columns.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-09-10T10:00:00_create_organizations_table.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-09-10T11:00:00_create_user_organizations_table.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-09-11T12:00:00_add_organization_to_user_permissions_and_roles.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-09-16T12:00:00_clients.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-09-16T12:30:00_update_client_foreign_keys.d.ts +20 -0
- package/dist/types/migrate/migrations/2025-09-18T12:00:00_client_grants.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-09-19T10:56:35_drop_applications.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-09-24T12:00:00_phone_number_index.d.ts +11 -0
- package/dist/types/migrate/migrations/2025-09-24T12:30:00_login_sessions_id_index.d.ts +12 -0
- package/dist/types/migrate/migrations/2025-09-24T13:00:00_connections_tenant_index.d.ts +11 -0
- package/dist/types/migrate/migrations/2025-09-24T13:30:00_remove_redundant_user_organizations_tenant_index.d.ts +12 -0
- package/dist/types/migrate/migrations/2025-10-16T12:00:00_tenant_settings.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-10-17T10:00:00_merge_tenant_settings_into_tenants.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-10-27T14:00:00_create_invites_table.d.ts +10 -0
- package/dist/types/migrate/migrations/2025-11-03T10:00:00_add_log_id_to_logs.d.ts +11 -0
- package/dist/types/migrate/migrations/2025-11-28T10:00:00_add_location_info_to_logs.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-12-03T19:45:12_add_password_history.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-12-09T10:00:00_connection_display_name.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-12-12T10:00:00_client_connections.d.ts +4 -0
- package/dist/types/migrate/migrations/2025-12-19T10:00:00_actions.d.ts +3 -0
- package/dist/types/migrate/migrations/2025-12-20T10:00:00_add_is_system_column.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-01-07T10:00:00_connections_composite_key.d.ts +11 -0
- package/dist/types/migrate/migrations/2026-01-10T10:00:00_login_session_state.d.ts +18 -0
- package/dist/types/migrate/migrations/2026-01-14T10:00:00_roles_resource_servers_metadata.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-01-15T10:00:00_session_add_timestamp_columns.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-01-22T10:00:00_session_cleanup_and_ulid.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-01-28T10:00:00_oidc_profile_claims.d.ts +16 -0
- package/dist/types/migrate/migrations/2026-01-28T11:00:00_preferred_username.d.ts +10 -0
- package/dist/types/migrate/migrations/2026-01-28T12:00:00_user_address.d.ts +14 -0
- package/dist/types/migrate/migrations/2026-01-28T13:00:00_authparams_max_age.d.ts +7 -0
- package/dist/types/migrate/migrations/2026-01-28T14:00:00_auth0_conformant.d.ts +3 -0
- package/dist/types/migrate/migrations/2026-01-30T10:00:00_universal_login_templates.d.ts +3 -0
- package/dist/types/migrate/migrations/2026-02-04T10:00:00_custom_text.d.ts +3 -0
- package/dist/types/migrate/migrations/2026-02-04T11:00:00_guardian_mfa.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-02-25T10:00:00_add_template_id_to_hooks.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-02-25T11:00:00_hooks_cleanup.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-02-25T12:00:00_unique_username_provider.d.ts +15 -0
- package/dist/types/migrate/migrations/2026-03-04T10:00:00_add_login_id_to_refresh_tokens.d.ts +3 -0
- package/dist/types/migrate/migrations/2026-03-11T10:00:00_refresh_tokens_replace_session_id_with_login_id.d.ts +3 -0
- package/dist/types/migrate/migrations/2026-03-12T10:00:00_idle_expires_at_ts_indexes.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-03-15T10:00:00_add_connection_to_login_sessions.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-03-21T10:00:00_mfa_enrollments.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-03-22T10:00:00_add_otp_to_codes.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-03-28T10:00:00_rename_mfa_enrollments_to_authentication_methods.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-04-03T10:00:00_create_outbox_events.d.ts +10 -0
- package/dist/types/migrate/migrations/2026-04-03T11:00:00_add_outbox_claim_columns.d.ts +10 -0
- package/dist/types/migrate/migrations/2026-04-08T10:00:00_add_outbox_claim_index.d.ts +10 -0
- package/dist/types/migrate/migrations/2026-04-12T10:00:00_add_code_hooks.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-04-13T10:00:00_create_actions.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-04-14T10:00:00_outbox_dead_letter.d.ts +13 -0
- package/dist/types/migrate/migrations/2026-04-14T11:00:00_user_registration_completed_at.d.ts +19 -0
- package/dist/types/migrate/migrations/2026-04-14T12:00:00_outbox_dead_lettered_tenant_index.d.ts +13 -0
- package/dist/types/migrate/migrations/2026-04-18T10:00:00_add_auth_strategy_to_login_sessions.d.ts +10 -0
- package/dist/types/migrate/migrations/2026-04-20T10:00:00_login_sessions_auth_params.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-04-20T11:00:00_login_sessions_auth_params_backfill.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-04-20T12:00:00_relax_login_sessions_authparams.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-04-21T10:00:00_drop_login_sessions_hoisted_authparams.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-04-22T10:00:00_refresh_tokens_revoked_at.d.ts +9 -0
- package/dist/types/migrate/migrations/2026-04-24T10:00:00_client_registration_tokens.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-04-24T10:00:00_planetscale_redundant_indexes_cleanup.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-04-28T10:00:00_client_user_linking_mode.d.ts +9 -0
- package/dist/types/migrate/migrations/2026-04-29T10:00:00_hooks_metadata.d.ts +13 -0
- package/dist/types/migrate/migrations/2026-05-05T10:00:00_refresh_tokens_rotation.d.ts +22 -0
- package/dist/types/migrate/migrations/2026-05-05T20:00:00_organization_connections.d.ts +10 -0
- package/dist/types/migrate/migrations/2026-05-06T10:00:00_log_streams.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-05-06T11:00:00_tenants_attack_protection.d.ts +10 -0
- package/dist/types/migrate/migrations/2026-05-06T12:00:00_tenants_default_client_id.d.ts +12 -0
- package/dist/types/migrate/migrations/2026-05-09T00:00:00_email_templates.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-05-10T10:00:00_create_action_versions.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-05-11T10:00:00_branding_dark_mode.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-05-12T10:00:00_create_action_executions.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-05-12T11:00:00_client_disable_sign_ups.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-05-13T10:00:00_move_disable_signup_to_connection.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-05-13T11:00:00_actions_is_system_inherit.d.ts +16 -0
- package/dist/types/migrate/migrations/2026-05-13T12:00:00_collapse_auth0_source_into_db_connection.d.ts +4 -0
- package/dist/types/migrate/migrations/2026-05-14T10:00:00_migration_sources.d.ts +4 -0
- package/dist/types/migrate/migrations/index.d.ts +341 -0
- package/dist/types/src/actionExecutions/create.d.ts +4 -0
- package/dist/types/src/actionExecutions/get.d.ts +4 -0
- package/dist/types/src/actionExecutions/index.d.ts +4 -0
- package/dist/types/src/actionVersions/index.d.ts +4 -0
- package/dist/types/src/actions/create.d.ts +4 -0
- package/dist/types/src/actions/get.d.ts +4 -0
- package/dist/types/src/actions/index.d.ts +4 -0
- package/dist/types/src/actions/list.d.ts +5 -0
- package/dist/types/src/actions/remove.d.ts +3 -0
- package/dist/types/src/actions/update.d.ts +4 -0
- package/dist/types/src/analytics/index.d.ts +4 -0
- package/dist/types/src/authenticationMethods/create.d.ts +4 -0
- package/dist/types/src/authenticationMethods/get.d.ts +4 -0
- package/dist/types/src/authenticationMethods/getByCredentialId.d.ts +4 -0
- package/dist/types/src/authenticationMethods/index.d.ts +4 -0
- package/dist/types/src/authenticationMethods/list.d.ts +4 -0
- package/dist/types/src/authenticationMethods/remove.d.ts +3 -0
- package/dist/types/src/authenticationMethods/update.d.ts +4 -0
- package/dist/types/src/branding/get.d.ts +4 -0
- package/dist/types/src/branding/index.d.ts +4 -0
- package/dist/types/src/branding/set.d.ts +4 -0
- package/dist/types/src/cleanup.d.ts +16 -0
- package/dist/types/src/clientConnections/addClientToConnection.d.ts +3 -0
- package/dist/types/src/clientConnections/index.d.ts +4 -0
- package/dist/types/src/clientConnections/listByClient.d.ts +4 -0
- package/dist/types/src/clientConnections/listByConnection.d.ts +3 -0
- package/dist/types/src/clientConnections/removeClientFromConnection.d.ts +3 -0
- package/dist/types/src/clientConnections/updateByClient.d.ts +3 -0
- package/dist/types/src/clientGrants/create.d.ts +4 -0
- package/dist/types/src/clientGrants/get.d.ts +4 -0
- package/dist/types/src/clientGrants/index.d.ts +4 -0
- package/dist/types/src/clientGrants/list.d.ts +4 -0
- package/dist/types/src/clientGrants/remove.d.ts +3 -0
- package/dist/types/src/clientGrants/update.d.ts +4 -0
- package/dist/types/src/clientRegistrationTokens/create.d.ts +4 -0
- package/dist/types/src/clientRegistrationTokens/get.d.ts +4 -0
- package/dist/types/src/clientRegistrationTokens/getByHash.d.ts +4 -0
- package/dist/types/src/clientRegistrationTokens/index.d.ts +4 -0
- package/dist/types/src/clientRegistrationTokens/listByClient.d.ts +4 -0
- package/dist/types/src/clientRegistrationTokens/markUsed.d.ts +3 -0
- package/dist/types/src/clientRegistrationTokens/remove.d.ts +3 -0
- package/dist/types/src/clientRegistrationTokens/revoke.d.ts +3 -0
- package/dist/types/src/clientRegistrationTokens/revokeByClient.d.ts +3 -0
- package/dist/types/src/clientRegistrationTokens/row-mapper.d.ts +17 -0
- package/dist/types/src/clients/create.d.ts +4 -0
- package/dist/types/src/clients/get.d.ts +4 -0
- package/dist/types/src/clients/getByClientId.d.ts +4 -0
- package/dist/types/src/clients/index.d.ts +4 -0
- package/dist/types/src/clients/list.d.ts +8 -0
- package/dist/types/src/clients/remove.d.ts +3 -0
- package/dist/types/src/clients/update.d.ts +4 -0
- package/dist/types/src/codes/consume.d.ts +3 -0
- package/dist/types/src/codes/create.d.ts +20 -0
- package/dist/types/src/codes/get.d.ts +4 -0
- package/dist/types/src/codes/index.d.ts +4 -0
- package/dist/types/src/codes/list.d.ts +4 -0
- package/dist/types/src/codes/remove.d.ts +3 -0
- package/dist/types/src/codes/used.d.ts +3 -0
- package/dist/types/src/connections/create.d.ts +4 -0
- package/dist/types/src/connections/get.d.ts +4 -0
- package/dist/types/src/connections/index.d.ts +4 -0
- package/dist/types/src/connections/list.d.ts +4 -0
- package/dist/types/src/connections/remove.d.ts +3 -0
- package/dist/types/src/connections/transform.d.ts +17 -0
- package/dist/types/src/connections/update.d.ts +4 -0
- package/dist/types/src/customDomains/create.d.ts +4 -0
- package/dist/types/src/customDomains/get.d.ts +18 -0
- package/dist/types/src/customDomains/getByDomain.d.ts +28 -0
- package/dist/types/src/customDomains/index.d.ts +4 -0
- package/dist/types/src/customDomains/list.d.ts +28 -0
- package/dist/types/src/customDomains/remove.d.ts +3 -0
- package/dist/types/src/customDomains/update.d.ts +4 -0
- package/dist/types/src/customText/index.d.ts +4 -0
- package/dist/types/src/db.d.ts +892 -0
- package/dist/types/src/emailProvideres/create.d.ts +4 -0
- package/dist/types/src/emailProvideres/get.d.ts +4 -0
- package/dist/types/src/emailProvideres/index.d.ts +4 -0
- package/dist/types/src/emailProvideres/remove.d.ts +3 -0
- package/dist/types/src/emailProvideres/update.d.ts +4 -0
- package/dist/types/src/emailTemplates/create.d.ts +4 -0
- package/dist/types/src/emailTemplates/get.d.ts +4 -0
- package/dist/types/src/emailTemplates/index.d.ts +4 -0
- package/dist/types/src/emailTemplates/list.d.ts +4 -0
- package/dist/types/src/emailTemplates/remove.d.ts +4 -0
- package/dist/types/src/emailTemplates/row.d.ts +4 -0
- package/dist/types/src/emailTemplates/update.d.ts +4 -0
- package/dist/types/src/flows/create.d.ts +4 -0
- package/dist/types/src/flows/get.d.ts +4 -0
- package/dist/types/src/flows/index.d.ts +4 -0
- package/dist/types/src/flows/list.d.ts +4 -0
- package/dist/types/src/flows/remove.d.ts +3 -0
- package/dist/types/src/flows/update.d.ts +4 -0
- package/dist/types/src/forms/create.d.ts +4 -0
- package/dist/types/src/forms/get.d.ts +4 -0
- package/dist/types/src/forms/index.d.ts +4 -0
- package/dist/types/src/forms/list.d.ts +5 -0
- package/dist/types/src/forms/remove.d.ts +3 -0
- package/dist/types/src/forms/update.d.ts +4 -0
- package/dist/types/src/helpers/filter.d.ts +4 -0
- package/dist/types/src/helpers/parse.d.ts +26 -0
- package/dist/types/src/helpers/remove-nulls.d.ts +1 -0
- package/dist/types/src/helpers/stringify.d.ts +40 -0
- package/dist/types/src/hook-code/create.d.ts +4 -0
- package/dist/types/src/hook-code/get.d.ts +4 -0
- package/dist/types/src/hook-code/index.d.ts +4 -0
- package/dist/types/src/hook-code/remove.d.ts +3 -0
- package/dist/types/src/hook-code/update.d.ts +4 -0
- package/dist/types/src/hooks/create.d.ts +4 -0
- package/dist/types/src/hooks/get.d.ts +4 -0
- package/dist/types/src/hooks/index.d.ts +4 -0
- package/dist/types/src/hooks/list.d.ts +4 -0
- package/dist/types/src/hooks/remove.d.ts +3 -0
- package/dist/types/src/hooks/update.d.ts +4 -0
- package/dist/types/src/index.d.ts +8 -0
- package/dist/types/src/invites/create.d.ts +4 -0
- package/dist/types/src/invites/get.d.ts +4 -0
- package/dist/types/src/invites/index.d.ts +4 -0
- package/dist/types/src/invites/list.d.ts +4 -0
- package/dist/types/src/invites/remove.d.ts +3 -0
- package/dist/types/src/invites/update.d.ts +4 -0
- package/dist/types/src/keys/create.d.ts +4 -0
- package/dist/types/src/keys/index.d.ts +4 -0
- package/dist/types/src/keys/list.d.ts +8 -0
- package/dist/types/src/keys/update.d.ts +4 -0
- package/dist/types/src/log-streams/index.d.ts +4 -0
- package/dist/types/src/loginSessions/create.d.ts +58 -0
- package/dist/types/src/loginSessions/get.d.ts +4 -0
- package/dist/types/src/loginSessions/index.d.ts +4 -0
- package/dist/types/src/loginSessions/remove.d.ts +3 -0
- package/dist/types/src/loginSessions/update.d.ts +4 -0
- package/dist/types/src/logs/create.d.ts +4 -0
- package/dist/types/src/logs/get.d.ts +4 -0
- package/dist/types/src/logs/index.d.ts +4 -0
- package/dist/types/src/logs/list.d.ts +44 -0
- package/dist/types/src/logs/logs.d.ts +3 -0
- package/dist/types/src/migrationSources/index.d.ts +4 -0
- package/dist/types/src/organization-connections/index.d.ts +4 -0
- package/dist/types/src/organizations/create.d.ts +4 -0
- package/dist/types/src/organizations/get.d.ts +4 -0
- package/dist/types/src/organizations/index.d.ts +4 -0
- package/dist/types/src/organizations/list.d.ts +4 -0
- package/dist/types/src/organizations/remove.d.ts +3 -0
- package/dist/types/src/organizations/update.d.ts +4 -0
- package/dist/types/src/outbox/claimEvents.d.ts +3 -0
- package/dist/types/src/outbox/cleanup.d.ts +3 -0
- package/dist/types/src/outbox/create.d.ts +4 -0
- package/dist/types/src/outbox/deadLetter.d.ts +8 -0
- package/dist/types/src/outbox/getByIds.d.ts +4 -0
- package/dist/types/src/outbox/getUnprocessed.d.ts +4 -0
- package/dist/types/src/outbox/index.d.ts +4 -0
- package/dist/types/src/outbox/listFailed.d.ts +4 -0
- package/dist/types/src/outbox/markProcessed.d.ts +3 -0
- package/dist/types/src/outbox/markRetry.d.ts +3 -0
- package/dist/types/src/outbox/replay.d.ts +12 -0
- package/dist/types/src/passwords/Password.d.ts +7 -0
- package/dist/types/src/passwords/create.d.ts +12 -0
- package/dist/types/src/passwords/get.d.ts +4 -0
- package/dist/types/src/passwords/index.d.ts +4 -0
- package/dist/types/src/passwords/list.d.ts +4 -0
- package/dist/types/src/passwords/update.d.ts +4 -0
- package/dist/types/src/promptSettings/get.d.ts +4 -0
- package/dist/types/src/promptSettings/index.d.ts +4 -0
- package/dist/types/src/promptSettings/set.d.ts +4 -0
- package/dist/types/src/refreshTokens/create.d.ts +4 -0
- package/dist/types/src/refreshTokens/get.d.ts +4 -0
- package/dist/types/src/refreshTokens/getByLookup.d.ts +4 -0
- package/dist/types/src/refreshTokens/index.d.ts +4 -0
- package/dist/types/src/refreshTokens/list.d.ts +4 -0
- package/dist/types/src/refreshTokens/remove.d.ts +3 -0
- package/dist/types/src/refreshTokens/revokeByLoginSession.d.ts +3 -0
- package/dist/types/src/refreshTokens/revokeFamily.d.ts +3 -0
- package/dist/types/src/refreshTokens/update.d.ts +4 -0
- package/dist/types/src/resourceServers/create.d.ts +4 -0
- package/dist/types/src/resourceServers/get.d.ts +4 -0
- package/dist/types/src/resourceServers/index.d.ts +4 -0
- package/dist/types/src/resourceServers/list.d.ts +4 -0
- package/dist/types/src/resourceServers/remove.d.ts +3 -0
- package/dist/types/src/resourceServers/update.d.ts +4 -0
- package/dist/types/src/role-permissions/assign.d.ts +4 -0
- package/dist/types/src/role-permissions/index.d.ts +14 -0
- package/dist/types/src/role-permissions/list.d.ts +13 -0
- package/dist/types/src/role-permissions/remove.d.ts +4 -0
- package/dist/types/src/roles/create.d.ts +6 -0
- package/dist/types/src/roles/get.d.ts +4 -0
- package/dist/types/src/roles/index.d.ts +4 -0
- package/dist/types/src/roles/list.d.ts +4 -0
- package/dist/types/src/roles/remove.d.ts +3 -0
- package/dist/types/src/roles/update.d.ts +4 -0
- package/dist/types/src/sessions/create.d.ts +4 -0
- package/dist/types/src/sessions/get.d.ts +4 -0
- package/dist/types/src/sessions/index.d.ts +4 -0
- package/dist/types/src/sessions/list.d.ts +4 -0
- package/dist/types/src/sessions/remove.d.ts +3 -0
- package/dist/types/src/sessions/update.d.ts +4 -0
- package/dist/types/src/stats/index.d.ts +4 -0
- package/dist/types/src/tenants/create.d.ts +4 -0
- package/dist/types/src/tenants/get.d.ts +4 -0
- package/dist/types/src/tenants/index.d.ts +4 -0
- package/dist/types/src/tenants/list.d.ts +352 -0
- package/dist/types/src/tenants/remove.d.ts +3 -0
- package/dist/types/src/tenants/update.d.ts +4 -0
- package/dist/types/src/tenants/utils.d.ts +3 -0
- package/dist/types/src/themes/create.d.ts +4 -0
- package/dist/types/src/themes/get.d.ts +4 -0
- package/dist/types/src/themes/index.d.ts +4 -0
- package/dist/types/src/themes/remove.d.ts +3 -0
- package/dist/types/src/themes/update.d.ts +4 -0
- package/dist/types/src/universalLoginTemplates/delete.d.ts +3 -0
- package/dist/types/src/universalLoginTemplates/get.d.ts +4 -0
- package/dist/types/src/universalLoginTemplates/index.d.ts +4 -0
- package/dist/types/src/universalLoginTemplates/set.d.ts +4 -0
- package/dist/types/src/user-organizations/create.d.ts +4 -0
- package/dist/types/src/user-organizations/get.d.ts +4 -0
- package/dist/types/src/user-organizations/index.d.ts +4 -0
- package/dist/types/src/user-organizations/list.d.ts +6 -0
- package/dist/types/src/user-organizations/listUserOrganizations.d.ts +6 -0
- package/dist/types/src/user-organizations/remove.d.ts +3 -0
- package/dist/types/src/user-organizations/update.d.ts +4 -0
- package/dist/types/src/user-permissions/adapter.d.ts +4 -0
- package/dist/types/src/user-permissions/create.d.ts +4 -0
- package/dist/types/src/user-permissions/index.d.ts +10 -0
- package/dist/types/src/user-permissions/list.d.ts +5 -0
- package/dist/types/src/user-permissions/remove.d.ts +8 -0
- package/dist/types/src/user-roles/adapter.d.ts +4 -0
- package/dist/types/src/user-roles/create.d.ts +3 -0
- package/dist/types/src/user-roles/index.d.ts +7 -0
- package/dist/types/src/user-roles/list.d.ts +4 -0
- package/dist/types/src/user-roles/remove.d.ts +3 -0
- package/dist/types/src/users/create.d.ts +4 -0
- package/dist/types/src/users/get.d.ts +4 -0
- package/dist/types/src/users/index.d.ts +4 -0
- package/dist/types/src/users/list.d.ts +4 -0
- package/dist/types/src/users/remove.d.ts +3 -0
- package/dist/types/src/users/unlink.d.ts +3 -0
- package/dist/types/src/users/update.d.ts +4 -0
- package/dist/types/src/users/user-to-identity.d.ts +2 -0
- package/dist/types/src/utils/dateConversion.d.ts +46 -0
- package/dist/types/src/utils/entity-id.d.ts +14 -0
- package/dist/types/src/utils/flatten.d.ts +8 -0
- package/dist/types/src/utils/getCountAsInt.d.ts +1 -0
- package/dist/types/src/utils/ulid.d.ts +1 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -0
- package/package.json +11 -14
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Create organizations table
|
|
5
|
+
*/
|
|
6
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Down migration: Drop organizations table
|
|
9
|
+
*/
|
|
10
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
package/dist/types/migrate/migrations/2025-09-10T11:00:00_create_user_organizations_table.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Create user_organizations table
|
|
5
|
+
*/
|
|
6
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Down migration: Drop user_organizations table
|
|
9
|
+
*/
|
|
10
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Updates foreign key constraints to reference the new clients table
|
|
5
|
+
* instead of the applications table.
|
|
6
|
+
* Supports both MySQL/PlanetScale and SQLite databases.
|
|
7
|
+
*
|
|
8
|
+
* Also takes the opportunity to:
|
|
9
|
+
* - Add composite primary keys (tenant_id, id) to improve multi-tenant performance
|
|
10
|
+
* - Upgrade problematic varchar fields to text type for better length handling:
|
|
11
|
+
* - authParams_state, authParams_redirect_uri, authorization_url in login_sessions
|
|
12
|
+
* - resource_servers, device in refresh_tokens
|
|
13
|
+
* - useragent in login_sessions
|
|
14
|
+
*/
|
|
15
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Down migration: Reverts foreign key constraints back to reference applications table.
|
|
18
|
+
* NOTE: This is a destructive operation and may cause data loss.
|
|
19
|
+
*/
|
|
20
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Add optimized index for phone number queries
|
|
5
|
+
* This index optimizes queries that filter by tenant_id, phone_number, and provider
|
|
6
|
+
*/
|
|
7
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Down migration: Drop the phone number index
|
|
10
|
+
*/
|
|
11
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Add index for login_sessions.id lookups
|
|
5
|
+
* This optimizes queries that filter by id alone, since the composite primary key
|
|
6
|
+
* (tenant_id, id) doesn't efficiently support id-only queries
|
|
7
|
+
*/
|
|
8
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Down migration: Drop the login_sessions id index
|
|
11
|
+
*/
|
|
12
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Add tenant_id index for connections table
|
|
5
|
+
* This optimizes queries that filter connections by tenant_id
|
|
6
|
+
*/
|
|
7
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Down migration: Drop the connections tenant_id index
|
|
10
|
+
*/
|
|
11
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Remove redundant tenant_id index from user_organizations
|
|
5
|
+
* The unique constraint (tenant_id, user_id, organization_id) already provides
|
|
6
|
+
* efficient indexing for tenant_id queries, making the separate tenant_id index redundant
|
|
7
|
+
*/
|
|
8
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Down migration: Recreate the tenant_id index
|
|
11
|
+
*/
|
|
12
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Create invites table
|
|
5
|
+
*/
|
|
6
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Down migration: Drop invites table
|
|
9
|
+
*/
|
|
10
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Change logs table primary key from id to log_id
|
|
5
|
+
* Note: This clears all existing logs data due to table recreation
|
|
6
|
+
*/
|
|
7
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Down migration: Revert to id as primary key
|
|
10
|
+
*/
|
|
11
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Change connections table to use composite primary key (tenant_id, id)
|
|
5
|
+
* This allows the same connection id to exist across different tenants.
|
|
6
|
+
*/
|
|
7
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Down migration: Restore connections table with single id primary key
|
|
10
|
+
*/
|
|
11
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Migration: Replace login_completed with state machine columns
|
|
5
|
+
*
|
|
6
|
+
* This migration:
|
|
7
|
+
* 1. Adds state machine columns (state, state_data, failure_reason)
|
|
8
|
+
* 2. Backfills state from login_completed
|
|
9
|
+
* 3. Drops the login_completed column
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Up migration: Replace login_completed with state columns
|
|
13
|
+
*/
|
|
14
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Down migration: Restore login_completed from state
|
|
17
|
+
*/
|
|
18
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Database } from "../../src/db";
|
|
2
|
+
import { Kysely } from "kysely";
|
|
3
|
+
/**
|
|
4
|
+
* Add missing OIDC profile claim columns to users table.
|
|
5
|
+
* These are required for full OIDC Core 5.1 compliance:
|
|
6
|
+
* - middle_name
|
|
7
|
+
* - profile (URL of profile page)
|
|
8
|
+
* - website
|
|
9
|
+
* - gender
|
|
10
|
+
* - birthdate (ISO 8601:2004 YYYY-MM-DD format)
|
|
11
|
+
* - zoneinfo (e.g., "Europe/Paris")
|
|
12
|
+
*
|
|
13
|
+
* Also converts user_metadata from varchar(4096) to text to free up row space.
|
|
14
|
+
*/
|
|
15
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
16
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Database } from "../../src/db";
|
|
2
|
+
import { Kysely } from "kysely";
|
|
3
|
+
/**
|
|
4
|
+
* Add preferred_username column to users table.
|
|
5
|
+
* Per OIDC Core 5.1, preferred_username is the shorthand name
|
|
6
|
+
* by which the End-User wishes to be referred to at the RP.
|
|
7
|
+
* This is different from username which is used for authentication.
|
|
8
|
+
*/
|
|
9
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
10
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Database } from "../../src/db";
|
|
2
|
+
import { Kysely } from "kysely";
|
|
3
|
+
/**
|
|
4
|
+
* Add address column to users table for OIDC address scope support.
|
|
5
|
+
* The address claim is a JSON object as per OIDC Core 5.1.1 specification:
|
|
6
|
+
* - formatted: Full mailing address
|
|
7
|
+
* - street_address: Full street address
|
|
8
|
+
* - locality: City or locality
|
|
9
|
+
* - region: State, province, prefecture or region
|
|
10
|
+
* - postal_code: Zip code or postal code
|
|
11
|
+
* - country: Country name
|
|
12
|
+
*/
|
|
13
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
14
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
/**
|
|
3
|
+
* Add authParams_max_age and authParams_acr_values columns to login_sessions table
|
|
4
|
+
* This is needed for OIDC Core 3.1.2.1 max_age and acr_values parameter support
|
|
5
|
+
*/
|
|
6
|
+
export declare function up(db: Kysely<any>): Promise<void>;
|
|
7
|
+
export declare function down(db: Kysely<any>): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Add unique index on (username, provider, tenant_id)
|
|
5
|
+
* Prevents two users from having the same username within the same tenant and provider.
|
|
6
|
+
*
|
|
7
|
+
* Before creating the index we remove legacy duplicate rows, keeping the
|
|
8
|
+
* oldest user (smallest created_at, tie-broken by user_id) for each
|
|
9
|
+
* (username, provider, tenant_id) group.
|
|
10
|
+
*/
|
|
11
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Down migration: Drop the unique username index
|
|
14
|
+
*/
|
|
15
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Create outbox_events table for transactional audit logging
|
|
5
|
+
*/
|
|
6
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Down migration: Drop outbox_events table
|
|
9
|
+
*/
|
|
10
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Add claim/lease columns to outbox_events for concurrent worker safety
|
|
5
|
+
*/
|
|
6
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Down migration: Remove claim/lease columns from outbox_events
|
|
9
|
+
*/
|
|
10
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Add composite index for outbox drain queries (cron relay)
|
|
5
|
+
*/
|
|
6
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Down migration: Drop the outbox claim index
|
|
9
|
+
*/
|
|
10
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Up migration: Add dead-letter columns to outbox_events.
|
|
5
|
+
*
|
|
6
|
+
* When an outbox event exhausts its retry budget, the relay marks it as
|
|
7
|
+
* dead-lettered (processed_at is also set so it is excluded from relay
|
|
8
|
+
* queries). The `final_error` column preserves the last failure for admin
|
|
9
|
+
* investigation and the `dead_lettered_at` column lets the failed-events
|
|
10
|
+
* management endpoints filter and order by dead-letter time.
|
|
11
|
+
*/
|
|
12
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
13
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Add `registration_completed_at` column to `users`, then backfill it for
|
|
5
|
+
* every row that already exists.
|
|
6
|
+
*
|
|
7
|
+
* `postUserLoginHook` re-enqueues a `hook.post-user-registration` event on
|
|
8
|
+
* every login where this column is null. Without a backfill, every legacy
|
|
9
|
+
* user would fire their post-registration webhooks and action code again on
|
|
10
|
+
* their next login — customers would see duplicate "new user" events for
|
|
11
|
+
* accounts that registered months or years earlier.
|
|
12
|
+
*
|
|
13
|
+
* Backfill to `created_at` so the column has a sensible timestamp that
|
|
14
|
+
* doesn't cluster the entire userbase at migration time. That timestamp is
|
|
15
|
+
* never exposed to consumers (only its null/non-null status is load-bearing
|
|
16
|
+
* via `postUserLoginHook`).
|
|
17
|
+
*/
|
|
18
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
19
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
package/dist/types/migrate/migrations/2026-04-14T12:00:00_outbox_dead_lettered_tenant_index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Composite index for the failed-events management endpoints.
|
|
5
|
+
*
|
|
6
|
+
* `listFailed` filters `tenant_id = ? AND dead_lettered_at IS NOT NULL` and
|
|
7
|
+
* orders by `dead_lettered_at DESC`. Leading `tenant_id` (the equality
|
|
8
|
+
* predicate) lets the optimizer seek directly to a tenant's slice; the
|
|
9
|
+
* trailing `dead_lettered_at` then serves both the `IS NOT NULL` filter and
|
|
10
|
+
* the ORDER BY without a separate sort step.
|
|
11
|
+
*/
|
|
12
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
13
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
package/dist/types/migrate/migrations/2026-04-18T10:00:00_add_auth_strategy_to_login_sessions.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Adds fields needed by the `/authorize/resume` endpoint so that terminal
|
|
5
|
+
* sub-flows (social callback, UL password, OTP, etc.) can persist the
|
|
6
|
+
* authentication strategy/connection metadata onto the login session and
|
|
7
|
+
* let a single endpoint finalize the response on the correct domain.
|
|
8
|
+
*/
|
|
9
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
10
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Kysely } from "kysely";
|
|
2
|
+
import { Database } from "../../src/db";
|
|
3
|
+
/**
|
|
4
|
+
* Adds `revoked_at_ts` to `refresh_tokens` so logout can soft-revoke tokens
|
|
5
|
+
* by login session (mirroring the pattern on `sessions`) instead of paging
|
|
6
|
+
* a list and hard-deleting one row at a time.
|
|
7
|
+
*/
|
|
8
|
+
export declare function up(db: Kysely<Database>): Promise<void>;
|
|
9
|
+
export declare function down(db: Kysely<Database>): Promise<void>;
|