@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
package/dist/engine/ddl.d.ts
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import type { Seed, Branch } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Helper function to determine if a branch requires a blind index column.
|
|
4
|
-
* Returns true if storage classification is 'encrypt' and filtering is not explicitly disabled.
|
|
5
|
-
*/
|
|
6
|
-
export declare function hasBlindIndex(branch: Branch): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* System-defined columns that exist on all content tables.
|
|
9
|
-
*/
|
|
10
|
-
export declare const SYSTEM_COLUMNS: Set<string>;
|
|
11
|
-
/**
|
|
12
|
-
* Returns the SQL table name for a given Seed.
|
|
13
|
-
*
|
|
14
|
-
* @param seed The seed definition.
|
|
15
|
-
* @returns The table name.
|
|
16
|
-
*/
|
|
17
|
-
export declare function tableName(seed: Seed): string;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the FTS (Full-Text Search) virtual table name for a given Seed.
|
|
20
|
-
*
|
|
21
|
-
* @param seed The seed definition.
|
|
22
|
-
* @returns The FTS table name.
|
|
23
|
-
*/
|
|
24
|
-
export declare function ftsTableName(seed: Seed): string;
|
|
25
|
-
/**
|
|
26
|
-
* Returns the vector table name for a given Seed.
|
|
27
|
-
*
|
|
28
|
-
* @param seed The seed definition.
|
|
29
|
-
* @returns The vector table name.
|
|
30
|
-
*/
|
|
31
|
-
export declare function vectorTableName(seed: Seed): string;
|
|
32
|
-
/**
|
|
33
|
-
* Determines whether a column is valid for a given Seed (either system column or branch alias).
|
|
34
|
-
*
|
|
35
|
-
* @param seed The seed definition.
|
|
36
|
-
* @param col The column name to check.
|
|
37
|
-
* @returns True if the column is valid, false otherwise.
|
|
38
|
-
*/
|
|
39
|
-
export declare function isValidColumn(seed: Seed, col: string): boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Filters the branches of a Seed to return only the ones that are indexable for full-text search.
|
|
42
|
-
*
|
|
43
|
-
* @param seed The seed definition.
|
|
44
|
-
* @returns An array of indexable branches.
|
|
45
|
-
*/
|
|
46
|
-
export declare function indexableSearchBranches(seed: Seed): Branch[];
|
|
47
|
-
/**
|
|
48
|
-
* Generates the SQL `CREATE TABLE IF NOT EXISTS content_{slug}` statement
|
|
49
|
-
* with system columns and one column per branch.
|
|
50
|
-
*
|
|
51
|
-
* @param seed The seed definition.
|
|
52
|
-
* @returns The CREATE TABLE SQL statement.
|
|
53
|
-
*/
|
|
54
|
-
export declare function generateCreateTable(seed: Seed): string;
|
|
55
|
-
/**
|
|
56
|
-
* Generates the SQL `CREATE TABLE IF NOT EXISTS content_{slug}_drafts` statement
|
|
57
|
-
* for seeds that allow drafts.
|
|
58
|
-
*
|
|
59
|
-
* @param seed The seed definition.
|
|
60
|
-
* @returns The draft table CREATE TABLE SQL statement, or null if drafts are disabled.
|
|
61
|
-
*/
|
|
62
|
-
export declare function generateDraftTable(seed: Seed): string | null;
|
|
63
|
-
/**
|
|
64
|
-
* Generates the SQL `ALTER TABLE content_{slug} ADD COLUMN {alias} {type}` statement.
|
|
65
|
-
*
|
|
66
|
-
* @param seed The seed definition.
|
|
67
|
-
* @param branch The branch definition for the new column.
|
|
68
|
-
* @returns The ALTER TABLE SQL statement.
|
|
69
|
-
*/
|
|
70
|
-
export declare function generateAddColumn(seed: Seed, branch: Branch): string;
|
|
71
|
-
/**
|
|
72
|
-
* Generates SQL index statements for system fields (status, created_at)
|
|
73
|
-
* and indexable branch columns.
|
|
74
|
-
*
|
|
75
|
-
* @param seed The seed definition.
|
|
76
|
-
* @returns An array of CREATE INDEX SQL statements.
|
|
77
|
-
*/
|
|
78
|
-
export declare function generateIndexes(seed: Seed): string[];
|
|
79
|
-
/**
|
|
80
|
-
* Generates the FTS5 virtual table definition for indexable text/richtext branches.
|
|
81
|
-
*
|
|
82
|
-
* @param seed The seed definition.
|
|
83
|
-
* @returns The CREATE VIRTUAL TABLE SQL statement, or null if no branches are indexable.
|
|
84
|
-
*/
|
|
85
|
-
export declare function generateFtsTable(seed: Seed): string | null;
|
|
86
|
-
/**
|
|
87
|
-
* Generates FTS5 triggers (insert, update, delete) to keep the FTS virtual table synchronized.
|
|
88
|
-
*
|
|
89
|
-
* @param seed The seed definition.
|
|
90
|
-
* @returns An array of CREATE TRIGGER SQL statements.
|
|
91
|
-
*/
|
|
92
|
-
export declare function generateFtsTriggers(seed: Seed): string[];
|
|
93
|
-
/**
|
|
94
|
-
* Generates the SQL `CREATE TABLE IF NOT EXISTS vector_{slug}` statement
|
|
95
|
-
* for indexable text/richtext branches.
|
|
96
|
-
*
|
|
97
|
-
* @param seed The seed definition.
|
|
98
|
-
* @returns The CREATE TABLE SQL statement, or null if no branches are indexable.
|
|
99
|
-
*/
|
|
100
|
-
export declare function generateVectorTable(seed: Seed): string | null;
|
|
101
|
-
/**
|
|
102
|
-
* Expected database schema column interface.
|
|
103
|
-
*/
|
|
104
|
-
export interface SchemaColumn {
|
|
105
|
-
/** Column name. */
|
|
106
|
-
name: string;
|
|
107
|
-
/** SQLite storage type. */
|
|
108
|
-
sqlType: 'TEXT' | 'REAL' | 'INTEGER';
|
|
109
|
-
/** Whether the column is NOT NULL. */
|
|
110
|
-
notNull: boolean;
|
|
111
|
-
/** Whether the column is the PRIMARY KEY. */
|
|
112
|
-
isPk: boolean;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Returns the list of expected columns for a Seed's table.
|
|
116
|
-
* Used to compare current vs expected schema (diffing).
|
|
117
|
-
*
|
|
118
|
-
* @param seed The seed definition.
|
|
119
|
-
* @returns The array of expected schema columns.
|
|
120
|
-
*/
|
|
121
|
-
export declare function getExpectedColumns(seed: Seed): SchemaColumn[];
|
|
122
|
-
/**
|
|
123
|
-
* Returns the junction table name for a many-to-many relation branch.
|
|
124
|
-
* Format: `rel_<seedSlug>_<branchAlias>`.
|
|
125
|
-
*
|
|
126
|
-
* @param seedSlug The slug of the parent Seed.
|
|
127
|
-
* @param branchAlias The alias of the relation branch.
|
|
128
|
-
* @returns The junction table name.
|
|
129
|
-
*/
|
|
130
|
-
export declare function junctionTableName(seedSlug: string, branchAlias: string): string;
|
|
131
|
-
/**
|
|
132
|
-
* Generates `CREATE TABLE IF NOT EXISTS rel_<seed>_<alias>` statement for a multi-relation branch.
|
|
133
|
-
*
|
|
134
|
-
* @param seed The parent seed definition.
|
|
135
|
-
* @param branch The multi-relation branch definition.
|
|
136
|
-
* @throws {Error} If called on a non-multi-relation branch or if `targetSeed` is missing.
|
|
137
|
-
* @returns The CREATE TABLE SQL statement.
|
|
138
|
-
*/
|
|
139
|
-
export declare function generateJunctionTable(seed: Seed, branch: Branch): string;
|
|
140
|
-
/**
|
|
141
|
-
* Generates the two B-tree indexes for a junction table:
|
|
142
|
-
* one on `parent_id` (listing entries by parent) and one on `target_id` (handling cascade checks from target side).
|
|
143
|
-
*
|
|
144
|
-
* @param seed The parent seed definition.
|
|
145
|
-
* @param branch The multi-relation branch definition.
|
|
146
|
-
* @returns An array of CREATE INDEX SQL statements.
|
|
147
|
-
*/
|
|
148
|
-
export declare function generateJunctionIndexes(seed: Seed, branch: Branch): string[];
|
|
149
|
-
/**
|
|
150
|
-
* Generates the drafts junction table `rel_<seed>_<alias>_drafts` for a many-to-many relation branch.
|
|
151
|
-
*
|
|
152
|
-
* @param seed The parent seed definition.
|
|
153
|
-
* @param branch The multi-relation branch definition.
|
|
154
|
-
* @returns The CREATE TABLE SQL statement, or null if drafts are disabled.
|
|
155
|
-
*/
|
|
156
|
-
export declare function generateJunctionDraftTable(seed: Seed, branch: Branch): string | null;
|
|
157
|
-
/**
|
|
158
|
-
* Returns every `DROP TABLE IF EXISTS` needed to fully remove a content type:
|
|
159
|
-
* the main table, the drafts table (if drafts enabled), full-text search table/triggers, and junction tables.
|
|
160
|
-
*
|
|
161
|
-
* @param seed The seed definition.
|
|
162
|
-
* @returns An array of DROP TABLE / DROP TRIGGER SQL statements.
|
|
163
|
-
*/
|
|
164
|
-
export declare function generateDropTable(seed: Seed): string[];
|
|
165
|
-
/**
|
|
166
|
-
* Returns the `DROP COLUMN` SQL statements for removing a single field.
|
|
167
|
-
* Drops the junction table for multi-relations, or alters the tables to drop the column.
|
|
168
|
-
*
|
|
169
|
-
* @param seed The seed definition.
|
|
170
|
-
* @param alias The alias of the branch to drop.
|
|
171
|
-
* @returns An array of SQL statements.
|
|
172
|
-
*/
|
|
173
|
-
export declare function generateDropColumn(seed: Seed, alias: string): string[];
|
|
174
|
-
/**
|
|
175
|
-
* Returns the `RENAME COLUMN` SQL statements for renaming a field's alias.
|
|
176
|
-
* For a multi-relation branch, renames the junction table (+ drafts junction table) instead.
|
|
177
|
-
*
|
|
178
|
-
* @param seed The seed definition.
|
|
179
|
-
* @param from The old alias.
|
|
180
|
-
* @param to The new alias.
|
|
181
|
-
* @returns An array of SQL statements.
|
|
182
|
-
*/
|
|
183
|
-
export declare function generateRenameColumn(seed: Seed, from: string, to: string): string[];
|
|
184
|
-
/**
|
|
185
|
-
* Returns the statements that change a column's SQL type in place using CAST, bypassing SQLite rebuild limitations.
|
|
186
|
-
*
|
|
187
|
-
* @param seed The seed definition.
|
|
188
|
-
* @param branch The target branch definition (carrying the new type).
|
|
189
|
-
* @throws {Error} If called on a multi-relation branch.
|
|
190
|
-
* @returns An array of SQL statements.
|
|
191
|
-
*/
|
|
192
|
-
export declare function generateRetypeColumn(seed: Seed, branch: Branch): string[];
|
|
193
|
-
//# sourceMappingURL=ddl.d.ts.map
|
package/dist/engine/ddl.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ddl.d.ts","sourceRoot":"","sources":["../../src/engine/ddl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACJ,MAAM,EAOP,MAAM,YAAY,CAAC;AAIpB;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAGrD;AA6BD;;GAEG;AACH,eAAO,MAAM,cAAc,aAAgE,CAAA;AAG3F;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE5C;AAcD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE/C;AAGD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAElD;AAGD;;;;;;GA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