@kyro-cms/core 0.12.15 → 0.12.16

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.
Files changed (49) hide show
  1. package/README.md +1 -1
  2. package/dist/WebhookService-ByrpAI4d.d.ts +143 -0
  3. package/dist/WebhookService-i-Kl3dvf.d.cts +143 -0
  4. package/dist/api-handler-graphql.d.cts +6 -0
  5. package/dist/api-handler-graphql.d.ts +6 -0
  6. package/dist/api-handler-trpc.d.cts +5 -0
  7. package/dist/api-handler-trpc.d.ts +5 -0
  8. package/dist/api-handler.d.cts +7 -0
  9. package/dist/api-handler.d.ts +7 -0
  10. package/dist/base-iyJTfH-3.d.cts +74 -0
  11. package/dist/base-oUSURe4_.d.ts +74 -0
  12. package/dist/cli/index.cjs +0 -0
  13. package/dist/cli/index.d.cts +1 -0
  14. package/dist/cli/index.d.ts +1 -0
  15. package/dist/client.d.cts +12 -0
  16. package/dist/client.d.ts +12 -0
  17. package/dist/drizzle/index.d.cts +169 -0
  18. package/dist/drizzle/index.d.ts +169 -0
  19. package/dist/fields/index.d.cts +7 -0
  20. package/dist/fields/index.d.ts +7 -0
  21. package/dist/graphql/index.d.cts +57 -0
  22. package/dist/graphql/index.d.ts +57 -0
  23. package/dist/index-Bz9JqRGI.d.cts +86 -0
  24. package/dist/index-Bz9JqRGI.d.ts +86 -0
  25. package/dist/index-DNy8jbA2.d.cts +282 -0
  26. package/dist/index-DVDMEql7.d.ts +282 -0
  27. package/dist/index.d.cts +1246 -0
  28. package/dist/index.d.ts +1246 -0
  29. package/dist/integration.d.cts +14 -0
  30. package/dist/integration.d.ts +14 -0
  31. package/dist/mongodb/index.d.cts +134 -0
  32. package/dist/mongodb/index.d.ts +134 -0
  33. package/dist/rest/index.d.cts +56 -0
  34. package/dist/rest/index.d.ts +56 -0
  35. package/dist/richtext-DrhORshE.d.cts +5 -0
  36. package/dist/richtext-DrhORshE.d.ts +5 -0
  37. package/dist/templates/index.d.cts +107 -0
  38. package/dist/templates/index.d.ts +107 -0
  39. package/dist/trpc/index.d.cts +142 -0
  40. package/dist/trpc/index.d.ts +142 -0
  41. package/dist/types-BcZiluXL.d.cts +569 -0
  42. package/dist/types-CpjuXbe7.d.cts +150 -0
  43. package/dist/types-CpjuXbe7.d.ts +150 -0
  44. package/dist/types-Dc8VAPhF.d.ts +569 -0
  45. package/dist/types-euTszc-1.d.cts +294 -0
  46. package/dist/types-euTszc-1.d.ts +294 -0
  47. package/dist/ws/index.d.cts +88 -0
  48. package/dist/ws/index.d.ts +88 -0
  49. package/package.json +22 -25
@@ -0,0 +1,169 @@
1
+ import { A as AbstractBaseAdapter } from '../base-iyJTfH-3.cjs';
2
+ import { C as CollectionConfig, G as GlobalConfig, F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, e as UpdateArgs, D as DeleteArgs } from '../types-BcZiluXL.cjs';
3
+ import { F as Field } from '../types-euTszc-1.cjs';
4
+ import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
5
+ import { A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, e as AuditLogFilter, d as AuditLog } from '../types-CpjuXbe7.cjs';
6
+
7
+ declare function fieldToDrizzleType(field: Field, dialect?: 'postgres' | 'sqlite'): string;
8
+ declare function collectionToDrizzleSchema(collection: CollectionConfig, dialect?: 'postgres' | 'sqlite'): string;
9
+ declare class DrizzleAdapter extends AbstractBaseAdapter {
10
+ client: any;
11
+ private schema;
12
+ private _schemaEnsured;
13
+ dialect: 'postgres' | 'sqlite';
14
+ private connectionString?;
15
+ private versionsTableReady;
16
+ constructor(options: {
17
+ type?: 'postgres' | 'sqlite';
18
+ client?: any;
19
+ schema?: any;
20
+ connectionString?: string;
21
+ });
22
+ protected prepareData(data: Record<string, any>, config: CollectionConfig): Record<string, any>;
23
+ connect(): Promise<void>;
24
+ init(collections: CollectionConfig[], globals?: GlobalConfig[]): Promise<void>;
25
+ private createTableFromConfig;
26
+ private ensureCollectionTables;
27
+ private getColumnSqlDefinition;
28
+ private columnSqlType;
29
+ private getExpectedColumnDefs;
30
+ private syncTableColumns;
31
+ private generateCreateColumns;
32
+ disconnect(): Promise<void>;
33
+ find<T>(args: FindArgs): Promise<FindResult<T>>;
34
+ findByID<T>(args: FindByIDArgs): Promise<T | null>;
35
+ create<T>(args: CreateArgs): Promise<T>;
36
+ update<T>(args: UpdateArgs): Promise<T>;
37
+ delete<T>(args: DeleteArgs): Promise<T>;
38
+ count(args: {
39
+ collection: string;
40
+ where?: Record<string, any>;
41
+ tenantId?: string;
42
+ }): Promise<number>;
43
+ findOne(args: {
44
+ collection: string;
45
+ where: Record<string, any>;
46
+ tenantId?: string;
47
+ draft?: boolean;
48
+ }): Promise<any>;
49
+ findVersions(args: any): Promise<FindResult<any>>;
50
+ findVersionByID(args: {
51
+ collection: string;
52
+ versionId: string;
53
+ tenantId?: string;
54
+ }): Promise<any>;
55
+ createVersion(args: any): Promise<any>;
56
+ updateLatestVersion(args: any): Promise<any>;
57
+ deleteVersions(args: {
58
+ collection: string;
59
+ documentId: string;
60
+ keepLatest?: number;
61
+ tenantId?: string;
62
+ }): Promise<void>;
63
+ private getTable;
64
+ private buildWhereClause;
65
+ private processResult;
66
+ private ensureVersionsTable;
67
+ private executeRaw;
68
+ }
69
+ declare function createDrizzleAdapter(options: {
70
+ type?: 'postgres' | 'sqlite';
71
+ client?: any;
72
+ schema?: any;
73
+ connectionString?: string;
74
+ }): DrizzleAdapter;
75
+
76
+ interface PostgresAuthAdapterOptions {
77
+ db: PostgresJsDatabase;
78
+ prefix?: string;
79
+ sessionTTL?: number;
80
+ refreshTokenTTL?: number;
81
+ }
82
+ declare class PostgresAuthAdapter implements AuthAdapter {
83
+ private db;
84
+ private prefix;
85
+ private sessionTTL;
86
+ private refreshTokenTTL;
87
+ constructor(options: PostgresAuthAdapterOptions);
88
+ connect(): Promise<void>;
89
+ disconnect(): Promise<void>;
90
+ createUser(data: {
91
+ email: string;
92
+ password: string;
93
+ name?: string;
94
+ role?: UserRole;
95
+ avatar?: string;
96
+ tenantId?: string;
97
+ }): Promise<AuthUser>;
98
+ findUserByEmail(email: string): Promise<AuthUser | null>;
99
+ findUserById(id: string): Promise<AuthUser | null>;
100
+ updateUser(id: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
101
+ deleteUser(id: string): Promise<boolean>;
102
+ findUsers(options?: {
103
+ page?: number;
104
+ limit?: number;
105
+ search?: string;
106
+ }): Promise<{
107
+ users: AuthUser[];
108
+ total: number;
109
+ }>;
110
+ verifyPassword(email: string, password: string): Promise<AuthUser | null>;
111
+ hashPassword(password: string): Promise<string>;
112
+ createSession(userId: string, data?: {
113
+ ipAddress?: string;
114
+ userAgent?: string;
115
+ }): Promise<Session>;
116
+ findSessionByToken(token: string): Promise<Session | null>;
117
+ findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
118
+ deleteSession(sessionId: string): Promise<boolean>;
119
+ deleteUserSessions(userId: string): Promise<number>;
120
+ addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
121
+ getPasswordHistory(userId: string, count?: number): Promise<string[]>;
122
+ isPasswordInHistory(password: string, userId: string, historyCount?: number): Promise<boolean>;
123
+ isLocked(userId: string): Promise<boolean>;
124
+ getLockout(userId: string): Promise<{
125
+ lockedUntil: Date;
126
+ } | null>;
127
+ recordFailedAttempt(userId: string, ipAddress?: string): Promise<{
128
+ attempts: number;
129
+ locked: boolean;
130
+ }>;
131
+ resetAttempts(userId: string): Promise<void>;
132
+ findAuditLogs(filter: AuditLogFilter): Promise<{
133
+ logs: AuditLog[];
134
+ total: number;
135
+ }>;
136
+ createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
137
+ private userToAuthUser;
138
+ private sessionToSession;
139
+ createEmailVerificationToken(userId: string): Promise<{
140
+ token: string;
141
+ expiresAt: Date;
142
+ }>;
143
+ verifyEmailToken(token: string): Promise<{
144
+ success: boolean;
145
+ userId?: string;
146
+ error?: string;
147
+ }>;
148
+ createPasswordResetToken(email: string): Promise<{
149
+ token: string;
150
+ expiresAt: Date;
151
+ error?: string;
152
+ }>;
153
+ resetPasswordWithToken(token: string, newPassword: string): Promise<{
154
+ success: boolean;
155
+ error?: string;
156
+ }>;
157
+ }
158
+
159
+ type Dialect = "sqlite" | "postgres";
160
+ interface DatabaseResult {
161
+ db: any;
162
+ dialect: Dialect;
163
+ genId: () => string;
164
+ }
165
+ declare function createDatabase(): Promise<DatabaseResult>;
166
+ declare function runMigrations(_db: any, _dialect?: Dialect): Promise<void>;
167
+ declare function seedDefaultRoles(db: any): Promise<void>;
168
+
169
+ export { type Dialect, DrizzleAdapter, PostgresAuthAdapter, collectionToDrizzleSchema, createDatabase, createDrizzleAdapter, fieldToDrizzleType, runMigrations, seedDefaultRoles };
@@ -0,0 +1,169 @@
1
+ import { A as AbstractBaseAdapter } from '../base-oUSURe4_.js';
2
+ import { C as CollectionConfig, G as GlobalConfig, F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, e as UpdateArgs, D as DeleteArgs } from '../types-Dc8VAPhF.js';
3
+ import { F as Field } from '../types-euTszc-1.js';
4
+ import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
5
+ import { A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, e as AuditLogFilter, d as AuditLog } from '../types-CpjuXbe7.js';
6
+
7
+ declare function fieldToDrizzleType(field: Field, dialect?: 'postgres' | 'sqlite'): string;
8
+ declare function collectionToDrizzleSchema(collection: CollectionConfig, dialect?: 'postgres' | 'sqlite'): string;
9
+ declare class DrizzleAdapter extends AbstractBaseAdapter {
10
+ client: any;
11
+ private schema;
12
+ private _schemaEnsured;
13
+ dialect: 'postgres' | 'sqlite';
14
+ private connectionString?;
15
+ private versionsTableReady;
16
+ constructor(options: {
17
+ type?: 'postgres' | 'sqlite';
18
+ client?: any;
19
+ schema?: any;
20
+ connectionString?: string;
21
+ });
22
+ protected prepareData(data: Record<string, any>, config: CollectionConfig): Record<string, any>;
23
+ connect(): Promise<void>;
24
+ init(collections: CollectionConfig[], globals?: GlobalConfig[]): Promise<void>;
25
+ private createTableFromConfig;
26
+ private ensureCollectionTables;
27
+ private getColumnSqlDefinition;
28
+ private columnSqlType;
29
+ private getExpectedColumnDefs;
30
+ private syncTableColumns;
31
+ private generateCreateColumns;
32
+ disconnect(): Promise<void>;
33
+ find<T>(args: FindArgs): Promise<FindResult<T>>;
34
+ findByID<T>(args: FindByIDArgs): Promise<T | null>;
35
+ create<T>(args: CreateArgs): Promise<T>;
36
+ update<T>(args: UpdateArgs): Promise<T>;
37
+ delete<T>(args: DeleteArgs): Promise<T>;
38
+ count(args: {
39
+ collection: string;
40
+ where?: Record<string, any>;
41
+ tenantId?: string;
42
+ }): Promise<number>;
43
+ findOne(args: {
44
+ collection: string;
45
+ where: Record<string, any>;
46
+ tenantId?: string;
47
+ draft?: boolean;
48
+ }): Promise<any>;
49
+ findVersions(args: any): Promise<FindResult<any>>;
50
+ findVersionByID(args: {
51
+ collection: string;
52
+ versionId: string;
53
+ tenantId?: string;
54
+ }): Promise<any>;
55
+ createVersion(args: any): Promise<any>;
56
+ updateLatestVersion(args: any): Promise<any>;
57
+ deleteVersions(args: {
58
+ collection: string;
59
+ documentId: string;
60
+ keepLatest?: number;
61
+ tenantId?: string;
62
+ }): Promise<void>;
63
+ private getTable;
64
+ private buildWhereClause;
65
+ private processResult;
66
+ private ensureVersionsTable;
67
+ private executeRaw;
68
+ }
69
+ declare function createDrizzleAdapter(options: {
70
+ type?: 'postgres' | 'sqlite';
71
+ client?: any;
72
+ schema?: any;
73
+ connectionString?: string;
74
+ }): DrizzleAdapter;
75
+
76
+ interface PostgresAuthAdapterOptions {
77
+ db: PostgresJsDatabase;
78
+ prefix?: string;
79
+ sessionTTL?: number;
80
+ refreshTokenTTL?: number;
81
+ }
82
+ declare class PostgresAuthAdapter implements AuthAdapter {
83
+ private db;
84
+ private prefix;
85
+ private sessionTTL;
86
+ private refreshTokenTTL;
87
+ constructor(options: PostgresAuthAdapterOptions);
88
+ connect(): Promise<void>;
89
+ disconnect(): Promise<void>;
90
+ createUser(data: {
91
+ email: string;
92
+ password: string;
93
+ name?: string;
94
+ role?: UserRole;
95
+ avatar?: string;
96
+ tenantId?: string;
97
+ }): Promise<AuthUser>;
98
+ findUserByEmail(email: string): Promise<AuthUser | null>;
99
+ findUserById(id: string): Promise<AuthUser | null>;
100
+ updateUser(id: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
101
+ deleteUser(id: string): Promise<boolean>;
102
+ findUsers(options?: {
103
+ page?: number;
104
+ limit?: number;
105
+ search?: string;
106
+ }): Promise<{
107
+ users: AuthUser[];
108
+ total: number;
109
+ }>;
110
+ verifyPassword(email: string, password: string): Promise<AuthUser | null>;
111
+ hashPassword(password: string): Promise<string>;
112
+ createSession(userId: string, data?: {
113
+ ipAddress?: string;
114
+ userAgent?: string;
115
+ }): Promise<Session>;
116
+ findSessionByToken(token: string): Promise<Session | null>;
117
+ findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
118
+ deleteSession(sessionId: string): Promise<boolean>;
119
+ deleteUserSessions(userId: string): Promise<number>;
120
+ addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
121
+ getPasswordHistory(userId: string, count?: number): Promise<string[]>;
122
+ isPasswordInHistory(password: string, userId: string, historyCount?: number): Promise<boolean>;
123
+ isLocked(userId: string): Promise<boolean>;
124
+ getLockout(userId: string): Promise<{
125
+ lockedUntil: Date;
126
+ } | null>;
127
+ recordFailedAttempt(userId: string, ipAddress?: string): Promise<{
128
+ attempts: number;
129
+ locked: boolean;
130
+ }>;
131
+ resetAttempts(userId: string): Promise<void>;
132
+ findAuditLogs(filter: AuditLogFilter): Promise<{
133
+ logs: AuditLog[];
134
+ total: number;
135
+ }>;
136
+ createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
137
+ private userToAuthUser;
138
+ private sessionToSession;
139
+ createEmailVerificationToken(userId: string): Promise<{
140
+ token: string;
141
+ expiresAt: Date;
142
+ }>;
143
+ verifyEmailToken(token: string): Promise<{
144
+ success: boolean;
145
+ userId?: string;
146
+ error?: string;
147
+ }>;
148
+ createPasswordResetToken(email: string): Promise<{
149
+ token: string;
150
+ expiresAt: Date;
151
+ error?: string;
152
+ }>;
153
+ resetPasswordWithToken(token: string, newPassword: string): Promise<{
154
+ success: boolean;
155
+ error?: string;
156
+ }>;
157
+ }
158
+
159
+ type Dialect = "sqlite" | "postgres";
160
+ interface DatabaseResult {
161
+ db: any;
162
+ dialect: Dialect;
163
+ genId: () => string;
164
+ }
165
+ declare function createDatabase(): Promise<DatabaseResult>;
166
+ declare function runMigrations(_db: any, _dialect?: Dialect): Promise<void>;
167
+ declare function seedDefaultRoles(db: any): Promise<void>;
168
+
169
+ export { type Dialect, DrizzleAdapter, PostgresAuthAdapter, collectionToDrizzleSchema, createDatabase, createDrizzleAdapter, fieldToDrizzleType, runMigrations, seedDefaultRoles };
@@ -0,0 +1,7 @@
1
+ import { F as Field } from '../types-euTszc-1.cjs';
2
+ export { A as ALL_FIELD_TYPES, t as ActionField, a as ArrayField, B as BaseField, b as Block, c as BlockAdmin, d as BlockImage, e as BlocksField, u as ButtonField, v as COMPLEX_FIELD_TYPES, C as CheckboxField, f as CodeField, g as CollapsibleField, h as ColorField, D as DateField, i as DeclarativeCondition, E as EmailField, j as FieldAdmin, k as FieldType, G as GroupField, H as Hook, I as IconField, l as ImageField, J as JSONField, L as LAYOUT_FIELD_TYPES, w as ListField, M as MarkdownField, N as NumberField, x as PRIMITIVE_FIELD_TYPES, P as PasswordField, y as RELATIONAL_FIELD_TYPES, R as RadioField, m as RelationshipField, n as RichTextBlock, o as RichTextField, p as RowField, S as SecretField, q as SelectField, T as TabsField, r as TextField, z as TextFieldVariant, s as TextareaField, U as UploadField, V as ValidateOptions, K as createRelationshipFieldConfig, O as isArrayField, Q as isBlocksField, W as isGroupField, X as isIconField, Y as isImageField, Z as isLayoutField, _ as isNumberField, $ as isRelationshipField, a0 as isRichTextField, a1 as isSelectField, a2 as isTextField, a3 as isUploadField } from '../types-euTszc-1.cjs';
3
+ export { n as normalizeRichTextValue, r as renderRichText, a as richTextStyles } from '../richtext-DrhORshE.cjs';
4
+
5
+ declare function generateSEOFields(): Field;
6
+
7
+ export { Field, generateSEOFields };
@@ -0,0 +1,7 @@
1
+ import { F as Field } from '../types-euTszc-1.js';
2
+ export { A as ALL_FIELD_TYPES, t as ActionField, a as ArrayField, B as BaseField, b as Block, c as BlockAdmin, d as BlockImage, e as BlocksField, u as ButtonField, v as COMPLEX_FIELD_TYPES, C as CheckboxField, f as CodeField, g as CollapsibleField, h as ColorField, D as DateField, i as DeclarativeCondition, E as EmailField, j as FieldAdmin, k as FieldType, G as GroupField, H as Hook, I as IconField, l as ImageField, J as JSONField, L as LAYOUT_FIELD_TYPES, w as ListField, M as MarkdownField, N as NumberField, x as PRIMITIVE_FIELD_TYPES, P as PasswordField, y as RELATIONAL_FIELD_TYPES, R as RadioField, m as RelationshipField, n as RichTextBlock, o as RichTextField, p as RowField, S as SecretField, q as SelectField, T as TabsField, r as TextField, z as TextFieldVariant, s as TextareaField, U as UploadField, V as ValidateOptions, K as createRelationshipFieldConfig, O as isArrayField, Q as isBlocksField, W as isGroupField, X as isIconField, Y as isImageField, Z as isLayoutField, _ as isNumberField, $ as isRelationshipField, a0 as isRichTextField, a1 as isSelectField, a2 as isTextField, a3 as isUploadField } from '../types-euTszc-1.js';
3
+ export { n as normalizeRichTextValue, r as renderRichText, a as richTextStyles } from '../richtext-DrhORshE.js';
4
+
5
+ declare function generateSEOFields(): Field;
6
+
7
+ export { Field, generateSEOFields };
@@ -0,0 +1,57 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ export { printSchema } from 'graphql';
3
+ import { B as BaseAdapter, j as User, R as Request } from '../types-BcZiluXL.cjs';
4
+ import { R as Registry } from '../index-DNy8jbA2.cjs';
5
+ import '../types-euTszc-1.cjs';
6
+ import 'zod';
7
+
8
+ interface LoaderOptions {
9
+ db: BaseAdapter;
10
+ tenantId?: string;
11
+ user?: User;
12
+ }
13
+ declare class RelationLoader {
14
+ private db;
15
+ private tenantId?;
16
+ private user?;
17
+ private caches;
18
+ private pending;
19
+ private waiting;
20
+ private flushScheduled;
21
+ constructor(opts: LoaderOptions);
22
+ private getCacheKey;
23
+ load(collection: string, id: string): Promise<any | undefined>;
24
+ flushAll(): Promise<void>;
25
+ resolveOne(collection: string, id: string): any | undefined;
26
+ }
27
+ interface GraphQLContext {
28
+ db: BaseAdapter;
29
+ registry: Registry;
30
+ user?: User;
31
+ req?: Request;
32
+ tenantId?: string;
33
+ apiKey?: any;
34
+ relationLoader: RelationLoader;
35
+ }
36
+ declare function depthLimit(maxDepth: number): (validationContext: any) => {
37
+ Field(): void;
38
+ leaveField(): void;
39
+ };
40
+ interface GraphQLSchemaOptions {
41
+ registry: Registry;
42
+ db: BaseAdapter;
43
+ user?: User;
44
+ req?: Request;
45
+ tenantId?: string;
46
+ apiKey?: any;
47
+ settings?: Record<string, any>;
48
+ }
49
+ declare function buildGraphQLSchema(options: GraphQLSchemaOptions): GraphQLSchema;
50
+ declare function createGraphQLSchema(registry: Registry, db: BaseAdapter, options?: {
51
+ user?: User;
52
+ req?: Request;
53
+ tenantId?: string;
54
+ apiKey?: any;
55
+ }): GraphQLSchema;
56
+
57
+ export { type GraphQLContext, type GraphQLSchemaOptions, RelationLoader, buildGraphQLSchema, createGraphQLSchema, depthLimit };
@@ -0,0 +1,57 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ export { printSchema } from 'graphql';
3
+ import { B as BaseAdapter, j as User, R as Request } from '../types-Dc8VAPhF.js';
4
+ import { R as Registry } from '../index-DVDMEql7.js';
5
+ import '../types-euTszc-1.js';
6
+ import 'zod';
7
+
8
+ interface LoaderOptions {
9
+ db: BaseAdapter;
10
+ tenantId?: string;
11
+ user?: User;
12
+ }
13
+ declare class RelationLoader {
14
+ private db;
15
+ private tenantId?;
16
+ private user?;
17
+ private caches;
18
+ private pending;
19
+ private waiting;
20
+ private flushScheduled;
21
+ constructor(opts: LoaderOptions);
22
+ private getCacheKey;
23
+ load(collection: string, id: string): Promise<any | undefined>;
24
+ flushAll(): Promise<void>;
25
+ resolveOne(collection: string, id: string): any | undefined;
26
+ }
27
+ interface GraphQLContext {
28
+ db: BaseAdapter;
29
+ registry: Registry;
30
+ user?: User;
31
+ req?: Request;
32
+ tenantId?: string;
33
+ apiKey?: any;
34
+ relationLoader: RelationLoader;
35
+ }
36
+ declare function depthLimit(maxDepth: number): (validationContext: any) => {
37
+ Field(): void;
38
+ leaveField(): void;
39
+ };
40
+ interface GraphQLSchemaOptions {
41
+ registry: Registry;
42
+ db: BaseAdapter;
43
+ user?: User;
44
+ req?: Request;
45
+ tenantId?: string;
46
+ apiKey?: any;
47
+ settings?: Record<string, any>;
48
+ }
49
+ declare function buildGraphQLSchema(options: GraphQLSchemaOptions): GraphQLSchema;
50
+ declare function createGraphQLSchema(registry: Registry, db: BaseAdapter, options?: {
51
+ user?: User;
52
+ req?: Request;
53
+ tenantId?: string;
54
+ apiKey?: any;
55
+ }): GraphQLSchema;
56
+
57
+ export { type GraphQLContext, type GraphQLSchemaOptions, RelationLoader, buildGraphQLSchema, createGraphQLSchema, depthLimit };
@@ -0,0 +1,86 @@
1
+ type StylingMode = 'css' | 'tailwind' | 'css-in-js' | 'styled-components' | 'vanilla-extract';
2
+ interface StylingConfig {
3
+ mode: StylingMode;
4
+ theme?: ThemeConfig;
5
+ customProperties?: Record<string, string>;
6
+ }
7
+ interface ThemeConfig {
8
+ colors?: ThemeColors;
9
+ fonts?: ThemeFonts;
10
+ spacing?: ThemeSpacing;
11
+ borderRadius?: ThemeBorderRadius;
12
+ shadows?: ThemeShadows;
13
+ breakpoints?: Record<string, string>;
14
+ }
15
+ interface ThemeColors {
16
+ primary?: string;
17
+ secondary?: string;
18
+ accent?: string;
19
+ background?: string;
20
+ surface?: string;
21
+ text?: string;
22
+ textMuted?: string;
23
+ border?: string;
24
+ error?: string;
25
+ warning?: string;
26
+ success?: string;
27
+ info?: string;
28
+ }
29
+ interface ThemeFonts {
30
+ sans?: string;
31
+ serif?: string;
32
+ mono?: string;
33
+ }
34
+ interface ThemeSpacing {
35
+ xs?: string;
36
+ sm?: string;
37
+ md?: string;
38
+ lg?: string;
39
+ xl?: string;
40
+ '2xl'?: string;
41
+ '3xl'?: string;
42
+ '4xl'?: string;
43
+ }
44
+ interface ThemeBorderRadius {
45
+ sm?: string;
46
+ md?: string;
47
+ lg?: string;
48
+ xl?: string;
49
+ full?: string;
50
+ }
51
+ interface ThemeShadows {
52
+ sm?: string;
53
+ md?: string;
54
+ lg?: string;
55
+ xl?: string;
56
+ }
57
+ declare class CSSGenerator {
58
+ private config;
59
+ private css;
60
+ constructor(config: StylingConfig);
61
+ addRule(selector: string, properties: Record<string, string>): this;
62
+ addMediaQuery(breakpoint: string, rules: string[]): this;
63
+ generate(): string;
64
+ }
65
+ declare function generateTailwindConfig(theme: ThemeConfig): Record<string, any>;
66
+ declare const defaultLightTheme: ThemeConfig;
67
+ declare const defaultDarkTheme: ThemeConfig;
68
+ declare const ecommerce2026Theme: ThemeConfig;
69
+ declare function generateCSSVariables(theme: ThemeConfig): string;
70
+ interface AdminStylingConfig {
71
+ mode: StylingMode;
72
+ theme?: ThemeConfig;
73
+ customStyles?: string;
74
+ componentOverrides?: Record<string, Record<string, string>>;
75
+ }
76
+ declare function createAdminStyling(config: AdminStylingConfig): string;
77
+ interface FieldStyling {
78
+ wrapper?: Record<string, string>;
79
+ label?: Record<string, string>;
80
+ input?: Record<string, string>;
81
+ error?: Record<string, string>;
82
+ description?: Record<string, string>;
83
+ }
84
+ declare const defaultFieldStyling: Record<string, FieldStyling>;
85
+
86
+ export { type AdminStylingConfig as A, CSSGenerator as C, type FieldStyling as F, type StylingConfig as S, type ThemeBorderRadius as T, type StylingMode as a, type ThemeColors as b, type ThemeConfig as c, type ThemeFonts as d, type ThemeShadows as e, type ThemeSpacing as f, createAdminStyling as g, defaultDarkTheme as h, defaultFieldStyling as i, defaultLightTheme as j, ecommerce2026Theme as k, generateCSSVariables as l, generateTailwindConfig as m };
@@ -0,0 +1,86 @@
1
+ type StylingMode = 'css' | 'tailwind' | 'css-in-js' | 'styled-components' | 'vanilla-extract';
2
+ interface StylingConfig {
3
+ mode: StylingMode;
4
+ theme?: ThemeConfig;
5
+ customProperties?: Record<string, string>;
6
+ }
7
+ interface ThemeConfig {
8
+ colors?: ThemeColors;
9
+ fonts?: ThemeFonts;
10
+ spacing?: ThemeSpacing;
11
+ borderRadius?: ThemeBorderRadius;
12
+ shadows?: ThemeShadows;
13
+ breakpoints?: Record<string, string>;
14
+ }
15
+ interface ThemeColors {
16
+ primary?: string;
17
+ secondary?: string;
18
+ accent?: string;
19
+ background?: string;
20
+ surface?: string;
21
+ text?: string;
22
+ textMuted?: string;
23
+ border?: string;
24
+ error?: string;
25
+ warning?: string;
26
+ success?: string;
27
+ info?: string;
28
+ }
29
+ interface ThemeFonts {
30
+ sans?: string;
31
+ serif?: string;
32
+ mono?: string;
33
+ }
34
+ interface ThemeSpacing {
35
+ xs?: string;
36
+ sm?: string;
37
+ md?: string;
38
+ lg?: string;
39
+ xl?: string;
40
+ '2xl'?: string;
41
+ '3xl'?: string;
42
+ '4xl'?: string;
43
+ }
44
+ interface ThemeBorderRadius {
45
+ sm?: string;
46
+ md?: string;
47
+ lg?: string;
48
+ xl?: string;
49
+ full?: string;
50
+ }
51
+ interface ThemeShadows {
52
+ sm?: string;
53
+ md?: string;
54
+ lg?: string;
55
+ xl?: string;
56
+ }
57
+ declare class CSSGenerator {
58
+ private config;
59
+ private css;
60
+ constructor(config: StylingConfig);
61
+ addRule(selector: string, properties: Record<string, string>): this;
62
+ addMediaQuery(breakpoint: string, rules: string[]): this;
63
+ generate(): string;
64
+ }
65
+ declare function generateTailwindConfig(theme: ThemeConfig): Record<string, any>;
66
+ declare const defaultLightTheme: ThemeConfig;
67
+ declare const defaultDarkTheme: ThemeConfig;
68
+ declare const ecommerce2026Theme: ThemeConfig;
69
+ declare function generateCSSVariables(theme: ThemeConfig): string;
70
+ interface AdminStylingConfig {
71
+ mode: StylingMode;
72
+ theme?: ThemeConfig;
73
+ customStyles?: string;
74
+ componentOverrides?: Record<string, Record<string, string>>;
75
+ }
76
+ declare function createAdminStyling(config: AdminStylingConfig): string;
77
+ interface FieldStyling {
78
+ wrapper?: Record<string, string>;
79
+ label?: Record<string, string>;
80
+ input?: Record<string, string>;
81
+ error?: Record<string, string>;
82
+ description?: Record<string, string>;
83
+ }
84
+ declare const defaultFieldStyling: Record<string, FieldStyling>;
85
+
86
+ export { type AdminStylingConfig as A, CSSGenerator as C, type FieldStyling as F, type StylingConfig as S, type ThemeBorderRadius as T, type StylingMode as a, type ThemeColors as b, type ThemeConfig as c, type ThemeFonts as d, type ThemeShadows as e, type ThemeSpacing as f, createAdminStyling as g, defaultDarkTheme as h, defaultFieldStyling as i, defaultLightTheme as j, ecommerce2026Theme as k, generateCSSVariables as l, generateTailwindConfig as m };