mcdev 7.1.0 → 7.1.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 (55) hide show
  1. package/.github/ISSUE_TEMPLATE/bug.yml +1 -0
  2. package/@types/lib/Deployer.d.ts.map +1 -1
  3. package/@types/lib/Retriever.d.ts.map +1 -1
  4. package/@types/lib/index.d.ts.map +1 -1
  5. package/@types/lib/metadataTypes/Asset.d.ts +54 -0
  6. package/@types/lib/metadataTypes/Asset.d.ts.map +1 -1
  7. package/@types/lib/metadataTypes/AttributeSet.d.ts +75 -0
  8. package/@types/lib/metadataTypes/AttributeSet.d.ts.map +1 -1
  9. package/@types/lib/metadataTypes/EmailSend.d.ts +1 -1
  10. package/@types/lib/metadataTypes/Event.d.ts +96 -0
  11. package/@types/lib/metadataTypes/Event.d.ts.map +1 -1
  12. package/@types/lib/metadataTypes/ImportFile.d.ts +25 -1
  13. package/@types/lib/metadataTypes/ImportFile.d.ts.map +1 -1
  14. package/@types/lib/metadataTypes/Journey.d.ts +81 -0
  15. package/@types/lib/metadataTypes/Journey.d.ts.map +1 -1
  16. package/@types/lib/metadataTypes/MetadataType.d.ts.map +1 -1
  17. package/@types/lib/metadataTypes/definitions/Asset.definition.d.ts +54 -0
  18. package/@types/lib/metadataTypes/definitions/AttributeSet.definition.d.ts +75 -0
  19. package/@types/lib/metadataTypes/definitions/EmailSend.definition.d.ts +1 -1
  20. package/@types/lib/metadataTypes/definitions/Event.definition.d.ts +96 -0
  21. package/@types/lib/metadataTypes/definitions/ImportFile.definition.d.ts +25 -1
  22. package/@types/lib/metadataTypes/definitions/Journey.definition.d.ts +81 -0
  23. package/@types/lib/util/file.d.ts.map +1 -1
  24. package/lib/Deployer.js +3 -0
  25. package/lib/Retriever.js +13 -2
  26. package/lib/index.js +5 -0
  27. package/lib/metadataTypes/Asset.js +33 -27
  28. package/lib/metadataTypes/DataExtension.js +1 -1
  29. package/lib/metadataTypes/ImportFile.js +70 -28
  30. package/lib/metadataTypes/Journey.js +164 -58
  31. package/lib/metadataTypes/MetadataType.js +11 -4
  32. package/lib/metadataTypes/definitions/Asset.definition.js +56 -2
  33. package/lib/metadataTypes/definitions/AttributeSet.definition.js +75 -0
  34. package/lib/metadataTypes/definitions/EmailSend.definition.js +1 -1
  35. package/lib/metadataTypes/definitions/Event.definition.js +96 -96
  36. package/lib/metadataTypes/definitions/ImportFile.definition.js +29 -1
  37. package/lib/metadataTypes/definitions/Journey.definition.js +83 -2
  38. package/lib/metadataTypes/definitions/TriggeredSend.definition.js +2 -2
  39. package/lib/util/file.js +1 -12
  40. package/package.json +1 -1
  41. package/test/general.test.js +11 -11
  42. package/test/mockRoot/.mcdevrc.json +1 -1
  43. package/test/resources/9999999/automation/v1/imports/d2474efb-a449-ef11-b876-f40343c95928/get-response.json +37 -0
  44. package/test/resources/9999999/automation/v1/imports/get-response.json +32 -1
  45. package/test/resources/9999999/importFile/build-expected.json +2 -4
  46. package/test/resources/9999999/importFile/get-dataImport-expected.json +36 -0
  47. package/test/resources/9999999/importFile/get-expected.json +2 -4
  48. package/test/resources/9999999/importFile/get-sms-expected.json +2 -1
  49. package/test/resources/9999999/importFile/patch-expected.json +2 -4
  50. package/test/resources/9999999/importFile/post-expected.json +2 -4
  51. package/test/resources/9999999/importFile/template-expected.json +2 -4
  52. package/test/type.asset.test.js +43 -0
  53. package/test/type.automation.test.js +14 -46
  54. package/test/type.importFile.test.js +12 -7
  55. package/test/type.query.test.js +2 -2
@@ -82,6 +82,42 @@ declare namespace _default {
82
82
  retrieving: boolean;
83
83
  template: boolean;
84
84
  };
85
+ 'businessUnitAvailability.%': {
86
+ isCreateable: boolean;
87
+ isUpdateable: boolean;
88
+ retrieving: boolean;
89
+ template: boolean;
90
+ };
91
+ 'businessUnitAvailability.%.view': {
92
+ isCreateable: boolean;
93
+ isUpdateable: boolean;
94
+ retrieving: boolean;
95
+ template: boolean;
96
+ };
97
+ 'businessUnitAvailability.%.update': {
98
+ isCreateable: boolean;
99
+ isUpdateable: boolean;
100
+ retrieving: boolean;
101
+ template: boolean;
102
+ };
103
+ 'businessUnitAvailability.%.delete': {
104
+ isCreateable: boolean;
105
+ isUpdateable: boolean;
106
+ retrieving: boolean;
107
+ template: boolean;
108
+ };
109
+ 'businessUnitAvailability.%.memberId': {
110
+ isCreateable: boolean;
111
+ isUpdateable: boolean;
112
+ retrieving: boolean;
113
+ template: boolean;
114
+ };
115
+ 'businessUnitAvailability.%.transferOwnership': {
116
+ isCreateable: boolean;
117
+ isUpdateable: boolean;
118
+ retrieving: boolean;
119
+ template: boolean;
120
+ };
85
121
  category: {
86
122
  isCreateable: boolean;
87
123
  isUpdateable: boolean;
@@ -172,6 +208,12 @@ declare namespace _default {
172
208
  'data.approvals': {
173
209
  skipValidation: boolean;
174
210
  };
211
+ 'data.email': {
212
+ isCreateable: boolean;
213
+ isUpdateable: boolean;
214
+ retrieving: boolean;
215
+ template: boolean;
216
+ };
175
217
  'data.email.attributes': {
176
218
  skipValidation: boolean;
177
219
  };
@@ -388,6 +430,18 @@ declare namespace _default {
388
430
  retrieving: boolean;
389
431
  template: boolean;
390
432
  };
433
+ 'sharingProperties.sharedFrom': {
434
+ isCreateable: boolean;
435
+ isUpdateable: boolean;
436
+ retrieving: boolean;
437
+ template: boolean;
438
+ };
439
+ 'sharingProperties.sharedFromMID': {
440
+ isCreateable: boolean;
441
+ isUpdateable: boolean;
442
+ retrieving: boolean;
443
+ template: boolean;
444
+ };
391
445
  'sharingProperties.sharingType': {
392
446
  isCreateable: boolean;
393
447
  isUpdateable: boolean;
@@ -418,6 +418,54 @@ declare namespace _default {
418
418
  retrieving: boolean;
419
419
  template: any;
420
420
  };
421
+ 'relationships[].leftItem.cardinality': {
422
+ isCreateable: any;
423
+ isUpdateable: any;
424
+ retrieving: boolean;
425
+ template: any;
426
+ };
427
+ 'relationships[].leftItem.relationshipType': {
428
+ isCreateable: any;
429
+ isUpdateable: any;
430
+ retrieving: boolean;
431
+ template: any;
432
+ };
433
+ 'relationships[].leftItem.r__attributeSet_key': {
434
+ isCreateable: any;
435
+ isUpdateable: any;
436
+ retrieving: boolean;
437
+ template: any;
438
+ };
439
+ 'relationships[].leftItem.r__attributeGroup_key': {
440
+ isCreateable: any;
441
+ isUpdateable: any;
442
+ retrieving: boolean;
443
+ template: any;
444
+ };
445
+ 'relationships[].rightItem.cardinality': {
446
+ isCreateable: any;
447
+ isUpdateable: any;
448
+ retrieving: boolean;
449
+ template: any;
450
+ };
451
+ 'relationships[].rightItem.relationshipType': {
452
+ isCreateable: any;
453
+ isUpdateable: any;
454
+ retrieving: boolean;
455
+ template: any;
456
+ };
457
+ 'relationships[].rightItem.r__attributeSet_key': {
458
+ isCreateable: any;
459
+ isUpdateable: any;
460
+ retrieving: boolean;
461
+ template: any;
462
+ };
463
+ 'relationships[].rightItem.r__attributeGroup_key': {
464
+ isCreateable: any;
465
+ isUpdateable: any;
466
+ retrieving: boolean;
467
+ template: any;
468
+ };
421
469
  'relationships[].leftRelationshipIDs[].type': {
422
470
  isCreateable: any;
423
471
  isUpdateable: any;
@@ -862,12 +910,39 @@ declare namespace _default {
862
910
  retrieving: boolean;
863
911
  template: any;
864
912
  };
913
+ 'valueDefinitions[].storageFieldValueID.type': {
914
+ isCreateable: any;
915
+ isUpdateable: any;
916
+ retrieving: boolean;
917
+ template: any;
918
+ };
919
+ 'valueDefinitions[].storageFieldValueID.value': {
920
+ isCreateable: any;
921
+ isUpdateable: any;
922
+ retrieving: boolean;
923
+ template: any;
924
+ };
865
925
  'valueDefinitions[].storageName': {
866
926
  isCreateable: any;
867
927
  isUpdateable: any;
868
928
  retrieving: boolean;
869
929
  template: any;
870
930
  };
931
+ 'valueDefinitions[].storageObjectFieldInformation': {
932
+ skipValidation: boolean;
933
+ };
934
+ 'valueDefinitions[].storageObjectFieldInformation.externalObjectFieldAPIName': {
935
+ skipValidation: boolean;
936
+ };
937
+ 'valueDefinitions[].storageObjectFieldInformation.externalObjectFieldDataTypeName': {
938
+ skipValidation: boolean;
939
+ };
940
+ 'valueDefinitions[].storageObjectFieldInformation.externalObjectFieldLength': {
941
+ skipValidation: boolean;
942
+ };
943
+ 'valueDefinitions[].storageObjectFieldInformation.externalIsRowIdentifier': {
944
+ skipValidation: boolean;
945
+ };
871
946
  'valueDefinitions[].valueDefinitionID': {
872
947
  isCreateable: any;
873
948
  isUpdateable: any;
@@ -461,7 +461,7 @@ declare namespace _default {
461
461
  'SendDefinitionList[].Name': {
462
462
  skipValidation: boolean;
463
463
  };
464
- 'SendDefinitionList[].r__dataExtension_Key': {
464
+ 'SendDefinitionList[].r__dataExtension_key': {
465
465
  skipValidation: boolean;
466
466
  };
467
467
  'SendDefinitionList[].List.ObjectID': {
@@ -192,12 +192,108 @@ declare namespace _default {
192
192
  retrieving: boolean;
193
193
  template: boolean;
194
194
  };
195
+ 'configurationArguments.applicationExtensionKey': {
196
+ isCreateable: boolean;
197
+ isUpdateable: boolean;
198
+ retrieving: boolean;
199
+ template: boolean;
200
+ };
201
+ 'configurationArguments.contactKey': {
202
+ isCreateable: boolean;
203
+ isUpdateable: boolean;
204
+ retrieving: boolean;
205
+ template: boolean;
206
+ };
207
+ 'configurationArguments.contactPersonType': {
208
+ isCreateable: boolean;
209
+ isUpdateable: boolean;
210
+ retrieving: boolean;
211
+ template: boolean;
212
+ };
213
+ 'configurationArguments.dataExtensionId': {
214
+ isCreateable: boolean;
215
+ isUpdateable: boolean;
216
+ retrieving: boolean;
217
+ template: boolean;
218
+ };
219
+ 'configurationArguments.evaluationCriteriaSummary': {
220
+ isCreateable: boolean;
221
+ isUpdateable: boolean;
222
+ retrieving: boolean;
223
+ template: boolean;
224
+ };
225
+ 'configurationArguments.eventDataConfig': {
226
+ isCreateable: boolean;
227
+ isUpdateable: boolean;
228
+ retrieving: boolean;
229
+ template: boolean;
230
+ };
231
+ 'configurationArguments.eventDataSummary': {
232
+ isCreateable: boolean;
233
+ isUpdateable: boolean;
234
+ retrieving: boolean;
235
+ template: boolean;
236
+ };
237
+ 'configurationArguments.objectAPIName': {
238
+ isCreateable: boolean;
239
+ isUpdateable: boolean;
240
+ retrieving: boolean;
241
+ template: boolean;
242
+ };
243
+ 'configurationArguments.passThroughArgument': {
244
+ isCreateable: boolean;
245
+ isUpdateable: boolean;
246
+ retrieving: boolean;
247
+ template: boolean;
248
+ };
249
+ 'configurationArguments.primaryObjectFilterCriteria': {
250
+ isCreateable: boolean;
251
+ isUpdateable: boolean;
252
+ retrieving: boolean;
253
+ template: boolean;
254
+ };
255
+ 'configurationArguments.primaryObjectFilterSummary': {
256
+ isCreateable: boolean;
257
+ isUpdateable: boolean;
258
+ retrieving: boolean;
259
+ template: boolean;
260
+ };
261
+ 'configurationArguments.relatedObjectFilterCriteria': {
262
+ isCreateable: boolean;
263
+ isUpdateable: boolean;
264
+ retrieving: boolean;
265
+ template: boolean;
266
+ };
267
+ 'configurationArguments.relatedObjectFilterSummary': {
268
+ isCreateable: boolean;
269
+ isUpdateable: boolean;
270
+ retrieving: boolean;
271
+ template: boolean;
272
+ };
273
+ 'configurationArguments.salesforceTriggerCriteria': {
274
+ isCreateable: boolean;
275
+ isUpdateable: boolean;
276
+ retrieving: boolean;
277
+ template: boolean;
278
+ };
195
279
  'configurationArguments.unconfigured': {
196
280
  isCreateable: boolean;
197
281
  isUpdateable: boolean;
198
282
  retrieving: boolean;
199
283
  template: boolean;
200
284
  };
285
+ 'configurationArguments.version': {
286
+ isCreateable: boolean;
287
+ isUpdateable: boolean;
288
+ retrieving: boolean;
289
+ template: boolean;
290
+ };
291
+ 'configurationArguments.whoToInject': {
292
+ isCreateable: boolean;
293
+ isUpdateable: boolean;
294
+ retrieving: boolean;
295
+ template: boolean;
296
+ };
201
297
  createdBy: {
202
298
  isCreateable: boolean;
203
299
  isUpdateable: boolean;
@@ -132,6 +132,12 @@ declare namespace _default {
132
132
  retrieving: boolean;
133
133
  template: boolean;
134
134
  };
135
+ fileSpec: {
136
+ isCreateable: boolean;
137
+ isUpdateable: boolean;
138
+ retrieving: boolean;
139
+ template: boolean;
140
+ };
135
141
  fileTransferLocationId: {
136
142
  isCreateable: boolean;
137
143
  isUpdateable: boolean;
@@ -251,6 +257,18 @@ declare namespace _default {
251
257
  retrieving: boolean;
252
258
  template: boolean;
253
259
  };
260
+ sourceCustomObjectId: {
261
+ isCreateable: boolean;
262
+ isUpdateable: boolean;
263
+ retrieving: boolean;
264
+ template: boolean;
265
+ };
266
+ sourceDataExtensionName: {
267
+ isCreateable: boolean;
268
+ isUpdateable: boolean;
269
+ retrieving: boolean;
270
+ template: boolean;
271
+ };
254
272
  c__dataAction: {
255
273
  isCreateable: boolean;
256
274
  isUpdateable: boolean;
@@ -275,7 +293,13 @@ declare namespace _default {
275
293
  retrieving: boolean;
276
294
  template: boolean;
277
295
  };
278
- 'destination.c__destinationType': {
296
+ 'source.c__type': {
297
+ isCreateable: boolean;
298
+ isUpdateable: boolean;
299
+ retrieving: boolean;
300
+ template: boolean;
301
+ };
302
+ 'destination.c__type': {
279
303
  isCreateable: boolean;
280
304
  isUpdateable: boolean;
281
305
  retrieving: boolean;
@@ -70,6 +70,9 @@ declare namespace _default {
70
70
  retrieving: any;
71
71
  template: any;
72
72
  };
73
+ 'defaults.properties': {
74
+ skipValidation: boolean;
75
+ };
73
76
  'defaults.properties.analyticsTracking.analyticsType': {
74
77
  isCreateable: any;
75
78
  isUpdateable: any;
@@ -250,6 +253,48 @@ declare namespace _default {
250
253
  retrieving: boolean;
251
254
  template: boolean;
252
255
  };
256
+ 'triggers[].arguments.serializedObjectType': {
257
+ isCreateable: boolean;
258
+ isUpdateable: boolean;
259
+ retrieving: boolean;
260
+ template: boolean;
261
+ };
262
+ 'triggers[].arguments.eventDefinitionId': {
263
+ isCreateable: boolean;
264
+ isUpdateable: boolean;
265
+ retrieving: boolean;
266
+ template: boolean;
267
+ };
268
+ 'triggers[].arguments.eventDefinitionKey': {
269
+ isCreateable: boolean;
270
+ isUpdateable: boolean;
271
+ retrieving: boolean;
272
+ template: boolean;
273
+ };
274
+ 'triggers[].arguments.dataExtensionId': {
275
+ isCreateable: boolean;
276
+ isUpdateable: boolean;
277
+ retrieving: boolean;
278
+ template: boolean;
279
+ };
280
+ 'triggers[].arguments.automationId': {
281
+ isCreateable: boolean;
282
+ isUpdateable: boolean;
283
+ retrieving: boolean;
284
+ template: boolean;
285
+ };
286
+ 'triggers[].arguments.r__event_key': {
287
+ isCreateable: boolean;
288
+ isUpdateable: boolean;
289
+ retrieving: boolean;
290
+ template: boolean;
291
+ };
292
+ 'triggers[].arguments.r__dataExtension_key': {
293
+ isCreateable: boolean;
294
+ isUpdateable: boolean;
295
+ retrieving: boolean;
296
+ template: boolean;
297
+ };
253
298
  'triggers[].configurationArguments': {
254
299
  isCreateable: boolean;
255
300
  isUpdateable: boolean;
@@ -358,6 +403,24 @@ declare namespace _default {
358
403
  retrieving: boolean;
359
404
  template: boolean;
360
405
  };
406
+ 'triggers[].configurationArguments.whoToInject': {
407
+ isCreateable: boolean;
408
+ isUpdateable: boolean;
409
+ retrieving: boolean;
410
+ template: boolean;
411
+ };
412
+ 'triggers[].configurationArguments.objectApiName': {
413
+ isCreateable: boolean;
414
+ isUpdateable: boolean;
415
+ retrieving: boolean;
416
+ template: boolean;
417
+ };
418
+ 'triggers[].configurationArguments.additionalObjectFilterCriteria': {
419
+ isCreateable: boolean;
420
+ isUpdateable: boolean;
421
+ retrieving: boolean;
422
+ template: boolean;
423
+ };
361
424
  'triggers[].metaData': {
362
425
  isCreateable: boolean;
363
426
  isUpdateable: boolean;
@@ -370,6 +433,24 @@ declare namespace _default {
370
433
  retrieving: boolean;
371
434
  template: boolean;
372
435
  };
436
+ 'triggers[].metaData.entrySourceGroupConfigUrl': {
437
+ isCreateable: boolean;
438
+ isUpdateable: boolean;
439
+ retrieving: boolean;
440
+ template: boolean;
441
+ };
442
+ 'triggers[].metaData.r__event_key': {
443
+ isCreateable: boolean;
444
+ isUpdateable: boolean;
445
+ retrieving: boolean;
446
+ template: boolean;
447
+ };
448
+ 'triggers[].metaData.category': {
449
+ isCreateable: boolean;
450
+ isUpdateable: boolean;
451
+ retrieving: boolean;
452
+ template: boolean;
453
+ };
373
454
  'triggers[].metaData.eventDefinitionId': {
374
455
  isCreateable: boolean;
375
456
  isUpdateable: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../lib/util/file.js"],"names":[],"mappings":";yBAUa,OAAO,wBAAwB,EAAE,UAAU;uBAC3C,OAAO,wBAAwB,EAAE,QAAQ;oBACzC,OAAO,wBAAwB,EAAE,KAAK;0BACtC,OAAO,wBAAwB,EAAE,WAAW;8BAC5C,OAAO,wBAAwB,EAAE,eAAe;2BAChD,OAAO,wBAAwB,EAAE,YAAY;sBAC7C,OAAO,wBAAwB,EAAE,OAAO;+BACxC,OAAO,wBAAwB,EAAE,gBAAgB;mCACjD,OAAO,wBAAwB,EAAE,oBAAoB;kCACrD,OAAO,wBAAwB,EAAE,mBAAmB;8BACpD,OAAO,wBAAwB,EAAE,eAAe;iCAChD,OAAO,wBAAwB,EAAE,kBAAkB;oCACnD,OAAO,wBAAwB,EAAE,qBAAqB;mCACtD,OAAO,wBAAwB,EAAE,oBAAoB;gCACrD,OAAO,wBAAwB,EAAE,iBAAiB;0BAClD,OAAO,wBAAwB,EAAE,WAAW;2BAC5C,OAAO,wBAAwB,EAAE,YAAY;AAoiB1D;;;IAnhBI;;;;;;OAMG;yBAHQ,MAAM,MACN,MAAM,GACJ,OAAO,CAAE;QAAC,MAAM,EAAC,IAAI,GAAC,SAAS,GAAC,QAAQ,CAAC;QAAC,aAAa,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,CAAA;KAAC,CAAC;IAiB1F;;;;;OAKG;iCAFQ,MAAM,GACJ,MAAM;IAiCnB;;;;;OAKG;qCAFQ,MAAM,GACJ,MAAM;IA2BnB;;;;;OAKG;4CAFQ,MAAM,GACJ,MAAM;IAMnB;;;;;OAKG;sCAFQ,MAAM,GAAC,MAAM,E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AAO,CAAE,OAAO,CAAC;IAY9B;;;;;;OAMG;2CAHQ,MAAM,eACN,OAAO,KACL,OAAO,CAAE,MAAM,CAAC;IAU7B;;;;;;OAMG;kCAHQ,MAAM,eACN,OAAO,KACL,OAAO,CAAE,MAAM,CAAC;IAe7B;;;;;;;;;OASG;oCALQ,MAAM,GAAC,MAAM,EAAE,YACf,MAAM,YACN,MAAM,WACN,MAAM,KACJ,OAAO,CAAE,MAAM,CAAC;IAsF7B;;;;;;;;;OASG;6BANQ,MAAM,GAAC,MAAM,EAAE,YACf,MAAM,YACN,MAAM,WACN,MAAM,aACN,MAAM,KACJ,OAAO,CAAE,OAAO,CAAC;IAoB9B;;;;;;;OAOG;8BAJQ,MAAM,GAAG,MAAM,EAAE,YACjB,MAAM,aACN,OAAO,KACL,OAAO,CAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAyB7C;;;;;;;;OAQG;sCALQ,MAAM,GAAG,MAAM,EAAE,YACjB,MAAM,YACN,MAAM,aACN,MAAM,KACJ,OAAO,CAAE,MAAM,CAAC;IAa7B;;;;;;;;;;OAUG;iCALQ,MAAM,SACN,MAAM,gBACN,OAAO,gBACP,MAAM,KACJ,OAAO,CAAE,MAAM,EAAE,CAAC;IA6C/B;;;;;;;;;;;OAWG;qCALQ,MAAM,UACN,MAAM,gBACN,OAAO,gBACP,MAAM,KACJ,MAAM,EAAE,GAAG,IAAI;IA2C5B;;;;;OAKG;+BAFQ,OAAO,GACL,OAAO,CAAE,IAAI,CAAC;IAS3B;;;;;OAKG;4BAFQ,MAAM,GACJ,OAAO,CAAE,OAAO,CAAC;EAgCK;eAljBxB,UAAU"}
package/lib/Deployer.js CHANGED
@@ -229,6 +229,9 @@ class Deployer {
229
229
  * @returns {Promise.<MultiMetadataTypeMap>} ensure that BUs are worked on sequentially
230
230
  */
231
231
  static async _deployBU(cred, bu, properties, typeArr, keyArr) {
232
+ // ensure changes to the typeArr on one BU do not affect other BUs called in the same go
233
+ typeArr = structuredClone(typeArr);
234
+
232
235
  const buPath = `${cred}/${bu}`;
233
236
  Util.logger.info(`:: Deploying to ${buPath}`);
234
237
  const buObject = await Cli.getCredentialObject(properties, buPath, null, true);
package/lib/Retriever.js CHANGED
@@ -124,7 +124,7 @@ class Retriever {
124
124
  let cacheResult = null;
125
125
  if (
126
126
  (typeKeyMap[type].length > 1 || typeKeyMap[type][0] !== null) &&
127
- (dependencies.includes(type) || dependencies.includes(type))
127
+ dependencies.includes(type)
128
128
  ) {
129
129
  // if we have a key-list and the type is a dependency, we need to cache the whole type
130
130
  Util.logger.info(`Caching dependent Metadata: ${type}`);
@@ -133,6 +133,17 @@ class Retriever {
133
133
  null,
134
134
  subTypeArr
135
135
  );
136
+ } else if (
137
+ dependencies.includes(type) &&
138
+ Object.prototype.hasOwnProperty.call(
139
+ MetadataTypeInfo[type],
140
+ 'retrieveSharedForCache'
141
+ )
142
+ ) {
143
+ // some types exist locally and shared from other BUs (parent and siblings). those need to be put into the cache or else we wont find them when looking for dependencies
144
+ const cacheSharedResult =
145
+ await MetadataTypeInfo[type].retrieveSharedForCache();
146
+ cache.mergeMetadata(type, cacheSharedResult.metadata);
136
147
  }
137
148
  Util.logger.info(
138
149
  `Retrieving: ${type}` +
@@ -176,7 +187,7 @@ class Retriever {
176
187
  .map((element) => element.metadata);
177
188
  }
178
189
  } else {
179
- cache.setMetadata(type, result.metadata);
190
+ cache.mergeMetadata(type, result.metadata);
180
191
  if (metadataTypes.includes(type) || metadataTypes.includes(type)) {
181
192
  retrieveChangelog[type] = result.metadata;
182
193
  }
package/lib/index.js CHANGED
@@ -370,6 +370,9 @@ class Mcdev {
370
370
  * @returns {Promise.<object>} ensure that BUs are worked on sequentially
371
371
  */
372
372
  static async #retrieveBU(cred, bu, selectedTypesArr, keys, changelogOnly) {
373
+ // ensure changes to the selectedTypesArr on one BU do not affect other BUs called in the same go
374
+ selectedTypesArr = structuredClone(selectedTypesArr);
375
+
373
376
  const properties = await config.getProperties();
374
377
  if (!(await config.checkProperties(properties))) {
375
378
  return null;
@@ -1242,6 +1245,7 @@ class Mcdev {
1242
1245
  );
1243
1246
  returnObj[type] = result[type];
1244
1247
  }
1248
+ Util.logger.info('Done');
1245
1249
  return returnObj;
1246
1250
  }
1247
1251
 
@@ -1287,6 +1291,7 @@ class Mcdev {
1287
1291
  );
1288
1292
  returnObj[selectedType] = result;
1289
1293
  }
1294
+ Util.logger.info('Done');
1290
1295
  return returnObj;
1291
1296
  }
1292
1297
  /**
@@ -83,16 +83,25 @@ class Asset extends MetadataType {
83
83
  cache.mergeMetadata('asset', resultShared.metadata);
84
84
  }
85
85
  if (retrieveDir) {
86
- // loop through subtypes and return results of each subType for caching (saving is handled per subtype)
87
- for (const subType of subTypeArr) {
88
- // each subtype contains multiple different specific types (images contains jpg and png for example)
89
- // we use await here to limit the risk of too many concurrent api requests at time
86
+ if (key) {
87
+ // retrieve by key/id/name
90
88
  items.push(
91
- ...(await this.requestSubType(subType, retrieveDir, key, null, loadShared))
89
+ ...(await this.requestSubType(null, retrieveDir, key, null, loadShared))
92
90
  );
91
+ } else {
92
+ // retrieve all
93
+ // loop through subtypes and return results of each subType for caching (saving is handled per subtype)
94
+ for (const subType of subTypeArr) {
95
+ // each subtype contains multiple different specific types (images contains jpg and png for example)
96
+ // we use await here to limit the risk of too many concurrent api requests at time
97
+ items.push(
98
+ ...(await this.requestSubType(subType, retrieveDir, key, null, loadShared))
99
+ );
100
+ }
93
101
  }
94
102
  } else {
95
- items.push(...(await this.requestSubType(subTypeArr, null, key, null, loadShared)));
103
+ // caching
104
+ items.push(...(await this.requestSubType(subTypeArr, null, null, null, loadShared)));
96
105
  }
97
106
  const metadata = this.parseResponseBody({ items: items });
98
107
  if (retrieveDir) {
@@ -213,7 +222,7 @@ class Asset extends MetadataType {
213
222
  throw new TypeError(
214
223
  'requestSubType should not be called with multiple subtypes when retrieving to disk.'
215
224
  );
216
- } else {
225
+ } else if (!key) {
217
226
  Util.logger.info(`- Retrieving Subtype: ${subType}`);
218
227
  }
219
228
  } else {
@@ -221,16 +230,18 @@ class Asset extends MetadataType {
221
230
  Util.logSubtypes(subTypeArr);
222
231
  }
223
232
  /** @type {AssetSubType[]} */
224
- const extendedSubTypeArr = subTypeArr.flatMap(
225
- (subType) => this.definition.extendedSubTypes[subType]
226
- );
233
+ const extendedSubTypeArr = key
234
+ ? [null]
235
+ : subTypeArr.flatMap((subType) => this.definition.extendedSubTypes[subType]);
227
236
  // the API can only assetType.ids at a time or else will throw: "DbUtility.GetPagedCollection passing through non-timeout DB error (30001)"
228
- const subtypeIdsList = Util.chunk(
229
- extendedSubTypeArr?.map(
230
- (subTypeItemName) => this.definition.typeMapping[subTypeItemName]
231
- ),
232
- 50
233
- );
237
+ const subtypeIdsList = key
238
+ ? [null]
239
+ : Util.chunk(
240
+ extendedSubTypeArr?.map(
241
+ (subTypeItemName) => this.definition.typeMapping[subTypeItemName]
242
+ ),
243
+ 50
244
+ );
234
245
  const uri = '/asset/v1/content/assets/query' + (loadShared ? '?scope=shared' : '');
235
246
  /** @type {AssetRequestParams} */
236
247
  const payload = {
@@ -267,28 +278,20 @@ class Asset extends MetadataType {
267
278
 
268
279
  for (const subtypeIds of subtypeIdsList) {
269
280
  if (key) {
270
- payload.query = {
271
- leftOperand: {
272
- property: 'assetType.id',
273
- simpleOperator: 'in',
274
- value: subtypeIds,
275
- },
276
- logicalOperator: 'AND',
277
- };
278
281
  if (key.startsWith('id:')) {
279
- payload.query.rightOperand = {
282
+ payload.query = {
280
283
  property: this.definition.idField,
281
284
  simpleOperator: 'equal',
282
285
  value: key.slice(3),
283
286
  };
284
287
  } else if (key.startsWith('name:')) {
285
- payload.query.rightOperand = {
288
+ payload.query = {
286
289
  property: this.definition.nameField,
287
290
  simpleOperator: 'equal',
288
291
  value: key.slice(5),
289
292
  };
290
293
  } else {
291
- payload.query.rightOperand = {
294
+ payload.query = {
292
295
  property: this.definition.keyField,
293
296
  simpleOperator: 'equal',
294
297
  value: key,
@@ -312,6 +315,9 @@ class Asset extends MetadataType {
312
315
  // sometimes the api will return a payload without items
313
316
  // --> ensure we only add proper items-arrays here
314
317
  items = items.concat(response.items);
318
+ if (key && subType === null) {
319
+ subType = this.#getMainSubtype(response?.items[0].assetType.name);
320
+ }
315
321
  }
316
322
  // check if any more records
317
323
  if (response?.message?.includes('all shards failed')) {
@@ -855,7 +855,7 @@ class DataExtension extends MetadataType {
855
855
  }
856
856
  } catch (ex) {
857
857
  Util.logger.debug(
858
- `removing ${metadataEntry} because of error while retrieving r__folder_ContentType: ${ex.message}`
858
+ `removing dataExtension ${metadataEntry} because of error while retrieving r__folder_ContentType: ${ex.message}`
859
859
  );
860
860
  delete metadataParentBu[metadataEntry];
861
861
  }