mcdev 4.3.4 → 5.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/.coverage-comment-template.md +20 -0
- package/.coverage-comment-template.svelte +178 -0
- package/.eslintrc.json +2 -0
- package/.github/ISSUE_TEMPLATE/bug.yml +1 -0
- package/.github/workflows/code-test.yml +36 -0
- package/.github/workflows/coverage-base-update.yml +57 -0
- package/.github/workflows/coverage-develop-branch.yml +41 -0
- package/.github/workflows/coverage-main-branch.yml +41 -0
- package/.github/workflows/coverage.yml +77 -0
- package/.husky/post-checkout +1 -1
- package/.prettierrc +1 -1
- package/.vscode/extensions.json +0 -4
- package/boilerplate/config.json +1 -1
- package/boilerplate/files/.prettierrc +1 -1
- package/boilerplate/files/.vscode/extensions.json +1 -1
- package/boilerplate/forcedUpdates.json +4 -0
- package/docs/dist/documentation.md +1196 -430
- package/lib/Builder.js +6 -1
- package/lib/Deployer.js +30 -5
- package/lib/MetadataTypeDefinitions.js +8 -6
- package/lib/MetadataTypeInfo.js +8 -6
- package/lib/cli.js +54 -42
- package/lib/index.js +82 -8
- package/lib/metadataTypes/Asset.js +73 -1
- package/lib/metadataTypes/AttributeGroup.js +0 -1
- package/lib/metadataTypes/Automation.js +48 -5
- package/lib/metadataTypes/Campaign.js +20 -7
- package/lib/metadataTypes/ContentArea.js +1 -1
- package/lib/metadataTypes/DataExtension.js +221 -184
- package/lib/metadataTypes/DataExtensionField.js +12 -19
- package/lib/metadataTypes/DataExtensionTemplate.js +1 -1
- package/lib/metadataTypes/DataExtract.js +1 -1
- package/lib/metadataTypes/DataExtractType.js +1 -1
- package/lib/metadataTypes/Email.js +1 -1
- package/lib/metadataTypes/{EmailSendDefinition.js → EmailSend.js} +5 -5
- package/lib/metadataTypes/{EventDefinition.js → Event.js} +17 -35
- package/lib/metadataTypes/{FtpLocation.js → FileLocation.js} +2 -2
- package/lib/metadataTypes/FileTransfer.js +8 -7
- package/lib/metadataTypes/Filter.js +1 -1
- package/lib/metadataTypes/Folder.js +8 -3
- package/lib/metadataTypes/ImportFile.js +6 -6
- package/lib/metadataTypes/{Interaction.js → Journey.js} +311 -147
- package/lib/metadataTypes/List.js +2 -2
- package/lib/metadataTypes/MetadataType.js +318 -90
- package/lib/metadataTypes/MobileCode.js +0 -1
- package/lib/metadataTypes/MobileKeyword.js +336 -40
- package/lib/metadataTypes/MobileMessage.js +473 -0
- package/lib/metadataTypes/Query.js +114 -32
- package/lib/metadataTypes/Role.js +60 -21
- package/lib/metadataTypes/Script.js +2 -3
- package/lib/metadataTypes/SendClassification.js +40 -0
- package/lib/metadataTypes/SetDefinition.js +1 -7
- package/lib/metadataTypes/TransactionalEmail.js +2 -3
- package/lib/metadataTypes/TransactionalMessage.js +1 -2
- package/lib/metadataTypes/TransactionalSMS.js +8 -15
- package/lib/metadataTypes/{TriggeredSendDefinition.js → TriggeredSend.js} +35 -27
- package/lib/metadataTypes/User.js +1177 -0
- package/lib/metadataTypes/definitions/Asset.definition.js +1 -0
- package/lib/metadataTypes/definitions/AttributeGroup.definition.js +1 -0
- package/lib/metadataTypes/definitions/Automation.definition.js +3 -2
- package/lib/metadataTypes/definitions/Campaign.definition.js +79 -4
- package/lib/metadataTypes/definitions/ContentArea.definition.js +1 -0
- package/lib/metadataTypes/definitions/DataExtension.definition.js +2 -1
- package/lib/metadataTypes/definitions/DataExtensionField.definition.js +1 -0
- package/lib/metadataTypes/definitions/DataExtensionTemplate.definition.js +1 -0
- package/lib/metadataTypes/definitions/DataExtract.definition.js +1 -0
- package/lib/metadataTypes/definitions/DataExtractType.definition.js +1 -0
- package/lib/metadataTypes/definitions/Discovery.definition.js +1 -0
- package/lib/metadataTypes/definitions/Email.definition.js +1 -0
- package/lib/metadataTypes/definitions/{EmailSendDefinition.definition.js → EmailSend.definition.js} +4 -2
- package/lib/metadataTypes/definitions/{EventDefinition.definition.js → Event.definition.js} +2 -1
- package/lib/metadataTypes/definitions/{FtpLocation.definition.js → FileLocation.definition.js} +4 -3
- package/lib/metadataTypes/definitions/FileTransfer.definition.js +3 -2
- package/lib/metadataTypes/definitions/Filter.definition.js +1 -0
- package/lib/metadataTypes/definitions/Folder.definition.js +2 -0
- package/lib/metadataTypes/definitions/ImportFile.definition.js +4 -3
- package/lib/metadataTypes/definitions/{Interaction.definition.js → Journey.definition.js} +11 -2
- package/lib/metadataTypes/definitions/List.definition.js +1 -0
- package/lib/metadataTypes/definitions/MobileCode.definition.js +3 -1
- package/lib/metadataTypes/definitions/MobileKeyword.definition.js +27 -17
- package/lib/metadataTypes/definitions/MobileMessage.definition.js +743 -0
- package/lib/metadataTypes/definitions/Query.definition.js +3 -2
- package/lib/metadataTypes/definitions/Role.definition.js +5 -0
- package/lib/metadataTypes/definitions/Script.definition.js +1 -0
- package/lib/metadataTypes/definitions/SendClassification.definition.js +114 -0
- package/lib/metadataTypes/definitions/SetDefinition.definition.js +1 -0
- package/lib/metadataTypes/definitions/TransactionalEmail.definition.js +2 -1
- package/lib/metadataTypes/definitions/TransactionalPush.definition.js +1 -0
- package/lib/metadataTypes/definitions/TransactionalSMS.definition.js +1 -0
- package/lib/metadataTypes/definitions/{TriggeredSendDefinition.definition.js → TriggeredSend.definition.js} +5 -3
- package/lib/metadataTypes/definitions/User.definition.js +365 -0
- package/lib/retrieveChangelog.js +1 -2
- package/lib/util/auth.js +29 -9
- package/lib/util/businessUnit.js +3 -3
- package/lib/util/cli.js +55 -7
- package/lib/util/devops.js +6 -4
- package/lib/util/file.js +55 -13
- package/lib/util/init.config.js +1 -2
- package/lib/util/init.npm.js +3 -3
- package/lib/util/util.js +23 -14
- package/package.json +16 -15
- package/test/general.test.js +62 -0
- package/test/mockRoot/.mcdevrc.json +7 -5
- package/test/mockRoot/deploy/testInstance/_ParentBU_/user/testBlocked_user.user-meta.json +23 -0
- package/test/mockRoot/deploy/testInstance/_ParentBU_/user/testExisting_user.user-meta.json +31 -0
- package/test/mockRoot/deploy/testInstance/_ParentBU_/user/testNew_user.user-meta.json +27 -0
- package/test/mockRoot/deploy/testInstance/testBU/dataExtension/{childBU_dataextension_test.dataExtension-meta.json → testExisting_dataExtension.dataExtension-meta.json} +2 -2
- package/test/mockRoot/deploy/testInstance/testBU/dataExtension/{testDataExtension.dataExtension-meta.json → testNew_dataExtension.dataExtension-meta.json} +2 -2
- package/test/mockRoot/deploy/testInstance/testBU/journey/testExisting_interaction.interaction-meta.json +576 -0
- package/test/mockRoot/deploy/testInstance/testBU/mobileKeyword/testNew_keyword.mobileKeyword-meta.amp +2 -0
- package/test/mockRoot/deploy/testInstance/testBU/mobileKeyword/testNew_keyword.mobileKeyword-meta.json +10 -0
- package/test/mockRoot/deploy/testInstance/testBU/mobileKeyword/testNew_keyword_blocked.mobileKeyword-meta.amp +2 -0
- package/test/mockRoot/deploy/testInstance/testBU/mobileKeyword/testNew_keyword_blocked.mobileKeyword-meta.json +10 -0
- package/test/mockRoot/deploy/testInstance/testBU/mobileMessage/NTIzOjc4OjA.mobileMessage-meta.amp +1 -0
- package/test/mockRoot/deploy/testInstance/testBU/mobileMessage/NTIzOjc4OjA.mobileMessage-meta.json +61 -0
- package/test/mockRoot/deploy/testInstance/testBU/mobileMessage/new.mobileMessage-meta.amp +1 -0
- package/test/mockRoot/deploy/testInstance/testBU/mobileMessage/new.mobileMessage-meta.json +60 -0
- package/test/mockRoot/deploy/testInstance/testBU/query/testExistingQuery.query-meta.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/query/testNewQuery.query-meta.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/query/testNewQuery.query-meta.sql +1 -1
- 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/resourceFactory.js +13 -0
- package/test/resources/1111111/accountUser/configure-response.xml +70 -0
- package/test/resources/1111111/accountUser/create-response.xml +97 -0
- package/test/resources/1111111/accountUser/retrieve-response.xml +156 -0
- package/test/resources/1111111/accountUser/update-response.xml +111 -0
- package/test/resources/1111111/accountUserAccount/retrieve-response.xml +77 -0
- package/test/resources/1111111/platform/v1/setup/quickflow/data/get-response.json +455 -0
- package/test/resources/1111111/role/retrieve-response.xml +76 -0
- package/test/resources/1111111/user/build-expected.json +16 -0
- package/test/resources/1111111/user/create-expected.json +21 -0
- package/test/resources/1111111/user/retrieve-expected.json +24 -0
- package/test/resources/1111111/user/template-expected.json +16 -0
- package/test/resources/1111111/user/update-expected.json +21 -0
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat/delete-response.json +1 -0
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat/get-response.json +17 -0
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat/patch-response.json +3 -3
- package/test/resources/9999999/automation/v1/queries/get-response.json +21 -4
- package/test/resources/9999999/automation/v1/queries/post-response.json +4 -4
- package/test/resources/9999999/data/v1/customobjectdata/key/{childBU_dataextension_test → testExisting_dataExtension}/rowset/get-response.json +1 -1
- package/test/resources/9999999/dataExtension/build-expected.json +3 -3
- package/test/resources/9999999/dataExtension/create-expected.json +2 -2
- package/test/resources/9999999/dataExtension/create-response.xml +8 -3
- package/test/resources/9999999/dataExtension/retrieve-expected.json +3 -3
- package/test/resources/9999999/dataExtension/retrieve-response.xml +9 -4
- package/test/resources/9999999/dataExtension/template-expected.json +3 -3
- package/test/resources/9999999/dataExtension/update-expected.json +3 -3
- package/test/resources/9999999/dataExtension/update-response.xml +9 -4
- package/test/resources/9999999/dataExtensionField/retrieve-response.xml +14 -9
- package/test/resources/9999999/interaction/v1/interactions/get-response.json +312 -0
- package/test/resources/9999999/interaction/v1/interactions/key_testExisting_interaction/get-response.json +312 -0
- package/test/resources/9999999/interaction/v1/interactions/key_testExisting_interaction/put-response.json +592 -0
- package/test/resources/9999999/journey/build-expected.json +572 -0
- package/test/resources/9999999/journey/get-expected.json +576 -0
- package/test/resources/9999999/journey/put-expected.json +576 -0
- package/test/resources/9999999/journey/template-expected.json +572 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/keyword/NXV4ZFMwTEFwRVczd3RaLUF5X3p5dzo4Njow/get-response.json +42 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/keyword/cTVJaG5oSDJPVUNHcUh6Z3pQT2tVdzo4Njow/delete-response.json +0 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/keyword/get-response.json +1 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/keyword/post-response.json +3 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/message/NTIzOjc4OjA/delete-response.json +0 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/message/NTIzOjc4OjA/get-response.json +106 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/message/NTIzOjc4OjA/post-response.json +0 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/message/NTQ3Ojc4OjA/get-response.json +127 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/message/get-response.json +129 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/message/post-response.json +3 -0
- package/test/resources/9999999/legacy/v1/beta2/data/campaign/get-response.json +29 -0
- package/test/resources/9999999/messaging/v1/email/definitions/post-response.json +1 -1
- 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/mobileKeyword/build-expected.amp +2 -0
- package/test/resources/9999999/mobileKeyword/build-expected.json +9 -0
- package/test/resources/9999999/mobileKeyword/get-expected.amp +2 -0
- package/test/resources/9999999/mobileKeyword/get-expected.json +15 -0
- package/test/resources/9999999/mobileKeyword/post-create-expected.amp +2 -0
- package/test/resources/9999999/mobileKeyword/post-create-expected.json +17 -0
- package/test/resources/9999999/mobileKeyword/template-expected.amp +2 -0
- package/test/resources/9999999/mobileKeyword/template-expected.json +9 -0
- package/test/resources/9999999/mobileMessage/build-expected.amp +1 -0
- package/test/resources/9999999/mobileMessage/build-expected.json +60 -0
- package/test/resources/9999999/mobileMessage/get-expected.amp +1 -0
- package/test/resources/9999999/mobileMessage/get-expected.json +61 -0
- package/test/resources/9999999/mobileMessage/post-create-expected.amp +1 -0
- package/test/resources/9999999/mobileMessage/post-create-expected.json +63 -0
- package/test/resources/9999999/mobileMessage/post-update-expected.amp +1 -0
- package/test/resources/9999999/mobileMessage/post-update-expected.json +61 -0
- package/test/resources/9999999/mobileMessage/template-expected.amp +1 -0
- package/test/resources/9999999/mobileMessage/template-expected.json +60 -0
- package/test/resources/9999999/query/build-expected.json +1 -1
- package/test/resources/9999999/query/get-expected.json +1 -1
- package/test/resources/9999999/query/get2-expected.json +11 -0
- package/test/resources/9999999/query/patch-expected.json +1 -1
- package/test/resources/9999999/query/post-expected.json +1 -1
- package/test/resources/9999999/query/template-expected.json +1 -1
- package/test/resources/9999999/queryDefinition/retrieve-response.xml +30 -0
- package/test/resources/9999999/transactionalEmail/build-expected.json +5 -5
- package/test/resources/9999999/transactionalEmail/get-expected.json +1 -1
- package/test/resources/9999999/transactionalEmail/patch-expected.json +1 -1
- package/test/resources/9999999/transactionalEmail/post-expected.json +1 -1
- package/test/resources/9999999/transactionalEmail/template-expected.json +5 -5
- package/test/resources/9999999/transactionalPush/build-expected.json +2 -2
- package/test/resources/9999999/transactionalPush/template-expected.json +2 -2
- package/test/resources/9999999/transactionalSMS/build-expected.json +3 -3
- package/test/resources/9999999/transactionalSMS/template-expected.json +3 -3
- package/test/{dataExtension.test.js → type.dataExtension.test.js} +78 -21
- package/test/{interaction.test.js → type.journey.test.js} +64 -30
- package/test/type.mobileKeyword.test.js +250 -0
- package/test/type.mobileMessage.test.js +205 -0
- package/test/{query.test.js → type.query.test.js} +102 -5
- package/test/{transactionalEmail.test.js → type.transactionalEmail.test.js} +40 -2
- package/test/{transactionalPush.test.js → type.transactionalPush.test.js} +41 -2
- package/test/{transactionalSMS.test.js → type.transactionalSMS.test.js} +73 -3
- package/test/type.user.test.js +160 -0
- package/test/utils.js +17 -5
- package/types/mcdev.d.js +48 -15
- package/.github/workflows/code-analysis.yml +0 -57
- package/lib/metadataTypes/AccountUser.js +0 -426
- package/lib/metadataTypes/definitions/AccountUser.definition.js +0 -227
- package/test/mockRoot/deploy/testInstance/testBU/interaction/testExisting_interaction.interaction-meta.json +0 -266
- package/test/resources/9999999/interaction/build-expected.json +0 -260
- package/test/resources/9999999/interaction/get-expected.json +0 -264
- package/test/resources/9999999/interaction/put-expected.json +0 -264
- package/test/resources/9999999/interaction/template-expected.json +0 -260
- package/test/resources/9999999/interaction/v1/interactions/put-response.json +0 -280
- /package/test/mockRoot/deploy/testInstance/testBU/{interaction → journey}/testNew_interaction.interaction-meta.json +0 -0
- /package/test/resources/9999999/{interaction → journey}/post-expected.json +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "NTQ3Ojc4OjA",
|
|
3
|
+
"lastUpdated": "2023-03-28T13:16:00Z",
|
|
4
|
+
"type": "ExactTarget.Mobile.Sms.Core.Entities.SmsMessageEntity",
|
|
5
|
+
"name": "jb test 3",
|
|
6
|
+
"origin": "SMS Send",
|
|
7
|
+
"code": {
|
|
8
|
+
"code": "4912312345678"
|
|
9
|
+
},
|
|
10
|
+
"mtSendDate": "2017-07-03T14:03:00Z",
|
|
11
|
+
"template": {
|
|
12
|
+
"id": "Mzo4MDow",
|
|
13
|
+
"lastUpdated": "2023-03-28T13:15:58.354Z",
|
|
14
|
+
"name": "Outbound",
|
|
15
|
+
"description": "Send a SMS message to your subscribers",
|
|
16
|
+
"icon": "outbound.png"
|
|
17
|
+
},
|
|
18
|
+
"status": "Active/Scheduled",
|
|
19
|
+
"invalidMessage": "",
|
|
20
|
+
"responseMessage": "",
|
|
21
|
+
"publishedMessage": "Text '<keyword>' to 491771783703.",
|
|
22
|
+
"isTest": false,
|
|
23
|
+
"moTimezone": {
|
|
24
|
+
"offset": 1,
|
|
25
|
+
"name": "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna *"
|
|
26
|
+
},
|
|
27
|
+
"optinType": "NO_OPTIN",
|
|
28
|
+
"doubleOptinInitialMessage": "",
|
|
29
|
+
"doubleOptinConfirmMessage": "",
|
|
30
|
+
"optinMinimumAge": 0,
|
|
31
|
+
"optinInvalidAgeMessage": "",
|
|
32
|
+
"numberMessagesPerPeriod": 0,
|
|
33
|
+
"periodType": "NO_PERIOD",
|
|
34
|
+
"optinErrorMessage": "",
|
|
35
|
+
"isDuplicationAllowed": true,
|
|
36
|
+
"triggeredSendName": "OneUserOneDevice_DEV - 93",
|
|
37
|
+
"isTimeZoneBased": false,
|
|
38
|
+
"surveyType": "NO_SURVEY",
|
|
39
|
+
"surveyCorrectResponseMessage": "",
|
|
40
|
+
"surveyTooManyEntriesMessage": "",
|
|
41
|
+
"isExpireSet": false,
|
|
42
|
+
"expireHours": 0,
|
|
43
|
+
"surveyIncorrectResponseMessage": "",
|
|
44
|
+
"statusId": 2,
|
|
45
|
+
"doubleOptinValidResponses": "y|yes",
|
|
46
|
+
"messagesPerPeriod": 0,
|
|
47
|
+
"minutesPerPeriod": 0,
|
|
48
|
+
"subscriberResponseMessage": "",
|
|
49
|
+
"isSubscriberResponseToAnySubscriptionForShortCode": false,
|
|
50
|
+
"sendMethod": "API",
|
|
51
|
+
"messageObjectId": "X1pERmhqajlVMGkzMEdtVTJPYUxVZzo2MjU6MA",
|
|
52
|
+
"allowSingleOptin": false,
|
|
53
|
+
"duplicateOptInResponseMessage": "",
|
|
54
|
+
"isSentImmediately": true,
|
|
55
|
+
"isSuppressMt": false,
|
|
56
|
+
"smsTriggeredSendDefinitionId": "58d59e53-f85f-e711-80cc-1402ec7222b4",
|
|
57
|
+
"fromName": "PMI_DEV",
|
|
58
|
+
"concatenateMessage": false,
|
|
59
|
+
"isFromNameCertificationAccepted": false,
|
|
60
|
+
"isCertified": false,
|
|
61
|
+
"outboundSendTypeFlag": "Audience",
|
|
62
|
+
"outboundSendBehaviorFlag": "AutoAddSubscribers"
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test message jb new
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "NTIzOjc4OjA",
|
|
3
|
+
"lastUpdated": "2023-03-08T16:30:00Z",
|
|
4
|
+
"type": "ExactTarget.Mobile.Sms.Core.Entities.SmsMessageEntity",
|
|
5
|
+
"name": "testExisting_mobileMessage",
|
|
6
|
+
"origin": "SMS Send",
|
|
7
|
+
"code": {
|
|
8
|
+
"code": "4912312345678"
|
|
9
|
+
},
|
|
10
|
+
"c__campaignNames": ["testExisting_campaign"],
|
|
11
|
+
|
|
12
|
+
"mtSendDate": "2020-07-16T22:46:00Z",
|
|
13
|
+
"template": {
|
|
14
|
+
"id": "Mzo4MDow",
|
|
15
|
+
"name": "Outbound"
|
|
16
|
+
},
|
|
17
|
+
"status": "Active/Scheduled",
|
|
18
|
+
"invalidMessage": "",
|
|
19
|
+
"responseMessage": "",
|
|
20
|
+
"publishedMessage": "Text '<keyword>' to 4912312345678.",
|
|
21
|
+
"isTest": false,
|
|
22
|
+
"moTimezone": {
|
|
23
|
+
"offset": 1,
|
|
24
|
+
"name": "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna *"
|
|
25
|
+
},
|
|
26
|
+
"optinType": "NO_OPTIN",
|
|
27
|
+
"doubleOptinInitialMessage": "",
|
|
28
|
+
"doubleOptinConfirmMessage": "",
|
|
29
|
+
"optinMinimumAge": 0,
|
|
30
|
+
"optinInvalidAgeMessage": "",
|
|
31
|
+
"numberMessagesPerPeriod": 0,
|
|
32
|
+
"periodType": "NO_PERIOD",
|
|
33
|
+
"optinErrorMessage": "",
|
|
34
|
+
"isDuplicationAllowed": true,
|
|
35
|
+
"triggeredSendName": "DEV_InformUserAboutProposal - 267",
|
|
36
|
+
"isTimeZoneBased": false,
|
|
37
|
+
"surveyType": "NO_SURVEY",
|
|
38
|
+
"surveyCorrectResponseMessage": "",
|
|
39
|
+
"surveyTooManyEntriesMessage": "",
|
|
40
|
+
"isExpireSet": false,
|
|
41
|
+
"expireHours": 0,
|
|
42
|
+
"surveyIncorrectResponseMessage": "",
|
|
43
|
+
"statusId": 2,
|
|
44
|
+
"doubleOptinValidResponses": "y|yes",
|
|
45
|
+
"messagesPerPeriod": 0,
|
|
46
|
+
"minutesPerPeriod": 0,
|
|
47
|
+
"subscriberResponseMessage": "",
|
|
48
|
+
"isSubscriberResponseToAnySubscriptionForShortCode": false,
|
|
49
|
+
"sendMethod": "API",
|
|
50
|
+
"messageObjectId": "MzN3MUV5YVpmRVMtV1R1UXJUR3NzUTo2MjU6MA",
|
|
51
|
+
"allowSingleOptin": false,
|
|
52
|
+
"isSentImmediately": true,
|
|
53
|
+
"isSuppressMt": false,
|
|
54
|
+
"smsTriggeredSendDefinitionId": "39d0e022-b6c7-ea11-a2e9-1402ec938719",
|
|
55
|
+
"fromName": "4912312345678",
|
|
56
|
+
"concatenateMessage": true,
|
|
57
|
+
"isFromNameCertificationAccepted": false,
|
|
58
|
+
"isCertified": false,
|
|
59
|
+
"outboundSendTypeFlag": "Audience",
|
|
60
|
+
"outboundSendBehaviorFlag": "AutoAddSubscribers"
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test message jb {{{secret}}}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "NTIzOjc4OjA",
|
|
3
|
+
"type": "ExactTarget.Mobile.Sms.Core.Entities.SmsMessageEntity",
|
|
4
|
+
"name": "{{{prefix}}}mobileMessage",
|
|
5
|
+
"origin": "SMS Send",
|
|
6
|
+
"code": {
|
|
7
|
+
"code": "4912312345678"
|
|
8
|
+
},
|
|
9
|
+
"c__campaignNames": ["{{{prefix}}}campaign"],
|
|
10
|
+
|
|
11
|
+
"mtSendDate": "2020-07-16T22:46:00Z",
|
|
12
|
+
"template": {
|
|
13
|
+
"id": "Mzo4MDow",
|
|
14
|
+
"name": "Outbound"
|
|
15
|
+
},
|
|
16
|
+
"status": "Active/Scheduled",
|
|
17
|
+
"invalidMessage": "",
|
|
18
|
+
"responseMessage": "{{{description}}}",
|
|
19
|
+
"publishedMessage": "Text '<keyword>' to 4912312345678.",
|
|
20
|
+
"isTest": false,
|
|
21
|
+
"moTimezone": {
|
|
22
|
+
"offset": 1,
|
|
23
|
+
"name": "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna *"
|
|
24
|
+
},
|
|
25
|
+
"optinType": "NO_OPTIN",
|
|
26
|
+
"doubleOptinInitialMessage": "",
|
|
27
|
+
"doubleOptinConfirmMessage": "",
|
|
28
|
+
"optinMinimumAge": 0,
|
|
29
|
+
"optinInvalidAgeMessage": "",
|
|
30
|
+
"numberMessagesPerPeriod": 0,
|
|
31
|
+
"periodType": "NO_PERIOD",
|
|
32
|
+
"optinErrorMessage": "",
|
|
33
|
+
"isDuplicationAllowed": true,
|
|
34
|
+
"triggeredSendName": "DEV_InformUserAboutProposal - 267",
|
|
35
|
+
"isTimeZoneBased": false,
|
|
36
|
+
"surveyType": "NO_SURVEY",
|
|
37
|
+
"surveyCorrectResponseMessage": "",
|
|
38
|
+
"surveyTooManyEntriesMessage": "",
|
|
39
|
+
"isExpireSet": false,
|
|
40
|
+
"expireHours": 0,
|
|
41
|
+
"surveyIncorrectResponseMessage": "",
|
|
42
|
+
"statusId": 2,
|
|
43
|
+
"doubleOptinValidResponses": "y|yes",
|
|
44
|
+
"messagesPerPeriod": 0,
|
|
45
|
+
"minutesPerPeriod": 0,
|
|
46
|
+
"subscriberResponseMessage": "",
|
|
47
|
+
"isSubscriberResponseToAnySubscriptionForShortCode": false,
|
|
48
|
+
"sendMethod": "API",
|
|
49
|
+
"messageObjectId": "MzN3MUV5YVpmRVMtV1R1UXJUR3NzUTo2MjU6MA",
|
|
50
|
+
"allowSingleOptin": false,
|
|
51
|
+
"isSentImmediately": true,
|
|
52
|
+
"isSuppressMt": false,
|
|
53
|
+
"smsTriggeredSendDefinitionId": "39d0e022-b6c7-ea11-a2e9-1402ec938719",
|
|
54
|
+
"fromName": "4912312345678",
|
|
55
|
+
"concatenateMessage": true,
|
|
56
|
+
"isFromNameCertificationAccepted": false,
|
|
57
|
+
"isCertified": false,
|
|
58
|
+
"outboundSendTypeFlag": "Audience",
|
|
59
|
+
"outboundSendBehaviorFlag": "AutoAddSubscribers"
|
|
60
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "testExistingQuery",
|
|
3
3
|
"key": "testExistingQuery",
|
|
4
4
|
"description": "bla bla",
|
|
5
|
-
"targetKey": "
|
|
5
|
+
"targetKey": "testExisting_dataExtension",
|
|
6
6
|
"createdDate": "2022-04-26T15:21:16.453",
|
|
7
7
|
"modifiedDate": "2022-04-26T16:02:44.01",
|
|
8
8
|
"targetUpdateTypeName": "Overwrite",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "testExistingQuery2",
|
|
3
|
+
"key": "testExistingQuery2",
|
|
4
|
+
"description": "bla bla",
|
|
5
|
+
"targetKey": "testExisting_dataExtension",
|
|
6
|
+
"createdDate": "2022-04-26T15:21:16.453",
|
|
7
|
+
"modifiedDate": "2022-04-26T16:02:44.01",
|
|
8
|
+
"targetUpdateTypeName": "Overwrite",
|
|
9
|
+
"r__folder_Path": "Query",
|
|
10
|
+
"isFrozen": false
|
|
11
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "testExistingQuery",
|
|
3
3
|
"key": "testExistingQuery",
|
|
4
4
|
"description": "updated on deploy",
|
|
5
|
-
"targetKey": "
|
|
5
|
+
"targetKey": "testExisting_dataExtension",
|
|
6
6
|
"createdDate": "2022-04-26T15:21:16.453",
|
|
7
7
|
"modifiedDate": "2022-04-26T16:04:15.88",
|
|
8
8
|
"targetUpdateTypeName": "Overwrite",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "testNewQuery",
|
|
3
3
|
"key": "testNewQuery",
|
|
4
4
|
"description": "created on deploy",
|
|
5
|
-
"targetKey": "
|
|
5
|
+
"targetKey": "testExisting_dataExtension",
|
|
6
6
|
"createdDate": "2022-04-26T15:21:16.453",
|
|
7
7
|
"modifiedDate": "2022-04-26T16:04:15.88",
|
|
8
8
|
"targetUpdateTypeName": "Overwrite",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
5
|
+
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
|
|
6
|
+
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
|
|
7
|
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
|
|
8
|
+
<soap:Header>
|
|
9
|
+
<wsa:Action>RetrieveResponse</wsa:Action>
|
|
10
|
+
<wsa:MessageID>urn:uuid:7ef0345e-b559-4fc4-8986-47e54e1a8a58</wsa:MessageID>
|
|
11
|
+
<wsa:RelatesTo>urn:uuid:b2e814a6-517c-4882-9bbb-238bfce951ce</wsa:RelatesTo>
|
|
12
|
+
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
|
|
13
|
+
<wsse:Security>
|
|
14
|
+
<wsu:Timestamp wsu:Id="Timestamp-dfc4ae59-8642-4432-b505-554669b47186">
|
|
15
|
+
<wsu:Created>2023-04-11T16:33:48Z</wsu:Created>
|
|
16
|
+
<wsu:Expires>2023-04-11T16:38:48Z</wsu:Expires>
|
|
17
|
+
</wsu:Timestamp>
|
|
18
|
+
</wsse:Security>
|
|
19
|
+
</soap:Header>
|
|
20
|
+
<soap:Body>
|
|
21
|
+
<RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
|
|
22
|
+
<OverallStatus>OK</OverallStatus>
|
|
23
|
+
<RequestID>e8eb2988-2f43-4243-a6b0-6ab6b841a6ab</RequestID>
|
|
24
|
+
<Results xsi:type="QueryDefinition">
|
|
25
|
+
<PartnerKey xsi:nil="true" />
|
|
26
|
+
<ObjectID>549f0568-607c-4940-afef-437965094dat</ObjectID>
|
|
27
|
+
</Results>
|
|
28
|
+
</RetrieveResponseMsg>
|
|
29
|
+
</soap:Body>
|
|
30
|
+
</soap:Envelope>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"definitionKey": "
|
|
2
|
+
"name": "testTemplated_temail",
|
|
3
|
+
"definitionKey": "testTemplated_temail",
|
|
4
4
|
"description": "foobar",
|
|
5
5
|
"classification": "Default Transactional",
|
|
6
6
|
"status": "Active",
|
|
7
7
|
"content": {
|
|
8
|
-
"customerKey": "
|
|
8
|
+
"customerKey": "testTemplated_asset_message"
|
|
9
9
|
},
|
|
10
10
|
"subscriptions": {
|
|
11
|
-
"dataExtension": "
|
|
11
|
+
"dataExtension": "testTemplated_dataExtension",
|
|
12
12
|
"autoAddSubscriber": true,
|
|
13
13
|
"updateSubscriber": true,
|
|
14
14
|
"r__list_PathName": "my subscribers/All Subscribers"
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"trackLinks": true
|
|
18
18
|
},
|
|
19
19
|
"journey": {
|
|
20
|
-
"interactionKey": "
|
|
20
|
+
"interactionKey": "testTemplated_interaction"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"customerKey": "testExisting_asset_message"
|
|
11
11
|
},
|
|
12
12
|
"subscriptions": {
|
|
13
|
-
"dataExtension": "
|
|
13
|
+
"dataExtension": "testExisting_dataExtension",
|
|
14
14
|
"autoAddSubscriber": true,
|
|
15
15
|
"updateSubscriber": true,
|
|
16
16
|
"r__list_PathName": "my subscribers/All Subscribers"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"customerKey": "testExisting_asset_message"
|
|
11
11
|
},
|
|
12
12
|
"subscriptions": {
|
|
13
|
-
"dataExtension": "
|
|
13
|
+
"dataExtension": "testExisting_dataExtension",
|
|
14
14
|
"autoAddSubscriber": true,
|
|
15
15
|
"updateSubscriber": true,
|
|
16
16
|
"r__list_PathName": "my subscribers/All Subscribers"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"customerKey": "testExisting_asset_message"
|
|
11
11
|
},
|
|
12
12
|
"subscriptions": {
|
|
13
|
-
"dataExtension": "
|
|
13
|
+
"dataExtension": "testExisting_dataExtension",
|
|
14
14
|
"autoAddSubscriber": true,
|
|
15
15
|
"updateSubscriber": true,
|
|
16
16
|
"r__list_PathName": "my subscribers/All Subscribers"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"definitionKey": "
|
|
2
|
+
"name": "{{{prefix}}}temail",
|
|
3
|
+
"definitionKey": "{{{prefix}}}temail",
|
|
4
4
|
"description": "{{{description}}}",
|
|
5
5
|
"classification": "Default Transactional",
|
|
6
6
|
"status": "Active",
|
|
7
7
|
"content": {
|
|
8
|
-
"customerKey": "
|
|
8
|
+
"customerKey": "{{{prefix}}}asset_message"
|
|
9
9
|
},
|
|
10
10
|
"subscriptions": {
|
|
11
|
-
"dataExtension": "
|
|
11
|
+
"dataExtension": "{{{prefix}}}dataExtension",
|
|
12
12
|
"autoAddSubscriber": true,
|
|
13
13
|
"updateSubscriber": true,
|
|
14
14
|
"r__list_PathName": "my subscribers/All Subscribers"
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"trackLinks": true
|
|
18
18
|
},
|
|
19
19
|
"journey": {
|
|
20
|
-
"interactionKey": "
|
|
20
|
+
"interactionKey": "{{{prefix}}}interaction"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"definitionKey": "
|
|
2
|
+
"name": "testTemplated_tpush",
|
|
3
|
+
"definitionKey": "testTemplated_tpush",
|
|
4
4
|
"description": "foobar. note that applicationId can only be manually set up in Setup - Mobile Push",
|
|
5
5
|
"applicationId": "ffbab4c9-fbf6-4b87-9c9a-10c6ce86e81d",
|
|
6
6
|
"content": { "customerKey": "mobileMessage_testTarget" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"definitionKey": "
|
|
2
|
+
"name": "{{{prefix}}}tpush",
|
|
3
|
+
"definitionKey": "{{{prefix}}}tpush",
|
|
4
4
|
"description": "{{{description}}}. note that applicationId can only be manually set up in Setup - Mobile Push",
|
|
5
5
|
"applicationId": "ffbab4c9-fbf6-4b87-9c9a-10c6ce86e81d",
|
|
6
6
|
"content": { "customerKey": "mobileMessage{{{suffix}}}" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"definitionKey": "
|
|
2
|
+
"name": "testTemplated_tsms",
|
|
3
|
+
"definitionKey": "testTemplated_tsms",
|
|
4
4
|
"description": "foobar",
|
|
5
5
|
"status": "Active",
|
|
6
6
|
"subscriptions": {
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
"countryCode": "",
|
|
9
9
|
"autoAddSubscriber": true,
|
|
10
10
|
"updateSubscriber": true,
|
|
11
|
-
"keyword": "
|
|
11
|
+
"keyword": "testTemplated_keyword"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"definitionKey": "
|
|
2
|
+
"name": "{{{prefix}}}tsms",
|
|
3
|
+
"definitionKey": "{{{prefix}}}tsms",
|
|
4
4
|
"description": "{{{description}}}",
|
|
5
5
|
"status": "Active",
|
|
6
6
|
"subscriptions": {
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
"countryCode": "",
|
|
9
9
|
"autoAddSubscriber": true,
|
|
10
10
|
"updateSubscriber": true,
|
|
11
|
-
"keyword": "
|
|
11
|
+
"keyword": "{{{prefix}}}keyword"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ const cache = require('../lib/util/cache');
|
|
|
3
3
|
const testUtils = require('./utils');
|
|
4
4
|
const handler = require('../lib/index');
|
|
5
5
|
|
|
6
|
-
describe('dataExtension', () => {
|
|
6
|
+
describe('type: dataExtension', () => {
|
|
7
7
|
beforeEach(() => {
|
|
8
8
|
testUtils.mockSetup();
|
|
9
9
|
});
|
|
@@ -11,10 +11,11 @@ describe('dataExtension', () => {
|
|
|
11
11
|
testUtils.mockReset();
|
|
12
12
|
});
|
|
13
13
|
describe('Retrieve ================', () => {
|
|
14
|
-
it('Should retrieve a
|
|
14
|
+
it('Should retrieve a dataExtension', async () => {
|
|
15
15
|
// WHEN
|
|
16
16
|
await handler.retrieve('testInstance/testBU', ['dataExtension']);
|
|
17
17
|
// THEN
|
|
18
|
+
assert.equal(process.exitCode, false, 'retrieve should not have thrown an error');
|
|
18
19
|
// get results from cache
|
|
19
20
|
const result = cache.getCache();
|
|
20
21
|
assert.equal(
|
|
@@ -23,7 +24,7 @@ describe('dataExtension', () => {
|
|
|
23
24
|
'only one dataExtension expected'
|
|
24
25
|
);
|
|
25
26
|
assert.deepEqual(
|
|
26
|
-
await testUtils.getActualJson('
|
|
27
|
+
await testUtils.getActualJson('testExisting_dataExtension', 'dataExtension'),
|
|
27
28
|
await testUtils.getExpectedJson('9999999', 'dataExtension', 'retrieve'),
|
|
28
29
|
|
|
29
30
|
'returned metadata was not equal expected'
|
|
@@ -40,27 +41,28 @@ describe('dataExtension', () => {
|
|
|
40
41
|
beforeEach(() => {
|
|
41
42
|
testUtils.mockSetup(true);
|
|
42
43
|
});
|
|
43
|
-
it('Should create &
|
|
44
|
+
it('Should create & update a dataExtension', async () => {
|
|
44
45
|
// WHEN
|
|
45
46
|
await handler.deploy('testInstance/testBU', ['dataExtension']);
|
|
46
47
|
// THEN
|
|
48
|
+
assert.equal(process.exitCode, false, 'deploy should not have thrown an error');
|
|
47
49
|
|
|
48
50
|
// get results from cache
|
|
49
51
|
const result = cache.getCache();
|
|
50
52
|
assert.equal(
|
|
51
53
|
result.dataExtension ? Object.keys(result.dataExtension).length : 0,
|
|
52
54
|
2,
|
|
53
|
-
'two
|
|
55
|
+
'two dataExtensions expected'
|
|
54
56
|
);
|
|
55
57
|
// insert
|
|
56
58
|
assert.deepEqual(
|
|
57
|
-
await testUtils.getActualJson('
|
|
59
|
+
await testUtils.getActualJson('testNew_dataExtension', 'dataExtension'),
|
|
58
60
|
await testUtils.getExpectedJson('9999999', 'dataExtension', 'create'),
|
|
59
61
|
'returned metadata was not equal expected for create'
|
|
60
62
|
);
|
|
61
63
|
// update
|
|
62
64
|
assert.deepEqual(
|
|
63
|
-
await testUtils.getActualJson('
|
|
65
|
+
await testUtils.getActualJson('testExisting_dataExtension', 'dataExtension'),
|
|
64
66
|
await testUtils.getExpectedJson('9999999', 'dataExtension', 'update'),
|
|
65
67
|
'returned metadata was not equal expected for update'
|
|
66
68
|
);
|
|
@@ -71,6 +73,7 @@ describe('dataExtension', () => {
|
|
|
71
73
|
);
|
|
72
74
|
return;
|
|
73
75
|
});
|
|
76
|
+
it('Should change the key during update via --changeKeyValue');
|
|
74
77
|
});
|
|
75
78
|
describe('Templating ================', () => {
|
|
76
79
|
it('Should create a dataExtension template via retrieveAsTemplate and build it', async () => {
|
|
@@ -78,9 +81,14 @@ describe('dataExtension', () => {
|
|
|
78
81
|
const result = await handler.retrieveAsTemplate(
|
|
79
82
|
'testInstance/testBU',
|
|
80
83
|
'dataExtension',
|
|
81
|
-
['
|
|
84
|
+
['testExisting_dataExtension'],
|
|
82
85
|
'testSourceMarket'
|
|
83
86
|
);
|
|
87
|
+
assert.equal(
|
|
88
|
+
process.exitCode,
|
|
89
|
+
false,
|
|
90
|
+
'retrieveAsTemplate should not have thrown an error'
|
|
91
|
+
);
|
|
84
92
|
|
|
85
93
|
// WHEN
|
|
86
94
|
assert.equal(
|
|
@@ -90,7 +98,7 @@ describe('dataExtension', () => {
|
|
|
90
98
|
);
|
|
91
99
|
assert.deepEqual(
|
|
92
100
|
await testUtils.getActualTemplateJson(
|
|
93
|
-
'
|
|
101
|
+
'testExisting_dataExtension',
|
|
94
102
|
'dataExtension'
|
|
95
103
|
),
|
|
96
104
|
await testUtils.getExpectedJson('9999999', 'dataExtension', 'template'),
|
|
@@ -100,14 +108,16 @@ describe('dataExtension', () => {
|
|
|
100
108
|
await handler.buildDefinition(
|
|
101
109
|
'testInstance/testBU',
|
|
102
110
|
'dataExtension',
|
|
103
|
-
'
|
|
111
|
+
'testExisting_dataExtension',
|
|
104
112
|
'testTargetMarket'
|
|
105
113
|
);
|
|
114
|
+
assert.equal(
|
|
115
|
+
process.exitCode,
|
|
116
|
+
false,
|
|
117
|
+
'buildDefinition should not have thrown an error'
|
|
118
|
+
);
|
|
106
119
|
assert.deepEqual(
|
|
107
|
-
await testUtils.getActualDeployJson(
|
|
108
|
-
'childBU_dataextension_testTarget',
|
|
109
|
-
'dataExtension'
|
|
110
|
-
),
|
|
120
|
+
await testUtils.getActualDeployJson('testTemplated_dataExtension', 'dataExtension'),
|
|
111
121
|
await testUtils.getExpectedJson('9999999', 'dataExtension', 'build'),
|
|
112
122
|
'returned deployment file was not equal expected'
|
|
113
123
|
);
|
|
@@ -125,9 +135,10 @@ describe('dataExtension', () => {
|
|
|
125
135
|
const result = await handler.buildTemplate(
|
|
126
136
|
'testInstance/testBU',
|
|
127
137
|
'dataExtension',
|
|
128
|
-
['
|
|
138
|
+
['testExisting_dataExtension'],
|
|
129
139
|
'testSourceMarket'
|
|
130
140
|
);
|
|
141
|
+
assert.equal(process.exitCode, false, 'buildTemplate should not have thrown an error');
|
|
131
142
|
// WHEN
|
|
132
143
|
assert.equal(
|
|
133
144
|
result.dataExtension ? Object.keys(result.dataExtension).length : 0,
|
|
@@ -136,7 +147,7 @@ describe('dataExtension', () => {
|
|
|
136
147
|
);
|
|
137
148
|
assert.deepEqual(
|
|
138
149
|
await testUtils.getActualTemplateJson(
|
|
139
|
-
'
|
|
150
|
+
'testExisting_dataExtension',
|
|
140
151
|
'dataExtension'
|
|
141
152
|
),
|
|
142
153
|
await testUtils.getExpectedJson('9999999', 'dataExtension', 'template'),
|
|
@@ -146,15 +157,17 @@ describe('dataExtension', () => {
|
|
|
146
157
|
await handler.buildDefinition(
|
|
147
158
|
'testInstance/testBU',
|
|
148
159
|
'dataExtension',
|
|
149
|
-
'
|
|
160
|
+
'testExisting_dataExtension',
|
|
150
161
|
'testTargetMarket'
|
|
151
162
|
);
|
|
163
|
+
assert.equal(
|
|
164
|
+
process.exitCode,
|
|
165
|
+
false,
|
|
166
|
+
'buildDefinition should not have thrown an error'
|
|
167
|
+
);
|
|
152
168
|
|
|
153
169
|
assert.deepEqual(
|
|
154
|
-
await testUtils.getActualDeployJson(
|
|
155
|
-
'childBU_dataextension_testTarget',
|
|
156
|
-
'dataExtension'
|
|
157
|
-
),
|
|
170
|
+
await testUtils.getActualDeployJson('testTemplated_dataExtension', 'dataExtension'),
|
|
158
171
|
await testUtils.getExpectedJson('9999999', 'dataExtension', 'build'),
|
|
159
172
|
'returned deployment file was not equal expected'
|
|
160
173
|
);
|
|
@@ -166,4 +179,48 @@ describe('dataExtension', () => {
|
|
|
166
179
|
return;
|
|
167
180
|
});
|
|
168
181
|
});
|
|
182
|
+
describe('Delete ================', () => {
|
|
183
|
+
// TODO: add this test
|
|
184
|
+
it('Should delete the item'); // , async () => {
|
|
185
|
+
// // WHEN
|
|
186
|
+
// const result = await handler.deleteByKey('testInstance/testBU', 'mobileKeyword', [
|
|
187
|
+
// 'testExisting_keyword',
|
|
188
|
+
// ]);
|
|
189
|
+
// // THEN
|
|
190
|
+
// assert.equal(process.exitCode, false, 'delete should not have thrown an error');
|
|
191
|
+
|
|
192
|
+
// assert.equal(result, true, 'should have deleted the item');
|
|
193
|
+
// return;
|
|
194
|
+
// });
|
|
195
|
+
});
|
|
196
|
+
describe('CI/CD ================', () => {
|
|
197
|
+
// TODO: add this test
|
|
198
|
+
it('Should return a list of files based on their type and key'); // , async () => {
|
|
199
|
+
// // WHEN
|
|
200
|
+
// const fileList = await handler.getFilesToCommit(
|
|
201
|
+
// 'testInstance/testBU',
|
|
202
|
+
// 'mobileKeyword',
|
|
203
|
+
// ['testExisting_keyword']
|
|
204
|
+
// );
|
|
205
|
+
// // THEN
|
|
206
|
+
// assert.equal(
|
|
207
|
+
// process.exitCode,
|
|
208
|
+
// false,
|
|
209
|
+
// 'getFilesToCommit should not have thrown an error'
|
|
210
|
+
// );
|
|
211
|
+
// assert.equal(fileList.length, 2, 'expected only 2 file paths');
|
|
212
|
+
|
|
213
|
+
// assert.equal(
|
|
214
|
+
// fileList[0].split('\\').join('/'),
|
|
215
|
+
// 'retrieve/testInstance/testBU/mobileKeyword/testExisting_keyword.mobileKeyword-meta.json',
|
|
216
|
+
// 'wrong JSON path'
|
|
217
|
+
// );
|
|
218
|
+
// assert.equal(
|
|
219
|
+
// fileList[1].split('\\').join('/'),
|
|
220
|
+
// 'retrieve/testInstance/testBU/mobileKeyword/testExisting_keyword.mobileKeyword-meta.amp',
|
|
221
|
+
// 'wrong AMP path'
|
|
222
|
+
// );
|
|
223
|
+
// return;
|
|
224
|
+
// });
|
|
225
|
+
});
|
|
169
226
|
});
|