@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.
- package/README.md +1 -1
- package/dist/WebhookService-ByrpAI4d.d.ts +143 -0
- package/dist/WebhookService-i-Kl3dvf.d.cts +143 -0
- package/dist/api-handler-graphql.d.cts +6 -0
- package/dist/api-handler-graphql.d.ts +6 -0
- package/dist/api-handler-trpc.d.cts +5 -0
- package/dist/api-handler-trpc.d.ts +5 -0
- package/dist/api-handler.d.cts +7 -0
- package/dist/api-handler.d.ts +7 -0
- package/dist/base-iyJTfH-3.d.cts +74 -0
- package/dist/base-oUSURe4_.d.ts +74 -0
- package/dist/cli/index.cjs +0 -0
- package/dist/cli/index.d.cts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/client.d.cts +12 -0
- package/dist/client.d.ts +12 -0
- package/dist/drizzle/index.d.cts +169 -0
- package/dist/drizzle/index.d.ts +169 -0
- package/dist/fields/index.d.cts +7 -0
- package/dist/fields/index.d.ts +7 -0
- package/dist/graphql/index.d.cts +57 -0
- package/dist/graphql/index.d.ts +57 -0
- package/dist/index-Bz9JqRGI.d.cts +86 -0
- package/dist/index-Bz9JqRGI.d.ts +86 -0
- package/dist/index-DNy8jbA2.d.cts +282 -0
- package/dist/index-DVDMEql7.d.ts +282 -0
- package/dist/index.d.cts +1246 -0
- package/dist/index.d.ts +1246 -0
- package/dist/integration.d.cts +14 -0
- package/dist/integration.d.ts +14 -0
- package/dist/mongodb/index.d.cts +134 -0
- package/dist/mongodb/index.d.ts +134 -0
- package/dist/rest/index.d.cts +56 -0
- package/dist/rest/index.d.ts +56 -0
- package/dist/richtext-DrhORshE.d.cts +5 -0
- package/dist/richtext-DrhORshE.d.ts +5 -0
- package/dist/templates/index.d.cts +107 -0
- package/dist/templates/index.d.ts +107 -0
- package/dist/trpc/index.d.cts +142 -0
- package/dist/trpc/index.d.ts +142 -0
- package/dist/types-BcZiluXL.d.cts +569 -0
- package/dist/types-CpjuXbe7.d.cts +150 -0
- package/dist/types-CpjuXbe7.d.ts +150 -0
- package/dist/types-Dc8VAPhF.d.ts +569 -0
- package/dist/types-euTszc-1.d.cts +294 -0
- package/dist/types-euTszc-1.d.ts +294 -0
- package/dist/ws/index.d.cts +88 -0
- package/dist/ws/index.d.ts +88 -0
- package/package.json +22 -25
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AstroIntegration } from 'astro';
|
|
2
|
+
|
|
3
|
+
interface KyroIntegrationOptions {
|
|
4
|
+
configPath?: string;
|
|
5
|
+
apiPath?: string;
|
|
6
|
+
adminPath?: string;
|
|
7
|
+
admin?: boolean;
|
|
8
|
+
enableGraphQL?: boolean;
|
|
9
|
+
enableTRPC?: boolean;
|
|
10
|
+
enableWebSocket?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function kyro(options?: KyroIntegrationOptions): AstroIntegration;
|
|
13
|
+
|
|
14
|
+
export { type KyroIntegrationOptions, kyro as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AstroIntegration } from 'astro';
|
|
2
|
+
|
|
3
|
+
interface KyroIntegrationOptions {
|
|
4
|
+
configPath?: string;
|
|
5
|
+
apiPath?: string;
|
|
6
|
+
adminPath?: string;
|
|
7
|
+
admin?: boolean;
|
|
8
|
+
enableGraphQL?: boolean;
|
|
9
|
+
enableTRPC?: boolean;
|
|
10
|
+
enableWebSocket?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function kyro(options?: KyroIntegrationOptions): AstroIntegration;
|
|
13
|
+
|
|
14
|
+
export { type KyroIntegrationOptions, kyro as default };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { A as AbstractBaseAdapter } from '../base-iyJTfH-3.cjs';
|
|
2
|
+
import { 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 } from '../types-BcZiluXL.cjs';
|
|
3
|
+
import { A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, e as AuditLogFilter, d as AuditLog } from '../types-CpjuXbe7.cjs';
|
|
4
|
+
import '../types-euTszc-1.cjs';
|
|
5
|
+
|
|
6
|
+
declare class MongoDBAdapter extends AbstractBaseAdapter {
|
|
7
|
+
dialect: "mongodb";
|
|
8
|
+
client: any;
|
|
9
|
+
db: any;
|
|
10
|
+
private database;
|
|
11
|
+
private connectionString?;
|
|
12
|
+
constructor(options: {
|
|
13
|
+
client?: any;
|
|
14
|
+
database?: string;
|
|
15
|
+
connectionString?: string;
|
|
16
|
+
});
|
|
17
|
+
connect(): Promise<void>;
|
|
18
|
+
disconnect(): Promise<void>;
|
|
19
|
+
private getMongoCollection;
|
|
20
|
+
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
21
|
+
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
22
|
+
create<T>(args: CreateArgs): Promise<T>;
|
|
23
|
+
update<T>(args: UpdateArgs): Promise<T>;
|
|
24
|
+
delete<T>(args: DeleteArgs): Promise<T>;
|
|
25
|
+
count(args: {
|
|
26
|
+
collection: string;
|
|
27
|
+
where?: Record<string, any>;
|
|
28
|
+
tenantId?: string;
|
|
29
|
+
}): Promise<number>;
|
|
30
|
+
findOne(args: {
|
|
31
|
+
collection: string;
|
|
32
|
+
where: Record<string, any>;
|
|
33
|
+
tenantId?: string;
|
|
34
|
+
draft?: boolean;
|
|
35
|
+
}): Promise<any>;
|
|
36
|
+
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
37
|
+
findVersionByID(args: {
|
|
38
|
+
collection: string;
|
|
39
|
+
versionId: string;
|
|
40
|
+
tenantId?: string;
|
|
41
|
+
}): Promise<VersionRecord | null>;
|
|
42
|
+
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
43
|
+
updateLatestVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
44
|
+
deleteVersions(args: {
|
|
45
|
+
collection: string;
|
|
46
|
+
documentId: string;
|
|
47
|
+
keepLatest?: number;
|
|
48
|
+
tenantId?: string;
|
|
49
|
+
}): Promise<void>;
|
|
50
|
+
migrate?(): Promise<void>;
|
|
51
|
+
private getCollectionConfig;
|
|
52
|
+
private buildFilter;
|
|
53
|
+
private buildProjection;
|
|
54
|
+
private processResult;
|
|
55
|
+
private generateId;
|
|
56
|
+
}
|
|
57
|
+
declare function createMongoDBAdapter(options: {
|
|
58
|
+
client?: any;
|
|
59
|
+
database?: string;
|
|
60
|
+
connectionString?: string;
|
|
61
|
+
}): MongoDBAdapter;
|
|
62
|
+
|
|
63
|
+
interface MongoDBAuthAdapterOptions {
|
|
64
|
+
db: any | (() => any);
|
|
65
|
+
collectionPrefix?: string;
|
|
66
|
+
sessionTTL?: number;
|
|
67
|
+
refreshTokenTTL?: number;
|
|
68
|
+
}
|
|
69
|
+
declare class MongoDBAuthAdapter implements AuthAdapter {
|
|
70
|
+
private db;
|
|
71
|
+
private prefix;
|
|
72
|
+
private sessionTTL;
|
|
73
|
+
private refreshTokenTTL;
|
|
74
|
+
private indexesEnsured;
|
|
75
|
+
constructor(options: MongoDBAuthAdapterOptions);
|
|
76
|
+
private getDatabase;
|
|
77
|
+
private col;
|
|
78
|
+
connect(): Promise<void>;
|
|
79
|
+
disconnect(): Promise<void>;
|
|
80
|
+
private ensureIndexes;
|
|
81
|
+
createUser(data: {
|
|
82
|
+
email: string;
|
|
83
|
+
password: string;
|
|
84
|
+
name?: string;
|
|
85
|
+
role?: UserRole;
|
|
86
|
+
avatar?: string;
|
|
87
|
+
tenantId?: string;
|
|
88
|
+
}): Promise<AuthUser>;
|
|
89
|
+
findUserByEmail(email: string): Promise<AuthUser | null>;
|
|
90
|
+
findUserById(id: string): Promise<AuthUser | null>;
|
|
91
|
+
updateUser(id: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
|
|
92
|
+
deleteUser(id: string): Promise<boolean>;
|
|
93
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
94
|
+
hashPassword(password: string): Promise<string>;
|
|
95
|
+
createSession(userId: string, data?: {
|
|
96
|
+
ipAddress?: string;
|
|
97
|
+
userAgent?: string;
|
|
98
|
+
}): Promise<Session>;
|
|
99
|
+
findSessionByToken(token: string): Promise<Session | null>;
|
|
100
|
+
findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
|
|
101
|
+
deleteSession(sessionId: string): Promise<boolean>;
|
|
102
|
+
deleteUserSessions(userId: string): Promise<number>;
|
|
103
|
+
hasAnyUsers(): Promise<boolean>;
|
|
104
|
+
addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
|
|
105
|
+
getPasswordHistory(userId: string, count?: number): Promise<string[]>;
|
|
106
|
+
isPasswordInHistory(password: string, userId: string, historyCount?: number): Promise<boolean>;
|
|
107
|
+
findAuditLogs(filter: AuditLogFilter): Promise<{
|
|
108
|
+
logs: AuditLog[];
|
|
109
|
+
total: number;
|
|
110
|
+
}>;
|
|
111
|
+
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
112
|
+
private docToAuthUser;
|
|
113
|
+
private docToSession;
|
|
114
|
+
createEmailVerificationToken(userId: string): Promise<{
|
|
115
|
+
token: string;
|
|
116
|
+
expiresAt: Date;
|
|
117
|
+
}>;
|
|
118
|
+
verifyEmailToken(token: string): Promise<{
|
|
119
|
+
success: boolean;
|
|
120
|
+
userId?: string;
|
|
121
|
+
error?: string;
|
|
122
|
+
}>;
|
|
123
|
+
createPasswordResetToken(email: string): Promise<{
|
|
124
|
+
token: string;
|
|
125
|
+
expiresAt: Date;
|
|
126
|
+
error?: string;
|
|
127
|
+
}>;
|
|
128
|
+
resetPasswordWithToken(token: string, newPassword: string): Promise<{
|
|
129
|
+
success: boolean;
|
|
130
|
+
error?: string;
|
|
131
|
+
}>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export { MongoDBAdapter, MongoDBAuthAdapter, createMongoDBAdapter };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { A as AbstractBaseAdapter } from '../base-oUSURe4_.js';
|
|
2
|
+
import { 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 } from '../types-Dc8VAPhF.js';
|
|
3
|
+
import { A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, e as AuditLogFilter, d as AuditLog } from '../types-CpjuXbe7.js';
|
|
4
|
+
import '../types-euTszc-1.js';
|
|
5
|
+
|
|
6
|
+
declare class MongoDBAdapter extends AbstractBaseAdapter {
|
|
7
|
+
dialect: "mongodb";
|
|
8
|
+
client: any;
|
|
9
|
+
db: any;
|
|
10
|
+
private database;
|
|
11
|
+
private connectionString?;
|
|
12
|
+
constructor(options: {
|
|
13
|
+
client?: any;
|
|
14
|
+
database?: string;
|
|
15
|
+
connectionString?: string;
|
|
16
|
+
});
|
|
17
|
+
connect(): Promise<void>;
|
|
18
|
+
disconnect(): Promise<void>;
|
|
19
|
+
private getMongoCollection;
|
|
20
|
+
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
21
|
+
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
22
|
+
create<T>(args: CreateArgs): Promise<T>;
|
|
23
|
+
update<T>(args: UpdateArgs): Promise<T>;
|
|
24
|
+
delete<T>(args: DeleteArgs): Promise<T>;
|
|
25
|
+
count(args: {
|
|
26
|
+
collection: string;
|
|
27
|
+
where?: Record<string, any>;
|
|
28
|
+
tenantId?: string;
|
|
29
|
+
}): Promise<number>;
|
|
30
|
+
findOne(args: {
|
|
31
|
+
collection: string;
|
|
32
|
+
where: Record<string, any>;
|
|
33
|
+
tenantId?: string;
|
|
34
|
+
draft?: boolean;
|
|
35
|
+
}): Promise<any>;
|
|
36
|
+
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
37
|
+
findVersionByID(args: {
|
|
38
|
+
collection: string;
|
|
39
|
+
versionId: string;
|
|
40
|
+
tenantId?: string;
|
|
41
|
+
}): Promise<VersionRecord | null>;
|
|
42
|
+
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
43
|
+
updateLatestVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
44
|
+
deleteVersions(args: {
|
|
45
|
+
collection: string;
|
|
46
|
+
documentId: string;
|
|
47
|
+
keepLatest?: number;
|
|
48
|
+
tenantId?: string;
|
|
49
|
+
}): Promise<void>;
|
|
50
|
+
migrate?(): Promise<void>;
|
|
51
|
+
private getCollectionConfig;
|
|
52
|
+
private buildFilter;
|
|
53
|
+
private buildProjection;
|
|
54
|
+
private processResult;
|
|
55
|
+
private generateId;
|
|
56
|
+
}
|
|
57
|
+
declare function createMongoDBAdapter(options: {
|
|
58
|
+
client?: any;
|
|
59
|
+
database?: string;
|
|
60
|
+
connectionString?: string;
|
|
61
|
+
}): MongoDBAdapter;
|
|
62
|
+
|
|
63
|
+
interface MongoDBAuthAdapterOptions {
|
|
64
|
+
db: any | (() => any);
|
|
65
|
+
collectionPrefix?: string;
|
|
66
|
+
sessionTTL?: number;
|
|
67
|
+
refreshTokenTTL?: number;
|
|
68
|
+
}
|
|
69
|
+
declare class MongoDBAuthAdapter implements AuthAdapter {
|
|
70
|
+
private db;
|
|
71
|
+
private prefix;
|
|
72
|
+
private sessionTTL;
|
|
73
|
+
private refreshTokenTTL;
|
|
74
|
+
private indexesEnsured;
|
|
75
|
+
constructor(options: MongoDBAuthAdapterOptions);
|
|
76
|
+
private getDatabase;
|
|
77
|
+
private col;
|
|
78
|
+
connect(): Promise<void>;
|
|
79
|
+
disconnect(): Promise<void>;
|
|
80
|
+
private ensureIndexes;
|
|
81
|
+
createUser(data: {
|
|
82
|
+
email: string;
|
|
83
|
+
password: string;
|
|
84
|
+
name?: string;
|
|
85
|
+
role?: UserRole;
|
|
86
|
+
avatar?: string;
|
|
87
|
+
tenantId?: string;
|
|
88
|
+
}): Promise<AuthUser>;
|
|
89
|
+
findUserByEmail(email: string): Promise<AuthUser | null>;
|
|
90
|
+
findUserById(id: string): Promise<AuthUser | null>;
|
|
91
|
+
updateUser(id: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
|
|
92
|
+
deleteUser(id: string): Promise<boolean>;
|
|
93
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
94
|
+
hashPassword(password: string): Promise<string>;
|
|
95
|
+
createSession(userId: string, data?: {
|
|
96
|
+
ipAddress?: string;
|
|
97
|
+
userAgent?: string;
|
|
98
|
+
}): Promise<Session>;
|
|
99
|
+
findSessionByToken(token: string): Promise<Session | null>;
|
|
100
|
+
findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
|
|
101
|
+
deleteSession(sessionId: string): Promise<boolean>;
|
|
102
|
+
deleteUserSessions(userId: string): Promise<number>;
|
|
103
|
+
hasAnyUsers(): Promise<boolean>;
|
|
104
|
+
addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
|
|
105
|
+
getPasswordHistory(userId: string, count?: number): Promise<string[]>;
|
|
106
|
+
isPasswordInHistory(password: string, userId: string, historyCount?: number): Promise<boolean>;
|
|
107
|
+
findAuditLogs(filter: AuditLogFilter): Promise<{
|
|
108
|
+
logs: AuditLog[];
|
|
109
|
+
total: number;
|
|
110
|
+
}>;
|
|
111
|
+
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
112
|
+
private docToAuthUser;
|
|
113
|
+
private docToSession;
|
|
114
|
+
createEmailVerificationToken(userId: string): Promise<{
|
|
115
|
+
token: string;
|
|
116
|
+
expiresAt: Date;
|
|
117
|
+
}>;
|
|
118
|
+
verifyEmailToken(token: string): Promise<{
|
|
119
|
+
success: boolean;
|
|
120
|
+
userId?: string;
|
|
121
|
+
error?: string;
|
|
122
|
+
}>;
|
|
123
|
+
createPasswordResetToken(email: string): Promise<{
|
|
124
|
+
token: string;
|
|
125
|
+
expiresAt: Date;
|
|
126
|
+
error?: string;
|
|
127
|
+
}>;
|
|
128
|
+
resetPasswordWithToken(token: string, newPassword: string): Promise<{
|
|
129
|
+
success: boolean;
|
|
130
|
+
error?: string;
|
|
131
|
+
}>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export { MongoDBAdapter, MongoDBAuthAdapter, createMongoDBAdapter };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import { B as BaseAdapter, j as User } from '../types-BcZiluXL.cjs';
|
|
3
|
+
import { R as Registry } from '../index-DNy8jbA2.cjs';
|
|
4
|
+
import { j as createWebhookService } from '../WebhookService-i-Kl3dvf.cjs';
|
|
5
|
+
import '../types-euTszc-1.cjs';
|
|
6
|
+
import 'zod';
|
|
7
|
+
|
|
8
|
+
interface HonoAppOptions {
|
|
9
|
+
registry: Registry;
|
|
10
|
+
db: BaseAdapter;
|
|
11
|
+
authSecret?: string;
|
|
12
|
+
authAdapter?: any;
|
|
13
|
+
checkSession?: boolean;
|
|
14
|
+
user?: User;
|
|
15
|
+
req?: any;
|
|
16
|
+
tenantId?: string;
|
|
17
|
+
cors?: {
|
|
18
|
+
origins?: string[];
|
|
19
|
+
credentials?: boolean;
|
|
20
|
+
};
|
|
21
|
+
webhookService?: ReturnType<typeof createWebhookService>;
|
|
22
|
+
settings?: {
|
|
23
|
+
access?: {
|
|
24
|
+
enablePublicAccess?: boolean;
|
|
25
|
+
defaultCollectionAccess?: string;
|
|
26
|
+
apiAccess?: {
|
|
27
|
+
graphqlEnabled?: boolean;
|
|
28
|
+
trpcEnabled?: boolean;
|
|
29
|
+
websocketEnabled?: boolean;
|
|
30
|
+
requireAuth?: boolean;
|
|
31
|
+
cors?: {
|
|
32
|
+
allowedOrigins?: string[] | string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
rateLimiting?: {
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
maxRequests?: number;
|
|
38
|
+
windowMs?: number;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
declare function createHonoApp(options: HonoAppOptions): Hono;
|
|
44
|
+
declare function createRESTAPI(registry: Registry, db: BaseAdapter, options?: {
|
|
45
|
+
authSecret?: string;
|
|
46
|
+
user?: User;
|
|
47
|
+
req?: Request;
|
|
48
|
+
tenantId?: string;
|
|
49
|
+
cors?: {
|
|
50
|
+
origins?: string[];
|
|
51
|
+
credentials?: boolean;
|
|
52
|
+
};
|
|
53
|
+
webhookService?: ReturnType<typeof createWebhookService>;
|
|
54
|
+
}): Hono;
|
|
55
|
+
|
|
56
|
+
export { type HonoAppOptions, createHonoApp, createRESTAPI };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import { B as BaseAdapter, j as User } from '../types-Dc8VAPhF.js';
|
|
3
|
+
import { R as Registry } from '../index-DVDMEql7.js';
|
|
4
|
+
import { j as createWebhookService } from '../WebhookService-ByrpAI4d.js';
|
|
5
|
+
import '../types-euTszc-1.js';
|
|
6
|
+
import 'zod';
|
|
7
|
+
|
|
8
|
+
interface HonoAppOptions {
|
|
9
|
+
registry: Registry;
|
|
10
|
+
db: BaseAdapter;
|
|
11
|
+
authSecret?: string;
|
|
12
|
+
authAdapter?: any;
|
|
13
|
+
checkSession?: boolean;
|
|
14
|
+
user?: User;
|
|
15
|
+
req?: any;
|
|
16
|
+
tenantId?: string;
|
|
17
|
+
cors?: {
|
|
18
|
+
origins?: string[];
|
|
19
|
+
credentials?: boolean;
|
|
20
|
+
};
|
|
21
|
+
webhookService?: ReturnType<typeof createWebhookService>;
|
|
22
|
+
settings?: {
|
|
23
|
+
access?: {
|
|
24
|
+
enablePublicAccess?: boolean;
|
|
25
|
+
defaultCollectionAccess?: string;
|
|
26
|
+
apiAccess?: {
|
|
27
|
+
graphqlEnabled?: boolean;
|
|
28
|
+
trpcEnabled?: boolean;
|
|
29
|
+
websocketEnabled?: boolean;
|
|
30
|
+
requireAuth?: boolean;
|
|
31
|
+
cors?: {
|
|
32
|
+
allowedOrigins?: string[] | string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
rateLimiting?: {
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
maxRequests?: number;
|
|
38
|
+
windowMs?: number;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
declare function createHonoApp(options: HonoAppOptions): Hono;
|
|
44
|
+
declare function createRESTAPI(registry: Registry, db: BaseAdapter, options?: {
|
|
45
|
+
authSecret?: string;
|
|
46
|
+
user?: User;
|
|
47
|
+
req?: Request;
|
|
48
|
+
tenantId?: string;
|
|
49
|
+
cors?: {
|
|
50
|
+
origins?: string[];
|
|
51
|
+
credentials?: boolean;
|
|
52
|
+
};
|
|
53
|
+
webhookService?: ReturnType<typeof createWebhookService>;
|
|
54
|
+
}): Hono;
|
|
55
|
+
|
|
56
|
+
export { type HonoAppOptions, createHonoApp, createRESTAPI };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { G as GlobalConfig, C as CollectionConfig } from '../types-BcZiluXL.cjs';
|
|
2
|
+
import '../types-euTszc-1.cjs';
|
|
3
|
+
|
|
4
|
+
declare const minimalCollections: Record<string, any>;
|
|
5
|
+
|
|
6
|
+
declare const starterCollections: Record<string, any>;
|
|
7
|
+
|
|
8
|
+
declare const blogCollections: Record<string, any>;
|
|
9
|
+
declare const blogGlobals: GlobalConfig[];
|
|
10
|
+
|
|
11
|
+
declare const ecommerceCollections: Record<string, any>;
|
|
12
|
+
declare const ecommerceGlobals: GlobalConfig[];
|
|
13
|
+
|
|
14
|
+
declare const kitchenSinkCollections: Record<string, CollectionConfig>;
|
|
15
|
+
|
|
16
|
+
declare const authCollections: {
|
|
17
|
+
users: CollectionConfig;
|
|
18
|
+
audit_logs: CollectionConfig;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
declare const mediaCollection: CollectionConfig;
|
|
22
|
+
declare const mediaCollections: CollectionConfig[];
|
|
23
|
+
|
|
24
|
+
declare const menuCollection: CollectionConfig;
|
|
25
|
+
declare const menuCollections: Record<string, CollectionConfig>;
|
|
26
|
+
|
|
27
|
+
declare const postsCollection: CollectionConfig;
|
|
28
|
+
declare const postsCollections: Record<string, CollectionConfig>;
|
|
29
|
+
|
|
30
|
+
declare const pageCollection: CollectionConfig;
|
|
31
|
+
declare const pageCollections: Record<string, CollectionConfig>;
|
|
32
|
+
|
|
33
|
+
declare const categoriesCollection: CollectionConfig;
|
|
34
|
+
declare const categoriesCollections: Record<string, CollectionConfig>;
|
|
35
|
+
declare const productCategoriesCollection: CollectionConfig;
|
|
36
|
+
declare const productCategoriesCollections: Record<string, CollectionConfig>;
|
|
37
|
+
|
|
38
|
+
declare const productsCollection: CollectionConfig;
|
|
39
|
+
declare const productsCollections: Record<string, CollectionConfig>;
|
|
40
|
+
|
|
41
|
+
declare const customersCollection: CollectionConfig;
|
|
42
|
+
declare const customersCollections: Record<string, CollectionConfig>;
|
|
43
|
+
|
|
44
|
+
declare const ordersCollection: CollectionConfig;
|
|
45
|
+
declare const ordersCollections: Record<string, CollectionConfig>;
|
|
46
|
+
|
|
47
|
+
declare const couponsCollection: CollectionConfig;
|
|
48
|
+
declare const couponsCollections: Record<string, CollectionConfig>;
|
|
49
|
+
|
|
50
|
+
declare const formsCollection: CollectionConfig;
|
|
51
|
+
declare const formsCollections: Record<string, CollectionConfig>;
|
|
52
|
+
|
|
53
|
+
declare const formEntriesCollection: CollectionConfig;
|
|
54
|
+
declare const formEntriesCollections: Record<string, CollectionConfig>;
|
|
55
|
+
|
|
56
|
+
declare const reviewsCollection: CollectionConfig;
|
|
57
|
+
declare const reviewsCollections: Record<string, CollectionConfig>;
|
|
58
|
+
|
|
59
|
+
declare const brandsCollection: CollectionConfig;
|
|
60
|
+
declare const brandsCollections: Record<string, CollectionConfig>;
|
|
61
|
+
|
|
62
|
+
declare const siteSettingsGlobal: GlobalConfig;
|
|
63
|
+
|
|
64
|
+
declare const seoSettingsGlobal: GlobalConfig;
|
|
65
|
+
|
|
66
|
+
declare const brandSettingsGlobal: GlobalConfig;
|
|
67
|
+
|
|
68
|
+
declare const emailSettingsGlobal: GlobalConfig;
|
|
69
|
+
|
|
70
|
+
declare const accessSettingsGlobal: GlobalConfig;
|
|
71
|
+
|
|
72
|
+
declare const storeSettingsGlobal: GlobalConfig;
|
|
73
|
+
|
|
74
|
+
declare const shippingSettingsGlobal: GlobalConfig;
|
|
75
|
+
|
|
76
|
+
declare const systemSettingsGlobal: GlobalConfig;
|
|
77
|
+
|
|
78
|
+
declare const storageSettingsGlobal: GlobalConfig;
|
|
79
|
+
|
|
80
|
+
declare const allSettingsGlobals: GlobalConfig[];
|
|
81
|
+
declare const coreSettingsGlobals: GlobalConfig[];
|
|
82
|
+
declare const settingsBySlug: Record<string, GlobalConfig>;
|
|
83
|
+
declare function getSettingsForTemplate(template: "minimal" | "starter" | "blog" | "ecommerce" | "kitchen-sink"): GlobalConfig[];
|
|
84
|
+
|
|
85
|
+
declare const templateCollections: {
|
|
86
|
+
readonly minimal: CollectionConfig[];
|
|
87
|
+
readonly starter: CollectionConfig[];
|
|
88
|
+
readonly blog: CollectionConfig[];
|
|
89
|
+
readonly ecommerce: CollectionConfig[];
|
|
90
|
+
readonly "kitchen-sink": CollectionConfig[];
|
|
91
|
+
};
|
|
92
|
+
interface TemplateConfig {
|
|
93
|
+
collections?: CollectionConfig[];
|
|
94
|
+
globals?: GlobalConfig[];
|
|
95
|
+
}
|
|
96
|
+
type TemplateType = "minimal" | "starter" | "blog" | "ecommerce" | "kitchen-sink";
|
|
97
|
+
interface CreateTemplateConfigOptions extends TemplateConfig {
|
|
98
|
+
template?: TemplateType;
|
|
99
|
+
collections?: CollectionConfig[];
|
|
100
|
+
globals?: GlobalConfig[];
|
|
101
|
+
includeMedia?: boolean;
|
|
102
|
+
includeSettings?: "all" | "core" | "site" | "seo" | "social" | "email" | "storage" | "access" | "store" | "shipping" | "system" | string[];
|
|
103
|
+
excludeSettings?: string[];
|
|
104
|
+
}
|
|
105
|
+
declare function createTemplateConfig(options: CreateTemplateConfigOptions): TemplateConfig;
|
|
106
|
+
|
|
107
|
+
export { type CreateTemplateConfigOptions, type TemplateConfig, type TemplateType, accessSettingsGlobal, allSettingsGlobals, authCollections, blogCollections, blogGlobals, brandSettingsGlobal, brandsCollection, brandsCollections, categoriesCollection, categoriesCollections, coreSettingsGlobals, couponsCollection, couponsCollections, createTemplateConfig, customersCollection, customersCollections, ecommerceCollections, ecommerceGlobals, emailSettingsGlobal, formEntriesCollection, formEntriesCollections, formsCollection, formsCollections, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, menuCollection, menuCollections, minimalCollections, ordersCollection, ordersCollections, pageCollection, pageCollections, postsCollection, postsCollections, productCategoriesCollection, productCategoriesCollections, productsCollection, productsCollections, reviewsCollection, reviewsCollections, seoSettingsGlobal, settingsBySlug, shippingSettingsGlobal, siteSettingsGlobal, starterCollections, storageSettingsGlobal, storeSettingsGlobal, systemSettingsGlobal, templateCollections };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { G as GlobalConfig, C as CollectionConfig } from '../types-Dc8VAPhF.js';
|
|
2
|
+
import '../types-euTszc-1.js';
|
|
3
|
+
|
|
4
|
+
declare const minimalCollections: Record<string, any>;
|
|
5
|
+
|
|
6
|
+
declare const starterCollections: Record<string, any>;
|
|
7
|
+
|
|
8
|
+
declare const blogCollections: Record<string, any>;
|
|
9
|
+
declare const blogGlobals: GlobalConfig[];
|
|
10
|
+
|
|
11
|
+
declare const ecommerceCollections: Record<string, any>;
|
|
12
|
+
declare const ecommerceGlobals: GlobalConfig[];
|
|
13
|
+
|
|
14
|
+
declare const kitchenSinkCollections: Record<string, CollectionConfig>;
|
|
15
|
+
|
|
16
|
+
declare const authCollections: {
|
|
17
|
+
users: CollectionConfig;
|
|
18
|
+
audit_logs: CollectionConfig;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
declare const mediaCollection: CollectionConfig;
|
|
22
|
+
declare const mediaCollections: CollectionConfig[];
|
|
23
|
+
|
|
24
|
+
declare const menuCollection: CollectionConfig;
|
|
25
|
+
declare const menuCollections: Record<string, CollectionConfig>;
|
|
26
|
+
|
|
27
|
+
declare const postsCollection: CollectionConfig;
|
|
28
|
+
declare const postsCollections: Record<string, CollectionConfig>;
|
|
29
|
+
|
|
30
|
+
declare const pageCollection: CollectionConfig;
|
|
31
|
+
declare const pageCollections: Record<string, CollectionConfig>;
|
|
32
|
+
|
|
33
|
+
declare const categoriesCollection: CollectionConfig;
|
|
34
|
+
declare const categoriesCollections: Record<string, CollectionConfig>;
|
|
35
|
+
declare const productCategoriesCollection: CollectionConfig;
|
|
36
|
+
declare const productCategoriesCollections: Record<string, CollectionConfig>;
|
|
37
|
+
|
|
38
|
+
declare const productsCollection: CollectionConfig;
|
|
39
|
+
declare const productsCollections: Record<string, CollectionConfig>;
|
|
40
|
+
|
|
41
|
+
declare const customersCollection: CollectionConfig;
|
|
42
|
+
declare const customersCollections: Record<string, CollectionConfig>;
|
|
43
|
+
|
|
44
|
+
declare const ordersCollection: CollectionConfig;
|
|
45
|
+
declare const ordersCollections: Record<string, CollectionConfig>;
|
|
46
|
+
|
|
47
|
+
declare const couponsCollection: CollectionConfig;
|
|
48
|
+
declare const couponsCollections: Record<string, CollectionConfig>;
|
|
49
|
+
|
|
50
|
+
declare const formsCollection: CollectionConfig;
|
|
51
|
+
declare const formsCollections: Record<string, CollectionConfig>;
|
|
52
|
+
|
|
53
|
+
declare const formEntriesCollection: CollectionConfig;
|
|
54
|
+
declare const formEntriesCollections: Record<string, CollectionConfig>;
|
|
55
|
+
|
|
56
|
+
declare const reviewsCollection: CollectionConfig;
|
|
57
|
+
declare const reviewsCollections: Record<string, CollectionConfig>;
|
|
58
|
+
|
|
59
|
+
declare const brandsCollection: CollectionConfig;
|
|
60
|
+
declare const brandsCollections: Record<string, CollectionConfig>;
|
|
61
|
+
|
|
62
|
+
declare const siteSettingsGlobal: GlobalConfig;
|
|
63
|
+
|
|
64
|
+
declare const seoSettingsGlobal: GlobalConfig;
|
|
65
|
+
|
|
66
|
+
declare const brandSettingsGlobal: GlobalConfig;
|
|
67
|
+
|
|
68
|
+
declare const emailSettingsGlobal: GlobalConfig;
|
|
69
|
+
|
|
70
|
+
declare const accessSettingsGlobal: GlobalConfig;
|
|
71
|
+
|
|
72
|
+
declare const storeSettingsGlobal: GlobalConfig;
|
|
73
|
+
|
|
74
|
+
declare const shippingSettingsGlobal: GlobalConfig;
|
|
75
|
+
|
|
76
|
+
declare const systemSettingsGlobal: GlobalConfig;
|
|
77
|
+
|
|
78
|
+
declare const storageSettingsGlobal: GlobalConfig;
|
|
79
|
+
|
|
80
|
+
declare const allSettingsGlobals: GlobalConfig[];
|
|
81
|
+
declare const coreSettingsGlobals: GlobalConfig[];
|
|
82
|
+
declare const settingsBySlug: Record<string, GlobalConfig>;
|
|
83
|
+
declare function getSettingsForTemplate(template: "minimal" | "starter" | "blog" | "ecommerce" | "kitchen-sink"): GlobalConfig[];
|
|
84
|
+
|
|
85
|
+
declare const templateCollections: {
|
|
86
|
+
readonly minimal: CollectionConfig[];
|
|
87
|
+
readonly starter: CollectionConfig[];
|
|
88
|
+
readonly blog: CollectionConfig[];
|
|
89
|
+
readonly ecommerce: CollectionConfig[];
|
|
90
|
+
readonly "kitchen-sink": CollectionConfig[];
|
|
91
|
+
};
|
|
92
|
+
interface TemplateConfig {
|
|
93
|
+
collections?: CollectionConfig[];
|
|
94
|
+
globals?: GlobalConfig[];
|
|
95
|
+
}
|
|
96
|
+
type TemplateType = "minimal" | "starter" | "blog" | "ecommerce" | "kitchen-sink";
|
|
97
|
+
interface CreateTemplateConfigOptions extends TemplateConfig {
|
|
98
|
+
template?: TemplateType;
|
|
99
|
+
collections?: CollectionConfig[];
|
|
100
|
+
globals?: GlobalConfig[];
|
|
101
|
+
includeMedia?: boolean;
|
|
102
|
+
includeSettings?: "all" | "core" | "site" | "seo" | "social" | "email" | "storage" | "access" | "store" | "shipping" | "system" | string[];
|
|
103
|
+
excludeSettings?: string[];
|
|
104
|
+
}
|
|
105
|
+
declare function createTemplateConfig(options: CreateTemplateConfigOptions): TemplateConfig;
|
|
106
|
+
|
|
107
|
+
export { type CreateTemplateConfigOptions, type TemplateConfig, type TemplateType, accessSettingsGlobal, allSettingsGlobals, authCollections, blogCollections, blogGlobals, brandSettingsGlobal, brandsCollection, brandsCollections, categoriesCollection, categoriesCollections, coreSettingsGlobals, couponsCollection, couponsCollections, createTemplateConfig, customersCollection, customersCollections, ecommerceCollections, ecommerceGlobals, emailSettingsGlobal, formEntriesCollection, formEntriesCollections, formsCollection, formsCollections, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, menuCollection, menuCollections, minimalCollections, ordersCollection, ordersCollections, pageCollection, pageCollections, postsCollection, postsCollections, productCategoriesCollection, productCategoriesCollections, productsCollection, productsCollections, reviewsCollection, reviewsCollections, seoSettingsGlobal, settingsBySlug, shippingSettingsGlobal, siteSettingsGlobal, starterCollections, storageSettingsGlobal, storeSettingsGlobal, systemSettingsGlobal, templateCollections };
|