@kyro-cms/core 0.11.6 → 0.12.1
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/dist/{WebhookService-BoHm8roq.d.cts → WebhookService-DRQLv_jR.d.cts} +34 -2
- package/dist/{WebhookService-0D8rBDOw.d.ts → WebhookService-DTNKXpXp.d.ts} +34 -2
- package/dist/api-handler-graphql.cjs +1 -1
- package/dist/api-handler-graphql.js +1 -1
- package/dist/api-handler-trpc.cjs +1 -1
- package/dist/api-handler-trpc.js +1 -1
- package/dist/api-handler.cjs +1 -1
- package/dist/api-handler.js +1 -1
- package/dist/{base-D_gWzhL1.d.ts → base-BKGB0Y3W.d.ts} +7 -7
- package/dist/{base-m1Y9PVG6.d.cts → base-Dk6eKGJJ.d.cts} +7 -7
- package/dist/chunk-4RSGPSKQ.js +3 -0
- package/dist/{chunk-GJQH6NV7.js → chunk-5BPMMIAQ.js} +1 -1
- package/dist/chunk-5KGQOTLK.cjs +133 -0
- package/dist/chunk-76RLJA6S.js +133 -0
- package/dist/chunk-APQOYPRT.cjs +86 -0
- package/dist/{chunk-CAD6VWL5.js → chunk-BRAWV32L.js} +1 -1
- package/dist/{chunk-W4ZDETHA.cjs → chunk-EJDIR56C.cjs} +1 -1
- package/dist/{chunk-BDBN4RN6.cjs → chunk-ER2PUSHG.cjs} +1 -1
- package/dist/{chunk-MOMALAYX.cjs → chunk-FKTZLM2C.cjs} +1 -1
- package/dist/{chunk-F7SR5IDT.cjs → chunk-G3J2EU5D.cjs} +1 -1
- package/dist/{chunk-SL3LZQCF.js → chunk-GKYEJ2UF.js} +1 -1
- package/dist/chunk-HQND27DT.cjs +21 -0
- package/dist/chunk-HS2KNFAB.cjs +2 -0
- package/dist/{chunk-PFT4OMNK.js → chunk-INB4LNA6.js} +2 -2
- package/dist/chunk-KG7V6O2Z.js +2 -0
- package/dist/chunk-PP7W5UKL.js +2 -0
- package/dist/chunk-QMPMY2WI.js +86 -0
- package/dist/chunk-RCV2TLOG.cjs +3 -0
- package/dist/chunk-SK2Q4PRV.cjs +90 -0
- package/dist/{chunk-4YYBWCDJ.js → chunk-TQNM4C7H.js} +1 -1
- package/dist/{chunk-DNLO7PK6.cjs → chunk-UCCFT5OO.cjs} +1 -1
- package/dist/chunk-WE46GGL4.cjs +2 -0
- package/dist/chunk-WRSQOKRF.js +21 -0
- package/dist/chunk-YPDRUVWG.js +2 -0
- package/dist/client.cjs +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/dist/drizzle/index.cjs +1 -1
- package/dist/drizzle/index.d.cts +7 -7
- package/dist/drizzle/index.d.ts +7 -7
- package/dist/drizzle/index.js +1 -1
- package/dist/fields/index.cjs +1 -1
- package/dist/fields/index.d.cts +2 -2
- package/dist/fields/index.d.ts +2 -2
- package/dist/fields/index.js +1 -1
- package/dist/graphql/index.cjs +1 -1
- package/dist/graphql/index.d.cts +8 -8
- package/dist/graphql/index.d.ts +8 -8
- package/dist/graphql/index.js +1 -1
- package/dist/{index-DpuTMOei.d.cts → index-cBgeiKp1.d.ts} +7 -2
- package/dist/{index-wsdh-ul-.d.ts → index-yPGko8UV.d.cts} +7 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +19 -35
- package/dist/index.d.ts +19 -35
- package/dist/index.js +2 -2
- package/dist/mongodb/index.cjs +1 -1
- package/dist/mongodb/index.d.cts +7 -7
- package/dist/mongodb/index.d.ts +7 -7
- package/dist/mongodb/index.js +1 -1
- package/dist/rest/index.cjs +1 -1
- package/dist/rest/index.d.cts +6 -6
- package/dist/rest/index.d.ts +6 -6
- package/dist/rest/index.js +1 -1
- package/dist/templates/index.cjs +1 -1
- package/dist/templates/index.d.cts +2 -2
- package/dist/templates/index.d.ts +2 -2
- package/dist/templates/index.js +1 -1
- package/dist/trpc/index.cjs +1 -1
- package/dist/trpc/index.d.cts +5 -5
- package/dist/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +1 -1
- package/dist/{types-Cxb3Ukwl.d.ts → types-Bj3d_ys8.d.ts} +15 -15
- package/dist/{types-CGQSckv0.d.cts → types-BowAPGjD.d.cts} +15 -15
- package/dist/{types-CIJsFuvf.d.cts → types-fvldOd92.d.cts} +17 -7
- package/dist/{types-CIJsFuvf.d.ts → types-fvldOd92.d.ts} +17 -7
- package/dist/ws/index.cjs +1 -1
- package/dist/ws/index.d.cts +4 -4
- package/dist/ws/index.d.ts +4 -4
- package/dist/ws/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-43U2NBVS.cjs +0 -86
- package/dist/chunk-4FV3HQBI.cjs +0 -1
- package/dist/chunk-6CF7WF64.cjs +0 -90
- package/dist/chunk-7ORSLR3S.js +0 -2
- package/dist/chunk-FCPFEHTM.cjs +0 -3
- package/dist/chunk-FU5JJVYA.js +0 -3
- package/dist/chunk-HM2Y4R77.js +0 -21
- package/dist/chunk-MTFJDAPX.js +0 -133
- package/dist/chunk-O7FYIPJW.cjs +0 -2
- package/dist/chunk-QAJS4EXW.cjs +0 -133
- package/dist/chunk-QEKTGNUJ.cjs +0 -21
- package/dist/chunk-QIP7PY2U.js +0 -1
- package/dist/chunk-V465K673.js +0 -86
- package/dist/chunk-XQPYBNIT.js +0 -2
package/dist/trpc/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as BaseAdapter, R as Request, i as User, b as FindResult } from '../types-
|
|
2
|
-
import {
|
|
3
|
-
import '../types-
|
|
1
|
+
import { B as BaseAdapter, R as Request, i as User, b as FindResult } from '../types-BowAPGjD.cjs';
|
|
2
|
+
import { j as createWebhookService } from '../WebhookService-DRQLv_jR.cjs';
|
|
3
|
+
import '../types-fvldOd92.cjs';
|
|
4
4
|
|
|
5
5
|
interface ApiKeyContext {
|
|
6
6
|
userId: string;
|
|
@@ -14,7 +14,7 @@ interface KyroContext {
|
|
|
14
14
|
db: BaseAdapter;
|
|
15
15
|
registry: any;
|
|
16
16
|
user?: User;
|
|
17
|
-
|
|
17
|
+
tenantId?: string;
|
|
18
18
|
req: Request;
|
|
19
19
|
apiKey?: ApiKeyContext;
|
|
20
20
|
webhookService?: ReturnType<typeof createWebhookService>;
|
|
@@ -26,7 +26,7 @@ declare function createContext(options: {
|
|
|
26
26
|
registry: any;
|
|
27
27
|
req: Request;
|
|
28
28
|
user?: User;
|
|
29
|
-
|
|
29
|
+
tenantId?: string;
|
|
30
30
|
settings?: Record<string, any>;
|
|
31
31
|
}): Promise<KyroContext>;
|
|
32
32
|
|
package/dist/trpc/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as BaseAdapter, R as Request, i as User, b as FindResult } from '../types-
|
|
2
|
-
import {
|
|
3
|
-
import '../types-
|
|
1
|
+
import { B as BaseAdapter, R as Request, i as User, b as FindResult } from '../types-Bj3d_ys8.js';
|
|
2
|
+
import { j as createWebhookService } from '../WebhookService-DTNKXpXp.js';
|
|
3
|
+
import '../types-fvldOd92.js';
|
|
4
4
|
|
|
5
5
|
interface ApiKeyContext {
|
|
6
6
|
userId: string;
|
|
@@ -14,7 +14,7 @@ interface KyroContext {
|
|
|
14
14
|
db: BaseAdapter;
|
|
15
15
|
registry: any;
|
|
16
16
|
user?: User;
|
|
17
|
-
|
|
17
|
+
tenantId?: string;
|
|
18
18
|
req: Request;
|
|
19
19
|
apiKey?: ApiKeyContext;
|
|
20
20
|
webhookService?: ReturnType<typeof createWebhookService>;
|
|
@@ -26,7 +26,7 @@ declare function createContext(options: {
|
|
|
26
26
|
registry: any;
|
|
27
27
|
req: Request;
|
|
28
28
|
user?: User;
|
|
29
|
-
|
|
29
|
+
tenantId?: string;
|
|
30
30
|
settings?: Record<string, any>;
|
|
31
31
|
}): Promise<KyroContext>;
|
|
32
32
|
|
package/dist/trpc/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as createContext,g as createCountProcedure,d as createCreateProcedure,f as createDeleteProcedure,h as createDynamicRouter,c as createFindByIDProcedure,b as createFindProcedure,i as createKyroServer,e as createUpdateProcedure}from'../chunk-
|
|
1
|
+
export{a as createContext,g as createCountProcedure,d as createCreateProcedure,f as createDeleteProcedure,h as createDynamicRouter,c as createFindByIDProcedure,b as createFindProcedure,i as createKyroServer,e as createUpdateProcedure}from'../chunk-5BPMMIAQ.js';import'../chunk-KG7V6O2Z.js';import'../chunk-HLSB2MCK.js';import'../chunk-KDNYHLD2.js';import'../chunk-5J6HXUF6.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Field } from './types-
|
|
1
|
+
import { F as Field } from './types-fvldOd92.js';
|
|
2
2
|
|
|
3
3
|
interface Request {
|
|
4
4
|
body?: any;
|
|
@@ -12,7 +12,7 @@ interface User {
|
|
|
12
12
|
id: string;
|
|
13
13
|
email: string;
|
|
14
14
|
role: string;
|
|
15
|
-
|
|
15
|
+
tenantId?: string;
|
|
16
16
|
[key: string]: any;
|
|
17
17
|
}
|
|
18
18
|
interface HookArgs<T = any> {
|
|
@@ -24,7 +24,7 @@ interface HookArgs<T = any> {
|
|
|
24
24
|
req: Request;
|
|
25
25
|
user?: User;
|
|
26
26
|
operation: 'create' | 'read' | 'update' | 'delete';
|
|
27
|
-
|
|
27
|
+
tenantId?: string;
|
|
28
28
|
field?: string;
|
|
29
29
|
siblingData?: Record<string, any>;
|
|
30
30
|
value?: any;
|
|
@@ -71,7 +71,7 @@ interface AccessArgs {
|
|
|
71
71
|
data?: unknown;
|
|
72
72
|
doc?: unknown;
|
|
73
73
|
id?: string;
|
|
74
|
-
|
|
74
|
+
tenantId?: string;
|
|
75
75
|
context?: Record<string, unknown>;
|
|
76
76
|
}
|
|
77
77
|
type AccessControl = boolean | ((args: AccessArgs) => Promise<boolean | WhereClause> | boolean | WhereClause);
|
|
@@ -247,7 +247,7 @@ interface FindArgs {
|
|
|
247
247
|
limit?: number;
|
|
248
248
|
page?: number;
|
|
249
249
|
depth?: number;
|
|
250
|
-
|
|
250
|
+
tenantId?: string;
|
|
251
251
|
select?: string[];
|
|
252
252
|
user?: any;
|
|
253
253
|
context?: Record<string, any>;
|
|
@@ -259,7 +259,7 @@ interface FindByIDArgs {
|
|
|
259
259
|
collection: string;
|
|
260
260
|
id: string;
|
|
261
261
|
depth?: number;
|
|
262
|
-
|
|
262
|
+
tenantId?: string;
|
|
263
263
|
select?: string[];
|
|
264
264
|
user?: any;
|
|
265
265
|
context?: Record<string, any>;
|
|
@@ -271,7 +271,7 @@ interface CreateArgs {
|
|
|
271
271
|
collection: string;
|
|
272
272
|
data: Record<string, any>;
|
|
273
273
|
depth?: number;
|
|
274
|
-
|
|
274
|
+
tenantId?: string;
|
|
275
275
|
select?: string[];
|
|
276
276
|
user?: any;
|
|
277
277
|
context?: Record<string, any>;
|
|
@@ -282,7 +282,7 @@ interface UpdateArgs {
|
|
|
282
282
|
id: string;
|
|
283
283
|
data: Record<string, any>;
|
|
284
284
|
depth?: number;
|
|
285
|
-
|
|
285
|
+
tenantId?: string;
|
|
286
286
|
select?: string[];
|
|
287
287
|
user?: any;
|
|
288
288
|
context?: Record<string, any>;
|
|
@@ -291,7 +291,7 @@ interface UpdateArgs {
|
|
|
291
291
|
interface DeleteArgs {
|
|
292
292
|
collection: string;
|
|
293
293
|
id: string;
|
|
294
|
-
|
|
294
|
+
tenantId?: string;
|
|
295
295
|
user?: any;
|
|
296
296
|
context?: Record<string, any>;
|
|
297
297
|
overrideAccess?: boolean;
|
|
@@ -336,14 +336,14 @@ interface CreateVersionArgs<T = Record<string, any>> {
|
|
|
336
336
|
status: DocumentStatus;
|
|
337
337
|
createdBy?: string;
|
|
338
338
|
changeDescription?: string;
|
|
339
|
-
|
|
339
|
+
tenantId?: string;
|
|
340
340
|
/** When true, reuses a single version slot (find existing + update) */
|
|
341
341
|
autosave?: boolean;
|
|
342
342
|
}
|
|
343
343
|
interface FindVersionsArgs {
|
|
344
344
|
collection: string;
|
|
345
345
|
documentId: string;
|
|
346
|
-
|
|
346
|
+
tenantId?: string;
|
|
347
347
|
limit?: number;
|
|
348
348
|
page?: number;
|
|
349
349
|
sort?: string;
|
|
@@ -358,26 +358,26 @@ interface BaseAdapter {
|
|
|
358
358
|
count(args: {
|
|
359
359
|
collection: string;
|
|
360
360
|
where?: Record<string, any>;
|
|
361
|
-
|
|
361
|
+
tenantId?: string;
|
|
362
362
|
}): Promise<number>;
|
|
363
363
|
findOne(args: {
|
|
364
364
|
collection: string;
|
|
365
365
|
where: Record<string, any>;
|
|
366
|
-
|
|
366
|
+
tenantId?: string;
|
|
367
367
|
draft?: boolean;
|
|
368
368
|
}): Promise<any>;
|
|
369
369
|
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
370
370
|
findVersionByID(args: {
|
|
371
371
|
collection: string;
|
|
372
372
|
versionId: string;
|
|
373
|
-
|
|
373
|
+
tenantId?: string;
|
|
374
374
|
}): Promise<VersionRecord | null>;
|
|
375
375
|
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
376
376
|
deleteVersions(args: {
|
|
377
377
|
collection: string;
|
|
378
378
|
documentId: string;
|
|
379
379
|
keepLatest?: number;
|
|
380
|
-
|
|
380
|
+
tenantId?: string;
|
|
381
381
|
}): Promise<void>;
|
|
382
382
|
updateLatestVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
383
383
|
migrate?(): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Field } from './types-
|
|
1
|
+
import { F as Field } from './types-fvldOd92.cjs';
|
|
2
2
|
|
|
3
3
|
interface Request {
|
|
4
4
|
body?: any;
|
|
@@ -12,7 +12,7 @@ interface User {
|
|
|
12
12
|
id: string;
|
|
13
13
|
email: string;
|
|
14
14
|
role: string;
|
|
15
|
-
|
|
15
|
+
tenantId?: string;
|
|
16
16
|
[key: string]: any;
|
|
17
17
|
}
|
|
18
18
|
interface HookArgs<T = any> {
|
|
@@ -24,7 +24,7 @@ interface HookArgs<T = any> {
|
|
|
24
24
|
req: Request;
|
|
25
25
|
user?: User;
|
|
26
26
|
operation: 'create' | 'read' | 'update' | 'delete';
|
|
27
|
-
|
|
27
|
+
tenantId?: string;
|
|
28
28
|
field?: string;
|
|
29
29
|
siblingData?: Record<string, any>;
|
|
30
30
|
value?: any;
|
|
@@ -71,7 +71,7 @@ interface AccessArgs {
|
|
|
71
71
|
data?: unknown;
|
|
72
72
|
doc?: unknown;
|
|
73
73
|
id?: string;
|
|
74
|
-
|
|
74
|
+
tenantId?: string;
|
|
75
75
|
context?: Record<string, unknown>;
|
|
76
76
|
}
|
|
77
77
|
type AccessControl = boolean | ((args: AccessArgs) => Promise<boolean | WhereClause> | boolean | WhereClause);
|
|
@@ -247,7 +247,7 @@ interface FindArgs {
|
|
|
247
247
|
limit?: number;
|
|
248
248
|
page?: number;
|
|
249
249
|
depth?: number;
|
|
250
|
-
|
|
250
|
+
tenantId?: string;
|
|
251
251
|
select?: string[];
|
|
252
252
|
user?: any;
|
|
253
253
|
context?: Record<string, any>;
|
|
@@ -259,7 +259,7 @@ interface FindByIDArgs {
|
|
|
259
259
|
collection: string;
|
|
260
260
|
id: string;
|
|
261
261
|
depth?: number;
|
|
262
|
-
|
|
262
|
+
tenantId?: string;
|
|
263
263
|
select?: string[];
|
|
264
264
|
user?: any;
|
|
265
265
|
context?: Record<string, any>;
|
|
@@ -271,7 +271,7 @@ interface CreateArgs {
|
|
|
271
271
|
collection: string;
|
|
272
272
|
data: Record<string, any>;
|
|
273
273
|
depth?: number;
|
|
274
|
-
|
|
274
|
+
tenantId?: string;
|
|
275
275
|
select?: string[];
|
|
276
276
|
user?: any;
|
|
277
277
|
context?: Record<string, any>;
|
|
@@ -282,7 +282,7 @@ interface UpdateArgs {
|
|
|
282
282
|
id: string;
|
|
283
283
|
data: Record<string, any>;
|
|
284
284
|
depth?: number;
|
|
285
|
-
|
|
285
|
+
tenantId?: string;
|
|
286
286
|
select?: string[];
|
|
287
287
|
user?: any;
|
|
288
288
|
context?: Record<string, any>;
|
|
@@ -291,7 +291,7 @@ interface UpdateArgs {
|
|
|
291
291
|
interface DeleteArgs {
|
|
292
292
|
collection: string;
|
|
293
293
|
id: string;
|
|
294
|
-
|
|
294
|
+
tenantId?: string;
|
|
295
295
|
user?: any;
|
|
296
296
|
context?: Record<string, any>;
|
|
297
297
|
overrideAccess?: boolean;
|
|
@@ -336,14 +336,14 @@ interface CreateVersionArgs<T = Record<string, any>> {
|
|
|
336
336
|
status: DocumentStatus;
|
|
337
337
|
createdBy?: string;
|
|
338
338
|
changeDescription?: string;
|
|
339
|
-
|
|
339
|
+
tenantId?: string;
|
|
340
340
|
/** When true, reuses a single version slot (find existing + update) */
|
|
341
341
|
autosave?: boolean;
|
|
342
342
|
}
|
|
343
343
|
interface FindVersionsArgs {
|
|
344
344
|
collection: string;
|
|
345
345
|
documentId: string;
|
|
346
|
-
|
|
346
|
+
tenantId?: string;
|
|
347
347
|
limit?: number;
|
|
348
348
|
page?: number;
|
|
349
349
|
sort?: string;
|
|
@@ -358,26 +358,26 @@ interface BaseAdapter {
|
|
|
358
358
|
count(args: {
|
|
359
359
|
collection: string;
|
|
360
360
|
where?: Record<string, any>;
|
|
361
|
-
|
|
361
|
+
tenantId?: string;
|
|
362
362
|
}): Promise<number>;
|
|
363
363
|
findOne(args: {
|
|
364
364
|
collection: string;
|
|
365
365
|
where: Record<string, any>;
|
|
366
|
-
|
|
366
|
+
tenantId?: string;
|
|
367
367
|
draft?: boolean;
|
|
368
368
|
}): Promise<any>;
|
|
369
369
|
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
370
370
|
findVersionByID(args: {
|
|
371
371
|
collection: string;
|
|
372
372
|
versionId: string;
|
|
373
|
-
|
|
373
|
+
tenantId?: string;
|
|
374
374
|
}): Promise<VersionRecord | null>;
|
|
375
375
|
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
376
376
|
deleteVersions(args: {
|
|
377
377
|
collection: string;
|
|
378
378
|
documentId: string;
|
|
379
379
|
keepLatest?: number;
|
|
380
|
-
|
|
380
|
+
tenantId?: string;
|
|
381
381
|
}): Promise<void>;
|
|
382
382
|
updateLatestVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
383
383
|
migrate?(): Promise<void>;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Unlike function conditions, these survive JSON serialization
|
|
4
4
|
* and can be used in admin configs that are built at compile time.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
/** The field name to evaluate (resolved from root form data) */
|
|
6
|
+
type DeclarativeCondition = {
|
|
7
|
+
/** The field name to evaluate (resolved from root form data, supports dot-notation) */
|
|
8
8
|
field: string;
|
|
9
9
|
/** Show the field when the target field equals this value */
|
|
10
10
|
equals?: string | number | boolean;
|
|
@@ -12,7 +12,13 @@ interface DeclarativeCondition {
|
|
|
12
12
|
notEquals?: string | number | boolean;
|
|
13
13
|
/** Show the field when the target field's value is one of these */
|
|
14
14
|
in?: (string | number | boolean)[];
|
|
15
|
-
|
|
15
|
+
/** Show the field when the target field's value is greater than this */
|
|
16
|
+
greaterThan?: number;
|
|
17
|
+
} | {
|
|
18
|
+
and: DeclarativeCondition[];
|
|
19
|
+
} | {
|
|
20
|
+
or: DeclarativeCondition[];
|
|
21
|
+
};
|
|
16
22
|
interface FieldAdmin {
|
|
17
23
|
description?: string;
|
|
18
24
|
placeholder?: string;
|
|
@@ -261,7 +267,10 @@ interface ActionField extends BaseField {
|
|
|
261
267
|
interface SecretField extends BaseField {
|
|
262
268
|
type: "secret";
|
|
263
269
|
}
|
|
264
|
-
|
|
270
|
+
interface IconField extends BaseField {
|
|
271
|
+
type: "icon";
|
|
272
|
+
}
|
|
273
|
+
type Field = TextField | NumberField | CheckboxField | DateField | EmailField | PasswordField | TextareaField | SelectField | RadioField | ColorField | ImageField | RichTextField | JSONField | CodeField | UploadField | MarkdownField | RelationshipField | ArrayField | ListField | GroupField | BlocksField | RowField | CollapsibleField | TabsField | ButtonField | ActionField | SecretField | IconField;
|
|
265
274
|
type FieldType = Field["type"];
|
|
266
275
|
declare function isTextField(field: Field): field is TextField;
|
|
267
276
|
declare function isNumberField(field: Field): field is NumberField;
|
|
@@ -274,11 +283,12 @@ declare function isImageField(field: Field): field is ImageField;
|
|
|
274
283
|
declare function isRichTextField(field: Field): field is RichTextField;
|
|
275
284
|
declare function isSelectField(field: Field): field is SelectField;
|
|
276
285
|
declare function isLayoutField(field: Field): field is RowField | CollapsibleField | TabsField;
|
|
277
|
-
declare
|
|
286
|
+
declare function isIconField(field: Field): field is IconField;
|
|
287
|
+
declare const PRIMITIVE_FIELD_TYPES: readonly ["text", "number", "checkbox", "date", "email", "password", "textarea", "select", "radio", "color", "icon"];
|
|
278
288
|
declare const COMPLEX_FIELD_TYPES: readonly ["richtext", "json", "code", "upload", "image", "markdown"];
|
|
279
289
|
declare const RELATIONAL_FIELD_TYPES: readonly ["relationship", "array", "group", "blocks"];
|
|
280
290
|
declare const LAYOUT_FIELD_TYPES: readonly ["row", "collapsible", "tabs"];
|
|
281
|
-
declare const ALL_FIELD_TYPES: readonly ["text", "number", "checkbox", "date", "email", "password", "textarea", "select", "radio", "color", "richtext", "json", "code", "upload", "image", "markdown", "relationship", "array", "group", "blocks", "row", "collapsible", "tabs"];
|
|
291
|
+
declare const ALL_FIELD_TYPES: readonly ["text", "number", "checkbox", "date", "email", "password", "textarea", "select", "radio", "color", "icon", "richtext", "json", "code", "upload", "image", "markdown", "relationship", "array", "group", "blocks", "row", "collapsible", "tabs"];
|
|
282
292
|
declare function createRelationshipFieldConfig(name: string, relationTo: string | string[], options?: Partial<Omit<RelationshipField, "type" | "name" | "relationTo">>): RelationshipField;
|
|
283
293
|
|
|
284
|
-
export {
|
|
294
|
+
export { isRelationshipField as $, type ArrayField as A, type BaseField as B, type CheckboxField as C, type DateField as D, type EmailField as E, type Field as F, type GroupField as G, type Hook as H, type ImageField as I, type JSONField as J, createRelationshipFieldConfig as K, LAYOUT_FIELD_TYPES as L, type MarkdownField as M, type NumberField as N, isArrayField as O, type PasswordField as P, isBlocksField as Q, type RadioField as R, type SecretField as S, type TabsField as T, type UploadField as U, type ValidateOptions as V, isGroupField as W, isIconField as X, isImageField as Y, isLayoutField as Z, isNumberField as _, type Block as a, isRichTextField as a0, isSelectField as a1, isTextField as a2, isUploadField as a3, type BlockAdmin as b, type BlockImage as c, type BlocksField as d, type CodeField as e, type CollapsibleField as f, type ColorField as g, type DeclarativeCondition as h, type FieldAdmin as i, type FieldType as j, type RelationshipField as k, type RichTextBlock as l, type RichTextField as m, type RowField as n, type SelectField as o, type TextField as p, type TextareaField as q, ALL_FIELD_TYPES as r, type ActionField as s, type ButtonField as t, COMPLEX_FIELD_TYPES as u, type IconField as v, type ListField as w, PRIMITIVE_FIELD_TYPES as x, RELATIONAL_FIELD_TYPES as y, type TextFieldVariant as z };
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Unlike function conditions, these survive JSON serialization
|
|
4
4
|
* and can be used in admin configs that are built at compile time.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
/** The field name to evaluate (resolved from root form data) */
|
|
6
|
+
type DeclarativeCondition = {
|
|
7
|
+
/** The field name to evaluate (resolved from root form data, supports dot-notation) */
|
|
8
8
|
field: string;
|
|
9
9
|
/** Show the field when the target field equals this value */
|
|
10
10
|
equals?: string | number | boolean;
|
|
@@ -12,7 +12,13 @@ interface DeclarativeCondition {
|
|
|
12
12
|
notEquals?: string | number | boolean;
|
|
13
13
|
/** Show the field when the target field's value is one of these */
|
|
14
14
|
in?: (string | number | boolean)[];
|
|
15
|
-
|
|
15
|
+
/** Show the field when the target field's value is greater than this */
|
|
16
|
+
greaterThan?: number;
|
|
17
|
+
} | {
|
|
18
|
+
and: DeclarativeCondition[];
|
|
19
|
+
} | {
|
|
20
|
+
or: DeclarativeCondition[];
|
|
21
|
+
};
|
|
16
22
|
interface FieldAdmin {
|
|
17
23
|
description?: string;
|
|
18
24
|
placeholder?: string;
|
|
@@ -261,7 +267,10 @@ interface ActionField extends BaseField {
|
|
|
261
267
|
interface SecretField extends BaseField {
|
|
262
268
|
type: "secret";
|
|
263
269
|
}
|
|
264
|
-
|
|
270
|
+
interface IconField extends BaseField {
|
|
271
|
+
type: "icon";
|
|
272
|
+
}
|
|
273
|
+
type Field = TextField | NumberField | CheckboxField | DateField | EmailField | PasswordField | TextareaField | SelectField | RadioField | ColorField | ImageField | RichTextField | JSONField | CodeField | UploadField | MarkdownField | RelationshipField | ArrayField | ListField | GroupField | BlocksField | RowField | CollapsibleField | TabsField | ButtonField | ActionField | SecretField | IconField;
|
|
265
274
|
type FieldType = Field["type"];
|
|
266
275
|
declare function isTextField(field: Field): field is TextField;
|
|
267
276
|
declare function isNumberField(field: Field): field is NumberField;
|
|
@@ -274,11 +283,12 @@ declare function isImageField(field: Field): field is ImageField;
|
|
|
274
283
|
declare function isRichTextField(field: Field): field is RichTextField;
|
|
275
284
|
declare function isSelectField(field: Field): field is SelectField;
|
|
276
285
|
declare function isLayoutField(field: Field): field is RowField | CollapsibleField | TabsField;
|
|
277
|
-
declare
|
|
286
|
+
declare function isIconField(field: Field): field is IconField;
|
|
287
|
+
declare const PRIMITIVE_FIELD_TYPES: readonly ["text", "number", "checkbox", "date", "email", "password", "textarea", "select", "radio", "color", "icon"];
|
|
278
288
|
declare const COMPLEX_FIELD_TYPES: readonly ["richtext", "json", "code", "upload", "image", "markdown"];
|
|
279
289
|
declare const RELATIONAL_FIELD_TYPES: readonly ["relationship", "array", "group", "blocks"];
|
|
280
290
|
declare const LAYOUT_FIELD_TYPES: readonly ["row", "collapsible", "tabs"];
|
|
281
|
-
declare const ALL_FIELD_TYPES: readonly ["text", "number", "checkbox", "date", "email", "password", "textarea", "select", "radio", "color", "richtext", "json", "code", "upload", "image", "markdown", "relationship", "array", "group", "blocks", "row", "collapsible", "tabs"];
|
|
291
|
+
declare const ALL_FIELD_TYPES: readonly ["text", "number", "checkbox", "date", "email", "password", "textarea", "select", "radio", "color", "icon", "richtext", "json", "code", "upload", "image", "markdown", "relationship", "array", "group", "blocks", "row", "collapsible", "tabs"];
|
|
282
292
|
declare function createRelationshipFieldConfig(name: string, relationTo: string | string[], options?: Partial<Omit<RelationshipField, "type" | "name" | "relationTo">>): RelationshipField;
|
|
283
293
|
|
|
284
|
-
export {
|
|
294
|
+
export { isRelationshipField as $, type ArrayField as A, type BaseField as B, type CheckboxField as C, type DateField as D, type EmailField as E, type Field as F, type GroupField as G, type Hook as H, type ImageField as I, type JSONField as J, createRelationshipFieldConfig as K, LAYOUT_FIELD_TYPES as L, type MarkdownField as M, type NumberField as N, isArrayField as O, type PasswordField as P, isBlocksField as Q, type RadioField as R, type SecretField as S, type TabsField as T, type UploadField as U, type ValidateOptions as V, isGroupField as W, isIconField as X, isImageField as Y, isLayoutField as Z, isNumberField as _, type Block as a, isRichTextField as a0, isSelectField as a1, isTextField as a2, isUploadField as a3, type BlockAdmin as b, type BlockImage as c, type BlocksField as d, type CodeField as e, type CollapsibleField as f, type ColorField as g, type DeclarativeCondition as h, type FieldAdmin as i, type FieldType as j, type RelationshipField as k, type RichTextBlock as l, type RichTextField as m, type RowField as n, type SelectField as o, type TextField as p, type TextareaField as q, ALL_FIELD_TYPES as r, type ActionField as s, type ButtonField as t, COMPLEX_FIELD_TYPES as u, type IconField as v, type ListField as w, PRIMITIVE_FIELD_TYPES as x, RELATIONAL_FIELD_TYPES as y, type TextFieldVariant as z };
|
package/dist/ws/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkG3J2EU5D_cjs=require('../chunk-G3J2EU5D.cjs');require('../chunk-AHSFSERC.cjs');Object.defineProperty(exports,"KyroPubSub",{enumerable:true,get:function(){return chunkG3J2EU5D_cjs.b}});Object.defineProperty(exports,"KyroWSServer",{enumerable:true,get:function(){return chunkG3J2EU5D_cjs.c}});Object.defineProperty(exports,"PubSub",{enumerable:true,get:function(){return chunkG3J2EU5D_cjs.a}});Object.defineProperty(exports,"createWSServer",{enumerable:true,get:function(){return chunkG3J2EU5D_cjs.d}});
|
package/dist/ws/index.d.cts
CHANGED
|
@@ -18,7 +18,7 @@ interface KyroEvent {
|
|
|
18
18
|
doc?: any;
|
|
19
19
|
originalDoc?: any;
|
|
20
20
|
id?: string;
|
|
21
|
-
|
|
21
|
+
tenantId?: string;
|
|
22
22
|
timestamp: string;
|
|
23
23
|
user?: any;
|
|
24
24
|
}
|
|
@@ -28,8 +28,8 @@ declare class KyroPubSub extends PubSub {
|
|
|
28
28
|
publishCollectionEvent(collection: string, event: KyroEvent): void;
|
|
29
29
|
subscribeToCollection(collection: string, handler: EventHandler): () => void;
|
|
30
30
|
subscribeToCollectionEvent(collection: string, eventType: 'create' | 'update' | 'delete', handler: EventHandler): () => void;
|
|
31
|
-
subscribeToTenant(
|
|
32
|
-
subscribeToTenantCollection(
|
|
31
|
+
subscribeToTenant(tenantId: string, handler: EventHandler): () => void;
|
|
32
|
+
subscribeToTenantCollection(tenantId: string, collection: string, handler: EventHandler): () => void;
|
|
33
33
|
subscribeToAllCollections(handler: EventHandler): () => void;
|
|
34
34
|
createAfterChangeHook(collection: string): (args: any) => Promise<void>;
|
|
35
35
|
createAfterDeleteHook(collection: string): (args: any) => Promise<void>;
|
|
@@ -54,7 +54,7 @@ interface WSClient {
|
|
|
54
54
|
subscriptions: Map<string, WSSubscription>;
|
|
55
55
|
authenticated: boolean;
|
|
56
56
|
user?: any;
|
|
57
|
-
|
|
57
|
+
tenantId?: string;
|
|
58
58
|
connectedAt: Date;
|
|
59
59
|
lastActivity: Date;
|
|
60
60
|
}
|
package/dist/ws/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ interface KyroEvent {
|
|
|
18
18
|
doc?: any;
|
|
19
19
|
originalDoc?: any;
|
|
20
20
|
id?: string;
|
|
21
|
-
|
|
21
|
+
tenantId?: string;
|
|
22
22
|
timestamp: string;
|
|
23
23
|
user?: any;
|
|
24
24
|
}
|
|
@@ -28,8 +28,8 @@ declare class KyroPubSub extends PubSub {
|
|
|
28
28
|
publishCollectionEvent(collection: string, event: KyroEvent): void;
|
|
29
29
|
subscribeToCollection(collection: string, handler: EventHandler): () => void;
|
|
30
30
|
subscribeToCollectionEvent(collection: string, eventType: 'create' | 'update' | 'delete', handler: EventHandler): () => void;
|
|
31
|
-
subscribeToTenant(
|
|
32
|
-
subscribeToTenantCollection(
|
|
31
|
+
subscribeToTenant(tenantId: string, handler: EventHandler): () => void;
|
|
32
|
+
subscribeToTenantCollection(tenantId: string, collection: string, handler: EventHandler): () => void;
|
|
33
33
|
subscribeToAllCollections(handler: EventHandler): () => void;
|
|
34
34
|
createAfterChangeHook(collection: string): (args: any) => Promise<void>;
|
|
35
35
|
createAfterDeleteHook(collection: string): (args: any) => Promise<void>;
|
|
@@ -54,7 +54,7 @@ interface WSClient {
|
|
|
54
54
|
subscriptions: Map<string, WSSubscription>;
|
|
55
55
|
authenticated: boolean;
|
|
56
56
|
user?: any;
|
|
57
|
-
|
|
57
|
+
tenantId?: string;
|
|
58
58
|
connectedAt: Date;
|
|
59
59
|
lastActivity: Date;
|
|
60
60
|
}
|
package/dist/ws/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as KyroPubSub,c as KyroWSServer,a as PubSub,d as createWSServer}from'../chunk-
|
|
1
|
+
export{b as KyroPubSub,c as KyroWSServer,a as PubSub,d as createWSServer}from'../chunk-GKYEJ2UF.js';import'../chunk-5J6HXUF6.js';
|