@kyro-cms/core 0.3.1 → 0.3.4
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-BCpW2dyL.d.ts} +1 -1
- package/dist/{WebhookService-mZZ75syh.d.cts → WebhookService-DxYSFvNg.d.cts} +1 -1
- 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-2SJATAN4.js +5514 -0
- package/dist/chunk-2SJATAN4.js.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-6LPNEC6D.js +617 -0
- package/dist/chunk-6LPNEC6D.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-KB6QF4HO.js → chunk-B76I67F3.js} +246 -141
- package/dist/chunk-B76I67F3.js.map +1 -0
- package/dist/chunk-BQ2T4WRS.js +140 -0
- package/dist/chunk-BQ2T4WRS.js.map +1 -0
- package/dist/chunk-CZ3HWX2X.cjs +622 -0
- package/dist/chunk-CZ3HWX2X.cjs.map +1 -0
- package/dist/{chunk-PNBZZ76A.cjs → chunk-DAIBBBOL.cjs} +246 -140
- package/dist/chunk-DAIBBBOL.cjs.map +1 -0
- package/dist/{chunk-U74F3YZU.js → chunk-DBUYB32X.js} +15 -3
- package/dist/chunk-DBUYB32X.js.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-MMYAIYHJ.cjs +5538 -0
- package/dist/chunk-MMYAIYHJ.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-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-VEI5KQVC.cjs +1246 -0
- package/dist/chunk-VEI5KQVC.cjs.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-X3CU27OO.cjs +78 -0
- package/dist/chunk-X3CU27OO.cjs.map +1 -0
- package/dist/chunk-XIXGJGQW.js +1228 -0
- package/dist/chunk-XIXGJGQW.js.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 +2621 -6672
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +136 -47
- package/dist/index.d.ts +136 -47
- package/dist/index.js +2333 -6546
- 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 +8 -5
- package/dist/rest/index.d.cts +6 -3
- package/dist/rest/index.d.ts +6 -3
- package/dist/rest/index.js +6 -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-kGfsGdos.d.cts → types-Bs1up4yP.d.ts} +76 -244
- package/dist/{types-1u353OHN.d.ts → types-Da83JLDk.d.cts} +6 -2
- package/dist/{types-1u353OHN.d.cts → types-Da83JLDk.d.ts} +6 -2
- 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 { F as Field } from './types-VtjUxIMp.js';
|
|
13
|
+
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
14
|
import { ZodTypeAny } from 'zod';
|
|
13
15
|
export { z } from 'zod';
|
|
14
|
-
|
|
16
|
+
export { createColumnsNode, normalizeRichTextDocument, normalizeRichTextValue, renderRichText, richTextStyles } from './fields/index.js';
|
|
17
|
+
import { A as AbstractBaseAdapter } from './base-eVegJ_Pr.js';
|
|
15
18
|
import { Dialect } from './drizzle/index.js';
|
|
16
19
|
export { DrizzleAdapter, PostgresAuthAdapter, collectionToDrizzleSchema, createDatabase, createDrizzleAdapter, fieldToDrizzleType, runMigrations, seedDefaultRoles } from './drizzle/index.js';
|
|
17
20
|
export { MongoDBAdapter, createMongoDBAdapter } from './mongodb/index.js';
|
|
18
21
|
export { buildGraphQLSchema, createGraphQLSchema } from './graphql/index.js';
|
|
19
22
|
export { createHonoApp, createRESTAPI } from './rest/index.js';
|
|
20
23
|
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
|
|
24
|
-
|
|
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';
|
|
24
|
+
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-Da83JLDk.js';
|
|
25
|
+
export { f as AuditAction } from './types-Da83JLDk.js';
|
|
26
|
+
import { W as WebhookPayload, a as WebhookDelivery, b as WebhookConfig } from './WebhookService-BCpW2dyL.js';
|
|
27
|
+
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-BCpW2dyL.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;
|
|
@@ -186,6 +166,8 @@ declare class LocalAdapter extends AbstractBaseAdapter {
|
|
|
186
166
|
private db;
|
|
187
167
|
private path?;
|
|
188
168
|
private migrations;
|
|
169
|
+
private readonly draftsTableName;
|
|
170
|
+
private readonly versionsTableName;
|
|
189
171
|
constructor(options: {
|
|
190
172
|
db?: any;
|
|
191
173
|
path?: string;
|
|
@@ -193,7 +175,10 @@ declare class LocalAdapter extends AbstractBaseAdapter {
|
|
|
193
175
|
connect(): Promise<void>;
|
|
194
176
|
disconnect(): Promise<void>;
|
|
195
177
|
private ensureTable;
|
|
178
|
+
private ensureVersionsTable;
|
|
179
|
+
private ensureDraftsTable;
|
|
196
180
|
private fieldToSQL;
|
|
181
|
+
private parseGlobalsSlug;
|
|
197
182
|
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
198
183
|
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
199
184
|
create<T>(args: CreateArgs): Promise<T>;
|
|
@@ -208,14 +193,31 @@ declare class LocalAdapter extends AbstractBaseAdapter {
|
|
|
208
193
|
collection: string;
|
|
209
194
|
where: Record<string, any>;
|
|
210
195
|
tenantID?: string;
|
|
196
|
+
draft?: boolean;
|
|
211
197
|
}): Promise<any>;
|
|
212
|
-
findVersions(): Promise<FindResult<
|
|
213
|
-
findVersionByID(
|
|
214
|
-
|
|
215
|
-
|
|
198
|
+
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
199
|
+
findVersionByID(args: {
|
|
200
|
+
collection: string;
|
|
201
|
+
versionId: string;
|
|
202
|
+
tenantID?: string;
|
|
203
|
+
}): Promise<VersionRecord | null>;
|
|
204
|
+
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
205
|
+
deleteVersions(args: {
|
|
206
|
+
collection: string;
|
|
207
|
+
documentId: string;
|
|
208
|
+
keepLatest?: number;
|
|
209
|
+
tenantID?: string;
|
|
210
|
+
}): Promise<void>;
|
|
211
|
+
private rowToVersion;
|
|
212
|
+
findDraft<T>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
|
|
213
|
+
upsertDraft<T>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
|
|
214
|
+
deleteDraft(args: DraftDeleteArgs): Promise<void>;
|
|
215
|
+
protected prepareData(data: Record<string, any>, config: CollectionConfig | GlobalConfig): Record<string, any>;
|
|
216
216
|
private rowToDoc;
|
|
217
217
|
private generateId;
|
|
218
|
+
private getMediaById;
|
|
218
219
|
private getTableNameFor;
|
|
220
|
+
private rowToDraft;
|
|
219
221
|
migrate(): Promise<void>;
|
|
220
222
|
rollback(): Promise<void>;
|
|
221
223
|
transaction<T>(fn: (tx: any) => Promise<T>): Promise<T>;
|
|
@@ -349,11 +351,13 @@ interface RedisAuthAdapterOptions {
|
|
|
349
351
|
tls?: boolean;
|
|
350
352
|
}
|
|
351
353
|
declare class RedisAuthAdapter implements AuthAdapter {
|
|
352
|
-
private
|
|
354
|
+
private _redis;
|
|
353
355
|
private prefix;
|
|
354
356
|
private tokenExpiration;
|
|
355
357
|
private refreshExpiration;
|
|
358
|
+
private options;
|
|
356
359
|
constructor(options?: RedisAuthAdapterOptions);
|
|
360
|
+
private getRedis;
|
|
357
361
|
connect(): Promise<void>;
|
|
358
362
|
disconnect(): Promise<void>;
|
|
359
363
|
private userKey;
|
|
@@ -378,6 +382,7 @@ declare class RedisAuthAdapter implements AuthAdapter {
|
|
|
378
382
|
userAgent?: string;
|
|
379
383
|
}): Promise<Session>;
|
|
380
384
|
findSessionByToken(token: string): Promise<Session | null>;
|
|
385
|
+
findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
|
|
381
386
|
deleteSession(sessionId: string): Promise<boolean>;
|
|
382
387
|
deleteUserSessions(userId: string): Promise<number>;
|
|
383
388
|
addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
|
|
@@ -477,7 +482,9 @@ declare class EmailTransport {
|
|
|
477
482
|
private transporter?;
|
|
478
483
|
private config;
|
|
479
484
|
private templates;
|
|
485
|
+
private transporterInitialized;
|
|
480
486
|
constructor(config: EmailConfig$1, templates?: Partial<EmailTemplates>);
|
|
487
|
+
private ensureTransporter;
|
|
481
488
|
send(options: EmailOptions): Promise<any>;
|
|
482
489
|
private sendViaResend;
|
|
483
490
|
private sendViaSendGrid;
|
|
@@ -674,11 +681,11 @@ declare class InMemoryAuditLogger {
|
|
|
674
681
|
|
|
675
682
|
interface AuthRoutesConfig {
|
|
676
683
|
redis: AuthAdapter;
|
|
677
|
-
|
|
678
|
-
jwtSecret: string;
|
|
684
|
+
jwtSecret?: string;
|
|
679
685
|
jwtExpiresIn?: string;
|
|
680
686
|
jwtIssuer?: string;
|
|
681
687
|
jwtAudience?: string;
|
|
688
|
+
email?: EmailTransport;
|
|
682
689
|
passwordPolicy?: PasswordPolicy;
|
|
683
690
|
lockout?: InMemoryAccountLockout;
|
|
684
691
|
rateLimiter?: InMemoryRateLimiter;
|
|
@@ -689,10 +696,6 @@ interface AuthRoutesConfig {
|
|
|
689
696
|
declare class AuthRoutes {
|
|
690
697
|
private authAdapter;
|
|
691
698
|
private email?;
|
|
692
|
-
private jwtSecret;
|
|
693
|
-
private jwtExpiresIn;
|
|
694
|
-
private jwtIssuer?;
|
|
695
|
-
private jwtAudience?;
|
|
696
699
|
private passwordPolicy;
|
|
697
700
|
private lockout?;
|
|
698
701
|
private rateLimiter?;
|
|
@@ -711,6 +714,11 @@ declare class AuthRoutes {
|
|
|
711
714
|
private recordFailedLogin;
|
|
712
715
|
private sanitizeUser;
|
|
713
716
|
private jsonResponse;
|
|
717
|
+
listSessions(req: Request): Promise<Response>;
|
|
718
|
+
revokeSession(req: Request, sessionId: string): Promise<Response>;
|
|
719
|
+
revokeOtherSessions(req: Request): Promise<Response>;
|
|
720
|
+
renameSession(req: Request, sessionId: string): Promise<Response>;
|
|
721
|
+
refreshSession(req: Request): Promise<Response>;
|
|
714
722
|
private errorResponse;
|
|
715
723
|
private rateLimitResponse;
|
|
716
724
|
}
|
|
@@ -757,6 +765,7 @@ declare class InMemoryAuthAdapter implements AuthAdapter {
|
|
|
757
765
|
userAgent?: string;
|
|
758
766
|
}): Promise<Session>;
|
|
759
767
|
findSessionByToken(token: string): Promise<Session | null>;
|
|
768
|
+
findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
|
|
760
769
|
deleteSession(sessionId: string): Promise<boolean>;
|
|
761
770
|
deleteUserSessions(userId: string): Promise<number>;
|
|
762
771
|
addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
|
|
@@ -799,7 +808,7 @@ declare function createAuth(adapter: AuthAdapter, config: AuthTokenConfig): Auth
|
|
|
799
808
|
|
|
800
809
|
interface SQLiteAuthAdapterOptions {
|
|
801
810
|
path?: string;
|
|
802
|
-
db?:
|
|
811
|
+
db?: any;
|
|
803
812
|
saltRounds?: number;
|
|
804
813
|
busyTimeout?: number;
|
|
805
814
|
walAutoCheckpoint?: number;
|
|
@@ -819,6 +828,7 @@ declare class SQLiteAuthAdapter implements AuthAdapter {
|
|
|
819
828
|
constructor(options?: SQLiteAuthAdapterOptions);
|
|
820
829
|
connect(): Promise<void>;
|
|
821
830
|
disconnect(): Promise<void>;
|
|
831
|
+
private ensureConnected;
|
|
822
832
|
private ensureTables;
|
|
823
833
|
private prepareStatements;
|
|
824
834
|
private stmt;
|
|
@@ -832,6 +842,7 @@ declare class SQLiteAuthAdapter implements AuthAdapter {
|
|
|
832
842
|
createUser(data: {
|
|
833
843
|
email: string;
|
|
834
844
|
password: string;
|
|
845
|
+
name?: string;
|
|
835
846
|
role?: UserRole;
|
|
836
847
|
tenantId?: string;
|
|
837
848
|
}): Promise<AuthUser>;
|
|
@@ -850,6 +861,14 @@ declare class SQLiteAuthAdapter implements AuthAdapter {
|
|
|
850
861
|
deleteSession(sessionId: string): Promise<boolean>;
|
|
851
862
|
deleteUserSessions(userId: string): Promise<number>;
|
|
852
863
|
hasAnyUsers(): Promise<boolean>;
|
|
864
|
+
findUsers(options?: {
|
|
865
|
+
page?: number;
|
|
866
|
+
limit?: number;
|
|
867
|
+
search?: string;
|
|
868
|
+
}): Promise<{
|
|
869
|
+
users: AuthUser[];
|
|
870
|
+
total: number;
|
|
871
|
+
}>;
|
|
853
872
|
addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
|
|
854
873
|
getPasswordHistory(userId: string, count?: number): Promise<string[]>;
|
|
855
874
|
isPasswordInHistory(password: string, userId: string, historyCount?: number): Promise<boolean>;
|
|
@@ -1057,7 +1076,7 @@ interface FTPConfig {
|
|
|
1057
1076
|
baseUrl?: string;
|
|
1058
1077
|
prefix?: string;
|
|
1059
1078
|
}
|
|
1060
|
-
interface StorageConfig {
|
|
1079
|
+
interface StorageConfig$1 {
|
|
1061
1080
|
type: string;
|
|
1062
1081
|
s3: S3CompatibleConfig;
|
|
1063
1082
|
r2: R2Config;
|
|
@@ -1102,6 +1121,11 @@ declare class ConfigService {
|
|
|
1102
1121
|
* Initialize the service by loading all settings from the database
|
|
1103
1122
|
*/
|
|
1104
1123
|
load(): Promise<void>;
|
|
1124
|
+
/**
|
|
1125
|
+
* Load settings from the _globals_storage-settings table (SQLite fallback)
|
|
1126
|
+
* Maps nested global structure to flat key-value cache
|
|
1127
|
+
*/
|
|
1128
|
+
private loadFromGlobals;
|
|
1105
1129
|
/**
|
|
1106
1130
|
* Get a settings value with environment fallback
|
|
1107
1131
|
*/
|
|
@@ -1109,7 +1133,7 @@ declare class ConfigService {
|
|
|
1109
1133
|
/**
|
|
1110
1134
|
* Get storage configuration
|
|
1111
1135
|
*/
|
|
1112
|
-
getStorageConfig(): StorageConfig;
|
|
1136
|
+
getStorageConfig(): StorageConfig$1;
|
|
1113
1137
|
/**
|
|
1114
1138
|
* Get email configuration
|
|
1115
1139
|
*/
|
|
@@ -1175,6 +1199,8 @@ interface StorageProvider {
|
|
|
1175
1199
|
}): Promise<string>;
|
|
1176
1200
|
list(prefix?: string): Promise<UploadedFile[]>;
|
|
1177
1201
|
exists(url: string): Promise<boolean>;
|
|
1202
|
+
createFolder?(folder: string): Promise<void>;
|
|
1203
|
+
deleteFolder?(folder: string): Promise<void>;
|
|
1178
1204
|
}
|
|
1179
1205
|
|
|
1180
1206
|
declare function resolveProvider(configService: ConfigService): Promise<StorageProvider>;
|
|
@@ -1223,15 +1249,18 @@ declare class MediaService {
|
|
|
1223
1249
|
genId?: () => string;
|
|
1224
1250
|
storageConfig?: any;
|
|
1225
1251
|
}): Promise<MediaService>;
|
|
1252
|
+
private ensureTables;
|
|
1226
1253
|
private now;
|
|
1227
1254
|
private buildFindConditions;
|
|
1228
1255
|
private rowToMedia;
|
|
1229
1256
|
private sqliteRun;
|
|
1230
1257
|
private sqliteGet;
|
|
1231
1258
|
upload(file: File, folder?: string): Promise<MediaRow>;
|
|
1259
|
+
uploadFromUrl(url: string, folder?: string): Promise<MediaRow>;
|
|
1232
1260
|
delete(id: string): Promise<void>;
|
|
1233
1261
|
deleteFile(url: string): Promise<void>;
|
|
1234
1262
|
rename(id: string, newKey: string): Promise<MediaRow | null>;
|
|
1263
|
+
findById(id: string): Promise<MediaRow | null>;
|
|
1235
1264
|
find(params?: MediaSearchParams): Promise<{
|
|
1236
1265
|
docs: MediaRow[];
|
|
1237
1266
|
totalDocs: number;
|
|
@@ -1269,4 +1298,64 @@ declare function defineConfig(config: {
|
|
|
1269
1298
|
debug?: KyroConfig["debug"];
|
|
1270
1299
|
}): KyroConfig;
|
|
1271
1300
|
|
|
1272
|
-
|
|
1301
|
+
interface SeoTagsOptions {
|
|
1302
|
+
siteSettings: any;
|
|
1303
|
+
title?: string;
|
|
1304
|
+
description?: string;
|
|
1305
|
+
image?: string;
|
|
1306
|
+
url?: string;
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Generates standard SEO meta tags based on global site settings and page overrides.
|
|
1310
|
+
*/
|
|
1311
|
+
declare function generateSeoTags(options: SeoTagsOptions): string;
|
|
1312
|
+
/**
|
|
1313
|
+
* Generates analytics script tags based on global site settings.
|
|
1314
|
+
*/
|
|
1315
|
+
declare function generateAnalyticsTags(siteSettings: any): string;
|
|
1316
|
+
|
|
1317
|
+
type StorageAdapter = 'indexeddb' | 'fs' | 'redis' | 'sqlite' | 'postgres';
|
|
1318
|
+
type Environment = 'browser' | 'node';
|
|
1319
|
+
interface EncryptionConfig {
|
|
1320
|
+
enabled: boolean;
|
|
1321
|
+
algorithm?: 'AES-256-GCM' | 'ChaCha20-Poly1305';
|
|
1322
|
+
}
|
|
1323
|
+
interface StorageConfig {
|
|
1324
|
+
environment: Environment;
|
|
1325
|
+
adapter?: StorageAdapter;
|
|
1326
|
+
connectionString?: string;
|
|
1327
|
+
encryption?: EncryptionConfig;
|
|
1328
|
+
}
|
|
1329
|
+
interface StorageOptions {
|
|
1330
|
+
namespace?: string;
|
|
1331
|
+
ttl?: number;
|
|
1332
|
+
}
|
|
1333
|
+
type CreateStorageResult = {
|
|
1334
|
+
storage: {
|
|
1335
|
+
getItem: (name: string) => string | null | Promise<string | null>;
|
|
1336
|
+
setItem: (name: string, value: string) => void | Promise<void>;
|
|
1337
|
+
removeItem: (name: string) => void | Promise<void>;
|
|
1338
|
+
};
|
|
1339
|
+
cleanup?: () => Promise<void>;
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
declare function createStorage(config: StorageConfig): Promise<CreateStorageResult & {
|
|
1343
|
+
storage: _StateStorage;
|
|
1344
|
+
}>;
|
|
1345
|
+
type _StateStorage = {
|
|
1346
|
+
getItem: (name: string) => string | null | Promise<string | null>;
|
|
1347
|
+
setItem: (name: string, value: string) => void | Promise<void>;
|
|
1348
|
+
removeItem: (name: string) => void | Promise<void>;
|
|
1349
|
+
};
|
|
1350
|
+
declare function createAuthStorage(config: StorageConfig): Promise<CreateStorageResult>;
|
|
1351
|
+
|
|
1352
|
+
declare function setDbAdapter(adapter: any): void;
|
|
1353
|
+
declare function loadSecrets(): Promise<void>;
|
|
1354
|
+
declare function getAppSecret(): string;
|
|
1355
|
+
declare function getEncryptionKey(): string;
|
|
1356
|
+
declare function getSessionConfig(): {
|
|
1357
|
+
maxAge: number;
|
|
1358
|
+
maxSessionsPerUser: number;
|
|
1359
|
+
};
|
|
1360
|
+
|
|
1361
|
+
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, 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 };
|