@kyro-cms/core 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/dist/WebhookService-BCgL1bLF.d.cts +112 -0
  2. package/dist/WebhookService-BPVJUgTl.d.ts +112 -0
  3. package/dist/{base-DlhVlwnN.d.cts → base-B0Y6isUJ.d.cts} +1 -1
  4. package/dist/{base-CQkFzqQl.d.ts → base-DaP-5PPG.d.ts} +1 -1
  5. package/dist/bootstrap-BMWVB2T6.cjs +31 -0
  6. package/dist/{bootstrap-X6TP3NKX.cjs.map → bootstrap-BMWVB2T6.cjs.map} +1 -1
  7. package/dist/bootstrap-LL6O7PWO.js +6 -0
  8. package/dist/{bootstrap-BDTTUGY2.js.map → bootstrap-LL6O7PWO.js.map} +1 -1
  9. package/dist/{chunk-3VZCX4DF.cjs → chunk-42JPONZU.cjs} +77 -14
  10. package/dist/chunk-42JPONZU.cjs.map +1 -0
  11. package/dist/{chunk-MHS6CPO5.cjs → chunk-4M5PHMUE.cjs} +66 -346
  12. package/dist/chunk-4M5PHMUE.cjs.map +1 -0
  13. package/dist/chunk-4PWRCMTQ.cjs +15 -0
  14. package/dist/chunk-4PWRCMTQ.cjs.map +1 -0
  15. package/dist/chunk-6COM32WF.js +47 -0
  16. package/dist/chunk-6COM32WF.js.map +1 -0
  17. package/dist/chunk-6MSSF46R.js +941 -0
  18. package/dist/chunk-6MSSF46R.js.map +1 -0
  19. package/dist/{chunk-TZFJMPCH.cjs → chunk-7YITG2US.cjs} +9 -18
  20. package/dist/chunk-7YITG2US.cjs.map +1 -0
  21. package/dist/{chunk-A3RQWHKD.cjs → chunk-BLMFBDBG.cjs} +56 -6
  22. package/dist/chunk-BLMFBDBG.cjs.map +1 -0
  23. package/dist/{chunk-EINVJPFM.js → chunk-BTOE3VUK.js} +65 -3
  24. package/dist/chunk-BTOE3VUK.js.map +1 -0
  25. package/dist/chunk-E5X75WNB.js +497 -0
  26. package/dist/chunk-E5X75WNB.js.map +1 -0
  27. package/dist/chunk-E63IF3MD.cjs +951 -0
  28. package/dist/chunk-E63IF3MD.cjs.map +1 -0
  29. package/dist/{chunk-K7QF2QCM.cjs → chunk-FTSSDDZQ.cjs} +7 -3
  30. package/dist/chunk-FTSSDDZQ.cjs.map +1 -0
  31. package/dist/chunk-G7VZBCD6.cjs +35 -0
  32. package/dist/{chunk-5BLDMQED.cjs.map → chunk-G7VZBCD6.cjs.map} +1 -1
  33. package/dist/{chunk-VMSRTAH7.js → chunk-GLCPGZPM.js} +56 -6
  34. package/dist/chunk-GLCPGZPM.js.map +1 -0
  35. package/dist/{chunk-V3B25QOK.cjs → chunk-GVFB5C6O.cjs} +74 -2
  36. package/dist/chunk-GVFB5C6O.cjs.map +1 -0
  37. package/dist/chunk-HVSQDZZJ.cjs +765 -0
  38. package/dist/chunk-HVSQDZZJ.cjs.map +1 -0
  39. package/dist/chunk-HYC4GNHX.js +758 -0
  40. package/dist/chunk-HYC4GNHX.js.map +1 -0
  41. package/dist/chunk-KDVDIZ4Y.cjs +3479 -0
  42. package/dist/chunk-KDVDIZ4Y.cjs.map +1 -0
  43. package/dist/{chunk-OG3KX56O.js → chunk-KWGNR4HM.js} +7 -3
  44. package/dist/chunk-KWGNR4HM.js.map +1 -0
  45. package/dist/chunk-LIJVWQKU.cjs +256 -0
  46. package/dist/chunk-LIJVWQKU.cjs.map +1 -0
  47. package/dist/{chunk-XTZSUDSI.js → chunk-LTRCYJAG.js} +3 -18
  48. package/dist/chunk-LTRCYJAG.js.map +1 -0
  49. package/dist/{chunk-UEYC46RL.js → chunk-OUGKLCYF.js} +71 -8
  50. package/dist/chunk-OUGKLCYF.js.map +1 -0
  51. package/dist/chunk-RONAX6UU.js +3456 -0
  52. package/dist/chunk-RONAX6UU.js.map +1 -0
  53. package/dist/{chunk-C74MQIRL.js → chunk-RRYXQMZG.js} +66 -344
  54. package/dist/chunk-RRYXQMZG.js.map +1 -0
  55. package/dist/{chunk-QUJ4OLSC.js → chunk-U74F3YZU.js} +87 -7
  56. package/dist/chunk-U74F3YZU.js.map +1 -0
  57. package/dist/chunk-VIONYQ2K.cjs +517 -0
  58. package/dist/chunk-VIONYQ2K.cjs.map +1 -0
  59. package/dist/chunk-VSTRLXMQ.cjs +50 -0
  60. package/dist/chunk-VSTRLXMQ.cjs.map +1 -0
  61. package/dist/chunk-YT7HXXVN.js +13 -0
  62. package/dist/chunk-YT7HXXVN.js.map +1 -0
  63. package/dist/chunk-Z6ZWNWWR.js +30 -0
  64. package/dist/{chunk-NSBPE2FW.js.map → chunk-Z6ZWNWWR.js.map} +1 -1
  65. package/dist/cli/index.cjs +11 -7
  66. package/dist/cli/index.cjs.map +1 -1
  67. package/dist/cli/index.js +11 -7
  68. package/dist/cli/index.js.map +1 -1
  69. package/dist/drizzle/index.cjs +20 -17
  70. package/dist/drizzle/index.d.cts +4 -4
  71. package/dist/drizzle/index.d.ts +4 -4
  72. package/dist/drizzle/index.js +4 -5
  73. package/dist/graphql/index.cjs +4 -4
  74. package/dist/graphql/index.d.cts +3 -2
  75. package/dist/graphql/index.d.ts +3 -2
  76. package/dist/graphql/index.js +2 -2
  77. package/dist/{index-DI0DRPNv.d.cts → index-BwE4NueJ.d.cts} +1 -1
  78. package/dist/{index-CMUNCIWQ.d.ts → index-DUKmDSeC.d.cts} +96 -24
  79. package/dist/{index-BMySjW6o.d.cts → index-DtBi3zP0.d.ts} +96 -24
  80. package/dist/{index-4fJKLFK2.d.ts → index-DupWTmW6.d.ts} +1 -1
  81. package/dist/index.cjs +3317 -352
  82. package/dist/index.cjs.map +1 -1
  83. package/dist/index.d.cts +379 -105
  84. package/dist/index.d.ts +379 -105
  85. package/dist/index.js +3211 -310
  86. package/dist/index.js.map +1 -1
  87. package/dist/media-HOT3O7RW.js +4 -0
  88. package/dist/media-HOT3O7RW.js.map +1 -0
  89. package/dist/media-WKP5AOX2.cjs +17 -0
  90. package/dist/media-WKP5AOX2.cjs.map +1 -0
  91. package/dist/mongodb/index.cjs +1 -1
  92. package/dist/mongodb/index.d.cts +2 -2
  93. package/dist/mongodb/index.d.ts +2 -2
  94. package/dist/mongodb/index.js +1 -1
  95. package/dist/mysql-media-AI6YK767.cjs +48 -0
  96. package/dist/mysql-media-AI6YK767.cjs.map +1 -0
  97. package/dist/mysql-media-CDZUS7YX.js +45 -0
  98. package/dist/mysql-media-CDZUS7YX.js.map +1 -0
  99. package/dist/postgres-auth-adapter-EVRPO7BQ.cjs +14 -0
  100. package/dist/{postgres-auth-adapter-VK6GY7LX.cjs.map → postgres-auth-adapter-EVRPO7BQ.cjs.map} +1 -1
  101. package/dist/postgres-auth-adapter-OTRWSTT5.js +5 -0
  102. package/dist/{postgres-auth-adapter-REJFUMP7.js.map → postgres-auth-adapter-OTRWSTT5.js.map} +1 -1
  103. package/dist/redis-adapter-2N6VA7BI.cjs +13 -0
  104. package/dist/{redis-adapter-LBLNKGNS.cjs.map → redis-adapter-2N6VA7BI.cjs.map} +1 -1
  105. package/dist/redis-adapter-RA24FNCX.js +4 -0
  106. package/dist/{redis-adapter-4YDY4LWE.js.map → redis-adapter-RA24FNCX.js.map} +1 -1
  107. package/dist/rest/index.cjs +7 -5
  108. package/dist/rest/index.d.cts +29 -3
  109. package/dist/rest/index.d.ts +29 -3
  110. package/dist/rest/index.js +5 -3
  111. package/dist/schema-CNB2DDTX.js +6 -0
  112. package/dist/schema-CNB2DDTX.js.map +1 -0
  113. package/dist/schema-Y777CQQS.cjs +67 -0
  114. package/dist/schema-Y777CQQS.cjs.map +1 -0
  115. package/dist/templates/index.cjs +24 -28
  116. package/dist/templates/index.d.cts +2 -4
  117. package/dist/templates/index.d.ts +2 -4
  118. package/dist/templates/index.js +2 -2
  119. package/dist/trpc/index.cjs +12 -12
  120. package/dist/trpc/index.d.cts +19 -14
  121. package/dist/trpc/index.d.ts +19 -14
  122. package/dist/trpc/index.js +3 -3
  123. package/dist/{types-BGM5MV_K.d.cts → types-BM0s_YOy.d.cts} +67 -35
  124. package/dist/{types-BGM5MV_K.d.ts → types-BM0s_YOy.d.ts} +67 -35
  125. package/dist/ws/index.cjs +1 -1
  126. package/dist/ws/index.js +1 -1
  127. package/package.json +11 -1
  128. package/dist/bootstrap-BDTTUGY2.js +0 -4
  129. package/dist/bootstrap-X6TP3NKX.cjs +0 -29
  130. package/dist/chunk-3QX6KG2S.js +0 -2125
  131. package/dist/chunk-3QX6KG2S.js.map +0 -1
  132. package/dist/chunk-3VZCX4DF.cjs.map +0 -1
  133. package/dist/chunk-5BLDMQED.cjs +0 -18
  134. package/dist/chunk-7G6EVYCU.cjs +0 -94
  135. package/dist/chunk-7G6EVYCU.cjs.map +0 -1
  136. package/dist/chunk-A3RQWHKD.cjs.map +0 -1
  137. package/dist/chunk-C74MQIRL.js.map +0 -1
  138. package/dist/chunk-EINVJPFM.js.map +0 -1
  139. package/dist/chunk-F5B64H5S.cjs +0 -2149
  140. package/dist/chunk-F5B64H5S.cjs.map +0 -1
  141. package/dist/chunk-K7QF2QCM.cjs.map +0 -1
  142. package/dist/chunk-LRTZJJPD.js +0 -86
  143. package/dist/chunk-LRTZJJPD.js.map +0 -1
  144. package/dist/chunk-MHS6CPO5.cjs.map +0 -1
  145. package/dist/chunk-NSBPE2FW.js +0 -15
  146. package/dist/chunk-OG3KX56O.js.map +0 -1
  147. package/dist/chunk-QUJ4OLSC.js.map +0 -1
  148. package/dist/chunk-R3XIBBAW.cjs +0 -34
  149. package/dist/chunk-R3XIBBAW.cjs.map +0 -1
  150. package/dist/chunk-SDMNUYVU.js +0 -30
  151. package/dist/chunk-SDMNUYVU.js.map +0 -1
  152. package/dist/chunk-TZFJMPCH.cjs.map +0 -1
  153. package/dist/chunk-UEG7KMKC.cjs +0 -228
  154. package/dist/chunk-UEG7KMKC.cjs.map +0 -1
  155. package/dist/chunk-UEYC46RL.js.map +0 -1
  156. package/dist/chunk-V3B25QOK.cjs.map +0 -1
  157. package/dist/chunk-VMSRTAH7.js.map +0 -1
  158. package/dist/chunk-XTZSUDSI.js.map +0 -1
  159. package/dist/chunk-YD7Y25W7.cjs +0 -176
  160. package/dist/chunk-YD7Y25W7.cjs.map +0 -1
  161. package/dist/chunk-YPAFJ7EV.js +0 -225
  162. package/dist/chunk-YPAFJ7EV.js.map +0 -1
  163. package/dist/database-7CJOXEZR.js +0 -5
  164. package/dist/database-7CJOXEZR.js.map +0 -1
  165. package/dist/database-QOIV44GT.cjs +0 -22
  166. package/dist/database-QOIV44GT.cjs.map +0 -1
  167. package/dist/postgres-auth-adapter-REJFUMP7.js +0 -5
  168. package/dist/postgres-auth-adapter-VK6GY7LX.cjs +0 -14
  169. package/dist/redis-adapter-4YDY4LWE.js +0 -4
  170. package/dist/redis-adapter-LBLNKGNS.cjs +0 -13
@@ -1,9 +1,8 @@
1
- import { C as CollectionConfig, G as GlobalConfig } from '../types-BGM5MV_K.js';
1
+ import { C as CollectionConfig, G as GlobalConfig } from '../types-BM0s_YOy.js';
2
2
 
3
3
  declare const minimalCollections: Record<string, CollectionConfig>;
4
4
 
5
5
  declare const blogCollections: Record<string, CollectionConfig>;
6
-
7
6
  declare const blogGlobals: GlobalConfig[];
8
7
 
9
8
  declare const ecommerceCollections: Record<string, CollectionConfig>;
@@ -12,7 +11,6 @@ declare const ecommerceGlobals: GlobalConfig[];
12
11
  declare const kitchenSinkCollections: Record<string, CollectionConfig>;
13
12
 
14
13
  declare const mediaCollection: CollectionConfig;
15
- declare const mediaFoldersCollection: CollectionConfig;
16
14
  declare const mediaCollections: CollectionConfig[];
17
15
 
18
16
  declare const siteSettingsGlobal: GlobalConfig;
@@ -52,4 +50,4 @@ interface CreateTemplateConfigOptions extends TemplateConfig {
52
50
  }
53
51
  declare function createTemplateConfig(options: CreateTemplateConfigOptions): TemplateConfig;
54
52
 
55
- export { type CreateTemplateConfigOptions, type TemplateConfig, type TemplateType, accessSettingsGlobal, allSettingsGlobals, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, ecommerceSettingsGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, mediaFoldersCollection, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, storageSettingsGlobal, storeSettingsGlobal };
53
+ export { type CreateTemplateConfigOptions, type TemplateConfig, type TemplateType, accessSettingsGlobal, allSettingsGlobals, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, ecommerceSettingsGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, storageSettingsGlobal, storeSettingsGlobal };
@@ -1,4 +1,4 @@
1
- export { accessSettingsGlobal, allSettingsGlobals, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, ecommerceSettingsGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, mediaFoldersCollection, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, storageSettingsGlobal, storeSettingsGlobal } from '../chunk-3QX6KG2S.js';
2
- import '../chunk-NSBPE2FW.js';
1
+ export { accessSettingsGlobal, allSettingsGlobals, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, ecommerceSettingsGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, storageSettingsGlobal, storeSettingsGlobal } from '../chunk-RONAX6UU.js';
2
+ import '../chunk-Z6ZWNWWR.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,46 +1,46 @@
1
1
  'use strict';
2
2
 
3
- var chunk3VZCX4DF_cjs = require('../chunk-3VZCX4DF.cjs');
4
- require('../chunk-R3XIBBAW.cjs');
5
- require('../chunk-5BLDMQED.cjs');
3
+ var chunk42JPONZU_cjs = require('../chunk-42JPONZU.cjs');
4
+ require('../chunk-VIONYQ2K.cjs');
5
+ require('../chunk-G7VZBCD6.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "createContext", {
10
10
  enumerable: true,
11
- get: function () { return chunk3VZCX4DF_cjs.createContext; }
11
+ get: function () { return chunk42JPONZU_cjs.createContext; }
12
12
  });
13
13
  Object.defineProperty(exports, "createCountProcedure", {
14
14
  enumerable: true,
15
- get: function () { return chunk3VZCX4DF_cjs.createCountProcedure; }
15
+ get: function () { return chunk42JPONZU_cjs.createCountProcedure; }
16
16
  });
17
17
  Object.defineProperty(exports, "createCreateProcedure", {
18
18
  enumerable: true,
19
- get: function () { return chunk3VZCX4DF_cjs.createCreateProcedure; }
19
+ get: function () { return chunk42JPONZU_cjs.createCreateProcedure; }
20
20
  });
21
21
  Object.defineProperty(exports, "createDeleteProcedure", {
22
22
  enumerable: true,
23
- get: function () { return chunk3VZCX4DF_cjs.createDeleteProcedure; }
23
+ get: function () { return chunk42JPONZU_cjs.createDeleteProcedure; }
24
24
  });
25
25
  Object.defineProperty(exports, "createDynamicRouter", {
26
26
  enumerable: true,
27
- get: function () { return chunk3VZCX4DF_cjs.createDynamicRouter; }
27
+ get: function () { return chunk42JPONZU_cjs.createDynamicRouter; }
28
28
  });
29
29
  Object.defineProperty(exports, "createFindByIDProcedure", {
30
30
  enumerable: true,
31
- get: function () { return chunk3VZCX4DF_cjs.createFindByIDProcedure; }
31
+ get: function () { return chunk42JPONZU_cjs.createFindByIDProcedure; }
32
32
  });
33
33
  Object.defineProperty(exports, "createFindProcedure", {
34
34
  enumerable: true,
35
- get: function () { return chunk3VZCX4DF_cjs.createFindProcedure; }
35
+ get: function () { return chunk42JPONZU_cjs.createFindProcedure; }
36
36
  });
37
37
  Object.defineProperty(exports, "createKyroServer", {
38
38
  enumerable: true,
39
- get: function () { return chunk3VZCX4DF_cjs.createKyroServer; }
39
+ get: function () { return chunk42JPONZU_cjs.createKyroServer; }
40
40
  });
41
41
  Object.defineProperty(exports, "createUpdateProcedure", {
42
42
  enumerable: true,
43
- get: function () { return chunk3VZCX4DF_cjs.createUpdateProcedure; }
43
+ get: function () { return chunk42JPONZU_cjs.createUpdateProcedure; }
44
44
  });
45
45
  //# sourceMappingURL=index.cjs.map
46
46
  //# sourceMappingURL=index.cjs.map
@@ -1,11 +1,23 @@
1
- import { B as BaseAdapter, g as Request, f as User, b as FindResult } from '../types-BGM5MV_K.cjs';
1
+ import { B as BaseAdapter, g as Request, f as User, b as FindResult } from '../types-BM0s_YOy.cjs';
2
+ import { i as createWebhookService } from '../WebhookService-BCgL1bLF.cjs';
2
3
 
3
- interface KyroContext$1 {
4
+ interface ApiKeyContext {
5
+ userId: string;
6
+ user: Partial<User>;
7
+ permissions: string[];
8
+ apiKeyId: string;
9
+ tenantId?: string;
10
+ role?: string;
11
+ }
12
+ interface KyroContext {
4
13
  db: BaseAdapter;
5
14
  registry: any;
6
15
  user?: User;
7
16
  tenantID?: string;
8
17
  req: Request;
18
+ apiKey?: ApiKeyContext;
19
+ webhookService?: ReturnType<typeof createWebhookService>;
20
+ settings?: Record<string, any>;
9
21
  [key: string]: any;
10
22
  }
11
23
  declare function createContext(options: {
@@ -14,9 +26,10 @@ declare function createContext(options: {
14
26
  req: Request;
15
27
  user?: User;
16
28
  tenantID?: string;
17
- }): KyroContext$1;
29
+ settings?: Record<string, any>;
30
+ }): Promise<KyroContext>;
18
31
 
19
- declare function createDynamicRouter(ctx: KyroContext$1): Record<string, any>;
32
+ declare function createDynamicRouter(ctx: KyroContext): Record<string, any>;
20
33
  interface KyroRouter {
21
34
  [collectionSlug: string]: {
22
35
  find: (input: {
@@ -71,16 +84,8 @@ interface KyroRouter {
71
84
  }>;
72
85
  };
73
86
  }
74
- declare function createKyroServer(ctx: KyroContext$1): KyroRouter;
87
+ declare function createKyroServer(ctx: KyroContext): KyroRouter;
75
88
 
76
- interface KyroContext {
77
- db: BaseAdapter;
78
- registry: any;
79
- user?: User;
80
- tenantID?: string;
81
- req: Request;
82
- [key: string]: any;
83
- }
84
89
  declare function createFindProcedure(ctx: KyroContext): (input: {
85
90
  collection: string;
86
91
  where?: Record<string, any>;
@@ -127,4 +132,4 @@ declare function createCountProcedure(ctx: KyroContext): (input: {
127
132
  totalDocs: number;
128
133
  }>;
129
134
 
130
- export { type KyroContext$1 as KyroContext, type KyroRouter, createContext, createCountProcedure, createCreateProcedure, createDeleteProcedure, createDynamicRouter, createFindByIDProcedure, createFindProcedure, createKyroServer, createUpdateProcedure };
135
+ export { type KyroContext, type KyroRouter, createContext, createCountProcedure, createCreateProcedure, createDeleteProcedure, createDynamicRouter, createFindByIDProcedure, createFindProcedure, createKyroServer, createUpdateProcedure };
@@ -1,11 +1,23 @@
1
- import { B as BaseAdapter, g as Request, f as User, b as FindResult } from '../types-BGM5MV_K.js';
1
+ import { B as BaseAdapter, g as Request, f as User, b as FindResult } from '../types-BM0s_YOy.js';
2
+ import { i as createWebhookService } from '../WebhookService-BPVJUgTl.js';
2
3
 
3
- interface KyroContext$1 {
4
+ interface ApiKeyContext {
5
+ userId: string;
6
+ user: Partial<User>;
7
+ permissions: string[];
8
+ apiKeyId: string;
9
+ tenantId?: string;
10
+ role?: string;
11
+ }
12
+ interface KyroContext {
4
13
  db: BaseAdapter;
5
14
  registry: any;
6
15
  user?: User;
7
16
  tenantID?: string;
8
17
  req: Request;
18
+ apiKey?: ApiKeyContext;
19
+ webhookService?: ReturnType<typeof createWebhookService>;
20
+ settings?: Record<string, any>;
9
21
  [key: string]: any;
10
22
  }
11
23
  declare function createContext(options: {
@@ -14,9 +26,10 @@ declare function createContext(options: {
14
26
  req: Request;
15
27
  user?: User;
16
28
  tenantID?: string;
17
- }): KyroContext$1;
29
+ settings?: Record<string, any>;
30
+ }): Promise<KyroContext>;
18
31
 
19
- declare function createDynamicRouter(ctx: KyroContext$1): Record<string, any>;
32
+ declare function createDynamicRouter(ctx: KyroContext): Record<string, any>;
20
33
  interface KyroRouter {
21
34
  [collectionSlug: string]: {
22
35
  find: (input: {
@@ -71,16 +84,8 @@ interface KyroRouter {
71
84
  }>;
72
85
  };
73
86
  }
74
- declare function createKyroServer(ctx: KyroContext$1): KyroRouter;
87
+ declare function createKyroServer(ctx: KyroContext): KyroRouter;
75
88
 
76
- interface KyroContext {
77
- db: BaseAdapter;
78
- registry: any;
79
- user?: User;
80
- tenantID?: string;
81
- req: Request;
82
- [key: string]: any;
83
- }
84
89
  declare function createFindProcedure(ctx: KyroContext): (input: {
85
90
  collection: string;
86
91
  where?: Record<string, any>;
@@ -127,4 +132,4 @@ declare function createCountProcedure(ctx: KyroContext): (input: {
127
132
  totalDocs: number;
128
133
  }>;
129
134
 
130
- export { type KyroContext$1 as KyroContext, type KyroRouter, createContext, createCountProcedure, createCreateProcedure, createDeleteProcedure, createDynamicRouter, createFindByIDProcedure, createFindProcedure, createKyroServer, createUpdateProcedure };
135
+ export { type KyroContext, type KyroRouter, createContext, createCountProcedure, createCreateProcedure, createDeleteProcedure, createDynamicRouter, createFindByIDProcedure, createFindProcedure, createKyroServer, createUpdateProcedure };
@@ -1,5 +1,5 @@
1
- export { createContext, createCountProcedure, createCreateProcedure, createDeleteProcedure, createDynamicRouter, createFindByIDProcedure, createFindProcedure, createKyroServer, createUpdateProcedure } from '../chunk-UEYC46RL.js';
2
- import '../chunk-SDMNUYVU.js';
3
- import '../chunk-NSBPE2FW.js';
1
+ export { createContext, createCountProcedure, createCreateProcedure, createDeleteProcedure, createDynamicRouter, createFindByIDProcedure, createFindProcedure, createKyroServer, createUpdateProcedure } from '../chunk-OUGKLCYF.js';
2
+ import '../chunk-E5X75WNB.js';
3
+ import '../chunk-Z6ZWNWWR.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -4,8 +4,12 @@ interface FieldAdmin {
4
4
  readOnly?: boolean;
5
5
  hidden?: boolean;
6
6
  width?: string;
7
+ position?: "sidebar" | "main";
8
+ autoGenerate?: string;
9
+ action?: string;
10
+ method?: string;
11
+ inline?: boolean;
7
12
  condition?: (data: Record<string, any>, siblingData: Record<string, any>) => boolean;
8
- position?: 'sidebar' | 'main';
9
13
  }
10
14
  interface BaseField {
11
15
  name: string;
@@ -31,9 +35,9 @@ interface ValidateOptions {
31
35
  required?: boolean;
32
36
  }
33
37
  type Hook$1 = (args: any) => Promise<any> | any;
34
- type TextFieldVariant = 'text' | 'email' | 'password' | 'url' | 'id';
38
+ type TextFieldVariant = "text" | "email" | "password" | "url" | "id";
35
39
  interface TextField extends BaseField {
36
- type: 'text';
40
+ type: "text";
37
41
  variant?: TextFieldVariant;
38
42
  minLength?: number;
39
43
  maxLength?: number;
@@ -42,7 +46,7 @@ interface TextField extends BaseField {
42
46
  localized?: boolean;
43
47
  }
44
48
  interface NumberField extends BaseField {
45
- type: 'number';
49
+ type: "number";
46
50
  min?: number;
47
51
  max?: number;
48
52
  step?: number;
@@ -50,29 +54,29 @@ interface NumberField extends BaseField {
50
54
  hasMany?: boolean;
51
55
  }
52
56
  interface CheckboxField extends BaseField {
53
- type: 'checkbox';
57
+ type: "checkbox";
54
58
  }
55
59
  interface DateField extends BaseField {
56
- type: 'date';
60
+ type: "date";
57
61
  minDate?: string;
58
62
  maxDate?: string;
59
63
  time?: boolean;
60
64
  }
61
65
  interface EmailField extends BaseField {
62
- type: 'email';
66
+ type: "email";
63
67
  }
64
68
  interface PasswordField extends BaseField {
65
- type: 'password';
69
+ type: "password";
66
70
  }
67
71
  interface TextareaField extends BaseField {
68
- type: 'textarea';
72
+ type: "textarea";
69
73
  minLength?: number;
70
74
  maxLength?: number;
71
75
  rows?: number;
72
76
  localized?: boolean;
73
77
  }
74
78
  interface SelectField extends BaseField {
75
- type: 'select';
79
+ type: "select";
76
80
  options: Array<{
77
81
  label: string;
78
82
  value: string;
@@ -81,7 +85,7 @@ interface SelectField extends BaseField {
81
85
  defaultValue?: string | string[];
82
86
  }
83
87
  interface RadioField extends BaseField {
84
- type: 'radio';
88
+ type: "radio";
85
89
  options: Array<{
86
90
  label: string;
87
91
  value: string;
@@ -89,8 +93,8 @@ interface RadioField extends BaseField {
89
93
  defaultValue?: string;
90
94
  }
91
95
  interface ColorField extends BaseField {
92
- type: 'color';
93
- format?: 'hex' | 'rgb' | 'hsl';
96
+ type: "color";
97
+ format?: "hex" | "rgb" | "hsl";
94
98
  defaultValue?: string;
95
99
  }
96
100
  interface RichTextBlock {
@@ -99,34 +103,35 @@ interface RichTextBlock {
99
103
  children?: RichTextBlock[];
100
104
  }
101
105
  interface RichTextField extends BaseField {
102
- type: 'richtext';
103
- editor?: 'lexical' | 'slate' | 'blocks';
106
+ type: "richtext";
107
+ editor?: "lexical" | "slate" | "blocks";
108
+ hasBlocks?: boolean;
104
109
  defaultValue?: RichTextBlock[];
105
110
  localized?: boolean;
106
111
  }
107
112
  interface JSONField extends BaseField {
108
- type: 'json';
113
+ type: "json";
109
114
  defaultValue?: Record<string, any>;
110
115
  }
111
116
  interface CodeField extends BaseField {
112
- type: 'code';
117
+ type: "code";
113
118
  language?: string;
114
119
  defaultValue?: string;
115
120
  }
116
121
  interface UploadField extends BaseField {
117
- type: 'upload';
122
+ type: "upload";
118
123
  relationTo: string;
119
124
  hasMany?: boolean;
120
125
  maxDepth?: number;
121
126
  defaultValue?: string;
122
127
  }
123
128
  interface MarkdownField extends BaseField {
124
- type: 'markdown';
129
+ type: "markdown";
125
130
  localized?: boolean;
126
131
  defaultValue?: string;
127
132
  }
128
133
  interface RelationshipField extends BaseField {
129
- type: 'relationship';
134
+ type: "relationship";
130
135
  relationTo: string | string[];
131
136
  hasMany?: boolean;
132
137
  maxDepth?: number;
@@ -137,7 +142,7 @@ interface RelationshipField extends BaseField {
137
142
  defaultValue?: string | string[];
138
143
  }
139
144
  interface ArrayField extends BaseField {
140
- type: 'array';
145
+ type: "array";
141
146
  fields: Field[];
142
147
  minRows?: number;
143
148
  maxRows?: number;
@@ -148,19 +153,31 @@ interface ArrayField extends BaseField {
148
153
  defaultValue?: Record<string, any>[];
149
154
  }
150
155
  interface GroupField extends BaseField {
151
- type: 'group';
156
+ type: "group";
152
157
  fields: Field[];
153
158
  defaultValue?: Record<string, any>;
154
159
  }
160
+ interface BlockImage {
161
+ url: string;
162
+ alt?: string;
163
+ }
164
+ interface BlockAdmin {
165
+ group?: string;
166
+ images?: {
167
+ icon?: BlockImage | string;
168
+ thumbnail?: BlockImage | string;
169
+ };
170
+ }
155
171
  interface Block {
156
172
  slug: string;
157
173
  label: string;
158
174
  fields: Field[];
159
175
  imageURL?: string;
176
+ admin?: BlockAdmin;
160
177
  }
161
178
  interface BlocksField extends BaseField {
162
- type: 'blocks';
163
- blocks: Block[];
179
+ type: "blocks";
180
+ blocks?: Block[];
164
181
  minRows?: number;
165
182
  maxRows?: number;
166
183
  defaultValue?: Array<{
@@ -168,19 +185,19 @@ interface BlocksField extends BaseField {
168
185
  [key: string]: any;
169
186
  }>;
170
187
  }
171
- interface RowField extends Omit<BaseField, 'name'> {
172
- type: 'row';
188
+ interface RowField extends Omit<BaseField, "name"> {
189
+ type: "row";
173
190
  fields: Field[];
174
191
  name?: string;
175
192
  }
176
- interface CollapsibleField extends Omit<BaseField, 'name'> {
177
- type: 'collapsible';
193
+ interface CollapsibleField extends Omit<BaseField, "name"> {
194
+ type: "collapsible";
178
195
  fields: Field[];
179
196
  label: string;
180
197
  name?: string;
181
198
  }
182
- interface TabsField extends Omit<BaseField, 'name'> {
183
- type: 'tabs';
199
+ interface TabsField extends Omit<BaseField, "name"> {
200
+ type: "tabs";
184
201
  tabs: Array<{
185
202
  label: string;
186
203
  fields: Field[];
@@ -188,8 +205,15 @@ interface TabsField extends Omit<BaseField, 'name'> {
188
205
  }>;
189
206
  name?: string;
190
207
  }
191
- type Field = TextField | NumberField | CheckboxField | DateField | EmailField | PasswordField | TextareaField | SelectField | RadioField | ColorField | RichTextField | JSONField | CodeField | UploadField | MarkdownField | RelationshipField | ArrayField | GroupField | BlocksField | RowField | CollapsibleField | TabsField;
192
- type FieldType = Field['type'];
208
+ interface ButtonField extends BaseField {
209
+ type: "button";
210
+ label: string;
211
+ action?: string;
212
+ method?: string;
213
+ inline?: boolean;
214
+ }
215
+ type Field = TextField | NumberField | CheckboxField | DateField | EmailField | PasswordField | TextareaField | SelectField | RadioField | ColorField | RichTextField | JSONField | CodeField | UploadField | MarkdownField | RelationshipField | ArrayField | GroupField | BlocksField | RowField | CollapsibleField | TabsField | ButtonField;
216
+ type FieldType = Field["type"];
193
217
  declare function isTextField(field: Field): field is TextField;
194
218
  declare function isNumberField(field: Field): field is NumberField;
195
219
  declare function isRelationshipField(field: Field): field is RelationshipField;
@@ -319,6 +343,7 @@ interface AdminConfig {
319
343
  defaultLimit?: number;
320
344
  limits?: number[];
321
345
  };
346
+ layout?: 'split' | 'single';
322
347
  }
323
348
  interface UploadConfig {
324
349
  staticDir?: string;
@@ -395,10 +420,12 @@ interface CollectionConfig {
395
420
  fields: Record<string, number | 'text'>;
396
421
  options?: Record<string, any>;
397
422
  }>;
398
- typescript?: {
399
- interface?: string;
400
- };
401
423
  custom?: Record<string, any>;
424
+ tabs?: Array<{
425
+ label: string;
426
+ fields: Field[];
427
+ name?: string;
428
+ }>;
402
429
  }
403
430
  interface GlobalConfig {
404
431
  slug: string;
@@ -415,6 +442,11 @@ interface GlobalConfig {
415
442
  interface?: string;
416
443
  };
417
444
  custom?: Record<string, any>;
445
+ tabs?: Array<{
446
+ label: string;
447
+ fields: Field[];
448
+ name?: string;
449
+ }>;
418
450
  }
419
451
  interface FindArgs {
420
452
  collection: string;