@webiny/api-sync-system 0.0.0-unstable.06b2ede40f

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 (360) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -0
  3. package/constants.d.ts +1 -0
  4. package/constants.js +9 -0
  5. package/constants.js.map +1 -0
  6. package/index.d.ts +3 -0
  7. package/index.js +40 -0
  8. package/index.js.map +1 -0
  9. package/package.json +45 -0
  10. package/resolver/app/RecordHandler.d.ts +34 -0
  11. package/resolver/app/RecordHandler.js +126 -0
  12. package/resolver/app/RecordHandler.js.map +1 -0
  13. package/resolver/app/RecordsValidation.d.ts +6 -0
  14. package/resolver/app/RecordsValidation.js +29 -0
  15. package/resolver/app/RecordsValidation.js.map +1 -0
  16. package/resolver/app/ResolverApplication.d.ts +14 -0
  17. package/resolver/app/ResolverApplication.js +48 -0
  18. package/resolver/app/ResolverApplication.js.map +1 -0
  19. package/resolver/app/abstractions/RecordHandler.d.ts +7 -0
  20. package/resolver/app/abstractions/RecordHandler.js +7 -0
  21. package/resolver/app/abstractions/RecordHandler.js.map +1 -0
  22. package/resolver/app/abstractions/RecordsValidation.d.ts +14 -0
  23. package/resolver/app/abstractions/RecordsValidation.js +7 -0
  24. package/resolver/app/abstractions/RecordsValidation.js.map +1 -0
  25. package/resolver/app/abstractions/ResolverApplication.d.ts +7 -0
  26. package/resolver/app/abstractions/ResolverApplication.js +7 -0
  27. package/resolver/app/abstractions/ResolverApplication.js.map +1 -0
  28. package/resolver/app/abstractions/ResolverRecord.d.ts +42 -0
  29. package/resolver/app/abstractions/ResolverRecord.js +7 -0
  30. package/resolver/app/abstractions/ResolverRecord.js.map +1 -0
  31. package/resolver/app/bundler/BaseBundle.d.ts +21 -0
  32. package/resolver/app/bundler/BaseBundle.js +26 -0
  33. package/resolver/app/bundler/BaseBundle.js.map +1 -0
  34. package/resolver/app/bundler/Bundler.d.ts +10 -0
  35. package/resolver/app/bundler/Bundler.js +30 -0
  36. package/resolver/app/bundler/Bundler.js.map +1 -0
  37. package/resolver/app/bundler/Bundles.d.ts +14 -0
  38. package/resolver/app/bundler/Bundles.js +38 -0
  39. package/resolver/app/bundler/Bundles.js.map +1 -0
  40. package/resolver/app/bundler/CommandBundle.d.ts +15 -0
  41. package/resolver/app/bundler/CommandBundle.js +28 -0
  42. package/resolver/app/bundler/CommandBundle.js.map +1 -0
  43. package/resolver/app/bundler/TableBundle.d.ts +13 -0
  44. package/resolver/app/bundler/TableBundle.js +25 -0
  45. package/resolver/app/bundler/TableBundle.js.map +1 -0
  46. package/resolver/app/bundler/types.d.ts +29 -0
  47. package/resolver/app/bundler/types.js +7 -0
  48. package/resolver/app/bundler/types.js.map +1 -0
  49. package/resolver/app/commandHandler/DeleteCommandHandler.d.ts +18 -0
  50. package/resolver/app/commandHandler/DeleteCommandHandler.js +39 -0
  51. package/resolver/app/commandHandler/DeleteCommandHandler.js.map +1 -0
  52. package/resolver/app/commandHandler/PutCommandHandler.d.ts +18 -0
  53. package/resolver/app/commandHandler/PutCommandHandler.js +32 -0
  54. package/resolver/app/commandHandler/PutCommandHandler.js.map +1 -0
  55. package/resolver/app/commandHandler/delete.d.ts +2 -0
  56. package/resolver/app/commandHandler/delete.js +24 -0
  57. package/resolver/app/commandHandler/delete.js.map +1 -0
  58. package/resolver/app/commandHandler/put.d.ts +2 -0
  59. package/resolver/app/commandHandler/put.js +24 -0
  60. package/resolver/app/commandHandler/put.js.map +1 -0
  61. package/resolver/app/data/SourceDataContainer.d.ts +12 -0
  62. package/resolver/app/data/SourceDataContainer.js +42 -0
  63. package/resolver/app/data/SourceDataContainer.js.map +1 -0
  64. package/resolver/app/data/types.d.ts +23 -0
  65. package/resolver/app/data/types.js +7 -0
  66. package/resolver/app/data/types.js.map +1 -0
  67. package/resolver/app/fetcher/Fetcher.d.ts +22 -0
  68. package/resolver/app/fetcher/Fetcher.js +132 -0
  69. package/resolver/app/fetcher/Fetcher.js.map +1 -0
  70. package/resolver/app/fetcher/types.d.ts +25 -0
  71. package/resolver/app/fetcher/types.js +7 -0
  72. package/resolver/app/fetcher/types.js.map +1 -0
  73. package/resolver/app/ingestor/Ingestor.d.ts +13 -0
  74. package/resolver/app/ingestor/Ingestor.js +44 -0
  75. package/resolver/app/ingestor/Ingestor.js.map +1 -0
  76. package/resolver/app/ingestor/IngestorResult.d.ts +7 -0
  77. package/resolver/app/ingestor/IngestorResult.js +45 -0
  78. package/resolver/app/ingestor/IngestorResult.js.map +1 -0
  79. package/resolver/app/ingestor/types.d.ts +26 -0
  80. package/resolver/app/ingestor/types.js +7 -0
  81. package/resolver/app/ingestor/types.js.map +1 -0
  82. package/resolver/app/storer/Storer.d.ts +44 -0
  83. package/resolver/app/storer/Storer.js +103 -0
  84. package/resolver/app/storer/Storer.js.map +1 -0
  85. package/resolver/app/storer/types.d.ts +21 -0
  86. package/resolver/app/storer/types.js +7 -0
  87. package/resolver/app/storer/types.js.map +1 -0
  88. package/resolver/app/transform/TransformHandler.d.ts +34 -0
  89. package/resolver/app/transform/TransformHandler.js +70 -0
  90. package/resolver/app/transform/TransformHandler.js.map +1 -0
  91. package/resolver/app/transform/middleware.d.ts +3 -0
  92. package/resolver/app/transform/middleware.js +29 -0
  93. package/resolver/app/transform/middleware.js.map +1 -0
  94. package/resolver/app/utils/Retry.d.ts +18 -0
  95. package/resolver/app/utils/Retry.js +38 -0
  96. package/resolver/app/utils/Retry.js.map +1 -0
  97. package/resolver/app/utils/sleep.d.ts +1 -0
  98. package/resolver/app/utils/sleep.js +14 -0
  99. package/resolver/app/utils/sleep.js.map +1 -0
  100. package/resolver/app/validation/body.d.ts +142 -0
  101. package/resolver/app/validation/body.js +46 -0
  102. package/resolver/app/validation/body.js.map +1 -0
  103. package/resolver/app/validation/createJsonTransform.d.ts +2 -0
  104. package/resolver/app/validation/createJsonTransform.js +24 -0
  105. package/resolver/app/validation/createJsonTransform.js.map +1 -0
  106. package/resolver/app/validation/detail.d.ts +89 -0
  107. package/resolver/app/validation/detail.js +50 -0
  108. package/resolver/app/validation/detail.js.map +1 -0
  109. package/resolver/app/validation/event.d.ts +217 -0
  110. package/resolver/app/validation/event.js +32 -0
  111. package/resolver/app/validation/event.js.map +1 -0
  112. package/resolver/app/validation/numericString.d.ts +2 -0
  113. package/resolver/app/validation/numericString.js +23 -0
  114. package/resolver/app/validation/numericString.js.map +1 -0
  115. package/resolver/app/validation/system.d.ts +20 -0
  116. package/resolver/app/validation/system.js +20 -0
  117. package/resolver/app/validation/system.js.map +1 -0
  118. package/resolver/createEventHandlerPlugin.d.ts +10 -0
  119. package/resolver/createEventHandlerPlugin.js +127 -0
  120. package/resolver/createEventHandlerPlugin.js.map +1 -0
  121. package/resolver/createResolverHandler.d.ts +21 -0
  122. package/resolver/createResolverHandler.js +79 -0
  123. package/resolver/createResolverHandler.js.map +1 -0
  124. package/resolver/deployment/Deployment.d.ts +17 -0
  125. package/resolver/deployment/Deployment.js +50 -0
  126. package/resolver/deployment/Deployment.js.map +1 -0
  127. package/resolver/deployment/Deployments.d.ts +13 -0
  128. package/resolver/deployment/Deployments.js +34 -0
  129. package/resolver/deployment/Deployments.js.map +1 -0
  130. package/resolver/deployment/DeploymentsFetcher.d.ts +16 -0
  131. package/resolver/deployment/DeploymentsFetcher.js +112 -0
  132. package/resolver/deployment/DeploymentsFetcher.js.map +1 -0
  133. package/resolver/deployment/types.d.ts +34 -0
  134. package/resolver/deployment/types.js +7 -0
  135. package/resolver/deployment/types.js.map +1 -0
  136. package/resolver/lambda/LambdaTrigger.d.ts +18 -0
  137. package/resolver/lambda/LambdaTrigger.js +39 -0
  138. package/resolver/lambda/LambdaTrigger.js.map +1 -0
  139. package/resolver/plugins/CommandHandlerPlugin.d.ts +31 -0
  140. package/resolver/plugins/CommandHandlerPlugin.js +27 -0
  141. package/resolver/plugins/CommandHandlerPlugin.js.map +1 -0
  142. package/resolver/plugins/StorerAfterEachPlugin.d.ts +31 -0
  143. package/resolver/plugins/StorerAfterEachPlugin.js +33 -0
  144. package/resolver/plugins/StorerAfterEachPlugin.js.map +1 -0
  145. package/resolver/plugins/TransformRecordPlugin.d.ts +38 -0
  146. package/resolver/plugins/TransformRecordPlugin.js +30 -0
  147. package/resolver/plugins/TransformRecordPlugin.js.map +1 -0
  148. package/resolver/recordTypes/fileManager/CopyFile.d.ts +14 -0
  149. package/resolver/recordTypes/fileManager/CopyFile.js +81 -0
  150. package/resolver/recordTypes/fileManager/CopyFile.js.map +1 -0
  151. package/resolver/recordTypes/fileManager/DeleteFile.d.ts +14 -0
  152. package/resolver/recordTypes/fileManager/DeleteFile.js +72 -0
  153. package/resolver/recordTypes/fileManager/DeleteFile.js.map +1 -0
  154. package/resolver/recordTypes/fileManager/fileManager.d.ts +6 -0
  155. package/resolver/recordTypes/fileManager/fileManager.js +14 -0
  156. package/resolver/recordTypes/fileManager/fileManager.js.map +1 -0
  157. package/resolver/recordTypes/fileManager/fileManagerOnDelete.d.ts +5 -0
  158. package/resolver/recordTypes/fileManager/fileManagerOnDelete.js +48 -0
  159. package/resolver/recordTypes/fileManager/fileManagerOnDelete.js.map +1 -0
  160. package/resolver/recordTypes/fileManager/fileManagerOnPut.d.ts +5 -0
  161. package/resolver/recordTypes/fileManager/fileManagerOnPut.js +48 -0
  162. package/resolver/recordTypes/fileManager/fileManagerOnPut.js.map +1 -0
  163. package/resolver/recordTypes/fileManager/shouldBeHandled.d.ts +2 -0
  164. package/resolver/recordTypes/fileManager/shouldBeHandled.js +37 -0
  165. package/resolver/recordTypes/fileManager/shouldBeHandled.js.map +1 -0
  166. package/resolver/recordTypes/fileManager/types.d.ts +26 -0
  167. package/resolver/recordTypes/fileManager/types.js +7 -0
  168. package/resolver/recordTypes/fileManager/types.js.map +1 -0
  169. package/resolver/recordTypes/users/CopyUser.d.ts +18 -0
  170. package/resolver/recordTypes/users/CopyUser.js +67 -0
  171. package/resolver/recordTypes/users/CopyUser.js.map +1 -0
  172. package/resolver/recordTypes/users/DeleteUser.d.ts +18 -0
  173. package/resolver/recordTypes/users/DeleteUser.js +65 -0
  174. package/resolver/recordTypes/users/DeleteUser.js.map +1 -0
  175. package/resolver/recordTypes/users/shouldBeHandled.d.ts +2 -0
  176. package/resolver/recordTypes/users/shouldBeHandled.js +36 -0
  177. package/resolver/recordTypes/users/shouldBeHandled.js.map +1 -0
  178. package/resolver/recordTypes/users/types.d.ts +24 -0
  179. package/resolver/recordTypes/users/types.js +7 -0
  180. package/resolver/recordTypes/users/types.js.map +1 -0
  181. package/resolver/recordTypes/users/users.d.ts +6 -0
  182. package/resolver/recordTypes/users/users.js +14 -0
  183. package/resolver/recordTypes/users/users.js.map +1 -0
  184. package/resolver/recordTypes/users/usersOnDelete.d.ts +5 -0
  185. package/resolver/recordTypes/users/usersOnDelete.js +47 -0
  186. package/resolver/recordTypes/users/usersOnDelete.js.map +1 -0
  187. package/resolver/recordTypes/users/usersOnPut.d.ts +5 -0
  188. package/resolver/recordTypes/users/usersOnPut.js +48 -0
  189. package/resolver/recordTypes/users/usersOnPut.js.map +1 -0
  190. package/sync/FilterOutRecord.d.ts +11 -0
  191. package/sync/FilterOutRecord.js +29 -0
  192. package/sync/FilterOutRecord.js.map +1 -0
  193. package/sync/attachToDynamoDbDocument.d.ts +11 -0
  194. package/sync/attachToDynamoDbDocument.js +79 -0
  195. package/sync/attachToDynamoDbDocument.js.map +1 -0
  196. package/sync/createHandler.d.ts +14 -0
  197. package/sync/createHandler.js +63 -0
  198. package/sync/createHandler.js.map +1 -0
  199. package/sync/createSendDataToEventBridgeOnRequestEnd.d.ts +2 -0
  200. package/sync/createSendDataToEventBridgeOnRequestEnd.js +51 -0
  201. package/sync/createSendDataToEventBridgeOnRequestEnd.js.map +1 -0
  202. package/sync/createSyncSystem.d.ts +16 -0
  203. package/sync/createSyncSystem.js +42 -0
  204. package/sync/createSyncSystem.js.map +1 -0
  205. package/sync/filter/createDefaultFilterOutRecordPlugins.d.ts +13 -0
  206. package/sync/filter/createDefaultFilterOutRecordPlugins.js +88 -0
  207. package/sync/filter/createDefaultFilterOutRecordPlugins.js.map +1 -0
  208. package/sync/handler/Handler.d.ts +28 -0
  209. package/sync/handler/Handler.js +93 -0
  210. package/sync/handler/Handler.js.map +1 -0
  211. package/sync/handler/HandlerConverter.d.ts +12 -0
  212. package/sync/handler/HandlerConverter.js +43 -0
  213. package/sync/handler/HandlerConverter.js.map +1 -0
  214. package/sync/handler/converter/BatchGetCommandConverter.d.ts +8 -0
  215. package/sync/handler/converter/BatchGetCommandConverter.js +24 -0
  216. package/sync/handler/converter/BatchGetCommandConverter.js.map +1 -0
  217. package/sync/handler/converter/BatchWriteCommandConverter.d.ts +9 -0
  218. package/sync/handler/converter/BatchWriteCommandConverter.js +24 -0
  219. package/sync/handler/converter/BatchWriteCommandConverter.js.map +1 -0
  220. package/sync/handler/converter/DeleteCommandConverter.d.ts +9 -0
  221. package/sync/handler/converter/DeleteCommandConverter.js +24 -0
  222. package/sync/handler/converter/DeleteCommandConverter.js.map +1 -0
  223. package/sync/handler/converter/GetCommandConverter.d.ts +8 -0
  224. package/sync/handler/converter/GetCommandConverter.js +24 -0
  225. package/sync/handler/converter/GetCommandConverter.js.map +1 -0
  226. package/sync/handler/converter/PutCommandConverter.d.ts +9 -0
  227. package/sync/handler/converter/PutCommandConverter.js +24 -0
  228. package/sync/handler/converter/PutCommandConverter.js.map +1 -0
  229. package/sync/handler/converter/QueryCommandConverter.d.ts +8 -0
  230. package/sync/handler/converter/QueryCommandConverter.js +24 -0
  231. package/sync/handler/converter/QueryCommandConverter.js.map +1 -0
  232. package/sync/handler/converter/ScanCommandConverter.d.ts +8 -0
  233. package/sync/handler/converter/ScanCommandConverter.js +24 -0
  234. package/sync/handler/converter/ScanCommandConverter.js.map +1 -0
  235. package/sync/handler/converter/UpdateCommandConverter.d.ts +9 -0
  236. package/sync/handler/converter/UpdateCommandConverter.js +24 -0
  237. package/sync/handler/converter/UpdateCommandConverter.js.map +1 -0
  238. package/sync/handler/converter/commands/BatchWriteCommandValue.d.ts +9 -0
  239. package/sync/handler/converter/commands/BatchWriteCommandValue.js +51 -0
  240. package/sync/handler/converter/commands/BatchWriteCommandValue.js.map +1 -0
  241. package/sync/handler/converter/commands/DeleteCommandValue.d.ts +9 -0
  242. package/sync/handler/converter/commands/DeleteCommandValue.js +27 -0
  243. package/sync/handler/converter/commands/DeleteCommandValue.js.map +1 -0
  244. package/sync/handler/converter/commands/NullCommandValue.d.ts +8 -0
  245. package/sync/handler/converter/commands/NullCommandValue.js +18 -0
  246. package/sync/handler/converter/commands/NullCommandValue.js.map +1 -0
  247. package/sync/handler/converter/commands/PutCommandValue.d.ts +9 -0
  248. package/sync/handler/converter/commands/PutCommandValue.js +27 -0
  249. package/sync/handler/converter/commands/PutCommandValue.js.map +1 -0
  250. package/sync/handler/converter/commands/UpdateCommandValue.d.ts +9 -0
  251. package/sync/handler/converter/commands/UpdateCommandValue.js +27 -0
  252. package/sync/handler/converter/commands/UpdateCommandValue.js.map +1 -0
  253. package/sync/handler/types.d.ts +18 -0
  254. package/sync/handler/types.js +7 -0
  255. package/sync/handler/types.js.map +1 -0
  256. package/sync/plugins/FilterOutRecordPlugin.d.ts +23 -0
  257. package/sync/plugins/FilterOutRecordPlugin.js +31 -0
  258. package/sync/plugins/FilterOutRecordPlugin.js.map +1 -0
  259. package/sync/requestPlugin.d.ts +9 -0
  260. package/sync/requestPlugin.js +59 -0
  261. package/sync/requestPlugin.js.map +1 -0
  262. package/sync/types.d.ts +64 -0
  263. package/sync/types.js +7 -0
  264. package/sync/types.js.map +1 -0
  265. package/sync/utils/getTableType.d.ts +2 -0
  266. package/sync/utils/getTableType.js +22 -0
  267. package/sync/utils/getTableType.js.map +1 -0
  268. package/sync/utils/manifest.d.ts +17 -0
  269. package/sync/utils/manifest.js +52 -0
  270. package/sync/utils/manifest.js.map +1 -0
  271. package/sync/utils/validateSystemInput.d.ts +11 -0
  272. package/sync/utils/validateSystemInput.js +44 -0
  273. package/sync/utils/validateSystemInput.js.map +1 -0
  274. package/types.d.ts +42 -0
  275. package/types.js +15 -0
  276. package/types.js.map +1 -0
  277. package/utils/createSystemName.d.ts +5 -0
  278. package/utils/createSystemName.js +12 -0
  279. package/utils/createSystemName.js.map +1 -0
  280. package/worker/actions/copyFile/CopyFile.d.ts +63 -0
  281. package/worker/actions/copyFile/CopyFile.js +283 -0
  282. package/worker/actions/copyFile/CopyFile.js.map +1 -0
  283. package/worker/actions/copyFile/copyFileAction.d.ts +6 -0
  284. package/worker/actions/copyFile/copyFileAction.js +47 -0
  285. package/worker/actions/copyFile/copyFileAction.js.map +1 -0
  286. package/worker/actions/copyFile/copyFileSchema.d.ts +47 -0
  287. package/worker/actions/copyFile/copyFileSchema.js +25 -0
  288. package/worker/actions/copyFile/copyFileSchema.js.map +1 -0
  289. package/worker/actions/copyFile/types.d.ts +10 -0
  290. package/worker/actions/copyFile/types.js +7 -0
  291. package/worker/actions/copyFile/types.js.map +1 -0
  292. package/worker/actions/createUser/CreateUser.d.ts +17 -0
  293. package/worker/actions/createUser/CreateUser.js +90 -0
  294. package/worker/actions/createUser/CreateUser.js.map +1 -0
  295. package/worker/actions/createUser/createUserAction.d.ts +6 -0
  296. package/worker/actions/createUser/createUserAction.js +42 -0
  297. package/worker/actions/createUser/createUserAction.js.map +1 -0
  298. package/worker/actions/createUser/createUserSchema.d.ts +47 -0
  299. package/worker/actions/createUser/createUserSchema.js +25 -0
  300. package/worker/actions/createUser/createUserSchema.js.map +1 -0
  301. package/worker/actions/createUser/types.d.ts +10 -0
  302. package/worker/actions/createUser/types.js +7 -0
  303. package/worker/actions/createUser/types.js.map +1 -0
  304. package/worker/actions/deleteFile/DeleteFile.d.ts +24 -0
  305. package/worker/actions/deleteFile/DeleteFile.js +82 -0
  306. package/worker/actions/deleteFile/DeleteFile.js.map +1 -0
  307. package/worker/actions/deleteFile/deleteFileAction.d.ts +6 -0
  308. package/worker/actions/deleteFile/deleteFileAction.js +42 -0
  309. package/worker/actions/deleteFile/deleteFileAction.js.map +1 -0
  310. package/worker/actions/deleteFile/deleteFileSchema.d.ts +47 -0
  311. package/worker/actions/deleteFile/deleteFileSchema.js +25 -0
  312. package/worker/actions/deleteFile/deleteFileSchema.js.map +1 -0
  313. package/worker/actions/deleteFile/types.d.ts +9 -0
  314. package/worker/actions/deleteFile/types.js +7 -0
  315. package/worker/actions/deleteFile/types.js.map +1 -0
  316. package/worker/actions/deleteUser/DeleteUser.d.ts +16 -0
  317. package/worker/actions/deleteUser/DeleteUser.js +67 -0
  318. package/worker/actions/deleteUser/DeleteUser.js.map +1 -0
  319. package/worker/actions/deleteUser/deleteUserAction.d.ts +6 -0
  320. package/worker/actions/deleteUser/deleteUserAction.js +40 -0
  321. package/worker/actions/deleteUser/deleteUserAction.js.map +1 -0
  322. package/worker/actions/deleteUser/deleteUserSchema.d.ts +29 -0
  323. package/worker/actions/deleteUser/deleteUserSchema.js +24 -0
  324. package/worker/actions/deleteUser/deleteUserSchema.js.map +1 -0
  325. package/worker/actions/deleteUser/types.d.ts +9 -0
  326. package/worker/actions/deleteUser/types.js +7 -0
  327. package/worker/actions/deleteUser/types.js.map +1 -0
  328. package/worker/actions/logValidationError.d.ts +2 -0
  329. package/worker/actions/logValidationError.js +17 -0
  330. package/worker/actions/logValidationError.js.map +1 -0
  331. package/worker/actions/removeCognitoUserAttributes.d.ts +6 -0
  332. package/worker/actions/removeCognitoUserAttributes.js +24 -0
  333. package/worker/actions/removeCognitoUserAttributes.js.map +1 -0
  334. package/worker/actions/updateUser/UpdateUser.d.ts +17 -0
  335. package/worker/actions/updateUser/UpdateUser.js +81 -0
  336. package/worker/actions/updateUser/UpdateUser.js.map +1 -0
  337. package/worker/actions/updateUser/types.d.ts +10 -0
  338. package/worker/actions/updateUser/types.js +7 -0
  339. package/worker/actions/updateUser/types.js.map +1 -0
  340. package/worker/actions/updateUser/updateUserAction.d.ts +6 -0
  341. package/worker/actions/updateUser/updateUserAction.js +42 -0
  342. package/worker/actions/updateUser/updateUserAction.js.map +1 -0
  343. package/worker/actions/updateUser/updateUserSchema.d.ts +47 -0
  344. package/worker/actions/updateUser/updateUserSchema.js +25 -0
  345. package/worker/actions/updateUser/updateUserSchema.js.map +1 -0
  346. package/worker/createWorkerHandler.d.ts +11 -0
  347. package/worker/createWorkerHandler.js +48 -0
  348. package/worker/createWorkerHandler.js.map +1 -0
  349. package/worker/handler/WorkerActionHandler.d.ts +10 -0
  350. package/worker/handler/WorkerActionHandler.js +33 -0
  351. package/worker/handler/WorkerActionHandler.js.map +1 -0
  352. package/worker/handler/eventHandler.d.ts +1 -0
  353. package/worker/handler/eventHandler.js +31 -0
  354. package/worker/handler/eventHandler.js.map +1 -0
  355. package/worker/plugins/WorkerActionPlugin.d.ts +10 -0
  356. package/worker/plugins/WorkerActionPlugin.js +28 -0
  357. package/worker/plugins/WorkerActionPlugin.js.map +1 -0
  358. package/worker/types.d.ts +14 -0
  359. package/worker/types.js +7 -0
  360. package/worker/types.js.map +1 -0
@@ -0,0 +1,42 @@
1
+ import type { GenericRecord } from "@webiny/api/types.js";
2
+ import type { IDetail } from "../../../sync/handler/types.js";
3
+ import type { DynamoDBTableType, ExtendedCommandType } from "../../../types.js";
4
+ import type { SQS_EVENT_NAME } from "../../../constants.js";
5
+ export interface IResolverRecordBodyItem {
6
+ PK: string;
7
+ SK: string;
8
+ command: ExtendedCommandType;
9
+ /**
10
+ * There will be multiple tables that will get populated through the system (regular table and elasticsearch for start).
11
+ */
12
+ tableName: string;
13
+ tableType: DynamoDBTableType;
14
+ }
15
+ export interface IResolverSQSRecordBody {
16
+ version: `${number}`;
17
+ id: string;
18
+ "detail-type": typeof SQS_EVENT_NAME;
19
+ source: `webiny:${string}`;
20
+ account: `${number}`;
21
+ time: Date;
22
+ region: string;
23
+ resources: unknown[];
24
+ detail: IDetail;
25
+ }
26
+ export interface IResolverSQSRecordAttributes {
27
+ ApproximateReceiveCount: string;
28
+ SentTimestamp: string;
29
+ SenderId: string;
30
+ ApproximateFirstReceiveTimestamp: string;
31
+ }
32
+ export interface IResolverSQSRecord {
33
+ messageId: string;
34
+ receiptHandle: string;
35
+ body: IResolverSQSRecordBody;
36
+ attributes: IResolverSQSRecordAttributes;
37
+ messageAttributes?: GenericRecord;
38
+ md5OfBody: string;
39
+ eventSource: string;
40
+ eventSourceARN: string;
41
+ awsRegion: string;
42
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ //# sourceMappingURL=ResolverRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["ResolverRecord.ts"],"sourcesContent":["import type { GenericRecord } from \"@webiny/api/types.js\";\nimport type { IDetail } from \"~/sync/handler/types.js\";\nimport type { DynamoDBTableType, ExtendedCommandType } from \"~/types.js\";\nimport type { SQS_EVENT_NAME } from \"~/constants.js\";\n\nexport interface IResolverRecordBodyItem {\n PK: string;\n SK: string;\n command: ExtendedCommandType;\n /**\n * There will be multiple tables that will get populated through the system (regular table and elasticsearch for start).\n */\n tableName: string;\n tableType: DynamoDBTableType;\n}\n\nexport interface IResolverSQSRecordBody {\n version: `${number}`;\n id: string;\n \"detail-type\": typeof SQS_EVENT_NAME;\n source: `webiny:${string}`;\n account: `${number}`;\n time: Date;\n region: string;\n resources: unknown[];\n detail: IDetail;\n}\n\nexport interface IResolverSQSRecordAttributes {\n ApproximateReceiveCount: string;\n SentTimestamp: string;\n SenderId: string;\n ApproximateFirstReceiveTimestamp: string;\n}\n\nexport interface IResolverSQSRecord {\n messageId: string;\n receiptHandle: string;\n body: IResolverSQSRecordBody;\n attributes: IResolverSQSRecordAttributes;\n messageAttributes?: GenericRecord;\n md5OfBody: string;\n eventSource: string;\n eventSourceARN: string;\n awsRegion: string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ import type { IBundle, IBundleItem } from "./types.js";
2
+ import type { IDeployment } from "../../deployment/types";
3
+ import type { ITable } from "../../../sync/types";
4
+ import type { CommandType } from "../../../types";
5
+ import { type ExtendedCommandType } from "../../../types";
6
+ import type { IIngestorResultItem } from "../ingestor/types";
7
+ export interface IBaseBundleParams {
8
+ command: ExtendedCommandType;
9
+ table: ITable;
10
+ source: IDeployment;
11
+ }
12
+ export declare abstract class BaseBundle implements IBundle {
13
+ readonly items: IBundleItem[];
14
+ readonly command: CommandType;
15
+ readonly table: ITable;
16
+ readonly source: IDeployment;
17
+ abstract canAdd(item: IIngestorResultItem): boolean;
18
+ constructor(params: IBaseBundleParams);
19
+ protected getCommand(command: ExtendedCommandType): CommandType;
20
+ add(item: IIngestorResultItem): void;
21
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BaseBundle = void 0;
7
+ class BaseBundle {
8
+ items = [];
9
+ constructor(params) {
10
+ this.command = this.getCommand(params.command);
11
+ this.table = params.table;
12
+ this.source = params.source;
13
+ }
14
+ getCommand(command) {
15
+ return command === "delete" ? "delete" : "put";
16
+ }
17
+ add(item) {
18
+ this.items.push({
19
+ PK: item.PK,
20
+ SK: item.SK
21
+ });
22
+ }
23
+ }
24
+ exports.BaseBundle = BaseBundle;
25
+
26
+ //# sourceMappingURL=BaseBundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BaseBundle","items","constructor","params","command","getCommand","table","source","add","item","push","PK","SK","exports"],"sources":["BaseBundle.ts"],"sourcesContent":["import type { IBundle, IBundleItem } from \"~/resolver/app/bundler/types.js\";\nimport type { IDeployment } from \"~/resolver/deployment/types\";\nimport type { ITable } from \"~/sync/types\";\nimport type { CommandType } from \"~/types\";\nimport { type ExtendedCommandType } from \"~/types\";\nimport type { IIngestorResultItem } from \"../ingestor/types\";\n\nexport interface IBaseBundleParams {\n command: ExtendedCommandType;\n table: ITable;\n source: IDeployment;\n}\n\nexport abstract class BaseBundle implements IBundle {\n readonly items: IBundleItem[] = [];\n readonly command: CommandType;\n readonly table: ITable;\n readonly source: IDeployment;\n\n public abstract canAdd(item: IIngestorResultItem): boolean;\n\n public constructor(params: IBaseBundleParams) {\n this.command = this.getCommand(params.command);\n this.table = params.table;\n this.source = params.source;\n }\n\n protected getCommand(command: ExtendedCommandType): CommandType {\n return command === \"delete\" ? \"delete\" : \"put\";\n }\n\n public add(item: IIngestorResultItem): void {\n this.items.push({\n PK: item.PK,\n SK: item.SK\n });\n }\n}\n"],"mappings":";;;;;;AAaO,MAAeA,UAAU,CAAoB;EACvCC,KAAK,GAAkB,EAAE;EAO3BC,WAAWA,CAACC,MAAyB,EAAE;IAC1C,IAAI,CAACC,OAAO,GAAG,IAAI,CAACC,UAAU,CAACF,MAAM,CAACC,OAAO,CAAC;IAC9C,IAAI,CAACE,KAAK,GAAGH,MAAM,CAACG,KAAK;IACzB,IAAI,CAACC,MAAM,GAAGJ,MAAM,CAACI,MAAM;EAC/B;EAEUF,UAAUA,CAACD,OAA4B,EAAe;IAC5D,OAAOA,OAAO,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK;EAClD;EAEOI,GAAGA,CAACC,IAAyB,EAAQ;IACxC,IAAI,CAACR,KAAK,CAACS,IAAI,CAAC;MACZC,EAAE,EAAEF,IAAI,CAACE,EAAE;MACXC,EAAE,EAAEH,IAAI,CAACG;IACb,CAAC,CAAC;EACN;AACJ;AAACC,OAAA,CAAAb,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ import type { IBundler, IBundlerBundleParams, IBundles } from "./types.js";
2
+ export interface IBundlerParams {
3
+ createBundles: () => IBundles;
4
+ }
5
+ export declare class Bundler implements IBundler {
6
+ private readonly createBundles;
7
+ constructor(params: IBundlerParams);
8
+ bundle(params: IBundlerBundleParams): IBundles;
9
+ }
10
+ export declare const createBundler: (params: IBundlerParams) => Bundler;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createBundler = exports.Bundler = void 0;
7
+ class Bundler {
8
+ constructor(params) {
9
+ this.createBundles = params.createBundles;
10
+ }
11
+ bundle(params) {
12
+ const {
13
+ items
14
+ } = params;
15
+ const bundles = this.createBundles();
16
+ for (const item of items) {
17
+ bundles.add({
18
+ item
19
+ });
20
+ }
21
+ return bundles;
22
+ }
23
+ }
24
+ exports.Bundler = Bundler;
25
+ const createBundler = params => {
26
+ return new Bundler(params);
27
+ };
28
+ exports.createBundler = createBundler;
29
+
30
+ //# sourceMappingURL=Bundler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Bundler","constructor","params","createBundles","bundle","items","bundles","item","add","exports","createBundler"],"sources":["Bundler.ts"],"sourcesContent":["import type { IBundler, IBundlerBundleParams, IBundles } from \"~/resolver/app/bundler/types.js\";\n\nexport interface IBundlerParams {\n createBundles: () => IBundles;\n}\n\nexport class Bundler implements IBundler {\n private readonly createBundles: () => IBundles;\n\n public constructor(params: IBundlerParams) {\n this.createBundles = params.createBundles;\n }\n\n public bundle(params: IBundlerBundleParams): IBundles {\n const { items } = params;\n\n const bundles = this.createBundles();\n\n for (const item of items) {\n bundles.add({\n item\n });\n }\n\n return bundles;\n }\n}\n\nexport const createBundler = (params: IBundlerParams) => {\n return new Bundler(params);\n};\n"],"mappings":";;;;;;AAMO,MAAMA,OAAO,CAAqB;EAG9BC,WAAWA,CAACC,MAAsB,EAAE;IACvC,IAAI,CAACC,aAAa,GAAGD,MAAM,CAACC,aAAa;EAC7C;EAEOC,MAAMA,CAACF,MAA4B,EAAY;IAClD,MAAM;MAAEG;IAAM,CAAC,GAAGH,MAAM;IAExB,MAAMI,OAAO,GAAG,IAAI,CAACH,aAAa,CAAC,CAAC;IAEpC,KAAK,MAAMI,IAAI,IAAIF,KAAK,EAAE;MACtBC,OAAO,CAACE,GAAG,CAAC;QACRD;MACJ,CAAC,CAAC;IACN;IAEA,OAAOD,OAAO;EAClB;AACJ;AAACG,OAAA,CAAAT,OAAA,GAAAA,OAAA;AAEM,MAAMU,aAAa,GAAIR,MAAsB,IAAK;EACrD,OAAO,IAAIF,OAAO,CAACE,MAAM,CAAC;AAC9B,CAAC;AAACO,OAAA,CAAAC,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ import type { IBundle, IBundles, IBundlesAddParams } from "./types.js";
2
+ import type { IIngestorResultItem } from "../ingestor/types.js";
3
+ export interface IBundlesParams {
4
+ createBundle: (item: IIngestorResultItem) => IBundle;
5
+ }
6
+ export declare class Bundles implements IBundles {
7
+ private readonly bundles;
8
+ private readonly createBundle;
9
+ constructor(params: IBundlesParams);
10
+ add(params: IBundlesAddParams): void;
11
+ getBundles(): IBundle[];
12
+ private getBundle;
13
+ }
14
+ export declare const createBundles: (params: IBundlesParams) => Bundles;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createBundles = exports.Bundles = void 0;
7
+ class Bundles {
8
+ bundles = [];
9
+ constructor(params) {
10
+ this.createBundle = params.createBundle;
11
+ }
12
+ add(params) {
13
+ const {
14
+ item
15
+ } = params;
16
+ const bundle = this.getBundle(item);
17
+ bundle.add(item);
18
+ }
19
+ getBundles() {
20
+ return this.bundles;
21
+ }
22
+ getBundle(item) {
23
+ const last = this.bundles[this.bundles.length - 1];
24
+ if (last?.canAdd(item)) {
25
+ return last;
26
+ }
27
+ const bundle = this.createBundle(item);
28
+ this.bundles.push(bundle);
29
+ return bundle;
30
+ }
31
+ }
32
+ exports.Bundles = Bundles;
33
+ const createBundles = params => {
34
+ return new Bundles(params);
35
+ };
36
+ exports.createBundles = createBundles;
37
+
38
+ //# sourceMappingURL=Bundles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Bundles","bundles","constructor","params","createBundle","add","item","bundle","getBundle","getBundles","last","length","canAdd","push","exports","createBundles"],"sources":["Bundles.ts"],"sourcesContent":["import type { IBundle, IBundles, IBundlesAddParams } from \"~/resolver/app/bundler/types.js\";\nimport type { IIngestorResultItem } from \"~/resolver/app/ingestor/types.js\";\n\nexport interface IBundlesParams {\n createBundle: (item: IIngestorResultItem) => IBundle;\n}\n\nexport class Bundles implements IBundles {\n private readonly bundles: IBundle[] = [];\n private readonly createBundle: (item: IIngestorResultItem) => IBundle;\n\n public constructor(params: IBundlesParams) {\n this.createBundle = params.createBundle;\n }\n\n public add(params: IBundlesAddParams): void {\n const { item } = params;\n\n const bundle = this.getBundle(item);\n\n bundle.add(item);\n }\n\n public getBundles(): IBundle[] {\n return this.bundles;\n }\n\n private getBundle(item: IIngestorResultItem): IBundle {\n const last = this.bundles[this.bundles.length - 1];\n if (last?.canAdd(item)) {\n return last;\n }\n const bundle = this.createBundle(item);\n this.bundles.push(bundle);\n return bundle;\n }\n}\n\nexport const createBundles = (params: IBundlesParams) => {\n return new Bundles(params);\n};\n"],"mappings":";;;;;;AAOO,MAAMA,OAAO,CAAqB;EACpBC,OAAO,GAAc,EAAE;EAGjCC,WAAWA,CAACC,MAAsB,EAAE;IACvC,IAAI,CAACC,YAAY,GAAGD,MAAM,CAACC,YAAY;EAC3C;EAEOC,GAAGA,CAACF,MAAyB,EAAQ;IACxC,MAAM;MAAEG;IAAK,CAAC,GAAGH,MAAM;IAEvB,MAAMI,MAAM,GAAG,IAAI,CAACC,SAAS,CAACF,IAAI,CAAC;IAEnCC,MAAM,CAACF,GAAG,CAACC,IAAI,CAAC;EACpB;EAEOG,UAAUA,CAAA,EAAc;IAC3B,OAAO,IAAI,CAACR,OAAO;EACvB;EAEQO,SAASA,CAACF,IAAyB,EAAW;IAClD,MAAMI,IAAI,GAAG,IAAI,CAACT,OAAO,CAAC,IAAI,CAACA,OAAO,CAACU,MAAM,GAAG,CAAC,CAAC;IAClD,IAAID,IAAI,EAAEE,MAAM,CAACN,IAAI,CAAC,EAAE;MACpB,OAAOI,IAAI;IACf;IACA,MAAMH,MAAM,GAAG,IAAI,CAACH,YAAY,CAACE,IAAI,CAAC;IACtC,IAAI,CAACL,OAAO,CAACY,IAAI,CAACN,MAAM,CAAC;IACzB,OAAOA,MAAM;EACjB;AACJ;AAACO,OAAA,CAAAd,OAAA,GAAAA,OAAA;AAEM,MAAMe,aAAa,GAAIZ,MAAsB,IAAK;EACrD,OAAO,IAAIH,OAAO,CAACG,MAAM,CAAC;AAC9B,CAAC;AAACW,OAAA,CAAAC,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Used to bundle by source system, table and command.
3
+ * If we receive >1 commands in a single batch, for example, put -> delete -> put -> delete, we need to make sure
4
+ * that commands are executed in that order.
5
+ *
6
+ * This will be used for executing the commands in the target systems.
7
+ */
8
+ import type { IBundle } from "./types.js";
9
+ import type { IIngestorResultItem } from "../ingestor/types";
10
+ import type { IBaseBundleParams } from "./BaseBundle.js";
11
+ import { BaseBundle } from "./BaseBundle.js";
12
+ export declare class CommandBundle extends BaseBundle {
13
+ canAdd(item: IIngestorResultItem): boolean;
14
+ }
15
+ export declare const createCommandBundle: (params: IBaseBundleParams) => IBundle;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createCommandBundle = exports.CommandBundle = void 0;
7
+ var _BaseBundle = require("./BaseBundle.js");
8
+ /**
9
+ * Used to bundle by source system, table and command.
10
+ * If we receive >1 commands in a single batch, for example, put -> delete -> put -> delete, we need to make sure
11
+ * that commands are executed in that order.
12
+ *
13
+ * This will be used for executing the commands in the target systems.
14
+ */
15
+
16
+ class CommandBundle extends _BaseBundle.BaseBundle {
17
+ canAdd(item) {
18
+ const command = this.getCommand(item.command);
19
+ return this.command === command && this.table.name === item.table.name && this.source.name === item.source.name;
20
+ }
21
+ }
22
+ exports.CommandBundle = CommandBundle;
23
+ const createCommandBundle = params => {
24
+ return new CommandBundle(params);
25
+ };
26
+ exports.createCommandBundle = createCommandBundle;
27
+
28
+ //# sourceMappingURL=CommandBundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_BaseBundle","require","CommandBundle","BaseBundle","canAdd","item","command","getCommand","table","name","source","exports","createCommandBundle","params"],"sources":["CommandBundle.ts"],"sourcesContent":["/**\n * Used to bundle by source system, table and command.\n * If we receive >1 commands in a single batch, for example, put -> delete -> put -> delete, we need to make sure\n * that commands are executed in that order.\n *\n * This will be used for executing the commands in the target systems.\n */\nimport type { IBundle } from \"./types.js\";\nimport type { IIngestorResultItem } from \"../ingestor/types\";\nimport type { IBaseBundleParams } from \"./BaseBundle.js\";\nimport { BaseBundle } from \"./BaseBundle.js\";\n\nexport class CommandBundle extends BaseBundle {\n public canAdd(item: IIngestorResultItem): boolean {\n const command = this.getCommand(item.command);\n return (\n this.command === command &&\n this.table.name === item.table.name &&\n this.source.name === item.source.name\n );\n }\n}\n\nexport const createCommandBundle = (params: IBaseBundleParams): IBundle => {\n return new CommandBundle(params);\n};\n"],"mappings":";;;;;;AAUA,IAAAA,WAAA,GAAAC,OAAA;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMO,MAAMC,aAAa,SAASC,sBAAU,CAAC;EACnCC,MAAMA,CAACC,IAAyB,EAAW;IAC9C,MAAMC,OAAO,GAAG,IAAI,CAACC,UAAU,CAACF,IAAI,CAACC,OAAO,CAAC;IAC7C,OACI,IAAI,CAACA,OAAO,KAAKA,OAAO,IACxB,IAAI,CAACE,KAAK,CAACC,IAAI,KAAKJ,IAAI,CAACG,KAAK,CAACC,IAAI,IACnC,IAAI,CAACC,MAAM,CAACD,IAAI,KAAKJ,IAAI,CAACK,MAAM,CAACD,IAAI;EAE7C;AACJ;AAACE,OAAA,CAAAT,aAAA,GAAAA,aAAA;AAEM,MAAMU,mBAAmB,GAAIC,MAAyB,IAAc;EACvE,OAAO,IAAIX,aAAa,CAACW,MAAM,CAAC;AACpC,CAAC;AAACF,OAAA,CAAAC,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This will bundle records by system and table.
3
+ *
4
+ * It will be used to fetch the data from the source system tables.
5
+ */
6
+ import type { IBundle } from "./types.js";
7
+ import type { IIngestorResultItem } from "../ingestor/types";
8
+ import type { IBaseBundleParams } from "./BaseBundle.js";
9
+ import { BaseBundle } from "./BaseBundle.js";
10
+ export declare class TableBundle extends BaseBundle {
11
+ canAdd(item: IIngestorResultItem): boolean;
12
+ }
13
+ export declare const createTableBundle: (params: IBaseBundleParams) => IBundle;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createTableBundle = exports.TableBundle = void 0;
7
+ var _BaseBundle = require("./BaseBundle.js");
8
+ /**
9
+ * This will bundle records by system and table.
10
+ *
11
+ * It will be used to fetch the data from the source system tables.
12
+ */
13
+
14
+ class TableBundle extends _BaseBundle.BaseBundle {
15
+ canAdd(item) {
16
+ return this.source.name === item.source.name && this.table.name === item.table.name;
17
+ }
18
+ }
19
+ exports.TableBundle = TableBundle;
20
+ const createTableBundle = params => {
21
+ return new TableBundle(params);
22
+ };
23
+ exports.createTableBundle = createTableBundle;
24
+
25
+ //# sourceMappingURL=TableBundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_BaseBundle","require","TableBundle","BaseBundle","canAdd","item","source","name","table","exports","createTableBundle","params"],"sources":["TableBundle.ts"],"sourcesContent":["/**\n * This will bundle records by system and table.\n *\n * It will be used to fetch the data from the source system tables.\n */\nimport type { IBundle } from \"./types.js\";\nimport type { IIngestorResultItem } from \"../ingestor/types\";\nimport type { IBaseBundleParams } from \"./BaseBundle.js\";\nimport { BaseBundle } from \"./BaseBundle.js\";\n\nexport class TableBundle extends BaseBundle {\n public canAdd(item: IIngestorResultItem): boolean {\n return this.source.name === item.source.name && this.table.name === item.table.name;\n }\n}\n\nexport const createTableBundle = (params: IBaseBundleParams): IBundle => {\n return new TableBundle(params);\n};\n"],"mappings":";;;;;;AAQA,IAAAA,WAAA,GAAAC,OAAA;AARA;AACA;AACA;AACA;AACA;;AAMO,MAAMC,WAAW,SAASC,sBAAU,CAAC;EACjCC,MAAMA,CAACC,IAAyB,EAAW;IAC9C,OAAO,IAAI,CAACC,MAAM,CAACC,IAAI,KAAKF,IAAI,CAACC,MAAM,CAACC,IAAI,IAAI,IAAI,CAACC,KAAK,CAACD,IAAI,KAAKF,IAAI,CAACG,KAAK,CAACD,IAAI;EACvF;AACJ;AAACE,OAAA,CAAAP,WAAA,GAAAA,WAAA;AAEM,MAAMQ,iBAAiB,GAAIC,MAAyB,IAAc;EACrE,OAAO,IAAIT,WAAW,CAACS,MAAM,CAAC;AAClC,CAAC;AAACF,OAAA,CAAAC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ import type { IIngestorResultItem } from "../ingestor/types.js";
2
+ import type { CommandType } from "../../../types.js";
3
+ import type { ITable } from "../../../sync/types.js";
4
+ import type { IDeployment } from "../../deployment/types.js";
5
+ export interface IBundleItem {
6
+ PK: string;
7
+ SK: string;
8
+ }
9
+ export interface IBundle {
10
+ readonly items: IBundleItem[];
11
+ readonly command: CommandType;
12
+ readonly table: ITable;
13
+ readonly source: IDeployment;
14
+ canAdd(item: IIngestorResultItem): boolean;
15
+ add(item: IIngestorResultItem): void;
16
+ }
17
+ export interface IBundlerBundleParams {
18
+ items: IIngestorResultItem[];
19
+ }
20
+ export interface IBundler {
21
+ bundle(params: IBundlerBundleParams): IBundles;
22
+ }
23
+ export interface IBundlesAddParams {
24
+ item: IIngestorResultItem;
25
+ }
26
+ export interface IBundles {
27
+ add(params: IBundlesAddParams): void;
28
+ getBundles(): IBundle[];
29
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { IIngestorResultItem } from \"~/resolver/app/ingestor/types.js\";\nimport type { CommandType } from \"~/types.js\";\nimport type { ITable } from \"~/sync/types.js\";\nimport type { IDeployment } from \"~/resolver/deployment/types.js\";\n\nexport interface IBundleItem {\n PK: string;\n SK: string;\n}\n\nexport interface IBundle {\n readonly items: IBundleItem[];\n readonly command: CommandType;\n readonly table: ITable;\n readonly source: IDeployment;\n canAdd(item: IIngestorResultItem): boolean;\n add(item: IIngestorResultItem): void;\n}\n\nexport interface IBundlerBundleParams {\n items: IIngestorResultItem[];\n}\n\nexport interface IBundler {\n bundle(params: IBundlerBundleParams): IBundles;\n}\n\nexport interface IBundlesAddParams {\n item: IIngestorResultItem;\n}\n\nexport interface IBundles {\n add(params: IBundlesAddParams): void;\n getBundles(): IBundle[];\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ import type { IStoreItem, IStorer } from "../storer/types";
2
+ import type { IDeployment } from "../../deployment/types.js";
3
+ import type { ITable } from "../../../sync/types.js";
4
+ import type { IBundle } from "../bundler/types.js";
5
+ export interface IDeleteCommandHandlerHandleParams {
6
+ targetDeployment: IDeployment;
7
+ targetTable: ITable;
8
+ items: IStoreItem[];
9
+ bundle: IBundle;
10
+ }
11
+ export interface IDeleteCommandHandlerParams {
12
+ storer: IStorer;
13
+ }
14
+ export declare class DeleteCommandHandler {
15
+ private readonly storer;
16
+ constructor(params: IDeleteCommandHandlerParams);
17
+ handle(params: IDeleteCommandHandlerHandleParams): Promise<void>;
18
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DeleteCommandHandler = void 0;
7
+ class DeleteCommandHandler {
8
+ constructor(params) {
9
+ this.storer = params.storer;
10
+ }
11
+ async handle(params) {
12
+ const {
13
+ targetDeployment,
14
+ targetTable,
15
+ bundle
16
+ } = params;
17
+ const result = bundle.items.map(item => {
18
+ if (!item.PK || !item.SK) {
19
+ return null;
20
+ }
21
+ return {
22
+ PK: item.PK,
23
+ SK: item.SK
24
+ };
25
+ }).filter(item => {
26
+ return !!item;
27
+ });
28
+ await this.storer.store({
29
+ command: "delete",
30
+ deployment: targetDeployment,
31
+ table: targetTable,
32
+ items: result,
33
+ bundle
34
+ });
35
+ }
36
+ }
37
+ exports.DeleteCommandHandler = DeleteCommandHandler;
38
+
39
+ //# sourceMappingURL=DeleteCommandHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DeleteCommandHandler","constructor","params","storer","handle","targetDeployment","targetTable","bundle","result","items","map","item","PK","SK","filter","store","command","deployment","table","exports"],"sources":["DeleteCommandHandler.ts"],"sourcesContent":["import type { IStoreItem, IStorer } from \"../storer/types\";\nimport type { IDeployment } from \"~/resolver/deployment/types.js\";\nimport type { ITable } from \"~/sync/types.js\";\nimport type { IBundle } from \"~/resolver/app/bundler/types.js\";\n\nexport interface IDeleteCommandHandlerHandleParams {\n targetDeployment: IDeployment;\n targetTable: ITable;\n items: IStoreItem[];\n bundle: IBundle;\n}\n\nexport interface IDeleteCommandHandlerParams {\n storer: IStorer;\n}\n\nexport class DeleteCommandHandler {\n private readonly storer: IStorer;\n\n public constructor(params: IDeleteCommandHandlerParams) {\n this.storer = params.storer;\n }\n public async handle(params: IDeleteCommandHandlerHandleParams): Promise<void> {\n const { targetDeployment, targetTable, bundle } = params;\n const result = bundle.items\n .map(item => {\n if (!item.PK || !item.SK) {\n return null;\n }\n return {\n PK: item.PK,\n SK: item.SK\n };\n })\n .filter((item): item is IStoreItem => {\n return !!item;\n });\n\n await this.storer.store({\n command: \"delete\",\n deployment: targetDeployment,\n table: targetTable,\n items: result,\n bundle\n });\n }\n}\n"],"mappings":";;;;;;AAgBO,MAAMA,oBAAoB,CAAC;EAGvBC,WAAWA,CAACC,MAAmC,EAAE;IACpD,IAAI,CAACC,MAAM,GAAGD,MAAM,CAACC,MAAM;EAC/B;EACA,MAAaC,MAAMA,CAACF,MAAyC,EAAiB;IAC1E,MAAM;MAAEG,gBAAgB;MAAEC,WAAW;MAAEC;IAAO,CAAC,GAAGL,MAAM;IACxD,MAAMM,MAAM,GAAGD,MAAM,CAACE,KAAK,CACtBC,GAAG,CAACC,IAAI,IAAI;MACT,IAAI,CAACA,IAAI,CAACC,EAAE,IAAI,CAACD,IAAI,CAACE,EAAE,EAAE;QACtB,OAAO,IAAI;MACf;MACA,OAAO;QACHD,EAAE,EAAED,IAAI,CAACC,EAAE;QACXC,EAAE,EAAEF,IAAI,CAACE;MACb,CAAC;IACL,CAAC,CAAC,CACDC,MAAM,CAAEH,IAAI,IAAyB;MAClC,OAAO,CAAC,CAACA,IAAI;IACjB,CAAC,CAAC;IAEN,MAAM,IAAI,CAACR,MAAM,CAACY,KAAK,CAAC;MACpBC,OAAO,EAAE,QAAQ;MACjBC,UAAU,EAAEZ,gBAAgB;MAC5Ba,KAAK,EAAEZ,WAAW;MAClBG,KAAK,EAAED,MAAM;MACbD;IACJ,CAAC,CAAC;EACN;AACJ;AAACY,OAAA,CAAAnB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ import type { IStoreItem, IStorer } from "../storer/types";
2
+ import type { ITable } from "../../../sync/types";
3
+ import type { IDeployment } from "../../deployment/types.js";
4
+ import type { IBundle } from "../bundler/types.js";
5
+ export interface IPutCommandHandlerHandleParams {
6
+ items: IStoreItem[];
7
+ bundle: IBundle;
8
+ targetDeployment: IDeployment;
9
+ targetTable: ITable;
10
+ }
11
+ export interface IPutCommandHandlerParams {
12
+ storer: IStorer;
13
+ }
14
+ export declare class PutCommandHandler {
15
+ private readonly storer;
16
+ constructor(params: IPutCommandHandlerParams);
17
+ handle(params: IPutCommandHandlerHandleParams): Promise<void>;
18
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PutCommandHandler = void 0;
7
+ class PutCommandHandler {
8
+ constructor(params) {
9
+ this.storer = params.storer;
10
+ }
11
+ async handle(params) {
12
+ const {
13
+ items,
14
+ targetDeployment,
15
+ targetTable,
16
+ bundle
17
+ } = params;
18
+ const result = items.filter(item => {
19
+ return !!item.PK && !!item.SK;
20
+ });
21
+ await this.storer.store({
22
+ command: "put",
23
+ deployment: targetDeployment,
24
+ table: targetTable,
25
+ items: result,
26
+ bundle
27
+ });
28
+ }
29
+ }
30
+ exports.PutCommandHandler = PutCommandHandler;
31
+
32
+ //# sourceMappingURL=PutCommandHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PutCommandHandler","constructor","params","storer","handle","items","targetDeployment","targetTable","bundle","result","filter","item","PK","SK","store","command","deployment","table","exports"],"sources":["PutCommandHandler.ts"],"sourcesContent":["import type { IStoreItem, IStorer } from \"../storer/types\";\nimport type { ITable } from \"~/sync/types\";\nimport type { IDeployment } from \"~/resolver/deployment/types.js\";\nimport type { IBundle } from \"~/resolver/app/bundler/types.js\";\n\nexport interface IPutCommandHandlerHandleParams {\n items: IStoreItem[];\n bundle: IBundle;\n targetDeployment: IDeployment;\n targetTable: ITable;\n}\n\nexport interface IPutCommandHandlerParams {\n storer: IStorer;\n}\n\nexport class PutCommandHandler {\n private readonly storer: IStorer;\n\n public constructor(params: IPutCommandHandlerParams) {\n this.storer = params.storer;\n }\n\n public async handle(params: IPutCommandHandlerHandleParams): Promise<void> {\n const { items, targetDeployment, targetTable, bundle } = params;\n\n const result = items.filter(item => {\n return !!item.PK && !!item.SK;\n });\n\n await this.storer.store({\n command: \"put\",\n deployment: targetDeployment,\n table: targetTable,\n items: result,\n bundle\n });\n }\n}\n"],"mappings":";;;;;;AAgBO,MAAMA,iBAAiB,CAAC;EAGpBC,WAAWA,CAACC,MAAgC,EAAE;IACjD,IAAI,CAACC,MAAM,GAAGD,MAAM,CAACC,MAAM;EAC/B;EAEA,MAAaC,MAAMA,CAACF,MAAsC,EAAiB;IACvE,MAAM;MAAEG,KAAK;MAAEC,gBAAgB;MAAEC,WAAW;MAAEC;IAAO,CAAC,GAAGN,MAAM;IAE/D,MAAMO,MAAM,GAAGJ,KAAK,CAACK,MAAM,CAACC,IAAI,IAAI;MAChC,OAAO,CAAC,CAACA,IAAI,CAACC,EAAE,IAAI,CAAC,CAACD,IAAI,CAACE,EAAE;IACjC,CAAC,CAAC;IAEF,MAAM,IAAI,CAACV,MAAM,CAACW,KAAK,CAAC;MACpBC,OAAO,EAAE,KAAK;MACdC,UAAU,EAAEV,gBAAgB;MAC5BW,KAAK,EAAEV,WAAW;MAClBF,KAAK,EAAEI,MAAM;MACbD;IACJ,CAAC,CAAC;EACN;AACJ;AAACU,OAAA,CAAAlB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import { CommandHandlerPlugin } from "../../plugins/CommandHandlerPlugin.js";
2
+ export declare const createDeleteCommandHandlerPlugin: () => CommandHandlerPlugin;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createDeleteCommandHandlerPlugin = void 0;
7
+ var _CommandHandlerPlugin = require("../../plugins/CommandHandlerPlugin.js");
8
+ var _DeleteCommandHandler = require("./DeleteCommandHandler");
9
+ const createDeleteCommandHandlerPlugin = () => {
10
+ const plugin = (0, _CommandHandlerPlugin.createCommandHandlerPlugin)({
11
+ canHandle: command => {
12
+ return command === "delete";
13
+ },
14
+ handle: async params => {
15
+ const handler = new _DeleteCommandHandler.DeleteCommandHandler(params);
16
+ return handler.handle(params);
17
+ }
18
+ });
19
+ plugin.name = `${_CommandHandlerPlugin.CommandHandlerPlugin.type}.delete`;
20
+ return plugin;
21
+ };
22
+ exports.createDeleteCommandHandlerPlugin = createDeleteCommandHandlerPlugin;
23
+
24
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_CommandHandlerPlugin","require","_DeleteCommandHandler","createDeleteCommandHandlerPlugin","plugin","createCommandHandlerPlugin","canHandle","command","handle","params","handler","DeleteCommandHandler","name","CommandHandlerPlugin","type","exports"],"sources":["delete.ts"],"sourcesContent":["import {\n CommandHandlerPlugin,\n createCommandHandlerPlugin\n} from \"~/resolver/plugins/CommandHandlerPlugin.js\";\nimport { DeleteCommandHandler } from \"./DeleteCommandHandler\";\n\nexport const createDeleteCommandHandlerPlugin = () => {\n const plugin = createCommandHandlerPlugin({\n canHandle: command => {\n return command === \"delete\";\n },\n handle: async params => {\n const handler = new DeleteCommandHandler(params);\n\n return handler.handle(params);\n }\n });\n\n plugin.name = `${CommandHandlerPlugin.type}.delete`;\n\n return plugin;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAIA,IAAAC,qBAAA,GAAAD,OAAA;AAEO,MAAME,gCAAgC,GAAGA,CAAA,KAAM;EAClD,MAAMC,MAAM,GAAG,IAAAC,gDAA0B,EAAC;IACtCC,SAAS,EAAEC,OAAO,IAAI;MAClB,OAAOA,OAAO,KAAK,QAAQ;IAC/B,CAAC;IACDC,MAAM,EAAE,MAAMC,MAAM,IAAI;MACpB,MAAMC,OAAO,GAAG,IAAIC,0CAAoB,CAACF,MAAM,CAAC;MAEhD,OAAOC,OAAO,CAACF,MAAM,CAACC,MAAM,CAAC;IACjC;EACJ,CAAC,CAAC;EAEFL,MAAM,CAACQ,IAAI,GAAG,GAAGC,0CAAoB,CAACC,IAAI,SAAS;EAEnD,OAAOV,MAAM;AACjB,CAAC;AAACW,OAAA,CAAAZ,gCAAA,GAAAA,gCAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import { CommandHandlerPlugin } from "../../plugins/CommandHandlerPlugin.js";
2
+ export declare const createPutCommandHandlerPlugin: () => CommandHandlerPlugin;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createPutCommandHandlerPlugin = void 0;
7
+ var _CommandHandlerPlugin = require("../../plugins/CommandHandlerPlugin.js");
8
+ var _PutCommandHandler = require("./PutCommandHandler");
9
+ const createPutCommandHandlerPlugin = () => {
10
+ const plugin = (0, _CommandHandlerPlugin.createCommandHandlerPlugin)({
11
+ canHandle: command => {
12
+ return command === "put";
13
+ },
14
+ handle: async params => {
15
+ const handler = new _PutCommandHandler.PutCommandHandler(params);
16
+ return handler.handle(params);
17
+ }
18
+ });
19
+ plugin.name = `${_CommandHandlerPlugin.CommandHandlerPlugin.type}.put`;
20
+ return plugin;
21
+ };
22
+ exports.createPutCommandHandlerPlugin = createPutCommandHandlerPlugin;
23
+
24
+ //# sourceMappingURL=put.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_CommandHandlerPlugin","require","_PutCommandHandler","createPutCommandHandlerPlugin","plugin","createCommandHandlerPlugin","canHandle","command","handle","params","handler","PutCommandHandler","name","CommandHandlerPlugin","type","exports"],"sources":["put.ts"],"sourcesContent":["import {\n CommandHandlerPlugin,\n createCommandHandlerPlugin\n} from \"~/resolver/plugins/CommandHandlerPlugin.js\";\nimport { PutCommandHandler } from \"./PutCommandHandler\";\n\nexport const createPutCommandHandlerPlugin = () => {\n const plugin = createCommandHandlerPlugin({\n canHandle: command => {\n return command === \"put\";\n },\n handle: async params => {\n const handler = new PutCommandHandler(params);\n\n return handler.handle(params);\n }\n });\n\n plugin.name = `${CommandHandlerPlugin.type}.put`;\n\n return plugin;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAIA,IAAAC,kBAAA,GAAAD,OAAA;AAEO,MAAME,6BAA6B,GAAGA,CAAA,KAAM;EAC/C,MAAMC,MAAM,GAAG,IAAAC,gDAA0B,EAAC;IACtCC,SAAS,EAAEC,OAAO,IAAI;MAClB,OAAOA,OAAO,KAAK,KAAK;IAC5B,CAAC;IACDC,MAAM,EAAE,MAAMC,MAAM,IAAI;MACpB,MAAMC,OAAO,GAAG,IAAIC,oCAAiB,CAACF,MAAM,CAAC;MAE7C,OAAOC,OAAO,CAACF,MAAM,CAACC,MAAM,CAAC;IACjC;EACJ,CAAC,CAAC;EAEFL,MAAM,CAACQ,IAAI,GAAG,GAAGC,0CAAoB,CAACC,IAAI,MAAM;EAEhD,OAAOV,MAAM;AACjB,CAAC;AAACW,OAAA,CAAAZ,6BAAA,GAAAA,6BAAA","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import type { GenericRecord } from "@webiny/api/types";
2
+ import type { IInputItem, IItem, ISourceDataContainer } from "./types.js";
3
+ import type { IStoreItem } from "../storer/types.js";
4
+ export declare class SourceDataContainer implements ISourceDataContainer {
5
+ readonly items: GenericRecord<string, IItem>;
6
+ private constructor();
7
+ static create(): ISourceDataContainer;
8
+ get(input: IInputItem): IStoreItem | null;
9
+ add(item: IInputItem, data: IStoreItem | null): void;
10
+ merge(container: ISourceDataContainer): void;
11
+ private createKey;
12
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SourceDataContainer = void 0;
7
+ class SourceDataContainer {
8
+ items = {};
9
+ constructor() {
10
+ // block
11
+ }
12
+ static create() {
13
+ return new SourceDataContainer();
14
+ }
15
+ get(input) {
16
+ const key = this.createKey(input);
17
+ const item = this.items[key];
18
+ return item?.data || null;
19
+ }
20
+ add(item, data) {
21
+ const key = this.createKey(item);
22
+ if (this.items[key]) {
23
+ return;
24
+ }
25
+ this.items[key] = {
26
+ ...item,
27
+ data
28
+ };
29
+ }
30
+ merge(container) {
31
+ for (const key in container.items) {
32
+ const item = container.items[key];
33
+ this.add(item, item.data);
34
+ }
35
+ }
36
+ createKey(item) {
37
+ return `${item.source.name}#${item.table.name}#${item.PK}#${item.SK}`;
38
+ }
39
+ }
40
+ exports.SourceDataContainer = SourceDataContainer;
41
+
42
+ //# sourceMappingURL=SourceDataContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SourceDataContainer","items","constructor","create","get","input","key","createKey","item","data","add","merge","container","source","name","table","PK","SK","exports"],"sources":["SourceDataContainer.ts"],"sourcesContent":["import type { GenericRecord } from \"@webiny/api/types\";\nimport type { IInputItem, IItem, ISourceDataContainer } from \"~/resolver/app/data/types.js\";\nimport type { IStoreItem } from \"~/resolver/app/storer/types.js\";\n\nexport class SourceDataContainer implements ISourceDataContainer {\n public readonly items: GenericRecord<string, IItem> = {};\n\n private constructor() {\n // block\n }\n\n public static create(): ISourceDataContainer {\n return new SourceDataContainer();\n }\n\n public get(input: IInputItem): IStoreItem | null {\n const key = this.createKey(input);\n const item = this.items[key];\n return item?.data || null;\n }\n\n public add(item: IInputItem, data: IStoreItem | null): void {\n const key = this.createKey(item);\n if (this.items[key]) {\n return;\n }\n\n this.items[key] = {\n ...item,\n data\n };\n }\n\n public merge(container: ISourceDataContainer): void {\n for (const key in container.items) {\n const item = container.items[key];\n this.add(item, item.data);\n }\n }\n\n private createKey(item: IInputItem): string {\n return `${item.source.name}#${item.table.name}#${item.PK}#${item.SK}`;\n }\n}\n"],"mappings":";;;;;;AAIO,MAAMA,mBAAmB,CAAiC;EAC7CC,KAAK,GAAiC,CAAC,CAAC;EAEhDC,WAAWA,CAAA,EAAG;IAClB;EAAA;EAGJ,OAAcC,MAAMA,CAAA,EAAyB;IACzC,OAAO,IAAIH,mBAAmB,CAAC,CAAC;EACpC;EAEOI,GAAGA,CAACC,KAAiB,EAAqB;IAC7C,MAAMC,GAAG,GAAG,IAAI,CAACC,SAAS,CAACF,KAAK,CAAC;IACjC,MAAMG,IAAI,GAAG,IAAI,CAACP,KAAK,CAACK,GAAG,CAAC;IAC5B,OAAOE,IAAI,EAAEC,IAAI,IAAI,IAAI;EAC7B;EAEOC,GAAGA,CAACF,IAAgB,EAAEC,IAAuB,EAAQ;IACxD,MAAMH,GAAG,GAAG,IAAI,CAACC,SAAS,CAACC,IAAI,CAAC;IAChC,IAAI,IAAI,CAACP,KAAK,CAACK,GAAG,CAAC,EAAE;MACjB;IACJ;IAEA,IAAI,CAACL,KAAK,CAACK,GAAG,CAAC,GAAG;MACd,GAAGE,IAAI;MACPC;IACJ,CAAC;EACL;EAEOE,KAAKA,CAACC,SAA+B,EAAQ;IAChD,KAAK,MAAMN,GAAG,IAAIM,SAAS,CAACX,KAAK,EAAE;MAC/B,MAAMO,IAAI,GAAGI,SAAS,CAACX,KAAK,CAACK,GAAG,CAAC;MACjC,IAAI,CAACI,GAAG,CAACF,IAAI,EAAEA,IAAI,CAACC,IAAI,CAAC;IAC7B;EACJ;EAEQF,SAASA,CAACC,IAAgB,EAAU;IACxC,OAAO,GAAGA,IAAI,CAACK,MAAM,CAACC,IAAI,IAAIN,IAAI,CAACO,KAAK,CAACD,IAAI,IAAIN,IAAI,CAACQ,EAAE,IAAIR,IAAI,CAACS,EAAE,EAAE;EACzE;AACJ;AAACC,OAAA,CAAAlB,mBAAA,GAAAA,mBAAA","ignoreList":[]}