@resistdesign/voltra 3.0.0-alpha.0 → 3.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -3
- package/SearchTypes-DjN6YQzE.d.ts +577 -0
- package/Types-C7XjUjoF.d.ts +240 -0
- package/Validation-CFP59oIP.d.ts +226 -0
- package/api/index.d.ts +6 -0
- package/api/index.js +8468 -0
- package/app/index.d.ts +5 -0
- package/app/index.js +810 -0
- package/common/Testing/CLI.js +432 -0
- package/common/index.d.ts +4 -0
- package/common/index.js +1218 -0
- package/iac/index.d.ts +2 -0
- package/iac/index.js +1663 -0
- package/iac/packs/index.d.ts +1 -0
- package/iac/packs/index.js +1622 -0
- package/index-BjFkoQmK.d.ts +112 -0
- package/index-D_EAHMXe.d.ts +5395 -0
- package/{src/iac/types/IaCTypes.d.ts → index-DgOzPKdr.d.ts} +1026 -23
- package/index-IokxSNxm.d.ts +745 -0
- package/index-sIX5qe0K.d.ts +680 -0
- package/index.d.ts +13 -0
- package/index.js +11498 -0
- package/package.json +46 -73
- package/src/api/DataAccessControl.d.ts +0 -85
- package/src/api/DataAccessControl.js +0 -159
- package/src/api/ORM/DACUtils.d.ts +0 -60
- package/src/api/ORM/DACUtils.js +0 -197
- package/src/api/ORM/ListItemUtils.d.ts +0 -7
- package/src/api/ORM/ListItemUtils.js +0 -22
- package/src/api/ORM/ORMRouteMap.d.ts +0 -19
- package/src/api/ORM/ORMRouteMap.js +0 -82
- package/src/api/ORM/TypeInfoORMService.d.ts +0 -103
- package/src/api/ORM/TypeInfoORMService.js +0 -581
- package/src/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.d.ts +0 -63
- package/src/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.js +0 -2
- package/src/api/ORM/drivers/DynamoDBDataItemDBDriver.d.ts +0 -36
- package/src/api/ORM/drivers/DynamoDBDataItemDBDriver.js +0 -282
- package/src/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.d.ts +0 -90
- package/src/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.js +0 -2
- package/src/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.d.ts +0 -45
- package/src/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.js +0 -127
- package/src/api/ORM/drivers/S3FileItemDBDriver.d.ts +0 -44
- package/src/api/ORM/drivers/S3FileItemDBDriver.js +0 -182
- package/src/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.d.ts +0 -12
- package/src/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.js +0 -20
- package/src/api/ORM/drivers/common/Types.d.ts +0 -77
- package/src/api/ORM/drivers/common/Types.js +0 -14
- package/src/api/ORM/drivers/common/index.d.ts +0 -2
- package/src/api/ORM/drivers/common/index.js +0 -18
- package/src/api/ORM/drivers/index.d.ts +0 -3
- package/src/api/ORM/drivers/index.js +0 -19
- package/src/api/ORM/index.d.ts +0 -4
- package/src/api/ORM/index.js +0 -43
- package/src/api/Router/AWS.d.ts +0 -26
- package/src/api/Router/AWS.js +0 -76
- package/src/api/Router/Auth.d.ts +0 -2
- package/src/api/Router/Auth.js +0 -9
- package/src/api/Router/CORS.d.ts +0 -6
- package/src/api/Router/CORS.js +0 -27
- package/src/api/Router/Types.d.ts +0 -71
- package/src/api/Router/Types.js +0 -2
- package/src/api/Router/index.d.ts +0 -18
- package/src/api/Router/index.js +0 -145
- package/src/api/index.d.ts +0 -3
- package/src/api/index.js +0 -39
- package/src/app/index.d.ts +0 -1
- package/src/app/index.js +0 -37
- package/src/app/utils/ApplicationState.d.ts +0 -52
- package/src/app/utils/ApplicationState.js +0 -86
- package/src/app/utils/ApplicationStateLoader.d.ts +0 -46
- package/src/app/utils/ApplicationStateLoader.js +0 -57
- package/src/app/utils/Controller.d.ts +0 -4
- package/src/app/utils/Controller.js +0 -47
- package/src/app/utils/Debug.d.ts +0 -4
- package/src/app/utils/Debug.js +0 -30
- package/src/app/utils/EasyLayout.d.ts +0 -49
- package/src/app/utils/EasyLayout.js +0 -122
- package/src/app/utils/Route.d.ts +0 -28
- package/src/app/utils/Route.js +0 -102
- package/src/app/utils/Service.d.ts +0 -12
- package/src/app/utils/Service.js +0 -34
- package/src/app/utils/TypeInfoORMAPIUtils.d.ts +0 -20
- package/src/app/utils/TypeInfoORMAPIUtils.js +0 -62
- package/src/app/utils/TypeInfoORMClient.d.ts +0 -24
- package/src/app/utils/TypeInfoORMClient.js +0 -69
- package/src/app/utils/index.d.ts +0 -8
- package/src/app/utils/index.js +0 -24
- package/src/common/CommandLine/collectRequiredEnvironmentVariables.d.ts +0 -1
- package/src/common/CommandLine/collectRequiredEnvironmentVariables.js +0 -16
- package/src/common/HelperTypes.d.ts +0 -3
- package/src/common/HelperTypes.js +0 -2
- package/src/common/IdGeneration/getSimpleId.d.ts +0 -4
- package/src/common/IdGeneration/getSimpleId.js +0 -16
- package/src/common/IdGeneration/index.d.ts +0 -1
- package/src/common/IdGeneration/index.js +0 -17
- package/src/common/ItemRelationshipInfoTypes.d.ts +0 -46
- package/src/common/ItemRelationshipInfoTypes.js +0 -20
- package/src/common/ItemRelationships/ItemRelationshipValidation.d.ts +0 -10
- package/src/common/ItemRelationships/ItemRelationshipValidation.js +0 -43
- package/src/common/ItemRelationships/index.d.ts +0 -1
- package/src/common/ItemRelationships/index.js +0 -17
- package/src/common/Logging/Utils.d.ts +0 -10
- package/src/common/Logging/Utils.js +0 -33
- package/src/common/Logging/index.d.ts +0 -1
- package/src/common/Logging/index.js +0 -17
- package/src/common/Routing.d.ts +0 -25
- package/src/common/Routing.js +0 -102
- package/src/common/SearchTypes.d.ts +0 -98
- package/src/common/SearchTypes.js +0 -39
- package/src/common/SearchUtils.d.ts +0 -22
- package/src/common/SearchUtils.js +0 -134
- package/src/common/SearchValidation.d.ts +0 -17
- package/src/common/SearchValidation.js +0 -90
- package/src/common/Storyboarding/Types.d.ts +0 -25
- package/src/common/Storyboarding/Types.js +0 -2
- package/src/common/StringTransformers.d.ts +0 -17
- package/src/common/StringTransformers.js +0 -36
- package/src/common/Testing/CLI.d.ts +0 -2
- package/src/common/Testing/CLI.js +0 -56
- package/src/common/Testing/Types.d.ts +0 -117
- package/src/common/Testing/Types.js +0 -19
- package/src/common/Testing/Utils.d.ts +0 -48
- package/src/common/Testing/Utils.js +0 -334
- package/src/common/Testing/index.d.ts +0 -2
- package/src/common/Testing/index.js +0 -18
- package/src/common/TypeInfoDataItemUtils.d.ts +0 -10
- package/src/common/TypeInfoDataItemUtils.js +0 -55
- package/src/common/TypeInfoORM/Types.d.ts +0 -76
- package/src/common/TypeInfoORM/Types.js +0 -55
- package/src/common/TypeInfoORM/index.d.ts +0 -1
- package/src/common/TypeInfoORM/index.js +0 -17
- package/src/common/TypeParsing/Constants.d.ts +0 -1
- package/src/common/TypeParsing/Constants.js +0 -4
- package/src/common/TypeParsing/ParsingUtils/Constants.d.ts +0 -5
- package/src/common/TypeParsing/ParsingUtils/Constants.js +0 -8
- package/src/common/TypeParsing/ParsingUtils/checkType.d.ts +0 -8
- package/src/common/TypeParsing/ParsingUtils/checkType.js +0 -46
- package/src/common/TypeParsing/ParsingUtils/checkUnionType.d.ts +0 -6
- package/src/common/TypeParsing/ParsingUtils/checkUnionType.js +0 -15
- package/src/common/TypeParsing/ParsingUtils/extractCommentTags.d.ts +0 -2
- package/src/common/TypeParsing/ParsingUtils/extractCommentTags.js +0 -105
- package/src/common/TypeParsing/ParsingUtils/extractLiteralValues.d.ts +0 -6
- package/src/common/TypeParsing/ParsingUtils/extractLiteralValues.js +0 -42
- package/src/common/TypeParsing/ParsingUtils/extractTypeDetails.d.ts +0 -8
- package/src/common/TypeParsing/ParsingUtils/extractTypeDetails.js +0 -14
- package/src/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.d.ts +0 -5
- package/src/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.js +0 -27
- package/src/common/TypeParsing/ParsingUtils/getTypeInfo.d.ts +0 -3
- package/src/common/TypeParsing/ParsingUtils/getTypeInfo.js +0 -27
- package/src/common/TypeParsing/ParsingUtils/getTypeInfoField.d.ts +0 -3
- package/src/common/TypeParsing/ParsingUtils/getTypeInfoField.js +0 -44
- package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.d.ts +0 -4
- package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.js +0 -28
- package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.d.ts +0 -4
- package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.js +0 -105
- package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.d.ts +0 -4
- package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.js +0 -20
- package/src/common/TypeParsing/ParsingUtils/getTypeKeyword.d.ts +0 -3
- package/src/common/TypeParsing/ParsingUtils/getTypeKeyword.js +0 -17
- package/src/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.d.ts +0 -4
- package/src/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.js +0 -49
- package/src/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.d.ts +0 -2
- package/src/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.js +0 -24
- package/src/common/TypeParsing/TypeInfo.d.ts +0 -142
- package/src/common/TypeParsing/TypeInfo.js +0 -13
- package/src/common/TypeParsing/TypeMapping.d.ts +0 -9
- package/src/common/TypeParsing/TypeMapping.js +0 -32
- package/src/common/TypeParsing/TypeParsing.d.ts +0 -5
- package/src/common/TypeParsing/TypeParsing.js +0 -39
- package/src/common/TypeParsing/Utils.d.ts +0 -21
- package/src/common/TypeParsing/Utils.js +0 -94
- package/src/common/TypeParsing/Validation.d.ts +0 -92
- package/src/common/TypeParsing/Validation.js +0 -340
- package/src/common/TypeParsing/index.d.ts +0 -5
- package/src/common/TypeParsing/index.js +0 -44
- package/src/common/index.d.ts +0 -11
- package/src/common/index.js +0 -47
- package/src/iac/SimpleCFT.d.ts +0 -48
- package/src/iac/SimpleCFT.js +0 -82
- package/src/iac/index.d.ts +0 -9
- package/src/iac/index.js +0 -48
- package/src/iac/packs/auth/user-management.d.ts +0 -14
- package/src/iac/packs/auth/user-management.js +0 -302
- package/src/iac/packs/auth.d.ts +0 -19
- package/src/iac/packs/auth.js +0 -47
- package/src/iac/packs/build/utils.d.ts +0 -100
- package/src/iac/packs/build/utils.js +0 -23
- package/src/iac/packs/build.d.ts +0 -29
- package/src/iac/packs/build.js +0 -217
- package/src/iac/packs/cdn.d.ts +0 -12
- package/src/iac/packs/cdn.js +0 -113
- package/src/iac/packs/cloud-function.d.ts +0 -17
- package/src/iac/packs/cloud-function.js +0 -69
- package/src/iac/packs/database.d.ts +0 -29
- package/src/iac/packs/database.js +0 -27
- package/src/iac/packs/dns.d.ts +0 -13
- package/src/iac/packs/dns.js +0 -26
- package/src/iac/packs/file-storage.d.ts +0 -14
- package/src/iac/packs/file-storage.js +0 -71
- package/src/iac/packs/gateway.d.ts +0 -27
- package/src/iac/packs/gateway.js +0 -342
- package/src/iac/packs/index.d.ts +0 -11
- package/src/iac/packs/index.js +0 -27
- package/src/iac/packs/repo.d.ts +0 -10
- package/src/iac/packs/repo.js +0 -34
- package/src/iac/packs/ssl-certificate.d.ts +0 -10
- package/src/iac/packs/ssl-certificate.js +0 -36
- package/src/iac/types/CloudFormationResourceSpecification.d.ts +0 -2
- package/src/iac/types/Constants.d.ts +0 -9
- package/src/iac/types/Constants.js +0 -20
- package/src/iac/types/IaCTypes.js +0 -14
- package/src/iac/types/Renderers.d.ts +0 -12
- package/src/iac/types/Renderers.js +0 -112
- package/src/iac/types/Types.d.ts +0 -37
- package/src/iac/types/Types.js +0 -2
- package/src/iac/types/Utils.d.ts +0 -2
- package/src/iac/types/Utils.js +0 -60
- package/src/iac/types/generate.d.ts +0 -1
- package/src/iac/types/generate.js +0 -31
- package/src/iac/utils/index.d.ts +0 -36
- package/src/iac/utils/index.js +0 -105
- package/src/iac/utils/patch-utils.d.ts +0 -15
- package/src/iac/utils/patch-utils.js +0 -62
- package/src/index.d.ts +0 -178
- package/src/index.js +0 -214
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { B as BaseItemRelationshipInfo, L as ListRelationshipsConfig, a as ListItemsResults, I as ItemRelationshipInfo, T as TypeInfoDataItem, b as ListItemsConfig, c as TypeOperation } from './SearchTypes-DjN6YQzE.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*
|
|
6
|
+
* Shared TypeInfoORM API types, route paths, and error enums used by services
|
|
7
|
+
* and clients.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A set of possible operations for a {@link ItemRelationshipInfo}.
|
|
12
|
+
* */
|
|
13
|
+
declare enum RelationshipOperation {
|
|
14
|
+
/**
|
|
15
|
+
* Read relationship info.
|
|
16
|
+
* */
|
|
17
|
+
GET = "GET",
|
|
18
|
+
/**
|
|
19
|
+
* Create or update a relationship.
|
|
20
|
+
* */
|
|
21
|
+
SET = "SET",
|
|
22
|
+
/**
|
|
23
|
+
* Remove a relationship.
|
|
24
|
+
* */
|
|
25
|
+
UNSET = "UNSET"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A set groups of possible operations for a type, field value or relationship.
|
|
29
|
+
* */
|
|
30
|
+
declare enum OperationGroup {
|
|
31
|
+
/**
|
|
32
|
+
* All possible operations.
|
|
33
|
+
* */
|
|
34
|
+
ALL_OPERATIONS = "ALL_OPERATIONS",
|
|
35
|
+
/**
|
|
36
|
+
* All item CRUD operations.
|
|
37
|
+
* */
|
|
38
|
+
ALL_ITEM_OPERATIONS = "ALL_ITEM_OPERATIONS",
|
|
39
|
+
/**
|
|
40
|
+
* All relationship operations.
|
|
41
|
+
* */
|
|
42
|
+
ALL_RELATIONSHIP_OPERATIONS = "ALL_RELATIONSHIP_OPERATIONS"
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A set of possible ORM operations.
|
|
46
|
+
* */
|
|
47
|
+
type ORMOperation = TypeOperation | RelationshipOperation | OperationGroup;
|
|
48
|
+
/**
|
|
49
|
+
* Error types for a TypeInfoORM service.
|
|
50
|
+
* */
|
|
51
|
+
declare enum TypeInfoORMServiceError {
|
|
52
|
+
/**
|
|
53
|
+
* No data drivers were supplied.
|
|
54
|
+
* */
|
|
55
|
+
NO_DRIVERS_SUPPLIED = "NO_DRIVERS_SUPPLIED",
|
|
56
|
+
/**
|
|
57
|
+
* No relationship drivers were supplied.
|
|
58
|
+
* */
|
|
59
|
+
NO_RELATIONSHIP_DRIVERS_SUPPLIED = "NO_RELATIONSHIP_DRIVERS_SUPPLIED",
|
|
60
|
+
/**
|
|
61
|
+
* Missing required primary field value.
|
|
62
|
+
* */
|
|
63
|
+
NO_PRIMARY_FIELD_VALUE_SUPPLIED = "NO_PRIMARY_FIELD_VALUE_SUPPLIED",
|
|
64
|
+
/**
|
|
65
|
+
* Driver type is not supported for the request.
|
|
66
|
+
* */
|
|
67
|
+
INVALID_DRIVER = "INVALID_DRIVER",
|
|
68
|
+
/**
|
|
69
|
+
* Relationship driver type is not supported for the request.
|
|
70
|
+
* */
|
|
71
|
+
INVALID_RELATIONSHIP_DRIVER = "INVALID_RELATIONSHIP_DRIVER",
|
|
72
|
+
/**
|
|
73
|
+
* TypeInfo definition was not found or invalid.
|
|
74
|
+
* */
|
|
75
|
+
INVALID_TYPE_INFO = "INVALID_TYPE_INFO",
|
|
76
|
+
/**
|
|
77
|
+
* TypeInfo missing a primary field definition.
|
|
78
|
+
* */
|
|
79
|
+
TYPE_INFO_MISSING_PRIMARY_FIELD = "TYPE_INFO_MISSING_PRIMARY_FIELD",
|
|
80
|
+
/**
|
|
81
|
+
* Relationship payload is invalid.
|
|
82
|
+
* */
|
|
83
|
+
INVALID_RELATIONSHIP = "INVALID_RELATIONSHIP",
|
|
84
|
+
/**
|
|
85
|
+
* Operation is not supported.
|
|
86
|
+
* */
|
|
87
|
+
INVALID_OPERATION = "INVALID_OPERATION",
|
|
88
|
+
/**
|
|
89
|
+
* Indexing criteria is not supported.
|
|
90
|
+
* */
|
|
91
|
+
INDEXING_UNSUPPORTED_CRITERIA = "INDEXING_UNSUPPORTED_CRITERIA",
|
|
92
|
+
/**
|
|
93
|
+
* Indexing criteria combination is not supported.
|
|
94
|
+
* */
|
|
95
|
+
INDEXING_UNSUPPORTED_COMBINATION = "INDEXING_UNSUPPORTED_COMBINATION",
|
|
96
|
+
/**
|
|
97
|
+
* Required index field is missing.
|
|
98
|
+
* */
|
|
99
|
+
INDEXING_MISSING_INDEX_FIELD = "INDEXING_MISSING_INDEX_FIELD",
|
|
100
|
+
/**
|
|
101
|
+
* Indexing backend dependency is missing.
|
|
102
|
+
* */
|
|
103
|
+
INDEXING_MISSING_BACKEND = "INDEXING_MISSING_BACKEND",
|
|
104
|
+
/**
|
|
105
|
+
* Indexing operations require criteria to be provided.
|
|
106
|
+
* */
|
|
107
|
+
INDEXING_REQUIRES_CRITERIA = "INDEXING_REQUIRES_CRITERIA"
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* A collection of kebab-case route paths for a TypeInfoORM API.
|
|
111
|
+
* */
|
|
112
|
+
declare enum TypeInfoORMAPIRoutePaths {
|
|
113
|
+
/**
|
|
114
|
+
* Create item route.
|
|
115
|
+
* */
|
|
116
|
+
CREATE = "create",
|
|
117
|
+
/**
|
|
118
|
+
* Read item route.
|
|
119
|
+
* */
|
|
120
|
+
READ = "read",
|
|
121
|
+
/**
|
|
122
|
+
* Update item route.
|
|
123
|
+
* */
|
|
124
|
+
UPDATE = "update",
|
|
125
|
+
/**
|
|
126
|
+
* Delete item route.
|
|
127
|
+
* */
|
|
128
|
+
DELETE = "delete",
|
|
129
|
+
/**
|
|
130
|
+
* List item route.
|
|
131
|
+
* */
|
|
132
|
+
LIST = "list",
|
|
133
|
+
/**
|
|
134
|
+
* Create relationship route.
|
|
135
|
+
* */
|
|
136
|
+
CREATE_RELATIONSHIP = "create-relationship",
|
|
137
|
+
/**
|
|
138
|
+
* Delete relationship route.
|
|
139
|
+
* */
|
|
140
|
+
DELETE_RELATIONSHIP = "delete-relationship",
|
|
141
|
+
/**
|
|
142
|
+
* List relationships route.
|
|
143
|
+
* */
|
|
144
|
+
LIST_RELATIONSHIPS = "list-relationships",
|
|
145
|
+
/**
|
|
146
|
+
* List related items route.
|
|
147
|
+
* */
|
|
148
|
+
LIST_RELATED_ITEMS = "list-related-items"
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The results of a delete relationship operation.
|
|
152
|
+
*/
|
|
153
|
+
type DeleteRelationshipResults = {
|
|
154
|
+
/**
|
|
155
|
+
* Whether the delete operation succeeded.
|
|
156
|
+
* */
|
|
157
|
+
success: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Whether related items still exist after deletion.
|
|
160
|
+
* */
|
|
161
|
+
remainingItemsExist: boolean;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* The API type for TypeInfoORM providers to implement.
|
|
165
|
+
* */
|
|
166
|
+
type TypeInfoORMAPI = {
|
|
167
|
+
/**
|
|
168
|
+
* Create a relationship record.
|
|
169
|
+
*
|
|
170
|
+
* @param relationshipItem - Relationship payload to create.
|
|
171
|
+
* @returns Whether the create succeeded.
|
|
172
|
+
*/
|
|
173
|
+
createRelationship: (relationshipItem: BaseItemRelationshipInfo) => Promise<boolean>;
|
|
174
|
+
/**
|
|
175
|
+
* Delete a relationship record.
|
|
176
|
+
*
|
|
177
|
+
* @param relationshipItem - Relationship payload to delete.
|
|
178
|
+
* @returns Results describing deletion outcome.
|
|
179
|
+
*/
|
|
180
|
+
deleteRelationship: (relationshipItem: BaseItemRelationshipInfo) => Promise<DeleteRelationshipResults>;
|
|
181
|
+
/**
|
|
182
|
+
* List relationships matching the query.
|
|
183
|
+
*
|
|
184
|
+
* @param config - Relationship list configuration.
|
|
185
|
+
* @returns Relationship list results.
|
|
186
|
+
*/
|
|
187
|
+
listRelationships: (config: ListRelationshipsConfig) => Promise<ListItemsResults<ItemRelationshipInfo>>;
|
|
188
|
+
/**
|
|
189
|
+
* List related items for a relationship query.
|
|
190
|
+
*
|
|
191
|
+
* @param config - Relationship list configuration.
|
|
192
|
+
* @param selectedFields - Optional fields to project.
|
|
193
|
+
* @returns Related item list results.
|
|
194
|
+
*/
|
|
195
|
+
listRelatedItems: (config: ListRelationshipsConfig, selectedFields?: (keyof TypeInfoDataItem)[]) => Promise<ListItemsResults<Partial<TypeInfoDataItem>>>;
|
|
196
|
+
/**
|
|
197
|
+
* Create an item.
|
|
198
|
+
*
|
|
199
|
+
* @param typeName - Type name to create.
|
|
200
|
+
* @param item - Item payload to create.
|
|
201
|
+
* @returns The created item result.
|
|
202
|
+
*/
|
|
203
|
+
create: (typeName: string, item: TypeInfoDataItem) => Promise<any>;
|
|
204
|
+
/**
|
|
205
|
+
* Read an item by primary field value.
|
|
206
|
+
*
|
|
207
|
+
* @param typeName - Type name to read.
|
|
208
|
+
* @param primaryFieldValue - Primary field value to lookup.
|
|
209
|
+
* @param selectedFields - Optional fields to project.
|
|
210
|
+
* @returns Retrieved item data.
|
|
211
|
+
*/
|
|
212
|
+
read: (typeName: string, primaryFieldValue: any, selectedFields?: (keyof TypeInfoDataItem)[]) => Promise<Partial<TypeInfoDataItem>>;
|
|
213
|
+
/**
|
|
214
|
+
* Update an item.
|
|
215
|
+
*
|
|
216
|
+
* @param typeName - Type name to update.
|
|
217
|
+
* @param item - Updated item payload.
|
|
218
|
+
* @returns Whether the update succeeded.
|
|
219
|
+
*/
|
|
220
|
+
update: (typeName: string, item: TypeInfoDataItem) => Promise<boolean>;
|
|
221
|
+
/**
|
|
222
|
+
* Delete an item by primary field value.
|
|
223
|
+
*
|
|
224
|
+
* @param typeName - Type name to delete.
|
|
225
|
+
* @param primaryFieldValue - Primary field value to delete.
|
|
226
|
+
* @returns Whether the delete succeeded.
|
|
227
|
+
*/
|
|
228
|
+
delete: (typeName: string, primaryFieldValue: any) => Promise<boolean>;
|
|
229
|
+
/**
|
|
230
|
+
* List items matching the configuration.
|
|
231
|
+
*
|
|
232
|
+
* @param typeName - Type name to list.
|
|
233
|
+
* @param config - List configuration.
|
|
234
|
+
* @param selectedFields - Optional fields to project.
|
|
235
|
+
* @returns List results.
|
|
236
|
+
*/
|
|
237
|
+
list: (typeName: string, config: ListItemsConfig, selectedFields?: (keyof TypeInfoDataItem)[]) => Promise<ListItemsResults<Partial<TypeInfoDataItem>>>;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export { type DeleteRelationshipResults as D, type ORMOperation as O, RelationshipOperation as R, type TypeInfoORMAPI as T, TypeInfoORMServiceError as a, TypeInfoORMAPIRoutePaths as b };
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { d as TypeKeyword, c as TypeOperation, e as TypeInfoField, f as TypeInfoMap, g as TypeInfo } from './SearchTypes-DjN6YQzE.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*
|
|
6
|
+
* Validation helpers for TypeInfo values, including relationship rules and
|
|
7
|
+
* custom type validators.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Relationship validation behavior for TypeInfo checks.
|
|
12
|
+
*/
|
|
13
|
+
declare enum RelationshipValidationType {
|
|
14
|
+
/**
|
|
15
|
+
* Include relationship values in validation.
|
|
16
|
+
*/
|
|
17
|
+
INCLUDE = "INCLUDE",
|
|
18
|
+
/**
|
|
19
|
+
* Exclude relationship values from validation.
|
|
20
|
+
*/
|
|
21
|
+
EXCLUDE = "EXCLUDE",
|
|
22
|
+
/**
|
|
23
|
+
* Disallow relationship values entirely.
|
|
24
|
+
*/
|
|
25
|
+
STRICT_EXCLUDE = "STRICT_EXCLUDE"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A custom type info field validator.
|
|
29
|
+
* */
|
|
30
|
+
type CustomTypeInfoFieldValidator = (value: any) => boolean;
|
|
31
|
+
/**
|
|
32
|
+
* A map of custom type info field validators.
|
|
33
|
+
* */
|
|
34
|
+
type CustomTypeInfoFieldValidatorMap = Record<string, CustomTypeInfoFieldValidator>;
|
|
35
|
+
/**
|
|
36
|
+
* A map of errors.
|
|
37
|
+
* */
|
|
38
|
+
type ErrorMap = {
|
|
39
|
+
[key: string]: string[];
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The validation results for type info fields.
|
|
43
|
+
*/
|
|
44
|
+
type TypeInfoValidationResults = {
|
|
45
|
+
/**
|
|
46
|
+
* Type name being validated.
|
|
47
|
+
*/
|
|
48
|
+
typeName: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the validation passed.
|
|
51
|
+
*/
|
|
52
|
+
valid: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Primary error code when validation fails.
|
|
55
|
+
*/
|
|
56
|
+
error: string;
|
|
57
|
+
/**
|
|
58
|
+
* Field-level error mapping.
|
|
59
|
+
*/
|
|
60
|
+
errorMap: ErrorMap;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Error code for custom type validation failures.
|
|
64
|
+
*/
|
|
65
|
+
declare const INVALID_CUSTOM_TYPE = "INVALID_CUSTOM_TYPE";
|
|
66
|
+
/**
|
|
67
|
+
* Error codes for primitive type validation failures.
|
|
68
|
+
*/
|
|
69
|
+
declare const PRIMITIVE_ERROR_MESSAGE_CONSTANTS: Record<TypeKeyword, string>;
|
|
70
|
+
/**
|
|
71
|
+
* Error codes for TypeInfo validation failures.
|
|
72
|
+
*/
|
|
73
|
+
declare const ERROR_MESSAGE_CONSTANTS: {
|
|
74
|
+
MISSING: string;
|
|
75
|
+
INVALID_OPTION: string;
|
|
76
|
+
INVALID_FIELD: string;
|
|
77
|
+
RELATIONSHIP_VALUES_ARE_STRICTLY_EXCLUDED: string;
|
|
78
|
+
INVALID_TYPE: string;
|
|
79
|
+
NO_UNION_TYPE_MATCHED: string;
|
|
80
|
+
TYPE_DOES_NOT_EXIST: string;
|
|
81
|
+
INVALID_PATTERN: string;
|
|
82
|
+
VALUE_DOES_NOT_MATCH_PATTERN: string;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Error codes for denied type operations.
|
|
86
|
+
*/
|
|
87
|
+
declare const DENIED_TYPE_OPERATIONS: Record<TypeOperation, string>;
|
|
88
|
+
/**
|
|
89
|
+
* Validates a value against a pattern.
|
|
90
|
+
*
|
|
91
|
+
* `value` must be a string or not supplied.
|
|
92
|
+
* `pattern` must be a string or not supplied.
|
|
93
|
+
*
|
|
94
|
+
* If either are not supplied, the result is valid.
|
|
95
|
+
*
|
|
96
|
+
* @param typeName - Type name for the validation context.
|
|
97
|
+
* @param value - Value to validate.
|
|
98
|
+
* @param pattern - Regex pattern to validate against.
|
|
99
|
+
* @returns Validation results for the pattern.
|
|
100
|
+
* */
|
|
101
|
+
declare const validateValueMatchesPattern: (typeName: string, value?: any, pattern?: string) => TypeInfoValidationResults;
|
|
102
|
+
/**
|
|
103
|
+
* Gets the validity value.
|
|
104
|
+
*
|
|
105
|
+
* @param existing - Current validity value.
|
|
106
|
+
* @param pending - New validity value.
|
|
107
|
+
* @returns Updated validity value.
|
|
108
|
+
*/
|
|
109
|
+
declare const getValidityValue: (existing: boolean, pending: boolean) => boolean;
|
|
110
|
+
/**
|
|
111
|
+
* The validators for primitive values.
|
|
112
|
+
*/
|
|
113
|
+
declare const TYPE_KEYWORD_VALIDATORS: Record<TypeKeyword, (value: any) => boolean>;
|
|
114
|
+
/**
|
|
115
|
+
* Checks if a value has a value.
|
|
116
|
+
*
|
|
117
|
+
* @param value - Value to check.
|
|
118
|
+
* @returns Whether the value is present.
|
|
119
|
+
*/
|
|
120
|
+
declare const hasValue: (value: any) => boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Validates a primitive value.
|
|
123
|
+
*
|
|
124
|
+
* @param value - Value to validate.
|
|
125
|
+
* @param type - Primitive type keyword.
|
|
126
|
+
* @returns Whether the value matches the type.
|
|
127
|
+
*/
|
|
128
|
+
declare const validateKeywordType: (value: any, type: string) => boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Validates a custom type.
|
|
131
|
+
*
|
|
132
|
+
* @param value - Value to validate.
|
|
133
|
+
* @param customType - Custom type name.
|
|
134
|
+
* @param customValidators - Custom validators map.
|
|
135
|
+
* @returns Whether the value passes custom validation.
|
|
136
|
+
*/
|
|
137
|
+
declare const validateCustomType: (value: any, customType?: string, customValidators?: CustomTypeInfoFieldValidatorMap) => boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Validates a type info field value.
|
|
140
|
+
*
|
|
141
|
+
* @param value - Value to validate.
|
|
142
|
+
* @param typeInfoField - Field metadata.
|
|
143
|
+
* @param typeInfoMap - Type info map for referenced types.
|
|
144
|
+
* @param ignoreArray - Whether to ignore array validation.
|
|
145
|
+
* @param strict - Whether to validate unknown fields and unions strictly.
|
|
146
|
+
* @param customValidators - Custom validators map.
|
|
147
|
+
* @param typeOperation - Operation being validated.
|
|
148
|
+
* @param relationshipValidationType - Relationship validation behavior.
|
|
149
|
+
* @param itemIsPartial - Whether the item is partial.
|
|
150
|
+
* @returns Validation results for the field.
|
|
151
|
+
*/
|
|
152
|
+
declare const validateTypeInfoFieldValue: (value: any, typeInfoField: TypeInfoField, typeInfoMap: TypeInfoMap, ignoreArray?: boolean, strict?: boolean, customValidators?: CustomTypeInfoFieldValidatorMap, typeOperation?: TypeOperation, relationshipValidationType?: RelationshipValidationType, itemIsPartial?: boolean) => TypeInfoValidationResults;
|
|
153
|
+
/**
|
|
154
|
+
* Validates an array of type info field values.
|
|
155
|
+
*
|
|
156
|
+
* @param values - Values to validate.
|
|
157
|
+
* @param typeInfoField - Field metadata.
|
|
158
|
+
* @param typeInfoMap - Type info map for referenced types.
|
|
159
|
+
* @param strict - Whether to validate unknown fields and unions strictly.
|
|
160
|
+
* @param customValidators - Custom validators map.
|
|
161
|
+
* @param typeOperation - Operation being validated.
|
|
162
|
+
* @param relationshipValidationType - Relationship validation behavior.
|
|
163
|
+
* @param itemIsPartial - Whether the item is partial.
|
|
164
|
+
* @returns Validation results for the array.
|
|
165
|
+
*/
|
|
166
|
+
declare const validateArrayOfTypeInfoFieldValues: (values: any[] | undefined, typeInfoField: TypeInfoField, typeInfoMap: TypeInfoMap, strict?: boolean, customValidators?: CustomTypeInfoFieldValidatorMap, typeOperation?: TypeOperation, relationshipValidationType?: RelationshipValidationType, itemIsPartial?: boolean) => TypeInfoValidationResults;
|
|
167
|
+
/**
|
|
168
|
+
* Validates a type info field operation.
|
|
169
|
+
*
|
|
170
|
+
* @param fieldName - Field name to validate.
|
|
171
|
+
* @param fieldOperation - Operation to validate.
|
|
172
|
+
* @param typeInfoField - Field metadata.
|
|
173
|
+
* @returns Validation results for the field operation.
|
|
174
|
+
* */
|
|
175
|
+
declare const validateTypeInfoFieldOperationAllowed: (fieldName: string, fieldOperation?: TypeOperation, typeInfoField?: TypeInfoField) => TypeInfoValidationResults;
|
|
176
|
+
/**
|
|
177
|
+
* Validates a type info operation.
|
|
178
|
+
*
|
|
179
|
+
* @param typeName - Type name to validate.
|
|
180
|
+
* @param valueFields - Fields included in the operation.
|
|
181
|
+
* @param typeOperation - Operation to validate.
|
|
182
|
+
* @param typeInfo - Type info metadata.
|
|
183
|
+
* @returns Validation results for the type operation.
|
|
184
|
+
* */
|
|
185
|
+
declare const validateTypeOperationAllowed: (typeName: string, valueFields: string[], typeOperation: TypeOperation, typeInfo: TypeInfo) => TypeInfoValidationResults;
|
|
186
|
+
/**
|
|
187
|
+
* Validates a type info value.
|
|
188
|
+
*
|
|
189
|
+
* @param value - Value to validate.
|
|
190
|
+
* @param typeInfoFullName - Fully qualified type name.
|
|
191
|
+
* @param typeInfoMap - Type info map for referenced types.
|
|
192
|
+
* @param strict - Whether to validate unknown fields and unions strictly.
|
|
193
|
+
* @param customValidators - Custom validators map.
|
|
194
|
+
* @param typeOperation - Operation being validated.
|
|
195
|
+
* @param relationshipValidationType - Relationship validation behavior.
|
|
196
|
+
* @param itemIsPartial - Whether the item is partial.
|
|
197
|
+
* @returns Validation results for the value.
|
|
198
|
+
*/
|
|
199
|
+
declare const validateTypeInfoValue: (value: any, typeInfoFullName: string, typeInfoMap: TypeInfoMap, strict?: boolean, customValidators?: CustomTypeInfoFieldValidatorMap, typeOperation?: TypeOperation, relationshipValidationType?: RelationshipValidationType, itemIsPartial?: boolean) => TypeInfoValidationResults;
|
|
200
|
+
|
|
201
|
+
type Validation_CustomTypeInfoFieldValidator = CustomTypeInfoFieldValidator;
|
|
202
|
+
type Validation_CustomTypeInfoFieldValidatorMap = CustomTypeInfoFieldValidatorMap;
|
|
203
|
+
declare const Validation_DENIED_TYPE_OPERATIONS: typeof DENIED_TYPE_OPERATIONS;
|
|
204
|
+
declare const Validation_ERROR_MESSAGE_CONSTANTS: typeof ERROR_MESSAGE_CONSTANTS;
|
|
205
|
+
type Validation_ErrorMap = ErrorMap;
|
|
206
|
+
declare const Validation_INVALID_CUSTOM_TYPE: typeof INVALID_CUSTOM_TYPE;
|
|
207
|
+
declare const Validation_PRIMITIVE_ERROR_MESSAGE_CONSTANTS: typeof PRIMITIVE_ERROR_MESSAGE_CONSTANTS;
|
|
208
|
+
type Validation_RelationshipValidationType = RelationshipValidationType;
|
|
209
|
+
declare const Validation_RelationshipValidationType: typeof RelationshipValidationType;
|
|
210
|
+
declare const Validation_TYPE_KEYWORD_VALIDATORS: typeof TYPE_KEYWORD_VALIDATORS;
|
|
211
|
+
type Validation_TypeInfoValidationResults = TypeInfoValidationResults;
|
|
212
|
+
declare const Validation_getValidityValue: typeof getValidityValue;
|
|
213
|
+
declare const Validation_hasValue: typeof hasValue;
|
|
214
|
+
declare const Validation_validateArrayOfTypeInfoFieldValues: typeof validateArrayOfTypeInfoFieldValues;
|
|
215
|
+
declare const Validation_validateCustomType: typeof validateCustomType;
|
|
216
|
+
declare const Validation_validateKeywordType: typeof validateKeywordType;
|
|
217
|
+
declare const Validation_validateTypeInfoFieldOperationAllowed: typeof validateTypeInfoFieldOperationAllowed;
|
|
218
|
+
declare const Validation_validateTypeInfoFieldValue: typeof validateTypeInfoFieldValue;
|
|
219
|
+
declare const Validation_validateTypeInfoValue: typeof validateTypeInfoValue;
|
|
220
|
+
declare const Validation_validateTypeOperationAllowed: typeof validateTypeOperationAllowed;
|
|
221
|
+
declare const Validation_validateValueMatchesPattern: typeof validateValueMatchesPattern;
|
|
222
|
+
declare namespace Validation {
|
|
223
|
+
export { type Validation_CustomTypeInfoFieldValidator as CustomTypeInfoFieldValidator, type Validation_CustomTypeInfoFieldValidatorMap as CustomTypeInfoFieldValidatorMap, Validation_DENIED_TYPE_OPERATIONS as DENIED_TYPE_OPERATIONS, Validation_ERROR_MESSAGE_CONSTANTS as ERROR_MESSAGE_CONSTANTS, type Validation_ErrorMap as ErrorMap, Validation_INVALID_CUSTOM_TYPE as INVALID_CUSTOM_TYPE, Validation_PRIMITIVE_ERROR_MESSAGE_CONSTANTS as PRIMITIVE_ERROR_MESSAGE_CONSTANTS, Validation_RelationshipValidationType as RelationshipValidationType, Validation_TYPE_KEYWORD_VALIDATORS as TYPE_KEYWORD_VALIDATORS, type Validation_TypeInfoValidationResults as TypeInfoValidationResults, Validation_getValidityValue as getValidityValue, Validation_hasValue as hasValue, Validation_validateArrayOfTypeInfoFieldValues as validateArrayOfTypeInfoFieldValues, Validation_validateCustomType as validateCustomType, Validation_validateKeywordType as validateKeywordType, Validation_validateTypeInfoFieldOperationAllowed as validateTypeInfoFieldOperationAllowed, Validation_validateTypeInfoFieldValue as validateTypeInfoFieldValue, Validation_validateTypeInfoValue as validateTypeInfoValue, Validation_validateTypeOperationAllowed as validateTypeOperationAllowed, Validation_validateValueMatchesPattern as validateValueMatchesPattern };
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export { type CustomTypeInfoFieldValidatorMap as C, type TypeInfoValidationResults as T, Validation as V };
|
package/api/index.d.ts
ADDED