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
@@ -1,238 +1,249 @@
1
1
  module.exports = {
2
2
  bodyIteratorField: 'attributeGroupDefinitions',
3
- dependencies: [], // future may have dependency on Data Extensions
3
+ dependencies: ['attributeSet'], // future may have dependency on Data Extensions
4
4
  hasExtended: false,
5
5
  idField: 'definitionID',
6
6
  keyIsFixed: null,
7
7
  keyField: 'definitionKey',
8
8
  nameField: 'definitionName.value',
9
- restPagination: false,
9
+ restPagination: false, // Hub API does not support pagination and returns everything instead
10
10
  type: 'attributeGroup',
11
11
  typeDescription: 'BETA: Groupings of Set Definitions (Data Extensions) in Data Designer.',
12
12
  typeRetrieveByDefault: false,
13
13
  typeName: 'Data Designer Attribute Groups',
14
14
  fields: {
15
15
  applicationID: {
16
- isCreateable: null,
17
- isUpdateable: null,
18
- retrieving: true,
19
- template: null,
16
+ // used by system generated attribute groups only; contains UUID
17
+ isCreateable: false,
18
+ isUpdateable: false,
19
+ retrieving: false,
20
+ template: false,
20
21
  },
21
22
  applicationKey: {
22
- isCreateable: null,
23
- isUpdateable: null,
23
+ // used by system generated attribute groups only
24
+ isCreateable: false,
25
+ isUpdateable: false,
24
26
  retrieving: true,
25
- template: null,
27
+ template: false,
26
28
  },
27
29
  attributeCount: {
28
- isCreateable: null,
29
- isUpdateable: null,
30
+ // auto-populated
31
+ isCreateable: false,
32
+ isUpdateable: false,
30
33
  retrieving: true,
31
- template: null,
34
+ template: false,
32
35
  },
33
36
  attributeGroupIconKey: {
34
- isCreateable: null,
35
- isUpdateable: null,
37
+ isCreateable: true,
38
+ isUpdateable: true,
36
39
  retrieving: true,
37
- template: null,
40
+ template: true,
38
41
  },
39
42
  attributeGroupType: {
40
- isCreateable: null,
41
- isUpdateable: null,
43
+ isCreateable: true,
44
+ isUpdateable: true,
42
45
  retrieving: true,
43
- template: null,
46
+ template: true,
44
47
  },
45
48
  attributeSetIdentifiers: {
46
- isCreateable: null,
47
- isUpdateable: null,
49
+ isCreateable: true,
50
+ isUpdateable: true,
48
51
  retrieving: true,
49
- template: null,
52
+ template: true,
50
53
  },
51
54
  'attributeSetIdentifiers[].connectingID.identifierType': {
52
55
  isCreateable: null,
53
56
  isUpdateable: null,
54
- retrieving: false,
55
- template: null,
57
+ retrieving: true,
58
+ template: false,
56
59
  },
57
60
  'attributeSetIdentifiers[].definitionID': {
58
61
  isCreateable: null,
59
62
  isUpdateable: null,
60
63
  retrieving: true,
61
- template: null,
64
+ template: false,
62
65
  },
63
66
  'attributeSetIdentifiers[].definitionKey': {
64
67
  isCreateable: null,
65
68
  isUpdateable: null,
66
69
  retrieving: true,
67
- template: null,
70
+ template: true,
68
71
  },
69
- 'attributeSetIdentifiers[].definitionName.Contact': {
72
+ 'attributeSetIdentifiers[].definitionName.value': {
70
73
  isCreateable: null,
71
74
  isUpdateable: null,
72
75
  retrieving: true,
73
- template: null,
76
+ template: false,
74
77
  },
75
78
  'attributeSetIdentifiers[].namespace': {
76
79
  isCreateable: null,
77
80
  isUpdateable: null,
78
81
  retrieving: false,
79
- template: null,
82
+ template: false,
80
83
  },
81
84
  canAddProperties: {
82
- isCreateable: null,
83
- isUpdateable: null,
85
+ isCreateable: true,
86
+ isUpdateable: true,
84
87
  retrieving: true,
85
- template: null,
88
+ template: true,
86
89
  },
87
90
  canAddRelationships: {
88
- isCreateable: null,
89
- isUpdateable: null,
91
+ isCreateable: true,
92
+ isUpdateable: true,
90
93
  retrieving: true,
91
- template: null,
94
+ template: true,
92
95
  },
93
96
  canChangeProperties: {
94
- isCreateable: null,
95
- isUpdateable: null,
97
+ isCreateable: true,
98
+ isUpdateable: true,
96
99
  retrieving: true,
97
- template: null,
100
+ template: true,
98
101
  },
99
102
  canModify: {
100
- isCreateable: null,
101
- isUpdateable: null,
103
+ isCreateable: true,
104
+ isUpdateable: true,
102
105
  retrieving: true,
103
- template: null,
106
+ template: true,
104
107
  },
105
108
  canRemove: {
106
- isCreateable: null,
107
- isUpdateable: null,
109
+ isCreateable: true,
110
+ isUpdateable: true,
108
111
  retrieving: true,
109
- template: null,
112
+ template: true,
110
113
  },
111
114
  connectingID: {
112
- isCreateable: null,
113
- isUpdateable: null,
114
- retrieving: false,
115
- template: null,
115
+ isCreateable: true,
116
+ isUpdateable: true,
117
+ retrieving: true,
118
+ template: true,
116
119
  },
117
120
  'connectingID.identifierType': {
118
- isCreateable: null,
119
- isUpdateable: null,
120
- retrieving: false,
121
- template: null,
121
+ isCreateable: true,
122
+ isUpdateable: true,
123
+ retrieving: true,
124
+ template: true,
122
125
  },
123
126
  containsSchemaAttributes: {
124
- isCreateable: null,
125
- isUpdateable: null,
127
+ isCreateable: true,
128
+ isUpdateable: true,
126
129
  retrieving: true,
127
- template: null,
130
+ template: true,
128
131
  },
129
132
  definitionID: {
130
- isCreateable: null,
131
- isUpdateable: null,
133
+ isCreateable: true,
134
+ isUpdateable: true,
132
135
  retrieving: true,
133
- template: null,
136
+ template: false,
134
137
  },
135
138
  definitionKey: {
136
- isCreateable: null,
137
- isUpdateable: null,
139
+ isCreateable: true,
140
+ isUpdateable: true,
138
141
  retrieving: true,
139
- template: null,
142
+ template: true,
140
143
  },
141
144
  'definitionName.value': {
142
- isCreateable: null,
143
- isUpdateable: null,
145
+ isCreateable: true,
146
+ isUpdateable: true,
144
147
  retrieving: true,
145
- template: null,
148
+ template: true,
146
149
  },
147
150
  description: {
148
- isCreateable: null,
149
- isUpdateable: null,
151
+ // optional field. not returned by API if empty
152
+ isCreateable: true,
153
+ isUpdateable: true,
150
154
  retrieving: true,
151
- template: null,
155
+ template: true,
152
156
  },
153
157
  displayOrder: {
154
- isCreateable: null,
155
- isUpdateable: null,
158
+ // auto-set to i+1
159
+ isCreateable: false,
160
+ isUpdateable: false,
156
161
  retrieving: true,
157
- template: null,
162
+ template: false,
158
163
  },
159
164
  fullyQualifiedName: {
160
- isCreateable: null,
161
- isUpdateable: null,
162
- retrieving: true,
163
- template: null,
165
+ // equal to defitionName.value; auto-populated by preDeployTasks
166
+ isCreateable: true,
167
+ isUpdateable: true,
168
+ retrieving: false,
169
+ template: false,
164
170
  },
165
171
  isHidden: {
166
- isCreateable: null,
167
- isUpdateable: null,
172
+ isCreateable: true,
173
+ isUpdateable: true,
168
174
  retrieving: true,
169
- template: null,
175
+ template: true,
170
176
  },
171
177
  isOwner: {
172
- isCreateable: null,
173
- isUpdateable: null,
178
+ isCreateable: true,
179
+ isUpdateable: true,
174
180
  retrieving: true,
175
- template: null,
181
+ template: true,
176
182
  },
177
183
  isPrimary: {
178
- isCreateable: null,
179
- isUpdateable: null,
180
- retrieving: true,
181
- template: null,
184
+ // always false, purpose unknown
185
+ isCreateable: false,
186
+ isUpdateable: false,
187
+ retrieving: false,
188
+ template: false,
182
189
  },
183
190
  isSystemDefined: {
184
- isCreateable: null,
185
- isUpdateable: null,
191
+ isCreateable: false,
192
+ isUpdateable: false,
186
193
  retrieving: true,
187
- template: null,
194
+ template: false,
188
195
  },
189
196
  localizedDescription: {
190
- isCreateable: null,
191
- isUpdateable: null,
192
- retrieving: true,
193
- template: null,
197
+ // always an empty object
198
+ isCreateable: false,
199
+ isUpdateable: false,
200
+ retrieving: false,
201
+ template: false,
194
202
  },
195
203
  'localizedDescription.resourceSetKey': {
196
204
  isCreateable: null,
197
205
  isUpdateable: null,
198
206
  retrieving: true,
199
- template: null,
207
+ template: true,
200
208
  },
201
209
  'localizedDescription.resourceValueKey': {
202
210
  isCreateable: null,
203
211
  isUpdateable: null,
204
212
  retrieving: true,
205
- template: null,
213
+ template: true,
206
214
  },
207
215
  'localizedDescription.value': {
208
216
  isCreateable: null,
209
217
  isUpdateable: null,
210
218
  retrieving: true,
211
- template: null,
219
+ template: true,
212
220
  },
213
221
  mID: {
214
- isCreateable: null,
215
- isUpdateable: null,
222
+ // auto-populated in preDeployTask
223
+ isCreateable: true,
224
+ isUpdateable: true,
216
225
  retrieving: true,
217
- template: null,
226
+ template: true,
218
227
  },
219
228
  namespace: {
220
- isCreateable: null,
221
- isUpdateable: null,
229
+ // always an empty string
230
+ isCreateable: false,
231
+ isUpdateable: false,
222
232
  retrieving: false,
223
- template: null,
233
+ template: false,
224
234
  },
225
235
  objectState: {
226
- isCreateable: null,
227
- isUpdateable: null,
228
- retrieving: true,
229
- template: null,
236
+ // seems to always contain "Created"
237
+ isCreateable: false,
238
+ isUpdateable: false,
239
+ retrieving: false,
240
+ template: false,
230
241
  },
231
242
  requiredRelationships: {
232
- isCreateable: null,
233
- isUpdateable: null,
243
+ isCreateable: true,
244
+ isUpdateable: true,
234
245
  retrieving: true,
235
- template: null,
246
+ template: true,
236
247
  },
237
248
  },
238
249
  };
@@ -1,17 +1,18 @@
1
1
  module.exports = {
2
2
  bodyIteratorField: 'setDefinition',
3
- dependencies: [], // future may have dependency on Data Extensions
3
+ dependencies: ['folder-hidden', 'folder-dataextension', 'dataExtension'], // future may have dependency on Data Extensions
4
4
  hasExtended: false,
5
5
  idField: 'definitionID',
6
6
  keyIsFixed: null,
7
7
  keyField: 'definitionKey',
8
8
  nameField: 'name',
9
+ folderIdField: 'categoryID',
9
10
  createdDateField: 'createDate',
10
11
  createdNameField: 'createdBy',
11
12
  lastmodDateField: null,
12
13
  lastmodNameField: null,
13
- restPagination: false,
14
- type: 'setDefinition',
14
+ restPagination: false, // Hub API does not support pagination and returns everything instead
15
+ type: 'attributeSet',
15
16
  typeDescription: 'BETA: Data Extensions linked to Attribute Groups in Data Designer.',
16
17
  typeRetrieveByDefault: false,
17
18
  typeName: 'Data Designer Set Definitions',
@@ -65,10 +66,10 @@ module.exports = {
65
66
  template: null,
66
67
  },
67
68
  'connectingID.identifierType': {
68
- isCreateable: null,
69
- isUpdateable: null,
70
- retrieving: true,
71
- template: null,
69
+ isCreateable: true,
70
+ isUpdateable: true,
71
+ retrieving: false,
72
+ template: false,
72
73
  },
73
74
  createDate: {
74
75
  isCreateable: null,
@@ -130,17 +131,25 @@ module.exports = {
130
131
  retrieving: true,
131
132
  template: null,
132
133
  },
134
+ definitionName: {
135
+ isCreateable: true,
136
+ isUpdateable: true,
137
+ retrieving: false,
138
+ template: false,
139
+ },
133
140
  'definitionName.value': {
134
- isCreateable: null,
135
- isUpdateable: null,
136
- retrieving: true,
137
- template: null,
141
+ // equal to 'name'; auto-populated by preDeployTasks
142
+ isCreateable: true,
143
+ isUpdateable: true,
144
+ retrieving: false,
145
+ template: false,
138
146
  },
139
147
  fullyQualifiedName: {
140
- isCreateable: null,
141
- isUpdateable: null,
142
- retrieving: true,
143
- template: null,
148
+ // equal to 'name'; auto-populated by preDeployTasks
149
+ isCreateable: true,
150
+ isUpdateable: true,
151
+ retrieving: false,
152
+ template: false,
144
153
  },
145
154
  isCustomObjectBacked: {
146
155
  isCreateable: null,
@@ -233,28 +242,28 @@ module.exports = {
233
242
  template: null,
234
243
  },
235
244
  localizedDescription: {
236
- isCreateable: null,
237
- isUpdateable: null,
245
+ isCreateable: true,
246
+ isUpdateable: true,
238
247
  retrieving: true,
239
- template: null,
248
+ template: true,
240
249
  },
241
250
  'localizedDescription.resourceSetKey': {
242
- isCreateable: null,
243
- isUpdateable: null,
251
+ isCreateable: true,
252
+ isUpdateable: true,
244
253
  retrieving: true,
245
- template: null,
254
+ template: true,
246
255
  },
247
256
  'localizedDescription.resourceValueKey': {
248
- isCreateable: null,
249
- isUpdateable: null,
257
+ isCreateable: true,
258
+ isUpdateable: true,
250
259
  retrieving: true,
251
- template: null,
260
+ template: true,
252
261
  },
253
262
  'localizedDescription.value': {
254
- isCreateable: null,
255
- isUpdateable: null,
263
+ isCreateable: true,
264
+ isUpdateable: true,
256
265
  retrieving: true,
257
- template: null,
266
+ template: true,
258
267
  },
259
268
  name: {
260
269
  isCreateable: null,
@@ -436,6 +445,18 @@ module.exports = {
436
445
  retrieving: true,
437
446
  template: null,
438
447
  },
448
+ 'relationships[].relationshipAttributes[].c__leftFullyQualifiedName': {
449
+ isCreateable: null,
450
+ isUpdateable: null,
451
+ retrieving: true,
452
+ template: null,
453
+ },
454
+ 'relationships[].relationshipAttributes[].c__rightFullyQualifiedName': {
455
+ isCreateable: null,
456
+ isUpdateable: null,
457
+ retrieving: true,
458
+ template: null,
459
+ },
439
460
  'relationships[].relationshipID': {
440
461
  isCreateable: null,
441
462
  isUpdateable: null,
@@ -832,5 +853,11 @@ module.exports = {
832
853
  retrieving: true,
833
854
  template: null,
834
855
  },
856
+ r__folder_Path: {
857
+ isCreateable: null,
858
+ isUpdateable: null,
859
+ retrieving: true,
860
+ template: null,
861
+ },
835
862
  },
836
863
  };
@@ -42,12 +42,19 @@ module.exports = {
42
42
  keyField: 'key',
43
43
  nameField: 'name',
44
44
  folderIdField: 'categoryId',
45
- createdDateField: 'createdDate',
46
- createdNameField: 'createdByName',
47
- lastmodDateField: 'lastSavedDate',
48
- lastmodNameField: 'lastSavedByName',
45
+ createdDateField: 'createdDate', // only returned by upsert
46
+ createdNameField: 'createdByName', // only returned by upsert
47
+ lastmodDateField: 'lastSavedDate', // only returned by upsert
48
+ lastmodNameField: 'lastSavedByName', // only returned by upsert
49
49
  restPagination: true,
50
50
  maxKeyLength: 200, // confirmed max length
51
+ scheduleTypeMapping: {
52
+ MINUTELY: 1,
53
+ HOURLY: 2,
54
+ DAILY: 3,
55
+ WEEKLY: 4,
56
+ MONTHLY: 5,
57
+ },
51
58
  statusMapping: {
52
59
  AwaitingTrigger: 7,
53
60
  Building: 1,
@@ -336,31 +343,31 @@ module.exports = {
336
343
  lastSavedDate: {
337
344
  isCreateable: false,
338
345
  isUpdateable: false,
339
- retrieving: true,
346
+ retrieving: false, // only returned by upsert
340
347
  template: false,
341
348
  },
342
349
  lastSavedByName: {
343
350
  isCreateable: false,
344
351
  isUpdateable: false,
345
- retrieving: true,
352
+ retrieving: false, // only returned by upsert
346
353
  template: false,
347
354
  },
348
355
  createdDate: {
349
356
  isCreateable: false,
350
357
  isUpdateable: false,
351
- retrieving: true,
358
+ retrieving: false, // only returned by upsert
352
359
  template: false,
353
360
  },
354
361
  createdByName: {
355
362
  isCreateable: false,
356
363
  isUpdateable: false,
357
- retrieving: true,
364
+ retrieving: false, // only returned by upsertt
358
365
  template: false,
359
366
  },
360
367
  updateInProgress: {
361
368
  isCreateable: false,
362
369
  isUpdateable: false,
363
- retrieving: true,
370
+ retrieving: false,
364
371
  template: false,
365
372
  },
366
373
  name: {
@@ -474,8 +481,8 @@ module.exports = {
474
481
  'schedule.timezoneId': {
475
482
  isCreateable: true,
476
483
  isUpdateable: true,
477
- retrieving: true,
478
- template: true,
484
+ retrieving: false,
485
+ template: false,
479
486
  },
480
487
  'schedule.timezoneName': {
481
488
  isCreateable: true,
@@ -484,10 +491,10 @@ module.exports = {
484
491
  template: true,
485
492
  },
486
493
  'schedule.typeId': {
487
- isCreateable: true,
488
- isUpdateable: true,
489
- retrieving: true,
490
- template: true,
494
+ isCreateable: false,
495
+ isUpdateable: false,
496
+ retrieving: false,
497
+ template: false,
491
498
  },
492
499
  status: {
493
500
  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
  };
@@ -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
  };
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.