mcdev 5.0.1 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.coverage-comment-template.svelte +177 -161
- package/.eslintrc.json +1 -0
- package/.github/ISSUE_TEMPLATE/bug.yml +2 -0
- package/.github/dependabot.yml +8 -0
- package/.github/workflows/coverage-base-update.yml +6 -2
- package/.github/workflows/coverage-develop-branch.yml +7 -6
- package/.github/workflows/coverage-main-branch.yml +7 -6
- package/.github/workflows/coverage.yml +7 -2
- package/.husky/commit-msg +1 -1
- package/.husky/post-checkout +35 -3
- package/.husky/post-merge +21 -0
- package/.husky/pre-commit +1 -0
- package/docs/dist/documentation.md +222 -62
- package/lib/Deployer.js +3 -4
- package/lib/cli.js +36 -8
- package/lib/index.js +175 -3
- package/lib/metadataTypes/Asset.js +4 -2
- package/lib/metadataTypes/Automation.js +413 -195
- package/lib/metadataTypes/DataExtension.js +6 -8
- package/lib/metadataTypes/DataExtensionField.js +5 -5
- package/lib/metadataTypes/Journey.js +11 -10
- package/lib/metadataTypes/MetadataType.js +76 -22
- package/lib/metadataTypes/MobileKeyword.js +165 -20
- package/lib/metadataTypes/MobileMessage.js +20 -28
- package/lib/metadataTypes/Query.js +26 -0
- package/lib/metadataTypes/Role.js +2 -3
- package/lib/metadataTypes/TransactionalSMS.js +5 -5
- package/lib/metadataTypes/User.js +3 -17
- package/lib/metadataTypes/definitions/Asset.definition.js +1 -0
- package/lib/metadataTypes/definitions/Automation.definition.js +52 -6
- package/lib/metadataTypes/definitions/DataExtension.definition.js +1 -0
- package/lib/metadataTypes/definitions/DataExtract.definition.js +1 -0
- package/lib/metadataTypes/definitions/EmailSend.definition.js +1 -0
- package/lib/metadataTypes/definitions/Event.definition.js +1 -0
- package/lib/metadataTypes/definitions/Filter.definition.js +1 -0
- package/lib/metadataTypes/definitions/ImportFile.definition.js +1 -0
- package/lib/metadataTypes/definitions/MobileKeyword.definition.js +20 -7
- package/lib/metadataTypes/definitions/MobileMessage.definition.js +50 -8
- package/lib/metadataTypes/definitions/Query.definition.js +1 -0
- package/lib/metadataTypes/definitions/Role.definition.js +1 -0
- package/lib/metadataTypes/definitions/TriggeredSend.definition.js +1 -0
- package/lib/metadataTypes/definitions/User.definition.js +2 -0
- package/lib/util/auth.js +4 -1
- package/lib/util/cli.js +1 -1
- package/lib/util/devops.js +13 -11
- package/lib/util/file.js +5 -3
- package/lib/util/util.js +153 -129
- package/package.json +11 -11
- package/test/general.test.js +26 -0
- package/test/mockRoot/.mcdevrc.json +3 -1
- package/test/mockRoot/deploy/testInstance/testBU/automation/testExisting_automation.automation-meta.json +53 -0
- package/test/mockRoot/deploy/testInstance/testBU/automation/testNew_automation.automation-meta.json +46 -0
- package/test/mockRoot/deploy/testInstance/testBU/mobileKeyword/{testNew_keyword.mobileKeyword-meta.json → 4912312345678.TESTNEW_KEYWORD.mobileKeyword-meta.json} +1 -4
- package/test/mockRoot/deploy/testInstance/testBU/mobileKeyword/{testNew_keyword_blocked.mobileKeyword-meta.json → 4912312345678.TESTNEW_KEYWORD_BLOCKED.mobileKeyword-meta.json} +1 -4
- package/test/mockRoot/deploy/testInstance/testBU/query/{testExistingQuery.query-meta.json → testExisting_query.query-meta.json} +2 -2
- package/test/mockRoot/deploy/testInstance/testBU/query/{testNewQuery.query-meta.json → testNew_query.query-meta.json} +2 -2
- package/test/mockRoot/deploy/testInstance/testBU/transactionalSMS/testExisting_tsms.transactionalSMS-meta.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/transactionalSMS/testNew_tsms.transactionalSMS-meta.json +1 -1
- package/test/resourceFactory.js +64 -21
- package/test/resources/1111111/user/retrieve-expected.md +19 -0
- package/test/resources/9999999/automation/build-expected.json +58 -0
- package/test/resources/9999999/automation/create-expected.json +46 -0
- package/test/resources/9999999/automation/create-testNew_automation-expected.md +28 -0
- package/test/resources/9999999/automation/delete-response.xml +40 -0
- package/test/resources/9999999/automation/retrieve-expected.json +58 -0
- package/test/resources/9999999/automation/retrieve-testExisting_automation-expected.md +30 -0
- package/test/resources/9999999/automation/template-expected.json +58 -0
- package/test/resources/9999999/automation/update-expected.json +46 -0
- package/test/resources/9999999/automation/update-testExisting_automation-expected.md +28 -0
- package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-1f7f8788c560/get-response.json +85 -0
- package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-1f7f8788c560/patch-response.json +85 -0
- package/test/resources/9999999/automation/v1/automations/a8afb0e2-b00a-4c88-ad2e-1f7f8788c560/get-response.json +85 -0
- package/test/resources/9999999/automation/v1/automations/post-response.json +85 -0
- package/test/resources/9999999/automation/v1/dataextracts/56c5370a-f988-4f36-b0ee-0f876573f6d7/get-response.json +38 -0
- package/test/resources/9999999/automation/v1/dataextracts/get-response.json +20 -0
- package/test/resources/9999999/automation/v1/filetransfers/72c328ac-f5b0-4e37-91d3-a775666f15a6/get-response.json +18 -0
- package/test/resources/9999999/automation/v1/filetransfers/get-response.json +15 -0
- package/test/resources/9999999/automation/v1/imports/get-response.json +38 -0
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat/actions/start/post-response.txt +1 -0
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat/get-response.json +2 -2
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat/patch-response.json +2 -2
- package/test/resources/9999999/automation/v1/queries/get-response.json +4 -4
- package/test/resources/9999999/automation/v1/queries/post-response.json +2 -2
- package/test/resources/9999999/automation/v1/scripts/get-response.json +17 -0
- package/test/resources/9999999/dataExtension/retrieve-expected.md +18 -0
- package/test/resources/9999999/dataFolder/retrieve-ContentType=automations-response.xml +48 -0
- package/test/resources/9999999/dataFolder/retrieve-ContentType=queryactivity-response.xml +48 -0
- package/test/resources/9999999/dataFolder/retrieve-response.xml +22 -0
- package/test/resources/9999999/emailSendDefinition/retrieve-response.xml +85 -0
- package/test/resources/9999999/journey/build-expected.json +1 -1
- package/test/resources/9999999/journey/get-expected.json +1 -1
- package/test/resources/9999999/journey/put-expected.json +1 -1
- package/test/resources/9999999/journey/template-expected.json +1 -1
- package/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow/get-response.json +21 -0
- package/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow/post-response.json +0 -0
- package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/get-response.json +30 -0
- package/test/resources/9999999/legacy/v1/beta/mobile/keyword/NXV4ZFMwTEFwRVczd3RaLUF5X3p5dzo4Njow/get-response.json +1 -1
- package/test/resources/9999999/legacy/v1/beta/mobile/keyword/get-response.json +1 -1
- package/test/resources/9999999/legacy/v1/beta/mobile/message/NTIzOjc4OjA/get-response.json +1 -1
- package/test/resources/9999999/legacy/v1/beta/mobile/message/get-response.json +1 -1
- package/test/resources/9999999/messaging/v1/sms/definitions/post-response.json +1 -1
- package/test/resources/9999999/messaging/v1/sms/definitions/testExisting_tsms/get-response.json +1 -1
- package/test/resources/9999999/messaging/v1/sms/definitions/testExisting_tsms/patch-response.json +1 -1
- package/test/resources/9999999/mobileKeyword/build-expected.json +1 -4
- package/test/resources/9999999/mobileKeyword/get-expected.json +1 -4
- package/test/resources/9999999/mobileKeyword/post-create-expected.json +1 -4
- package/test/resources/9999999/mobileKeyword/template-expected.json +1 -4
- package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation-response.xml +30 -0
- package/test/resources/9999999/program/retrieve-CustomerKey=testNew_automation-response.xml +30 -0
- package/test/resources/9999999/program/retrieve-Name=testExisting_automation-response.xml +31 -0
- package/test/resources/9999999/program/retrieve-response.xml +32 -0
- package/test/resources/9999999/query/build-expected.json +2 -2
- package/test/resources/9999999/query/build-expected.sql +1 -1
- package/test/resources/9999999/query/get-expected.json +2 -2
- package/test/resources/9999999/query/get-expected.sql +1 -1
- package/test/resources/9999999/query/get2-expected.json +2 -2
- package/test/resources/9999999/query/patch-expected.json +2 -2
- package/test/resources/9999999/query/patch-expected.sql +1 -1
- package/test/resources/9999999/query/post-expected.json +2 -2
- package/test/resources/9999999/query/post-expected.sql +1 -1
- package/test/resources/9999999/query/template-expected.json +2 -2
- package/test/resources/9999999/query/template-expected.sql +1 -1
- package/test/resources/9999999/transactionalSMS/build-expected.json +1 -1
- package/test/resources/9999999/transactionalSMS/get-expected.json +1 -1
- package/test/resources/9999999/transactionalSMS/patch-expected.json +1 -1
- package/test/resources/9999999/transactionalSMS/post-expected.json +1 -1
- package/test/resources/9999999/transactionalSMS/template-expected.json +1 -1
- package/test/type.automation.test.js +259 -0
- package/test/type.dataExtension.test.js +16 -1
- package/test/type.mobileKeyword.test.js +57 -19
- package/test/type.query.test.js +39 -26
- package/test/type.user.test.js +44 -1
- package/test/utils.js +16 -5
- package/.coverage-comment-template.md +0 -20
- /package/test/mockRoot/deploy/testInstance/testBU/mobileKeyword/{testNew_keyword.mobileKeyword-meta.amp → 4912312345678.TESTNEW_KEYWORD.mobileKeyword-meta.amp} +0 -0
- /package/test/mockRoot/deploy/testInstance/testBU/mobileKeyword/{testNew_keyword_blocked.mobileKeyword-meta.amp → 4912312345678.TESTNEW_KEYWORD_BLOCKED.mobileKeyword-meta.amp} +0 -0
- /package/test/mockRoot/deploy/testInstance/testBU/query/{testExistingQuery.query-meta.sql → testExisting_query.query-meta.sql} +0 -0
- /package/test/mockRoot/deploy/testInstance/testBU/query/{testNewQuery.query-meta.sql → testNew_query.query-meta.sql} +0 -0
|
@@ -215,12 +215,12 @@ class User extends MetadataType {
|
|
|
215
215
|
);
|
|
216
216
|
|
|
217
217
|
if (action === 'create') {
|
|
218
|
-
const createItem = metadataToCreate
|
|
218
|
+
const createItem = metadataToCreate.at(-1);
|
|
219
219
|
User._setPasswordForNewUser(createItem);
|
|
220
220
|
User._prepareRoleAssignments({ after: createItem });
|
|
221
221
|
User._prepareBuAssignments(metadata[metadataKey], null, createItem);
|
|
222
222
|
} else if (action === 'update') {
|
|
223
|
-
const updateItem = metadataToUpdate
|
|
223
|
+
const updateItem = metadataToUpdate.at(-1);
|
|
224
224
|
User._prepareRoleAssignments(updateItem);
|
|
225
225
|
User._prepareBuAssignments(metadata[metadataKey], updateItem, null);
|
|
226
226
|
}
|
|
@@ -731,13 +731,7 @@ class User extends MetadataType {
|
|
|
731
731
|
)
|
|
732
732
|
);
|
|
733
733
|
}
|
|
734
|
-
|
|
735
|
-
!singleRetrieve &&
|
|
736
|
-
this.buObject &&
|
|
737
|
-
this.properties.metaDataTypes.documentOnRetrieve.includes(this.definition.type)
|
|
738
|
-
) {
|
|
739
|
-
await this.document(savedMetadata);
|
|
740
|
-
}
|
|
734
|
+
await this.runDocumentOnRetrieve(singleRetrieve, savedMetadata);
|
|
741
735
|
}
|
|
742
736
|
return { metadata: metadata, type: this.definition.type };
|
|
743
737
|
}
|
|
@@ -944,14 +938,6 @@ class User extends MetadataType {
|
|
|
944
938
|
return;
|
|
945
939
|
}
|
|
946
940
|
|
|
947
|
-
// if ran as part of retrieve/deploy with key, exit here
|
|
948
|
-
if (metadata && Object.keys(metadata).length === 1) {
|
|
949
|
-
Util.logger.debug(
|
|
950
|
-
'Only 1 user found. Skipping documentation, assuming we ran retrieve-by-key.'
|
|
951
|
-
);
|
|
952
|
-
return;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
941
|
if (!metadata) {
|
|
956
942
|
// load users from disk if document was called directly and not part of a retrieve
|
|
957
943
|
try {
|
|
@@ -13,6 +13,7 @@ module.exports = {
|
|
|
13
13
|
lastmodDateField: 'modifiedDate',
|
|
14
14
|
lastmodNameField: 'modifiedBy.name',
|
|
15
15
|
restPagination: true,
|
|
16
|
+
maxKeyLength: 36, // confirmed max length
|
|
16
17
|
type: 'asset',
|
|
17
18
|
typeDescription: 'Assets from Content Builder grouped into subtypes.',
|
|
18
19
|
typeRetrieveByDefault: ['asset', 'code', 'textfile', 'block', 'message', 'template', 'other'],
|
|
@@ -46,7 +46,8 @@ module.exports = {
|
|
|
46
46
|
createdNameField: 'createdByName',
|
|
47
47
|
lastmodDateField: 'lastSavedDate',
|
|
48
48
|
lastmodNameField: 'lastSavedByName',
|
|
49
|
-
restPagination:
|
|
49
|
+
restPagination: true,
|
|
50
|
+
maxKeyLength: 200, // confirmed max length
|
|
50
51
|
statusMapping: {
|
|
51
52
|
AwaitingTrigger: 7,
|
|
52
53
|
Building: 1,
|
|
@@ -329,7 +330,7 @@ module.exports = {
|
|
|
329
330
|
legacyId: {
|
|
330
331
|
isCreateable: false,
|
|
331
332
|
isUpdateable: false,
|
|
332
|
-
retrieving:
|
|
333
|
+
retrieving: false,
|
|
333
334
|
template: false,
|
|
334
335
|
},
|
|
335
336
|
lastSavedDate: {
|
|
@@ -368,6 +369,45 @@ module.exports = {
|
|
|
368
369
|
retrieving: true,
|
|
369
370
|
template: true,
|
|
370
371
|
},
|
|
372
|
+
notifications: {
|
|
373
|
+
isCreateable: true,
|
|
374
|
+
isUpdateable: true,
|
|
375
|
+
retrieving: true,
|
|
376
|
+
template: true,
|
|
377
|
+
},
|
|
378
|
+
'notifications[].email': {
|
|
379
|
+
isCreateable: true,
|
|
380
|
+
isUpdateable: true,
|
|
381
|
+
retrieving: true,
|
|
382
|
+
template: true,
|
|
383
|
+
},
|
|
384
|
+
'notifications[].message': {
|
|
385
|
+
isCreateable: true,
|
|
386
|
+
isUpdateable: true,
|
|
387
|
+
retrieving: true,
|
|
388
|
+
template: true,
|
|
389
|
+
},
|
|
390
|
+
'notifications[].channelType': {
|
|
391
|
+
// always 'Account'
|
|
392
|
+
isCreateable: true,
|
|
393
|
+
isUpdateable: true,
|
|
394
|
+
retrieving: false,
|
|
395
|
+
template: false,
|
|
396
|
+
},
|
|
397
|
+
'notifications[].type': {
|
|
398
|
+
// custom shorthand for channelType
|
|
399
|
+
isCreateable: true,
|
|
400
|
+
isUpdateable: true,
|
|
401
|
+
retrieving: true,
|
|
402
|
+
template: true,
|
|
403
|
+
},
|
|
404
|
+
'notifications[].notificationType': {
|
|
405
|
+
// Error, Complete
|
|
406
|
+
isCreateable: true,
|
|
407
|
+
isUpdateable: true,
|
|
408
|
+
retrieving: true,
|
|
409
|
+
template: true,
|
|
410
|
+
},
|
|
371
411
|
startSource: {
|
|
372
412
|
skipValidation: true,
|
|
373
413
|
},
|
|
@@ -411,7 +451,7 @@ module.exports = {
|
|
|
411
451
|
isCreateable: true,
|
|
412
452
|
isUpdateable: true,
|
|
413
453
|
retrieving: false,
|
|
414
|
-
template:
|
|
454
|
+
template: false,
|
|
415
455
|
},
|
|
416
456
|
'schedule.scheduleStatus': {
|
|
417
457
|
isCreateable: false,
|
|
@@ -425,6 +465,12 @@ module.exports = {
|
|
|
425
465
|
retrieving: true,
|
|
426
466
|
template: true,
|
|
427
467
|
},
|
|
468
|
+
'schedule.statusId': {
|
|
469
|
+
isCreateable: false,
|
|
470
|
+
isUpdateable: false,
|
|
471
|
+
retrieving: false,
|
|
472
|
+
template: false,
|
|
473
|
+
},
|
|
428
474
|
'schedule.timezoneId': {
|
|
429
475
|
isCreateable: true,
|
|
430
476
|
isUpdateable: true,
|
|
@@ -527,8 +573,8 @@ module.exports = {
|
|
|
527
573
|
'steps[].annotation': {
|
|
528
574
|
isCreateable: true,
|
|
529
575
|
isUpdateable: true,
|
|
530
|
-
retrieving:
|
|
531
|
-
template:
|
|
576
|
+
retrieving: false,
|
|
577
|
+
template: false,
|
|
532
578
|
},
|
|
533
579
|
'steps[].id': {
|
|
534
580
|
isCreateable: true,
|
|
@@ -564,7 +610,7 @@ module.exports = {
|
|
|
564
610
|
isCreateable: true,
|
|
565
611
|
isUpdateable: true,
|
|
566
612
|
retrieving: false,
|
|
567
|
-
template:
|
|
613
|
+
template: false,
|
|
568
614
|
},
|
|
569
615
|
r__folder_Path: { skipValidation: true },
|
|
570
616
|
},
|
|
@@ -96,6 +96,7 @@ module.exports = {
|
|
|
96
96
|
lastmodDateField: 'ModifiedDate',
|
|
97
97
|
lastmodNameField: null,
|
|
98
98
|
restPagination: false,
|
|
99
|
+
maxKeyLength: 200, // confirmed max length
|
|
99
100
|
type: 'dataExtension',
|
|
100
101
|
typeDescription: 'Database table schemas.',
|
|
101
102
|
typeRetrieveByDefault: true,
|
|
@@ -11,6 +11,7 @@ module.exports = {
|
|
|
11
11
|
lastmodNameField: 'modifiedBy',
|
|
12
12
|
nameField: 'name',
|
|
13
13
|
restPagination: true,
|
|
14
|
+
maxKeyLength: 36, // confirmed max length
|
|
14
15
|
type: 'dataExtract',
|
|
15
16
|
typeDescription: 'Creates zipped files in your FTP directory or convert XML into CSV.',
|
|
16
17
|
typeRetrieveByDefault: true,
|
|
@@ -14,6 +14,7 @@ module.exports = {
|
|
|
14
14
|
lastmodDateField: 'ModifiedDate',
|
|
15
15
|
lastmodNameField: null,
|
|
16
16
|
restPagination: null,
|
|
17
|
+
maxKeyLength: 36, // confirmed max length
|
|
17
18
|
type: 'emailSend',
|
|
18
19
|
soapType: 'emailSendDefinition',
|
|
19
20
|
typeDescription: 'Mainly used in Automations as "Send Email Activity".',
|
|
@@ -11,6 +11,7 @@ module.exports = {
|
|
|
11
11
|
lastmodDateField: 'modifiedDate',
|
|
12
12
|
lastmodNameField: 'modifiedBy',
|
|
13
13
|
restPagination: true,
|
|
14
|
+
maxKeyLength: 200, // confirmed max length
|
|
14
15
|
type: 'event',
|
|
15
16
|
typeDescription: 'Used in Journeys (Interactions) to define Entry Events.',
|
|
16
17
|
typeRetrieveByDefault: true,
|
|
@@ -11,6 +11,7 @@ module.exports = {
|
|
|
11
11
|
lastmodDateField: 'modifiedDate',
|
|
12
12
|
lastmodNameField: null,
|
|
13
13
|
restPagination: true,
|
|
14
|
+
maxKeyLength: 36, // confirmed max length
|
|
14
15
|
type: 'filter',
|
|
15
16
|
typeDescription:
|
|
16
17
|
'BETA: Part of how filtered Data Extensions are created. Depends on type "FilterDefinitions".',
|
|
@@ -3,8 +3,8 @@ module.exports = {
|
|
|
3
3
|
dependencies: ['mobileCode'],
|
|
4
4
|
hasExtended: false,
|
|
5
5
|
idField: 'id',
|
|
6
|
-
keyIsFixed: false,
|
|
7
|
-
keyField: '
|
|
6
|
+
keyIsFixed: false, // custom field but mapped to normal fields
|
|
7
|
+
keyField: 'c__codeKeyword',
|
|
8
8
|
nameField: 'keyword',
|
|
9
9
|
createdDateField: 'createdDate',
|
|
10
10
|
createdNameField: 'createdBy.name',
|
|
@@ -12,6 +12,7 @@ module.exports = {
|
|
|
12
12
|
lastmodNameField: null,
|
|
13
13
|
restPagination: true,
|
|
14
14
|
restPageSize: 50,
|
|
15
|
+
maxKeyLength: 50, // assumed max length
|
|
15
16
|
type: 'mobileKeyword',
|
|
16
17
|
typeDescription: 'Used for managing subscriptions for Mobile numbers in Mobile Connect',
|
|
17
18
|
typeRetrieveByDefault: true,
|
|
@@ -21,14 +22,20 @@ module.exports = {
|
|
|
21
22
|
// irregular format: NXV4ZFMwTEFwRVczd3RaLUF5X3p5dzo4Njow
|
|
22
23
|
isCreateable: false,
|
|
23
24
|
isUpdateable: true,
|
|
24
|
-
retrieving:
|
|
25
|
+
retrieving: false,
|
|
25
26
|
template: false,
|
|
26
27
|
},
|
|
28
|
+
c__codeKeyword: {
|
|
29
|
+
isCreateable: false,
|
|
30
|
+
isUpdateable: false,
|
|
31
|
+
retrieving: true,
|
|
32
|
+
template: true,
|
|
33
|
+
},
|
|
27
34
|
keyword: {
|
|
28
35
|
isCreateable: true,
|
|
29
36
|
isUpdateable: true,
|
|
30
|
-
retrieving:
|
|
31
|
-
template:
|
|
37
|
+
retrieving: false,
|
|
38
|
+
template: false,
|
|
32
39
|
},
|
|
33
40
|
createdDate: {
|
|
34
41
|
isCreateable: false,
|
|
@@ -133,11 +140,17 @@ module.exports = {
|
|
|
133
140
|
retrieving: true,
|
|
134
141
|
template: false,
|
|
135
142
|
},
|
|
143
|
+
code: {
|
|
144
|
+
isCreateable: true,
|
|
145
|
+
isUpdateable: true,
|
|
146
|
+
retrieving: false,
|
|
147
|
+
template: false,
|
|
148
|
+
},
|
|
136
149
|
'code.code': {
|
|
137
150
|
isCreateable: false,
|
|
138
151
|
isUpdateable: false,
|
|
139
|
-
retrieving:
|
|
140
|
-
template:
|
|
152
|
+
retrieving: false,
|
|
153
|
+
template: false,
|
|
141
154
|
},
|
|
142
155
|
'code.id': {
|
|
143
156
|
isCreateable: true,
|
|
@@ -316,6 +316,12 @@ module.exports = {
|
|
|
316
316
|
'keyword.keyword': {
|
|
317
317
|
isCreateable: true,
|
|
318
318
|
isUpdateable: true,
|
|
319
|
+
retrieving: false,
|
|
320
|
+
template: false,
|
|
321
|
+
},
|
|
322
|
+
'keyword.c__codeKeyword': {
|
|
323
|
+
isCreateable: false,
|
|
324
|
+
isUpdateable: false,
|
|
319
325
|
retrieving: true,
|
|
320
326
|
template: true,
|
|
321
327
|
},
|
|
@@ -620,27 +626,63 @@ module.exports = {
|
|
|
620
626
|
'subscriptionKeyword.id': {
|
|
621
627
|
isCreatable: true,
|
|
622
628
|
isUpdatable: true,
|
|
623
|
-
retrieving:
|
|
624
|
-
template:
|
|
629
|
+
retrieving: false,
|
|
630
|
+
template: false,
|
|
625
631
|
},
|
|
626
632
|
'subscriptionKeyword.keyword': {
|
|
627
|
-
isCreatable:
|
|
628
|
-
isUpdatable:
|
|
633
|
+
isCreatable: false,
|
|
634
|
+
isUpdatable: false,
|
|
635
|
+
retrieving: false,
|
|
636
|
+
template: false,
|
|
637
|
+
},
|
|
638
|
+
'subscriptionKeyword.c__codeKeyword': {
|
|
639
|
+
isCreateable: false,
|
|
640
|
+
isUpdateable: false,
|
|
629
641
|
retrieving: true,
|
|
630
642
|
template: true,
|
|
631
643
|
},
|
|
632
644
|
'subscriptionKeyword.restriction': {
|
|
633
|
-
isCreatable:
|
|
634
|
-
isUpdatable:
|
|
635
|
-
retrieving:
|
|
636
|
-
template:
|
|
645
|
+
isCreatable: false,
|
|
646
|
+
isUpdatable: false,
|
|
647
|
+
retrieving: false,
|
|
648
|
+
template: false,
|
|
637
649
|
},
|
|
638
650
|
'subscriptionKeyword.isInherited': {
|
|
651
|
+
isCreatable: false,
|
|
652
|
+
isUpdatable: false,
|
|
653
|
+
retrieving: false,
|
|
654
|
+
template: false,
|
|
655
|
+
},
|
|
656
|
+
'nextKeyword.id': {
|
|
639
657
|
isCreatable: true,
|
|
640
658
|
isUpdatable: true,
|
|
659
|
+
retrieving: false,
|
|
660
|
+
template: false,
|
|
661
|
+
},
|
|
662
|
+
'nextKeyword.keyword': {
|
|
663
|
+
isCreatable: false,
|
|
664
|
+
isUpdatable: false,
|
|
665
|
+
retrieving: false,
|
|
666
|
+
template: false,
|
|
667
|
+
},
|
|
668
|
+
'nextKeyword.c__codeKeyword': {
|
|
669
|
+
isCreateable: false,
|
|
670
|
+
isUpdateable: false,
|
|
641
671
|
retrieving: true,
|
|
642
672
|
template: true,
|
|
643
673
|
},
|
|
674
|
+
'nextKeyword.restriction': {
|
|
675
|
+
isCreatable: false,
|
|
676
|
+
isUpdatable: false,
|
|
677
|
+
retrieving: false,
|
|
678
|
+
template: false,
|
|
679
|
+
},
|
|
680
|
+
'nextKeyword.isInherited': {
|
|
681
|
+
isCreatable: false,
|
|
682
|
+
isUpdatable: false,
|
|
683
|
+
retrieving: false,
|
|
684
|
+
template: false,
|
|
685
|
+
},
|
|
644
686
|
subscriberResponseMessage: {
|
|
645
687
|
isCreatable: true,
|
|
646
688
|
isUpdatable: true,
|
|
@@ -23,6 +23,7 @@ module.exports = {
|
|
|
23
23
|
createdNameField: null,
|
|
24
24
|
lastmodDateField: 'ModifiedDate',
|
|
25
25
|
lastmodNameField: null,
|
|
26
|
+
maxKeyLength: 36, // confirmed max length
|
|
26
27
|
type: 'role',
|
|
27
28
|
typeDescription:
|
|
28
29
|
'User Roles define groups that are used to grant users access to SFMC systems.',
|
|
@@ -21,6 +21,7 @@ module.exports = {
|
|
|
21
21
|
lastmodDateField: 'ModifiedDate',
|
|
22
22
|
lastmodNameField: null,
|
|
23
23
|
restPagination: null,
|
|
24
|
+
maxKeyLength: 36, // confirmed max length
|
|
24
25
|
type: 'triggeredSend',
|
|
25
26
|
soapType: 'triggeredSendDefinition',
|
|
26
27
|
typeDescription: 'DEPRECATED: Sends emails via API or DataExtension Event.',
|
|
@@ -12,11 +12,13 @@ module.exports = {
|
|
|
12
12
|
createdNameField: null,
|
|
13
13
|
lastmodDateField: 'ModifiedDate',
|
|
14
14
|
lastmodNameField: 'Client.ModifiedBy',
|
|
15
|
+
maxKeyLength: 50, // confirmed max length
|
|
15
16
|
type: 'user',
|
|
16
17
|
soapType: 'AccountUser',
|
|
17
18
|
typeDescription: 'Marketing Cloud users',
|
|
18
19
|
typeName: 'User',
|
|
19
20
|
typeRetrieveByDefault: false,
|
|
21
|
+
documentInOneFile: true,
|
|
20
22
|
stringifyFieldsBeforeTemplate: ['DefaultBusinessUnit', 'c__AssociatedBusinessUnits'],
|
|
21
23
|
fields: {
|
|
22
24
|
AccountUserID: {
|
package/lib/util/auth.js
CHANGED
|
@@ -137,7 +137,10 @@ function setupSDK(sessionKey, authObject) {
|
|
|
137
137
|
Util.logger.debug('API REQUEST >> ' + JSON.stringify(msg, null, 2));
|
|
138
138
|
if (data) {
|
|
139
139
|
// printing it separately leads to better formatting
|
|
140
|
-
Util.logger.debug(
|
|
140
|
+
Util.logger.debug(
|
|
141
|
+
'API REQUEST body >> \n ' +
|
|
142
|
+
(typeof data === 'string' ? data : JSON.stringify(data, null, 2))
|
|
143
|
+
);
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
146
|
},
|
package/lib/util/cli.js
CHANGED
|
@@ -570,7 +570,7 @@ const Cli = {
|
|
|
570
570
|
}
|
|
571
571
|
if (Util.OPTIONS.json) {
|
|
572
572
|
if (Util.OPTIONS.loggerLevel !== 'error') {
|
|
573
|
-
console.log(json); // eslint-disable-line no-console
|
|
573
|
+
console.log(JSON.stringify(json, null, 2)); // eslint-disable-line no-console
|
|
574
574
|
}
|
|
575
575
|
return json;
|
|
576
576
|
}
|
package/lib/util/devops.js
CHANGED
|
@@ -293,17 +293,19 @@ const DevOps = {
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
/** @type {TYPE.DeltaPkgItem[]} */
|
|
296
|
-
const copied = delta
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
296
|
+
const copied = delta
|
|
297
|
+
.filter((file) => !file.file.endsWith('.md')) // filter documentation files
|
|
298
|
+
.map((file) =>
|
|
299
|
+
File.copyFile(
|
|
300
|
+
file.file,
|
|
301
|
+
path
|
|
302
|
+
.normalize(file.file)
|
|
303
|
+
.replace(
|
|
304
|
+
path.normalize(properties.directories.retrieve),
|
|
305
|
+
path.normalize(properties.directories.deploy)
|
|
306
|
+
)
|
|
307
|
+
)
|
|
308
|
+
);
|
|
307
309
|
const results = await Promise.all(copied);
|
|
308
310
|
const failed = results.filter((result) => result.status === 'failed');
|
|
309
311
|
const skipped = results.filter((result) => result.status === 'skipped');
|
package/lib/util/file.js
CHANGED
|
@@ -517,9 +517,10 @@ const File = {
|
|
|
517
517
|
* @param {string} [filetype='html'] filetype ie. JSON or SSJS
|
|
518
518
|
* @returns {Promise.<boolean>} success of config load
|
|
519
519
|
*/
|
|
520
|
-
async initPrettier(filetype) {
|
|
521
|
-
if (FileFs.prettierConfig === null) {
|
|
522
|
-
filetype
|
|
520
|
+
async initPrettier(filetype = 'html') {
|
|
521
|
+
if (FileFs.prettierConfig === null || FileFs.prettierConfigFileType !== filetype) {
|
|
522
|
+
// run this if no config was yet found or if the filetype previously used to initialize it differs (because it results in a potentially different config!)
|
|
523
|
+
FileFs.prettierConfigFileType = filetype;
|
|
523
524
|
try {
|
|
524
525
|
// pass in project dir with fake index.html to avoid "no parser" error
|
|
525
526
|
// by using process.cwd we are limiting ourselves to a config in the project root
|
|
@@ -547,5 +548,6 @@ const File = {
|
|
|
547
548
|
};
|
|
548
549
|
const FileFs = { ...fs, ...File };
|
|
549
550
|
FileFs.prettierConfig = null;
|
|
551
|
+
FileFs.prettierConfigFileType = null;
|
|
550
552
|
|
|
551
553
|
module.exports = FileFs;
|