@kyro-cms/core 0.3.2 → 0.3.5
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-BznDc2AT.d.ts → WebhookService-118ZTFis.d.ts} +2 -2
- package/dist/{WebhookService-mZZ75syh.d.cts → WebhookService-AefJfqX0.d.cts} +2 -2
- package/dist/api-handler.cjs +52 -0
- package/dist/api-handler.cjs.map +1 -0
- package/dist/api-handler.d.cts +9 -0
- package/dist/api-handler.d.ts +9 -0
- package/dist/api-handler.js +46 -0
- package/dist/api-handler.js.map +1 -0
- package/dist/{base-Hu6ij8sZ.d.ts → base-DvvNqnM-.d.cts} +16 -5
- package/dist/{base-Db9LkB1N.d.cts → base-eVegJ_Pr.d.ts} +16 -5
- package/dist/bootstrap-DGJ3N7SO.js +6 -0
- package/dist/{bootstrap-LL6O7PWO.js.map → bootstrap-DGJ3N7SO.js.map} +1 -1
- package/dist/bootstrap-O5UGUTYU.cjs +31 -0
- package/dist/{bootstrap-BMWVB2T6.cjs.map → bootstrap-O5UGUTYU.cjs.map} +1 -1
- package/dist/{chunk-QKOFKITP.js → chunk-2HFJUUFZ.js} +3 -11
- package/dist/chunk-2HFJUUFZ.js.map +1 -0
- package/dist/chunk-2UOI5MUC.cjs +1276 -0
- package/dist/chunk-2UOI5MUC.cjs.map +1 -0
- package/dist/{chunk-DIC236EW.js → chunk-342BJNBI.js} +167 -24
- package/dist/chunk-342BJNBI.js.map +1 -0
- package/dist/{chunk-OUGKLCYF.js → chunk-3AJE4SEG.js} +4 -3
- package/dist/chunk-3AJE4SEG.js.map +1 -0
- package/dist/chunk-4UD44U4Z.js +5818 -0
- package/dist/chunk-4UD44U4Z.js.map +1 -0
- package/dist/chunk-5FTY2DLG.js +1258 -0
- package/dist/chunk-5FTY2DLG.js.map +1 -0
- package/dist/{chunk-BXMWDUED.js → chunk-A4USRVTQ.js} +2 -2
- package/dist/chunk-A4USRVTQ.js.map +1 -0
- package/dist/chunk-ADLJSJSN.cjs +13 -0
- package/dist/chunk-ADLJSJSN.cjs.map +1 -0
- package/dist/chunk-ATBOUGQP.cjs +513 -0
- package/dist/chunk-ATBOUGQP.cjs.map +1 -0
- package/dist/chunk-BQ2T4WRS.js +140 -0
- package/dist/chunk-BQ2T4WRS.js.map +1 -0
- package/dist/{chunk-U74F3YZU.js → chunk-DBUYB32X.js} +15 -3
- package/dist/chunk-DBUYB32X.js.map +1 -0
- package/dist/chunk-DE7OQOMD.cjs +5842 -0
- package/dist/chunk-DE7OQOMD.cjs.map +1 -0
- package/dist/chunk-DLHUQO25.cjs +1746 -0
- package/dist/chunk-DLHUQO25.cjs.map +1 -0
- package/dist/{chunk-GE5DMB44.js → chunk-E3BZLMX6.js} +55 -49
- package/dist/chunk-E3BZLMX6.js.map +1 -0
- package/dist/{chunk-44BF6ALS.cjs → chunk-H4XCAPA6.cjs} +55 -49
- package/dist/chunk-H4XCAPA6.cjs.map +1 -0
- package/dist/{chunk-VIONYQ2K.cjs → chunk-IBG6V56E.cjs} +16 -32
- package/dist/chunk-IBG6V56E.cjs.map +1 -0
- package/dist/{chunk-LIJVWQKU.cjs → chunk-IX3ABYKZ.cjs} +43 -31
- package/dist/chunk-IX3ABYKZ.cjs.map +1 -0
- package/dist/chunk-JYGIFBBS.cjs +146 -0
- package/dist/chunk-JYGIFBBS.cjs.map +1 -0
- package/dist/{chunk-42JPONZU.cjs → chunk-K7JPTH3G.cjs} +17 -16
- package/dist/chunk-K7JPTH3G.cjs.map +1 -0
- package/dist/{chunk-RLTG4YZM.cjs → chunk-KOCTZKPV.cjs} +2 -2
- package/dist/chunk-KOCTZKPV.cjs.map +1 -0
- package/dist/{chunk-EWP5AT6A.cjs → chunk-N4H37VN4.cjs} +2 -11
- package/dist/chunk-N4H37VN4.cjs.map +1 -0
- package/dist/chunk-P2YW545G.js +11 -0
- package/dist/chunk-P2YW545G.js.map +1 -0
- package/dist/chunk-Q23JB3KL.js +488 -0
- package/dist/chunk-Q23JB3KL.js.map +1 -0
- package/dist/{chunk-E5X75WNB.js → chunk-QXIQWPAP.js} +14 -30
- package/dist/chunk-QXIQWPAP.js.map +1 -0
- package/dist/chunk-R3XIBBAW.cjs +34 -0
- package/dist/chunk-R3XIBBAW.cjs.map +1 -0
- package/dist/chunk-R4C4O4SE.cjs +622 -0
- package/dist/chunk-R4C4O4SE.cjs.map +1 -0
- package/dist/{chunk-KWGNR4HM.js → chunk-REK7AYOC.js} +82 -9
- package/dist/chunk-REK7AYOC.js.map +1 -0
- package/dist/chunk-RGIQKTZ7.js +68 -0
- package/dist/chunk-RGIQKTZ7.js.map +1 -0
- package/dist/chunk-RYDGMBIG.js +1737 -0
- package/dist/chunk-RYDGMBIG.js.map +1 -0
- package/dist/chunk-SDMNUYVU.js +30 -0
- package/dist/chunk-SDMNUYVU.js.map +1 -0
- package/dist/{chunk-FTSSDDZQ.cjs → chunk-VJT6P4N6.cjs} +82 -9
- package/dist/chunk-VJT6P4N6.cjs.map +1 -0
- package/dist/{chunk-HT6VE4NW.cjs → chunk-W3KPQX7V.cjs} +168 -25
- package/dist/chunk-W3KPQX7V.cjs.map +1 -0
- package/dist/{chunk-LTRCYJAG.js → chunk-WOWUL7ZY.js} +3 -2
- package/dist/chunk-WOWUL7ZY.js.map +1 -0
- package/dist/{chunk-7YITG2US.cjs → chunk-WQBRWOQT.cjs} +3 -2
- package/dist/chunk-WQBRWOQT.cjs.map +1 -0
- package/dist/{chunk-KB6QF4HO.js → chunk-WSCJQI2B.js} +305 -152
- package/dist/chunk-WSCJQI2B.js.map +1 -0
- package/dist/chunk-X3CU27OO.cjs +78 -0
- package/dist/chunk-X3CU27OO.cjs.map +1 -0
- package/dist/chunk-Y3TM7WH7.js +617 -0
- package/dist/chunk-Y3TM7WH7.js.map +1 -0
- package/dist/{chunk-PNBZZ76A.cjs → chunk-Z2OVHWHB.cjs} +305 -151
- package/dist/chunk-Z2OVHWHB.cjs.map +1 -0
- package/dist/cli/index.cjs +2 -2
- package/dist/cli/index.js +2 -2
- package/dist/client.cjs +23 -13
- package/dist/client.d.cts +4 -2
- package/dist/client.d.ts +4 -2
- package/dist/client.js +3 -1
- package/dist/drizzle/index.cjs +20 -19
- package/dist/drizzle/index.d.cts +28 -7
- package/dist/drizzle/index.d.ts +28 -7
- package/dist/drizzle/index.js +5 -4
- package/dist/fields/index.cjs +105 -0
- package/dist/fields/index.cjs.map +1 -0
- package/dist/fields/index.d.cts +27 -0
- package/dist/fields/index.d.ts +27 -0
- package/dist/fields/index.js +4 -0
- package/dist/fields/index.js.map +1 -0
- package/dist/graphql/index.cjs +4 -3
- package/dist/graphql/index.d.cts +3 -2
- package/dist/graphql/index.d.ts +3 -2
- package/dist/graphql/index.js +2 -1
- package/dist/{index-Ci6r4xnN.d.ts → index-CLp-DRKA.d.ts} +2 -1
- package/dist/{index-11MDNKce.d.cts → index-DfO7G4kN.d.cts} +2 -1
- package/dist/index.cjs +2659 -6670
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +138 -47
- package/dist/index.d.ts +138 -47
- package/dist/index.js +2356 -6529
- package/dist/index.js.map +1 -1
- package/dist/integration.cjs +68 -0
- package/dist/integration.cjs.map +1 -0
- package/dist/integration.d.cts +27 -0
- package/dist/integration.d.ts +27 -0
- package/dist/integration.js +61 -0
- package/dist/integration.js.map +1 -0
- package/dist/mongodb/index.cjs +4 -4
- package/dist/mongodb/index.d.cts +20 -6
- package/dist/mongodb/index.d.ts +20 -6
- package/dist/mongodb/index.js +2 -2
- package/dist/postgres-auth-adapter-7F3ECO7I.js +5 -0
- package/dist/{postgres-auth-adapter-OTRWSTT5.js.map → postgres-auth-adapter-7F3ECO7I.js.map} +1 -1
- package/dist/postgres-auth-adapter-Z463NYJZ.cjs +14 -0
- package/dist/{postgres-auth-adapter-EVRPO7BQ.cjs.map → postgres-auth-adapter-Z463NYJZ.cjs.map} +1 -1
- package/dist/redis-adapter-LPUWLE4Y.cjs +13 -0
- package/dist/{redis-adapter-E7PMN5HW.cjs.map → redis-adapter-LPUWLE4Y.cjs.map} +1 -1
- package/dist/redis-adapter-THYDCGQR.js +4 -0
- package/dist/{redis-adapter-HOO67RBQ.js.map → redis-adapter-THYDCGQR.js.map} +1 -1
- package/dist/rest/index.cjs +9 -5
- package/dist/rest/index.d.cts +6 -3
- package/dist/rest/index.d.ts +6 -3
- package/dist/rest/index.js +7 -3
- package/dist/{schema-CNB2DDTX.js → schema-6Q4W6AE6.js} +3 -3
- package/dist/{schema-CNB2DDTX.js.map → schema-6Q4W6AE6.js.map} +1 -1
- package/dist/{schema-Y777CQQS.cjs → schema-TIYTCIKX.cjs} +14 -14
- package/dist/{schema-Y777CQQS.cjs.map → schema-TIYTCIKX.cjs.map} +1 -1
- package/dist/templates/index.cjs +27 -23
- package/dist/templates/index.d.cts +8 -2
- package/dist/templates/index.d.ts +8 -2
- package/dist/templates/index.js +1 -1
- package/dist/trpc/index.cjs +12 -11
- package/dist/trpc/index.d.cts +3 -2
- package/dist/trpc/index.d.ts +3 -2
- package/dist/trpc/index.js +3 -2
- package/dist/{types-1u353OHN.d.ts → types-BnTm7oJG.d.cts} +7 -3
- package/dist/{types-1u353OHN.d.cts → types-BnTm7oJG.d.ts} +7 -3
- package/dist/{types-kGfsGdos.d.cts → types-Bs1up4yP.d.ts} +76 -244
- package/dist/{types-kGfsGdos.d.ts → types-J3R9nVsZ.d.cts} +76 -244
- package/dist/types-VtjUxIMp.d.cts +246 -0
- package/dist/types-VtjUxIMp.d.ts +246 -0
- package/package.json +16 -9
- package/dist/bootstrap-BMWVB2T6.cjs +0 -31
- package/dist/bootstrap-LL6O7PWO.js +0 -6
- package/dist/chunk-42JPONZU.cjs.map +0 -1
- package/dist/chunk-44BF6ALS.cjs.map +0 -1
- package/dist/chunk-4M5PHMUE.cjs +0 -947
- package/dist/chunk-4M5PHMUE.cjs.map +0 -1
- package/dist/chunk-6MSSF46R.js +0 -941
- package/dist/chunk-6MSSF46R.js.map +0 -1
- package/dist/chunk-7YITG2US.cjs.map +0 -1
- package/dist/chunk-BTOE3VUK.js +0 -330
- package/dist/chunk-BTOE3VUK.js.map +0 -1
- package/dist/chunk-BXMWDUED.js.map +0 -1
- package/dist/chunk-DIC236EW.js.map +0 -1
- package/dist/chunk-E5X75WNB.js.map +0 -1
- package/dist/chunk-E63IF3MD.cjs +0 -951
- package/dist/chunk-E63IF3MD.cjs.map +0 -1
- package/dist/chunk-EWP5AT6A.cjs.map +0 -1
- package/dist/chunk-FTSSDDZQ.cjs.map +0 -1
- package/dist/chunk-GE5DMB44.js.map +0 -1
- package/dist/chunk-GVFB5C6O.cjs +0 -345
- package/dist/chunk-GVFB5C6O.cjs.map +0 -1
- package/dist/chunk-HT6VE4NW.cjs.map +0 -1
- package/dist/chunk-HVSQDZZJ.cjs +0 -765
- package/dist/chunk-HVSQDZZJ.cjs.map +0 -1
- package/dist/chunk-HYC4GNHX.js +0 -758
- package/dist/chunk-HYC4GNHX.js.map +0 -1
- package/dist/chunk-KB6QF4HO.js.map +0 -1
- package/dist/chunk-KWGNR4HM.js.map +0 -1
- package/dist/chunk-LIJVWQKU.cjs.map +0 -1
- package/dist/chunk-LTRCYJAG.js.map +0 -1
- package/dist/chunk-OUGKLCYF.js.map +0 -1
- package/dist/chunk-PNBZZ76A.cjs.map +0 -1
- package/dist/chunk-QKOFKITP.js.map +0 -1
- package/dist/chunk-RLTG4YZM.cjs.map +0 -1
- package/dist/chunk-RRYXQMZG.js +0 -935
- package/dist/chunk-RRYXQMZG.js.map +0 -1
- package/dist/chunk-U74F3YZU.js.map +0 -1
- package/dist/chunk-VIONYQ2K.cjs.map +0 -1
- package/dist/postgres-auth-adapter-EVRPO7BQ.cjs +0 -14
- package/dist/postgres-auth-adapter-OTRWSTT5.js +0 -5
- package/dist/redis-adapter-E7PMN5HW.cjs +0 -13
- package/dist/redis-adapter-HOO67RBQ.js +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -3,26 +3,28 @@ export { createContext, createCountProcedure, createCreateProcedure, createDelet
|
|
|
3
3
|
import * as graphql from 'graphql';
|
|
4
4
|
import * as hono from 'hono';
|
|
5
5
|
import * as hono_types from 'hono/types';
|
|
6
|
-
import { R as Registry } from './index-
|
|
7
|
-
export { c as createRegistry, g as getRegistry, r as resetRegistry } from './index-
|
|
8
|
-
import {
|
|
9
|
-
export {
|
|
6
|
+
import { R as Registry } from './index-CLp-DRKA.js';
|
|
7
|
+
export { c as createRegistry, g as getRegistry, r as resetRegistry } from './index-CLp-DRKA.js';
|
|
8
|
+
import { B as BaseAdapter, K as KyroConfig, m as User, R as Request$1, C as CollectionConfig, G as GlobalConfig, F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, e as UpdateArgs, D as DeleteArgs, f as FindVersionsArgs, g as VersionRecord, h as CreateVersionArgs, i as DraftFindArgs, j as DraftSnapshot, k as DraftUpsertArgs, l as DraftDeleteArgs, H as Hook } from './types-Bs1up4yP.js';
|
|
9
|
+
export { n as AccessArgs, o as AccessControl, p as AdapterConfig, A as AdminConfig, a as AuthConfig, q as CollectionAccess, r as CollectionHooks, s as CreateResult, t as FieldAccess, u as FieldHooks, v as GlobalAccess, w as GlobalHooks, x as HookArgs, I as ImageSize, P as PluginConfig, U as UploadConfig, V as VersionConfig, W as WhereClause, y as evaluateAccess, z as getWhereClause, E as mergeWhereClauses, J as runFieldHooks, L as runHooks } from './types-Bs1up4yP.js';
|
|
10
10
|
import { KyroPubSub, KyroWSServer } from './ws/index.js';
|
|
11
11
|
export { PubSub, createWSServer } from './ws/index.js';
|
|
12
|
+
import { W as WebhookPayload, a as WebhookDelivery, b as WebhookConfig, c as WebhookService } from './WebhookService-118ZTFis.js';
|
|
13
|
+
export { A as ALL_WEBHOOK_EVENTS, C as CreateWebhookData, U as UpdateWebhookData, d as WEBHOOK_COLLECTION, e as WEBHOOK_DELIVERY_COLLECTION, f as WEBHOOK_EVENTS, g as WebhookEvent, h as WebhookTriggerResult, i as createWebhookService } from './WebhookService-118ZTFis.js';
|
|
14
|
+
import { F as Field } from './types-VtjUxIMp.js';
|
|
15
|
+
export { p as ALL_FIELD_TYPES, A as ArrayField, B as BaseField, a as Block, d as BlocksField, q as COMPLEX_FIELD_TYPES, C as CheckboxField, e as CodeField, f as CollapsibleField, g as ColorField, D as DateField, E as EmailField, h as FieldAdmin, i as FieldType, G as GroupField, I as ImageField, J as JSONField, L as LAYOUT_FIELD_TYPES, M as MarkdownField, N as NumberField, r as PRIMITIVE_FIELD_TYPES, P as PasswordField, s as RELATIONAL_FIELD_TYPES, R as RadioField, j as RelationshipField, k as RichTextBlock, l as RichTextField, m as RowField, S as SelectField, T as TabsField, n as TextField, o as TextareaField, U as UploadField, V as ValidateOptions, t as isArrayField, u as isBlocksField, v as isGroupField, w as isImageField, x as isLayoutField, y as isNumberField, z as isRelationshipField, H as isRichTextField, K as isSelectField, O as isTextField, Q as isUploadField } from './types-VtjUxIMp.js';
|
|
12
16
|
import { ZodTypeAny } from 'zod';
|
|
13
17
|
export { z } from 'zod';
|
|
14
|
-
|
|
18
|
+
export { createColumnsNode, normalizeRichTextDocument, normalizeRichTextValue, renderRichText, richTextStyles } from './fields/index.js';
|
|
19
|
+
import { A as AbstractBaseAdapter } from './base-eVegJ_Pr.js';
|
|
15
20
|
import { Dialect } from './drizzle/index.js';
|
|
16
21
|
export { DrizzleAdapter, PostgresAuthAdapter, collectionToDrizzleSchema, createDatabase, createDrizzleAdapter, fieldToDrizzleType, runMigrations, seedDefaultRoles } from './drizzle/index.js';
|
|
17
22
|
export { MongoDBAdapter, createMongoDBAdapter } from './mongodb/index.js';
|
|
18
23
|
export { buildGraphQLSchema, createGraphQLSchema } from './graphql/index.js';
|
|
19
24
|
export { createHonoApp, createRESTAPI } from './rest/index.js';
|
|
20
25
|
export { A as AdminStylingConfig, C as CSSGenerator, F as FieldStyling, S as StylingConfig, a as StylingMode, T as ThemeBorderRadius, b as ThemeColors, c as ThemeConfig, d as ThemeFonts, e as ThemeShadows, f as ThemeSpacing, g as createAdminStyling, h as defaultDarkTheme, i as defaultFieldStyling, j as defaultLightTheme, k as ecommerce2026Theme, l as generateCSSVariables, m as generateTailwindConfig } from './index-Bz9JqRGI.js';
|
|
21
|
-
import { d as AuditLog, e as AuditLogFilter, A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, b as AuthTokenConfig, R as RegisterData, a as AuthResult, L as LoginCredentials, J as JWTPayload } from './types-
|
|
22
|
-
export { f as AuditAction } from './types-
|
|
23
|
-
import Database from 'better-sqlite3';
|
|
24
|
-
import { W as WebhookPayload, a as WebhookDelivery, b as WebhookConfig } from './WebhookService-BznDc2AT.js';
|
|
25
|
-
export { A as ALL_WEBHOOK_EVENTS, C as CreateWebhookData, U as UpdateWebhookData, c as WEBHOOK_COLLECTION, d as WEBHOOK_DELIVERY_COLLECTION, e as WEBHOOK_EVENTS, f as WebhookEvent, g as WebhookService, h as WebhookTriggerResult, i as createWebhookService } from './WebhookService-BznDc2AT.js';
|
|
26
|
+
import { d as AuditLog, e as AuditLogFilter, A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, b as AuthTokenConfig, R as RegisterData, a as AuthResult, L as LoginCredentials, J as JWTPayload } from './types-BnTm7oJG.js';
|
|
27
|
+
export { f as AuditAction } from './types-BnTm7oJG.js';
|
|
26
28
|
export { TemplateConfig, allSettingsGlobals, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, ecommerceSettingsGlobals, kitchenSinkCollections, mediaCollections, minimalCollections } from './templates/index.js';
|
|
27
29
|
import { Redis } from 'ioredis';
|
|
28
30
|
import 'ws';
|
|
@@ -51,28 +53,6 @@ declare function deliverWithRetry(webhook: WebhookConfig, payload: WebhookPayloa
|
|
|
51
53
|
declare function buildDeliveryRecord(deliveryId: string, webhookId: string, event: string, payload: WebhookPayload, attempt: number, result: DeliveryResult): WebhookDelivery;
|
|
52
54
|
declare function createTestPayload(): WebhookPayload;
|
|
53
55
|
|
|
54
|
-
interface RichTextMark {
|
|
55
|
-
type: string;
|
|
56
|
-
attrs?: Record<string, unknown>;
|
|
57
|
-
}
|
|
58
|
-
interface RichTextNode {
|
|
59
|
-
type?: string;
|
|
60
|
-
attrs?: Record<string, unknown>;
|
|
61
|
-
content?: RichTextNode[];
|
|
62
|
-
text?: string;
|
|
63
|
-
marks?: RichTextMark[];
|
|
64
|
-
[key: string]: unknown;
|
|
65
|
-
}
|
|
66
|
-
interface RichTextDocument extends RichTextNode {
|
|
67
|
-
type: "doc";
|
|
68
|
-
content: RichTextNode[];
|
|
69
|
-
}
|
|
70
|
-
declare const richTextStyles: string;
|
|
71
|
-
declare function createColumnsNode(columns?: number): RichTextNode;
|
|
72
|
-
declare function normalizeRichTextDocument(value: unknown): RichTextDocument;
|
|
73
|
-
declare function normalizeRichTextValue<T>(value: T): T;
|
|
74
|
-
declare function renderRichText(value: unknown): string;
|
|
75
|
-
|
|
76
56
|
declare class AuditLogger {
|
|
77
57
|
private redis;
|
|
78
58
|
private prefix;
|
|
@@ -109,6 +89,7 @@ declare class Kyro {
|
|
|
109
89
|
registry: Registry;
|
|
110
90
|
db: BaseAdapter;
|
|
111
91
|
pubsub: KyroPubSub;
|
|
92
|
+
webhookService: WebhookService;
|
|
112
93
|
settings?: Record<string, any>;
|
|
113
94
|
private wsServer?;
|
|
114
95
|
private config;
|
|
@@ -186,6 +167,8 @@ declare class LocalAdapter extends AbstractBaseAdapter {
|
|
|
186
167
|
private db;
|
|
187
168
|
private path?;
|
|
188
169
|
private migrations;
|
|
170
|
+
private readonly draftsTableName;
|
|
171
|
+
private readonly versionsTableName;
|
|
189
172
|
constructor(options: {
|
|
190
173
|
db?: any;
|
|
191
174
|
path?: string;
|
|
@@ -193,7 +176,11 @@ declare class LocalAdapter extends AbstractBaseAdapter {
|
|
|
193
176
|
connect(): Promise<void>;
|
|
194
177
|
disconnect(): Promise<void>;
|
|
195
178
|
private ensureTable;
|
|
179
|
+
private ensureVersionsTable;
|
|
180
|
+
private ensureDraftsTable;
|
|
181
|
+
private col;
|
|
196
182
|
private fieldToSQL;
|
|
183
|
+
private parseGlobalsSlug;
|
|
197
184
|
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
198
185
|
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
199
186
|
create<T>(args: CreateArgs): Promise<T>;
|
|
@@ -208,14 +195,31 @@ declare class LocalAdapter extends AbstractBaseAdapter {
|
|
|
208
195
|
collection: string;
|
|
209
196
|
where: Record<string, any>;
|
|
210
197
|
tenantID?: string;
|
|
198
|
+
draft?: boolean;
|
|
211
199
|
}): Promise<any>;
|
|
212
|
-
findVersions(): Promise<FindResult<
|
|
213
|
-
findVersionByID(
|
|
214
|
-
|
|
215
|
-
|
|
200
|
+
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
201
|
+
findVersionByID(args: {
|
|
202
|
+
collection: string;
|
|
203
|
+
versionId: string;
|
|
204
|
+
tenantID?: string;
|
|
205
|
+
}): Promise<VersionRecord | null>;
|
|
206
|
+
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
207
|
+
deleteVersions(args: {
|
|
208
|
+
collection: string;
|
|
209
|
+
documentId: string;
|
|
210
|
+
keepLatest?: number;
|
|
211
|
+
tenantID?: string;
|
|
212
|
+
}): Promise<void>;
|
|
213
|
+
private rowToVersion;
|
|
214
|
+
findDraft<T>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
|
|
215
|
+
upsertDraft<T>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
|
|
216
|
+
deleteDraft(args: DraftDeleteArgs): Promise<void>;
|
|
217
|
+
protected prepareData(data: Record<string, any>, config: CollectionConfig | GlobalConfig): Record<string, any>;
|
|
216
218
|
private rowToDoc;
|
|
217
219
|
private generateId;
|
|
220
|
+
private getMediaById;
|
|
218
221
|
private getTableNameFor;
|
|
222
|
+
private rowToDraft;
|
|
219
223
|
migrate(): Promise<void>;
|
|
220
224
|
rollback(): Promise<void>;
|
|
221
225
|
transaction<T>(fn: (tx: any) => Promise<T>): Promise<T>;
|
|
@@ -349,11 +353,13 @@ interface RedisAuthAdapterOptions {
|
|
|
349
353
|
tls?: boolean;
|
|
350
354
|
}
|
|
351
355
|
declare class RedisAuthAdapter implements AuthAdapter {
|
|
352
|
-
private
|
|
356
|
+
private _redis;
|
|
353
357
|
private prefix;
|
|
354
358
|
private tokenExpiration;
|
|
355
359
|
private refreshExpiration;
|
|
360
|
+
private options;
|
|
356
361
|
constructor(options?: RedisAuthAdapterOptions);
|
|
362
|
+
private getRedis;
|
|
357
363
|
connect(): Promise<void>;
|
|
358
364
|
disconnect(): Promise<void>;
|
|
359
365
|
private userKey;
|
|
@@ -378,6 +384,7 @@ declare class RedisAuthAdapter implements AuthAdapter {
|
|
|
378
384
|
userAgent?: string;
|
|
379
385
|
}): Promise<Session>;
|
|
380
386
|
findSessionByToken(token: string): Promise<Session | null>;
|
|
387
|
+
findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
|
|
381
388
|
deleteSession(sessionId: string): Promise<boolean>;
|
|
382
389
|
deleteUserSessions(userId: string): Promise<number>;
|
|
383
390
|
addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
|
|
@@ -477,7 +484,9 @@ declare class EmailTransport {
|
|
|
477
484
|
private transporter?;
|
|
478
485
|
private config;
|
|
479
486
|
private templates;
|
|
487
|
+
private transporterInitialized;
|
|
480
488
|
constructor(config: EmailConfig$1, templates?: Partial<EmailTemplates>);
|
|
489
|
+
private ensureTransporter;
|
|
481
490
|
send(options: EmailOptions): Promise<any>;
|
|
482
491
|
private sendViaResend;
|
|
483
492
|
private sendViaSendGrid;
|
|
@@ -674,11 +683,11 @@ declare class InMemoryAuditLogger {
|
|
|
674
683
|
|
|
675
684
|
interface AuthRoutesConfig {
|
|
676
685
|
redis: AuthAdapter;
|
|
677
|
-
|
|
678
|
-
jwtSecret: string;
|
|
686
|
+
jwtSecret?: string;
|
|
679
687
|
jwtExpiresIn?: string;
|
|
680
688
|
jwtIssuer?: string;
|
|
681
689
|
jwtAudience?: string;
|
|
690
|
+
email?: EmailTransport;
|
|
682
691
|
passwordPolicy?: PasswordPolicy;
|
|
683
692
|
lockout?: InMemoryAccountLockout;
|
|
684
693
|
rateLimiter?: InMemoryRateLimiter;
|
|
@@ -689,10 +698,6 @@ interface AuthRoutesConfig {
|
|
|
689
698
|
declare class AuthRoutes {
|
|
690
699
|
private authAdapter;
|
|
691
700
|
private email?;
|
|
692
|
-
private jwtSecret;
|
|
693
|
-
private jwtExpiresIn;
|
|
694
|
-
private jwtIssuer?;
|
|
695
|
-
private jwtAudience?;
|
|
696
701
|
private passwordPolicy;
|
|
697
702
|
private lockout?;
|
|
698
703
|
private rateLimiter?;
|
|
@@ -711,6 +716,11 @@ declare class AuthRoutes {
|
|
|
711
716
|
private recordFailedLogin;
|
|
712
717
|
private sanitizeUser;
|
|
713
718
|
private jsonResponse;
|
|
719
|
+
listSessions(req: Request): Promise<Response>;
|
|
720
|
+
revokeSession(req: Request, sessionId: string): Promise<Response>;
|
|
721
|
+
revokeOtherSessions(req: Request): Promise<Response>;
|
|
722
|
+
renameSession(req: Request, sessionId: string): Promise<Response>;
|
|
723
|
+
refreshSession(req: Request): Promise<Response>;
|
|
714
724
|
private errorResponse;
|
|
715
725
|
private rateLimitResponse;
|
|
716
726
|
}
|
|
@@ -757,6 +767,7 @@ declare class InMemoryAuthAdapter implements AuthAdapter {
|
|
|
757
767
|
userAgent?: string;
|
|
758
768
|
}): Promise<Session>;
|
|
759
769
|
findSessionByToken(token: string): Promise<Session | null>;
|
|
770
|
+
findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
|
|
760
771
|
deleteSession(sessionId: string): Promise<boolean>;
|
|
761
772
|
deleteUserSessions(userId: string): Promise<number>;
|
|
762
773
|
addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
|
|
@@ -799,7 +810,7 @@ declare function createAuth(adapter: AuthAdapter, config: AuthTokenConfig): Auth
|
|
|
799
810
|
|
|
800
811
|
interface SQLiteAuthAdapterOptions {
|
|
801
812
|
path?: string;
|
|
802
|
-
db?:
|
|
813
|
+
db?: any;
|
|
803
814
|
saltRounds?: number;
|
|
804
815
|
busyTimeout?: number;
|
|
805
816
|
walAutoCheckpoint?: number;
|
|
@@ -819,6 +830,7 @@ declare class SQLiteAuthAdapter implements AuthAdapter {
|
|
|
819
830
|
constructor(options?: SQLiteAuthAdapterOptions);
|
|
820
831
|
connect(): Promise<void>;
|
|
821
832
|
disconnect(): Promise<void>;
|
|
833
|
+
private ensureConnected;
|
|
822
834
|
private ensureTables;
|
|
823
835
|
private prepareStatements;
|
|
824
836
|
private stmt;
|
|
@@ -832,6 +844,7 @@ declare class SQLiteAuthAdapter implements AuthAdapter {
|
|
|
832
844
|
createUser(data: {
|
|
833
845
|
email: string;
|
|
834
846
|
password: string;
|
|
847
|
+
name?: string;
|
|
835
848
|
role?: UserRole;
|
|
836
849
|
tenantId?: string;
|
|
837
850
|
}): Promise<AuthUser>;
|
|
@@ -850,6 +863,14 @@ declare class SQLiteAuthAdapter implements AuthAdapter {
|
|
|
850
863
|
deleteSession(sessionId: string): Promise<boolean>;
|
|
851
864
|
deleteUserSessions(userId: string): Promise<number>;
|
|
852
865
|
hasAnyUsers(): Promise<boolean>;
|
|
866
|
+
findUsers(options?: {
|
|
867
|
+
page?: number;
|
|
868
|
+
limit?: number;
|
|
869
|
+
search?: string;
|
|
870
|
+
}): Promise<{
|
|
871
|
+
users: AuthUser[];
|
|
872
|
+
total: number;
|
|
873
|
+
}>;
|
|
853
874
|
addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
|
|
854
875
|
getPasswordHistory(userId: string, count?: number): Promise<string[]>;
|
|
855
876
|
isPasswordInHistory(password: string, userId: string, historyCount?: number): Promise<boolean>;
|
|
@@ -1057,7 +1078,7 @@ interface FTPConfig {
|
|
|
1057
1078
|
baseUrl?: string;
|
|
1058
1079
|
prefix?: string;
|
|
1059
1080
|
}
|
|
1060
|
-
interface StorageConfig {
|
|
1081
|
+
interface StorageConfig$1 {
|
|
1061
1082
|
type: string;
|
|
1062
1083
|
s3: S3CompatibleConfig;
|
|
1063
1084
|
r2: R2Config;
|
|
@@ -1102,6 +1123,11 @@ declare class ConfigService {
|
|
|
1102
1123
|
* Initialize the service by loading all settings from the database
|
|
1103
1124
|
*/
|
|
1104
1125
|
load(): Promise<void>;
|
|
1126
|
+
/**
|
|
1127
|
+
* Load settings from the _globals_storage-settings table (SQLite fallback)
|
|
1128
|
+
* Maps nested global structure to flat key-value cache
|
|
1129
|
+
*/
|
|
1130
|
+
private loadFromGlobals;
|
|
1105
1131
|
/**
|
|
1106
1132
|
* Get a settings value with environment fallback
|
|
1107
1133
|
*/
|
|
@@ -1109,7 +1135,7 @@ declare class ConfigService {
|
|
|
1109
1135
|
/**
|
|
1110
1136
|
* Get storage configuration
|
|
1111
1137
|
*/
|
|
1112
|
-
getStorageConfig(): StorageConfig;
|
|
1138
|
+
getStorageConfig(): StorageConfig$1;
|
|
1113
1139
|
/**
|
|
1114
1140
|
* Get email configuration
|
|
1115
1141
|
*/
|
|
@@ -1175,6 +1201,8 @@ interface StorageProvider {
|
|
|
1175
1201
|
}): Promise<string>;
|
|
1176
1202
|
list(prefix?: string): Promise<UploadedFile[]>;
|
|
1177
1203
|
exists(url: string): Promise<boolean>;
|
|
1204
|
+
createFolder?(folder: string): Promise<void>;
|
|
1205
|
+
deleteFolder?(folder: string): Promise<void>;
|
|
1178
1206
|
}
|
|
1179
1207
|
|
|
1180
1208
|
declare function resolveProvider(configService: ConfigService): Promise<StorageProvider>;
|
|
@@ -1223,15 +1251,18 @@ declare class MediaService {
|
|
|
1223
1251
|
genId?: () => string;
|
|
1224
1252
|
storageConfig?: any;
|
|
1225
1253
|
}): Promise<MediaService>;
|
|
1254
|
+
private ensureTables;
|
|
1226
1255
|
private now;
|
|
1227
1256
|
private buildFindConditions;
|
|
1228
1257
|
private rowToMedia;
|
|
1229
1258
|
private sqliteRun;
|
|
1230
1259
|
private sqliteGet;
|
|
1231
1260
|
upload(file: File, folder?: string): Promise<MediaRow>;
|
|
1261
|
+
uploadFromUrl(url: string, folder?: string): Promise<MediaRow>;
|
|
1232
1262
|
delete(id: string): Promise<void>;
|
|
1233
1263
|
deleteFile(url: string): Promise<void>;
|
|
1234
1264
|
rename(id: string, newKey: string): Promise<MediaRow | null>;
|
|
1265
|
+
findById(id: string): Promise<MediaRow | null>;
|
|
1235
1266
|
find(params?: MediaSearchParams): Promise<{
|
|
1236
1267
|
docs: MediaRow[];
|
|
1237
1268
|
totalDocs: number;
|
|
@@ -1269,4 +1300,64 @@ declare function defineConfig(config: {
|
|
|
1269
1300
|
debug?: KyroConfig["debug"];
|
|
1270
1301
|
}): KyroConfig;
|
|
1271
1302
|
|
|
1272
|
-
|
|
1303
|
+
interface SeoTagsOptions {
|
|
1304
|
+
siteSettings: any;
|
|
1305
|
+
title?: string;
|
|
1306
|
+
description?: string;
|
|
1307
|
+
image?: string;
|
|
1308
|
+
url?: string;
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* Generates standard SEO meta tags based on global site settings and page overrides.
|
|
1312
|
+
*/
|
|
1313
|
+
declare function generateSeoTags(options: SeoTagsOptions): string;
|
|
1314
|
+
/**
|
|
1315
|
+
* Generates analytics script tags based on global site settings.
|
|
1316
|
+
*/
|
|
1317
|
+
declare function generateAnalyticsTags(siteSettings: any): string;
|
|
1318
|
+
|
|
1319
|
+
type StorageAdapter = 'indexeddb' | 'fs' | 'redis' | 'sqlite' | 'postgres';
|
|
1320
|
+
type Environment = 'browser' | 'node';
|
|
1321
|
+
interface EncryptionConfig {
|
|
1322
|
+
enabled: boolean;
|
|
1323
|
+
algorithm?: 'AES-256-GCM' | 'ChaCha20-Poly1305';
|
|
1324
|
+
}
|
|
1325
|
+
interface StorageConfig {
|
|
1326
|
+
environment: Environment;
|
|
1327
|
+
adapter?: StorageAdapter;
|
|
1328
|
+
connectionString?: string;
|
|
1329
|
+
encryption?: EncryptionConfig;
|
|
1330
|
+
}
|
|
1331
|
+
interface StorageOptions {
|
|
1332
|
+
namespace?: string;
|
|
1333
|
+
ttl?: number;
|
|
1334
|
+
}
|
|
1335
|
+
type CreateStorageResult = {
|
|
1336
|
+
storage: {
|
|
1337
|
+
getItem: (name: string) => string | null | Promise<string | null>;
|
|
1338
|
+
setItem: (name: string, value: string) => void | Promise<void>;
|
|
1339
|
+
removeItem: (name: string) => void | Promise<void>;
|
|
1340
|
+
};
|
|
1341
|
+
cleanup?: () => Promise<void>;
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1344
|
+
declare function createStorage(config: StorageConfig): Promise<CreateStorageResult & {
|
|
1345
|
+
storage: _StateStorage;
|
|
1346
|
+
}>;
|
|
1347
|
+
type _StateStorage = {
|
|
1348
|
+
getItem: (name: string) => string | null | Promise<string | null>;
|
|
1349
|
+
setItem: (name: string, value: string) => void | Promise<void>;
|
|
1350
|
+
removeItem: (name: string) => void | Promise<void>;
|
|
1351
|
+
};
|
|
1352
|
+
declare function createAuthStorage(config: StorageConfig): Promise<CreateStorageResult>;
|
|
1353
|
+
|
|
1354
|
+
declare function setDbAdapter(adapter: any): void;
|
|
1355
|
+
declare function loadSecrets(): Promise<void>;
|
|
1356
|
+
declare function getAppSecret(): string;
|
|
1357
|
+
declare function getEncryptionKey(): string;
|
|
1358
|
+
declare function getSessionConfig(): {
|
|
1359
|
+
maxAge: number;
|
|
1360
|
+
maxSessionsPerUser: number;
|
|
1361
|
+
};
|
|
1362
|
+
|
|
1363
|
+
export { AbstractBaseAdapter, AccountLockout, type AdapterOptions, AnalyticsPlugin, AuditLog, AuditLogFilter, AuditLogger, Auth, AuthAdapter, AuthResult, Session as AuthSession, AuthTokenConfig, AuthUser, BaseAdapter, CollectionConfig, CommentsPlugin, type CompareVersionsOptions, ConfigService, ConfigValidationError, CreateArgs, type CreateStorageResult, type CreateVersionOptions, type DatabaseConnectionOptions, type DatabaseType, type DatabaseType$1 as DbAdapterType, DeleteArgs, type DeliveryOptions, type DeliveryResult, Dialect, type DraftPublishConfig, type DrizzleAdapterOptions, type EmailConfig, EmailTransport, type EncryptionConfig, type Environment, Field, FindArgs, FindByIDArgs, FindResult, GlobalConfig, Hook, InMemoryAccountLockout, InMemoryAuditLogger, InMemoryAuthAdapter, InMemoryRateLimiter, JWTPayload, Kyro, type KyroAuthConfig, KyroConfig, KyroPlugin, KyroPubSub, KyroWSServer, LocalAdapter, LoginCredentials, MediaService, type MongoDBAdapterOptions, PasswordPolicy, type PluginAPI, type PluginHooks, PluginManager, type PublishVersionOptions, RateLimiter, RedisAuthAdapter, RegisterData, Registry, Request$1 as Request, ReviewsPlugin, SEOPLugin, SQLiteAuthAdapter, type SeoTagsOptions, Session, type StorageAdapter, type StorageConfig$1 as StorageConfig, type StorageOptions, UpdateArgs, User, UserRole, type Version, type VersionAdapter, type VersionDiff, type VersionHistoryOptions, VersionManager, type VersionPublishSchedule, type VersionStatus, WebhookConfig, WebhookDelivery, WebhookPayload, WebhookService, WishlistPlugin, authConfig, autoBootstrap, bootstrapAdmin, buildDeliveryRecord, collectionToCreateZod, collectionToUpdateZod, collectionToWhereZod, collectionToZod, createAuditContext, createAuth, createAuthConfig, createAuthStorage, createKyro, createLocalAdapter, createLocalStorage, createStorage, createTestPayload, createVersionManager, defineConfig, deliverWebhook, deliverWithRetry, fieldToZod, generateAnalyticsTags, generateSeoTags, generateWebhookSecret, getAppSecret, getBootstrapFromEnv, getDefaultDraftPublishConfig, getEncryptionKey, getSessionConfig, globalToZod, isArchived, isDraft, isPublished, loadSecrets, presetPlugins, resolveProvider, setDbAdapter, signPayload, validateCollection, validateConfig, validateFields, validateGlobal };
|