@resistdesign/voltra 3.0.0-alpha.5 → 3.0.0-alpha.51

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 (222) hide show
  1. package/README.md +392 -14
  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 +224 -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 +209 -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 +212 -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 +144 -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 +184 -0
  40. package/api/Indexing/structured/StructuredDdbBackend.d.ts +112 -0
  41. package/api/Indexing/structured/StructuredInMemoryBackend.d.ts +40 -0
  42. package/api/Indexing/structured/StructuredInMemoryIndex.d.ts +61 -0
  43. package/api/Indexing/structured/StructuredStringLike.d.ts +54 -0
  44. package/api/Indexing/structured/StructuredWriter.d.ts +74 -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 +70 -0
  51. package/api/ORM/TypeInfoORMService.d.ts +879 -0
  52. package/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.d.ts +229 -0
  53. package/api/ORM/drivers/DynamoDBDataItemDBDriver.d.ts +90 -0
  54. package/api/ORM/drivers/InMemoryDataItemDBDriver/ConfigTypes.d.ts +4 -0
  55. package/api/ORM/drivers/InMemoryDataItemDBDriver.d.ts +56 -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 +202 -0
  65. package/api/ORM/drivers/common/index.d.ts +2 -0
  66. package/api/ORM/drivers/index.d.ts +8 -0
  67. package/api/ORM/getTypeInfoORMIndexingConfigFromTypeInfoMap.d.ts +31 -0
  68. package/api/ORM/index.d.ts +10 -0
  69. package/api/ORM/indexing/criteriaToStructuredWhere.d.ts +22 -0
  70. package/api/Router/AWS.d.ts +80 -0
  71. package/api/Router/Auth.d.ts +14 -0
  72. package/api/Router/CORS.d.ts +66 -0
  73. package/api/Router/Types.d.ts +138 -0
  74. package/api/Router/index.d.ts +89 -0
  75. package/api/index.d.ts +72 -6
  76. package/api/index.js +3553 -1948
  77. package/app/forms/Engine.d.ts +23 -0
  78. package/app/forms/UI.d.ts +83 -0
  79. package/app/forms/core/createAutoField.d.ts +43 -0
  80. package/app/forms/core/createFormRenderer.d.ts +25 -0
  81. package/app/forms/core/getFieldKind.d.ts +14 -0
  82. package/app/forms/core/index.d.ts +11 -0
  83. package/app/forms/core/mergeSuites.d.ts +23 -0
  84. package/app/forms/core/resolveSuite.d.ts +15 -0
  85. package/app/forms/core/types.d.ts +180 -0
  86. package/app/forms/index.d.ts +9 -0
  87. package/app/forms/types.d.ts +137 -0
  88. package/app/helpers/styled.d.ts +3 -0
  89. package/app/index.d.ts +116 -5
  90. package/app/index.js +120 -382
  91. package/app/utils/ApplicationState.d.ts +161 -0
  92. package/app/utils/ApplicationStateLoader.d.ts +91 -0
  93. package/app/utils/Controller.d.ts +10 -0
  94. package/app/utils/Debug.d.ts +14 -0
  95. package/app/utils/EasyLayout.d.ts +89 -0
  96. package/app/utils/History.d.ts +165 -0
  97. package/app/utils/Route.d.ts +207 -0
  98. package/app/utils/RouteHistory.d.ts +27 -0
  99. package/app/utils/Service.d.ts +45 -0
  100. package/app/utils/TypeInfoORMAPIUtils.d.ts +94 -0
  101. package/app/utils/TypeInfoORMClient.d.ts +104 -0
  102. package/app/utils/UniversalRouteAdapter.d.ts +73 -0
  103. package/app/utils/easy-layout/computeAreaBounds.d.ts +5 -0
  104. package/app/utils/easy-layout/computeTracks.d.ts +16 -0
  105. package/app/utils/easy-layout/index.d.ts +5 -0
  106. package/app/utils/easy-layout/parseTemplate.d.ts +12 -0
  107. package/app/utils/easy-layout/types.d.ts +52 -0
  108. package/app/utils/easy-layout/validateAreas.d.ts +5 -0
  109. package/app/utils/index.d.ts +24 -0
  110. package/build/TypeMapping.d.ts +17 -0
  111. package/build/TypeParsing.d.ts +10 -0
  112. package/build/index.d.ts +15 -0
  113. package/build/index.js +569 -0
  114. package/chunk-2JDOM6PB.js +138 -0
  115. package/chunk-3HVYVX3S.js +546 -0
  116. package/chunk-ATO2455Q.js +258 -0
  117. package/chunk-BSHQIRBV.js +71 -0
  118. package/chunk-I2KLQ2HA.js +19 -0
  119. package/chunk-K4R2PFNG.js +1258 -0
  120. package/chunk-TJFTWPXQ.js +39 -0
  121. package/chunk-XHOMAXLR.js +84 -0
  122. package/common/CommandLine/collectRequiredEnvironmentVariables.d.ts +9 -0
  123. package/common/CommandLine/index.d.ts +6 -0
  124. package/common/HelperTypes.d.ts +9 -0
  125. package/common/IdGeneration/getSimpleId.d.ts +8 -0
  126. package/common/IdGeneration/index.d.ts +1 -0
  127. package/common/ItemRelationshipInfoTypes.d.ts +64 -0
  128. package/common/ItemRelationships/ItemRelationshipValidation.d.ts +21 -0
  129. package/common/ItemRelationships/index.d.ts +2 -0
  130. package/common/Logging/Utils.d.ts +10 -0
  131. package/common/Logging/index.d.ts +1 -0
  132. package/common/Routing.d.ts +81 -0
  133. package/common/SearchTypes.d.ts +227 -0
  134. package/common/SearchUtils.d.ts +55 -0
  135. package/common/SearchValidation.d.ts +27 -0
  136. package/common/StringTransformers.d.ts +28 -0
  137. package/common/Testing/CLI.d.ts +6 -0
  138. package/common/Testing/Types.d.ts +216 -0
  139. package/common/Testing/Utils.d.ts +112 -0
  140. package/common/Testing/index.d.ts +8 -0
  141. package/common/TypeInfoDataItemUtils.d.ts +39 -0
  142. package/{Types-C7XjUjoF.d.ts → common/TypeInfoORM/Types.d.ts} +150 -20
  143. package/common/TypeInfoORM/index.d.ts +3 -0
  144. package/common/TypeParsing/Constants.d.ts +4 -0
  145. package/common/TypeParsing/ParsingUtils/Constants.d.ts +8 -0
  146. package/common/TypeParsing/ParsingUtils/checkType.d.ts +14 -0
  147. package/common/TypeParsing/ParsingUtils/checkUnionType.d.ts +12 -0
  148. package/common/TypeParsing/ParsingUtils/extractCommentTags.d.ts +8 -0
  149. package/common/TypeParsing/ParsingUtils/extractLiteralValues.d.ts +12 -0
  150. package/common/TypeParsing/ParsingUtils/extractTypeDetails.d.ts +14 -0
  151. package/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.d.ts +18 -0
  152. package/common/TypeParsing/ParsingUtils/getTypeInfo.d.ts +9 -0
  153. package/common/TypeParsing/ParsingUtils/getTypeInfoField.d.ts +9 -0
  154. package/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.d.ts +11 -0
  155. package/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.d.ts +12 -0
  156. package/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.d.ts +11 -0
  157. package/common/TypeParsing/ParsingUtils/getTypeKeyword.d.ts +9 -0
  158. package/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.d.ts +11 -0
  159. package/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.d.ts +8 -0
  160. package/common/TypeParsing/TypeInfo.d.ts +235 -0
  161. package/common/TypeParsing/Utils.d.ts +47 -0
  162. package/common/TypeParsing/Validation.d.ts +327 -0
  163. package/common/TypeParsing/index.d.ts +8 -0
  164. package/common/index.d.ts +47 -4
  165. package/common/index.js +25 -1737
  166. package/{index-BkFZlfit.d.ts → iac/SimpleCFT.d.ts} +5 -25
  167. package/iac/index.d.ts +40 -2
  168. package/iac/index.js +2 -1661
  169. package/iac/packs/auth.d.ts +131 -0
  170. package/iac/packs/build/utils.d.ts +289 -0
  171. package/iac/packs/build.d.ts +92 -0
  172. package/iac/packs/cdn.d.ts +33 -0
  173. package/iac/packs/cloud-function.d.ts +67 -0
  174. package/iac/packs/database.d.ts +32 -0
  175. package/iac/packs/dns.d.ts +34 -0
  176. package/iac/packs/file-storage.d.ts +46 -0
  177. package/iac/packs/gateway.d.ts +82 -0
  178. package/iac/packs/index.d.ts +60 -1
  179. package/iac/packs/index.js +391 -594
  180. package/iac/packs/repo.d.ts +28 -0
  181. package/iac/packs/ssl-certificate.d.ts +28 -0
  182. package/iac/types/Constants.d.ts +24 -0
  183. package/{index-DcvJOZ_c.d.ts → iac/types/IaCTypes.d.ts} +23 -1018
  184. package/iac/types/Renderers.d.ts +96 -0
  185. package/iac/types/Types.d.ts +131 -0
  186. package/iac/types/Utils.d.ts +9 -0
  187. package/iac/types/generate.d.ts +1 -0
  188. package/iac/utils/index.d.ts +87 -0
  189. package/iac/utils/patch-utils.d.ts +66 -0
  190. package/iac-packs/index.d.ts +6 -0
  191. package/native/forms/UI.d.ts +73 -0
  192. package/native/forms/createNativeFormRenderer.d.ts +21 -0
  193. package/native/forms/index.d.ts +25 -0
  194. package/native/forms/primitives/index.d.ts +38 -0
  195. package/native/forms/suite.d.ts +15 -0
  196. package/native/index.d.ts +19 -0
  197. package/native/index.js +792 -0
  198. package/native/testing/react-native.d.ts +46 -0
  199. package/native/utils/EasyLayout.d.ts +88 -0
  200. package/native/utils/History.d.ts +124 -0
  201. package/native/utils/NavButton.d.ts +25 -0
  202. package/native/utils/Route.d.ts +41 -0
  203. package/native/utils/index.d.ts +25 -0
  204. package/package.json +54 -21
  205. package/web/forms/UI.d.ts +74 -0
  206. package/web/forms/createWebFormRenderer.d.ts +21 -0
  207. package/web/forms/index.d.ts +9 -0
  208. package/web/forms/primitives/index.d.ts +21 -0
  209. package/web/forms/suite.d.ts +15 -0
  210. package/web/index.d.ts +15 -0
  211. package/web/index.js +701 -0
  212. package/web/utils/EasyLayout.d.ts +47 -0
  213. package/web/utils/NavLink.d.ts +24 -0
  214. package/web/utils/Route.d.ts +16 -0
  215. package/web/utils/index.d.ts +8 -0
  216. package/SearchTypes-DjN6YQzE.d.ts +0 -577
  217. package/Validation-CFP59oIP.d.ts +0 -226
  218. package/index-C3-iD9Mh.d.ts +0 -690
  219. package/index-CK5Qwvfb.d.ts +0 -5378
  220. package/index-IokxSNxm.d.ts +0 -745
  221. package/index.d.ts +0 -13
  222. package/index.js +0 -11005
@@ -0,0 +1,39 @@
1
+ // src/app/utils/easy-layout/computeTracks.ts
2
+ var computeTrackPixels = ({
3
+ tracks,
4
+ totalPx,
5
+ gapPx = 0,
6
+ paddingPx = 0
7
+ }) => {
8
+ if (!tracks.length) {
9
+ return [];
10
+ }
11
+ const gapsPx = Math.max(0, tracks.length - 1) * Math.max(0, gapPx);
12
+ const usablePx = Math.max(0, totalPx - Math.max(0, paddingPx) * 2 - gapsPx);
13
+ let fixedPx = 0;
14
+ let frTotal = 0;
15
+ for (const track of tracks) {
16
+ if (track.kind === "px") {
17
+ fixedPx += track.value;
18
+ } else if (track.kind === "pct") {
19
+ fixedPx += usablePx * track.value / 100;
20
+ } else {
21
+ frTotal += track.value;
22
+ }
23
+ }
24
+ const remainderPx = Math.max(0, usablePx - fixedPx);
25
+ return tracks.map((track) => {
26
+ if (track.kind === "px") {
27
+ return track.value;
28
+ }
29
+ if (track.kind === "pct") {
30
+ return usablePx * track.value / 100;
31
+ }
32
+ if (frTotal <= 0) {
33
+ return 0;
34
+ }
35
+ return remainderPx * track.value / frTotal;
36
+ });
37
+ };
38
+
39
+ export { computeTrackPixels };
@@ -0,0 +1,84 @@
1
+ // src/common/SearchTypes.ts
2
+ var LogicalOperators = /* @__PURE__ */ ((LogicalOperators2) => {
3
+ LogicalOperators2["AND"] = "AND";
4
+ LogicalOperators2["OR"] = "OR";
5
+ return LogicalOperators2;
6
+ })(LogicalOperators || {});
7
+ var ComparisonOperators = /* @__PURE__ */ ((ComparisonOperators2) => {
8
+ ComparisonOperators2["EQUALS"] = "EQUALS";
9
+ ComparisonOperators2["NOT_EQUALS"] = "NOT_EQUALS";
10
+ ComparisonOperators2["GREATER_THAN"] = "GREATER_THAN";
11
+ ComparisonOperators2["GREATER_THAN_OR_EQUAL"] = "GREATER_THAN_OR_EQUAL";
12
+ ComparisonOperators2["LESS_THAN"] = "LESS_THAN";
13
+ ComparisonOperators2["LESS_THAN_OR_EQUAL"] = "LESS_THAN_OR_EQUAL";
14
+ ComparisonOperators2["IN"] = "IN";
15
+ ComparisonOperators2["NOT_IN"] = "NOT_IN";
16
+ ComparisonOperators2["LIKE"] = "LIKE";
17
+ ComparisonOperators2["NOT_LIKE"] = "NOT_LIKE";
18
+ ComparisonOperators2["EXISTS"] = "EXISTS";
19
+ ComparisonOperators2["NOT_EXISTS"] = "NOT_EXISTS";
20
+ ComparisonOperators2["IS_NOT_EMPTY"] = "IS_NOT_EMPTY";
21
+ ComparisonOperators2["IS_EMPTY"] = "IS_EMPTY";
22
+ ComparisonOperators2["BETWEEN"] = "BETWEEN";
23
+ ComparisonOperators2["NOT_BETWEEN"] = "NOT_BETWEEN";
24
+ ComparisonOperators2["CONTAINS"] = "CONTAINS";
25
+ ComparisonOperators2["NOT_CONTAINS"] = "NOT_CONTAINS";
26
+ ComparisonOperators2["STARTS_WITH"] = "STARTS_WITH";
27
+ ComparisonOperators2["ENDS_WITH"] = "ENDS_WITH";
28
+ ComparisonOperators2["DOES_NOT_START_WITH"] = "DOES_NOT_START_WITH";
29
+ ComparisonOperators2["DOES_NOT_END_WITH"] = "DOES_NOT_END_WITH";
30
+ return ComparisonOperators2;
31
+ })(ComparisonOperators || {});
32
+
33
+ // src/common/TypeInfoORM/Types.ts
34
+ var ITEM_RELATIONSHIP_DAC_RESOURCE_NAME = "TYPE_INFO_ORM_ITEM_RELATIONSHIP";
35
+ var RelationshipOperation = /* @__PURE__ */ ((RelationshipOperation2) => {
36
+ RelationshipOperation2["GET"] = "GET";
37
+ RelationshipOperation2["SET"] = "SET";
38
+ RelationshipOperation2["UNSET"] = "UNSET";
39
+ return RelationshipOperation2;
40
+ })(RelationshipOperation || {});
41
+ var OperationGroup = /* @__PURE__ */ ((OperationGroup2) => {
42
+ OperationGroup2["ALL_OPERATIONS"] = "ALL_OPERATIONS";
43
+ OperationGroup2["ALL_ITEM_OPERATIONS"] = "ALL_ITEM_OPERATIONS";
44
+ OperationGroup2["ALL_RELATIONSHIP_OPERATIONS"] = "ALL_RELATIONSHIP_OPERATIONS";
45
+ return OperationGroup2;
46
+ })(OperationGroup || {});
47
+ var TypeInfoORMServiceError = /* @__PURE__ */ ((TypeInfoORMServiceError2) => {
48
+ TypeInfoORMServiceError2["NO_DRIVERS_SUPPLIED"] = "NO_DRIVERS_SUPPLIED";
49
+ TypeInfoORMServiceError2["NO_RELATIONSHIP_DRIVERS_SUPPLIED"] = "NO_RELATIONSHIP_DRIVERS_SUPPLIED";
50
+ TypeInfoORMServiceError2["NO_PRIMARY_FIELD_VALUE_SUPPLIED"] = "NO_PRIMARY_FIELD_VALUE_SUPPLIED";
51
+ TypeInfoORMServiceError2["INVALID_DRIVER"] = "INVALID_DRIVER";
52
+ TypeInfoORMServiceError2["INVALID_RELATIONSHIP_DRIVER"] = "INVALID_RELATIONSHIP_DRIVER";
53
+ TypeInfoORMServiceError2["INVALID_TYPE_INFO"] = "INVALID_TYPE_INFO";
54
+ TypeInfoORMServiceError2["TYPE_INFO_MISSING_PRIMARY_FIELD"] = "TYPE_INFO_MISSING_PRIMARY_FIELD";
55
+ TypeInfoORMServiceError2["INVALID_RELATIONSHIP"] = "INVALID_RELATIONSHIP";
56
+ TypeInfoORMServiceError2["INVALID_OPERATION"] = "INVALID_OPERATION";
57
+ TypeInfoORMServiceError2["INVALID_UPDATE_OPERATOR"] = "INVALID_UPDATE_OPERATOR";
58
+ TypeInfoORMServiceError2["MISSING_ACCESSING_ROLE"] = "MISSING_ACCESSING_ROLE";
59
+ TypeInfoORMServiceError2["INDEXING_UNSUPPORTED_CRITERIA"] = "INDEXING_UNSUPPORTED_CRITERIA";
60
+ TypeInfoORMServiceError2["INDEXING_UNSUPPORTED_COMBINATION"] = "INDEXING_UNSUPPORTED_COMBINATION";
61
+ TypeInfoORMServiceError2["INDEXING_MISSING_BACKEND"] = "INDEXING_MISSING_BACKEND";
62
+ TypeInfoORMServiceError2["INDEXING_REQUIRES_CRITERIA"] = "INDEXING_REQUIRES_CRITERIA";
63
+ return TypeInfoORMServiceError2;
64
+ })(TypeInfoORMServiceError || {});
65
+ var TypeInfoORMAPIRoutePaths = /* @__PURE__ */ ((TypeInfoORMAPIRoutePaths2) => {
66
+ TypeInfoORMAPIRoutePaths2["CREATE"] = "create";
67
+ TypeInfoORMAPIRoutePaths2["READ"] = "read";
68
+ TypeInfoORMAPIRoutePaths2["UPDATE"] = "update";
69
+ TypeInfoORMAPIRoutePaths2["DELETE"] = "delete";
70
+ TypeInfoORMAPIRoutePaths2["LIST"] = "list";
71
+ TypeInfoORMAPIRoutePaths2["CREATE_RELATIONSHIP"] = "create-relationship";
72
+ TypeInfoORMAPIRoutePaths2["DELETE_RELATIONSHIP"] = "delete-relationship";
73
+ TypeInfoORMAPIRoutePaths2["LIST_RELATIONSHIPS"] = "list-relationships";
74
+ TypeInfoORMAPIRoutePaths2["LIST_RELATED_ITEMS"] = "list-related-items";
75
+ return TypeInfoORMAPIRoutePaths2;
76
+ })(TypeInfoORMAPIRoutePaths || {});
77
+ var TypeInfoORMUpdateOperators = {
78
+ NUMBER: {
79
+ INCREMENT: "INCREMENT",
80
+ DECREMENT: "DECREMENT"
81
+ }
82
+ };
83
+
84
+ export { ComparisonOperators, ITEM_RELATIONSHIP_DAC_RESOURCE_NAME, LogicalOperators, OperationGroup, RelationshipOperation, TypeInfoORMAPIRoutePaths, TypeInfoORMServiceError, TypeInfoORMUpdateOperators };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Collect required environment variables or throw with a missing-name error.
3
+ *
4
+ * @typeParam VarName - Allowed environment variable names.
5
+ * @param varNames - List of required environment variable names.
6
+ * @returns Map of environment variable names to values.
7
+ * @throws Error when a required variable is missing or empty.
8
+ */
9
+ export declare const collectRequiredEnvironmentVariables: <VarName extends string>(varNames: VarName[]) => Record<VarName, string>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Command-line utilities.
5
+ */
6
+ export * from "./collectRequiredEnvironmentVariables";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Expand inferred types for clearer IntelliSense/display.
3
+ *
4
+ * @typeParam T - Type to expand.
5
+ */
6
+ export type ExpandComplexType<T> = {
7
+ [K in keyof T]: T[K];
8
+ } & {};
9
+ export declare const HelperTypes: {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get a simple id, unique to the current run session.
3
+ *
4
+ * Includes a counter and timestamp so it stays unique within the same process.
5
+ *
6
+ * @returns A process-unique string id.
7
+ */
8
+ export declare const getSimpleId: () => string;
@@ -0,0 +1 @@
1
+ export * from "./getSimpleId";
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Relationship info types used by ORM and relationship utilities.
3
+ */
4
+ import type { ExpandComplexType } from "./HelperTypes";
5
+ /**
6
+ * The keys for item relationship info.
7
+ * */
8
+ export declare enum ItemRelationshipInfoKeys {
9
+ /**
10
+ * Relationship origin type name.
11
+ * */
12
+ fromTypeName = "fromTypeName",
13
+ /**
14
+ * Relationship origin field name.
15
+ * */
16
+ fromTypeFieldName = "fromTypeFieldName",
17
+ /**
18
+ * Relationship origin primary field value.
19
+ * */
20
+ fromTypePrimaryFieldValue = "fromTypePrimaryFieldValue",
21
+ /**
22
+ * Relationship destination primary field value.
23
+ * */
24
+ toTypePrimaryFieldValue = "toTypePrimaryFieldValue"
25
+ }
26
+ /**
27
+ * The identifying keys for item relationship info.
28
+ * */
29
+ export declare enum ItemRelationshipInfoIdentifyingKeys {
30
+ /**
31
+ * Identifier value for a relationship item.
32
+ * */
33
+ id = "id"
34
+ }
35
+ /**
36
+ * The basis for an `ItemRelationshipInfo` without an assigned identifier.
37
+ * */
38
+ export type BaseItemRelationshipInfo = Record<ItemRelationshipInfoKeys, string>;
39
+ /**
40
+ * An item containing the information about a relationship between two items.
41
+ * */
42
+ export type ItemRelationshipInfo = BaseItemRelationshipInfo & Record<ItemRelationshipInfoIdentifyingKeys, string>;
43
+ /**
44
+ * The origination portion of an `ItemRelationshipInfo`.
45
+ * */
46
+ export type ItemRelationshipOriginInfo = Record<ItemRelationshipInfoKeys.fromTypeName | ItemRelationshipInfoKeys.fromTypeFieldName, string>;
47
+ /**
48
+ * The origination portion of an `ItemRelationshipInfo` for a specific item and field relationship.
49
+ * */
50
+ export type ItemRelationshipOriginItemInfo = ExpandComplexType<ItemRelationshipOriginInfo & Record<ItemRelationshipInfoKeys.fromTypePrimaryFieldValue, string>>;
51
+ /**
52
+ * The destination portion of an `ItemRelationshipInfo` for a specific, related item.
53
+ * */
54
+ export type ItemRelationshipDestinationItemInfo = Record<ItemRelationshipInfoKeys.toTypePrimaryFieldValue, string>;
55
+ /**
56
+ * The originating item info portion of an `ItemRelationshipInfo`.
57
+ *
58
+ * Used for relationship originating from a specific item, regardless of field relationship.
59
+ * */
60
+ export type ItemRelationshipOriginatingItemInfo = Record<ItemRelationshipInfoKeys.fromTypeName | ItemRelationshipInfoKeys.fromTypePrimaryFieldValue, string>;
61
+ /**
62
+ * One of the various types describing an item relationship.
63
+ * */
64
+ export type ItemRelationshipInfoType = BaseItemRelationshipInfo | ItemRelationshipInfo | ItemRelationshipOriginInfo | ItemRelationshipOriginItemInfo;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Validation helpers for relationship items.
3
+ */
4
+ import type { TypeInfoValidationResults } from "../TypeParsing/Validation";
5
+ import { ItemRelationshipInfoKeys, ItemRelationshipInfoType } from "../ItemRelationshipInfoTypes";
6
+ /**
7
+ * Error codes for relationship validation.
8
+ * */
9
+ export declare const TYPE_INFO_ORM_RELATIONSHIP_ERRORS: {
10
+ INVALID_RELATIONSHIP_ITEM: string;
11
+ INVALID_RELATIONSHIP_ITEM_FIELD: string;
12
+ MISSING_RELATIONSHIP_ITEM_FIELD: string;
13
+ };
14
+ /**
15
+ * Validates a relationship item.
16
+ *
17
+ * @param relationshipItem - Relationship item to validate.
18
+ * @param omitFields - Relationship keys to ignore during validation.
19
+ * @returns Validation results with errors and errorMap when invalid.
20
+ * */
21
+ export declare const validateRelationshipItem: (relationshipItem: ItemRelationshipInfoType, omitFields: ItemRelationshipInfoKeys[]) => TypeInfoValidationResults;
@@ -0,0 +1,2 @@
1
+ export * from "./ItemRelationshipValidation";
2
+ export * from "../TypeParsing/Validation";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Logging tags used by {@link logFunctionCall}.
3
+ */
4
+ export declare enum LOGGING_MESSAGES {
5
+ LOGGING_FUNCTION_CALL = "LOGGING_FUNCTION_CALL",
6
+ INPUT = "INPUT",
7
+ OUTPUT = "OUTPUT",
8
+ ERROR = "ERROR"
9
+ }
10
+ export declare const logFunctionCall: (label: string, args: any[], functionRef: (...args: any[]) => Promise<any> | any, enabled: boolean) => Promise<any>;
@@ -0,0 +1 @@
1
+ export * from "./Utils";
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Helpers for parsing and composing path strings used by the Router utilities.
3
+ */
4
+ /**
5
+ * The delimiter used to separate paths.
6
+ */
7
+ export declare const PATH_DELIMITER = "/";
8
+ /**
9
+ * Parse a string into JSON if possible, otherwise return the raw value.
10
+ *
11
+ * @param value - Input string to parse.
12
+ * @returns Parsed JSON or the original string.
13
+ */
14
+ export declare const getPotentialJSONValue: (value: string) => any;
15
+ /**
16
+ * Get the path segments from a path string.
17
+ *
18
+ * @param path - Path string to split.
19
+ * @param delimiter - Delimiter used to split the path.
20
+ * @param filterEmptyOutput - Whether to remove empty output segments.
21
+ * @param filterEmptyInput - Whether to remove empty input segments.
22
+ * @param useJson - Whether to parse each segment as JSON.
23
+ * @param uriDecodeParts - Whether to URI-decode each segment.
24
+ * @returns Array of path segments.
25
+ * */
26
+ export declare const getPathArray: (path: string, delimiter?: string, filterEmptyOutput?: boolean, filterEmptyInput?: boolean, useJson?: boolean, uriDecodeParts?: boolean) => any[];
27
+ /**
28
+ * Get the path string from path segments.
29
+ *
30
+ * @param parts - Path segments to join.
31
+ * @param delimiter - Delimiter used to join the path.
32
+ * @param filterEmptyInput - Whether to remove empty input segments.
33
+ * @param useJson - Whether to JSON-stringify each segment.
34
+ * @param uriEncodeParts - Whether to URI-encode each segment.
35
+ * @returns Joined path string.
36
+ * */
37
+ export declare const getPathString: (parts?: any[], delimiter?: string, filterEmptyInput?: boolean, useJson?: boolean, uriEncodeParts?: boolean) => string;
38
+ /**
39
+ * Merge two path strings.
40
+ *
41
+ * @param path1 - First path string.
42
+ * @param path2 - Second path string.
43
+ * @param delimiter - Delimiter used to split and join paths.
44
+ * @param filterEmptyOutput - Whether to remove empty output segments.
45
+ * @param filterEmptyInput - Whether to remove empty input segments.
46
+ * @param useJson - Whether to parse/serialize segments as JSON.
47
+ * @param uriEncodeParts - Whether to URI-encode each segment.
48
+ * @returns Merged path string.
49
+ * */
50
+ export declare const mergeStringPaths: (path1: string, path2: string, delimiter?: string, filterEmptyOutput?: boolean, filterEmptyInput?: boolean, useJson?: boolean, uriEncodeParts?: boolean) => string;
51
+ /**
52
+ * Resolve a path string against another path string.
53
+ *
54
+ * @param currentPath - Base path to resolve against.
55
+ * @param newPath - New path to resolve, absolute or relative.
56
+ * @returns Resolved path string.
57
+ * */
58
+ export declare const resolvePath: (currentPath: string, newPath: string) => string;
59
+ /**
60
+ * Resolve RouteAdapter navigation input against the current path.
61
+ *
62
+ * Rules:
63
+ * - `"/x"` resolves from root.
64
+ * - `"x"` and `"./x"` resolve under current path.
65
+ * - `"../x"` resolves one level up per `..`.
66
+ * - `"/"` and `""` both resolve to root (`"/"`).
67
+ *
68
+ * @param currentPath - Current absolute path (query/hash ignored).
69
+ * @param nextPath - Adapter navigation target (absolute or relative).
70
+ * @returns Resolved absolute path string.
71
+ */
72
+ export declare const resolveRouteAdapterPath: (currentPath: string, nextPath: string) => string;
73
+ /**
74
+ * Get the parameter values from a path string and test the `path` against a `testPath`.
75
+ *
76
+ * @param path - Actual path to test.
77
+ * @param testPath - Route pattern to match against.
78
+ * @param exact - Whether to require an exact match.
79
+ * @returns Params object when matched, otherwise false.
80
+ * */
81
+ export declare const getParamsAndTestPath: (path: string, testPath: string, exact?: boolean) => Record<string, any> | false;
@@ -0,0 +1,227 @@
1
+ /**
2
+ * Search-related types used by list/search APIs.
3
+ */
4
+ import { ItemRelationshipInfo, ItemRelationshipOriginItemInfo } from "./ItemRelationshipInfoTypes";
5
+ /**
6
+ * The logical operators for a search criteria.
7
+ * */
8
+ export declare enum LogicalOperators {
9
+ /**
10
+ * Require all criteria to match.
11
+ * */
12
+ AND = "AND",
13
+ /**
14
+ * Require any criteria to match.
15
+ * */
16
+ OR = "OR"
17
+ }
18
+ /**
19
+ * The comparison operators for a field criterion.
20
+ * */
21
+ export declare enum ComparisonOperators {
22
+ /**
23
+ * Field value equals the criterion value.
24
+ * */
25
+ EQUALS = "EQUALS",
26
+ /**
27
+ * Field value does not equal the criterion value.
28
+ * */
29
+ NOT_EQUALS = "NOT_EQUALS",
30
+ /**
31
+ * Field value is greater than the criterion value.
32
+ * */
33
+ GREATER_THAN = "GREATER_THAN",
34
+ /**
35
+ * Field value is greater than or equal to the criterion value.
36
+ * */
37
+ GREATER_THAN_OR_EQUAL = "GREATER_THAN_OR_EQUAL",
38
+ /**
39
+ * Field value is less than the criterion value.
40
+ * */
41
+ LESS_THAN = "LESS_THAN",
42
+ /**
43
+ * Field value is less than or equal to the criterion value.
44
+ * */
45
+ LESS_THAN_OR_EQUAL = "LESS_THAN_OR_EQUAL",
46
+ /**
47
+ * Field value is in the provided options.
48
+ * */
49
+ IN = "IN",
50
+ /**
51
+ * Field value is not in the provided options.
52
+ * */
53
+ NOT_IN = "NOT_IN",
54
+ /**
55
+ * Field value contains the criterion value as a substring.
56
+ * */
57
+ LIKE = "LIKE",
58
+ /**
59
+ * Field value does not contain the criterion value as a substring.
60
+ * */
61
+ NOT_LIKE = "NOT_LIKE",
62
+ /**
63
+ * Field value exists and is not null.
64
+ * */
65
+ EXISTS = "EXISTS",
66
+ /**
67
+ * Field value is missing or null.
68
+ * */
69
+ NOT_EXISTS = "NOT_EXISTS",
70
+ /**
71
+ * Field value is not empty.
72
+ * */
73
+ IS_NOT_EMPTY = "IS_NOT_EMPTY",
74
+ /**
75
+ * Field value is empty.
76
+ * */
77
+ IS_EMPTY = "IS_EMPTY",
78
+ /**
79
+ * Field value is within an inclusive range.
80
+ * */
81
+ BETWEEN = "BETWEEN",
82
+ /**
83
+ * Field value is outside an inclusive range.
84
+ * */
85
+ NOT_BETWEEN = "NOT_BETWEEN",
86
+ /**
87
+ * Field value array contains the criterion value.
88
+ * */
89
+ CONTAINS = "CONTAINS",
90
+ /**
91
+ * Field value array does not contain the criterion value.
92
+ * */
93
+ NOT_CONTAINS = "NOT_CONTAINS",
94
+ /**
95
+ * Field value starts with the criterion value.
96
+ * */
97
+ STARTS_WITH = "STARTS_WITH",
98
+ /**
99
+ * Field value ends with the criterion value.
100
+ * */
101
+ ENDS_WITH = "ENDS_WITH",
102
+ /**
103
+ * Field value does not start with the criterion value.
104
+ * */
105
+ DOES_NOT_START_WITH = "DOES_NOT_START_WITH",
106
+ /**
107
+ * Field value does not end with the criterion value.
108
+ * */
109
+ DOES_NOT_END_WITH = "DOES_NOT_END_WITH"
110
+ }
111
+ /**
112
+ * The field criterion for a search criteria.
113
+ * */
114
+ export type FieldCriterion = {
115
+ /**
116
+ * Field name to compare.
117
+ * */
118
+ fieldName: string;
119
+ /**
120
+ * Comparison operator to apply.
121
+ * */
122
+ operator?: ComparisonOperators;
123
+ /**
124
+ * Custom operator label when using backend-specific operators.
125
+ * */
126
+ customOperator?: string;
127
+ /**
128
+ * Primary comparison value.
129
+ * */
130
+ value?: any;
131
+ /**
132
+ * Comparison value options (e.g., IN/BETWEEN).
133
+ * */
134
+ valueOptions?: any[];
135
+ };
136
+ /**
137
+ * The criteria for a search.
138
+ * */
139
+ export type SearchCriteria = {
140
+ /**
141
+ * Logical operator to apply across field criteria.
142
+ * */
143
+ logicalOperator: LogicalOperators;
144
+ /**
145
+ * Field-level criteria to evaluate.
146
+ * */
147
+ fieldCriteria: FieldCriterion[];
148
+ };
149
+ /**
150
+ * The results from a request to list items.
151
+ * */
152
+ export type ListItemsResults<ItemType extends Record<any, any>> = {
153
+ /**
154
+ * Cursor for paging into the next page, when available.
155
+ * */
156
+ cursor?: string;
157
+ /**
158
+ * Items returned by the request.
159
+ * */
160
+ items: ItemType[];
161
+ };
162
+ /**
163
+ * The information used to sort a list of items by a specified field.
164
+ * */
165
+ export type SortField = {
166
+ /**
167
+ * Field name to sort by.
168
+ * */
169
+ field?: string;
170
+ /**
171
+ * Whether to reverse sort order.
172
+ * */
173
+ reverse?: boolean;
174
+ };
175
+ /**
176
+ * The data used to page a specific set of search results that uses full paging.
177
+ * @see SupportedTags.fullPaging
178
+ * */
179
+ export type StandardExpandedPagingCursor = {
180
+ /**
181
+ * Current page number.
182
+ * */
183
+ currentPage?: number;
184
+ /**
185
+ * Total number of pages available.
186
+ * */
187
+ totalPages?: number;
188
+ };
189
+ /**
190
+ * The information for paging through a list of items.
191
+ * */
192
+ export type PagingInfo = {
193
+ /**
194
+ * Items per page to request.
195
+ * */
196
+ itemsPerPage?: number;
197
+ /**
198
+ * Cursor token for paging.
199
+ * */
200
+ cursor?: string;
201
+ };
202
+ /**
203
+ * The configuration for listing and searching for items.
204
+ * */
205
+ export type ListItemsConfig = PagingInfo & {
206
+ /**
207
+ * Structured search criteria.
208
+ * */
209
+ criteria?: SearchCriteria;
210
+ /**
211
+ * Sort fields to apply.
212
+ * */
213
+ sortFields?: SortField[];
214
+ };
215
+ /**
216
+ * A configuration for listing relationships.
217
+ * */
218
+ export type ListRelationshipsConfig = PagingInfo & {
219
+ /**
220
+ * Relationship origin info used to filter related records.
221
+ * */
222
+ relationshipItemOrigin: ItemRelationshipOriginItemInfo;
223
+ };
224
+ /**
225
+ * The results from a request to list relationships.
226
+ * */
227
+ export type ListRelationshipsResults = ListItemsResults<ItemRelationshipInfo>;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Filtering and sorting utilities for search criteria.
3
+ */
4
+ import { TypeInfoDataItem, TypeInfoMap } from "./TypeParsing/TypeInfo";
5
+ import { ComparisonOperators, FieldCriterion, SearchCriteria, SortField } from "./SearchTypes";
6
+ /**
7
+ * Basic comparison operators for filtering data.
8
+ * */
9
+ export declare const COMPARATORS: Record<ComparisonOperators, (
10
+ /**
11
+ * Criterion value to compare against.
12
+ * */
13
+ criterionValue: any,
14
+ /**
15
+ * Criterion options for operators like IN/BETWEEN.
16
+ * */
17
+ criterionValueOptions: any[] | undefined,
18
+ /**
19
+ * Field value from the item.
20
+ * */
21
+ fieldValue: any) => boolean>;
22
+ /**
23
+ * Compare a field criterion to a field value.
24
+ *
25
+ * @param fieldCriterion - Criterion to compare.
26
+ * @param fieldValue - Field value to test.
27
+ * @returns Whether the criterion matches the field value.
28
+ * */
29
+ export declare const compare: (fieldCriterion: FieldCriterion, fieldValue: any) => boolean;
30
+ /**
31
+ * Compare a field criterion to an array of field values.
32
+ *
33
+ * @param fieldCriterion - Criterion to compare.
34
+ * @param fieldValue - Array field value to test.
35
+ * @returns Whether the criterion matches the field value array.
36
+ * */
37
+ export declare const compareArray: (fieldCriterion: FieldCriterion, fieldValue: any[] | undefined) => boolean;
38
+ /**
39
+ * Get the filtered data items based on the search criteria.
40
+ *
41
+ * @param searchCriteria - Criteria to apply.
42
+ * @param items - Items to filter.
43
+ * @param typeInfoName - Optional type name for field metadata.
44
+ * @param typeInfoMap - Optional type info map for field metadata.
45
+ * @returns Filtered items that match the criteria.
46
+ * */
47
+ export declare const getFilterTypeInfoDataItemsBySearchCriteria: (searchCriteria: SearchCriteria, items: TypeInfoDataItem[], typeInfoName?: string, typeInfoMap?: TypeInfoMap) => TypeInfoDataItem[];
48
+ /**
49
+ * Get the sorted data items based on the given sort fields.
50
+ *
51
+ * @param sortFields - Sort field configuration.
52
+ * @param items - Items to sort.
53
+ * @returns Sorted items array.
54
+ * */
55
+ export declare const getSortedItems: (sortFields?: SortField[], items?: TypeInfoDataItem[]) => TypeInfoDataItem[];
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Validation rules for search criteria against TypeInfo definitions.
3
+ */
4
+ import { FieldCriterion } from "./SearchTypes";
5
+ import { CustomTypeInfoFieldValidatorMap, TypeInfoValidationResults } from "./TypeParsing/Validation";
6
+ import { TypeInfoMap } from "./TypeParsing/TypeInfo";
7
+ /**
8
+ * Search validation errors.
9
+ * */
10
+ export declare const SEARCH_VALIDATION_ERRORS: {
11
+ INVALID_TYPE_INFO: string;
12
+ RELATIONAL_FIELDS_NOT_ALLOWED: string;
13
+ INVALID_FIELD: string;
14
+ INVALID_VALUE_OPTION: string;
15
+ INVALID_OPERATOR: string;
16
+ };
17
+ /**
18
+ * Validate search fields against type info fields.
19
+ *
20
+ * @param typeInfoName - Type name to validate against.
21
+ * @param typeInfoMap - Type info map containing field definitions.
22
+ * @param searchFields - Field criteria to validate.
23
+ * @param disallowRelationalFields - Whether to forbid relational fields.
24
+ * @param customValidators - Custom field validators by type name.
25
+ * @returns Validation results with errors and error map.
26
+ * */
27
+ export declare const validateSearchFields: (typeInfoName: string, typeInfoMap: TypeInfoMap, searchFields?: FieldCriterion[], disallowRelationalFields?: boolean, customValidators?: CustomTypeInfoFieldValidatorMap) => TypeInfoValidationResults;