@rebasepro/studio 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/{ApiExplorer-BmcdhAX0.js → ApiExplorer-CGHEF1uL.js} +4 -4
  2. package/dist/ApiExplorer-CGHEF1uL.js.map +1 -0
  3. package/dist/{CronJobsView-CNfz0etw.js → CronJobsView-3PM_qR8v.js} +20 -3
  4. package/dist/CronJobsView-3PM_qR8v.js.map +1 -0
  5. package/dist/{JSEditor-Ch8z8lJ4.js → JSEditor-BCSoElPg.js} +26 -36
  6. package/dist/JSEditor-BCSoElPg.js.map +1 -0
  7. package/dist/LogsExplorer-_4sZadKn.js +162 -0
  8. package/dist/LogsExplorer-_4sZadKn.js.map +1 -0
  9. package/dist/{SQLEditor-BELYJQRP.js → SQLEditor-BC0IOUQu.js} +4 -4
  10. package/dist/SQLEditor-BC0IOUQu.js.map +1 -0
  11. package/dist/common/src/collections/default-collections.d.ts +9 -0
  12. package/dist/common/src/collections/index.d.ts +1 -0
  13. package/dist/common/src/util/permissions.d.ts +1 -0
  14. package/dist/core/src/components/LoginView/LoginView.d.ts +25 -1
  15. package/dist/core/src/components/common/types.d.ts +10 -7
  16. package/dist/core/src/components/common/useDebouncedData.d.ts +1 -1
  17. package/dist/core/src/core/RebaseProps.d.ts +13 -2
  18. package/dist/core/src/core/RebaseRouter.d.ts +1 -1
  19. package/dist/core/src/hooks/data/useCollectionFetch.d.ts +12 -1
  20. package/dist/core/src/hooks/index.d.ts +0 -1
  21. package/dist/core/src/util/entity_cache.d.ts +0 -5
  22. package/dist/core/src/util/index.d.ts +0 -2
  23. package/dist/core/src/util/useStorageUploadController.d.ts +2 -2
  24. package/dist/formex/src/utils.d.ts +2 -2
  25. package/dist/index.es.js +23 -5
  26. package/dist/index.es.js.map +1 -1
  27. package/dist/index.umd.js +228 -44
  28. package/dist/index.umd.js.map +1 -1
  29. package/dist/studio/src/components/ApiExplorer/parseSpec.d.ts +1 -1
  30. package/dist/studio/src/components/ApiExplorer/types.d.ts +3 -3
  31. package/dist/studio/src/components/LogsExplorer/LogsExplorer.d.ts +1 -0
  32. package/dist/types/src/controllers/auth.d.ts +4 -26
  33. package/dist/types/src/controllers/client.d.ts +25 -43
  34. package/dist/types/src/controllers/collection_registry.d.ts +1 -1
  35. package/dist/types/src/controllers/data.d.ts +4 -0
  36. package/dist/types/src/controllers/data_driver.d.ts +23 -0
  37. package/dist/types/src/controllers/registry.d.ts +5 -4
  38. package/dist/types/src/rebase_context.d.ts +1 -1
  39. package/dist/types/src/types/auth_adapter.d.ts +5 -60
  40. package/dist/types/src/types/backend.d.ts +2 -2
  41. package/dist/types/src/types/backend_hooks.d.ts +2 -17
  42. package/dist/types/src/types/collections.d.ts +0 -4
  43. package/dist/types/src/types/component_ref.d.ts +1 -1
  44. package/dist/types/src/types/cron.d.ts +1 -1
  45. package/dist/types/src/types/entity_views.d.ts +1 -0
  46. package/dist/types/src/types/export_import.d.ts +1 -1
  47. package/dist/types/src/types/formex.d.ts +2 -2
  48. package/dist/types/src/types/properties.d.ts +9 -7
  49. package/dist/types/src/types/translations.d.ts +28 -12
  50. package/dist/types/src/types/user_management_delegate.d.ts +22 -57
  51. package/dist/types/src/users/index.d.ts +0 -1
  52. package/dist/types/src/users/user.d.ts +0 -1
  53. package/dist/ui/src/components/Button.d.ts +2 -2
  54. package/dist/ui/src/components/ErrorBoundary.d.ts +25 -3
  55. package/dist/ui/src/components/VirtualTable/VirtualTable.d.ts +1 -1
  56. package/dist/ui/src/components/VirtualTable/VirtualTableCell.d.ts +6 -6
  57. package/dist/ui/src/components/VirtualTable/VirtualTableHeader.d.ts +8 -8
  58. package/dist/ui/src/components/VirtualTable/VirtualTableHeaderRow.d.ts +1 -1
  59. package/dist/ui/src/components/VirtualTable/VirtualTableProps.d.ts +11 -11
  60. package/dist/ui/src/components/VirtualTable/VirtualTableRow.d.ts +1 -1
  61. package/dist/ui/src/components/VirtualTable/types.d.ts +9 -9
  62. package/dist/ui/src/hooks/useDebounceCallback.d.ts +1 -1
  63. package/dist/ui/src/util/debounce.d.ts +1 -1
  64. package/package.json +8 -8
  65. package/src/components/ApiExplorer/ApiExplorer.tsx +2 -2
  66. package/src/components/ApiExplorer/EndpointDetail.tsx +1 -1
  67. package/src/components/ApiExplorer/TryItPanel.tsx +5 -5
  68. package/src/components/ApiExplorer/parseSpec.ts +3 -3
  69. package/src/components/ApiExplorer/types.ts +3 -3
  70. package/src/components/CronJobs/CronJobsView.tsx +27 -2
  71. package/src/components/JSEditor/JSEditor.tsx +21 -18
  72. package/src/components/JSEditor/JSMonacoEditor.tsx +6 -19
  73. package/src/components/LogsExplorer/LogsExplorer.tsx +224 -0
  74. package/src/components/RebaseStudio.tsx +10 -1
  75. package/src/components/SQLEditor/SQLEditor.tsx +28 -7
  76. package/src/components/StudioHomePage.tsx +2 -1
  77. package/src/utils/parseSpec.test.ts +274 -0
  78. package/src/utils/pgColumnToProperty.test.ts +1 -0
  79. package/src/utils/pgColumnToProperty.ts +35 -4
  80. package/dist/ApiExplorer-BmcdhAX0.js.map +0 -1
  81. package/dist/CronJobsView-CNfz0etw.js.map +0 -1
  82. package/dist/JSEditor-Ch8z8lJ4.js.map +0 -1
  83. package/dist/SQLEditor-BELYJQRP.js.map +0 -1
  84. package/dist/core/src/hooks/useValidateAuthenticator.d.ts +0 -21
  85. package/dist/core/src/util/icon_synonyms.d.ts +0 -1
  86. package/dist/core/src/util/useTraceUpdate.d.ts +0 -2
  87. package/dist/types/src/users/roles.d.ts +0 -22
@@ -13,4 +13,4 @@ export declare function resolveRefName(ref: string): string;
13
13
  /**
14
14
  * Resolve a $ref to its actual schema from the spec.
15
15
  */
16
- export declare function resolveRef(spec: OpenApiSpec, ref: string): any;
16
+ export declare function resolveRef(spec: OpenApiSpec, ref: string): unknown;
@@ -13,7 +13,7 @@ export interface OpenApiSpec {
13
13
  paths: Record<string, Record<string, OpenApiOperation>>;
14
14
  components?: {
15
15
  schemas?: Record<string, OpenApiSchema>;
16
- securitySchemes?: Record<string, any>;
16
+ securitySchemes?: Record<string, unknown>;
17
17
  };
18
18
  tags?: {
19
19
  name: string;
@@ -65,8 +65,8 @@ export interface OpenApiSchema {
65
65
  maximum?: number;
66
66
  maxLength?: number;
67
67
  minLength?: number;
68
- default?: any;
69
- example?: any;
68
+ default?: unknown;
69
+ example?: unknown;
70
70
  additionalProperties?: boolean | OpenApiSchema;
71
71
  }
72
72
  export interface ParsedEndpoint {
@@ -0,0 +1 @@
1
+ export declare function LogsExplorer(): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,4 @@
1
- import { StorageSource } from "./storage";
2
- import { Role, User } from "../users";
3
- import { RebaseData } from "./data";
1
+ import type { User } from "../users";
4
2
  /**
5
3
  * Capabilities advertised by an auth provider.
6
4
  * UI components use this to show/hide features dynamically
@@ -64,7 +62,7 @@ export type AuthController<USER extends User = User, ExtraData = unknown> = {
64
62
  extra: ExtraData;
65
63
  setExtra: (extra: ExtraData) => void;
66
64
  setUser?(user: USER | null): void;
67
- setUserRoles?(roles: Role[]): void;
65
+ setUserRoles?(roles: string[]): void;
68
66
  /**
69
67
  * Capabilities advertised by the auth provider.
70
68
  * UI components use this to feature-detect what the backend supports.
@@ -89,6 +87,8 @@ export interface AuthControllerExtended<USER extends User = User, ExtraData = un
89
87
  code: string;
90
88
  redirectUri: string;
91
89
  }) => Promise<void>;
90
+ /** Generic OAuth login — works with any provider. Posts payload to /auth/{providerId}. */
91
+ oauthLogin?: (providerId: string, payload: Record<string, unknown>) => Promise<void>;
92
92
  /** Register a new user */
93
93
  register?(email: string, password: string, displayName?: string): Promise<void>;
94
94
  /** Skip login (for anonymous access if enabled) */
@@ -102,25 +102,3 @@ export interface AuthControllerExtended<USER extends User = User, ExtraData = un
102
102
  /** Update user profile */
103
103
  updateProfile?(displayName?: string, photoURL?: string): Promise<USER>;
104
104
  }
105
- /**
106
- * Implement this function to allow access to specific users.
107
- * @group Hooks and utilities
108
- */
109
- export type Authenticator<USER extends User = User> = (props: {
110
- /**
111
- * Logged-in user or null
112
- */
113
- user: USER | null;
114
- /**
115
- * AuthController
116
- */
117
- authController: AuthController<USER>;
118
- /**
119
- * Unified data access API
120
- */
121
- data: RebaseData;
122
- /**
123
- * Used storage implementation
124
- */
125
- storageSource: StorageSource;
126
- }) => boolean | Promise<boolean>;
@@ -1,6 +1,6 @@
1
- import { User } from "../users";
2
- import { RebaseData } from "./data";
3
- import { EmailService } from "./email";
1
+ import type { User } from "../users";
2
+ import type { RebaseData } from "./data";
3
+ import type { EmailService } from "./email";
4
4
  /**
5
5
  * Event type for authentication state changes
6
6
  */
@@ -14,7 +14,7 @@ export interface RebaseSession {
14
14
  expiresAt: number;
15
15
  user: User;
16
16
  }
17
- import { StorageSource } from "./storage";
17
+ import type { StorageSource } from "./storage";
18
18
  /**
19
19
  * Unified Authentication Client Interface
20
20
  * Pure functional SDK interface, decoupled from UI and React hooks
@@ -56,20 +56,9 @@ export interface AdminUser {
56
56
  createdAt: string;
57
57
  updatedAt: string;
58
58
  }
59
- /**
60
- * Role record as returned by the Admin API.
61
- * @group Admin
62
- */
63
- export interface AdminRole {
64
- id: string;
65
- name: string;
66
- isAdmin: boolean;
67
- defaultPermissions: Record<string, unknown> | null;
68
- config: Record<string, unknown> | null;
69
- }
70
59
  /**
71
60
  * Client-side Admin API interface.
72
- * Provides user and role management operations.
61
+ * Provides user management operations.
73
62
  * @group Admin
74
63
  */
75
64
  export interface AdminAPI {
@@ -112,32 +101,6 @@ export interface AdminAPI {
112
101
  deleteUser(userId: string): Promise<{
113
102
  success: boolean;
114
103
  }>;
115
- listRoles(): Promise<{
116
- roles: AdminRole[];
117
- }>;
118
- getRole(roleId: string): Promise<{
119
- role: AdminRole;
120
- }>;
121
- createRole(data: {
122
- id: string;
123
- name: string;
124
- isAdmin?: boolean;
125
- defaultPermissions?: Record<string, unknown>;
126
- config?: Record<string, unknown>;
127
- }): Promise<{
128
- role: AdminRole;
129
- }>;
130
- updateRole(roleId: string, data: {
131
- name?: string;
132
- isAdmin?: boolean;
133
- defaultPermissions?: Record<string, unknown>;
134
- config?: Record<string, unknown>;
135
- }): Promise<{
136
- role: AdminRole;
137
- }>;
138
- deleteRole(roleId: string): Promise<{
139
- success: boolean;
140
- }>;
141
104
  bootstrap(): Promise<{
142
105
  success: boolean;
143
106
  message: string;
@@ -168,7 +131,7 @@ export interface RebaseClient<DB = unknown> {
168
131
  * > The client-side SDK does not include an email service.
169
132
  */
170
133
  email?: EmailService;
171
- /** Admin API for user and role management */
134
+ /** Admin API for user management */
172
135
  admin?: AdminAPI;
173
136
  /**
174
137
  * The base HTTP URL of the backend server.
@@ -183,4 +146,23 @@ export interface RebaseClient<DB = unknown> {
183
146
  * detection (e.g. `typeof ws.executeSql === "function"`).
184
147
  */
185
148
  ws?: unknown;
149
+ /**
150
+ * Execute raw SQL against the database.
151
+ *
152
+ * Only available server-side when the backend uses a SQL database
153
+ * (PostgreSQL, MySQL, etc.). `undefined` for document databases
154
+ * (MongoDB, Firestore) and on the client-side SDK.
155
+ *
156
+ * @example
157
+ * ```typescript
158
+ * // In a cron job or custom function:
159
+ * if (ctx.client.sql) {
160
+ * const rows = await ctx.client.sql("SELECT count(*) FROM orders");
161
+ * }
162
+ * ```
163
+ */
164
+ sql?(query: string, options?: {
165
+ database?: string;
166
+ role?: string;
167
+ }): Promise<Record<string, unknown>[]>;
186
168
  }
@@ -4,7 +4,7 @@ import type { EntityReference } from "../types/entities";
4
4
  * Controller that provides access to the registered entity collections.
5
5
  * @group Models
6
6
  */
7
- export type CollectionRegistryController<DB = Record<string, unknown>, EC extends EntityCollection = EntityCollection<any>> = {
7
+ export type CollectionRegistryController<DB = Record<string, unknown>, EC extends EntityCollection = EntityCollection> = {
8
8
  /**
9
9
  * List of the mapped collections in the CMS.
10
10
  * Each entry relates to a collection in the root database.
@@ -125,6 +125,10 @@ export interface CollectionAccessor<M extends Record<string, unknown> = Record<s
125
125
  * Delete a record by ID.
126
126
  */
127
127
  delete(id: string | number): Promise<void>;
128
+ /**
129
+ * Delete all records in this collection.
130
+ */
131
+ deleteAll?(): Promise<void>;
128
132
  /**
129
133
  * Subscribe to a collection for real-time updates.
130
134
  * Optional method, may not be supported by all implementations (like stateless HTTP clients).
@@ -17,6 +17,21 @@ export type ListenEntityProps<M extends Record<string, unknown> = Record<string,
17
17
  onUpdate: (entity: Entity<M> | null) => void;
18
18
  onError?: (error: Error) => void;
19
19
  };
20
+ /**
21
+ * Configuration for vector similarity search queries.
22
+ * Vector search applies an ORDER BY distance expression and optionally
23
+ * filters results by a distance threshold.
24
+ */
25
+ export interface VectorSearchParams {
26
+ /** Property name containing the vector column */
27
+ property: string;
28
+ /** Query vector to compare against */
29
+ vector: number[];
30
+ /** Distance function (default: "cosine") */
31
+ distance?: "cosine" | "l2" | "inner_product";
32
+ /** Only return results within this distance threshold */
33
+ threshold?: number;
34
+ }
20
35
  /**
21
36
  * @internal
22
37
  */
@@ -30,6 +45,8 @@ export interface FetchCollectionProps<M extends Record<string, unknown> = Record
30
45
  orderBy?: string;
31
46
  searchString?: string;
32
47
  order?: "desc" | "asc";
48
+ /** Vector similarity search configuration */
49
+ vectorSearch?: VectorSearchParams;
33
50
  }
34
51
  /**
35
52
  * @internal
@@ -112,6 +129,11 @@ export interface DataDriver {
112
129
  * @return was the whole deletion flow successful
113
130
  */
114
131
  deleteEntity<M extends Record<string, unknown> = Record<string, unknown>>(props: DeleteEntityProps<M>): Promise<void>;
132
+ /**
133
+ * Delete all entities from a collection.
134
+ * @param path Collection path
135
+ */
136
+ deleteAll?(path: string): Promise<void>;
115
137
  /**
116
138
  * Check if the given property is unique in the given collection
117
139
  * @param path Collection path
@@ -187,6 +209,7 @@ export interface RestFetchService {
187
209
  startAfter?: Record<string, unknown>;
188
210
  searchString?: string;
189
211
  databaseId?: string;
212
+ vectorSearch?: VectorSearchParams;
190
213
  }, include?: string[]): Promise<Record<string, unknown>[]>;
191
214
  /**
192
215
  * Fetch a single flattened entity with optional relation includes.
@@ -4,6 +4,7 @@ import type { EntityCollectionsBuilder } from "../types/builders";
4
4
  import type { EntityCustomView } from "../types/entity_views";
5
5
  import type { EntityAction } from "../types/entity_actions";
6
6
  import type { AppView, NavigationGroupMapping } from "./navigation";
7
+ import type { RebasePlugin } from "../types/plugins";
7
8
  /**
8
9
  * Options to enable the built-in collection editor.
9
10
  * When provided to `<RebaseCMS>`, the editor is auto-wired as a native feature.
@@ -19,12 +20,12 @@ export interface CollectionEditorOptions {
19
20
  /** Suggested base paths shown when creating new collections. */
20
21
  pathSuggestions?: string[];
21
22
  }
22
- export interface RebaseCMSConfig<EC extends EntityCollection = any> {
23
+ export interface RebaseCMSConfig<EC extends EntityCollection = EntityCollection> {
23
24
  collections?: EC[] | EntityCollectionsBuilder<EC>;
24
25
  homePage?: ReactNode;
25
- entityViews?: EntityCustomView<any>[];
26
+ entityViews?: EntityCustomView[];
26
27
  entityActions?: EntityAction[];
27
- plugins?: any[];
28
+ plugins?: RebasePlugin[];
28
29
  /**
29
30
  * Centralized configuration for how collections and views are grouped
30
31
  * in the navigation sidebar and home page.
@@ -42,7 +43,7 @@ export interface RebaseCMSConfig<EC extends EntityCollection = any> {
42
43
  collectionEditor?: boolean | CollectionEditorOptions;
43
44
  }
44
45
  export interface RebaseStudioConfig {
45
- tools?: ("sql" | "js" | "rls" | "schema" | "storage" | "cron" | "schema-visualizer" | "branches" | "api")[];
46
+ tools?: ("sql" | "js" | "rls" | "schema" | "storage" | "cron" | "schema-visualizer" | "branches" | "api" | "logs")[];
46
47
  homePage?: ReactNode;
47
48
  devViews?: AppView[];
48
49
  }
@@ -28,7 +28,7 @@ export type RebaseCallContext<USER extends User = User> = {
28
28
  * const { client } = props.context;
29
29
  * const result = await client.functions.invoke('extract-job', { url });
30
30
  */
31
- client: RebaseClient<any>;
31
+ client: RebaseClient;
32
32
  /**
33
33
  * Unified data access — `context.data.products.create(...)`.
34
34
  * Access any collection as a dynamic property.
@@ -133,7 +133,7 @@ export interface AuthUserData {
133
133
  displayName?: string | null;
134
134
  photoUrl?: string | null;
135
135
  emailVerified?: boolean;
136
- metadata?: Record<string, any>;
136
+ metadata?: Record<string, unknown>;
137
137
  createdAt?: Date;
138
138
  updatedAt?: Date;
139
139
  }
@@ -146,41 +146,7 @@ export interface AuthCreateUserData {
146
146
  password?: string;
147
147
  displayName?: string;
148
148
  photoUrl?: string;
149
- metadata?: Record<string, any>;
150
- }
151
- /**
152
- * Role data exposed by the auth adapter.
153
- * @group Auth
154
- */
155
- export interface AuthRoleData {
156
- id: string;
157
- name: string;
158
- isAdmin: boolean;
159
- defaultPermissions?: {
160
- read?: boolean;
161
- create?: boolean;
162
- edit?: boolean;
163
- delete?: boolean;
164
- } | null;
165
- collectionPermissions?: Record<string, {
166
- read?: boolean;
167
- create?: boolean;
168
- edit?: boolean;
169
- delete?: boolean;
170
- }> | null;
171
- config?: Record<string, unknown> | null;
172
- }
173
- /**
174
- * Data for creating a role.
175
- * @group Auth
176
- */
177
- export interface AuthCreateRoleData {
178
- id: string;
179
- name: string;
180
- isAdmin?: boolean;
181
- defaultPermissions?: AuthRoleData["defaultPermissions"];
182
- collectionPermissions?: AuthRoleData["collectionPermissions"];
183
- config?: AuthRoleData["config"];
149
+ metadata?: Record<string, unknown>;
184
150
  }
185
151
  /**
186
152
  * User management operations for the admin panel.
@@ -195,23 +161,9 @@ export interface UserManagementAdapter {
195
161
  createUser(data: AuthCreateUserData): Promise<AuthUserData>;
196
162
  updateUser(id: string, data: Partial<AuthCreateUserData>): Promise<AuthUserData | null>;
197
163
  deleteUser(id: string): Promise<void>;
198
- getUserRoles(userId: string): Promise<AuthRoleData[]>;
164
+ getUserRoles(userId: string): Promise<string[]>;
199
165
  setUserRoles(userId: string, roleIds: string[]): Promise<void>;
200
166
  }
201
- /**
202
- * Role management operations for the admin panel.
203
- *
204
- * Optional — if not provided by the adapter, role management is disabled.
205
- *
206
- * @group Auth
207
- */
208
- export interface RoleManagementAdapter {
209
- listRoles(): Promise<AuthRoleData[]>;
210
- getRoleById(id: string): Promise<AuthRoleData | null>;
211
- createRole(data: AuthCreateRoleData): Promise<AuthRoleData>;
212
- updateRole(id: string, data: Partial<AuthRoleData>): Promise<AuthRoleData | null>;
213
- deleteRole(id: string): Promise<void>;
214
- }
215
167
  /**
216
168
  * Pluggable authentication adapter for Rebase.
217
169
  *
@@ -219,7 +171,7 @@ export interface RoleManagementAdapter {
219
171
  * database layer. Each auth adapter knows how to:
220
172
  *
221
173
  * 1. Verify incoming HTTP requests (`verifyRequest`)
222
- * 2. Optionally manage users and roles (for the admin panel)
174
+ * 2. Optionally manage users (for the admin panel)
223
175
  * 3. Optionally mount auth-specific routes (login, register, etc.)
224
176
  * 4. Advertise its capabilities so the frontend can adapt
225
177
  *
@@ -271,11 +223,6 @@ export interface AuthAdapter {
271
223
  * Optional — if not provided, user management UI is hidden.
272
224
  */
273
225
  userManagement?: UserManagementAdapter;
274
- /**
275
- * Role CRUD for the admin panel.
276
- * Optional — if not provided, role management is disabled.
277
- */
278
- roleManagement?: RoleManagementAdapter;
279
226
  /**
280
227
  * Mount adapter-specific auth routes (login, register, refresh, etc.).
281
228
  *
@@ -291,7 +238,7 @@ export interface AuthAdapter {
291
238
  */
292
239
  createAuthRoutes?(): Hono<any, any, any> | undefined;
293
240
  /**
294
- * Mount admin routes for user/role management.
241
+ * Mount admin routes for user management.
295
242
  *
296
243
  * Same typing rationale as `createAuthRoutes` — the sub-app env is
297
244
  * unconstrained to support arbitrary adapter implementations.
@@ -347,8 +294,6 @@ export interface CustomAuthAdapterOptions {
347
294
  verifyToken?: (token: string) => Promise<AuthenticatedUser | null>;
348
295
  /** Optional user management for the admin panel. */
349
296
  userManagement?: UserManagementAdapter;
350
- /** Optional role management for the admin panel. */
351
- roleManagement?: RoleManagementAdapter;
352
297
  /** Static service key for server-to-server auth. */
353
298
  serviceKey?: string;
354
299
  /** Override default capabilities. */
@@ -527,8 +527,8 @@ export interface InitializedDriver {
527
527
  export interface BootstrappedAuth {
528
528
  /** User management service. */
529
529
  userService: unknown;
530
- /** Role management service. */
531
- roleService: unknown;
530
+ /** Role management service (optional, roles are now simple strings). */
531
+ roleService?: unknown;
532
532
  /** Email service (optional). */
533
533
  emailService?: unknown;
534
534
  /** Combined Auth Repository for unified token and user management. */
@@ -1,4 +1,4 @@
1
- import type { AdminUser, AdminRole } from "../controllers/client";
1
+ import type { AdminUser } from "../controllers/client";
2
2
  /**
3
3
  * Context passed to every backend hook.
4
4
  * Provides information about the request that triggered the hook.
@@ -64,19 +64,6 @@ export interface UserHooks {
64
64
  */
65
65
  afterDelete?(userId: string, context: BackendHookContext): void | Promise<void>;
66
66
  }
67
- /**
68
- * Hooks for intercepting Admin Role data at the API boundary.
69
- * @group Backend Hooks
70
- */
71
- export interface RoleHooks {
72
- /**
73
- * Transform a role record after it's read from the database,
74
- * before it's returned to the client.
75
- *
76
- * Return the modified role, or `null` to filter it out entirely.
77
- */
78
- afterRead?(role: AdminRole, context: BackendHookContext): AdminRole | null | Promise<AdminRole | null>;
79
- }
80
67
  /**
81
68
  * Hooks for intercepting collection entity data at the REST API boundary.
82
69
  *
@@ -146,7 +133,7 @@ export interface DataHooks {
146
133
  * These hooks run server-side after database operations complete and before
147
134
  * API responses are sent.
148
135
  *
149
- * - `users` / `roles` — intercept admin user and role management endpoints
136
+ * - `users` — intercept admin user management endpoints
150
137
  * - `data` — intercept ALL collection entity data flowing through the REST API
151
138
  *
152
139
  * `data` hooks complement per-collection `EntityCallbacks`. Entity callbacks
@@ -180,8 +167,6 @@ export interface DataHooks {
180
167
  export interface BackendHooks {
181
168
  /** Hooks for intercepting user management data */
182
169
  users?: UserHooks;
183
- /** Hooks for intercepting role management data */
184
- roles?: RoleHooks;
185
170
  /** Hooks for intercepting ALL collection entity data via the REST API */
186
171
  data?: DataHooks;
187
172
  }
@@ -589,10 +589,6 @@ export interface FilterPreset<Key extends string = string> {
589
589
  */
590
590
  sort?: [Key, "asc" | "desc"];
591
591
  }
592
- /**
593
- * @deprecated Use {@link FilterPreset} instead.
594
- */
595
- export type QuickFilter<Key extends string = string> = FilterPreset<Key>;
596
592
  /**
597
593
  * Used to indicate valid filter combinations (e.g. created in Firestore)
598
594
  * If the user selects a specific filter/sort combination, the CMS checks if it's
@@ -37,7 +37,7 @@ export interface LazyComponentRef<P = unknown> {
37
37
  *
38
38
  * @group Types
39
39
  */
40
- export type ComponentRef<P = unknown> = React.ComponentType<P> | LazyComponentRef<P> | (() => Promise<{
40
+ export type ComponentRef<P = any> = React.ComponentType<P> | LazyComponentRef<P> | (() => Promise<{
41
41
  default: React.ComponentType<P>;
42
42
  }>) | string;
43
43
  /**
@@ -44,7 +44,7 @@ export interface CronJobContext {
44
44
  /** A simple logger scoped to this job run. */
45
45
  log: (...args: unknown[]) => void;
46
46
  /** The RebaseClient instance to interact with the database. */
47
- client: RebaseClient<any>;
47
+ client: RebaseClient;
48
48
  }
49
49
  export type CronJobRunState = "idle" | "running" | "success" | "error" | "disabled";
50
50
  /**
@@ -50,6 +50,7 @@ export interface FormContext<M extends Record<string, unknown> = Record<string,
50
50
  export type EntityCustomView<M extends Record<string, unknown> = Record<string, unknown>> = {
51
51
  key: string;
52
52
  name: string;
53
+ icon?: string | React.ReactNode;
53
54
  tabComponent?: React.ReactNode;
54
55
  includeActions?: boolean | "bottom";
55
56
  Builder?: ComponentRef<EntityCustomViewParams<M>>;
@@ -15,7 +15,7 @@ export interface ExportConfig<USER extends User = User> {
15
15
  export interface ExportMappingFunction<USER extends User = User> {
16
16
  key: string;
17
17
  builder: ({ entity, context }: {
18
- entity: Entity<any>;
18
+ entity: Entity;
19
19
  context: RebaseContext<USER>;
20
20
  }) => Promise<string> | string;
21
21
  }
@@ -1,5 +1,5 @@
1
1
  import React, { FormEvent } from "react";
2
- export type FormexController<T = any> = {
2
+ export type FormexController<T = unknown> = {
3
3
  values: T;
4
4
  initialValues: T;
5
5
  setValues: (values: T) => void;
@@ -32,7 +32,7 @@ export type FormexController<T = any> = {
32
32
  canUndo: boolean;
33
33
  canRedo: boolean;
34
34
  };
35
- export type FormexResetProps<T = any> = {
35
+ export type FormexResetProps<T = unknown> = {
36
36
  values?: T;
37
37
  submitCount?: number;
38
38
  errors?: Record<string, string>;
@@ -1,6 +1,6 @@
1
1
  import type { ComponentRef } from "./component_ref";
2
- import type { EntityReference, EntityRelation, EntityValues, GeoPoint, Entity, Vector } from "./entities";
3
- import type { Relation, JoinStep, OnAction } from "./relations";
2
+ import type { Entity, EntityReference, EntityRelation, EntityValues, GeoPoint, Vector } from "./entities";
3
+ import type { JoinStep, OnAction, Relation } from "./relations";
4
4
  import type { EntityCollection, FilterValues } from "./collections";
5
5
  import type { ColorKey, ColorScheme } from "./chips";
6
6
  import type { AuthController } from "../controllers/auth";
@@ -104,8 +104,8 @@ export interface BaseUIConfig<CustomProps = unknown> {
104
104
  disabled?: boolean | PropertyDisabledConfig;
105
105
  widthPercentage?: number;
106
106
  customProps?: CustomProps;
107
- Field?: ComponentRef<any>;
108
- Preview?: ComponentRef<any>;
107
+ Field?: ComponentRef;
108
+ Preview?: ComponentRef;
109
109
  }
110
110
  export interface BaseProperty<CustomProps = unknown> {
111
111
  ui?: BaseUIConfig<CustomProps>;
@@ -185,7 +185,7 @@ export interface StringProperty extends BaseProperty {
185
185
  * Optional database column type. If not set, it defaults to `varchar` or `uuid` depending on `isId` configuration.
186
186
  * Use `text` for strings with unbound length, `char` for fixed-length strings, or `varchar` for variable-length strings with a limit.
187
187
  */
188
- columnType?: "varchar" | "text" | "char";
188
+ columnType?: "varchar" | "text" | "char" | "uuid";
189
189
  /**
190
190
  * Rules for validating this property
191
191
  */
@@ -541,9 +541,11 @@ export interface ArrayProperty extends BaseProperty {
541
541
  ui?: ArrayUIConfig;
542
542
  type: "array";
543
543
  /**
544
- * Optional database column type. Defaults to `jsonb`.
544
+ * Optional database column type. By default, maps to a native Postgres array
545
+ * (e.g. `text[]`, `integer[]`/`numeric[]`, `boolean[]`) if the element type
546
+ * is a primitive, otherwise defaults to `jsonb`.
545
547
  */
546
- columnType?: "json" | "jsonb";
548
+ columnType?: "json" | "jsonb" | "text[]" | "integer[]" | "boolean[]" | "numeric[]";
547
549
  /**
548
550
  * The property of this array.
549
551
  * You can specify any property (except another Array property)
@@ -105,6 +105,12 @@ export interface RebaseTranslations {
105
105
  navigation_drawer: string;
106
106
  collapse: string;
107
107
  expand: string;
108
+ /** Tooltip for the language switcher in the drawer footer */
109
+ change_language?: string;
110
+ /** Tooltip for the theme toggle in the drawer footer */
111
+ toggle_theme?: string;
112
+ /** Aria label for the user menu trigger in the drawer footer */
113
+ user_menu?: string;
108
114
  error: string;
109
115
  error_uploading_file: string;
110
116
  error_deleting: string;
@@ -426,18 +432,28 @@ export interface RebaseTranslations {
426
432
  deleted: string;
427
433
  select_reference: string;
428
434
  select_references: string;
429
- account_settings: string;
430
- profile: string;
431
- sessions: string;
432
- display_name: string;
433
- photo_url: string;
434
- save_profile: string;
435
- saving: string;
436
- no_active_sessions: string;
437
- revoking: string;
438
- revoke_all_sessions: string;
439
- unknown_device: string;
440
- current: string;
435
+ account_settings?: string;
436
+ profile?: string;
437
+ sessions?: string;
438
+ security?: string;
439
+ change_password?: string;
440
+ current_password?: string;
441
+ new_password?: string;
442
+ confirm_password?: string;
443
+ password_changed?: string;
444
+ passwords_dont_match?: string;
445
+ password_too_short?: string;
446
+ password_change_not_available?: string;
447
+ changing_password?: string;
448
+ display_name?: string;
449
+ photo_url?: string;
450
+ save_profile?: string;
451
+ saving?: string;
452
+ no_active_sessions?: string;
453
+ revoking?: string;
454
+ revoke_all_sessions?: string;
455
+ unknown_device?: string;
456
+ current?: string;
441
457
  role_id: string;
442
458
  role_name: string;
443
459
  add_reference: string;