mcdev 5.1.0 → 5.3.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 (256) hide show
  1. package/.eslintrc.json +4 -4
  2. package/.fork/custom-commands.json +12 -0
  3. package/.github/ISSUE_TEMPLATE/bug.yml +2 -0
  4. package/.github/PULL_REQUEST_TEMPLATE/pr_template_release.md +19 -0
  5. package/.github/PULL_REQUEST_TEMPLATE.md +2 -2
  6. package/.github/workflows/coverage-develop-branch.yml +0 -2
  7. package/.github/workflows/coverage-main-branch.yml +0 -2
  8. package/.github/workflows/coverage.yml +0 -2
  9. package/.husky/post-checkout +1 -0
  10. package/.husky/post-merge +1 -0
  11. package/.vscode/extensions.json +4 -0
  12. package/docs/dist/documentation.md +1034 -296
  13. package/lib/Deployer.js +25 -25
  14. package/lib/MetadataTypeDefinitions.js +2 -1
  15. package/lib/MetadataTypeInfo.js +2 -1
  16. package/lib/Retriever.js +1 -1
  17. package/lib/cli.js +165 -10
  18. package/lib/index.js +398 -95
  19. package/lib/metadataTypes/Asset.js +10 -11
  20. package/lib/metadataTypes/AttributeGroup.js +76 -2
  21. package/lib/metadataTypes/AttributeSet.js +367 -0
  22. package/lib/metadataTypes/Automation.js +483 -137
  23. package/lib/metadataTypes/DataExtension.js +465 -68
  24. package/lib/metadataTypes/DataExtensionField.js +31 -14
  25. package/lib/metadataTypes/Event.js +2 -3
  26. package/lib/metadataTypes/Folder.js +1 -1
  27. package/lib/metadataTypes/Journey.js +13 -7
  28. package/lib/metadataTypes/MetadataType.js +212 -54
  29. package/lib/metadataTypes/MobileKeyword.js +9 -9
  30. package/lib/metadataTypes/MobileMessage.js +5 -5
  31. package/lib/metadataTypes/Query.js +26 -10
  32. package/lib/metadataTypes/Script.js +3 -3
  33. package/lib/metadataTypes/TransactionalEmail.js +94 -17
  34. package/lib/metadataTypes/TransactionalMessage.js +3 -2
  35. package/lib/metadataTypes/TransactionalSMS.js +5 -5
  36. package/lib/metadataTypes/TriggeredSend.js +25 -50
  37. package/lib/metadataTypes/User.js +7 -4
  38. package/lib/metadataTypes/Verification.js +230 -0
  39. package/lib/metadataTypes/definitions/AttributeGroup.definition.js +119 -108
  40. package/lib/metadataTypes/definitions/{SetDefinition.definition.js → AttributeSet.definition.js} +123 -43
  41. package/lib/metadataTypes/definitions/Automation.definition.js +23 -15
  42. package/lib/metadataTypes/definitions/ImportFile.definition.js +36 -6
  43. package/lib/metadataTypes/definitions/TransactionalEmail.definition.js +19 -1
  44. package/lib/metadataTypes/definitions/TriggeredSend.definition.js +1 -0
  45. package/lib/metadataTypes/definitions/Verification.definition.js +88 -0
  46. package/lib/util/cache.js +9 -4
  47. package/lib/util/cli.js +40 -0
  48. package/lib/util/file.js +2 -2
  49. package/lib/util/init.js +84 -0
  50. package/lib/util/util.js +121 -13
  51. package/package.json +13 -13
  52. package/test/mockRoot/.mcdevrc.json +1 -1
  53. package/test/mockRoot/deploy/testInstance/_ParentBU_/dataExtension/testExisting_dataExtensionShared.dataExtension-meta.json +59 -0
  54. package/test/mockRoot/deploy/testInstance/_ParentBU_/dataExtension/testNew_dataExtensionShared.dataExtension-meta.json +23 -0
  55. package/test/mockRoot/deploy/testInstance/testBU/automation/testExisting_automation.automation-meta.json +1 -2
  56. package/test/mockRoot/deploy/testInstance/testBU/automation/testNew_automation.automation-meta.json +9 -6
  57. package/test/mockRoot/deploy/testInstance/testBU/dataExtension/testExisting_dataExtension.dataExtension-meta.json +1 -0
  58. package/test/mockRoot/deploy/testInstance/testBU/dataExtract/testExisting_dataExtract.dataExtract-meta.json +35 -0
  59. package/test/mockRoot/deploy/testInstance/testBU/dataExtract/testNew_dataExtract.dataExtract-meta.json +35 -0
  60. package/test/mockRoot/deploy/testInstance/testBU/fileTransfer/testExisting_fileTransfer.fileTransfer-meta.json +17 -0
  61. package/test/mockRoot/deploy/testInstance/testBU/fileTransfer/testNew_fileTransfer.fileTransfer-meta.json +17 -0
  62. package/test/mockRoot/deploy/testInstance/testBU/importFile/testExisting_importFile.importFile-meta.json +29 -0
  63. package/test/mockRoot/deploy/testInstance/testBU/importFile/testNew_importFile.importFile-meta.json +29 -0
  64. package/test/mockRoot/deploy/testInstance/testBU/query/testExisting_query_fixKeys.query-meta.json +11 -0
  65. package/test/mockRoot/deploy/testInstance/testBU/query/testExisting_query_fixKeys.query-meta.sql +6 -0
  66. package/test/mockRoot/deploy/testInstance/testBU/script/testExisting_script.script-meta.json +6 -0
  67. package/test/mockRoot/deploy/testInstance/testBU/script/testExisting_script.script-meta.ssjs +1 -0
  68. package/test/mockRoot/deploy/testInstance/testBU/script/testNew_script.script-meta.json +6 -0
  69. package/test/mockRoot/deploy/testInstance/testBU/script/testNew_script.script-meta.ssjs +1 -0
  70. package/test/mockRoot/deploy/testInstance/testBU/transactionalEmail/testExisting_temail.transactionalEmail-meta.json +3 -4
  71. package/test/mockRoot/deploy/testInstance/testBU/transactionalEmail/testNew_temail.transactionalEmail-meta.json +1 -6
  72. package/test/mockRoot/deploy/testInstance/testBU/triggeredSend/testExisting_triggeredSend.triggeredSend-meta.json +29 -0
  73. package/test/mockRoot/deploy/testInstance/testBU/triggeredSend/testNew_triggeredSend.triggeredSend-meta.json +29 -0
  74. package/test/mockRoot/deploy/testInstance/testBU/verification/testExisting_39f6a488-20eb-4ba0-b0b9.verification-meta.json +11 -0
  75. package/test/mockRoot/deploy/testInstance/testBU/verification/testNew_39f6a488-20eb-4ba0-b0b9.verification-meta.json +11 -0
  76. package/test/resourceFactory.js +77 -12
  77. package/test/resources/1111111/accountUser/retrieve-ActiveFlag=falseANDCustomerKey=testExisting_userANDEmaillike@-response.xml +27 -0
  78. package/test/resources/1111111/accountUser/retrieve-ActiveFlag=falseANDEmaillike@-response.xml +156 -0
  79. package/test/resources/1111111/accountUser/retrieve-ActiveFlag=trueANDEmailisNullORNamelikeapp userANDMustChangePassword=false-response.xml +87 -0
  80. package/test/resources/1111111/accountUser/retrieve-ActiveFlag=trueANDEmaillike@-response.xml +156 -0
  81. package/test/resources/1111111/accountUser/retrieve-CustomerKey=testExisting_userANDActiveFlag=trueANDEmailisNullORNamelikeapp userANDMustChangePassword=false-response.xml +27 -0
  82. package/test/resources/1111111/accountUserAccount/retrieve-AccountUser.AccountUserID=700301950-response.xml +60 -0
  83. package/test/resources/1111111/data/v1/customobjectdata/key/testExisting_dataExtensionShared/rowset/get-response.json +13 -0
  84. package/test/resources/1111111/dataExtension/create-expected.json +23 -0
  85. package/test/resources/1111111/dataExtension/create-response.xml +59 -0
  86. package/test/resources/1111111/dataExtension/retrieve-expected.json +55 -0
  87. package/test/resources/1111111/dataExtension/retrieve-expected.md +18 -0
  88. package/test/resources/1111111/dataExtension/retrieve-response.xml +27 -1
  89. package/test/resources/1111111/dataExtension/update-expected.json +55 -0
  90. package/test/resources/1111111/dataExtension/update-response.xml +57 -0
  91. package/test/resources/1111111/dataExtensionField/retrieve-CustomerKey=[testExisting_dataExtensionShared].[TriggerUpdate_randomNumber_]-response.xml +45 -0
  92. package/test/resources/1111111/dataExtensionField/retrieve-DataExtension.CustomerKey=testExisting_dataExtensionShared-response.xml +98 -0
  93. package/test/resources/1111111/dataExtensionField/retrieve-DataExtension.CustomerKey=testNew_dataExtensionSharedORDataExtension.CustomerKey=testExisting_dataExtensionShared-response.xml +98 -0
  94. package/test/resources/1111111/dataExtensionField/retrieve-response.xml +98 -0
  95. package/test/resources/1111111/dataExtensionTemplate/retrieve-response.xml +303 -0
  96. package/test/resources/1111111/dataFolder/retrieve-ContentType=synchronizeddataextensionORContentType=shared_salesforcedataextensionORContentType=shared_dataextensionORContentType=shared_dataORContentType=salesforcedataextensionORContentType=dataextensionORContentType=hidden-response.xml +387 -0
  97. package/test/resources/1111111/dataFolder/retrieve-response.xml +353 -9
  98. package/test/resources/1111111/user/retrieve-expected.md +4 -2
  99. package/test/resources/9999999/attributeGroup/retrieve-expected.json +25 -0
  100. package/test/resources/9999999/attributeSet/retrieve-expected.json +143 -0
  101. package/test/resources/9999999/automation/build-expected.json +5 -2
  102. package/test/resources/9999999/automation/create-expected.json +11 -8
  103. package/test/resources/9999999/automation/create-testNew_automation-expected.md +5 -4
  104. package/test/resources/9999999/automation/patch_fixKeys-pause-expected.json +44 -0
  105. package/test/resources/9999999/automation/patch_fixKeys-schedule-expected.json +44 -0
  106. package/test/resources/9999999/automation/perform-08afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +42 -0
  107. package/test/resources/9999999/automation/perform-08afb0e2-b00a-4c88-fixKey_pause-response.xml +42 -0
  108. package/test/resources/9999999/automation/perform-08afb0e2-b00a-4c88-fixKey_schedule-response.xml +42 -0
  109. package/test/resources/9999999/automation/perform-a8afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +42 -0
  110. package/test/resources/9999999/automation/retrieve-expected.json +5 -2
  111. package/test/resources/9999999/automation/retrieve-testExisting_automation-expected.md +3 -2
  112. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +52 -0
  113. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-ad2e-pause-response.xml +38 -0
  114. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-fixKey_pause-response.xml +52 -0
  115. package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-fixKey_schedule-response.xml +52 -0
  116. package/test/resources/9999999/automation/schedule-a8afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +52 -0
  117. package/test/resources/9999999/automation/template-expected.json +5 -2
  118. package/test/resources/9999999/automation/update-expected.json +1 -2
  119. package/test/resources/9999999/automation/update-testExisting_automation-expected.md +2 -2
  120. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-1f7f8788c560/get-response.json +7 -0
  121. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-pause/get-response.json +85 -0
  122. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-pause/patch-response.json +85 -0
  123. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_pause/get-response.json +85 -0
  124. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_pause/patch-response.json +85 -0
  125. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_schedule/get-response.json +85 -0
  126. package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_schedule/patch-response.json +85 -0
  127. package/test/resources/9999999/automation/v1/automations/a8afb0e2-b00a-4c88-ad2e-1f7f8788c560/get-response.json +1 -1
  128. package/test/resources/9999999/automation/v1/automations/post-response.json +27 -19
  129. package/test/resources/9999999/automation/v1/dataextracts/56c5370a-f988-4f36-b0ee-0f876573f6d7/patch-response.json +38 -0
  130. package/test/resources/9999999/automation/v1/dataextracts/post-response.json +38 -0
  131. package/test/resources/9999999/automation/v1/dataextracttypes/get-response.json +50 -0
  132. package/test/resources/9999999/automation/v1/dataverifications/post-response.json +12 -0
  133. package/test/resources/9999999/automation/v1/dataverifications/testExisting_39f6a488-20eb-4ba0-b0b9/delete-response.json +0 -0
  134. package/test/resources/9999999/automation/v1/dataverifications/testExisting_39f6a488-20eb-4ba0-b0b9/get-response.json +12 -0
  135. package/test/resources/9999999/automation/v1/dataverifications/testExisting_39f6a488-20eb-4ba0-b0b9/patch-response.json +12 -0
  136. package/test/resources/9999999/automation/v1/filetransfers/72c328ac-f5b0-4e37-91d3-a775666f15a6/patch-response.json +18 -0
  137. package/test/resources/9999999/automation/v1/filetransfers/post-response.json +18 -0
  138. package/test/resources/9999999/automation/v1/ftplocations/get-response.json +18 -0
  139. package/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b/patch-response.json +31 -0
  140. package/test/resources/9999999/automation/v1/imports/get-response.json +1 -1
  141. package/test/resources/9999999/automation/v1/imports/post-response.json +30 -0
  142. package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dae/actions/start/post-response.txt +1 -0
  143. package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat_fixKeys/get-response.json +17 -0
  144. package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat_fixKeys/patch-response.json +18 -0
  145. package/test/resources/9999999/automation/v1/queries/get-response.json +18 -1
  146. package/test/resources/9999999/automation/v1/scripts/39f6a488-20eb-4ba0-b0b9-023725b574e4/patch-response.json +10 -0
  147. package/test/resources/9999999/automation/v1/scripts/get-response.json +12 -2
  148. package/test/resources/9999999/automation/v1/scripts/post-response.json +10 -0
  149. package/test/resources/9999999/dataExtension/build-expected.json +16 -0
  150. package/test/resources/9999999/dataExtension/delete-response.xml +42 -0
  151. package/test/resources/9999999/dataExtension/retrieve-Name=testExisting_dataExtension-response.xml +52 -0
  152. package/test/resources/9999999/dataExtension/retrieve-expected.json +16 -0
  153. package/test/resources/9999999/dataExtension/retrieve-expected.md +3 -1
  154. package/test/resources/9999999/dataExtension/template-expected.json +16 -0
  155. package/test/resources/9999999/dataExtension/update-expected.json +17 -1
  156. package/test/resources/9999999/dataExtensionField/retrieve-CustomerKey=[testExisting_dataExtension].[LastName]-response.xml +44 -0
  157. package/test/resources/9999999/dataExtensionField/retrieve-DataExtension.CustomerKey=testExisting_dataExtension-response.xml +133 -0
  158. package/test/resources/9999999/dataExtensionField/retrieve-DataExtension.CustomerKey=testNew_dataExtensionORDataExtension.CustomerKey=testExisting_dataExtension-response.xml +99 -0
  159. package/test/resources/9999999/dataExtensionField/retrieve-response.xml +36 -1
  160. package/test/resources/9999999/dataExtract/build-expected.json +35 -0
  161. package/test/resources/9999999/dataExtract/get-expected.json +39 -0
  162. package/test/resources/9999999/dataExtract/patch-expected.json +37 -0
  163. package/test/resources/9999999/dataExtract/post-expected.json +37 -0
  164. package/test/resources/9999999/dataExtract/template-expected.json +35 -0
  165. package/test/resources/9999999/dataFolder/retrieve-ContentType=contextual_suppression_listORContentType=publicationORContentType=suppression_listORContentType=mysubsORContentType=list-response.xml +136 -0
  166. package/test/resources/9999999/dataFolder/retrieve-ContentType=ssjsactivity-response.xml +48 -0
  167. package/test/resources/9999999/dataFolder/retrieve-ContentType=synchronizeddataextensionORContentType=shared_salesforcedataextensionORContentType=shared_dataextensionORContentType=shared_dataORContentType=salesforcedataextensionORContentType=dataextensionORContentType=hidden-response.xml +117 -0
  168. package/test/resources/9999999/dataFolder/retrieve-ContentType=triggered_send_journeybuilderORContentType=triggered_sendORContentType=hidden-response.xml +276 -0
  169. package/test/resources/9999999/dataFolder/retrieve-response.xml +23 -0
  170. package/test/resources/9999999/email/retrieve-response.xml +203 -0
  171. package/test/resources/9999999/fileTransfer/build-expected.json +15 -0
  172. package/test/resources/9999999/fileTransfer/get-expected.json +17 -0
  173. package/test/resources/9999999/fileTransfer/patch-expected.json +17 -0
  174. package/test/resources/9999999/fileTransfer/post-expected.json +17 -0
  175. package/test/resources/9999999/fileTransfer/template-expected.json +15 -0
  176. package/test/resources/9999999/hub/v1/contacts/schema/attributeGroups/get-response.json +628 -0
  177. package/test/resources/9999999/hub/v1/contacts/schema/setDefinitions/get-response.json +20194 -0
  178. package/test/resources/9999999/importFile/build-expected.json +27 -0
  179. package/test/resources/9999999/importFile/get-expected.json +29 -0
  180. package/test/resources/9999999/importFile/patch-expected.json +29 -0
  181. package/test/resources/9999999/importFile/post-expected.json +29 -0
  182. package/test/resources/9999999/importFile/template-expected.json +27 -0
  183. package/test/resources/9999999/interaction/v1/interactions/233d4413-922c-4568-85a5-e5cc77efc3be/delete-response.json +1 -0
  184. package/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/get-response.json +1 -1
  185. package/test/resources/9999999/messaging/v1/email/definitions/post-response.json +1 -1
  186. package/test/resources/9999999/messaging/v1/email/definitions/testExisting_temail/delete-response.json +6 -0
  187. package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixKey_pause-response.xml +32 -0
  188. package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixKey_schedule-response.xml +32 -0
  189. package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixedKey_paused-response.xml +32 -0
  190. package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixedKey_scheduled-response.xml +32 -0
  191. package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_pause-response.xml +30 -0
  192. package/test/resources/9999999/program/retrieve-response.xml +21 -3
  193. package/test/resources/9999999/query/patch_fixKeys-expected.json +11 -0
  194. package/test/resources/9999999/query/patch_fixKeys-expected.sql +6 -0
  195. package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testExisting_query_fixKeysANDStatus=Active-response.xml +30 -0
  196. package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testExisting_query_fixedKeysANDStatus=Active-response.xml +30 -0
  197. package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testNew_queryANDStatus=Active-response.xml +30 -0
  198. package/test/resources/9999999/script/build-expected.json +6 -0
  199. package/test/resources/9999999/script/build-expected.ssjs +1 -0
  200. package/test/resources/9999999/script/get-expected.json +8 -0
  201. package/test/resources/9999999/script/get-expected.ssjs +1 -0
  202. package/test/resources/9999999/script/get_noScriptTag-expected.html +1 -0
  203. package/test/resources/9999999/script/get_noScriptTag-expected.json +8 -0
  204. package/test/resources/9999999/script/patch-expected.json +8 -0
  205. package/test/resources/9999999/script/patch-expected.ssjs +1 -0
  206. package/test/resources/9999999/script/post-expected.json +8 -0
  207. package/test/resources/9999999/script/post-expected.ssjs +1 -0
  208. package/test/resources/9999999/script/template-expected.json +6 -0
  209. package/test/resources/9999999/script/template-expected.ssjs +1 -0
  210. package/test/resources/9999999/transactionalEmail/build-expected.json +3 -7
  211. package/test/resources/9999999/transactionalEmail/get-expected.json +3 -7
  212. package/test/resources/9999999/transactionalEmail/patch-expected.json +3 -7
  213. package/test/resources/9999999/transactionalEmail/post-expected.json +3 -7
  214. package/test/resources/9999999/transactionalEmail/template-expected.json +3 -7
  215. package/test/resources/9999999/triggeredSend/build-expected.json +29 -0
  216. package/test/resources/9999999/triggeredSend/get-expected.json +29 -0
  217. package/test/resources/9999999/triggeredSend/patch-expected.json +29 -0
  218. package/test/resources/9999999/triggeredSend/post-expected.json +29 -0
  219. package/test/resources/9999999/triggeredSend/template-expected.json +29 -0
  220. package/test/resources/9999999/triggeredSendDefinition/create-response.xml +75 -0
  221. package/test/resources/9999999/triggeredSendDefinition/delete-response.xml +36 -0
  222. package/test/resources/9999999/triggeredSendDefinition/{retrieve-response.xml → retrieve-TriggeredSendStatusINNew,Active,Inactive,Moved,Canceled-response.xml} +4 -4
  223. package/test/resources/9999999/triggeredSendDefinition/update-response.xml +74 -0
  224. package/test/resources/9999999/verification/build-expected.json +11 -0
  225. package/test/resources/9999999/verification/get-expected.json +11 -0
  226. package/test/resources/9999999/verification/patch-expected.json +11 -0
  227. package/test/resources/9999999/verification/post-expected.json +11 -0
  228. package/test/resources/9999999/verification/template-expected.json +11 -0
  229. package/test/type.attributeGroup.test.js +55 -0
  230. package/test/type.attributeSet.test.js +55 -0
  231. package/test/type.automation.test.js +650 -17
  232. package/test/type.dataExtension.test.js +205 -46
  233. package/test/type.dataExtract.test.js +194 -0
  234. package/test/type.fileTransfer.test.js +192 -0
  235. package/test/type.importFile.test.js +193 -0
  236. package/test/type.journey.test.js +38 -11
  237. package/test/type.mobileKeyword.test.js +6 -5
  238. package/test/type.mobileMessage.test.js +6 -4
  239. package/test/type.query.test.js +470 -17
  240. package/test/type.script.test.js +372 -0
  241. package/test/type.transactionalEmail.test.js +12 -11
  242. package/test/type.transactionalPush.test.js +2 -4
  243. package/test/type.transactionalSMS.test.js +2 -4
  244. package/test/type.triggeredSend.test.js +154 -0
  245. package/test/type.user.test.js +22 -10
  246. package/test/type.verification.test.js +173 -0
  247. package/test/utils.js +11 -2
  248. package/types/mcdev.d.js +14 -0
  249. package/lib/metadataTypes/SetDefinition.js +0 -37
  250. /package/test/resources/1111111/accountUser/{retrieve-response.xml → retrieve-ActiveFlag=trueANDCustomerKey=testExisting_userANDEmaillike@-response.xml} +0 -0
  251. /package/test/resources/1111111/accountUserAccount/{retrieve-response.xml → retrieve-AccountUser.AccountUserIDIN700301950,700301951,7471228-response.xml} +0 -0
  252. /package/test/resources/1111111/businessUnit/{retrieve-response.xml → retrieve-ID=1111111-response.xml} +0 -0
  253. /package/test/resources/1111111/list/{retrieve-response.xml → retrieve-CustomerKey=All SubscribersORListName=All Subscribers-response.xml} +0 -0
  254. /package/test/resources/1111111/role/{retrieve-response.xml → retrieve-IsPrivate=false-response.xml} +0 -0
  255. /package/test/resources/9999999/emailSendDefinition/{retrieve-response.xml → retrieve-IsPlatformObject=falseANDDescriptionnotEqualsSFSendDefinition-response.xml} +0 -0
  256. /package/test/resources/9999999/queryDefinition/{retrieve-response.xml → retrieve-CustomerKey=testExisting_queryANDStatus=Active-response.xml} +0 -0
@@ -1,20 +1,30 @@
1
1
  module.exports = {
2
2
  bodyIteratorField: 'setDefinition',
3
- dependencies: [], // future may have dependency on Data Extensions
3
+ dependencies: [
4
+ 'folder-hidden',
5
+ 'folder-dataextension',
6
+ 'folder-salesforcedataextension',
7
+ 'folder-shared_data',
8
+ 'folder-shared_dataextension',
9
+ 'folder-shared_salesforcedataextension',
10
+ 'folder-synchronizeddataextension',
11
+ 'dataExtension',
12
+ ],
4
13
  hasExtended: false,
5
14
  idField: 'definitionID',
6
15
  keyIsFixed: null,
7
16
  keyField: 'definitionKey',
8
17
  nameField: 'name',
18
+ folderIdField: 'categoryID',
9
19
  createdDateField: 'createDate',
10
20
  createdNameField: 'createdBy',
11
21
  lastmodDateField: null,
12
22
  lastmodNameField: null,
13
- restPagination: false,
14
- type: 'setDefinition',
15
- typeDescription: 'BETA: Data Extensions linked to Attribute Groups in Data Designer.',
16
- typeRetrieveByDefault: false,
17
- typeName: 'Data Designer Set Definitions',
23
+ restPagination: false, // Hub API does not support pagination and returns everything instead
24
+ type: 'attributeSet',
25
+ typeDescription: 'Data Extensions linked together in Attribute Groups in Data Designer.',
26
+ typeRetrieveByDefault: true,
27
+ typeName: 'Data Designer Attribute Sets',
18
28
  fields: {
19
29
  applicationID: {
20
30
  isCreateable: null,
@@ -65,10 +75,10 @@ module.exports = {
65
75
  template: null,
66
76
  },
67
77
  'connectingID.identifierType': {
68
- isCreateable: null,
69
- isUpdateable: null,
70
- retrieving: true,
71
- template: null,
78
+ isCreateable: true,
79
+ isUpdateable: true,
80
+ retrieving: false,
81
+ template: false,
72
82
  },
73
83
  createDate: {
74
84
  isCreateable: null,
@@ -118,29 +128,43 @@ module.exports = {
118
128
  retrieving: true,
119
129
  template: null,
120
130
  },
121
- definitionID: {
131
+ 'dataRetentionProperties.periodLength': {
122
132
  isCreateable: null,
123
133
  isUpdateable: null,
124
134
  retrieving: true,
125
135
  template: null,
126
136
  },
127
- definitionKey: {
137
+ definitionID: {
128
138
  isCreateable: null,
129
139
  isUpdateable: null,
130
140
  retrieving: true,
131
141
  template: null,
132
142
  },
133
- 'definitionName.value': {
143
+ definitionKey: {
134
144
  isCreateable: null,
135
145
  isUpdateable: null,
136
146
  retrieving: true,
137
147
  template: null,
138
148
  },
149
+ definitionName: {
150
+ isCreateable: true,
151
+ isUpdateable: true,
152
+ retrieving: false,
153
+ template: false,
154
+ },
155
+ 'definitionName.value': {
156
+ // equal to 'name'
157
+ isCreateable: true,
158
+ isUpdateable: true,
159
+ retrieving: false,
160
+ template: false,
161
+ },
139
162
  fullyQualifiedName: {
140
- isCreateable: null,
141
- isUpdateable: null,
142
- retrieving: true,
143
- template: null,
163
+ // equal to 'name'
164
+ isCreateable: true,
165
+ isUpdateable: true,
166
+ retrieving: false,
167
+ template: false,
144
168
  },
145
169
  isCustomObjectBacked: {
146
170
  isCreateable: null,
@@ -233,28 +257,28 @@ module.exports = {
233
257
  template: null,
234
258
  },
235
259
  localizedDescription: {
236
- isCreateable: null,
237
- isUpdateable: null,
260
+ isCreateable: true,
261
+ isUpdateable: true,
238
262
  retrieving: true,
239
- template: null,
263
+ template: true,
240
264
  },
241
265
  'localizedDescription.resourceSetKey': {
242
- isCreateable: null,
243
- isUpdateable: null,
266
+ isCreateable: true,
267
+ isUpdateable: true,
244
268
  retrieving: true,
245
- template: null,
269
+ template: true,
246
270
  },
247
271
  'localizedDescription.resourceValueKey': {
248
- isCreateable: null,
249
- isUpdateable: null,
272
+ isCreateable: true,
273
+ isUpdateable: true,
250
274
  retrieving: true,
251
- template: null,
275
+ template: true,
252
276
  },
253
277
  'localizedDescription.value': {
254
- isCreateable: null,
255
- isUpdateable: null,
278
+ isCreateable: true,
279
+ isUpdateable: true,
256
280
  retrieving: true,
257
- template: null,
281
+ template: true,
258
282
  },
259
283
  name: {
260
284
  isCreateable: null,
@@ -436,6 +460,18 @@ module.exports = {
436
460
  retrieving: true,
437
461
  template: null,
438
462
  },
463
+ 'relationships[].relationshipAttributes[].c__leftFullyQualifiedName': {
464
+ isCreateable: null,
465
+ isUpdateable: null,
466
+ retrieving: true,
467
+ template: null,
468
+ },
469
+ 'relationships[].relationshipAttributes[].c__rightFullyQualifiedName': {
470
+ isCreateable: null,
471
+ isUpdateable: null,
472
+ retrieving: true,
473
+ template: null,
474
+ },
439
475
  'relationships[].relationshipID': {
440
476
  isCreateable: null,
441
477
  isUpdateable: null,
@@ -581,9 +617,10 @@ module.exports = {
581
617
  template: null,
582
618
  },
583
619
  'valueDefinitions[].baseType': {
620
+ // "Numeric", "Text", ... valueDefinitions[].dataType is more relevant
584
621
  isCreateable: null,
585
622
  isUpdateable: null,
586
- retrieving: true,
623
+ retrieving: false,
587
624
  template: null,
588
625
  },
589
626
  'valueDefinitions[].customerDataID': {
@@ -592,6 +629,12 @@ module.exports = {
592
629
  retrieving: true,
593
630
  template: null,
594
631
  },
632
+ 'valueDefinitions[].connectingID': {
633
+ isCreateable: null,
634
+ isUpdateable: null,
635
+ retrieving: false,
636
+ template: null,
637
+ },
595
638
  'valueDefinitions[].dataSourceID': {
596
639
  isCreateable: null,
597
640
  isUpdateable: null,
@@ -601,7 +644,7 @@ module.exports = {
601
644
  'valueDefinitions[].dataSourceName': {
602
645
  isCreateable: null,
603
646
  isUpdateable: null,
604
- retrieving: true,
647
+ retrieving: false,
605
648
  template: null,
606
649
  },
607
650
  'valueDefinitions[].dataType': {
@@ -617,9 +660,10 @@ module.exports = {
617
660
  template: null,
618
661
  },
619
662
  'valueDefinitions[].definitionID': {
663
+ // likely the main ID of the value definition. No use for simple checks on git though as long as we cannot update it
620
664
  isCreateable: null,
621
665
  isUpdateable: null,
622
- retrieving: true,
666
+ retrieving: false,
623
667
  template: null,
624
668
  },
625
669
  'valueDefinitions[].definitionKey': {
@@ -628,10 +672,11 @@ module.exports = {
628
672
  retrieving: true,
629
673
  template: null,
630
674
  },
631
- 'valueDefinitions[].definitionName.value': {
675
+ 'valueDefinitions[].definitionName': {
676
+ // equal to valueDefinitions[].name
632
677
  isCreateable: null,
633
678
  isUpdateable: null,
634
- retrieving: true,
679
+ retrieving: false,
635
680
  template: null,
636
681
  },
637
682
  'valueDefinitions[].description': {
@@ -641,15 +686,17 @@ module.exports = {
641
686
  template: null,
642
687
  },
643
688
  'valueDefinitions[].displayOrder': {
689
+ // merely a numeric counter; equal to valueDefinitions[].ordinal; not given for isHidden:true entries
644
690
  isCreateable: null,
645
691
  isUpdateable: null,
646
- retrieving: true,
692
+ retrieving: false,
647
693
  template: null,
648
694
  },
649
695
  'valueDefinitions[].fullyQualifiedName': {
696
+ // dataExtension name + field name
650
697
  isCreateable: null,
651
698
  isUpdateable: null,
652
- retrieving: true,
699
+ retrieving: false,
653
700
  template: null,
654
701
  },
655
702
  'valueDefinitions[].identifierType': {
@@ -706,10 +753,11 @@ module.exports = {
706
753
  retrieving: true,
707
754
  template: null,
708
755
  },
709
- 'valueDefinitions[].localizedDescription.value': {
756
+ 'valueDefinitions[].localizedDescription': {
757
+ // always equal to { value: "" }
710
758
  isCreateable: null,
711
759
  isUpdateable: null,
712
- retrieving: true,
760
+ retrieving: false,
713
761
  template: null,
714
762
  },
715
763
  'valueDefinitions[].name': {
@@ -718,6 +766,13 @@ module.exports = {
718
766
  retrieving: true,
719
767
  template: null,
720
768
  },
769
+ 'valueDefinitions[].obfuscationProperties': {
770
+ // might become relevant when fields are encrypted but for most cases we should simply skip it
771
+ isCreateable: null,
772
+ isUpdateable: null,
773
+ retrieving: false,
774
+ template: null,
775
+ },
721
776
  'valueDefinitions[].obfuscationProperties.maskType': {
722
777
  isCreateable: null,
723
778
  isUpdateable: null,
@@ -749,9 +804,10 @@ module.exports = {
749
804
  template: null,
750
805
  },
751
806
  'valueDefinitions[].ordinal': {
807
+ // merely a numeric counter; equal to valueDefinitions[].displayOrder; not given for isHidden:true entries
752
808
  isCreateable: null,
753
809
  isUpdateable: null,
754
- retrieving: true,
810
+ retrieving: false,
755
811
  template: null,
756
812
  },
757
813
  'valueDefinitions[].parentDefinition': {
@@ -767,9 +823,10 @@ module.exports = {
767
823
  template: null,
768
824
  },
769
825
  'valueDefinitions[].parentType': {
826
+ // always "Set"
770
827
  isCreateable: null,
771
828
  isUpdateable: null,
772
- retrieving: true,
829
+ retrieving: false,
773
830
  template: null,
774
831
  },
775
832
  'valueDefinitions[].restrictionLookupListID': {
@@ -796,37 +853,60 @@ module.exports = {
796
853
  retrieving: false,
797
854
  template: null,
798
855
  },
799
- 'valueDefinitions[].setDefinitionName.value': {
856
+ 'valueDefinitions[].setDefinitionName': {
857
+ isCreateable: null,
858
+ isUpdateable: null,
859
+ retrieving: false,
860
+ template: null,
861
+ },
862
+ 'valueDefinitions[].storageFieldReferenceID': {
800
863
  isCreateable: null,
801
864
  isUpdateable: null,
802
865
  retrieving: false,
803
866
  template: null,
804
867
  },
805
868
  'valueDefinitions[].storageFieldReferenceID.type': {
869
+ // always "guid"
806
870
  isCreateable: null,
807
871
  isUpdateable: null,
808
872
  retrieving: true,
809
873
  template: null,
810
874
  },
811
875
  'valueDefinitions[].storageFieldReferenceID.value': {
876
+ // unknown GUID
812
877
  isCreateable: null,
813
878
  isUpdateable: null,
814
879
  retrieving: true,
815
880
  template: null,
816
881
  },
817
882
  'valueDefinitions[].storageName': {
883
+ // always equal valueDefinitions[].definitionKey, except for when that is CustomObjectKey - then this will be _CustomObjectKey (with an underscore)
818
884
  isCreateable: null,
819
885
  isUpdateable: null,
820
- retrieving: true,
886
+ retrieving: false,
821
887
  template: null,
822
888
  },
823
889
  'valueDefinitions[].valueDefinitionID': {
890
+ // equal to valueDefinitions[].definitionID
824
891
  isCreateable: null,
825
892
  isUpdateable: null,
826
- retrieving: true,
893
+ retrieving: false,
827
894
  template: null,
828
895
  },
829
896
  'valueDefinitions[].valueDefinitionKey': {
897
+ // equal to valueDefinitions[].definitionKey
898
+ isCreateable: null,
899
+ isUpdateable: null,
900
+ retrieving: false,
901
+ template: null,
902
+ },
903
+ r__folder_Path: {
904
+ isCreateable: null,
905
+ isUpdateable: null,
906
+ retrieving: true,
907
+ template: null,
908
+ },
909
+ r__dataExtension_CustomerKey: {
830
910
  isCreateable: null,
831
911
  isUpdateable: null,
832
912
  retrieving: true,
@@ -31,6 +31,7 @@ module.exports = {
31
31
  'importFile',
32
32
  'query',
33
33
  'script',
34
+ 'verification',
34
35
  ],
35
36
  folderType: 'automation',
36
37
  hasExtended: false,
@@ -42,12 +43,19 @@ module.exports = {
42
43
  keyField: 'key',
43
44
  nameField: 'name',
44
45
  folderIdField: 'categoryId',
45
- createdDateField: 'createdDate',
46
- createdNameField: 'createdByName',
47
- lastmodDateField: 'lastSavedDate',
48
- lastmodNameField: 'lastSavedByName',
46
+ createdDateField: 'createdDate', // only returned by upsert
47
+ createdNameField: 'createdByName', // only returned by upsert
48
+ lastmodDateField: 'lastSavedDate', // only returned by upsert
49
+ lastmodNameField: 'lastSavedByName', // only returned by upsert
49
50
  restPagination: true,
50
51
  maxKeyLength: 200, // confirmed max length
52
+ scheduleTypeMapping: {
53
+ MINUTELY: 1,
54
+ HOURLY: 2,
55
+ DAILY: 3,
56
+ WEEKLY: 4,
57
+ MONTHLY: 5,
58
+ },
51
59
  statusMapping: {
52
60
  AwaitingTrigger: 7,
53
61
  Building: 1,
@@ -336,31 +344,31 @@ module.exports = {
336
344
  lastSavedDate: {
337
345
  isCreateable: false,
338
346
  isUpdateable: false,
339
- retrieving: true,
347
+ retrieving: false, // only returned by upsert
340
348
  template: false,
341
349
  },
342
350
  lastSavedByName: {
343
351
  isCreateable: false,
344
352
  isUpdateable: false,
345
- retrieving: true,
353
+ retrieving: false, // only returned by upsert
346
354
  template: false,
347
355
  },
348
356
  createdDate: {
349
357
  isCreateable: false,
350
358
  isUpdateable: false,
351
- retrieving: true,
359
+ retrieving: false, // only returned by upsert
352
360
  template: false,
353
361
  },
354
362
  createdByName: {
355
363
  isCreateable: false,
356
364
  isUpdateable: false,
357
- retrieving: true,
365
+ retrieving: false, // only returned by upsertt
358
366
  template: false,
359
367
  },
360
368
  updateInProgress: {
361
369
  isCreateable: false,
362
370
  isUpdateable: false,
363
- retrieving: true,
371
+ retrieving: false,
364
372
  template: false,
365
373
  },
366
374
  name: {
@@ -474,8 +482,8 @@ module.exports = {
474
482
  'schedule.timezoneId': {
475
483
  isCreateable: true,
476
484
  isUpdateable: true,
477
- retrieving: true,
478
- template: true,
485
+ retrieving: false,
486
+ template: false,
479
487
  },
480
488
  'schedule.timezoneName': {
481
489
  isCreateable: true,
@@ -484,10 +492,10 @@ module.exports = {
484
492
  template: true,
485
493
  },
486
494
  'schedule.typeId': {
487
- isCreateable: true,
488
- isUpdateable: true,
489
- retrieving: true,
490
- template: true,
495
+ isCreateable: false,
496
+ isUpdateable: false,
497
+ retrieving: false,
498
+ template: false,
491
499
  },
492
500
  status: {
493
501
  isCreateable: true,
@@ -222,11 +222,41 @@ module.exports = {
222
222
  retrieving: true,
223
223
  template: true,
224
224
  },
225
- c__dataAction: { skipValidation: true },
226
- r__dataExtension_CustomerKey: { skipValidation: true },
227
- c__destinationType: { skipValidation: true },
228
- r__list_PathName: { skipValidation: true },
229
- r__fileLocation_name: { skipValidation: true },
230
- c__subscriberImportType: { skipValidation: true },
225
+ c__dataAction: {
226
+ isCreateable: false,
227
+ isUpdateable: false,
228
+ retrieving: true,
229
+ template: true,
230
+ },
231
+ r__dataExtension_CustomerKey: {
232
+ isCreateable: false,
233
+ isUpdateable: false,
234
+ retrieving: true,
235
+ template: true,
236
+ },
237
+ c__destinationType: {
238
+ isCreateable: false,
239
+ isUpdateable: false,
240
+ retrieving: true,
241
+ template: true,
242
+ },
243
+ r__list_PathName: {
244
+ isCreateable: false,
245
+ isUpdateable: false,
246
+ retrieving: true,
247
+ template: true,
248
+ },
249
+ r__fileLocation_name: {
250
+ isCreateable: false,
251
+ isUpdateable: false,
252
+ retrieving: true,
253
+ template: true,
254
+ },
255
+ c__subscriberImportType: {
256
+ isCreateable: false,
257
+ isUpdateable: false,
258
+ retrieving: true,
259
+ template: true,
260
+ },
231
261
  },
232
262
  };
@@ -83,6 +83,12 @@ module.exports = {
83
83
  retrieving: true,
84
84
  template: true,
85
85
  },
86
+ 'subscriptions.r__dataExtension_CustomerKey': {
87
+ isCreateable: false,
88
+ isUpdateable: false,
89
+ retrieving: true,
90
+ template: true,
91
+ },
86
92
  'subscriptions.list': {
87
93
  isCreateable: true,
88
94
  isUpdateable: true,
@@ -127,7 +133,7 @@ module.exports = {
127
133
  },
128
134
  'options.createJourney': {
129
135
  isCreateable: true,
130
- isUpdateable: true,
136
+ isUpdateable: false,
131
137
  retrieving: false,
132
138
  template: false,
133
139
  },
@@ -143,5 +149,17 @@ module.exports = {
143
149
  retrieving: true,
144
150
  template: true,
145
151
  },
152
+ r__asset_customerKey: {
153
+ isCreateable: false,
154
+ isUpdateable: false,
155
+ retrieving: true,
156
+ template: true,
157
+ },
158
+ r__journey_key: {
159
+ isCreateable: false,
160
+ isUpdateable: false,
161
+ retrieving: true,
162
+ template: true,
163
+ },
146
164
  },
147
165
  };
@@ -535,6 +535,7 @@ module.exports = {
535
535
  r__folder_Path: { skipValidation: true },
536
536
  r__assetMessage_Name_readOnly: { skipValidation: true },
537
537
  r__assetMessage_Key: { skipValidation: true },
538
+ r__email_Name: { skipValidation: true },
538
539
  r__list_PathName: { skipValidation: true },
539
540
  },
540
541
  };
@@ -0,0 +1,88 @@
1
+ module.exports = {
2
+ bodyIteratorField: 'items',
3
+ dependencies: ['dataExtension'],
4
+ hasExtended: false,
5
+ idField: 'dataVerificationDefinitionId',
6
+ keyIsFixed: true,
7
+ keyField: 'dataVerificationDefinitionId',
8
+ createdDateField: null,
9
+ createdNameField: 'createdBy',
10
+ lastmodDateField: null,
11
+ lastmodNameField: null,
12
+ nameField: 'dataVerificationDefinitionId',
13
+ restPagination: false,
14
+ maxKeyLength: 36, // confirmed max length
15
+ type: 'verification',
16
+ typeDescription: 'Check DataExtension for a row count',
17
+ typeRetrieveByDefault: true,
18
+ typeName: 'Automation: Verification Activity',
19
+ fields: {
20
+ createdBy: {
21
+ // User ID
22
+ isCreateable: false,
23
+ isUpdateable: false,
24
+ retrieving: false,
25
+ template: false,
26
+ },
27
+ dataVerificationDefinitionId: {
28
+ isCreateable: false, // auto-assigned during creation by SFMC
29
+ isUpdateable: true,
30
+ retrieving: true,
31
+ template: true,
32
+ },
33
+ notificationEmailAddress: {
34
+ isCreateable: true,
35
+ isUpdateable: true,
36
+ retrieving: true,
37
+ template: true,
38
+ },
39
+ notificationEmailMessage: {
40
+ isCreateable: true,
41
+ isUpdateable: true,
42
+ retrieving: true,
43
+ template: true,
44
+ },
45
+ shouldEmailOnFailure: {
46
+ isCreateable: true,
47
+ isUpdateable: true,
48
+ retrieving: true,
49
+ template: true,
50
+ },
51
+ shouldStopOnFailure: {
52
+ isCreateable: true,
53
+ isUpdateable: true,
54
+ retrieving: true,
55
+ template: true,
56
+ },
57
+ targetObjectId: {
58
+ isCreateable: true,
59
+ isUpdateable: true,
60
+ retrieving: true,
61
+ template: true,
62
+ },
63
+ value1: {
64
+ isCreateable: true,
65
+ isUpdateable: true,
66
+ retrieving: true,
67
+ template: true,
68
+ },
69
+ value2: {
70
+ isCreateable: true,
71
+ isUpdateable: true,
72
+ retrieving: true,
73
+ template: true,
74
+ },
75
+ verificationType: {
76
+ isCreateable: true,
77
+ isUpdateable: true,
78
+ retrieving: true,
79
+ template: true,
80
+ },
81
+ r__dataExtension_CustomerKey: {
82
+ isCreateable: false,
83
+ isUpdateable: false,
84
+ retrieving: true,
85
+ template: true,
86
+ },
87
+ },
88
+ };
package/lib/util/cache.js CHANGED
@@ -72,10 +72,15 @@ module.exports = {
72
72
  * @returns {void}
73
73
  */
74
74
  mergeMetadata: (type, metadataMap, overrideMID) => {
75
- dataStore[overrideMID || currentMID][type] = Object.assign(
76
- metadataMap,
77
- dataStore[currentMID][type]
78
- );
75
+ // ensure cache exists for type
76
+ dataStore[currentMID][type] ||= {};
77
+ // if overrideMID is provided, create a copy of current MID cache
78
+ if (overrideMID) {
79
+ // ! needs to be verified if this is actually needed. When discovering an issue with this method actually overriting metadataMap, this copy-logic was present and i did not want to break things
80
+ dataStore[overrideMID][type] = Object.assign({}, dataStore[currentMID][type]);
81
+ }
82
+ // merge metadataMap into existing cache
83
+ Object.assign(dataStore[overrideMID || currentMID][type] || {}, metadataMap);
79
84
  },
80
85
  /**
81
86
  * standardized method for getting data from cache.