mcdev 3.0.0 → 3.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.
Files changed (50) hide show
  1. package/.eslintrc.json +1 -1
  2. package/.github/ISSUE_TEMPLATE/bug.yml +72 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. package/.github/ISSUE_TEMPLATE/task.md +10 -0
  5. package/.github/PULL_REQUEST_TEMPLATE.md +11 -0
  6. package/.github/workflows/npm-publish.yml +33 -0
  7. package/.issuetracker +11 -3
  8. package/.vscode/extensions.json +1 -2
  9. package/.vscode/settings.json +19 -4
  10. package/CHANGELOG.md +98 -0
  11. package/README.md +247 -142
  12. package/boilerplate/config.json +3 -2
  13. package/docs/dist/considerations.md +66 -0
  14. package/docs/dist/documentation.md +5794 -0
  15. package/lib/Deployer.js +4 -1
  16. package/lib/MetadataTypeDefinitions.js +1 -0
  17. package/lib/MetadataTypeInfo.js +1 -0
  18. package/lib/Retriever.js +32 -17
  19. package/lib/cli.js +295 -0
  20. package/lib/index.js +774 -1019
  21. package/lib/metadataTypes/AccountUser.js +389 -0
  22. package/lib/metadataTypes/Asset.js +140 -116
  23. package/lib/metadataTypes/Automation.js +119 -54
  24. package/lib/metadataTypes/DataExtension.js +172 -131
  25. package/lib/metadataTypes/DataExtensionField.js +134 -4
  26. package/lib/metadataTypes/Folder.js +66 -69
  27. package/lib/metadataTypes/ImportFile.js +4 -6
  28. package/lib/metadataTypes/MetadataType.js +168 -80
  29. package/lib/metadataTypes/Query.js +54 -25
  30. package/lib/metadataTypes/Role.js +13 -8
  31. package/lib/metadataTypes/Script.js +43 -24
  32. package/lib/metadataTypes/definitions/AccountUser.definition.js +227 -0
  33. package/lib/metadataTypes/definitions/Asset.definition.js +1 -0
  34. package/lib/metadataTypes/definitions/Campaign.definition.js +1 -1
  35. package/lib/metadataTypes/definitions/DataExtension.definition.js +1 -1
  36. package/lib/metadataTypes/definitions/DataExtensionField.definition.js +1 -1
  37. package/lib/metadataTypes/definitions/Folder.definition.js +1 -1
  38. package/lib/metadataTypes/definitions/ImportFile.definition.js +2 -1
  39. package/lib/metadataTypes/definitions/Script.definition.js +5 -5
  40. package/lib/retrieveChangelog.js +96 -0
  41. package/lib/util/cli.js +4 -6
  42. package/lib/util/init.config.js +3 -0
  43. package/lib/util/init.git.js +2 -1
  44. package/lib/util/util.js +35 -18
  45. package/package.json +20 -24
  46. package/test/util/file.js +51 -0
  47. package/img/README.md/troubleshoot-nodejs-postinstall.jpg +0 -0
  48. package/postinstall.js +0 -41
  49. package/test/deployer.js +0 -16
  50. package/test/util.js +0 -26
@@ -4,6 +4,32 @@ const MetadataType = require('./MetadataType');
4
4
  const Util = require('../util/util');
5
5
  const File = require('../util/file');
6
6
  const Mustache = require('mustache');
7
+
8
+ /**
9
+ * @typedef {Object} QueryItem
10
+ * @property {string} name name
11
+ * @property {string} key key
12
+ * @property {string} description -
13
+ * @property {string} targetKey key of target data extension
14
+ * @property {string} createdDate e.g. "2020-09-14T01:42:03.017"
15
+ * @property {string} modifiedDate e.g. "2020-09-14T01:42:03.017"
16
+ * @property {'Overwrite'|'Update'|'Append'} targetUpdateTypeName defines how the query writes into the target data extension
17
+ * @property {0|1|2} [targetUpdateTypeId] mapped to targetUpdateTypeName via this.definition.targetUpdateTypeMapping
18
+ * @property {string} [targetId] Object ID of DE (removed before save)
19
+ * @property {string} [targetDescription] Description DE (removed before save)
20
+ * @property {boolean} isFrozen looks like this is always set to false
21
+ * @property {string} [queryText] contains SQL query with line breaks converted to '\n'. The content is extracted during retrieval and written into a separate *.sql file
22
+ * @property {string} [categoryId] holds folder ID, replaced with r__folder_Path during retrieve
23
+ * @property {string} r__folder_Path folder path in which this DE is saved
24
+ *
25
+ * @typedef {Object.<string, QueryItem>} QueryMap
26
+ *
27
+ * @typedef {Object} CodeExtractItem
28
+ * @property {QueryItem} json metadata of one item w/o code
29
+ * @property {MetadataType.CodeExtract[]} codeArr list of code snippets in this item
30
+ * @property {string[]} subFolder mostly set to null, otherwise list of subfolders
31
+ */
32
+
7
33
  /**
8
34
  * Query MetadataType
9
35
  * @augments MetadataType
@@ -11,8 +37,8 @@ const Mustache = require('mustache');
11
37
  class Query extends MetadataType {
12
38
  /**
13
39
  * Retrieves Metadata of queries
14
- * @param {String} retrieveDir Directory where retrieved metadata directory will be saved
15
- * @returns {Promise<Object>} Promise of metadata
40
+ * @param {string} retrieveDir Directory where retrieved metadata directory will be saved
41
+ * @returns {Promise<{metadata:QueryMap,type:string}>} Promise of metadata
16
42
  */
17
43
  static async retrieve(retrieveDir) {
18
44
  return super.retrieveREST(retrieveDir, '/automation/v1/queries/', null);
@@ -20,7 +46,7 @@ class Query extends MetadataType {
20
46
 
21
47
  /**
22
48
  * Retrieves query metadata for caching
23
- * @returns {Promise<Object>} Promise of metadata
49
+ * @returns {Promise<{metadata:QueryMap,type:string}>} Promise of metadata
24
50
  */
25
51
  static async retrieveForCache() {
26
52
  return super.retrieveREST(null, '/automation/v1/queries/', null);
@@ -28,26 +54,30 @@ class Query extends MetadataType {
28
54
 
29
55
  /**
30
56
  * Retrieve a specific Query by Name
31
- * @param {String} templateDir Directory where retrieved metadata directory will be saved
32
- * @param {String} name name of the metadata file
33
- * @param {Object} templateVariables variables to be replaced in the metadata
34
- * @returns {Promise<Object>} Promise of metadata
57
+ * @param {string} templateDir Directory where retrieved metadata directory will be saved
58
+ * @param {string} name name of the metadata file
59
+ * @param {Util.TemplateMap} templateVariables variables to be replaced in the metadata
60
+ * @returns {Promise<{metadata:QueryMap,type:string}>} Promise of metadata
35
61
  */
36
62
  static async retrieveAsTemplate(templateDir, name, templateVariables) {
37
- return super.retrieveREST(
63
+ const response = await super.retrieveREST(
38
64
  templateDir,
39
65
  '/automation/v1/queries/?$filter=Name%20eq%20' + name.split(' ').join('%20'),
40
66
  null,
41
67
  templateVariables
42
68
  );
69
+ if (response && response.metadata && !Object.keys(response.metadata).length) {
70
+ Util.logger.error(`${this.definition.type} '${name}' not found on server.`);
71
+ }
72
+ return response;
43
73
  }
44
74
 
45
75
  /**
46
76
  * manages post retrieve steps
47
- * @param {Object} metadata a single query
48
- * @param {String} _ unused
49
- * @param {Boolean} isTemplating signals that we are retrieving templates
50
- * @returns {Object[]} Array with one metadata object and one query string
77
+ * @param {QueryItem} metadata a single query
78
+ * @param {string} _ unused
79
+ * @param {boolean} isTemplating signals that we are retrieving templates
80
+ * @returns {CodeExtractItem} Array with one metadata object and one query string
51
81
  */
52
82
  static postRetrieveTasks(metadata, _, isTemplating) {
53
83
  // if retrieving template, replace the name with customer key if that wasn't already the case
@@ -61,7 +91,7 @@ class Query extends MetadataType {
61
91
 
62
92
  /**
63
93
  * Creates a single query
64
- * @param {Object} query a single query
94
+ * @param {QueryItem} query a single query
65
95
  * @returns {Promise} Promise
66
96
  */
67
97
  static create(query) {
@@ -71,7 +101,7 @@ class Query extends MetadataType {
71
101
 
72
102
  /**
73
103
  * Updates a single query
74
- * @param {Object} query a single query
104
+ * @param {QueryItem} query a single query
75
105
  * @returns {Promise} Promise
76
106
  */
77
107
  static update(query) {
@@ -81,9 +111,9 @@ class Query extends MetadataType {
81
111
 
82
112
  /**
83
113
  * prepares a Query for deployment
84
- * @param {Object} metadata a single query activity definition
85
- * @param {String} deployDir directory of deploy files
86
- * @returns {Promise} Promise
114
+ * @param {QueryItem} metadata a single query activity
115
+ * @param {string} deployDir directory of deploy files
116
+ * @returns {Promise<QueryItem>} Promise
87
117
  */
88
118
  static async preDeployTasks(metadata, deployDir) {
89
119
  metadata.queryText = await File.readFile(
@@ -114,20 +144,19 @@ class Query extends MetadataType {
114
144
  } catch (ex) {
115
145
  throw new Error(`Query '${metadata.key}': ${ex.message}`);
116
146
  }
117
- metadata.targetUpdateTypeId = this.definition.targetUpdateTypeMapping[
118
- metadata.targetUpdateTypeName
119
- ];
147
+ metadata.targetUpdateTypeId =
148
+ this.definition.targetUpdateTypeMapping[metadata.targetUpdateTypeName];
120
149
  return metadata;
121
150
  }
122
151
 
123
152
  /**
124
153
  * helper for buildDefinition
125
154
  * handles extracted code if any are found for complex types
126
- * @param {String} templateDir Directory where metadata templates are stored
127
- * @param {String|String[]} targetDir (List of) Directory where built definitions will be saved
155
+ * @param {string} templateDir Directory where metadata templates are stored
156
+ * @param {string|string[]} targetDir (List of) Directory where built definitions will be saved
128
157
  * @param {Object} metadata main JSON file that was read from file system
129
158
  * @param {Object} variables variables to be replaced in the metadata
130
- * @param {String} templateName name of the template to be built
159
+ * @param {string} templateName name of the template to be built
131
160
  * @returns {Promise} Promise
132
161
  */
133
162
  static async buildDefinitionForExtracts(
@@ -180,8 +209,8 @@ class Query extends MetadataType {
180
209
 
181
210
  /**
182
211
  * parses retrieved Metadata before saving
183
- * @param {Object} metadata a single query activity definition
184
- * @returns {Array} Array with one metadata object and one sql string
212
+ * @param {QueryItem} metadata a single query activity definition
213
+ * @returns {CodeExtractItem} a single item with code parts extracted
185
214
  */
186
215
  static parseMetadata(metadata) {
187
216
  // folder
@@ -107,14 +107,19 @@ class Role extends MetadataType {
107
107
  return;
108
108
  }
109
109
  if (!metadata) {
110
- metadata = this.readBUMetadataForType(
111
- File.normalizePath([
112
- this.properties.directories.retrieve,
113
- buObject.credential,
114
- Util.parentBuName,
115
- ]),
116
- true
117
- ).role;
110
+ try {
111
+ metadata = this.readBUMetadataForType(
112
+ File.normalizePath([
113
+ this.properties.directories.retrieve,
114
+ buObject.credential,
115
+ Util.parentBuName,
116
+ ]),
117
+ true
118
+ ).role;
119
+ } catch (ex) {
120
+ Util.logger.error(ex.message);
121
+ return;
122
+ }
118
123
  }
119
124
  const directory = this.properties.directories.roles;
120
125
 
@@ -5,6 +5,25 @@ const Util = require('../util/util');
5
5
  const File = require('../util/file');
6
6
  const Mustache = require('mustache');
7
7
 
8
+ /**
9
+ * @typedef {Object} ScriptItem
10
+ * @property {string} name name
11
+ * @property {string} key key
12
+ * @property {string} description -
13
+ * @property {string} createdDate e.g. "2020-09-14T01:42:03.017"
14
+ * @property {string} modifiedDate e.g. "2020-09-14T01:42:03.017"
15
+ * @property {string} [script] contains script with line breaks converted to '\n'. The content is extracted during retrieval and written into a separate *.ssjs file
16
+ * @property {string} [categoryId] holds folder ID, replaced with r__folder_Path during retrieve
17
+ * @property {string} r__folder_Path folder path in which this DE is saved
18
+ *
19
+ * @typedef {Object.<string, ScriptItem>} ScriptMap
20
+ *
21
+ * @typedef {Object} CodeExtractItem
22
+ * @property {ScriptItem} json metadata of one item w/o code
23
+ * @property {MetadataType.CodeExtract[]} codeArr list of code snippets in this item
24
+ * @property {string[]} subFolder mostly set to null, otherwise list of subfolders
25
+ */
26
+
8
27
  /**
9
28
  * Script MetadataType
10
29
  * @augments MetadataType
@@ -13,8 +32,8 @@ class Script extends MetadataType {
13
32
  /**
14
33
  * Retrieves Metadata of Script
15
34
  * Endpoint /automation/v1/scripts/ return all Scripts with all details.
16
- * @param {String} retrieveDir Directory where retrieved metadata directory will be saved
17
- * @returns {Promise} Promise
35
+ * @param {string} retrieveDir Directory where retrieved metadata directory will be saved
36
+ * @returns {Promise<{metadata:ScriptMap,type:string}>} Promise
18
37
  */
19
38
  static async retrieve(retrieveDir) {
20
39
  await File.initPrettier('ssjs');
@@ -22,7 +41,7 @@ class Script extends MetadataType {
22
41
  }
23
42
  /**
24
43
  * Retrieves script metadata for caching
25
- * @returns {Promise} Promise
44
+ * @returns {Promise<{metadata:ScriptMap,type:string}>} Promise
26
45
  */
27
46
  static async retrieveForCache() {
28
47
  return super.retrieveREST(null, '/automation/v1/scripts/', null);
@@ -30,10 +49,10 @@ class Script extends MetadataType {
30
49
 
31
50
  /**
32
51
  * Retrieve a specific Script by Name
33
- * @param {String} templateDir Directory where retrieved metadata directory will be saved
34
- * @param {String} name name of the metadata file
35
- * @param {Object} templateVariables variables to be replaced in the metadata
36
- * @returns {Promise} Promise
52
+ * @param {string} templateDir Directory where retrieved metadata directory will be saved
53
+ * @param {string} name name of the metadata file
54
+ * @param {Util.TemplateMap} templateVariables variables to be replaced in the metadata
55
+ * @returns {Promise<{metadata:ScriptMap,type:string}>} Promise
37
56
  */
38
57
  static async retrieveAsTemplate(templateDir, name, templateVariables) {
39
58
  await File.initPrettier('ssjs');
@@ -47,10 +66,10 @@ class Script extends MetadataType {
47
66
 
48
67
  /**
49
68
  * manages post retrieve steps
50
- * @param {Object} metadata a single script
51
- * @param {String} [_] unused
52
- * @param {Boolean} [isTemplating] signals that we are retrieving templates
53
- * @returns {Object[]} Array with one metadata object and one ssjs string
69
+ * @param {ScriptItem} metadata a single script
70
+ * @param {string} [_] unused
71
+ * @param {boolean} [isTemplating] signals that we are retrieving templates
72
+ * @returns {CodeExtractItem} Array with one metadata object and one ssjs string
54
73
  */
55
74
  static postRetrieveTasks(metadata, _, isTemplating) {
56
75
  // if retrieving template, replace the name with customer key if that wasn't already the case
@@ -82,9 +101,9 @@ class Script extends MetadataType {
82
101
 
83
102
  /**
84
103
  * helper for this.preDeployTasks() that loads extracted code content back into JSON
85
- * @param {Object} metadata a single asset definition
86
- * @param {String} deployDir directory of deploy files
87
- * @param {String} [templateName] name of the template used to built defintion (prior applying templating)
104
+ * @param {ScriptItem} metadata a single asset definition
105
+ * @param {string} deployDir directory of deploy files
106
+ * @param {string} [templateName] name of the template used to built defintion (prior applying templating)
88
107
  * @returns {Promise<String>} content for metadata.script
89
108
  */
90
109
  static async _mergeCode(metadata, deployDir, templateName) {
@@ -116,9 +135,9 @@ class Script extends MetadataType {
116
135
  }
117
136
  /**
118
137
  * prepares a Script for deployment
119
- * @param {Object} metadata a single script activity definition
120
- * @param {String} dir directory of deploy files
121
- * @returns {Promise} Promise
138
+ * @param {ScriptItem} metadata a single script activity definition
139
+ * @param {string} dir directory of deploy files
140
+ * @returns {ScriptItem} Promise
122
141
  */
123
142
  static async preDeployTasks(metadata, dir) {
124
143
  // folder
@@ -144,11 +163,11 @@ class Script extends MetadataType {
144
163
  /**
145
164
  * helper for buildDefinition
146
165
  * handles extracted code if any are found for complex types
147
- * @param {String} templateDir Directory where metadata templates are stored
148
- * @param {String|String[]} targetDir (List of) Directory where built definitions will be saved
149
- * @param {Object} metadata main JSON file that was read from file system
150
- * @param {Object} variables variables to be replaced in the metadata
151
- * @param {String} templateName name of the template to be built
166
+ * @param {string} templateDir Directory where metadata templates are stored
167
+ * @param {string|string[]} targetDir (List of) Directory where built definitions will be saved
168
+ * @param {ScriptItem} metadata main JSON file that was read from file system
169
+ * @param {Util.TemplateMap} variables variables to be replaced in the metadata
170
+ * @param {string} templateName name of the template to be built
152
171
  * @returns {Promise} Promise
153
172
  */
154
173
  static async buildDefinitionForExtracts(
@@ -187,8 +206,8 @@ class Script extends MetadataType {
187
206
 
188
207
  /**
189
208
  * Splits the script metadata into two parts and parses in a standard manner
190
- * @param {Object} metadata a single script activity definition
191
- * @returns {Object[]} Array with one metadata object and one ssjs string
209
+ * @param {ScriptItem} metadata a single script activity definition
210
+ * @returns {CodeExtractItem} a single item with code parts extracted
192
211
  */
193
212
  static parseMetadata(metadata) {
194
213
  // folder
@@ -0,0 +1,227 @@
1
+ module.exports = {
2
+ bodyIteratorField: 'Results',
3
+ dependencies: [],
4
+ folderType: null,
5
+ hasExtended: false,
6
+ idField: 'ID',
7
+ keyField: 'CustomerKey',
8
+ nameField: 'Name',
9
+ type: 'accountUser',
10
+ typeDescription: 'Marketing Cloud users',
11
+ typeName: 'User',
12
+ typeRetrieveByDefault: false,
13
+ fields: {
14
+ AccountUserID: {
15
+ isCreateable: null,
16
+ isUpdateable: null,
17
+ retrieving: true,
18
+ template: false,
19
+ },
20
+ ActiveFlag: { isCreateable: null, isUpdateable: null, retrieving: true, template: false },
21
+ AssociatedBusinessUnits: {
22
+ isCreateable: null,
23
+ isUpdateable: null,
24
+ retrieving: false,
25
+ template: null,
26
+ },
27
+ BusinessUnit: {
28
+ isCreateable: null,
29
+ isUpdateable: null,
30
+ retrieving: false,
31
+ template: null,
32
+ },
33
+ ChallengeAnswer: {
34
+ isCreateable: null,
35
+ isUpdateable: null,
36
+ retrieving: true,
37
+ template: false,
38
+ },
39
+ ChallengePhrase: {
40
+ isCreateable: null,
41
+ isUpdateable: null,
42
+ retrieving: true,
43
+ template: false,
44
+ },
45
+ Client: { isCreateable: null, isUpdateable: null, retrieving: false, template: null },
46
+ CorrelationID: {
47
+ isCreateable: null,
48
+ isUpdateable: null,
49
+ retrieving: false,
50
+ template: null,
51
+ },
52
+ CreatedDate: { isCreateable: null, isUpdateable: null, retrieving: true, template: false },
53
+ CustomerKey: { isCreateable: null, isUpdateable: null, retrieving: true, template: false },
54
+ DefaultApplication: {
55
+ isCreateable: null,
56
+ isUpdateable: null,
57
+ retrieving: false,
58
+ template: null,
59
+ },
60
+ DefaultBusinessUnit: {
61
+ isCreateable: null,
62
+ isUpdateable: null,
63
+ retrieving: true,
64
+ template: false,
65
+ },
66
+ DefaultBusinessUnitObject: {
67
+ isCreateable: null,
68
+ isUpdateable: null,
69
+ retrieving: false,
70
+ template: null,
71
+ },
72
+ Delete: { isCreateable: null, isUpdateable: null, retrieving: false, template: null },
73
+ Email: { isCreateable: null, isUpdateable: null, retrieving: true, template: false },
74
+ ID: { isCreateable: null, isUpdateable: null, retrieving: true, template: false },
75
+ IsAPIUser: { isCreateable: null, isUpdateable: null, retrieving: true, template: false },
76
+ IsLocked: { isCreateable: null, isUpdateable: null, retrieving: true, template: false },
77
+ LanguageLocale: {
78
+ isCreateable: null,
79
+ isUpdateable: null,
80
+ retrieving: false,
81
+ template: null,
82
+ },
83
+ LastSuccessfulLogin: {
84
+ isCreateable: null,
85
+ isUpdateable: null,
86
+ retrieving: true,
87
+ template: false,
88
+ },
89
+ Locale: { isCreateable: null, isUpdateable: null, retrieving: false, template: null },
90
+ ModifiedDate: {
91
+ isCreateable: null,
92
+ isUpdateable: null,
93
+ retrieving: true,
94
+ template: false,
95
+ },
96
+ MustChangePassword: {
97
+ isCreateable: null,
98
+ isUpdateable: null,
99
+ retrieving: true,
100
+ template: false,
101
+ },
102
+ Name: { isCreateable: null, isUpdateable: null, retrieving: true, template: false },
103
+ NotificationEmailAddress: {
104
+ isCreateable: null,
105
+ isUpdateable: null,
106
+ retrieving: true,
107
+ template: false,
108
+ },
109
+ ObjectID: { isCreateable: null, isUpdateable: null, retrieving: false, template: null },
110
+ ObjectState: { isCreateable: null, isUpdateable: null, retrieving: false, template: null },
111
+ Owner: { isCreateable: null, isUpdateable: null, retrieving: false, template: null },
112
+ PartnerKey: { isCreateable: null, isUpdateable: null, retrieving: false, template: null },
113
+ PartnerProperties: {
114
+ isCreateable: null,
115
+ isUpdateable: null,
116
+ retrieving: false,
117
+ template: null,
118
+ },
119
+ Password: { isCreateable: null, isUpdateable: null, retrieving: false, template: false },
120
+ Roles: { isCreateable: null, isUpdateable: null, retrieving: true, template: false },
121
+ 'Roles.Role': {
122
+ skipValidation: false,
123
+ },
124
+ 'Roles.Role[].Client': {
125
+ skipValidation: false,
126
+ },
127
+ SsoIdentities: {
128
+ isCreateable: null,
129
+ isUpdateable: null,
130
+ retrieving: false,
131
+ template: null,
132
+ },
133
+ TimeZone: { isCreateable: null, isUpdateable: null, retrieving: false, template: null },
134
+ Unlock: { isCreateable: null, isUpdateable: null, retrieving: false, template: null },
135
+ UserID: { isCreateable: null, isUpdateable: null, retrieving: true, template: false },
136
+ UserPermissions: {
137
+ isCreateable: null,
138
+ isUpdateable: null,
139
+ retrieving: true,
140
+ template: false,
141
+ },
142
+ 'UserPermissions.PartnerKey': {
143
+ isCreateable: null,
144
+ isUpdateable: null,
145
+ retrieving: false,
146
+ template: false,
147
+ },
148
+ 'UserPermissions.ID': {
149
+ skipValidation: true,
150
+ },
151
+ 'UserPermissions.ObjectID': {
152
+ isCreateable: null,
153
+ isUpdateable: null,
154
+ retrieving: false,
155
+ template: false,
156
+ },
157
+ 'UserPermissions.Name': {
158
+ isCreateable: null,
159
+ isUpdateable: null,
160
+ retrieving: false,
161
+ template: false,
162
+ },
163
+ 'UserPermissions.Value': {
164
+ isCreateable: null,
165
+ isUpdateable: null,
166
+ retrieving: false,
167
+ template: false,
168
+ },
169
+ 'UserPermissions.Description': {
170
+ isCreateable: null,
171
+ isUpdateable: null,
172
+ retrieving: false,
173
+ template: false,
174
+ },
175
+ 'UserPermissions.Delete': {
176
+ isCreateable: null,
177
+ isUpdateable: null,
178
+ retrieving: false,
179
+ template: false,
180
+ },
181
+ 'UserPermissions[].PartnerKey': {
182
+ isCreateable: null,
183
+ isUpdateable: null,
184
+ retrieving: false,
185
+ template: false,
186
+ },
187
+ 'UserPermissions[].ID': {
188
+ skipValidation: true,
189
+ },
190
+ 'UserPermissions[].ObjectID': {
191
+ isCreateable: null,
192
+ isUpdateable: null,
193
+ retrieving: false,
194
+ template: false,
195
+ },
196
+ 'UserPermissions[].Name': {
197
+ isCreateable: null,
198
+ isUpdateable: null,
199
+ retrieving: false,
200
+ template: false,
201
+ },
202
+ 'UserPermissions[].Value': {
203
+ isCreateable: null,
204
+ isUpdateable: null,
205
+ retrieving: false,
206
+ template: false,
207
+ },
208
+ 'UserPermissions[].Description': {
209
+ isCreateable: null,
210
+ isUpdateable: null,
211
+ retrieving: false,
212
+ template: false,
213
+ },
214
+ 'UserPermissions[].Delete': {
215
+ isCreateable: null,
216
+ isUpdateable: null,
217
+ retrieving: false,
218
+ template: false,
219
+ },
220
+ type__c: {
221
+ skipValidation: true,
222
+ },
223
+ AssociatedBusinessUnits__c: {
224
+ skipValidation: true,
225
+ },
226
+ },
227
+ };
@@ -677,6 +677,7 @@ module.exports = {
677
677
  ],
678
678
  },
679
679
  typeMapping: {
680
+ ai: 16,
680
681
  psd: 17,
681
682
  pdd: 18,
682
683
  eps: 19,
@@ -8,7 +8,7 @@ module.exports = {
8
8
  restPagination: true,
9
9
  type: 'campaign',
10
10
  typeDescription: 'Way of tagging/categorizing emails, journeys and alike.',
11
- typeRetrieveByDefault: true,
11
+ typeRetrieveByDefault: false,
12
12
  typeName: 'Campaign Tag',
13
13
  fields: {},
14
14
  };
@@ -167,7 +167,7 @@ module.exports = {
167
167
  ModifiedDate: {
168
168
  isCreateable: false,
169
169
  isUpdateable: false,
170
- retrieving: false,
170
+ retrieving: true,
171
171
  template: false,
172
172
  },
173
173
  Name: {
@@ -92,7 +92,7 @@ module.exports = {
92
92
  },
93
93
  ObjectID: {
94
94
  isCreateable: false,
95
- isUpdateable: null,
95
+ isUpdateable: true,
96
96
  retrieving: false,
97
97
  template: false,
98
98
  },
@@ -93,7 +93,7 @@ module.exports = {
93
93
  },
94
94
  ContentType: {
95
95
  isCreateable: true,
96
- isUpdateable: true,
96
+ isUpdateable: false,
97
97
  retrieving: true,
98
98
  template: true,
99
99
  },
@@ -1,7 +1,8 @@
1
1
  module.exports = {
2
2
  bodyIteratorField: 'items',
3
- dependencies: ['ftpLocation', 'dataExtension', 'list'],
3
+ dependencies: ['folder', 'ftpLocation', 'dataExtension', 'list'], // folder has to be kept in here to resolve lists correctly
4
4
  destinationObjectTypeMapping: {
5
+ unknown: 783,
5
6
  DataExtension: 310,
6
7
  List: 13,
7
8
  SMS: 584,
@@ -21,7 +21,7 @@ module.exports = {
21
21
  createdBy: {
22
22
  isCreateable: false,
23
23
  isUpdateable: false,
24
- retrieving: true,
24
+ retrieving: false,
25
25
  template: false,
26
26
  },
27
27
  createdDate: {
@@ -51,7 +51,7 @@ module.exports = {
51
51
  modifiedBy: {
52
52
  isCreateable: false,
53
53
  isUpdateable: false,
54
- retrieving: true,
54
+ retrieving: false,
55
55
  template: false,
56
56
  },
57
57
  modifiedDate: {
@@ -79,9 +79,9 @@ module.exports = {
79
79
  template: false,
80
80
  },
81
81
  status: {
82
- isCreateable: null,
83
- isUpdateable: null,
84
- retrieving: true,
82
+ isCreateable: false,
83
+ isUpdateable: false,
84
+ retrieving: false,
85
85
  template: false,
86
86
  },
87
87
  statusId: {