@intellegens/cornerstone-client 0.0.0-experimental-upgrade-20260302-1

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 (251) hide show
  1. package/README.md +256 -0
  2. package/demo/index.ts +29 -0
  3. package/demo/public_html/favicon.ico +0 -0
  4. package/demo/public_html/index.html +106 -0
  5. package/demo/public_html/websettings.json +3 -0
  6. package/dist/adapters/CollectionViewAdapter/index.d.ts +198 -0
  7. package/dist/adapters/CollectionViewAdapter/index.integration.test.d.ts +1 -0
  8. package/dist/adapters/CollectionViewAdapter/index.integration.test.js +163 -0
  9. package/dist/adapters/CollectionViewAdapter/index.js +381 -0
  10. package/dist/adapters/SearchAdapter/index.d.ts +55 -0
  11. package/dist/adapters/SearchAdapter/index.js +233 -0
  12. package/dist/adapters/index.d.ts +2 -0
  13. package/dist/adapters/index.js +2 -0
  14. package/dist/data/api/dto/PropertyPathDto.d.ts +4 -0
  15. package/dist/data/api/dto/PropertyPathDto.js +1 -0
  16. package/dist/data/api/dto/ReadOptionsDto.d.ts +8 -0
  17. package/dist/data/api/dto/ReadOptionsDto.js +1 -0
  18. package/dist/data/api/dto/ReadResultDto.d.ts +12 -0
  19. package/dist/data/api/dto/ReadResultDto.js +1 -0
  20. package/dist/data/api/dto/ReadResultMetadataDto.d.ts +8 -0
  21. package/dist/data/api/dto/ReadResultMetadataDto.js +1 -0
  22. package/dist/data/api/dto/crud/CrudMetadataDto.d.ts +4 -0
  23. package/dist/data/api/dto/crud/CrudMetadataDto.js +1 -0
  24. package/dist/data/api/dto/crud/index.d.ts +1 -0
  25. package/dist/data/api/dto/crud/index.js +1 -0
  26. package/dist/data/api/dto/index.d.ts +4 -0
  27. package/dist/data/api/dto/index.js +4 -0
  28. package/dist/data/api/dto/read/ReadMetadataDto.d.ts +8 -0
  29. package/dist/data/api/dto/read/ReadMetadataDto.js +1 -0
  30. package/dist/data/api/dto/read/ReadSelectedDefinitionDto.d.ts +18 -0
  31. package/dist/data/api/dto/read/ReadSelectedDefinitionDto.js +1 -0
  32. package/dist/data/api/dto/read/ReadSelectedNestedCollectionCriteriaDto.d.ts +22 -0
  33. package/dist/data/api/dto/read/ReadSelectedNestedCollectionCriteriaDto.js +1 -0
  34. package/dist/data/api/dto/read/ReadSelectedNestedCriteriaDto.d.ts +18 -0
  35. package/dist/data/api/dto/read/ReadSelectedNestedCriteriaDto.js +1 -0
  36. package/dist/data/api/dto/read/ReadSelectedOrderingDefinitionDto.d.ts +7 -0
  37. package/dist/data/api/dto/read/ReadSelectedOrderingDefinitionDto.js +1 -0
  38. package/dist/data/api/dto/read/ReadSelectedOrderingPropertyDefinitionDto.d.ts +14 -0
  39. package/dist/data/api/dto/read/ReadSelectedOrderingPropertyDefinitionDto.js +1 -0
  40. package/dist/data/api/dto/read/ReadSelectedPaginationDefinitionDto.d.ts +13 -0
  41. package/dist/data/api/dto/read/ReadSelectedPaginationDefinitionDto.js +1 -0
  42. package/dist/data/api/dto/read/ReadSelectedSearchDefinitionBuilder.d.ts +167 -0
  43. package/dist/data/api/dto/read/ReadSelectedSearchDefinitionBuilder.js +267 -0
  44. package/dist/data/api/dto/read/ReadSelectedSearchDefinitionDto.d.ts +33 -0
  45. package/dist/data/api/dto/read/ReadSelectedSearchDefinitionDto.js +1 -0
  46. package/dist/data/api/dto/read/ReadSelectedSearchPropertyDefinitionDto.d.ts +114 -0
  47. package/dist/data/api/dto/read/ReadSelectedSearchPropertyDefinitionDto.js +1 -0
  48. package/dist/data/api/dto/read/index.d.ts +10 -0
  49. package/dist/data/api/dto/read/index.js +10 -0
  50. package/dist/data/api/dto/response/ApiErrorDto.d.ts +17 -0
  51. package/dist/data/api/dto/response/ApiErrorDto.js +1 -0
  52. package/dist/data/api/dto/response/ApiErrorResponseDto.d.ts +11 -0
  53. package/dist/data/api/dto/response/ApiErrorResponseDto.js +1 -0
  54. package/dist/data/api/dto/response/ApiResponseDto.d.ts +3 -0
  55. package/dist/data/api/dto/response/ApiResponseDto.js +1 -0
  56. package/dist/data/api/dto/response/ApiSuccessResponseDto.d.ts +13 -0
  57. package/dist/data/api/dto/response/ApiSuccessResponseDto.js +1 -0
  58. package/dist/data/api/dto/response/EmptyMetadataDto.d.ts +4 -0
  59. package/dist/data/api/dto/response/EmptyMetadataDto.js +1 -0
  60. package/dist/data/api/dto/response/MetadataDto.d.ts +25 -0
  61. package/dist/data/api/dto/response/MetadataDto.js +1 -0
  62. package/dist/data/api/dto/response/index.d.ts +5 -0
  63. package/dist/data/api/dto/response/index.js +5 -0
  64. package/dist/data/api/enum/index.d.ts +2 -0
  65. package/dist/data/api/enum/index.js +2 -0
  66. package/dist/data/api/enum/read/ReadSelectedCollectionOperator.d.ts +16 -0
  67. package/dist/data/api/enum/read/ReadSelectedCollectionOperator.js +17 -0
  68. package/dist/data/api/enum/read/ReadSelectedComparisonOperator.d.ts +69 -0
  69. package/dist/data/api/enum/read/ReadSelectedComparisonOperator.js +76 -0
  70. package/dist/data/api/enum/read/ReadSelectedLogicalOperator.d.ts +15 -0
  71. package/dist/data/api/enum/read/ReadSelectedLogicalOperator.js +16 -0
  72. package/dist/data/api/enum/read/ReadSelectedOrderingDirection.d.ts +13 -0
  73. package/dist/data/api/enum/read/ReadSelectedOrderingDirection.js +14 -0
  74. package/dist/data/api/enum/read/ReadSelectedPropertyType.d.ts +66 -0
  75. package/dist/data/api/enum/read/ReadSelectedPropertyType.js +75 -0
  76. package/dist/data/api/enum/read/index.d.ts +5 -0
  77. package/dist/data/api/enum/read/index.js +5 -0
  78. package/dist/data/api/enum/response/ApiErrorCodes.d.ts +7 -0
  79. package/dist/data/api/enum/response/ApiErrorCodes.js +8 -0
  80. package/dist/data/api/enum/response/ErrorCode.d.ts +13 -0
  81. package/dist/data/api/enum/response/ErrorCode.js +14 -0
  82. package/dist/data/api/enum/response/index.d.ts +1 -0
  83. package/dist/data/api/enum/response/index.js +1 -0
  84. package/dist/data/api/index.d.ts +3 -0
  85. package/dist/data/api/index.js +3 -0
  86. package/dist/data/api/interface/ICommonIdentifiable.d.ts +7 -0
  87. package/dist/data/api/interface/ICommonIdentifiable.js +1 -0
  88. package/dist/data/api/interface/IConcurrencySafe.d.ts +9 -0
  89. package/dist/data/api/interface/IConcurrencySafe.js +2 -0
  90. package/dist/data/api/interface/IIdentifiable.d.ts +11 -0
  91. package/dist/data/api/interface/IIdentifiable.js +1 -0
  92. package/dist/data/api/interface/IIdentifiableSecondary.d.ts +9 -0
  93. package/dist/data/api/interface/IIdentifiableSecondary.js +1 -0
  94. package/dist/data/api/interface/index.d.ts +3 -0
  95. package/dist/data/api/interface/index.js +3 -0
  96. package/dist/data/auth/dto/ClaimDto.d.ts +4 -0
  97. package/dist/data/auth/dto/ClaimDto.js +1 -0
  98. package/dist/data/auth/dto/RegisterRequestDto.d.ts +4 -0
  99. package/dist/data/auth/dto/RegisterRequestDto.js +1 -0
  100. package/dist/data/auth/dto/RoleDto.d.ts +5 -0
  101. package/dist/data/auth/dto/RoleDto.js +1 -0
  102. package/dist/data/auth/dto/SignInRequestDto.d.ts +4 -0
  103. package/dist/data/auth/dto/SignInRequestDto.js +1 -0
  104. package/dist/data/auth/dto/TokensDto.d.ts +4 -0
  105. package/dist/data/auth/dto/TokensDto.js +1 -0
  106. package/dist/data/auth/dto/UserDto.d.ts +17 -0
  107. package/dist/data/auth/dto/UserDto.js +1 -0
  108. package/dist/data/auth/dto/UserInfoDto.d.ts +14 -0
  109. package/dist/data/auth/dto/UserInfoDto.js +1 -0
  110. package/dist/data/auth/dto/index.d.ts +5 -0
  111. package/dist/data/auth/dto/index.js +5 -0
  112. package/dist/data/auth/index.d.ts +2 -0
  113. package/dist/data/auth/index.js +2 -0
  114. package/dist/data/auth/policy.d.ts +52 -0
  115. package/dist/data/auth/policy.js +44 -0
  116. package/dist/data/index.d.ts +2 -0
  117. package/dist/data/index.js +2 -0
  118. package/dist/index.d.ts +4 -0
  119. package/dist/index.js +4 -0
  120. package/dist/services/api/ApiCrudControllerClient/index.d.ts +41 -0
  121. package/dist/services/api/ApiCrudControllerClient/index.integration.test.d.ts +1 -0
  122. package/dist/services/api/ApiCrudControllerClient/index.integration.test.js +34 -0
  123. package/dist/services/api/ApiCrudControllerClient/index.js +116 -0
  124. package/dist/services/api/ApiInitializationService/index.d.ts +106 -0
  125. package/dist/services/api/ApiInitializationService/index.js +208 -0
  126. package/dist/services/api/ApiReadControllerClient/index.d.ts +40 -0
  127. package/dist/services/api/ApiReadControllerClient/index.integration.test.d.ts +1 -0
  128. package/dist/services/api/ApiReadControllerClient/index.integration.test.js +59 -0
  129. package/dist/services/api/ApiReadControllerClient/index.js +111 -0
  130. package/dist/services/api/HttpService/FetchHttpService.d.ts +7 -0
  131. package/dist/services/api/HttpService/FetchHttpService.integration.test.d.ts +1 -0
  132. package/dist/services/api/HttpService/FetchHttpService.integration.test.js +52 -0
  133. package/dist/services/api/HttpService/FetchHttpService.js +29 -0
  134. package/dist/services/api/HttpService/HttpRequestConfig.d.ts +10 -0
  135. package/dist/services/api/HttpService/HttpRequestConfig.js +1 -0
  136. package/dist/services/api/HttpService/HttpResponse.d.ts +11 -0
  137. package/dist/services/api/HttpService/HttpResponse.js +3 -0
  138. package/dist/services/api/HttpService/IHttpService.d.ts +13 -0
  139. package/dist/services/api/HttpService/IHttpService.js +3 -0
  140. package/dist/services/api/HttpService/index.d.ts +9 -0
  141. package/dist/services/api/HttpService/index.js +10 -0
  142. package/dist/services/api/UserManagementControllerClient/index.d.ts +41 -0
  143. package/dist/services/api/UserManagementControllerClient/index.integration.test.d.ts +1 -0
  144. package/dist/services/api/UserManagementControllerClient/index.integration.test.js +60 -0
  145. package/dist/services/api/UserManagementControllerClient/index.js +117 -0
  146. package/dist/services/api/index.d.ts +5 -0
  147. package/dist/services/api/index.js +5 -0
  148. package/dist/services/auth/client/AuthService/index.d.ts +75 -0
  149. package/dist/services/auth/client/AuthService/index.js +200 -0
  150. package/dist/services/auth/client/AuthorizationManagementControllerClient/index.d.ts +48 -0
  151. package/dist/services/auth/client/AuthorizationManagementControllerClient/index.integration.test.d.ts +1 -0
  152. package/dist/services/auth/client/AuthorizationManagementControllerClient/index.integration.test.js +89 -0
  153. package/dist/services/auth/client/AuthorizationManagementControllerClient/index.js +148 -0
  154. package/dist/services/auth/client/index.d.ts +2 -0
  155. package/dist/services/auth/client/index.js +2 -0
  156. package/dist/services/auth/index.d.ts +1 -0
  157. package/dist/services/auth/index.js +1 -0
  158. package/dist/services/index.d.ts +2 -0
  159. package/dist/services/index.js +2 -0
  160. package/dist/utils/authorization/index.d.ts +17 -0
  161. package/dist/utils/authorization/index.js +45 -0
  162. package/dist/utils/index.d.ts +2 -0
  163. package/dist/utils/index.js +2 -0
  164. package/dist/utils/result/index.d.ts +21 -0
  165. package/dist/utils/result/index.js +16 -0
  166. package/dist/utils/search/index.d.ts +34 -0
  167. package/dist/utils/search/index.js +106 -0
  168. package/package.json +45 -0
  169. package/src/adapters/CollectionViewAdapter/index.integration.test.ts +197 -0
  170. package/src/adapters/CollectionViewAdapter/index.ts +477 -0
  171. package/src/adapters/SearchAdapter/index.ts +302 -0
  172. package/src/adapters/index.ts +2 -0
  173. package/src/data/api/dto/PropertyPathDto.ts +4 -0
  174. package/src/data/api/dto/ReadOptionsDto.ts +8 -0
  175. package/src/data/api/dto/ReadResultDto.ts +13 -0
  176. package/src/data/api/dto/ReadResultMetadataDto.ts +8 -0
  177. package/src/data/api/dto/crud/CrudMetadataDto.ts +4 -0
  178. package/src/data/api/dto/crud/index.ts +1 -0
  179. package/src/data/api/dto/index.ts +4 -0
  180. package/src/data/api/dto/read/ReadMetadataDto.ts +8 -0
  181. package/src/data/api/dto/read/ReadSelectedDefinitionDto.ts +21 -0
  182. package/src/data/api/dto/read/ReadSelectedNestedCollectionCriteriaDto.ts +25 -0
  183. package/src/data/api/dto/read/ReadSelectedNestedCriteriaDto.ts +20 -0
  184. package/src/data/api/dto/read/ReadSelectedOrderingDefinitionDto.ts +8 -0
  185. package/src/data/api/dto/read/ReadSelectedOrderingPropertyDefinitionDto.ts +16 -0
  186. package/src/data/api/dto/read/ReadSelectedPaginationDefinitionDto.ts +13 -0
  187. package/src/data/api/dto/read/ReadSelectedSearchDefinitionBuilder.ts +348 -0
  188. package/src/data/api/dto/read/ReadSelectedSearchDefinitionDto.ts +43 -0
  189. package/src/data/api/dto/read/ReadSelectedSearchPropertyDefinitionDto.ts +186 -0
  190. package/src/data/api/dto/read/index.ts +10 -0
  191. package/src/data/api/dto/response/ApiErrorDto.ts +21 -0
  192. package/src/data/api/dto/response/ApiErrorResponseDto.ts +13 -0
  193. package/src/data/api/dto/response/ApiResponseDto.ts +7 -0
  194. package/src/data/api/dto/response/ApiSuccessResponseDto.ts +13 -0
  195. package/src/data/api/dto/response/MetadataDto.ts +24 -0
  196. package/src/data/api/dto/response/index.ts +5 -0
  197. package/src/data/api/enum/index.ts +2 -0
  198. package/src/data/api/enum/read/ReadSelectedCollectionOperator.ts +17 -0
  199. package/src/data/api/enum/read/ReadSelectedComparisonOperator.ts +96 -0
  200. package/src/data/api/enum/read/ReadSelectedLogicalOperator.ts +16 -0
  201. package/src/data/api/enum/read/ReadSelectedOrderingDirection.ts +13 -0
  202. package/src/data/api/enum/read/ReadSelectedPropertyType.ts +96 -0
  203. package/src/data/api/enum/read/index.ts +5 -0
  204. package/src/data/api/enum/response/ErrorCode.ts +13 -0
  205. package/src/data/api/enum/response/index.ts +1 -0
  206. package/src/data/api/index.ts +3 -0
  207. package/src/data/api/interface/ICommonIdentifiable.ts +9 -0
  208. package/src/data/api/interface/IConcurrencySafe.ts +9 -0
  209. package/src/data/api/interface/IIdentifiable.ts +12 -0
  210. package/src/data/api/interface/IIdentifiableSecondary.ts +9 -0
  211. package/src/data/api/interface/index.ts +3 -0
  212. package/src/data/auth/dto/ClaimDto.ts +4 -0
  213. package/src/data/auth/dto/RegisterRequestDto.ts +4 -0
  214. package/src/data/auth/dto/RoleDto.ts +6 -0
  215. package/src/data/auth/dto/SignInRequestDto.ts +4 -0
  216. package/src/data/auth/dto/TokensDto.ts +4 -0
  217. package/src/data/auth/dto/UserDto.ts +18 -0
  218. package/src/data/auth/dto/UserInfoDto.ts +15 -0
  219. package/src/data/auth/dto/index.ts +5 -0
  220. package/src/data/auth/index.ts +2 -0
  221. package/src/data/auth/policy.ts +63 -0
  222. package/src/data/index.ts +2 -0
  223. package/src/index.ts +4 -0
  224. package/src/services/api/ApiCrudControllerClient/index.integration.test.ts +46 -0
  225. package/src/services/api/ApiCrudControllerClient/index.ts +135 -0
  226. package/src/services/api/ApiInitializationService/index.ts +254 -0
  227. package/src/services/api/ApiReadControllerClient/index.integration.test.ts +71 -0
  228. package/src/services/api/ApiReadControllerClient/index.ts +137 -0
  229. package/src/services/api/HttpService/FetchHttpService.integration.test.ts +65 -0
  230. package/src/services/api/HttpService/FetchHttpService.ts +34 -0
  231. package/src/services/api/HttpService/HttpRequestConfig.ts +10 -0
  232. package/src/services/api/HttpService/HttpResponse.ts +14 -0
  233. package/src/services/api/HttpService/IHttpService.ts +17 -0
  234. package/src/services/api/HttpService/README.md +106 -0
  235. package/src/services/api/HttpService/index.ts +12 -0
  236. package/src/services/api/UserManagementControllerClient/index.integration.test.ts +69 -0
  237. package/src/services/api/UserManagementControllerClient/index.ts +134 -0
  238. package/src/services/api/index.ts +5 -0
  239. package/src/services/auth/client/AuthService/index.ts +233 -0
  240. package/src/services/auth/client/AuthorizationManagementControllerClient/index.integration.test.ts +110 -0
  241. package/src/services/auth/client/AuthorizationManagementControllerClient/index.ts +165 -0
  242. package/src/services/auth/client/index.ts +2 -0
  243. package/src/services/auth/index.ts +1 -0
  244. package/src/services/index.ts +2 -0
  245. package/src/utils/authorization/index.ts +47 -0
  246. package/src/utils/index.ts +2 -0
  247. package/src/utils/result/index.ts +25 -0
  248. package/src/utils/search/index.ts +150 -0
  249. package/tsconfig.json +19 -0
  250. package/vitest-setup.ts +43 -0
  251. package/vitest.config.ts +59 -0
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Represents the basic comparison operators that can be used in a controller.
3
+ */
4
+ export var ReadSelectedComparisonOperator;
5
+ (function (ReadSelectedComparisonOperator) {
6
+ //#region Any type
7
+ /**
8
+ * Represents the equal comparison operator.
9
+ */
10
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["Equal"] = 0] = "Equal";
11
+ /**
12
+ * Represents the not equal comparison operator.
13
+ */
14
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["NotEqual"] = 1] = "NotEqual";
15
+ /**
16
+ * Represents the is null comparison operator.
17
+ */
18
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["IsNull"] = 2] = "IsNull";
19
+ /**
20
+ * Represents the is not null comparison operator.
21
+ */
22
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["IsNotNull"] = 3] = "IsNotNull";
23
+ //#endregion
24
+ //#region Number
25
+ /**
26
+ * Represents the less than comparison operator.
27
+ */
28
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["LessThan"] = 100] = "LessThan";
29
+ /**
30
+ * Represents the less than or equal comparison operator.
31
+ */
32
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["LessOrEqual"] = 101] = "LessOrEqual";
33
+ /**
34
+ * Represents the greater than comparison operator.
35
+ */
36
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["GreaterThan"] = 102] = "GreaterThan";
37
+ /**
38
+ * Represents the greater than or equal comparison operator.
39
+ */
40
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["GreaterOrEqual"] = 103] = "GreaterOrEqual";
41
+ //#endregion
42
+ //#region String
43
+ /**
44
+ * Represents the contains comparison operator.
45
+ */
46
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["Contains"] = 200] = "Contains";
47
+ /**
48
+ * Represents the starts with comparison operator.
49
+ */
50
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["StartsWith"] = 201] = "StartsWith";
51
+ /**
52
+ * Represents the ends with comparison operator.
53
+ */
54
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["EndsWith"] = 202] = "EndsWith";
55
+ /**
56
+ * Represents the contains comparison operator (case-insensitive).
57
+ */
58
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["IContains"] = 203] = "IContains";
59
+ /**
60
+ * Represents the starts with comparison operator (case-insensitive).
61
+ */
62
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["IStartsWith"] = 204] = "IStartsWith";
63
+ /**
64
+ * Represents the ends with comparison operator (case-insensitive).
65
+ */
66
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["IEndsWith"] = 205] = "IEndsWith";
67
+ /**
68
+ * Represents the equal comparison operator (case-insensitive).
69
+ */
70
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["IEqual"] = 206] = "IEqual";
71
+ /**
72
+ * Represents the not equal comparison operator (case-insensitive).
73
+ */
74
+ ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["INotEqual"] = 207] = "INotEqual";
75
+ //#endregion
76
+ })(ReadSelectedComparisonOperator || (ReadSelectedComparisonOperator = {}));
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Represents the logical operators that can be used in a controller.
3
+ * - The `And` operator combines multiple conditions, requiring all of them to be true.
4
+ * - The `Or` operator combines multiple conditions, requiring at least one of them to be true.
5
+ */
6
+ export declare enum ReadSelectedLogicalOperator {
7
+ /**
8
+ * Represents the logical AND operator.
9
+ */
10
+ And = 0,
11
+ /**
12
+ * Represents the logical OR operator.
13
+ */
14
+ Or = 1
15
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Represents the logical operators that can be used in a controller.
3
+ * - The `And` operator combines multiple conditions, requiring all of them to be true.
4
+ * - The `Or` operator combines multiple conditions, requiring at least one of them to be true.
5
+ */
6
+ export var ReadSelectedLogicalOperator;
7
+ (function (ReadSelectedLogicalOperator) {
8
+ /**
9
+ * Represents the logical AND operator.
10
+ */
11
+ ReadSelectedLogicalOperator[ReadSelectedLogicalOperator["And"] = 0] = "And";
12
+ /**
13
+ * Represents the logical OR operator.
14
+ */
15
+ ReadSelectedLogicalOperator[ReadSelectedLogicalOperator["Or"] = 1] = "Or";
16
+ })(ReadSelectedLogicalOperator || (ReadSelectedLogicalOperator = {}));
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Represents options for ordering directions
3
+ */
4
+ export declare enum ReadSelectedOrderingDirection {
5
+ /**
6
+ * Ascending ordering
7
+ */
8
+ Ascending = 0,
9
+ /**
10
+ * Descending ordering
11
+ */
12
+ Descending = 1
13
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Represents options for ordering directions
3
+ */
4
+ export var ReadSelectedOrderingDirection;
5
+ (function (ReadSelectedOrderingDirection) {
6
+ /**
7
+ * Ascending ordering
8
+ */
9
+ ReadSelectedOrderingDirection[ReadSelectedOrderingDirection["Ascending"] = 0] = "Ascending";
10
+ /**
11
+ * Descending ordering
12
+ */
13
+ ReadSelectedOrderingDirection[ReadSelectedOrderingDirection["Descending"] = 1] = "Descending";
14
+ })(ReadSelectedOrderingDirection || (ReadSelectedOrderingDirection = {}));
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Represents the basic property types that can be used in a controller.
3
+ * - The ReadSelectedPropertyType enum defines the basic property types that can be used in a fetch controller. These types include boolean, integer, long, and string.
4
+ */
5
+ export declare enum ReadSelectedPropertyType {
6
+ /**
7
+ * Represents a boolean property type.
8
+ */
9
+ Bool = 0,
10
+ /**
11
+ * Represents an integer property type.
12
+ */
13
+ Int = 100,
14
+ /**
15
+ * Represents a short property type.
16
+ */
17
+ Short = 101,
18
+ /**
19
+ * Represents a long property type.
20
+ */
21
+ Long = 102,
22
+ /**
23
+ * Represents a decimal property type.
24
+ */
25
+ Decimal = 103,
26
+ /**
27
+ * Represents a double property type.
28
+ */
29
+ Double = 104,
30
+ /**
31
+ * Represents a float property type.
32
+ */
33
+ Float = 105,
34
+ /**
35
+ * Represents a string property type.
36
+ */
37
+ String = 200,
38
+ /**
39
+ * Represents a Guid property type.
40
+ */
41
+ Guid = 201,
42
+ /**
43
+ * Represents a DateTime property type.
44
+ */
45
+ DateTime = 300,
46
+ /**
47
+ * Represents a DateTimeOffset property type.
48
+ */
49
+ DateTimeOffset = 301,
50
+ /**
51
+ * Represents a TimeSpan property type.
52
+ */
53
+ TimeSpan = 302,
54
+ /**
55
+ * Represents a DateOnly property type.
56
+ */
57
+ DateOnly = 303,
58
+ /**
59
+ * Represents a TimeOnly property type.
60
+ */
61
+ TimeOnly = 304,
62
+ /**
63
+ * Represents an Enum property type.
64
+ */
65
+ Enum = 400
66
+ }
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Represents the basic property types that can be used in a controller.
3
+ * - The ReadSelectedPropertyType enum defines the basic property types that can be used in a fetch controller. These types include boolean, integer, long, and string.
4
+ */
5
+ export var ReadSelectedPropertyType;
6
+ (function (ReadSelectedPropertyType) {
7
+ //#region Boolean
8
+ /**
9
+ * Represents a boolean property type.
10
+ */
11
+ ReadSelectedPropertyType[ReadSelectedPropertyType["Bool"] = 0] = "Bool";
12
+ //#endregion
13
+ //#region Number
14
+ /**
15
+ * Represents an integer property type.
16
+ */
17
+ ReadSelectedPropertyType[ReadSelectedPropertyType["Int"] = 100] = "Int";
18
+ /**
19
+ * Represents a short property type.
20
+ */
21
+ ReadSelectedPropertyType[ReadSelectedPropertyType["Short"] = 101] = "Short";
22
+ /**
23
+ * Represents a long property type.
24
+ */
25
+ ReadSelectedPropertyType[ReadSelectedPropertyType["Long"] = 102] = "Long";
26
+ /**
27
+ * Represents a decimal property type.
28
+ */
29
+ ReadSelectedPropertyType[ReadSelectedPropertyType["Decimal"] = 103] = "Decimal";
30
+ /**
31
+ * Represents a double property type.
32
+ */
33
+ ReadSelectedPropertyType[ReadSelectedPropertyType["Double"] = 104] = "Double";
34
+ /**
35
+ * Represents a float property type.
36
+ */
37
+ ReadSelectedPropertyType[ReadSelectedPropertyType["Float"] = 105] = "Float";
38
+ //#endregion
39
+ //#region string
40
+ /**
41
+ * Represents a string property type.
42
+ */
43
+ ReadSelectedPropertyType[ReadSelectedPropertyType["String"] = 200] = "String";
44
+ /**
45
+ * Represents a Guid property type.
46
+ */
47
+ ReadSelectedPropertyType[ReadSelectedPropertyType["Guid"] = 201] = "Guid";
48
+ //#endregion
49
+ //#region Time
50
+ /**
51
+ * Represents a DateTime property type.
52
+ */
53
+ ReadSelectedPropertyType[ReadSelectedPropertyType["DateTime"] = 300] = "DateTime";
54
+ /**
55
+ * Represents a DateTimeOffset property type.
56
+ */
57
+ ReadSelectedPropertyType[ReadSelectedPropertyType["DateTimeOffset"] = 301] = "DateTimeOffset";
58
+ /**
59
+ * Represents a TimeSpan property type.
60
+ */
61
+ ReadSelectedPropertyType[ReadSelectedPropertyType["TimeSpan"] = 302] = "TimeSpan";
62
+ /**
63
+ * Represents a DateOnly property type.
64
+ */
65
+ ReadSelectedPropertyType[ReadSelectedPropertyType["DateOnly"] = 303] = "DateOnly";
66
+ /**
67
+ * Represents a TimeOnly property type.
68
+ */
69
+ ReadSelectedPropertyType[ReadSelectedPropertyType["TimeOnly"] = 304] = "TimeOnly";
70
+ //#endregion
71
+ /**
72
+ * Represents an Enum property type.
73
+ */
74
+ ReadSelectedPropertyType[ReadSelectedPropertyType["Enum"] = 400] = "Enum";
75
+ })(ReadSelectedPropertyType || (ReadSelectedPropertyType = {}));
@@ -0,0 +1,5 @@
1
+ export * from './ReadSelectedCollectionOperator';
2
+ export * from './ReadSelectedComparisonOperator';
3
+ export * from './ReadSelectedLogicalOperator';
4
+ export * from './ReadSelectedOrderingDirection';
5
+ export * from './ReadSelectedPropertyType';
@@ -0,0 +1,5 @@
1
+ export * from './ReadSelectedCollectionOperator';
2
+ export * from './ReadSelectedComparisonOperator';
3
+ export * from './ReadSelectedLogicalOperator';
4
+ export * from './ReadSelectedOrderingDirection';
5
+ export * from './ReadSelectedPropertyType';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Represents available error codes to be returned as part of the ApiResponse object
3
+ */
4
+ export declare enum ApiErrorCodes {
5
+ NotFound = 404,
6
+ BadRequest = 400
7
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Represents available error codes to be returned as part of the ApiResponse object
3
+ */
4
+ export var ApiErrorCodes;
5
+ (function (ApiErrorCodes) {
6
+ ApiErrorCodes[ApiErrorCodes["NotFound"] = 404] = "NotFound";
7
+ ApiErrorCodes[ApiErrorCodes["BadRequest"] = 400] = "BadRequest";
8
+ })(ApiErrorCodes || (ApiErrorCodes = {}));
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Represents available error codes to be returned as part of the ApiResponse object
3
+ */
4
+ export declare enum ErrorCode {
5
+ InternalServerError = 500,
6
+ NotFound = 404,
7
+ BadRequest = 400,
8
+ NotImplemented = 501,
9
+ Unauthorized = 401,
10
+ GatewayTimeout = 504,
11
+ ValidationFailed = 422,
12
+ UnknownError = 599
13
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Represents available error codes to be returned as part of the ApiResponse object
3
+ */
4
+ export var ErrorCode;
5
+ (function (ErrorCode) {
6
+ ErrorCode[ErrorCode["InternalServerError"] = 500] = "InternalServerError";
7
+ ErrorCode[ErrorCode["NotFound"] = 404] = "NotFound";
8
+ ErrorCode[ErrorCode["BadRequest"] = 400] = "BadRequest";
9
+ ErrorCode[ErrorCode["NotImplemented"] = 501] = "NotImplemented";
10
+ ErrorCode[ErrorCode["Unauthorized"] = 401] = "Unauthorized";
11
+ ErrorCode[ErrorCode["GatewayTimeout"] = 504] = "GatewayTimeout";
12
+ ErrorCode[ErrorCode["ValidationFailed"] = 422] = "ValidationFailed";
13
+ ErrorCode[ErrorCode["UnknownError"] = 599] = "UnknownError";
14
+ })(ErrorCode || (ErrorCode = {}));
@@ -0,0 +1 @@
1
+ export * from './ErrorCode';
@@ -0,0 +1 @@
1
+ export * from './ErrorCode';
@@ -0,0 +1,3 @@
1
+ export * from './interface';
2
+ export * from './dto';
3
+ export * from './enum';
@@ -0,0 +1,3 @@
1
+ export * from './interface';
2
+ export * from './dto';
3
+ export * from './enum';
@@ -0,0 +1,7 @@
1
+ import { IIdentifiable } from "../..";
2
+ export interface ICommonIdentifiable<TKey> extends IIdentifiable<TKey> {
3
+ /**
4
+ * Gets or sets the type of the entity.
5
+ */
6
+ type: string;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Interface for entities that have row versioning
3
+ */
4
+ export interface IConcurrencySafe {
5
+ /**
6
+ * Row version
7
+ */
8
+ rowVersion: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ ;
2
+ export {};
@@ -0,0 +1,11 @@
1
+ import { IConcurrencySafe } from './IConcurrencySafe';
2
+ /**
3
+ * Interface for entities that have a Id property.
4
+ * Will be used as a primary key in the database.
5
+ */
6
+ export interface IIdentifiable<TKey> extends IConcurrencySafe {
7
+ /**
8
+ * Gets or sets the Id of the entity.
9
+ */
10
+ id: TKey;
11
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Interface for entities that have a secondary Id property.
3
+ */
4
+ export interface IIdentifiableSecondary<TKey> {
5
+ /**
6
+ * Gets or sets the secondary Id of the entity.
7
+ */
8
+ idSecondary: TKey;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './IIdentifiable';
2
+ export * from './IIdentifiableSecondary';
3
+ export * from './IConcurrencySafe';
@@ -0,0 +1,3 @@
1
+ export * from './IIdentifiable';
2
+ export * from './IIdentifiableSecondary';
3
+ export * from './IConcurrencySafe';
@@ -0,0 +1,4 @@
1
+ export type ClaimDto = {
2
+ type: string;
3
+ value: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export type RegisterRequestDto = {
2
+ username: string;
3
+ password: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ClaimDto } from '../..';
2
+ export type RoleDto = {
3
+ name: string;
4
+ claims: ClaimDto[];
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export type SignInRequestDto = {
2
+ username: string;
3
+ password: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export type TokensDto = {
2
+ accessToken?: string;
3
+ refreshToken?: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import { ClaimDto } from '../..';
2
+ import { IIdentifiable } from '../..';
3
+ /**
4
+ * Represents a user with an identifier and email address.
5
+ *
6
+ * @template TKey The type of the user identifier.
7
+ *
8
+ * @param {TKey} id The unique identifier for the user.
9
+ * @param {string} email The email address associated with the user.
10
+ * @param {string[]} roles The roles associated with the user.
11
+ * @param {ClaimDto[]} claims The claims associated with the user.
12
+ */
13
+ export type UserDto<TKey> = IIdentifiable<TKey> & {
14
+ email: string;
15
+ roles: string[];
16
+ claims: ClaimDto[];
17
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import { UserDto } from '../..';
2
+ /**
3
+ * Represents user information along with access token expiry.
4
+ *
5
+ * @template TKey The type of the user identifier.
6
+ * @template TUser The type of the user object, defaulting to `UserDto<TKey>`.
7
+ *
8
+ * @param {TUser} user The user object containing user details.
9
+ * @param {Date} accessTokenExpiry The date and time when the access token will expire.
10
+ */
11
+ export type UserInfoDto<TKey, TUser = UserDto<TKey>> = {
12
+ user: TUser;
13
+ accessTokenExpiry: Date;
14
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './ClaimDto';
2
+ export * from './UserDto';
3
+ export * from './UserInfoDto';
4
+ export * from './RoleDto';
5
+ export * from './RegisterRequestDto';
@@ -0,0 +1,5 @@
1
+ export * from './ClaimDto';
2
+ export * from './UserDto';
3
+ export * from './UserInfoDto';
4
+ export * from './RoleDto';
5
+ export * from './RegisterRequestDto';
@@ -0,0 +1,2 @@
1
+ export * from './dto';
2
+ export * from './policy';
@@ -0,0 +1,2 @@
1
+ export * from './dto';
2
+ export * from './policy';
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Interface for policies that can be checked.
3
+ *
4
+ * @interface IPolicy<TParams extends unknown[]>
5
+ * @template TParams - The type of the parameters that will be passed to the policy check function.
6
+ */
7
+ export interface IPolicy<TParams extends unknown[]> {
8
+ /**
9
+ * Checks if the policy is valid for the given parameters.
10
+ *
11
+ * @param params - Parameters to pass to the policy check function.
12
+ * @return A promise that resolves if the policy is valid, rejects otherwise.
13
+ */
14
+ check(...params: TParams): Promise<boolean>;
15
+ }
16
+ /**
17
+ * Base class for policies. It implements the IPolicy interface.
18
+ *
19
+ * @class PolicyBase
20
+ * @template TParams - The type of the parameters that will be passed to the policy check function.
21
+ */
22
+ export declare class PolicyBase<TParams extends unknown[]> implements IPolicy<TParams> {
23
+ /**
24
+ * Checks if the policy is valid for the given parameters.
25
+ *
26
+ * @return A promise that resolves if the policy is valid, rejects otherwise.
27
+ * @throws {Error} Error if not implemented.
28
+ */
29
+ check(): Promise<boolean>;
30
+ }
31
+ /**
32
+ * Class for policies that can be checked.
33
+ *
34
+ * @class Policy
35
+ * @template TParams - The type of the parameters that will be passed to the policy check function.
36
+ */
37
+ export declare class Policy<TParams extends unknown[]> extends PolicyBase<TParams> {
38
+ private readonly _verificationFn;
39
+ /**
40
+ * Creates a new policy.
41
+ *
42
+ * @param verificationFn - The function that will be used to verify the policy.
43
+ */
44
+ constructor(verificationFn: (...params: TParams) => Promise<boolean>);
45
+ /**
46
+ * Checks if the policy is valid for the given parameters.
47
+ *
48
+ * @param params - Parameters to pass to the policy check function.
49
+ * @return A promise that resolves if the policy is valid, rejects otherwise.
50
+ */
51
+ check(...params: TParams): Promise<boolean>;
52
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Base class for policies. It implements the IPolicy interface.
3
+ *
4
+ * @class PolicyBase
5
+ * @template TParams - The type of the parameters that will be passed to the policy check function.
6
+ */
7
+ export class PolicyBase {
8
+ /**
9
+ * Checks if the policy is valid for the given parameters.
10
+ *
11
+ * @return A promise that resolves if the policy is valid, rejects otherwise.
12
+ * @throws {Error} Error if not implemented.
13
+ */
14
+ async check() {
15
+ throw new Error('Not implemented');
16
+ }
17
+ }
18
+ /**
19
+ * Class for policies that can be checked.
20
+ *
21
+ * @class Policy
22
+ * @template TParams - The type of the parameters that will be passed to the policy check function.
23
+ */
24
+ export class Policy extends PolicyBase {
25
+ _verificationFn;
26
+ /**
27
+ * Creates a new policy.
28
+ *
29
+ * @param verificationFn - The function that will be used to verify the policy.
30
+ */
31
+ constructor(verificationFn) {
32
+ super();
33
+ this._verificationFn = verificationFn;
34
+ }
35
+ /**
36
+ * Checks if the policy is valid for the given parameters.
37
+ *
38
+ * @param params - Parameters to pass to the policy check function.
39
+ * @return A promise that resolves if the policy is valid, rejects otherwise.
40
+ */
41
+ async check(...params) {
42
+ return this._verificationFn(...params);
43
+ }
44
+ }
@@ -0,0 +1,2 @@
1
+ export * from './auth';
2
+ export * from './api';
@@ -0,0 +1,2 @@
1
+ export * from './auth';
2
+ export * from './api';
@@ -0,0 +1,4 @@
1
+ export * from './services';
2
+ export * from './data';
3
+ export * from './adapters';
4
+ export * from './utils';