@kyro-cms/core 0.6.0 → 0.7.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.
Files changed (145) hide show
  1. package/dist/api-handler.cjs +75 -35
  2. package/dist/api-handler.cjs.map +1 -1
  3. package/dist/api-handler.d.cts +2 -5
  4. package/dist/api-handler.d.ts +2 -5
  5. package/dist/api-handler.js +75 -36
  6. package/dist/api-handler.js.map +1 -1
  7. package/dist/bootstrap-AKAUP6F6.cjs +32 -0
  8. package/dist/{bootstrap-EE6BJZWL.cjs.map → bootstrap-AKAUP6F6.cjs.map} +1 -1
  9. package/dist/bootstrap-JCML6NFO.js +7 -0
  10. package/dist/{bootstrap-4MH44YKG.js.map → bootstrap-JCML6NFO.js.map} +1 -1
  11. package/dist/{chunk-WVPOPOEQ.cjs → chunk-2KVHZE6O.cjs} +286 -126
  12. package/dist/chunk-2KVHZE6O.cjs.map +1 -0
  13. package/dist/{chunk-RALQO47U.cjs → chunk-2OL4O2TH.cjs} +55 -2
  14. package/dist/chunk-2OL4O2TH.cjs.map +1 -0
  15. package/dist/{chunk-XU7AFF6V.js → chunk-35U3FROB.js} +982 -4
  16. package/dist/chunk-35U3FROB.js.map +1 -0
  17. package/dist/{chunk-WSCJQI2B.js → chunk-3J4MFTI3.js} +27 -11
  18. package/dist/chunk-3J4MFTI3.js.map +1 -0
  19. package/dist/chunk-3ZFYL34R.js +391 -0
  20. package/dist/chunk-3ZFYL34R.js.map +1 -0
  21. package/dist/chunk-4DA7QPLA.cjs +356 -0
  22. package/dist/chunk-4DA7QPLA.cjs.map +1 -0
  23. package/dist/{chunk-TP5YQFIX.js → chunk-57P6MJKC.js} +3 -715
  24. package/dist/chunk-57P6MJKC.js.map +1 -0
  25. package/dist/{chunk-R2YHJN6W.cjs → chunk-5KVM3WEY.cjs} +34 -208
  26. package/dist/chunk-5KVM3WEY.cjs.map +1 -0
  27. package/dist/{chunk-Z2OVHWHB.cjs → chunk-6IMPH6WV.cjs} +28 -11
  28. package/dist/chunk-6IMPH6WV.cjs.map +1 -0
  29. package/dist/{chunk-QKVA2SOG.js → chunk-DXHRBMGB.js} +27 -284
  30. package/dist/chunk-DXHRBMGB.js.map +1 -0
  31. package/dist/{chunk-E3BZLMX6.js → chunk-ES5HNFFT.js} +43 -2
  32. package/dist/chunk-ES5HNFFT.js.map +1 -0
  33. package/dist/{chunk-QYZKIPSD.js → chunk-FXYP2HA6.js} +34 -3
  34. package/dist/chunk-FXYP2HA6.js.map +1 -0
  35. package/dist/chunk-H727JIG7.js +809 -0
  36. package/dist/chunk-H727JIG7.js.map +1 -0
  37. package/dist/{chunk-AM4JKIPP.js → chunk-HXRD4B37.js} +9 -183
  38. package/dist/chunk-HXRD4B37.js.map +1 -0
  39. package/dist/chunk-I7HHI6QV.cjs +816 -0
  40. package/dist/chunk-I7HHI6QV.cjs.map +1 -0
  41. package/dist/{chunk-RDRJVCL5.cjs → chunk-IA6AU5PI.cjs} +2 -720
  42. package/dist/chunk-IA6AU5PI.cjs.map +1 -0
  43. package/dist/{chunk-55BNRTLW.cjs → chunk-LINKCEG4.cjs} +985 -4
  44. package/dist/chunk-LINKCEG4.cjs.map +1 -0
  45. package/dist/{chunk-TVVYZ2TH.js → chunk-OHVB4AJ7.js} +56 -3
  46. package/dist/chunk-OHVB4AJ7.js.map +1 -0
  47. package/dist/{chunk-XAEBVZTI.cjs → chunk-PDYFVNUX.cjs} +26 -289
  48. package/dist/chunk-PDYFVNUX.cjs.map +1 -0
  49. package/dist/{chunk-6WXQRYTW.js → chunk-QPPDLRNR.js} +286 -126
  50. package/dist/chunk-QPPDLRNR.js.map +1 -0
  51. package/dist/{chunk-WBCIEYHC.cjs → chunk-QUW2RZTM.cjs} +35 -4
  52. package/dist/chunk-QUW2RZTM.cjs.map +1 -0
  53. package/dist/chunk-SA7NSSIQ.cjs +397 -0
  54. package/dist/chunk-SA7NSSIQ.cjs.map +1 -0
  55. package/dist/{chunk-H4XCAPA6.cjs → chunk-V3LKPM3O.cjs} +43 -2
  56. package/dist/chunk-V3LKPM3O.cjs.map +1 -0
  57. package/dist/chunk-Y3N7UUDO.js +349 -0
  58. package/dist/chunk-Y3N7UUDO.js.map +1 -0
  59. package/dist/{chunk-S3FG2NY7.js → chunk-Y3QQN7PN.js} +4 -3
  60. package/dist/chunk-Y3QQN7PN.js.map +1 -0
  61. package/dist/{chunk-5HA5OMFH.cjs → chunk-YVUJBEXE.cjs} +7 -6
  62. package/dist/chunk-YVUJBEXE.cjs.map +1 -0
  63. package/dist/cli/index.cjs +103 -20
  64. package/dist/cli/index.cjs.map +1 -1
  65. package/dist/cli/index.js +103 -20
  66. package/dist/cli/index.js.map +1 -1
  67. package/dist/client.d.cts +1 -1
  68. package/dist/client.d.ts +1 -1
  69. package/dist/drizzle/index.cjs +12 -12
  70. package/dist/drizzle/index.d.cts +23 -2
  71. package/dist/drizzle/index.d.ts +23 -2
  72. package/dist/drizzle/index.js +3 -3
  73. package/dist/index.cjs +174 -1054
  74. package/dist/index.cjs.map +1 -1
  75. package/dist/index.d.cts +85 -7
  76. package/dist/index.d.ts +85 -7
  77. package/dist/index.js +91 -980
  78. package/dist/index.js.map +1 -1
  79. package/dist/integration.cjs +2 -2
  80. package/dist/integration.d.cts +3 -16
  81. package/dist/integration.d.ts +3 -16
  82. package/dist/integration.js +1 -1
  83. package/dist/mongo-auth-adapter-NHHUJHVH.cjs +17 -0
  84. package/dist/mongo-auth-adapter-NHHUJHVH.cjs.map +1 -0
  85. package/dist/mongo-auth-adapter-NJQUUCTP.js +4 -0
  86. package/dist/mongo-auth-adapter-NJQUUCTP.js.map +1 -0
  87. package/dist/mongodb/index.cjs +9 -8
  88. package/dist/mongodb/index.d.cts +86 -5
  89. package/dist/mongodb/index.d.ts +86 -5
  90. package/dist/mongodb/index.js +3 -2
  91. package/dist/postgres-auth-adapter-3T2NKTSE.js +5 -0
  92. package/dist/{postgres-auth-adapter-B65BULNS.js.map → postgres-auth-adapter-3T2NKTSE.js.map} +1 -1
  93. package/dist/postgres-auth-adapter-7IEENCKQ.cjs +14 -0
  94. package/dist/{postgres-auth-adapter-6742WDCF.cjs.map → postgres-auth-adapter-7IEENCKQ.cjs.map} +1 -1
  95. package/dist/redis-adapter-D2E2S3GB.cjs +13 -0
  96. package/dist/{redis-adapter-LPUWLE4Y.cjs.map → redis-adapter-D2E2S3GB.cjs.map} +1 -1
  97. package/dist/redis-adapter-VQXD7ESY.js +4 -0
  98. package/dist/{redis-adapter-THYDCGQR.js.map → redis-adapter-VQXD7ESY.js.map} +1 -1
  99. package/dist/rest/index.cjs +10 -8
  100. package/dist/rest/index.js +8 -6
  101. package/dist/sqlite-adapter-LVK5PS4T.cjs +13 -0
  102. package/dist/sqlite-adapter-LVK5PS4T.cjs.map +1 -0
  103. package/dist/sqlite-adapter-TR3U3W6Q.js +4 -0
  104. package/dist/sqlite-adapter-TR3U3W6Q.js.map +1 -0
  105. package/dist/templates/index.cjs +31 -27
  106. package/dist/templates/index.d.cts +8 -5
  107. package/dist/templates/index.d.ts +8 -5
  108. package/dist/templates/index.js +1 -1
  109. package/dist/{base-eVegJ_Pr.d.ts → tenant-B1YB0Jy8.d.ts} +10 -1
  110. package/dist/{base-DvvNqnM-.d.cts → tenant-Cpeveji6.d.cts} +10 -1
  111. package/dist/{types-DqN4ckOC.d.cts → types-D6ZLRGbH.d.cts} +19 -1
  112. package/dist/{types-DqN4ckOC.d.ts → types-D6ZLRGbH.d.ts} +19 -1
  113. package/package.json +56 -9
  114. package/dist/adapter-BSvBudTG.d.cts +0 -65
  115. package/dist/adapter-CXGB2Elb.d.ts +0 -65
  116. package/dist/bootstrap-4MH44YKG.js +0 -6
  117. package/dist/bootstrap-EE6BJZWL.cjs +0 -31
  118. package/dist/chunk-55BNRTLW.cjs.map +0 -1
  119. package/dist/chunk-5HA5OMFH.cjs.map +0 -1
  120. package/dist/chunk-6WXQRYTW.js.map +0 -1
  121. package/dist/chunk-A4USRVTQ.js +0 -115
  122. package/dist/chunk-A4USRVTQ.js.map +0 -1
  123. package/dist/chunk-AM4JKIPP.js.map +0 -1
  124. package/dist/chunk-E3BZLMX6.js.map +0 -1
  125. package/dist/chunk-H4XCAPA6.cjs.map +0 -1
  126. package/dist/chunk-KOCTZKPV.cjs +0 -117
  127. package/dist/chunk-KOCTZKPV.cjs.map +0 -1
  128. package/dist/chunk-QKVA2SOG.js.map +0 -1
  129. package/dist/chunk-QYZKIPSD.js.map +0 -1
  130. package/dist/chunk-R2YHJN6W.cjs.map +0 -1
  131. package/dist/chunk-RALQO47U.cjs.map +0 -1
  132. package/dist/chunk-RDRJVCL5.cjs.map +0 -1
  133. package/dist/chunk-S3FG2NY7.js.map +0 -1
  134. package/dist/chunk-TP5YQFIX.js.map +0 -1
  135. package/dist/chunk-TVVYZ2TH.js.map +0 -1
  136. package/dist/chunk-WBCIEYHC.cjs.map +0 -1
  137. package/dist/chunk-WSCJQI2B.js.map +0 -1
  138. package/dist/chunk-WVPOPOEQ.cjs.map +0 -1
  139. package/dist/chunk-XAEBVZTI.cjs.map +0 -1
  140. package/dist/chunk-XU7AFF6V.js.map +0 -1
  141. package/dist/chunk-Z2OVHWHB.cjs.map +0 -1
  142. package/dist/postgres-auth-adapter-6742WDCF.cjs +0 -14
  143. package/dist/postgres-auth-adapter-B65BULNS.js +0 -5
  144. package/dist/redis-adapter-LPUWLE4Y.cjs +0 -13
  145. package/dist/redis-adapter-THYDCGQR.js +0 -4
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkWBCIEYHC_cjs = require('./chunk-WBCIEYHC.cjs');
3
+ var chunkQUW2RZTM_cjs = require('./chunk-QUW2RZTM.cjs');
4
4
  require('./chunk-G7VZBCD6.cjs');
5
5
 
6
6
 
7
7
 
8
- module.exports = chunkWBCIEYHC_cjs.kyro;
8
+ module.exports = chunkQUW2RZTM_cjs.kyro;
9
9
  //# sourceMappingURL=integration.cjs.map
10
10
  //# sourceMappingURL=integration.cjs.map
@@ -1,26 +1,13 @@
1
1
  import { AstroIntegration } from 'astro';
2
2
 
3
3
  interface KyroIntegrationOptions {
4
- /**
5
- * Path to the kyro configuration file relative to the project root.
6
- * Default: './kyro.config.ts'
7
- */
8
4
  configPath?: string;
9
- /**
10
- * Base path where the API should be mounted.
11
- * Default: '/api/kyro'
12
- */
13
5
  apiPath?: string;
14
- /**
15
- * Base path where the admin UI should be mounted.
16
- * Default: '/admin'
17
- */
18
6
  adminPath?: string;
19
- /**
20
- * Whether to mount the admin UI.
21
- * Default: true
22
- */
23
7
  admin?: boolean;
8
+ enableGraphQL?: boolean;
9
+ enableTRPC?: boolean;
10
+ enableWebSocket?: boolean;
24
11
  }
25
12
  declare function kyro(options?: KyroIntegrationOptions): AstroIntegration;
26
13
 
@@ -1,26 +1,13 @@
1
1
  import { AstroIntegration } from 'astro';
2
2
 
3
3
  interface KyroIntegrationOptions {
4
- /**
5
- * Path to the kyro configuration file relative to the project root.
6
- * Default: './kyro.config.ts'
7
- */
8
4
  configPath?: string;
9
- /**
10
- * Base path where the API should be mounted.
11
- * Default: '/api/kyro'
12
- */
13
5
  apiPath?: string;
14
- /**
15
- * Base path where the admin UI should be mounted.
16
- * Default: '/admin'
17
- */
18
6
  adminPath?: string;
19
- /**
20
- * Whether to mount the admin UI.
21
- * Default: true
22
- */
23
7
  admin?: boolean;
8
+ enableGraphQL?: boolean;
9
+ enableTRPC?: boolean;
10
+ enableWebSocket?: boolean;
24
11
  }
25
12
  declare function kyro(options?: KyroIntegrationOptions): AstroIntegration;
26
13
 
@@ -1,4 +1,4 @@
1
- export { kyro as default } from './chunk-QYZKIPSD.js';
1
+ export { kyro as default } from './chunk-FXYP2HA6.js';
2
2
  import './chunk-Z6ZWNWWR.js';
3
3
  //# sourceMappingURL=integration.js.map
4
4
  //# sourceMappingURL=integration.js.map
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var chunk4DA7QPLA_cjs = require('./chunk-4DA7QPLA.cjs');
4
+ require('./chunk-G7VZBCD6.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "MongoDBAuthAdapter", {
9
+ enumerable: true,
10
+ get: function () { return chunk4DA7QPLA_cjs.MongoDBAuthAdapter; }
11
+ });
12
+ Object.defineProperty(exports, "createMongoDBAuthAdapter", {
13
+ enumerable: true,
14
+ get: function () { return chunk4DA7QPLA_cjs.createMongoDBAuthAdapter; }
15
+ });
16
+ //# sourceMappingURL=mongo-auth-adapter-NHHUJHVH.cjs.map
17
+ //# sourceMappingURL=mongo-auth-adapter-NHHUJHVH.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"mongo-auth-adapter-NHHUJHVH.cjs"}
@@ -0,0 +1,4 @@
1
+ export { MongoDBAuthAdapter, createMongoDBAuthAdapter } from './chunk-Y3N7UUDO.js';
2
+ import './chunk-Z6ZWNWWR.js';
3
+ //# sourceMappingURL=mongo-auth-adapter-NJQUUCTP.js.map
4
+ //# sourceMappingURL=mongo-auth-adapter-NJQUUCTP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"mongo-auth-adapter-NJQUUCTP.js"}
@@ -1,27 +1,28 @@
1
1
  'use strict';
2
2
 
3
3
  require('../chunk-MTIRYI7F.cjs');
4
- var chunkXAEBVZTI_cjs = require('../chunk-XAEBVZTI.cjs');
5
- require('../chunk-KOCTZKPV.cjs');
4
+ var chunkPDYFVNUX_cjs = require('../chunk-PDYFVNUX.cjs');
5
+ var chunk4DA7QPLA_cjs = require('../chunk-4DA7QPLA.cjs');
6
+ require('../chunk-SA7NSSIQ.cjs');
6
7
  require('../chunk-G7VZBCD6.cjs');
7
8
 
8
9
 
9
10
 
10
11
  Object.defineProperty(exports, "MongoDBAdapter", {
11
12
  enumerable: true,
12
- get: function () { return chunkXAEBVZTI_cjs.MongoDBAdapter; }
13
+ get: function () { return chunkPDYFVNUX_cjs.MongoDBAdapter; }
13
14
  });
14
- Object.defineProperty(exports, "MongoDBAuthAdapter", {
15
+ Object.defineProperty(exports, "createMongoDBAdapter", {
15
16
  enumerable: true,
16
- get: function () { return chunkXAEBVZTI_cjs.MongoDBAuthAdapter; }
17
+ get: function () { return chunkPDYFVNUX_cjs.createMongoDBAdapter; }
17
18
  });
18
- Object.defineProperty(exports, "createMongoDBAdapter", {
19
+ Object.defineProperty(exports, "MongoDBAuthAdapter", {
19
20
  enumerable: true,
20
- get: function () { return chunkXAEBVZTI_cjs.createMongoDBAdapter; }
21
+ get: function () { return chunk4DA7QPLA_cjs.MongoDBAuthAdapter; }
21
22
  });
22
23
  Object.defineProperty(exports, "createMongoDBAuthAdapter", {
23
24
  enumerable: true,
24
- get: function () { return chunkXAEBVZTI_cjs.createMongoDBAuthAdapter; }
25
+ get: function () { return chunk4DA7QPLA_cjs.createMongoDBAuthAdapter; }
25
26
  });
26
27
  //# sourceMappingURL=index.cjs.map
27
28
  //# sourceMappingURL=index.cjs.map
@@ -1,9 +1,72 @@
1
- export { M as MongoDBAdapter, c as createMongoDBAdapter } from '../adapter-BSvBudTG.cjs';
2
- import { A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, d as AuditLogFilter, e as AuditLog } from '../types-DqN4ckOC.cjs';
3
- import '../base-DvvNqnM-.cjs';
4
- import '../types-J3R9nVsZ.cjs';
1
+ import { A as AbstractBaseAdapter, T as TenantContext } from '../tenant-Cpeveji6.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, i as DraftFindArgs, j as DraftSnapshot, k as DraftUpsertArgs, l as DraftDeleteArgs } from '../types-J3R9nVsZ.cjs';
3
+ import { A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, e as AuditLogFilter, d as AuditLog } from '../types-D6ZLRGbH.cjs';
5
4
  import '../types-VtjUxIMp.cjs';
6
5
 
6
+ declare class MongoDBAdapter extends AbstractBaseAdapter {
7
+ client: any;
8
+ db: any;
9
+ private database;
10
+ private connectionString?;
11
+ private readonly draftsCollectionName;
12
+ private tenantContext?;
13
+ setTenantContext(context: TenantContext | undefined): void;
14
+ getTenantContext(): TenantContext | undefined;
15
+ constructor(options: {
16
+ client?: any;
17
+ database?: string;
18
+ connectionString?: string;
19
+ });
20
+ connect(): Promise<void>;
21
+ disconnect(): Promise<void>;
22
+ private getMongoCollection;
23
+ find<T>(args: FindArgs): Promise<FindResult<T>>;
24
+ findByID<T>(args: FindByIDArgs): Promise<T | null>;
25
+ create<T>(args: CreateArgs): Promise<T>;
26
+ update<T>(args: UpdateArgs): Promise<T>;
27
+ delete<T>(args: DeleteArgs): Promise<T>;
28
+ count(args: {
29
+ collection: string;
30
+ where?: Record<string, any>;
31
+ tenantID?: string;
32
+ }): Promise<number>;
33
+ findOne(args: {
34
+ collection: string;
35
+ where: Record<string, any>;
36
+ tenantID?: string;
37
+ draft?: boolean;
38
+ }): Promise<any>;
39
+ findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
40
+ findVersionByID(args: {
41
+ collection: string;
42
+ versionId: string;
43
+ tenantID?: string;
44
+ }): Promise<VersionRecord | null>;
45
+ createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
46
+ deleteVersions(args: {
47
+ collection: string;
48
+ documentId: string;
49
+ keepLatest?: number;
50
+ tenantID?: string;
51
+ }): Promise<void>;
52
+ findDraft<T>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
53
+ upsertDraft<T>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
54
+ deleteDraft(args: DraftDeleteArgs): Promise<void>;
55
+ migrate?(): Promise<void>;
56
+ private getCollectionConfig;
57
+ private buildFilter;
58
+ private getDraftId;
59
+ private docToDraft;
60
+ private buildProjection;
61
+ private processResult;
62
+ private generateId;
63
+ }
64
+ declare function createMongoDBAdapter(options: {
65
+ client?: any;
66
+ database?: string;
67
+ connectionString?: string;
68
+ }): MongoDBAdapter;
69
+
7
70
  interface MongoDBAuthAdapterOptions {
8
71
  db: any;
9
72
  collectionPrefix?: string;
@@ -53,7 +116,25 @@ declare class MongoDBAuthAdapter implements AuthAdapter {
53
116
  createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
54
117
  private docToAuthUser;
55
118
  private docToSession;
119
+ createEmailVerificationToken(userId: string): Promise<{
120
+ token: string;
121
+ expiresAt: Date;
122
+ }>;
123
+ verifyEmailToken(token: string): Promise<{
124
+ success: boolean;
125
+ userId?: string;
126
+ error?: string;
127
+ }>;
128
+ createPasswordResetToken(email: string): Promise<{
129
+ token: string;
130
+ expiresAt: Date;
131
+ error?: string;
132
+ }>;
133
+ resetPasswordWithToken(token: string, newPassword: string): Promise<{
134
+ success: boolean;
135
+ error?: string;
136
+ }>;
56
137
  }
57
138
  declare function createMongoDBAuthAdapter(options: MongoDBAuthAdapterOptions): MongoDBAuthAdapter;
58
139
 
59
- export { MongoDBAuthAdapter, createMongoDBAuthAdapter };
140
+ export { MongoDBAdapter, MongoDBAuthAdapter, createMongoDBAdapter, createMongoDBAuthAdapter };
@@ -1,9 +1,72 @@
1
- export { M as MongoDBAdapter, c as createMongoDBAdapter } from '../adapter-CXGB2Elb.js';
2
- import { A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, d as AuditLogFilter, e as AuditLog } from '../types-DqN4ckOC.js';
3
- import '../base-eVegJ_Pr.js';
4
- import '../types-Bs1up4yP.js';
1
+ import { A as AbstractBaseAdapter, T as TenantContext } from '../tenant-B1YB0Jy8.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, i as DraftFindArgs, j as DraftSnapshot, k as DraftUpsertArgs, l as DraftDeleteArgs } from '../types-Bs1up4yP.js';
3
+ import { A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, e as AuditLogFilter, d as AuditLog } from '../types-D6ZLRGbH.js';
5
4
  import '../types-VtjUxIMp.js';
6
5
 
6
+ declare class MongoDBAdapter extends AbstractBaseAdapter {
7
+ client: any;
8
+ db: any;
9
+ private database;
10
+ private connectionString?;
11
+ private readonly draftsCollectionName;
12
+ private tenantContext?;
13
+ setTenantContext(context: TenantContext | undefined): void;
14
+ getTenantContext(): TenantContext | undefined;
15
+ constructor(options: {
16
+ client?: any;
17
+ database?: string;
18
+ connectionString?: string;
19
+ });
20
+ connect(): Promise<void>;
21
+ disconnect(): Promise<void>;
22
+ private getMongoCollection;
23
+ find<T>(args: FindArgs): Promise<FindResult<T>>;
24
+ findByID<T>(args: FindByIDArgs): Promise<T | null>;
25
+ create<T>(args: CreateArgs): Promise<T>;
26
+ update<T>(args: UpdateArgs): Promise<T>;
27
+ delete<T>(args: DeleteArgs): Promise<T>;
28
+ count(args: {
29
+ collection: string;
30
+ where?: Record<string, any>;
31
+ tenantID?: string;
32
+ }): Promise<number>;
33
+ findOne(args: {
34
+ collection: string;
35
+ where: Record<string, any>;
36
+ tenantID?: string;
37
+ draft?: boolean;
38
+ }): Promise<any>;
39
+ findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
40
+ findVersionByID(args: {
41
+ collection: string;
42
+ versionId: string;
43
+ tenantID?: string;
44
+ }): Promise<VersionRecord | null>;
45
+ createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
46
+ deleteVersions(args: {
47
+ collection: string;
48
+ documentId: string;
49
+ keepLatest?: number;
50
+ tenantID?: string;
51
+ }): Promise<void>;
52
+ findDraft<T>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
53
+ upsertDraft<T>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
54
+ deleteDraft(args: DraftDeleteArgs): Promise<void>;
55
+ migrate?(): Promise<void>;
56
+ private getCollectionConfig;
57
+ private buildFilter;
58
+ private getDraftId;
59
+ private docToDraft;
60
+ private buildProjection;
61
+ private processResult;
62
+ private generateId;
63
+ }
64
+ declare function createMongoDBAdapter(options: {
65
+ client?: any;
66
+ database?: string;
67
+ connectionString?: string;
68
+ }): MongoDBAdapter;
69
+
7
70
  interface MongoDBAuthAdapterOptions {
8
71
  db: any;
9
72
  collectionPrefix?: string;
@@ -53,7 +116,25 @@ declare class MongoDBAuthAdapter implements AuthAdapter {
53
116
  createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
54
117
  private docToAuthUser;
55
118
  private docToSession;
119
+ createEmailVerificationToken(userId: string): Promise<{
120
+ token: string;
121
+ expiresAt: Date;
122
+ }>;
123
+ verifyEmailToken(token: string): Promise<{
124
+ success: boolean;
125
+ userId?: string;
126
+ error?: string;
127
+ }>;
128
+ createPasswordResetToken(email: string): Promise<{
129
+ token: string;
130
+ expiresAt: Date;
131
+ error?: string;
132
+ }>;
133
+ resetPasswordWithToken(token: string, newPassword: string): Promise<{
134
+ success: boolean;
135
+ error?: string;
136
+ }>;
56
137
  }
57
138
  declare function createMongoDBAuthAdapter(options: MongoDBAuthAdapterOptions): MongoDBAuthAdapter;
58
139
 
59
- export { MongoDBAuthAdapter, createMongoDBAuthAdapter };
140
+ export { MongoDBAdapter, MongoDBAuthAdapter, createMongoDBAdapter, createMongoDBAuthAdapter };
@@ -1,6 +1,7 @@
1
1
  import '../chunk-GTGRLD4Y.js';
2
- export { MongoDBAdapter, MongoDBAuthAdapter, createMongoDBAdapter, createMongoDBAuthAdapter } from '../chunk-QKVA2SOG.js';
3
- import '../chunk-A4USRVTQ.js';
2
+ export { MongoDBAdapter, createMongoDBAdapter } from '../chunk-DXHRBMGB.js';
3
+ export { MongoDBAuthAdapter, createMongoDBAuthAdapter } from '../chunk-Y3N7UUDO.js';
4
+ import '../chunk-3ZFYL34R.js';
4
5
  import '../chunk-Z6ZWNWWR.js';
5
6
  //# sourceMappingURL=index.js.map
6
7
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,5 @@
1
+ export { PostgresAuthAdapter } from './chunk-OHVB4AJ7.js';
2
+ import './chunk-WOWUL7ZY.js';
3
+ import './chunk-Z6ZWNWWR.js';
4
+ //# sourceMappingURL=postgres-auth-adapter-3T2NKTSE.js.map
5
+ //# sourceMappingURL=postgres-auth-adapter-3T2NKTSE.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"postgres-auth-adapter-B65BULNS.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"postgres-auth-adapter-3T2NKTSE.js"}
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var chunk2OL4O2TH_cjs = require('./chunk-2OL4O2TH.cjs');
4
+ require('./chunk-WQBRWOQT.cjs');
5
+ require('./chunk-G7VZBCD6.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "PostgresAuthAdapter", {
10
+ enumerable: true,
11
+ get: function () { return chunk2OL4O2TH_cjs.PostgresAuthAdapter; }
12
+ });
13
+ //# sourceMappingURL=postgres-auth-adapter-7IEENCKQ.cjs.map
14
+ //# sourceMappingURL=postgres-auth-adapter-7IEENCKQ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"postgres-auth-adapter-6742WDCF.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"postgres-auth-adapter-7IEENCKQ.cjs"}
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkV3LKPM3O_cjs = require('./chunk-V3LKPM3O.cjs');
4
+ require('./chunk-G7VZBCD6.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "RedisAuthAdapter", {
9
+ enumerable: true,
10
+ get: function () { return chunkV3LKPM3O_cjs.RedisAuthAdapter; }
11
+ });
12
+ //# sourceMappingURL=redis-adapter-D2E2S3GB.cjs.map
13
+ //# sourceMappingURL=redis-adapter-D2E2S3GB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"redis-adapter-LPUWLE4Y.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"redis-adapter-D2E2S3GB.cjs"}
@@ -0,0 +1,4 @@
1
+ export { RedisAuthAdapter } from './chunk-ES5HNFFT.js';
2
+ import './chunk-Z6ZWNWWR.js';
3
+ //# sourceMappingURL=redis-adapter-VQXD7ESY.js.map
4
+ //# sourceMappingURL=redis-adapter-VQXD7ESY.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"redis-adapter-THYDCGQR.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"redis-adapter-VQXD7ESY.js"}
@@ -1,28 +1,30 @@
1
1
  'use strict';
2
2
 
3
- var chunkR2YHJN6W_cjs = require('../chunk-R2YHJN6W.cjs');
4
- require('../chunk-RDRJVCL5.cjs');
3
+ var chunk5KVM3WEY_cjs = require('../chunk-5KVM3WEY.cjs');
4
+ require('../chunk-IA6AU5PI.cjs');
5
5
  require('../chunk-4PWRCMTQ.cjs');
6
+ require('../chunk-I7HHI6QV.cjs');
6
7
  require('../chunk-ADLJSJSN.cjs');
7
8
  require('../chunk-IBG6V56E.cjs');
8
9
  require('../chunk-VJT6P4N6.cjs');
9
10
  require('../chunk-R3XIBBAW.cjs');
10
- require('../chunk-WVPOPOEQ.cjs');
11
- require('../chunk-RALQO47U.cjs');
11
+ require('../chunk-2KVHZE6O.cjs');
12
+ require('../chunk-2OL4O2TH.cjs');
12
13
  require('../chunk-WQBRWOQT.cjs');
13
- require('../chunk-XAEBVZTI.cjs');
14
- require('../chunk-KOCTZKPV.cjs');
14
+ require('../chunk-PDYFVNUX.cjs');
15
+ require('../chunk-4DA7QPLA.cjs');
16
+ require('../chunk-SA7NSSIQ.cjs');
15
17
  require('../chunk-G7VZBCD6.cjs');
16
18
 
17
19
 
18
20
 
19
21
  Object.defineProperty(exports, "createHonoApp", {
20
22
  enumerable: true,
21
- get: function () { return chunkR2YHJN6W_cjs.createHonoApp; }
23
+ get: function () { return chunk5KVM3WEY_cjs.createHonoApp; }
22
24
  });
23
25
  Object.defineProperty(exports, "createRESTAPI", {
24
26
  enumerable: true,
25
- get: function () { return chunkR2YHJN6W_cjs.createRESTAPI; }
27
+ get: function () { return chunk5KVM3WEY_cjs.createRESTAPI; }
26
28
  });
27
29
  //# sourceMappingURL=index.cjs.map
28
30
  //# sourceMappingURL=index.cjs.map
@@ -1,15 +1,17 @@
1
- export { createHonoApp, createRESTAPI } from '../chunk-AM4JKIPP.js';
2
- import '../chunk-TP5YQFIX.js';
1
+ export { createHonoApp, createRESTAPI } from '../chunk-HXRD4B37.js';
2
+ import '../chunk-57P6MJKC.js';
3
3
  import '../chunk-YT7HXXVN.js';
4
+ import '../chunk-H727JIG7.js';
4
5
  import '../chunk-P2YW545G.js';
5
6
  import '../chunk-QXIQWPAP.js';
6
7
  import '../chunk-REK7AYOC.js';
7
8
  import '../chunk-SDMNUYVU.js';
8
- import '../chunk-6WXQRYTW.js';
9
- import '../chunk-TVVYZ2TH.js';
9
+ import '../chunk-QPPDLRNR.js';
10
+ import '../chunk-OHVB4AJ7.js';
10
11
  import '../chunk-WOWUL7ZY.js';
11
- import '../chunk-QKVA2SOG.js';
12
- import '../chunk-A4USRVTQ.js';
12
+ import '../chunk-DXHRBMGB.js';
13
+ import '../chunk-Y3N7UUDO.js';
14
+ import '../chunk-3ZFYL34R.js';
13
15
  import '../chunk-Z6ZWNWWR.js';
14
16
  //# sourceMappingURL=index.js.map
15
17
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkI7HHI6QV_cjs = require('./chunk-I7HHI6QV.cjs');
4
+ require('./chunk-G7VZBCD6.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "SQLiteAuthAdapter", {
9
+ enumerable: true,
10
+ get: function () { return chunkI7HHI6QV_cjs.SQLiteAuthAdapter; }
11
+ });
12
+ //# sourceMappingURL=sqlite-adapter-LVK5PS4T.cjs.map
13
+ //# sourceMappingURL=sqlite-adapter-LVK5PS4T.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"sqlite-adapter-LVK5PS4T.cjs"}
@@ -0,0 +1,4 @@
1
+ export { SQLiteAuthAdapter } from './chunk-H727JIG7.js';
2
+ import './chunk-Z6ZWNWWR.js';
3
+ //# sourceMappingURL=sqlite-adapter-TR3U3W6Q.js.map
4
+ //# sourceMappingURL=sqlite-adapter-TR3U3W6Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"sqlite-adapter-TR3U3W6Q.js"}
@@ -1,101 +1,105 @@
1
1
  'use strict';
2
2
 
3
- var chunkZ2OVHWHB_cjs = require('../chunk-Z2OVHWHB.cjs');
3
+ var chunk6IMPH6WV_cjs = require('../chunk-6IMPH6WV.cjs');
4
4
  require('../chunk-G7VZBCD6.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "accessSettingsGlobal", {
9
9
  enumerable: true,
10
- get: function () { return chunkZ2OVHWHB_cjs.accessSettingsGlobal; }
10
+ get: function () { return chunk6IMPH6WV_cjs.accessSettingsGlobal; }
11
11
  });
12
12
  Object.defineProperty(exports, "allSettingsGlobals", {
13
13
  enumerable: true,
14
- get: function () { return chunkZ2OVHWHB_cjs.allSettingsGlobals; }
14
+ get: function () { return chunk6IMPH6WV_cjs.allSettingsGlobals; }
15
15
  });
16
16
  Object.defineProperty(exports, "authCollections", {
17
17
  enumerable: true,
18
- get: function () { return chunkZ2OVHWHB_cjs.authCollections; }
18
+ get: function () { return chunk6IMPH6WV_cjs.authCollections; }
19
19
  });
20
20
  Object.defineProperty(exports, "blogCollections", {
21
21
  enumerable: true,
22
- get: function () { return chunkZ2OVHWHB_cjs.blogCollections; }
22
+ get: function () { return chunk6IMPH6WV_cjs.blogCollections; }
23
23
  });
24
24
  Object.defineProperty(exports, "blogGlobals", {
25
25
  enumerable: true,
26
- get: function () { return chunkZ2OVHWHB_cjs.blogGlobals; }
26
+ get: function () { return chunk6IMPH6WV_cjs.blogGlobals; }
27
27
  });
28
28
  Object.defineProperty(exports, "coreSettingsGlobals", {
29
29
  enumerable: true,
30
- get: function () { return chunkZ2OVHWHB_cjs.coreSettingsGlobals; }
30
+ get: function () { return chunk6IMPH6WV_cjs.coreSettingsGlobals; }
31
31
  });
32
32
  Object.defineProperty(exports, "createTemplateConfig", {
33
33
  enumerable: true,
34
- get: function () { return chunkZ2OVHWHB_cjs.createTemplateConfig; }
34
+ get: function () { return chunk6IMPH6WV_cjs.createTemplateConfig; }
35
35
  });
36
36
  Object.defineProperty(exports, "ecommerceCollections", {
37
37
  enumerable: true,
38
- get: function () { return chunkZ2OVHWHB_cjs.ecommerceCollections; }
38
+ get: function () { return chunk6IMPH6WV_cjs.ecommerceCollections; }
39
39
  });
40
40
  Object.defineProperty(exports, "ecommerceGlobals", {
41
41
  enumerable: true,
42
- get: function () { return chunkZ2OVHWHB_cjs.ecommerceGlobals; }
43
- });
44
- Object.defineProperty(exports, "ecommerceSettingsGlobals", {
45
- enumerable: true,
46
- get: function () { return chunkZ2OVHWHB_cjs.ecommerceSettingsGlobals; }
42
+ get: function () { return chunk6IMPH6WV_cjs.ecommerceGlobals; }
47
43
  });
48
44
  Object.defineProperty(exports, "emailSettingsGlobal", {
49
45
  enumerable: true,
50
- get: function () { return chunkZ2OVHWHB_cjs.emailSettingsGlobal; }
46
+ get: function () { return chunk6IMPH6WV_cjs.emailSettingsGlobal; }
51
47
  });
52
48
  Object.defineProperty(exports, "getSettingsForTemplate", {
53
49
  enumerable: true,
54
- get: function () { return chunkZ2OVHWHB_cjs.getSettingsForTemplate; }
50
+ get: function () { return chunk6IMPH6WV_cjs.getSettingsForTemplate; }
55
51
  });
56
52
  Object.defineProperty(exports, "kitchenSinkCollections", {
57
53
  enumerable: true,
58
- get: function () { return chunkZ2OVHWHB_cjs.kitchenSinkCollections; }
54
+ get: function () { return chunk6IMPH6WV_cjs.kitchenSinkCollections; }
59
55
  });
60
56
  Object.defineProperty(exports, "mediaCollection", {
61
57
  enumerable: true,
62
- get: function () { return chunkZ2OVHWHB_cjs.mediaCollection; }
58
+ get: function () { return chunk6IMPH6WV_cjs.mediaCollection; }
63
59
  });
64
60
  Object.defineProperty(exports, "mediaCollections", {
65
61
  enumerable: true,
66
- get: function () { return chunkZ2OVHWHB_cjs.mediaCollections; }
62
+ get: function () { return chunk6IMPH6WV_cjs.mediaCollections; }
67
63
  });
68
64
  Object.defineProperty(exports, "minimalCollections", {
69
65
  enumerable: true,
70
- get: function () { return chunkZ2OVHWHB_cjs.minimalCollections; }
66
+ get: function () { return chunk6IMPH6WV_cjs.minimalCollections; }
71
67
  });
72
68
  Object.defineProperty(exports, "paymentSettingsGlobal", {
73
69
  enumerable: true,
74
- get: function () { return chunkZ2OVHWHB_cjs.paymentSettingsGlobal; }
70
+ get: function () { return chunk6IMPH6WV_cjs.paymentSettingsGlobal; }
75
71
  });
76
72
  Object.defineProperty(exports, "seoSettingsGlobal", {
77
73
  enumerable: true,
78
- get: function () { return chunkZ2OVHWHB_cjs.seoSettingsGlobal; }
74
+ get: function () { return chunk6IMPH6WV_cjs.seoSettingsGlobal; }
79
75
  });
80
76
  Object.defineProperty(exports, "settingsBySlug", {
81
77
  enumerable: true,
82
- get: function () { return chunkZ2OVHWHB_cjs.settingsBySlug; }
78
+ get: function () { return chunk6IMPH6WV_cjs.settingsBySlug; }
83
79
  });
84
80
  Object.defineProperty(exports, "siteSettingsGlobal", {
85
81
  enumerable: true,
86
- get: function () { return chunkZ2OVHWHB_cjs.siteSettingsGlobal; }
82
+ get: function () { return chunk6IMPH6WV_cjs.siteSettingsGlobal; }
87
83
  });
88
84
  Object.defineProperty(exports, "socialSettingsGlobal", {
89
85
  enumerable: true,
90
- get: function () { return chunkZ2OVHWHB_cjs.socialSettingsGlobal; }
86
+ get: function () { return chunk6IMPH6WV_cjs.socialSettingsGlobal; }
87
+ });
88
+ Object.defineProperty(exports, "starterCollections", {
89
+ enumerable: true,
90
+ get: function () { return chunk6IMPH6WV_cjs.starterCollections; }
91
91
  });
92
92
  Object.defineProperty(exports, "storageSettingsGlobal", {
93
93
  enumerable: true,
94
- get: function () { return chunkZ2OVHWHB_cjs.storageSettingsGlobal; }
94
+ get: function () { return chunk6IMPH6WV_cjs.storageSettingsGlobal; }
95
95
  });
96
96
  Object.defineProperty(exports, "storeSettingsGlobal", {
97
97
  enumerable: true,
98
- get: function () { return chunkZ2OVHWHB_cjs.storeSettingsGlobal; }
98
+ get: function () { return chunk6IMPH6WV_cjs.storeSettingsGlobal; }
99
+ });
100
+ Object.defineProperty(exports, "systemSettingsGlobal", {
101
+ enumerable: true,
102
+ get: function () { return chunk6IMPH6WV_cjs.systemSettingsGlobal; }
99
103
  });
100
104
  //# sourceMappingURL=index.cjs.map
101
105
  //# sourceMappingURL=index.cjs.map