mcdev 5.1.0 → 5.2.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 (192) hide show
  1. package/.eslintrc.json +4 -4
  2. package/.github/ISSUE_TEMPLATE/bug.yml +1 -0
  3. package/.github/PULL_REQUEST_TEMPLATE.md +2 -2
  4. package/.github/workflows/coverage-develop-branch.yml +0 -2
  5. package/.github/workflows/coverage-main-branch.yml +0 -2
  6. package/.github/workflows/coverage.yml +0 -2
  7. package/.husky/post-checkout +1 -0
  8. package/.husky/post-merge +1 -0
  9. package/.vscode/extensions.json +4 -0
  10. package/docs/dist/documentation.md +633 -286
  11. package/lib/Deployer.js +25 -25
  12. package/lib/MetadataTypeDefinitions.js +1 -1
  13. package/lib/MetadataTypeInfo.js +1 -1
  14. package/lib/Retriever.js +1 -1
  15. package/lib/cli.js +159 -9
  16. package/lib/index.js +395 -95
  17. package/lib/metadataTypes/Asset.js +10 -11
  18. package/lib/metadataTypes/AttributeGroup.js +76 -2
  19. package/lib/metadataTypes/AttributeSet.js +260 -0
  20. package/lib/metadataTypes/Automation.js +413 -96
  21. package/lib/metadataTypes/DataExtension.js +2 -2
  22. package/lib/metadataTypes/DataExtensionField.js +1 -1
  23. package/lib/metadataTypes/Event.js +2 -3
  24. package/lib/metadataTypes/Folder.js +1 -1
  25. package/lib/metadataTypes/Journey.js +5 -6
  26. package/lib/metadataTypes/MetadataType.js +149 -49
  27. package/lib/metadataTypes/MobileKeyword.js +8 -8
  28. package/lib/metadataTypes/MobileMessage.js +5 -5
  29. package/lib/metadataTypes/Query.js +26 -10
  30. package/lib/metadataTypes/Script.js +3 -3
  31. package/lib/metadataTypes/TransactionalSMS.js +5 -5
  32. package/lib/metadataTypes/TriggeredSend.js +25 -50
  33. package/lib/metadataTypes/User.js +7 -4
  34. package/lib/metadataTypes/definitions/AttributeGroup.definition.js +117 -106
  35. package/lib/metadataTypes/definitions/{SetDefinition.definition.js → AttributeSet.definition.js} +54 -27
  36. package/lib/metadataTypes/definitions/Automation.definition.js +22 -15
  37. package/lib/metadataTypes/definitions/ImportFile.definition.js +36 -6
  38. package/lib/metadataTypes/definitions/TriggeredSend.definition.js +1 -0
  39. package/lib/util/cache.js +9 -4
  40. package/lib/util/cli.js +40 -0
  41. package/lib/util/file.js +2 -2
  42. package/lib/util/init.js +84 -0
  43. package/lib/util/util.js +121 -13
  44. package/package.json +11 -11
  45. package/test/mockRoot/.mcdevrc.json +1 -1
  46. package/test/mockRoot/deploy/testInstance/testBU/automation/testExisting_automation.automation-meta.json +1 -2
  47. package/test/mockRoot/deploy/testInstance/testBU/automation/testNew_automation.automation-meta.json +5 -6
  48. package/test/mockRoot/deploy/testInstance/testBU/dataExtract/testExisting_dataExtract.dataExtract-meta.json +35 -0
  49. package/test/mockRoot/deploy/testInstance/testBU/dataExtract/testNew_dataExtract.dataExtract-meta.json +35 -0
  50. package/test/mockRoot/deploy/testInstance/testBU/fileTransfer/testExisting_fileTransfer.fileTransfer-meta.json +17 -0
  51. package/test/mockRoot/deploy/testInstance/testBU/fileTransfer/testNew_fileTransfer.fileTransfer-meta.json +17 -0
  52. package/test/mockRoot/deploy/testInstance/testBU/importFile/testExisting_importFile.importFile-meta.json +29 -0
  53. package/test/mockRoot/deploy/testInstance/testBU/importFile/testNew_importFile.importFile-meta.json +29 -0
  54. package/test/mockRoot/deploy/testInstance/testBU/query/testExisting_query_fixKeys.query-meta.json +11 -0
  55. package/test/mockRoot/deploy/testInstance/testBU/query/testExisting_query_fixKeys.query-meta.sql +6 -0
  56. package/test/mockRoot/deploy/testInstance/testBU/script/testExisting_script.script-meta.json +6 -0
  57. package/test/mockRoot/deploy/testInstance/testBU/script/testExisting_script.script-meta.ssjs +1 -0
  58. package/test/mockRoot/deploy/testInstance/testBU/script/testNew_script.script-meta.json +6 -0
  59. package/test/mockRoot/deploy/testInstance/testBU/script/testNew_script.script-meta.ssjs +1 -0
  60. package/test/mockRoot/deploy/testInstance/testBU/triggeredSend/testExisting_triggeredSend.triggeredSend-meta.json +29 -0
  61. package/test/mockRoot/deploy/testInstance/testBU/triggeredSend/testNew_triggeredSend.triggeredSend-meta.json +29 -0
  62. package/test/resourceFactory.js +77 -12
  63. package/test/resources/1111111/accountUser/retrieve-ActiveFlag=falseANDCustomerKey=testExisting_userANDEmaillike@-response.xml +27 -0
  64. package/test/resources/1111111/accountUser/retrieve-ActiveFlag=falseANDEmaillike@-response.xml +156 -0
  65. package/test/resources/1111111/accountUser/retrieve-ActiveFlag=trueANDEmailisNullORNamelikeapp userANDMustChangePassword=false-response.xml +87 -0
  66. package/test/resources/1111111/accountUser/retrieve-ActiveFlag=trueANDEmaillike@-response.xml +156 -0
  67. package/test/resources/1111111/accountUser/retrieve-CustomerKey=testExisting_userANDActiveFlag=trueANDEmailisNullORNamelikeapp userANDMustChangePassword=false-response.xml +27 -0
  68. package/test/resources/1111111/accountUserAccount/retrieve-AccountUser.AccountUserID=700301950-response.xml +60 -0
  69. package/test/resources/1111111/user/retrieve-expected.md +4 -2
  70. package/test/resources/9999999/attributeGroup/retrieve-expected.json +25 -0
  71. package/test/resources/9999999/attributeSet/retrieve-expected.json +748 -0
  72. package/test/resources/9999999/automation/build-expected.json +1 -2
  73. package/test/resources/9999999/automation/create-expected.json +7 -8
  74. package/test/resources/9999999/automation/create-testNew_automation-expected.md +4 -4
  75. package/test/resources/9999999/automation/patch_fixKeys-pause-expected.json +44 -0
  76. package/test/resources/9999999/automation/patch_fixKeys-schedule-expected.json +44 -0
  77. package/test/resources/9999999/automation/perform-08afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +42 -0
  78. package/test/resources/9999999/automation/perform-08afb0e2-b00a-4c88-fixKey_pause-response.xml +42 -0
  79. package/test/resources/9999999/automation/perform-08afb0e2-b00a-4c88-fixKey_schedule-response.xml +42 -0
  80. package/test/resources/9999999/automation/perform-a8afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +42 -0
  81. package/test/resources/9999999/automation/retrieve-expected.json +1 -2
  82. package/test/resources/9999999/automation/retrieve-testExisting_automation-expected.md +2 -2
  83. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +52 -0
  84. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-ad2e-pause-response.xml +38 -0
  85. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-fixKey_pause-response.xml +52 -0
  86. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-fixKey_schedule-response.xml +52 -0
  87. package/test/resources/9999999/automation/schedule-a8afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +52 -0
  88. package/test/resources/9999999/automation/template-expected.json +1 -2
  89. package/test/resources/9999999/automation/update-expected.json +1 -2
  90. package/test/resources/9999999/automation/update-testExisting_automation-expected.md +2 -2
  91. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-pause/get-response.json +85 -0
  92. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-pause/patch-response.json +85 -0
  93. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_pause/get-response.json +85 -0
  94. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_pause/patch-response.json +85 -0
  95. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_schedule/get-response.json +85 -0
  96. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_schedule/patch-response.json +85 -0
  97. package/test/resources/9999999/automation/v1/automations/a8afb0e2-b00a-4c88-ad2e-1f7f8788c560/get-response.json +1 -1
  98. package/test/resources/9999999/automation/v1/automations/post-response.json +20 -19
  99. package/test/resources/9999999/automation/v1/dataextracts/56c5370a-f988-4f36-b0ee-0f876573f6d7/patch-response.json +38 -0
  100. package/test/resources/9999999/automation/v1/dataextracts/post-response.json +38 -0
  101. package/test/resources/9999999/automation/v1/dataextracttypes/get-response.json +50 -0
  102. package/test/resources/9999999/automation/v1/filetransfers/72c328ac-f5b0-4e37-91d3-a775666f15a6/patch-response.json +18 -0
  103. package/test/resources/9999999/automation/v1/filetransfers/post-response.json +18 -0
  104. package/test/resources/9999999/automation/v1/ftplocations/get-response.json +18 -0
  105. package/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b/patch-response.json +31 -0
  106. package/test/resources/9999999/automation/v1/imports/get-response.json +1 -1
  107. package/test/resources/9999999/automation/v1/imports/post-response.json +30 -0
  108. package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dae/actions/start/post-response.txt +1 -0
  109. package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat_fixKeys/get-response.json +17 -0
  110. package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat_fixKeys/patch-response.json +18 -0
  111. package/test/resources/9999999/automation/v1/queries/get-response.json +18 -1
  112. package/test/resources/9999999/automation/v1/scripts/39f6a488-20eb-4ba0-b0b9-023725b574e4/patch-response.json +10 -0
  113. package/test/resources/9999999/automation/v1/scripts/get-response.json +12 -2
  114. package/test/resources/9999999/automation/v1/scripts/post-response.json +10 -0
  115. package/test/resources/9999999/dataExtension/retrieve-Name=testExisting_dataExtension-response.xml +52 -0
  116. package/test/resources/9999999/dataExtensionField/retrieve-DataExtension.CustomerKey=testExisting_dataExtension-response.xml +98 -0
  117. package/test/resources/9999999/dataExtensionField/retrieve-DataExtension.CustomerKey=testNew_dataExtensionORDataExtension.CustomerKey=testExisting_dataExtension-response.xml +99 -0
  118. package/test/resources/9999999/dataExtract/build-expected.json +35 -0
  119. package/test/resources/9999999/dataExtract/get-expected.json +39 -0
  120. package/test/resources/9999999/dataExtract/patch-expected.json +37 -0
  121. package/test/resources/9999999/dataExtract/post-expected.json +37 -0
  122. package/test/resources/9999999/dataExtract/template-expected.json +35 -0
  123. package/test/resources/9999999/dataFolder/retrieve-ContentType=contextual_suppression_listORContentType=publicationORContentType=suppression_listORContentType=mysubsORContentType=list-response.xml +136 -0
  124. package/test/resources/9999999/dataFolder/retrieve-ContentType=ssjsactivity-response.xml +48 -0
  125. package/test/resources/9999999/dataFolder/retrieve-ContentType=triggered_send_journeybuilderORContentType=triggered_sendORContentType=hidden-response.xml +276 -0
  126. package/test/resources/9999999/dataFolder/retrieve-response.xml +23 -0
  127. package/test/resources/9999999/email/retrieve-response.xml +203 -0
  128. package/test/resources/9999999/fileTransfer/build-expected.json +15 -0
  129. package/test/resources/9999999/fileTransfer/get-expected.json +17 -0
  130. package/test/resources/9999999/fileTransfer/patch-expected.json +17 -0
  131. package/test/resources/9999999/fileTransfer/post-expected.json +17 -0
  132. package/test/resources/9999999/fileTransfer/template-expected.json +15 -0
  133. package/test/resources/9999999/hub/v1/contacts/schema/attributeGroups/get-response.json +585 -0
  134. package/test/resources/9999999/hub/v1/contacts/schema/setDefinitions/get-response.json +19807 -0
  135. package/test/resources/9999999/importFile/build-expected.json +27 -0
  136. package/test/resources/9999999/importFile/get-expected.json +29 -0
  137. package/test/resources/9999999/importFile/patch-expected.json +29 -0
  138. package/test/resources/9999999/importFile/post-expected.json +29 -0
  139. package/test/resources/9999999/importFile/template-expected.json +27 -0
  140. package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixKey_pause-response.xml +32 -0
  141. package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixKey_schedule-response.xml +32 -0
  142. package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixedKey_paused-response.xml +32 -0
  143. package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixedKey_scheduled-response.xml +32 -0
  144. package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_pause-response.xml +30 -0
  145. package/test/resources/9999999/program/retrieve-response.xml +21 -3
  146. package/test/resources/9999999/query/patch_fixKeys-expected.json +11 -0
  147. package/test/resources/9999999/query/patch_fixKeys-expected.sql +6 -0
  148. package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testExisting_query_fixKeysANDStatus=Active-response.xml +30 -0
  149. package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testExisting_query_fixedKeysANDStatus=Active-response.xml +30 -0
  150. package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testNew_queryANDStatus=Active-response.xml +30 -0
  151. package/test/resources/9999999/script/build-expected.json +6 -0
  152. package/test/resources/9999999/script/build-expected.ssjs +1 -0
  153. package/test/resources/9999999/script/get-expected.json +8 -0
  154. package/test/resources/9999999/script/get-expected.ssjs +1 -0
  155. package/test/resources/9999999/script/get_noScriptTag-expected.html +1 -0
  156. package/test/resources/9999999/script/get_noScriptTag-expected.json +8 -0
  157. package/test/resources/9999999/script/patch-expected.json +8 -0
  158. package/test/resources/9999999/script/patch-expected.ssjs +1 -0
  159. package/test/resources/9999999/script/post-expected.json +8 -0
  160. package/test/resources/9999999/script/post-expected.ssjs +1 -0
  161. package/test/resources/9999999/script/template-expected.json +6 -0
  162. package/test/resources/9999999/script/template-expected.ssjs +1 -0
  163. package/test/resources/9999999/triggeredSend/build-expected.json +29 -0
  164. package/test/resources/9999999/triggeredSend/get-expected.json +29 -0
  165. package/test/resources/9999999/triggeredSend/patch-expected.json +29 -0
  166. package/test/resources/9999999/triggeredSend/post-expected.json +29 -0
  167. package/test/resources/9999999/triggeredSend/template-expected.json +29 -0
  168. package/test/resources/9999999/triggeredSendDefinition/create-response.xml +75 -0
  169. package/test/resources/9999999/triggeredSendDefinition/delete-response.xml +36 -0
  170. package/test/resources/9999999/triggeredSendDefinition/{retrieve-response.xml → retrieve-TriggeredSendStatusINNew,Active,Inactive,Moved,Canceled-response.xml} +4 -4
  171. package/test/resources/9999999/triggeredSendDefinition/update-response.xml +74 -0
  172. package/test/type.attributeGroup.test.js +55 -0
  173. package/test/type.attributeSet.test.js +55 -0
  174. package/test/type.automation.test.js +638 -11
  175. package/test/type.dataExtension.test.js +0 -1
  176. package/test/type.dataExtract.test.js +187 -0
  177. package/test/type.fileTransfer.test.js +185 -0
  178. package/test/type.importFile.test.js +186 -0
  179. package/test/type.mobileKeyword.test.js +0 -1
  180. package/test/type.query.test.js +464 -13
  181. package/test/type.script.test.js +367 -0
  182. package/test/type.triggeredSend.test.js +152 -0
  183. package/test/type.user.test.js +22 -10
  184. package/test/utils.js +4 -1
  185. package/lib/metadataTypes/SetDefinition.js +0 -37
  186. /package/test/resources/1111111/accountUser/{retrieve-response.xml → retrieve-ActiveFlag=trueANDCustomerKey=testExisting_userANDEmaillike@-response.xml} +0 -0
  187. /package/test/resources/1111111/accountUserAccount/{retrieve-response.xml → retrieve-AccountUser.AccountUserIDIN700301950,700301951,7471228-response.xml} +0 -0
  188. /package/test/resources/1111111/businessUnit/{retrieve-response.xml → retrieve-ID=1111111-response.xml} +0 -0
  189. /package/test/resources/1111111/list/{retrieve-response.xml → retrieve-CustomerKey=All SubscribersORListName=All Subscribers-response.xml} +0 -0
  190. /package/test/resources/1111111/role/{retrieve-response.xml → retrieve-IsPrivate=false-response.xml} +0 -0
  191. /package/test/resources/9999999/emailSendDefinition/{retrieve-response.xml → retrieve-IsPlatformObject=falseANDDescriptionnotEqualsSFSendDefinition-response.xml} +0 -0
  192. /package/test/resources/9999999/queryDefinition/{retrieve-response.xml → retrieve-CustomerKey=testExisting_queryANDStatus=Active-response.xml} +0 -0
@@ -203,7 +203,7 @@ class DataExtension extends MetadataType {
203
203
  }
204
204
  }
205
205
  /**
206
- * helper for {@link upsert}
206
+ * helper for {@link DataExtension.upsert}
207
207
  *
208
208
  * @private
209
209
  * @param {object} res -
@@ -607,7 +607,7 @@ class DataExtension extends MetadataType {
607
607
  metadata[customerKey].Fields = fieldArr;
608
608
  }
609
609
  /**
610
- * helper for {@link super.updateREST} and {@link super.updateSOAP} that removes old files after the key was changed
610
+ * helper for {@link MetadataType.updateREST} and {@link MetadataType.updateSOAP} that removes old files after the key was changed
611
611
  *
612
612
  * @private
613
613
  * @param {TYPE.MetadataTypeItem} metadataEntry a single metadata Entry
@@ -31,7 +31,7 @@ class DataExtensionField extends MetadataType {
31
31
  return super.retrieveSOAP(null, requestParams, null, additionalFields);
32
32
  }
33
33
  /**
34
- * helper for {@link DataExtension._retrieveFieldsForSingleDe} that sorts the fields into an array
34
+ * helper for DataExtension.retrieveFieldsForSingleDe that sorts the fields into an array
35
35
  *
36
36
  * @param {TYPE.DataExtensionFieldMap} fieldsObj customerKey-based list of fields for one dataExtension
37
37
  * @returns {TYPE.DataExtensionFieldItem[]} sorted array of field objects
@@ -136,12 +136,11 @@ class Event extends MetadataType {
136
136
  * @param {TYPE.MetadataTypeMap} metadata metadata mapped by their keyField
137
137
  * @param {string} deployDir directory where deploy metadata are saved
138
138
  * @param {string} retrieveDir directory where metadata after deploy should be saved
139
- * @param {boolean} [isRefresh] optional flag - so far not used by eventDefinition
140
139
  * @returns {Promise.<TYPE.MetadataTypeMap>} Promise of keyField => metadata map
141
140
  */
142
- static async deploy(metadata, deployDir, retrieveDir, isRefresh) {
141
+ static async deploy(metadata, deployDir, retrieveDir) {
143
142
  Util.logBeta(this.definition.type);
144
- return super.deploy(metadata, deployDir, retrieveDir, isRefresh);
143
+ return super.deploy(metadata, deployDir, retrieveDir);
145
144
  }
146
145
 
147
146
  /**
@@ -452,7 +452,7 @@ class Folder extends MetadataType {
452
452
  * Returns file contents mapped to their filename without '.json' ending
453
453
  *
454
454
  * @param {string} dir directory that contains '.json' files to be read
455
- * @param {boolean} [listBadKeys=false] do not print errors, used for badKeys()
455
+ * @param {boolean} [listBadKeys] do not print errors, used for badKeys()
456
456
  * @returns {TYPE.MetadataTypeMap} fileName => fileContent map
457
457
  */
458
458
  static getJsonFromFS(dir, listBadKeys) {
@@ -216,12 +216,11 @@ class Journey extends MetadataType {
216
216
  * @param {TYPE.MetadataTypeMap} metadata metadata mapped by their keyField
217
217
  * @param {string} deployDir directory where deploy metadata are saved
218
218
  * @param {string} retrieveDir directory where metadata after deploy should be saved
219
- * @param {boolean} [isRefresh] optional flag - so far not used by interaction
220
219
  * @returns {Promise.<TYPE.MetadataTypeMap>} Promise of keyField => metadata map
221
220
  */
222
- static async deploy(metadata, deployDir, retrieveDir, isRefresh) {
221
+ static async deploy(metadata, deployDir, retrieveDir) {
223
222
  Util.logBeta(this.definition.type);
224
- return super.deploy(metadata, deployDir, retrieveDir, isRefresh);
223
+ return super.deploy(metadata, deployDir, retrieveDir);
225
224
  }
226
225
 
227
226
  /**
@@ -265,7 +264,7 @@ class Journey extends MetadataType {
265
264
  }
266
265
 
267
266
  /**
268
- * helper for Journey's {@link saveResults}. Gets executed after retreive of metadata type and
267
+ * helper for Journey's {@link Journey.saveResults}. Gets executed after retreive of metadata type and
269
268
  *
270
269
  * @param {TYPE.MetadataTypeMap} metadataMap key=customer key, value=metadata
271
270
  */
@@ -478,7 +477,7 @@ class Journey extends MetadataType {
478
477
  return metadata;
479
478
  }
480
479
  /**
481
- * helper for {@link postRetrieveTasks}
480
+ * helper for {@link Journey.postRetrieveTasks}
482
481
  *
483
482
  * @private
484
483
  * @param {TYPE.MetadataTypeItem} metadata a single item
@@ -800,7 +799,7 @@ class Journey extends MetadataType {
800
799
  }
801
800
 
802
801
  /**
803
- * helper for {@link preDeployTasks}
802
+ * helper for {@link Journey.preDeployTasks}
804
803
  *
805
804
  * @private
806
805
  * @param {TYPE.MetadataTypeItem} metadata a single item
@@ -35,7 +35,7 @@ class MetadataType {
35
35
  * Returns file contents mapped to their filename without '.json' ending
36
36
  *
37
37
  * @param {string} dir directory that contains '.json' files to be read
38
- * @param {boolean} [listBadKeys=false] do not print errors, used for badKeys()
38
+ * @param {boolean} [listBadKeys] do not print errors, used for badKeys()
39
39
  * @returns {TYPE.MetadataTypeMap} fileName => fileContent map
40
40
  */
41
41
  static getJsonFromFS(dir, listBadKeys) {
@@ -108,11 +108,10 @@ class MetadataType {
108
108
  * @param {TYPE.MetadataTypeMap} metadata metadata mapped by their keyField
109
109
  * @param {string} deployDir directory where deploy metadata are saved
110
110
  * @param {string} retrieveDir directory where metadata after deploy should be saved
111
- * @param {boolean} [isRefresh] optional flag to indicate that triggeredSend should be refreshed after deployment of assets
112
111
  * @returns {Promise.<TYPE.MetadataTypeMap>} Promise of keyField => metadata map
113
112
  */
114
- static async deploy(metadata, deployDir, retrieveDir, isRefresh) {
115
- const upsertResults = await this.upsert(metadata, deployDir, isRefresh);
113
+ static async deploy(metadata, deployDir, retrieveDir) {
114
+ const upsertResults = await this.upsert(metadata, deployDir);
116
115
  const savedMetadata = await this.saveResults(upsertResults, retrieveDir, null);
117
116
  if (
118
117
  this.properties.metaDataTypes.documentOnRetrieve.includes(this.definition.type) &&
@@ -131,13 +130,12 @@ class MetadataType {
131
130
  * @param {TYPE.MetadataTypeMap} upsertResults metadata mapped by their keyField as returned by update/create
132
131
  * @param {TYPE.MetadataTypeMap} originalMetadata metadata to be updated (contains additioanl fields)
133
132
  * @param {{created: number, updated: number}} createdUpdated counter representing successful creates/updates
134
- * @param {boolean} [isRefresh] optional flag to indicate that triggeredSend should be refreshed after deployment of assets
135
133
  * @returns {void}
136
134
  */
137
- static postDeployTasks(upsertResults, originalMetadata, createdUpdated, isRefresh) {}
135
+ static postDeployTasks(upsertResults, originalMetadata, createdUpdated) {}
138
136
 
139
137
  /**
140
- * helper for {@link createREST}
138
+ * helper for {@link MetadataType.createREST}
141
139
  *
142
140
  * @param {TYPE.MetadataTypeItem} metadataEntry a single metadata Entry
143
141
  * @param {object} apiResponse varies depending on the API call
@@ -146,7 +144,7 @@ class MetadataType {
146
144
  static postCreateTasks(metadataEntry, apiResponse) {}
147
145
 
148
146
  /**
149
- * helper for {@link updateREST}
147
+ * helper for {@link MetadataType.updateREST}
150
148
  *
151
149
  * @param {TYPE.MetadataTypeItem} metadataEntry a single metadata Entry
152
150
  * @param {object} apiResponse varies depending on the API call
@@ -155,7 +153,7 @@ class MetadataType {
155
153
  static postUpdateTasks(metadataEntry, apiResponse) {}
156
154
 
157
155
  /**
158
- * helper for {@link createREST} when legacy API endpoints as these do not return the created item but only their new id
156
+ * helper for {@link MetadataType.createREST} when legacy API endpoints as these do not return the created item but only their new id
159
157
  *
160
158
  * @param {TYPE.MetadataTypeItem} metadataEntry a single metadata Entry
161
159
  * @param {object} apiResponse varies depending on the API call
@@ -463,7 +461,18 @@ class MetadataType {
463
461
  Util.logger.error(
464
462
  ` ☇ skipping ${this.definition.type}: execute is not supported yet for ${this.definition.type}`
465
463
  );
466
- return;
464
+ return [];
465
+ }
466
+ /**
467
+ * Abstract pause method that needs to be implemented in child metadata type
468
+ *
469
+ * @returns {void}
470
+ */
471
+ static pause() {
472
+ Util.logger.error(
473
+ ` ☇ skipping ${this.definition.type}: pause is not supported yet for ${this.definition.type}`
474
+ );
475
+ return [];
467
476
  }
468
477
 
469
478
  /**
@@ -537,10 +546,9 @@ class MetadataType {
537
546
  *
538
547
  * @param {TYPE.MetadataTypeMap} metadataMap metadata mapped by their keyField
539
548
  * @param {string} deployDir directory where deploy metadata are saved
540
- * @param {boolean} [isRefresh] optional flag to indicate that triggeredSend should be refreshed after deployment of assets
541
549
  * @returns {Promise.<TYPE.MetadataTypeMap>} keyField => metadata map
542
550
  */
543
- static async upsert(metadataMap, deployDir, isRefresh) {
551
+ static async upsert(metadataMap, deployDir) {
544
552
  const orignalMetadataMap = JSON.parse(JSON.stringify(metadataMap));
545
553
  const metadataToUpdate = [];
546
554
  const metadataToCreate = [];
@@ -632,12 +640,10 @@ class MetadataType {
632
640
  const metadataResults = createResults.concat(updateResults).filter(Boolean);
633
641
  upsertResults = this.parseResponseBody(metadataResults);
634
642
  }
635
- await this.postDeployTasks(
636
- upsertResults,
637
- orignalMetadataMap,
638
- { created: createResults.length, updated: updateResults.length },
639
- isRefresh
640
- );
643
+ await this.postDeployTasks(upsertResults, orignalMetadataMap, {
644
+ created: createResults.length,
645
+ updated: updateResults.length,
646
+ });
641
647
  return upsertResults;
642
648
  }
643
649
 
@@ -815,7 +821,7 @@ class MetadataType {
815
821
  );
816
822
  return response;
817
823
  } catch (ex) {
818
- const parsedErrors = this.checkForErrors(ex);
824
+ const parsedErrors = this.getErrorsREST(ex);
819
825
  Util.logger.error(
820
826
  ` ☇ error creating ${this.definition.type} ${
821
827
  metadataEntry[this.definition.keyField] ||
@@ -845,7 +851,7 @@ class MetadataType {
845
851
  this.removeNotCreateableFields(metadataEntry);
846
852
  try {
847
853
  const response = await this.client.soap.create(
848
- soapType.charAt(0).toUpperCase() + soapType.slice(1),
854
+ Util.capitalizeFirstLetter(soapType),
849
855
  metadataEntry,
850
856
  null
851
857
  );
@@ -869,7 +875,7 @@ class MetadataType {
869
875
  *
870
876
  * @param {TYPE.MetadataTypeItem} metadataEntry a single metadata Entry
871
877
  * @param {string} uri rest endpoint for PATCH
872
- * @param {'patch'|'post'|'put'} [httpMethod='patch'] defaults to 'patch'; some update requests require PUT instead of PATCH
878
+ * @param {'patch'|'post'|'put'} [httpMethod] defaults to 'patch'; some update requests require PUT instead of PATCH
873
879
  * @returns {Promise.<object> | null} Promise of API response or null in case of an error
874
880
  */
875
881
  static async updateREST(metadataEntry, uri, httpMethod = 'patch') {
@@ -878,7 +884,7 @@ class MetadataType {
878
884
  // set to empty object in case API returned nothing to be able to update it in helper classes
879
885
  const response = (await this.client.rest[httpMethod](uri, metadataEntry)) || {};
880
886
  await this._postChangeKeyTasks(metadataEntry);
881
- this.checkForErrors(response);
887
+ this.getErrorsREST(response);
882
888
  await this.postUpdateTasks(metadataEntry, response);
883
889
  // some times, e.g. automation dont return a key in their update response and hence we need to fall back to name
884
890
  Util.logger.info(
@@ -889,7 +895,7 @@ class MetadataType {
889
895
  );
890
896
  return response;
891
897
  } catch (ex) {
892
- const parsedErrors = this.checkForErrors(ex);
898
+ const parsedErrors = this.getErrorsREST(ex);
893
899
  Util.logger.error(
894
900
  ` ☇ error updating ${this.definition.type} ${
895
901
  metadataEntry[this.definition.keyField] ||
@@ -904,7 +910,7 @@ class MetadataType {
904
910
  }
905
911
 
906
912
  /**
907
- * helper for {@link updateREST} and {@link updateSOAP} that removes old files after the key was changed
913
+ * helper for {@link MetadataType.updateREST} and {@link MetadataType.updateSOAP} that removes old files after the key was changed
908
914
  *
909
915
  * @private
910
916
  * @param {TYPE.MetadataTypeItem} metadataEntry a single metadata Entry
@@ -950,7 +956,7 @@ class MetadataType {
950
956
  this.removeNotUpdateableFields(metadataEntry);
951
957
  try {
952
958
  const response = await this.client.soap.update(
953
- soapType.charAt(0).toUpperCase() + soapType.slice(1),
959
+ Util.capitalizeFirstLetter(soapType),
954
960
  metadataEntry,
955
961
  null
956
962
  );
@@ -985,15 +991,20 @@ class MetadataType {
985
991
  }
986
992
  }
987
993
  /**
988
- * helper for {@link _handleSOAPErrors}
994
+ * helper for {@link MetadataType._handleSOAPErrors}
989
995
  *
990
996
  * @param {Error} ex error that occured
991
997
  * @returns {string} error message
992
998
  */
993
999
  static getSOAPErrorMsg(ex) {
994
- return ex?.json?.Results?.length
995
- ? `${ex.json.Results[0].StatusMessage} (Code ${ex.json.Results[0].ErrorCode})`
996
- : ex.message;
1000
+ if (ex?.json?.Results?.length) {
1001
+ if (ex?.json?.Results[0].StatusMessage) {
1002
+ return `${ex.json.Results[0].StatusMessage} (Code ${ex.json.Results[0].ErrorCode})`;
1003
+ } else if (ex?.json?.Results[0].Result.StatusMessage) {
1004
+ return `${ex.json.Results[0].Result.StatusMessage} (Code ${ex.json.Results[0].Result.ErrorCode})`;
1005
+ }
1006
+ }
1007
+ return ex.message;
997
1008
  }
998
1009
  /**
999
1010
  * Retrieves SOAP via generic fuel-soap wrapper based metadata of metadata type into local filesystem. executes callback with retrieved metadata
@@ -1010,7 +1021,11 @@ class MetadataType {
1010
1021
  const soapType = this.definition.soapType || this.definition.type;
1011
1022
  let response;
1012
1023
  try {
1013
- response = await this.client.soap.retrieveBulk(soapType, fields, requestParams);
1024
+ response = await this.client.soap.retrieveBulk(
1025
+ Util.capitalizeFirstLetter(soapType),
1026
+ fields,
1027
+ requestParams
1028
+ );
1014
1029
  } catch (ex) {
1015
1030
  this._handleSOAPErrors(ex, 'retrieving');
1016
1031
  return {};
@@ -1078,24 +1093,56 @@ class MetadataType {
1078
1093
  *
1079
1094
  * @param {string} uri REST endpoint where the POST request should be sent
1080
1095
  * @param {string} key item key
1081
- * @returns {Promise.<string>} 'OK' if started execution successfully, otherwise - 'Error'
1096
+ * @returns {Promise.<{key:string, response:string}>} metadata key and API response (OK or error)
1082
1097
  */
1083
1098
  static async executeREST(uri, key) {
1084
1099
  try {
1085
1100
  const response = await this.client.rest.post(uri, {}); // payload is empty for this request
1086
1101
  if (response === 'OK') {
1087
- Util.logger.info(`Executed ${this.definition.type}: ${key}`);
1102
+ Util.logger.info(` - executed ${this.definition.type}: ${key}`);
1088
1103
  } else {
1089
1104
  throw new Error(response);
1090
1105
  }
1091
- return response;
1106
+ return { key, response };
1092
1107
  } catch (ex) {
1093
1108
  Util.logger.error(`Failed to execute ${this.definition.type} ${key}: ${ex.message}`);
1094
1109
  }
1095
1110
  }
1096
1111
 
1097
1112
  /**
1098
- * helper for {@link retrieveREST} and {@link retrieveSOAP}
1113
+ * Used to execute a query/automation etc.
1114
+ *
1115
+ * @param {TYPE.MetadataTypeItem} [metadataEntry] single metadata entry
1116
+ * @returns {Promise.<{key:string, response:object}>} metadata key and API response
1117
+ */
1118
+ static async executeSOAP(metadataEntry) {
1119
+ const soapType = this.definition.soapType || this.definition.type;
1120
+ try {
1121
+ const response = await this.client.soap.perform(
1122
+ Util.capitalizeFirstLetter(soapType),
1123
+ 'start',
1124
+ {
1125
+ ObjectID: metadataEntry[this.definition.idField],
1126
+ }
1127
+ );
1128
+ if (response?.OverallStatus === 'OK') {
1129
+ Util.logger.info(
1130
+ ` - executed ${this.definition.type}: ${
1131
+ metadataEntry[this.definition.keyField]
1132
+ }`
1133
+ );
1134
+ } else {
1135
+ throw new Error(response?.OverallStatus);
1136
+ }
1137
+ return { key: metadataEntry[this.definition.keyField], response };
1138
+ } catch (ex) {
1139
+ this._handleSOAPErrors(ex, 'executing', metadataEntry);
1140
+ return null;
1141
+ }
1142
+ }
1143
+
1144
+ /**
1145
+ * helper for {@link MetadataType.retrieveREST} and {@link MetadataType.retrieveSOAP}
1099
1146
  *
1100
1147
  * @param {string|number} [singleRetrieve] key of single item to filter by
1101
1148
  * @param {TYPE.MetadataTypeMap} metadataMap saved metadata
@@ -1298,7 +1345,7 @@ class MetadataType {
1298
1345
  *
1299
1346
  * @static
1300
1347
  * @param {TYPE.MetadataTypeItem} metadataEntry metadata entry
1301
- * @param {boolean} [include=false] true: use definition.include / options.include; false=exclude: use definition.filter / options.exclude
1348
+ * @param {boolean} [include] true: use definition.include / options.include; false=exclude: use definition.filter / options.exclude
1302
1349
  * @returns {boolean} true: skip saving == filtered; false: continue with saving
1303
1350
  * @memberof MetadataType
1304
1351
  */
@@ -1343,7 +1390,7 @@ class MetadataType {
1343
1390
  *
1344
1391
  * @static
1345
1392
  * @param {object} metadataEntry metadata entry
1346
- * @param {boolean} [include=false] true: use definition.include / options.include; false=exclude: use definition.filter / options.exclude
1393
+ * @param {boolean} [include] true: use definition.include / options.include; false=exclude: use definition.filter / options.exclude
1347
1394
  * @returns {boolean} true: filtered == do NOT save; false: not filtered == do save
1348
1395
  * @memberof MetadataType
1349
1396
  */
@@ -1575,6 +1622,10 @@ class MetadataType {
1575
1622
  }
1576
1623
  }
1577
1624
 
1625
+ if (Util.OPTIONS.like && !Util.fieldsLike(results[originalKey])) {
1626
+ Util.logger.debug(`Filtered ${originalKey} because of --like option`);
1627
+ continue;
1628
+ }
1578
1629
  // we dont store Id on local disk, but we need it for caching logic,
1579
1630
  // so its in retrieve but not in save. Here we put into the clone so that the original
1580
1631
  // object used for caching doesnt have the Id removed.
@@ -1621,7 +1672,7 @@ class MetadataType {
1621
1672
  return savedResults;
1622
1673
  }
1623
1674
  /**
1624
- * helper for {@link buildDefinitionForNested}
1675
+ * helper for {@link MetadataType.buildDefinitionForNested}
1625
1676
  * searches extracted file for template variable names and applies the market values
1626
1677
  *
1627
1678
  * @param {string} code code from extracted code
@@ -1633,7 +1684,7 @@ class MetadataType {
1633
1684
  return Mustache.render(code, templateVariables, {}, ['{{{', '}}}']);
1634
1685
  }
1635
1686
  /**
1636
- * helper for {@link buildTemplateForNested}
1687
+ * helper for {@link MetadataType.buildTemplateForNested}
1637
1688
  * searches extracted file for template variable values and applies the market variable names
1638
1689
  *
1639
1690
  * @param {string} code code from extracted code
@@ -1645,7 +1696,7 @@ class MetadataType {
1645
1696
  return Util.replaceByObject(code, templateVariables);
1646
1697
  }
1647
1698
  /**
1648
- * helper for {@link buildDefinition}
1699
+ * helper for {@link MetadataType.buildDefinition}
1649
1700
  * handles extracted code if any are found for complex types (e.g script, asset, query)
1650
1701
  *
1651
1702
  * @param {string} templateDir Directory where metadata templates are stored
@@ -1666,7 +1717,7 @@ class MetadataType {
1666
1717
  return null;
1667
1718
  }
1668
1719
  /**
1669
- * helper for {@link buildTemplate}
1720
+ * helper for {@link MetadataType.buildTemplate}
1670
1721
  * handles extracted code if any are found for complex types
1671
1722
  *
1672
1723
  * @param {string} templateDir Directory where metadata templates are stored
@@ -1812,7 +1863,7 @@ class MetadataType {
1812
1863
  * @param {object} ex response payload from REST API
1813
1864
  * @returns {string[] | void} formatted Error Message
1814
1865
  */
1815
- static checkForErrors(ex) {
1866
+ static getErrorsREST(ex) {
1816
1867
  const errors = [];
1817
1868
  if (ex?.response?.status >= 400 && ex?.response?.status < 600) {
1818
1869
  if (ex.response.data.errors) {
@@ -1835,11 +1886,13 @@ class MetadataType {
1835
1886
  }
1836
1887
  } else if (ex.response.data.message) {
1837
1888
  errors.push(ex.response.data.message);
1838
- } else {
1889
+ } else if (ex.response.data) {
1839
1890
  errors.push(`Undefined Errors: ${JSON.stringify(ex.response.data)}`);
1891
+ Util.logger.debug(JSON.stringify(ex.response.data));
1892
+ } else {
1893
+ errors.push(`${ex.response.status} ${ex.response.statusText}`);
1840
1894
  }
1841
1895
  Util.logger.debug(JSON.stringify(ex.config));
1842
- Util.logger.debug(JSON.stringify(ex.response.data));
1843
1896
  }
1844
1897
  return errors;
1845
1898
  }
@@ -1902,11 +1955,7 @@ class MetadataType {
1902
1955
  metadata[overrideKeyField || this.definition.keyField] = customerKey;
1903
1956
  const soapType = this.definition.soapType || this.definition.type;
1904
1957
  try {
1905
- await this.client.soap.delete(
1906
- soapType.charAt(0).toUpperCase() + soapType.slice(1),
1907
- metadata,
1908
- null
1909
- );
1958
+ await this.client.soap.delete(Util.capitalizeFirstLetter(soapType), metadata, null);
1910
1959
  if (!handleOutside) {
1911
1960
  Util.logger.info(` - deleted ${this.definition.type}: ${customerKey}`);
1912
1961
  }
@@ -1959,7 +2008,7 @@ class MetadataType {
1959
2008
  * Returns metadata of a business unit that is saved locally
1960
2009
  *
1961
2010
  * @param {string} readDir root directory of metadata.
1962
- * @param {boolean} [listBadKeys=false] do not print errors, used for badKeys()
2011
+ * @param {boolean} [listBadKeys] do not print errors, used for badKeys()
1963
2012
  * @param {object} [buMetadata] Metadata of BU in local directory
1964
2013
  * @returns {object} Metadata of BU in local directory
1965
2014
  */
@@ -1997,6 +2046,57 @@ class MetadataType {
1997
2046
  const fileList = keyArr.map((key) => File.normalizePath([path, key + typeExtension]));
1998
2047
  return fileList;
1999
2048
  }
2049
+
2050
+ /**
2051
+ *
2052
+ * @param {TYPE.MetadataTypeMap} metadataMap metadata mapped by their keyField
2053
+ * @returns {string[]} list of keys
2054
+ */
2055
+ static getKeysForFixing(metadataMap) {
2056
+ const keysForDeploy = [];
2057
+ if (Object.keys(metadataMap).length) {
2058
+ Util.logger.info(
2059
+ `Searching for ${this.definition.type} keys among downloaded items that need fixing:`
2060
+ );
2061
+ for (const item of Object.values(metadataMap)) {
2062
+ if (item[this.definition.nameField].length > this.definition.maxKeyLength) {
2063
+ Util.logger.warn(
2064
+ `Name of the item ${
2065
+ item[this.definition.keyField]
2066
+ } is too long for a key. Consider renaming your item. Key will be equal first ${
2067
+ this.definition.maxKeyLength
2068
+ } characters of the name`
2069
+ );
2070
+ item[this.definition.nameField] = item[this.definition.nameField].slice(
2071
+ 0,
2072
+ this.definition.maxKeyLength
2073
+ );
2074
+ }
2075
+
2076
+ if (
2077
+ item[this.definition.nameField] != item[this.definition.keyField] &&
2078
+ !this.definition.keyIsFixed
2079
+ ) {
2080
+ keysForDeploy.push(item[this.definition.keyField]);
2081
+ Util.logger.info(
2082
+ ` - added ${this.definition.type} to fixKey queue: ${
2083
+ item[this.definition.keyField]
2084
+ }`
2085
+ );
2086
+ } else {
2087
+ Util.logger.info(
2088
+ Util.getGrayMsg(
2089
+ ` ☇ skipping ${this.definition.type} ${
2090
+ item[this.definition.keyField]
2091
+ }: key does not need to be updated`
2092
+ )
2093
+ );
2094
+ }
2095
+ }
2096
+ Util.logger.info(`Found ${keysForDeploy.length} ${this.definition.type} keys to fix`);
2097
+ }
2098
+ return keysForDeploy;
2099
+ }
2000
2100
  }
2001
2101
 
2002
2102
  MetadataType.definition = {
@@ -96,7 +96,7 @@ class MobileKeyword extends MetadataType {
96
96
  }
97
97
 
98
98
  /**
99
- * helper for {@link parseResponseBody} that creates a custom key field for this type based on mobileCode and keyword
99
+ * helper for {@link MobileKeyword.parseResponseBody} that creates a custom key field for this type based on mobileCode and keyword
100
100
  *
101
101
  * @private
102
102
  * @param {TYPE.MetadataType} metadata single item
@@ -106,7 +106,7 @@ class MobileKeyword extends MetadataType {
106
106
  }
107
107
 
108
108
  /**
109
- * helper for {@link preDeployTasks} and {@link createOrUpdate} to ensure we have code & keyword properly set
109
+ * helper for {@link MobileKeyword.preDeployTasks} and {@link MobileKeyword.createOrUpdate} to ensure we have code & keyword properly set
110
110
  *
111
111
  * @private
112
112
  * @param {TYPE.MetadataType} metadata single item
@@ -192,7 +192,7 @@ class MobileKeyword extends MetadataType {
192
192
  }
193
193
 
194
194
  /**
195
- * helper for {@link retrieve} and {@link retrieveAsTemplate}
195
+ * helper for {@link MobileKeyword.retrieve} and {@link MobileKeyword.retrieveAsTemplate}
196
196
  *
197
197
  * @private
198
198
  * @param {string} key customer key of single item to retrieve / name of the metadata file
@@ -281,7 +281,7 @@ class MobileKeyword extends MetadataType {
281
281
  }
282
282
  }
283
283
  /**
284
- * helper for {@link parseMetadata} and {@link _buildForNested}
284
+ * helper for {@link MobileKeyword.postRetrieveTasks} and {@link MobileKeyword._buildForNested}
285
285
  *
286
286
  * @param {string} metadataScript the code of the file
287
287
  * @returns {{fileExt:string,code:string}} returns found extension and file content
@@ -349,7 +349,7 @@ class MobileKeyword extends MetadataType {
349
349
  }
350
350
 
351
351
  /**
352
- * helper for {@link buildTemplateForNested} / {@link buildDefinitionForNested}
352
+ * helper for {@link MobileKeyword.buildTemplateForNested} / {@link MobileKeyword.buildDefinitionForNested}
353
353
  * handles extracted code if any are found for complex types
354
354
  *
355
355
  * @param {string} templateDir Directory where metadata templates are stored
@@ -445,7 +445,7 @@ class MobileKeyword extends MetadataType {
445
445
  return metadata;
446
446
  }
447
447
  /**
448
- * helper for {@link createREST}
448
+ * helper for {@link MetadataType.createREST}
449
449
  *
450
450
  * @param {TYPE.MetadataTypeItem} metadataEntry a single metadata Entry
451
451
  * @param {object} apiResponse varies depending on the API call
@@ -455,7 +455,7 @@ class MobileKeyword extends MetadataType {
455
455
  await super.postDeployTasks_legacyApi(metadataEntry, apiResponse);
456
456
  }
457
457
  /**
458
- * helper for {@link updateREST}
458
+ * helper for {@link MetadataType.updateREST}
459
459
  *
460
460
  * @param {TYPE.MetadataTypeItem} metadataEntry a single metadata Entry
461
461
  * @param {object} apiResponse varies depending on the API call
@@ -466,7 +466,7 @@ class MobileKeyword extends MetadataType {
466
466
  }
467
467
 
468
468
  /**
469
- * helper for {@link preDeployTasks} that loads extracted code content back into JSON
469
+ * helper for {@link MobileKeyword.preDeployTasks} that loads extracted code content back into JSON
470
470
  *
471
471
  * @param {TYPE.MetadataTypeItem} metadata a single definition
472
472
  * @param {string} deployDir directory of deploy files
@@ -83,7 +83,7 @@ class MobileMessage extends MetadataType {
83
83
  return super.createREST(metadata, '/legacy/v1/beta/mobile/message/');
84
84
  }
85
85
  /**
86
- * helper for {@link preDeployTasks} that loads extracted code content back into JSON
86
+ * helper for {@link MobileMessage.preDeployTasks} that loads extracted code content back into JSON
87
87
  *
88
88
  * @param {TYPE.MetadataTypeItem} metadata a single definition
89
89
  * @param {string} deployDir directory of deploy files
@@ -110,7 +110,7 @@ class MobileMessage extends MetadataType {
110
110
  }
111
111
  }
112
112
  /**
113
- * helper for {@link parseMetadata} and {@link _buildForNested}
113
+ * helper for {@link MobileMessage.postRetrieveTasks} and {@link MobileMessage._buildForNested}
114
114
  *
115
115
  * @param {string} code the code of the file
116
116
  * @returns {{fileExt:string,code:string}} returns found extension and file content
@@ -304,7 +304,7 @@ class MobileMessage extends MetadataType {
304
304
  return metadata;
305
305
  }
306
306
  /**
307
- * helper for {@link createREST}
307
+ * helper for {@link MetadataType.createREST}
308
308
  *
309
309
  * @param {TYPE.MetadataTypeItem} metadataEntry a single metadata Entry
310
310
  * @param {object} apiResponse varies depending on the API call
@@ -314,7 +314,7 @@ class MobileMessage extends MetadataType {
314
314
  await super.postDeployTasks_legacyApi(metadataEntry, apiResponse);
315
315
  }
316
316
  /**
317
- * helper for {@link updateREST}
317
+ * helper for {@link MetadataType.updateREST}
318
318
  *
319
319
  * @param {TYPE.MetadataTypeItem} metadataEntry a single metadata Entry
320
320
  * @param {object} apiResponse varies depending on the API call
@@ -380,7 +380,7 @@ class MobileMessage extends MetadataType {
380
380
  }
381
381
 
382
382
  /**
383
- * helper for {@link buildTemplateForNested} / {@link buildDefinitionForNested}
383
+ * helper for {@link MobileMessage.buildTemplateForNested} / {@link MobileMessage.buildDefinitionForNested}
384
384
  * handles extracted code if any are found for complex types
385
385
  *
386
386
  * @param {string} templateDir Directory where metadata templates are stored