@rebasepro/common 0.0.1-canary.2 → 0.0.1-canary.4829d6e

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 (94) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +95 -174
  3. package/dist/collections/CollectionRegistry.d.ts +52 -16
  4. package/dist/collections/default-collections.d.ts +262 -0
  5. package/dist/collections/index.d.ts +1 -0
  6. package/dist/data/buildRebaseData.d.ts +42 -0
  7. package/dist/data/buildRoutedRebaseData.d.ts +58 -0
  8. package/dist/data/filter-dialect.d.ts +75 -0
  9. package/dist/data/query_builder.d.ts +55 -0
  10. package/dist/data/resolveDataSource.d.ts +43 -0
  11. package/dist/data/sort-dialect.d.ts +41 -0
  12. package/dist/index.d.ts +7 -0
  13. package/dist/index.es.js +3126 -2306
  14. package/dist/index.es.js.map +1 -1
  15. package/dist/index.umd.js +3326 -2377
  16. package/dist/index.umd.js.map +1 -1
  17. package/dist/table-classification.d.ts +47 -0
  18. package/dist/util/builders.d.ts +52 -49
  19. package/dist/util/callbacks.d.ts +8 -3
  20. package/dist/util/collections.d.ts +5 -5
  21. package/dist/util/entities.d.ts +46 -12
  22. package/dist/util/filter-operator-resolution.d.ts +32 -0
  23. package/dist/util/index.d.ts +3 -11
  24. package/dist/util/navigation_from_path.d.ts +13 -8
  25. package/dist/util/navigation_utils.d.ts +3 -14
  26. package/dist/util/parent_references_from_path.d.ts +2 -2
  27. package/dist/util/permissions.d.ts +38 -5
  28. package/dist/util/policy/evaluatePolicy.d.ts +31 -0
  29. package/dist/util/policy/index.d.ts +3 -0
  30. package/dist/util/policy/policyToPostgres.d.ts +22 -0
  31. package/dist/util/policy/securityRuleToConditions.d.ts +24 -0
  32. package/dist/util/policy/sqlToPolicy.d.ts +20 -0
  33. package/dist/util/references.d.ts +2 -2
  34. package/dist/util/relations.d.ts +15 -5
  35. package/dist/util/resolutions.d.ts +11 -13
  36. package/dist/util/storage.d.ts +30 -5
  37. package/package.json +104 -113
  38. package/src/collections/CollectionRegistry.ts +321 -96
  39. package/src/collections/default-collections.ts +123 -0
  40. package/src/collections/index.ts +1 -0
  41. package/src/data/buildRebaseData.ts +489 -0
  42. package/src/data/buildRoutedRebaseData.ts +103 -0
  43. package/src/data/filter-dialect.ts +409 -0
  44. package/src/data/query_builder.ts +140 -0
  45. package/src/data/resolveDataSource.ts +79 -0
  46. package/src/data/sort-dialect.ts +56 -0
  47. package/src/index.ts +7 -0
  48. package/src/table-classification.ts +109 -0
  49. package/src/types/json-logic-js.d.ts +8 -0
  50. package/src/util/builders.ts +89 -95
  51. package/src/util/callbacks.ts +19 -12
  52. package/src/util/collections.ts +14 -11
  53. package/src/util/conditions.ts +14 -11
  54. package/src/util/entities.ts +94 -21
  55. package/src/util/filter-operator-resolution.ts +81 -0
  56. package/src/util/index.ts +3 -11
  57. package/src/util/navigation_from_path.ts +12 -11
  58. package/src/util/navigation_utils.ts +11 -63
  59. package/src/util/parent_references_from_path.ts +7 -6
  60. package/src/util/permissions.test.ts +238 -118
  61. package/src/util/permissions.ts +118 -187
  62. package/src/util/policy/evaluatePolicy.ts +152 -0
  63. package/src/util/policy/index.ts +3 -0
  64. package/src/util/policy/policyToPostgres.ts +186 -0
  65. package/src/util/policy/securityRuleToConditions.ts +67 -0
  66. package/src/util/policy/sqlToPolicy.ts +88 -0
  67. package/src/util/references.ts +18 -4
  68. package/src/util/relations.ts +183 -41
  69. package/src/util/resolutions.ts +88 -84
  70. package/src/util/storage.ts +39 -6
  71. package/dist/util/arrays.d.ts +0 -1
  72. package/dist/util/dates.d.ts +0 -1
  73. package/dist/util/entity_actions.d.ts +0 -2
  74. package/dist/util/fields.d.ts +0 -2
  75. package/dist/util/flatten_object.d.ts +0 -5
  76. package/dist/util/hash.d.ts +0 -1
  77. package/dist/util/names.d.ts +0 -22
  78. package/dist/util/objects.d.ts +0 -26
  79. package/dist/util/os.d.ts +0 -2
  80. package/dist/util/plurals.d.ts +0 -16
  81. package/dist/util/regexp.d.ts +0 -7
  82. package/dist/util/strings.d.ts +0 -7
  83. package/src/util/arrays.ts +0 -3
  84. package/src/util/dates.ts +0 -1
  85. package/src/util/entity_actions.ts +0 -28
  86. package/src/util/fields.ts +0 -28
  87. package/src/util/flatten_object.ts +0 -45
  88. package/src/util/hash.ts +0 -11
  89. package/src/util/names.ts +0 -30
  90. package/src/util/objects.ts +0 -376
  91. package/src/util/os.ts +0 -13
  92. package/src/util/plurals.ts +0 -188
  93. package/src/util/regexp.ts +0 -32
  94. package/src/util/strings.ts +0 -84
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 Rebase
3
+ Copyright (c) 2026 Rebase
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,174 +1,95 @@
1
- <p align="center">
2
- <img src="https://rebase.pro/img/dark_mode.webp" alt="Intro video" style="max-width: 100%;"/>
3
- </p>
4
-
5
- <p align="center">
6
- <a href="https://rebase.pro">
7
- <img src="https://rebase.pro/img/logo_small.png" width="240px" alt="Rebase logo" />
8
- </a>
9
- </p>
10
-
11
- <h1 align="center">Rebase</h1>
12
- <h3 align="center">Awesome Firebase/MongoDB-based headless CMS</h3>
13
- <p align="center"><a href="https://demo.rebase.pro">Live demo</a></p>
14
-
15
- <br />
16
-
17
-
18
- [![NPM](https://img.shields.io/npm/v/rebase.svg)](https://www.npmjs.com/package/rebase) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
19
-
20
- Designed by developers for developers, Rebase is a headless CMS and admin panel
21
- that seamlessly integrates with **Firebase and Firestore** by default, but is
22
- also
23
- compatible with any backend.
24
-
25
- Effortlessly generate **CRUD views** based on your configuration. Rebase is
26
- simple
27
- to set up for standard cases and easy to extend and customize for more specific
28
- needs.
29
-
30
- Built to produce collection and form views that naturally align with the
31
- collection/document model, Rebase covers a wide range of basic and advanced use
32
- cases. With extensibility in mind, it's easy to create your own views or modify
33
- existing ones.
34
-
35
- Rebase does **not impose any data structure** restrictions, ensuring a smooth,
36
- out-of-the-box experience for any project.
37
-
38
- ### Core technologies
39
-
40
- Rebase is based on this great technologies:
41
-
42
- - Typescript
43
- - Tailwind CSS
44
- - Firebase SDK 10
45
- - React + React Router 6
46
-
47
- ### Quickstart
48
-
49
- The easiest way to get going is to check our quickstart guide! You will just
50
- need to follow some quick steps:
51
-
52
- https://rebase.pro/docs
53
-
54
- ### Demo
55
-
56
- Check the demo with all the core functionalities.
57
-
58
- https://demo.rebase.pro
59
-
60
- > You can modify the data, but it gets periodically restored.
61
-
62
- ### Changelog
63
-
64
- https://rebase.pro/docs/changelog
65
-
66
- ## Features
67
-
68
- Rebase has been meticulously crafted to make it incredibly easy for developers
69
- to build a CMS/admin tool while offering an excellent data editing experience
70
- and a user-friendly interface for marketers and content managers.
71
-
72
- ### 🏓 Exceptional Spreadsheet View
73
-
74
- We've developed a highly efficient windowed **spreadsheet view** for
75
- collections, allowing inline editing for most common fields, as well as popup
76
- views for other cases and your custom field implementations.
77
-
78
- Featuring **real-time** support, Rebase is perfect for apps that require
79
- constant updates. It also supports **text search** (through an external provider
80
- like Algolia, if using Firestore), **filtering and sorting**, and **exporting**
81
- data.
82
-
83
- ### ✨ Robust Forms
84
-
85
- ![fields](https://rebase.pro/img/form_editing.webp)
86
-
87
- When editing an entity, Rebase offers a nested system of side dialogs for
88
- navigating through **subcollections** and accessing custom views (such as custom
89
- forms or blog previews). This functionality can also be accessed
90
- programmatically using the `useSideEntityController` hook.
91
-
92
- Rebase includes **over 20 built-in fields** with numerous customization and
93
- validation options. The components have been carefully designed for an
94
- outstanding user experience, including advanced features like **references** to
95
- other collections, **markdown**, and **array reordering**.
96
-
97
- For unsupported use cases, create your own **custom field** as a React
98
- component.
99
-
100
- Rebase also supports **conditional fields** in forms, allowing you to define
101
- rules for active fields based on your logic.
102
-
103
- ### 👮 Authentication, Permissions, and Role System
104
-
105
- Define which navigation views users can see and the operations (create, edit,
106
- delete) they can perform based on your role system. You can even configure this
107
- on a per-entity or collection level.
108
-
109
- By default, Rebase supports all Firebase authorization mechanisms, but you can
110
- implement your own.
111
-
112
- ### 🏹 Relational Support
113
-
114
- Define references to entities in other collections and benefit from the
115
- integrated reference fields and shortcuts.
116
-
117
- You can also define subcollections at the entity level for nesting data in a
118
- collection/document/collection model.
119
-
120
- ### 🆒 Real-Time Data
121
-
122
- Every view in the CMS supports real-time data, making it suitable for displaying
123
- constantly updated information.
124
-
125
- Forms also support this feature, with any modified value in the database being
126
- updated in any open form view as long as it hasn't been touched by the user.
127
- This enables advanced cases where a Cloud Function is triggered after saving an
128
- entity, modifying some values, and requiring real-time updates.
129
-
130
- ### 🗂️ File Storage
131
-
132
- Rebase supports uploading files to Firebase Storage out of the box and provides
133
- specific fields for handling single and multiple file uploads, as well as
134
- reordering.
135
-
136
- You can replace the Firebase Storage implementation with your own.
137
-
138
- ## Included example
139
-
140
- You can access the code for the demo project under
141
- [`example`](https://github.com/Rebaseco/rebase/tree/master/example). It includes
142
- every feature provided by this CMS.
143
-
144
- Keep in mind you need to update the dependencies in that project if you want to
145
- use it as it is, without linking it to the library source code. More details in
146
- its README
147
-
148
- ## Contact and support
149
-
150
- If you need general support, you can open a GitHub issue.
151
-
152
- Do you need consulting setting up your Firestore-based CMS in no time? We are
153
- happy to help!
154
- `hello@rebase.pro`
155
-
156
- ## Development
157
-
158
- If you would like to make changes to the source, feel free to submit a PR!
159
-
160
- When developing, the core library can be found under `lib`.
161
- There is an example project in the folder `example`.
162
-
163
- In order to run the project, you need to create a file
164
- called `firebase_config.ts`
165
- in `example/src`.
166
-
167
- That file needs to export a valid Firebase config, that you can get
168
- from your Firebase console when creating a webapp for your project.
169
-
170
- Then simply run `yarn` and `yarn dev`
171
-
172
- ## License
173
-
174
- MIT © [Rebase](https://github.com/Rebaseco)
1
+ # @rebasepro/common
2
+
3
+ Shared utilities, collection registry, data driver adapter, and fluent query builder used across Rebase packages.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @rebasepro/common
9
+ ```
10
+
11
+ ## What This Package Does
12
+
13
+ `@rebasepro/common` is the lowest-level shared logic layer in the Rebase frontend stack. It provides:
14
+
15
+ - **Collection utilities** — collection registry, default collection definitions, path resolution, navigation helpers
16
+ - **Data driver adapter** — `buildRebaseData()` bridges any `DataDriver` implementation into a `RebaseData` proxy with typed collection accessors
17
+ - **Query builder** — fluent `QueryBuilder` class plus `or()`, `and()`, `cond()` helpers for composing complex queries
18
+ - **Snapshot/property utilities** — snapshot resolution, enum helpers, permission checks, reference/relation helpers, storage path utils, callback utilities
19
+
20
+ This package has no React dependency — it's pure TypeScript and can be used in both client and server contexts.
21
+
22
+ ## Key Exports
23
+
24
+ ### Data
25
+
26
+ | Export | Description |
27
+ |---|---|
28
+ | `buildRebaseData(driver)` | Wraps a `DataDriver` in a `Proxy`-based `RebaseData` object. Property access like `data.products` returns a `CollectionAccessor` for that collection slug (camelCase → snake_case). |
29
+ | `QueryBuilder<M>` | Fluent query builder with `.where()`, `.orderBy()`, `.limit()`, `.offset()`, `.search()`, `.include()`, `.find()`, and `.listen()` |
30
+ | `or(...conditions)` | Create an OR logical condition |
31
+ | `and(...conditions)` | Create an AND logical condition |
32
+ | `cond(column, op, value)` | Create a single filter condition |
33
+
34
+ ### Collections
35
+
36
+ | Export | Description |
37
+ |---|---|
38
+ | `CollectionRegistry` | Registry for managing collection definitions |
39
+ | Default collections | Pre-built collection configurations |
40
+
41
+ ### Utilities
42
+
43
+ | Module | Contents |
44
+ |---|---|
45
+ | `collections` | Collection config helpers |
46
+ | `common` | General-purpose utilities |
47
+ | `snapshots` | Snapshot value resolution |
48
+ | `enums` | Enum type helpers |
49
+ | `paths` | Path parsing and manipulation |
50
+ | `resolutions` | Property and collection resolution |
51
+ | `permissions` | Permission evaluation |
52
+ | `references` | Reference property helpers |
53
+ | `relations` | Relation property helpers |
54
+ | `navigation_from_path` | Build navigation tree from a path |
55
+ | `parent_references_from_path` | Extract parent references |
56
+ | `builders` | Collection/property builder utilities |
57
+ | `storage` | Storage path utilities |
58
+ | `callbacks` | Callback composition utilities |
59
+ | `conditions` | Conditional logic helpers |
60
+ | `navigation_utils` | Navigation tree utilities |
61
+
62
+ ## Quick Start
63
+
64
+ ```ts
65
+ import { buildRebaseData, QueryBuilder, or, cond } from "@rebasepro/common";
66
+
67
+ // Wrap a DataDriver into a proxy-based data accessor
68
+ const data = buildRebaseData(myDriver);
69
+
70
+ // Access collections by name (camelCase auto-converts to snake_case)
71
+ const { data: products } = await data.products.find({ limit: 10 });
72
+ const snapshot = await data.products.findById("abc-123");
73
+
74
+ // Fluent query builder
75
+ const { data: results } = await data.products
76
+ .where("status", "==", "published")
77
+ .orderBy("created_at", "desc")
78
+ .limit(20)
79
+ .find();
80
+
81
+ // Complex logical queries
82
+ const { data: filtered } = await data.products
83
+ .where(or(
84
+ cond("category", "==", "electronics"),
85
+ cond("price", ">=", 100)
86
+ ))
87
+ .find();
88
+ ```
89
+
90
+ ## Related Packages
91
+
92
+ - [`@rebasepro/types`](../types) — `DataDriver`, `RebaseData`, `CollectionAccessor`, `Snapshot`, `FindResponse`, etc.
93
+ - [`@rebasepro/utils`](../utils) — Low-level utilities (`toSnakeCase`, etc.)
94
+ - [`@rebasepro/app`](../core) — Runtime layer that consumes `@rebasepro/common`
95
+ - [`@rebasepro/client`](../client) — HTTP client that re-exports and extends the `QueryBuilder`
@@ -1,48 +1,84 @@
1
- import { EntityCollection } from "@rebasepro/types";
1
+ import { CollectionCallbacks, CollectionConfig } from "@rebasepro/types";
2
+ import { DataSourceRegistry } from "../data/resolveDataSource";
2
3
  export declare class CollectionRegistry {
3
- private collectionsByDbPath;
4
+ /**
5
+ * Declared data sources, used during normalization to resolve each
6
+ * collection's engine (so `dataSource`-only collections get the right
7
+ * capabilities). Empty by default.
8
+ */
9
+ private dataSources;
10
+ /**
11
+ * Global lifecycle callbacks applied to every collection.
12
+ * Runs on all data paths (REST, WebSocket, `rebase.data`).
13
+ * Execution order: global → collection → property callbacks.
14
+ */
15
+ private _globalCallbacks?;
16
+ /**
17
+ * Set global lifecycle callbacks that apply to every collection.
18
+ * Typically called once during backend initialization.
19
+ */
20
+ setGlobalCallbacks(callbacks: CollectionCallbacks): void;
21
+ /**
22
+ * Get the currently registered global callbacks, if any.
23
+ */
24
+ getGlobalCallbacks(): CollectionCallbacks | undefined;
25
+ private collectionsByTableName;
4
26
  private collectionsBySlug;
5
27
  private rootCollections;
6
- private rawCollectionsByDbPath;
28
+ private cachedCollectionsList;
29
+ private rawCollectionsByTableName;
7
30
  private rawCollectionsBySlug;
8
31
  private rawRootCollections;
9
- private lastRawInputSnapshot;
10
- constructor(collections?: EntityCollection[]);
32
+ private cachedRawCollectionsList;
33
+ private lastRawInputEntity;
34
+ constructor(collections?: CollectionConfig[], dataSources?: DataSourceRegistry);
35
+ /**
36
+ * Provide the declared data sources used to resolve each collection's
37
+ * engine during normalization. Set this before registering collections.
38
+ * Returns true if the registry changed (callers may re-register).
39
+ */
40
+ setDataSources(dataSources: DataSourceRegistry): boolean;
11
41
  reset(): void;
12
42
  /**
13
43
  * Registers a collection and its subcollections recursively.
14
44
  * Returns true if the collections have changed, false otherwise.
15
45
  *
16
46
  * Idempotent: compares the raw input (before normalization) against a stored
17
- * snapshot. Only re-normalizes and re-registers when the raw input actually changed.
47
+ * entity. Only re-normalizes and re-registers when the raw input actually changed.
18
48
  * @param collections
19
49
  */
20
- registerMultiple(collections: EntityCollection[]): boolean;
21
- register(collection: EntityCollection, rawCollection?: EntityCollection): void;
50
+ registerMultiple(collections: CollectionConfig[]): boolean;
51
+ register(collection: CollectionConfig, rawCollection?: CollectionConfig): void;
22
52
  private _registerRecursively;
23
- normalizeCollection(collection: EntityCollection): EntityCollection;
53
+ normalizeCollection(collection: CollectionConfig): CollectionConfig;
54
+ /**
55
+ * Extract Relation[] from properties that have inline relation config (i.e. `target` is set).
56
+ * This allows developers to define relations directly on properties without a separate
57
+ * `relations[]` entry on the collection.
58
+ */
59
+ private extractRelationsFromProperties;
24
60
  private normalizeProperties;
25
61
  private normalizeProperty;
26
- get(path: string): EntityCollection | undefined;
62
+ get(path: string): CollectionConfig | undefined;
27
63
  /**
28
64
  * Gets the pristine, un-normalized collection exactly as it was provided.
29
65
  * Useful for the AST editor so it doesn't accidentally serialize injected metadata back to disk.
30
66
  */
31
- getRaw(path: string): EntityCollection | undefined;
67
+ getRaw(path: string): CollectionConfig | undefined;
32
68
  /**
33
69
  * Get collection by resolving multi-segment paths through relations
34
70
  * e.g., "authors/70/posts" resolves to the posts collection
35
71
  */
36
- getCollectionByPath(collectionPath: string): EntityCollection | undefined;
37
- getCollections(): EntityCollection[];
38
- getRawCollections(): EntityCollection[];
72
+ getCollectionByPath(collectionPath: string): CollectionConfig | undefined;
73
+ getCollections(): CollectionConfig[];
74
+ getRawCollections(): CollectionConfig[];
39
75
  /**
40
76
  * Resolves a multi-segment path like "products/123/locales" and returns
41
77
  * information about the collections and entity IDs along the path
42
78
  */
43
79
  resolvePathToCollections(path: string): {
44
- collections: EntityCollection[];
80
+ collections: CollectionConfig[];
45
81
  entityIds: (string | number)[];
46
- finalCollection: EntityCollection;
82
+ finalCollection: CollectionConfig;
47
83
  };
48
84
  }
@@ -0,0 +1,262 @@
1
+ /**
2
+ * Default users collection.
3
+ *
4
+ * Prepended to the developer's collections array by the admin and server.
5
+ * Slug-based dedup (Map keyed by slug, last-write-wins) lets developers
6
+ * override by defining their own collection with `slug: "users"`.
7
+ */
8
+ export declare const defaultUsersCollection: import("@rebasepro/types").PostgresCollectionConfig<import("@rebasepro/types").InferEntityType<{
9
+ readonly id: {
10
+ readonly name: "ID";
11
+ readonly type: "string";
12
+ readonly isId: "uuid";
13
+ readonly ui: {
14
+ readonly readOnly: true;
15
+ };
16
+ };
17
+ readonly email: {
18
+ readonly name: "Email";
19
+ readonly type: "string";
20
+ readonly validation: {
21
+ readonly required: true;
22
+ readonly unique: true;
23
+ };
24
+ };
25
+ readonly displayName: {
26
+ readonly name: "Name";
27
+ readonly type: "string";
28
+ readonly columnName: "display_name";
29
+ readonly validation: {
30
+ readonly required: true;
31
+ };
32
+ };
33
+ readonly photoURL: {
34
+ readonly name: "Photo URL";
35
+ readonly type: "string";
36
+ readonly columnName: "photo_url";
37
+ readonly ui: {
38
+ readonly url: "image";
39
+ };
40
+ };
41
+ readonly roles: {
42
+ readonly name: "Roles";
43
+ readonly type: "array";
44
+ readonly columnType: "text[]";
45
+ readonly of: {
46
+ readonly name: "Role";
47
+ readonly type: "string";
48
+ readonly enum: {
49
+ readonly admin: "Admin";
50
+ readonly editor: "Editor";
51
+ readonly viewer: "Viewer";
52
+ };
53
+ };
54
+ };
55
+ readonly passwordHash: {
56
+ readonly name: "Password Hash";
57
+ readonly type: "string";
58
+ readonly columnName: "password_hash";
59
+ readonly ui: {
60
+ readonly hideFromCollection: true;
61
+ readonly disabled: {
62
+ readonly hidden: true;
63
+ };
64
+ };
65
+ };
66
+ readonly emailVerified: {
67
+ readonly name: "Email Verified";
68
+ readonly type: "boolean";
69
+ readonly columnName: "email_verified";
70
+ readonly defaultValue: false;
71
+ readonly ui: {
72
+ readonly hideFromCollection: true;
73
+ readonly disabled: {
74
+ readonly hidden: true;
75
+ };
76
+ };
77
+ };
78
+ readonly emailVerificationToken: {
79
+ readonly name: "Email Verification Token";
80
+ readonly type: "string";
81
+ readonly columnName: "email_verification_token";
82
+ readonly ui: {
83
+ readonly hideFromCollection: true;
84
+ readonly disabled: {
85
+ readonly hidden: true;
86
+ };
87
+ };
88
+ };
89
+ readonly emailVerificationSentAt: {
90
+ readonly name: "Email Verification Sent At";
91
+ readonly type: "date";
92
+ readonly columnName: "email_verification_sent_at";
93
+ readonly ui: {
94
+ readonly hideFromCollection: true;
95
+ readonly disabled: {
96
+ readonly hidden: true;
97
+ };
98
+ };
99
+ };
100
+ readonly metadata: {
101
+ readonly name: "Metadata";
102
+ readonly type: "map";
103
+ readonly keyValue: true;
104
+ readonly properties: {};
105
+ readonly defaultValue: {};
106
+ readonly ui: {
107
+ readonly hideFromCollection: true;
108
+ readonly disabled: {
109
+ readonly hidden: true;
110
+ };
111
+ };
112
+ };
113
+ readonly createdAt: {
114
+ readonly name: "Created At";
115
+ readonly type: "date";
116
+ readonly columnName: "created_at";
117
+ readonly autoValue: "on_create";
118
+ readonly ui: {
119
+ readonly readOnly: true;
120
+ };
121
+ };
122
+ readonly updatedAt: {
123
+ readonly name: "Updated At";
124
+ readonly type: "date";
125
+ readonly columnName: "updated_at";
126
+ readonly autoValue: "on_update";
127
+ readonly ui: {
128
+ readonly hideFromCollection: true;
129
+ readonly disabled: {
130
+ readonly hidden: true;
131
+ };
132
+ };
133
+ };
134
+ }>, import("@rebasepro/types").User> & {
135
+ properties: {
136
+ readonly id: {
137
+ readonly name: "ID";
138
+ readonly type: "string";
139
+ readonly isId: "uuid";
140
+ readonly ui: {
141
+ readonly readOnly: true;
142
+ };
143
+ };
144
+ readonly email: {
145
+ readonly name: "Email";
146
+ readonly type: "string";
147
+ readonly validation: {
148
+ readonly required: true;
149
+ readonly unique: true;
150
+ };
151
+ };
152
+ readonly displayName: {
153
+ readonly name: "Name";
154
+ readonly type: "string";
155
+ readonly columnName: "display_name";
156
+ readonly validation: {
157
+ readonly required: true;
158
+ };
159
+ };
160
+ readonly photoURL: {
161
+ readonly name: "Photo URL";
162
+ readonly type: "string";
163
+ readonly columnName: "photo_url";
164
+ readonly ui: {
165
+ readonly url: "image";
166
+ };
167
+ };
168
+ readonly roles: {
169
+ readonly name: "Roles";
170
+ readonly type: "array";
171
+ readonly columnType: "text[]";
172
+ readonly of: {
173
+ readonly name: "Role";
174
+ readonly type: "string";
175
+ readonly enum: {
176
+ readonly admin: "Admin";
177
+ readonly editor: "Editor";
178
+ readonly viewer: "Viewer";
179
+ };
180
+ };
181
+ };
182
+ readonly passwordHash: {
183
+ readonly name: "Password Hash";
184
+ readonly type: "string";
185
+ readonly columnName: "password_hash";
186
+ readonly ui: {
187
+ readonly hideFromCollection: true;
188
+ readonly disabled: {
189
+ readonly hidden: true;
190
+ };
191
+ };
192
+ };
193
+ readonly emailVerified: {
194
+ readonly name: "Email Verified";
195
+ readonly type: "boolean";
196
+ readonly columnName: "email_verified";
197
+ readonly defaultValue: false;
198
+ readonly ui: {
199
+ readonly hideFromCollection: true;
200
+ readonly disabled: {
201
+ readonly hidden: true;
202
+ };
203
+ };
204
+ };
205
+ readonly emailVerificationToken: {
206
+ readonly name: "Email Verification Token";
207
+ readonly type: "string";
208
+ readonly columnName: "email_verification_token";
209
+ readonly ui: {
210
+ readonly hideFromCollection: true;
211
+ readonly disabled: {
212
+ readonly hidden: true;
213
+ };
214
+ };
215
+ };
216
+ readonly emailVerificationSentAt: {
217
+ readonly name: "Email Verification Sent At";
218
+ readonly type: "date";
219
+ readonly columnName: "email_verification_sent_at";
220
+ readonly ui: {
221
+ readonly hideFromCollection: true;
222
+ readonly disabled: {
223
+ readonly hidden: true;
224
+ };
225
+ };
226
+ };
227
+ readonly metadata: {
228
+ readonly name: "Metadata";
229
+ readonly type: "map";
230
+ readonly keyValue: true;
231
+ readonly properties: {};
232
+ readonly defaultValue: {};
233
+ readonly ui: {
234
+ readonly hideFromCollection: true;
235
+ readonly disabled: {
236
+ readonly hidden: true;
237
+ };
238
+ };
239
+ };
240
+ readonly createdAt: {
241
+ readonly name: "Created At";
242
+ readonly type: "date";
243
+ readonly columnName: "created_at";
244
+ readonly autoValue: "on_create";
245
+ readonly ui: {
246
+ readonly readOnly: true;
247
+ };
248
+ };
249
+ readonly updatedAt: {
250
+ readonly name: "Updated At";
251
+ readonly type: "date";
252
+ readonly columnName: "updated_at";
253
+ readonly autoValue: "on_update";
254
+ readonly ui: {
255
+ readonly hideFromCollection: true;
256
+ readonly disabled: {
257
+ readonly hidden: true;
258
+ };
259
+ };
260
+ };
261
+ };
262
+ };
@@ -1 +1,2 @@
1
1
  export * from "./CollectionRegistry";
2
+ export * from "./default-collections";