@open-commune/core 0.1.2 → 0.1.3
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/README.md +39 -0
- package/dist/index.d.mts +42 -42
- package/dist/index.d.ts +42 -42
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @open-commune/core
|
|
2
|
+
|
|
3
|
+
Business domains, database schema and tRPC router for [Open Commune](https://github.com/open-commune/open-commune) — the content platform for local government.
|
|
4
|
+
|
|
5
|
+
This package holds the logic and knows nothing of transport: no HTTP server, no framework. It is consumed by the Nuxt layer [`@open-commune/web`](https://www.npmjs.com/package/@open-commune/web), and can be embedded in any runtime that speaks tRPC.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @open-commune/core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires Bun — the database layer uses `bun:sqlite`.
|
|
14
|
+
|
|
15
|
+
## Use
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createCore, connectDb } from '@open-commune/core';
|
|
19
|
+
|
|
20
|
+
const db = connectDb({ url: './data/commun.db' });
|
|
21
|
+
const core = createCore({ db /* , storage, mailer */ });
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`createCore` returns the services and the tRPC `appRouter`; mount that router behind the HTTP adapter of your choice.
|
|
25
|
+
|
|
26
|
+
### Entry points
|
|
27
|
+
|
|
28
|
+
| Import | Contents |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `@open-commune/core` | services, repositories, DTOs, typed errors, the tRPC `appRouter` |
|
|
31
|
+
| `@open-commune/core/collections/constants` | field types, publication statuses, allowed MIME types |
|
|
32
|
+
| `@open-commune/core/collections/utils` | helpers over collection definitions and entries |
|
|
33
|
+
| `@open-commune/core/drizzle` | the migrations folder, applied at startup |
|
|
34
|
+
|
|
35
|
+
Migrations run automatically when the database is opened; the folder ships with the package.
|
|
36
|
+
|
|
37
|
+
## Licence
|
|
38
|
+
|
|
39
|
+
AGPL-3.0-or-later.
|
package/dist/index.d.mts
CHANGED
|
@@ -1178,7 +1178,7 @@ declare const collectionDefinitions: drizzle_orm_sqlite_core.SQLiteTableWithColu
|
|
|
1178
1178
|
data: {
|
|
1179
1179
|
name: string;
|
|
1180
1180
|
label: string;
|
|
1181
|
-
type: "number" | "boolean" | "
|
|
1181
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
1182
1182
|
required: boolean;
|
|
1183
1183
|
hidden: boolean;
|
|
1184
1184
|
options?: string[] | undefined;
|
|
@@ -1198,7 +1198,7 @@ declare const collectionDefinitions: drizzle_orm_sqlite_core.SQLiteTableWithColu
|
|
|
1198
1198
|
$type: {
|
|
1199
1199
|
name: string;
|
|
1200
1200
|
label: string;
|
|
1201
|
-
type: "number" | "boolean" | "
|
|
1201
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
1202
1202
|
required: boolean;
|
|
1203
1203
|
hidden: boolean;
|
|
1204
1204
|
options?: string[] | undefined;
|
|
@@ -1892,13 +1892,13 @@ declare class UsersService {
|
|
|
1892
1892
|
verifyApiToken(token: string): Promise<boolean>;
|
|
1893
1893
|
revokeApiToken(id: string): Promise<void>;
|
|
1894
1894
|
listApiTokens(): Promise<Pick<{
|
|
1895
|
-
name: string;
|
|
1896
1895
|
id: string;
|
|
1896
|
+
name: string;
|
|
1897
1897
|
createdAt: string;
|
|
1898
1898
|
revokedAt: string | null;
|
|
1899
1899
|
tokenHash: string;
|
|
1900
1900
|
lastUsedAt: string | null;
|
|
1901
|
-
}, "
|
|
1901
|
+
}, "id" | "name" | "createdAt" | "revokedAt" | "lastUsedAt">[]>;
|
|
1902
1902
|
}
|
|
1903
1903
|
|
|
1904
1904
|
/**
|
|
@@ -1920,9 +1920,9 @@ declare const organizationInitDto: z.ZodObject<{
|
|
|
1920
1920
|
syndicate: "syndicate";
|
|
1921
1921
|
other: "other";
|
|
1922
1922
|
}>>;
|
|
1923
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1923
1924
|
name: z.ZodString;
|
|
1924
1925
|
slug: z.ZodString;
|
|
1925
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1926
1926
|
address: z.ZodOptional<z.ZodNullable<z.ZodType<{
|
|
1927
1927
|
street?: string | undefined;
|
|
1928
1928
|
postalCode?: string | undefined;
|
|
@@ -1953,9 +1953,9 @@ declare const organizationUpdateDto: z.ZodObject<{
|
|
|
1953
1953
|
syndicate: "syndicate";
|
|
1954
1954
|
other: "other";
|
|
1955
1955
|
}>>;
|
|
1956
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1956
1957
|
name: z.ZodOptional<z.ZodString>;
|
|
1957
1958
|
slug: z.ZodOptional<z.ZodString>;
|
|
1958
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1959
1959
|
address: z.ZodOptional<z.ZodNullable<z.ZodType<{
|
|
1960
1960
|
street?: string | undefined;
|
|
1961
1961
|
postalCode?: string | undefined;
|
|
@@ -2136,8 +2136,8 @@ declare class EntryRepository {
|
|
|
2136
2136
|
}
|
|
2137
2137
|
|
|
2138
2138
|
declare const definitionCreateDto: z.ZodObject<{
|
|
2139
|
-
name: z.ZodString;
|
|
2140
2139
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2140
|
+
name: z.ZodString;
|
|
2141
2141
|
editor: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
2142
2142
|
display: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
2143
2143
|
headings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
@@ -2147,14 +2147,14 @@ declare const definitionCreateDto: z.ZodObject<{
|
|
|
2147
2147
|
type: z.ZodEnum<{
|
|
2148
2148
|
number: "number";
|
|
2149
2149
|
boolean: "boolean";
|
|
2150
|
+
json: "json";
|
|
2151
|
+
date: "date";
|
|
2150
2152
|
text: "text";
|
|
2153
|
+
select: "select";
|
|
2151
2154
|
"rich-text": "rich-text";
|
|
2152
|
-
date: "date";
|
|
2153
2155
|
media: "media";
|
|
2154
2156
|
relation: "relation";
|
|
2155
|
-
select: "select";
|
|
2156
2157
|
steps: "steps";
|
|
2157
|
-
json: "json";
|
|
2158
2158
|
}>;
|
|
2159
2159
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
2160
2160
|
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2167,9 +2167,9 @@ declare const definitionCreateDto: z.ZodObject<{
|
|
|
2167
2167
|
in: {};
|
|
2168
2168
|
}>;
|
|
2169
2169
|
declare const definitionUpdateDto: z.ZodObject<{
|
|
2170
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2170
2171
|
name: z.ZodOptional<z.ZodString>;
|
|
2171
2172
|
slug: z.ZodOptional<z.ZodString>;
|
|
2172
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2173
2173
|
editor: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
2174
2174
|
display: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
2175
2175
|
headings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
@@ -2179,14 +2179,14 @@ declare const definitionUpdateDto: z.ZodObject<{
|
|
|
2179
2179
|
type: z.ZodEnum<{
|
|
2180
2180
|
number: "number";
|
|
2181
2181
|
boolean: "boolean";
|
|
2182
|
+
json: "json";
|
|
2183
|
+
date: "date";
|
|
2182
2184
|
text: "text";
|
|
2185
|
+
select: "select";
|
|
2183
2186
|
"rich-text": "rich-text";
|
|
2184
|
-
date: "date";
|
|
2185
2187
|
media: "media";
|
|
2186
2188
|
relation: "relation";
|
|
2187
|
-
select: "select";
|
|
2188
2189
|
steps: "steps";
|
|
2189
|
-
json: "json";
|
|
2190
2190
|
}>;
|
|
2191
2191
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
2192
2192
|
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2375,10 +2375,10 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2375
2375
|
input: void;
|
|
2376
2376
|
output: {
|
|
2377
2377
|
type: "commune" | "intercommunality" | "syndicate" | "other";
|
|
2378
|
-
|
|
2378
|
+
description: string | null;
|
|
2379
2379
|
id: number;
|
|
2380
|
+
name: string;
|
|
2380
2381
|
slug: string;
|
|
2381
|
-
description: string | null;
|
|
2382
2382
|
address: {
|
|
2383
2383
|
street?: string | undefined;
|
|
2384
2384
|
postalCode?: string | undefined;
|
|
@@ -2409,10 +2409,10 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2409
2409
|
};
|
|
2410
2410
|
output: {
|
|
2411
2411
|
type: "commune" | "intercommunality" | "syndicate" | "other";
|
|
2412
|
-
|
|
2412
|
+
description: string | null;
|
|
2413
2413
|
id: number;
|
|
2414
|
+
name: string;
|
|
2414
2415
|
slug: string;
|
|
2415
|
-
description: string | null;
|
|
2416
2416
|
address: {
|
|
2417
2417
|
street?: string | undefined;
|
|
2418
2418
|
postalCode?: string | undefined;
|
|
@@ -2430,9 +2430,9 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2430
2430
|
update: _trpc_server.TRPCMutationProcedure<{
|
|
2431
2431
|
input: {
|
|
2432
2432
|
type?: "commune" | "intercommunality" | "syndicate" | "other" | undefined;
|
|
2433
|
+
description?: string | null | undefined;
|
|
2433
2434
|
name?: string | undefined;
|
|
2434
2435
|
slug?: string | undefined;
|
|
2435
|
-
description?: string | null | undefined;
|
|
2436
2436
|
address?: {
|
|
2437
2437
|
street?: string | undefined;
|
|
2438
2438
|
postalCode?: string | undefined;
|
|
@@ -2443,10 +2443,10 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2443
2443
|
};
|
|
2444
2444
|
output: {
|
|
2445
2445
|
type: "commune" | "intercommunality" | "syndicate" | "other";
|
|
2446
|
-
|
|
2446
|
+
description: string | null;
|
|
2447
2447
|
id: number;
|
|
2448
|
+
name: string;
|
|
2448
2449
|
slug: string;
|
|
2449
|
-
description: string | null;
|
|
2450
2450
|
address: {
|
|
2451
2451
|
street?: string | undefined;
|
|
2452
2452
|
postalCode?: string | undefined;
|
|
@@ -2820,13 +2820,13 @@ declare const apiTokensRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2820
2820
|
list: _trpc_server.TRPCQueryProcedure<{
|
|
2821
2821
|
input: void;
|
|
2822
2822
|
output: Pick<{
|
|
2823
|
-
name: string;
|
|
2824
2823
|
id: string;
|
|
2824
|
+
name: string;
|
|
2825
2825
|
createdAt: string;
|
|
2826
2826
|
revokedAt: string | null;
|
|
2827
2827
|
tokenHash: string;
|
|
2828
2828
|
lastUsedAt: string | null;
|
|
2829
|
-
}, "
|
|
2829
|
+
}, "id" | "name" | "createdAt" | "revokedAt" | "lastUsedAt">[];
|
|
2830
2830
|
meta: object;
|
|
2831
2831
|
}>;
|
|
2832
2832
|
/** The plaintext token is returned ONCE — only its hash is stored. */
|
|
@@ -2971,12 +2971,12 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2971
2971
|
metaData?: Record<string, unknown> | undefined;
|
|
2972
2972
|
};
|
|
2973
2973
|
output: {
|
|
2974
|
-
filename: string;
|
|
2975
2974
|
id: string;
|
|
2976
2975
|
updatedBy: string | null;
|
|
2977
2976
|
legacyExtra: Record<string, unknown> | null;
|
|
2978
2977
|
createdAt: string;
|
|
2979
2978
|
updatedAt: string;
|
|
2979
|
+
filename: string;
|
|
2980
2980
|
mime: string;
|
|
2981
2981
|
size: number;
|
|
2982
2982
|
alt: string | null;
|
|
@@ -2990,12 +2990,12 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2990
2990
|
list: _trpc_server.TRPCQueryProcedure<{
|
|
2991
2991
|
input: void;
|
|
2992
2992
|
output: ({
|
|
2993
|
-
filename: string;
|
|
2994
2993
|
id: string;
|
|
2995
2994
|
updatedBy: string | null;
|
|
2996
2995
|
legacyExtra: Record<string, unknown> | null;
|
|
2997
2996
|
createdAt: string;
|
|
2998
2997
|
updatedAt: string;
|
|
2998
|
+
filename: string;
|
|
2999
2999
|
mime: string;
|
|
3000
3000
|
size: number;
|
|
3001
3001
|
alt: string | null;
|
|
@@ -3013,12 +3013,12 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3013
3013
|
id: string;
|
|
3014
3014
|
};
|
|
3015
3015
|
output: {
|
|
3016
|
-
filename: string;
|
|
3017
3016
|
id: string;
|
|
3018
3017
|
updatedBy: string | null;
|
|
3019
3018
|
legacyExtra: Record<string, unknown> | null;
|
|
3020
3019
|
createdAt: string;
|
|
3021
3020
|
updatedAt: string;
|
|
3021
|
+
filename: string;
|
|
3022
3022
|
mime: string;
|
|
3023
3023
|
size: number;
|
|
3024
3024
|
alt: string | null;
|
|
@@ -3041,12 +3041,12 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3041
3041
|
};
|
|
3042
3042
|
};
|
|
3043
3043
|
output: {
|
|
3044
|
-
filename: string;
|
|
3045
3044
|
id: string;
|
|
3046
3045
|
updatedBy: string | null;
|
|
3047
3046
|
legacyExtra: Record<string, unknown> | null;
|
|
3048
3047
|
createdAt: string;
|
|
3049
3048
|
updatedAt: string;
|
|
3049
|
+
filename: string;
|
|
3050
3050
|
mime: string;
|
|
3051
3051
|
size: number;
|
|
3052
3052
|
alt: string | null;
|
|
@@ -3136,10 +3136,10 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3136
3136
|
list: _trpc_server.TRPCQueryProcedure<{
|
|
3137
3137
|
input: void;
|
|
3138
3138
|
output: {
|
|
3139
|
-
|
|
3139
|
+
description: string | null;
|
|
3140
3140
|
id: string;
|
|
3141
|
+
name: string;
|
|
3141
3142
|
slug: string;
|
|
3142
|
-
description: string | null;
|
|
3143
3143
|
updatedBy: string | null;
|
|
3144
3144
|
legacyExtra: Record<string, unknown> | null;
|
|
3145
3145
|
createdAt: string;
|
|
@@ -3148,7 +3148,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3148
3148
|
fields: {
|
|
3149
3149
|
name: string;
|
|
3150
3150
|
label: string;
|
|
3151
|
-
type: "number" | "boolean" | "
|
|
3151
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3152
3152
|
required: boolean;
|
|
3153
3153
|
hidden: boolean;
|
|
3154
3154
|
options?: string[] | undefined;
|
|
@@ -3165,10 +3165,10 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3165
3165
|
idOrSlug: string;
|
|
3166
3166
|
};
|
|
3167
3167
|
output: {
|
|
3168
|
-
|
|
3168
|
+
description: string | null;
|
|
3169
3169
|
id: string;
|
|
3170
|
+
name: string;
|
|
3170
3171
|
slug: string;
|
|
3171
|
-
description: string | null;
|
|
3172
3172
|
updatedBy: string | null;
|
|
3173
3173
|
legacyExtra: Record<string, unknown> | null;
|
|
3174
3174
|
createdAt: string;
|
|
@@ -3177,7 +3177,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3177
3177
|
fields: {
|
|
3178
3178
|
name: string;
|
|
3179
3179
|
label: string;
|
|
3180
|
-
type: "number" | "boolean" | "
|
|
3180
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3181
3181
|
required: boolean;
|
|
3182
3182
|
hidden: boolean;
|
|
3183
3183
|
options?: string[] | undefined;
|
|
@@ -3195,7 +3195,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3195
3195
|
fields: {
|
|
3196
3196
|
name: string;
|
|
3197
3197
|
label: string;
|
|
3198
|
-
type: "number" | "boolean" | "
|
|
3198
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3199
3199
|
required?: boolean | undefined;
|
|
3200
3200
|
hidden?: boolean | undefined;
|
|
3201
3201
|
options?: string[] | undefined;
|
|
@@ -3208,10 +3208,10 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3208
3208
|
slug?: string | undefined;
|
|
3209
3209
|
};
|
|
3210
3210
|
output: {
|
|
3211
|
-
|
|
3211
|
+
description: string | null;
|
|
3212
3212
|
id: string;
|
|
3213
|
+
name: string;
|
|
3213
3214
|
slug: string;
|
|
3214
|
-
description: string | null;
|
|
3215
3215
|
updatedBy: string | null;
|
|
3216
3216
|
legacyExtra: Record<string, unknown> | null;
|
|
3217
3217
|
createdAt: string;
|
|
@@ -3220,7 +3220,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3220
3220
|
fields: {
|
|
3221
3221
|
name: string;
|
|
3222
3222
|
label: string;
|
|
3223
|
-
type: "number" | "boolean" | "
|
|
3223
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3224
3224
|
required: boolean;
|
|
3225
3225
|
hidden: boolean;
|
|
3226
3226
|
options?: string[] | undefined;
|
|
@@ -3236,16 +3236,16 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3236
3236
|
input: {
|
|
3237
3237
|
id: string;
|
|
3238
3238
|
data: {
|
|
3239
|
+
description?: string | null | undefined;
|
|
3239
3240
|
name?: string | undefined;
|
|
3240
3241
|
slug?: string | undefined;
|
|
3241
|
-
description?: string | null | undefined;
|
|
3242
3242
|
editor?: Record<string, unknown> | null | undefined;
|
|
3243
3243
|
display?: Record<string, unknown> | null | undefined;
|
|
3244
3244
|
headings?: Record<string, unknown> | null | undefined;
|
|
3245
3245
|
fields?: {
|
|
3246
3246
|
name: string;
|
|
3247
3247
|
label: string;
|
|
3248
|
-
type: "number" | "boolean" | "
|
|
3248
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3249
3249
|
required?: boolean | undefined;
|
|
3250
3250
|
hidden?: boolean | undefined;
|
|
3251
3251
|
options?: string[] | undefined;
|
|
@@ -3254,10 +3254,10 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3254
3254
|
};
|
|
3255
3255
|
};
|
|
3256
3256
|
output: {
|
|
3257
|
-
|
|
3257
|
+
description: string | null;
|
|
3258
3258
|
id: string;
|
|
3259
|
+
name: string;
|
|
3259
3260
|
slug: string;
|
|
3260
|
-
description: string | null;
|
|
3261
3261
|
updatedBy: string | null;
|
|
3262
3262
|
legacyExtra: Record<string, unknown> | null;
|
|
3263
3263
|
createdAt: string;
|
|
@@ -3266,7 +3266,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3266
3266
|
fields: {
|
|
3267
3267
|
name: string;
|
|
3268
3268
|
label: string;
|
|
3269
|
-
type: "number" | "boolean" | "
|
|
3269
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3270
3270
|
required: boolean;
|
|
3271
3271
|
hidden: boolean;
|
|
3272
3272
|
options?: string[] | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1178,7 +1178,7 @@ declare const collectionDefinitions: drizzle_orm_sqlite_core.SQLiteTableWithColu
|
|
|
1178
1178
|
data: {
|
|
1179
1179
|
name: string;
|
|
1180
1180
|
label: string;
|
|
1181
|
-
type: "number" | "boolean" | "
|
|
1181
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
1182
1182
|
required: boolean;
|
|
1183
1183
|
hidden: boolean;
|
|
1184
1184
|
options?: string[] | undefined;
|
|
@@ -1198,7 +1198,7 @@ declare const collectionDefinitions: drizzle_orm_sqlite_core.SQLiteTableWithColu
|
|
|
1198
1198
|
$type: {
|
|
1199
1199
|
name: string;
|
|
1200
1200
|
label: string;
|
|
1201
|
-
type: "number" | "boolean" | "
|
|
1201
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
1202
1202
|
required: boolean;
|
|
1203
1203
|
hidden: boolean;
|
|
1204
1204
|
options?: string[] | undefined;
|
|
@@ -1892,13 +1892,13 @@ declare class UsersService {
|
|
|
1892
1892
|
verifyApiToken(token: string): Promise<boolean>;
|
|
1893
1893
|
revokeApiToken(id: string): Promise<void>;
|
|
1894
1894
|
listApiTokens(): Promise<Pick<{
|
|
1895
|
-
name: string;
|
|
1896
1895
|
id: string;
|
|
1896
|
+
name: string;
|
|
1897
1897
|
createdAt: string;
|
|
1898
1898
|
revokedAt: string | null;
|
|
1899
1899
|
tokenHash: string;
|
|
1900
1900
|
lastUsedAt: string | null;
|
|
1901
|
-
}, "
|
|
1901
|
+
}, "id" | "name" | "createdAt" | "revokedAt" | "lastUsedAt">[]>;
|
|
1902
1902
|
}
|
|
1903
1903
|
|
|
1904
1904
|
/**
|
|
@@ -1920,9 +1920,9 @@ declare const organizationInitDto: z.ZodObject<{
|
|
|
1920
1920
|
syndicate: "syndicate";
|
|
1921
1921
|
other: "other";
|
|
1922
1922
|
}>>;
|
|
1923
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1923
1924
|
name: z.ZodString;
|
|
1924
1925
|
slug: z.ZodString;
|
|
1925
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1926
1926
|
address: z.ZodOptional<z.ZodNullable<z.ZodType<{
|
|
1927
1927
|
street?: string | undefined;
|
|
1928
1928
|
postalCode?: string | undefined;
|
|
@@ -1953,9 +1953,9 @@ declare const organizationUpdateDto: z.ZodObject<{
|
|
|
1953
1953
|
syndicate: "syndicate";
|
|
1954
1954
|
other: "other";
|
|
1955
1955
|
}>>;
|
|
1956
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1956
1957
|
name: z.ZodOptional<z.ZodString>;
|
|
1957
1958
|
slug: z.ZodOptional<z.ZodString>;
|
|
1958
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1959
1959
|
address: z.ZodOptional<z.ZodNullable<z.ZodType<{
|
|
1960
1960
|
street?: string | undefined;
|
|
1961
1961
|
postalCode?: string | undefined;
|
|
@@ -2136,8 +2136,8 @@ declare class EntryRepository {
|
|
|
2136
2136
|
}
|
|
2137
2137
|
|
|
2138
2138
|
declare const definitionCreateDto: z.ZodObject<{
|
|
2139
|
-
name: z.ZodString;
|
|
2140
2139
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2140
|
+
name: z.ZodString;
|
|
2141
2141
|
editor: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
2142
2142
|
display: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
2143
2143
|
headings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
@@ -2147,14 +2147,14 @@ declare const definitionCreateDto: z.ZodObject<{
|
|
|
2147
2147
|
type: z.ZodEnum<{
|
|
2148
2148
|
number: "number";
|
|
2149
2149
|
boolean: "boolean";
|
|
2150
|
+
json: "json";
|
|
2151
|
+
date: "date";
|
|
2150
2152
|
text: "text";
|
|
2153
|
+
select: "select";
|
|
2151
2154
|
"rich-text": "rich-text";
|
|
2152
|
-
date: "date";
|
|
2153
2155
|
media: "media";
|
|
2154
2156
|
relation: "relation";
|
|
2155
|
-
select: "select";
|
|
2156
2157
|
steps: "steps";
|
|
2157
|
-
json: "json";
|
|
2158
2158
|
}>;
|
|
2159
2159
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
2160
2160
|
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2167,9 +2167,9 @@ declare const definitionCreateDto: z.ZodObject<{
|
|
|
2167
2167
|
in: {};
|
|
2168
2168
|
}>;
|
|
2169
2169
|
declare const definitionUpdateDto: z.ZodObject<{
|
|
2170
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2170
2171
|
name: z.ZodOptional<z.ZodString>;
|
|
2171
2172
|
slug: z.ZodOptional<z.ZodString>;
|
|
2172
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2173
2173
|
editor: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
2174
2174
|
display: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
2175
2175
|
headings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
@@ -2179,14 +2179,14 @@ declare const definitionUpdateDto: z.ZodObject<{
|
|
|
2179
2179
|
type: z.ZodEnum<{
|
|
2180
2180
|
number: "number";
|
|
2181
2181
|
boolean: "boolean";
|
|
2182
|
+
json: "json";
|
|
2183
|
+
date: "date";
|
|
2182
2184
|
text: "text";
|
|
2185
|
+
select: "select";
|
|
2183
2186
|
"rich-text": "rich-text";
|
|
2184
|
-
date: "date";
|
|
2185
2187
|
media: "media";
|
|
2186
2188
|
relation: "relation";
|
|
2187
|
-
select: "select";
|
|
2188
2189
|
steps: "steps";
|
|
2189
|
-
json: "json";
|
|
2190
2190
|
}>;
|
|
2191
2191
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
2192
2192
|
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2375,10 +2375,10 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2375
2375
|
input: void;
|
|
2376
2376
|
output: {
|
|
2377
2377
|
type: "commune" | "intercommunality" | "syndicate" | "other";
|
|
2378
|
-
|
|
2378
|
+
description: string | null;
|
|
2379
2379
|
id: number;
|
|
2380
|
+
name: string;
|
|
2380
2381
|
slug: string;
|
|
2381
|
-
description: string | null;
|
|
2382
2382
|
address: {
|
|
2383
2383
|
street?: string | undefined;
|
|
2384
2384
|
postalCode?: string | undefined;
|
|
@@ -2409,10 +2409,10 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2409
2409
|
};
|
|
2410
2410
|
output: {
|
|
2411
2411
|
type: "commune" | "intercommunality" | "syndicate" | "other";
|
|
2412
|
-
|
|
2412
|
+
description: string | null;
|
|
2413
2413
|
id: number;
|
|
2414
|
+
name: string;
|
|
2414
2415
|
slug: string;
|
|
2415
|
-
description: string | null;
|
|
2416
2416
|
address: {
|
|
2417
2417
|
street?: string | undefined;
|
|
2418
2418
|
postalCode?: string | undefined;
|
|
@@ -2430,9 +2430,9 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2430
2430
|
update: _trpc_server.TRPCMutationProcedure<{
|
|
2431
2431
|
input: {
|
|
2432
2432
|
type?: "commune" | "intercommunality" | "syndicate" | "other" | undefined;
|
|
2433
|
+
description?: string | null | undefined;
|
|
2433
2434
|
name?: string | undefined;
|
|
2434
2435
|
slug?: string | undefined;
|
|
2435
|
-
description?: string | null | undefined;
|
|
2436
2436
|
address?: {
|
|
2437
2437
|
street?: string | undefined;
|
|
2438
2438
|
postalCode?: string | undefined;
|
|
@@ -2443,10 +2443,10 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2443
2443
|
};
|
|
2444
2444
|
output: {
|
|
2445
2445
|
type: "commune" | "intercommunality" | "syndicate" | "other";
|
|
2446
|
-
|
|
2446
|
+
description: string | null;
|
|
2447
2447
|
id: number;
|
|
2448
|
+
name: string;
|
|
2448
2449
|
slug: string;
|
|
2449
|
-
description: string | null;
|
|
2450
2450
|
address: {
|
|
2451
2451
|
street?: string | undefined;
|
|
2452
2452
|
postalCode?: string | undefined;
|
|
@@ -2820,13 +2820,13 @@ declare const apiTokensRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2820
2820
|
list: _trpc_server.TRPCQueryProcedure<{
|
|
2821
2821
|
input: void;
|
|
2822
2822
|
output: Pick<{
|
|
2823
|
-
name: string;
|
|
2824
2823
|
id: string;
|
|
2824
|
+
name: string;
|
|
2825
2825
|
createdAt: string;
|
|
2826
2826
|
revokedAt: string | null;
|
|
2827
2827
|
tokenHash: string;
|
|
2828
2828
|
lastUsedAt: string | null;
|
|
2829
|
-
}, "
|
|
2829
|
+
}, "id" | "name" | "createdAt" | "revokedAt" | "lastUsedAt">[];
|
|
2830
2830
|
meta: object;
|
|
2831
2831
|
}>;
|
|
2832
2832
|
/** The plaintext token is returned ONCE — only its hash is stored. */
|
|
@@ -2971,12 +2971,12 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2971
2971
|
metaData?: Record<string, unknown> | undefined;
|
|
2972
2972
|
};
|
|
2973
2973
|
output: {
|
|
2974
|
-
filename: string;
|
|
2975
2974
|
id: string;
|
|
2976
2975
|
updatedBy: string | null;
|
|
2977
2976
|
legacyExtra: Record<string, unknown> | null;
|
|
2978
2977
|
createdAt: string;
|
|
2979
2978
|
updatedAt: string;
|
|
2979
|
+
filename: string;
|
|
2980
2980
|
mime: string;
|
|
2981
2981
|
size: number;
|
|
2982
2982
|
alt: string | null;
|
|
@@ -2990,12 +2990,12 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
2990
2990
|
list: _trpc_server.TRPCQueryProcedure<{
|
|
2991
2991
|
input: void;
|
|
2992
2992
|
output: ({
|
|
2993
|
-
filename: string;
|
|
2994
2993
|
id: string;
|
|
2995
2994
|
updatedBy: string | null;
|
|
2996
2995
|
legacyExtra: Record<string, unknown> | null;
|
|
2997
2996
|
createdAt: string;
|
|
2998
2997
|
updatedAt: string;
|
|
2998
|
+
filename: string;
|
|
2999
2999
|
mime: string;
|
|
3000
3000
|
size: number;
|
|
3001
3001
|
alt: string | null;
|
|
@@ -3013,12 +3013,12 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3013
3013
|
id: string;
|
|
3014
3014
|
};
|
|
3015
3015
|
output: {
|
|
3016
|
-
filename: string;
|
|
3017
3016
|
id: string;
|
|
3018
3017
|
updatedBy: string | null;
|
|
3019
3018
|
legacyExtra: Record<string, unknown> | null;
|
|
3020
3019
|
createdAt: string;
|
|
3021
3020
|
updatedAt: string;
|
|
3021
|
+
filename: string;
|
|
3022
3022
|
mime: string;
|
|
3023
3023
|
size: number;
|
|
3024
3024
|
alt: string | null;
|
|
@@ -3041,12 +3041,12 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3041
3041
|
};
|
|
3042
3042
|
};
|
|
3043
3043
|
output: {
|
|
3044
|
-
filename: string;
|
|
3045
3044
|
id: string;
|
|
3046
3045
|
updatedBy: string | null;
|
|
3047
3046
|
legacyExtra: Record<string, unknown> | null;
|
|
3048
3047
|
createdAt: string;
|
|
3049
3048
|
updatedAt: string;
|
|
3049
|
+
filename: string;
|
|
3050
3050
|
mime: string;
|
|
3051
3051
|
size: number;
|
|
3052
3052
|
alt: string | null;
|
|
@@ -3136,10 +3136,10 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3136
3136
|
list: _trpc_server.TRPCQueryProcedure<{
|
|
3137
3137
|
input: void;
|
|
3138
3138
|
output: {
|
|
3139
|
-
|
|
3139
|
+
description: string | null;
|
|
3140
3140
|
id: string;
|
|
3141
|
+
name: string;
|
|
3141
3142
|
slug: string;
|
|
3142
|
-
description: string | null;
|
|
3143
3143
|
updatedBy: string | null;
|
|
3144
3144
|
legacyExtra: Record<string, unknown> | null;
|
|
3145
3145
|
createdAt: string;
|
|
@@ -3148,7 +3148,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3148
3148
|
fields: {
|
|
3149
3149
|
name: string;
|
|
3150
3150
|
label: string;
|
|
3151
|
-
type: "number" | "boolean" | "
|
|
3151
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3152
3152
|
required: boolean;
|
|
3153
3153
|
hidden: boolean;
|
|
3154
3154
|
options?: string[] | undefined;
|
|
@@ -3165,10 +3165,10 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3165
3165
|
idOrSlug: string;
|
|
3166
3166
|
};
|
|
3167
3167
|
output: {
|
|
3168
|
-
|
|
3168
|
+
description: string | null;
|
|
3169
3169
|
id: string;
|
|
3170
|
+
name: string;
|
|
3170
3171
|
slug: string;
|
|
3171
|
-
description: string | null;
|
|
3172
3172
|
updatedBy: string | null;
|
|
3173
3173
|
legacyExtra: Record<string, unknown> | null;
|
|
3174
3174
|
createdAt: string;
|
|
@@ -3177,7 +3177,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3177
3177
|
fields: {
|
|
3178
3178
|
name: string;
|
|
3179
3179
|
label: string;
|
|
3180
|
-
type: "number" | "boolean" | "
|
|
3180
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3181
3181
|
required: boolean;
|
|
3182
3182
|
hidden: boolean;
|
|
3183
3183
|
options?: string[] | undefined;
|
|
@@ -3195,7 +3195,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3195
3195
|
fields: {
|
|
3196
3196
|
name: string;
|
|
3197
3197
|
label: string;
|
|
3198
|
-
type: "number" | "boolean" | "
|
|
3198
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3199
3199
|
required?: boolean | undefined;
|
|
3200
3200
|
hidden?: boolean | undefined;
|
|
3201
3201
|
options?: string[] | undefined;
|
|
@@ -3208,10 +3208,10 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3208
3208
|
slug?: string | undefined;
|
|
3209
3209
|
};
|
|
3210
3210
|
output: {
|
|
3211
|
-
|
|
3211
|
+
description: string | null;
|
|
3212
3212
|
id: string;
|
|
3213
|
+
name: string;
|
|
3213
3214
|
slug: string;
|
|
3214
|
-
description: string | null;
|
|
3215
3215
|
updatedBy: string | null;
|
|
3216
3216
|
legacyExtra: Record<string, unknown> | null;
|
|
3217
3217
|
createdAt: string;
|
|
@@ -3220,7 +3220,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3220
3220
|
fields: {
|
|
3221
3221
|
name: string;
|
|
3222
3222
|
label: string;
|
|
3223
|
-
type: "number" | "boolean" | "
|
|
3223
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3224
3224
|
required: boolean;
|
|
3225
3225
|
hidden: boolean;
|
|
3226
3226
|
options?: string[] | undefined;
|
|
@@ -3236,16 +3236,16 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3236
3236
|
input: {
|
|
3237
3237
|
id: string;
|
|
3238
3238
|
data: {
|
|
3239
|
+
description?: string | null | undefined;
|
|
3239
3240
|
name?: string | undefined;
|
|
3240
3241
|
slug?: string | undefined;
|
|
3241
|
-
description?: string | null | undefined;
|
|
3242
3242
|
editor?: Record<string, unknown> | null | undefined;
|
|
3243
3243
|
display?: Record<string, unknown> | null | undefined;
|
|
3244
3244
|
headings?: Record<string, unknown> | null | undefined;
|
|
3245
3245
|
fields?: {
|
|
3246
3246
|
name: string;
|
|
3247
3247
|
label: string;
|
|
3248
|
-
type: "number" | "boolean" | "
|
|
3248
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3249
3249
|
required?: boolean | undefined;
|
|
3250
3250
|
hidden?: boolean | undefined;
|
|
3251
3251
|
options?: string[] | undefined;
|
|
@@ -3254,10 +3254,10 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3254
3254
|
};
|
|
3255
3255
|
};
|
|
3256
3256
|
output: {
|
|
3257
|
-
|
|
3257
|
+
description: string | null;
|
|
3258
3258
|
id: string;
|
|
3259
|
+
name: string;
|
|
3259
3260
|
slug: string;
|
|
3260
|
-
description: string | null;
|
|
3261
3261
|
updatedBy: string | null;
|
|
3262
3262
|
legacyExtra: Record<string, unknown> | null;
|
|
3263
3263
|
createdAt: string;
|
|
@@ -3266,7 +3266,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
3266
3266
|
fields: {
|
|
3267
3267
|
name: string;
|
|
3268
3268
|
label: string;
|
|
3269
|
-
type: "number" | "boolean" | "
|
|
3269
|
+
type: "number" | "boolean" | "json" | "date" | "text" | "select" | "rich-text" | "media" | "relation" | "steps";
|
|
3270
3270
|
required: boolean;
|
|
3271
3271
|
hidden: boolean;
|
|
3272
3272
|
options?: string[] | undefined;
|
package/package.json
CHANGED