@adobe/acc-js-sdk 1.1.45 → 1.1.46
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 +10 -0
- package/package-lock.json +8 -8
- package/package.json +1 -1
- package/src/client.js +5 -3
- package/test/client.test.js +29 -0
- package/test/mock.js +45 -0
package/docs/changeLog.html
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
layout: page
|
|
3
3
|
title: Change Log
|
|
4
4
|
---
|
|
5
|
+
<section class="changelog"><h1>Version 1.1.46</h1>
|
|
6
|
+
<h2>2024/03/19</h2>
|
|
7
|
+
<li>
|
|
8
|
+
Method nms:extAccount#TestAccount could not be called because it has parameters which are both input and output (inout="inout") and this was not supported by the SDK
|
|
9
|
+
</li>
|
|
10
|
+
<li>
|
|
11
|
+
Update follow-redirects 3rd party to fix a potential vulnerability
|
|
12
|
+
</li>
|
|
13
|
+
</section>
|
|
14
|
+
|
|
5
15
|
<section class="changelog"><h1>Version 1.1.45</h1>
|
|
6
16
|
<h2>2024/01/15</h2>
|
|
7
17
|
<li>
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/acc-js-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.46",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@adobe/acc-js-sdk",
|
|
9
|
-
"version": "1.1.
|
|
9
|
+
"version": "1.1.46",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "^1.2.1",
|
|
@@ -2219,9 +2219,9 @@
|
|
|
2219
2219
|
"license": "ISC"
|
|
2220
2220
|
},
|
|
2221
2221
|
"node_modules/follow-redirects": {
|
|
2222
|
-
"version": "1.15.
|
|
2223
|
-
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.
|
|
2224
|
-
"integrity": "sha512-
|
|
2222
|
+
"version": "1.15.6",
|
|
2223
|
+
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
|
2224
|
+
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
|
2225
2225
|
"funding": [
|
|
2226
2226
|
{
|
|
2227
2227
|
"type": "individual",
|
|
@@ -6186,9 +6186,9 @@
|
|
|
6186
6186
|
"dev": true
|
|
6187
6187
|
},
|
|
6188
6188
|
"follow-redirects": {
|
|
6189
|
-
"version": "1.15.
|
|
6190
|
-
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.
|
|
6191
|
-
"integrity": "sha512-
|
|
6189
|
+
"version": "1.15.6",
|
|
6190
|
+
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
|
6191
|
+
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA=="
|
|
6192
6192
|
},
|
|
6193
6193
|
"form-data": {
|
|
6194
6194
|
"version": "4.0.0",
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -2043,7 +2043,9 @@ class Client {
|
|
|
2043
2043
|
const inout = DomUtil.getAttributeAsString(param, "inout");
|
|
2044
2044
|
const type = DomUtil.getAttributeAsString(param, "type");
|
|
2045
2045
|
const paramName = DomUtil.getAttributeAsString(param, "name");
|
|
2046
|
-
|
|
2046
|
+
const isIn = !inout || inout=="in" || inout=="inout";
|
|
2047
|
+
const isOut = inout=="out" || inout=="inout";
|
|
2048
|
+
if (isIn) {
|
|
2047
2049
|
let paramValue = parametersIsArray ? parameters[paramIndex] : parameters;
|
|
2048
2050
|
const inputParam = {
|
|
2049
2051
|
name: paramName,
|
|
@@ -2053,13 +2055,13 @@ class Client {
|
|
|
2053
2055
|
inputParams.push(inputParam);
|
|
2054
2056
|
paramIndex = paramIndex + 1;
|
|
2055
2057
|
}
|
|
2056
|
-
|
|
2058
|
+
if (isOut) {
|
|
2057
2059
|
outputParams.push({
|
|
2058
2060
|
name: paramName,
|
|
2059
2061
|
type: type,
|
|
2060
2062
|
});
|
|
2061
2063
|
}
|
|
2062
|
-
|
|
2064
|
+
if( !isIn && !isOut) {
|
|
2063
2065
|
throw CampaignException.BAD_PARAMETER("inout", inout, `Parameter '${paramName}' of schema '${entitySchemaId}' is not correctly defined as an input or output parameter`);
|
|
2064
2066
|
}
|
|
2065
2067
|
param = DomUtil.getNextSiblingElement(param, "param");
|
package/test/client.test.js
CHANGED
|
@@ -4351,4 +4351,33 @@ describe('ACC Client', function () {
|
|
|
4351
4351
|
expect(result[1].serverInfo.buildNumber).toBe("9219");
|
|
4352
4352
|
});
|
|
4353
4353
|
});
|
|
4354
|
+
|
|
4355
|
+
describe("Test inout parameter", () => {
|
|
4356
|
+
it("Call testAccount with inout parameter", async () => {
|
|
4357
|
+
const client = await Mock.makeClient();
|
|
4358
|
+
client._transport.mockReturnValueOnce(Mock.LOGON_RESPONSE);
|
|
4359
|
+
await client.NLWS.xtkSession.logon();
|
|
4360
|
+
|
|
4361
|
+
client._transport.mockReturnValueOnce(Mock.GET_NMS_EXTACCOUNT_SCHEMA_WITH_METHODS_RESPONSE);
|
|
4362
|
+
|
|
4363
|
+
client._transport.mockReturnValueOnce(Promise.resolve(`<?xml version='1.0'?>
|
|
4364
|
+
<SOAP-ENV:Envelope
|
|
4365
|
+
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
|
|
4366
|
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
|
|
4367
|
+
xmlns:ns='urn:nms:extAccount'
|
|
4368
|
+
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
|
|
4369
|
+
<SOAP-ENV:Body>
|
|
4370
|
+
<TestAccountResponse
|
|
4371
|
+
xmlns='urn:nms:extAccount' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
|
|
4372
|
+
<pstrServer xsi:type='xsd:string'>localhost</pstrServer>
|
|
4373
|
+
<pstrDbmsVer xsi:type='xsd:string'>Database server version 'PostgreSQL 12.2, compiled by Visual C++ build 1914, 64-bit'.</pstrDbmsVer>
|
|
4374
|
+
<pstrWarehouse xsi:type='xsd:string'></pstrWarehouse>
|
|
4375
|
+
<pstrTestDuration xsi:type='xsd:string'>Test connection took: 0 ms</pstrTestDuration>
|
|
4376
|
+
</TestAccountResponse>
|
|
4377
|
+
</SOAP-ENV:Body>
|
|
4378
|
+
</SOAP-ENV:Envelope>`));
|
|
4379
|
+
|
|
4380
|
+
const result = await client.NLWS.nmsExtAccount.testAccount(7, true, "PostgreSQL:localhost", "postgres", "password", "NChar=0;unicodeData=1;timezone=_server_;dbSchema=public;fileMethod=uploadFile;filePath=", "pg2", 0);
|
|
4381
|
+
});
|
|
4382
|
+
});
|
|
4354
4383
|
});
|
package/test/mock.js
CHANGED
|
@@ -567,6 +567,50 @@ const GET_NMS_EXTACCOUNT_SCHEMA_RESPONSE = Promise.resolve(`<?xml version='1.0'?
|
|
|
567
567
|
</SOAP-ENV:Body>
|
|
568
568
|
</SOAP-ENV:Envelope>`);
|
|
569
569
|
|
|
570
|
+
const GET_NMS_EXTACCOUNT_SCHEMA_WITH_METHODS_RESPONSE = Promise.resolve(`<?xml version='1.0'?>
|
|
571
|
+
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ns='urn:wpp:default' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
|
|
572
|
+
<SOAP-ENV:Body>
|
|
573
|
+
<GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
|
|
574
|
+
<pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
|
|
575
|
+
<schema name="extAccount" namespace="nms" xtkschema="xtk:schema">
|
|
576
|
+
<enumeration basetype="byte" default="delivery" name="type">
|
|
577
|
+
<value name="bounces" value="0"/>
|
|
578
|
+
<value name="hdfs" value="17"/>
|
|
579
|
+
</enumeration>
|
|
580
|
+
<enumeration basetype="byte" default="none" name="encryptionType">
|
|
581
|
+
<value name="none" value="0"/>
|
|
582
|
+
<value name="ssl" value="1"/>
|
|
583
|
+
</enumeration>
|
|
584
|
+
<element name="extAccount"></element>
|
|
585
|
+
<methods>
|
|
586
|
+
<method name="TestAccount" static="true">
|
|
587
|
+
<help>Performs a connection test</help>
|
|
588
|
+
<parameters>
|
|
589
|
+
<param name="type" type="byte" desc="Account type"/>
|
|
590
|
+
<param name="active" type="boolean" desc="Is account active"/>
|
|
591
|
+
<param name="server" type="string" desc="Server address" inout="inout"/>
|
|
592
|
+
<param name="account" type="string" desc="Name (or login) of account"/>
|
|
593
|
+
<param name="password" type="string" desc="Password associated with account"/>
|
|
594
|
+
<param name="port" type="string" desc="Server port"/>
|
|
595
|
+
<param name="options" type="string" desc="Connection options"/>
|
|
596
|
+
<param name="name" type="string" desc="Account name" optional="true"/>
|
|
597
|
+
<param name="oauth" type="boolean" desc="OAUth 2.0 activation"/>
|
|
598
|
+
<param name="azureTenant" type="string" desc="Azure tenant" optional="true"/>
|
|
599
|
+
<param name="clientId" type="string" desc="Azure client Id" optional="true"/>
|
|
600
|
+
<param name="clientSecret" type="string" desc="Azure client secret" optional="true"/>
|
|
601
|
+
<param name="redirectUrl" type="string" desc="Azure redirect url" optional="true"/>
|
|
602
|
+
<param name="dbmsVer" type="string" desc="DBMS Version" inout="out" optional="true"/>
|
|
603
|
+
<param name="warehouse" type="string" desc="Warehouse name" inout="out" optional="true"/>
|
|
604
|
+
<param name="testDuration" type="string" desc="Formatted string displaying connection time in ms" inout="out" optional="true"/>
|
|
605
|
+
</parameters>
|
|
606
|
+
</method>
|
|
607
|
+
</methods>
|
|
608
|
+
</schema>
|
|
609
|
+
</pdomDoc>
|
|
610
|
+
</GetEntityIfMoreRecentResponse>
|
|
611
|
+
</SOAP-ENV:Body>
|
|
612
|
+
</SOAP-ENV:Envelope>`);
|
|
613
|
+
|
|
570
614
|
const GET_XTK_IMPL_SCHEMA_RESPONSE = Promise.resolve(`<?xml version='1.0'?>
|
|
571
615
|
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ns='urn:wpp:default' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
|
|
572
616
|
<SOAP-ENV:Body>
|
|
@@ -1061,6 +1105,7 @@ exports.Mock = {
|
|
|
1061
1105
|
GET_LOGON_MID_RESPONSE: GET_LOGON_MID_RESPONSE,
|
|
1062
1106
|
GET_TSTCNX_RESPONSE: GET_TSTCNX_RESPONSE,
|
|
1063
1107
|
GET_NMS_EXTACCOUNT_SCHEMA_RESPONSE: GET_NMS_EXTACCOUNT_SCHEMA_RESPONSE,
|
|
1108
|
+
GET_NMS_EXTACCOUNT_SCHEMA_WITH_METHODS_RESPONSE: GET_NMS_EXTACCOUNT_SCHEMA_WITH_METHODS_RESPONSE,
|
|
1064
1109
|
GET_XTK_ALL_SCHEMA_RESPONSE: GET_XTK_ALL_SCHEMA_RESPONSE,
|
|
1065
1110
|
GET_XTK_IMPL_SCHEMA_RESPONSE: GET_XTK_IMPL_SCHEMA_RESPONSE,
|
|
1066
1111
|
GET_XTK_ALL_TYPES_RESPONSE: GET_XTK_ALL_TYPES_RESPONSE,
|