mcdev 5.3.0 → 6.0.1

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 (135) hide show
  1. package/.eslintrc.json +1 -1
  2. package/.github/ISSUE_TEMPLATE/bug.yml +2 -0
  3. package/.github/workflows/code-test.yml +2 -2
  4. package/.github/workflows/coverage-base-update.yml +3 -3
  5. package/.github/workflows/coverage-develop-branch.yml +3 -3
  6. package/.github/workflows/coverage-main-branch.yml +3 -3
  7. package/.github/workflows/coverage.yml +4 -4
  8. package/.github/workflows/npm-publish.yml +4 -4
  9. package/.prettierrc +7 -0
  10. package/docs/dist/documentation.md +9 -494
  11. package/jsconfig.json +5 -1
  12. package/lib/Builder.js +8 -8
  13. package/lib/Deployer.js +10 -10
  14. package/lib/MetadataTypeDefinitions.js +73 -39
  15. package/lib/MetadataTypeInfo.js +72 -38
  16. package/lib/Retriever.js +8 -8
  17. package/lib/cli.js +15 -15
  18. package/lib/index.js +24 -17
  19. package/lib/metadataTypes/Asset.js +12 -10
  20. package/lib/metadataTypes/AttributeGroup.js +7 -6
  21. package/lib/metadataTypes/AttributeSet.js +8 -7
  22. package/lib/metadataTypes/Automation.js +16 -16
  23. package/lib/metadataTypes/Campaign.js +7 -6
  24. package/lib/metadataTypes/ContentArea.js +7 -6
  25. package/lib/metadataTypes/DataExtension.js +16 -16
  26. package/lib/metadataTypes/DataExtensionField.js +6 -5
  27. package/lib/metadataTypes/DataExtensionTemplate.js +5 -4
  28. package/lib/metadataTypes/DataExtract.js +8 -7
  29. package/lib/metadataTypes/DataExtractType.js +5 -4
  30. package/lib/metadataTypes/Discovery.js +6 -5
  31. package/lib/metadataTypes/Email.js +6 -5
  32. package/lib/metadataTypes/EmailSend.js +7 -6
  33. package/lib/metadataTypes/Event.js +8 -7
  34. package/lib/metadataTypes/FileLocation.js +5 -4
  35. package/lib/metadataTypes/FileTransfer.js +8 -7
  36. package/lib/metadataTypes/Filter.js +5 -4
  37. package/lib/metadataTypes/Folder.js +9 -8
  38. package/lib/metadataTypes/ImportFile.js +8 -7
  39. package/lib/metadataTypes/Journey.js +9 -8
  40. package/lib/metadataTypes/List.js +9 -8
  41. package/lib/metadataTypes/MetadataType.js +37 -29
  42. package/lib/metadataTypes/MobileCode.js +5 -4
  43. package/lib/metadataTypes/MobileKeyword.js +8 -7
  44. package/lib/metadataTypes/MobileMessage.js +8 -7
  45. package/lib/metadataTypes/Query.js +9 -8
  46. package/lib/metadataTypes/Role.js +8 -7
  47. package/lib/metadataTypes/Script.js +7 -6
  48. package/lib/metadataTypes/SendClassification.js +5 -4
  49. package/lib/metadataTypes/TransactionalEmail.js +8 -7
  50. package/lib/metadataTypes/TransactionalMessage.js +6 -5
  51. package/lib/metadataTypes/TransactionalPush.js +7 -6
  52. package/lib/metadataTypes/TransactionalSMS.js +9 -8
  53. package/lib/metadataTypes/TriggeredSend.js +15 -12
  54. package/lib/metadataTypes/User.js +8 -7
  55. package/lib/metadataTypes/Verification.js +8 -8
  56. package/lib/metadataTypes/definitions/Asset.definition.js +1 -1
  57. package/lib/metadataTypes/definitions/AttributeGroup.definition.js +1 -1
  58. package/lib/metadataTypes/definitions/AttributeSet.definition.js +1 -1
  59. package/lib/metadataTypes/definitions/Automation.definition.js +1 -1
  60. package/lib/metadataTypes/definitions/Campaign.definition.js +1 -1
  61. package/lib/metadataTypes/definitions/ContentArea.definition.js +1 -1
  62. package/lib/metadataTypes/definitions/DataExtension.definition.js +1 -1
  63. package/lib/metadataTypes/definitions/DataExtensionField.definition.js +1 -1
  64. package/lib/metadataTypes/definitions/DataExtensionTemplate.definition.js +1 -1
  65. package/lib/metadataTypes/definitions/DataExtract.definition.js +1 -1
  66. package/lib/metadataTypes/definitions/DataExtractType.definition.js +1 -1
  67. package/lib/metadataTypes/definitions/Discovery.definition.js +1 -1
  68. package/lib/metadataTypes/definitions/Email.definition.js +1 -1
  69. package/lib/metadataTypes/definitions/EmailSend.definition.js +1 -1
  70. package/lib/metadataTypes/definitions/Event.definition.js +1 -1
  71. package/lib/metadataTypes/definitions/FileLocation.definition.js +1 -1
  72. package/lib/metadataTypes/definitions/FileTransfer.definition.js +1 -1
  73. package/lib/metadataTypes/definitions/Filter.definition.js +1 -1
  74. package/lib/metadataTypes/definitions/Folder.definition.js +1 -1
  75. package/lib/metadataTypes/definitions/ImportFile.definition.js +1 -1
  76. package/lib/metadataTypes/definitions/Journey.definition.js +1 -1
  77. package/lib/metadataTypes/definitions/List.definition.js +1 -1
  78. package/lib/metadataTypes/definitions/MobileCode.definition.js +1 -1
  79. package/lib/metadataTypes/definitions/MobileKeyword.definition.js +1 -1
  80. package/lib/metadataTypes/definitions/MobileMessage.definition.js +1 -1
  81. package/lib/metadataTypes/definitions/Query.definition.js +1 -1
  82. package/lib/metadataTypes/definitions/Role.definition.js +1 -1
  83. package/lib/metadataTypes/definitions/Script.definition.js +1 -1
  84. package/lib/metadataTypes/definitions/SendClassification.definition.js +1 -1
  85. package/lib/metadataTypes/definitions/TransactionalEmail.definition.js +1 -1
  86. package/lib/metadataTypes/definitions/TransactionalPush.definition.js +1 -1
  87. package/lib/metadataTypes/definitions/TransactionalSMS.definition.js +1 -1
  88. package/lib/metadataTypes/definitions/TriggeredSend.definition.js +1 -1
  89. package/lib/metadataTypes/definitions/User.definition.js +1 -1
  90. package/lib/metadataTypes/definitions/Verification.definition.js +1 -1
  91. package/lib/retrieveChangelog.js +4 -3
  92. package/lib/util/auth.js +11 -8
  93. package/lib/util/businessUnit.js +5 -5
  94. package/lib/util/cache.js +3 -3
  95. package/lib/util/cli.js +15 -13
  96. package/lib/util/config.js +10 -7
  97. package/lib/util/devops.js +12 -11
  98. package/lib/util/file.js +15 -14
  99. package/lib/util/init.config.js +11 -9
  100. package/lib/util/init.git.js +8 -7
  101. package/lib/util/init.js +12 -12
  102. package/lib/util/init.npm.js +11 -9
  103. package/lib/util/util.js +16 -14
  104. package/package.json +35 -30
  105. package/test/general.test.js +4 -6
  106. package/test/mockRoot/.mcdevrc.json +1 -1
  107. package/test/resourceFactory.js +55 -27
  108. package/test/resources/9999999/asset/block-1157-retrieve-expected.html +13 -0
  109. package/test/resources/9999999/asset/block-1157-retrieve-expected.json +41 -0
  110. package/test/resources/9999999/asset/v1/content/assets/1209971/get-response.json +61 -0
  111. package/test/resources/9999999/asset/v1/content/assets/1295064/get-response.json +60 -0
  112. package/test/resources/9999999/asset/v1/content/assets/808714/get-response.json +184 -0
  113. package/test/resources/9999999/asset/v1/content/assets/query/post-response.json +40 -2
  114. package/test/resources/9999999/dataFolder/retrieve-ContentType=asset-sharedORContentType=asset-response.xml +70 -0
  115. package/test/type.asset.test.js +84 -0
  116. package/test/type.attributeGroup.test.js +5 -8
  117. package/test/type.attributeSet.test.js +5 -8
  118. package/test/type.automation.test.js +5 -10
  119. package/test/type.dataExtension.test.js +5 -9
  120. package/test/type.dataExtract.test.js +5 -6
  121. package/test/type.fileTransfer.test.js +5 -6
  122. package/test/type.importFile.test.js +5 -6
  123. package/test/type.journey.test.js +5 -6
  124. package/test/type.mobileKeyword.test.js +5 -7
  125. package/test/type.mobileMessage.test.js +5 -7
  126. package/test/type.query.test.js +5 -8
  127. package/test/type.script.test.js +5 -8
  128. package/test/type.transactionalEmail.test.js +5 -6
  129. package/test/type.transactionalPush.test.js +5 -6
  130. package/test/type.transactionalSMS.test.js +5 -7
  131. package/test/type.triggeredSend.test.js +5 -6
  132. package/test/type.user.test.js +6 -8
  133. package/test/type.verification.test.js +5 -6
  134. package/test/utils.js +61 -47
  135. package/types/mcdev.d.js +2 -2
@@ -1,7 +1,7 @@
1
- const fs = require('fs-extra');
2
- const path = require('node:path');
3
- const { XMLParser } = require('fast-xml-parser');
4
- const Util = require('../lib/util/util');
1
+ import fs from 'fs-extra';
2
+ import path from 'node:path';
3
+ import { XMLParser } from 'fast-xml-parser';
4
+ import { Util } from '../lib/util/util.js';
5
5
  const parser = new XMLParser();
6
6
  const attributeParser = new XMLParser({ ignoreAttributes: false });
7
7
  let color;
@@ -40,11 +40,10 @@ if (
40
40
  * @param {object|string} filter likely for customer key
41
41
  * @returns {string} relevant metadata stringified
42
42
  */
43
- exports.loadSOAPRecords = async (mcdevAction, type, mid, filter) => {
43
+ async function loadSOAPRecords(mcdevAction, type, mid, filter) {
44
44
  type = type[0].toLowerCase() + type.slice(1);
45
45
  const testPath = path.join('test', 'resources', mid.toString(), type, mcdevAction);
46
- const filterPath =
47
- typeof filter === 'string' && filter ? '-' + filter : this.filterToPath(filter);
46
+ const filterPath = typeof filter === 'string' && filter ? '-' + filter : filterToPath(filter);
48
47
  if (await fs.pathExists(testPath + filterPath + '-response.xml')) {
49
48
  return fs.readFile(testPath + filterPath + '-response.xml', {
50
49
  encoding: 'utf8',
@@ -80,42 +79,66 @@ exports.loadSOAPRecords = async (mcdevAction, type, mid, filter) => {
80
79
  return fs.readFile(path.join('test', 'resources', mcdevAction + '-response.xml'), {
81
80
  encoding: 'utf8',
82
81
  });
83
- };
84
- exports.filterToPath = (filter) => {
82
+ }
83
+ /**
84
+ * main filter to path function
85
+ *
86
+ * @param {object} filter main filter object
87
+ * @param {string} filter.Property field name
88
+ * @param {string} filter.SimpleOperator string representation of the comparison method
89
+ * @param {string} filter.Value field value to check for
90
+ * @param {object} filter.LeftOperand contains a filter object itself
91
+ * @param {'AND'|'OR'} filter.LogicalOperator string representation of the comparison method
92
+ * @param {object} filter.RightOperand field value to check for
93
+ * @returns {string} string represenation of the entire filter
94
+ */
95
+ export function filterToPath(filter) {
85
96
  if (filter) {
86
- return '-' + this._filterToPath(filter);
97
+ return '-' + _filterToPath(filter);
87
98
  }
88
99
  return '';
89
- };
90
- exports._filterToPath = (filter) => {
100
+ }
101
+ /**
102
+ * helper for filterToPath
103
+ *
104
+ * @param {object} filter main filter object
105
+ * @param {string} filter.Property field name
106
+ * @param {string} filter.SimpleOperator string representation of the comparison method
107
+ * @param {string} filter.Value field value to check for
108
+ * @param {object} filter.LeftOperand contains a filter object itself
109
+ * @param {'AND'|'OR'} filter.LogicalOperator string representation of the comparison method
110
+ * @param {object} filter.RightOperand field value to check for
111
+ * @returns {string} string represenation of the entire filter
112
+ */
113
+ function _filterToPath(filter) {
91
114
  if (filter.Property && filter.SimpleOperator) {
92
115
  return `${filter.Property}${filter.SimpleOperator.replace('equals', '=')}${
93
116
  filter.Value === undefined ? '' : filter.Value
94
117
  }`;
95
118
  } else if (filter.LeftOperand && filter.LogicalOperator && filter.RightOperand) {
96
119
  return (
97
- this._filterToPath(filter.LeftOperand) +
120
+ _filterToPath(filter.LeftOperand) +
98
121
  filter.LogicalOperator +
99
- this._filterToPath(filter.RightOperand)
122
+ _filterToPath(filter.RightOperand)
100
123
  );
101
124
  } else {
102
125
  throw new Error('unknown filter type');
103
126
  }
104
- };
127
+ }
105
128
  /**
106
129
  * based on request, respond with different soap data
107
130
  *
108
131
  * @param {object} config mock api request object
109
132
  * @returns {Promise.<Array>} status code plus response in string form
110
133
  */
111
- exports.handleSOAPRequest = async (config) => {
134
+ export const handleSOAPRequest = async (config) => {
112
135
  const jObj = parser.parse(config.data);
113
136
  const fullObj = attributeParser.parse(config.data);
114
137
  let responseXML;
115
138
 
116
139
  switch (config.headers.SOAPAction) {
117
140
  case 'Retrieve': {
118
- responseXML = await this.loadSOAPRecords(
141
+ responseXML = await loadSOAPRecords(
119
142
  config.headers.SOAPAction.toLocaleLowerCase(),
120
143
  jObj.Envelope.Body.RetrieveRequestMsg.RetrieveRequest.ObjectType,
121
144
  jObj.Envelope.Header.fueloauth,
@@ -125,7 +148,7 @@ exports.handleSOAPRequest = async (config) => {
125
148
  break;
126
149
  }
127
150
  case 'Create': {
128
- responseXML = await this.loadSOAPRecords(
151
+ responseXML = await loadSOAPRecords(
129
152
  config.headers.SOAPAction.toLocaleLowerCase(),
130
153
  fullObj.Envelope.Body.CreateRequest.Objects['@_xsi:type'],
131
154
  jObj.Envelope.Header.fueloauth,
@@ -135,7 +158,7 @@ exports.handleSOAPRequest = async (config) => {
135
158
  break;
136
159
  }
137
160
  case 'Update': {
138
- responseXML = await this.loadSOAPRecords(
161
+ responseXML = await loadSOAPRecords(
139
162
  config.headers.SOAPAction.toLocaleLowerCase(),
140
163
  fullObj.Envelope.Body.UpdateRequest.Objects['@_xsi:type'],
141
164
  jObj.Envelope.Header.fueloauth,
@@ -145,7 +168,7 @@ exports.handleSOAPRequest = async (config) => {
145
168
  break;
146
169
  }
147
170
  case 'Configure': {
148
- responseXML = await this.loadSOAPRecords(
171
+ responseXML = await loadSOAPRecords(
149
172
  config.headers.SOAPAction.toLocaleLowerCase(),
150
173
  fullObj.Envelope.Body.ConfigureRequestMsg.Configurations.Configuration[0][
151
174
  '@_xsi:type'
@@ -157,7 +180,7 @@ exports.handleSOAPRequest = async (config) => {
157
180
  break;
158
181
  }
159
182
  case 'Delete': {
160
- responseXML = await this.loadSOAPRecords(
183
+ responseXML = await loadSOAPRecords(
161
184
  config.headers.SOAPAction.toLocaleLowerCase(),
162
185
  fullObj.Envelope.Body.DeleteRequest.Objects['@_xsi:type'],
163
186
  jObj.Envelope.Header.fueloauth,
@@ -167,7 +190,7 @@ exports.handleSOAPRequest = async (config) => {
167
190
  break;
168
191
  }
169
192
  case 'Schedule': {
170
- responseXML = await this.loadSOAPRecords(
193
+ responseXML = await loadSOAPRecords(
171
194
  config.headers.SOAPAction.toLocaleLowerCase(),
172
195
  fullObj.Envelope.Body.ScheduleRequestMsg.Interactions.Interaction['@_xsi:type'],
173
196
  jObj.Envelope.Header.fueloauth,
@@ -177,7 +200,7 @@ exports.handleSOAPRequest = async (config) => {
177
200
  break;
178
201
  }
179
202
  case 'Perform': {
180
- responseXML = await this.loadSOAPRecords(
203
+ responseXML = await loadSOAPRecords(
181
204
  config.headers.SOAPAction.toLocaleLowerCase(),
182
205
  fullObj.Envelope.Body.PerformRequestMsg.Definitions.Definition['@_xsi:type'],
183
206
  jObj.Envelope.Header.fueloauth,
@@ -195,12 +218,14 @@ exports.handleSOAPRequest = async (config) => {
195
218
 
196
219
  return [200, responseXML];
197
220
  };
221
+
198
222
  /**
199
223
  * helper to return soap base URL
200
224
  *
201
225
  * @returns {string} soap URL
202
226
  */
203
- exports.soapUrl = 'https://mct0l7nxfq2r988t1kxfy8sc4xxx.soap.marketingcloudapis.com/Service.asmx';
227
+ export const soapUrl =
228
+ 'https://mct0l7nxfq2r988t1kxfy8sc4xxx.soap.marketingcloudapis.com/Service.asmx';
204
229
 
205
230
  /**
206
231
  * based on request, respond with different soap data
@@ -208,10 +233,12 @@ exports.soapUrl = 'https://mct0l7nxfq2r988t1kxfy8sc4xxx.soap.marketingcloudapis.
208
233
  * @param {object} config mock api request object
209
234
  * @returns {Promise.<Array>} status code plus response in string form
210
235
  */
211
- exports.handleRESTRequest = async (config) => {
236
+ export const handleRESTRequest = async (config) => {
212
237
  try {
213
238
  // check if filtered
214
- const urlObj = new URL(config.baseURL + config.url.slice(1));
239
+ const urlObj = new URL(
240
+ config.baseURL + (config.url.startsWith('/') ? config.url.slice(1) : config.url)
241
+ );
215
242
  let filterName;
216
243
  if (urlObj.searchParams.get('$filter')) {
217
244
  filterName = urlObj.searchParams.get('$filter').split(' eq ')[1];
@@ -271,9 +298,10 @@ exports.handleRESTRequest = async (config) => {
271
298
  return [500, {}];
272
299
  }
273
300
  };
301
+
274
302
  /**
275
303
  * helper to return rest base URL
276
304
  *
277
305
  * @returns {string} test URL
278
306
  */
279
- exports.restUrl = 'https://mct0l7nxfq2r988t1kxfy8sc4xxx.rest.marketingcloudapis.com/';
307
+ export const restUrl = 'https://mct0l7nxfq2r988t1kxfy8sc4xxx.rest.marketingcloudapis.com/';
@@ -0,0 +1,13 @@
1
+ <table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="min-width: 100%; " class="stylingblock-content-wrapper"><tr><td class="stylingblock-content-wrapper camarker-inner"><div>
2
+ my 1st html
3
+ </div>
4
+ %%[
5
+ /* my ampscript */
6
+ ]%%
7
+ <script runat="server">
8
+ // my ssjs
9
+ </script>
10
+
11
+ <div>
12
+ my 2nd html
13
+ </div></td></tr></table>
@@ -0,0 +1,41 @@
1
+ {
2
+ "customerKey": "mcdev-issue-1157",
3
+ "assetType": {
4
+ "name": "htmlblock",
5
+ "displayName": "HTML Block"
6
+ },
7
+ "fileProperties": {
8
+ "fileName": "mcdev-issue-1157-Mcdev-strips-content"
9
+ },
10
+ "name": "mcdev-issue-1157-Mcdev-strips-content",
11
+ "owner": {
12
+ "email": "joern.berkefeld@accenture.com",
13
+ "name": "Jörn Berkefeld (ASGR)"
14
+ },
15
+ "createdDate": "2024-01-08T08:26:58.277-06:00",
16
+ "createdBy": {
17
+ "email": "joern.berkefeld@accenture.com",
18
+ "name": "Jörn Berkefeld (ASGR)"
19
+ },
20
+ "modifiedDate": "2024-01-08T08:28:01.6-06:00",
21
+ "modifiedBy": {
22
+ "email": "joern.berkefeld@accenture.com",
23
+ "name": "Jörn Berkefeld (ASGR)"
24
+ },
25
+ "memberId": 9999999,
26
+ "status": {
27
+ "name": "Draft"
28
+ },
29
+ "design": "",
30
+ "meta": {
31
+ "wrapperStyles": {
32
+ "mobile": {
33
+ "visible": true
34
+ },
35
+ "styling": {}
36
+ }
37
+ },
38
+ "availableViews": [],
39
+ "modelVersion": 2,
40
+ "r__folder_Path": "Content Builder"
41
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "customerKey": "mobileMessage_test",
3
+ "assetType": {
4
+ "name": "jsonmessage",
5
+ "displayName": "JSON Message"
6
+ },
7
+ "name": "Mobile Message November 22, 2021(4:20:55 PM)",
8
+ "owner": {
9
+ "email": "joern.berkefeld@accenture.com",
10
+ "name": "Jörn Berkefeld"
11
+ },
12
+ "createdDate": "2021-11-22T09:21:11.933-06:00",
13
+ "createdBy": {
14
+ "email": "joern.berkefeld@accenture.com",
15
+ "name": "Jörn Berkefeld"
16
+ },
17
+ "modifiedDate": "2021-12-16T02:56:24.29-06:00",
18
+ "modifiedBy": {
19
+ "name": "SFMC DEVOPS app user"
20
+ },
21
+ "memberId": 9999999,
22
+ "status": {
23
+ "name": "Draft"
24
+ },
25
+ "views": {
26
+ "push": {
27
+ "thumbnail": {},
28
+ "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t\t<meta name=\"description\" content=\"Push Preview\">\n\t\t<style>\n\thtml,\n\tbody {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t\tline-height: 1.4;\n\t}\n\n\t.push-previewer {\n\t\twidth: inherit;\n\t\theight: inherit;\n\t\tposition: relative;\n\t}\n\n\t.device {\n\t\theight: inherit;\n\t\twidth: inherit;\n\t\tbackground-size: cover;\n\t\tbackground-repeat: no-repeat;\n\t}\n</style> <style>\n\t@font-face {\n\t\tfont-family: 'SF Pro Text - Regular';\n\t\tsrc: url('https://mobilepush-device-previewer.s7.marketingcloudapps.com/fonts/SFProText-Regular.woff') format('woff');\n\t\tfont-weight: normal;\n\t\tfont-style: normal;\n\t}\n\t\n\t@font-face {\n\t\tfont-family: 'Helvetica Neue - Roman';\n\t\tsrc: url('https://mobilepush-device-previewer.s7.marketingcloudapps.com/fonts/HelveticaNeue-Roman.woff') format('woff');\n\t\tfont-weight: normal;\n\t\tfont-style: normal;\n\t}\n\t\n\t@font-face {\n\t\tfont-family: 'SF Compact Text - Light';\n\t\tsrc: url('https://mobilepush-device-previewer.s7.marketingcloudapps.com/fonts/SFCompactText-Light.woff') format('woff');\n\t\tfont-weight: normal;\n\t\tfont-style: normal;\n\t}\n\t\n\t.device.iphone.lock-screen {\n\t\tfont-family: 'SF Pro Text - Regular';\n\t\tbackground-image: url('https://image.s8.exacttarget.com/lib/fe8e1c72746d057a70/m/1/d1948d1e-93af-4b9d-8b28-a087a351e8a8.jpg');\n\t}\n\t\n\t.device.iphone.lock-screen .header {\n\t\ttext-align: center;\n\t\tmargin-bottom: 20px;\n\t}\n\t\n\t.device.iphone.lock-screen .header .time {\n\t\tcolor: #FFFFFF;\n\t\tfont-family: 'SF Compact Text - Light';\n\t\tfont-size: 60px;\n\t\theight: 70px;\n\t}\n\n\t.device.iphone.lock-screen .header .date {\n\t\tcolor: #FFFFFF;\n\t\tfont-family: 'Helvetica Neue - Roman';\n\t\tfont-size: 17px;\n\t}\n\t\n\t.device.iphone.lock-screen .body {\n\t\tbackground: rgba(240, 240, 240, 0.97);\n\t\tborder-radius: 12px;\n\t\tpadding: 10px;\n\t\tmargin: 0 4px;\n\t\topacity: 1;\n\t\tposition: relative;\n\t}\n\t\n\t.device.iphone.lock-screen .body .application {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tborder-radius: 12px 12px 0 0;\n\t\tbackground: #F0F0F0;\n\t\tmargin: -10px -10px 0 -10px;\n\t\tpadding: 10px;\n\t}\n\t\n\t.device.iphone.lock-screen .body .application .icon {\n\t\t\n\t}\n\t\n\t.device.iphone.lock-screen .body .application .icon .icon-placeholder {\n\t\theight: 17px;\n\t\twidth: 17px;\n\t\tborder-radius: 3px;\n\t\tbackground-color: grey;\n\t\tdisplay: inline-block;\n\t\tvertical-align: middle;\n\t}\n\t\n\t.device.iphone.lock-screen .body .application .name {\n\t\tcolor: #000000;\n\t\topacity: .50;\n\t\tfont-size: 12px;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\twidth: 100%;\n\t\tpadding: 2px 5px 0 10px;\n\t}\n\t\n\t.device.iphone.lock-screen .body .application .timestamp {\n\t\tfont-size: 11px;\n\t\topacity: .50;\n\t\tfont-weight: bold;\n\t\tmargin-left: auto;\n\t}\n\t\n\t.device.iphone.lock-screen .body .media {\n\t\tborder-radius: 3px;\n\t\twidth: 26px;\n\t\theight: 26px;\n\t\tposition: absolute;\n\t\tright: 10px;\n\t\tbottom: 10px;\n\t}\n\t\n\t.device.iphone.lock-screen .body .media img {\n\t\theight: 100%;\n\t\tmax-height: 26px;\n\t\twidth: 100%;\n\t\tmax-width: 26px;\n\t}\n\t\n\t.device.iphone.lock-screen .body .content {\n\t\tcolor: #000000;\n\t\tfont-size: 13px;\n\t\tpadding-top: 5px;\n\t}\n\t\n\t.device.iphone.lock-screen .body .content > div {\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t}\n\t\n\t.device.iphone.lock-screen .body .content .title {\n\t\tfont-weight: bold;\n\t\twhite-space: nowrap;\n\t}\n\t\n\t.device.iphone.lock-screen .body .content .subtitle {\n\t\tfont-weight: bold;\n\t\twhite-space: nowrap;\n\t}\n\t\n\t.device.iphone.lock-screen .body .content .message {\n\t\twhite-space: pre-wrap;\n\t\tdisplay: -webkit-box;\n\t\t-webkit-line-clamp: 4;\n\t\t-webkit-box-orient: vertical;\n\t\ttext-overflow: ellipsis;\n\t\t-o-text-overflow: ellipsis;\n\t\t-ms-text-overflow: ellipsis;\n\t\tword-break: break-word;\n\t\t-ms-word-wrap: break-word;\n\t\tword-wrap: break-word;\n\t\tmax-height: 75px;\n\t}\n\t\n\t.device.iphone.lock-screen .body .content .message.hasTitle {\n\t\tmax-height: 55px;\n\t\t-webkit-line-clamp: 3;\n\t}\n\t\n\t.device.iphone.lock-screen .body .content .message.hasSubtitle {\n\t\tmax-height: 35px;\n\t\t-webkit-line-clamp: 2;\n\t}\n\t\n\t.device.iphone.lock-screen .body .content.hasMedia .message {\n\t\tpadding-right: 50px;\n\t}\n\t\n\t.device.iphone.lock-screen .body .action {\n\t\tcolor: #157EBF;\n\t\tfont-size: 11px;\n\t\topacity: .3;\n\t\tmargin-top: 5px;\n\t}\n\t\n\t.device.iphone.lock-screen .body .buttons {\n\t\tdisplay: none;\n\t}\n\t\n\t.device.iphone.lock-screen .footer {\n\t\tdisplay: none;\n\t}\n</style>\n\t</head>\n\t<body>\n\t\t<div class=\"push-previewer\">\n\t\t\t<div class=\"device iphone lock-screen\">\n\t\t\t\t<div class=\"header\">\n\t\t\t\t\t<div class=\"time\">12:00 AM</div>\n\t\t\t\t\t<div class=\"date\">January 1, 2020</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"body\">\n\t\t\t\t\t<div class=\"application\">\n\t\t\t\t\t\t<div class=\"icon\">\n\t\t\t\t\t\t\t<div class=\"icon-placeholder\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"name\">App Name</div>\n\t\t\t\t\t\t<div class=\"timestamp\">now</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"media\"></div>\n\t\t\t\t\t<div class=\"content \">\n\t\t\t\t\t\t<div class=\"title\">test</div>\n\t\t\t\t\t\t<div class=\"subtitle\"></div>\n\t\t\t\t\t\t<div class=\"message hasTitle \">asdfasf </div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"action\"></div>\n\t\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t\t<div class=\"button1\"></div>\n\t\t\t\t\t\t<div class=\"button2\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"footer\"></div>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>",
29
+ "meta": {
30
+ "options": {
31
+ "customBlockData": {
32
+ "display:title": "test",
33
+ "channel": "push",
34
+ "showTemplatePicker": false,
35
+ "display:title:display": "test",
36
+ "stack": "S7",
37
+ "openBehavior:actionType": {
38
+ "label": "Open the App",
39
+ "value": "openApp",
40
+ "id": "openApp_0",
41
+ "localizedLabel": "Open the App"
42
+ },
43
+ "display:message": "asdfasf ",
44
+ "currentColumn": 0,
45
+ "display:message:display": "asdfasf ",
46
+ "template": "push",
47
+ "uncheckedPanels": ["pushmedia", "subtitle"]
48
+ }
49
+ }
50
+ },
51
+ "modelVersion": 2
52
+ }
53
+ },
54
+ "availableViews": ["push"],
55
+ "modelVersion": 2,
56
+ "category": {
57
+ "id": 89397,
58
+ "name": "Content Builder",
59
+ "parentId": 0
60
+ }
61
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "id": 1295064,
3
+ "customerKey": "mcdev-issue-1157",
4
+ "objectID": "972974ed-dc44-4df2-ab6e-53bae9070339",
5
+ "assetType": {
6
+ "id": 197,
7
+ "name": "htmlblock",
8
+ "displayName": "HTML Block"
9
+ },
10
+ "fileProperties": {
11
+ "fileName": "mcdev-issue-1157-Mcdev-strips-content"
12
+ },
13
+ "name": "mcdev-issue-1157-Mcdev-strips-content",
14
+ "owner": {
15
+ "id": 700301950,
16
+ "email": "joern.berkefeld@accenture.com",
17
+ "name": "Jörn Berkefeld (ASGR)",
18
+ "userId": "700301950"
19
+ },
20
+ "createdDate": "2024-01-08T08:26:58.277-06:00",
21
+ "createdBy": {
22
+ "id": 700301950,
23
+ "email": "joern.berkefeld@accenture.com",
24
+ "name": "Jörn Berkefeld (ASGR)",
25
+ "userId": "700301950"
26
+ },
27
+ "modifiedDate": "2024-01-08T08:28:01.6-06:00",
28
+ "modifiedBy": {
29
+ "id": 700301950,
30
+ "email": "joern.berkefeld@accenture.com",
31
+ "name": "Jörn Berkefeld (ASGR)",
32
+ "userId": "700301950"
33
+ },
34
+ "enterpriseId": 9999999,
35
+ "memberId": 9999999,
36
+ "status": {
37
+ "id": 1,
38
+ "name": "Draft"
39
+ },
40
+ "thumbnail": {
41
+ "thumbnailUrl": "/v1/assets/1295064/thumbnail"
42
+ },
43
+ "category": {
44
+ "id": 89397,
45
+ "name": "Content Builder",
46
+ "parentId": 0
47
+ },
48
+ "content": "<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" role=\"presentation\" style=\"min-width: 100%; \" class=\"stylingblock-content-wrapper\"><tr><td class=\"stylingblock-content-wrapper camarker-inner\"><div>\n my 1st html\n</div>\n\n%%[ /* my ampscript */ ]%%\n\n<script runat=\"server\">\n// my ssjs\n</script>\n\n<div>\n my 2nd html\n</div></td></tr></table>",
49
+ "design": "",
50
+ "meta": {
51
+ "wrapperStyles": {
52
+ "mobile": {
53
+ "visible": true
54
+ },
55
+ "styling": {}
56
+ }
57
+ },
58
+ "availableViews": [],
59
+ "modelVersion": 2
60
+ }
@@ -0,0 +1,184 @@
1
+ {
2
+ "id": 808714,
3
+ "customerKey": "testExisting_asset_message",
4
+ "objectID": "01f883be-c5c3-4eb1-b6e1-d7036f8153d4",
5
+ "contentType": "application/vnd.etmc.email.Message; kind=paste",
6
+ "assetType": {
7
+ "id": 208,
8
+ "name": "htmlemail",
9
+ "displayName": "HTML Email"
10
+ },
11
+ "name": "testExisting_asset_message",
12
+ "owner": {
13
+ "id": 717129834,
14
+ "email": "joern.berkefeld@accenture.com",
15
+ "name": "Jörn Berkefeld",
16
+ "userId": "717129834"
17
+ },
18
+ "createdDate": "2020-03-06T02:35:15.677-06:00",
19
+ "createdBy": {
20
+ "id": 717129834,
21
+ "email": "joern.berkefeld@accenture.com",
22
+ "name": "Jörn Berkefeld",
23
+ "userId": "717129834"
24
+ },
25
+ "modifiedDate": "2023-08-02T07:08:00.86-06:00",
26
+ "modifiedBy": {
27
+ "id": 700304523,
28
+ "name": "SFMC DEVOPS app user",
29
+ "userId": "700304523"
30
+ },
31
+ "enterpriseId": 7281698,
32
+ "memberId": 7281698,
33
+ "status": {
34
+ "id": 1,
35
+ "name": "Draft"
36
+ },
37
+ "thumbnail": {
38
+ "thumbnailUrl": "/v1/assets/808714/thumbnail"
39
+ },
40
+ "category": {
41
+ "id": 89397,
42
+ "name": "Content Builder",
43
+ "parentId": 0
44
+ },
45
+ "views": {
46
+ "subjectline": {
47
+ "contentType": "application/vnd.etmc.email.View; kind=subjectline",
48
+ "thumbnail": {},
49
+ "content": "TEST",
50
+ "availableViews": [],
51
+ "data": {
52
+ "email": {
53
+ "options": {
54
+ "generateFrom": null
55
+ }
56
+ }
57
+ },
58
+ "modelVersion": 2
59
+ },
60
+ "preheader": {
61
+ "thumbnail": {},
62
+ "availableViews": [],
63
+ "data": {
64
+ "email": {
65
+ "options": {
66
+ "generateFrom": null
67
+ }
68
+ }
69
+ },
70
+ "modelVersion": 2
71
+ },
72
+ "html": {
73
+ "thumbnail": {},
74
+ "content": "<a href=\"%%ftaf_url%%\"\n ><img\n src=\"https://www.exacttarget.com/members/newsletters/gfx/forwardafriendicon.gif\"\n border=\"0\" /></a\n><a href=\"%%profile_center_url%%\" alias=\"Update Profile\">Update Profile</a>\n<table cellpadding=\"2\" cellspacing=\"0\" width=\"600\" id=\"Table5\" border=\"0\">\n <tr>\n <td>\n <font face=\"verdana\" size=\"1\" color=\"#444444\"\n >This email was sent by: <b>%%Member_Busname%%</b><br />%%Member_Addr%%\n %%Member_City%%, %%Member_State%%, %%Member_PostalCode%%, %%Member_Country%%<br /><br\n /></font>\n </td>\n </tr>\n</table>\n<a href=\"%%subscription_center_url%%\" alias=\"Manage Subscriptions\">Manage Subscriptions</a\n><img src=\"https://www.exacttarget.com/images/Powered_By_1206.jpg\" border=\"0\" /><custom\n name=\"opencounter\"\n type=\"tracking\"\n/>\n",
75
+ "availableViews": [],
76
+ "data": {
77
+ "email": {
78
+ "options": {
79
+ "generateFrom": null
80
+ }
81
+ }
82
+ },
83
+ "modelVersion": 2
84
+ },
85
+ "text": {
86
+ "thumbnail": {},
87
+ "availableViews": [],
88
+ "data": {
89
+ "email": {
90
+ "options": {
91
+ "generateFrom": "html"
92
+ }
93
+ }
94
+ },
95
+ "generateFrom": "html",
96
+ "modelVersion": 2
97
+ },
98
+ "viewAsAWebPage": {
99
+ "thumbnail": {},
100
+ "availableViews": [],
101
+ "data": {
102
+ "email": {
103
+ "options": {
104
+ "generateFrom": null
105
+ }
106
+ }
107
+ },
108
+ "modelVersion": 2
109
+ },
110
+ "subscriptioncenter": {
111
+ "thumbnail": {},
112
+ "availableViews": [],
113
+ "data": {
114
+ "email": {
115
+ "options": {
116
+ "generateFrom": null
117
+ }
118
+ }
119
+ },
120
+ "modelVersion": 2
121
+ },
122
+ "forwardHTML": {
123
+ "thumbnail": {},
124
+ "availableViews": [],
125
+ "data": {
126
+ "email": {
127
+ "options": {
128
+ "generateFrom": null
129
+ }
130
+ }
131
+ },
132
+ "modelVersion": 2
133
+ },
134
+ "forwardText": {
135
+ "thumbnail": {},
136
+ "availableViews": [],
137
+ "data": {
138
+ "email": {
139
+ "options": {
140
+ "generateFrom": null
141
+ }
142
+ }
143
+ },
144
+ "modelVersion": 2
145
+ }
146
+ },
147
+ "availableViews": [
148
+ "subjectline",
149
+ "preheader",
150
+ "html",
151
+ "text",
152
+ "viewAsAWebPage",
153
+ "subscriptioncenter",
154
+ "forwardHTML",
155
+ "forwardText"
156
+ ],
157
+ "data": {
158
+ "email": {
159
+ "options": {
160
+ "characterEncoding": "utf-8"
161
+ },
162
+ "legacy": {
163
+ "legacyId": 429827,
164
+ "legacyKey": "c7308370-bb2c-4bd4-83dd-0ea422e2009d",
165
+ "legacyType": "email",
166
+ "legacyCategoryId": 90890
167
+ }
168
+ },
169
+ "approvals": {
170
+ "approvalStatus": {
171
+ "id": 4,
172
+ "name": "Approved",
173
+ "displayName": "Approved"
174
+ }
175
+ }
176
+ },
177
+ "legacyData": {
178
+ "legacyId": 429827,
179
+ "legacyKey": "c7308370-bb2c-4bd4-83dd-0ea422e2009d",
180
+ "legacyType": "email",
181
+ "legacyCategoryId": 90890
182
+ },
183
+ "modelVersion": 2
184
+ }
@@ -23,7 +23,7 @@
23
23
  "userId": "700304523"
24
24
  },
25
25
  "status": { "id": 1, "name": "Draft" },
26
- "category": { "id": 290833, "name": "Content Builder", "parentId": 0 },
26
+ "category": { "id": 89397, "name": "Content Builder", "parentId": 0 },
27
27
  "availableViews": ["html", "text", "subjectline", "preheader"],
28
28
  "data": {
29
29
  "email": {
@@ -64,9 +64,47 @@
64
64
  "userId": "700301950"
65
65
  },
66
66
  "status": { "id": 1, "name": "Draft" },
67
- "category": { "id": 283608, "name": "Content Builder", "parentId": 0 },
67
+ "category": { "id": 89397, "name": "Content Builder", "parentId": 0 },
68
68
  "availableViews": ["push"],
69
69
  "modelVersion": 2
70
+ },
71
+ {
72
+ "id": 1295064,
73
+ "customerKey": "mcdev-issue-1157",
74
+ "assetType": {
75
+ "id": 197,
76
+ "name": "htmlblock",
77
+ "displayName": "HTML Block"
78
+ },
79
+ "fileProperties": {
80
+ "fileName": "dont strip non ssjs content"
81
+ },
82
+ "name": "dont strip non ssjs content",
83
+ "createdDate": "2024-01-08T08:26:58.277-06:00",
84
+ "createdBy": {
85
+ "id": 700301950,
86
+ "email": "joern.berkefeld@accenture.com",
87
+ "name": "Jörn Berkefeld (ASGR)",
88
+ "userId": "700301950"
89
+ },
90
+ "modifiedDate": "2024-01-08T08:28:01.6-06:00",
91
+ "modifiedBy": {
92
+ "id": 700301950,
93
+ "email": "joern.berkefeld@accenture.com",
94
+ "name": "Jörn Berkefeld (ASGR)",
95
+ "userId": "700301950"
96
+ },
97
+ "status": {
98
+ "id": 1,
99
+ "name": "Draft"
100
+ },
101
+ "category": {
102
+ "id": 89397,
103
+ "name": "Content Builder",
104
+ "parentId": 0
105
+ },
106
+ "availableViews": [],
107
+ "modelVersion": 2
70
108
  }
71
109
  ]
72
110
  }