@adobe/acc-js-sdk 1.1.12 → 1.1.13
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.
- package/compile.js +1 -0
- package/docs/_data/navigation.yml +2 -0
- package/docs/application.html +1 -1
- package/docs/changeLog.html +8 -0
- package/docs/reportData.html +92 -0
- package/package-lock.json +6 -1
- package/package.json +3 -2
- package/src/campaign.js +2 -0
- package/src/client.js +45 -1
- package/test/application.test.js +22 -0
- package/test/client.test.js +73 -0
- package/test/mock.js +34 -0
package/compile.js
CHANGED
package/docs/application.html
CHANGED
|
@@ -264,7 +264,7 @@ const root = await node.linkTarget();
|
|
|
264
264
|
<tr><td><b>isNotNull</b></td><td>Returns a boolean which indicates whether or not the current node can take the null value into account.</td></tr>
|
|
265
265
|
<tr><td><b>isRequired</b></td><td>Returns a boolean which indicates whether or not the value of the current node is mandatory.</td></tr>
|
|
266
266
|
<tr><td><b>isRoot</b></td><td>Indicates if the node is the root node of a schema, i.e. the first child of the schema node, whose name matches the schema name</td></tr>
|
|
267
|
-
<tr><td><b>isSQL</b></td><td>Returns a boolean which indicates whether the current node is mapped in SQL
|
|
267
|
+
<tr><td><b>isSQL</b></td><td>Returns a boolean which indicates whether the current node is mapped in SQL. There are some inconsistencies in ACC schemas, and sometimes attributes may be defined as both sql and xml (for example: nms:delivery/properties/seedProcessed). Such nodes with have both isSql=true and isMappedAsXml=true</td></tr>
|
|
268
268
|
<tr><td><b>isTemporaryTable</b></td><td>Returns a boolean indicating whether the table is a temporary table. The table will not be created during database creation.</td></tr>
|
|
269
269
|
<tr><td><b>unbound</b></td><td>Returns a boolean which indicates whether the current node has an unlimited number of children of the same type.</td></tr>
|
|
270
270
|
<tr><td><b>joins</b></td><td>Element of type "link" has an array of XtkJoin. See <b>joinNodes</b> method.</td></tr>
|
package/docs/changeLog.html
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
layout: page
|
|
3
3
|
title: Change Log
|
|
4
4
|
---
|
|
5
|
+
<section class="changelog"><h1>Version 1.1.13</h1>
|
|
6
|
+
<h2>2022/11/24</h2>
|
|
7
|
+
|
|
8
|
+
<li>Fix a bug with file upload API: API call payload was not passed with the right property. The transport interface uses the "data" property and not the "body" property</li>
|
|
9
|
+
<li>Add "getReportData" API to fetch the data use to create a particular report</li>
|
|
10
|
+
<li>Add unit test to check that schema nodes mapped as both xml and sql are properly handled (as SQL)</li>
|
|
11
|
+
</section>
|
|
12
|
+
|
|
5
13
|
<section class="changelog"><h1>Version 1.1.12</h1>
|
|
6
14
|
<h2>2022/11/16</h2>
|
|
7
15
|
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
title: Reports Data API
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<p>Campaign provides an API to fetch reports data. Just like all APIs in the SDK, it's been wrapped into a function and will return a XML or JSON object based on the requested representation</p>
|
|
7
|
+
|
|
8
|
+
<p>Function Definition</p>
|
|
9
|
+
<pre class="code">
|
|
10
|
+
client.getReportData = (callContext: any, representation: string) : Promise<any>
|
|
11
|
+
</pre>
|
|
12
|
+
<p>callContext</p>
|
|
13
|
+
<pre class="code">
|
|
14
|
+
{
|
|
15
|
+
reportName: string(Report Name),
|
|
16
|
+
context: string("selection"|"global"),
|
|
17
|
+
schema: string(entity type to be used for selection),
|
|
18
|
+
selection: string(Comma separated list of entity IDs),
|
|
19
|
+
formData: any
|
|
20
|
+
}
|
|
21
|
+
</pre>
|
|
22
|
+
|
|
23
|
+
<p>Usage</p>
|
|
24
|
+
<pre class="code">
|
|
25
|
+
const report = await client.getReportData({
|
|
26
|
+
reportName: "throughput",
|
|
27
|
+
context: "selection",
|
|
28
|
+
schema: "nms:delivery",
|
|
29
|
+
selection: "12133"
|
|
30
|
+
});
|
|
31
|
+
console.log(JSON.stringify(report));
|
|
32
|
+
</pre>
|
|
33
|
+
<p>Usage with multiple entities</p>
|
|
34
|
+
<pre class="code">
|
|
35
|
+
const report = await client.getReportData({
|
|
36
|
+
reportName: "throughput",
|
|
37
|
+
context: "selection",
|
|
38
|
+
schema: "nms:delivery",
|
|
39
|
+
selection: "12133,12134"
|
|
40
|
+
});
|
|
41
|
+
console.log(JSON.stringify(report));
|
|
42
|
+
</pre>
|
|
43
|
+
<p>Usage with form data</p>
|
|
44
|
+
<pre class="code">
|
|
45
|
+
const report = await client.getReportData({
|
|
46
|
+
reportName: "throughput",
|
|
47
|
+
context: "selection",
|
|
48
|
+
schema: "nms:delivery",
|
|
49
|
+
selection: "12133",
|
|
50
|
+
formData: {
|
|
51
|
+
vars_opens: 1,
|
|
52
|
+
userAction: "next",
|
|
53
|
+
ctx: {
|
|
54
|
+
_context: 'selection',
|
|
55
|
+
_reportContext: 'throughput',
|
|
56
|
+
_hasFilter: 'false',
|
|
57
|
+
_selectionCount: '1',
|
|
58
|
+
_selection: '12133',
|
|
59
|
+
vars: {
|
|
60
|
+
'$period': '21600',
|
|
61
|
+
'$trunc': '600',
|
|
62
|
+
'$valueScaleFactor': '6',
|
|
63
|
+
'$dateStepType': 'minute',
|
|
64
|
+
'$dateStepFactor': '10'
|
|
65
|
+
},
|
|
66
|
+
data: {
|
|
67
|
+
deliveryStat: { deliveryStat: [Array] },
|
|
68
|
+
bandwidth: { deliveryStat: [Object] }
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
console.log(JSON.stringify(report));
|
|
74
|
+
</pre>
|
|
75
|
+
|
|
76
|
+
<p>A given representation can be forced</p>
|
|
77
|
+
<pre class="code">
|
|
78
|
+
const xmlReport = await client.getReportData({
|
|
79
|
+
reportName: "throughput",
|
|
80
|
+
context: "selection",
|
|
81
|
+
schema: "nms:delivery",
|
|
82
|
+
selection: "12133"
|
|
83
|
+
}, "xml");
|
|
84
|
+
const jsonReport = await client.getReportData({
|
|
85
|
+
reportName: "throughput",
|
|
86
|
+
context: "selection",
|
|
87
|
+
schema: "nms:delivery",
|
|
88
|
+
selection: "12133"
|
|
89
|
+
}, "SimpleJson");
|
|
90
|
+
</pre>
|
|
91
|
+
|
|
92
|
+
|
package/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/acc-js-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -3362,6 +3362,11 @@
|
|
|
3362
3362
|
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
|
|
3363
3363
|
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
|
|
3364
3364
|
},
|
|
3365
|
+
"qs-stringify": {
|
|
3366
|
+
"version": "1.2.1",
|
|
3367
|
+
"resolved": "https://registry.npmjs.org/qs-stringify/-/qs-stringify-1.2.1.tgz",
|
|
3368
|
+
"integrity": "sha512-2N5xGLGZUxpgAYq1fD1LmBSCbxQVsXYt5JU0nU3FuPWO8PlCnKNFQwXkZgyB6mrTdg7IbexX4wxIR403dJw9pw=="
|
|
3369
|
+
},
|
|
3365
3370
|
"react-is": {
|
|
3366
3371
|
"version": "17.0.2",
|
|
3367
3372
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/acc-js-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "ACC Javascript SDK",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"homepage": "https://github.com/adobe/acc-js-sdk#readme",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"axios": "^0.25.0",
|
|
14
|
-
"jsdom": "^19.0.0"
|
|
14
|
+
"jsdom": "^19.0.0",
|
|
15
|
+
"qs-stringify": "^1.2.1"
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
18
|
"docdash": "^1.2.0",
|
package/src/campaign.js
CHANGED
|
@@ -39,6 +39,8 @@ const { Util } = require("./util.js");
|
|
|
39
39
|
static DECRYPT_ERROR(details) { return new CampaignException(undefined, 400, 16384, `SDK-000011 "Cannot decrypt password: password marker is missing`, details); }
|
|
40
40
|
static SESSION_EXPIRED() { return new CampaignException(undefined, 401, 16384, `SDK-000012 "Session has expired or is invalid. Please reconnect.`); }
|
|
41
41
|
static FILE_UPLOAD_FAILED(name, details) { return new CampaignException(undefined, 500, 16384, `SDK-000013 "Failed to upload file ${name}`, details); }
|
|
42
|
+
static REPORT_FETCH_FAILED(name, details) { return new CampaignException(undefined, 500, 16384, `SDK-000014 Failed to fetch report ${name}`, details); }
|
|
43
|
+
static FEATURE_NOT_SUPPORTED(name) { return new CampaignException(undefined, 500, 16384, `SDK-000015 ${name} feature is not supported by the ACC instance`); }
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
/**
|
package/src/client.js
CHANGED
|
@@ -36,6 +36,7 @@ const request = require('./transport.js').request;
|
|
|
36
36
|
const Application = require('./application.js').Application;
|
|
37
37
|
const EntityAccessor = require('./entityAccessor.js').EntityAccessor;
|
|
38
38
|
const { Util } = require('./util.js');
|
|
39
|
+
const qsStringify = require('qs-stringify');
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
42
|
* @namespace Campaign
|
|
@@ -54,6 +55,9 @@ const { Util } = require('./util.js');
|
|
|
54
55
|
*
|
|
55
56
|
* @typedef {Object} Observer
|
|
56
57
|
* @memberOf Campaign
|
|
58
|
+
*
|
|
59
|
+
* @typedef {Object} ReportContext
|
|
60
|
+
* @memberOf Campaign
|
|
57
61
|
*/
|
|
58
62
|
|
|
59
63
|
|
|
@@ -548,7 +552,7 @@ const fileUploader = (client) => {
|
|
|
548
552
|
processData: false,
|
|
549
553
|
credentials: 'include',
|
|
550
554
|
method: 'POST',
|
|
551
|
-
|
|
555
|
+
data: data,
|
|
552
556
|
headers: {
|
|
553
557
|
'x-security-token': client._securityToken,
|
|
554
558
|
'Cookie': '__sessiontoken=' + client._sessionToken,
|
|
@@ -1764,6 +1768,46 @@ class Client {
|
|
|
1764
1768
|
return result;
|
|
1765
1769
|
}
|
|
1766
1770
|
|
|
1771
|
+
/**
|
|
1772
|
+
* This is the exposed/public method to request context data for a specific report.
|
|
1773
|
+
* @param {*} callContext: {reportName: string, schema: string, context: string, selection: string, formData: any}
|
|
1774
|
+
* @param {string} representation the expected representation ('xml', 'BadgerFish', or 'SimpleJson'). If not set, will use the current representation
|
|
1775
|
+
*
|
|
1776
|
+
* @returns {Campaign.ReportContext} an object containing the context data for a specific report
|
|
1777
|
+
*/
|
|
1778
|
+
async getReportData(callContext, representation) {
|
|
1779
|
+
try {
|
|
1780
|
+
if(callContext.formData && callContext.formData.ctx) {
|
|
1781
|
+
var xmlCtx = this._fromRepresentation('ctx', callContext.formData.ctx);
|
|
1782
|
+
callContext.formData.ctx = DomUtil.toXMLString(xmlCtx);
|
|
1783
|
+
}
|
|
1784
|
+
const selectionCount = callContext.selection.split(',').length;
|
|
1785
|
+
|
|
1786
|
+
const request = {
|
|
1787
|
+
url: `${this._connectionParameters._endpoint}/report/${callContext.reportName}?${encodeURI(`_noRender=true&_schema=${callContext.schema}&_context=${callContext.context}&_selection=${callContext.selection}`)}&_selectionCount=${selectionCount}`,
|
|
1788
|
+
headers: {
|
|
1789
|
+
'X-Security-Token': this._securityToken,
|
|
1790
|
+
'Cookie': '__sessiontoken=' + this._sessionToken,
|
|
1791
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
1792
|
+
},
|
|
1793
|
+
method: 'POST',
|
|
1794
|
+
credentials: 'include',
|
|
1795
|
+
data : qsStringify(callContext.formData)
|
|
1796
|
+
};
|
|
1797
|
+
|
|
1798
|
+
for (let h in this._connectionParameters._options.extraHttpHeaders)
|
|
1799
|
+
request.headers[h] = this._connectionParameters._options.extraHttpHeaders[h];
|
|
1800
|
+
const body = await this._makeHttpCall(request);
|
|
1801
|
+
if(!body.startsWith("<ctx"))
|
|
1802
|
+
throw CampaignException.FEATURE_NOT_SUPPORTED("Reports Data");
|
|
1803
|
+
const xml = DomUtil.parse(body);
|
|
1804
|
+
const result = this._toRepresentation(xml, representation);
|
|
1805
|
+
return result;
|
|
1806
|
+
} catch(ex) {
|
|
1807
|
+
throw CampaignException.REPORT_FETCH_FAILED(callContext.reportName, ex);
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1767
1811
|
/**
|
|
1768
1812
|
* Ping a Message Center Campaign server (/nl/jsp/mcPing.jsp).
|
|
1769
1813
|
* Assumes Message Center is installed
|
package/test/application.test.js
CHANGED
|
@@ -1973,6 +1973,28 @@ describe('Application', () => {
|
|
|
1973
1973
|
expect(node.isSQL).toBe(false);
|
|
1974
1974
|
});
|
|
1975
1975
|
|
|
1976
|
+
it("Should have isSQL even if it also has isXML", async () => {
|
|
1977
|
+
const xml = DomUtil.parse(`<schema namespace='nms' name='delivery' mappingType="sql">
|
|
1978
|
+
<element name='delivery' sqltable="NmsDelivery">
|
|
1979
|
+
<element name='properties'>
|
|
1980
|
+
<attribute name="midAccountUsedName" type="string" xml="true"/>
|
|
1981
|
+
<attribute name="seedProcessed" sqlname="iSeedProcessed" type="long" xml="true"/>
|
|
1982
|
+
</element>
|
|
1983
|
+
</element>
|
|
1984
|
+
</schema>`);
|
|
1985
|
+
const schema = newSchema(xml);
|
|
1986
|
+
const properties = await schema.root.findNode("properties");
|
|
1987
|
+
expect(properties.isSQL).toBe(false);
|
|
1988
|
+
// xml only node is not sql
|
|
1989
|
+
const midAccountUsedName = await properties.findNode("@midAccountUsedName");
|
|
1990
|
+
expect(midAccountUsedName.isSQL).toBe(false);
|
|
1991
|
+
expect(midAccountUsedName.isMappedAsXML).toBe(true);
|
|
1992
|
+
// node may be both xml and sql. If that's the case, it's considered sql
|
|
1993
|
+
const seedProcessed = await properties.findNode("@seedProcessed");
|
|
1994
|
+
expect(seedProcessed.isSQL).toBe(true);
|
|
1995
|
+
expect(seedProcessed.isMappedAsXML).toBe(true);
|
|
1996
|
+
});
|
|
1997
|
+
|
|
1976
1998
|
it("Should be memo and memo data" , async () => {
|
|
1977
1999
|
const xml = DomUtil.parse(`<schema namespace='nms' name='recipient' label="Recipients" labelSingular="Recipient">
|
|
1978
2000
|
<element name='recipient' sqltable="NmsRecipient">
|
package/test/client.test.js
CHANGED
|
@@ -3224,6 +3224,17 @@ describe('ACC Client', function () {
|
|
|
3224
3224
|
type: 'text/html',
|
|
3225
3225
|
size: 12345
|
|
3226
3226
|
})
|
|
3227
|
+
expect(client._transport).toHaveBeenNthCalledWith(2,
|
|
3228
|
+
expect.objectContaining({
|
|
3229
|
+
data: expect.anything(),
|
|
3230
|
+
url: expect.any(String),
|
|
3231
|
+
method: 'POST',
|
|
3232
|
+
processData: false,
|
|
3233
|
+
credentials: 'include',
|
|
3234
|
+
headers: expect.anything(),
|
|
3235
|
+
})
|
|
3236
|
+
);
|
|
3237
|
+
|
|
3227
3238
|
expect(result).toMatchObject({
|
|
3228
3239
|
md5: "d8e8fca2dc0f896fd7cb4cb0031ba249",
|
|
3229
3240
|
name: "test.txt",
|
|
@@ -3467,4 +3478,66 @@ describe('ACC Client', function () {
|
|
|
3467
3478
|
});
|
|
3468
3479
|
});
|
|
3469
3480
|
|
|
3481
|
+
describe("getReport API", () => {
|
|
3482
|
+
it("Should call report API", async () => {
|
|
3483
|
+
const client = await Mock.makeClient();
|
|
3484
|
+
client._transport.mockReturnValueOnce(Mock.LOGON_RESPONSE);
|
|
3485
|
+
await client.NLWS.xtkSession.logon();
|
|
3486
|
+
|
|
3487
|
+
client._transport.mockReturnValueOnce(Mock.REPORT_RESPONSE);
|
|
3488
|
+
const report = await client.getReportData({
|
|
3489
|
+
reportName: "throughput",
|
|
3490
|
+
context: "selection",
|
|
3491
|
+
selection: "12133",
|
|
3492
|
+
schema: "nms:delivery",
|
|
3493
|
+
formData: {ctx: {}}
|
|
3494
|
+
});
|
|
3495
|
+
expect(report._reportContext).toBe("throughput");
|
|
3496
|
+
expect(report._selection).toBe("12133");
|
|
3497
|
+
expect(report.vars.$period).toBe("604800");
|
|
3498
|
+
expect(report.delivery.scheduling.contactDate).toBe("2021-12-07 17:13:39.507Z");
|
|
3499
|
+
expect(report.data.bandwidth.deliveryStat.size).toBe("1.34");
|
|
3500
|
+
expect(report.userInfo).toBeDefined();
|
|
3501
|
+
expect(report.activityHistory).toBeDefined();
|
|
3502
|
+
|
|
3503
|
+
client._transport.mockReturnValueOnce(Mock.LOGOFF_RESPONSE);
|
|
3504
|
+
await client.NLWS.xtkSession.logoff();
|
|
3505
|
+
});
|
|
3506
|
+
|
|
3507
|
+
it("Should fail to get report data, if API is not supported", async () => {
|
|
3508
|
+
const client = await Mock.makeClient();
|
|
3509
|
+
client._transport.mockReturnValueOnce(Mock.LOGON_RESPONSE);
|
|
3510
|
+
await client.NLWS.xtkSession.logon();
|
|
3511
|
+
|
|
3512
|
+
client._transport.mockReturnValueOnce("Invalid response");
|
|
3513
|
+
await expect(client.getReportData({
|
|
3514
|
+
reportName: "throughput",
|
|
3515
|
+
context: "selection",
|
|
3516
|
+
selection: "12133",
|
|
3517
|
+
schema: "nms:delivery"
|
|
3518
|
+
})).rejects.toMatchObject({ statusCode:500, message:"500 - Error 16384: SDK-000014 Failed to fetch report throughput. 500 - Error 16384: SDK-000015 Reports Data feature is not supported by the ACC instance" });
|
|
3519
|
+
|
|
3520
|
+
client._transport.mockReturnValueOnce(Mock.LOGOFF_RESPONSE);
|
|
3521
|
+
await client.NLWS.xtkSession.logoff();
|
|
3522
|
+
});
|
|
3523
|
+
|
|
3524
|
+
it("Should fail to call getReport API", async () => {
|
|
3525
|
+
const client = await Mock.makeClient();
|
|
3526
|
+
client._transport.mockReturnValueOnce(Mock.LOGON_RESPONSE);
|
|
3527
|
+
await client.NLWS.xtkSession.logon();
|
|
3528
|
+
client.traceAPICalls(true);
|
|
3529
|
+
|
|
3530
|
+
client._transport.mockRejectedValueOnce(new HttpError(500, "Error rc=-57"));
|
|
3531
|
+
await expect(client.getReportData({
|
|
3532
|
+
reportName: "throughput",
|
|
3533
|
+
context: "selection",
|
|
3534
|
+
selection: "12133",
|
|
3535
|
+
schema: "nms:delivery"
|
|
3536
|
+
})).rejects.toMatchObject({ statusCode:500, message:"500 - Error 16384: SDK-000014 Failed to fetch report throughput. 500 - Error calling method '/report/throughput?_noRender=true&_schema=nms:delivery&_context=selection&_selection=12133&_selectionCount=1': Error rc=-57" });
|
|
3537
|
+
|
|
3538
|
+
client._transport.mockReturnValueOnce(Mock.LOGOFF_RESPONSE);
|
|
3539
|
+
await client.NLWS.xtkSession.logoff();
|
|
3540
|
+
});
|
|
3541
|
+
});
|
|
3542
|
+
|
|
3470
3543
|
});
|
package/test/mock.js
CHANGED
|
@@ -70,6 +70,39 @@ const PING = Promise.resolve("OK\n2021-08-27 15:43:48.862Z\n");
|
|
|
70
70
|
const MC_PING = Promise.resolve("Ok\n2021-08-27 15:48:07.893Z\n7/400 pending events");
|
|
71
71
|
const MC_PING_ERROR = Promise.resolve("Error\nThe queue is full (7/400)");
|
|
72
72
|
|
|
73
|
+
const REPORT_RESPONSE = Promise.resolve(`<ctx lang="en" date="2022-11-09T06:10:27Z" _target="web" alt_period="604800" statsCount="1" webApp-id="1569" _context="selection" _reportContext="throughput" _hasFilter="false" _selectionCount="1" _selection="12133" _schema="nms:delivery" _folderModel="nmsDelivery" _folderLinkId="@folder-id" _folderLink="folder" activityHist="xxx">
|
|
74
|
+
<userInfo datakitInDatabase="true" homeDir="" instanceLocale="en-US" locale="en-US" login="admin" loginCS="Administrator (admin)" loginId="1059" noConsoleCnx="false" orgUnitId="0" theme="" timezone="Asia/Kolkata" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:xtk:session" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
75
|
+
<login-group id="1060"/>
|
|
76
|
+
<login-right right="admin"/>
|
|
77
|
+
</userInfo>
|
|
78
|
+
<vars>
|
|
79
|
+
<period>604800</period>
|
|
80
|
+
<trunc>3600</trunc>
|
|
81
|
+
<valueScaleFactor>1</valueScaleFactor>
|
|
82
|
+
<dateStepType>hour</dateStepType>
|
|
83
|
+
<dateStepFactor>1</dateStepFactor>
|
|
84
|
+
</vars>
|
|
85
|
+
<activityHistory>
|
|
86
|
+
<activity name="page" type="page"/>
|
|
87
|
+
<activity name="script" type="script"/>
|
|
88
|
+
<activity name="query2" type="query"/>
|
|
89
|
+
<activity name="test" type="test"/>
|
|
90
|
+
</activityHistory>
|
|
91
|
+
<delivery label="Email delivery">
|
|
92
|
+
<scheduling contactDate="2021-12-07 17:13:39.507Z"/>
|
|
93
|
+
</delivery>
|
|
94
|
+
<title>Delivery: Email delivery</title>
|
|
95
|
+
<data>
|
|
96
|
+
<deliveryStat>
|
|
97
|
+
<deliveryStat date="2021-12-07 17:30:00.000Z" count="1" series="Success"/>
|
|
98
|
+
<deliveryStat date="2021-12-07 17:30:00.000Z" count="0" series="Errors"/>
|
|
99
|
+
</deliveryStat>
|
|
100
|
+
<bandwidth>
|
|
101
|
+
<deliveryStat date="2021-12-07 17:30:00.000Z" size="1.34"/>
|
|
102
|
+
</bandwidth>
|
|
103
|
+
</data>
|
|
104
|
+
</ctx>`);
|
|
105
|
+
|
|
73
106
|
const LOGON_RESPONSE = Promise.resolve(`<?xml version='1.0'?>
|
|
74
107
|
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ns='urn:xtk:session' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
|
|
75
108
|
<SOAP-ENV:Body>
|
|
@@ -828,6 +861,7 @@ exports.Mock = {
|
|
|
828
861
|
PING: PING,
|
|
829
862
|
MC_PING: MC_PING,
|
|
830
863
|
MC_PING_ERROR: MC_PING_ERROR,
|
|
864
|
+
REPORT_RESPONSE: REPORT_RESPONSE,
|
|
831
865
|
LOGON_RESPONSE: LOGON_RESPONSE,
|
|
832
866
|
BEARER_LOGON_RESPONSE: BEARER_LOGON_RESPONSE,
|
|
833
867
|
LOGON_RESPONSE_NO_SESSIONTOKEN: LOGON_RESPONSE_NO_SESSIONTOKEN,
|