mcdev 6.0.2 → 7.0.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/.beautyamp.json +13 -0
- package/.eslintrc.json +7 -1
- package/.github/ISSUE_TEMPLATE/bug.yml +1 -0
- package/.github/PULL_REQUEST_TEMPLATE/pr_template_release.md +10 -3
- package/.github/workflows/close_issues_on_merge.yml +1 -1
- package/.github/workflows/code-test.yml +51 -3
- package/.github/workflows/coverage-base-update.yml +1 -1
- package/.github/workflows/coverage-develop-branch.yml +1 -1
- package/.github/workflows/coverage-main-branch.yml +1 -1
- package/.github/workflows/coverage.yml +2 -2
- package/.github/workflows/npm-publish.yml +3 -2
- package/.github/workflows/pr-labeler.yml +1 -1
- package/.husky/commit-msg +0 -2
- package/.husky/post-checkout +0 -3
- package/.husky/post-merge +2 -7
- package/.husky/pre-commit +5 -5
- package/.prettierrc +0 -8
- package/.vscode/extensions.json +2 -0
- package/.vscode/settings.json +15 -3
- package/@types/lib/Builder.d.ts +97 -0
- package/@types/lib/Builder.d.ts.map +1 -0
- package/@types/lib/Deployer.d.ts +99 -0
- package/@types/lib/Deployer.d.ts.map +1 -0
- package/@types/lib/MetadataTypeDefinitions.d.ts +80 -0
- package/@types/lib/MetadataTypeDefinitions.d.ts.map +1 -0
- package/@types/lib/MetadataTypeInfo.d.ts +78 -0
- package/@types/lib/MetadataTypeInfo.d.ts.map +1 -0
- package/@types/lib/Retriever.d.ts +66 -0
- package/@types/lib/Retriever.d.ts.map +1 -0
- package/@types/lib/cli.d.ts +3 -0
- package/@types/lib/cli.d.ts.map +1 -0
- package/@types/lib/index.d.ts +383 -0
- package/@types/lib/index.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Asset.d.ts +1082 -0
- package/@types/lib/metadataTypes/Asset.d.ts.map +1 -0
- package/@types/lib/metadataTypes/AttributeGroup.d.ts +290 -0
- package/@types/lib/metadataTypes/AttributeGroup.d.ts.map +1 -0
- package/@types/lib/metadataTypes/AttributeSet.d.ts +968 -0
- package/@types/lib/metadataTypes/AttributeSet.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Automation.d.ts +921 -0
- package/@types/lib/metadataTypes/Automation.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Campaign.d.ts +190 -0
- package/@types/lib/metadataTypes/Campaign.d.ts.map +1 -0
- package/@types/lib/metadataTypes/ContentArea.d.ts +250 -0
- package/@types/lib/metadataTypes/ContentArea.d.ts.map +1 -0
- package/@types/lib/metadataTypes/DataExtension.d.ts +571 -0
- package/@types/lib/metadataTypes/DataExtension.d.ts.map +1 -0
- package/@types/lib/metadataTypes/DataExtensionField.d.ts +236 -0
- package/@types/lib/metadataTypes/DataExtensionField.d.ts.map +1 -0
- package/@types/lib/metadataTypes/DataExtensionTemplate.d.ts +175 -0
- package/@types/lib/metadataTypes/DataExtensionTemplate.d.ts.map +1 -0
- package/@types/lib/metadataTypes/DataExtract.d.ts +217 -0
- package/@types/lib/metadataTypes/DataExtract.d.ts.map +1 -0
- package/@types/lib/metadataTypes/DataExtractType.d.ts +80 -0
- package/@types/lib/metadataTypes/DataExtractType.d.ts.map +1 -0
- package/@types/lib/metadataTypes/DeliveryProfile.d.ts +102 -0
- package/@types/lib/metadataTypes/DeliveryProfile.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Discovery.d.ts +189 -0
- package/@types/lib/metadataTypes/Discovery.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Email.d.ts +384 -0
- package/@types/lib/metadataTypes/Email.d.ts.map +1 -0
- package/@types/lib/metadataTypes/EmailSend.d.ts +652 -0
- package/@types/lib/metadataTypes/EmailSend.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Event.d.ts +958 -0
- package/@types/lib/metadataTypes/Event.d.ts.map +1 -0
- package/@types/lib/metadataTypes/FileLocation.d.ts +101 -0
- package/@types/lib/metadataTypes/FileLocation.d.ts.map +1 -0
- package/@types/lib/metadataTypes/FileTransfer.d.ts +228 -0
- package/@types/lib/metadataTypes/FileTransfer.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Filter.d.ts +145 -0
- package/@types/lib/metadataTypes/Filter.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Folder.d.ts +287 -0
- package/@types/lib/metadataTypes/Folder.d.ts.map +1 -0
- package/@types/lib/metadataTypes/ImportFile.d.ts +409 -0
- package/@types/lib/metadataTypes/ImportFile.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Journey.d.ts +541 -0
- package/@types/lib/metadataTypes/Journey.d.ts.map +1 -0
- package/@types/lib/metadataTypes/List.d.ts +191 -0
- package/@types/lib/metadataTypes/List.d.ts.map +1 -0
- package/@types/lib/metadataTypes/MetadataType.d.ts +680 -0
- package/@types/lib/metadataTypes/MetadataType.d.ts.map +1 -0
- package/@types/lib/metadataTypes/MobileCode.d.ts +225 -0
- package/@types/lib/metadataTypes/MobileCode.d.ts.map +1 -0
- package/@types/lib/metadataTypes/MobileKeyword.d.ts +432 -0
- package/@types/lib/metadataTypes/MobileKeyword.d.ts.map +1 -0
- package/@types/lib/metadataTypes/MobileMessage.d.ts +931 -0
- package/@types/lib/metadataTypes/MobileMessage.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Query.d.ts +299 -0
- package/@types/lib/metadataTypes/Query.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Role.d.ts +164 -0
- package/@types/lib/metadataTypes/Role.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Script.d.ts +305 -0
- package/@types/lib/metadataTypes/Script.d.ts.map +1 -0
- package/@types/lib/metadataTypes/SendClassification.d.ts +221 -0
- package/@types/lib/metadataTypes/SendClassification.d.ts.map +1 -0
- package/@types/lib/metadataTypes/SenderProfile.d.ts +257 -0
- package/@types/lib/metadataTypes/SenderProfile.d.ts.map +1 -0
- package/@types/lib/metadataTypes/TransactionalEmail.d.ts +230 -0
- package/@types/lib/metadataTypes/TransactionalEmail.d.ts.map +1 -0
- package/@types/lib/metadataTypes/TransactionalMessage.d.ts +163 -0
- package/@types/lib/metadataTypes/TransactionalMessage.d.ts.map +1 -0
- package/@types/lib/metadataTypes/TransactionalPush.d.ts +175 -0
- package/@types/lib/metadataTypes/TransactionalPush.d.ts.map +1 -0
- package/@types/lib/metadataTypes/TransactionalSMS.d.ts +205 -0
- package/@types/lib/metadataTypes/TransactionalSMS.d.ts.map +1 -0
- package/@types/lib/metadataTypes/TriggeredSend.d.ts +671 -0
- package/@types/lib/metadataTypes/TriggeredSend.d.ts.map +1 -0
- package/@types/lib/metadataTypes/User.d.ts +677 -0
- package/@types/lib/metadataTypes/User.d.ts.map +1 -0
- package/@types/lib/metadataTypes/Verification.d.ts +188 -0
- package/@types/lib/metadataTypes/Verification.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Asset.definition.d.ts +692 -0
- package/@types/lib/metadataTypes/definitions/Asset.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/AttributeGroup.definition.d.ts +246 -0
- package/@types/lib/metadataTypes/definitions/AttributeGroup.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/AttributeSet.definition.d.ts +893 -0
- package/@types/lib/metadataTypes/definitions/AttributeSet.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Automation.definition.d.ts +616 -0
- package/@types/lib/metadataTypes/definitions/Automation.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Campaign.definition.d.ts +126 -0
- package/@types/lib/metadataTypes/definitions/Campaign.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/ContentArea.definition.d.ts +182 -0
- package/@types/lib/metadataTypes/definitions/ContentArea.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/DataExtension.definition.d.ts +237 -0
- package/@types/lib/metadataTypes/definitions/DataExtension.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/DataExtensionField.definition.d.ts +121 -0
- package/@types/lib/metadataTypes/definitions/DataExtensionField.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/DataExtensionTemplate.definition.d.ts +133 -0
- package/@types/lib/metadataTypes/definitions/DataExtensionTemplate.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/DataExtract.definition.d.ts +156 -0
- package/@types/lib/metadataTypes/definitions/DataExtract.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/DataExtractType.definition.d.ts +34 -0
- package/@types/lib/metadataTypes/definitions/DataExtractType.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/DeliveryProfile.definition.d.ts +80 -0
- package/@types/lib/metadataTypes/definitions/DeliveryProfile.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Discovery.definition.d.ts +146 -0
- package/@types/lib/metadataTypes/definitions/Discovery.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Email.definition.d.ts +314 -0
- package/@types/lib/metadataTypes/definitions/Email.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/EmailSend.definition.d.ts +582 -0
- package/@types/lib/metadataTypes/definitions/EmailSend.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Event.definition.d.ts +867 -0
- package/@types/lib/metadataTypes/definitions/Event.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/FileLocation.definition.d.ts +68 -0
- package/@types/lib/metadataTypes/definitions/FileLocation.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/FileTransfer.definition.d.ts +191 -0
- package/@types/lib/metadataTypes/definitions/FileTransfer.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Filter.definition.d.ts +147 -0
- package/@types/lib/metadataTypes/definitions/Filter.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Folder.definition.d.ts +174 -0
- package/@types/lib/metadataTypes/definitions/Folder.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/ImportFile.definition.d.ts +306 -0
- package/@types/lib/metadataTypes/definitions/ImportFile.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Journey.definition.d.ts +426 -0
- package/@types/lib/metadataTypes/definitions/Journey.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/List.definition.d.ts +118 -0
- package/@types/lib/metadataTypes/definitions/List.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/MobileCode.definition.d.ts +167 -0
- package/@types/lib/metadataTypes/definitions/MobileCode.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/MobileKeyword.definition.d.ts +276 -0
- package/@types/lib/metadataTypes/definitions/MobileKeyword.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/MobileMessage.definition.d.ts +783 -0
- package/@types/lib/metadataTypes/definitions/MobileMessage.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Query.definition.d.ts +203 -0
- package/@types/lib/metadataTypes/definitions/Query.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Role.definition.d.ts +108 -0
- package/@types/lib/metadataTypes/definitions/Role.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Script.definition.d.ts +153 -0
- package/@types/lib/metadataTypes/definitions/Script.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/SendClassification.definition.d.ts +151 -0
- package/@types/lib/metadataTypes/definitions/SendClassification.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/SenderProfile.definition.d.ts +180 -0
- package/@types/lib/metadataTypes/definitions/SenderProfile.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/TransactionalEmail.definition.d.ts +167 -0
- package/@types/lib/metadataTypes/definitions/TransactionalEmail.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/TransactionalMessage.definition.d.ts +99 -0
- package/@types/lib/metadataTypes/definitions/TransactionalMessage.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/TransactionalPush.definition.d.ts +119 -0
- package/@types/lib/metadataTypes/definitions/TransactionalPush.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/TransactionalSMS.definition.d.ts +113 -0
- package/@types/lib/metadataTypes/definitions/TransactionalSMS.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/TriggeredSend.definition.d.ts +560 -0
- package/@types/lib/metadataTypes/definitions/TriggeredSend.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/User.definition.d.ts +423 -0
- package/@types/lib/metadataTypes/definitions/User.definition.d.ts.map +1 -0
- package/@types/lib/metadataTypes/definitions/Verification.definition.d.ts +129 -0
- package/@types/lib/metadataTypes/definitions/Verification.definition.d.ts.map +1 -0
- package/@types/lib/retrieveChangelog.d.ts +3 -0
- package/@types/lib/retrieveChangelog.d.ts.map +1 -0
- package/@types/lib/util/auth.d.ts +41 -0
- package/@types/lib/util/auth.d.ts.map +1 -0
- package/@types/lib/util/businessUnit.d.ts +21 -0
- package/@types/lib/util/businessUnit.d.ts.map +1 -0
- package/@types/lib/util/cache.d.ts +64 -0
- package/@types/lib/util/cache.d.ts.map +1 -0
- package/@types/lib/util/cli.d.ts +125 -0
- package/@types/lib/util/cli.d.ts.map +1 -0
- package/@types/lib/util/config.d.ts +45 -0
- package/@types/lib/util/config.d.ts.map +1 -0
- package/@types/lib/util/devops.d.ts +62 -0
- package/@types/lib/util/devops.d.ts.map +1 -0
- package/@types/lib/util/file.d.ts +20 -0
- package/@types/lib/util/file.d.ts.map +1 -0
- package/@types/lib/util/init.config.d.ts +66 -0
- package/@types/lib/util/init.config.d.ts.map +1 -0
- package/@types/lib/util/init.d.ts +72 -0
- package/@types/lib/util/init.d.ts.map +1 -0
- package/@types/lib/util/init.git.d.ts +40 -0
- package/@types/lib/util/init.git.d.ts.map +1 -0
- package/@types/lib/util/init.npm.d.ts +24 -0
- package/@types/lib/util/init.npm.d.ts.map +1 -0
- package/@types/lib/util/replaceContentBlockReference.d.ts +105 -0
- package/@types/lib/util/replaceContentBlockReference.d.ts.map +1 -0
- package/@types/lib/util/util.d.ts +322 -0
- package/@types/lib/util/util.d.ts.map +1 -0
- package/@types/types/mcdev.d.d.ts +1282 -0
- package/@types/types/mcdev.d.d.ts.map +1 -0
- package/LICENSE +1 -1
- package/README.md +7 -3
- package/boilerplate/files/.beautyamp.json +13 -0
- package/boilerplate/files/.prettierrc +3 -0
- package/boilerplate/files/.vscode/extensions.json +6 -1
- package/boilerplate/files/.vscode/settings.json +16 -4
- package/boilerplate/forcedUpdates.json +9 -0
- package/jsconfig.json +7 -2
- package/lib/Builder.js +49 -45
- package/lib/Deployer.js +100 -45
- package/lib/MetadataTypeDefinitions.js +6 -0
- package/lib/MetadataTypeInfo.js +4 -0
- package/lib/Retriever.js +33 -27
- package/lib/cli.js +363 -28
- package/lib/index.js +615 -55
- package/lib/metadataTypes/Asset.js +811 -159
- package/lib/metadataTypes/AttributeGroup.js +17 -12
- package/lib/metadataTypes/AttributeSet.js +20 -15
- package/lib/metadataTypes/Automation.js +125 -93
- package/lib/metadataTypes/Campaign.js +18 -6
- package/lib/metadataTypes/ContentArea.js +21 -18
- package/lib/metadataTypes/DataExtension.js +229 -113
- package/lib/metadataTypes/DataExtensionField.js +52 -53
- package/lib/metadataTypes/DataExtensionTemplate.js +17 -5
- package/lib/metadataTypes/DataExtract.js +62 -27
- package/lib/metadataTypes/DataExtractType.js +17 -5
- package/lib/metadataTypes/DeliveryProfile.js +47 -0
- package/lib/metadataTypes/Discovery.js +15 -4
- package/lib/metadataTypes/Email.js +22 -19
- package/lib/metadataTypes/EmailSend.js +135 -35
- package/lib/metadataTypes/Event.js +95 -60
- package/lib/metadataTypes/FileLocation.js +17 -5
- package/lib/metadataTypes/FileTransfer.js +62 -26
- package/lib/metadataTypes/Filter.js +16 -4
- package/lib/metadataTypes/Folder.js +67 -39
- package/lib/metadataTypes/ImportFile.js +341 -91
- package/lib/metadataTypes/Journey.js +681 -324
- package/lib/metadataTypes/List.js +26 -14
- package/lib/metadataTypes/MetadataType.js +501 -265
- package/lib/metadataTypes/MobileCode.js +17 -5
- package/lib/metadataTypes/MobileKeyword.js +59 -43
- package/lib/metadataTypes/MobileMessage.js +67 -40
- package/lib/metadataTypes/Query.js +46 -38
- package/lib/metadataTypes/Role.js +34 -23
- package/lib/metadataTypes/Script.js +127 -39
- package/lib/metadataTypes/SendClassification.js +120 -5
- package/lib/metadataTypes/SenderProfile.js +179 -0
- package/lib/metadataTypes/TransactionalEmail.js +30 -17
- package/lib/metadataTypes/TransactionalMessage.js +25 -11
- package/lib/metadataTypes/TransactionalPush.js +24 -9
- package/lib/metadataTypes/TransactionalSMS.js +78 -46
- package/lib/metadataTypes/TriggeredSend.js +191 -43
- package/lib/metadataTypes/User.js +90 -62
- package/lib/metadataTypes/Verification.js +39 -21
- package/lib/metadataTypes/definitions/Asset.definition.js +3 -3
- package/lib/metadataTypes/definitions/AttributeGroup.definition.js +7 -1
- package/lib/metadataTypes/definitions/AttributeSet.definition.js +2 -2
- package/lib/metadataTypes/definitions/Automation.definition.js +4 -1
- package/lib/metadataTypes/definitions/Campaign.definition.js +1 -1
- package/lib/metadataTypes/definitions/ContentArea.definition.js +1 -1
- package/lib/metadataTypes/definitions/DataExtension.definition.js +17 -1
- package/lib/metadataTypes/definitions/DataExtensionTemplate.definition.js +1 -1
- package/lib/metadataTypes/definitions/DataExtractType.definition.js +2 -2
- package/lib/metadataTypes/definitions/DeliveryProfile.definition.js +59 -0
- package/lib/metadataTypes/definitions/Discovery.definition.js +1 -1
- package/lib/metadataTypes/definitions/Email.definition.js +1 -1
- package/lib/metadataTypes/definitions/EmailSend.definition.js +19 -4
- package/lib/metadataTypes/definitions/Event.definition.js +140 -128
- package/lib/metadataTypes/definitions/FileLocation.definition.js +1 -1
- package/lib/metadataTypes/definitions/Filter.definition.js +1 -1
- package/lib/metadataTypes/definitions/Folder.definition.js +25 -2
- package/lib/metadataTypes/definitions/ImportFile.definition.js +52 -7
- package/lib/metadataTypes/definitions/Journey.definition.js +12 -0
- package/lib/metadataTypes/definitions/List.definition.js +1 -1
- package/lib/metadataTypes/definitions/MobileCode.definition.js +1 -1
- package/lib/metadataTypes/definitions/MobileMessage.definition.js +11 -5
- package/lib/metadataTypes/definitions/Query.definition.js +6 -0
- package/lib/metadataTypes/definitions/Script.definition.js +14 -14
- package/lib/metadataTypes/definitions/SendClassification.definition.js +60 -20
- package/lib/metadataTypes/definitions/SenderProfile.definition.js +185 -0
- package/lib/metadataTypes/definitions/TransactionalEmail.definition.js +2 -2
- package/lib/metadataTypes/definitions/TransactionalMessage.definition.js +69 -0
- package/lib/metadataTypes/definitions/TransactionalPush.definition.js +6 -0
- package/lib/metadataTypes/definitions/TransactionalSMS.definition.js +6 -0
- package/lib/metadataTypes/definitions/TriggeredSend.definition.js +15 -4
- package/lib/metadataTypes/definitions/Verification.definition.js +1 -1
- package/lib/retrieveChangelog.js +7 -2
- package/lib/util/auth.js +56 -21
- package/lib/util/businessUnit.js +20 -2
- package/lib/util/cache.js +37 -18
- package/lib/util/cli.js +72 -29
- package/lib/util/config.js +27 -9
- package/lib/util/devops.js +45 -24
- package/lib/util/file.js +58 -33
- package/lib/util/init.config.js +55 -24
- package/lib/util/init.git.js +6 -6
- package/lib/util/init.js +36 -14
- package/lib/util/init.npm.js +2 -2
- package/lib/util/replaceContentBlockReference.js +278 -0
- package/lib/util/util.js +152 -54
- package/package.json +33 -30
- package/test/general.test.js +1327 -4
- package/test/mockRoot/.mcdevrc.json +26 -4
- package/test/mockRoot/deploy/testInstance/_ParentBU_/dataExtension/testExisting_dataExtensionShared.dataExtension-meta.json +3 -4
- package/test/mockRoot/deploy/testInstance/_ParentBU_/dataExtension/testNew_dataExtensionShared.dataExtension-meta.json +1 -4
- package/test/mockRoot/deploy/testInstance/_ParentBU_/query/testNew_query.query-meta.json +11 -0
- package/test/mockRoot/deploy/testInstance/_ParentBU_/query/testNew_query.query-meta.sql +4 -0
- package/test/mockRoot/deploy/testInstance/testBU/asset/block/testNew_asset.asset-block-meta.html +12 -0
- package/test/mockRoot/deploy/testInstance/testBU/asset/block/testNew_asset.asset-block-meta.json +39 -0
- package/test/mockRoot/deploy/testInstance/testBU/automation/testExisting_automation.automation-meta.json +6 -6
- package/test/mockRoot/deploy/testInstance/testBU/automation/testNew_automation.automation-meta.json +7 -7
- package/test/mockRoot/deploy/testInstance/testBU/dataExtension/testExisting_dataExtension.dataExtension-meta.json +3 -4
- package/test/mockRoot/deploy/testInstance/testBU/dataExtension/testNew_dataExtension.dataExtension-meta.json +1 -4
- package/test/mockRoot/deploy/testInstance/testBU/emailSend/testExisting_emailSend.emailSend-meta.json +36 -0
- package/test/mockRoot/deploy/testInstance/testBU/emailSend/testNew_emailSend.emailSend-meta.json +36 -0
- package/test/mockRoot/deploy/testInstance/testBU/importFile/testExisting_importFile.importFile-meta.json +10 -4
- package/test/mockRoot/deploy/testInstance/testBU/importFile/testNew_importFile.importFile-meta.json +8 -4
- package/test/mockRoot/deploy/testInstance/testBU/journey/testExisting_journey_Quicksend.journey-meta.json +232 -0
- package/test/mockRoot/deploy/testInstance/testBU/mobileMessage/NTIzOjc4OjA.mobileMessage-meta.json +2 -4
- package/test/mockRoot/deploy/testInstance/testBU/mobileMessage/new.mobileMessage-meta.json +2 -4
- package/test/mockRoot/deploy/testInstance/testBU/query/testExisting_query.query-meta.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/query/testExisting_query_fixKeys.query-meta.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/query/testNew_query.query-meta.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/sendClassification/testExisting_sendClassification.sendClassification-meta.json +8 -0
- package/test/mockRoot/deploy/testInstance/testBU/sendClassification/testNew_sendClassification.sendClassification-meta.json +8 -0
- package/test/mockRoot/deploy/testInstance/testBU/senderProfile/testExisting_senderProfile.senderProfile-meta.json +14 -0
- package/test/mockRoot/deploy/testInstance/testBU/senderProfile/testNew_senderProfile.senderProfile-meta.json +14 -0
- package/test/mockRoot/deploy/testInstance/testBU/transactionalEmail/testExisting_temail.transactionalEmail-meta.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/transactionalEmail/testNew_temail.transactionalEmail-meta.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/transactionalPush/testExisting_tpush.transactionalPush-meta.json +1 -3
- package/test/mockRoot/deploy/testInstance/testBU/transactionalPush/testNew_tpush.transactionalPush-meta.json +1 -3
- package/test/mockRoot/deploy/testInstance/testBU/transactionalSMS/testExisting_tsms.transactionalSMS-meta.json +1 -2
- package/test/mockRoot/deploy/testInstance/testBU/transactionalSMS/testNew_tsms.transactionalSMS-meta.json +1 -2
- package/test/mockRoot/deploy/testInstance/testBU/triggeredSend/testExisting_triggeredSend.triggeredSend-meta.json +4 -5
- package/test/mockRoot/deploy/testInstance/testBU/triggeredSend/testNew_triggeredSend.triggeredSend-meta.json +4 -5
- package/test/mockRoot/deploy/testInstance/testBU/verification/testExisting_39f6a488-20eb-4ba0-b0b9.verification-meta.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/verification/testNew_39f6a488-20eb-4ba0-b0b9.verification-meta.json +1 -1
- package/test/resourceFactory.js +118 -7
- package/test/resources/1111111/automation/v1/queries/get-response.json +6 -0
- package/test/resources/1111111/automation/v1/queries/post-response.json +18 -0
- package/test/resources/1111111/dataExtension/create-expected.json +4 -7
- package/test/resources/1111111/dataExtension/retrieve-expected.json +2 -4
- package/test/resources/1111111/dataExtension/update-expected.json +7 -7
- package/test/resources/1111111/dataExtension/update-response.xml +3 -1
- package/test/resources/1111111/dataFolder/retrieve-ContentType=queryactivity-response.xml +48 -0
- package/test/resources/1111111/query/patch_keySuffix-expected.json +11 -0
- package/test/resources/1111111/query/patch_keySuffix-expected.sql +4 -0
- package/test/resources/9999999/asset/block-1157-retrieve-expected.html +4 -3
- package/test/resources/9999999/asset/build-templatebasedemail-expected.json +81 -0
- package/test/resources/9999999/asset/build-templatebasedemail-html-expected.html +20 -0
- package/test/resources/9999999/asset/build-templatebasedemail-preheader-expected.amp +1 -0
- package/test/resources/9999999/asset/create-expected.json +18 -0
- package/test/resources/9999999/asset/resolveId-1234-notFound-expected.json +1 -0
- package/test/resources/9999999/asset/resolveId-1295064-noPath-expected.json +8 -0
- package/test/resources/9999999/asset/resolveId-1295064-withPath-expected.json +8 -0
- package/test/resources/9999999/asset/retrieve-templatebasedemail-expected.json +84 -0
- package/test/resources/9999999/asset/retrieve-templatebasedemail-html-expected.html +20 -0
- package/test/resources/9999999/asset/retrieve-templatebasedemail-preheader-expected.amp +1 -0
- package/test/resources/9999999/asset/template-templatebasedemail-expected.json +81 -0
- package/test/resources/9999999/asset/template-templatebasedemail-html-expected.html +20 -0
- package/test/resources/9999999/asset/template-templatebasedemail-preheader-expected.amp +1 -0
- package/test/resources/9999999/asset/testExisting_asset_message-html-rcb-id-expected.html +33 -0
- package/test/resources/9999999/asset/testExisting_asset_message-html-rcb-key-expected.html +33 -0
- package/test/resources/9999999/asset/testExisting_asset_message-html-rcb-name-expected.html +35 -0
- package/test/resources/9999999/asset/testExisting_asset_message-preheader-rcb-id-expected.amp +4 -0
- package/test/resources/9999999/asset/testExisting_asset_message-preheader-rcb-key-expected.amp +4 -0
- package/test/resources/9999999/asset/testExisting_asset_message-preheader-rcb-name-expected.amp +4 -0
- package/test/resources/9999999/asset/testExisting_asset_message-text-rcb-id-expected.amp +4 -0
- package/test/resources/9999999/asset/testExisting_asset_message-text-rcb-key-expected.amp +4 -0
- package/test/resources/9999999/asset/testExisting_asset_message-text-rcb-name-expected.amp +4 -0
- package/test/resources/9999999/asset/v1/content/assets/1295064/get-response.json +1 -1
- package/test/resources/9999999/asset/v1/content/assets/5286/get-response.json +48 -0
- package/test/resources/9999999/asset/v1/content/assets/5289/get-response.json +198 -0
- package/test/resources/9999999/asset/v1/content/assets/808714/get-response.json +4 -3
- package/test/resources/9999999/asset/v1/content/assets/950143/delete-response.txt +1 -0
- package/test/resources/9999999/asset/v1/content/assets/get-response-customerKey=testExisting_asset.json +105 -0
- package/test/resources/9999999/asset/v1/content/assets/post-response.json +59 -0
- package/test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,14.json +7 -0
- package/test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN193,194,15.json +7 -0
- package/test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN195,196,197,198,199,200,201,202,203,210,211,212,213,3.json +46 -0
- package/test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN205,206,230,232,1.json +32 -0
- package/test/resources/9999999/asset/v1/content/assets/query/{post-response.json → post-response-assetType.idIN207,208,209,5.json} +45 -47
- package/test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN214,4.json +35 -0
- package/test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN215,216,217,218,219,220,221,222,223,224,225,226,227,228.json +7 -0
- package/test/resources/9999999/asset/v1/content/assets/query/post-response-customerKey=mcdev-issue-1157.json +46 -0
- package/test/resources/9999999/attributeGroup/retrieve-expected.json +1 -1
- package/test/resources/9999999/attributeSet/retrieve-expected.json +3 -3
- package/test/resources/9999999/automation/build-expected.json +7 -7
- package/test/resources/9999999/automation/create-expected.json +7 -7
- package/test/resources/9999999/automation/patch_fixKeys-pause-expected.json +6 -6
- package/test/resources/9999999/automation/patch_fixKeys-schedule-expected.json +6 -6
- package/test/resources/9999999/automation/retrieve-expected.json +7 -7
- package/test/resources/9999999/automation/template-expected.json +7 -7
- package/test/resources/9999999/automation/update-expected.json +6 -6
- package/test/resources/9999999/automation/v1/dataextracts/56c5370a-f988-4f36-b0ee-0f876573f6d7/delete-response.txt +1 -0
- package/test/resources/9999999/automation/v1/filetransfers/72c328ac-f5b0-4e37-91d3-a775666f15a6/delete-response.json +1 -0
- package/test/resources/9999999/automation/v1/imports/1ebf557b-372e-eb11-b81b-48df37d1dbd7/get-response.json +78 -0
- package/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b/delete-response.txt +0 -0
- package/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b/get-response.json +35 -0
- package/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b/patch-response.json +14 -10
- package/test/resources/9999999/automation/v1/imports/get-response.json +78 -1
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat/get-response.json +1 -1
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat_fixKeysSuffix/get-response.json +17 -0
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat_fixKeysSuffix/patch-response.json +18 -0
- package/test/resources/9999999/automation/v1/queries/abcde-607c-4940-afef-437965094dat/get-response.json +17 -0
- package/test/resources/9999999/automation/v1/queries/get-response.json +20 -3
- package/test/resources/9999999/automation/v1/scripts/39f6a488-20eb-4ba0-b0b9-023725b574e4/delete-response.txt +1 -0
- package/test/resources/9999999/automation/v1/scripts/get-response.json +3 -3
- package/test/resources/9999999/dataExtension/build-expected.json +3 -4
- package/test/resources/9999999/dataExtension/create-expected.json +1 -4
- package/test/resources/9999999/dataExtension/retrieve-Name=testExisting_dataExtension-response.xml +4 -4
- package/test/resources/9999999/dataExtension/retrieve-expected.json +3 -4
- package/test/resources/9999999/dataExtension/retrieve-response.xml +96 -1
- package/test/resources/9999999/dataExtension/template-expected.json +3 -4
- package/test/resources/9999999/dataExtension/update-expected.json +4 -3
- package/test/resources/9999999/dataExtension/update-response.xml +5 -3
- package/test/resources/9999999/dataExtensionField/retrieve-response.xml +72 -0
- package/test/resources/9999999/dataFolder/retrieve-ContentType=userinitiatedsends-response.xml +48 -0
- package/test/resources/9999999/deliveryProfile/get-expected.json +7 -0
- package/test/resources/9999999/emailSend/build-expected.json +43 -0
- package/test/resources/9999999/emailSend/get-expected.json +43 -0
- package/test/resources/9999999/emailSend/patch-expected.json +41 -0
- package/test/resources/9999999/emailSend/post-expected.json +41 -0
- package/test/resources/9999999/emailSend/template-expected.json +43 -0
- package/test/resources/9999999/emailSendDefinition/create-response.xml +98 -0
- package/test/resources/9999999/emailSendDefinition/delete-response.xml +36 -0
- package/test/resources/9999999/emailSendDefinition/retrieve-IsPlatformObject=falseANDDescriptionnotEqualsSFSendDefinition-response.xml +18 -8
- package/test/resources/9999999/emailSendDefinition/update-response.xml +97 -0
- package/test/resources/9999999/importDefinition/retrieve-CustomerKey=testExisting_importFile-response.xml +30 -0
- package/test/resources/9999999/importDefinition/retrieve-Name=testExisting_importFile-response.xml +30 -0
- package/test/resources/9999999/importFile/build-expected.json +11 -6
- package/test/resources/9999999/importFile/get-expected.json +13 -7
- package/test/resources/9999999/importFile/get-sms-expected.json +79 -0
- package/test/resources/9999999/importFile/patch-expected.json +12 -7
- package/test/resources/9999999/importFile/post-expected.json +8 -5
- package/test/resources/9999999/importFile/template-expected.json +10 -5
- package/test/resources/9999999/interaction/v1/eventDefinitions/get-response.json +124 -0
- package/test/resources/9999999/interaction/v1/interactions/3c3f4112-9b43-43ca-8a89-aa0375b2c1a2/delete-response.txt +1 -0
- package/test/resources/9999999/interaction/v1/interactions/3c3f4112-9b43-43ca-8a89-aa0375b2c1a2/get-response.json +253 -0
- package/test/resources/9999999/interaction/v1/interactions/get-response.json +83 -779
- package/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_Multistep/get-response.json +457 -0
- package/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_Quicksend/get-response.json +253 -0
- package/test/resources/9999999/interaction/v1/interactions/{key_0b76dccf-594c-b6dc-1acf-10c4493dcb84 → key_testExisting_temail}/get-response.json +5 -5
- package/test/resources/9999999/journey/build-expected.json +105 -449
- package/test/resources/9999999/journey/get-multistep-expected.json +413 -0
- package/test/resources/9999999/journey/get-quicksend-expected.json +232 -0
- package/test/resources/9999999/journey/get-quicksend-rcb-id-expected.json +232 -0
- package/test/resources/9999999/journey/get-quicksend-rcb-key-expected.json +232 -0
- package/test/resources/9999999/journey/get-quicksend-rcb-name-expected.json +232 -0
- package/test/resources/9999999/journey/get-transactionalEmail-expected.json +211 -0
- package/test/resources/9999999/journey/template-expected.json +105 -449
- package/test/resources/9999999/legacy/v1/beta/messaging/deliverypolicy/get-response.json +15 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/imports/get-response.json +112 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/message/NTQ3Ojc4OjA/get-response.json +1 -1
- package/test/resources/9999999/legacy/v1/beta/object/NWQwdnhEU3dFZWVBekJRQzdISWl0QTo0NTow/get-response.json +12 -0
- package/test/resources/9999999/list/retrieve-response.xml +13 -0
- package/test/resources/9999999/messaging/v1/email/definitions/testExisting_temail/get-response.json +1 -1
- package/test/resources/9999999/messaging/v1/email/definitions/testExisting_temail/patch-response.json +1 -1
- package/test/resources/9999999/mobileMessage/build-expected.json +2 -5
- package/test/resources/9999999/mobileMessage/get-expected.json +2 -5
- package/test/resources/9999999/mobileMessage/post-create-expected.json +2 -4
- package/test/resources/9999999/mobileMessage/post-update-expected.json +2 -5
- package/test/resources/9999999/mobileMessage/template-expected.json +2 -5
- package/test/resources/9999999/query/build-expected.json +1 -1
- package/test/resources/9999999/query/build-expected.sql +2 -1
- package/test/resources/9999999/query/get-expected.json +1 -1
- package/test/resources/9999999/query/get-expected.sql +2 -1
- package/test/resources/9999999/query/get2-expected.json +1 -1
- package/test/resources/9999999/query/patch-expected.json +1 -1
- package/test/resources/9999999/query/patch_fixKeys-expected.json +1 -1
- package/test/resources/9999999/query/patch_fixKeysSuffix-expected.json +11 -0
- package/test/resources/9999999/query/patch_fixKeysSuffix-expected.sql +6 -0
- package/test/resources/9999999/query/post-expected.json +1 -1
- package/test/resources/9999999/query/template-expected.json +1 -1
- package/test/resources/9999999/query/template-expected.sql +2 -1
- package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testExisting_query2ANDStatus=Active-response.xml +30 -0
- package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testExisting_query_fixKeysSuffixANDStatus=Active-response.xml +30 -0
- package/test/resources/9999999/script/get_ampincluded-expected.html +5 -0
- package/test/resources/9999999/script/get_ampincluded-rcb-id-expected.html +5 -0
- package/test/resources/9999999/script/get_ampincluded-rcb-key-expected.html +5 -0
- package/test/resources/9999999/script/get_ampincluded-rcb-name-expected.html +5 -0
- package/test/resources/9999999/script/get_ampscript-expected.html +6 -1
- package/test/resources/9999999/script/get_ampscript-rcb-id-expected.html +8 -0
- package/test/resources/9999999/script/get_ampscript-rcb-key-expected.html +8 -0
- package/test/resources/9999999/script/get_ampscript-rcb-name-expected.html +10 -0
- package/test/resources/9999999/script/get_mixed-expected.html +5 -2
- package/test/resources/9999999/script/get_mixed-rcb-id-expected.html +12 -0
- package/test/resources/9999999/script/get_mixed-rcb-key-expected.html +12 -0
- package/test/resources/9999999/script/get_mixed-rcb-name-expected.html +14 -0
- package/test/resources/9999999/sendClassification/build-expected.json +8 -0
- package/test/resources/9999999/sendClassification/create-response.xml +51 -0
- package/test/resources/9999999/sendClassification/delete-response.xml +36 -0
- package/test/resources/9999999/sendClassification/get-expected.json +10 -0
- package/test/resources/9999999/sendClassification/patch-expected.json +8 -0
- package/test/resources/9999999/sendClassification/post-expected.json +8 -0
- package/test/resources/9999999/sendClassification/retrieve-response.xml +86 -0
- package/test/resources/9999999/sendClassification/template-expected.json +8 -0
- package/test/resources/9999999/sendClassification/update-response.xml +49 -0
- package/test/resources/9999999/senderProfile/build-expected.json +14 -0
- package/test/resources/9999999/senderProfile/create-response.xml +49 -0
- package/test/resources/9999999/senderProfile/delete-response.xml +36 -0
- package/test/resources/9999999/senderProfile/get-expected.json +16 -0
- package/test/resources/9999999/senderProfile/get-rcb-id-expected.json +16 -0
- package/test/resources/9999999/senderProfile/get-rcb-key-expected.json +16 -0
- package/test/resources/9999999/senderProfile/get-rcb-name-expected.json +16 -0
- package/test/resources/9999999/senderProfile/patch-expected.json +14 -0
- package/test/resources/9999999/senderProfile/post-expected.json +14 -0
- package/test/resources/9999999/senderProfile/retrieve-CustomerKey=Default-response.xml +44 -0
- package/test/resources/9999999/senderProfile/retrieve-CustomerKey=wrong-key-response.xml +26 -0
- package/test/resources/9999999/senderProfile/retrieve-response.xml +80 -0
- package/test/resources/9999999/senderProfile/template-expected.json +14 -0
- package/test/resources/9999999/senderProfile/update-response.xml +47 -0
- package/test/resources/9999999/transactionalEmail/build-expected.json +3 -3
- package/test/resources/9999999/transactionalEmail/get-expected.json +3 -3
- package/test/resources/9999999/transactionalEmail/patch-expected.json +3 -3
- package/test/resources/9999999/transactionalEmail/post-expected.json +2 -2
- package/test/resources/9999999/transactionalEmail/template-expected.json +3 -3
- package/test/resources/9999999/transactionalPush/build-expected.json +1 -1
- package/test/resources/9999999/transactionalPush/get-expected.json +1 -1
- package/test/resources/9999999/transactionalPush/patch-expected.json +1 -3
- package/test/resources/9999999/transactionalPush/post-expected.json +1 -3
- package/test/resources/9999999/transactionalPush/template-expected.json +1 -1
- package/test/resources/9999999/transactionalSMS/build-expected.amp +1 -1
- package/test/resources/9999999/transactionalSMS/build-expected.json +1 -2
- package/test/resources/9999999/transactionalSMS/get-expected.amp +1 -1
- package/test/resources/9999999/transactionalSMS/get-expected.json +1 -2
- package/test/resources/9999999/transactionalSMS/patch-expected.amp +1 -1
- package/test/resources/9999999/transactionalSMS/patch-expected.json +1 -2
- package/test/resources/9999999/transactionalSMS/post-expected.amp +1 -1
- package/test/resources/9999999/transactionalSMS/post-expected.json +1 -2
- package/test/resources/9999999/transactionalSMS/template-expected.amp +1 -1
- package/test/resources/9999999/transactionalSMS/template-expected.json +1 -2
- package/test/resources/9999999/triggeredSend/build-expected.json +5 -6
- package/test/resources/9999999/triggeredSend/get-expected.json +5 -6
- package/test/resources/9999999/triggeredSend/get-rcb-id-expected.json +29 -0
- package/test/resources/9999999/triggeredSend/get-rcb-key-expected.json +29 -0
- package/test/resources/9999999/triggeredSend/get-rcb-name-expected.json +29 -0
- package/test/resources/9999999/triggeredSend/patch-expected.json +5 -6
- package/test/resources/9999999/triggeredSend/post-expected.json +5 -6
- package/test/resources/9999999/triggeredSend/template-expected.json +5 -6
- package/test/resources/9999999/triggeredSendDefinition/create-response.xml +6 -1
- package/test/resources/9999999/triggeredSendDefinition/retrieve-TriggeredSendStatusINNew,Active,Inactive,Moved,Canceled-response.xml +53 -1
- package/test/resources/9999999/triggeredSendDefinition/update-response.xml +6 -1
- package/test/resources/9999999/verification/build-expected.json +1 -1
- package/test/resources/9999999/verification/get-expected.json +1 -1
- package/test/resources/9999999/verification/patch-expected.json +1 -1
- package/test/resources/9999999/verification/post-expected.json +1 -1
- package/test/resources/9999999/verification/template-expected.json +1 -1
- package/test/type.asset.test.js +733 -17
- package/test/type.attributeGroup.test.js +6 -2
- package/test/type.attributeSet.test.js +6 -2
- package/test/type.automation.test.js +174 -162
- package/test/type.dataExtension.test.js +41 -45
- package/test/type.dataExtract.test.js +22 -29
- package/test/type.deliveryProfile.test.js +45 -0
- package/test/type.emailSend.test.js +144 -0
- package/test/type.event.test.js +62 -0
- package/test/type.fileTransfer.test.js +21 -29
- package/test/type.importFile.test.js +61 -35
- package/test/type.journey.test.js +251 -45
- package/test/type.mobileKeyword.test.js +46 -54
- package/test/type.mobileMessage.test.js +28 -27
- package/test/type.query.test.js +303 -124
- package/test/type.script.test.js +288 -69
- package/test/type.sendClassification.test.js +156 -0
- package/test/type.senderProfile.test.js +254 -0
- package/test/type.transactionalEmail.test.js +15 -11
- package/test/type.transactionalPush.test.js +15 -11
- package/test/type.transactionalSMS.test.js +30 -23
- package/test/type.triggeredSend.test.js +130 -17
- package/test/type.user.test.js +22 -14
- package/test/type.verification.test.js +13 -10
- package/test/utils.js +76 -21
- package/tsconfig.json +21 -0
- package/types/mcdev.d.js +190 -66
- package/docs/dist/documentation.md +0 -8878
- package/test/mockRoot/deploy/testInstance/testBU/journey/testExisting_interaction.interaction-meta.json +0 -576
- package/test/mockRoot/deploy/testInstance/testBU/journey/testNew_interaction.interaction-meta.json +0 -266
- package/test/resources/9999999/interaction/v1/EventDefinitions/get-response.json +0 -43
- package/test/resources/9999999/interaction/v1/interactions/233d4413-922c-4568-85a5-e5cc77efc3be/delete-response.json +0 -1
- package/test/resources/9999999/interaction/v1/interactions/key_testExisting_interaction/get-response.json +0 -592
- package/test/resources/9999999/interaction/v1/interactions/key_testExisting_interaction/put-response.json +0 -592
- package/test/resources/9999999/interaction/v1/interactions/post-response.json +0 -280
- package/test/resources/9999999/journey/get-expected.json +0 -576
- package/test/resources/9999999/script/get_ampincluded-expected.ssjs +0 -5
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as chai from 'chai';
|
|
2
|
+
const assert = chai.assert;
|
|
3
|
+
const expect = chai.expect;
|
|
4
|
+
|
|
2
5
|
import chaiFiles from 'chai-files';
|
|
3
6
|
import cache from '../lib/util/cache.js';
|
|
4
7
|
import * as testUtils from './utils.js';
|
|
5
8
|
import handler from '../lib/index.js';
|
|
6
9
|
chai.use(chaiFiles);
|
|
7
|
-
const file = chaiFiles.file;
|
|
8
10
|
|
|
9
11
|
describe('type: automation', () => {
|
|
10
12
|
beforeEach(() => {
|
|
11
13
|
testUtils.mockSetup();
|
|
12
14
|
});
|
|
15
|
+
|
|
13
16
|
afterEach(() => {
|
|
14
17
|
testUtils.mockReset();
|
|
15
18
|
});
|
|
19
|
+
|
|
16
20
|
describe('Retrieve ================', () => {
|
|
17
21
|
it('Should retrieve a automation', async () => {
|
|
18
22
|
// WHEN
|
|
19
23
|
await handler.retrieve('testInstance/testBU', ['automation']);
|
|
20
24
|
// THEN
|
|
21
|
-
assert.equal(process.exitCode,
|
|
25
|
+
assert.equal(process.exitCode, 0, 'retrieve should not have thrown an error');
|
|
22
26
|
// get results from cache
|
|
23
27
|
const result = cache.getCache();
|
|
24
28
|
assert.equal(
|
|
@@ -33,28 +37,28 @@ describe('type: automation', () => {
|
|
|
33
37
|
'returned metadata was not equal expected'
|
|
34
38
|
);
|
|
35
39
|
// check if MD file was created and equals expectations
|
|
36
|
-
expect(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'md'
|
|
43
|
-
)
|
|
40
|
+
expect(await testUtils.getActualDoc('testExisting_automation', 'automation')).to.equal(
|
|
41
|
+
await testUtils.getExpectedFile(
|
|
42
|
+
'9999999',
|
|
43
|
+
'automation',
|
|
44
|
+
'retrieve-testExisting_automation',
|
|
45
|
+
'md'
|
|
44
46
|
)
|
|
45
47
|
);
|
|
46
48
|
assert.equal(
|
|
47
49
|
testUtils.getAPIHistoryLength(),
|
|
48
|
-
|
|
50
|
+
22,
|
|
49
51
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
50
52
|
);
|
|
51
53
|
return;
|
|
52
54
|
});
|
|
53
55
|
});
|
|
56
|
+
|
|
54
57
|
describe('Deploy ================', () => {
|
|
55
58
|
beforeEach(() => {
|
|
56
59
|
testUtils.mockSetup(true);
|
|
57
60
|
});
|
|
61
|
+
|
|
58
62
|
it('Should create & update a automation', async () => {
|
|
59
63
|
// WHEN
|
|
60
64
|
const deployResult = await handler.deploy(
|
|
@@ -63,7 +67,7 @@ describe('type: automation', () => {
|
|
|
63
67
|
['testExisting_automation', 'testNew_automation', 'testNew_39f6a488-20eb-4ba0-b0b9']
|
|
64
68
|
);
|
|
65
69
|
// THEN
|
|
66
|
-
assert.equal(process.exitCode,
|
|
70
|
+
assert.equal(process.exitCode, 0, 'deploy should not have thrown an error');
|
|
67
71
|
|
|
68
72
|
// check how many items were deployed
|
|
69
73
|
assert.equal(
|
|
@@ -94,36 +98,33 @@ describe('type: automation', () => {
|
|
|
94
98
|
'returned metadata was not equal expected for update'
|
|
95
99
|
);
|
|
96
100
|
// check if MD file was created and equals expectations
|
|
97
|
-
expect(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
'md'
|
|
104
|
-
)
|
|
101
|
+
expect(await testUtils.getActualDoc('testExisting_automation', 'automation')).to.equal(
|
|
102
|
+
await testUtils.getExpectedFile(
|
|
103
|
+
'9999999',
|
|
104
|
+
'automation',
|
|
105
|
+
'update-testExisting_automation',
|
|
106
|
+
'md'
|
|
105
107
|
)
|
|
106
108
|
);
|
|
107
109
|
|
|
108
110
|
// check if MD file was created and equals expectations
|
|
109
|
-
expect(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
'md'
|
|
116
|
-
)
|
|
111
|
+
expect(await testUtils.getActualDoc('testNew_automation', 'automation')).to.equal(
|
|
112
|
+
await testUtils.getExpectedFile(
|
|
113
|
+
'9999999',
|
|
114
|
+
'automation',
|
|
115
|
+
'create-testNew_automation',
|
|
116
|
+
'md'
|
|
117
117
|
)
|
|
118
118
|
);
|
|
119
119
|
|
|
120
120
|
assert.equal(
|
|
121
121
|
testUtils.getAPIHistoryLength(),
|
|
122
|
-
|
|
122
|
+
29,
|
|
123
123
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
124
124
|
);
|
|
125
125
|
return;
|
|
126
126
|
});
|
|
127
|
+
|
|
127
128
|
it('Should update & schedule an automation with --schedule option', async () => {
|
|
128
129
|
// WHEN
|
|
129
130
|
handler.setOptions({ schedule: true });
|
|
@@ -135,7 +136,7 @@ describe('type: automation', () => {
|
|
|
135
136
|
// THEN
|
|
136
137
|
assert.equal(
|
|
137
138
|
process.exitCode,
|
|
138
|
-
|
|
139
|
+
0,
|
|
139
140
|
'deploy with --execute should not have thrown an error'
|
|
140
141
|
);
|
|
141
142
|
|
|
@@ -175,24 +176,23 @@ describe('type: automation', () => {
|
|
|
175
176
|
'returned metadata was not equal expected for update'
|
|
176
177
|
);
|
|
177
178
|
// check if MD file was created and equals expectations
|
|
178
|
-
expect(
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
'md'
|
|
185
|
-
)
|
|
179
|
+
expect(await testUtils.getActualDoc('testExisting_automation', 'automation')).to.equal(
|
|
180
|
+
await testUtils.getExpectedFile(
|
|
181
|
+
'9999999',
|
|
182
|
+
'automation',
|
|
183
|
+
'update-testExisting_automation',
|
|
184
|
+
'md'
|
|
186
185
|
)
|
|
187
186
|
);
|
|
188
187
|
|
|
189
188
|
assert.equal(
|
|
190
189
|
testUtils.getAPIHistoryLength(),
|
|
191
|
-
|
|
190
|
+
37,
|
|
192
191
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
193
192
|
);
|
|
194
193
|
return;
|
|
195
194
|
});
|
|
195
|
+
|
|
196
196
|
it('Should update & runOnce an automation with --execute option', async () => {
|
|
197
197
|
// WHEN
|
|
198
198
|
handler.setOptions({ execute: true });
|
|
@@ -204,7 +204,7 @@ describe('type: automation', () => {
|
|
|
204
204
|
// THEN
|
|
205
205
|
assert.equal(
|
|
206
206
|
process.exitCode,
|
|
207
|
-
|
|
207
|
+
0,
|
|
208
208
|
'deploy with --execute should not have thrown an error'
|
|
209
209
|
);
|
|
210
210
|
|
|
@@ -243,40 +243,42 @@ describe('type: automation', () => {
|
|
|
243
243
|
'returned metadata was not equal expected for update'
|
|
244
244
|
);
|
|
245
245
|
// check if MD file was created and equals expectations
|
|
246
|
-
expect(
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
'md'
|
|
253
|
-
)
|
|
246
|
+
expect(await testUtils.getActualDoc('testExisting_automation', 'automation')).to.equal(
|
|
247
|
+
await testUtils.getExpectedFile(
|
|
248
|
+
'9999999',
|
|
249
|
+
'automation',
|
|
250
|
+
'update-testExisting_automation',
|
|
251
|
+
'md'
|
|
254
252
|
)
|
|
255
253
|
);
|
|
256
254
|
|
|
257
255
|
assert.equal(
|
|
258
256
|
testUtils.getAPIHistoryLength(),
|
|
259
|
-
|
|
257
|
+
33,
|
|
260
258
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
261
259
|
);
|
|
262
260
|
return;
|
|
263
261
|
});
|
|
264
262
|
});
|
|
263
|
+
|
|
265
264
|
describe('FixKeys ================', () => {
|
|
266
265
|
beforeEach(() => {
|
|
267
266
|
testUtils.mockSetup(true);
|
|
268
267
|
});
|
|
268
|
+
|
|
269
269
|
it('Should run fixKeys but not find fixable keys and hence stop', async () => {
|
|
270
270
|
// WHEN
|
|
271
271
|
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false } });
|
|
272
|
-
const resultFixKeys = await handler.fixKeys(
|
|
273
|
-
'
|
|
274
|
-
|
|
272
|
+
const resultFixKeys = await handler.fixKeys(
|
|
273
|
+
'testInstance/testBU',
|
|
274
|
+
['automation'],
|
|
275
|
+
['testExisting_automation']
|
|
276
|
+
);
|
|
275
277
|
// THEN
|
|
276
|
-
assert.equal(process.exitCode,
|
|
278
|
+
assert.equal(process.exitCode, 0, 'fixKeys should not have thrown an error');
|
|
277
279
|
// check which keys were fixed
|
|
278
280
|
assert.equal(
|
|
279
|
-
resultFixKeys['testInstance/testBU'].length,
|
|
281
|
+
resultFixKeys['testInstance/testBU']['automation'].length,
|
|
280
282
|
0,
|
|
281
283
|
'expected to find no keys to be fixed'
|
|
282
284
|
);
|
|
@@ -291,30 +293,32 @@ describe('type: automation', () => {
|
|
|
291
293
|
// check number of API calls
|
|
292
294
|
assert.equal(
|
|
293
295
|
testUtils.getAPIHistoryLength(),
|
|
294
|
-
|
|
296
|
+
22,
|
|
295
297
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
296
298
|
);
|
|
297
299
|
return;
|
|
298
300
|
});
|
|
301
|
+
|
|
299
302
|
it('Should fixKeys by key w/o re-retrieving, auto-schedule', async () => {
|
|
300
303
|
// WHEN
|
|
301
304
|
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false } });
|
|
302
|
-
const resultFixKeys = await handler.fixKeys(
|
|
303
|
-
'
|
|
304
|
-
'
|
|
305
|
-
|
|
305
|
+
const resultFixKeys = await handler.fixKeys(
|
|
306
|
+
'testInstance/testBU',
|
|
307
|
+
['automation'],
|
|
308
|
+
['testExisting_automation_fixKey_schedule', 'testExisting_automation']
|
|
309
|
+
);
|
|
306
310
|
assert.equal(
|
|
307
|
-
resultFixKeys['testInstance/testBU'].length,
|
|
311
|
+
resultFixKeys['testInstance/testBU']['automation'].length,
|
|
308
312
|
1,
|
|
309
313
|
'returned number of keys does not correspond to number of expected fixed keys'
|
|
310
314
|
);
|
|
311
315
|
assert.equal(
|
|
312
|
-
resultFixKeys['testInstance/testBU'][0],
|
|
316
|
+
resultFixKeys['testInstance/testBU']['automation'][0],
|
|
313
317
|
'testExisting_automation_fixedKey_scheduled',
|
|
314
318
|
'returned keys do not correspond to expected fixed keys'
|
|
315
319
|
);
|
|
316
320
|
// THEN
|
|
317
|
-
assert.equal(process.exitCode,
|
|
321
|
+
assert.equal(process.exitCode, 0, 'fixKeys should not have thrown an error');
|
|
318
322
|
// confirm updated item
|
|
319
323
|
assert.deepEqual(
|
|
320
324
|
await testUtils.getActualJson(
|
|
@@ -325,40 +329,40 @@ describe('type: automation', () => {
|
|
|
325
329
|
'returned metadata was not equal expected for update automation'
|
|
326
330
|
);
|
|
327
331
|
expect(
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
'automation'
|
|
332
|
-
)
|
|
332
|
+
await testUtils.getActualDoc(
|
|
333
|
+
'testExisting_automation_fixedKey_scheduled',
|
|
334
|
+
'automation'
|
|
333
335
|
)
|
|
334
336
|
).to.exist;
|
|
335
337
|
// check number of API calls
|
|
336
338
|
assert.equal(
|
|
337
339
|
testUtils.getAPIHistoryLength(),
|
|
338
|
-
|
|
340
|
+
48,
|
|
339
341
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
340
342
|
);
|
|
341
343
|
return;
|
|
342
344
|
});
|
|
345
|
+
|
|
343
346
|
it('Should fixKeys by key w/o re-retrieving, auto-schedule and then --execute', async () => {
|
|
344
347
|
// WHEN
|
|
345
348
|
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false }, execute: true });
|
|
346
|
-
const resultFixKeys = await handler.fixKeys(
|
|
347
|
-
'
|
|
348
|
-
'
|
|
349
|
-
|
|
349
|
+
const resultFixKeys = await handler.fixKeys(
|
|
350
|
+
'testInstance/testBU',
|
|
351
|
+
['automation'],
|
|
352
|
+
['testExisting_automation_fixKey_schedule', 'testExisting_automation']
|
|
353
|
+
);
|
|
350
354
|
assert.equal(
|
|
351
|
-
resultFixKeys['testInstance/testBU'].length,
|
|
355
|
+
resultFixKeys['testInstance/testBU']['automation'].length,
|
|
352
356
|
1,
|
|
353
357
|
'returned number of keys does not correspond to number of expected fixed keys'
|
|
354
358
|
);
|
|
355
359
|
assert.equal(
|
|
356
|
-
resultFixKeys['testInstance/testBU'][0],
|
|
360
|
+
resultFixKeys['testInstance/testBU']['automation'][0],
|
|
357
361
|
'testExisting_automation_fixedKey_scheduled',
|
|
358
362
|
'returned keys do not correspond to expected fixed keys'
|
|
359
363
|
);
|
|
360
364
|
// THEN
|
|
361
|
-
assert.equal(process.exitCode,
|
|
365
|
+
assert.equal(process.exitCode, 0, 'fixKeys should not have thrown an error');
|
|
362
366
|
// confirm updated item
|
|
363
367
|
assert.deepEqual(
|
|
364
368
|
await testUtils.getActualJson(
|
|
@@ -369,40 +373,40 @@ describe('type: automation', () => {
|
|
|
369
373
|
'returned metadata was not equal expected for update automation'
|
|
370
374
|
);
|
|
371
375
|
expect(
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
'automation'
|
|
376
|
-
)
|
|
376
|
+
await testUtils.getActualDoc(
|
|
377
|
+
'testExisting_automation_fixedKey_scheduled',
|
|
378
|
+
'automation'
|
|
377
379
|
)
|
|
378
380
|
).to.exist;
|
|
379
381
|
// check number of API calls
|
|
380
382
|
assert.equal(
|
|
381
383
|
testUtils.getAPIHistoryLength(),
|
|
382
|
-
|
|
384
|
+
50,
|
|
383
385
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
384
386
|
);
|
|
385
387
|
return;
|
|
386
388
|
});
|
|
389
|
+
|
|
387
390
|
it('Should fixKeys by key w/o re-retrieving, auto-schedule and then --schedule', async () => {
|
|
388
391
|
// WHEN
|
|
389
392
|
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false }, schedule: true });
|
|
390
|
-
const resultFixKeys = await handler.fixKeys(
|
|
391
|
-
'
|
|
392
|
-
'
|
|
393
|
-
|
|
393
|
+
const resultFixKeys = await handler.fixKeys(
|
|
394
|
+
'testInstance/testBU',
|
|
395
|
+
['automation'],
|
|
396
|
+
['testExisting_automation_fixKey_schedule', 'testExisting_automation']
|
|
397
|
+
);
|
|
394
398
|
assert.equal(
|
|
395
|
-
resultFixKeys['testInstance/testBU'].length,
|
|
399
|
+
resultFixKeys['testInstance/testBU']['automation'].length,
|
|
396
400
|
1,
|
|
397
401
|
'returned number of keys does not correspond to number of expected fixed keys'
|
|
398
402
|
);
|
|
399
403
|
assert.equal(
|
|
400
|
-
resultFixKeys['testInstance/testBU'][0],
|
|
404
|
+
resultFixKeys['testInstance/testBU']['automation'][0],
|
|
401
405
|
'testExisting_automation_fixedKey_scheduled',
|
|
402
406
|
'returned keys do not correspond to expected fixed keys'
|
|
403
407
|
);
|
|
404
408
|
// THEN
|
|
405
|
-
assert.equal(process.exitCode,
|
|
409
|
+
assert.equal(process.exitCode, 0, 'fixKeys should not have thrown an error');
|
|
406
410
|
// confirm updated item
|
|
407
411
|
assert.deepEqual(
|
|
408
412
|
await testUtils.getActualJson(
|
|
@@ -413,39 +417,40 @@ describe('type: automation', () => {
|
|
|
413
417
|
'returned metadata was not equal expected for update automation'
|
|
414
418
|
);
|
|
415
419
|
expect(
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
'automation'
|
|
420
|
-
)
|
|
420
|
+
await testUtils.getActualDoc(
|
|
421
|
+
'testExisting_automation_fixedKey_scheduled',
|
|
422
|
+
'automation'
|
|
421
423
|
)
|
|
422
424
|
).to.exist;
|
|
423
425
|
// check number of API calls
|
|
424
426
|
assert.equal(
|
|
425
427
|
testUtils.getAPIHistoryLength(),
|
|
426
|
-
|
|
428
|
+
51,
|
|
427
429
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
428
430
|
);
|
|
429
431
|
return;
|
|
430
432
|
});
|
|
433
|
+
|
|
431
434
|
it('Should fixKeys by key w/o re-retrieving, deploy paused', async () => {
|
|
432
435
|
// WHEN
|
|
433
436
|
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false } });
|
|
434
|
-
const resultFixKeys = await handler.fixKeys(
|
|
435
|
-
'
|
|
436
|
-
|
|
437
|
+
const resultFixKeys = await handler.fixKeys(
|
|
438
|
+
'testInstance/testBU',
|
|
439
|
+
['automation'],
|
|
440
|
+
['testExisting_automation_fixKey_pause']
|
|
441
|
+
);
|
|
437
442
|
assert.equal(
|
|
438
|
-
resultFixKeys['testInstance/testBU'].length,
|
|
443
|
+
resultFixKeys['testInstance/testBU']['automation'].length,
|
|
439
444
|
1,
|
|
440
445
|
'returned number of keys does not correspond to number of expected fixed keys'
|
|
441
446
|
);
|
|
442
447
|
assert.equal(
|
|
443
|
-
resultFixKeys['testInstance/testBU'][0],
|
|
448
|
+
resultFixKeys['testInstance/testBU']['automation'][0],
|
|
444
449
|
'testExisting_automation_fixedKey_paused',
|
|
445
450
|
'returned keys do not correspond to expected fixed keys'
|
|
446
451
|
);
|
|
447
452
|
// THEN
|
|
448
|
-
assert.equal(process.exitCode,
|
|
453
|
+
assert.equal(process.exitCode, 0, 'fixKeys should not have thrown an error');
|
|
449
454
|
// confirm updated item
|
|
450
455
|
assert.deepEqual(
|
|
451
456
|
await testUtils.getActualJson(
|
|
@@ -456,37 +461,40 @@ describe('type: automation', () => {
|
|
|
456
461
|
'returned metadata was not equal expected for update automation'
|
|
457
462
|
);
|
|
458
463
|
expect(
|
|
459
|
-
|
|
460
|
-
|
|
464
|
+
await testUtils.getActualDoc(
|
|
465
|
+
'testExisting_automation_fixedKey_paused',
|
|
466
|
+
'automation'
|
|
461
467
|
)
|
|
462
468
|
).to.exist;
|
|
463
469
|
// check number of API calls
|
|
464
470
|
assert.equal(
|
|
465
471
|
testUtils.getAPIHistoryLength(),
|
|
466
|
-
|
|
472
|
+
43,
|
|
467
473
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
468
474
|
);
|
|
469
475
|
return;
|
|
470
476
|
});
|
|
477
|
+
|
|
471
478
|
it('Should fixKeys by key w/o re-retrieving, deploy paused and then --execute', async () => {
|
|
472
479
|
// WHEN
|
|
473
480
|
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false }, execute: true });
|
|
474
|
-
const resultFixKeys = await handler.fixKeys(
|
|
475
|
-
'
|
|
476
|
-
'
|
|
477
|
-
|
|
481
|
+
const resultFixKeys = await handler.fixKeys(
|
|
482
|
+
'testInstance/testBU',
|
|
483
|
+
['automation'],
|
|
484
|
+
['testExisting_automation_fixKey_pause', 'testExisting_automation']
|
|
485
|
+
);
|
|
478
486
|
assert.equal(
|
|
479
|
-
resultFixKeys['testInstance/testBU'].length,
|
|
487
|
+
resultFixKeys['testInstance/testBU']['automation'].length,
|
|
480
488
|
1,
|
|
481
489
|
'returned number of keys does not correspond to number of expected fixed keys'
|
|
482
490
|
);
|
|
483
491
|
assert.equal(
|
|
484
|
-
resultFixKeys['testInstance/testBU'][0],
|
|
492
|
+
resultFixKeys['testInstance/testBU']['automation'][0],
|
|
485
493
|
'testExisting_automation_fixedKey_paused',
|
|
486
494
|
'returned keys do not correspond to expected fixed keys'
|
|
487
495
|
);
|
|
488
496
|
// THEN
|
|
489
|
-
assert.equal(process.exitCode,
|
|
497
|
+
assert.equal(process.exitCode, 0, 'fixKeys should not have thrown an error');
|
|
490
498
|
// confirm updated item
|
|
491
499
|
assert.deepEqual(
|
|
492
500
|
await testUtils.getActualJson(
|
|
@@ -497,37 +505,40 @@ describe('type: automation', () => {
|
|
|
497
505
|
'returned metadata was not equal expected for update automation'
|
|
498
506
|
);
|
|
499
507
|
expect(
|
|
500
|
-
|
|
501
|
-
|
|
508
|
+
await testUtils.getActualDoc(
|
|
509
|
+
'testExisting_automation_fixedKey_paused',
|
|
510
|
+
'automation'
|
|
502
511
|
)
|
|
503
512
|
).to.exist;
|
|
504
513
|
// check number of API calls
|
|
505
514
|
assert.equal(
|
|
506
515
|
testUtils.getAPIHistoryLength(),
|
|
507
|
-
|
|
516
|
+
49,
|
|
508
517
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
509
518
|
);
|
|
510
519
|
return;
|
|
511
520
|
});
|
|
521
|
+
|
|
512
522
|
it('Should fixKeys by key w/o re-retrieving, deploy paused and then --schedule', async () => {
|
|
513
523
|
// WHEN
|
|
514
524
|
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false }, schedule: true });
|
|
515
|
-
const resultFixKeys = await handler.fixKeys(
|
|
516
|
-
'
|
|
517
|
-
'
|
|
518
|
-
|
|
525
|
+
const resultFixKeys = await handler.fixKeys(
|
|
526
|
+
'testInstance/testBU',
|
|
527
|
+
['automation'],
|
|
528
|
+
['testExisting_automation_fixKey_pause', 'testExisting_automation']
|
|
529
|
+
);
|
|
519
530
|
assert.equal(
|
|
520
|
-
resultFixKeys['testInstance/testBU'].length,
|
|
531
|
+
resultFixKeys['testInstance/testBU']['automation'].length,
|
|
521
532
|
1,
|
|
522
533
|
'returned number of keys does not correspond to number of expected fixed keys'
|
|
523
534
|
);
|
|
524
535
|
assert.equal(
|
|
525
|
-
resultFixKeys['testInstance/testBU'][0],
|
|
536
|
+
resultFixKeys['testInstance/testBU']['automation'][0],
|
|
526
537
|
'testExisting_automation_fixedKey_paused',
|
|
527
538
|
'returned keys do not correspond to expected fixed keys'
|
|
528
539
|
);
|
|
529
540
|
// THEN
|
|
530
|
-
assert.equal(process.exitCode,
|
|
541
|
+
assert.equal(process.exitCode, 0, 'fixKeys should not have thrown an error');
|
|
531
542
|
// confirm updated item
|
|
532
543
|
assert.deepEqual(
|
|
533
544
|
await testUtils.getActualJson(
|
|
@@ -538,19 +549,21 @@ describe('type: automation', () => {
|
|
|
538
549
|
'returned metadata was not equal expected for update automation'
|
|
539
550
|
);
|
|
540
551
|
expect(
|
|
541
|
-
|
|
542
|
-
|
|
552
|
+
await testUtils.getActualDoc(
|
|
553
|
+
'testExisting_automation_fixedKey_paused',
|
|
554
|
+
'automation'
|
|
543
555
|
)
|
|
544
556
|
).to.exist;
|
|
545
557
|
// check number of API calls
|
|
546
558
|
assert.equal(
|
|
547
559
|
testUtils.getAPIHistoryLength(),
|
|
548
|
-
|
|
560
|
+
51,
|
|
549
561
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
550
562
|
);
|
|
551
563
|
return;
|
|
552
564
|
});
|
|
553
565
|
});
|
|
566
|
+
|
|
554
567
|
describe('Templating ================', () => {
|
|
555
568
|
it('Should create a automation template via retrieveAsTemplate and build it', async () => {
|
|
556
569
|
// GIVEN there is a template
|
|
@@ -560,11 +573,7 @@ describe('type: automation', () => {
|
|
|
560
573
|
['testExisting_automation'],
|
|
561
574
|
'testSourceMarket'
|
|
562
575
|
);
|
|
563
|
-
assert.equal(
|
|
564
|
-
process.exitCode,
|
|
565
|
-
false,
|
|
566
|
-
'retrieveAsTemplate should not have thrown an error'
|
|
567
|
-
);
|
|
576
|
+
assert.equal(process.exitCode, 0, 'retrieveAsTemplate should not have thrown an error');
|
|
568
577
|
|
|
569
578
|
// WHEN
|
|
570
579
|
assert.equal(
|
|
@@ -581,14 +590,10 @@ describe('type: automation', () => {
|
|
|
581
590
|
await handler.buildDefinition(
|
|
582
591
|
'testInstance/testBU',
|
|
583
592
|
'automation',
|
|
584
|
-
'testExisting_automation',
|
|
593
|
+
['testExisting_automation'],
|
|
585
594
|
'testTargetMarket'
|
|
586
595
|
);
|
|
587
|
-
assert.equal(
|
|
588
|
-
process.exitCode,
|
|
589
|
-
false,
|
|
590
|
-
'buildDefinition should not have thrown an error'
|
|
591
|
-
);
|
|
596
|
+
assert.equal(process.exitCode, 0, 'buildDefinition should not have thrown an error');
|
|
592
597
|
assert.deepEqual(
|
|
593
598
|
await testUtils.getActualDeployJson('testTemplated_automation', 'automation'),
|
|
594
599
|
await testUtils.getExpectedJson('9999999', 'automation', 'build'),
|
|
@@ -596,11 +601,12 @@ describe('type: automation', () => {
|
|
|
596
601
|
);
|
|
597
602
|
assert.equal(
|
|
598
603
|
testUtils.getAPIHistoryLength(),
|
|
599
|
-
|
|
604
|
+
24,
|
|
600
605
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
601
606
|
);
|
|
602
607
|
return;
|
|
603
608
|
});
|
|
609
|
+
|
|
604
610
|
it('Should create a automation template via buildTemplate and build it', async () => {
|
|
605
611
|
// download first before we test buildTemplate
|
|
606
612
|
await handler.retrieve('testInstance/testBU', ['automation']);
|
|
@@ -611,7 +617,7 @@ describe('type: automation', () => {
|
|
|
611
617
|
['testExisting_automation'],
|
|
612
618
|
'testSourceMarket'
|
|
613
619
|
);
|
|
614
|
-
assert.equal(process.exitCode,
|
|
620
|
+
assert.equal(process.exitCode, 0, 'buildTemplate should not have thrown an error');
|
|
615
621
|
// WHEN
|
|
616
622
|
assert.equal(
|
|
617
623
|
result.automation ? Object.keys(result.automation).length : 0,
|
|
@@ -627,14 +633,10 @@ describe('type: automation', () => {
|
|
|
627
633
|
await handler.buildDefinition(
|
|
628
634
|
'testInstance/testBU',
|
|
629
635
|
'automation',
|
|
630
|
-
'testExisting_automation',
|
|
636
|
+
['testExisting_automation'],
|
|
631
637
|
'testTargetMarket'
|
|
632
638
|
);
|
|
633
|
-
assert.equal(
|
|
634
|
-
process.exitCode,
|
|
635
|
-
false,
|
|
636
|
-
'buildDefinition should not have thrown an error'
|
|
637
|
-
);
|
|
639
|
+
assert.equal(process.exitCode, 0, 'buildDefinition should not have thrown an error');
|
|
638
640
|
|
|
639
641
|
assert.deepEqual(
|
|
640
642
|
await testUtils.getActualDeployJson('testTemplated_automation', 'automation'),
|
|
@@ -643,12 +645,13 @@ describe('type: automation', () => {
|
|
|
643
645
|
);
|
|
644
646
|
assert.equal(
|
|
645
647
|
testUtils.getAPIHistoryLength(),
|
|
646
|
-
|
|
648
|
+
22,
|
|
647
649
|
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
648
650
|
);
|
|
649
651
|
return;
|
|
650
652
|
});
|
|
651
653
|
});
|
|
654
|
+
|
|
652
655
|
describe('Delete ================', () => {
|
|
653
656
|
it('Should delete the item', async () => {
|
|
654
657
|
// WHEN
|
|
@@ -658,12 +661,13 @@ describe('type: automation', () => {
|
|
|
658
661
|
'testExisting_automation'
|
|
659
662
|
);
|
|
660
663
|
// THEN
|
|
661
|
-
assert.equal(process.exitCode,
|
|
664
|
+
assert.equal(process.exitCode, 0, 'delete should not have thrown an error');
|
|
662
665
|
|
|
663
666
|
assert.equal(isDeleted, true, 'should have deleted the item');
|
|
664
667
|
return;
|
|
665
668
|
});
|
|
666
669
|
});
|
|
670
|
+
|
|
667
671
|
describe('CI/CD ================', () => {
|
|
668
672
|
it('Should return a list of files based on their type and key', async () => {
|
|
669
673
|
// WHEN
|
|
@@ -671,11 +675,7 @@ describe('type: automation', () => {
|
|
|
671
675
|
'testExisting_automation',
|
|
672
676
|
]);
|
|
673
677
|
// THEN
|
|
674
|
-
assert.equal(
|
|
675
|
-
process.exitCode,
|
|
676
|
-
false,
|
|
677
|
-
'getFilesToCommit should not have thrown an error'
|
|
678
|
-
);
|
|
678
|
+
assert.equal(process.exitCode, 0, 'getFilesToCommit should not have thrown an error');
|
|
679
679
|
assert.equal(fileList.length, 2, 'expected only 2 file paths');
|
|
680
680
|
|
|
681
681
|
assert.equal(
|
|
@@ -691,12 +691,13 @@ describe('type: automation', () => {
|
|
|
691
691
|
return;
|
|
692
692
|
});
|
|
693
693
|
});
|
|
694
|
+
|
|
694
695
|
describe('Schedule ================', () => {
|
|
695
696
|
it('Should schedule an automation by key', async () => {
|
|
696
697
|
const executedKeys = await handler.schedule('testInstance/testBU', 'automation', [
|
|
697
698
|
'testExisting_automation',
|
|
698
699
|
]);
|
|
699
|
-
assert.equal(process.exitCode,
|
|
700
|
+
assert.equal(process.exitCode, 0, 'execute should not have thrown an error');
|
|
700
701
|
assert.equal(
|
|
701
702
|
executedKeys['testInstance/testBU']?.length,
|
|
702
703
|
1,
|
|
@@ -709,10 +710,11 @@ describe('type: automation', () => {
|
|
|
709
710
|
);
|
|
710
711
|
return;
|
|
711
712
|
});
|
|
713
|
+
|
|
712
714
|
it('Should schedule an automation selected via --like', async () => {
|
|
713
715
|
handler.setOptions({ like: { key: 'testExist%automation' } });
|
|
714
716
|
const executedKeys = await handler.schedule('testInstance/testBU', 'automation');
|
|
715
|
-
assert.equal(process.exitCode,
|
|
717
|
+
assert.equal(process.exitCode, 0, 'execute should not have thrown an error');
|
|
716
718
|
assert.equal(
|
|
717
719
|
executedKeys['testInstance/testBU']?.length,
|
|
718
720
|
1,
|
|
@@ -725,12 +727,13 @@ describe('type: automation', () => {
|
|
|
725
727
|
);
|
|
726
728
|
return;
|
|
727
729
|
});
|
|
730
|
+
|
|
728
731
|
it('Should not schedule executing an automation because key and --like was specified', async () => {
|
|
729
732
|
handler.setOptions({ like: { key: 'testExisting%' } });
|
|
730
733
|
const executedKeys = await handler.schedule('testInstance/testBU', 'automation', [
|
|
731
734
|
'testExisting_automation',
|
|
732
735
|
]);
|
|
733
|
-
assert.equal(process.exitCode,
|
|
736
|
+
assert.equal(process.exitCode, 1, 'execute should have thrown an error');
|
|
734
737
|
assert.equal(
|
|
735
738
|
Object.keys(executedKeys).length,
|
|
736
739
|
0,
|
|
@@ -739,13 +742,14 @@ describe('type: automation', () => {
|
|
|
739
742
|
return;
|
|
740
743
|
});
|
|
741
744
|
});
|
|
745
|
+
|
|
742
746
|
describe('Execute ================', () => {
|
|
743
747
|
it('Should execute --schedule an automation by key', async () => {
|
|
744
748
|
handler.setOptions({ schedule: true });
|
|
745
749
|
const executedKeys = await handler.execute('testInstance/testBU', 'automation', [
|
|
746
750
|
'testExisting_automation',
|
|
747
751
|
]);
|
|
748
|
-
assert.equal(process.exitCode,
|
|
752
|
+
assert.equal(process.exitCode, 0, 'execute should not have thrown an error');
|
|
749
753
|
assert.equal(
|
|
750
754
|
executedKeys['testInstance/testBU']?.length,
|
|
751
755
|
1,
|
|
@@ -758,10 +762,11 @@ describe('type: automation', () => {
|
|
|
758
762
|
);
|
|
759
763
|
return;
|
|
760
764
|
});
|
|
765
|
+
|
|
761
766
|
it('Should execute --schedule an automation selected via --like', async () => {
|
|
762
767
|
handler.setOptions({ like: { key: 'testExist%automation' }, schedule: true });
|
|
763
768
|
const executedKeys = await handler.execute('testInstance/testBU', 'automation');
|
|
764
|
-
assert.equal(process.exitCode,
|
|
769
|
+
assert.equal(process.exitCode, 0, 'execute should not have thrown an error');
|
|
765
770
|
assert.equal(
|
|
766
771
|
executedKeys['testInstance/testBU']?.length,
|
|
767
772
|
1,
|
|
@@ -774,12 +779,13 @@ describe('type: automation', () => {
|
|
|
774
779
|
);
|
|
775
780
|
return;
|
|
776
781
|
});
|
|
782
|
+
|
|
777
783
|
it('Should not execute --schedule executing an automation because key and --like was specified', async () => {
|
|
778
784
|
handler.setOptions({ like: { key: 'testExisting%' }, schedule: true });
|
|
779
785
|
const executedKeys = await handler.execute('testInstance/testBU', 'automation', [
|
|
780
786
|
'testExisting_automation',
|
|
781
787
|
]);
|
|
782
|
-
assert.equal(process.exitCode,
|
|
788
|
+
assert.equal(process.exitCode, 1, 'execute should have thrown an error');
|
|
783
789
|
assert.equal(
|
|
784
790
|
Object.keys(executedKeys).length,
|
|
785
791
|
0,
|
|
@@ -787,11 +793,12 @@ describe('type: automation', () => {
|
|
|
787
793
|
);
|
|
788
794
|
return;
|
|
789
795
|
});
|
|
796
|
+
|
|
790
797
|
it('Should runOnce an automation by key', async () => {
|
|
791
798
|
const executedKeys = await handler.execute('testInstance/testBU', 'automation', [
|
|
792
799
|
'testExisting_automation',
|
|
793
800
|
]);
|
|
794
|
-
assert.equal(process.exitCode,
|
|
801
|
+
assert.equal(process.exitCode, 0, 'execute should not have thrown an error');
|
|
795
802
|
assert.equal(
|
|
796
803
|
executedKeys['testInstance/testBU']?.length,
|
|
797
804
|
1,
|
|
@@ -804,10 +811,11 @@ describe('type: automation', () => {
|
|
|
804
811
|
);
|
|
805
812
|
return;
|
|
806
813
|
});
|
|
814
|
+
|
|
807
815
|
it('Should runOnce an automation selected via --like', async () => {
|
|
808
816
|
handler.setOptions({ like: { key: 'testExist%automation' } });
|
|
809
817
|
const executedKeys = await handler.execute('testInstance/testBU', 'automation');
|
|
810
|
-
assert.equal(process.exitCode,
|
|
818
|
+
assert.equal(process.exitCode, 0, 'execute should not have thrown an error');
|
|
811
819
|
assert.equal(
|
|
812
820
|
executedKeys['testInstance/testBU']?.length,
|
|
813
821
|
1,
|
|
@@ -821,12 +829,13 @@ describe('type: automation', () => {
|
|
|
821
829
|
|
|
822
830
|
return;
|
|
823
831
|
});
|
|
832
|
+
|
|
824
833
|
it('Should not runOnce executing an automation because key and --like was specified', async () => {
|
|
825
834
|
handler.setOptions({ like: { key: 'testExisting%' } });
|
|
826
835
|
const executedKeys = await handler.execute('testInstance/testBU', 'automation', [
|
|
827
836
|
'testExisting_automation',
|
|
828
837
|
]);
|
|
829
|
-
assert.equal(process.exitCode,
|
|
838
|
+
assert.equal(process.exitCode, 1, 'execute should have thrown an error');
|
|
830
839
|
assert.equal(
|
|
831
840
|
Object.keys(executedKeys).length,
|
|
832
841
|
0,
|
|
@@ -836,12 +845,13 @@ describe('type: automation', () => {
|
|
|
836
845
|
return;
|
|
837
846
|
});
|
|
838
847
|
});
|
|
848
|
+
|
|
839
849
|
describe('Pause ================', () => {
|
|
840
850
|
it('Should pause a automation by key', async () => {
|
|
841
851
|
const pausedKeys = await handler.pause('testInstance/testBU', 'automation', [
|
|
842
852
|
'testExisting_automation_pause',
|
|
843
853
|
]);
|
|
844
|
-
assert.equal(process.exitCode,
|
|
854
|
+
assert.equal(process.exitCode, 0, 'pause should not have thrown an error');
|
|
845
855
|
assert.equal(
|
|
846
856
|
pausedKeys['testInstance/testBU']?.length,
|
|
847
857
|
1,
|
|
@@ -854,10 +864,11 @@ describe('type: automation', () => {
|
|
|
854
864
|
);
|
|
855
865
|
return;
|
|
856
866
|
});
|
|
867
|
+
|
|
857
868
|
it('Should pause a automation selected via --like', async () => {
|
|
858
869
|
handler.setOptions({ like: { key: 'testExisting_a%n_pause' } });
|
|
859
870
|
const pausedKeys = await handler.pause('testInstance/testBU', 'automation');
|
|
860
|
-
assert.equal(process.exitCode,
|
|
871
|
+
assert.equal(process.exitCode, 0, 'pause should not have thrown an error');
|
|
861
872
|
assert.equal(
|
|
862
873
|
pausedKeys['testInstance/testBU']?.length,
|
|
863
874
|
1,
|
|
@@ -870,12 +881,13 @@ describe('type: automation', () => {
|
|
|
870
881
|
);
|
|
871
882
|
return;
|
|
872
883
|
});
|
|
884
|
+
|
|
873
885
|
it('Should not pause automation because key and --like was specified', async () => {
|
|
874
886
|
handler.setOptions({ like: { key: 'testExisting_a%n_pause' } });
|
|
875
887
|
const pausedKeys = await handler.pause('testInstance/testBU', 'automation', [
|
|
876
888
|
'testExisting_automation_pause',
|
|
877
889
|
]);
|
|
878
|
-
assert.equal(process.exitCode,
|
|
890
|
+
assert.equal(process.exitCode, 1, 'pause should have thrown an error');
|
|
879
891
|
assert.equal(
|
|
880
892
|
Object.keys(pausedKeys).length,
|
|
881
893
|
0,
|