@kravc/dos 1.12.6 → 2.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/README.md +31 -994
  2. package/dist/Component/Component.d.ts +43 -0
  3. package/dist/Component/Component.d.ts.map +1 -0
  4. package/dist/Component/Component.js +99 -0
  5. package/dist/Component/Component.js.map +1 -0
  6. package/dist/Component/index.d.ts +4 -0
  7. package/dist/Component/index.d.ts.map +1 -0
  8. package/dist/Component/index.js +10 -0
  9. package/dist/Component/index.js.map +1 -0
  10. package/dist/Context/Context.d.ts +86 -0
  11. package/dist/Context/Context.d.ts.map +1 -0
  12. package/dist/Context/Context.js +148 -0
  13. package/dist/Context/Context.js.map +1 -0
  14. package/dist/Context/Request.d.ts +35 -0
  15. package/dist/Context/Request.d.ts.map +1 -0
  16. package/dist/Context/Request.js +3 -0
  17. package/dist/Context/Request.js.map +1 -0
  18. package/dist/Context/__tests__/__helpers.d.ts +14 -0
  19. package/dist/Context/__tests__/__helpers.d.ts.map +1 -0
  20. package/dist/Context/__tests__/__helpers.js +69 -0
  21. package/dist/Context/__tests__/__helpers.js.map +1 -0
  22. package/dist/Context/getHttpMethod.d.ts +6 -0
  23. package/dist/Context/getHttpMethod.d.ts.map +1 -0
  24. package/dist/Context/getHttpMethod.js +16 -0
  25. package/dist/Context/getHttpMethod.js.map +1 -0
  26. package/dist/Context/getHttpPath.d.ts +6 -0
  27. package/dist/Context/getHttpPath.d.ts.map +1 -0
  28. package/dist/Context/getHttpPath.js +25 -0
  29. package/dist/Context/getHttpPath.js.map +1 -0
  30. package/dist/Context/getMutationParameters.d.ts +8 -0
  31. package/dist/Context/getMutationParameters.d.ts.map +1 -0
  32. package/dist/Context/getMutationParameters.js +25 -0
  33. package/dist/Context/getMutationParameters.js.map +1 -0
  34. package/dist/Context/getOperationId.d.ts +6 -0
  35. package/dist/Context/getOperationId.d.ts.map +1 -0
  36. package/dist/Context/getOperationId.js +21 -0
  37. package/dist/Context/getOperationId.js.map +1 -0
  38. package/dist/Context/getQueryParameters.d.ts +5 -0
  39. package/dist/Context/getQueryParameters.d.ts.map +1 -0
  40. package/dist/Context/getQueryParameters.js +33 -0
  41. package/dist/Context/getQueryParameters.js.map +1 -0
  42. package/dist/Context/index.d.ts +7 -0
  43. package/dist/Context/index.d.ts.map +1 -0
  44. package/dist/Context/index.js +12 -0
  45. package/dist/Context/index.js.map +1 -0
  46. package/dist/Context/withSafeAttributes.d.ts +23 -0
  47. package/dist/Context/withSafeAttributes.d.ts.map +1 -0
  48. package/dist/Context/withSafeAttributes.js +39 -0
  49. package/dist/Context/withSafeAttributes.js.map +1 -0
  50. package/dist/Document/Document.d.ts +114 -0
  51. package/dist/Document/Document.d.ts.map +1 -0
  52. package/dist/Document/Document.js +285 -0
  53. package/dist/Document/Document.js.map +1 -0
  54. package/dist/Document/MemoryDocument.d.ts +34 -0
  55. package/dist/Document/MemoryDocument.d.ts.map +1 -0
  56. package/dist/Document/MemoryDocument.js +103 -0
  57. package/dist/Document/MemoryDocument.js.map +1 -0
  58. package/dist/Document/__tests__/__helpers.d.ts +18 -0
  59. package/dist/Document/__tests__/__helpers.d.ts.map +1 -0
  60. package/dist/Document/__tests__/__helpers.js +28 -0
  61. package/dist/Document/__tests__/__helpers.js.map +1 -0
  62. package/dist/Document/index.d.ts +5 -0
  63. package/dist/Document/index.d.ts.map +1 -0
  64. package/dist/Document/index.js +11 -0
  65. package/dist/Document/index.js.map +1 -0
  66. package/dist/Operation/Operation.d.ts +95 -0
  67. package/dist/Operation/Operation.d.ts.map +1 -0
  68. package/dist/Operation/Operation.js +301 -0
  69. package/dist/Operation/Operation.js.map +1 -0
  70. package/dist/Operation/errors/AccessDeniedError.d.ts +22 -0
  71. package/dist/Operation/errors/AccessDeniedError.d.ts.map +1 -0
  72. package/dist/Operation/errors/AccessDeniedError.js +29 -0
  73. package/dist/Operation/errors/AccessDeniedError.js.map +1 -0
  74. package/dist/Operation/errors/CommonError.d.ts +30 -0
  75. package/dist/Operation/errors/CommonError.d.ts.map +1 -0
  76. package/dist/Operation/errors/CommonError.js +39 -0
  77. package/dist/Operation/errors/CommonError.js.map +1 -0
  78. package/dist/Operation/errors/DocumentExistsError.d.ts +27 -0
  79. package/dist/Operation/errors/DocumentExistsError.d.ts.map +1 -0
  80. package/dist/Operation/errors/DocumentExistsError.js +35 -0
  81. package/dist/Operation/errors/DocumentExistsError.js.map +1 -0
  82. package/dist/Operation/errors/DocumentNotFoundError.d.ts +28 -0
  83. package/dist/Operation/errors/DocumentNotFoundError.d.ts.map +1 -0
  84. package/dist/Operation/errors/DocumentNotFoundError.js +36 -0
  85. package/dist/Operation/errors/DocumentNotFoundError.js.map +1 -0
  86. package/dist/Operation/errors/InvalidParametersError.d.ts +27 -0
  87. package/dist/Operation/errors/InvalidParametersError.d.ts.map +1 -0
  88. package/dist/Operation/errors/InvalidParametersError.js +34 -0
  89. package/dist/Operation/errors/InvalidParametersError.js.map +1 -0
  90. package/dist/Operation/errors/UnauthorizedError.d.ts +25 -0
  91. package/dist/Operation/errors/UnauthorizedError.d.ts.map +1 -0
  92. package/dist/Operation/errors/UnauthorizedError.js +32 -0
  93. package/dist/Operation/errors/UnauthorizedError.js.map +1 -0
  94. package/dist/Operation/errors/UnprocessibleConditionError.d.ts +29 -0
  95. package/dist/Operation/errors/UnprocessibleConditionError.d.ts.map +1 -0
  96. package/dist/Operation/errors/UnprocessibleConditionError.js +36 -0
  97. package/dist/Operation/errors/UnprocessibleConditionError.js.map +1 -0
  98. package/dist/Operation/errors/index.d.ts +9 -0
  99. package/dist/Operation/errors/index.d.ts.map +1 -0
  100. package/dist/Operation/errors/index.js +21 -0
  101. package/dist/Operation/errors/index.js.map +1 -0
  102. package/dist/Operation/helpers/index.d.ts +4 -0
  103. package/dist/Operation/helpers/index.d.ts.map +1 -0
  104. package/dist/Operation/helpers/index.js +9 -0
  105. package/dist/Operation/helpers/index.js.map +1 -0
  106. package/dist/Operation/helpers/withActivity.d.ts +16 -0
  107. package/dist/Operation/helpers/withActivity.d.ts.map +1 -0
  108. package/dist/Operation/helpers/withActivity.js +23 -0
  109. package/dist/Operation/helpers/withActivity.js.map +1 -0
  110. package/dist/Operation/index.d.ts +14 -0
  111. package/dist/Operation/index.d.ts.map +1 -0
  112. package/dist/Operation/index.js +40 -0
  113. package/dist/Operation/index.js.map +1 -0
  114. package/dist/Operation/operations/Create.d.ts +5 -0
  115. package/dist/Operation/operations/Create.d.ts.map +1 -0
  116. package/dist/Operation/operations/Create.js +44 -0
  117. package/dist/Operation/operations/Create.js.map +1 -0
  118. package/dist/Operation/operations/Delete.d.ts +5 -0
  119. package/dist/Operation/operations/Delete.d.ts.map +1 -0
  120. package/dist/Operation/operations/Delete.js +58 -0
  121. package/dist/Operation/operations/Delete.js.map +1 -0
  122. package/dist/Operation/operations/Index.d.ts +11 -0
  123. package/dist/Operation/operations/Index.d.ts.map +1 -0
  124. package/dist/Operation/operations/Index.js +128 -0
  125. package/dist/Operation/operations/Index.js.map +1 -0
  126. package/dist/Operation/operations/List.d.ts +5 -0
  127. package/dist/Operation/operations/List.d.ts.map +1 -0
  128. package/dist/Operation/operations/List.js +48 -0
  129. package/dist/Operation/operations/List.js.map +1 -0
  130. package/dist/Operation/operations/Read.d.ts +5 -0
  131. package/dist/Operation/operations/Read.d.ts.map +1 -0
  132. package/dist/Operation/operations/Read.js +50 -0
  133. package/dist/Operation/operations/Read.js.map +1 -0
  134. package/dist/Operation/operations/Update.d.ts +5 -0
  135. package/dist/Operation/operations/Update.d.ts.map +1 -0
  136. package/dist/Operation/operations/Update.js +54 -0
  137. package/dist/Operation/operations/Update.js.map +1 -0
  138. package/dist/Operation/security/JwtAuthorization.d.ts +67 -0
  139. package/dist/Operation/security/JwtAuthorization.d.ts.map +1 -0
  140. package/dist/Operation/security/JwtAuthorization.js +148 -0
  141. package/dist/Operation/security/JwtAuthorization.js.map +1 -0
  142. package/dist/Operation/security/LambdaAuthorization.d.ts +30 -0
  143. package/dist/Operation/security/LambdaAuthorization.d.ts.map +1 -0
  144. package/dist/Operation/security/LambdaAuthorization.js +77 -0
  145. package/dist/Operation/security/LambdaAuthorization.js.map +1 -0
  146. package/dist/Operation/security/index.d.ts +8 -0
  147. package/dist/Operation/security/index.d.ts.map +1 -0
  148. package/dist/Operation/security/index.js +17 -0
  149. package/dist/Operation/security/index.js.map +1 -0
  150. package/dist/Operation/security/systemAuthorization.d.ts +5 -0
  151. package/dist/Operation/security/systemAuthorization.d.ts.map +1 -0
  152. package/dist/Operation/security/systemAuthorization.js +24 -0
  153. package/dist/Operation/security/systemAuthorization.js.map +1 -0
  154. package/dist/Operation/security/userAuthorization.d.ts +11 -0
  155. package/dist/Operation/security/userAuthorization.d.ts.map +1 -0
  156. package/dist/Operation/security/userAuthorization.js +36 -0
  157. package/dist/Operation/security/userAuthorization.js.map +1 -0
  158. package/dist/Operation/security/verifyToken.d.ts +6 -0
  159. package/dist/Operation/security/verifyToken.d.ts.map +1 -0
  160. package/dist/Operation/security/verifyToken.js +15 -0
  161. package/dist/Operation/security/verifyToken.js.map +1 -0
  162. package/dist/Service/Service.d.ts +62 -0
  163. package/dist/Service/Service.d.ts.map +1 -0
  164. package/dist/Service/Service.js +213 -0
  165. package/dist/Service/Service.js.map +1 -0
  166. package/dist/Service/authorize.d.ts +26 -0
  167. package/dist/Service/authorize.d.ts.map +1 -0
  168. package/dist/Service/authorize.js +40 -0
  169. package/dist/Service/authorize.js.map +1 -0
  170. package/dist/Service/errors/InvalidInputError.d.ts +29 -0
  171. package/dist/Service/errors/InvalidInputError.d.ts.map +1 -0
  172. package/dist/Service/errors/InvalidInputError.js +36 -0
  173. package/dist/Service/errors/InvalidInputError.js.map +1 -0
  174. package/dist/Service/errors/InvalidOutputError.d.ts +29 -0
  175. package/dist/Service/errors/InvalidOutputError.d.ts.map +1 -0
  176. package/dist/Service/errors/InvalidOutputError.js +36 -0
  177. package/dist/Service/errors/InvalidOutputError.js.map +1 -0
  178. package/dist/Service/errors/OperationError.d.ts +30 -0
  179. package/dist/Service/errors/OperationError.d.ts.map +1 -0
  180. package/dist/Service/errors/OperationError.js +61 -0
  181. package/dist/Service/errors/OperationError.js.map +1 -0
  182. package/dist/Service/errors/OperationNotFoundError.d.ts +38 -0
  183. package/dist/Service/errors/OperationNotFoundError.d.ts.map +1 -0
  184. package/dist/Service/errors/OperationNotFoundError.js +45 -0
  185. package/dist/Service/errors/OperationNotFoundError.js.map +1 -0
  186. package/dist/Service/errors/index.d.ts +8 -0
  187. package/dist/Service/errors/index.d.ts.map +1 -0
  188. package/dist/Service/errors/index.js +15 -0
  189. package/dist/Service/errors/index.js.map +1 -0
  190. package/dist/Service/errors/logOperationError.d.ts +35 -0
  191. package/dist/Service/errors/logOperationError.d.ts.map +1 -0
  192. package/dist/Service/errors/logOperationError.js +47 -0
  193. package/dist/Service/errors/logOperationError.js.map +1 -0
  194. package/dist/Service/errors/maskSecrets.d.ts +13 -0
  195. package/dist/Service/errors/maskSecrets.d.ts.map +1 -0
  196. package/dist/Service/errors/maskSecrets.js +57 -0
  197. package/dist/Service/errors/maskSecrets.js.map +1 -0
  198. package/dist/Service/index.d.ts +5 -0
  199. package/dist/Service/index.d.ts.map +1 -0
  200. package/dist/Service/index.js +25 -0
  201. package/dist/Service/index.js.map +1 -0
  202. package/dist/Service/logRequest.d.ts +5 -0
  203. package/dist/Service/logRequest.d.ts.map +1 -0
  204. package/dist/Service/logRequest.js +26 -0
  205. package/dist/Service/logRequest.js.map +1 -0
  206. package/dist/Service/spec/createSpec.d.ts +7 -0
  207. package/dist/Service/spec/createSpec.d.ts.map +1 -0
  208. package/dist/Service/spec/createSpec.js +56 -0
  209. package/dist/Service/spec/createSpec.js.map +1 -0
  210. package/dist/Service/spec/getErrorResponseDescription.d.ts +8 -0
  211. package/dist/Service/spec/getErrorResponseDescription.d.ts.map +1 -0
  212. package/dist/Service/spec/getErrorResponseDescription.js +15 -0
  213. package/dist/Service/spec/getErrorResponseDescription.js.map +1 -0
  214. package/dist/Service/spec/getHttpMethod.d.ts +4 -0
  215. package/dist/Service/spec/getHttpMethod.d.ts.map +1 -0
  216. package/dist/Service/spec/getHttpMethod.js +21 -0
  217. package/dist/Service/spec/getHttpMethod.js.map +1 -0
  218. package/dist/Service/spec/getOperation.d.ts +6 -0
  219. package/dist/Service/spec/getOperation.d.ts.map +1 -0
  220. package/dist/Service/spec/getOperation.js +71 -0
  221. package/dist/Service/spec/getOperation.js.map +1 -0
  222. package/dist/Service/spec/getOperationParameters.d.ts +6 -0
  223. package/dist/Service/spec/getOperationParameters.d.ts.map +1 -0
  224. package/dist/Service/spec/getOperationParameters.js +32 -0
  225. package/dist/Service/spec/getOperationParameters.js.map +1 -0
  226. package/dist/Service/spec/getServiceDefinitions.d.ts +6 -0
  227. package/dist/Service/spec/getServiceDefinitions.d.ts.map +1 -0
  228. package/dist/Service/spec/getServiceDefinitions.js +18 -0
  229. package/dist/Service/spec/getServiceDefinitions.js.map +1 -0
  230. package/dist/Service/spec/getServiceInfo.d.ts +7 -0
  231. package/dist/Service/spec/getServiceInfo.d.ts.map +1 -0
  232. package/dist/Service/spec/getServiceInfo.js +15 -0
  233. package/dist/Service/spec/getServiceInfo.js.map +1 -0
  234. package/dist/Service/spec/getServiceSecurityDefinitions.d.ts +6 -0
  235. package/dist/Service/spec/getServiceSecurityDefinitions.d.ts.map +1 -0
  236. package/dist/Service/spec/getServiceSecurityDefinitions.js +21 -0
  237. package/dist/Service/spec/getServiceSecurityDefinitions.js.map +1 -0
  238. package/dist/Service/spec/getServiceTags.d.ts +7 -0
  239. package/dist/Service/spec/getServiceTags.d.ts.map +1 -0
  240. package/dist/Service/spec/getServiceTags.js +19 -0
  241. package/dist/Service/spec/getServiceTags.js.map +1 -0
  242. package/dist/Service/spec/getSuccessStatusCode.d.ts +4 -0
  243. package/dist/Service/spec/getSuccessStatusCode.d.ts.map +1 -0
  244. package/dist/Service/spec/getSuccessStatusCode.js +14 -0
  245. package/dist/Service/spec/getSuccessStatusCode.js.map +1 -0
  246. package/dist/Service/spec/index.d.ts +3 -0
  247. package/dist/Service/spec/index.d.ts.map +1 -0
  248. package/dist/Service/spec/index.js +9 -0
  249. package/dist/Service/spec/index.js.map +1 -0
  250. package/dist/Service/spec/validateSpec.d.ts +5 -0
  251. package/dist/Service/spec/validateSpec.d.ts.map +1 -0
  252. package/dist/Service/spec/validateSpec.js +21 -0
  253. package/dist/Service/spec/validateSpec.js.map +1 -0
  254. package/dist/Service/test/createAccessToken.d.ts +9 -0
  255. package/dist/Service/test/createAccessToken.d.ts.map +1 -0
  256. package/dist/Service/test/createAccessToken.js +16 -0
  257. package/dist/Service/test/createAccessToken.js.map +1 -0
  258. package/dist/Service/test/ensureItem.d.ts +5 -0
  259. package/dist/Service/test/ensureItem.d.ts.map +1 -0
  260. package/dist/Service/test/ensureItem.js +13 -0
  261. package/dist/Service/test/ensureItem.js.map +1 -0
  262. package/dist/Service/test/ensureNoItem.d.ts +5 -0
  263. package/dist/Service/test/ensureNoItem.d.ts.map +1 -0
  264. package/dist/Service/test/ensureNoItem.js +13 -0
  265. package/dist/Service/test/ensureNoItem.js.map +1 -0
  266. package/dist/Service/test/execute.d.ts +44 -0
  267. package/dist/Service/test/execute.d.ts.map +1 -0
  268. package/dist/Service/test/execute.js +65 -0
  269. package/dist/Service/test/execute.js.map +1 -0
  270. package/dist/Service/test/findItem.d.ts +7 -0
  271. package/dist/Service/test/findItem.d.ts.map +1 -0
  272. package/dist/Service/test/findItem.js +16 -0
  273. package/dist/Service/test/findItem.js.map +1 -0
  274. package/dist/Service/test/firstItemGet.d.ts +5 -0
  275. package/dist/Service/test/firstItemGet.d.ts.map +1 -0
  276. package/dist/Service/test/firstItemGet.js +15 -0
  277. package/dist/Service/test/firstItemGet.js.map +1 -0
  278. package/dist/Service/test/index.d.ts +10 -0
  279. package/dist/Service/test/index.d.ts.map +1 -0
  280. package/dist/Service/test/index.js +36 -0
  281. package/dist/Service/test/index.js.map +1 -0
  282. package/dist/Service/test/keys.d.ts +5 -0
  283. package/dist/Service/test/keys.d.ts.map +1 -0
  284. package/dist/Service/test/keys.js +74 -0
  285. package/dist/Service/test/keys.js.map +1 -0
  286. package/dist/Service/test/wait.d.ts +4 -0
  287. package/dist/Service/test/wait.d.ts.map +1 -0
  288. package/dist/Service/test/wait.js +6 -0
  289. package/dist/Service/test/wait.js.map +1 -0
  290. package/dist/Service/useComposerMiddleware.d.ts +11 -0
  291. package/dist/Service/useComposerMiddleware.d.ts.map +1 -0
  292. package/dist/Service/useComposerMiddleware.js +41 -0
  293. package/dist/Service/useComposerMiddleware.js.map +1 -0
  294. package/dist/Service/useOasMiddleware.d.ts +16 -0
  295. package/dist/Service/useOasMiddleware.d.ts.map +1 -0
  296. package/dist/Service/useOasMiddleware.js +53 -0
  297. package/dist/Service/useOasMiddleware.js.map +1 -0
  298. package/dist/index.d.ts +11 -0
  299. package/dist/index.d.ts.map +1 -0
  300. package/dist/index.js +25 -0
  301. package/dist/index.js.map +1 -0
  302. package/eslint.config.mjs +32 -52
  303. package/example/documents/Profile/Profile.ts +8 -0
  304. package/example/documents/Profile/Profile.yaml +6 -0
  305. package/example/documents/Profile/ProfileAttributes.d.ts +5 -0
  306. package/example/documents/Profile/index.ts +3 -0
  307. package/example/documents/index.ts +5 -0
  308. package/example/index.ts +38 -0
  309. package/example/lib/createActivity.ts +28 -0
  310. package/example/lib/index.ts +24 -0
  311. package/example/operations/Profile/CreateProfile.ts +9 -0
  312. package/example/operations/Profile/DeleteProfile.ts +9 -0
  313. package/example/operations/Profile/IndexProfiles.ts +9 -0
  314. package/example/operations/Profile/ReadProfile.ts +9 -0
  315. package/example/operations/Profile/ReadProfileSystem.ts +9 -0
  316. package/example/operations/Profile/UpdateProfile.ts +9 -0
  317. package/example/operations/Service/Health.ts +11 -0
  318. package/example/operations/index.ts +22 -0
  319. package/example/security/index.ts +25 -0
  320. package/jest.config.mjs +7 -0
  321. package/package.json +34 -24
  322. package/src/Component/Component.ts +120 -0
  323. package/src/Component/__tests__/Component.test.ts +161 -0
  324. package/src/Component/index.ts +7 -0
  325. package/src/Context/Context.ts +217 -0
  326. package/src/Context/Request.ts +41 -0
  327. package/src/Context/__tests__/Context.test.ts +271 -0
  328. package/src/Context/__tests__/__helpers.ts +86 -0
  329. package/src/Context/getHttpMethod.ts +21 -0
  330. package/src/Context/getHttpPath.ts +34 -0
  331. package/src/Context/getMutationParameters.ts +35 -0
  332. package/src/Context/getOperationId.ts +23 -0
  333. package/src/Context/getQueryParameters.ts +45 -0
  334. package/src/Context/index.ts +12 -0
  335. package/src/Context/withSafeAttributes.ts +39 -0
  336. package/src/Document/Document.ts +448 -0
  337. package/src/Document/MemoryDocument.ts +152 -0
  338. package/src/Document/__tests__/MemoryDocument.test.ts +406 -0
  339. package/src/Document/__tests__/__helpers.ts +40 -0
  340. package/src/Document/index.ts +11 -0
  341. package/src/Operation/Operation.ts +401 -0
  342. package/src/Operation/__tests__/Operation.test.ts +142 -0
  343. package/src/Operation/errors/AccessDeniedError.ts +25 -0
  344. package/src/Operation/errors/CommonError.ts +41 -0
  345. package/src/Operation/errors/DocumentExistsError.ts +33 -0
  346. package/src/Operation/errors/DocumentNotFoundError.ts +34 -0
  347. package/src/Operation/errors/InvalidParametersError.ts +30 -0
  348. package/src/Operation/errors/UnauthorizedError.ts +28 -0
  349. package/src/Operation/errors/UnprocessibleConditionError.ts +32 -0
  350. package/src/Operation/errors/__tests__/InvalidParametersError.test.ts +20 -0
  351. package/src/Operation/errors/__tests__/UnprocessibleConditionError.test.ts +20 -0
  352. package/src/Operation/errors/index.ts +17 -0
  353. package/src/Operation/helpers/index.ts +9 -0
  354. package/src/Operation/helpers/withActivity.ts +43 -0
  355. package/src/Operation/index.ts +29 -0
  356. package/src/Operation/operations/Create.ts +49 -0
  357. package/src/Operation/operations/Delete.ts +65 -0
  358. package/src/Operation/operations/Index.ts +164 -0
  359. package/src/Operation/operations/List.ts +62 -0
  360. package/src/Operation/operations/Read.ts +55 -0
  361. package/src/Operation/operations/Update.ts +60 -0
  362. package/src/Operation/operations/__tests__/Create.test.ts +153 -0
  363. package/src/Operation/operations/__tests__/Delete.test.ts +163 -0
  364. package/src/Operation/operations/__tests__/Index.test.ts +209 -0
  365. package/src/Operation/operations/__tests__/List.test.ts +146 -0
  366. package/src/Operation/operations/__tests__/Read.test.ts +152 -0
  367. package/src/Operation/operations/__tests__/Update.test.ts +158 -0
  368. package/src/Operation/security/JwtAuthorization.ts +247 -0
  369. package/src/Operation/security/LambdaAuthorization.ts +103 -0
  370. package/src/Operation/security/__tests__/JwtAuthorization.test.ts +230 -0
  371. package/src/Operation/security/__tests__/LambdaAuthorization.test.ts +63 -0
  372. package/src/Operation/security/__tests__/userAuthorization.test.ts +42 -0
  373. package/src/Operation/security/index.ts +15 -0
  374. package/src/Operation/security/systemAuthorization.ts +23 -0
  375. package/src/Operation/security/userAuthorization.ts +47 -0
  376. package/src/Operation/security/verifyToken.ts +22 -0
  377. package/src/Service/Service.ts +317 -0
  378. package/src/Service/__tests__/Service.test.ts +229 -0
  379. package/src/Service/authorize.ts +80 -0
  380. package/src/Service/errors/InvalidInputError.ts +40 -0
  381. package/src/Service/errors/InvalidOutputError.ts +40 -0
  382. package/src/Service/errors/OperationError.ts +74 -0
  383. package/src/{errors → Service/errors}/OperationError.yaml +7 -10
  384. package/src/Service/errors/OperationErrorAttributes.d.ts +12 -0
  385. package/src/Service/errors/OperationNotFoundError.ts +45 -0
  386. package/src/Service/errors/__tests__/OperationError.test.ts +17 -0
  387. package/src/Service/errors/__tests__/maskSecrets.test.ts +92 -0
  388. package/src/Service/errors/index.ts +18 -0
  389. package/src/Service/errors/logOperationError.ts +72 -0
  390. package/src/Service/errors/maskSecrets.ts +65 -0
  391. package/src/Service/index.ts +9 -0
  392. package/src/Service/logRequest.ts +50 -0
  393. package/src/Service/spec/__tests__/validateSpec.test.ts +10 -0
  394. package/src/Service/spec/createSpec.ts +68 -0
  395. package/src/Service/spec/getErrorResponseDescription.ts +20 -0
  396. package/src/Service/spec/getHttpMethod.ts +20 -0
  397. package/src/Service/spec/getOperation.ts +99 -0
  398. package/src/Service/spec/getOperationParameters.ts +43 -0
  399. package/src/Service/spec/getServiceDefinitions.ts +23 -0
  400. package/src/Service/spec/getServiceInfo.ts +18 -0
  401. package/src/Service/spec/getServiceSecurityDefinitions.ts +26 -0
  402. package/src/Service/spec/getServiceTags.ts +23 -0
  403. package/src/Service/spec/getSuccessStatusCode.ts +15 -0
  404. package/src/Service/spec/index.ts +5 -0
  405. package/src/Service/spec/validateSpec.ts +22 -0
  406. package/src/Service/test/__tests__/createAccessToken.test.ts +104 -0
  407. package/src/Service/test/__tests__/ensureItem.test.ts +41 -0
  408. package/src/Service/test/__tests__/ensureNoItem.test.ts +49 -0
  409. package/src/Service/test/__tests__/execute.test.ts +125 -0
  410. package/src/Service/test/__tests__/findItem.test.ts +45 -0
  411. package/src/Service/test/__tests__/firstItemGet.test.ts +50 -0
  412. package/src/Service/test/__tests__/wait.test.ts +66 -0
  413. package/src/Service/test/createAccessToken.ts +28 -0
  414. package/src/Service/test/ensureItem.ts +9 -0
  415. package/src/Service/test/ensureNoItem.ts +9 -0
  416. package/src/Service/test/execute.ts +112 -0
  417. package/src/Service/test/findItem.ts +22 -0
  418. package/src/Service/test/firstItemGet.ts +18 -0
  419. package/src/Service/test/index.ts +19 -0
  420. package/src/Service/test/keys.ts +75 -0
  421. package/src/Service/test/wait.ts +5 -0
  422. package/src/Service/useComposerMiddleware.ts +56 -0
  423. package/src/Service/useOasMiddleware.ts +69 -0
  424. package/src/index.ts +12 -0
  425. package/tsconfig.json +26 -0
  426. package/examples/CreateProfile.js +0 -40
  427. package/examples/DeleteProfile.js +0 -6
  428. package/examples/Health.js +0 -8
  429. package/examples/IndexProfiles.js +0 -6
  430. package/examples/Profile.js +0 -8
  431. package/examples/Profile.yaml +0 -4
  432. package/examples/ReadProfile.js +0 -18
  433. package/examples/UpdateProfile.js +0 -25
  434. package/examples/index.js +0 -29
  435. package/src/Component.js +0 -59
  436. package/src/Component.spec.js +0 -65
  437. package/src/Document.js +0 -310
  438. package/src/Document.spec.js +0 -331
  439. package/src/Operation.js +0 -258
  440. package/src/Operation.spec.js +0 -474
  441. package/src/Service.js +0 -207
  442. package/src/Service.spec.js +0 -388
  443. package/src/errors/AccessDeniedError.js +0 -11
  444. package/src/errors/CommonError.js +0 -19
  445. package/src/errors/DocumentExistsError.js +0 -15
  446. package/src/errors/DocumentNotFoundError.js +0 -15
  447. package/src/errors/InvalidInputError.js +0 -19
  448. package/src/errors/InvalidOutputError.js +0 -20
  449. package/src/errors/InvalidParametersError.js +0 -11
  450. package/src/errors/OperationError.js +0 -44
  451. package/src/errors/OperationNotFoundError.js +0 -16
  452. package/src/errors/UnauthorizedError.js +0 -11
  453. package/src/errors/UnprocessibleConditionError.js +0 -11
  454. package/src/errors/index.js +0 -11
  455. package/src/helpers/asSafeClass.js +0 -22
  456. package/src/helpers/authorize.js +0 -44
  457. package/src/helpers/createContext.js +0 -96
  458. package/src/helpers/createSchemasMap.js +0 -37
  459. package/src/helpers/createSpec.js +0 -196
  460. package/src/helpers/defaultId.js +0 -30
  461. package/src/helpers/defaultSummary.js +0 -15
  462. package/src/helpers/defaultTags.js +0 -16
  463. package/src/helpers/getComponentTitle.js +0 -22
  464. package/src/helpers/getDefaultSchemaAttributes.js +0 -32
  465. package/src/helpers/getHttpMethod.js +0 -19
  466. package/src/helpers/getIdPrefix.js +0 -7
  467. package/src/helpers/getOrFail.js +0 -24
  468. package/src/helpers/getOrFail.spec.js +0 -17
  469. package/src/helpers/getSuccessStatusCode.js +0 -15
  470. package/src/helpers/handler.js +0 -21
  471. package/src/helpers/loadSync.js +0 -14
  472. package/src/helpers/logError.js +0 -33
  473. package/src/helpers/logRequest.js +0 -36
  474. package/src/helpers/maskSecrets.js +0 -42
  475. package/src/helpers/specMiddleware.js +0 -81
  476. package/src/index.d.ts +0 -352
  477. package/src/index.js +0 -35
  478. package/src/operations/Create.js +0 -39
  479. package/src/operations/Delete.js +0 -54
  480. package/src/operations/Index.js +0 -107
  481. package/src/operations/Read.js +0 -46
  482. package/src/operations/Update.js +0 -50
  483. package/src/security/JwtAuthorization.js +0 -125
  484. package/src/security/SystemAuthorization.js +0 -73
  485. package/src/security/index.js +0 -9
  486. package/src/security/verifyToken.js +0 -17
  487. package/src/test/createAccessToken.js +0 -23
  488. package/src/test/execute.js +0 -84
  489. package/src/test/index.js +0 -11
  490. package/src/test/keys.js +0 -39
  491. package/src/test/wait.js +0 -5
  492. /package/{specs → .composer}/Documents.yaml +0 -0
  493. /package/{specs → .composer}/Enums.yaml +0 -0
  494. /package/{specs → .composer}/Operations.yaml +0 -0
  495. /package/{specs → .composer}/Parameters.yaml +0 -0
  496. /package/{specs → .composer}/Scenarios.yaml +0 -0
  497. /package/{specs → .composer}/Schemas.yaml +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Operation.js","sourceRoot":"","sources":["../../src/Operation/Operation.ts"],"names":[],"mappings":";;;;;AAAA,0DAAkC;AAGlC,0CAAoE;AAEpE,mCAAwE;AACxE,wCAA0F;AAgB1F,gBAAgB;AAChB,MAAM,SAAS;IACL,QAAQ,CAAU;IAClB,QAAQ,CAA0B;IAClC,kBAAkB,CAA0B;IAEpD,wCAAwC;IACxC,YAAY,OAAgB;QAC1B,MAAM,SAAS,GAAG,IAAA,YAAG,EAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAE,CAAC;QAE/C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAE7B,OAAO,IAAA,4BAAkB,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,yCAAyC;IACzC,MAAM,KAAK,KAAK;QACd,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,QAAQ;YAChB,M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AM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAEvC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC;QAExE,MAAM,GAAG,WAAW;YAClB,CAAC,CAAC,CACE,MAAM,CAAC,IAAI;gBACT,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE;gBAClC,CAAC,CAAC,WAAW,CAChB;YACH,CAAC,CAAC,MAAM,CAAC;QAEX,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;QACxB,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,IAA0B,CAAC,CAAC;QAE7D,OAAO;YACL,MAAM;YACN,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,iBAAiB,EAAE,IAAI,CAAC,kBAAkB;SAC3C,CAAC;IACJ,CAAC;CACF;AAED,kBAAe,SAAS,CAAC"}
@@ -0,0 +1,22 @@
1
+ import CommonError from './CommonError';
2
+ /**
3
+ * Access Denied Error
4
+ *
5
+ * `AccessDeniedError` represents a **403 Forbidden** error that occurs when a request
6
+ * is authenticated (the user's identity is verified) but the user lacks the necessary
7
+ * permissions to perform the requested operation. This is distinct from `UnauthorizedError`
8
+ * (401), which indicates authentication failure (missing or invalid credentials).
9
+ *
10
+ * This error is thrown by security authorization classes (`JwtAuthorization`, `SystemAuthorization`)
11
+ * when access verification fails. It signals that:
12
+ *
13
+ * - The request was properly authenticated (token/credentials were valid)
14
+ * - The authenticated user/entity does not have permission to access the resource or operation
15
+ * - The operation may be restricted to specific roles, scopes, or internal-only access
16
+ */
17
+ declare class AccessDeniedError extends CommonError {
18
+ /** Creates an instance of access denied error. */
19
+ constructor(message: string);
20
+ }
21
+ export default AccessDeniedError;
22
+ //# sourceMappingURL=AccessDeniedError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessDeniedError.d.ts","sourceRoot":"","sources":["../../../src/Operation/errors/AccessDeniedError.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC;;;;;;;;;;;;;;GAcG;AACH,cAAM,iBAAkB,SAAQ,WAAW;IACzC,kDAAkD;gBACtC,OAAO,EAAE,MAAM;CAG5B;AAED,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const CommonError_1 = __importDefault(require("./CommonError"));
7
+ /**
8
+ * Access Denied Error
9
+ *
10
+ * `AccessDeniedError` represents a **403 Forbidden** error that occurs when a request
11
+ * is authenticated (the user's identity is verified) but the user lacks the necessary
12
+ * permissions to perform the requested operation. This is distinct from `UnauthorizedError`
13
+ * (401), which indicates authentication failure (missing or invalid credentials).
14
+ *
15
+ * This error is thrown by security authorization classes (`JwtAuthorization`, `SystemAuthorization`)
16
+ * when access verification fails. It signals that:
17
+ *
18
+ * - The request was properly authenticated (token/credentials were valid)
19
+ * - The authenticated user/entity does not have permission to access the resource or operation
20
+ * - The operation may be restricted to specific roles, scopes, or internal-only access
21
+ */
22
+ class AccessDeniedError extends CommonError_1.default {
23
+ /** Creates an instance of access denied error. */
24
+ constructor(message) {
25
+ super('AccessDeniedError', message);
26
+ }
27
+ }
28
+ exports.default = AccessDeniedError;
29
+ //# sourceMappingURL=AccessDeniedError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessDeniedError.js","sourceRoot":"","sources":["../../../src/Operation/errors/AccessDeniedError.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AAExC;;;;;;;;;;;;;;GAcG;AACH,MAAM,iBAAkB,SAAQ,qBAAW;IACzC,kDAAkD;IAClD,YAAY,OAAe;QACzB,KAAK,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF;AAED,kBAAe,iBAAiB,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Common Error
3
+ *
4
+ * `CommonError` is the base class for **expected**, domain-specific errors in operations
5
+ * (e.g. document not found, invalid input, unauthorized). It establishes a consistent
6
+ * contract: a machine-readable `code`, a human-readable `message`, and an `isCommonError`
7
+ * flag. This allows the framework to:
8
+ *
9
+ * - **Preserve error details for clients**: Common errors are passed through `OperationError`
10
+ * and returned to callers with their original code and message, so clients can handle
11
+ * them explicitly (retry, show validation messages, etc.).
12
+ * - **Separate expected from unexpected failures**: `OperationError` and `logOperationError`
13
+ * use `isCommonError` to treat common errors as "expected" (return as-is, log sparingly)
14
+ * and all other errors as "unexpected" (sanitize response, log fully for debugging).
15
+ *
16
+ * Subclass `CommonError` for any error that is part of your domain model and that callers
17
+ * should receive verbatim. Do **not** use it for bugs, unhandled exceptions, or internal
18
+ * failures—those remain generic "Unexpected operation error" to clients.
19
+ */
20
+ declare class CommonError extends Error {
21
+ private _code;
22
+ /** Creates an instance of common error for a code and message. */
23
+ constructor(code: string, message: string);
24
+ /** Returns error code. */
25
+ get code(): string;
26
+ /** Flags if an error is a common error. */
27
+ get isCommonError(): boolean;
28
+ }
29
+ export default CommonError;
30
+ //# sourceMappingURL=CommonError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommonError.d.ts","sourceRoot":"","sources":["../../../src/Operation/errors/CommonError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAM,WAAY,SAAQ,KAAK;IAC7B,OAAO,CAAC,KAAK,CAAS;IAEtB,kEAAkE;gBACtD,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAMzC,0BAA0B;IAC1B,IAAI,IAAI,WAEP;IAED,2CAA2C;IAC3C,IAAI,aAAa,YAEhB;CACF;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * Common Error
5
+ *
6
+ * `CommonError` is the base class for **expected**, domain-specific errors in operations
7
+ * (e.g. document not found, invalid input, unauthorized). It establishes a consistent
8
+ * contract: a machine-readable `code`, a human-readable `message`, and an `isCommonError`
9
+ * flag. This allows the framework to:
10
+ *
11
+ * - **Preserve error details for clients**: Common errors are passed through `OperationError`
12
+ * and returned to callers with their original code and message, so clients can handle
13
+ * them explicitly (retry, show validation messages, etc.).
14
+ * - **Separate expected from unexpected failures**: `OperationError` and `logOperationError`
15
+ * use `isCommonError` to treat common errors as "expected" (return as-is, log sparingly)
16
+ * and all other errors as "unexpected" (sanitize response, log fully for debugging).
17
+ *
18
+ * Subclass `CommonError` for any error that is part of your domain model and that callers
19
+ * should receive verbatim. Do **not** use it for bugs, unhandled exceptions, or internal
20
+ * failures—those remain generic "Unexpected operation error" to clients.
21
+ */
22
+ class CommonError extends Error {
23
+ _code;
24
+ /** Creates an instance of common error for a code and message. */
25
+ constructor(code, message) {
26
+ super(message);
27
+ this._code = code;
28
+ }
29
+ /** Returns error code. */
30
+ get code() {
31
+ return this._code;
32
+ }
33
+ /** Flags if an error is a common error. */
34
+ get isCommonError() {
35
+ return true;
36
+ }
37
+ }
38
+ exports.default = CommonError;
39
+ //# sourceMappingURL=CommonError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommonError.js","sourceRoot":"","sources":["../../../src/Operation/errors/CommonError.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAY,SAAQ,KAAK;IACrB,KAAK,CAAS;IAEtB,kEAAkE;IAClE,YAAY,IAAY,EAAE,OAAe;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,0BAA0B;IAC1B,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,2CAA2C;IAC3C,IAAI,aAAa;QACf,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,kBAAe,WAAW,CAAC"}
@@ -0,0 +1,27 @@
1
+ import Component from '../../Component';
2
+ import CommonError from './CommonError';
3
+ /**
4
+ * Document Exists Error
5
+ *
6
+ * `DocumentExistsError` represents a **422 Unprocessable Entity** error that occurs when
7
+ * attempting to create a document that already exists in the system. This error is thrown
8
+ * during create operations when a document with the same identifying attributes (typically
9
+ * an ID or unique combination of fields) already exists.
10
+ *
11
+ * This error signals that:
12
+ *
13
+ * - The create operation cannot proceed because a document with the given parameters
14
+ * already exists
15
+ * - The request is semantically correct but cannot be processed due to a conflict
16
+ * - The client should either update the existing document or use different identifying
17
+ * parameters
18
+ *
19
+ * The error message includes the human-readable document title (e.g., "Profile", "Order item")
20
+ * and the parameters that caused the conflict, formatted as JSON for debugging purposes.
21
+ */
22
+ declare class DocumentExistsError extends CommonError {
23
+ /** Creates an instance of document exists error. */
24
+ constructor(Document: typeof Component, parameters: Record<string, unknown>);
25
+ }
26
+ export default DocumentExistsError;
27
+ //# sourceMappingURL=DocumentExistsError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentExistsError.d.ts","sourceRoot":"","sources":["../../../src/Operation/errors/DocumentExistsError.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAM,mBAAoB,SAAQ,WAAW;IAC3C,oDAAoD;gBACxC,QAAQ,EAAE,OAAO,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAM5E;AAED,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const CommonError_1 = __importDefault(require("./CommonError"));
7
+ /**
8
+ * Document Exists Error
9
+ *
10
+ * `DocumentExistsError` represents a **422 Unprocessable Entity** error that occurs when
11
+ * attempting to create a document that already exists in the system. This error is thrown
12
+ * during create operations when a document with the same identifying attributes (typically
13
+ * an ID or unique combination of fields) already exists.
14
+ *
15
+ * This error signals that:
16
+ *
17
+ * - The create operation cannot proceed because a document with the given parameters
18
+ * already exists
19
+ * - The request is semantically correct but cannot be processed due to a conflict
20
+ * - The client should either update the existing document or use different identifying
21
+ * parameters
22
+ *
23
+ * The error message includes the human-readable document title (e.g., "Profile", "Order item")
24
+ * and the parameters that caused the conflict, formatted as JSON for debugging purposes.
25
+ */
26
+ class DocumentExistsError extends CommonError_1.default {
27
+ /** Creates an instance of document exists error. */
28
+ constructor(Document, parameters) {
29
+ const documentTitle = Document.getTitle();
30
+ const jsonParameters = JSON.stringify(parameters, null, 2);
31
+ super('DocumentExistsError', `${documentTitle} already exists ${jsonParameters}`);
32
+ }
33
+ }
34
+ exports.default = DocumentExistsError;
35
+ //# sourceMappingURL=DocumentExistsError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentExistsError.js","sourceRoot":"","sources":["../../../src/Operation/errors/DocumentExistsError.ts"],"names":[],"mappings":";;;;;AACA,gEAAwC;AAExC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,mBAAoB,SAAQ,qBAAW;IAC3C,oDAAoD;IACpD,YAAY,QAA0B,EAAE,UAAmC;QACzE,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC1C,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAE3D,KAAK,CAAC,qBAAqB,EAAE,GAAG,aAAa,mBAAmB,cAAc,EAAE,CAAC,CAAC;IACpF,CAAC;CACF;AAED,kBAAe,mBAAmB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import Component from '../../Component';
2
+ import CommonError from './CommonError';
3
+ /**
4
+ * Document Not Found Error
5
+ *
6
+ * `DocumentNotFoundError` represents a **404 Not Found** error that occurs when attempting
7
+ * to access a document that does not exist in the system. This error is thrown during read,
8
+ * update, and delete operations when a document matching the provided query parameters cannot
9
+ * be found.
10
+ *
11
+ * This error signals that:
12
+ *
13
+ * - The requested document does not exist with the given identifying parameters (typically
14
+ * an ID or unique combination of fields)
15
+ * - The operation cannot proceed because the target document is missing
16
+ * - The client should verify the document identifier or check if the document was deleted
17
+ * or never created
18
+ *
19
+ * The error message includes the human-readable document title (e.g., "Profile", "Order item")
20
+ * and the query parameters that were used to search for the document, formatted as JSON for
21
+ * debugging purposes.
22
+ */
23
+ declare class DocumentNotFoundError extends CommonError {
24
+ /** Creates an instance of document not found error. */
25
+ constructor(Document: typeof Component, parameters: Record<string, unknown>);
26
+ }
27
+ export default DocumentNotFoundError;
28
+ //# sourceMappingURL=DocumentNotFoundError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentNotFoundError.d.ts","sourceRoot":"","sources":["../../../src/Operation/errors/DocumentNotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAM,qBAAsB,SAAQ,WAAW;IAC7C,uDAAuD;gBAC3C,QAAQ,EAAE,OAAO,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAM5E;AAED,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const CommonError_1 = __importDefault(require("./CommonError"));
7
+ /**
8
+ * Document Not Found Error
9
+ *
10
+ * `DocumentNotFoundError` represents a **404 Not Found** error that occurs when attempting
11
+ * to access a document that does not exist in the system. This error is thrown during read,
12
+ * update, and delete operations when a document matching the provided query parameters cannot
13
+ * be found.
14
+ *
15
+ * This error signals that:
16
+ *
17
+ * - The requested document does not exist with the given identifying parameters (typically
18
+ * an ID or unique combination of fields)
19
+ * - The operation cannot proceed because the target document is missing
20
+ * - The client should verify the document identifier or check if the document was deleted
21
+ * or never created
22
+ *
23
+ * The error message includes the human-readable document title (e.g., "Profile", "Order item")
24
+ * and the query parameters that were used to search for the document, formatted as JSON for
25
+ * debugging purposes.
26
+ */
27
+ class DocumentNotFoundError extends CommonError_1.default {
28
+ /** Creates an instance of document not found error. */
29
+ constructor(Document, parameters) {
30
+ const documentTitle = Document.getTitle();
31
+ const jsonParameters = JSON.stringify(parameters, null, 2);
32
+ super('DocumentNotFoundError', `${documentTitle} not found ${jsonParameters}`);
33
+ }
34
+ }
35
+ exports.default = DocumentNotFoundError;
36
+ //# sourceMappingURL=DocumentNotFoundError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentNotFoundError.js","sourceRoot":"","sources":["../../../src/Operation/errors/DocumentNotFoundError.ts"],"names":[],"mappings":";;;;;AACA,gEAAwC;AAExC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,qBAAsB,SAAQ,qBAAW;IAC7C,uDAAuD;IACvD,YAAY,QAA0B,EAAE,UAAmC;QACzE,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC1C,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAE3D,KAAK,CAAC,uBAAuB,EAAE,GAAG,aAAa,cAAc,cAAc,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAED,kBAAe,qBAAqB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import CommonError from './CommonError';
2
+ /**
3
+ * Invalid Parameters Error
4
+ *
5
+ * `InvalidParametersError` represents a **400 Bad Request** error that occurs when operation
6
+ * parameters are syntactically correct (pass schema validation) but are semantically invalid or
7
+ * not processible by the operation logic. This is distinct from `InvalidInputError`, which
8
+ * indicates schema validation failures.
9
+ *
10
+ * This error signals that:
11
+ *
12
+ * - The input structure and types are valid according to the schema
13
+ * - However, the parameter values are invalid for the specific operation context
14
+ * - The operation cannot proceed with the provided parameters
15
+ *
16
+ * This error is typically thrown manually by operation implementations when they detect
17
+ * invalid parameter combinations or values that cannot be validated by the schema alone.
18
+ * For example, an operation might accept a date range where the start date must be before
19
+ * the end date—this business rule cannot be expressed in JSON Schema, so the operation
20
+ * would throw `InvalidParametersError` if violated.
21
+ */
22
+ declare class InvalidParametersError extends CommonError {
23
+ /** Creates an instance of invalid parameters error. */
24
+ constructor(message?: string);
25
+ }
26
+ export default InvalidParametersError;
27
+ //# sourceMappingURL=InvalidParametersError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidParametersError.d.ts","sourceRoot":"","sources":["../../../src/Operation/errors/InvalidParametersError.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAM,sBAAuB,SAAQ,WAAW;IAC9C,uDAAuD;gBAC3C,OAAO,GAAE,MAA6B;CAGnD;AAED,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const CommonError_1 = __importDefault(require("./CommonError"));
7
+ /**
8
+ * Invalid Parameters Error
9
+ *
10
+ * `InvalidParametersError` represents a **400 Bad Request** error that occurs when operation
11
+ * parameters are syntactically correct (pass schema validation) but are semantically invalid or
12
+ * not processible by the operation logic. This is distinct from `InvalidInputError`, which
13
+ * indicates schema validation failures.
14
+ *
15
+ * This error signals that:
16
+ *
17
+ * - The input structure and types are valid according to the schema
18
+ * - However, the parameter values are invalid for the specific operation context
19
+ * - The operation cannot proceed with the provided parameters
20
+ *
21
+ * This error is typically thrown manually by operation implementations when they detect
22
+ * invalid parameter combinations or values that cannot be validated by the schema alone.
23
+ * For example, an operation might accept a date range where the start date must be before
24
+ * the end date—this business rule cannot be expressed in JSON Schema, so the operation
25
+ * would throw `InvalidParametersError` if violated.
26
+ */
27
+ class InvalidParametersError extends CommonError_1.default {
28
+ /** Creates an instance of invalid parameters error. */
29
+ constructor(message = 'Invalid parameters') {
30
+ super('InvalidParametersError', message);
31
+ }
32
+ }
33
+ exports.default = InvalidParametersError;
34
+ //# sourceMappingURL=InvalidParametersError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidParametersError.js","sourceRoot":"","sources":["../../../src/Operation/errors/InvalidParametersError.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AAExC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,sBAAuB,SAAQ,qBAAW;IAC9C,uDAAuD;IACvD,YAAY,UAAkB,oBAAoB;QAChD,KAAK,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;CACF;AAED,kBAAe,sBAAsB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import CommonError from './CommonError';
2
+ /**
3
+ * Unauthorized Error
4
+ *
5
+ * `UnauthorizedError` represents a **401 Unauthorized** error that occurs when authentication
6
+ * fails—the request lacks valid credentials or the provided credentials are invalid. This is
7
+ * distinct from `AccessDeniedError` (403), which indicates that authentication succeeded but
8
+ * authorization failed (the user lacks permissions).
9
+ *
10
+ * This error signals that:
11
+ *
12
+ * - The request is missing required authentication credentials (e.g., Authorization header, token)
13
+ * - The provided credentials are invalid, expired, or malformed
14
+ * - The client must provide valid authentication before the request can proceed
15
+ *
16
+ * This error is thrown by security authorization classes (`JwtAuthorization`, `SystemAuthorization`)
17
+ * during the authentication phase, before any operation logic executes. The framework automatically
18
+ * returns this error with a 401 status code, indicating that the client needs to authenticate.
19
+ */
20
+ declare class UnauthorizedError extends CommonError {
21
+ /** Creates an instance of unauthorized error. */
22
+ constructor(message: string);
23
+ }
24
+ export default UnauthorizedError;
25
+ //# sourceMappingURL=UnauthorizedError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnauthorizedError.d.ts","sourceRoot":"","sources":["../../../src/Operation/errors/UnauthorizedError.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAM,iBAAkB,SAAQ,WAAW;IACzC,iDAAiD;gBACrC,OAAO,EAAE,MAAM;CAG5B;AAED,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const CommonError_1 = __importDefault(require("./CommonError"));
7
+ /**
8
+ * Unauthorized Error
9
+ *
10
+ * `UnauthorizedError` represents a **401 Unauthorized** error that occurs when authentication
11
+ * fails—the request lacks valid credentials or the provided credentials are invalid. This is
12
+ * distinct from `AccessDeniedError` (403), which indicates that authentication succeeded but
13
+ * authorization failed (the user lacks permissions).
14
+ *
15
+ * This error signals that:
16
+ *
17
+ * - The request is missing required authentication credentials (e.g., Authorization header, token)
18
+ * - The provided credentials are invalid, expired, or malformed
19
+ * - The client must provide valid authentication before the request can proceed
20
+ *
21
+ * This error is thrown by security authorization classes (`JwtAuthorization`, `SystemAuthorization`)
22
+ * during the authentication phase, before any operation logic executes. The framework automatically
23
+ * returns this error with a 401 status code, indicating that the client needs to authenticate.
24
+ */
25
+ class UnauthorizedError extends CommonError_1.default {
26
+ /** Creates an instance of unauthorized error. */
27
+ constructor(message) {
28
+ super('UnauthorizedError', message);
29
+ }
30
+ }
31
+ exports.default = UnauthorizedError;
32
+ //# sourceMappingURL=UnauthorizedError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnauthorizedError.js","sourceRoot":"","sources":["../../../src/Operation/errors/UnauthorizedError.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AAExC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,iBAAkB,SAAQ,qBAAW;IACzC,iDAAiD;IACjD,YAAY,OAAe;QACzB,KAAK,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF;AAED,kBAAe,iBAAiB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import CommonError from './CommonError';
2
+ /**
3
+ * Unprocessible Condition Error
4
+ *
5
+ * `UnprocessibleConditionError` represents a **422 Unprocessable Entity** error that occurs
6
+ * when an operation encounters an expected exit condition that prevents it from processing
7
+ * the request. This error indicates that the request is well-formed and valid, but the
8
+ * operation cannot proceed due to business logic constraints or state conditions.
9
+ *
10
+ * This error signals that:
11
+ *
12
+ * - The request syntax and structure are valid (input passes schema validation)
13
+ * - The operation cannot be completed due to business rules or state constraints
14
+ * - The condition is expected and part of normal operation flow (not a bug)
15
+ *
16
+ * This is distinct from other error types:
17
+ * - **400 (InvalidInputError/InvalidParametersError)**: Input validation failures
18
+ * - **404 (DocumentNotFoundError)**: Resource doesn't exist
19
+ * - **500 (InvalidOutputError)**: Internal bugs
20
+ *
21
+ * The 422 status code indicates that the server understands the request but cannot process
22
+ * it due to semantic errors or business logic constraints.
23
+ */
24
+ declare class UnprocessibleConditionError extends CommonError {
25
+ /** Creates an instance of unprocessible condition error. */
26
+ constructor(message?: string);
27
+ }
28
+ export default UnprocessibleConditionError;
29
+ //# sourceMappingURL=UnprocessibleConditionError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnprocessibleConditionError.d.ts","sourceRoot":"","sources":["../../../src/Operation/errors/UnprocessibleConditionError.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,cAAM,2BAA4B,SAAQ,WAAW;IACnD,4DAA4D;gBAChD,OAAO,GAAE,MAAkC;CAGxD;AAED,eAAe,2BAA2B,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const CommonError_1 = __importDefault(require("./CommonError"));
7
+ /**
8
+ * Unprocessible Condition Error
9
+ *
10
+ * `UnprocessibleConditionError` represents a **422 Unprocessable Entity** error that occurs
11
+ * when an operation encounters an expected exit condition that prevents it from processing
12
+ * the request. This error indicates that the request is well-formed and valid, but the
13
+ * operation cannot proceed due to business logic constraints or state conditions.
14
+ *
15
+ * This error signals that:
16
+ *
17
+ * - The request syntax and structure are valid (input passes schema validation)
18
+ * - The operation cannot be completed due to business rules or state constraints
19
+ * - The condition is expected and part of normal operation flow (not a bug)
20
+ *
21
+ * This is distinct from other error types:
22
+ * - **400 (InvalidInputError/InvalidParametersError)**: Input validation failures
23
+ * - **404 (DocumentNotFoundError)**: Resource doesn't exist
24
+ * - **500 (InvalidOutputError)**: Internal bugs
25
+ *
26
+ * The 422 status code indicates that the server understands the request but cannot process
27
+ * it due to semantic errors or business logic constraints.
28
+ */
29
+ class UnprocessibleConditionError extends CommonError_1.default {
30
+ /** Creates an instance of unprocessible condition error. */
31
+ constructor(message = 'Unprocessible condition') {
32
+ super('UnprocessibleConditionError', message);
33
+ }
34
+ }
35
+ exports.default = UnprocessibleConditionError;
36
+ //# sourceMappingURL=UnprocessibleConditionError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnprocessibleConditionError.js","sourceRoot":"","sources":["../../../src/Operation/errors/UnprocessibleConditionError.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AAExC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,2BAA4B,SAAQ,qBAAW;IACnD,4DAA4D;IAC5D,YAAY,UAAkB,yBAAyB;QACrD,KAAK,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF;AAED,kBAAe,2BAA2B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import CommonError from './CommonError';
2
+ import UnauthorizedError from './UnauthorizedError';
3
+ import AccessDeniedError from './AccessDeniedError';
4
+ import DocumentExistsError from './DocumentExistsError';
5
+ import DocumentNotFoundError from './DocumentNotFoundError';
6
+ import InvalidParametersError from './InvalidParametersError';
7
+ import UnprocessibleConditionError from './UnprocessibleConditionError';
8
+ export { CommonError, UnauthorizedError, AccessDeniedError, DocumentExistsError, DocumentNotFoundError, InvalidParametersError, UnprocessibleConditionError, };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Operation/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AAExE,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,GAC5B,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UnprocessibleConditionError = exports.InvalidParametersError = exports.DocumentNotFoundError = exports.DocumentExistsError = exports.AccessDeniedError = exports.UnauthorizedError = exports.CommonError = void 0;
7
+ const CommonError_1 = __importDefault(require("./CommonError"));
8
+ exports.CommonError = CommonError_1.default;
9
+ const UnauthorizedError_1 = __importDefault(require("./UnauthorizedError"));
10
+ exports.UnauthorizedError = UnauthorizedError_1.default;
11
+ const AccessDeniedError_1 = __importDefault(require("./AccessDeniedError"));
12
+ exports.AccessDeniedError = AccessDeniedError_1.default;
13
+ const DocumentExistsError_1 = __importDefault(require("./DocumentExistsError"));
14
+ exports.DocumentExistsError = DocumentExistsError_1.default;
15
+ const DocumentNotFoundError_1 = __importDefault(require("./DocumentNotFoundError"));
16
+ exports.DocumentNotFoundError = DocumentNotFoundError_1.default;
17
+ const InvalidParametersError_1 = __importDefault(require("./InvalidParametersError"));
18
+ exports.InvalidParametersError = InvalidParametersError_1.default;
19
+ const UnprocessibleConditionError_1 = __importDefault(require("./UnprocessibleConditionError"));
20
+ exports.UnprocessibleConditionError = UnprocessibleConditionError_1.default;
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Operation/errors/index.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAwC;AAStC,sBATK,qBAAW,CASL;AARb,4EAAoD;AASlD,4BATK,2BAAiB,CASL;AARnB,4EAAoD;AASlD,4BATK,2BAAiB,CASL;AARnB,gFAAwD;AAStD,8BATK,6BAAmB,CASL;AARrB,oFAA4D;AAS1D,gCATK,+BAAqB,CASL;AARvB,sFAA8D;AAS5D,iCATK,gCAAsB,CASL;AARxB,gGAAwE;AAStE,sCATK,qCAA2B,CASL"}
@@ -0,0 +1,4 @@
1
+ import withActivity, { type CreateActivityProps } from './withActivity';
2
+ export { withActivity };
3
+ export type { CreateActivityProps };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Operation/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,EAAE,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EACL,YAAY,EACb,CAAC;AAEF,YAAY,EACV,mBAAmB,EACpB,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.withActivity = void 0;
7
+ const withActivity_1 = __importDefault(require("./withActivity"));
8
+ exports.withActivity = withActivity_1.default;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Operation/helpers/index.ts"],"names":[],"mappings":";;;;;;AAAA,kEAAwE;AAGtE,uBAHK,sBAAY,CAGL"}
@@ -0,0 +1,16 @@
1
+ import Create from '../operations/Create';
2
+ import Update from '../operations/Update';
3
+ import Delete from '../operations/Delete';
4
+ import Context from '../../Context';
5
+ import Operation, { type Result } from '../Operation';
6
+ type BaseAction = typeof Create | typeof Update | typeof Delete;
7
+ export type CreateActivityProps = {
8
+ result?: Result;
9
+ context: Context;
10
+ parameters: Record<string, unknown>;
11
+ componentName?: string;
12
+ };
13
+ /** Extends operation with a custom create activity method. */
14
+ declare const withActivity: (baseAction: BaseAction, createActivity: (props: CreateActivityProps) => Promise<void>) => (ComponentClass: unknown, componentAction?: string) => typeof Operation;
15
+ export default withActivity;
16
+ //# sourceMappingURL=withActivity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withActivity.d.ts","sourceRoot":"","sources":["../../../src/Operation/helpers/withActivity.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,SAAS,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtD,KAAK,UAAU,GAAG,OAAO,MAAM,GAAG,OAAO,MAAM,GAAG,OAAO,MAAM,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAA;AAED,8DAA8D;AAC9D,QAAA,MAAM,YAAY,GAChB,YAAY,UAAU,EACtB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,KAC5D,CAAC,cAAc,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,MAAM,KAAK,OAAO,SAqBhE,CAAC;AAEF,eAAe,YAAY,CAAC"}