mcdev 8.3.1 → 8.4.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/.github/ISSUE_TEMPLATE/bug.yml +1 -0
- package/.github/workflows/close_issues_on_merge.yml +4 -0
- package/.github/workflows/coverage-base-update.yml +2 -2
- package/.github/workflows/coverage-develop-branch.yml +1 -1
- package/.github/workflows/coverage-main-branch.yml +1 -1
- package/.github/workflows/coverage.yml +2 -2
- package/@types/lib/index.d.ts.map +1 -1
- package/@types/lib/metadataTypes/DataFilter.d.ts +1 -0
- package/@types/lib/metadataTypes/DataFilter.d.ts.map +1 -1
- package/@types/lib/metadataTypes/DataFilterHidden.d.ts +1 -0
- package/@types/lib/metadataTypes/DataFilterHidden.d.ts.map +1 -1
- package/@types/lib/metadataTypes/FileLocation.d.ts +74 -0
- package/@types/lib/metadataTypes/FileLocation.d.ts.map +1 -1
- package/@types/lib/metadataTypes/Journey.d.ts +6 -0
- package/@types/lib/metadataTypes/Journey.d.ts.map +1 -1
- package/@types/lib/metadataTypes/Script.d.ts +14 -0
- package/@types/lib/metadataTypes/Script.d.ts.map +1 -1
- package/@types/lib/metadataTypes/definitions/DataFilter.definition.d.ts +1 -0
- package/@types/lib/metadataTypes/definitions/DataFilterHidden.definition.d.ts +1 -0
- package/@types/lib/metadataTypes/definitions/FileLocation.definition.d.ts +62 -4
- package/@types/lib/metadataTypes/definitions/Journey.definition.d.ts +6 -0
- package/@types/lib/metadataTypes/definitions/Script.definition.d.ts +10 -0
- package/lib/cli.js +6 -0
- package/lib/index.js +1 -0
- package/lib/metadataTypes/DataFilter.js +36 -22
- package/lib/metadataTypes/Event.js +2 -2
- package/lib/metadataTypes/FileLocation.js +204 -4
- package/lib/metadataTypes/Journey.js +72 -45
- package/lib/metadataTypes/Script.js +16 -0
- package/lib/metadataTypes/definitions/DataFilter.definition.js +1 -0
- package/lib/metadataTypes/definitions/DataFilterHidden.definition.js +1 -0
- package/lib/metadataTypes/definitions/FileLocation.definition.js +52 -7
- package/lib/metadataTypes/definitions/Journey.definition.js +6 -0
- package/lib/metadataTypes/definitions/Script.definition.js +6 -0
- package/package.json +11 -11
- package/test/general.test.js +11 -11
- package/test/mockRoot/.mcdevrc.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/fileLocation/ExactTarget Enhanced FTP.fileLocation-meta.json +5 -0
- package/test/mockRoot/deploy/testInstance/testBU/fileLocation/testExisting_fileLocation_aws.fileLocation-meta.json +14 -0
- package/test/mockRoot/deploy/testInstance/testBU/fileLocation/testExisting_fileLocation_exsftp.fileLocation-meta.json +12 -0
- package/test/resourceFactory.js +9 -2
- package/test/resources/9999999/automation/v1/ftplocations/get-response.json +26 -1
- package/test/resources/9999999/automation/v1/scripts/39f6a488-20eb-4ba0-b0b9-023725b574e4/get-response.json +10 -0
- package/test/resources/9999999/automation/v1/scripts/39f6a488-20eb-4ba0-b0b9-023725b574e4/patch-response.json +2 -2
- package/test/resources/9999999/data/v1/filetransferlocation/Salesforce%20Objects%20%26%20Reports/get-response.json +4 -0
- package/test/resources/9999999/data/v1/filetransferlocation/testExisting_fileLocation_aws/patch-response.json +18 -0
- package/test/resources/9999999/data/v1/filetransferlocation/testExisting_fileLocation_azure/delete-response.json +4 -0
- package/test/resources/9999999/data/v1/filetransferlocation/testExisting_fileLocation_azure/get-response.json +18 -0
- package/test/resources/9999999/data/v1/filetransferlocation/testExisting_fileLocation_exsftp/patch-response.json +16 -0
- package/test/resources/9999999/data/v1/filetransferlocations/get-response.json +59 -0
- package/test/resources/9999999/fileLocation/build-expected.json +14 -0
- package/test/resources/9999999/fileLocation/get-aws-expected.json +14 -0
- package/test/resources/9999999/fileLocation/get-azure-expected.json +14 -0
- package/test/resources/9999999/fileLocation/get-eftp-expected.json +5 -0
- package/test/resources/9999999/fileLocation/get-exsftp-expected.json +12 -0
- package/test/resources/9999999/fileLocation/get-gcp-expected.json +10 -0
- package/test/resources/9999999/fileLocation/get-sor-expected.json +5 -0
- package/test/resources/9999999/fileLocation/patch-aws-expected.json +14 -0
- package/test/resources/9999999/fileLocation/patch-exsftp-expected.json +12 -0
- package/test/resources/9999999/fileLocation/template-expected.json +14 -0
- package/test/resources/9999999/interaction/v1/interactions/get-response-status=Published.json +40 -0
- package/test/type.automation.test.js +14 -14
- package/test/type.dataFilter.test.js +10 -2
- package/test/type.fileLocation.test.js +279 -0
- package/test/type.fileTransfer.test.js +4 -4
- package/test/type.filter.test.js +9 -2
- package/test/type.importFile.test.js +5 -5
- package/test/type.journey.test.js +26 -0
- package/test/type.query.test.js +2 -2
- package/test/type.script.test.js +1 -1
|
@@ -5,13 +5,14 @@ export default {
|
|
|
5
5
|
hasExtended: false,
|
|
6
6
|
idField: 'id',
|
|
7
7
|
keyIsFixed: true,
|
|
8
|
-
keyField: '
|
|
8
|
+
keyField: 'customerKey',
|
|
9
9
|
nameField: 'name',
|
|
10
10
|
createdDateField: null,
|
|
11
11
|
createdNameField: null,
|
|
12
12
|
lastmodDateField: null,
|
|
13
13
|
lastmodNameField: null,
|
|
14
14
|
restPagination: false,
|
|
15
|
+
maxKeyLength: 36, // confirmed max length
|
|
15
16
|
type: 'fileLocation',
|
|
16
17
|
typeDescription:
|
|
17
18
|
'Used for export or import of files to/from Marketing Cloud. Previously this was labeled ftpLocation.',
|
|
@@ -32,37 +33,81 @@ export default {
|
|
|
32
33
|
'Azure Blob Storage': 15,
|
|
33
34
|
'Google Cloud Storage': 16,
|
|
34
35
|
},
|
|
36
|
+
locationTypeMappingDeployable: {
|
|
37
|
+
'External SFTP Site': 'ExternalSftp',
|
|
38
|
+
'Amazon Simple Storage Service': 'AmazonSimpleStorage',
|
|
39
|
+
'Azure Blob Storage': 'AzureBlobStorage',
|
|
40
|
+
'Google Cloud Storage': 'GcpBlobStorage',
|
|
41
|
+
},
|
|
42
|
+
locationTypeIdMappingDeployable: {
|
|
43
|
+
2: 'ExternalSftp',
|
|
44
|
+
13: 'AmazonSimpleStorage',
|
|
45
|
+
15: 'AzureBlobStorage',
|
|
46
|
+
16: 'GcpBlobStorage',
|
|
47
|
+
},
|
|
35
48
|
fields: {
|
|
36
49
|
id: {
|
|
37
50
|
isCreateable: false,
|
|
38
51
|
isUpdateable: false,
|
|
39
|
-
retrieving:
|
|
52
|
+
retrieving: false,
|
|
40
53
|
template: false,
|
|
41
54
|
},
|
|
42
55
|
locationTypeId: {
|
|
56
|
+
// automation endpoint
|
|
43
57
|
isCreateable: false,
|
|
44
58
|
isUpdateable: false,
|
|
45
|
-
retrieving:
|
|
59
|
+
retrieving: false,
|
|
60
|
+
template: false,
|
|
61
|
+
},
|
|
62
|
+
locationType: {
|
|
63
|
+
// data endpoint
|
|
64
|
+
isCreateable: true,
|
|
65
|
+
isUpdateable: true,
|
|
66
|
+
retrieving: false,
|
|
46
67
|
template: false,
|
|
47
68
|
},
|
|
48
69
|
locationUrl: {
|
|
49
70
|
isCreateable: false,
|
|
50
71
|
isUpdateable: false,
|
|
72
|
+
retrieving: false,
|
|
73
|
+
template: false,
|
|
74
|
+
},
|
|
75
|
+
name: {
|
|
76
|
+
isCreateable: true,
|
|
77
|
+
isUpdateable: true,
|
|
51
78
|
retrieving: true,
|
|
52
79
|
template: true,
|
|
53
80
|
},
|
|
54
|
-
|
|
55
|
-
isCreateable:
|
|
56
|
-
isUpdateable:
|
|
81
|
+
customerKey: {
|
|
82
|
+
isCreateable: true,
|
|
83
|
+
isUpdateable: true,
|
|
57
84
|
retrieving: true,
|
|
58
85
|
template: true,
|
|
59
86
|
},
|
|
60
|
-
|
|
87
|
+
description: {
|
|
61
88
|
isCreateable: true,
|
|
62
89
|
isUpdateable: true,
|
|
63
90
|
retrieving: true,
|
|
64
91
|
template: true,
|
|
65
92
|
},
|
|
93
|
+
relPath: {
|
|
94
|
+
isCreateable: false,
|
|
95
|
+
isUpdateable: false,
|
|
96
|
+
retrieving: false,
|
|
97
|
+
template: false,
|
|
98
|
+
},
|
|
99
|
+
awsFileTransferLocation: {
|
|
100
|
+
skipValidation: true,
|
|
101
|
+
},
|
|
102
|
+
azureFileTransferLocation: {
|
|
103
|
+
skipValidation: true,
|
|
104
|
+
},
|
|
105
|
+
gcpFileTransferLocation: {
|
|
106
|
+
skipValidation: true,
|
|
107
|
+
},
|
|
108
|
+
sFtpFileTransferLocation: {
|
|
109
|
+
skipValidation: true,
|
|
110
|
+
},
|
|
66
111
|
c__locationType: {
|
|
67
112
|
isCreateable: false,
|
|
68
113
|
isUpdateable: false,
|
|
@@ -1188,6 +1188,12 @@ export default {
|
|
|
1188
1188
|
retrieving: true,
|
|
1189
1189
|
template: true,
|
|
1190
1190
|
},
|
|
1191
|
+
campaigns: {
|
|
1192
|
+
isCreateable: true,
|
|
1193
|
+
isUpdateable: true,
|
|
1194
|
+
retrieving: true,
|
|
1195
|
+
template: true,
|
|
1196
|
+
},
|
|
1191
1197
|
metaData: {
|
|
1192
1198
|
skipValidation: true,
|
|
1193
1199
|
},
|
|
@@ -100,6 +100,12 @@ export default {
|
|
|
100
100
|
retrieving: false,
|
|
101
101
|
template: false,
|
|
102
102
|
},
|
|
103
|
+
parentCategoryId: {
|
|
104
|
+
isCreateable: false,
|
|
105
|
+
isUpdateable: false,
|
|
106
|
+
retrieving: false,
|
|
107
|
+
template: false,
|
|
108
|
+
},
|
|
103
109
|
r__folder_Path: { skipValidation: true },
|
|
104
110
|
},
|
|
105
111
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcdev",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.0",
|
|
4
4
|
"description": "Accenture Salesforce Marketing Cloud DevTools",
|
|
5
5
|
"author": "Accenture: joern.berkefeld, douglas.midgley, robert.zimmermann, maciej.barnas",
|
|
6
6
|
"license": "MIT",
|
|
@@ -78,40 +78,40 @@
|
|
|
78
78
|
"json-to-table": "4.2.1",
|
|
79
79
|
"mustache": "4.2.0",
|
|
80
80
|
"p-limit": "6.2.0",
|
|
81
|
-
"prettier": "3.
|
|
81
|
+
"prettier": "3.8.1",
|
|
82
82
|
"prettier-plugin-sql": "0.19.2",
|
|
83
|
-
"semver": "7.7.
|
|
84
|
-
"sfmc-sdk": "2.1.
|
|
83
|
+
"semver": "7.7.4",
|
|
84
|
+
"sfmc-sdk": "2.1.4",
|
|
85
85
|
"simple-git": "3.30.0",
|
|
86
86
|
"toposort": "2.0.2",
|
|
87
87
|
"update-notifier": "7.3.1",
|
|
88
88
|
"winston": "3.19.0",
|
|
89
89
|
"yargs": "17.7.2",
|
|
90
|
-
"yocto-spinner": "1.
|
|
90
|
+
"yocto-spinner": "1.1.0"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@eslint/js": "9.
|
|
93
|
+
"@eslint/js": "9.39.2",
|
|
94
94
|
"@types/fs-extra": "11.0.4",
|
|
95
95
|
"@types/inquirer": "9.0.7",
|
|
96
96
|
"@types/mocha": "10.0.8",
|
|
97
|
-
"@types/node": "
|
|
97
|
+
"@types/node": "25.2.3",
|
|
98
98
|
"@types/yargs": "17.0.33",
|
|
99
99
|
"assert": "2.1.0",
|
|
100
100
|
"axios-mock-adapter": "2.0.0",
|
|
101
101
|
"c8": "10.1.3",
|
|
102
102
|
"chai": "6.2.2",
|
|
103
103
|
"chai-files": "1.4.0",
|
|
104
|
-
"eslint": "9.
|
|
104
|
+
"eslint": "9.39.2",
|
|
105
105
|
"eslint-config-ssjs": "2.0.0",
|
|
106
106
|
"eslint-plugin-jsdoc": "50.7.1",
|
|
107
107
|
"eslint-plugin-mocha": "11.2.0",
|
|
108
108
|
"eslint-plugin-prettier": "5.5.5",
|
|
109
109
|
"eslint-plugin-unicorn": "59.0.1",
|
|
110
|
-
"fast-xml-parser": "5.3.
|
|
110
|
+
"fast-xml-parser": "5.3.5",
|
|
111
111
|
"globals": "17.3.0",
|
|
112
112
|
"husky": "9.1.7",
|
|
113
|
-
"lint-staged": "16.2.
|
|
114
|
-
"mocha": "11.7.
|
|
113
|
+
"lint-staged": "16.2.7",
|
|
114
|
+
"mocha": "11.7.5",
|
|
115
115
|
"mock-fs": "5.3.0",
|
|
116
116
|
"npm-run-all": "4.1.5",
|
|
117
117
|
"prettier-eslint": "16.4.2",
|
package/test/general.test.js
CHANGED
|
@@ -775,7 +775,7 @@ describe('GENERAL', () => {
|
|
|
775
775
|
// download first before we test buildTemplate
|
|
776
776
|
await handler.retrieve('testInstance/testBU', ['automation', 'query']);
|
|
777
777
|
|
|
778
|
-
const expectedApiCallsRetrieve =
|
|
778
|
+
const expectedApiCallsRetrieve = 37;
|
|
779
779
|
assert.equal(
|
|
780
780
|
testUtils.getAPIHistoryLength(),
|
|
781
781
|
expectedApiCallsRetrieve,
|
|
@@ -880,7 +880,7 @@ describe('GENERAL', () => {
|
|
|
880
880
|
});
|
|
881
881
|
|
|
882
882
|
it('buildTemplate + buildDefinition for multiple types with keys and --retrieve', async () => {
|
|
883
|
-
const expectedApiCallsRetrieve =
|
|
883
|
+
const expectedApiCallsRetrieve = 34;
|
|
884
884
|
|
|
885
885
|
// preparation
|
|
886
886
|
const argvMetadata = [
|
|
@@ -985,7 +985,7 @@ describe('GENERAL', () => {
|
|
|
985
985
|
// download first before we test buildTemplate
|
|
986
986
|
await handler.retrieve('testInstance/testBU');
|
|
987
987
|
|
|
988
|
-
const expectedApiCallsRetrieve =
|
|
988
|
+
const expectedApiCallsRetrieve = 109;
|
|
989
989
|
assert.equal(
|
|
990
990
|
testUtils.getAPIHistoryLength(),
|
|
991
991
|
expectedApiCallsRetrieve,
|
|
@@ -1227,7 +1227,7 @@ describe('GENERAL', () => {
|
|
|
1227
1227
|
await testUtils.getActualDeployFile('testTemplated_query', 'query', 'sql')
|
|
1228
1228
|
).to.equal(await testUtils.getExpectedFile('9999999', 'query', 'build', 'sql'));
|
|
1229
1229
|
|
|
1230
|
-
const expectedApiCallsRetrieve =
|
|
1230
|
+
const expectedApiCallsRetrieve = 113;
|
|
1231
1231
|
assert.equal(
|
|
1232
1232
|
testUtils.getAPIHistoryLength(),
|
|
1233
1233
|
expectedApiCallsRetrieve,
|
|
@@ -1239,7 +1239,7 @@ describe('GENERAL', () => {
|
|
|
1239
1239
|
// download first before we test buildTemplate
|
|
1240
1240
|
await handler.retrieve('testInstance/testBU', ['automation', 'query']);
|
|
1241
1241
|
|
|
1242
|
-
const expectedApiCallsRetrieve =
|
|
1242
|
+
const expectedApiCallsRetrieve = 37;
|
|
1243
1243
|
assert.equal(
|
|
1244
1244
|
testUtils.getAPIHistoryLength(),
|
|
1245
1245
|
expectedApiCallsRetrieve,
|
|
@@ -1431,7 +1431,7 @@ describe('GENERAL', () => {
|
|
|
1431
1431
|
// download first before we test buildTemplate
|
|
1432
1432
|
await handler.retrieve('testInstance/testBU', ['automation', 'query']);
|
|
1433
1433
|
|
|
1434
|
-
const expectedApiCallsRetrieve =
|
|
1434
|
+
const expectedApiCallsRetrieve = 37;
|
|
1435
1435
|
assert.equal(
|
|
1436
1436
|
testUtils.getAPIHistoryLength(),
|
|
1437
1437
|
expectedApiCallsRetrieve,
|
|
@@ -1502,7 +1502,7 @@ describe('GENERAL', () => {
|
|
|
1502
1502
|
// download first before we test buildTemplate
|
|
1503
1503
|
await handler.retrieve('testInstance/testBU', ['automation', 'query']);
|
|
1504
1504
|
|
|
1505
|
-
const expectedApiCallsRetrieve =
|
|
1505
|
+
const expectedApiCallsRetrieve = 37;
|
|
1506
1506
|
assert.equal(
|
|
1507
1507
|
testUtils.getAPIHistoryLength(),
|
|
1508
1508
|
expectedApiCallsRetrieve,
|
|
@@ -1601,7 +1601,7 @@ describe('GENERAL', () => {
|
|
|
1601
1601
|
// download everything before we test buildTemplate
|
|
1602
1602
|
await handler.retrieve('testInstance/testBU');
|
|
1603
1603
|
|
|
1604
|
-
const expectedApiCallsRetrieve =
|
|
1604
|
+
const expectedApiCallsRetrieve = 109;
|
|
1605
1605
|
assert.equal(
|
|
1606
1606
|
testUtils.getAPIHistoryLength(),
|
|
1607
1607
|
expectedApiCallsRetrieve,
|
|
@@ -1812,7 +1812,7 @@ describe('GENERAL', () => {
|
|
|
1812
1812
|
await testUtils.getActualDeployFile('testTemplated_query', 'query', 'sql')
|
|
1813
1813
|
).to.equal(await testUtils.getExpectedFile('9999999', 'query', 'build', 'sql'));
|
|
1814
1814
|
|
|
1815
|
-
const expectedApiCallsRetrieve =
|
|
1815
|
+
const expectedApiCallsRetrieve = 113;
|
|
1816
1816
|
assert.equal(
|
|
1817
1817
|
testUtils.getAPIHistoryLength(),
|
|
1818
1818
|
expectedApiCallsRetrieve,
|
|
@@ -1824,7 +1824,7 @@ describe('GENERAL', () => {
|
|
|
1824
1824
|
// download first before we test buildTemplate
|
|
1825
1825
|
await handler.retrieve('testInstance/testBU', ['automation', 'query']);
|
|
1826
1826
|
|
|
1827
|
-
const expectedApiCallsRetrieve =
|
|
1827
|
+
const expectedApiCallsRetrieve = 37;
|
|
1828
1828
|
assert.equal(
|
|
1829
1829
|
testUtils.getAPIHistoryLength(),
|
|
1830
1830
|
expectedApiCallsRetrieve,
|
|
@@ -2003,7 +2003,7 @@ describe('GENERAL', () => {
|
|
|
2003
2003
|
// download first before we test buildTemplate
|
|
2004
2004
|
await handler.retrieve('testInstance/testBU');
|
|
2005
2005
|
|
|
2006
|
-
const expectedApiCallsRetrieve =
|
|
2006
|
+
const expectedApiCallsRetrieve = 109;
|
|
2007
2007
|
assert.equal(
|
|
2008
2008
|
testUtils.getAPIHistoryLength(),
|
|
2009
2009
|
expectedApiCallsRetrieve,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "testExisting_fileLocation_aws_name",
|
|
3
|
+
"customerKey": "testExisting_fileLocation_aws",
|
|
4
|
+
"description": "updated via deploy",
|
|
5
|
+
"awsFileTransferLocation": {
|
|
6
|
+
"regionName": "eucentral1",
|
|
7
|
+
"transferAccelerationEnabled": false,
|
|
8
|
+
"accessKeyId": "key-id",
|
|
9
|
+
"relativePath": "my/path",
|
|
10
|
+
"bucketName": "bucket-name",
|
|
11
|
+
"authType": "AccessKey"
|
|
12
|
+
},
|
|
13
|
+
"c__locationType": "Amazon Simple Storage Service"
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "testExisting_fileLocation_exsftp_name",
|
|
3
|
+
"customerKey": "testExisting_fileLocation_exsftp",
|
|
4
|
+
"description": "updated via deploy",
|
|
5
|
+
"sFtpFileTransferLocation": {
|
|
6
|
+
"portNumber": 22,
|
|
7
|
+
"userName": "abc",
|
|
8
|
+
"url": "sftp://test.com",
|
|
9
|
+
"authType": "Password"
|
|
10
|
+
},
|
|
11
|
+
"c__locationType": "External SFTP Site"
|
|
12
|
+
}
|
package/test/resourceFactory.js
CHANGED
|
@@ -276,6 +276,8 @@ export const handleRESTRequest = async (config) => {
|
|
|
276
276
|
filterName = 'mostRecentVersionOnly';
|
|
277
277
|
} else if (urlObj.searchParams.get('versionNumber')) {
|
|
278
278
|
filterName = 'versionNumber';
|
|
279
|
+
} else if (urlObj.searchParams.get('status')) {
|
|
280
|
+
filterName = 'status';
|
|
279
281
|
} else if (urlObj.searchParams.get('id')) {
|
|
280
282
|
filterName = 'id';
|
|
281
283
|
}
|
|
@@ -301,6 +303,9 @@ export const handleRESTRequest = async (config) => {
|
|
|
301
303
|
: '') +
|
|
302
304
|
(urlObj.searchParams.get('mostRecentVersionOnly')
|
|
303
305
|
? 'mostRecentVersionOnly=' + urlObj.searchParams.get('mostRecentVersionOnly')
|
|
306
|
+
: '') +
|
|
307
|
+
(urlObj.searchParams.get('status')
|
|
308
|
+
? 'status=' + urlObj.searchParams.get('status')
|
|
304
309
|
: '')
|
|
305
310
|
: null;
|
|
306
311
|
|
|
@@ -338,7 +343,8 @@ export const handleRESTRequest = async (config) => {
|
|
|
338
343
|
response.items &&
|
|
339
344
|
filterName !== 'mostRecentVersionOnly' &&
|
|
340
345
|
filterName !== 'versionNumber' &&
|
|
341
|
-
filterName !== 'id'
|
|
346
|
+
filterName !== 'id' &&
|
|
347
|
+
filterName !== 'status'
|
|
342
348
|
) {
|
|
343
349
|
response.items = response.items.filter((def) => def.name == filterName);
|
|
344
350
|
}
|
|
@@ -407,7 +413,8 @@ export const handleRESTRequest = async (config) => {
|
|
|
407
413
|
filterName &&
|
|
408
414
|
filterName !== 'mostRecentVersionOnly' &&
|
|
409
415
|
filterName !== 'versionNumber' &&
|
|
410
|
-
filterName !== 'id'
|
|
416
|
+
filterName !== 'id' &&
|
|
417
|
+
filterName !== 'status'
|
|
411
418
|
) {
|
|
412
419
|
const response = JSON.parse(
|
|
413
420
|
await fs.readFile(testPath + '.json', {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"page": 1,
|
|
3
3
|
"pageSize": 2,
|
|
4
|
-
"count":
|
|
4
|
+
"count": 5,
|
|
5
5
|
"items": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Salesforce Objects & Reports",
|
|
@@ -13,6 +13,31 @@
|
|
|
13
13
|
"id": "41a5ded7-0d98-4910-a15f-d09e7ab0af24",
|
|
14
14
|
"locationTypeId": 0,
|
|
15
15
|
"relPath": "ExactTarget Enhanced FTP"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "testExisting_fileLocation_gcp_name",
|
|
19
|
+
"id": "5fc2cc79-b4fb-465d-bc09-7dacf8afebae",
|
|
20
|
+
"locationTypeId": 16,
|
|
21
|
+
"locationUrl": "GCP://some-bucket/Task/Activity"
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
{
|
|
25
|
+
"name": "testExisting_fileLocation_azure_name",
|
|
26
|
+
"id": "fff73b41-dced-4a2a-a6cf-430a46a18df6",
|
|
27
|
+
"locationTypeId": 15,
|
|
28
|
+
"locationUrl": "Azure://container-name/my/path"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "testExisting_fileLocation_aws_name",
|
|
32
|
+
"id": "62bb39b1-c84f-47b5-98a0-61e5d79b7f31",
|
|
33
|
+
"locationTypeId": 13,
|
|
34
|
+
"locationUrl": "S3://bucket-name/my/path"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "testExisting_fileLocation_exsftp_name",
|
|
38
|
+
"id": "335802a4-479d-4834-a491-fc5d2d068132",
|
|
39
|
+
"locationTypeId": 2,
|
|
40
|
+
"locationUrl": "sftp://test.com"
|
|
16
41
|
}
|
|
17
42
|
]
|
|
18
43
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ssjsActivityId": "39f6a488-20eb-4ba0-b0b9-023725b574e4",
|
|
3
|
+
"name": "testExisting_script",
|
|
4
|
+
"key": "testExisting_script",
|
|
5
|
+
"description": "updated on deploy",
|
|
6
|
+
"script": "<script runat=\"server\">\n// dummy updated\n</script>",
|
|
7
|
+
"categoryId": 304,
|
|
8
|
+
"createdDate": "2022-10-20T00:41:26.163",
|
|
9
|
+
"modifiedDate": "2022-10-20T00:41:26.163"
|
|
10
|
+
}
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"description": "updated on deploy",
|
|
6
6
|
"script": "<script runat=\"server\">\n// dummy updated\n</script>",
|
|
7
7
|
"categoryId": 304,
|
|
8
|
-
"createdDate": "
|
|
9
|
-
"modifiedDate": "
|
|
8
|
+
"createdDate": "0001-01-01T00:00:00",
|
|
9
|
+
"modifiedDate": "0001-01-01T00:00:00"
|
|
10
10
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fileTransferLocation": {
|
|
3
|
+
"customerKey": "testExisting_fileLocation_aws",
|
|
4
|
+
"name": "testExisting_fileLocation_aws_name",
|
|
5
|
+
"description": "updated via deploy",
|
|
6
|
+
"locationType": "AmazonSimpleStorage",
|
|
7
|
+
"awsFileTransferLocation": {
|
|
8
|
+
"regionName": "eucentral1",
|
|
9
|
+
"transferAccelerationEnabled": false,
|
|
10
|
+
"accessKeyId": "key-id",
|
|
11
|
+
"relativePath": "my/path",
|
|
12
|
+
"bucketName": "bucket-name",
|
|
13
|
+
"authType": "AccessKey"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"requestId": "ae8149ee-819e-40b7-b08f-cb59fdf88ddb",
|
|
17
|
+
"resultMessages": []
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fileTransferLocation": {
|
|
3
|
+
"customerKey": "testExisting_fileLocation_azure",
|
|
4
|
+
"name": "testExisting_fileLocation_azure_name",
|
|
5
|
+
"description": "blabla",
|
|
6
|
+
"locationType": "AzureBlobStorage",
|
|
7
|
+
"azureFileTransferLocation": {
|
|
8
|
+
"storageAccountName": "accountname",
|
|
9
|
+
"tenantId": "my-id",
|
|
10
|
+
"accessKeyId": "client-id",
|
|
11
|
+
"relativePath": "my/path",
|
|
12
|
+
"bucketName": "container-name",
|
|
13
|
+
"authType": "AccessKey"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"requestId": "d49c372e-9939-4b81-91d2-69a37a8bb036",
|
|
17
|
+
"resultMessages": []
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fileTransferLocation": {
|
|
3
|
+
"customerKey": "testExisting_fileLocation_exsftp",
|
|
4
|
+
"name": "testExisting_fileLocation_exsftp_name",
|
|
5
|
+
"description": "updated via deploy",
|
|
6
|
+
"locationType": "ExternalSftp",
|
|
7
|
+
"sFtpFileTransferLocation": {
|
|
8
|
+
"portNumber": 22,
|
|
9
|
+
"userName": "abc",
|
|
10
|
+
"url": "sftp://test.com",
|
|
11
|
+
"authType": "Password"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"requestId": "05ef7257-72e6-4774-87c7-1f99aa892534",
|
|
15
|
+
"resultMessages": []
|
|
16
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"page": 1,
|
|
3
|
+
"pageSize": 50,
|
|
4
|
+
"count": 4,
|
|
5
|
+
"items": [
|
|
6
|
+
{
|
|
7
|
+
"customerKey": "testExisting_fileLocation_gcp",
|
|
8
|
+
"name": "testExisting_fileLocation_gcp_name",
|
|
9
|
+
"description": "",
|
|
10
|
+
"locationType": "GcpBlobStorage",
|
|
11
|
+
"gcpFileTransferLocation": {
|
|
12
|
+
"relativePath": "Task/Activity",
|
|
13
|
+
"bucketName": "some-bucket"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"customerKey": "testExisting_fileLocation_aws",
|
|
18
|
+
"name": "testExisting_fileLocation_aws_name",
|
|
19
|
+
"description": "",
|
|
20
|
+
"locationType": "AmazonSimpleStorage",
|
|
21
|
+
"awsFileTransferLocation": {
|
|
22
|
+
"regionName": "eucentral1",
|
|
23
|
+
"transferAccelerationEnabled": false,
|
|
24
|
+
"accessKeyId": "key-id",
|
|
25
|
+
"relativePath": "my/path",
|
|
26
|
+
"bucketName": "bucket-name",
|
|
27
|
+
"authType": "AccessKey"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"customerKey": "testExisting_fileLocation_azure",
|
|
32
|
+
"name": "testExisting_fileLocation_azure_name",
|
|
33
|
+
"description": "blabla",
|
|
34
|
+
"locationType": "AzureBlobStorage",
|
|
35
|
+
"azureFileTransferLocation": {
|
|
36
|
+
"storageAccountName": "accountname",
|
|
37
|
+
"tenantId": "my-id",
|
|
38
|
+
"accessKeyId": "client-id",
|
|
39
|
+
"relativePath": "my/path",
|
|
40
|
+
"bucketName": "container-name",
|
|
41
|
+
"authType": "AccessKey"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"customerKey": "testExisting_fileLocation_exsftp",
|
|
46
|
+
"name": "testExisting_fileLocation_exsftp_name",
|
|
47
|
+
"description": "blabla",
|
|
48
|
+
"locationType": "ExternalSftp",
|
|
49
|
+
"sFtpFileTransferLocation": {
|
|
50
|
+
"portNumber": 22,
|
|
51
|
+
"userName": "abc",
|
|
52
|
+
"url": "sftp://test.com",
|
|
53
|
+
"authType": "Password"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"requestId": "3870c0e1-943c-4ae4-9cff-26736372dbe7",
|
|
58
|
+
"resultMessages": []
|
|
59
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"customerKey": "testTemplated_fileLocation_azure",
|
|
3
|
+
"description": "blabla",
|
|
4
|
+
"name": "testTemplated_fileLocation_azure_name",
|
|
5
|
+
"azureFileTransferLocation": {
|
|
6
|
+
"accessKeyId": "client-id",
|
|
7
|
+
"authType": "AccessKey",
|
|
8
|
+
"bucketName": "container-name",
|
|
9
|
+
"relativePath": "my/path",
|
|
10
|
+
"storageAccountName": "accountname",
|
|
11
|
+
"tenantId": "my-id"
|
|
12
|
+
},
|
|
13
|
+
"c__locationType": "Azure Blob Storage"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"customerKey": "testExisting_fileLocation_aws",
|
|
3
|
+
"name": "testExisting_fileLocation_aws_name",
|
|
4
|
+
"description": "",
|
|
5
|
+
"awsFileTransferLocation": {
|
|
6
|
+
"accessKeyId": "key-id",
|
|
7
|
+
"authType": "AccessKey",
|
|
8
|
+
"bucketName": "bucket-name",
|
|
9
|
+
"regionName": "eucentral1",
|
|
10
|
+
"relativePath": "my/path",
|
|
11
|
+
"transferAccelerationEnabled": false
|
|
12
|
+
},
|
|
13
|
+
"c__locationType": "Amazon Simple Storage Service"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"customerKey": "testExisting_fileLocation_azure",
|
|
3
|
+
"name": "testExisting_fileLocation_azure_name",
|
|
4
|
+
"description": "blabla",
|
|
5
|
+
"azureFileTransferLocation": {
|
|
6
|
+
"accessKeyId": "client-id",
|
|
7
|
+
"authType": "AccessKey",
|
|
8
|
+
"bucketName": "container-name",
|
|
9
|
+
"relativePath": "my/path",
|
|
10
|
+
"storageAccountName": "accountname",
|
|
11
|
+
"tenantId": "my-id"
|
|
12
|
+
},
|
|
13
|
+
"c__locationType": "Azure Blob Storage"
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"customerKey": "testExisting_fileLocation_exsftp",
|
|
3
|
+
"name": "testExisting_fileLocation_exsftp_name",
|
|
4
|
+
"description": "blabla",
|
|
5
|
+
"sFtpFileTransferLocation": {
|
|
6
|
+
"authType": "Password",
|
|
7
|
+
"portNumber": 22,
|
|
8
|
+
"url": "sftp://test.com",
|
|
9
|
+
"userName": "abc"
|
|
10
|
+
},
|
|
11
|
+
"c__locationType": "External SFTP Site"
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"customerKey": "testExisting_fileLocation_gcp",
|
|
3
|
+
"name": "testExisting_fileLocation_gcp_name",
|
|
4
|
+
"description": "",
|
|
5
|
+
"gcpFileTransferLocation": {
|
|
6
|
+
"bucketName": "some-bucket",
|
|
7
|
+
"relativePath": "Task/Activity"
|
|
8
|
+
},
|
|
9
|
+
"c__locationType": "Google Cloud Storage"
|
|
10
|
+
}
|