@rebasepro/cms-types 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -76,6 +76,18 @@ export type AuthController<USER extends User = User, ExtraData = unknown> = {
|
|
|
76
76
|
*/
|
|
77
77
|
capabilities?: AuthCapabilities;
|
|
78
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* A second factor an account can finish signing in with, as a sign-in refused
|
|
81
|
+
* with `MFA_REQUIRED` lists it in `details.factors`.
|
|
82
|
+
* @group Hooks and utilities
|
|
83
|
+
*/
|
|
84
|
+
export interface MfaFactorSummary {
|
|
85
|
+
id: string;
|
|
86
|
+
/** `"totp"` for an authenticator app. */
|
|
87
|
+
factorType: string;
|
|
88
|
+
/** The name the user gave the factor when enrolling it, if any. */
|
|
89
|
+
friendlyName?: string;
|
|
90
|
+
}
|
|
79
91
|
/**
|
|
80
92
|
* Extended auth controller with common optional auth methods.
|
|
81
93
|
* Backend implementations (Rebase backend, Firebase, etc.)
|
|
@@ -104,8 +116,21 @@ export interface AuthControllerExtended<USER extends User = User, ExtraData = un
|
|
|
104
116
|
forgotPassword?(email: string): Promise<void>;
|
|
105
117
|
/** Reset password using a token */
|
|
106
118
|
resetPassword?(token: string, password: string): Promise<void>;
|
|
119
|
+
/** Confirm an email address using the token from a verification email */
|
|
120
|
+
verifyEmail?(token: string): Promise<void>;
|
|
107
121
|
/** Change password for the authenticated user */
|
|
108
122
|
changePassword?(oldPassword: string, newPassword: string): Promise<void>;
|
|
109
123
|
/** Update user profile */
|
|
110
124
|
updateProfile?(displayName?: string, photoURL?: string): Promise<USER>;
|
|
125
|
+
/**
|
|
126
|
+
* Open a challenge against one of the factors a sign-in refused with
|
|
127
|
+
* `MFA_REQUIRED` listed, using that refusal's `details.mfaToken`. Resolves
|
|
128
|
+
* to the challenge id `verifyMfaChallenge` answers.
|
|
129
|
+
*/
|
|
130
|
+
startMfaChallenge?(mfaToken: string, factorId: string): Promise<string>;
|
|
131
|
+
/**
|
|
132
|
+
* Answer a challenge with a code from the authenticator app or a recovery
|
|
133
|
+
* code. On success the user is signed in, as by any other sign-in.
|
|
134
|
+
*/
|
|
135
|
+
verifyMfaChallenge?(mfaToken: string, challengeId: string, code: string): Promise<void>;
|
|
111
136
|
}
|
package/dist/types/plugins.d.ts
CHANGED
|
@@ -188,18 +188,19 @@ export interface PluginHooks {
|
|
|
188
188
|
*/
|
|
189
189
|
export interface PluginLifecycle {
|
|
190
190
|
/**
|
|
191
|
-
* Called once when
|
|
192
|
-
* Can return a Promise for async initialization.
|
|
191
|
+
* Called once, when auth first becomes ready: a user is signed in, or
|
|
192
|
+
* sign-in was skipped. Can return a Promise for async initialization.
|
|
193
193
|
*/
|
|
194
194
|
onMount?: (context: RebaseContext) => void | Promise<void>;
|
|
195
195
|
/**
|
|
196
|
-
* Called when
|
|
197
|
-
* Use this for cleanup (subscriptions,
|
|
196
|
+
* Called when `<Rebase>` unmounts. Not on sign-out: the plugin stays
|
|
197
|
+
* mounted across a change of user. Use this for cleanup (subscriptions,
|
|
198
|
+
* timers, etc.).
|
|
198
199
|
*/
|
|
199
200
|
onUnmount?: () => void;
|
|
200
201
|
/**
|
|
201
|
-
* Called
|
|
202
|
-
*
|
|
202
|
+
* Called on every change of user after `onMount`: the new user on a
|
|
203
|
+
* sign-in, `null` on sign-out.
|
|
203
204
|
*/
|
|
204
205
|
onAuthStateChange?: (user: User | null) => void;
|
|
205
206
|
/**
|
|
@@ -640,6 +640,30 @@ export interface RebaseTranslations {
|
|
|
640
640
|
auth_have_account: string;
|
|
641
641
|
auth_sign_in: string;
|
|
642
642
|
auth_sign_up: string;
|
|
643
|
+
auth_new_password_title: string;
|
|
644
|
+
auth_new_password_subtitle: string;
|
|
645
|
+
auth_password_requirements: string;
|
|
646
|
+
auth_set_password: string;
|
|
647
|
+
auth_password_changed_title: string;
|
|
648
|
+
auth_password_changed_body: string;
|
|
649
|
+
auth_continue_to_sign_in: string;
|
|
650
|
+
auth_link_invalid_or_expired: string;
|
|
651
|
+
auth_password_reset_unavailable: string;
|
|
652
|
+
auth_verifying_email: string;
|
|
653
|
+
auth_email_verified_title: string;
|
|
654
|
+
auth_email_verified_body: string;
|
|
655
|
+
auth_email_verification_failed_title: string;
|
|
656
|
+
auth_email_verification_unavailable: string;
|
|
657
|
+
auth_mfa_title?: string;
|
|
658
|
+
auth_mfa_subtitle?: string;
|
|
659
|
+
auth_mfa_factor_label?: string;
|
|
660
|
+
auth_mfa_factor_totp?: string;
|
|
661
|
+
auth_mfa_code_label?: string;
|
|
662
|
+
auth_mfa_verify?: string;
|
|
663
|
+
auth_mfa_code_invalid?: string;
|
|
664
|
+
auth_mfa_challenge_exhausted?: string;
|
|
665
|
+
auth_mfa_expired?: string;
|
|
666
|
+
auth_mfa_sign_in_again?: string;
|
|
643
667
|
auto_setup_collections_button: string;
|
|
644
668
|
auto_setup_collections_title: string;
|
|
645
669
|
auto_setup_collections_desc: string;
|
|
@@ -802,10 +826,12 @@ export interface RebaseTranslations {
|
|
|
802
826
|
studio_sql_cannot_edit_missing_query?: string;
|
|
803
827
|
studio_sql_cannot_resolve_table?: string;
|
|
804
828
|
studio_sql_missing_pk?: string;
|
|
829
|
+
studio_sql_cannot_edit_other_connection?: string;
|
|
805
830
|
studio_sql_update_failed?: string;
|
|
806
831
|
studio_sql_execution_not_supported?: string;
|
|
807
832
|
studio_sql_error_executing?: string;
|
|
808
833
|
studio_sql_error_explaining?: string;
|
|
834
|
+
studio_sql_explain_single_statement?: string;
|
|
809
835
|
studio_sql_save_first_to_favorite?: string;
|
|
810
836
|
studio_sql_collections_label?: string;
|
|
811
837
|
studio_sql_admin_collections_tooltip?: string;
|
|
@@ -854,6 +880,9 @@ export interface RebaseTranslations {
|
|
|
854
880
|
studio_rls_enable_force_rls?: string;
|
|
855
881
|
studio_rls_disable_force_rls?: string;
|
|
856
882
|
studio_rls_edit?: string;
|
|
883
|
+
studio_rls_edit_generated?: string;
|
|
884
|
+
studio_rls_edit_not_declared?: string;
|
|
885
|
+
studio_rls_edit_several_operations?: string;
|
|
857
886
|
studio_rls_delete?: string;
|
|
858
887
|
studio_rls_confirm_delete_title?: string;
|
|
859
888
|
studio_rls_confirm_delete_body?: string;
|
|
@@ -1055,6 +1084,8 @@ export interface RebaseTranslations {
|
|
|
1055
1084
|
studio_cron_denied_title?: string;
|
|
1056
1085
|
studio_cron_denied_hint?: string;
|
|
1057
1086
|
studio_cron_read_failed?: string;
|
|
1087
|
+
studio_cron_logs_read_failed?: string;
|
|
1088
|
+
studio_cron_logs_denied_title?: string;
|
|
1058
1089
|
studio_api_keys_denied_title?: string;
|
|
1059
1090
|
studio_api_keys_denied_hint?: string;
|
|
1060
1091
|
studio_api_keys_read_failed?: string;
|
|
@@ -1073,6 +1104,7 @@ export interface RebaseTranslations {
|
|
|
1073
1104
|
studio_api_keys_status_active?: string;
|
|
1074
1105
|
studio_api_keys_status_expired?: string;
|
|
1075
1106
|
studio_api_keys_status_revoked?: string;
|
|
1107
|
+
studio_api_keys_inactive_heading?: string;
|
|
1076
1108
|
studio_api_keys_stat_status?: string;
|
|
1077
1109
|
studio_api_keys_stat_last_used?: string;
|
|
1078
1110
|
studio_api_keys_stat_expires?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebasepro/cms-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Type definitions for the Rebase admin panel — CMS and Studio — the React-flavoured half of the type surface",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rebase",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"node": ">=22.22.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@rebasepro/types": "0.
|
|
35
|
+
"@rebasepro/types": "0.23.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "^30.0.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@types/react-dom": "^19.2.3",
|
|
43
43
|
"@types/react-measure": "^2.0.12",
|
|
44
44
|
"@vitejs/plugin-react": "^6.0.4",
|
|
45
|
-
"hono": "^4.13.
|
|
45
|
+
"hono": "^4.13.5",
|
|
46
46
|
"jest": "^30.4.2",
|
|
47
47
|
"ts-jest": "^29.4.12",
|
|
48
48
|
"typescript": "^6.0.3",
|