@beechcms/core 0.8.1 → 0.9.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/antivirus/noop-antivirus.provider.d.ts.map +1 -1
- package/dist/antivirus/virustotal-antivirus.provider.d.ts.map +1 -1
- package/dist/auth/account-email.d.ts +3 -0
- package/dist/auth/account-email.d.ts.map +1 -0
- package/dist/auth/account-email.js +9 -0
- package/dist/auth/password-reset-token.repository.d.ts +13 -2
- package/dist/auth/password-reset-token.repository.d.ts.map +1 -1
- package/dist/auth/user.repository.d.ts +69 -4
- package/dist/auth/user.repository.d.ts.map +1 -1
- package/dist/common/canonical-json.d.ts +2 -1
- package/dist/common/canonical-json.d.ts.map +1 -1
- package/dist/common/canonical-json.js +5 -3
- package/dist/content/content-scan.repository.d.ts +1 -1
- package/dist/content/content.repository.d.ts +156 -5
- package/dist/content/content.repository.d.ts.map +1 -1
- package/dist/content/content.repository.js +62 -0
- package/dist/content/seed-media-purge.repository.d.ts +34 -0
- package/dist/content/seed-media-purge.repository.d.ts.map +1 -0
- package/dist/content/seed.repository.d.ts +14 -0
- package/dist/content/seed.repository.d.ts.map +1 -1
- package/dist/dashboard-layout/content-view.d.ts +757 -0
- package/dist/dashboard-layout/content-view.d.ts.map +1 -0
- package/dist/dashboard-layout/content-view.js +285 -0
- package/dist/dashboard-layout/content-view.repository.d.ts +39 -0
- package/dist/dashboard-layout/content-view.repository.d.ts.map +1 -0
- package/dist/dashboard-layout/dashboard-layout.d.ts +5 -0
- package/dist/dashboard-layout/dashboard-layout.d.ts.map +1 -1
- package/dist/dashboard-layout/dashboard-layout.js +17 -9
- package/dist/dashboard-layout/kanban/kanban.d.ts +32 -18
- package/dist/dashboard-layout/kanban/kanban.d.ts.map +1 -1
- package/dist/dashboard-layout/kanban/kanban.js +45 -21
- package/dist/dashboard-layout/seed-layout.d.ts +22 -31
- package/dist/dashboard-layout/seed-layout.d.ts.map +1 -1
- package/dist/dashboard-layout/seed-layout.js +93 -18
- package/dist/dashboard-layout/seed-layout.repository.d.ts +1 -5
- package/dist/dashboard-layout/seed-layout.repository.d.ts.map +1 -1
- package/dist/engine/ddl/ddl.d.ts +31 -0
- package/dist/engine/ddl/ddl.d.ts.map +1 -1
- package/dist/engine/ddl/ddl.js +92 -13
- package/dist/engine/ddl/schema-mutator.d.ts +3 -0
- package/dist/engine/ddl/schema-mutator.d.ts.map +1 -1
- package/dist/engine/ddl/seed-purge-guards.d.ts +7 -0
- package/dist/engine/ddl/seed-purge-guards.d.ts.map +1 -0
- package/dist/engine/ddl/seed-purge-guards.js +19 -0
- package/dist/engine/engine.d.ts +4 -3
- package/dist/engine/engine.d.ts.map +1 -1
- package/dist/engine/engine.js +4 -3
- package/dist/engine/introspection/relation-audit.d.ts +46 -0
- package/dist/engine/introspection/relation-audit.d.ts.map +1 -0
- package/dist/engine/introspection/relation-audit.js +103 -0
- package/dist/engine/introspection/schema-fingerprint.d.ts +2 -1
- package/dist/engine/introspection/schema-fingerprint.d.ts.map +1 -1
- package/dist/engine/introspection/schema-fingerprint.js +8 -3
- package/dist/engine/privacy/policies.d.ts +1 -1
- package/dist/engine/privacy/policies.d.ts.map +1 -1
- package/dist/engine/privacy/policies.js +12 -6
- package/dist/engine/privacy/privacy.service.d.ts +13 -0
- package/dist/engine/privacy/privacy.service.d.ts.map +1 -1
- package/dist/engine/privacy/privacy.service.js +24 -0
- package/dist/engine/query/active-clause.d.ts +19 -0
- package/dist/engine/query/active-clause.d.ts.map +1 -0
- package/dist/engine/query/active-clause.js +27 -0
- package/dist/engine/query/query.d.ts +14 -1
- package/dist/engine/query/query.d.ts.map +1 -1
- package/dist/engine/query/query.js +105 -13
- package/dist/engine/seeds/candidate-ids.d.ts +14 -0
- package/dist/engine/seeds/candidate-ids.d.ts.map +1 -0
- package/dist/engine/seeds/candidate-ids.js +40 -0
- package/dist/engine/seeds/seed-definition-diff.d.ts +38 -0
- package/dist/engine/seeds/seed-definition-diff.d.ts.map +1 -0
- package/dist/engine/seeds/seed-definition-diff.js +51 -0
- package/dist/engine/seeds/seed-registry.d.ts +17 -0
- package/dist/engine/seeds/seed-registry.d.ts.map +1 -1
- package/dist/engine/seeds/seed-registry.js +27 -0
- package/dist/engine/seeds/seed-types-generator.d.ts.map +1 -1
- package/dist/engine/seeds/seed-types-generator.js +4 -5
- package/dist/engine/seeds/seed-validation.d.ts +5 -0
- package/dist/engine/seeds/seed-validation.d.ts.map +1 -1
- package/dist/engine/seeds/seed-validation.js +39 -19
- package/dist/engine/seeds/tag-migration.d.ts +73 -0
- package/dist/engine/seeds/tag-migration.d.ts.map +1 -0
- package/dist/engine/seeds/tag-migration.js +212 -0
- package/dist/engine/seeds/tag-options.d.ts +15 -0
- package/dist/engine/seeds/tag-options.d.ts.map +1 -0
- package/dist/engine/seeds/tag-options.js +111 -0
- package/dist/engine/seeds/tag-value.d.ts +31 -0
- package/dist/engine/seeds/tag-value.d.ts.map +1 -0
- package/dist/engine/seeds/tag-value.js +51 -0
- package/dist/engine/types.d.ts +59 -7
- package/dist/engine/types.d.ts.map +1 -1
- package/dist/engine/validation/cache.d.ts.map +1 -1
- package/dist/engine/validation/cache.js +20 -4
- package/dist/engine/validation/index.d.ts +12 -1
- package/dist/engine/validation/index.d.ts.map +1 -1
- package/dist/engine/validation/index.js +29 -33
- package/dist/engine/validation/primitives.d.ts +12 -0
- package/dist/engine/validation/primitives.d.ts.map +1 -1
- package/dist/engine/validation/primitives.js +22 -0
- package/dist/engine/validation/richtext-sanitizer.d.ts +9 -1
- package/dist/engine/validation/richtext-sanitizer.d.ts.map +1 -1
- package/dist/engine/validation/richtext-sanitizer.js +36 -7
- package/dist/engine/validation/schema-builders.d.ts +16 -0
- package/dist/engine/validation/schema-builders.d.ts.map +1 -1
- package/dist/engine/validation/schema-builders.js +125 -18
- package/dist/index.d.ts +34 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -11
- package/dist/media/file-types.d.ts +12 -0
- package/dist/media/file-types.d.ts.map +1 -1
- package/dist/media/file-types.js +24 -4
- package/dist/media/magic-bytes.d.ts.map +1 -1
- package/dist/media/magic-bytes.js +19 -9
- package/dist/media/media-transform.d.ts +8 -4
- package/dist/media/media-transform.d.ts.map +1 -1
- package/dist/media/media-transform.js +10 -6
- package/dist/media/media.repository.d.ts +5 -0
- package/dist/media/media.repository.d.ts.map +1 -1
- package/dist/notifications/notification-service.d.ts +1 -1
- package/dist/notifications/notification.repository.d.ts +11 -2
- package/dist/notifications/notification.repository.d.ts.map +1 -1
- package/dist/oauth/authorization-code.repository.d.ts +10 -5
- package/dist/oauth/authorization-code.repository.d.ts.map +1 -1
- package/dist/oauth/pkce.d.ts +1 -1
- package/dist/oauth/role-guard.d.ts +30 -11
- package/dist/oauth/role-guard.d.ts.map +1 -1
- package/dist/oauth/role-guard.js +27 -5
- package/dist/oauth/scopes.d.ts +1 -1
- package/dist/oauth/scopes.d.ts.map +1 -1
- package/dist/oauth/token.repository.d.ts +2 -0
- package/dist/oauth/token.repository.d.ts.map +1 -1
- package/dist/queue/queue.interface.d.ts +9 -1
- package/dist/queue/queue.interface.d.ts.map +1 -1
- package/dist/queue/queue.stub.d.ts +1 -1
- package/dist/queue/queue.stub.d.ts.map +1 -1
- package/dist/queue/queue.stub.js +2 -3
- package/dist/queue/scheduler.stub.d.ts.map +1 -1
- package/dist/rate-limit/token-bucket-rate-limiter.d.ts +7 -0
- package/dist/rate-limit/token-bucket-rate-limiter.d.ts.map +1 -1
- package/dist/rate-limit/token-bucket-rate-limiter.js +66 -0
- package/dist/rbac/invitation.repository.d.ts +28 -10
- package/dist/rbac/invitation.repository.d.ts.map +1 -1
- package/dist/rbac/types.d.ts +40 -28
- package/dist/rbac/types.d.ts.map +1 -1
- package/dist/rbac/types.js +2 -1
- package/dist/schema/manifest-seeds.js +3 -3
- package/dist/search/search.repository.d.ts +5 -4
- package/dist/search/search.repository.d.ts.map +1 -1
- package/dist/search/vector-extractor.d.ts.map +1 -1
- package/dist/search/vector-extractor.js +23 -2
- package/dist/search/vector.repository.d.ts +2 -1
- package/dist/search/vector.repository.d.ts.map +1 -1
- package/dist/security/time-trap-token.repository.d.ts +5 -3
- package/dist/security/time-trap-token.repository.d.ts.map +1 -1
- package/dist/settings/site-settings.repository.d.ts +8 -0
- package/dist/settings/site-settings.repository.d.ts.map +1 -1
- package/dist/transfer/flat-seed.d.ts.map +1 -1
- package/dist/transfer/flat-seed.js +6 -1
- package/dist/transfer/row-mapping.d.ts.map +1 -1
- package/dist/transfer/row-mapping.js +9 -2
- package/package.json +9 -4
- package/dist/.tsbuildinfo +0 -1
- package/dist/automations-grammar-words.d.ts +0 -2
- package/dist/automations-grammar-words.d.ts.map +0 -1
- package/dist/automations-grammar-words.js +0 -8
- package/dist/automations.repository.interface.d.ts +0 -19
- package/dist/automations.repository.interface.d.ts.map +0 -1
- package/dist/automations.runner.interface.d.ts +0 -10
- package/dist/automations.runner.interface.d.ts.map +0 -1
- package/dist/automations.runner.stub.d.ts +0 -5
- package/dist/automations.runner.stub.d.ts.map +0 -1
- package/dist/automations.runner.stub.js +0 -7
- package/dist/automations.types.d.ts +0 -75
- package/dist/automations.types.d.ts.map +0 -1
- package/dist/automations.types.js +0 -3
- package/dist/clock.d.ts +0 -25
- package/dist/clock.d.ts.map +0 -1
- package/dist/clock.js +0 -11
- package/dist/content-scan.repository.d.ts +0 -9
- package/dist/content-scan.repository.d.ts.map +0 -1
- package/dist/content-scan.repository.js +0 -3
- package/dist/content.repository.d.ts +0 -247
- package/dist/content.repository.d.ts.map +0 -1
- package/dist/content.repository.js +0 -59
- package/dist/dashboard-layout/kanban/kanban-position.repository.d.ts +0 -19
- package/dist/dashboard-layout/kanban/kanban-position.repository.d.ts.map +0 -1
- package/dist/dashboard-layout/kanban/kanban-position.repository.js +0 -3
- package/dist/dashboard-layout.d.ts +0 -154
- package/dist/dashboard-layout.d.ts.map +0 -1
- package/dist/dashboard-layout.js +0 -186
- package/dist/dashboard-layout.repository.d.ts +0 -18
- package/dist/dashboard-layout.repository.d.ts.map +0 -1
- package/dist/dashboard-layout.repository.js +0 -3
- package/dist/dashboard-permissions.d.ts +0 -3
- package/dist/dashboard-permissions.d.ts.map +0 -1
- package/dist/dashboard-permissions.js +0 -11
- package/dist/dashboard-scopes.d.ts +0 -12
- package/dist/dashboard-scopes.d.ts.map +0 -1
- package/dist/dashboard-scopes.js +0 -30
- package/dist/define-seed.d.ts +0 -3
- package/dist/define-seed.d.ts.map +0 -1
- package/dist/define-seed.js +0 -5
- package/dist/demo-data.repository.d.ts +0 -5
- package/dist/demo-data.repository.d.ts.map +0 -1
- package/dist/demo-data.repository.js +0 -3
- package/dist/email.provider.d.ts +0 -32
- package/dist/email.provider.d.ts.map +0 -1
- package/dist/email.provider.js +0 -4
- package/dist/engine/ddl/seed-ddl-destructive.d.ts +0 -40
- package/dist/engine/ddl/seed-ddl-destructive.d.ts.map +0 -1
- package/dist/engine/ddl/seed-ddl-destructive.js +0 -149
- package/dist/engine/ddl.d.ts +0 -193
- package/dist/engine/ddl.d.ts.map +0 -1
- package/dist/engine/ddl.js +0 -518
- package/dist/engine/define-seed.d.ts +0 -3
- package/dist/engine/define-seed.d.ts.map +0 -1
- package/dist/engine/define-seed.js +0 -5
- package/dist/engine/introspection.d.ts +0 -101
- package/dist/engine/introspection.d.ts.map +0 -1
- package/dist/engine/introspection.js +0 -127
- package/dist/engine/localization.d.ts +0 -127
- package/dist/engine/localization.d.ts.map +0 -1
- package/dist/engine/localization.js +0 -212
- package/dist/engine/policies.d.ts +0 -58
- package/dist/engine/policies.d.ts.map +0 -1
- package/dist/engine/policies.js +0 -168
- package/dist/engine/privacy.service.d.ts +0 -65
- package/dist/engine/privacy.service.d.ts.map +0 -1
- package/dist/engine/privacy.service.js +0 -114
- package/dist/engine/query.d.ts +0 -23
- package/dist/engine/query.d.ts.map +0 -1
- package/dist/engine/query.js +0 -236
- package/dist/engine/relations.d.ts +0 -28
- package/dist/engine/relations.d.ts.map +0 -1
- package/dist/engine/relations.js +0 -25
- package/dist/engine/schema-fingerprint.d.ts +0 -73
- package/dist/engine/schema-fingerprint.d.ts.map +0 -1
- package/dist/engine/schema-fingerprint.js +0 -97
- package/dist/engine/schema-mutator.d.ts +0 -26
- package/dist/engine/schema-mutator.d.ts.map +0 -1
- package/dist/engine/schema-mutator.js +0 -3
- package/dist/engine/seed-ddl-destructive.d.ts +0 -40
- package/dist/engine/seed-ddl-destructive.d.ts.map +0 -1
- package/dist/engine/seed-ddl-destructive.js +0 -149
- package/dist/engine/seed-ddl.d.ts +0 -40
- package/dist/engine/seed-ddl.d.ts.map +0 -1
- package/dist/engine/seed-ddl.js +0 -100
- package/dist/engine/seed-registry.d.ts +0 -71
- package/dist/engine/seed-registry.d.ts.map +0 -1
- package/dist/engine/seed-registry.js +0 -167
- package/dist/engine/seed-types-generator.d.ts +0 -10
- package/dist/engine/seed-types-generator.d.ts.map +0 -1
- package/dist/engine/seed-types-generator.js +0 -89
- package/dist/engine/seed-validation.d.ts +0 -30
- package/dist/engine/seed-validation.d.ts.map +0 -1
- package/dist/engine/seed-validation.js +0 -319
- package/dist/engine/seeds.d.ts +0 -20
- package/dist/engine/seeds.d.ts.map +0 -1
- package/dist/engine/seeds.js +0 -21
- package/dist/engine/serialize.d.ts +0 -20
- package/dist/engine/serialize.d.ts.map +0 -1
- package/dist/engine/serialize.js +0 -160
- package/dist/engine.d.ts +0 -144
- package/dist/engine.d.ts.map +0 -1
- package/dist/engine.js +0 -741
- package/dist/file-types.d.ts +0 -13
- package/dist/file-types.d.ts.map +0 -1
- package/dist/file-types.js +0 -85
- package/dist/hooks.d.ts +0 -29
- package/dist/hooks.d.ts.map +0 -1
- package/dist/hooks.js +0 -3
- package/dist/id-generator.d.ts +0 -26
- package/dist/id-generator.d.ts.map +0 -1
- package/dist/id-generator.js +0 -12
- package/dist/idempotency.repository.d.ts +0 -13
- package/dist/idempotency.repository.d.ts.map +0 -1
- package/dist/idempotency.repository.js +0 -3
- package/dist/kanban-position.repository.d.ts +0 -19
- package/dist/kanban-position.repository.d.ts.map +0 -1
- package/dist/kanban-position.repository.js +0 -3
- package/dist/kanban.d.ts +0 -75
- package/dist/kanban.d.ts.map +0 -1
- package/dist/kanban.js +0 -82
- package/dist/layout-permissions.d.ts +0 -3
- package/dist/layout-permissions.d.ts.map +0 -1
- package/dist/layout-permissions.js +0 -11
- package/dist/media.repository.d.ts +0 -61
- package/dist/media.repository.d.ts.map +0 -1
- package/dist/media.repository.js +0 -3
- package/dist/policies.d.ts +0 -10
- package/dist/policies.d.ts.map +0 -1
- package/dist/policies.js +0 -33
- package/dist/queue.interface.d.ts +0 -39
- package/dist/queue.interface.d.ts.map +0 -1
- package/dist/queue.interface.js +0 -3
- package/dist/queue.stub.d.ts +0 -6
- package/dist/queue.stub.d.ts.map +0 -1
- package/dist/queue.stub.js +0 -8
- package/dist/relations.d.ts +0 -28
- package/dist/relations.d.ts.map +0 -1
- package/dist/relations.js +0 -25
- package/dist/richtext-render.d.ts +0 -11
- package/dist/richtext-render.d.ts.map +0 -1
- package/dist/richtext-render.js +0 -87
- package/dist/richtext.d.ts +0 -11
- package/dist/richtext.d.ts.map +0 -1
- package/dist/richtext.js +0 -13
- package/dist/scheduler.interface.d.ts +0 -4
- package/dist/scheduler.interface.d.ts.map +0 -1
- package/dist/scheduler.interface.js +0 -3
- package/dist/scheduler.stub.d.ts +0 -5
- package/dist/scheduler.stub.d.ts.map +0 -1
- package/dist/scheduler.stub.js +0 -7
- package/dist/schema-mutator.d.ts +0 -26
- package/dist/schema-mutator.d.ts.map +0 -1
- package/dist/schema-mutator.js +0 -3
- package/dist/seed-ddl-destructive.d.ts +0 -40
- package/dist/seed-ddl-destructive.d.ts.map +0 -1
- package/dist/seed-ddl-destructive.js +0 -149
- package/dist/seed-ddl.d.ts +0 -40
- package/dist/seed-ddl.d.ts.map +0 -1
- package/dist/seed-ddl.js +0 -100
- package/dist/seed-layout.d.ts +0 -145
- package/dist/seed-layout.d.ts.map +0 -1
- package/dist/seed-layout.js +0 -192
- package/dist/seed-layout.repository.d.ts +0 -22
- package/dist/seed-layout.repository.d.ts.map +0 -1
- package/dist/seed-layout.repository.js +0 -3
- package/dist/seed-registry.d.ts +0 -71
- package/dist/seed-registry.d.ts.map +0 -1
- package/dist/seed-registry.js +0 -143
- package/dist/seed-types-generator.d.ts +0 -10
- package/dist/seed-types-generator.d.ts.map +0 -1
- package/dist/seed-types-generator.js +0 -86
- package/dist/seed-validation.d.ts +0 -23
- package/dist/seed-validation.d.ts.map +0 -1
- package/dist/seed-validation.js +0 -224
- package/dist/seed.repository.d.ts +0 -37
- package/dist/seed.repository.d.ts.map +0 -1
- package/dist/seed.repository.js +0 -3
- package/dist/seeds.d.ts +0 -20
- package/dist/seeds.d.ts.map +0 -1
- package/dist/seeds.js +0 -21
- package/dist/site-settings.repository.d.ts +0 -16
- package/dist/site-settings.repository.d.ts.map +0 -1
- package/dist/site-settings.repository.js +0 -3
- package/dist/slug-utils.d.ts +0 -18
- package/dist/slug-utils.d.ts.map +0 -1
- package/dist/slug-utils.js +0 -32
- package/dist/storage.d.ts +0 -46
- package/dist/storage.d.ts.map +0 -1
- package/dist/storage.js +0 -3
- package/dist/types.d.ts +0 -243
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -3
- package/dist/validation.d.ts +0 -50
- package/dist/validation.d.ts.map +0 -1
- package/dist/validation.js +0 -660
- package/dist/webhook-validation.d.ts +0 -3
- package/dist/webhook-validation.d.ts.map +0 -1
- package/dist/webhook-validation.js +0 -6
- /package/dist/{automations.repository.interface.js → content/seed-media-purge.repository.js} +0 -0
- /package/dist/{automations.runner.interface.js → dashboard-layout/content-view.repository.js} +0 -0
|
@@ -0,0 +1,757 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Seed } from '../engine/types.js';
|
|
3
|
+
import { type DashboardView } from './view-authorization.js';
|
|
4
|
+
/** Zod needs a tuple. Kept equal to AUTHORIZABLE_VIEWS by content-view.test.ts. */
|
|
5
|
+
export declare const VIEW_TYPE_IDS: readonly ["table", "gallery", "kanban"];
|
|
6
|
+
export declare const VIEW_SYSTEM_COLUMNS: readonly ["slug", "status", "created_at", "updated_at"];
|
|
7
|
+
export type ViewSystemColumn = (typeof VIEW_SYSTEM_COLUMNS)[number];
|
|
8
|
+
export declare const viewColumnRefSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
9
|
+
slug: "slug";
|
|
10
|
+
status: "status";
|
|
11
|
+
created_at: "created_at";
|
|
12
|
+
updated_at: "updated_at";
|
|
13
|
+
}>, z.ZodString]>;
|
|
14
|
+
export type ViewColumnRef = z.infer<typeof viewColumnRefSchema>;
|
|
15
|
+
/** Mirrors the dashboard toolbar operator set (apps/dashboard/src/lib/filter-dsl.ts). */
|
|
16
|
+
export declare const VIEW_FILTER_OPERATORS: readonly ["eq", "gt", "gte", "lt", "lte", "contains", "is_empty", "is_not_empty"];
|
|
17
|
+
/** Mirrors MAX_CONDITIONS_PER_FILTER in the dashboard toolbar. */
|
|
18
|
+
export declare const MAX_VIEW_CONDITIONS = 3;
|
|
19
|
+
export declare const viewConditionSchema: z.ZodObject<{
|
|
20
|
+
op: z.ZodEnum<{
|
|
21
|
+
eq: "eq";
|
|
22
|
+
gt: "gt";
|
|
23
|
+
gte: "gte";
|
|
24
|
+
lt: "lt";
|
|
25
|
+
lte: "lte";
|
|
26
|
+
contains: "contains";
|
|
27
|
+
is_empty: "is_empty";
|
|
28
|
+
is_not_empty: "is_not_empty";
|
|
29
|
+
}>;
|
|
30
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export declare const viewFilterSchema: z.ZodObject<{
|
|
33
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
34
|
+
slug: "slug";
|
|
35
|
+
status: "status";
|
|
36
|
+
created_at: "created_at";
|
|
37
|
+
updated_at: "updated_at";
|
|
38
|
+
}>, z.ZodString]>;
|
|
39
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
40
|
+
op: z.ZodEnum<{
|
|
41
|
+
eq: "eq";
|
|
42
|
+
gt: "gt";
|
|
43
|
+
gte: "gte";
|
|
44
|
+
lt: "lt";
|
|
45
|
+
lte: "lte";
|
|
46
|
+
contains: "contains";
|
|
47
|
+
is_empty: "is_empty";
|
|
48
|
+
is_not_empty: "is_not_empty";
|
|
49
|
+
}>;
|
|
50
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export declare const viewSortSchema: z.ZodObject<{
|
|
54
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
55
|
+
slug: "slug";
|
|
56
|
+
status: "status";
|
|
57
|
+
created_at: "created_at";
|
|
58
|
+
updated_at: "updated_at";
|
|
59
|
+
}>, z.ZodString]>;
|
|
60
|
+
desc: z.ZodBoolean;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export declare const viewGroupBySchema: z.ZodObject<{
|
|
63
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
64
|
+
slug: "slug";
|
|
65
|
+
status: "status";
|
|
66
|
+
created_at: "created_at";
|
|
67
|
+
updated_at: "updated_at";
|
|
68
|
+
}>, z.ZodString]>;
|
|
69
|
+
datePrecision: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
year: z.ZodBoolean;
|
|
71
|
+
month: z.ZodBoolean;
|
|
72
|
+
day: z.ZodBoolean;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export declare const VIEW_DENSITIES: readonly ["compact", "normal", "comfortable"];
|
|
76
|
+
export declare const viewAppearanceSchema: z.ZodObject<{
|
|
77
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
compact: "compact";
|
|
79
|
+
normal: "normal";
|
|
80
|
+
comfortable: "comfortable";
|
|
81
|
+
}>>;
|
|
82
|
+
hiddenColumns: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
83
|
+
slug: "slug";
|
|
84
|
+
status: "status";
|
|
85
|
+
created_at: "created_at";
|
|
86
|
+
updated_at: "updated_at";
|
|
87
|
+
}>, z.ZodString]>>>;
|
|
88
|
+
columnOrder: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
89
|
+
slug: "slug";
|
|
90
|
+
status: "status";
|
|
91
|
+
created_at: "created_at";
|
|
92
|
+
updated_at: "updated_at";
|
|
93
|
+
}>, z.ZodString]>>>;
|
|
94
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
export declare const VIEW_FORMAT_TONES: readonly ["neutral", "info", "success", "warning", "danger"];
|
|
97
|
+
/**
|
|
98
|
+
* View-neutral targets: `element` is the whole row (Table) or card (Gallery/Kanban), `field` is
|
|
99
|
+
* the intersection element × columnRef. The dashboard's legacy `row`/`cell` map 1:1 (Sprint 2).
|
|
100
|
+
*/
|
|
101
|
+
export declare const VIEW_FORMAT_TARGETS: readonly ["element", "field"];
|
|
102
|
+
export declare const VIEW_TEXT_STYLES: readonly ["bold", "italic", "underline"];
|
|
103
|
+
export declare const viewConditionalFormatSchema: z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
enabled: z.ZodBoolean;
|
|
106
|
+
priority: z.ZodNumber;
|
|
107
|
+
label: z.ZodOptional<z.ZodString>;
|
|
108
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
109
|
+
slug: "slug";
|
|
110
|
+
status: "status";
|
|
111
|
+
created_at: "created_at";
|
|
112
|
+
updated_at: "updated_at";
|
|
113
|
+
}>, z.ZodString]>;
|
|
114
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
115
|
+
op: z.ZodEnum<{
|
|
116
|
+
eq: "eq";
|
|
117
|
+
gt: "gt";
|
|
118
|
+
gte: "gte";
|
|
119
|
+
lt: "lt";
|
|
120
|
+
lte: "lte";
|
|
121
|
+
contains: "contains";
|
|
122
|
+
is_empty: "is_empty";
|
|
123
|
+
is_not_empty: "is_not_empty";
|
|
124
|
+
}>;
|
|
125
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
tone: z.ZodEnum<{
|
|
128
|
+
success: "success";
|
|
129
|
+
info: "info";
|
|
130
|
+
warning: "warning";
|
|
131
|
+
neutral: "neutral";
|
|
132
|
+
danger: "danger";
|
|
133
|
+
}>;
|
|
134
|
+
target: z.ZodEnum<{
|
|
135
|
+
element: "element";
|
|
136
|
+
field: "field";
|
|
137
|
+
}>;
|
|
138
|
+
textStyles: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
139
|
+
bold: "bold";
|
|
140
|
+
italic: "italic";
|
|
141
|
+
underline: "underline";
|
|
142
|
+
}>>>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
export declare const FOLDER_COLORS: readonly ["slate", "red", "orange", "amber", "green", "teal", "blue", "violet", "pink"];
|
|
145
|
+
export declare const FOLDER_ICONS: readonly ["Folder", "Star", "Heart", "Image", "Camera", "Calendar", "Tag", "Bookmark", "Home", "Gift", "Video", "Music", "Book", "Flag", "Briefcase", "Users", "Sun", "Crown"];
|
|
146
|
+
export declare const MAX_FOLDER_STYLES = 100;
|
|
147
|
+
/** Cosmetic override of one gallery folder. `label` and `description` are display-only: the folder's group value is untouched. */
|
|
148
|
+
export declare const folderStyleSchema: z.ZodObject<{
|
|
149
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
150
|
+
slate: "slate";
|
|
151
|
+
red: "red";
|
|
152
|
+
orange: "orange";
|
|
153
|
+
amber: "amber";
|
|
154
|
+
green: "green";
|
|
155
|
+
teal: "teal";
|
|
156
|
+
blue: "blue";
|
|
157
|
+
violet: "violet";
|
|
158
|
+
pink: "pink";
|
|
159
|
+
}>>;
|
|
160
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
161
|
+
Folder: "Folder";
|
|
162
|
+
Star: "Star";
|
|
163
|
+
Heart: "Heart";
|
|
164
|
+
Image: "Image";
|
|
165
|
+
Camera: "Camera";
|
|
166
|
+
Calendar: "Calendar";
|
|
167
|
+
Tag: "Tag";
|
|
168
|
+
Bookmark: "Bookmark";
|
|
169
|
+
Home: "Home";
|
|
170
|
+
Gift: "Gift";
|
|
171
|
+
Video: "Video";
|
|
172
|
+
Music: "Music";
|
|
173
|
+
Book: "Book";
|
|
174
|
+
Flag: "Flag";
|
|
175
|
+
Briefcase: "Briefcase";
|
|
176
|
+
Users: "Users";
|
|
177
|
+
Sun: "Sun";
|
|
178
|
+
Crown: "Crown";
|
|
179
|
+
}>>;
|
|
180
|
+
label: z.ZodOptional<z.ZodString>;
|
|
181
|
+
description: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
export type FolderStyle = z.output<typeof folderStyleSchema>;
|
|
184
|
+
/**
|
|
185
|
+
* Persisted per-instance configuration. Every key has a default, so `{}` parses into a complete
|
|
186
|
+
* config, and a stored row written by an older dashboard reads back fully shaped. Unknown keys
|
|
187
|
+
* are stripped (zod default), never rejected.
|
|
188
|
+
*/
|
|
189
|
+
export declare const contentViewConfigSchema: z.ZodObject<{
|
|
190
|
+
filters: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
191
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
192
|
+
slug: "slug";
|
|
193
|
+
status: "status";
|
|
194
|
+
created_at: "created_at";
|
|
195
|
+
updated_at: "updated_at";
|
|
196
|
+
}>, z.ZodString]>;
|
|
197
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
198
|
+
op: z.ZodEnum<{
|
|
199
|
+
eq: "eq";
|
|
200
|
+
gt: "gt";
|
|
201
|
+
gte: "gte";
|
|
202
|
+
lt: "lt";
|
|
203
|
+
lte: "lte";
|
|
204
|
+
contains: "contains";
|
|
205
|
+
is_empty: "is_empty";
|
|
206
|
+
is_not_empty: "is_not_empty";
|
|
207
|
+
}>;
|
|
208
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
209
|
+
}, z.core.$strip>>;
|
|
210
|
+
}, z.core.$strip>>>;
|
|
211
|
+
sort: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
212
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
213
|
+
slug: "slug";
|
|
214
|
+
status: "status";
|
|
215
|
+
created_at: "created_at";
|
|
216
|
+
updated_at: "updated_at";
|
|
217
|
+
}>, z.ZodString]>;
|
|
218
|
+
desc: z.ZodBoolean;
|
|
219
|
+
}, z.core.$strip>>>;
|
|
220
|
+
groupBy: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
221
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
222
|
+
slug: "slug";
|
|
223
|
+
status: "status";
|
|
224
|
+
created_at: "created_at";
|
|
225
|
+
updated_at: "updated_at";
|
|
226
|
+
}>, z.ZodString]>;
|
|
227
|
+
datePrecision: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
year: z.ZodBoolean;
|
|
229
|
+
month: z.ZodBoolean;
|
|
230
|
+
day: z.ZodBoolean;
|
|
231
|
+
}, z.core.$strip>>;
|
|
232
|
+
}, z.core.$strip>>>;
|
|
233
|
+
appearance: z.ZodDefault<z.ZodObject<{
|
|
234
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
235
|
+
compact: "compact";
|
|
236
|
+
normal: "normal";
|
|
237
|
+
comfortable: "comfortable";
|
|
238
|
+
}>>;
|
|
239
|
+
hiddenColumns: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
240
|
+
slug: "slug";
|
|
241
|
+
status: "status";
|
|
242
|
+
created_at: "created_at";
|
|
243
|
+
updated_at: "updated_at";
|
|
244
|
+
}>, z.ZodString]>>>;
|
|
245
|
+
columnOrder: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
246
|
+
slug: "slug";
|
|
247
|
+
status: "status";
|
|
248
|
+
created_at: "created_at";
|
|
249
|
+
updated_at: "updated_at";
|
|
250
|
+
}>, z.ZodString]>>>;
|
|
251
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
252
|
+
}, z.core.$strip>>;
|
|
253
|
+
conditionalFormats: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
254
|
+
id: z.ZodString;
|
|
255
|
+
enabled: z.ZodBoolean;
|
|
256
|
+
priority: z.ZodNumber;
|
|
257
|
+
label: z.ZodOptional<z.ZodString>;
|
|
258
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
259
|
+
slug: "slug";
|
|
260
|
+
status: "status";
|
|
261
|
+
created_at: "created_at";
|
|
262
|
+
updated_at: "updated_at";
|
|
263
|
+
}>, z.ZodString]>;
|
|
264
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
265
|
+
op: z.ZodEnum<{
|
|
266
|
+
eq: "eq";
|
|
267
|
+
gt: "gt";
|
|
268
|
+
gte: "gte";
|
|
269
|
+
lt: "lt";
|
|
270
|
+
lte: "lte";
|
|
271
|
+
contains: "contains";
|
|
272
|
+
is_empty: "is_empty";
|
|
273
|
+
is_not_empty: "is_not_empty";
|
|
274
|
+
}>;
|
|
275
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
276
|
+
}, z.core.$strip>>;
|
|
277
|
+
tone: z.ZodEnum<{
|
|
278
|
+
success: "success";
|
|
279
|
+
info: "info";
|
|
280
|
+
warning: "warning";
|
|
281
|
+
neutral: "neutral";
|
|
282
|
+
danger: "danger";
|
|
283
|
+
}>;
|
|
284
|
+
target: z.ZodEnum<{
|
|
285
|
+
element: "element";
|
|
286
|
+
field: "field";
|
|
287
|
+
}>;
|
|
288
|
+
textStyles: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
289
|
+
bold: "bold";
|
|
290
|
+
italic: "italic";
|
|
291
|
+
underline: "underline";
|
|
292
|
+
}>>>;
|
|
293
|
+
}, z.core.$strip>>>;
|
|
294
|
+
kanban: z.ZodOptional<z.ZodObject<{
|
|
295
|
+
axisBranchId: z.ZodNullable<z.ZodString>;
|
|
296
|
+
sort: z.ZodNullable<z.ZodObject<{
|
|
297
|
+
branchId: z.ZodString;
|
|
298
|
+
dir: z.ZodEnum<{
|
|
299
|
+
ASC: "ASC";
|
|
300
|
+
DESC: "DESC";
|
|
301
|
+
}>;
|
|
302
|
+
}, z.core.$strip>>;
|
|
303
|
+
hiddenColumnValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
304
|
+
collapsedColumnValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
305
|
+
}, z.core.$strip>>;
|
|
306
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
307
|
+
version: z.ZodLiteral<1>;
|
|
308
|
+
media: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
309
|
+
branchId: z.ZodString;
|
|
310
|
+
}, z.core.$strip>>>;
|
|
311
|
+
header: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
312
|
+
branchId: z.ZodString;
|
|
313
|
+
}, z.core.$strip>>>;
|
|
314
|
+
subtitle: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
315
|
+
branchId: z.ZodString;
|
|
316
|
+
}, z.core.$strip>>>;
|
|
317
|
+
metadata: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
318
|
+
branchId: z.ZodString;
|
|
319
|
+
}, z.core.$strip>>>;
|
|
320
|
+
}, z.core.$strip>>;
|
|
321
|
+
folders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
322
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
323
|
+
slate: "slate";
|
|
324
|
+
red: "red";
|
|
325
|
+
orange: "orange";
|
|
326
|
+
amber: "amber";
|
|
327
|
+
green: "green";
|
|
328
|
+
teal: "teal";
|
|
329
|
+
blue: "blue";
|
|
330
|
+
violet: "violet";
|
|
331
|
+
pink: "pink";
|
|
332
|
+
}>>;
|
|
333
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
334
|
+
Folder: "Folder";
|
|
335
|
+
Star: "Star";
|
|
336
|
+
Heart: "Heart";
|
|
337
|
+
Image: "Image";
|
|
338
|
+
Camera: "Camera";
|
|
339
|
+
Calendar: "Calendar";
|
|
340
|
+
Tag: "Tag";
|
|
341
|
+
Bookmark: "Bookmark";
|
|
342
|
+
Home: "Home";
|
|
343
|
+
Gift: "Gift";
|
|
344
|
+
Video: "Video";
|
|
345
|
+
Music: "Music";
|
|
346
|
+
Book: "Book";
|
|
347
|
+
Flag: "Flag";
|
|
348
|
+
Briefcase: "Briefcase";
|
|
349
|
+
Users: "Users";
|
|
350
|
+
Sun: "Sun";
|
|
351
|
+
Crown: "Crown";
|
|
352
|
+
}>>;
|
|
353
|
+
label: z.ZodOptional<z.ZodString>;
|
|
354
|
+
description: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, z.core.$strip>>>;
|
|
356
|
+
}, z.core.$strip>;
|
|
357
|
+
export type ContentViewConfig = z.output<typeof contentViewConfigSchema>;
|
|
358
|
+
export type ViewFilter = z.output<typeof viewFilterSchema>;
|
|
359
|
+
export type ViewConditionalFormat = z.output<typeof viewConditionalFormatSchema>;
|
|
360
|
+
export declare function emptyViewConfig(): ContentViewConfig;
|
|
361
|
+
export declare const VIEW_TITLE_MAX_LENGTH = 60;
|
|
362
|
+
/** Trimmed. Empty or whitespace-only collapses to null, which means "render the translated type label". */
|
|
363
|
+
export declare const viewTitleSchema: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>;
|
|
364
|
+
export declare const createContentViewInputSchema: z.ZodObject<{
|
|
365
|
+
type: z.ZodEnum<{
|
|
366
|
+
table: "table";
|
|
367
|
+
gallery: "gallery";
|
|
368
|
+
kanban: "kanban";
|
|
369
|
+
}>;
|
|
370
|
+
title: z.ZodOptional<z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>>;
|
|
371
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
372
|
+
filters: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
373
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
374
|
+
slug: "slug";
|
|
375
|
+
status: "status";
|
|
376
|
+
created_at: "created_at";
|
|
377
|
+
updated_at: "updated_at";
|
|
378
|
+
}>, z.ZodString]>;
|
|
379
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
380
|
+
op: z.ZodEnum<{
|
|
381
|
+
eq: "eq";
|
|
382
|
+
gt: "gt";
|
|
383
|
+
gte: "gte";
|
|
384
|
+
lt: "lt";
|
|
385
|
+
lte: "lte";
|
|
386
|
+
contains: "contains";
|
|
387
|
+
is_empty: "is_empty";
|
|
388
|
+
is_not_empty: "is_not_empty";
|
|
389
|
+
}>;
|
|
390
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
391
|
+
}, z.core.$strip>>;
|
|
392
|
+
}, z.core.$strip>>>;
|
|
393
|
+
sort: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
394
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
395
|
+
slug: "slug";
|
|
396
|
+
status: "status";
|
|
397
|
+
created_at: "created_at";
|
|
398
|
+
updated_at: "updated_at";
|
|
399
|
+
}>, z.ZodString]>;
|
|
400
|
+
desc: z.ZodBoolean;
|
|
401
|
+
}, z.core.$strip>>>;
|
|
402
|
+
groupBy: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
403
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
404
|
+
slug: "slug";
|
|
405
|
+
status: "status";
|
|
406
|
+
created_at: "created_at";
|
|
407
|
+
updated_at: "updated_at";
|
|
408
|
+
}>, z.ZodString]>;
|
|
409
|
+
datePrecision: z.ZodOptional<z.ZodObject<{
|
|
410
|
+
year: z.ZodBoolean;
|
|
411
|
+
month: z.ZodBoolean;
|
|
412
|
+
day: z.ZodBoolean;
|
|
413
|
+
}, z.core.$strip>>;
|
|
414
|
+
}, z.core.$strip>>>;
|
|
415
|
+
appearance: z.ZodDefault<z.ZodObject<{
|
|
416
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
417
|
+
compact: "compact";
|
|
418
|
+
normal: "normal";
|
|
419
|
+
comfortable: "comfortable";
|
|
420
|
+
}>>;
|
|
421
|
+
hiddenColumns: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
422
|
+
slug: "slug";
|
|
423
|
+
status: "status";
|
|
424
|
+
created_at: "created_at";
|
|
425
|
+
updated_at: "updated_at";
|
|
426
|
+
}>, z.ZodString]>>>;
|
|
427
|
+
columnOrder: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
428
|
+
slug: "slug";
|
|
429
|
+
status: "status";
|
|
430
|
+
created_at: "created_at";
|
|
431
|
+
updated_at: "updated_at";
|
|
432
|
+
}>, z.ZodString]>>>;
|
|
433
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
434
|
+
}, z.core.$strip>>;
|
|
435
|
+
conditionalFormats: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
436
|
+
id: z.ZodString;
|
|
437
|
+
enabled: z.ZodBoolean;
|
|
438
|
+
priority: z.ZodNumber;
|
|
439
|
+
label: z.ZodOptional<z.ZodString>;
|
|
440
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
441
|
+
slug: "slug";
|
|
442
|
+
status: "status";
|
|
443
|
+
created_at: "created_at";
|
|
444
|
+
updated_at: "updated_at";
|
|
445
|
+
}>, z.ZodString]>;
|
|
446
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
447
|
+
op: z.ZodEnum<{
|
|
448
|
+
eq: "eq";
|
|
449
|
+
gt: "gt";
|
|
450
|
+
gte: "gte";
|
|
451
|
+
lt: "lt";
|
|
452
|
+
lte: "lte";
|
|
453
|
+
contains: "contains";
|
|
454
|
+
is_empty: "is_empty";
|
|
455
|
+
is_not_empty: "is_not_empty";
|
|
456
|
+
}>;
|
|
457
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
458
|
+
}, z.core.$strip>>;
|
|
459
|
+
tone: z.ZodEnum<{
|
|
460
|
+
success: "success";
|
|
461
|
+
info: "info";
|
|
462
|
+
warning: "warning";
|
|
463
|
+
neutral: "neutral";
|
|
464
|
+
danger: "danger";
|
|
465
|
+
}>;
|
|
466
|
+
target: z.ZodEnum<{
|
|
467
|
+
element: "element";
|
|
468
|
+
field: "field";
|
|
469
|
+
}>;
|
|
470
|
+
textStyles: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
471
|
+
bold: "bold";
|
|
472
|
+
italic: "italic";
|
|
473
|
+
underline: "underline";
|
|
474
|
+
}>>>;
|
|
475
|
+
}, z.core.$strip>>>;
|
|
476
|
+
kanban: z.ZodOptional<z.ZodObject<{
|
|
477
|
+
axisBranchId: z.ZodNullable<z.ZodString>;
|
|
478
|
+
sort: z.ZodNullable<z.ZodObject<{
|
|
479
|
+
branchId: z.ZodString;
|
|
480
|
+
dir: z.ZodEnum<{
|
|
481
|
+
ASC: "ASC";
|
|
482
|
+
DESC: "DESC";
|
|
483
|
+
}>;
|
|
484
|
+
}, z.core.$strip>>;
|
|
485
|
+
hiddenColumnValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
486
|
+
collapsedColumnValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
487
|
+
}, z.core.$strip>>;
|
|
488
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
489
|
+
version: z.ZodLiteral<1>;
|
|
490
|
+
media: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
491
|
+
branchId: z.ZodString;
|
|
492
|
+
}, z.core.$strip>>>;
|
|
493
|
+
header: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
494
|
+
branchId: z.ZodString;
|
|
495
|
+
}, z.core.$strip>>>;
|
|
496
|
+
subtitle: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
497
|
+
branchId: z.ZodString;
|
|
498
|
+
}, z.core.$strip>>>;
|
|
499
|
+
metadata: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
500
|
+
branchId: z.ZodString;
|
|
501
|
+
}, z.core.$strip>>>;
|
|
502
|
+
}, z.core.$strip>>;
|
|
503
|
+
folders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
504
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
505
|
+
slate: "slate";
|
|
506
|
+
red: "red";
|
|
507
|
+
orange: "orange";
|
|
508
|
+
amber: "amber";
|
|
509
|
+
green: "green";
|
|
510
|
+
teal: "teal";
|
|
511
|
+
blue: "blue";
|
|
512
|
+
violet: "violet";
|
|
513
|
+
pink: "pink";
|
|
514
|
+
}>>;
|
|
515
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
516
|
+
Folder: "Folder";
|
|
517
|
+
Star: "Star";
|
|
518
|
+
Heart: "Heart";
|
|
519
|
+
Image: "Image";
|
|
520
|
+
Camera: "Camera";
|
|
521
|
+
Calendar: "Calendar";
|
|
522
|
+
Tag: "Tag";
|
|
523
|
+
Bookmark: "Bookmark";
|
|
524
|
+
Home: "Home";
|
|
525
|
+
Gift: "Gift";
|
|
526
|
+
Video: "Video";
|
|
527
|
+
Music: "Music";
|
|
528
|
+
Book: "Book";
|
|
529
|
+
Flag: "Flag";
|
|
530
|
+
Briefcase: "Briefcase";
|
|
531
|
+
Users: "Users";
|
|
532
|
+
Sun: "Sun";
|
|
533
|
+
Crown: "Crown";
|
|
534
|
+
}>>;
|
|
535
|
+
label: z.ZodOptional<z.ZodString>;
|
|
536
|
+
description: z.ZodOptional<z.ZodString>;
|
|
537
|
+
}, z.core.$strip>>>;
|
|
538
|
+
}, z.core.$strip>>;
|
|
539
|
+
}, z.core.$strip>;
|
|
540
|
+
export type CreateContentViewInput = z.output<typeof createContentViewInputSchema>;
|
|
541
|
+
export declare const updateContentViewInputSchema: z.ZodObject<{
|
|
542
|
+
title: z.ZodOptional<z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>>;
|
|
543
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
544
|
+
filters: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
545
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
546
|
+
slug: "slug";
|
|
547
|
+
status: "status";
|
|
548
|
+
created_at: "created_at";
|
|
549
|
+
updated_at: "updated_at";
|
|
550
|
+
}>, z.ZodString]>;
|
|
551
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
552
|
+
op: z.ZodEnum<{
|
|
553
|
+
eq: "eq";
|
|
554
|
+
gt: "gt";
|
|
555
|
+
gte: "gte";
|
|
556
|
+
lt: "lt";
|
|
557
|
+
lte: "lte";
|
|
558
|
+
contains: "contains";
|
|
559
|
+
is_empty: "is_empty";
|
|
560
|
+
is_not_empty: "is_not_empty";
|
|
561
|
+
}>;
|
|
562
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
563
|
+
}, z.core.$strip>>;
|
|
564
|
+
}, z.core.$strip>>>;
|
|
565
|
+
sort: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
566
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
567
|
+
slug: "slug";
|
|
568
|
+
status: "status";
|
|
569
|
+
created_at: "created_at";
|
|
570
|
+
updated_at: "updated_at";
|
|
571
|
+
}>, z.ZodString]>;
|
|
572
|
+
desc: z.ZodBoolean;
|
|
573
|
+
}, z.core.$strip>>>;
|
|
574
|
+
groupBy: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
575
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
576
|
+
slug: "slug";
|
|
577
|
+
status: "status";
|
|
578
|
+
created_at: "created_at";
|
|
579
|
+
updated_at: "updated_at";
|
|
580
|
+
}>, z.ZodString]>;
|
|
581
|
+
datePrecision: z.ZodOptional<z.ZodObject<{
|
|
582
|
+
year: z.ZodBoolean;
|
|
583
|
+
month: z.ZodBoolean;
|
|
584
|
+
day: z.ZodBoolean;
|
|
585
|
+
}, z.core.$strip>>;
|
|
586
|
+
}, z.core.$strip>>>;
|
|
587
|
+
appearance: z.ZodDefault<z.ZodObject<{
|
|
588
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
589
|
+
compact: "compact";
|
|
590
|
+
normal: "normal";
|
|
591
|
+
comfortable: "comfortable";
|
|
592
|
+
}>>;
|
|
593
|
+
hiddenColumns: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
594
|
+
slug: "slug";
|
|
595
|
+
status: "status";
|
|
596
|
+
created_at: "created_at";
|
|
597
|
+
updated_at: "updated_at";
|
|
598
|
+
}>, z.ZodString]>>>;
|
|
599
|
+
columnOrder: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
600
|
+
slug: "slug";
|
|
601
|
+
status: "status";
|
|
602
|
+
created_at: "created_at";
|
|
603
|
+
updated_at: "updated_at";
|
|
604
|
+
}>, z.ZodString]>>>;
|
|
605
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
606
|
+
}, z.core.$strip>>;
|
|
607
|
+
conditionalFormats: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
608
|
+
id: z.ZodString;
|
|
609
|
+
enabled: z.ZodBoolean;
|
|
610
|
+
priority: z.ZodNumber;
|
|
611
|
+
label: z.ZodOptional<z.ZodString>;
|
|
612
|
+
columnRef: z.ZodUnion<readonly [z.ZodEnum<{
|
|
613
|
+
slug: "slug";
|
|
614
|
+
status: "status";
|
|
615
|
+
created_at: "created_at";
|
|
616
|
+
updated_at: "updated_at";
|
|
617
|
+
}>, z.ZodString]>;
|
|
618
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
619
|
+
op: z.ZodEnum<{
|
|
620
|
+
eq: "eq";
|
|
621
|
+
gt: "gt";
|
|
622
|
+
gte: "gte";
|
|
623
|
+
lt: "lt";
|
|
624
|
+
lte: "lte";
|
|
625
|
+
contains: "contains";
|
|
626
|
+
is_empty: "is_empty";
|
|
627
|
+
is_not_empty: "is_not_empty";
|
|
628
|
+
}>;
|
|
629
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
630
|
+
}, z.core.$strip>>;
|
|
631
|
+
tone: z.ZodEnum<{
|
|
632
|
+
success: "success";
|
|
633
|
+
info: "info";
|
|
634
|
+
warning: "warning";
|
|
635
|
+
neutral: "neutral";
|
|
636
|
+
danger: "danger";
|
|
637
|
+
}>;
|
|
638
|
+
target: z.ZodEnum<{
|
|
639
|
+
element: "element";
|
|
640
|
+
field: "field";
|
|
641
|
+
}>;
|
|
642
|
+
textStyles: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
643
|
+
bold: "bold";
|
|
644
|
+
italic: "italic";
|
|
645
|
+
underline: "underline";
|
|
646
|
+
}>>>;
|
|
647
|
+
}, z.core.$strip>>>;
|
|
648
|
+
kanban: z.ZodOptional<z.ZodObject<{
|
|
649
|
+
axisBranchId: z.ZodNullable<z.ZodString>;
|
|
650
|
+
sort: z.ZodNullable<z.ZodObject<{
|
|
651
|
+
branchId: z.ZodString;
|
|
652
|
+
dir: z.ZodEnum<{
|
|
653
|
+
ASC: "ASC";
|
|
654
|
+
DESC: "DESC";
|
|
655
|
+
}>;
|
|
656
|
+
}, z.core.$strip>>;
|
|
657
|
+
hiddenColumnValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
658
|
+
collapsedColumnValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
659
|
+
}, z.core.$strip>>;
|
|
660
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
661
|
+
version: z.ZodLiteral<1>;
|
|
662
|
+
media: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
663
|
+
branchId: z.ZodString;
|
|
664
|
+
}, z.core.$strip>>>;
|
|
665
|
+
header: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
666
|
+
branchId: z.ZodString;
|
|
667
|
+
}, z.core.$strip>>>;
|
|
668
|
+
subtitle: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
669
|
+
branchId: z.ZodString;
|
|
670
|
+
}, z.core.$strip>>>;
|
|
671
|
+
metadata: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
672
|
+
branchId: z.ZodString;
|
|
673
|
+
}, z.core.$strip>>>;
|
|
674
|
+
}, z.core.$strip>>;
|
|
675
|
+
folders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
676
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
677
|
+
slate: "slate";
|
|
678
|
+
red: "red";
|
|
679
|
+
orange: "orange";
|
|
680
|
+
amber: "amber";
|
|
681
|
+
green: "green";
|
|
682
|
+
teal: "teal";
|
|
683
|
+
blue: "blue";
|
|
684
|
+
violet: "violet";
|
|
685
|
+
pink: "pink";
|
|
686
|
+
}>>;
|
|
687
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
688
|
+
Folder: "Folder";
|
|
689
|
+
Star: "Star";
|
|
690
|
+
Heart: "Heart";
|
|
691
|
+
Image: "Image";
|
|
692
|
+
Camera: "Camera";
|
|
693
|
+
Calendar: "Calendar";
|
|
694
|
+
Tag: "Tag";
|
|
695
|
+
Bookmark: "Bookmark";
|
|
696
|
+
Home: "Home";
|
|
697
|
+
Gift: "Gift";
|
|
698
|
+
Video: "Video";
|
|
699
|
+
Music: "Music";
|
|
700
|
+
Book: "Book";
|
|
701
|
+
Flag: "Flag";
|
|
702
|
+
Briefcase: "Briefcase";
|
|
703
|
+
Users: "Users";
|
|
704
|
+
Sun: "Sun";
|
|
705
|
+
Crown: "Crown";
|
|
706
|
+
}>>;
|
|
707
|
+
label: z.ZodOptional<z.ZodString>;
|
|
708
|
+
description: z.ZodOptional<z.ZodString>;
|
|
709
|
+
}, z.core.$strip>>>;
|
|
710
|
+
}, z.core.$strip>>;
|
|
711
|
+
}, z.core.$strip>;
|
|
712
|
+
export type UpdateContentViewInput = z.output<typeof updateContentViewInputSchema>;
|
|
713
|
+
export declare const reorderContentViewsInputSchema: z.ZodObject<{
|
|
714
|
+
ids: z.ZodArray<z.ZodString>;
|
|
715
|
+
}, z.core.$strip>;
|
|
716
|
+
/** The API shape. Timestamps are unix seconds, like every other system table. */
|
|
717
|
+
export interface ContentView {
|
|
718
|
+
id: string;
|
|
719
|
+
seedSlug: string;
|
|
720
|
+
type: DashboardView;
|
|
721
|
+
/** null → the client renders the translated label of `type`. */
|
|
722
|
+
title: string | null;
|
|
723
|
+
position: number;
|
|
724
|
+
config: ContentViewConfig;
|
|
725
|
+
createdAt: number;
|
|
726
|
+
updatedAt: number;
|
|
727
|
+
updatedBy: string;
|
|
728
|
+
}
|
|
729
|
+
/** Storage shape: `type` is unchecked text until projectContentView narrows it. */
|
|
730
|
+
export interface ContentViewRecord extends Omit<ContentView, 'type'> {
|
|
731
|
+
type: string;
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Brief §2.10: `sort`, `groupBy` and `kanban.sort` may reference a `tags` branch only when it is single choice;
|
|
735
|
+
* `kanban.axisBranchId` may reference a `tags` branch only when it is a kanban axis candidate.
|
|
736
|
+
* One message per offending reference, in the order sort, groupBy, kanban axis, kanban sort; `[]` when valid.
|
|
737
|
+
* References to missing branches and to non-`tags` branches are not issues (cleanup handles them). Pure.
|
|
738
|
+
*/
|
|
739
|
+
export declare function viewConfigChoiceIssues(config: ContentViewConfig, seed: Seed): string[];
|
|
740
|
+
/**
|
|
741
|
+
* Pure auto-cleanup, never an error: drops references to branches the seed no longer has,
|
|
742
|
+
* `sort`/`groupBy`/kanban sort on a multiple-choice `tags` branch,
|
|
743
|
+
* duplicate filters on one column, date precision on a non-date grouping, and the Kanban
|
|
744
|
+
* sub-config on a non-kanban instance and the card layout on a table instance. Same policy as validateCardConfigAgainstSeed.
|
|
745
|
+
*/
|
|
746
|
+
export declare function validateViewConfigAgainstSeed(config: ContentViewConfig, seed: Seed, type: DashboardView): ContentViewConfig;
|
|
747
|
+
/** null when the seed's allow-list does not authorize the record's type (hidden, never deleted). */
|
|
748
|
+
export declare function projectContentView(record: ContentViewRecord, seed: Seed): ContentView | null;
|
|
749
|
+
/** Order-preserving. The caller passes records already sorted by position. */
|
|
750
|
+
export declare function projectContentViews(records: readonly ContentViewRecord[], seed: Seed): ContentView[];
|
|
751
|
+
/**
|
|
752
|
+
* The full position order of a seed's rows after its visible views were reordered. Hidden rows
|
|
753
|
+
* (types the allow-list currently rejects) keep their slot; visible slots are refilled in the
|
|
754
|
+
* requested order. Writing the result compacts positions to 0..n-1 with no duplicates.
|
|
755
|
+
*/
|
|
756
|
+
export declare function mergeContentViewOrder(allIds: readonly string[], visibleOrder: readonly string[]): string[];
|
|
757
|
+
//# sourceMappingURL=content-view.d.ts.map
|