@resistdesign/voltra 3.0.0-alpha.14 → 3.0.0-alpha.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/README.md +41 -26
  2. package/api/DBX/DBXAsserts.d.ts +95 -0
  3. package/api/DBX/DBXRequest.d.ts +5 -0
  4. package/api/DBX/DBXRuntime.d.ts +5 -0
  5. package/api/DBX/DBXScenarioConfig.d.ts +9 -0
  6. package/api/DBX/DBXSeed.d.ts +124 -0
  7. package/api/DBX/DBXTypes.d.ts +176 -0
  8. package/api/DBX/index.d.ts +8 -0
  9. package/api/DataAccessControl.d.ts +220 -0
  10. package/api/Indexing/API.d.ts +236 -0
  11. package/api/Indexing/Cursor.d.ts +101 -0
  12. package/api/Indexing/Handler/Config.d.ts +39 -0
  13. package/api/Indexing/Handler.d.ts +166 -0
  14. package/api/Indexing/Trace.d.ts +54 -0
  15. package/api/Indexing/Types.d.ts +204 -0
  16. package/api/Indexing/ddb/AwsSdkV3Adapter.d.ts +8 -0
  17. package/api/Indexing/ddb/Types.d.ts +169 -0
  18. package/api/Indexing/docId.d.ts +27 -0
  19. package/api/Indexing/exact/ExactDdb.d.ts +58 -0
  20. package/api/Indexing/exact/ExactIndex.d.ts +90 -0
  21. package/api/Indexing/exact/ExactS3.d.ts +41 -0
  22. package/api/Indexing/fieldQualification.d.ts +12 -0
  23. package/api/Indexing/fulltext/FullTextDdbBackend.d.ts +210 -0
  24. package/api/Indexing/fulltext/FullTextMemoryBackend.d.ts +93 -0
  25. package/api/Indexing/fulltext/Schema.d.ts +164 -0
  26. package/api/Indexing/hashUniversal.d.ts +13 -0
  27. package/api/Indexing/index.d.ts +45 -0
  28. package/api/Indexing/lossy/LossyDdb.d.ts +43 -0
  29. package/api/Indexing/lossy/LossyIndex.d.ts +72 -0
  30. package/api/Indexing/lossy/LossyS3.d.ts +40 -0
  31. package/api/Indexing/rel/Cursor.d.ts +25 -0
  32. package/api/Indexing/rel/Handlers.d.ts +143 -0
  33. package/api/Indexing/rel/RelationalDdb.d.ts +169 -0
  34. package/api/Indexing/rel/RelationalInMemoryBackend.d.ts +38 -0
  35. package/api/Indexing/rel/Types.d.ts +69 -0
  36. package/api/Indexing/structured/Cursor.d.ts +26 -0
  37. package/api/Indexing/structured/Handlers.d.ts +128 -0
  38. package/api/Indexing/structured/SearchStructured.d.ts +44 -0
  39. package/api/Indexing/structured/StructuredDdb.d.ts +166 -0
  40. package/api/Indexing/structured/StructuredDdbBackend.d.ts +109 -0
  41. package/api/Indexing/structured/StructuredInMemoryBackend.d.ts +34 -0
  42. package/api/Indexing/structured/StructuredInMemoryIndex.d.ts +58 -0
  43. package/api/Indexing/structured/StructuredStringLike.d.ts +25 -0
  44. package/api/Indexing/structured/StructuredWriter.d.ts +61 -0
  45. package/api/Indexing/structured/Types.d.ts +126 -0
  46. package/api/Indexing/structured/index.d.ts +9 -0
  47. package/api/Indexing/tokenize.d.ts +31 -0
  48. package/api/ORM/DACUtils.d.ts +270 -0
  49. package/api/ORM/ListItemUtils.d.ts +40 -0
  50. package/api/ORM/ORMRouteMap.d.ts +55 -0
  51. package/api/ORM/TypeInfoORMService.d.ts +555 -0
  52. package/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.d.ts +229 -0
  53. package/api/ORM/drivers/DynamoDBDataItemDBDriver.d.ts +89 -0
  54. package/api/ORM/drivers/InMemoryDataItemDBDriver/ConfigTypes.d.ts +4 -0
  55. package/api/ORM/drivers/InMemoryDataItemDBDriver.d.ts +55 -0
  56. package/api/ORM/drivers/InMemoryFileItemDBDriver/ConfigTypes.d.ts +13 -0
  57. package/api/ORM/drivers/InMemoryFileItemDBDriver.d.ts +98 -0
  58. package/api/ORM/drivers/InMemoryItemRelationshipDBDriver.d.ts +16 -0
  59. package/api/ORM/drivers/IndexingRelationshipDriver.d.ts +123 -0
  60. package/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.d.ts +322 -0
  61. package/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.d.ts +118 -0
  62. package/api/ORM/drivers/S3FileItemDBDriver.d.ts +71 -0
  63. package/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.d.ts +36 -0
  64. package/api/ORM/drivers/common/Types.d.ts +197 -0
  65. package/api/ORM/drivers/common/index.d.ts +2 -0
  66. package/api/ORM/drivers/index.d.ts +7 -0
  67. package/api/ORM/index.d.ts +8 -0
  68. package/api/ORM/indexing/criteriaToStructuredWhere.d.ts +17 -0
  69. package/api/Router/AWS.d.ts +80 -0
  70. package/api/Router/Auth.d.ts +14 -0
  71. package/api/Router/CORS.d.ts +66 -0
  72. package/api/Router/Types.d.ts +137 -0
  73. package/api/Router/index.d.ts +89 -0
  74. package/api/index.d.ts +46 -5520
  75. package/api/index.js +98 -2
  76. package/app/forms/Engine.d.ts +20 -0
  77. package/app/forms/core/createAutoField.d.ts +35 -0
  78. package/app/forms/core/createFormRenderer.d.ts +24 -0
  79. package/app/forms/core/getFieldKind.d.ts +14 -0
  80. package/app/forms/core/index.d.ts +11 -0
  81. package/app/forms/core/mergeSuites.d.ts +22 -0
  82. package/app/forms/core/resolveSuite.d.ts +14 -0
  83. package/app/forms/core/types.d.ts +153 -0
  84. package/app/forms/index.d.ts +9 -0
  85. package/{types-BMdfSr4v.d.ts → app/forms/types.d.ts} +13 -106
  86. package/app/helpers/styled.d.ts +3 -0
  87. package/app/index.d.ts +86 -793
  88. package/app/index.js +1 -1
  89. package/app/utils/ApplicationState.d.ts +167 -0
  90. package/app/utils/ApplicationStateLoader.d.ts +86 -0
  91. package/app/utils/Controller.d.ts +10 -0
  92. package/app/utils/Debug.d.ts +14 -0
  93. package/app/utils/EasyLayout.d.ts +89 -0
  94. package/{History-DMHOF02n.d.ts → app/utils/History.d.ts} +8 -63
  95. package/app/utils/Route.d.ts +129 -0
  96. package/app/utils/RouteHistory.d.ts +26 -0
  97. package/app/utils/Service.d.ts +45 -0
  98. package/app/utils/TypeInfoORMAPIUtils.d.ts +94 -0
  99. package/app/utils/TypeInfoORMClient.d.ts +103 -0
  100. package/app/utils/easy-layout/computeAreaBounds.d.ts +5 -0
  101. package/app/utils/easy-layout/computeTracks.d.ts +16 -0
  102. package/app/utils/easy-layout/index.d.ts +5 -0
  103. package/app/utils/easy-layout/parseTemplate.d.ts +12 -0
  104. package/app/utils/easy-layout/types.d.ts +52 -0
  105. package/app/utils/easy-layout/validateAreas.d.ts +5 -0
  106. package/app/utils/index.d.ts +23 -0
  107. package/build/TypeMapping.d.ts +17 -0
  108. package/build/TypeParsing.d.ts +10 -0
  109. package/build/index.d.ts +7 -0
  110. package/build/index.js +579 -0
  111. package/common/CommandLine/collectRequiredEnvironmentVariables.d.ts +9 -0
  112. package/common/CommandLine/index.d.ts +6 -0
  113. package/common/HelperTypes.d.ts +9 -0
  114. package/common/IdGeneration/getSimpleId.d.ts +8 -0
  115. package/common/IdGeneration/index.d.ts +1 -0
  116. package/common/ItemRelationshipInfoTypes.d.ts +64 -0
  117. package/common/ItemRelationships/ItemRelationshipValidation.d.ts +21 -0
  118. package/common/ItemRelationships/index.d.ts +1 -0
  119. package/common/Logging/Utils.d.ts +19 -0
  120. package/common/Logging/index.d.ts +1 -0
  121. package/common/Routing.d.ts +67 -0
  122. package/{SearchTypes-BflxO0Qb.d.ts → common/SearchTypes.d.ts} +13 -35
  123. package/common/SearchUtils.d.ts +55 -0
  124. package/common/SearchValidation.d.ts +27 -0
  125. package/common/StringTransformers.d.ts +28 -0
  126. package/common/Testing/CLI.d.ts +6 -0
  127. package/common/Testing/Types.d.ts +216 -0
  128. package/common/Testing/Utils.d.ts +112 -0
  129. package/common/Testing/index.d.ts +8 -0
  130. package/common/TypeInfoDataItemUtils.d.ts +39 -0
  131. package/{Types-ytlubEUw.d.ts → common/TypeInfoORM/Types.d.ts} +18 -15
  132. package/common/TypeInfoORM/index.d.ts +1 -0
  133. package/common/TypeParsing/Constants.d.ts +4 -0
  134. package/common/TypeParsing/ParsingUtils/Constants.d.ts +8 -0
  135. package/common/TypeParsing/ParsingUtils/checkType.d.ts +14 -0
  136. package/common/TypeParsing/ParsingUtils/checkUnionType.d.ts +12 -0
  137. package/common/TypeParsing/ParsingUtils/extractCommentTags.d.ts +8 -0
  138. package/common/TypeParsing/ParsingUtils/extractLiteralValues.d.ts +12 -0
  139. package/common/TypeParsing/ParsingUtils/extractTypeDetails.d.ts +14 -0
  140. package/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.d.ts +18 -0
  141. package/common/TypeParsing/ParsingUtils/getTypeInfo.d.ts +9 -0
  142. package/common/TypeParsing/ParsingUtils/getTypeInfoField.d.ts +9 -0
  143. package/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.d.ts +11 -0
  144. package/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.d.ts +12 -0
  145. package/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.d.ts +11 -0
  146. package/common/TypeParsing/ParsingUtils/getTypeKeyword.d.ts +9 -0
  147. package/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.d.ts +11 -0
  148. package/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.d.ts +8 -0
  149. package/common/TypeParsing/TypeInfo.d.ts +202 -0
  150. package/common/TypeParsing/Utils.d.ts +47 -0
  151. package/common/TypeParsing/Validation.d.ts +197 -0
  152. package/common/TypeParsing/index.d.ts +8 -0
  153. package/common/index.d.ts +52 -660
  154. package/common/index.js +21 -33
  155. package/iac/SimpleCFT.d.ts +92 -0
  156. package/iac/index.d.ts +28 -86
  157. package/iac/packs/auth/user-management.d.ts +56 -0
  158. package/iac/packs/auth.d.ts +66 -0
  159. package/iac/packs/build/utils.d.ts +289 -0
  160. package/iac/packs/build.d.ts +91 -0
  161. package/iac/packs/cdn.d.ts +32 -0
  162. package/iac/packs/cloud-function.d.ts +65 -0
  163. package/iac/packs/database.d.ts +31 -0
  164. package/iac/packs/dns.d.ts +33 -0
  165. package/iac/packs/file-storage.d.ts +45 -0
  166. package/iac/packs/gateway.d.ts +77 -0
  167. package/iac/packs/index.d.ts +16 -1
  168. package/iac/packs/repo.d.ts +27 -0
  169. package/iac/packs/ssl-certificate.d.ts +27 -0
  170. package/iac/types/CloudFormationResourceSpecification.d.ts +2 -0
  171. package/iac/types/Constants.d.ts +24 -0
  172. package/{index-DgOzPKdr.d.ts → iac/types/IaCTypes.d.ts} +23 -1026
  173. package/iac/types/Renderers.d.ts +96 -0
  174. package/iac/types/Types.d.ts +131 -0
  175. package/iac/types/Utils.d.ts +9 -0
  176. package/iac/types/generate.d.ts +1 -0
  177. package/iac/utils/index.d.ts +87 -0
  178. package/iac/utils/patch-utils.d.ts +66 -0
  179. package/native/forms/createNativeFormRenderer.d.ts +21 -0
  180. package/native/forms/index.d.ts +8 -0
  181. package/native/forms/primitives/index.d.ts +48 -0
  182. package/native/forms/suite.d.ts +15 -0
  183. package/native/index.d.ts +9 -418
  184. package/native/index.js +2 -2
  185. package/native/utils/EasyLayout.d.ts +88 -0
  186. package/native/utils/History.d.ts +110 -0
  187. package/native/utils/NativeRoute.d.ts +44 -0
  188. package/native/utils/Route.d.ts +50 -0
  189. package/native/utils/index.d.ts +11 -0
  190. package/package.json +29 -1
  191. package/web/forms/UI.d.ts +67 -0
  192. package/web/forms/createWebFormRenderer.d.ts +21 -0
  193. package/web/forms/index.d.ts +9 -0
  194. package/web/forms/primitives/index.d.ts +21 -0
  195. package/web/forms/suite.d.ts +15 -0
  196. package/web/index.d.ts +9 -205
  197. package/web/index.js +2 -2
  198. package/web/utils/EasyLayout.d.ts +47 -0
  199. package/web/utils/Route.d.ts +20 -0
  200. package/web/utils/index.d.ts +7 -0
  201. package/ItemRelationshipInfoTypes-DgpBz7hD.d.ts +0 -310
  202. package/Validation-C6sBQ4NV.d.ts +0 -226
  203. package/createAutoField-BIgp2Qlr.d.ts +0 -316
package/README.md CHANGED
@@ -24,9 +24,8 @@ cross-runtime bundling issues.
24
24
  Preferred:
25
25
 
26
26
  ```ts
27
- import * as IaC from "@resistdesign/voltra/iac";
28
- import {Packs} from "@resistdesign/voltra/iac";
29
- import {addDNS} from "@resistdesign/voltra/iac/packs";
27
+ import { SimpleCFT, Packs } from "@resistdesign/voltra/iac";
28
+ import { addDNS } from "@resistdesign/voltra/iac/packs";
30
29
  ```
31
30
 
32
31
  Not supported:
@@ -46,6 +45,19 @@ Public entrypoints:
46
45
  - `@resistdesign/voltra/iac/packs`
47
46
  - `@resistdesign/voltra/build`
48
47
 
48
+ Common imports by domain:
49
+
50
+ ```ts
51
+ import { addRoutesToRouteMap, handleCloudFunctionEvent } from "@resistdesign/voltra/api";
52
+ import { TypeInfo, TypeInfoORMServiceError } from "@resistdesign/voltra/common";
53
+ import { parseTemplate, computeTrackPixels } from "@resistdesign/voltra/app";
54
+ import { AutoField, AutoForm, createWebFormRenderer, getEasyLayout } from "@resistdesign/voltra/web";
55
+ import { createNativeFormRenderer, makeNativeEasyLayout } from "@resistdesign/voltra/native";
56
+ import { SimpleCFT, Packs } from "@resistdesign/voltra/iac";
57
+ import { addDNS } from "@resistdesign/voltra/iac/packs";
58
+ import { getTypeInfoMapFromTypeScript } from "@resistdesign/voltra/build";
59
+ ```
60
+
49
61
  ------------
50
62
 
51
63
  ## Build-time Type Parsing (Advanced)
@@ -103,10 +115,18 @@ App features include form generation via TypeInfo-driven AutoForm/AutoField with
103
115
 
104
116
  EasyLayout now has:
105
117
 
106
- - Shared core parsing/math in `@resistdesign/voltra/app` (`Utils.parseTemplate`, `Utils.computeTrackPixels`, etc.).
118
+ - Shared core parsing/math in `@resistdesign/voltra/app` (`parseTemplate`, `computeTrackPixels`, etc.).
107
119
  - Web rendering via CSS Grid in `@resistdesign/voltra/web`.
108
120
  - Native coordinate computation in `@resistdesign/voltra/native`.
109
121
 
122
+ ### Examples
123
+
124
+ - `examples/api.ts`
125
+ - `examples/common.ts`
126
+ - `examples/web.ts`
127
+ - `examples/native.ts`
128
+ - `examples/build.ts`
129
+
110
130
  ### Template syntax
111
131
 
112
132
  ```text
@@ -123,9 +143,9 @@ side main, 2fr
123
143
  ### Web usage
124
144
 
125
145
  ```tsx
126
- import { Utils as WebUtils } from "@resistdesign/voltra/web";
146
+ import { getEasyLayout } from "@resistdesign/voltra/web";
127
147
 
128
- const { layout: Layout, areas } = WebUtils.getEasyLayout(undefined, undefined, {
148
+ const { layout: Layout, areas } = getEasyLayout(undefined, undefined, {
129
149
  gap: 12,
130
150
  padding: 16,
131
151
  })`
@@ -138,9 +158,9 @@ const { layout: Layout, areas } = WebUtils.getEasyLayout(undefined, undefined, {
138
158
  ### Native usage
139
159
 
140
160
  ```tsx
141
- import { Utils as NativeUtils } from "@resistdesign/voltra/native";
161
+ import { makeNativeEasyLayout } from "@resistdesign/voltra/native";
142
162
 
143
- const layout = NativeUtils.makeNativeEasyLayout(`
163
+ const layout = makeNativeEasyLayout(`
144
164
  header header, 100px
145
165
  side main, 1fr
146
166
  \\ 1fr 2fr
@@ -168,17 +188,13 @@ Voltra ships a render-agnostic Route core in `@resistdesign/voltra/app` plus pla
168
188
  Web usage (auto-wires `window.history`):
169
189
 
170
190
  ```tsx
171
- import { Utils as WebUtils } from "@resistdesign/voltra/web";
172
-
173
- const { Route } = WebUtils;
191
+ import { Route } from "@resistdesign/voltra/web";
174
192
  ```
175
193
 
176
194
  Native usage (adapter-driven):
177
195
 
178
196
  ```tsx
179
- import { Utils as NativeUtils } from "@resistdesign/voltra/native";
180
-
181
- const { Route, RouteProvider, createManualRouteAdapter } = NativeUtils;
197
+ import { Route, RouteProvider, createManualRouteAdapter } from "@resistdesign/voltra/native";
182
198
  const { adapter, updatePath } = createManualRouteAdapter("/home");
183
199
  ```
184
200
 
@@ -187,9 +203,7 @@ For React Native navigation libraries, Voltra is optimized for react-navigation
187
203
  Native navigation mapping example:
188
204
 
189
205
  ```tsx
190
- import { Utils as NativeUtils } from "@resistdesign/voltra/native";
191
-
192
- const { createNavigationStateRouteAdapter, buildPathFromRouteChain } = NativeUtils;
206
+ import { buildPathFromRouteChain, createNavigationStateRouteAdapter } from "@resistdesign/voltra/native";
193
207
 
194
208
  const adapter = createNavigationStateRouteAdapter({
195
209
  getState: () => navigationRef.getRootState(),
@@ -225,18 +239,19 @@ Voltra's form system is split into a platform-agnostic core and platform suites:
225
239
  ### Web Usage
226
240
 
227
241
  ```tsx
228
- import { Forms } from "@resistdesign/voltra/web";
242
+ import { createWebFormRenderer } from "@resistdesign/voltra/web";
229
243
 
230
- const { AutoField } = Forms.createWebFormRenderer();
244
+ const { AutoField } = createWebFormRenderer();
231
245
  ```
232
246
 
233
247
  Override a single renderer:
234
248
 
235
249
  ```tsx
236
- import { Forms } from "@resistdesign/voltra/web";
250
+ import { withRendererOverride } from "@resistdesign/voltra/app";
251
+ import { createWebFormRenderer } from "@resistdesign/voltra/web";
237
252
 
238
- const { AutoField } = Forms.createWebFormRenderer({
239
- suite: Forms.withRendererOverride("string", (ctx) => {
253
+ const { AutoField } = createWebFormRenderer({
254
+ suite: withRendererOverride("string", (ctx) => {
240
255
  return <input value={(ctx.value as string) || ""} onChange={(e) => ctx.onChange(e.target.value)} />;
241
256
  }),
242
257
  });
@@ -245,9 +260,9 @@ const { AutoField } = Forms.createWebFormRenderer({
245
260
  ### Native Usage
246
261
 
247
262
  ```tsx
248
- import { Forms } from "@resistdesign/voltra/native";
263
+ import { createNativeFormRenderer } from "@resistdesign/voltra/native";
249
264
 
250
- const { AutoField } = Forms.createNativeFormRenderer();
265
+ const { AutoField } = createNativeFormRenderer();
251
266
  ```
252
267
 
253
268
  ### BYOCS (Bring Your Own Component Suite)
@@ -255,9 +270,9 @@ const { AutoField } = Forms.createNativeFormRenderer();
255
270
  Provide partial overrides (renderers and/or primitives). Missing renderers are filled from the default suite and validated.
256
271
 
257
272
  ```tsx
258
- import { Forms } from "@resistdesign/voltra/web";
273
+ import { createWebFormRenderer } from "@resistdesign/voltra/web";
259
274
 
260
- const { AutoField } = Forms.createWebFormRenderer({
275
+ const { AutoField } = createWebFormRenderer({
261
276
  suite: {
262
277
  primitives: {
263
278
  Button: ({ children }) => <button className="my-button">{children}</button>,
@@ -0,0 +1,95 @@
1
+ import type { ListItemsResults } from "../../common/SearchTypes";
2
+ /**
3
+ * Summary of IDs and cursors observed across pages.
4
+ */
5
+ export type DBXPagingTranscript = {
6
+ /**
7
+ * Number of pages inspected.
8
+ */
9
+ pageCount: number;
10
+ /**
11
+ * Cursors observed per page.
12
+ */
13
+ cursors: Array<string | undefined>;
14
+ /**
15
+ * IDs grouped by page.
16
+ */
17
+ idsByPage: string[][];
18
+ /**
19
+ * Flattened IDs across all pages (page order preserved).
20
+ */
21
+ flattenedIds: string[];
22
+ };
23
+ /**
24
+ * Results from paging invariant checks.
25
+ */
26
+ export type DBXPagingAssertionResult = {
27
+ /**
28
+ * True when no invariant violations were detected.
29
+ */
30
+ ok: boolean;
31
+ /**
32
+ * Total items observed across all pages.
33
+ */
34
+ totalItems: number;
35
+ /**
36
+ * Number of unique IDs observed across all pages.
37
+ */
38
+ uniqueItems: number;
39
+ /**
40
+ * IDs that appeared more than once.
41
+ */
42
+ duplicateIds: string[];
43
+ /**
44
+ * Pages with zero items.
45
+ */
46
+ emptyPageIndexes: number[];
47
+ /**
48
+ * Pages that violated the expected page size.
49
+ */
50
+ pageSizeViolations: Array<{
51
+ index: number;
52
+ size: number;
53
+ }>;
54
+ /**
55
+ * Raw paging transcript for debugging.
56
+ */
57
+ transcript: DBXPagingTranscript;
58
+ };
59
+ /**
60
+ * Results from ordering checks against an expected sequence.
61
+ */
62
+ export type DBXOrderingAssertionResult = {
63
+ /**
64
+ * True when actual ordering matches expected ordering.
65
+ */
66
+ ok: boolean;
67
+ /**
68
+ * Actual IDs in observed order.
69
+ */
70
+ actualIds: string[];
71
+ /**
72
+ * Expected IDs for comparison.
73
+ */
74
+ expectedIds: string[];
75
+ /**
76
+ * First mismatched index, if any.
77
+ */
78
+ mismatchIndex?: number;
79
+ };
80
+ /**
81
+ * Build a paging transcript for a set of list results.
82
+ */
83
+ export declare const getDbxPagingTranscript: <ItemType extends Record<string, any>>(pages: Array<ListItemsResults<ItemType>>, idField?: string) => DBXPagingTranscript;
84
+ /**
85
+ * Assert paging invariants such as stable pagination and no duplicates.
86
+ */
87
+ export declare const assertDbxPagingInvariants: <ItemType extends Record<string, any>>(pages: Array<ListItemsResults<ItemType>>, options?: {
88
+ idField?: string;
89
+ itemsPerPage?: number;
90
+ allowEmptyPages?: boolean;
91
+ }) => DBXPagingAssertionResult;
92
+ /**
93
+ * Assert that the observed ordering exactly matches an expected ordering.
94
+ */
95
+ export declare const assertDbxStableOrdering: <ItemType extends Record<string, any>>(pages: Array<ListItemsResults<ItemType>>, expectedIds: string[], idField?: string) => DBXOrderingAssertionResult;
@@ -0,0 +1,5 @@
1
+ import type { DBXRequestInput, DBXResponse, DBXRuntime } from "./DBXTypes";
2
+ /**
3
+ * Run a DBX request through the router.
4
+ */
5
+ export declare const runDbxRequest: <T = unknown>(runtime: DBXRuntime, request: DBXRequestInput) => Promise<DBXResponse<T>>;
@@ -0,0 +1,5 @@
1
+ import type { DBXRuntime, DBXRuntimeConfig } from "./DBXTypes";
2
+ /**
3
+ * Build an in-memory runtime for DBX scenarios.
4
+ */
5
+ export declare const createDbxRuntime: (config: DBXRuntimeConfig) => DBXRuntime;
@@ -0,0 +1,9 @@
1
+ import type { TypeInfoMap } from "../../common/TypeParsing/TypeInfo";
2
+ /**
3
+ * Canonical TypeInfo map used by DBX E2E scenario tests.
4
+ */
5
+ export declare const DBX_TYPE_INFO_MAP: TypeInfoMap;
6
+ /**
7
+ * Ordered list of DBX scenario type names.
8
+ */
9
+ export declare const DBX_TYPE_NAMES: string[];
@@ -0,0 +1,124 @@
1
+ import type { TypeInfoDataItem, TypeInfoMap } from "../../common/TypeParsing/TypeInfo";
2
+ /**
3
+ * Dataset size presets for DBX scenarios.
4
+ */
5
+ export declare const DBX_DATASET_SIZES: {
6
+ readonly SMALL: 50;
7
+ readonly MED: 200;
8
+ readonly LARGE: 1000;
9
+ };
10
+ /**
11
+ * Relationship edge shape used by DBX seeds.
12
+ */
13
+ export type DBXSeedRelationship = {
14
+ /**
15
+ * Type name of the relationship origin.
16
+ */
17
+ fromTypeName: string;
18
+ /**
19
+ * Field name on the origin type that defines the relationship.
20
+ */
21
+ fromTypeFieldName: string;
22
+ /**
23
+ * Primary field value for the origin item.
24
+ */
25
+ fromTypePrimaryFieldValue: string;
26
+ /**
27
+ * Primary field value for the target item.
28
+ */
29
+ toTypePrimaryFieldValue: string;
30
+ };
31
+ /**
32
+ * Configuration for generating a DBX dataset.
33
+ */
34
+ export type DBXSeedConfig = {
35
+ /**
36
+ * Seed used for deterministic generation.
37
+ */
38
+ seed: number | string;
39
+ /**
40
+ * Type info map used to shape items.
41
+ */
42
+ typeInfoMap: TypeInfoMap;
43
+ /**
44
+ * Optional list of type names to seed.
45
+ */
46
+ itemTypeNames?: string[];
47
+ /**
48
+ * Default item count per type when sizeByType is not provided.
49
+ */
50
+ size?: number;
51
+ /**
52
+ * Optional per-type overrides for item counts.
53
+ */
54
+ sizeByType?: Record<string, number>;
55
+ /**
56
+ * Optional base date for date-like string fields.
57
+ */
58
+ baseDate?: string;
59
+ /**
60
+ * Whether to include optional fields (default true).
61
+ */
62
+ includeOptionalFields?: boolean;
63
+ /**
64
+ * Whether to include array fields (default true).
65
+ */
66
+ includeArrayFields?: boolean;
67
+ /**
68
+ * Max array length when generating array fields.
69
+ */
70
+ maxArrayLength?: number;
71
+ /**
72
+ * Custom token pool for text generation.
73
+ */
74
+ textTokenPool?: string[];
75
+ /**
76
+ * Whether to include relationship edges (default true).
77
+ */
78
+ includeRelationships?: boolean;
79
+ /**
80
+ * Ratio of relationship edges that should point at missing targets.
81
+ */
82
+ relationshipDanglingRate?: number;
83
+ /**
84
+ * Number of relationships to generate per item when possible.
85
+ */
86
+ relationshipsPerItem?: number;
87
+ };
88
+ /**
89
+ * Seeded dataset payload returned by {@link makeDbxDataset}.
90
+ */
91
+ export type DBXSeedDataset = {
92
+ /**
93
+ * Seed used for deterministic generation.
94
+ */
95
+ seed: number | string;
96
+ /**
97
+ * Items keyed by type name.
98
+ */
99
+ itemsByType: Record<string, TypeInfoDataItem[]>;
100
+ /**
101
+ * Generated ids per type name.
102
+ */
103
+ idsByType: Record<string, string[]>;
104
+ /**
105
+ * Relationship edges seeded for scenarios.
106
+ */
107
+ relationships: DBXSeedRelationship[];
108
+ /**
109
+ * Token pool used for text values.
110
+ */
111
+ tokenPool: string[];
112
+ };
113
+ /**
114
+ * Generate a deterministic dataset for DBX scenarios.
115
+ */
116
+ export declare const makeDbxDataset: (config: DBXSeedConfig) => DBXSeedDataset;
117
+ /**
118
+ * Build relationship seeds from existing items.
119
+ */
120
+ export declare const makeDbxRelationshipSeeds: (typeInfoMap: TypeInfoMap, itemsByType: Record<string, TypeInfoDataItem[]>, idsByType: Record<string, string[]>, options: {
121
+ seed: number | string;
122
+ relationshipDanglingRate?: number;
123
+ relationshipsPerItem?: number;
124
+ }) => DBXSeedRelationship[];
@@ -0,0 +1,176 @@
1
+ import type { AuthInfo, CORSPatter, RouteAuthConfig, RouteMap } from "../Router/Types";
2
+ import type { DataItemDBDriver, DataItemDBDriverConfig, ItemRelationshipDBDriver } from "../ORM/drivers/common/Types";
3
+ import type { TypeInfoDataItem, TypeInfoMap } from "../../common/TypeParsing/TypeInfo";
4
+ import type { TypeInfoORMDACConfig, TypeInfoORMIndexingConfig } from "../ORM/TypeInfoORMService";
5
+ /**
6
+ * Overrides for building in-memory item drivers per type.
7
+ */
8
+ export type DBXDriverConfigOverrides = Partial<Omit<DataItemDBDriverConfig<TypeInfoDataItem, string>, "uniquelyIdentifyingFieldName">>;
9
+ /**
10
+ * Configuration for constructing a DBX in-memory runtime.
11
+ */
12
+ export type DBXRuntimeConfig = {
13
+ /**
14
+ * Type info map used to validate and shape items.
15
+ */
16
+ typeInfoMap: TypeInfoMap;
17
+ /**
18
+ * Optional list of type names to materialize as item drivers.
19
+ */
20
+ itemTypeNames?: string[];
21
+ /**
22
+ * Optional overrides for per-type driver configs.
23
+ */
24
+ driverConfigByType?: Record<string, DBXDriverConfigOverrides>;
25
+ /**
26
+ * Optional map of custom ID generators for item types.
27
+ */
28
+ idGeneratorsByType?: Record<string, (targetItem: TypeInfoDataItem) => string>;
29
+ /**
30
+ * Optional prebuilt drivers keyed by type name.
31
+ */
32
+ drivers?: Record<string, DataItemDBDriver<any, any>>;
33
+ /**
34
+ * Optional relationship driver to use when relation indexing is disabled.
35
+ */
36
+ relationshipDriver?: ItemRelationshipDBDriver;
37
+ /**
38
+ * Optional indexing configuration override.
39
+ */
40
+ indexing?: TypeInfoORMIndexingConfig;
41
+ /**
42
+ * When true (default), in-memory indexing backends are supplied.
43
+ */
44
+ useInMemoryIndexing?: boolean;
45
+ /**
46
+ * Base path prefix for ORM routes.
47
+ */
48
+ basePath?: string;
49
+ /**
50
+ * Route auth configuration for ORM routes.
51
+ */
52
+ authConfig?: RouteAuthConfig;
53
+ /**
54
+ * Allowed origins used to generate CORS headers.
55
+ */
56
+ allowedOrigins?: CORSPatter[];
57
+ /**
58
+ * Optional DAC configuration (excluding accessing role).
59
+ */
60
+ dacConfig?: TypeInfoORMDACConfig;
61
+ /**
62
+ * Optional accessor to resolve the accessing role id from auth info.
63
+ */
64
+ getAccessingRoleId?: (authInfo: AuthInfo) => string;
65
+ /**
66
+ * Optional predicate to decide whether errors are exposed.
67
+ */
68
+ errorShouldBeExposedToClient?: (error: unknown) => boolean;
69
+ };
70
+ /**
71
+ * Resolved DBX runtime dependencies for tests.
72
+ */
73
+ export type DBXRuntime = {
74
+ /**
75
+ * Type info map used by the ORM service.
76
+ */
77
+ typeInfoMap: TypeInfoMap;
78
+ /**
79
+ * Base path prefix for ORM routes.
80
+ */
81
+ basePath: string;
82
+ /**
83
+ * Route map bound to the in-memory ORM service.
84
+ */
85
+ routeMap: RouteMap;
86
+ /**
87
+ * Allowed origins for CORS headers.
88
+ */
89
+ allowedOrigins: CORSPatter[];
90
+ /**
91
+ * Driver resolver for item types.
92
+ */
93
+ getDriver: (typeName: string) => DataItemDBDriver<any, any>;
94
+ /**
95
+ * Built driver instances keyed by type name.
96
+ */
97
+ drivers: Record<string, DataItemDBDriver<any, any>>;
98
+ /**
99
+ * Optional relationship driver used when relation indexing is off.
100
+ */
101
+ relationshipDriver?: ItemRelationshipDBDriver;
102
+ /**
103
+ * Indexing configuration used by the ORM service.
104
+ */
105
+ indexing?: TypeInfoORMIndexingConfig;
106
+ /**
107
+ * Optional auth config applied to ORM routes.
108
+ */
109
+ authConfig?: RouteAuthConfig;
110
+ /**
111
+ * Optional DAC configuration excluding accessing role.
112
+ */
113
+ dacConfig?: TypeInfoORMDACConfig;
114
+ /**
115
+ * Optional accessor to resolve the accessing role id from auth info.
116
+ */
117
+ getAccessingRoleId?: (authInfo: AuthInfo) => string;
118
+ /**
119
+ * Optional predicate to decide whether errors are exposed.
120
+ */
121
+ errorShouldBeExposedToClient?: (error: unknown) => boolean;
122
+ };
123
+ /**
124
+ * Input payload for a DBX router request.
125
+ */
126
+ export type DBXRequestInput = {
127
+ /**
128
+ * HTTP method for the request.
129
+ */
130
+ method: string;
131
+ /**
132
+ * Route path segment, relative to the DBX base path.
133
+ */
134
+ path: string;
135
+ /**
136
+ * Arguments passed to the handler (body array).
137
+ */
138
+ args?: any[];
139
+ /**
140
+ * Optional body payload (used when args are omitted).
141
+ */
142
+ body?: any;
143
+ /**
144
+ * Optional headers to include on the request.
145
+ */
146
+ headers?: Record<string, string>;
147
+ /**
148
+ * Optional auth info for the request.
149
+ */
150
+ auth?: AuthInfo;
151
+ /**
152
+ * Optional origin header value.
153
+ */
154
+ origin?: string;
155
+ };
156
+ /**
157
+ * Parsed response returned by the DBX request runner.
158
+ */
159
+ export type DBXResponse<T = unknown> = {
160
+ /**
161
+ * HTTP status code returned by the router.
162
+ */
163
+ statusCode: number;
164
+ /**
165
+ * Response headers returned by the router.
166
+ */
167
+ headers: Record<string, string>;
168
+ /**
169
+ * Raw response body string.
170
+ */
171
+ body: string;
172
+ /**
173
+ * Parsed response body when JSON parsing succeeds.
174
+ */
175
+ parsedBody?: T;
176
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * DBX testing utilities and helpers.
3
+ */
4
+ export * from "./DBXAsserts";
5
+ export * from "./DBXRequest";
6
+ export * from "./DBXRuntime";
7
+ export * from "./DBXSeed";
8
+ export * from "./DBXTypes";