@kyro-cms/core 0.3.5 → 0.4.0
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 +3 -3
- package/dist/api-handler.cjs +5 -5
- package/dist/api-handler.js +4 -4
- package/dist/{chunk-X3CU27OO.cjs → chunk-3FW6WVVP.cjs} +2 -17
- package/dist/chunk-3FW6WVVP.cjs.map +1 -0
- package/dist/{chunk-R4C4O4SE.cjs → chunk-3ZZPZYCM.cjs} +36 -61
- package/dist/chunk-3ZZPZYCM.cjs.map +1 -0
- package/dist/{chunk-Y3TM7WH7.js → chunk-C4JJEE42.js} +36 -61
- package/dist/chunk-C4JJEE42.js.map +1 -0
- package/dist/{chunk-2UOI5MUC.cjs → chunk-FWGHXRRI.cjs} +4 -4
- package/dist/{chunk-2UOI5MUC.cjs.map → chunk-FWGHXRRI.cjs.map} +1 -1
- package/dist/{chunk-DE7OQOMD.cjs → chunk-M4GFA2UQ.cjs} +19 -19
- package/dist/chunk-M4GFA2UQ.cjs.map +1 -0
- package/dist/{chunk-4UD44U4Z.js → chunk-OJBK3JYF.js} +18 -18
- package/dist/chunk-OJBK3JYF.js.map +1 -0
- package/dist/{chunk-5FTY2DLG.js → chunk-SAMZQVC2.js} +3 -3
- package/dist/{chunk-5FTY2DLG.js.map → chunk-SAMZQVC2.js.map} +1 -1
- package/dist/{chunk-RGIQKTZ7.js → chunk-YMG55RSX.js} +4 -18
- package/dist/chunk-YMG55RSX.js.map +1 -0
- package/dist/drizzle/index.cjs +10 -10
- package/dist/drizzle/index.js +2 -2
- package/dist/index.cjs +48 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -13
- package/dist/index.js.map +1 -1
- package/dist/rest/index.cjs +4 -4
- package/dist/rest/index.js +2 -2
- package/package.json +2 -14
- package/dist/WebhookService-118ZTFis.d.ts +0 -112
- package/dist/WebhookService-AefJfqX0.d.cts +0 -112
- package/dist/api-handler.d.cts +0 -9
- package/dist/api-handler.d.ts +0 -9
- package/dist/base-DvvNqnM-.d.cts +0 -73
- package/dist/base-eVegJ_Pr.d.ts +0 -73
- package/dist/chunk-4UD44U4Z.js.map +0 -1
- package/dist/chunk-DE7OQOMD.cjs.map +0 -1
- package/dist/chunk-R4C4O4SE.cjs.map +0 -1
- package/dist/chunk-RGIQKTZ7.js.map +0 -1
- package/dist/chunk-X3CU27OO.cjs.map +0 -1
- package/dist/chunk-Y3TM7WH7.js.map +0 -1
- package/dist/cli/index.d.cts +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/client.d.cts +0 -12
- package/dist/client.d.ts +0 -12
- package/dist/drizzle/index.d.cts +0 -135
- package/dist/drizzle/index.d.ts +0 -135
- package/dist/fields/index.d.cts +0 -27
- package/dist/fields/index.d.ts +0 -27
- package/dist/graphql/index.d.cts +0 -22
- package/dist/graphql/index.d.ts +0 -22
- package/dist/index-Bz9JqRGI.d.cts +0 -86
- package/dist/index-Bz9JqRGI.d.ts +0 -86
- package/dist/index-CLp-DRKA.d.ts +0 -64
- package/dist/index-DfO7G4kN.d.cts +0 -64
- package/dist/index.d.cts +0 -1363
- package/dist/index.d.ts +0 -1363
- package/dist/integration.d.cts +0 -27
- package/dist/integration.d.ts +0 -27
- package/dist/mongodb/index.d.cts +0 -63
- package/dist/mongodb/index.d.ts +0 -63
- package/dist/mysql-media-AI6YK767.cjs +0 -48
- package/dist/mysql-media-AI6YK767.cjs.map +0 -1
- package/dist/mysql-media-CDZUS7YX.js +0 -45
- package/dist/mysql-media-CDZUS7YX.js.map +0 -1
- package/dist/rest/index.d.cts +0 -57
- package/dist/rest/index.d.ts +0 -57
- package/dist/templates/index.d.cts +0 -59
- package/dist/templates/index.d.ts +0 -59
- package/dist/trpc/index.d.cts +0 -136
- package/dist/trpc/index.d.ts +0 -136
- package/dist/types-BnTm7oJG.d.cts +0 -130
- package/dist/types-BnTm7oJG.d.ts +0 -130
- package/dist/types-Bs1up4yP.d.ts +0 -461
- package/dist/types-J3R9nVsZ.d.cts +0 -461
- package/dist/types-VtjUxIMp.d.cts +0 -246
- package/dist/types-VtjUxIMp.d.ts +0 -246
- package/dist/ws/index.d.cts +0 -88
- package/dist/ws/index.d.ts +0 -88
package/dist/types-Bs1up4yP.d.ts
DELETED
|
@@ -1,461 +0,0 @@
|
|
|
1
|
-
import { F as Field } from './types-VtjUxIMp.js';
|
|
2
|
-
|
|
3
|
-
interface Request {
|
|
4
|
-
body?: any;
|
|
5
|
-
headers: Record<string, string>;
|
|
6
|
-
method?: string;
|
|
7
|
-
url?: string;
|
|
8
|
-
cookies?: Record<string, string>;
|
|
9
|
-
query?: Record<string, any>;
|
|
10
|
-
}
|
|
11
|
-
interface User {
|
|
12
|
-
id: string;
|
|
13
|
-
email: string;
|
|
14
|
-
role: string;
|
|
15
|
-
tenantID?: string;
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}
|
|
18
|
-
interface HookArgs<T = any> {
|
|
19
|
-
collection?: string;
|
|
20
|
-
global?: string;
|
|
21
|
-
data?: T;
|
|
22
|
-
originalDoc?: T;
|
|
23
|
-
doc?: T;
|
|
24
|
-
req: Request;
|
|
25
|
-
user?: User;
|
|
26
|
-
operation: 'create' | 'read' | 'update' | 'delete';
|
|
27
|
-
tenantID?: string;
|
|
28
|
-
field?: string;
|
|
29
|
-
siblingData?: Record<string, any>;
|
|
30
|
-
value?: any;
|
|
31
|
-
previousValue?: any;
|
|
32
|
-
context?: Record<string, any>;
|
|
33
|
-
}
|
|
34
|
-
type Hook<T = any> = (args: HookArgs<T>) => Promise<T | void> | T | void;
|
|
35
|
-
interface CollectionHooks {
|
|
36
|
-
beforeValidate?: Hook[];
|
|
37
|
-
beforeChange?: Hook[];
|
|
38
|
-
afterChange?: Hook[];
|
|
39
|
-
beforeRead?: Hook[];
|
|
40
|
-
afterRead?: Hook[];
|
|
41
|
-
beforeDelete?: Hook[];
|
|
42
|
-
afterDelete?: Hook[];
|
|
43
|
-
beforeLogin?: Hook[];
|
|
44
|
-
afterLogin?: Hook[];
|
|
45
|
-
afterLogout?: Hook[];
|
|
46
|
-
afterRefresh?: Hook[];
|
|
47
|
-
afterForgotPassword?: Hook[];
|
|
48
|
-
}
|
|
49
|
-
interface FieldHooks {
|
|
50
|
-
beforeValidate?: Hook[];
|
|
51
|
-
beforeChange?: Hook[];
|
|
52
|
-
afterChange?: Hook[];
|
|
53
|
-
afterRead?: Hook[];
|
|
54
|
-
}
|
|
55
|
-
interface GlobalHooks {
|
|
56
|
-
beforeValidate?: Hook[];
|
|
57
|
-
beforeChange?: Hook[];
|
|
58
|
-
afterChange?: Hook[];
|
|
59
|
-
beforeRead?: Hook[];
|
|
60
|
-
afterRead?: Hook[];
|
|
61
|
-
}
|
|
62
|
-
declare function runHooks(hooks: Hook[], args: HookArgs): Promise<any>;
|
|
63
|
-
declare function runFieldHooks(hooks: Hook[], args: HookArgs): Promise<any>;
|
|
64
|
-
|
|
65
|
-
interface WhereClause {
|
|
66
|
-
[field: string]: any;
|
|
67
|
-
}
|
|
68
|
-
interface AccessArgs {
|
|
69
|
-
req: Request;
|
|
70
|
-
user?: User;
|
|
71
|
-
data?: any;
|
|
72
|
-
doc?: any;
|
|
73
|
-
id?: string;
|
|
74
|
-
tenantID?: string;
|
|
75
|
-
context?: Record<string, any>;
|
|
76
|
-
}
|
|
77
|
-
type AccessControl = boolean | ((args: AccessArgs) => Promise<boolean | WhereClause> | boolean | WhereClause);
|
|
78
|
-
interface CollectionAccess {
|
|
79
|
-
create?: AccessControl;
|
|
80
|
-
read?: AccessControl;
|
|
81
|
-
update?: AccessControl;
|
|
82
|
-
delete?: AccessControl;
|
|
83
|
-
admin?: AccessControl;
|
|
84
|
-
unlock?: AccessControl;
|
|
85
|
-
readVersions?: AccessControl;
|
|
86
|
-
}
|
|
87
|
-
interface GlobalAccess {
|
|
88
|
-
read?: AccessControl;
|
|
89
|
-
update?: AccessControl;
|
|
90
|
-
}
|
|
91
|
-
interface FieldAccess {
|
|
92
|
-
create?: AccessControl;
|
|
93
|
-
read?: AccessControl;
|
|
94
|
-
update?: AccessControl;
|
|
95
|
-
}
|
|
96
|
-
declare function evaluateAccess(access: AccessControl, args: AccessArgs): Promise<boolean | WhereClause>;
|
|
97
|
-
declare function mergeWhereClauses(...whereClauses: (WhereClause | boolean | undefined)[]): WhereClause;
|
|
98
|
-
declare function getWhereClause(access: AccessControl, args: AccessArgs): Promise<WhereClause | undefined>;
|
|
99
|
-
|
|
100
|
-
interface AdminConfig {
|
|
101
|
-
useAsTitle?: string;
|
|
102
|
-
defaultColumns?: string[];
|
|
103
|
-
hidden?: boolean;
|
|
104
|
-
description?: string;
|
|
105
|
-
hideAPIURL?: boolean;
|
|
106
|
-
group?: string;
|
|
107
|
-
icon?: string;
|
|
108
|
-
preview?: (doc: any, options: {
|
|
109
|
-
req: any;
|
|
110
|
-
}) => string;
|
|
111
|
-
disableDuplicate?: boolean;
|
|
112
|
-
pagination?: {
|
|
113
|
-
defaultLimit?: number;
|
|
114
|
-
limits?: number[];
|
|
115
|
-
};
|
|
116
|
-
layout?: "split" | "single";
|
|
117
|
-
}
|
|
118
|
-
interface UploadConfig {
|
|
119
|
-
staticDir?: string;
|
|
120
|
-
staticURL?: string;
|
|
121
|
-
mimeTypes?: string[];
|
|
122
|
-
fileSize?: number;
|
|
123
|
-
imageSizes?: ImageSize[];
|
|
124
|
-
crop?: boolean;
|
|
125
|
-
focalPoint?: boolean;
|
|
126
|
-
formatOptions?: {
|
|
127
|
-
format: "webp" | "png" | "jpg";
|
|
128
|
-
options?: Record<string, any>;
|
|
129
|
-
};
|
|
130
|
-
resizeOptions?: Record<string, any>;
|
|
131
|
-
adminThumbnail?: string;
|
|
132
|
-
}
|
|
133
|
-
interface ImageSize {
|
|
134
|
-
name: string;
|
|
135
|
-
width?: number;
|
|
136
|
-
height?: number;
|
|
137
|
-
crop?: string;
|
|
138
|
-
position?: string;
|
|
139
|
-
formatOptions?: {
|
|
140
|
-
format: "webp" | "png" | "jpg";
|
|
141
|
-
};
|
|
142
|
-
generateImageName?: (doc: any) => string;
|
|
143
|
-
}
|
|
144
|
-
interface VersionConfig {
|
|
145
|
-
maxPerDoc?: number;
|
|
146
|
-
drafts?: boolean;
|
|
147
|
-
retainDeleted?: boolean;
|
|
148
|
-
}
|
|
149
|
-
type DocumentStatus = 'draft' | 'published' | 'archived';
|
|
150
|
-
interface AuthConfig {
|
|
151
|
-
tokenExpiration?: number;
|
|
152
|
-
verify?: boolean | {
|
|
153
|
-
generateEmailHTML?: (args: any) => string;
|
|
154
|
-
};
|
|
155
|
-
maxLoginAttempts?: number;
|
|
156
|
-
lockTime?: number;
|
|
157
|
-
cookies?: {
|
|
158
|
-
secure?: boolean;
|
|
159
|
-
sameSite?: "strict" | "lax" | "none";
|
|
160
|
-
domain?: string;
|
|
161
|
-
};
|
|
162
|
-
forgotPassword?: {
|
|
163
|
-
generateEmailHTML?: (args: any) => string;
|
|
164
|
-
generateEmailSubject?: (args: any) => string;
|
|
165
|
-
};
|
|
166
|
-
strategies?: Array<{
|
|
167
|
-
name: string;
|
|
168
|
-
authenticate: (args: any) => Promise<any>;
|
|
169
|
-
}>;
|
|
170
|
-
}
|
|
171
|
-
interface CollectionConfig {
|
|
172
|
-
slug: string;
|
|
173
|
-
label?: string;
|
|
174
|
-
labelPlural?: string;
|
|
175
|
-
singularLabel?: string;
|
|
176
|
-
admin?: AdminConfig;
|
|
177
|
-
fields: Field[];
|
|
178
|
-
access?: CollectionAccess;
|
|
179
|
-
hooks?: CollectionHooks;
|
|
180
|
-
timestamps?: boolean;
|
|
181
|
-
tenantScoped?: boolean;
|
|
182
|
-
tenantField?: string;
|
|
183
|
-
upload?: UploadConfig;
|
|
184
|
-
versions?: VersionConfig;
|
|
185
|
-
auth?: boolean | AuthConfig;
|
|
186
|
-
graphQL?: {
|
|
187
|
-
singularName?: string;
|
|
188
|
-
pluralName?: string;
|
|
189
|
-
};
|
|
190
|
-
indexes?: Array<{
|
|
191
|
-
fields: Record<string, number | "text">;
|
|
192
|
-
options?: Record<string, any>;
|
|
193
|
-
}>;
|
|
194
|
-
custom?: Record<string, any>;
|
|
195
|
-
tabs?: Array<{
|
|
196
|
-
label: string;
|
|
197
|
-
fields: Field[];
|
|
198
|
-
name?: string;
|
|
199
|
-
}>;
|
|
200
|
-
}
|
|
201
|
-
interface GlobalConfig {
|
|
202
|
-
slug: string;
|
|
203
|
-
label?: string;
|
|
204
|
-
admin?: AdminConfig;
|
|
205
|
-
fields: Field[];
|
|
206
|
-
access?: GlobalAccess;
|
|
207
|
-
hooks?: GlobalHooks;
|
|
208
|
-
versions?: VersionConfig;
|
|
209
|
-
graphQL?: {
|
|
210
|
-
name?: string;
|
|
211
|
-
};
|
|
212
|
-
typescript?: {
|
|
213
|
-
interface?: string;
|
|
214
|
-
};
|
|
215
|
-
custom?: Record<string, any>;
|
|
216
|
-
tabs?: Array<{
|
|
217
|
-
label: string;
|
|
218
|
-
fields: Field[];
|
|
219
|
-
name?: string;
|
|
220
|
-
}>;
|
|
221
|
-
}
|
|
222
|
-
interface FindArgs {
|
|
223
|
-
collection: string;
|
|
224
|
-
where?: Record<string, any>;
|
|
225
|
-
sort?: string;
|
|
226
|
-
limit?: number;
|
|
227
|
-
page?: number;
|
|
228
|
-
depth?: number;
|
|
229
|
-
tenantID?: string;
|
|
230
|
-
select?: string[];
|
|
231
|
-
user?: any;
|
|
232
|
-
context?: Record<string, any>;
|
|
233
|
-
overrideAccess?: boolean;
|
|
234
|
-
/** If true, returns draft docs (admin view). If false/omitted, only published docs are returned (public API). */
|
|
235
|
-
draft?: boolean;
|
|
236
|
-
}
|
|
237
|
-
interface FindByIDArgs {
|
|
238
|
-
collection: string;
|
|
239
|
-
id: string;
|
|
240
|
-
depth?: number;
|
|
241
|
-
tenantID?: string;
|
|
242
|
-
select?: string[];
|
|
243
|
-
user?: any;
|
|
244
|
-
context?: Record<string, any>;
|
|
245
|
-
overrideAccess?: boolean;
|
|
246
|
-
/** If true, returns document regardless of status (admin view). */
|
|
247
|
-
draft?: boolean;
|
|
248
|
-
}
|
|
249
|
-
interface CreateArgs {
|
|
250
|
-
collection: string;
|
|
251
|
-
data: Record<string, any>;
|
|
252
|
-
depth?: number;
|
|
253
|
-
tenantID?: string;
|
|
254
|
-
select?: string[];
|
|
255
|
-
user?: any;
|
|
256
|
-
context?: Record<string, any>;
|
|
257
|
-
overrideAccess?: boolean;
|
|
258
|
-
}
|
|
259
|
-
interface UpdateArgs {
|
|
260
|
-
collection: string;
|
|
261
|
-
id: string;
|
|
262
|
-
data: Record<string, any>;
|
|
263
|
-
depth?: number;
|
|
264
|
-
tenantID?: string;
|
|
265
|
-
select?: string[];
|
|
266
|
-
user?: any;
|
|
267
|
-
context?: Record<string, any>;
|
|
268
|
-
overrideAccess?: boolean;
|
|
269
|
-
}
|
|
270
|
-
interface DeleteArgs {
|
|
271
|
-
collection: string;
|
|
272
|
-
id: string;
|
|
273
|
-
tenantID?: string;
|
|
274
|
-
user?: any;
|
|
275
|
-
context?: Record<string, any>;
|
|
276
|
-
overrideAccess?: boolean;
|
|
277
|
-
}
|
|
278
|
-
interface FindResult<T = any> {
|
|
279
|
-
docs: T[];
|
|
280
|
-
totalDocs: number;
|
|
281
|
-
limit: number;
|
|
282
|
-
totalPages: number;
|
|
283
|
-
page: number;
|
|
284
|
-
pagingCounter: number;
|
|
285
|
-
hasPrevPage: boolean;
|
|
286
|
-
hasNextPage: boolean;
|
|
287
|
-
prevPage: number | null;
|
|
288
|
-
nextPage: number | null;
|
|
289
|
-
}
|
|
290
|
-
interface DraftSnapshot<T = Record<string, any>> {
|
|
291
|
-
id: string;
|
|
292
|
-
collection: string;
|
|
293
|
-
documentId: string;
|
|
294
|
-
tenantID?: string;
|
|
295
|
-
data: T;
|
|
296
|
-
baseUpdatedAt?: string | null;
|
|
297
|
-
draftUpdatedAt: string;
|
|
298
|
-
createdAt: string;
|
|
299
|
-
updatedAt: string;
|
|
300
|
-
}
|
|
301
|
-
interface DraftFindArgs {
|
|
302
|
-
collection: string;
|
|
303
|
-
documentId: string;
|
|
304
|
-
tenantID?: string;
|
|
305
|
-
}
|
|
306
|
-
interface DraftUpsertArgs<T = Record<string, any>> extends DraftFindArgs {
|
|
307
|
-
data: T;
|
|
308
|
-
baseUpdatedAt?: string | null;
|
|
309
|
-
draftUpdatedAt?: string;
|
|
310
|
-
}
|
|
311
|
-
interface DraftDeleteArgs extends DraftFindArgs {
|
|
312
|
-
}
|
|
313
|
-
interface CreateResult<T = any> {
|
|
314
|
-
doc: T;
|
|
315
|
-
errors?: Array<{
|
|
316
|
-
field: string;
|
|
317
|
-
message: string;
|
|
318
|
-
}>;
|
|
319
|
-
}
|
|
320
|
-
interface VersionRecord<T = Record<string, any>> {
|
|
321
|
-
id: string;
|
|
322
|
-
collection: string;
|
|
323
|
-
documentId: string;
|
|
324
|
-
version: number;
|
|
325
|
-
status: DocumentStatus;
|
|
326
|
-
data: T;
|
|
327
|
-
createdBy?: string;
|
|
328
|
-
createdAt: string;
|
|
329
|
-
updatedAt: string;
|
|
330
|
-
publishedAt?: string | null;
|
|
331
|
-
changeDescription?: string;
|
|
332
|
-
}
|
|
333
|
-
interface CreateVersionArgs<T = Record<string, any>> {
|
|
334
|
-
collection: string;
|
|
335
|
-
documentId: string;
|
|
336
|
-
data: T;
|
|
337
|
-
status: DocumentStatus;
|
|
338
|
-
createdBy?: string;
|
|
339
|
-
changeDescription?: string;
|
|
340
|
-
tenantID?: string;
|
|
341
|
-
}
|
|
342
|
-
interface FindVersionsArgs {
|
|
343
|
-
collection: string;
|
|
344
|
-
documentId: string;
|
|
345
|
-
tenantID?: string;
|
|
346
|
-
limit?: number;
|
|
347
|
-
page?: number;
|
|
348
|
-
sort?: string;
|
|
349
|
-
}
|
|
350
|
-
interface BaseAdapter {
|
|
351
|
-
init(collections: CollectionConfig[], globals: GlobalConfig[]): Promise<void>;
|
|
352
|
-
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
353
|
-
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
354
|
-
create<T>(args: CreateArgs): Promise<T>;
|
|
355
|
-
update<T>(args: UpdateArgs): Promise<T>;
|
|
356
|
-
delete<T>(args: DeleteArgs): Promise<T>;
|
|
357
|
-
count(args: {
|
|
358
|
-
collection: string;
|
|
359
|
-
where?: Record<string, any>;
|
|
360
|
-
tenantID?: string;
|
|
361
|
-
}): Promise<number>;
|
|
362
|
-
findOne(args: {
|
|
363
|
-
collection: string;
|
|
364
|
-
where: Record<string, any>;
|
|
365
|
-
tenantID?: string;
|
|
366
|
-
draft?: boolean;
|
|
367
|
-
}): Promise<any>;
|
|
368
|
-
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
369
|
-
findVersionByID(args: {
|
|
370
|
-
collection: string;
|
|
371
|
-
versionId: string;
|
|
372
|
-
tenantID?: string;
|
|
373
|
-
}): Promise<VersionRecord | null>;
|
|
374
|
-
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
375
|
-
deleteVersions(args: {
|
|
376
|
-
collection: string;
|
|
377
|
-
documentId: string;
|
|
378
|
-
keepLatest?: number;
|
|
379
|
-
tenantID?: string;
|
|
380
|
-
}): Promise<void>;
|
|
381
|
-
findDraft<T = Record<string, any>>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
|
|
382
|
-
upsertDraft<T = Record<string, any>>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
|
|
383
|
-
deleteDraft(args: DraftDeleteArgs): Promise<void>;
|
|
384
|
-
migrate?(): Promise<void>;
|
|
385
|
-
rollback?(): Promise<void>;
|
|
386
|
-
connect(): Promise<void>;
|
|
387
|
-
disconnect(): Promise<void>;
|
|
388
|
-
transaction?<T>(fn: (tx: any) => Promise<T>): Promise<T>;
|
|
389
|
-
}
|
|
390
|
-
interface AdapterConfig {
|
|
391
|
-
type: "drizzle" | "mongodb";
|
|
392
|
-
client: any;
|
|
393
|
-
schema?: any;
|
|
394
|
-
connectionOptions?: Record<string, any>;
|
|
395
|
-
}
|
|
396
|
-
interface PluginConfig {
|
|
397
|
-
name: string;
|
|
398
|
-
version?: string;
|
|
399
|
-
init?: (kyro: any) => void | Promise<void>;
|
|
400
|
-
extendCollection?: (slug: string, config: CollectionConfig) => CollectionConfig;
|
|
401
|
-
extendGlobal?: (slug: string, config: GlobalConfig) => GlobalConfig;
|
|
402
|
-
hooks?: CollectionHooks;
|
|
403
|
-
fields?: Field[];
|
|
404
|
-
api?: (kyro: any) => any;
|
|
405
|
-
}
|
|
406
|
-
interface KyroConfig {
|
|
407
|
-
collections?: CollectionConfig[];
|
|
408
|
-
globals?: GlobalConfig[];
|
|
409
|
-
adapter: BaseAdapter;
|
|
410
|
-
plugins?: PluginConfig[];
|
|
411
|
-
auth?: boolean | {
|
|
412
|
-
secret?: string;
|
|
413
|
-
tokenExpiration?: number;
|
|
414
|
-
cookie?: {
|
|
415
|
-
secure?: boolean;
|
|
416
|
-
sameSite?: "strict" | "lax" | "none";
|
|
417
|
-
domain?: string;
|
|
418
|
-
};
|
|
419
|
-
checkSession?: boolean;
|
|
420
|
-
};
|
|
421
|
-
authAdapter?: any;
|
|
422
|
-
cors?: {
|
|
423
|
-
origins?: string[];
|
|
424
|
-
credentials?: boolean;
|
|
425
|
-
};
|
|
426
|
-
admin?: {
|
|
427
|
-
meta?: {
|
|
428
|
-
title?: string;
|
|
429
|
-
description?: string;
|
|
430
|
-
ogImage?: string;
|
|
431
|
-
};
|
|
432
|
-
dateFormat?: string;
|
|
433
|
-
avatar?: "default" | "gravatar";
|
|
434
|
-
disable?: boolean;
|
|
435
|
-
indexRoute?: string;
|
|
436
|
-
components?: Record<string, any>;
|
|
437
|
-
};
|
|
438
|
-
upload?: {
|
|
439
|
-
limits?: {
|
|
440
|
-
fileSize?: number;
|
|
441
|
-
};
|
|
442
|
-
};
|
|
443
|
-
graphQL?: {
|
|
444
|
-
maxComplexity?: number;
|
|
445
|
-
disablePlayground?: boolean;
|
|
446
|
-
};
|
|
447
|
-
typescript?: {
|
|
448
|
-
outputFile?: string;
|
|
449
|
-
};
|
|
450
|
-
localization?: {
|
|
451
|
-
locales: string[];
|
|
452
|
-
defaultLocale: string;
|
|
453
|
-
};
|
|
454
|
-
rateLimit?: {
|
|
455
|
-
window?: number;
|
|
456
|
-
max?: number;
|
|
457
|
-
};
|
|
458
|
-
debug?: boolean;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
export { type AdminConfig as A, type BaseAdapter as B, type CollectionConfig as C, type DeleteArgs as D, mergeWhereClauses as E, type FindArgs as F, type GlobalConfig as G, type Hook as H, type ImageSize as I, runFieldHooks as J, type KyroConfig as K, runHooks as L, type PluginConfig as P, type Request as R, type UploadConfig as U, type VersionConfig as V, type WhereClause as W, type AuthConfig as a, type FindResult as b, type FindByIDArgs as c, type CreateArgs as d, type UpdateArgs as e, type FindVersionsArgs as f, type VersionRecord as g, type CreateVersionArgs as h, type DraftFindArgs as i, type DraftSnapshot as j, type DraftUpsertArgs as k, type DraftDeleteArgs as l, type User as m, type AccessArgs as n, type AccessControl as o, type AdapterConfig as p, type CollectionAccess as q, type CollectionHooks as r, type CreateResult as s, type FieldAccess as t, type FieldHooks as u, type GlobalAccess as v, type GlobalHooks as w, type HookArgs as x, evaluateAccess as y, getWhereClause as z };
|