@kyro-cms/core 0.1.5 → 0.1.7
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-BCgL1bLF.d.cts +112 -0
- package/dist/WebhookService-BPVJUgTl.d.ts +112 -0
- package/dist/{base-DlhVlwnN.d.cts → base-B0Y6isUJ.d.cts} +1 -1
- package/dist/{base-CQkFzqQl.d.ts → base-DaP-5PPG.d.ts} +1 -1
- package/dist/bootstrap-BMWVB2T6.cjs +31 -0
- package/dist/{bootstrap-X6TP3NKX.cjs.map → bootstrap-BMWVB2T6.cjs.map} +1 -1
- package/dist/bootstrap-LL6O7PWO.js +6 -0
- package/dist/{bootstrap-BDTTUGY2.js.map → bootstrap-LL6O7PWO.js.map} +1 -1
- package/dist/{chunk-3VZCX4DF.cjs → chunk-42JPONZU.cjs} +77 -14
- package/dist/chunk-42JPONZU.cjs.map +1 -0
- package/dist/{chunk-MHS6CPO5.cjs → chunk-4M5PHMUE.cjs} +66 -346
- package/dist/chunk-4M5PHMUE.cjs.map +1 -0
- package/dist/chunk-4PWRCMTQ.cjs +15 -0
- package/dist/chunk-4PWRCMTQ.cjs.map +1 -0
- package/dist/chunk-6COM32WF.js +47 -0
- package/dist/chunk-6COM32WF.js.map +1 -0
- package/dist/chunk-6MSSF46R.js +941 -0
- package/dist/chunk-6MSSF46R.js.map +1 -0
- package/dist/{chunk-TZFJMPCH.cjs → chunk-7YITG2US.cjs} +9 -18
- package/dist/chunk-7YITG2US.cjs.map +1 -0
- package/dist/{chunk-A3RQWHKD.cjs → chunk-BLMFBDBG.cjs} +56 -6
- package/dist/chunk-BLMFBDBG.cjs.map +1 -0
- package/dist/{chunk-EINVJPFM.js → chunk-BTOE3VUK.js} +65 -3
- package/dist/chunk-BTOE3VUK.js.map +1 -0
- package/dist/chunk-E5X75WNB.js +497 -0
- package/dist/chunk-E5X75WNB.js.map +1 -0
- package/dist/chunk-E63IF3MD.cjs +951 -0
- package/dist/chunk-E63IF3MD.cjs.map +1 -0
- package/dist/{chunk-K7QF2QCM.cjs → chunk-FTSSDDZQ.cjs} +7 -3
- package/dist/chunk-FTSSDDZQ.cjs.map +1 -0
- package/dist/chunk-G7VZBCD6.cjs +35 -0
- package/dist/{chunk-5BLDMQED.cjs.map → chunk-G7VZBCD6.cjs.map} +1 -1
- package/dist/{chunk-VMSRTAH7.js → chunk-GLCPGZPM.js} +56 -6
- package/dist/chunk-GLCPGZPM.js.map +1 -0
- package/dist/{chunk-V3B25QOK.cjs → chunk-GVFB5C6O.cjs} +74 -2
- package/dist/chunk-GVFB5C6O.cjs.map +1 -0
- package/dist/chunk-HVSQDZZJ.cjs +765 -0
- package/dist/chunk-HVSQDZZJ.cjs.map +1 -0
- package/dist/chunk-HYC4GNHX.js +758 -0
- package/dist/chunk-HYC4GNHX.js.map +1 -0
- package/dist/chunk-KDVDIZ4Y.cjs +3479 -0
- package/dist/chunk-KDVDIZ4Y.cjs.map +1 -0
- package/dist/{chunk-OG3KX56O.js → chunk-KWGNR4HM.js} +7 -3
- package/dist/chunk-KWGNR4HM.js.map +1 -0
- package/dist/chunk-LIJVWQKU.cjs +256 -0
- package/dist/chunk-LIJVWQKU.cjs.map +1 -0
- package/dist/{chunk-XTZSUDSI.js → chunk-LTRCYJAG.js} +3 -18
- package/dist/chunk-LTRCYJAG.js.map +1 -0
- package/dist/{chunk-UEYC46RL.js → chunk-OUGKLCYF.js} +71 -8
- package/dist/chunk-OUGKLCYF.js.map +1 -0
- package/dist/chunk-RONAX6UU.js +3456 -0
- package/dist/chunk-RONAX6UU.js.map +1 -0
- package/dist/{chunk-C74MQIRL.js → chunk-RRYXQMZG.js} +66 -344
- package/dist/chunk-RRYXQMZG.js.map +1 -0
- package/dist/{chunk-QUJ4OLSC.js → chunk-U74F3YZU.js} +87 -7
- package/dist/chunk-U74F3YZU.js.map +1 -0
- package/dist/chunk-VIONYQ2K.cjs +517 -0
- package/dist/chunk-VIONYQ2K.cjs.map +1 -0
- package/dist/chunk-VSTRLXMQ.cjs +50 -0
- package/dist/chunk-VSTRLXMQ.cjs.map +1 -0
- package/dist/chunk-YT7HXXVN.js +13 -0
- package/dist/chunk-YT7HXXVN.js.map +1 -0
- package/dist/chunk-Z6ZWNWWR.js +30 -0
- package/dist/{chunk-NSBPE2FW.js.map → chunk-Z6ZWNWWR.js.map} +1 -1
- package/dist/cli/index.cjs +11 -7
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +11 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/drizzle/index.cjs +20 -17
- package/dist/drizzle/index.d.cts +4 -4
- package/dist/drizzle/index.d.ts +4 -4
- package/dist/drizzle/index.js +4 -5
- package/dist/graphql/index.cjs +4 -4
- package/dist/graphql/index.d.cts +3 -2
- package/dist/graphql/index.d.ts +3 -2
- package/dist/graphql/index.js +2 -2
- package/dist/{index-DI0DRPNv.d.cts → index-BwE4NueJ.d.cts} +1 -1
- package/dist/{index-CMUNCIWQ.d.ts → index-DUKmDSeC.d.cts} +96 -24
- package/dist/{index-BMySjW6o.d.cts → index-DtBi3zP0.d.ts} +96 -24
- package/dist/{index-4fJKLFK2.d.ts → index-DupWTmW6.d.ts} +1 -1
- package/dist/index.cjs +3317 -352
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +379 -105
- package/dist/index.d.ts +379 -105
- package/dist/index.js +3211 -310
- package/dist/index.js.map +1 -1
- package/dist/media-HOT3O7RW.js +4 -0
- package/dist/media-HOT3O7RW.js.map +1 -0
- package/dist/media-WKP5AOX2.cjs +17 -0
- package/dist/media-WKP5AOX2.cjs.map +1 -0
- package/dist/mongodb/index.cjs +1 -1
- package/dist/mongodb/index.d.cts +2 -2
- package/dist/mongodb/index.d.ts +2 -2
- package/dist/mongodb/index.js +1 -1
- package/dist/mysql-media-AI6YK767.cjs +48 -0
- package/dist/mysql-media-AI6YK767.cjs.map +1 -0
- package/dist/mysql-media-CDZUS7YX.js +45 -0
- package/dist/mysql-media-CDZUS7YX.js.map +1 -0
- package/dist/postgres-auth-adapter-EVRPO7BQ.cjs +14 -0
- package/dist/{postgres-auth-adapter-VK6GY7LX.cjs.map → postgres-auth-adapter-EVRPO7BQ.cjs.map} +1 -1
- package/dist/postgres-auth-adapter-OTRWSTT5.js +5 -0
- package/dist/{postgres-auth-adapter-REJFUMP7.js.map → postgres-auth-adapter-OTRWSTT5.js.map} +1 -1
- package/dist/redis-adapter-2N6VA7BI.cjs +13 -0
- package/dist/{redis-adapter-LBLNKGNS.cjs.map → redis-adapter-2N6VA7BI.cjs.map} +1 -1
- package/dist/redis-adapter-RA24FNCX.js +4 -0
- package/dist/{redis-adapter-4YDY4LWE.js.map → redis-adapter-RA24FNCX.js.map} +1 -1
- package/dist/rest/index.cjs +7 -5
- package/dist/rest/index.d.cts +29 -3
- package/dist/rest/index.d.ts +29 -3
- package/dist/rest/index.js +5 -3
- package/dist/schema-CNB2DDTX.js +6 -0
- package/dist/schema-CNB2DDTX.js.map +1 -0
- package/dist/schema-Y777CQQS.cjs +67 -0
- package/dist/schema-Y777CQQS.cjs.map +1 -0
- package/dist/templates/index.cjs +24 -28
- package/dist/templates/index.d.cts +2 -4
- package/dist/templates/index.d.ts +2 -4
- package/dist/templates/index.js +2 -2
- package/dist/trpc/index.cjs +12 -12
- package/dist/trpc/index.d.cts +19 -14
- package/dist/trpc/index.d.ts +19 -14
- package/dist/trpc/index.js +3 -3
- package/dist/{types-BGM5MV_K.d.cts → types-BM0s_YOy.d.cts} +67 -35
- package/dist/{types-BGM5MV_K.d.ts → types-BM0s_YOy.d.ts} +67 -35
- package/dist/ws/index.cjs +1 -1
- package/dist/ws/index.js +1 -1
- package/package.json +11 -1
- package/dist/bootstrap-BDTTUGY2.js +0 -4
- package/dist/bootstrap-X6TP3NKX.cjs +0 -29
- package/dist/chunk-3QX6KG2S.js +0 -2125
- package/dist/chunk-3QX6KG2S.js.map +0 -1
- package/dist/chunk-3VZCX4DF.cjs.map +0 -1
- package/dist/chunk-5BLDMQED.cjs +0 -18
- package/dist/chunk-7G6EVYCU.cjs +0 -94
- package/dist/chunk-7G6EVYCU.cjs.map +0 -1
- package/dist/chunk-A3RQWHKD.cjs.map +0 -1
- package/dist/chunk-C74MQIRL.js.map +0 -1
- package/dist/chunk-EINVJPFM.js.map +0 -1
- package/dist/chunk-F5B64H5S.cjs +0 -2149
- package/dist/chunk-F5B64H5S.cjs.map +0 -1
- package/dist/chunk-K7QF2QCM.cjs.map +0 -1
- package/dist/chunk-LRTZJJPD.js +0 -86
- package/dist/chunk-LRTZJJPD.js.map +0 -1
- package/dist/chunk-MHS6CPO5.cjs.map +0 -1
- package/dist/chunk-NSBPE2FW.js +0 -15
- package/dist/chunk-OG3KX56O.js.map +0 -1
- package/dist/chunk-QUJ4OLSC.js.map +0 -1
- package/dist/chunk-R3XIBBAW.cjs +0 -34
- package/dist/chunk-R3XIBBAW.cjs.map +0 -1
- package/dist/chunk-SDMNUYVU.js +0 -30
- package/dist/chunk-SDMNUYVU.js.map +0 -1
- package/dist/chunk-TZFJMPCH.cjs.map +0 -1
- package/dist/chunk-UEG7KMKC.cjs +0 -228
- package/dist/chunk-UEG7KMKC.cjs.map +0 -1
- package/dist/chunk-UEYC46RL.js.map +0 -1
- package/dist/chunk-V3B25QOK.cjs.map +0 -1
- package/dist/chunk-VMSRTAH7.js.map +0 -1
- package/dist/chunk-XTZSUDSI.js.map +0 -1
- package/dist/chunk-YD7Y25W7.cjs +0 -176
- package/dist/chunk-YD7Y25W7.cjs.map +0 -1
- package/dist/chunk-YPAFJ7EV.js +0 -225
- package/dist/chunk-YPAFJ7EV.js.map +0 -1
- package/dist/database-7CJOXEZR.js +0 -5
- package/dist/database-7CJOXEZR.js.map +0 -1
- package/dist/database-QOIV44GT.cjs +0 -22
- package/dist/database-QOIV44GT.cjs.map +0 -1
- package/dist/postgres-auth-adapter-REJFUMP7.js +0 -5
- package/dist/postgres-auth-adapter-VK6GY7LX.cjs +0 -14
- package/dist/redis-adapter-4YDY4LWE.js +0 -4
- package/dist/redis-adapter-LBLNKGNS.cjs +0 -13
package/dist/index.d.ts
CHANGED
|
@@ -3,36 +3,83 @@ 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 { B as BaseAdapter, K as KyroConfig, f as User, g as Request$1, C as CollectionConfig, G as GlobalConfig, F as Field, a as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, H as Hook } from './types-
|
|
9
|
-
export { A as ALL_FIELD_TYPES, h as AccessArgs, i as AccessControl, j as AdapterConfig, k as AdminConfig, l as ArrayField, m as AuthConfig, n as BaseField, o as Block, p as BlocksField, q as COMPLEX_FIELD_TYPES, r as CheckboxField, s as CodeField, t as CollapsibleField, u as CollectionAccess, v as CollectionHooks, w as ColorField, x as CreateResult, y as DateField, E as EmailField, z as FieldAccess, I as FieldAdmin, J as FieldHooks, L as FieldType, M as GlobalAccess, N as GlobalHooks, O as GroupField, Q as HookArgs, S as ImageSize, T as JSONField, V as LAYOUT_FIELD_TYPES, W as MarkdownField, X as NumberField, Y as PRIMITIVE_FIELD_TYPES, Z as PasswordField, P as PluginConfig, _ as RELATIONAL_FIELD_TYPES, $ as RadioField, R as RelationshipField, a0 as RichTextBlock, a1 as RichTextField, a2 as RowField, a3 as SelectField, a4 as TabsField, a5 as TextField, a6 as TextareaField, a7 as UploadConfig, e as UploadField, a8 as ValidateOptions, a9 as VersionConfig, aa as WhereClause, ab as evaluateAccess, ac as getWhereClause, ad as isArrayField, ae as isBlocksField, af as isGroupField, ag as isLayoutField, ah as isNumberField, ai as isRelationshipField, aj as isRichTextField, ak as isSelectField, al as isTextField, am as isUploadField, an as mergeWhereClauses, ao as runFieldHooks, ap as runHooks } from './types-
|
|
6
|
+
import { R as Registry } from './index-DupWTmW6.js';
|
|
7
|
+
export { c as createRegistry, g as getRegistry, r as resetRegistry } from './index-DupWTmW6.js';
|
|
8
|
+
import { B as BaseAdapter, K as KyroConfig, f as User, g as Request$1, C as CollectionConfig, G as GlobalConfig, F as Field, a as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, H as Hook } from './types-BM0s_YOy.js';
|
|
9
|
+
export { A as ALL_FIELD_TYPES, h as AccessArgs, i as AccessControl, j as AdapterConfig, k as AdminConfig, l as ArrayField, m as AuthConfig, n as BaseField, o as Block, p as BlocksField, q as COMPLEX_FIELD_TYPES, r as CheckboxField, s as CodeField, t as CollapsibleField, u as CollectionAccess, v as CollectionHooks, w as ColorField, x as CreateResult, y as DateField, E as EmailField, z as FieldAccess, I as FieldAdmin, J as FieldHooks, L as FieldType, M as GlobalAccess, N as GlobalHooks, O as GroupField, Q as HookArgs, S as ImageSize, T as JSONField, V as LAYOUT_FIELD_TYPES, W as MarkdownField, X as NumberField, Y as PRIMITIVE_FIELD_TYPES, Z as PasswordField, P as PluginConfig, _ as RELATIONAL_FIELD_TYPES, $ as RadioField, R as RelationshipField, a0 as RichTextBlock, a1 as RichTextField, a2 as RowField, a3 as SelectField, a4 as TabsField, a5 as TextField, a6 as TextareaField, a7 as UploadConfig, e as UploadField, a8 as ValidateOptions, a9 as VersionConfig, aa as WhereClause, ab as evaluateAccess, ac as getWhereClause, ad as isArrayField, ae as isBlocksField, af as isGroupField, ag as isLayoutField, ah as isNumberField, ai as isRelationshipField, aj as isRichTextField, ak as isSelectField, al as isTextField, am as isUploadField, an as mergeWhereClauses, ao as runFieldHooks, ap as runHooks } from './types-BM0s_YOy.js';
|
|
10
10
|
import { KyroPubSub, KyroWSServer } from './ws/index.js';
|
|
11
11
|
export { PubSub, createWSServer } from './ws/index.js';
|
|
12
12
|
import { ZodTypeAny } from 'zod';
|
|
13
13
|
export { z } from 'zod';
|
|
14
|
-
import { A as AbstractBaseAdapter } from './base-
|
|
15
|
-
import { A as AuthAdapter, U as UserRole, a as AuthUser, S as Session, b as AuthTokenConfig, R as RegisterData,
|
|
16
|
-
export {
|
|
14
|
+
import { A as AbstractBaseAdapter } from './base-DaP-5PPG.js';
|
|
15
|
+
import { A as AuthAdapter, U as UserRole, a as AuthUser, S as Session, b as AuditLog, c as AuditLogFilter, d as AuthTokenConfig, R as RegisterData, e as AuthResult, L as LoginCredentials, J as JWTPayload, D as Dialect } from './index-DtBi3zP0.js';
|
|
16
|
+
export { f as AuditAction, g as AuditLogger, h as DrizzleAdapter, P as PostgresAuthAdapter, i as collectionToDrizzleSchema, j as createAuditContext, k as createDatabase, l as createDrizzleAdapter, m as fieldToDrizzleType, r as runMigrations, s as seedDefaultRoles } from './index-DtBi3zP0.js';
|
|
17
17
|
export { MongoDBAdapter, createMongoDBAdapter } from './mongodb/index.js';
|
|
18
18
|
export { buildGraphQLSchema, createGraphQLSchema } from './graphql/index.js';
|
|
19
19
|
export { createHonoApp, createRESTAPI } from './rest/index.js';
|
|
20
20
|
import Database from 'better-sqlite3';
|
|
21
|
+
import { W as WebhookPayload, a as WebhookDelivery, b as WebhookConfig } from './WebhookService-BPVJUgTl.js';
|
|
22
|
+
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-BPVJUgTl.js';
|
|
21
23
|
export { TemplateConfig, allSettingsGlobals, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, ecommerceSettingsGlobals, kitchenSinkCollections, mediaCollections, minimalCollections } from './templates/index.js';
|
|
22
24
|
import Redis from 'ioredis';
|
|
23
|
-
import { SentMessageInfo } from 'nodemailer';
|
|
24
25
|
import 'ws';
|
|
25
26
|
import 'drizzle-orm/postgres-js';
|
|
26
|
-
|
|
27
|
+
|
|
28
|
+
interface DeliveryResult {
|
|
29
|
+
success: boolean;
|
|
30
|
+
status: number;
|
|
31
|
+
statusText?: string;
|
|
32
|
+
body?: string;
|
|
33
|
+
duration: number;
|
|
34
|
+
error?: string;
|
|
35
|
+
}
|
|
36
|
+
interface DeliveryOptions {
|
|
37
|
+
timeout?: number;
|
|
38
|
+
maxRetries?: number;
|
|
39
|
+
retryDelay?: number;
|
|
40
|
+
onRetry?: (attempt: number, error: string) => void;
|
|
41
|
+
onSuccess?: (result: DeliveryResult) => void;
|
|
42
|
+
onFailure?: (error: string) => void;
|
|
43
|
+
}
|
|
44
|
+
declare function signPayload(payload: string, secret: string): string;
|
|
45
|
+
declare function generateWebhookSecret(): string;
|
|
46
|
+
declare function deliverWebhook(webhook: WebhookConfig, payload: WebhookPayload, options?: DeliveryOptions): Promise<DeliveryResult>;
|
|
47
|
+
declare function deliverWithRetry(webhook: WebhookConfig, payload: WebhookPayload, deliveryId: string, options?: DeliveryOptions): Promise<DeliveryResult>;
|
|
48
|
+
declare function buildDeliveryRecord(deliveryId: string, webhookId: string, event: string, payload: WebhookPayload, attempt: number, result: DeliveryResult): WebhookDelivery;
|
|
49
|
+
declare function createTestPayload(): WebhookPayload;
|
|
50
|
+
|
|
51
|
+
interface RichTextMark {
|
|
52
|
+
type: string;
|
|
53
|
+
attrs?: Record<string, unknown>;
|
|
54
|
+
}
|
|
55
|
+
interface RichTextNode {
|
|
56
|
+
type?: string;
|
|
57
|
+
attrs?: Record<string, unknown>;
|
|
58
|
+
content?: RichTextNode[];
|
|
59
|
+
text?: string;
|
|
60
|
+
marks?: RichTextMark[];
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
interface RichTextDocument extends RichTextNode {
|
|
64
|
+
type: "doc";
|
|
65
|
+
content: RichTextNode[];
|
|
66
|
+
}
|
|
67
|
+
declare const richTextStyles: string;
|
|
68
|
+
declare function createColumnsNode(columns?: number): RichTextNode;
|
|
69
|
+
declare function normalizeRichTextDocument(value: unknown): RichTextDocument;
|
|
70
|
+
declare function normalizeRichTextValue<T>(value: T): T;
|
|
71
|
+
declare function renderRichText(value: unknown): string;
|
|
27
72
|
|
|
28
73
|
declare class Kyro {
|
|
29
74
|
registry: Registry;
|
|
30
75
|
db: BaseAdapter;
|
|
31
76
|
pubsub: KyroPubSub;
|
|
77
|
+
settings?: Record<string, any>;
|
|
32
78
|
private wsServer?;
|
|
33
79
|
private config;
|
|
34
80
|
constructor(config: KyroConfig);
|
|
35
81
|
init(): Promise<void>;
|
|
82
|
+
loadSettings(): Promise<Record<string, any>>;
|
|
36
83
|
getREST(options?: {
|
|
37
84
|
user?: User;
|
|
38
85
|
req?: Request$1;
|
|
@@ -52,7 +99,7 @@ declare class Kyro {
|
|
|
52
99
|
port?: number;
|
|
53
100
|
requireAuth?: boolean;
|
|
54
101
|
verifyToken?: (token: string) => Promise<any>;
|
|
55
|
-
}): Promise<KyroWSServer>;
|
|
102
|
+
}): Promise<KyroWSServer | null>;
|
|
56
103
|
shutdown(): Promise<void>;
|
|
57
104
|
}
|
|
58
105
|
declare function createKyro(config: KyroConfig): Kyro;
|
|
@@ -366,7 +413,7 @@ declare class RedisAuthAdapter implements AuthAdapter {
|
|
|
366
413
|
private passwordHistoryKey;
|
|
367
414
|
createUser(data: {
|
|
368
415
|
email: string;
|
|
369
|
-
|
|
416
|
+
password: string;
|
|
370
417
|
role?: UserRole;
|
|
371
418
|
tenantId?: string;
|
|
372
419
|
}): Promise<AuthUser>;
|
|
@@ -375,7 +422,7 @@ declare class RedisAuthAdapter implements AuthAdapter {
|
|
|
375
422
|
updateUser(userId: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
|
|
376
423
|
deleteUser(userId: string): Promise<boolean>;
|
|
377
424
|
hashPassword(password: string): Promise<string>;
|
|
378
|
-
verifyPassword(
|
|
425
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
379
426
|
createSession(userId: string, data?: {
|
|
380
427
|
ipAddress?: string;
|
|
381
428
|
userAgent?: string;
|
|
@@ -390,24 +437,59 @@ declare class RedisAuthAdapter implements AuthAdapter {
|
|
|
390
437
|
private hashToUser;
|
|
391
438
|
private sessionToHash;
|
|
392
439
|
private hashToSession;
|
|
440
|
+
private auditLogKey;
|
|
441
|
+
private auditLogIndexKey;
|
|
442
|
+
findAuditLogs(filter: {
|
|
443
|
+
userId?: string;
|
|
444
|
+
action?: string | string[];
|
|
445
|
+
resource?: string;
|
|
446
|
+
success?: boolean;
|
|
447
|
+
limit?: number;
|
|
448
|
+
offset?: number;
|
|
449
|
+
}): Promise<{
|
|
450
|
+
logs: any[];
|
|
451
|
+
total: number;
|
|
452
|
+
}>;
|
|
453
|
+
createAuditLog(data: any): Promise<any>;
|
|
393
454
|
}
|
|
394
455
|
|
|
395
|
-
interface EmailConfig {
|
|
396
|
-
|
|
397
|
-
port: number;
|
|
398
|
-
secure: boolean;
|
|
399
|
-
auth: {
|
|
400
|
-
user: string;
|
|
401
|
-
pass: string;
|
|
402
|
-
};
|
|
456
|
+
interface EmailConfig$1 {
|
|
457
|
+
provider: "smtp" | "resend" | "sendgrid" | "mailgun" | "ses";
|
|
403
458
|
from: string;
|
|
404
459
|
fromName?: string;
|
|
460
|
+
replyTo?: string;
|
|
461
|
+
smtp?: {
|
|
462
|
+
host: string;
|
|
463
|
+
port: number;
|
|
464
|
+
secure: boolean;
|
|
465
|
+
auth: {
|
|
466
|
+
user: string;
|
|
467
|
+
pass: string;
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
resend?: {
|
|
471
|
+
apiKey: string;
|
|
472
|
+
};
|
|
473
|
+
sendgrid?: {
|
|
474
|
+
apiKey: string;
|
|
475
|
+
};
|
|
476
|
+
mailgun?: {
|
|
477
|
+
apiKey: string;
|
|
478
|
+
domain: string;
|
|
479
|
+
region?: "us" | "eu";
|
|
480
|
+
};
|
|
481
|
+
ses?: {
|
|
482
|
+
accessKeyId: string;
|
|
483
|
+
secretAccessKey: string;
|
|
484
|
+
region: string;
|
|
485
|
+
};
|
|
405
486
|
}
|
|
406
487
|
interface EmailOptions {
|
|
407
488
|
to: string | string[];
|
|
408
489
|
subject: string;
|
|
409
490
|
html: string;
|
|
410
491
|
text?: string;
|
|
492
|
+
replyTo?: string;
|
|
411
493
|
}
|
|
412
494
|
interface EmailTemplates {
|
|
413
495
|
verifyEmail: (link: string, userName?: string) => {
|
|
@@ -442,14 +524,17 @@ interface EmailTemplates {
|
|
|
442
524
|
};
|
|
443
525
|
}
|
|
444
526
|
declare class EmailTransport {
|
|
445
|
-
private transporter
|
|
446
|
-
private
|
|
447
|
-
private fromName;
|
|
527
|
+
private transporter?;
|
|
528
|
+
private config;
|
|
448
529
|
private templates;
|
|
449
|
-
constructor(config: EmailConfig, templates?: Partial<EmailTemplates>);
|
|
450
|
-
send(options: EmailOptions): Promise<
|
|
530
|
+
constructor(config: EmailConfig$1, templates?: Partial<EmailTemplates>);
|
|
531
|
+
send(options: EmailOptions): Promise<any>;
|
|
532
|
+
private sendViaResend;
|
|
533
|
+
private sendViaSendGrid;
|
|
534
|
+
private sendViaMailgun;
|
|
451
535
|
getTemplates(): EmailTemplates;
|
|
452
536
|
verifyConnection(): Promise<boolean>;
|
|
537
|
+
static fromConfig(db: any): Promise<EmailTransport | null>;
|
|
453
538
|
static fromEnv(): EmailTransport | null;
|
|
454
539
|
}
|
|
455
540
|
|
|
@@ -460,17 +545,7 @@ interface BootstrapConfig {
|
|
|
460
545
|
adminPassword: string;
|
|
461
546
|
adminRole?: string;
|
|
462
547
|
tenantId?: string;
|
|
463
|
-
emailConfig?:
|
|
464
|
-
host: string;
|
|
465
|
-
port: number;
|
|
466
|
-
secure: boolean;
|
|
467
|
-
auth: {
|
|
468
|
-
user: string;
|
|
469
|
-
pass: string;
|
|
470
|
-
};
|
|
471
|
-
from: string;
|
|
472
|
-
fromName?: string;
|
|
473
|
-
};
|
|
548
|
+
emailConfig?: EmailConfig$1;
|
|
474
549
|
sendWelcomeEmail?: boolean;
|
|
475
550
|
}
|
|
476
551
|
interface BootstrapResult {
|
|
@@ -579,70 +654,6 @@ declare class RateLimiter {
|
|
|
579
654
|
setUserLimit(type: string, config: RateLimitConfig): void;
|
|
580
655
|
}
|
|
581
656
|
|
|
582
|
-
type AuditAction = "login" | "logout" | "login_failed" | "register" | "verify_email" | "password_change" | "password_reset" | "password_reset_request" | "role_change" | "permission_change" | "document_create" | "document_update" | "document_delete" | "settings_change" | "user_lockout" | "user_unlock" | "user_create" | "user_update" | "user_delete" | "api_request" | "api_key_create" | "api_key_delete" | "tenant_create" | "tenant_delete";
|
|
583
|
-
interface AuditLog {
|
|
584
|
-
id: string;
|
|
585
|
-
timestamp: Date;
|
|
586
|
-
action: AuditAction;
|
|
587
|
-
userId?: string;
|
|
588
|
-
userEmail?: string;
|
|
589
|
-
role?: string;
|
|
590
|
-
resource: string;
|
|
591
|
-
resourceId?: string;
|
|
592
|
-
changes?: {
|
|
593
|
-
field: string;
|
|
594
|
-
old: any;
|
|
595
|
-
new: any;
|
|
596
|
-
}[];
|
|
597
|
-
ipAddress?: string;
|
|
598
|
-
userAgent?: string;
|
|
599
|
-
success: boolean;
|
|
600
|
-
error?: string;
|
|
601
|
-
metadata?: Record<string, any>;
|
|
602
|
-
}
|
|
603
|
-
interface AuditLogFilter {
|
|
604
|
-
userId?: string;
|
|
605
|
-
action?: AuditAction | AuditAction[];
|
|
606
|
-
resource?: string;
|
|
607
|
-
resourceId?: string;
|
|
608
|
-
success?: boolean;
|
|
609
|
-
startDate?: Date;
|
|
610
|
-
endDate?: Date;
|
|
611
|
-
limit?: number;
|
|
612
|
-
offset?: number;
|
|
613
|
-
}
|
|
614
|
-
declare class AuditLogger {
|
|
615
|
-
private redis;
|
|
616
|
-
private prefix;
|
|
617
|
-
private retentionDays;
|
|
618
|
-
constructor(redis: Redis, retentionDays?: number, prefix?: string);
|
|
619
|
-
log(data: Omit<AuditLog, "id" | "timestamp">): Promise<string>;
|
|
620
|
-
get(id: string): Promise<AuditLog | null>;
|
|
621
|
-
query(filter?: AuditLogFilter): Promise<{
|
|
622
|
-
logs: AuditLog[];
|
|
623
|
-
total: number;
|
|
624
|
-
}>;
|
|
625
|
-
getRecent(limit?: number): Promise<AuditLog[]>;
|
|
626
|
-
getUserActivity(userId: string, limit?: number): Promise<AuditLog[]>;
|
|
627
|
-
getStats(startDate?: Date, endDate?: Date): Promise<{
|
|
628
|
-
totalEvents: number;
|
|
629
|
-
byAction: Record<string, number>;
|
|
630
|
-
successRate: number;
|
|
631
|
-
failedLogins: number;
|
|
632
|
-
uniqueUsers: Set<string>;
|
|
633
|
-
}>;
|
|
634
|
-
cleanup(): Promise<number>;
|
|
635
|
-
private getKeyForDate;
|
|
636
|
-
private getKeysForDateRange;
|
|
637
|
-
private matchesFilter;
|
|
638
|
-
private serializeLog;
|
|
639
|
-
private deserializeLog;
|
|
640
|
-
}
|
|
641
|
-
declare function createAuditContext(req: Request): {
|
|
642
|
-
ipAddress: string;
|
|
643
|
-
userAgent: string;
|
|
644
|
-
};
|
|
645
|
-
|
|
646
657
|
declare class InMemoryRateLimiter {
|
|
647
658
|
private storage;
|
|
648
659
|
private userStorage;
|
|
@@ -774,13 +785,14 @@ declare class InMemoryAuthAdapter implements AuthAdapter {
|
|
|
774
785
|
private refreshTokens;
|
|
775
786
|
private emailToUserId;
|
|
776
787
|
private passwordHistory;
|
|
788
|
+
private auditLogs;
|
|
777
789
|
private externalDb;
|
|
778
790
|
constructor();
|
|
779
791
|
connect(): Promise<void>;
|
|
780
792
|
disconnect(): Promise<void>;
|
|
781
793
|
createUser(data: {
|
|
782
794
|
email: string;
|
|
783
|
-
|
|
795
|
+
password: string;
|
|
784
796
|
role?: UserRole;
|
|
785
797
|
tenantId?: string;
|
|
786
798
|
}): Promise<AuthUser>;
|
|
@@ -789,7 +801,7 @@ declare class InMemoryAuthAdapter implements AuthAdapter {
|
|
|
789
801
|
updateUser(userId: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
|
|
790
802
|
deleteUser(userId: string): Promise<boolean>;
|
|
791
803
|
hashPassword(password: string): Promise<string>;
|
|
792
|
-
verifyPassword(
|
|
804
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
793
805
|
createSession(userId: string, data?: {
|
|
794
806
|
ipAddress?: string;
|
|
795
807
|
userAgent?: string;
|
|
@@ -801,6 +813,18 @@ declare class InMemoryAuthAdapter implements AuthAdapter {
|
|
|
801
813
|
getPasswordHistory(userId: string, count?: number): Promise<string[]>;
|
|
802
814
|
isPasswordInHistory(password: string, userId: string, historyCount?: number): Promise<boolean>;
|
|
803
815
|
hasAnyUsers(): Promise<boolean>;
|
|
816
|
+
findAuditLogs(filter: {
|
|
817
|
+
userId?: string;
|
|
818
|
+
action?: string | string[];
|
|
819
|
+
resource?: string;
|
|
820
|
+
success?: boolean;
|
|
821
|
+
limit?: number;
|
|
822
|
+
offset?: number;
|
|
823
|
+
}): Promise<{
|
|
824
|
+
logs: any[];
|
|
825
|
+
total: number;
|
|
826
|
+
}>;
|
|
827
|
+
createAuditLog(data: any): Promise<any>;
|
|
804
828
|
}
|
|
805
829
|
|
|
806
830
|
declare class Auth {
|
|
@@ -857,7 +881,7 @@ declare class SQLiteAuthAdapter implements AuthAdapter {
|
|
|
857
881
|
}>;
|
|
858
882
|
createUser(data: {
|
|
859
883
|
email: string;
|
|
860
|
-
|
|
884
|
+
password: string;
|
|
861
885
|
role?: UserRole;
|
|
862
886
|
tenantId?: string;
|
|
863
887
|
}): Promise<AuthUser>;
|
|
@@ -866,7 +890,7 @@ declare class SQLiteAuthAdapter implements AuthAdapter {
|
|
|
866
890
|
updateUser(userId: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
|
|
867
891
|
deleteUser(userId: string): Promise<boolean>;
|
|
868
892
|
hashPassword(password: string): Promise<string>;
|
|
869
|
-
verifyPassword(
|
|
893
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
870
894
|
createSession(userId: string, data?: {
|
|
871
895
|
ipAddress?: string;
|
|
872
896
|
userAgent?: string;
|
|
@@ -928,6 +952,11 @@ declare class SQLiteAuthAdapter implements AuthAdapter {
|
|
|
928
952
|
}>;
|
|
929
953
|
private rowToUser;
|
|
930
954
|
private rowToSession;
|
|
955
|
+
findAuditLogs(filter: AuditLogFilter): Promise<{
|
|
956
|
+
logs: AuditLog[];
|
|
957
|
+
total: number;
|
|
958
|
+
}>;
|
|
959
|
+
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
931
960
|
}
|
|
932
961
|
|
|
933
962
|
type VersionStatus = 'draft' | 'published' | 'archived';
|
|
@@ -1029,6 +1058,251 @@ declare function isPublished(status: VersionStatus): boolean;
|
|
|
1029
1058
|
declare function isDraft(status: VersionStatus): boolean;
|
|
1030
1059
|
declare function isArchived(status: VersionStatus): boolean;
|
|
1031
1060
|
|
|
1061
|
+
interface S3CompatibleConfig {
|
|
1062
|
+
bucket?: string;
|
|
1063
|
+
region?: string;
|
|
1064
|
+
accessKeyId?: string;
|
|
1065
|
+
secretAccessKey?: string;
|
|
1066
|
+
endpoint?: string;
|
|
1067
|
+
cdnUrl?: string;
|
|
1068
|
+
prefix?: string;
|
|
1069
|
+
}
|
|
1070
|
+
interface R2Config {
|
|
1071
|
+
accountId?: string;
|
|
1072
|
+
accessKeyId?: string;
|
|
1073
|
+
secretAccessKey?: string;
|
|
1074
|
+
bucket?: string;
|
|
1075
|
+
cdnUrl?: string;
|
|
1076
|
+
prefix?: string;
|
|
1077
|
+
publicDevUrl?: string;
|
|
1078
|
+
}
|
|
1079
|
+
interface GCSConfig {
|
|
1080
|
+
bucket?: string;
|
|
1081
|
+
projectId?: string;
|
|
1082
|
+
clientEmail?: string;
|
|
1083
|
+
privateKey?: string;
|
|
1084
|
+
cdnUrl?: string;
|
|
1085
|
+
prefix?: string;
|
|
1086
|
+
}
|
|
1087
|
+
interface BackblazeConfig {
|
|
1088
|
+
bucket?: string;
|
|
1089
|
+
accountId?: string;
|
|
1090
|
+
applicationKeyId?: string;
|
|
1091
|
+
applicationKey?: string;
|
|
1092
|
+
cdnUrl?: string;
|
|
1093
|
+
prefix?: string;
|
|
1094
|
+
}
|
|
1095
|
+
interface BunnyConfig {
|
|
1096
|
+
storageZone?: string;
|
|
1097
|
+
apiKey?: string;
|
|
1098
|
+
cdnUrl?: string;
|
|
1099
|
+
prefix?: string;
|
|
1100
|
+
}
|
|
1101
|
+
interface FTPConfig {
|
|
1102
|
+
host?: string;
|
|
1103
|
+
port?: number;
|
|
1104
|
+
user?: string;
|
|
1105
|
+
password?: string;
|
|
1106
|
+
secure?: boolean;
|
|
1107
|
+
baseUrl?: string;
|
|
1108
|
+
prefix?: string;
|
|
1109
|
+
}
|
|
1110
|
+
interface StorageConfig {
|
|
1111
|
+
type: string;
|
|
1112
|
+
s3: S3CompatibleConfig;
|
|
1113
|
+
r2: R2Config;
|
|
1114
|
+
gcs: GCSConfig;
|
|
1115
|
+
digitalocean: S3CompatibleConfig;
|
|
1116
|
+
backblaze: BackblazeConfig;
|
|
1117
|
+
wasabi: S3CompatibleConfig;
|
|
1118
|
+
bunny: BunnyConfig;
|
|
1119
|
+
ftp: FTPConfig;
|
|
1120
|
+
cloudinary: {
|
|
1121
|
+
cloudName?: string;
|
|
1122
|
+
apiKey?: string;
|
|
1123
|
+
apiSecret?: string;
|
|
1124
|
+
folder?: string;
|
|
1125
|
+
};
|
|
1126
|
+
imgix: {
|
|
1127
|
+
domain?: string;
|
|
1128
|
+
signKey?: string;
|
|
1129
|
+
};
|
|
1130
|
+
local: {
|
|
1131
|
+
uploadDir?: string;
|
|
1132
|
+
baseUrl?: string;
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
interface EmailConfig {
|
|
1136
|
+
provider?: string;
|
|
1137
|
+
host?: string;
|
|
1138
|
+
port?: number;
|
|
1139
|
+
secure?: boolean;
|
|
1140
|
+
user?: string;
|
|
1141
|
+
pass?: string;
|
|
1142
|
+
from?: string;
|
|
1143
|
+
fromName?: string;
|
|
1144
|
+
replyTo?: string;
|
|
1145
|
+
}
|
|
1146
|
+
declare class ConfigService {
|
|
1147
|
+
private db;
|
|
1148
|
+
private cache;
|
|
1149
|
+
private static readonly SENSITIVE_KEYS;
|
|
1150
|
+
constructor(db: any);
|
|
1151
|
+
/**
|
|
1152
|
+
* Initialize the service by loading all settings from the database
|
|
1153
|
+
*/
|
|
1154
|
+
load(): Promise<void>;
|
|
1155
|
+
/**
|
|
1156
|
+
* Get a settings value with environment fallback
|
|
1157
|
+
*/
|
|
1158
|
+
get(key: string, envKey?: string, defaultValue?: string): string | undefined;
|
|
1159
|
+
/**
|
|
1160
|
+
* Get storage configuration
|
|
1161
|
+
*/
|
|
1162
|
+
getStorageConfig(): StorageConfig;
|
|
1163
|
+
/**
|
|
1164
|
+
* Get email configuration
|
|
1165
|
+
*/
|
|
1166
|
+
getEmailConfig(): EmailConfig;
|
|
1167
|
+
/**
|
|
1168
|
+
* Mask sensitive values for display
|
|
1169
|
+
*/
|
|
1170
|
+
maskSensitive(key: string, value: string | undefined): string | undefined;
|
|
1171
|
+
/**
|
|
1172
|
+
* Update a setting in the database
|
|
1173
|
+
*/
|
|
1174
|
+
set(key: string, value: string, description?: string): Promise<void>;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
interface LocalStorageConfig {
|
|
1178
|
+
uploadDir: string;
|
|
1179
|
+
baseUrl?: string;
|
|
1180
|
+
}
|
|
1181
|
+
declare function createLocalStorage(config: LocalStorageConfig): StorageProvider;
|
|
1182
|
+
|
|
1183
|
+
interface UploadOptions {
|
|
1184
|
+
folder?: string;
|
|
1185
|
+
filename?: string;
|
|
1186
|
+
mimeType?: string;
|
|
1187
|
+
metadata?: Record<string, unknown>;
|
|
1188
|
+
}
|
|
1189
|
+
interface UploadedFile {
|
|
1190
|
+
id: string;
|
|
1191
|
+
filename: string;
|
|
1192
|
+
originalName: string;
|
|
1193
|
+
mimeType: string;
|
|
1194
|
+
size: number;
|
|
1195
|
+
url: string;
|
|
1196
|
+
thumbnailUrl?: string;
|
|
1197
|
+
width?: number;
|
|
1198
|
+
height?: number;
|
|
1199
|
+
folder?: string;
|
|
1200
|
+
provider: string;
|
|
1201
|
+
metadata?: Record<string, unknown>;
|
|
1202
|
+
createdAt: string;
|
|
1203
|
+
}
|
|
1204
|
+
interface ImageTransforms {
|
|
1205
|
+
width?: number;
|
|
1206
|
+
height?: number;
|
|
1207
|
+
fit?: "clip" | "crop" | "fill" | "fillmax" | "scale" | "max" | "min";
|
|
1208
|
+
format?: "webp" | "avif" | "jpeg" | "jpg" | "png" | "gif";
|
|
1209
|
+
quality?: number;
|
|
1210
|
+
blur?: number;
|
|
1211
|
+
sharpen?: number;
|
|
1212
|
+
}
|
|
1213
|
+
interface StorageProvider {
|
|
1214
|
+
name: string;
|
|
1215
|
+
displayName: string;
|
|
1216
|
+
supportsDynamicResize: boolean;
|
|
1217
|
+
upload(file: File, options?: UploadOptions): Promise<UploadedFile>;
|
|
1218
|
+
uploadFromUrl(url: string, options?: UploadOptions): Promise<UploadedFile>;
|
|
1219
|
+
delete(url: string): Promise<void>;
|
|
1220
|
+
rename(oldUrl: string, newKey: string): Promise<string>;
|
|
1221
|
+
getImageUrl(url: string, transforms?: ImageTransforms): string;
|
|
1222
|
+
generateThumbnail(file: UploadedFile, size: {
|
|
1223
|
+
width: number;
|
|
1224
|
+
height: number;
|
|
1225
|
+
}): Promise<string>;
|
|
1226
|
+
list(prefix?: string): Promise<UploadedFile[]>;
|
|
1227
|
+
exists(url: string): Promise<boolean>;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
declare function resolveProvider(configService: ConfigService): Promise<StorageProvider>;
|
|
1231
|
+
|
|
1232
|
+
interface MediaSearchParams {
|
|
1233
|
+
page?: number;
|
|
1234
|
+
limit?: number;
|
|
1235
|
+
search?: string;
|
|
1236
|
+
type?: string;
|
|
1237
|
+
folder?: string;
|
|
1238
|
+
sortBy?: string;
|
|
1239
|
+
sortDir?: "asc" | "desc";
|
|
1240
|
+
}
|
|
1241
|
+
interface MediaRow {
|
|
1242
|
+
id: string;
|
|
1243
|
+
filename: string;
|
|
1244
|
+
title: string | null;
|
|
1245
|
+
originalName: string;
|
|
1246
|
+
mimeType: string;
|
|
1247
|
+
fileSize: number;
|
|
1248
|
+
width: number | null;
|
|
1249
|
+
height: number | null;
|
|
1250
|
+
url: string;
|
|
1251
|
+
thumbnailUrl: string | null;
|
|
1252
|
+
folder: string | null;
|
|
1253
|
+
provider: string;
|
|
1254
|
+
alt: string | null;
|
|
1255
|
+
caption: string | null;
|
|
1256
|
+
metadata: string | null;
|
|
1257
|
+
createdAt: string;
|
|
1258
|
+
updatedAt: string;
|
|
1259
|
+
}
|
|
1260
|
+
declare class MediaService {
|
|
1261
|
+
private db;
|
|
1262
|
+
private storage;
|
|
1263
|
+
private dialect;
|
|
1264
|
+
private genId;
|
|
1265
|
+
private mediaTable;
|
|
1266
|
+
private foldersTable;
|
|
1267
|
+
constructor(db: any, storage: StorageProvider, options?: {
|
|
1268
|
+
dialect?: Dialect;
|
|
1269
|
+
genId?: () => string;
|
|
1270
|
+
});
|
|
1271
|
+
static init(db: any, options?: {
|
|
1272
|
+
dialect?: Dialect;
|
|
1273
|
+
genId?: () => string;
|
|
1274
|
+
storageConfig?: any;
|
|
1275
|
+
}): Promise<MediaService>;
|
|
1276
|
+
private now;
|
|
1277
|
+
private buildFindConditions;
|
|
1278
|
+
private rowToMedia;
|
|
1279
|
+
private sqliteRun;
|
|
1280
|
+
private sqliteGet;
|
|
1281
|
+
upload(file: File, folder?: string): Promise<MediaRow>;
|
|
1282
|
+
delete(id: string): Promise<void>;
|
|
1283
|
+
deleteFile(url: string): Promise<void>;
|
|
1284
|
+
rename(id: string, newKey: string): Promise<MediaRow | null>;
|
|
1285
|
+
find(params?: MediaSearchParams): Promise<{
|
|
1286
|
+
docs: MediaRow[];
|
|
1287
|
+
totalDocs: number;
|
|
1288
|
+
page: number;
|
|
1289
|
+
limit: number;
|
|
1290
|
+
totalPages: number;
|
|
1291
|
+
}>;
|
|
1292
|
+
update(id: string, data: {
|
|
1293
|
+
title?: string;
|
|
1294
|
+
alt?: string;
|
|
1295
|
+
caption?: string;
|
|
1296
|
+
folder?: string;
|
|
1297
|
+
}): Promise<MediaRow | null>;
|
|
1298
|
+
updateMany(ids: string[], data: {
|
|
1299
|
+
folder?: string;
|
|
1300
|
+
}): Promise<void>;
|
|
1301
|
+
listFolders(): Promise<string[]>;
|
|
1302
|
+
createFolder(name: string, parentPath?: string): Promise<void>;
|
|
1303
|
+
deleteFolder(folder: string): Promise<void>;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1032
1306
|
declare function defineConfig(config: {
|
|
1033
1307
|
collections?: CollectionConfig[] | Record<string, CollectionConfig>;
|
|
1034
1308
|
globals?: GlobalConfig[] | Record<string, GlobalConfig>;
|
|
@@ -1045,4 +1319,4 @@ declare function defineConfig(config: {
|
|
|
1045
1319
|
debug?: KyroConfig["debug"];
|
|
1046
1320
|
}): KyroConfig;
|
|
1047
1321
|
|
|
1048
|
-
export { AbstractBaseAdapter, AccountLockout, type AdapterOptions, type AdminStylingConfig, AnalyticsPlugin,
|
|
1322
|
+
export { AbstractBaseAdapter, AccountLockout, type AdapterOptions, type AdminStylingConfig, AnalyticsPlugin, AuditLog, AuditLogFilter, Auth, AuthAdapter, AuthResult, Session as AuthSession, AuthTokenConfig, AuthUser, BaseAdapter, CSSGenerator, CollectionConfig, CommentsPlugin, type CompareVersionsOptions, ConfigService, ConfigValidationError, CreateArgs, type CreateVersionOptions, type DatabaseConnectionOptions, type DatabaseType, type DatabaseType$1 as DbAdapterType, DeleteArgs, type DeliveryOptions, type DeliveryResult, Dialect, type DraftPublishConfig, type DrizzleAdapterOptions, type EmailConfig, EmailTransport, Field, type FieldStyling, 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, Session, type StorageConfig, type StylingConfig, type StylingMode, type ThemeBorderRadius, type ThemeColors, type ThemeConfig, type ThemeFonts, type ThemeShadows, type ThemeSpacing, 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, createAdminStyling, createAuth, createAuthConfig, createColumnsNode, createKyro, createLocalAdapter, createLocalStorage, createTestPayload, createVersionManager, defaultDarkTheme, defaultFieldStyling, defaultLightTheme, defineConfig, deliverWebhook, deliverWithRetry, ecommerce2026Theme, fieldToZod, generateCSSVariables, generateTailwindConfig, generateWebhookSecret, getBootstrapFromEnv, getDefaultDraftPublishConfig, globalToZod, isArchived, isDraft, isPublished, normalizeRichTextDocument, normalizeRichTextValue, presetPlugins, renderRichText, resolveProvider, richTextStyles, signPayload, validateCollection, validateConfig, validateFields, validateGlobal };
|