mcdev 7.6.0 → 7.6.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 (35) hide show
  1. package/.github/ISSUE_TEMPLATE/bug.yml +1 -0
  2. package/@types/lib/index.d.ts.map +1 -1
  3. package/@types/lib/metadataTypes/Automation.d.ts +14 -0
  4. package/@types/lib/metadataTypes/Automation.d.ts.map +1 -1
  5. package/@types/lib/metadataTypes/Journey.d.ts +2 -1
  6. package/@types/lib/metadataTypes/Journey.d.ts.map +1 -1
  7. package/@types/lib/metadataTypes/MetadataType.d.ts +4 -2
  8. package/@types/lib/metadataTypes/MetadataType.d.ts.map +1 -1
  9. package/@types/lib/metadataTypes/Query.d.ts +7 -0
  10. package/@types/lib/metadataTypes/Query.d.ts.map +1 -1
  11. package/@types/lib/metadataTypes/TriggeredSend.d.ts.map +1 -1
  12. package/@types/types/mcdev.d.d.ts +5 -1
  13. package/@types/types/mcdev.d.d.ts.map +1 -1
  14. package/lib/index.js +0 -3
  15. package/lib/metadataTypes/Automation.js +28 -0
  16. package/lib/metadataTypes/Journey.js +26 -14
  17. package/lib/metadataTypes/MetadataType.js +4 -2
  18. package/lib/metadataTypes/TriggeredSend.js +25 -3
  19. package/lib/metadataTypes/definitions/Automation.definition.js +1 -0
  20. package/package.json +1 -1
  21. package/test/general.test.js +5 -5
  22. package/test/mockRoot/.mcdevrc.json +1 -1
  23. package/test/resources/9999999/dataFolder/retrieve-ContentTypeINcontextual_suppression_list,hidden,list,mysubs,publication,suppression_list,triggered_send,triggered_send_journeybuilder-response.xml +385 -0
  24. package/test/resources/9999999/interaction/v1/interactions/0175b971-71a3-4d8e-98ac-48121f3fbf4f/get-response.json +461 -0
  25. package/test/resources/9999999/interaction/v1/interactions/transactional/pause/post-response.json +3 -0
  26. package/test/resources/9999999/interaction/v1/interactions/transactional/resume/post-response.json +3 -0
  27. package/test/resources/9999999/triggeredSendDefinition/retrieve-CustomerKey=testExisting_triggeredSend-response.xml +72 -0
  28. package/test/resources/9999999/triggeredSendDefinition/retrieve-CustomerKey=testExisting_triggeredSend_rcb-response.xml +72 -0
  29. package/test/resources/9999999/triggeredSendDefinition/retrieve-TriggeredSendStatusINNew,Active,Inactive,Moved,Canceled-response.xml +1 -1
  30. package/test/resources/9999999/triggeredSendDefinition/retrieve-TriggeredSendStatusINdummy,Active-response.xml +118 -0
  31. package/test/type.automation.test.js +13 -13
  32. package/test/type.journey.test.js +73 -0
  33. package/test/type.query.test.js +2 -2
  34. package/test/type.triggeredSend.test.js +68 -1
  35. package/types/mcdev.d.js +2 -1
@@ -0,0 +1,118 @@
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:8fe86c01-56d5-4c56-8ac2-991578c79485</wsa:MessageID>
11
+ <wsa:RelatesTo>urn:uuid:592f71ac-78a0-45a2-8cfe-37a91fc6cfd5</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-675af14a-b6a1-44a5-b7e7-4a76c6d18424">
15
+ <wsu:Created>2023-02-01T10:29:21Z</wsu:Created>
16
+ <wsu:Expires>2023-02-01T10:34:21Z</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>a90dda5e-aeba-440a-82ce-74fb2abf5eb2</RequestID>
24
+ <Results xsi:type="TriggeredSendDefinition">
25
+ <PartnerKey xsi:nil="true" />
26
+ <PartnerProperties>
27
+ <Name>TestEmailAddr</Name>
28
+ <Value />
29
+ </PartnerProperties>
30
+ <CreatedDate>2018-06-25T05:58:00</CreatedDate>
31
+ <ModifiedDate>2018-06-25T05:58:00</ModifiedDate>
32
+ <ObjectID>b3150cf0-6e78-e811-80d4-1402ec721c9d</ObjectID>
33
+ <CustomerKey>testExisting_triggeredSend</CustomerKey>
34
+ <IsPlatformObject>false</IsPlatformObject>
35
+ <Name>testExisting_triggeredSend</Name>
36
+ <Description>Unsubscribe_Email</Description>
37
+ <Keyword />
38
+ <CategoryID>89348</CategoryID>
39
+ <SendClassification>
40
+ <PartnerKey xsi:nil="true" />
41
+ <ObjectID>95da425b-a06f-e611-96fe-38eaa7142c61</ObjectID>
42
+ <CustomerKey>testExisting_sendClassification</CustomerKey>
43
+ </SendClassification>
44
+ <SenderProfile>
45
+ <PartnerKey xsi:nil="true" />
46
+ <ObjectID>a75d452b-7ef4-eb11-b82d-48df37d1da95</ObjectID>
47
+ <CustomerKey>testExisting_senderProfile</CustomerKey>
48
+ </SenderProfile>
49
+ <FromName>unsubscribe</FromName>
50
+ <FromAddress>unsubscribe@emails.mcdev.accenture.com</FromAddress>
51
+ <SuppressTracking>false</SuppressTracking>
52
+ <TriggeredSendType>Continuous</TriggeredSendType>
53
+ <TriggeredSendStatus>Active</TriggeredSendStatus>
54
+ <Email>
55
+ <PartnerKey xsi:nil="true" />
56
+ <ID>531213</ID>
57
+ <ObjectID xsi:nil="true" />
58
+ </Email>
59
+ <AutoAddSubscribers>false</AutoAddSubscribers>
60
+ <AutoUpdateSubscribers>false</AutoUpdateSubscribers>
61
+ <BatchInterval>0</BatchInterval>
62
+ <EmailSubject>You are successfully unsubscribed</EmailSubject>
63
+ <DynamicEmailSubject>You are successfully unsubscribed</DynamicEmailSubject>
64
+ <IsMultipart>false</IsMultipart>
65
+ <IsWrapped>true</IsWrapped>
66
+ <AllowedSlots>0</AllowedSlots>
67
+ <NewSlotTrigger>0</NewSlotTrigger>
68
+ <Priority>4</Priority>
69
+ </Results>
70
+ <Results xsi:type="TriggeredSendDefinition">
71
+ <PartnerKey xsi:nil="true" />
72
+ <PartnerProperties>
73
+ <Name>TestEmailAddr</Name>
74
+ <Value />
75
+ </PartnerProperties>
76
+ <CreatedDate>2018-06-25T05:58:00</CreatedDate>
77
+ <ModifiedDate>2018-06-25T05:58:00</ModifiedDate>
78
+ <ObjectID>b3150cf0-6e78-e811-80d4-1402ec721c9a</ObjectID>
79
+ <CustomerKey>testExisting_triggeredSend_rcb</CustomerKey>
80
+ <IsPlatformObject>false</IsPlatformObject>
81
+ <Name>testExisting_triggeredSend_rcb</Name>
82
+ <Description>Unsubscribe_Email</Description>
83
+ <Keyword />
84
+ <CategoryID>89348</CategoryID>
85
+ <SendClassification>
86
+ <PartnerKey xsi:nil="true" />
87
+ <ObjectID>95da425b-a06f-e611-96fe-38eaa7142c61</ObjectID>
88
+ <CustomerKey>testExisting_sendClassification</CustomerKey>
89
+ </SendClassification>
90
+ <SenderProfile>
91
+ <PartnerKey xsi:nil="true" />
92
+ <ObjectID>a75d452b-7ef4-eb11-b82d-48df37d1da99</ObjectID>
93
+ <CustomerKey>testExisting_senderProfile_rcb</CustomerKey>
94
+ </SenderProfile>
95
+ <FromName>%%= ContentBlockByName("Content Builder\dont strip non ssjs content") =%%</FromName>
96
+ <FromAddress>%%= ContentBlockByKey("testExisting_asset_htmlblock") =%%</FromAddress>
97
+ <SuppressTracking>false</SuppressTracking>
98
+ <TriggeredSendType>Continuous</TriggeredSendType>
99
+ <TriggeredSendStatus>Active</TriggeredSendStatus>
100
+ <Email>
101
+ <PartnerKey xsi:nil="true" />
102
+ <ID>531213</ID>
103
+ <ObjectID xsi:nil="true" />
104
+ </Email>
105
+ <AutoAddSubscribers>false</AutoAddSubscribers>
106
+ <AutoUpdateSubscribers>false</AutoUpdateSubscribers>
107
+ <BatchInterval>0</BatchInterval>
108
+ <EmailSubject>%%= ContentBlockById(1295064) =%%</EmailSubject>
109
+ <DynamicEmailSubject>%%= ContentBlockById(1295064) =%%</DynamicEmailSubject>
110
+ <IsMultipart>false</IsMultipart>
111
+ <IsWrapped>true</IsWrapped>
112
+ <AllowedSlots>0</AllowedSlots>
113
+ <NewSlotTrigger>0</NewSlotTrigger>
114
+ <Priority>4</Priority>
115
+ </Results>
116
+ </RetrieveResponseMsg>
117
+ </soap:Body>
118
+ </soap:Envelope>
@@ -58,7 +58,7 @@ describe('type: automation', () => {
58
58
  );
59
59
  assert.equal(
60
60
  testUtils.getAPIHistoryLength(),
61
- 27,
61
+ 28,
62
62
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
63
63
  );
64
64
  return;
@@ -144,7 +144,7 @@ describe('type: automation', () => {
144
144
 
145
145
  assert.equal(
146
146
  testUtils.getAPIHistoryLength(),
147
- 34,
147
+ 35,
148
148
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
149
149
  );
150
150
  return;
@@ -212,7 +212,7 @@ describe('type: automation', () => {
212
212
 
213
213
  assert.equal(
214
214
  testUtils.getAPIHistoryLength(),
215
- 42,
215
+ 43,
216
216
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
217
217
  );
218
218
  return;
@@ -279,7 +279,7 @@ describe('type: automation', () => {
279
279
 
280
280
  assert.equal(
281
281
  testUtils.getAPIHistoryLength(),
282
- 38,
282
+ 39,
283
283
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
284
284
  );
285
285
  return;
@@ -318,7 +318,7 @@ describe('type: automation', () => {
318
318
  // check number of API calls
319
319
  assert.equal(
320
320
  testUtils.getAPIHistoryLength(),
321
- 24,
321
+ 25,
322
322
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
323
323
  );
324
324
  return;
@@ -362,7 +362,7 @@ describe('type: automation', () => {
362
362
  // check number of API calls
363
363
  assert.equal(
364
364
  testUtils.getAPIHistoryLength(),
365
- 52,
365
+ 54,
366
366
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
367
367
  );
368
368
  return;
@@ -406,7 +406,7 @@ describe('type: automation', () => {
406
406
  // check number of API calls
407
407
  assert.equal(
408
408
  testUtils.getAPIHistoryLength(),
409
- 54,
409
+ 56,
410
410
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
411
411
  );
412
412
  return;
@@ -450,7 +450,7 @@ describe('type: automation', () => {
450
450
  // check number of API calls
451
451
  assert.equal(
452
452
  testUtils.getAPIHistoryLength(),
453
- 55,
453
+ 57,
454
454
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
455
455
  );
456
456
  return;
@@ -494,7 +494,7 @@ describe('type: automation', () => {
494
494
  // check number of API calls
495
495
  assert.equal(
496
496
  testUtils.getAPIHistoryLength(),
497
- 47,
497
+ 49,
498
498
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
499
499
  );
500
500
  return;
@@ -538,7 +538,7 @@ describe('type: automation', () => {
538
538
  // check number of API calls
539
539
  assert.equal(
540
540
  testUtils.getAPIHistoryLength(),
541
- 53,
541
+ 55,
542
542
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
543
543
  );
544
544
  return;
@@ -582,7 +582,7 @@ describe('type: automation', () => {
582
582
  // check number of API calls
583
583
  assert.equal(
584
584
  testUtils.getAPIHistoryLength(),
585
- 55,
585
+ 57,
586
586
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
587
587
  );
588
588
  return;
@@ -626,7 +626,7 @@ describe('type: automation', () => {
626
626
  );
627
627
  assert.equal(
628
628
  testUtils.getAPIHistoryLength(),
629
- 26,
629
+ 27,
630
630
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
631
631
  );
632
632
  return;
@@ -670,7 +670,7 @@ describe('type: automation', () => {
670
670
  );
671
671
  assert.equal(
672
672
  testUtils.getAPIHistoryLength(),
673
- 27,
673
+ 28,
674
674
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
675
675
  );
676
676
  return;
@@ -927,4 +927,77 @@ describe('type: journey', () => {
927
927
  return;
928
928
  });
929
929
  });
930
+
931
+ describe('Refresh ================', () => {
932
+ it('Should refresh all active journeys');
933
+
934
+ it('Should refresh a specifc multi-step journey by key', async () => {
935
+ // WHEN
936
+ const replace = await handler.refresh('testInstance/testBU', {
937
+ journey: ['testExisting_journey_Multistep'],
938
+ });
939
+ // THEN
940
+ assert.equal(process.exitCode, 0, 'refresh should not have thrown an error');
941
+ // retrieve result
942
+
943
+ assert.deepEqual(
944
+ replace['testInstance/testBU'].journey,
945
+ ['testExisting_journey_Multistep'],
946
+ 'should have found the right journeys that need updating'
947
+ );
948
+
949
+ assert.equal(
950
+ testUtils.getAPIHistoryLength(),
951
+ 6,
952
+ 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
953
+ );
954
+ return;
955
+ });
956
+
957
+ it('Should refresh a specifc transactional send journey by key', async () => {
958
+ // WHEN
959
+ const replace = await handler.refresh('testInstance/testBU', {
960
+ journey: ['testExisting_temail'],
961
+ });
962
+ // THEN
963
+ assert.equal(process.exitCode, 0, 'refresh should not have thrown an error');
964
+ // retrieve result
965
+
966
+ assert.deepEqual(
967
+ replace['testInstance/testBU'].journey,
968
+ ['testExisting_temail'],
969
+ 'should have found the right journeys that need updating'
970
+ );
971
+
972
+ assert.equal(
973
+ testUtils.getAPIHistoryLength(),
974
+ 3,
975
+ 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
976
+ );
977
+ return;
978
+ });
979
+
980
+ it('Should refresh a specifc cross type journeys by key', async () => {
981
+ // WHEN
982
+ const replace = await handler.refresh('testInstance/testBU', {
983
+ journey: ['testExisting_temail', 'testExisting_journey_Multistep'],
984
+ });
985
+ // THEN
986
+ assert.equal(process.exitCode, 0, 'refresh should not have thrown an error');
987
+ // retrieve result
988
+
989
+ assert.deepEqual(
990
+ replace['testInstance/testBU'].journey,
991
+ ['testExisting_journey_Multistep', 'testExisting_temail'],
992
+ 'should have found the right journeys that need updating'
993
+ );
994
+
995
+ assert.equal(
996
+ testUtils.getAPIHistoryLength(),
997
+ 8,
998
+ 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
999
+ );
1000
+ return;
1001
+ });
1002
+ });
930
1003
  });
@@ -648,7 +648,7 @@ describe('type: query', () => {
648
648
  // check number of API calls
649
649
  assert.equal(
650
650
  testUtils.getAPIHistoryLength(),
651
- 41,
651
+ 42,
652
652
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
653
653
  );
654
654
  return;
@@ -690,7 +690,7 @@ describe('type: query', () => {
690
690
  // check number of API calls
691
691
  assert.equal(
692
692
  testUtils.getAPIHistoryLength(),
693
- 43,
693
+ 44,
694
694
  'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
695
695
  );
696
696
  return;
@@ -198,7 +198,74 @@ describe('type: triggeredSend', () => {
198
198
  });
199
199
 
200
200
  describe('Refresh ================', () => {
201
- it('Should refresh a triggeredSend by key');
201
+ it('Should refresh all active triggeredSend', async () => {
202
+ // WHEN
203
+ const replace = await handler.refresh('testInstance/testBU', {
204
+ triggeredSend: null,
205
+ });
206
+ // THEN
207
+ assert.equal(process.exitCode, 0, 'refresh should not have thrown an error');
208
+ // retrieve result
209
+
210
+ assert.deepEqual(
211
+ replace['testInstance/testBU'].triggeredSend,
212
+ ['testExisting_triggeredSend', 'testExisting_triggeredSend_rcb'],
213
+ 'should have found the right triggeredSends that need updating'
214
+ );
215
+
216
+ assert.equal(
217
+ testUtils.getAPIHistoryLength(),
218
+ 15,
219
+ 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
220
+ );
221
+ return;
222
+ });
223
+
224
+ it('Should refresh a specifc triggeredSend by key', async () => {
225
+ // WHEN
226
+ const replace = await handler.refresh('testInstance/testBU', {
227
+ triggeredSend: ['testExisting_triggeredSend'],
228
+ });
229
+ // THEN
230
+ assert.equal(process.exitCode, 0, 'refresh should not have thrown an error');
231
+ // retrieve result
232
+
233
+ assert.deepEqual(
234
+ replace['testInstance/testBU'].triggeredSend,
235
+ ['testExisting_triggeredSend'],
236
+ 'should have found the right triggeredSends that need updating'
237
+ );
238
+
239
+ assert.equal(
240
+ testUtils.getAPIHistoryLength(),
241
+ 4,
242
+ 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
243
+ );
244
+ return;
245
+ });
246
+
247
+ it('Should refresh 2 triggeredSend by key', async () => {
248
+ // WHEN
249
+ const replace = await handler.refresh('testInstance/testBU', {
250
+ triggeredSend: ['testExisting_triggeredSend', 'testExisting_triggeredSend_rcb'],
251
+ });
252
+ // THEN
253
+ assert.equal(process.exitCode, 0, 'refresh should not have thrown an error');
254
+ // retrieve result
255
+
256
+ assert.deepEqual(
257
+ replace['testInstance/testBU'].triggeredSend,
258
+ ['testExisting_triggeredSend', 'testExisting_triggeredSend_rcb'],
259
+ 'should have found the right triggeredSends that need updating'
260
+ );
261
+
262
+ assert.equal(
263
+ testUtils.getAPIHistoryLength(),
264
+ 8,
265
+ 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
266
+ );
267
+ return;
268
+ });
202
269
  });
203
270
 
204
271
  describe('Start (Execute) ================', () => {
package/types/mcdev.d.js CHANGED
@@ -291,7 +291,7 @@
291
291
  * @property {string} [Name] name (SOAP API)
292
292
  * @property {any} [notifications] notifications
293
293
  * @property {string} [description] -
294
- * @property {'scheduled'|'triggered'} [type] Starting Source = Schedule / File Drop
294
+ * @property {'scheduled'|'triggered'|'automationtriggered'} [type] Starting Source = Schedule / File Drop
295
295
  * @property {'Scheduled'|'Running'|'Ready'|'Building'|'PausedSchedule'|'InactiveTrigger'} [status] automation status
296
296
  * @property {number} [statusId] automation status
297
297
  * @property {AutomationSchedule} [schedule] only existing if type=scheduled
@@ -302,6 +302,7 @@
302
302
  * @property {boolean} fileTrigger.isPublished ?
303
303
  * @property {boolean} fileTrigger.queueFiles ?
304
304
  * @property {boolean} fileTrigger.triggerActive -
305
+ * @property {object} [automationTrigger] only existing if type=automationtriggered
305
306
  * @property {object} [startSource] -
306
307
  * @property {AutomationSchedule} [startSource.schedule] rewritten to AutomationItem.schedule
307
308
  * @property {object} [startSource.fileDrop] rewritten to AutomationItem.fileTrigger