@adobe/acc-js-sdk 1.1.13 → 1.1.14
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/docs/changeLog.html +6 -0
- package/package-lock.json +1 -1
- package/package.json +1 -1
- package/src/client.js +7 -0
- package/test/client.test.js +22 -0
- package/test/mock.js +5 -0
package/docs/changeLog.html
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
layout: page
|
|
3
3
|
title: Change Log
|
|
4
4
|
---
|
|
5
|
+
<section class="changelog"><h1>Version 1.1.14</h1>
|
|
6
|
+
<h2>2022/11/25</h2>
|
|
7
|
+
|
|
8
|
+
<li>Fix a bug calling the nms:seedMember#getAsModel method. This method starts with a lower case letter (unlike other methods which start with an upper case) which was not propertly handled by the SDK</li>
|
|
9
|
+
</section>
|
|
10
|
+
|
|
5
11
|
<section class="changelog"><h1>Version 1.1.13</h1>
|
|
6
12
|
<h2>2022/11/24</h2>
|
|
7
13
|
|
package/package-lock.json
CHANGED
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -1480,6 +1480,13 @@ class Client {
|
|
|
1480
1480
|
throw CampaignException.SOAP_UNKNOWN_METHOD(schemaId, methodName, `Schema '${schemaId}' not found`);
|
|
1481
1481
|
var schemaName = schema.getAttribute("name");
|
|
1482
1482
|
var method = that._methodCache.get(schemaId, methodName);
|
|
1483
|
+
if (!method) {
|
|
1484
|
+
// first char of the method name may be lower case (ex: nms:seedMember.getAsModel) but the methodName
|
|
1485
|
+
// variable has been capitalized. Make an attempt to lookup method name without capitalisation
|
|
1486
|
+
const methodNameLC = methodName.substring(0, 1).toLowerCase() + methodName.substring(1);
|
|
1487
|
+
method = that._methodCache.get(schemaId, methodNameLC);
|
|
1488
|
+
if (method) methodName = methodNameLC;
|
|
1489
|
+
}
|
|
1483
1490
|
if (!method) {
|
|
1484
1491
|
this._methodCache.put(schema);
|
|
1485
1492
|
method = that._methodCache.get(schemaId, methodName);
|
package/test/client.test.js
CHANGED
|
@@ -847,6 +847,28 @@ describe('ACC Client', function () {
|
|
|
847
847
|
client._transport.mockReturnValueOnce(Mock.LOGON_RESPONSE);
|
|
848
848
|
await client.NLWS.xtkSession.logon();
|
|
849
849
|
|
|
850
|
+
client._transport.mockReturnValueOnce(Mock.GET_XTK_SESSION_SCHEMA_RESPONSE);
|
|
851
|
+
client._transport.mockReturnValueOnce(Promise.resolve(`<?xml version='1.0'?>
|
|
852
|
+
<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/'>
|
|
853
|
+
<SOAP-ENV:Body>
|
|
854
|
+
<startsWithLowerCaseResponse xmlns='urn:xtk:session' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
|
|
855
|
+
<presult xsi:type='xsd:int'>44</presult>
|
|
856
|
+
</startsWithLowerCaseResponse>
|
|
857
|
+
</SOAP-ENV:Body>
|
|
858
|
+
</SOAP-ENV:Envelope>`));
|
|
859
|
+
|
|
860
|
+
const response = await client.NLWS.xtkSession.startsWithLowerCase()
|
|
861
|
+
expect(response).toBe(44);
|
|
862
|
+
|
|
863
|
+
client._transport.mockReturnValueOnce(Mock.LOGOFF_RESPONSE);
|
|
864
|
+
await client.NLWS.xtkSession.logoff();
|
|
865
|
+
});
|
|
866
|
+
|
|
867
|
+
it("Should support methods starting with a lower case letter", async () => {
|
|
868
|
+
const client = await Mock.makeClient();
|
|
869
|
+
client._transport.mockReturnValueOnce(Mock.LOGON_RESPONSE);
|
|
870
|
+
await client.NLWS.xtkSession.logon();
|
|
871
|
+
|
|
850
872
|
client._transport.mockReturnValueOnce(Mock.GET_XTK_SESSION_SCHEMA_RESPONSE);
|
|
851
873
|
await expect(client.NLWS.xtkSession.nonStatic()).rejects.toMatchObject({ errorCode: "SDK-000009" });
|
|
852
874
|
|
package/test/mock.js
CHANGED
|
@@ -275,6 +275,11 @@ const GET_XTK_SESSION_SCHEMA_RESPONSE = Promise.resolve(`<?xml version='1.0'?>
|
|
|
275
275
|
<param name="name" type="string"/>
|
|
276
276
|
</parameters>
|
|
277
277
|
</method>
|
|
278
|
+
<method name="startsWithLowerCase" static="true">
|
|
279
|
+
<parameters>
|
|
280
|
+
<param name="result" type="long" inout="out"/>
|
|
281
|
+
</parameters>
|
|
282
|
+
</method>
|
|
278
283
|
</methods>
|
|
279
284
|
</schema>
|
|
280
285
|
</pdomDoc>
|