@webiny/api-sync-system 6.0.0-alpha.5 → 6.0.0-rc.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.
- package/README.md +6 -108
- package/constants.js +1 -7
- package/constants.js.map +1 -1
- package/index.js +3 -38
- package/index.js.map +1 -1
- package/package.json +20 -23
- package/resolver/app/RecordHandler.d.ts +6 -6
- package/resolver/app/RecordHandler.js +7 -15
- package/resolver/app/RecordHandler.js.map +1 -1
- package/resolver/app/RecordsValidation.js +6 -14
- package/resolver/app/RecordsValidation.js.map +1 -1
- package/resolver/app/ResolverApplication.d.ts +1 -1
- package/resolver/app/ResolverApplication.js +10 -18
- package/resolver/app/ResolverApplication.js.map +1 -1
- package/resolver/app/abstractions/RecordHandler.d.ts +1 -1
- package/resolver/app/abstractions/RecordHandler.js +1 -5
- package/resolver/app/abstractions/RecordsValidation.d.ts +2 -2
- package/resolver/app/abstractions/RecordsValidation.js +1 -5
- package/resolver/app/abstractions/RecordsValidation.js.map +1 -1
- package/resolver/app/abstractions/ResolverApplication.js +1 -5
- package/resolver/app/abstractions/ResolverRecord.d.ts +1 -1
- package/resolver/app/abstractions/ResolverRecord.js +1 -5
- package/resolver/app/abstractions/ResolverRecord.js.map +1 -1
- package/resolver/app/bundler/BaseBundle.d.ts +6 -6
- package/resolver/app/bundler/BaseBundle.js +1 -8
- package/resolver/app/bundler/BaseBundle.js.map +1 -1
- package/resolver/app/bundler/Bundler.d.ts +1 -1
- package/resolver/app/bundler/Bundler.js +2 -10
- package/resolver/app/bundler/Bundler.js.map +1 -1
- package/resolver/app/bundler/Bundles.d.ts +2 -2
- package/resolver/app/bundler/Bundles.js +2 -10
- package/resolver/app/bundler/Bundles.js.map +1 -1
- package/resolver/app/bundler/CommandBundle.d.ts +1 -1
- package/resolver/app/bundler/CommandBundle.js +3 -11
- package/resolver/app/bundler/CommandBundle.js.map +1 -1
- package/resolver/app/bundler/TableBundle.d.ts +1 -1
- package/resolver/app/bundler/TableBundle.js +3 -11
- package/resolver/app/bundler/TableBundle.js.map +1 -1
- package/resolver/app/bundler/types.d.ts +2 -2
- package/resolver/app/bundler/types.js +1 -5
- package/resolver/app/commandHandler/DeleteCommandHandler.d.ts +3 -3
- package/resolver/app/commandHandler/DeleteCommandHandler.js +1 -8
- package/resolver/app/commandHandler/DeleteCommandHandler.js.map +1 -1
- package/resolver/app/commandHandler/PutCommandHandler.d.ts +4 -4
- package/resolver/app/commandHandler/PutCommandHandler.js +1 -8
- package/resolver/app/commandHandler/PutCommandHandler.js.map +1 -1
- package/resolver/app/commandHandler/delete.d.ts +1 -1
- package/resolver/app/commandHandler/delete.js +6 -13
- package/resolver/app/commandHandler/delete.js.map +1 -1
- package/resolver/app/commandHandler/put.d.ts +1 -1
- package/resolver/app/commandHandler/put.js +6 -13
- package/resolver/app/commandHandler/put.js.map +1 -1
- package/resolver/app/data/SourceDataContainer.d.ts +3 -3
- package/resolver/app/data/SourceDataContainer.js +1 -8
- package/resolver/app/data/SourceDataContainer.js.map +1 -1
- package/resolver/app/data/types.d.ts +2 -2
- package/resolver/app/data/types.js +1 -5
- package/resolver/app/fetcher/Fetcher.d.ts +3 -3
- package/resolver/app/fetcher/Fetcher.js +13 -22
- package/resolver/app/fetcher/Fetcher.js.map +1 -1
- package/resolver/app/fetcher/types.d.ts +2 -2
- package/resolver/app/fetcher/types.js +1 -5
- package/resolver/app/ingestor/Ingestor.d.ts +1 -1
- package/resolver/app/ingestor/Ingestor.js +2 -10
- package/resolver/app/ingestor/Ingestor.js.map +1 -1
- package/resolver/app/ingestor/IngestorResult.js +3 -11
- package/resolver/app/ingestor/IngestorResult.js.map +1 -1
- package/resolver/app/ingestor/types.d.ts +2 -2
- package/resolver/app/ingestor/types.js +1 -5
- package/resolver/app/storer/Storer.d.ts +3 -3
- package/resolver/app/storer/Storer.js +12 -20
- package/resolver/app/storer/Storer.js.map +1 -1
- package/resolver/app/storer/types.d.ts +2 -2
- package/resolver/app/storer/types.js +1 -5
- package/resolver/app/storer/types.js.map +1 -1
- package/resolver/app/transform/TransformHandler.d.ts +4 -4
- package/resolver/app/transform/TransformHandler.js +5 -12
- package/resolver/app/transform/TransformHandler.js.map +1 -1
- package/resolver/app/transform/middleware.d.ts +1 -1
- package/resolver/app/transform/middleware.js +1 -7
- package/resolver/app/transform/middleware.js.map +1 -1
- package/resolver/app/utils/Retry.js +4 -12
- package/resolver/app/utils/Retry.js.map +1 -1
- package/resolver/app/utils/sleep.js +1 -8
- package/resolver/app/utils/sleep.js.map +1 -1
- package/resolver/app/validation/body.d.ts +6 -6
- package/resolver/app/validation/body.js +22 -30
- package/resolver/app/validation/body.js.map +1 -1
- package/resolver/app/validation/createJsonTransform.js +6 -14
- package/resolver/app/validation/createJsonTransform.js.map +1 -1
- package/resolver/app/validation/detail.d.ts +6 -6
- package/resolver/app/validation/detail.js +16 -24
- package/resolver/app/validation/detail.js.map +1 -1
- package/resolver/app/validation/event.d.ts +6 -6
- package/resolver/app/validation/event.js +19 -27
- package/resolver/app/validation/event.js.map +1 -1
- package/resolver/app/validation/numericString.js +5 -13
- package/resolver/app/validation/numericString.js.map +1 -1
- package/resolver/app/validation/system.js +8 -16
- package/resolver/app/validation/system.js.map +1 -1
- package/resolver/createEventHandlerPlugin.d.ts +2 -1
- package/resolver/createEventHandlerPlugin.js +35 -42
- package/resolver/createEventHandlerPlugin.js.map +1 -1
- package/resolver/createResolverHandler.d.ts +1 -1
- package/resolver/createResolverHandler.js +24 -31
- package/resolver/createResolverHandler.js.map +1 -1
- package/resolver/deployment/Deployment.d.ts +2 -3
- package/resolver/deployment/Deployment.js +6 -14
- package/resolver/deployment/Deployment.js.map +1 -1
- package/resolver/deployment/Deployments.js +2 -10
- package/resolver/deployment/Deployments.js.map +1 -1
- package/resolver/deployment/DeploymentsFetcher.js +33 -42
- package/resolver/deployment/DeploymentsFetcher.js.map +1 -1
- package/resolver/deployment/types.d.ts +4 -4
- package/resolver/deployment/types.js +1 -5
- package/resolver/deployment/types.js.map +1 -1
- package/resolver/lambda/LambdaTrigger.js +5 -12
- package/resolver/lambda/LambdaTrigger.js.map +1 -1
- package/resolver/plugins/CommandHandlerPlugin.d.ts +3 -3
- package/resolver/plugins/CommandHandlerPlugin.js +3 -11
- package/resolver/plugins/CommandHandlerPlugin.js.map +1 -1
- package/resolver/plugins/StorerAfterEachPlugin.d.ts +2 -2
- package/resolver/plugins/StorerAfterEachPlugin.js +4 -13
- package/resolver/plugins/StorerAfterEachPlugin.js.map +1 -1
- package/resolver/plugins/TransformRecordPlugin.d.ts +3 -3
- package/resolver/plugins/TransformRecordPlugin.js +3 -11
- package/resolver/plugins/TransformRecordPlugin.js.map +1 -1
- package/resolver/recordTypes/fileManager/CopyFile.js +4 -11
- package/resolver/recordTypes/fileManager/CopyFile.js.map +1 -1
- package/resolver/recordTypes/fileManager/DeleteFile.d.ts +1 -1
- package/resolver/recordTypes/fileManager/DeleteFile.js +3 -10
- package/resolver/recordTypes/fileManager/DeleteFile.js.map +1 -1
- package/resolver/recordTypes/fileManager/fileManager.d.ts +1 -1
- package/resolver/recordTypes/fileManager/fileManager.js +4 -11
- package/resolver/recordTypes/fileManager/fileManager.js.map +1 -1
- package/resolver/recordTypes/fileManager/fileManagerOnDelete.d.ts +1 -1
- package/resolver/recordTypes/fileManager/fileManagerOnDelete.js +7 -14
- package/resolver/recordTypes/fileManager/fileManagerOnDelete.js.map +1 -1
- package/resolver/recordTypes/fileManager/fileManagerOnPut.d.ts +1 -1
- package/resolver/recordTypes/fileManager/fileManagerOnPut.js +7 -14
- package/resolver/recordTypes/fileManager/fileManagerOnPut.js.map +1 -1
- package/resolver/recordTypes/fileManager/shouldBeHandled.d.ts +1 -1
- package/resolver/recordTypes/fileManager/shouldBeHandled.js +1 -8
- package/resolver/recordTypes/fileManager/shouldBeHandled.js.map +1 -1
- package/resolver/recordTypes/fileManager/types.d.ts +2 -2
- package/resolver/recordTypes/fileManager/types.js +1 -5
- package/resolver/recordTypes/users/CopyUser.d.ts +2 -2
- package/resolver/recordTypes/users/CopyUser.js +3 -10
- package/resolver/recordTypes/users/CopyUser.js.map +1 -1
- package/resolver/recordTypes/users/DeleteUser.d.ts +2 -2
- package/resolver/recordTypes/users/DeleteUser.js +3 -10
- package/resolver/recordTypes/users/DeleteUser.js.map +1 -1
- package/resolver/recordTypes/users/shouldBeHandled.d.ts +1 -1
- package/resolver/recordTypes/users/shouldBeHandled.js +1 -8
- package/resolver/recordTypes/users/shouldBeHandled.js.map +1 -1
- package/resolver/recordTypes/users/types.d.ts +1 -1
- package/resolver/recordTypes/users/types.js +1 -5
- package/resolver/recordTypes/users/types.js.map +1 -1
- package/resolver/recordTypes/users/users.js +4 -11
- package/resolver/recordTypes/users/users.js.map +1 -1
- package/resolver/recordTypes/users/usersOnDelete.d.ts +2 -2
- package/resolver/recordTypes/users/usersOnDelete.js +7 -14
- package/resolver/recordTypes/users/usersOnDelete.js.map +1 -1
- package/resolver/recordTypes/users/usersOnPut.d.ts +2 -2
- package/resolver/recordTypes/users/usersOnPut.js +7 -14
- package/resolver/recordTypes/users/usersOnPut.js.map +1 -1
- package/sync/FilterOutRecord.d.ts +2 -2
- package/sync/FilterOutRecord.js +2 -10
- package/sync/FilterOutRecord.js.map +1 -1
- package/sync/attachToDynamoDbDocument.d.ts +1 -1
- package/sync/attachToDynamoDbDocument.js +9 -17
- package/sync/attachToDynamoDbDocument.js.map +1 -1
- package/sync/createHandler.js +27 -34
- package/sync/createHandler.js.map +1 -1
- package/sync/createSendDataToEventBridgeOnRequestEnd.js +6 -13
- package/sync/createSendDataToEventBridgeOnRequestEnd.js.map +1 -1
- package/sync/createSyncSystem.d.ts +1 -1
- package/sync/createSyncSystem.js +6 -13
- package/sync/createSyncSystem.js.map +1 -1
- package/sync/filter/createDefaultFilterOutRecordPlugins.d.ts +1 -1
- package/sync/filter/createDefaultFilterOutRecordPlugins.js +9 -19
- package/sync/filter/createDefaultFilterOutRecordPlugins.js.map +1 -1
- package/sync/handler/Handler.d.ts +2 -2
- package/sync/handler/Handler.js +9 -17
- package/sync/handler/Handler.js.map +1 -1
- package/sync/handler/HandlerConverter.js +2 -10
- package/sync/handler/HandlerConverter.js.map +1 -1
- package/sync/handler/converter/BatchGetCommandConverter.js +6 -14
- package/sync/handler/converter/BatchGetCommandConverter.js.map +1 -1
- package/sync/handler/converter/BatchWriteCommandConverter.js +6 -14
- package/sync/handler/converter/BatchWriteCommandConverter.js.map +1 -1
- package/sync/handler/converter/DeleteCommandConverter.js +6 -14
- package/sync/handler/converter/DeleteCommandConverter.js.map +1 -1
- package/sync/handler/converter/GetCommandConverter.js +6 -14
- package/sync/handler/converter/GetCommandConverter.js.map +1 -1
- package/sync/handler/converter/PutCommandConverter.js +6 -14
- package/sync/handler/converter/PutCommandConverter.js.map +1 -1
- package/sync/handler/converter/QueryCommandConverter.js +6 -14
- package/sync/handler/converter/QueryCommandConverter.js.map +1 -1
- package/sync/handler/converter/ScanCommandConverter.js +6 -14
- package/sync/handler/converter/ScanCommandConverter.js.map +1 -1
- package/sync/handler/converter/UpdateCommandConverter.js +6 -14
- package/sync/handler/converter/UpdateCommandConverter.js.map +1 -1
- package/sync/handler/converter/commands/BatchWriteCommandValue.d.ts +2 -2
- package/sync/handler/converter/commands/BatchWriteCommandValue.js +4 -11
- package/sync/handler/converter/commands/BatchWriteCommandValue.js.map +1 -1
- package/sync/handler/converter/commands/DeleteCommandValue.d.ts +2 -2
- package/sync/handler/converter/commands/DeleteCommandValue.js +3 -10
- package/sync/handler/converter/commands/DeleteCommandValue.js.map +1 -1
- package/sync/handler/converter/commands/NullCommandValue.d.ts +1 -1
- package/sync/handler/converter/commands/NullCommandValue.js +1 -8
- package/sync/handler/converter/commands/NullCommandValue.js.map +1 -1
- package/sync/handler/converter/commands/PutCommandValue.d.ts +2 -2
- package/sync/handler/converter/commands/PutCommandValue.js +3 -10
- package/sync/handler/converter/commands/PutCommandValue.js.map +1 -1
- package/sync/handler/converter/commands/UpdateCommandValue.d.ts +2 -2
- package/sync/handler/converter/commands/UpdateCommandValue.js +3 -10
- package/sync/handler/converter/commands/UpdateCommandValue.js.map +1 -1
- package/sync/handler/types.d.ts +3 -3
- package/sync/handler/types.js +1 -5
- package/sync/handler/types.js.map +1 -1
- package/sync/plugins/FilterOutRecordPlugin.d.ts +1 -1
- package/sync/plugins/FilterOutRecordPlugin.js +3 -11
- package/sync/plugins/FilterOutRecordPlugin.js.map +1 -1
- package/sync/requestPlugin.d.ts +1 -1
- package/sync/requestPlugin.js +19 -20
- package/sync/requestPlugin.js.map +1 -1
- package/sync/types.js +1 -5
- package/sync/utils/getTableType.js +7 -14
- package/sync/utils/getTableType.js.map +1 -1
- package/sync/utils/manifest.d.ts +1 -1
- package/sync/utils/manifest.js +12 -20
- package/sync/utils/manifest.js.map +1 -1
- package/sync/utils/validateSystemInput.d.ts +1 -1
- package/sync/utils/validateSystemInput.js +3 -10
- package/sync/utils/validateSystemInput.js.map +1 -1
- package/types.d.ts +3 -4
- package/types.js +2 -8
- package/types.js.map +1 -1
- package/utils/createSystemName.js +1 -8
- package/utils/createSystemName.js.map +1 -1
- package/worker/actions/copyFile/CopyFile.js +13 -21
- package/worker/actions/copyFile/CopyFile.js.map +1 -1
- package/worker/actions/copyFile/copyFileAction.d.ts +1 -1
- package/worker/actions/copyFile/copyFileAction.js +9 -16
- package/worker/actions/copyFile/copyFileAction.js.map +1 -1
- package/worker/actions/copyFile/copyFileSchema.js +8 -16
- package/worker/actions/copyFile/copyFileSchema.js.map +1 -1
- package/worker/actions/copyFile/types.js +1 -5
- package/worker/actions/createUser/CreateUser.d.ts +1 -1
- package/worker/actions/createUser/CreateUser.js +9 -16
- package/worker/actions/createUser/CreateUser.js.map +1 -1
- package/worker/actions/createUser/createUserAction.d.ts +2 -2
- package/worker/actions/createUser/createUserAction.js +9 -16
- package/worker/actions/createUser/createUserAction.js.map +1 -1
- package/worker/actions/createUser/createUserSchema.js +8 -16
- package/worker/actions/createUser/createUserSchema.js.map +1 -1
- package/worker/actions/createUser/types.js +1 -5
- package/worker/actions/deleteFile/DeleteFile.js +4 -11
- package/worker/actions/deleteFile/DeleteFile.js.map +1 -1
- package/worker/actions/deleteFile/deleteFileAction.d.ts +1 -1
- package/worker/actions/deleteFile/deleteFileAction.js +9 -16
- package/worker/actions/deleteFile/deleteFileAction.js.map +1 -1
- package/worker/actions/deleteFile/deleteFileSchema.js +8 -16
- package/worker/actions/deleteFile/deleteFileSchema.js.map +1 -1
- package/worker/actions/deleteFile/types.js +1 -5
- package/worker/actions/deleteUser/DeleteUser.d.ts +2 -2
- package/worker/actions/deleteUser/DeleteUser.js +7 -14
- package/worker/actions/deleteUser/DeleteUser.js.map +1 -1
- package/worker/actions/deleteUser/deleteUserAction.d.ts +1 -1
- package/worker/actions/deleteUser/deleteUserAction.js +9 -16
- package/worker/actions/deleteUser/deleteUserAction.js.map +1 -1
- package/worker/actions/deleteUser/deleteUserSchema.js +8 -16
- package/worker/actions/deleteUser/deleteUserSchema.js.map +1 -1
- package/worker/actions/deleteUser/types.js +1 -5
- package/worker/actions/logValidationError.js +4 -11
- package/worker/actions/logValidationError.js.map +1 -1
- package/worker/actions/removeCognitoUserAttributes.js +1 -8
- package/worker/actions/removeCognitoUserAttributes.js.map +1 -1
- package/worker/actions/updateUser/UpdateUser.d.ts +1 -1
- package/worker/actions/updateUser/UpdateUser.js +9 -16
- package/worker/actions/updateUser/UpdateUser.js.map +1 -1
- package/worker/actions/updateUser/types.js +1 -5
- package/worker/actions/updateUser/updateUserAction.d.ts +2 -2
- package/worker/actions/updateUser/updateUserAction.js +9 -16
- package/worker/actions/updateUser/updateUserAction.js.map +1 -1
- package/worker/actions/updateUser/updateUserSchema.js +8 -16
- package/worker/actions/updateUser/updateUserSchema.js.map +1 -1
- package/worker/createWorkerHandler.js +17 -24
- package/worker/createWorkerHandler.js.map +1 -1
- package/worker/handler/WorkerActionHandler.d.ts +2 -2
- package/worker/handler/WorkerActionHandler.js +3 -10
- package/worker/handler/WorkerActionHandler.js.map +1 -1
- package/worker/handler/eventHandler.js +9 -16
- package/worker/handler/eventHandler.js.map +1 -1
- package/worker/plugins/WorkerActionPlugin.d.ts +1 -1
- package/worker/plugins/WorkerActionPlugin.js +3 -11
- package/worker/plugins/WorkerActionPlugin.js.map +1 -1
- package/worker/types.js +1 -5
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createBatchWriteCommandConverter = exports.BatchWriteCommandConverter = void 0;
|
|
7
|
-
var _index = require("@webiny/aws-sdk/client-dynamodb/index.js");
|
|
8
|
-
var _BatchWriteCommandValue = require("./commands/BatchWriteCommandValue.js");
|
|
9
|
-
class BatchWriteCommandConverter {
|
|
1
|
+
import { BatchWriteCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import { BatchWriteCommandValue } from "./commands/BatchWriteCommandValue.js";
|
|
3
|
+
export class BatchWriteCommandConverter {
|
|
10
4
|
name = "put";
|
|
11
5
|
can(input) {
|
|
12
|
-
return input instanceof
|
|
6
|
+
return input instanceof BatchWriteCommand;
|
|
13
7
|
}
|
|
14
8
|
convert(input) {
|
|
15
|
-
return new
|
|
9
|
+
return new BatchWriteCommandValue(input);
|
|
16
10
|
}
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
const createBatchWriteCommandConverter = () => {
|
|
12
|
+
export const createBatchWriteCommandConverter = () => {
|
|
20
13
|
return new BatchWriteCommandConverter();
|
|
21
14
|
};
|
|
22
|
-
exports.createBatchWriteCommandConverter = createBatchWriteCommandConverter;
|
|
23
15
|
|
|
24
16
|
//# sourceMappingURL=BatchWriteCommandConverter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["BatchWriteCommand","BatchWriteCommandValue","BatchWriteCommandConverter","name","can","input","convert","createBatchWriteCommandConverter"],"sources":["BatchWriteCommandConverter.ts"],"sourcesContent":["import { BatchWriteCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandConverter, IDynamoDbCommand } from \"../../types.js\";\nimport { BatchWriteCommandValue } from \"./commands/BatchWriteCommandValue.js\";\n\nexport class BatchWriteCommandConverter implements ICommandConverter {\n public readonly name: string = \"put\";\n\n public can(input: IDynamoDbCommand): boolean {\n return input instanceof BatchWriteCommand;\n }\n public convert(input: BatchWriteCommand) {\n return new BatchWriteCommandValue(input);\n }\n}\n\nexport const createBatchWriteCommandConverter = (): ICommandConverter => {\n return new BatchWriteCommandConverter();\n};\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,0CAA0C;AAE5E,SAASC,sBAAsB;AAE/B,OAAO,MAAMC,0BAA0B,CAA8B;EACjDC,IAAI,GAAW,KAAK;EAE7BC,GAAGA,CAACC,KAAuB,EAAW;IACzC,OAAOA,KAAK,YAAYL,iBAAiB;EAC7C;EACOM,OAAOA,CAACD,KAAwB,EAAE;IACrC,OAAO,IAAIJ,sBAAsB,CAACI,KAAK,CAAC;EAC5C;AACJ;AAEA,OAAO,MAAME,gCAAgC,GAAGA,CAAA,KAAyB;EACrE,OAAO,IAAIL,0BAA0B,CAAC,CAAC;AAC3C,CAAC","ignoreList":[]}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createDeleteCommandConverter = exports.DeleteCommandConverter = void 0;
|
|
7
|
-
var _index = require("@webiny/aws-sdk/client-dynamodb/index.js");
|
|
8
|
-
var _DeleteCommandValue = require("./commands/DeleteCommandValue.js");
|
|
9
|
-
class DeleteCommandConverter {
|
|
1
|
+
import { DeleteCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import { DeleteCommandValue } from "./commands/DeleteCommandValue.js";
|
|
3
|
+
export class DeleteCommandConverter {
|
|
10
4
|
name = "delete";
|
|
11
5
|
can(input) {
|
|
12
|
-
return input instanceof
|
|
6
|
+
return input instanceof DeleteCommand;
|
|
13
7
|
}
|
|
14
8
|
convert(input) {
|
|
15
|
-
return new
|
|
9
|
+
return new DeleteCommandValue(input);
|
|
16
10
|
}
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
const createDeleteCommandConverter = () => {
|
|
12
|
+
export const createDeleteCommandConverter = () => {
|
|
20
13
|
return new DeleteCommandConverter();
|
|
21
14
|
};
|
|
22
|
-
exports.createDeleteCommandConverter = createDeleteCommandConverter;
|
|
23
15
|
|
|
24
16
|
//# sourceMappingURL=DeleteCommandConverter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["DeleteCommand","DeleteCommandValue","DeleteCommandConverter","name","can","input","convert","createDeleteCommandConverter"],"sources":["DeleteCommandConverter.ts"],"sourcesContent":["import { DeleteCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandConverter, IDynamoDbCommand } from \"../../types.js\";\nimport { DeleteCommandValue } from \"./commands/DeleteCommandValue.js\";\n\nexport class DeleteCommandConverter implements ICommandConverter {\n public readonly name: string = \"delete\";\n\n public can(input: IDynamoDbCommand): boolean {\n return input instanceof DeleteCommand;\n }\n public convert(input: DeleteCommand) {\n return new DeleteCommandValue(input);\n }\n}\n\nexport const createDeleteCommandConverter = (): ICommandConverter => {\n return new DeleteCommandConverter();\n};\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,0CAA0C;AAExE,SAASC,kBAAkB;AAE3B,OAAO,MAAMC,sBAAsB,CAA8B;EAC7CC,IAAI,GAAW,QAAQ;EAEhCC,GAAGA,CAACC,KAAuB,EAAW;IACzC,OAAOA,KAAK,YAAYL,aAAa;EACzC;EACOM,OAAOA,CAACD,KAAoB,EAAE;IACjC,OAAO,IAAIJ,kBAAkB,CAACI,KAAK,CAAC;EACxC;AACJ;AAEA,OAAO,MAAME,4BAA4B,GAAGA,CAAA,KAAyB;EACjE,OAAO,IAAIL,sBAAsB,CAAC,CAAC;AACvC,CAAC","ignoreList":[]}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createGetCommandConverter = exports.GetCommandConverter = void 0;
|
|
7
|
-
var _index = require("@webiny/aws-sdk/client-dynamodb/index.js");
|
|
8
|
-
var _NullCommandValue = require("./commands/NullCommandValue.js");
|
|
9
|
-
class GetCommandConverter {
|
|
1
|
+
import { GetCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import { NullCommandValue } from "./commands/NullCommandValue.js";
|
|
3
|
+
export class GetCommandConverter {
|
|
10
4
|
name = "get";
|
|
11
5
|
can(input) {
|
|
12
|
-
return input instanceof
|
|
6
|
+
return input instanceof GetCommand;
|
|
13
7
|
}
|
|
14
8
|
convert() {
|
|
15
|
-
return new
|
|
9
|
+
return new NullCommandValue();
|
|
16
10
|
}
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
const createGetCommandConverter = () => {
|
|
12
|
+
export const createGetCommandConverter = () => {
|
|
20
13
|
return new GetCommandConverter();
|
|
21
14
|
};
|
|
22
|
-
exports.createGetCommandConverter = createGetCommandConverter;
|
|
23
15
|
|
|
24
16
|
//# sourceMappingURL=GetCommandConverter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["GetCommand","NullCommandValue","GetCommandConverter","name","can","input","convert","createGetCommandConverter"],"sources":["GetCommandConverter.ts"],"sourcesContent":["import { GetCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandConverter, IDynamoDbCommand } from \"../../types.js\";\nimport { NullCommandValue } from \"./commands/NullCommandValue.js\";\n\nexport class GetCommandConverter implements ICommandConverter {\n public readonly name: string = \"get\";\n\n public can(input: IDynamoDbCommand): boolean {\n return input instanceof GetCommand;\n }\n\n public convert() {\n return new NullCommandValue();\n }\n}\n\nexport const createGetCommandConverter = (): ICommandConverter => {\n return new GetCommandConverter();\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,0CAA0C;AAErE,SAASC,gBAAgB;AAEzB,OAAO,MAAMC,mBAAmB,CAA8B;EAC1CC,IAAI,GAAW,KAAK;EAE7BC,GAAGA,CAACC,KAAuB,EAAW;IACzC,OAAOA,KAAK,YAAYL,UAAU;EACtC;EAEOM,OAAOA,CAAA,EAAG;IACb,OAAO,IAAIL,gBAAgB,CAAC,CAAC;EACjC;AACJ;AAEA,OAAO,MAAMM,yBAAyB,GAAGA,CAAA,KAAyB;EAC9D,OAAO,IAAIL,mBAAmB,CAAC,CAAC;AACpC,CAAC","ignoreList":[]}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createPutCommandConverter = exports.PutCommandConverter = void 0;
|
|
7
|
-
var _index = require("@webiny/aws-sdk/client-dynamodb/index.js");
|
|
8
|
-
var _PutCommandValue = require("./commands/PutCommandValue.js");
|
|
9
|
-
class PutCommandConverter {
|
|
1
|
+
import { PutCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import { PutCommandValue } from "./commands/PutCommandValue.js";
|
|
3
|
+
export class PutCommandConverter {
|
|
10
4
|
name = "put";
|
|
11
5
|
can(input) {
|
|
12
|
-
return input instanceof
|
|
6
|
+
return input instanceof PutCommand;
|
|
13
7
|
}
|
|
14
8
|
convert(input) {
|
|
15
|
-
return new
|
|
9
|
+
return new PutCommandValue(input);
|
|
16
10
|
}
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
const createPutCommandConverter = () => {
|
|
12
|
+
export const createPutCommandConverter = () => {
|
|
20
13
|
return new PutCommandConverter();
|
|
21
14
|
};
|
|
22
|
-
exports.createPutCommandConverter = createPutCommandConverter;
|
|
23
15
|
|
|
24
16
|
//# sourceMappingURL=PutCommandConverter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["PutCommand","PutCommandValue","PutCommandConverter","name","can","input","convert","createPutCommandConverter"],"sources":["PutCommandConverter.ts"],"sourcesContent":["import { PutCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandConverter, IDynamoDbCommand } from \"../../types.js\";\nimport { PutCommandValue } from \"./commands/PutCommandValue.js\";\n\nexport class PutCommandConverter implements ICommandConverter {\n public readonly name: string = \"put\";\n\n public can(input: IDynamoDbCommand): boolean {\n return input instanceof PutCommand;\n }\n public convert(input: PutCommand) {\n return new PutCommandValue(input);\n }\n}\n\nexport const createPutCommandConverter = (): ICommandConverter => {\n return new PutCommandConverter();\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,0CAA0C;AAErE,SAASC,eAAe;AAExB,OAAO,MAAMC,mBAAmB,CAA8B;EAC1CC,IAAI,GAAW,KAAK;EAE7BC,GAAGA,CAACC,KAAuB,EAAW;IACzC,OAAOA,KAAK,YAAYL,UAAU;EACtC;EACOM,OAAOA,CAACD,KAAiB,EAAE;IAC9B,OAAO,IAAIJ,eAAe,CAACI,KAAK,CAAC;EACrC;AACJ;AAEA,OAAO,MAAME,yBAAyB,GAAGA,CAAA,KAAyB;EAC9D,OAAO,IAAIL,mBAAmB,CAAC,CAAC;AACpC,CAAC","ignoreList":[]}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createQueryCommandConverter = exports.QueryCommandConverter = void 0;
|
|
7
|
-
var _index = require("@webiny/aws-sdk/client-dynamodb/index.js");
|
|
8
|
-
var _NullCommandValue = require("./commands/NullCommandValue.js");
|
|
9
|
-
class QueryCommandConverter {
|
|
1
|
+
import { QueryCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import { NullCommandValue } from "./commands/NullCommandValue.js";
|
|
3
|
+
export class QueryCommandConverter {
|
|
10
4
|
name = "query";
|
|
11
5
|
can(input) {
|
|
12
|
-
return input instanceof
|
|
6
|
+
return input instanceof QueryCommand || input.constructor?.name === "QueryCommand";
|
|
13
7
|
}
|
|
14
8
|
convert() {
|
|
15
|
-
return new
|
|
9
|
+
return new NullCommandValue();
|
|
16
10
|
}
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
const createQueryCommandConverter = () => {
|
|
12
|
+
export const createQueryCommandConverter = () => {
|
|
20
13
|
return new QueryCommandConverter();
|
|
21
14
|
};
|
|
22
|
-
exports.createQueryCommandConverter = createQueryCommandConverter;
|
|
23
15
|
|
|
24
16
|
//# sourceMappingURL=QueryCommandConverter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["QueryCommand","NullCommandValue","QueryCommandConverter","name","can","input","constructor","convert","createQueryCommandConverter"],"sources":["QueryCommandConverter.ts"],"sourcesContent":["import { QueryCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandConverter, IDynamoDbCommand } from \"../../types.js\";\nimport { NullCommandValue } from \"./commands/NullCommandValue.js\";\n\nexport class QueryCommandConverter implements ICommandConverter {\n public readonly name: string = \"query\";\n\n public can(input: IDynamoDbCommand): boolean {\n return input instanceof QueryCommand || input.constructor?.name === \"QueryCommand\";\n }\n\n public convert() {\n return new NullCommandValue();\n }\n}\n\nexport const createQueryCommandConverter = (): ICommandConverter => {\n return new QueryCommandConverter();\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,0CAA0C;AAEvE,SAASC,gBAAgB;AAEzB,OAAO,MAAMC,qBAAqB,CAA8B;EAC5CC,IAAI,GAAW,OAAO;EAE/BC,GAAGA,CAACC,KAAuB,EAAW;IACzC,OAAOA,KAAK,YAAYL,YAAY,IAAIK,KAAK,CAACC,WAAW,EAAEH,IAAI,KAAK,cAAc;EACtF;EAEOI,OAAOA,CAAA,EAAG;IACb,OAAO,IAAIN,gBAAgB,CAAC,CAAC;EACjC;AACJ;AAEA,OAAO,MAAMO,2BAA2B,GAAGA,CAAA,KAAyB;EAChE,OAAO,IAAIN,qBAAqB,CAAC,CAAC;AACtC,CAAC","ignoreList":[]}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createScanCommandConverter = exports.ScanCommandConverter = void 0;
|
|
7
|
-
var _index = require("@webiny/aws-sdk/client-dynamodb/index.js");
|
|
8
|
-
var _NullCommandValue = require("./commands/NullCommandValue.js");
|
|
9
|
-
class ScanCommandConverter {
|
|
1
|
+
import { ScanCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import { NullCommandValue } from "./commands/NullCommandValue.js";
|
|
3
|
+
export class ScanCommandConverter {
|
|
10
4
|
name = "query";
|
|
11
5
|
can(input) {
|
|
12
|
-
return input instanceof
|
|
6
|
+
return input instanceof ScanCommand;
|
|
13
7
|
}
|
|
14
8
|
convert() {
|
|
15
|
-
return new
|
|
9
|
+
return new NullCommandValue();
|
|
16
10
|
}
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
const createScanCommandConverter = () => {
|
|
12
|
+
export const createScanCommandConverter = () => {
|
|
20
13
|
return new ScanCommandConverter();
|
|
21
14
|
};
|
|
22
|
-
exports.createScanCommandConverter = createScanCommandConverter;
|
|
23
15
|
|
|
24
16
|
//# sourceMappingURL=ScanCommandConverter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["ScanCommand","NullCommandValue","ScanCommandConverter","name","can","input","convert","createScanCommandConverter"],"sources":["ScanCommandConverter.ts"],"sourcesContent":["import { ScanCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandConverter, IDynamoDbCommand } from \"../../types.js\";\nimport { NullCommandValue } from \"./commands/NullCommandValue.js\";\n\nexport class ScanCommandConverter implements ICommandConverter {\n public readonly name: string = \"query\";\n\n public can(input: IDynamoDbCommand): boolean {\n return input instanceof ScanCommand;\n }\n\n public convert() {\n return new NullCommandValue();\n }\n}\n\nexport const createScanCommandConverter = (): ICommandConverter => {\n return new ScanCommandConverter();\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,0CAA0C;AAEtE,SAASC,gBAAgB;AAEzB,OAAO,MAAMC,oBAAoB,CAA8B;EAC3CC,IAAI,GAAW,OAAO;EAE/BC,GAAGA,CAACC,KAAuB,EAAW;IACzC,OAAOA,KAAK,YAAYL,WAAW;EACvC;EAEOM,OAAOA,CAAA,EAAG;IACb,OAAO,IAAIL,gBAAgB,CAAC,CAAC;EACjC;AACJ;AAEA,OAAO,MAAMM,0BAA0B,GAAGA,CAAA,KAAyB;EAC/D,OAAO,IAAIL,oBAAoB,CAAC,CAAC;AACrC,CAAC","ignoreList":[]}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createUpdateCommandConverter = exports.UpdateCommandConverter = void 0;
|
|
7
|
-
var _index = require("@webiny/aws-sdk/client-dynamodb/index.js");
|
|
8
|
-
var _UpdateCommandValue = require("./commands/UpdateCommandValue.js");
|
|
9
|
-
class UpdateCommandConverter {
|
|
1
|
+
import { UpdateCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import { UpdateCommandValue } from "./commands/UpdateCommandValue.js";
|
|
3
|
+
export class UpdateCommandConverter {
|
|
10
4
|
name = "update";
|
|
11
5
|
can(input) {
|
|
12
|
-
return input instanceof
|
|
6
|
+
return input instanceof UpdateCommand;
|
|
13
7
|
}
|
|
14
8
|
convert(input) {
|
|
15
|
-
return new
|
|
9
|
+
return new UpdateCommandValue(input);
|
|
16
10
|
}
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
const createUpdateCommandConverter = () => {
|
|
12
|
+
export const createUpdateCommandConverter = () => {
|
|
20
13
|
return new UpdateCommandConverter();
|
|
21
14
|
};
|
|
22
|
-
exports.createUpdateCommandConverter = createUpdateCommandConverter;
|
|
23
15
|
|
|
24
16
|
//# sourceMappingURL=UpdateCommandConverter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["UpdateCommand","UpdateCommandValue","UpdateCommandConverter","name","can","input","convert","createUpdateCommandConverter"],"sources":["UpdateCommandConverter.ts"],"sourcesContent":["import { UpdateCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandConverter, IDynamoDbCommand } from \"../../types.js\";\nimport { UpdateCommandValue } from \"./commands/UpdateCommandValue.js\";\n\nexport class UpdateCommandConverter implements ICommandConverter {\n public readonly name: string = \"update\";\n\n public can(input: IDynamoDbCommand): boolean {\n return input instanceof UpdateCommand;\n }\n public convert(input: UpdateCommand) {\n return new UpdateCommandValue(input);\n }\n}\n\nexport const createUpdateCommandConverter = (): ICommandConverter => {\n return new UpdateCommandConverter();\n};\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,0CAA0C;AAExE,SAASC,kBAAkB;AAE3B,OAAO,MAAMC,sBAAsB,CAA8B;EAC7CC,IAAI,GAAW,QAAQ;EAEhCC,GAAGA,CAACC,KAAuB,EAAW;IACzC,OAAOA,KAAK,YAAYL,aAAa;EACzC;EACOM,OAAOA,CAACD,KAAoB,EAAE;IACjC,OAAO,IAAIJ,kBAAkB,CAACI,KAAK,CAAC;EACxC;AACJ;AAEA,OAAO,MAAME,4BAA4B,GAAGA,CAAA,KAAyB;EACjE,OAAO,IAAIL,sBAAsB,CAAC,CAAC;AACvC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BatchWriteCommand } from "@webiny/aws-sdk/client-dynamodb";
|
|
2
|
-
import type { ICommandValue, ICommandValueItemExtended } from "
|
|
1
|
+
import type { BatchWriteCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import type { ICommandValue, ICommandValueItemExtended } from "../../../../sync/types.js";
|
|
3
3
|
import type { NonEmptyArray } from "@webiny/api/types.js";
|
|
4
4
|
export declare class BatchWriteCommandValue implements ICommandValue {
|
|
5
5
|
readonly command = "batchWrite";
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BatchWriteCommandValue = void 0;
|
|
7
|
-
var _getTableType = require("../../../utils/getTableType.js");
|
|
1
|
+
import { getTableType } from "../../../utils/getTableType.js";
|
|
8
2
|
const convert = items => {
|
|
9
3
|
if (items.length === 0) {
|
|
10
4
|
return null;
|
|
11
5
|
}
|
|
12
6
|
return items;
|
|
13
7
|
};
|
|
14
|
-
class BatchWriteCommandValue {
|
|
8
|
+
export class BatchWriteCommandValue {
|
|
15
9
|
command = "batchWrite";
|
|
16
10
|
items = [];
|
|
17
11
|
constructor(input) {
|
|
@@ -25,7 +19,7 @@ class BatchWriteCommandValue {
|
|
|
25
19
|
PK: item.PK,
|
|
26
20
|
SK: item.SK,
|
|
27
21
|
tableName,
|
|
28
|
-
tableType:
|
|
22
|
+
tableType: getTableType(tableName),
|
|
29
23
|
input
|
|
30
24
|
});
|
|
31
25
|
} else if (value.DeleteRequest?.Key) {
|
|
@@ -35,7 +29,7 @@ class BatchWriteCommandValue {
|
|
|
35
29
|
PK: item.PK,
|
|
36
30
|
SK: item.SK,
|
|
37
31
|
tableName,
|
|
38
|
-
tableType:
|
|
32
|
+
tableType: getTableType(tableName),
|
|
39
33
|
input
|
|
40
34
|
});
|
|
41
35
|
}
|
|
@@ -46,6 +40,5 @@ class BatchWriteCommandValue {
|
|
|
46
40
|
return convert(this.items);
|
|
47
41
|
}
|
|
48
42
|
}
|
|
49
|
-
exports.BatchWriteCommandValue = BatchWriteCommandValue;
|
|
50
43
|
|
|
51
44
|
//# sourceMappingURL=BatchWriteCommandValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getTableType","convert","items","length","BatchWriteCommandValue","command","constructor","input","tableName","RequestItems","values","value","PutRequest","Item","item","push","PK","SK","tableType","DeleteRequest","Key","getItems"],"sources":["BatchWriteCommandValue.ts"],"sourcesContent":["import type { BatchWriteCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandValue, ICommandValueItemExtended } from \"~/sync/types.js\";\nimport type { NonEmptyArray } from \"@webiny/api/types.js\";\nimport { getTableType } from \"~/sync/utils/getTableType.js\";\n\nconst convert = (\n items: ICommandValueItemExtended[]\n): NonEmptyArray<ICommandValueItemExtended> | null => {\n if (items.length === 0) {\n return null;\n }\n return items as NonEmptyArray<ICommandValueItemExtended>;\n};\n\nexport class BatchWriteCommandValue implements ICommandValue {\n public readonly command = \"batchWrite\";\n public readonly items: ICommandValueItemExtended[] = [];\n\n public constructor(input: BatchWriteCommand) {\n for (const tableName in input.input.RequestItems) {\n const values = input.input.RequestItems[tableName];\n for (const value of values) {\n if (value.PutRequest?.Item) {\n const item = value.PutRequest.Item;\n\n this.items.push({\n command: \"put\",\n PK: item.PK,\n SK: item.SK,\n tableName,\n tableType: getTableType(tableName),\n input\n });\n } else if (value.DeleteRequest?.Key) {\n const item = value.DeleteRequest.Key;\n\n this.items.push({\n command: \"delete\",\n PK: item.PK,\n SK: item.SK,\n tableName,\n tableType: getTableType(tableName),\n input\n });\n }\n }\n }\n }\n\n public getItems(): NonEmptyArray<ICommandValueItemExtended> | null {\n return convert(this.items);\n }\n}\n"],"mappings":"AAGA,SAASA,YAAY;AAErB,MAAMC,OAAO,GACTC,KAAkC,IACgB;EAClD,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;IACpB,OAAO,IAAI;EACf;EACA,OAAOD,KAAK;AAChB,CAAC;AAED,OAAO,MAAME,sBAAsB,CAA0B;EACzCC,OAAO,GAAG,YAAY;EACtBH,KAAK,GAAgC,EAAE;EAEhDI,WAAWA,CAACC,KAAwB,EAAE;IACzC,KAAK,MAAMC,SAAS,IAAID,KAAK,CAACA,KAAK,CAACE,YAAY,EAAE;MAC9C,MAAMC,MAAM,GAAGH,KAAK,CAACA,KAAK,CAACE,YAAY,CAACD,SAAS,CAAC;MAClD,KAAK,MAAMG,KAAK,IAAID,MAAM,EAAE;QACxB,IAAIC,KAAK,CAACC,UAAU,EAAEC,IAAI,EAAE;UACxB,MAAMC,IAAI,GAAGH,KAAK,CAACC,UAAU,CAACC,IAAI;UAElC,IAAI,CAACX,KAAK,CAACa,IAAI,CAAC;YACZV,OAAO,EAAE,KAAK;YACdW,EAAE,EAAEF,IAAI,CAACE,EAAE;YACXC,EAAE,EAAEH,IAAI,CAACG,EAAE;YACXT,SAAS;YACTU,SAAS,EAAElB,YAAY,CAACQ,SAAS,CAAC;YAClCD;UACJ,CAAC,CAAC;QACN,CAAC,MAAM,IAAII,KAAK,CAACQ,aAAa,EAAEC,GAAG,EAAE;UACjC,MAAMN,IAAI,GAAGH,KAAK,CAACQ,aAAa,CAACC,GAAG;UAEpC,IAAI,CAAClB,KAAK,CAACa,IAAI,CAAC;YACZV,OAAO,EAAE,QAAQ;YACjBW,EAAE,EAAEF,IAAI,CAACE,EAAE;YACXC,EAAE,EAAEH,IAAI,CAACG,EAAE;YACXT,SAAS;YACTU,SAAS,EAAElB,YAAY,CAACQ,SAAS,CAAC;YAClCD;UACJ,CAAC,CAAC;QACN;MACJ;IACJ;EACJ;EAEOc,QAAQA,CAAA,EAAoD;IAC/D,OAAOpB,OAAO,CAAC,IAAI,CAACC,KAAK,CAAC;EAC9B;AACJ","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DeleteCommand } from "@webiny/aws-sdk/client-dynamodb";
|
|
2
|
-
import type { ICommandValue, ICommandValueItemExtended } from "
|
|
1
|
+
import type { DeleteCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import type { ICommandValue, ICommandValueItemExtended } from "../../../../sync/types.js";
|
|
3
3
|
import type { NonEmptyArray } from "@webiny/api/types.js";
|
|
4
4
|
export declare class DeleteCommandValue implements ICommandValue {
|
|
5
5
|
readonly command = "delete";
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.DeleteCommandValue = void 0;
|
|
7
|
-
var _getTableType = require("../../../utils/getTableType.js");
|
|
8
|
-
class DeleteCommandValue {
|
|
1
|
+
import { getTableType } from "../../../utils/getTableType.js";
|
|
2
|
+
export class DeleteCommandValue {
|
|
9
3
|
command = "delete";
|
|
10
4
|
constructor(input) {
|
|
11
5
|
const tableName = input.input.TableName;
|
|
@@ -14,7 +8,7 @@ class DeleteCommandValue {
|
|
|
14
8
|
PK: input.input.Key.PK,
|
|
15
9
|
SK: input.input.Key.SK,
|
|
16
10
|
tableName,
|
|
17
|
-
tableType:
|
|
11
|
+
tableType: getTableType(tableName),
|
|
18
12
|
input
|
|
19
13
|
};
|
|
20
14
|
}
|
|
@@ -22,6 +16,5 @@ class DeleteCommandValue {
|
|
|
22
16
|
return [this.item];
|
|
23
17
|
}
|
|
24
18
|
}
|
|
25
|
-
exports.DeleteCommandValue = DeleteCommandValue;
|
|
26
19
|
|
|
27
20
|
//# sourceMappingURL=DeleteCommandValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getTableType","DeleteCommandValue","command","constructor","input","tableName","TableName","item","PK","Key","SK","tableType","getItems"],"sources":["DeleteCommandValue.ts"],"sourcesContent":["import type { DeleteCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandValue, ICommandValueItemExtended } from \"~/sync/types.js\";\nimport type { NonEmptyArray } from \"@webiny/api/types.js\";\nimport { getTableType } from \"~/sync/utils/getTableType.js\";\n\nexport class DeleteCommandValue implements ICommandValue {\n public readonly command = \"delete\";\n public readonly item: ICommandValueItemExtended;\n\n public constructor(input: DeleteCommand) {\n const tableName = input.input.TableName as string;\n this.item = {\n command: this.command,\n PK: input.input.Key!.PK,\n SK: input.input.Key!.SK,\n tableName,\n tableType: getTableType(tableName),\n input\n };\n }\n\n public getItems(): NonEmptyArray<ICommandValueItemExtended> {\n return [this.item];\n }\n}\n"],"mappings":"AAGA,SAASA,YAAY;AAErB,OAAO,MAAMC,kBAAkB,CAA0B;EACrCC,OAAO,GAAG,QAAQ;EAG3BC,WAAWA,CAACC,KAAoB,EAAE;IACrC,MAAMC,SAAS,GAAGD,KAAK,CAACA,KAAK,CAACE,SAAmB;IACjD,IAAI,CAACC,IAAI,GAAG;MACRL,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBM,EAAE,EAAEJ,KAAK,CAACA,KAAK,CAACK,GAAG,CAAED,EAAE;MACvBE,EAAE,EAAEN,KAAK,CAACA,KAAK,CAACK,GAAG,CAAEC,EAAE;MACvBL,SAAS;MACTM,SAAS,EAAEX,YAAY,CAACK,SAAS,CAAC;MAClCD;IACJ,CAAC;EACL;EAEOQ,QAAQA,CAAA,EAA6C;IACxD,OAAO,CAAC,IAAI,CAACL,IAAI,CAAC;EACtB;AACJ","ignoreList":[]}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.NullCommandValue = void 0;
|
|
7
|
-
class NullCommandValue {
|
|
1
|
+
export class NullCommandValue {
|
|
8
2
|
/**
|
|
9
3
|
* Does not matter what will be here, we will not use it.
|
|
10
4
|
*/
|
|
@@ -13,6 +7,5 @@ class NullCommandValue {
|
|
|
13
7
|
return null;
|
|
14
8
|
}
|
|
15
9
|
}
|
|
16
|
-
exports.NullCommandValue = NullCommandValue;
|
|
17
10
|
|
|
18
11
|
//# sourceMappingURL=NullCommandValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NullCommandValue","command","getItems"
|
|
1
|
+
{"version":3,"names":["NullCommandValue","command","getItems"],"sources":["NullCommandValue.ts"],"sourcesContent":["import type { ICommandValue } from \"~/sync/types.js\";\n\nexport class NullCommandValue implements ICommandValue {\n /**\n * Does not matter what will be here, we will not use it.\n */\n public readonly command = \"null\";\n\n public getItems(): null {\n return null;\n }\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAgB,CAA0B;EACnD;AACJ;AACA;EACoBC,OAAO,GAAG,MAAM;EAEzBC,QAAQA,CAAA,EAAS;IACpB,OAAO,IAAI;EACf;AACJ","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PutCommand } from "@webiny/aws-sdk/client-dynamodb";
|
|
2
|
-
import type { ICommandValue, ICommandValueItemExtended } from "
|
|
1
|
+
import type { PutCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import type { ICommandValue, ICommandValueItemExtended } from "../../../../sync/types.js";
|
|
3
3
|
import type { NonEmptyArray } from "@webiny/api/types.js";
|
|
4
4
|
export declare class PutCommandValue implements ICommandValue {
|
|
5
5
|
readonly command = "put";
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PutCommandValue = void 0;
|
|
7
|
-
var _getTableType = require("../../../utils/getTableType.js");
|
|
8
|
-
class PutCommandValue {
|
|
1
|
+
import { getTableType } from "../../../utils/getTableType.js";
|
|
2
|
+
export class PutCommandValue {
|
|
9
3
|
command = "put";
|
|
10
4
|
constructor(input) {
|
|
11
5
|
const tableName = input.input.TableName;
|
|
@@ -14,7 +8,7 @@ class PutCommandValue {
|
|
|
14
8
|
PK: input.input.Item.PK,
|
|
15
9
|
SK: input.input.Item.SK,
|
|
16
10
|
tableName,
|
|
17
|
-
tableType:
|
|
11
|
+
tableType: getTableType(tableName),
|
|
18
12
|
input
|
|
19
13
|
};
|
|
20
14
|
}
|
|
@@ -22,6 +16,5 @@ class PutCommandValue {
|
|
|
22
16
|
return [this.item];
|
|
23
17
|
}
|
|
24
18
|
}
|
|
25
|
-
exports.PutCommandValue = PutCommandValue;
|
|
26
19
|
|
|
27
20
|
//# sourceMappingURL=PutCommandValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getTableType","PutCommandValue","command","constructor","input","tableName","TableName","item","PK","Item","SK","tableType","getItems"],"sources":["PutCommandValue.ts"],"sourcesContent":["import type { PutCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandValue, ICommandValueItemExtended } from \"~/sync/types.js\";\nimport type { NonEmptyArray } from \"@webiny/api/types.js\";\nimport { getTableType } from \"~/sync/utils/getTableType.js\";\n\nexport class PutCommandValue implements ICommandValue {\n public readonly command = \"put\";\n public readonly item: ICommandValueItemExtended;\n\n public constructor(input: PutCommand) {\n const tableName = input.input.TableName as string;\n this.item = {\n command: this.command,\n PK: input.input.Item!.PK,\n SK: input.input.Item!.SK,\n tableName,\n tableType: getTableType(tableName),\n input\n };\n }\n\n public getItems(): NonEmptyArray<ICommandValueItemExtended> {\n return [this.item];\n }\n}\n"],"mappings":"AAGA,SAASA,YAAY;AAErB,OAAO,MAAMC,eAAe,CAA0B;EAClCC,OAAO,GAAG,KAAK;EAGxBC,WAAWA,CAACC,KAAiB,EAAE;IAClC,MAAMC,SAAS,GAAGD,KAAK,CAACA,KAAK,CAACE,SAAmB;IACjD,IAAI,CAACC,IAAI,GAAG;MACRL,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBM,EAAE,EAAEJ,KAAK,CAACA,KAAK,CAACK,IAAI,CAAED,EAAE;MACxBE,EAAE,EAAEN,KAAK,CAACA,KAAK,CAACK,IAAI,CAAEC,EAAE;MACxBL,SAAS;MACTM,SAAS,EAAEX,YAAY,CAACK,SAAS,CAAC;MAClCD;IACJ,CAAC;EACL;EAEOQ,QAAQA,CAAA,EAA6C;IACxD,OAAO,CAAC,IAAI,CAACL,IAAI,CAAC;EACtB;AACJ","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UpdateCommand } from "@webiny/aws-sdk/client-dynamodb";
|
|
2
|
-
import type { ICommandValue, ICommandValueItemExtended } from "
|
|
1
|
+
import type { UpdateCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
+
import type { ICommandValue, ICommandValueItemExtended } from "../../../../sync/types.js";
|
|
3
3
|
import type { NonEmptyArray } from "@webiny/api/types.js";
|
|
4
4
|
export declare class UpdateCommandValue implements ICommandValue {
|
|
5
5
|
readonly command = "update";
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UpdateCommandValue = void 0;
|
|
7
|
-
var _getTableType = require("../../../utils/getTableType.js");
|
|
8
|
-
class UpdateCommandValue {
|
|
1
|
+
import { getTableType } from "../../../utils/getTableType.js";
|
|
2
|
+
export class UpdateCommandValue {
|
|
9
3
|
command = "update";
|
|
10
4
|
constructor(input) {
|
|
11
5
|
const tableName = input.input.TableName;
|
|
@@ -14,7 +8,7 @@ class UpdateCommandValue {
|
|
|
14
8
|
PK: input.input.Key.PK,
|
|
15
9
|
SK: input.input.Key.SK,
|
|
16
10
|
tableName,
|
|
17
|
-
tableType:
|
|
11
|
+
tableType: getTableType(tableName),
|
|
18
12
|
input
|
|
19
13
|
};
|
|
20
14
|
}
|
|
@@ -22,6 +16,5 @@ class UpdateCommandValue {
|
|
|
22
16
|
return [this.item];
|
|
23
17
|
}
|
|
24
18
|
}
|
|
25
|
-
exports.UpdateCommandValue = UpdateCommandValue;
|
|
26
19
|
|
|
27
20
|
//# sourceMappingURL=UpdateCommandValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getTableType","UpdateCommandValue","command","constructor","input","tableName","TableName","item","PK","Key","SK","tableType","getItems"],"sources":["UpdateCommandValue.ts"],"sourcesContent":["import type { UpdateCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandValue, ICommandValueItemExtended } from \"~/sync/types.js\";\nimport type { NonEmptyArray } from \"@webiny/api/types.js\";\nimport { getTableType } from \"~/sync/utils/getTableType.js\";\n\nexport class UpdateCommandValue implements ICommandValue {\n public readonly command = \"update\";\n public readonly item: ICommandValueItemExtended;\n\n public constructor(input: UpdateCommand) {\n const tableName = input.input.TableName as string;\n this.item = {\n command: this.command,\n PK: input.input.Key!.PK,\n SK: input.input.Key!.SK,\n tableName,\n tableType: getTableType(tableName),\n input\n };\n }\n\n public getItems(): NonEmptyArray<ICommandValueItemExtended> {\n return [this.item];\n }\n}\n"],"mappings":"AAGA,SAASA,YAAY;AAErB,OAAO,MAAMC,kBAAkB,CAA0B;EACrCC,OAAO,GAAG,QAAQ;EAG3BC,WAAWA,CAACC,KAAoB,EAAE;IACrC,MAAMC,SAAS,GAAGD,KAAK,CAACA,KAAK,CAACE,SAAmB;IACjD,IAAI,CAACC,IAAI,GAAG;MACRL,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBM,EAAE,EAAEJ,KAAK,CAACA,KAAK,CAACK,GAAG,CAAED,EAAE;MACvBE,EAAE,EAAEN,KAAK,CAACA,KAAK,CAACK,GAAG,CAAEC,EAAE;MACvBL,SAAS;MACTM,SAAS,EAAEX,YAAY,CAACK,SAAS,CAAC;MAClCD;IACJ,CAAC;EACL;EAEOQ,QAAQA,CAAA,EAA6C;IACxD,OAAO,CAAC,IAAI,CAACL,IAAI,CAAC;EACtB;AACJ","ignoreList":[]}
|
package/sync/handler/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { NonEmptyArray } from "@webiny/api/types";
|
|
1
|
+
import type { NonEmptyArray } from "@webiny/api/types.js";
|
|
2
2
|
import type { DynamoDBTableType, ExtendedCommandType } from "../../types.js";
|
|
3
|
-
import type { ISystem } from "../types";
|
|
3
|
+
import type { ISystem } from "../types.js";
|
|
4
4
|
export interface IDetailItem {
|
|
5
5
|
PK: string;
|
|
6
6
|
SK: string;
|
|
7
7
|
command: ExtendedCommandType;
|
|
8
8
|
/**
|
|
9
|
-
* There will be multiple tables that will get populated through the system (regular table and
|
|
9
|
+
* There will be multiple tables that will get populated through the system (regular table and opensearch for start).
|
|
10
10
|
*/
|
|
11
11
|
tableName: string;
|
|
12
12
|
tableType: DynamoDBTableType;
|
package/sync/handler/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { NonEmptyArray } from \"@webiny/api/types\";\nimport type { DynamoDBTableType, ExtendedCommandType } from \"~/types.js\";\nimport type { ISystem } from \"../types\";\n\nexport interface IDetailItem {\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
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { NonEmptyArray } from \"@webiny/api/types.js\";\nimport type { DynamoDBTableType, ExtendedCommandType } from \"~/types.js\";\nimport type { ISystem } from \"../types.js\";\n\nexport interface IDetailItem {\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 opensearch for start).\n */\n tableName: string;\n tableType: DynamoDBTableType;\n}\n\nexport interface IDetail {\n items: NonEmptyArray<IDetailItem>;\n source: ISystem;\n id: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from "@webiny/plugins/Plugin.js";
|
|
2
|
-
import type { ICommandValueItemExtended } from "
|
|
2
|
+
import type { ICommandValueItemExtended } from "../../sync/types.js";
|
|
3
3
|
export interface IFilterOutRecordPluginCallable {
|
|
4
4
|
(record: ICommandValueItemExtended): boolean;
|
|
5
5
|
}
|