@kyro-cms/core 0.5.4 → 0.5.5
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-118ZTFis.d.ts +112 -0
- package/dist/WebhookService-AefJfqX0.d.cts +112 -0
- package/dist/adapter-BSvBudTG.d.cts +65 -0
- package/dist/adapter-CXGB2Elb.d.ts +65 -0
- package/dist/api-handler.cjs +26 -8
- package/dist/api-handler.cjs.map +1 -1
- package/dist/api-handler.d.cts +9 -0
- package/dist/api-handler.d.ts +9 -0
- package/dist/api-handler.js +25 -7
- package/dist/api-handler.js.map +1 -1
- package/dist/base-DvvNqnM-.d.cts +73 -0
- package/dist/base-eVegJ_Pr.d.ts +73 -0
- package/dist/bootstrap-4MH44YKG.js +6 -0
- package/dist/{bootstrap-PBMMLBQC.js.map → bootstrap-4MH44YKG.js.map} +1 -1
- package/dist/bootstrap-EE6BJZWL.cjs +31 -0
- package/dist/{bootstrap-QN77EVI3.cjs.map → bootstrap-EE6BJZWL.cjs.map} +1 -1
- package/dist/chunk-3YELQL7Z.cjs +4 -0
- package/dist/chunk-3YELQL7Z.cjs.map +1 -0
- package/dist/{chunk-AGAIUDAV.cjs → chunk-55BNRTLW.cjs} +7 -7
- package/dist/chunk-55BNRTLW.cjs.map +1 -0
- package/dist/{chunk-XJ2VYR47.cjs → chunk-5HA5OMFH.cjs} +10 -7
- package/dist/chunk-5HA5OMFH.cjs.map +1 -0
- package/dist/{chunk-C4JJEE42.js → chunk-6WXQRYTW.js} +262 -43
- package/dist/chunk-6WXQRYTW.js.map +1 -0
- package/dist/{chunk-SO25EHOE.js → chunk-AM4JKIPP.js} +180 -77
- package/dist/chunk-AM4JKIPP.js.map +1 -0
- package/dist/{chunk-VSTRLXMQ.cjs → chunk-CKVOU6MX.cjs} +4 -2
- package/dist/chunk-CKVOU6MX.cjs.map +1 -0
- package/dist/chunk-GTGRLD4Y.js +3 -0
- package/dist/chunk-GTGRLD4Y.js.map +1 -0
- package/dist/chunk-MTIRYI7F.cjs +4 -0
- package/dist/chunk-MTIRYI7F.cjs.map +1 -0
- package/dist/{chunk-342BJNBI.js → chunk-QKVA2SOG.js} +300 -6
- package/dist/chunk-QKVA2SOG.js.map +1 -0
- package/dist/chunk-QU2RFFH4.js +3 -0
- package/dist/chunk-QU2RFFH4.js.map +1 -0
- package/dist/{chunk-ATVNYGRQ.js → chunk-QYZKIPSD.js} +7 -18
- package/dist/chunk-QYZKIPSD.js.map +1 -0
- package/dist/{chunk-SYRDCLH7.cjs → chunk-R2YHJN6W.cjs} +184 -81
- package/dist/chunk-R2YHJN6W.cjs.map +1 -0
- package/dist/{chunk-IX3ABYKZ.cjs → chunk-RALQO47U.cjs} +170 -2
- package/dist/chunk-RALQO47U.cjs.map +1 -0
- package/dist/{chunk-EVEJC22G.cjs → chunk-RDRJVCL5.cjs} +37 -5
- package/dist/chunk-RDRJVCL5.cjs.map +1 -0
- package/dist/{chunk-6COM32WF.js → chunk-RP7VZUEL.js} +5 -3
- package/dist/chunk-RP7VZUEL.js.map +1 -0
- package/dist/{chunk-XR5EJS3C.js → chunk-S3FG2NY7.js} +7 -4
- package/dist/chunk-S3FG2NY7.js.map +1 -0
- package/dist/{chunk-WH4Y5MT6.js → chunk-TP5YQFIX.js} +36 -4
- package/dist/chunk-TP5YQFIX.js.map +1 -0
- package/dist/{chunk-DBUYB32X.js → chunk-TVVYZ2TH.js} +171 -3
- package/dist/chunk-TVVYZ2TH.js.map +1 -0
- package/dist/{chunk-GBH6DN5C.cjs → chunk-WBCIEYHC.cjs} +8 -18
- package/dist/chunk-WBCIEYHC.cjs.map +1 -0
- package/dist/{chunk-3ZZPZYCM.cjs → chunk-WVPOPOEQ.cjs} +269 -41
- package/dist/chunk-WVPOPOEQ.cjs.map +1 -0
- package/dist/{chunk-W3KPQX7V.cjs → chunk-XAEBVZTI.cjs} +304 -4
- package/dist/chunk-XAEBVZTI.cjs.map +1 -0
- package/dist/{chunk-Q4DNT7FO.js → chunk-XU7AFF6V.js} +6 -6
- package/dist/chunk-XU7AFF6V.js.map +1 -0
- package/dist/cli/index.cjs +6 -4
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +6 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/client.d.cts +12 -0
- package/dist/client.d.ts +12 -0
- package/dist/drizzle/index.cjs +18 -18
- package/dist/drizzle/index.d.cts +152 -0
- package/dist/drizzle/index.d.ts +152 -0
- package/dist/drizzle/index.js +3 -3
- package/dist/fields/index.d.cts +27 -0
- package/dist/fields/index.d.ts +27 -0
- package/dist/graphql/index.d.cts +22 -0
- package/dist/graphql/index.d.ts +22 -0
- package/dist/index-Bz9JqRGI.d.cts +86 -0
- package/dist/index-Bz9JqRGI.d.ts +86 -0
- package/dist/index-CLp-DRKA.d.ts +64 -0
- package/dist/index-DfO7G4kN.d.cts +64 -0
- package/dist/index.cjs +118 -86
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1368 -0
- package/dist/index.d.ts +1368 -0
- package/dist/index.js +48 -14
- package/dist/index.js.map +1 -1
- package/dist/integration.cjs +2 -2
- package/dist/integration.d.cts +27 -0
- package/dist/integration.d.ts +27 -0
- package/dist/integration.js +1 -1
- package/dist/media-GPPTZ43E.js +4 -0
- package/dist/{media-HOT3O7RW.js.map → media-GPPTZ43E.js.map} +1 -1
- package/dist/media-XNTUFJZR.cjs +17 -0
- package/dist/{media-WKP5AOX2.cjs.map → media-XNTUFJZR.cjs.map} +1 -1
- package/dist/mongodb/index.cjs +12 -3
- package/dist/mongodb/index.d.cts +59 -0
- package/dist/mongodb/index.d.ts +59 -0
- package/dist/mongodb/index.js +2 -1
- package/dist/postgres-auth-adapter-6742WDCF.cjs +14 -0
- package/dist/{postgres-auth-adapter-Z463NYJZ.cjs.map → postgres-auth-adapter-6742WDCF.cjs.map} +1 -1
- package/dist/postgres-auth-adapter-B65BULNS.js +5 -0
- package/dist/{postgres-auth-adapter-7F3ECO7I.js.map → postgres-auth-adapter-B65BULNS.js.map} +1 -1
- package/dist/rest/index.cjs +9 -5
- package/dist/rest/index.d.cts +57 -0
- package/dist/rest/index.d.ts +57 -0
- package/dist/rest/index.js +7 -3
- package/dist/{schema-TIYTCIKX.cjs → schema-37SE2F4B.cjs} +5 -5
- package/dist/{schema-TIYTCIKX.cjs.map → schema-37SE2F4B.cjs.map} +1 -1
- package/dist/{schema-6Q4W6AE6.js → schema-5PHL5IVB.js} +3 -3
- package/dist/{schema-6Q4W6AE6.js.map → schema-5PHL5IVB.js.map} +1 -1
- package/dist/templates/index.d.cts +59 -0
- package/dist/templates/index.d.ts +59 -0
- package/dist/trpc/index.d.cts +136 -0
- package/dist/trpc/index.d.ts +136 -0
- package/dist/types-Bs1up4yP.d.ts +461 -0
- package/dist/types-DqN4ckOC.d.cts +130 -0
- package/dist/types-DqN4ckOC.d.ts +130 -0
- package/dist/types-J3R9nVsZ.d.cts +461 -0
- package/dist/types-VtjUxIMp.d.cts +246 -0
- package/dist/types-VtjUxIMp.d.ts +246 -0
- package/dist/ws/index.d.cts +88 -0
- package/dist/ws/index.d.ts +88 -0
- package/package.json +3 -2
- package/dist/bootstrap-PBMMLBQC.js +0 -6
- package/dist/bootstrap-QN77EVI3.cjs +0 -31
- package/dist/chunk-342BJNBI.js.map +0 -1
- package/dist/chunk-3ZZPZYCM.cjs.map +0 -1
- package/dist/chunk-6COM32WF.js.map +0 -1
- package/dist/chunk-7SXPHG3M.cjs +0 -67
- package/dist/chunk-7SXPHG3M.cjs.map +0 -1
- package/dist/chunk-AGAIUDAV.cjs.map +0 -1
- package/dist/chunk-ATVNYGRQ.js.map +0 -1
- package/dist/chunk-C4JJEE42.js.map +0 -1
- package/dist/chunk-DBUYB32X.js.map +0 -1
- package/dist/chunk-EVEJC22G.cjs.map +0 -1
- package/dist/chunk-GBH6DN5C.cjs.map +0 -1
- package/dist/chunk-IX3ABYKZ.cjs.map +0 -1
- package/dist/chunk-L4E76X2K.js +0 -57
- package/dist/chunk-L4E76X2K.js.map +0 -1
- package/dist/chunk-Q4DNT7FO.js.map +0 -1
- package/dist/chunk-SO25EHOE.js.map +0 -1
- package/dist/chunk-SYRDCLH7.cjs.map +0 -1
- package/dist/chunk-VSTRLXMQ.cjs.map +0 -1
- package/dist/chunk-W3KPQX7V.cjs.map +0 -1
- package/dist/chunk-WH4Y5MT6.js.map +0 -1
- package/dist/chunk-XJ2VYR47.cjs.map +0 -1
- package/dist/chunk-XR5EJS3C.js.map +0 -1
- package/dist/media-HOT3O7RW.js +0 -4
- package/dist/media-WKP5AOX2.cjs +0 -17
- package/dist/postgres-auth-adapter-7F3ECO7I.js +0 -5
- package/dist/postgres-auth-adapter-Z463NYJZ.cjs +0 -14
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GraphQLSchema } from 'graphql';
|
|
2
|
+
import { B as BaseAdapter, m as User, R as Request } from '../types-Bs1up4yP.js';
|
|
3
|
+
import { R as Registry } from '../index-CLp-DRKA.js';
|
|
4
|
+
import '../types-VtjUxIMp.js';
|
|
5
|
+
import 'zod';
|
|
6
|
+
|
|
7
|
+
interface GraphQLSchemaOptions {
|
|
8
|
+
registry: Registry;
|
|
9
|
+
db: BaseAdapter;
|
|
10
|
+
user?: User;
|
|
11
|
+
req?: Request;
|
|
12
|
+
tenantID?: string;
|
|
13
|
+
settings?: Record<string, any>;
|
|
14
|
+
}
|
|
15
|
+
declare function buildGraphQLSchema(options: GraphQLSchemaOptions): GraphQLSchema;
|
|
16
|
+
declare function createGraphQLSchema(registry: Registry, db: BaseAdapter, options?: {
|
|
17
|
+
user?: User;
|
|
18
|
+
req?: Request;
|
|
19
|
+
tenantID?: string;
|
|
20
|
+
}): GraphQLSchema;
|
|
21
|
+
|
|
22
|
+
export { type GraphQLSchemaOptions, buildGraphQLSchema, createGraphQLSchema };
|
|
@@ -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 };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { C as CollectionConfig, G as GlobalConfig, P as PluginConfig } from './types-Bs1up4yP.js';
|
|
2
|
+
import { F as Field } from './types-VtjUxIMp.js';
|
|
3
|
+
import { ZodTypeAny } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare class Registry {
|
|
6
|
+
private collections;
|
|
7
|
+
private globals;
|
|
8
|
+
private plugins;
|
|
9
|
+
private schemaCache;
|
|
10
|
+
private initialized;
|
|
11
|
+
addCollection(config: CollectionConfig): void;
|
|
12
|
+
addCollections(configs: CollectionConfig[]): void;
|
|
13
|
+
getCollection(slug: string): CollectionConfig | undefined;
|
|
14
|
+
getCollections(): CollectionConfig[];
|
|
15
|
+
getCollectionSlugs(): string[];
|
|
16
|
+
hasCollection(slug: string): boolean;
|
|
17
|
+
removeCollection(slug: string): boolean;
|
|
18
|
+
addGlobal(config: GlobalConfig): void;
|
|
19
|
+
addGlobals(configs: GlobalConfig[]): void;
|
|
20
|
+
getGlobal(slug: string): GlobalConfig | undefined;
|
|
21
|
+
getGlobals(): GlobalConfig[];
|
|
22
|
+
getGlobalSlugs(): string[];
|
|
23
|
+
hasGlobal(slug: string): boolean;
|
|
24
|
+
removeGlobal(slug: string): boolean;
|
|
25
|
+
addPlugin(plugin: PluginConfig): void;
|
|
26
|
+
getPlugins(): PluginConfig[];
|
|
27
|
+
getZodSchema(slug: string): ZodTypeAny;
|
|
28
|
+
getCreateZodSchema(slug: string): ZodTypeAny;
|
|
29
|
+
getUpdateZodSchema(slug: string): ZodTypeAny;
|
|
30
|
+
getWhereZodSchema(slug: string): ZodTypeAny;
|
|
31
|
+
getFieldZodSchema(field: Field): ZodTypeAny;
|
|
32
|
+
private clearSchemaCache;
|
|
33
|
+
private applyFieldDefaults;
|
|
34
|
+
getFields(slug: string): Field[];
|
|
35
|
+
getFieldMap(slug: string): Map<string, Field>;
|
|
36
|
+
getVisibleFields(slug: string): Field[];
|
|
37
|
+
validate(): void;
|
|
38
|
+
init(): Promise<void>;
|
|
39
|
+
isInitialized(): boolean;
|
|
40
|
+
getPaginationDefaults(slug: string): {
|
|
41
|
+
defaultLimit: number;
|
|
42
|
+
limits: number[];
|
|
43
|
+
};
|
|
44
|
+
getDefaultSort(slug: string): string;
|
|
45
|
+
getDefaultColumns(slug: string): string[];
|
|
46
|
+
getAdminTitle(slug: string): string;
|
|
47
|
+
getAdminLabel(slug: string): string;
|
|
48
|
+
getAdminGroup(slug: string): string | undefined;
|
|
49
|
+
getStats(): {
|
|
50
|
+
collections: number;
|
|
51
|
+
globals: number;
|
|
52
|
+
plugins: number;
|
|
53
|
+
fields: number;
|
|
54
|
+
};
|
|
55
|
+
toJSON(): {
|
|
56
|
+
collections: CollectionConfig[];
|
|
57
|
+
globals: GlobalConfig[];
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
declare function getRegistry(): Registry;
|
|
61
|
+
declare function resetRegistry(): void;
|
|
62
|
+
declare function createRegistry(): Registry;
|
|
63
|
+
|
|
64
|
+
export { Registry as R, createRegistry as c, getRegistry as g, resetRegistry as r };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { C as CollectionConfig, G as GlobalConfig, P as PluginConfig } from './types-J3R9nVsZ.cjs';
|
|
2
|
+
import { F as Field } from './types-VtjUxIMp.cjs';
|
|
3
|
+
import { ZodTypeAny } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare class Registry {
|
|
6
|
+
private collections;
|
|
7
|
+
private globals;
|
|
8
|
+
private plugins;
|
|
9
|
+
private schemaCache;
|
|
10
|
+
private initialized;
|
|
11
|
+
addCollection(config: CollectionConfig): void;
|
|
12
|
+
addCollections(configs: CollectionConfig[]): void;
|
|
13
|
+
getCollection(slug: string): CollectionConfig | undefined;
|
|
14
|
+
getCollections(): CollectionConfig[];
|
|
15
|
+
getCollectionSlugs(): string[];
|
|
16
|
+
hasCollection(slug: string): boolean;
|
|
17
|
+
removeCollection(slug: string): boolean;
|
|
18
|
+
addGlobal(config: GlobalConfig): void;
|
|
19
|
+
addGlobals(configs: GlobalConfig[]): void;
|
|
20
|
+
getGlobal(slug: string): GlobalConfig | undefined;
|
|
21
|
+
getGlobals(): GlobalConfig[];
|
|
22
|
+
getGlobalSlugs(): string[];
|
|
23
|
+
hasGlobal(slug: string): boolean;
|
|
24
|
+
removeGlobal(slug: string): boolean;
|
|
25
|
+
addPlugin(plugin: PluginConfig): void;
|
|
26
|
+
getPlugins(): PluginConfig[];
|
|
27
|
+
getZodSchema(slug: string): ZodTypeAny;
|
|
28
|
+
getCreateZodSchema(slug: string): ZodTypeAny;
|
|
29
|
+
getUpdateZodSchema(slug: string): ZodTypeAny;
|
|
30
|
+
getWhereZodSchema(slug: string): ZodTypeAny;
|
|
31
|
+
getFieldZodSchema(field: Field): ZodTypeAny;
|
|
32
|
+
private clearSchemaCache;
|
|
33
|
+
private applyFieldDefaults;
|
|
34
|
+
getFields(slug: string): Field[];
|
|
35
|
+
getFieldMap(slug: string): Map<string, Field>;
|
|
36
|
+
getVisibleFields(slug: string): Field[];
|
|
37
|
+
validate(): void;
|
|
38
|
+
init(): Promise<void>;
|
|
39
|
+
isInitialized(): boolean;
|
|
40
|
+
getPaginationDefaults(slug: string): {
|
|
41
|
+
defaultLimit: number;
|
|
42
|
+
limits: number[];
|
|
43
|
+
};
|
|
44
|
+
getDefaultSort(slug: string): string;
|
|
45
|
+
getDefaultColumns(slug: string): string[];
|
|
46
|
+
getAdminTitle(slug: string): string;
|
|
47
|
+
getAdminLabel(slug: string): string;
|
|
48
|
+
getAdminGroup(slug: string): string | undefined;
|
|
49
|
+
getStats(): {
|
|
50
|
+
collections: number;
|
|
51
|
+
globals: number;
|
|
52
|
+
plugins: number;
|
|
53
|
+
fields: number;
|
|
54
|
+
};
|
|
55
|
+
toJSON(): {
|
|
56
|
+
collections: CollectionConfig[];
|
|
57
|
+
globals: GlobalConfig[];
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
declare function getRegistry(): Registry;
|
|
61
|
+
declare function resetRegistry(): void;
|
|
62
|
+
declare function createRegistry(): Registry;
|
|
63
|
+
|
|
64
|
+
export { Registry as R, createRegistry as c, getRegistry as g, resetRegistry as r };
|