@adobe/acc-js-sdk 1.1.15 → 1.1.17
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/changeLog.html +7 -0
- package/docs/observability.html +115 -58
- package/docs/xtkInterface.html +1 -1
- package/docs/xtkJob.html +131 -0
- package/package-lock.json +1 -1
- package/package.json +1 -1
- package/src/application.js +1 -1
- package/src/cacheRefresher.js +2 -1
- package/src/campaign.js +1 -1
- package/src/client.js +366 -197
- package/src/soap.js +3 -2
- package/src/util.js +18 -0
- package/src/xtkJob.js +337 -0
- package/test/application.test.js +28 -0
- package/test/client.test.js +15 -3
- package/test/mock.js +114 -1
- package/test/observability.test.js +149 -0
- package/test/soap.test.js +4 -4
- package/test/util.test.js +9 -0
- package/test/xtkJob.test.js +713 -0
package/compile.js
CHANGED
package/docs/changeLog.html
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
layout: page
|
|
3
3
|
title: Change Log
|
|
4
4
|
---
|
|
5
|
+
<section class="changelog"><h1>Version 1.1.16</h1>
|
|
6
|
+
<h2>2022/11/29</h2>
|
|
7
|
+
|
|
8
|
+
<li>Added support for xtk:job interface and job-related methods. See <a href="https://opensource.adobe.com/acc-js-sdk/xtkJob.html">Jobs documentation</a> for more details</li>
|
|
9
|
+
</section>
|
|
10
|
+
|
|
11
|
+
|
|
5
12
|
<section class="changelog"><h1>Version 1.1.15</h1>
|
|
6
13
|
<h2>2022/11/28</h2>
|
|
7
14
|
|
package/docs/observability.html
CHANGED
|
@@ -6,41 +6,95 @@ title: Observability
|
|
|
6
6
|
|
|
7
7
|
<p>The Campaign client implements an observer mechanism that you can use to hook into what's hapenning internally.</p>
|
|
8
8
|
|
|
9
|
-
<p>An <b>Observer</b>is an object
|
|
9
|
+
<p>An <b>Observer</b> is an object which has one or several callback methods which will be called at certain particular points in the SDK</p>
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
<h1>SOAP calls</h1>
|
|
13
|
+
<p>It is possible to observe the SOAP calls that are performed by the SDK. The following callbacks are called whenever a SOAP call is made. They can observe the SOAP calls but are not supposed to modify any of the parameters</p>
|
|
14
|
+
<p></p>
|
|
12
15
|
<ul>
|
|
13
|
-
<li>onSOAPCall(soapCall, safeCallData)</li>
|
|
14
|
-
<li>onSOAPCallSuccess(soapCall, safeCallResponse) {}</li>
|
|
15
|
-
<li>onSOAPCallFailure(soapCall, exception) {}</li>
|
|
16
|
+
<li><b>onSOAPCall</b> (soapCall, safeCallData)</li>
|
|
17
|
+
<li><b>onSOAPCallSuccess</b> (soapCall, safeCallResponse) {}</li>
|
|
18
|
+
<li><b>onSOAPCallFailure</b> (soapCall, exception) {}</li>
|
|
16
19
|
</ul>
|
|
17
20
|
|
|
18
|
-
<p>
|
|
21
|
+
<p>The <b>soapCall</b> parameter is the SOAP call which is being observed. In the <b>onSOAPCall</b> callback, the SOAP call has not been executed yet.</p>
|
|
22
|
+
|
|
23
|
+
<p>The <b>safeCallData</b> and <b>safeCallResponse</b> represent the text XML of the SOAP request and response, but in which all session and security tokens have been replaced with "***" string. Hence the name "safe". You should use those parameters for any logging purpose to avoid leaking credentials.</p>
|
|
19
24
|
|
|
25
|
+
|
|
26
|
+
<p>The <b>soapCall</b> parameter is a <b>SoapMethodCall</b> object which describes the SOAP call. It has the following public attributes. </p>
|
|
27
|
+
<p></p>
|
|
20
28
|
<ul>
|
|
21
|
-
<li>
|
|
22
|
-
<li>
|
|
23
|
-
<li>
|
|
29
|
+
<li><b>urn</b> is the SOAP URN which corresponds to the Campaign schema id. For instance "xtk:session"</li>
|
|
30
|
+
<li><b>methodName</b> is the name of the method to call. For instance "Logon"</li>
|
|
31
|
+
<li><b>internal</b> is true or false, depending if the SOAP call is an internal SOAP call performed by the framework itself, or if it's a SOAP call issued by a SDK user</li>
|
|
32
|
+
<li><b>request</b> is a literal corresponding to the HTTP request. It's compatible with the <b>transport</b> protocol. It may be undefined if the SOAP call has need been completely built</li>
|
|
33
|
+
<li><b>response</b> is a string containing the XML result of the SOAP call if the call was successful. It may be undefined if the call was not executed yet or if the call failed</li>
|
|
24
34
|
</ul>
|
|
25
35
|
|
|
26
|
-
<p>The <b>soapCall</b>parameter is the SOAP call which is being observed. In the <b>onSOAPCall</b>callback, the SOAP call has not been executed yet.</p>
|
|
27
36
|
|
|
28
|
-
<p>The <b>request</b>parameter is the HTTP request (as defined in the transport protocol above)</p>
|
|
29
37
|
|
|
30
|
-
<
|
|
38
|
+
<h1>HTTP calls</h1>
|
|
39
|
+
<p>For HTTP calls (such as JSP, JSSP...). Note that despite SOAP calls are also HTTP calls, the following callbacks will not be called for SOAP calls. These callbacks are not supposed to modify any of the parameters</p>
|
|
40
|
+
<p></p>
|
|
41
|
+
<ul>
|
|
42
|
+
<li><b>onHTTPCall</b> (request, safeCallData)</li>
|
|
43
|
+
<li><b>onHTTPCallSuccess</b> (request, safeCallResponse) {}</li>
|
|
44
|
+
<li><b>onHTTPCallFailure</b> (request, exception) {}</li>
|
|
45
|
+
</ul>
|
|
31
46
|
|
|
32
47
|
|
|
33
|
-
<p>The <b>
|
|
48
|
+
<p>The <b>request</b> parameter is the HTTP request (as defined in the transport protocol above)</p>
|
|
34
49
|
|
|
35
|
-
<ul>
|
|
36
|
-
<li><b>urn</b>is the SOAP URN which corresponds to the Campaign schema id. For instance "xtk:session"</li>
|
|
37
|
-
<li><b>methodName</b>is the name of the method to call. For instance "Logon"</li>
|
|
38
|
-
<li><b>internal</b>is true or false, depending if the SOAP call is an internal SOAP call performed by the framework itself, or if it's a SOAP call issued by a SDK user</li>
|
|
39
|
-
<li><b>request</b>is a literal corresponding to the HTTP request. It's compatible with the <b>transport</b>protocol. It may be undefined if the SOAP call has need been completely built</li>
|
|
40
|
-
<li><b>response</b>is a string containing the XML result of the SOAP call if the call was successful. It may be undefined if the call was not executed yet or if the call failed</li>
|
|
41
|
-
</ul>
|
|
42
50
|
|
|
43
|
-
<
|
|
51
|
+
<h1>Logging all SOAP calls</h1>
|
|
52
|
+
|
|
53
|
+
<p>SOAP calls can be logged by setting the <b>traceAPICalls</b> attribute on the client at any time. For security reasons, the security and session tokens values will be replaced by "***" to avoid leaking them</p>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<pre class="code">
|
|
57
|
+
client.traceAPICalls(true);
|
|
58
|
+
</pre>
|
|
59
|
+
|
|
60
|
+
<p>This is an example of the logs</p>
|
|
61
|
+
<pre class="code">
|
|
62
|
+
SOAP//request xtk:session#GetOption <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
63
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
64
|
+
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
|
65
|
+
xmlns:ns="http://xml.apache.org/xml-soap">
|
|
66
|
+
<SOAP-ENV:Header>
|
|
67
|
+
<Cookie>__sessiontoken=***</Cookie>
|
|
68
|
+
<X-Security-Token>***</X-Security-Token>
|
|
69
|
+
</SOAP-ENV:Header>
|
|
70
|
+
<SOAP-ENV:Body>
|
|
71
|
+
<m:GetOption xmlns:m="urn:xtk:session" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
|
72
|
+
<sessiontoken xsi:type="xsd:string">***</sessiontoken>
|
|
73
|
+
<name xsi:type="xsd:string">XtkDatabaseId</name>
|
|
74
|
+
</m:GetOption>
|
|
75
|
+
</SOAP-ENV:Body>
|
|
76
|
+
</SOAP-ENV:Envelope>
|
|
77
|
+
|
|
78
|
+
SOAP//response xtk:session#GetOption <?xml version='1.0'?>
|
|
79
|
+
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema'
|
|
80
|
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
|
|
81
|
+
xmlns:ns='urn:xtk:session'
|
|
82
|
+
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
|
|
83
|
+
<SOAP-ENV:Body>
|
|
84
|
+
<GetOptionResponse xmlns='urn:xtk:session' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
|
|
85
|
+
<pstrValue xsi:type='xsd:string'>uFE80000000000000F1FA913DD7CC7C4804BA419F</pstrValue>
|
|
86
|
+
<pbtType xsi:type='xsd:byte'>6</pbtType>
|
|
87
|
+
</GetOptionResponse>
|
|
88
|
+
</SOAP-ENV:Body>
|
|
89
|
+
</SOAP-ENV:Envelope>
|
|
90
|
+
</pre>
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
<h1>Observability events</h1>
|
|
97
|
+
<p>In version 1.1.7, the observer interface is extended to listen for internal events of the SDK. The <b>event</b> function of the observer, if it exist will be call for each SDK event with 2 parameters: the event itself, and for some events, a parent event. For instance a SOAP response event will have the SOAP request for a parent event.</p>
|
|
44
98
|
|
|
45
99
|
<pre class="code">
|
|
46
100
|
client.registerObserver({
|
|
@@ -127,43 +181,46 @@ client.registerObserver({
|
|
|
127
181
|
|
|
128
182
|
|
|
129
183
|
|
|
130
|
-
<h1>
|
|
131
|
-
|
|
132
|
-
<p>SOAP calls can be logged by setting the <b>traceAPICalls</b>attribute on the client at any time. For security reasons, the security and session tokens values will be replaced by "***" to avoid leaking them</p>
|
|
133
|
-
|
|
184
|
+
<h1>Method interception</h1>
|
|
134
185
|
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
</
|
|
186
|
+
<p>
|
|
187
|
+
In version 1.1.17 of the SDK, it's possible to use the observer mechanism to intercept SOAP calls, modify parameters before the call is made, or modify the response before it's returned to the caller.
|
|
188
|
+
</p>
|
|
189
|
+
<p>
|
|
190
|
+
Some SOAP calls are not intercepted: internal SOAP calls performed by the SDK itself (for instance to get schemas) are not intercepted. Logon and Logoff methods are not intercepted either.
|
|
191
|
+
</p>
|
|
192
|
+
<p>
|
|
193
|
+
The <b>beforeSoapCall</b> and <b>afterSoapCall</b> methods can be used. They will be passed the following parameters
|
|
194
|
+
</p>
|
|
138
195
|
|
|
139
|
-
<
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
196
|
+
<table>
|
|
197
|
+
<thead>
|
|
198
|
+
<tr>
|
|
199
|
+
<th>Parameter</th>
|
|
200
|
+
<th>Comment / Description</th>
|
|
201
|
+
</tr>
|
|
202
|
+
</thead>
|
|
203
|
+
<tbody>
|
|
204
|
+
<tr>
|
|
205
|
+
<td><b>method</b></td>
|
|
206
|
+
<td>An object describing the SOAP method. It contains the <b>urn</b>, <b>name</b> and <b>isStatic</b> attributes</td>
|
|
207
|
+
</tr>
|
|
208
|
+
<tr>
|
|
209
|
+
<td><b>object</b></td>
|
|
210
|
+
<td>The object ("this") on which the method applies (it will be undefined for static methods). The <b>beforeSoapCall</b> callback is free to modify the object as needed.</td>
|
|
211
|
+
</tr>
|
|
212
|
+
<tr>
|
|
213
|
+
<td><b>inputParameters</b></td>
|
|
214
|
+
<td>Is an array containing the method parameters. The <b>beforeSoapCall</b> callback is free to modify the object as needed. </td>
|
|
215
|
+
</tr>
|
|
216
|
+
<tr>
|
|
217
|
+
<td><b>representation</b></td>
|
|
218
|
+
<td>The representation (SimpleJson, xml, etc.) used for this method and in which the object and parameters are set</td>
|
|
219
|
+
</tr>
|
|
220
|
+
<tr>
|
|
221
|
+
<td><b>outputParameters</b></td>
|
|
222
|
+
<td>For the <b>afterSoapCall</b> method, an array containing the return value of the SOAP calls. The <b>afterSoapCall</b> callback is free to modify the object as needed. </td>
|
|
223
|
+
</tr>
|
|
224
|
+
</tbody>
|
|
225
|
+
</table>
|
|
156
226
|
|
|
157
|
-
SOAP//response xtk:session#GetOption <?xml version='1.0'?>
|
|
158
|
-
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema'
|
|
159
|
-
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
|
|
160
|
-
xmlns:ns='urn:xtk:session'
|
|
161
|
-
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
|
|
162
|
-
<SOAP-ENV:Body>
|
|
163
|
-
<GetOptionResponse xmlns='urn:xtk:session' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
|
|
164
|
-
<pstrValue xsi:type='xsd:string'>uFE80000000000000F1FA913DD7CC7C4804BA419F</pstrValue>
|
|
165
|
-
<pbtType xsi:type='xsd:byte'>6</pbtType>
|
|
166
|
-
</GetOptionResponse>
|
|
167
|
-
</SOAP-ENV:Body>
|
|
168
|
-
</SOAP-ENV:Envelope>
|
|
169
|
-
</pre>
|
package/docs/xtkInterface.html
CHANGED
|
@@ -17,4 +17,4 @@ const delivery = client.NLWS.nmsDelivery.create({ label: "Hello" });
|
|
|
17
17
|
await delivery.newInstance();
|
|
18
18
|
</pre>
|
|
19
19
|
|
|
20
|
-
<p>There are 2 common interfaces: <a href="{{ site.baseurl }}/xtkPersist.html">xtk:persist</a> and <a href="">xtk:jobInterface</a> which are documented below.</p>
|
|
20
|
+
<p>There are 2 common interfaces: <a href="{{ site.baseurl }}/xtkPersist.html">xtk:persist</a> and <a href="{{ site.baseurl }}/xtkJob.html">xtk:jobInterface</a> which are documented below.</p>
|
package/docs/xtkJob.html
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
title: XTK Jobs (xkt:job, xkt:jobInterface)
|
|
4
|
+
---
|
|
5
|
+
<p>This section describes how long running jobs are handled in ACC and ACC api. There are 2 schemas for jobs</p>
|
|
6
|
+
<ul>
|
|
7
|
+
<li>xtk:job which represents an acutal job, and which is implemented by several objects such as nms:delivery</li>
|
|
8
|
+
<li>xtk:jobInterface which contains methods to submit jobs and get their statuses. Other schemas do not actually implement the xtk:jobInterface interface</li>
|
|
9
|
+
</ul>
|
|
10
|
+
|
|
11
|
+
<p>In term of SOAP calls, running a job is simply executing a SOAP call synchronously or asynchronously in a separate thread or process. However, calls must be made on both the xtk:jobInterface and job entity schema. The SDK provides a helper interface to submit and handle jobs</p>
|
|
12
|
+
|
|
13
|
+
<h1>Simple Jobs</h1>
|
|
14
|
+
|
|
15
|
+
<p>
|
|
16
|
+
Simple jobs are non-static methods with no parameters, such as the nms:delivery#Prepare method which is used to prepare a delivery.
|
|
17
|
+
Such jobs can be executed synchronously (xtk:jobInterface#Execute) or asynchronously (xtk:jobInterface#Submit). Both methods return
|
|
18
|
+
a job id which can be used to retreive (poll) more about the job.
|
|
19
|
+
<p>
|
|
20
|
+
|
|
21
|
+
<p>
|
|
22
|
+
First, we need to retreive a delivery, which is the object upon which to run the Prepare method, but also implements xtk:job interface.
|
|
23
|
+
The Prepare method requires a complete delivery object, so we use SelectAll
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<pre class="code">
|
|
27
|
+
const queryDef = {
|
|
28
|
+
schema: "nms:delivery",
|
|
29
|
+
operation: "get",
|
|
30
|
+
select: { node: [ { expr: "@id" } ] },
|
|
31
|
+
where: { condition: [ { expr:`@internalName='DM19'` } ] }
|
|
32
|
+
}
|
|
33
|
+
const query = NLWS.xtkQueryDef.create(queryDef);
|
|
34
|
+
await query.selectAll();
|
|
35
|
+
const delivery = await query.executeQuery();
|
|
36
|
+
</pre>
|
|
37
|
+
|
|
38
|
+
<p>
|
|
39
|
+
Now we can create a job for the Prepare method using the <b>client.jobInterface</b> function which returns a XtkJobInterface object.
|
|
40
|
+
We pass it a job specification containing the schema, method, and object
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<pre class="code">
|
|
44
|
+
const job = await client.jobInterface({
|
|
45
|
+
xtkschema: 'nms:delivery',
|
|
46
|
+
method: 'Prepare',
|
|
47
|
+
object: delivery
|
|
48
|
+
});
|
|
49
|
+
</pre>
|
|
50
|
+
|
|
51
|
+
<p>
|
|
52
|
+
Finally we can submit the job and get it's status, progress, result, etc.
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
<pre class="code">
|
|
56
|
+
await job.submit();
|
|
57
|
+
var status = await job.getStatus();
|
|
58
|
+
</pre>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<h1>Soap calls</h1>
|
|
62
|
+
<p>
|
|
63
|
+
The <b>SubmitSoapCall</b> method allows to run more complex jobs with parameters. The principle is the same, for instance calling the <b>PrepareProof</b> method
|
|
64
|
+
which takes a boolean parameter
|
|
65
|
+
</p>
|
|
66
|
+
|
|
67
|
+
<pre class="code">
|
|
68
|
+
const job = await client.jobInterface({
|
|
69
|
+
xtkschema: 'nms:delivery',
|
|
70
|
+
method: 'PrepareProof',
|
|
71
|
+
object: delivery,
|
|
72
|
+
args: [ false ]
|
|
73
|
+
});
|
|
74
|
+
</pre>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
<h1>Job Status</h1>
|
|
78
|
+
<p>
|
|
79
|
+
The status of a job is made of 3 pieces of information
|
|
80
|
+
</p>
|
|
81
|
+
<ul>
|
|
82
|
+
<li>The job status code</li>
|
|
83
|
+
<li>Job logs</li>
|
|
84
|
+
<li>Job properties which are arbitrary key value pairs and also contain progress information</li>
|
|
85
|
+
</ul>
|
|
86
|
+
|
|
87
|
+
<p>
|
|
88
|
+
For convenience, the SDK provides a <b>getStatus</b> function which will fetch and return the full job status object with strong
|
|
89
|
+
typing. When getStatus is called several time, each call will fetch the most recent status, and new logs since the previous call.
|
|
90
|
+
</p>
|
|
91
|
+
|
|
92
|
+
<table>
|
|
93
|
+
<thead>
|
|
94
|
+
<tr><th>Status code</th><th>Description</th></tr>
|
|
95
|
+
</thead>
|
|
96
|
+
<tbody>
|
|
97
|
+
<tr><td><b>0</b></td><td>Being edited</td></tr>
|
|
98
|
+
<tr><td><b>2</b></td><td>Running: execution is in progress</td></tr>
|
|
99
|
+
<tr><td><b>3</b></td><td>Canceling: a cancel request was submitted and the job will be canceld as soon as possible</td></tr>
|
|
100
|
+
<tr><td><b>4</b></td><td>Canceled</td></tr>
|
|
101
|
+
<tr><td><b>5</b></td><td>Finished: the job has finished successfully and getResult can be called</td></tr>
|
|
102
|
+
<tr><td><b>6</b></td><td>Error: the job failed. Details about the error can be found in the logs</td></tr>
|
|
103
|
+
<tr><td><b>7</b></td><td>Pause pending: a pause request was submitted and the job will be paused as soon as possible</td></tr>
|
|
104
|
+
<tr><td><b>8</b></td><td>Pause: the job is paused</td></tr>
|
|
105
|
+
<tr><td><b>9</b></td><td>Purge pending: a purge request was submitted and the job will be purged as soon as possible</td></tr>
|
|
106
|
+
</tbody>
|
|
107
|
+
</table>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
<h1>Job Progress</h1>
|
|
111
|
+
<p>
|
|
112
|
+
The progress of a job is available as 2 integers: current and max which represent the current progression and max value for progression.
|
|
113
|
+
Both values are returned by the getStatus call as properties (i.e. <b>properties.progress.current</b> and <b>properties.progress.max</b>).
|
|
114
|
+
The SDK provides the <b>getProgress</b> function to retreive the progress as a percentage (and a valid number)
|
|
115
|
+
</p>
|
|
116
|
+
|
|
117
|
+
<pre class="code">
|
|
118
|
+
// Returns progress as a percentage in the [0..1] range
|
|
119
|
+
var progressPercent = job.getProgress();
|
|
120
|
+
</pre>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<h1>Job Result</h1>
|
|
124
|
+
<p>
|
|
125
|
+
Typically, a client would call the getStatus method every few seconds to get updates on the progress. When a job is finished and successfull,
|
|
126
|
+
one can get the result using the <b>getResult</b> function
|
|
127
|
+
</p>
|
|
128
|
+
|
|
129
|
+
<pre class="code">
|
|
130
|
+
var result = await job.getResult();
|
|
131
|
+
</pre>
|
package/package-lock.json
CHANGED
package/package.json
CHANGED
package/src/application.js
CHANGED
|
@@ -255,7 +255,7 @@ class XtkSchemaNode {
|
|
|
255
255
|
* Returns a string of characters which specifies the editing type of the current node.
|
|
256
256
|
* @type {string}
|
|
257
257
|
*/
|
|
258
|
-
this.editType = EntityAccessor.getAttributeAsString(xml, "
|
|
258
|
+
this.editType = EntityAccessor.getAttributeAsString(xml, "edit");
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
261
|
* Only on the root node, returns a string which contains the folder template(s). On the other nodes, it returns undefined.
|
package/src/cacheRefresher.js
CHANGED
|
@@ -146,7 +146,7 @@ governing permissions and limitations under the License.
|
|
|
146
146
|
// Get last modified entities for the Campaign server and remove from cache last modified entities
|
|
147
147
|
async _callAndRefresh() {
|
|
148
148
|
const that = this;
|
|
149
|
-
const soapCall = this._client._prepareSoapCall("xtk:session", "GetModifiedEntities", true, this._connectionParameters._options.extraHttpHeaders);
|
|
149
|
+
const soapCall = this._client._prepareSoapCall("xtk:session", "GetModifiedEntities", true, true, this._connectionParameters._options.extraHttpHeaders);
|
|
150
150
|
|
|
151
151
|
if (this._lastTime === undefined) {
|
|
152
152
|
const storedTime = this._refresherStateCache.get("time");
|
|
@@ -191,6 +191,7 @@ governing permissions and limitations under the License.
|
|
|
191
191
|
|
|
192
192
|
// Do a soap call GetModifiedEntities instead of xtksession.GetModifiedEnties because we don't want to go through methodCache
|
|
193
193
|
// which might not contain the method GetModifiedEntities just after a build updgrade from a old version of acc
|
|
194
|
+
// This is an internal SOAP call that cannot be intercepted by observers onBeforeCall / onAfterCall
|
|
194
195
|
return this._client._makeSoapCall(soapCall)
|
|
195
196
|
.then(() => {
|
|
196
197
|
let doc = soapCall.getNextDocument();
|
package/src/campaign.js
CHANGED
|
@@ -30,7 +30,7 @@ const { Util } = require("./util.js");
|
|
|
30
30
|
static CANNOT_GET_CREDENTIALS_PASSWORD(type) { return new CampaignException(undefined, 400, 16384, `SDK-000002 Cannot get password for Credentials of type '${type}'`); }
|
|
31
31
|
static INVALID_CONNECTION_OPTIONS(options) { return new CampaignException(undefined, 400, 16384, `SDK-000003 Invalid options parameter (type '${typeof options}'). An object literal is expected`); }
|
|
32
32
|
static INVALID_REPRESENTATION(representation, details) { return new CampaignException(undefined, 400, 16384, `SDK-000004 Invalid representation '${representation}'.`, details); }
|
|
33
|
-
static CREDENTIALS_FOR_INVALID_EXT_ACCOUNT(name, type) { return new CampaignException(undefined, 400, 16384, `SDK-000005 Cannot
|
|
33
|
+
static CREDENTIALS_FOR_INVALID_EXT_ACCOUNT(name, type) { return new CampaignException(undefined, 400, 16384, `SDK-000005 Cannot create connection parameters for external account '${name}': account type ${type} not supported`); }
|
|
34
34
|
static BAD_PARAMETER(name, value, details) { return new CampaignException(undefined, 400, 16384, `SDK-000006 Bad parameter '${name}' with value '${value}'`, details); }
|
|
35
35
|
static UNEXPECTED_SOAP_RESPONSE(call, details) { return new CampaignException( call, 500, -53, `SDK-000007 Unexpected response from SOAP call`, details); }
|
|
36
36
|
static BAD_SOAP_PARAMETER(call, name, value, details) { return new CampaignException( call, 400, 16384, `SDK-000008 Bad parameter '${name}' with value '${value}'`, details); }
|