mcdev 7.10.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 (98) hide show
  1. package/.github/ISSUE_TEMPLATE/bug.yml +1 -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.map +1 -1
  5. package/@types/lib/metadataTypes/Automation.d.ts +62 -51
  6. package/@types/lib/metadataTypes/Automation.d.ts.map +1 -1
  7. package/@types/lib/metadataTypes/DataExtract.d.ts +13 -2
  8. package/@types/lib/metadataTypes/DataExtract.d.ts.map +1 -1
  9. package/@types/lib/metadataTypes/Event.d.ts +8 -0
  10. package/@types/lib/metadataTypes/Event.d.ts.map +1 -1
  11. package/@types/lib/metadataTypes/ImportFile.d.ts.map +1 -1
  12. package/@types/lib/metadataTypes/Journey.d.ts.map +1 -1
  13. package/@types/lib/metadataTypes/MetadataType.d.ts +19 -3
  14. package/@types/lib/metadataTypes/MetadataType.d.ts.map +1 -1
  15. package/@types/lib/metadataTypes/MobileMessage.d.ts.map +1 -1
  16. package/@types/lib/metadataTypes/SenderProfile.d.ts +3 -1
  17. package/@types/lib/metadataTypes/SenderProfile.d.ts.map +1 -1
  18. package/@types/lib/metadataTypes/definitions/Automation.definition.d.ts +37 -1
  19. package/@types/lib/metadataTypes/definitions/DataExtract.definition.d.ts +21 -3
  20. package/@types/lib/metadataTypes/definitions/SenderProfile.definition.d.ts +3 -1
  21. package/@types/lib/util/util.d.ts +1 -0
  22. package/@types/lib/util/util.d.ts.map +1 -1
  23. package/@types/lib/util/validations.d.ts.map +1 -1
  24. package/@types/types/mcdev.d.d.ts +32 -0
  25. package/@types/types/mcdev.d.d.ts.map +1 -1
  26. package/lib/index.js +14 -7
  27. package/lib/metadataTypes/Asset.js +4 -5
  28. package/lib/metadataTypes/Automation.js +202 -399
  29. package/lib/metadataTypes/DataExtension.js +1 -1
  30. package/lib/metadataTypes/DataExtract.js +41 -6
  31. package/lib/metadataTypes/DomainVerification.js +1 -1
  32. package/lib/metadataTypes/EmailSend.js +3 -3
  33. package/lib/metadataTypes/Event.js +39 -20
  34. package/lib/metadataTypes/FileTransfer.js +5 -5
  35. package/lib/metadataTypes/ImportFile.js +9 -7
  36. package/lib/metadataTypes/Journey.js +4 -9
  37. package/lib/metadataTypes/MetadataType.js +80 -58
  38. package/lib/metadataTypes/MobileKeyword.js +2 -2
  39. package/lib/metadataTypes/MobileMessage.js +4 -2
  40. package/lib/metadataTypes/Query.js +5 -5
  41. package/lib/metadataTypes/Script.js +5 -5
  42. package/lib/metadataTypes/SendClassification.js +3 -3
  43. package/lib/metadataTypes/SenderProfile.js +3 -3
  44. package/lib/metadataTypes/TransactionalEmail.js +1 -1
  45. package/lib/metadataTypes/TransactionalMessage.js +1 -1
  46. package/lib/metadataTypes/TriggeredSend.js +3 -3
  47. package/lib/metadataTypes/Verification.js +1 -1
  48. package/lib/metadataTypes/definitions/Automation.definition.js +43 -7
  49. package/lib/metadataTypes/definitions/DataExtract.definition.js +16 -3
  50. package/lib/metadataTypes/definitions/DomainVerification.definition.js +1 -1
  51. package/lib/metadataTypes/definitions/SenderProfile.definition.js +3 -1
  52. package/lib/util/util.js +12 -0
  53. package/lib/util/validations.js +3 -1
  54. package/package.json +1 -1
  55. package/test/general.test.js +39 -34
  56. package/test/mockRoot/.mcdevrc.json +1 -1
  57. package/test/resourceFactory.js +8 -5
  58. package/test/resources/9999999/automation/create-expected.json +2 -1
  59. package/test/resources/9999999/automation/retrieve-expected.json +7 -1
  60. package/test/resources/9999999/automation/retrieve-wait-expected.json +7 -1
  61. package/test/resources/9999999/automation/update-expected.json +24 -2
  62. package/test/resources/9999999/automation/update-testExisting_automation-expected.md +5 -2
  63. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_pause/patch-response.json +1 -0
  64. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_schedule/patch-response.json +1 -0
  65. package/test/resources/9999999/dataExtract/build-expected.json +2 -2
  66. package/test/resources/9999999/dataExtract/get-expected.json +2 -2
  67. package/test/resources/9999999/dataExtract/patch-expected.json +2 -2
  68. package/test/resources/9999999/dataExtract/post-expected.json +2 -2
  69. package/test/resources/9999999/dataExtract/template-expected.json +2 -2
  70. package/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow-PAUSED/get-response.json +3 -0
  71. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/NewRkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow/get-response.json +29 -0
  72. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow/get-response.json +50 -0
  73. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow-PAUSED/get-response.json +51 -0
  74. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/bHF6Q0Q3b1VXa21OdVQzZFQ0ckVSQToyNTow/get-response.json +7 -1
  75. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/cDhLQ2o2NExxVVc5N3VZeHF5WEExUToyNTow/get-response.json +79 -0
  76. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/get-response.json +61 -2
  77. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/post-response-pauseSchedule.json +1 -0
  78. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/post-response-schedule.json +1 -0
  79. package/test/resources/9999999/messaging/v1/domainverification/get-response.json +10 -1
  80. package/test/resources/9999999/senderProfile/build-expected.json +1 -1
  81. package/test/resources/9999999/senderProfile/get-expected.json +1 -1
  82. package/test/resources/9999999/senderProfile/patch-expected.json +1 -1
  83. package/test/resources/9999999/senderProfile/retrieve-response.xml +1 -1
  84. package/test/resources/9999999/senderProfile/template-expected.json +1 -1
  85. package/test/type.automation.test.js +18 -17
  86. package/test/type.dataExtract.test.js +4 -4
  87. package/test/type.domainVerification.test.js +3 -3
  88. package/test/type.journey.test.js +11 -4
  89. package/test/type.query.test.js +2 -2
  90. package/test/type.script.test.js +1 -1
  91. package/test/type.senderProfile.test.js +20 -3
  92. package/test/type.triggeredSend.test.js +13 -1
  93. package/types/mcdev.d.js +8 -0
  94. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +0 -52
  95. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-ad2e-pause-response.xml +0 -38
  96. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-fixKey_pause-response.xml +0 -52
  97. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-fixKey_schedule-response.xml +0 -52
  98. package/test/resources/9999999/automation/schedule-a8afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +0 -52
@@ -466,17 +466,17 @@ class Query extends MetadataType {
466
466
  /**
467
467
  * Delete a metadata item from the specified business unit
468
468
  *
469
- * @param {string} customerKey Identifier of data extension
469
+ * @param {string} key Identifier of data extension
470
470
  * @returns {Promise.<boolean>} deletion success flag
471
471
  */
472
- static async deleteByKey(customerKey) {
472
+ static async deleteByKey(key) {
473
473
  // delete only works with the query's object id
474
- const objectId = customerKey ? await this._getObjectIdForSingleRetrieve(customerKey) : null;
474
+ const objectId = key ? await this._getObjectIdForSingleRetrieve(key) : null;
475
475
  if (!objectId) {
476
- Util.logger.error(` - query ${customerKey} not found`);
476
+ await this.deleteNotFound(key);
477
477
  return false;
478
478
  }
479
- return super.deleteByKeyREST('/automation/v1/queries/' + objectId, customerKey);
479
+ return super.deleteByKeyREST('/automation/v1/queries/' + objectId, key);
480
480
  }
481
481
 
482
482
  /**
@@ -372,17 +372,17 @@ class Script extends MetadataType {
372
372
  /**
373
373
  * Delete a metadata item from the specified business unit
374
374
  *
375
- * @param {string} customerKey Identifier of data extension
375
+ * @param {string} key Identifier of data extension
376
376
  * @returns {Promise.<boolean>} deletion success flag
377
377
  */
378
- static async deleteByKey(customerKey) {
378
+ static async deleteByKey(key) {
379
379
  // delete only works with the query's object id
380
- const objectId = customerKey ? await this._getObjectIdForSingleRetrieve(customerKey) : null;
380
+ const objectId = key ? await this._getObjectIdForSingleRetrieve(key) : null;
381
381
  if (!objectId) {
382
- Util.logger.error(` - ${this.definition.type} ${customerKey} not found`);
382
+ await this.deleteNotFound(key);
383
383
  return false;
384
384
  }
385
- return super.deleteByKeyREST('/automation/v1/scripts/' + objectId, customerKey);
385
+ return super.deleteByKeyREST('/automation/v1/scripts/' + objectId, key);
386
386
  }
387
387
 
388
388
  /**
@@ -87,11 +87,11 @@ class SendClassification extends MetadataType {
87
87
  /**
88
88
  * Delete a metadata item from the specified business unit
89
89
  *
90
- * @param {string} customerKey Identifier of data extension
90
+ * @param {string} key Identifier of data extension
91
91
  * @returns {Promise.<boolean>} deletion success status
92
92
  */
93
- static deleteByKey(customerKey) {
94
- return super.deleteByKeySOAP(customerKey);
93
+ static deleteByKey(key) {
94
+ return super.deleteByKeySOAP(key, undefined, 24100);
95
95
  }
96
96
 
97
97
  /**
@@ -73,11 +73,11 @@ class SenderProfile extends MetadataType {
73
73
  /**
74
74
  * Delete a metadata item from the specified business unit
75
75
  *
76
- * @param {string} customerKey Identifier of data extension
76
+ * @param {string} key Identifier of data extension
77
77
  * @returns {Promise.<boolean>} deletion success status
78
78
  */
79
- static deleteByKey(customerKey) {
80
- return super.deleteByKeySOAP(customerKey);
79
+ static deleteByKey(key) {
80
+ return super.deleteByKeySOAP(key, undefined, 40100);
81
81
  }
82
82
 
83
83
  /**
@@ -285,7 +285,7 @@ class TransactionalEmail extends TransactionalMessage {
285
285
  const isDeleted = await super.deleteByKeyREST(
286
286
  '/messaging/v1/' + this.subType + '/definitions/' + key,
287
287
  key,
288
- false
288
+ 30003
289
289
  );
290
290
  if (isDeleted && journeyKey) {
291
291
  Util.logger.info(
@@ -128,7 +128,7 @@ class TransactionalMessage extends MetadataType {
128
128
  return super.deleteByKeyREST(
129
129
  '/messaging/v1/' + this.subType + '/definitions/' + key,
130
130
  key,
131
- false
131
+ 30003
132
132
  );
133
133
  }
134
134
  }
@@ -91,11 +91,11 @@ class TriggeredSend extends MetadataType {
91
91
  /**
92
92
  * Delete a metadata item from the specified business unit
93
93
  *
94
- * @param {string} customerKey Identifier of data extension
94
+ * @param {string} key Identifier of data extension
95
95
  * @returns {Promise.<boolean>} deletion success status
96
96
  */
97
- static deleteByKey(customerKey) {
98
- return super.deleteByKeySOAP(customerKey);
97
+ static deleteByKey(key) {
98
+ return super.deleteByKeySOAP(key, undefined, 17015);
99
99
  }
100
100
 
101
101
  /**
@@ -293,7 +293,7 @@ class Verification extends MetadataType {
293
293
  * @returns {Promise.<boolean>} deletion success status
294
294
  */
295
295
  static deleteByKey(key) {
296
- return super.deleteByKeyREST('/automation/v1/dataverifications/' + key, key);
296
+ return super.deleteByKeyREST('/automation/v1/dataverifications/' + key, key, 400);
297
297
  }
298
298
  }
299
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',
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.10.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.10.0"
178
+ "version": "7.10.1"
179
179
  }
@@ -270,6 +270,8 @@ export const handleRESTRequest = async (config) => {
270
270
  let filterBody;
271
271
  if (urlObj.searchParams.get('$filter')) {
272
272
  filterName = urlObj.searchParams.get('$filter').split(' eq ')[1];
273
+ } else if (urlObj.searchParams.get('action')) {
274
+ filterName = urlObj.searchParams.get('action');
273
275
  }
274
276
  const testPath = path
275
277
  .join(
@@ -283,9 +285,10 @@ export const handleRESTRequest = async (config) => {
283
285
  const testPathFilter = filterName
284
286
  ? testPath +
285
287
  '-' +
286
- urlObj.searchParams.get('$filter').replaceAll(' eq ', '=').replaceAll(' ', '')
288
+ (urlObj.searchParams.get('$filter') || urlObj.searchParams.get('action'))
289
+ .replaceAll(' eq ', '=')
290
+ .replaceAll(' ', '')
287
291
  : null;
288
-
289
292
  if (!testPathFilter && config.method === 'post' && config.data) {
290
293
  const simpleOperators = { equal: '=', in: 'IN' };
291
294
  const data = JSON.parse(config.data);
@@ -308,7 +311,6 @@ export const handleRESTRequest = async (config) => {
308
311
  }
309
312
  }
310
313
  const testPathFilterBody = filterBody ? testPath + '-' + filterBody : null;
311
-
312
314
  if (testPathFilter && (await fs.pathExists(testPathFilter + '.json'))) {
313
315
  // build filter logic to ensure templating works
314
316
  if (filterName) {
@@ -317,8 +319,9 @@ export const handleRESTRequest = async (config) => {
317
319
  encoding: 'utf8',
318
320
  })
319
321
  );
320
- response.items = response.items.filter((def) => def.name == filterName);
321
- response.count = response.items.length;
322
+ if (response.items) {
323
+ response.items = response.items.filter((def) => def.name == filterName);
324
+ }
322
325
  console.log(loadingFile + projectRoot + testPathFilter + '.json'); // eslint-disable-line no-console
323
326
  return [200, JSON.stringify(response)];
324
327
  } else {
@@ -45,5 +45,6 @@
45
45
  ],
46
46
  "name": ""
47
47
  }
48
- ]
48
+ ],
49
+ "createdDate": "2023-07-04T07:49:08.297"
49
50
  }
@@ -57,5 +57,11 @@
57
57
  "message": "test",
58
58
  "type": "Error"
59
59
  }
60
- ]
60
+ ],
61
+ "createdDate": "2022-01-12T08:41:35.773Z",
62
+ "createdName": "Tom Tester",
63
+ "modifiedDate": "2024-11-04T17:42:13.143Z",
64
+ "modifiedName": "Jörn Berkefeld",
65
+ "pausedDate": "2025-03-14T15:21:57.62Z",
66
+ "pausedName": "Jörn Berkefeld"
61
67
  }
@@ -71,5 +71,11 @@
71
71
  ]
72
72
  }
73
73
  ],
74
- "r__folder_Path": "my automations"
74
+ "r__folder_Path": "my automations",
75
+ "createdDate": "2024-11-04T17:30:12.973Z",
76
+ "createdName": "Jörn Berkefeld",
77
+ "modifiedDate": "2024-11-04T17:42:13.143Z",
78
+ "modifiedName": "Jörn Berkefeld",
79
+ "pausedDate": "2025-03-14T15:21:57.62Z",
80
+ "pausedName": "Jörn Berkefeld"
75
81
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "updated on deploy",
2
+ "description": "bla bla",
3
3
  "key": "testExisting_automation",
4
4
  "name": "testExisting_automation",
5
5
  "r__folder_Path": "my automations",
@@ -36,10 +36,32 @@
36
36
  {
37
37
  "r__key": "testExisting_script",
38
38
  "r__type": "script"
39
+ },
40
+ {
41
+ "r__key": "testExisting_automation__s1.7",
42
+ "r__type": "verification"
39
43
  }
40
44
  ],
41
45
  "name": ""
42
46
  }
43
47
  ],
44
- "type": "scheduled"
48
+ "type": "scheduled",
49
+ "notifications": [
50
+ {
51
+ "email": ["complete@test.accenture.com"],
52
+ "message": "",
53
+ "type": "Complete"
54
+ },
55
+ {
56
+ "email": ["error@test.accenture.com"],
57
+ "message": "test",
58
+ "type": "Error"
59
+ }
60
+ ],
61
+ "createdDate": "2022-01-12T08:41:35.773Z",
62
+ "createdName": "Tom Tester",
63
+ "modifiedDate": "2024-11-04T17:42:13.143Z",
64
+ "modifiedName": "Jörn Berkefeld",
65
+ "pausedDate": "2025-03-14T15:21:57.62Z",
66
+ "pausedName": "Jörn Berkefeld"
45
67
  }