@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.
- package/LICENSE +1 -1
- package/README.md +95 -174
- package/dist/collections/CollectionRegistry.d.ts +52 -16
- package/dist/collections/default-collections.d.ts +262 -0
- package/dist/collections/index.d.ts +1 -0
- package/dist/data/buildRebaseData.d.ts +42 -0
- package/dist/data/buildRoutedRebaseData.d.ts +58 -0
- package/dist/data/filter-dialect.d.ts +75 -0
- package/dist/data/query_builder.d.ts +55 -0
- package/dist/data/resolveDataSource.d.ts +43 -0
- package/dist/data/sort-dialect.d.ts +41 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.es.js +3126 -2306
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3326 -2377
- package/dist/index.umd.js.map +1 -1
- package/dist/table-classification.d.ts +47 -0
- package/dist/util/builders.d.ts +52 -49
- package/dist/util/callbacks.d.ts +8 -3
- package/dist/util/collections.d.ts +5 -5
- package/dist/util/entities.d.ts +46 -12
- package/dist/util/filter-operator-resolution.d.ts +32 -0
- package/dist/util/index.d.ts +3 -11
- package/dist/util/navigation_from_path.d.ts +13 -8
- package/dist/util/navigation_utils.d.ts +3 -14
- package/dist/util/parent_references_from_path.d.ts +2 -2
- package/dist/util/permissions.d.ts +38 -5
- package/dist/util/policy/evaluatePolicy.d.ts +31 -0
- package/dist/util/policy/index.d.ts +3 -0
- package/dist/util/policy/policyToPostgres.d.ts +22 -0
- package/dist/util/policy/securityRuleToConditions.d.ts +24 -0
- package/dist/util/policy/sqlToPolicy.d.ts +20 -0
- package/dist/util/references.d.ts +2 -2
- package/dist/util/relations.d.ts +15 -5
- package/dist/util/resolutions.d.ts +11 -13
- package/dist/util/storage.d.ts +30 -5
- package/package.json +104 -113
- package/src/collections/CollectionRegistry.ts +321 -96
- package/src/collections/default-collections.ts +123 -0
- package/src/collections/index.ts +1 -0
- package/src/data/buildRebaseData.ts +489 -0
- package/src/data/buildRoutedRebaseData.ts +103 -0
- package/src/data/filter-dialect.ts +409 -0
- package/src/data/query_builder.ts +140 -0
- package/src/data/resolveDataSource.ts +79 -0
- package/src/data/sort-dialect.ts +56 -0
- package/src/index.ts +7 -0
- package/src/table-classification.ts +109 -0
- package/src/types/json-logic-js.d.ts +8 -0
- package/src/util/builders.ts +89 -95
- package/src/util/callbacks.ts +19 -12
- package/src/util/collections.ts +14 -11
- package/src/util/conditions.ts +14 -11
- package/src/util/entities.ts +94 -21
- package/src/util/filter-operator-resolution.ts +81 -0
- package/src/util/index.ts +3 -11
- package/src/util/navigation_from_path.ts +12 -11
- package/src/util/navigation_utils.ts +11 -63
- package/src/util/parent_references_from_path.ts +7 -6
- package/src/util/permissions.test.ts +238 -118
- package/src/util/permissions.ts +118 -187
- package/src/util/policy/evaluatePolicy.ts +152 -0
- package/src/util/policy/index.ts +3 -0
- package/src/util/policy/policyToPostgres.ts +186 -0
- package/src/util/policy/securityRuleToConditions.ts +67 -0
- package/src/util/policy/sqlToPolicy.ts +88 -0
- package/src/util/references.ts +18 -4
- package/src/util/relations.ts +183 -41
- package/src/util/resolutions.ts +88 -84
- package/src/util/storage.ts +39 -6
- package/dist/util/arrays.d.ts +0 -1
- package/dist/util/dates.d.ts +0 -1
- package/dist/util/entity_actions.d.ts +0 -2
- package/dist/util/fields.d.ts +0 -2
- package/dist/util/flatten_object.d.ts +0 -5
- package/dist/util/hash.d.ts +0 -1
- package/dist/util/names.d.ts +0 -22
- package/dist/util/objects.d.ts +0 -26
- package/dist/util/os.d.ts +0 -2
- package/dist/util/plurals.d.ts +0 -16
- package/dist/util/regexp.d.ts +0 -7
- package/dist/util/strings.d.ts +0 -7
- package/src/util/arrays.ts +0 -3
- package/src/util/dates.ts +0 -1
- package/src/util/entity_actions.ts +0 -28
- package/src/util/fields.ts +0 -28
- package/src/util/flatten_object.ts +0 -45
- package/src/util/hash.ts +0 -11
- package/src/util/names.ts +0 -30
- package/src/util/objects.ts +0 -376
- package/src/util/os.ts +0 -13
- package/src/util/plurals.ts +0 -188
- package/src/util/regexp.ts +0 -32
- package/src/util/strings.ts +0 -84
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,174 +1,95 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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 {
|
|
1
|
+
import { CollectionCallbacks, CollectionConfig } from "@rebasepro/types";
|
|
2
|
+
import { DataSourceRegistry } from "../data/resolveDataSource";
|
|
2
3
|
export declare class CollectionRegistry {
|
|
3
|
-
|
|
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
|
|
28
|
+
private cachedCollectionsList;
|
|
29
|
+
private rawCollectionsByTableName;
|
|
7
30
|
private rawCollectionsBySlug;
|
|
8
31
|
private rawRootCollections;
|
|
9
|
-
private
|
|
10
|
-
|
|
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
|
-
*
|
|
47
|
+
* entity. Only re-normalizes and re-registers when the raw input actually changed.
|
|
18
48
|
* @param collections
|
|
19
49
|
*/
|
|
20
|
-
registerMultiple(collections:
|
|
21
|
-
register(collection:
|
|
50
|
+
registerMultiple(collections: CollectionConfig[]): boolean;
|
|
51
|
+
register(collection: CollectionConfig, rawCollection?: CollectionConfig): void;
|
|
22
52
|
private _registerRecursively;
|
|
23
|
-
normalizeCollection(collection:
|
|
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):
|
|
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):
|
|
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):
|
|
37
|
-
getCollections():
|
|
38
|
-
getRawCollections():
|
|
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:
|
|
80
|
+
collections: CollectionConfig[];
|
|
45
81
|
entityIds: (string | number)[];
|
|
46
|
-
finalCollection:
|
|
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
|
+
};
|