mcdev 7.9.0 → 7.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/.github/ISSUE_TEMPLATE/bug.yml +2 -0
  2. package/@types/lib/index.d.ts +4 -4
  3. package/@types/lib/index.d.ts.map +1 -1
  4. package/@types/lib/metadataTypes/Asset.d.ts +8 -0
  5. package/@types/lib/metadataTypes/Asset.d.ts.map +1 -1
  6. package/@types/lib/metadataTypes/Automation.d.ts +62 -51
  7. package/@types/lib/metadataTypes/Automation.d.ts.map +1 -1
  8. package/@types/lib/metadataTypes/DataExtract.d.ts +13 -2
  9. package/@types/lib/metadataTypes/DataExtract.d.ts.map +1 -1
  10. package/@types/lib/metadataTypes/Event.d.ts +8 -0
  11. package/@types/lib/metadataTypes/Event.d.ts.map +1 -1
  12. package/@types/lib/metadataTypes/ImportFile.d.ts.map +1 -1
  13. package/@types/lib/metadataTypes/Journey.d.ts.map +1 -1
  14. package/@types/lib/metadataTypes/MetadataType.d.ts +27 -4
  15. package/@types/lib/metadataTypes/MetadataType.d.ts.map +1 -1
  16. package/@types/lib/metadataTypes/MobileKeyword.d.ts +8 -6
  17. package/@types/lib/metadataTypes/MobileKeyword.d.ts.map +1 -1
  18. package/@types/lib/metadataTypes/MobileMessage.d.ts +8 -0
  19. package/@types/lib/metadataTypes/MobileMessage.d.ts.map +1 -1
  20. package/@types/lib/metadataTypes/SenderProfile.d.ts +3 -1
  21. package/@types/lib/metadataTypes/SenderProfile.d.ts.map +1 -1
  22. package/@types/lib/metadataTypes/Verification.d.ts +12 -5
  23. package/@types/lib/metadataTypes/Verification.d.ts.map +1 -1
  24. package/@types/lib/metadataTypes/definitions/Automation.definition.d.ts +37 -1
  25. package/@types/lib/metadataTypes/definitions/DataExtract.definition.d.ts +21 -3
  26. package/@types/lib/metadataTypes/definitions/SenderProfile.definition.d.ts +3 -1
  27. package/@types/lib/metadataTypes/definitions/Verification.definition.d.ts +10 -0
  28. package/@types/lib/util/util.d.ts +1 -0
  29. package/@types/lib/util/util.d.ts.map +1 -1
  30. package/@types/lib/util/validations.d.ts.map +1 -1
  31. package/@types/types/mcdev.d.d.ts +36 -0
  32. package/@types/types/mcdev.d.d.ts.map +1 -1
  33. package/boilerplate/files/eslint.config.js +30 -27
  34. package/boilerplate/forcedUpdates.json +4 -0
  35. package/lib/index.js +14 -7
  36. package/lib/metadataTypes/Asset.js +4 -5
  37. package/lib/metadataTypes/Automation.js +202 -417
  38. package/lib/metadataTypes/DataExtension.js +1 -1
  39. package/lib/metadataTypes/DataExtract.js +41 -6
  40. package/lib/metadataTypes/DomainVerification.js +1 -1
  41. package/lib/metadataTypes/EmailSend.js +3 -3
  42. package/lib/metadataTypes/Event.js +39 -20
  43. package/lib/metadataTypes/FileTransfer.js +5 -5
  44. package/lib/metadataTypes/ImportFile.js +9 -7
  45. package/lib/metadataTypes/Journey.js +4 -9
  46. package/lib/metadataTypes/MetadataType.js +98 -62
  47. package/lib/metadataTypes/MobileKeyword.js +4 -54
  48. package/lib/metadataTypes/MobileMessage.js +4 -2
  49. package/lib/metadataTypes/Query.js +5 -5
  50. package/lib/metadataTypes/Script.js +5 -5
  51. package/lib/metadataTypes/SendClassification.js +3 -3
  52. package/lib/metadataTypes/SenderProfile.js +3 -3
  53. package/lib/metadataTypes/TransactionalEmail.js +1 -1
  54. package/lib/metadataTypes/TransactionalMessage.js +1 -1
  55. package/lib/metadataTypes/TriggeredSend.js +3 -3
  56. package/lib/metadataTypes/Verification.js +95 -59
  57. package/lib/metadataTypes/definitions/Automation.definition.js +43 -7
  58. package/lib/metadataTypes/definitions/DataExtract.definition.js +16 -3
  59. package/lib/metadataTypes/definitions/DomainVerification.definition.js +1 -1
  60. package/lib/metadataTypes/definitions/SenderProfile.definition.js +3 -1
  61. package/lib/metadataTypes/definitions/Verification.definition.js +8 -2
  62. package/lib/util/util.js +12 -0
  63. package/lib/util/validations.js +3 -1
  64. package/package.json +1 -1
  65. package/test/general.test.js +39 -34
  66. package/test/mockRoot/.mcdevrc.json +1 -1
  67. package/test/mockRoot/deploy/testInstance/testBU/automation/testNew_automation.automation-meta.json +1 -1
  68. package/test/mockRoot/deploy/testInstance/testBU/verification/{testExisting_39f6a488-20eb-4ba0-b0b9.verification-meta.json → testExisting_automation__s1.7.verification-meta.json} +1 -1
  69. package/test/mockRoot/deploy/testInstance/testBU/verification/{testNew_39f6a488-20eb-4ba0-b0b9.verification-meta.json → testNew_automation__s1.7.verification-meta.json} +1 -1
  70. package/test/resourceFactory.js +8 -5
  71. package/test/resources/9999999/automation/build-expected.json +1 -1
  72. package/test/resources/9999999/automation/clone-expected.json +1 -1
  73. package/test/resources/9999999/automation/create-callout-expected.json +1 -1
  74. package/test/resources/9999999/automation/create-expected.json +3 -2
  75. package/test/resources/9999999/automation/create-testNew_automation-expected.md +1 -1
  76. package/test/resources/9999999/automation/retrieve-expected.json +8 -2
  77. package/test/resources/9999999/automation/retrieve-testExisting_automation-expected.md +1 -1
  78. package/test/resources/9999999/automation/retrieve-wait-expected.json +7 -1
  79. package/test/resources/9999999/automation/template-expected.json +1 -1
  80. package/test/resources/9999999/automation/update-expected.json +24 -2
  81. package/test/resources/9999999/automation/update-testExisting_automation-expected.md +5 -2
  82. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_pause/patch-response.json +1 -0
  83. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_schedule/patch-response.json +1 -0
  84. package/test/resources/9999999/dataExtract/build-expected.json +2 -2
  85. package/test/resources/9999999/dataExtract/get-expected.json +2 -2
  86. package/test/resources/9999999/dataExtract/patch-expected.json +2 -2
  87. package/test/resources/9999999/dataExtract/post-expected.json +2 -2
  88. package/test/resources/9999999/dataExtract/template-expected.json +2 -2
  89. package/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow-PAUSED/get-response.json +3 -0
  90. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/NewRkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow/get-response.json +29 -0
  91. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow/get-response.json +50 -0
  92. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow-PAUSED/get-response.json +51 -0
  93. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/bHF6Q0Q3b1VXa21OdVQzZFQ0ckVSQToyNTow/get-response.json +7 -1
  94. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/cDhLQ2o2NExxVVc5N3VZeHF5WEExUToyNTow/get-response.json +79 -0
  95. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/get-response.json +61 -2
  96. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/post-response-pauseSchedule.json +1 -0
  97. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/post-response-schedule.json +1 -0
  98. package/test/resources/9999999/messaging/v1/domainverification/get-response.json +10 -1
  99. package/test/resources/9999999/senderProfile/build-expected.json +1 -1
  100. package/test/resources/9999999/senderProfile/get-expected.json +1 -1
  101. package/test/resources/9999999/senderProfile/patch-expected.json +1 -1
  102. package/test/resources/9999999/senderProfile/retrieve-response.xml +1 -1
  103. package/test/resources/9999999/senderProfile/template-expected.json +1 -1
  104. package/test/resources/9999999/verification/build-expected.json +1 -1
  105. package/test/resources/9999999/verification/get-expected.json +1 -1
  106. package/test/resources/9999999/verification/patch-expected.json +1 -1
  107. package/test/resources/9999999/verification/post-expected.json +1 -1
  108. package/test/resources/9999999/verification/template-expected.json +1 -1
  109. package/test/type.automation.test.js +21 -20
  110. package/test/type.dataExtract.test.js +4 -4
  111. package/test/type.domainVerification.test.js +3 -3
  112. package/test/type.journey.test.js +11 -4
  113. package/test/type.query.test.js +2 -2
  114. package/test/type.script.test.js +1 -1
  115. package/test/type.senderProfile.test.js +20 -3
  116. package/test/type.triggeredSend.test.js +13 -1
  117. package/test/type.verification.test.js +7 -13
  118. package/test/utils.js +3 -1
  119. package/types/mcdev.d.js +9 -0
  120. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +0 -52
  121. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-ad2e-pause-response.xml +0 -38
  122. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-fixKey_pause-response.xml +0 -52
  123. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-fixKey_schedule-response.xml +0 -52
  124. package/test/resources/9999999/automation/schedule-a8afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +0 -52
@@ -29,6 +29,7 @@ import cache from '../util/cache.js';
29
29
  * @augments MetadataType
30
30
  */
31
31
  class Verification extends MetadataType {
32
+ static verificationIdKeyMap;
32
33
  /**
33
34
  * Retrieves Metadata of Data Verification Activity.
34
35
  *
@@ -39,51 +40,63 @@ class Verification extends MetadataType {
39
40
  * @returns {Promise.<MetadataTypeMapObj>} Promise of metadata
40
41
  */
41
42
  static async retrieve(retrieveDir, _, __, key) {
42
- let paramArr = [];
43
- if (key?.startsWith('id:')) {
44
- paramArr = [key.slice(3)];
45
- } else if (key) {
46
- paramArr = [key];
43
+ const paramArr = [];
44
+ let automationKey;
45
+ if (key) {
46
+ const regex = /^(.*?)__s\d{1,3}\.\d{1,3}$/;
47
+ const match = key.match(regex);
48
+ if (match) {
49
+ // automation key found
50
+ automationKey = match[1];
51
+ } else {
52
+ // invalid key, unset it
53
+ Util.logger.error(`Invalid key: ${key}`);
54
+ return;
55
+ }
47
56
  }
48
- if (!paramArr.length) {
49
- // there is no API endpoint to retrieve all dataVerification items, so we need to retrieve all automations and iterate over their activities
50
- Util.logger.info(` - Caching dependent Metadata: automation`);
51
- Automation.client = this.client;
52
- Automation.buObject = this.buObject;
53
- Automation.properties = this.properties;
54
- Automation._skipNotificationRetrieve = true;
55
- delete Automation._cachedMetadataMap;
56
- const automationsMapObj = await Automation.retrieve();
57
- delete Automation._skipNotificationRetrieve;
58
- if (automationsMapObj?.metadata && Object.keys(automationsMapObj?.metadata).length) {
59
- if (!key) {
60
- // if we are not retrieving a single item, cache the automations for later use during retrieval of automations
61
- Automation._cachedMetadataMap = automationsMapObj?.metadata;
62
- }
63
- // automations found, lets iterate over their activities to find the dataVerification items
64
- const dataVerificationIds = [];
65
- for (const automation of Object.values(automationsMapObj.metadata)) {
66
- if (automation.steps) {
67
- for (const step of automation.steps) {
68
- for (const activity of step.activities) {
69
- if (
70
- activity.objectTypeId === 1000 &&
71
- activity.activityObjectId &&
72
- activity.activityObjectId !==
73
- '00000000-0000-0000-0000-000000000000'
74
- ) {
75
- dataVerificationIds.push(activity.activityObjectId);
76
- }
57
+ const results = {};
58
+ // there is no API endpoint to retrieve all dataVerification items, so we need to retrieve all automations and iterate over their activities
59
+ Util.logger.info(` - Caching dependent Metadata: automation`);
60
+ Automation.client = this.client;
61
+ Automation.buObject = this.buObject;
62
+ Automation.properties = this.properties;
63
+ Automation._skipNotificationRetrieve = true;
64
+ delete Automation._cachedMetadataMap;
65
+ const automationsMapObj = automationKey
66
+ ? await Automation.retrieve(undefined, undefined, undefined, automationKey)
67
+ : await Automation.retrieve();
68
+ delete Automation._skipNotificationRetrieve;
69
+ if (automationsMapObj?.metadata && Object.keys(automationsMapObj?.metadata).length) {
70
+ if (!key) {
71
+ // if we are not retrieving a single item, cache the automations for later use during retrieval of automations
72
+ Automation._cachedMetadataMap = automationsMapObj?.metadata;
73
+ }
74
+ // automations found, lets iterate over their activities to find the dataVerification items
75
+ this.verificationIdKeyMap = {};
76
+ for (const automation of Object.values(automationsMapObj.metadata)) {
77
+ if (automation.steps) {
78
+ for (const step of automation.steps) {
79
+ // ideally one would use activity.displayOrder here but that doesnt always start at 1 nor is it always sequential. To avoid cross-BU issues, we use a custom order
80
+ let order = 1;
81
+ for (const activity of step.activities) {
82
+ if (
83
+ activity.objectTypeId === 1000 &&
84
+ activity.activityObjectId &&
85
+ activity.activityObjectId !== '00000000-0000-0000-0000-000000000000'
86
+ ) {
87
+ // log the verification id
88
+ this.verificationIdKeyMap[activity.activityObjectId] =
89
+ `${automation.key}__s${step.step}.${order}`;
77
90
  }
91
+ order++;
78
92
  }
79
93
  }
80
94
  }
81
- if (dataVerificationIds.length) {
82
- paramArr.push(...dataVerificationIds);
83
- }
95
+ }
96
+ if (Object.keys(this.verificationIdKeyMap).length) {
97
+ paramArr.push(...Object.keys(this.verificationIdKeyMap));
84
98
  }
85
99
  }
86
- const results = {};
87
100
  if (paramArr.length) {
88
101
  const response = await this.retrieveRESTcollection(
89
102
  paramArr.map((id) => ({ id, uri: '/automation/v1/dataverifications/' + id })),
@@ -131,7 +144,7 @@ class Verification extends MetadataType {
131
144
  }
132
145
 
133
146
  /**
134
- * Retrieves Metadata of Data Extract Activity for caching
147
+ * Retrieves Metadata of item for caching
135
148
  *
136
149
  * @returns {Promise.<MetadataTypeMapObj>} Promise of metadata
137
150
  */
@@ -140,9 +153,9 @@ class Verification extends MetadataType {
140
153
  }
141
154
 
142
155
  /**
143
- * Creates a single Data Extract
156
+ * Creates a single item
144
157
  *
145
- * @param {VerificationItem} metadata a single Data Extract
158
+ * @param {VerificationItem} metadata a single item
146
159
  * @returns {Promise} Promise
147
160
  */
148
161
  static create(metadata) {
@@ -161,31 +174,41 @@ class Verification extends MetadataType {
161
174
  if (!apiResponse?.[this.definition.idField]) {
162
175
  return;
163
176
  }
164
- Util.logger.warn(
165
- ` - ${this.definition.type} ${
166
- metadataEntryWithAllFields?.[this.definition.idField]
167
- }: new key ${
168
- apiResponse?.[this.definition.idField]
169
- } automatically assigned during creation`
170
- );
177
+ // update apiResponse to ensure the new metadata is saved correctly on disk
178
+ apiResponse[this.definition.keyField] =
179
+ metadataEntryWithAllFields?.[this.definition.keyField];
180
+
181
+ // update info on metadataEntry to allow for proper logs
182
+ metadataEntry[this.definition.keyField] =
183
+ metadataEntryWithAllFields?.[this.definition.keyField];
171
184
  metadataEntry[this.definition.idField] = apiResponse?.[this.definition.idField];
172
185
 
173
- // map structure: cred/bu --> type --> old key --> new key
174
- const buName = this.buObject.credential + '/' + this.buObject.businessUnit;
175
- Automation.createdKeyMap ||= {};
176
- Automation.createdKeyMap[buName] ||= {};
177
- Automation.createdKeyMap[buName][this.definition.type] ||= {};
178
- Automation.createdKeyMap[buName][this.definition.type][
179
- metadataEntryWithAllFields[this.definition.idField]
180
- ] = metadataEntry[this.definition.idField];
186
+ return apiResponse;
187
+ }
188
+ /**
189
+ * helper for {@link MetadataType.updateREST} and {@link MetadataType.updateSOAP}
190
+ *
191
+ * @param {MetadataTypeItem} metadataEntry a single metadata Entry
192
+ * @param {object} apiResponse varies depending on the API call
193
+ * @param {MetadataTypeItem} metadataEntryWithAllFields like metadataEntry but before non-creatable fields were stripped
194
+ * @returns {Promise.<object>} apiResponse, potentially modified
195
+ */
196
+ static postUpdateTasks(metadataEntry, apiResponse, metadataEntryWithAllFields) {
197
+ // update apiResponse to ensure the new metadata is saved correctly on disk
198
+ apiResponse[this.definition.keyField] =
199
+ metadataEntryWithAllFields?.[this.definition.keyField];
181
200
 
201
+ // update info on metadataEntry to allow for proper logs
202
+ metadataEntry[this.definition.keyField] =
203
+ metadataEntryWithAllFields?.[this.definition.keyField];
204
+ metadataEntry[this.definition.idField] = apiResponse?.[this.definition.idField];
182
205
  return apiResponse;
183
206
  }
184
207
 
185
208
  /**
186
- * Updates a single Data Extract
209
+ * Updates a single item
187
210
  *
188
- * @param {VerificationItem} metadata a single Data Extract
211
+ * @param {VerificationItem} metadata a single item
189
212
  * @returns {Promise} Promise
190
213
  */
191
214
  static update(metadata) {
@@ -209,9 +232,22 @@ class Verification extends MetadataType {
209
232
  'ObjectID'
210
233
  );
211
234
  delete metadata.r__dataExtension_key;
235
+
212
236
  return metadata;
213
237
  }
214
238
 
239
+ /**
240
+ * helper for {@link parseResponseBody} that creates a custom key field for this type based on mobileCode and keyword
241
+ *
242
+ * @param {MetadataTypeItem} metadata single item
243
+ */
244
+ static createCustomKeyField(metadata) {
245
+ if (this.verificationIdKeyMap[metadata[this.definition.idField]]) {
246
+ metadata[this.definition.keyField] =
247
+ this.verificationIdKeyMap[metadata[this.definition.idField]];
248
+ }
249
+ }
250
+
215
251
  /**
216
252
  * parses retrieved Metadata before saving
217
253
  *
@@ -257,7 +293,7 @@ class Verification extends MetadataType {
257
293
  * @returns {Promise.<boolean>} deletion success status
258
294
  */
259
295
  static deleteByKey(key) {
260
- return super.deleteByKeyREST('/automation/v1/dataverifications/' + key, key);
296
+ return super.deleteByKeyREST('/automation/v1/dataverifications/' + key, key, 400);
261
297
  }
262
298
  }
263
299
 
@@ -53,10 +53,10 @@ export default {
53
53
  keyField: 'key',
54
54
  nameField: 'name',
55
55
  folderIdField: 'categoryId',
56
- createdDateField: 'createdDate', // only returned by upsert
57
- createdNameField: 'createdByName', // only returned by upsert
58
- lastmodDateField: 'lastSavedDate', // only returned by upsert
59
- lastmodNameField: 'lastSavedByName', // only returned by upsert
56
+ createdDateField: 'createdDate', // only returned by upsert & legacy
57
+ createdNameField: 'createdName', // only returned by upsert & legacy
58
+ lastmodDateField: 'modifiedDate', // only returned by upsert & legacy
59
+ lastmodNameField: 'modifiedName', // only returned by upsert & legacy
60
60
  restPagination: true,
61
61
  maxKeyLength: 200, // confirmed max length
62
62
  scheduleTypeMapping: {
@@ -371,16 +371,46 @@ export default {
371
371
  retrieving: false, // only returned by upsert
372
372
  template: false,
373
373
  },
374
- createdDate: {
374
+ createdByName: {
375
375
  isCreateable: false,
376
376
  isUpdateable: false,
377
377
  retrieving: false, // only returned by upsert
378
378
  template: false,
379
379
  },
380
- createdByName: {
380
+ createdDate: {
381
+ isCreateable: false,
382
+ isUpdateable: false,
383
+ retrieving: true, // only returned by upsert + legacy
384
+ template: false,
385
+ },
386
+ createdName: {
381
387
  isCreateable: false,
382
388
  isUpdateable: false,
383
- retrieving: false, // only returned by upsertt
389
+ retrieving: true, // only returned by legacy
390
+ template: false,
391
+ },
392
+ modifiedDate: {
393
+ isCreateable: false,
394
+ isUpdateable: false,
395
+ retrieving: true, // only returned by legacy
396
+ template: false,
397
+ },
398
+ modifiedName: {
399
+ isCreateable: false,
400
+ isUpdateable: false,
401
+ retrieving: true, // only returned by legacy
402
+ template: false,
403
+ },
404
+ pausedDate: {
405
+ isCreateable: false,
406
+ isUpdateable: false,
407
+ retrieving: true, // only returned by legacy
408
+ template: false,
409
+ },
410
+ pausedName: {
411
+ isCreateable: false,
412
+ isUpdateable: false,
413
+ retrieving: true, // only returned by legacy
384
414
  template: false,
385
415
  },
386
416
  updateInProgress: {
@@ -515,6 +545,12 @@ export default {
515
545
  retrieving: false,
516
546
  template: false,
517
547
  },
548
+ 'schedule.scheduleTypeId': {
549
+ isCreateable: false,
550
+ isUpdateable: false,
551
+ retrieving: false,
552
+ template: false,
553
+ },
518
554
  status: {
519
555
  isCreateable: true,
520
556
  isUpdateable: true,
@@ -1,7 +1,9 @@
1
1
  export default {
2
2
  bodyIteratorField: 'items',
3
- dependencies: ['dataExtractType', 'user'],
4
- dependencyGraph: null, // dataExtractType cannot be deployed
3
+ dependencies: ['dataExtension', 'dataExtractType', 'user'],
4
+ dependencyGraph: {
5
+ dataExtension: ['r__dataExtension_key'],
6
+ },
5
7
  hasExtended: true,
6
8
  idField: 'dataExtractDefinitionId',
7
9
  keyIsFixed: false,
@@ -100,6 +102,17 @@ export default {
100
102
  retrieving: true,
101
103
  template: true,
102
104
  },
103
- r__dataExtractType_name: { skipValidation: true },
105
+ r__dataExtractType_name: {
106
+ isCreateable: false,
107
+ isUpdateable: false,
108
+ retrieving: true,
109
+ template: true,
110
+ },
111
+ r__dataExtension_key: {
112
+ isCreateable: false,
113
+ isUpdateable: false,
114
+ retrieving: true,
115
+ template: true,
116
+ },
104
117
  },
105
118
  };
@@ -16,7 +16,7 @@ export default {
16
16
  type: 'domainVerification',
17
17
  typeDescription: 'Domains emails that are verified for sending',
18
18
  typeRetrieveByDefault: true,
19
- typeCdpByDefault: false,
19
+ typeCdpByDefault: true,
20
20
  typeName: 'Domain Verification',
21
21
  fields: {
22
22
  domain: {
@@ -1,7 +1,9 @@
1
1
  export default {
2
2
  bodyIteratorField: 'Results',
3
3
  dependencies: ['user', 'domainVerification'],
4
- dependencyGraph: null,
4
+ dependencyGraph: {
5
+ domainVerification: ['FallbackFromAddress', 'FromAddress'],
6
+ },
5
7
  filter: {},
6
8
  hasExtended: false,
7
9
  idField: 'ObjectID',
@@ -5,12 +5,12 @@ export default {
5
5
  hasExtended: false,
6
6
  idField: 'dataVerificationDefinitionId',
7
7
  keyIsFixed: true,
8
- keyField: 'dataVerificationDefinitionId',
8
+ keyField: 'c__automation_step',
9
9
  createdDateField: null,
10
10
  createdNameField: 'createdBy',
11
11
  lastmodDateField: null,
12
12
  lastmodNameField: null,
13
- nameField: 'dataVerificationDefinitionId',
13
+ nameField: 'c__automation_step',
14
14
  restPagination: false,
15
15
  maxKeyLength: 36, // confirmed max length
16
16
  type: 'verification',
@@ -86,5 +86,11 @@ export default {
86
86
  retrieving: true,
87
87
  template: true,
88
88
  },
89
+ c__automation_step: {
90
+ isCreateable: false,
91
+ isUpdateable: false,
92
+ retrieving: true,
93
+ template: true,
94
+ },
89
95
  },
90
96
  };
package/lib/util/util.js CHANGED
@@ -1317,6 +1317,18 @@ export const Util = {
1317
1317
  return acc;
1318
1318
  }, {});
1319
1319
  },
1320
+ /**
1321
+ * helper for MetadataType class to issue a similar error message for unsupported methods
1322
+ *
1323
+ * @param {any} definition type definition object
1324
+ * @param {string} method name of the method thats not supported
1325
+ * @param {MetadataTypeItem} [item] metadata item
1326
+ */
1327
+ notSupportedError: function (definition, method, item) {
1328
+ Util.logger.error(
1329
+ ` ☇ skipping ${item ? Util.getTypeKeyName(definition, item) : definition.type}: ${method} is not supported yet for ${definition.type}`
1330
+ );
1331
+ },
1320
1332
  };
1321
1333
 
1322
1334
  Util.startLogger(false, true);
@@ -111,7 +111,9 @@ export default async function validation(definition, item, targetDir, codeExtrac
111
111
  const doNotEvaluate = ['automation', 'attributeSet', 'list'];
112
112
  if (
113
113
  doNotEvaluate.includes(definition.type) ||
114
- (definition.type === 'asset' && item?.assetType?.name === 'webpage')
114
+ (definition.type === 'asset' && item?.assetType?.name === 'webpage') ||
115
+ (definition.type === 'dataExtension' &&
116
+ item.r__folder_Path === 'Synchronized Data Extensions')
115
117
  ) {
116
118
  // this subtype is not visible in the interface and hence always technically sits in the root
117
119
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcdev",
3
- "version": "7.9.0",
3
+ "version": "7.10.1",
4
4
  "description": "Accenture Salesforce Marketing Cloud DevTools",
5
5
  "author": "Accenture: joern.berkefeld, douglas.midgley, robert.zimmermann, maciej.barnas",
6
6
  "license": "MIT",
@@ -378,7 +378,7 @@ describe('GENERAL', () => {
378
378
  );
379
379
  assert.equal(
380
380
  testUtils.getAPIHistoryLength(),
381
- 6,
381
+ 9,
382
382
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
383
383
  );
384
384
  });
@@ -512,7 +512,7 @@ describe('GENERAL', () => {
512
512
  assert.equal(deployedTypes[0], 'dataExtract', 'deploy should have returned 1 type');
513
513
  assert.equal(
514
514
  testUtils.getAPIHistoryLength(),
515
- 10,
515
+ 13,
516
516
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
517
517
  );
518
518
  });
@@ -777,7 +777,7 @@ describe('GENERAL', () => {
777
777
  // download first before we test buildTemplate
778
778
  await handler.retrieve('testInstance/testBU', ['automation', 'query']);
779
779
 
780
- const expectedApiCallsRetrieve = 31;
780
+ const expectedApiCallsRetrieve = 35;
781
781
  assert.equal(
782
782
  testUtils.getAPIHistoryLength(),
783
783
  expectedApiCallsRetrieve,
@@ -882,7 +882,7 @@ describe('GENERAL', () => {
882
882
  });
883
883
 
884
884
  it('buildTemplate + buildDefinition for multiple types with keys and --retrieve', async () => {
885
- const expectedApiCallsRetrieve = 31;
885
+ const expectedApiCallsRetrieve = 32;
886
886
 
887
887
  // preparation
888
888
  const argvMetadata = [
@@ -987,7 +987,7 @@ describe('GENERAL', () => {
987
987
  // download first before we test buildTemplate
988
988
  await handler.retrieve('testInstance/testBU');
989
989
 
990
- const expectedApiCallsRetrieve = 93;
990
+ const expectedApiCallsRetrieve = 97;
991
991
  assert.equal(
992
992
  testUtils.getAPIHistoryLength(),
993
993
  expectedApiCallsRetrieve,
@@ -1025,15 +1025,16 @@ describe('GENERAL', () => {
1025
1025
  Object.keys(templateResult),
1026
1026
  [
1027
1027
  'automation',
1028
- 'query',
1028
+ 'dataExtension',
1029
1029
  'dataExtract',
1030
+ 'domainVerification',
1030
1031
  'emailSend',
1031
- 'dataExtension',
1032
- 'sendClassification',
1033
- 'senderProfile',
1034
1032
  'fileTransfer',
1035
1033
  'importFile',
1034
+ 'query',
1036
1035
  'script',
1036
+ 'sendClassification',
1037
+ 'senderProfile',
1037
1038
  'verification',
1038
1039
  ],
1039
1040
  'did not create deployment packages for all relevant types'
@@ -1145,15 +1146,16 @@ describe('GENERAL', () => {
1145
1146
  Object.keys(templateResult),
1146
1147
  [
1147
1148
  'automation',
1148
- 'query',
1149
+ 'dataExtension',
1149
1150
  'dataExtract',
1151
+ 'domainVerification',
1150
1152
  'emailSend',
1151
- 'dataExtension',
1152
- 'sendClassification',
1153
- 'senderProfile',
1154
1153
  'fileTransfer',
1155
1154
  'importFile',
1155
+ 'query',
1156
1156
  'script',
1157
+ 'sendClassification',
1158
+ 'senderProfile',
1157
1159
  'verification',
1158
1160
  ],
1159
1161
  'did not create deployment packages for all relevant types'
@@ -1227,7 +1229,7 @@ describe('GENERAL', () => {
1227
1229
  await testUtils.getActualDeployFile('testTemplated_query', 'query', 'sql')
1228
1230
  ).to.equal(await testUtils.getExpectedFile('9999999', 'query', 'build', 'sql'));
1229
1231
 
1230
- const expectedApiCallsRetrieve = 97;
1232
+ const expectedApiCallsRetrieve = 101;
1231
1233
  assert.equal(
1232
1234
  testUtils.getAPIHistoryLength(),
1233
1235
  expectedApiCallsRetrieve,
@@ -1239,7 +1241,7 @@ describe('GENERAL', () => {
1239
1241
  // download first before we test buildTemplate
1240
1242
  await handler.retrieve('testInstance/testBU', ['automation', 'query']);
1241
1243
 
1242
- const expectedApiCallsRetrieve = 31;
1244
+ const expectedApiCallsRetrieve = 35;
1243
1245
  assert.equal(
1244
1246
  testUtils.getAPIHistoryLength(),
1245
1247
  expectedApiCallsRetrieve,
@@ -1431,7 +1433,7 @@ describe('GENERAL', () => {
1431
1433
  // download first before we test buildTemplate
1432
1434
  await handler.retrieve('testInstance/testBU', ['automation', 'query']);
1433
1435
 
1434
- const expectedApiCallsRetrieve = 31;
1436
+ const expectedApiCallsRetrieve = 35;
1435
1437
  assert.equal(
1436
1438
  testUtils.getAPIHistoryLength(),
1437
1439
  expectedApiCallsRetrieve,
@@ -1502,7 +1504,7 @@ describe('GENERAL', () => {
1502
1504
  // download first before we test buildTemplate
1503
1505
  await handler.retrieve('testInstance/testBU', ['automation', 'query']);
1504
1506
 
1505
- const expectedApiCallsRetrieve = 31;
1507
+ const expectedApiCallsRetrieve = 35;
1506
1508
  assert.equal(
1507
1509
  testUtils.getAPIHistoryLength(),
1508
1510
  expectedApiCallsRetrieve,
@@ -1601,7 +1603,7 @@ describe('GENERAL', () => {
1601
1603
  // download everything before we test buildTemplate
1602
1604
  await handler.retrieve('testInstance/testBU');
1603
1605
 
1604
- const expectedApiCallsRetrieve = 93;
1606
+ const expectedApiCallsRetrieve = 97;
1605
1607
  assert.equal(
1606
1608
  testUtils.getAPIHistoryLength(),
1607
1609
  expectedApiCallsRetrieve,
@@ -1660,15 +1662,16 @@ describe('GENERAL', () => {
1660
1662
  Object.keys(definitionResult),
1661
1663
  [
1662
1664
  'automation',
1663
- 'query',
1665
+ 'dataExtension',
1664
1666
  'dataExtract',
1667
+ 'domainVerification',
1665
1668
  'emailSend',
1666
- 'dataExtension',
1667
- 'sendClassification',
1668
- 'senderProfile',
1669
1669
  'fileTransfer',
1670
1670
  'importFile',
1671
+ 'query',
1671
1672
  'script',
1673
+ 'sendClassification',
1674
+ 'senderProfile',
1672
1675
  'verification',
1673
1676
  ],
1674
1677
  'did not create deployment packages for all relevant types'
@@ -1767,15 +1770,16 @@ describe('GENERAL', () => {
1767
1770
  Object.keys(definitionResult),
1768
1771
  [
1769
1772
  'automation',
1770
- 'query',
1773
+ 'dataExtension',
1771
1774
  'dataExtract',
1775
+ 'domainVerification',
1772
1776
  'emailSend',
1773
- 'dataExtension',
1774
- 'sendClassification',
1775
- 'senderProfile',
1776
1777
  'fileTransfer',
1777
1778
  'importFile',
1779
+ 'query',
1778
1780
  'script',
1781
+ 'sendClassification',
1782
+ 'senderProfile',
1779
1783
  'verification',
1780
1784
  ],
1781
1785
  'did not create deployment packages for all relevant types'
@@ -1810,7 +1814,7 @@ describe('GENERAL', () => {
1810
1814
  await testUtils.getActualDeployFile('testTemplated_query', 'query', 'sql')
1811
1815
  ).to.equal(await testUtils.getExpectedFile('9999999', 'query', 'build', 'sql'));
1812
1816
 
1813
- const expectedApiCallsRetrieve = 97;
1817
+ const expectedApiCallsRetrieve = 101;
1814
1818
  assert.equal(
1815
1819
  testUtils.getAPIHistoryLength(),
1816
1820
  expectedApiCallsRetrieve,
@@ -1822,7 +1826,7 @@ describe('GENERAL', () => {
1822
1826
  // download first before we test buildTemplate
1823
1827
  await handler.retrieve('testInstance/testBU', ['automation', 'query']);
1824
1828
 
1825
- const expectedApiCallsRetrieve = 31;
1829
+ const expectedApiCallsRetrieve = 35;
1826
1830
  assert.equal(
1827
1831
  testUtils.getAPIHistoryLength(),
1828
1832
  expectedApiCallsRetrieve,
@@ -2001,7 +2005,7 @@ describe('GENERAL', () => {
2001
2005
  // download first before we test buildTemplate
2002
2006
  await handler.retrieve('testInstance/testBU');
2003
2007
 
2004
- const expectedApiCallsRetrieve = 93;
2008
+ const expectedApiCallsRetrieve = 97;
2005
2009
  assert.equal(
2006
2010
  testUtils.getAPIHistoryLength(),
2007
2011
  expectedApiCallsRetrieve,
@@ -2061,15 +2065,16 @@ describe('GENERAL', () => {
2061
2065
  Object.keys(definitionResult),
2062
2066
  [
2063
2067
  'automation',
2064
- 'query',
2068
+ 'dataExtension',
2065
2069
  'dataExtract',
2070
+ 'domainVerification',
2066
2071
  'emailSend',
2067
- 'dataExtension',
2068
- 'sendClassification',
2069
- 'senderProfile',
2070
2072
  'fileTransfer',
2071
2073
  'importFile',
2074
+ 'query',
2072
2075
  'script',
2076
+ 'sendClassification',
2077
+ 'senderProfile',
2073
2078
  'verification',
2074
2079
  ],
2075
2080
  'did not create deployment packages for all relevant types'
@@ -2503,7 +2508,7 @@ describe('GENERAL', () => {
2503
2508
  );
2504
2509
  assert.equal(
2505
2510
  testUtils.getAPIHistoryLength(),
2506
- 9,
2511
+ 12,
2507
2512
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
2508
2513
  );
2509
2514
  });
@@ -175,5 +175,5 @@
175
175
  "verification"
176
176
  ]
177
177
  },
178
- "version": "7.9.0"
178
+ "version": "7.10.1"
179
179
  }