@adobe/acc-js-sdk 1.1.10 → 1.1.11
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/README.md +8 -2170
- package/docs/404.html +11 -0
- package/docs/Gemfile +35 -0
- package/docs/Gemfile.lock +270 -0
- package/docs/_config.yml +55 -0
- package/docs/_data/navigation.yml +119 -0
- package/docs/_includes/navigation.html +33 -0
- package/docs/_layouts/default.html +21 -0
- package/docs/_layouts/home.html +4 -0
- package/docs/_layouts/page.html +5 -0
- package/docs/_layouts/post.html +7 -0
- package/docs/_posts/2022-10-14-welcome.html +149 -0
- package/docs/application.html +366 -0
- package/docs/architecture.html +24 -0
- package/docs/assets/css/styles.css +362 -0
- package/docs/assets/images/adobe-campaign-256.png +0 -0
- package/docs/assets/images/architecture.png +0 -0
- package/docs/assets/images/ref.svg +6 -0
- package/docs/badgerFish.html +14 -0
- package/docs/bestPractices.html +189 -0
- package/docs/blog.html +18 -0
- package/docs/buildAndRun.html +96 -0
- package/docs/caches.html +68 -0
- package/docs/changeLog.html +256 -0
- package/docs/checkList.html +168 -0
- package/docs/concepts.html +130 -0
- package/docs/connecting.html +210 -0
- package/docs/connectionParameters.html +109 -0
- package/docs/contribute.html +54 -0
- package/docs/dataTypes.html +124 -0
- package/docs/differences.html +4 -0
- package/docs/documentation.html +21 -0
- package/docs/domHelper.html +88 -0
- package/docs/dynamicInvoke.html +36 -0
- package/docs/entityAccessor.html +22 -0
- package/docs/errors.html +47 -0
- package/docs/escaping.html +76 -0
- package/docs/favicon.png +0 -0
- package/docs/healthCheck.html +66 -0
- package/docs/httpHeaders.html +78 -0
- package/docs/index.html +64 -0
- package/docs/installation.html +34 -0
- package/docs/license.html +208 -0
- package/docs/messageCenter.html +80 -0
- package/docs/methodLevelRepresentation.html +12 -0
- package/docs/midSourcing.html +19 -0
- package/docs/observability.html +169 -0
- package/docs/passwords.html +27 -0
- package/docs/profiles.html +103 -0
- package/docs/pushDown.html +13 -0
- package/docs/quickstart.html +69 -0
- package/docs/release.html +52 -0
- package/docs/samples.html +82 -0
- package/docs/simpleJson.html +88 -0
- package/docs/soapAPIs.html +234 -0
- package/docs/timeouts.html +23 -0
- package/docs/transport.html +45 -0
- package/docs/troubleshooting.html +17 -0
- package/docs/writeDoc.html +208 -0
- package/docs/xml2json.html +96 -0
- package/docs/xtkCaster.html +67 -0
- package/docs/xtkInterface.html +20 -0
- package/docs/xtkOption.html +54 -0
- package/docs/xtkPackage.html +16 -0
- package/docs/xtkPersist.html +213 -0
- package/docs/xtkQueryDef.html +245 -0
- package/docs/xtkSchema.html +39 -0
- package/docs/xtkSession.html +29 -0
- package/docs/xtkWorkflow.html +28 -0
- package/docs/xtkWrite.html +51 -0
- package/package-lock.json +1 -1
- package/package.json +1 -1
- package/src/campaign.js +1 -1
- package/src/soap.js +6 -6
- package/test/soap.test.js +13 -0
- package/CHANGELOG.md +0 -252
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
title: Session API
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<p>The <b>xtk:session</b> schema contains APIs to manage sessions and connections to the Campaign server, plus some other general purpose APIs.</p>
|
|
7
|
+
|
|
8
|
+
<h1>Logging on and off</h1>
|
|
9
|
+
|
|
10
|
+
<p>
|
|
11
|
+
The <b>xtk:session</b> schema contains all the methods for logging on and off. They are described in more details in the <a href="{{ site.baseurl }}/connecting.html">Connecting to Campaign</a> page
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<h1>Server time</h1>
|
|
19
|
+
|
|
20
|
+
<p>
|
|
21
|
+
The <b>xtk:session#GetServerTime</b> API call returns the current data/time in the server (i.e. database) referential. This is a useful function
|
|
22
|
+
to use to make sure all timestamps are in the same referential.
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
<pre class="code">
|
|
26
|
+
const timestamp = await NLWS.xtkSession.getServerTime();
|
|
27
|
+
console.log(`>> Server timestamp (UTC): ${timestamp.toUTCString()}`);
|
|
28
|
+
console.log(`>> Server timestamp (localized): ${timestamp}`);
|
|
29
|
+
</pre>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
title: Workflow API
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<p>Start and stop wotkflows, passing either an id or workflow internal name</p>
|
|
7
|
+
|
|
8
|
+
<pre class="code">
|
|
9
|
+
await NLWS.xtkWorkflow.stop(4900);
|
|
10
|
+
await NLWS.xtkWorkflow.start(4900);
|
|
11
|
+
</pre>
|
|
12
|
+
|
|
13
|
+
<p>A workflow can be started with parameters. Variables, are passed as attributes of the parameters document.</p>
|
|
14
|
+
<pre class="code">
|
|
15
|
+
await NLWS.xtkWorkflow.startWithParameters(4900, { hello: "world" });
|
|
16
|
+
</pre>
|
|
17
|
+
|
|
18
|
+
<p>The variables can be used in the workflow as attributes of the <b>instance.vars</b> variable.</p>
|
|
19
|
+
|
|
20
|
+
<pre class="code">
|
|
21
|
+
logInfo(instance.vars.hello);
|
|
22
|
+
</pre>
|
|
23
|
+
|
|
24
|
+
<p class="warning">
|
|
25
|
+
Note that workflows are executed asynchronously by Campaign. When the promise returned by the start
|
|
26
|
+
function resolves, the workflow is not finished. The promise resolution indicates that the request
|
|
27
|
+
to start (or stop) the workflow has been accepted by the server.
|
|
28
|
+
</p>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
title: Writer API
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<p>More details on the CRUD API <a href="{{ site.baseurl }}/xtkPersist.html">here</a>.</p>
|
|
7
|
+
|
|
8
|
+
<p>Creates an image (data is base64 encoded)</p>
|
|
9
|
+
|
|
10
|
+
<pre class="code">
|
|
11
|
+
var data = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA9ElEQVQ4jaXTIUsFQRSG4eeKiBjEIBeDYDGoSUwGm81s8SdYtIhFhPMDbEaz/SIIZkGbWg1Gg0GwiIgYZPZuWBxn8bJvWXb2O+/scM70lAhjuMO1sF9IVaES61jFnjBbyLQKjurnJz6yr62CsI2t+m0gRhGERZw1Vk6zTFEQ+rjETOP3b7OqBr1G8SRusPYrc4I3LGCeapN37AqP443g8R/FiYNsZcgGSRCmq1ZxmEXa6Yt0hKh6/dAaLbOcd+H/XOGpi2AFU10EqWsTXQQ7wmsSPNdzP8DXCII0D41BSgxvXboHm1jCXDpnPbHfeME9znEh+AFoTyfEnWJgLQAAAABJRU5ErkJggg==";
|
|
12
|
+
var doc = {
|
|
13
|
+
xtkschema: "xtk:image",
|
|
14
|
+
_operation: "insert",
|
|
15
|
+
namespace: "cus",
|
|
16
|
+
name: "test.png",
|
|
17
|
+
label: "Self test",
|
|
18
|
+
type: "png",
|
|
19
|
+
$data: data
|
|
20
|
+
};
|
|
21
|
+
await NLWS.xtkSession.write(doc);
|
|
22
|
+
</pre>
|
|
23
|
+
|
|
24
|
+
<p>Creates a folder (with image previously created)</p>
|
|
25
|
+
|
|
26
|
+
<pre class="code">
|
|
27
|
+
const folder = {
|
|
28
|
+
xtkschema: "xtk:folder",
|
|
29
|
+
_operation: "insert",
|
|
30
|
+
parent-id: 1167,
|
|
31
|
+
name: "testSDK",
|
|
32
|
+
label: "Test SDK",
|
|
33
|
+
entity: "xtk:folder",
|
|
34
|
+
schema: "xtk:folder",
|
|
35
|
+
model: "xtkFolder",
|
|
36
|
+
"image-namespace": "cus",
|
|
37
|
+
"image-name": "test.png"
|
|
38
|
+
};
|
|
39
|
+
await NLWS.xtkSession.write(folder);
|
|
40
|
+
</pre>
|
|
41
|
+
|
|
42
|
+
<p>Some objects, such as deliveries are created from templates. The `createFromModel` API is preferred in this case. Given a template name, and a patch object, it will return an object created from the template and the patch, applying all sort of business rules and default values. This object can be inserted using a writer.</p>
|
|
43
|
+
|
|
44
|
+
<p>In this example, an email delivery is created from the "mail" delivery template and it's label is set to "Hello".</p>
|
|
45
|
+
|
|
46
|
+
<p class="info">Note the xtkschema attribute in the second parameter of the `createFromModel` API call which is needed for the SDK to perform the proper JSON to XML transformation.</p>
|
|
47
|
+
|
|
48
|
+
<pre class="code">
|
|
49
|
+
const mail = await client.NLWS.nmsDelivery.createFromModel('mail', { xtkschema:'nms:delivery', label:'Hello'});
|
|
50
|
+
await client.NLWS.xtkSession.write(mail);
|
|
51
|
+
</pre>
|
package/package-lock.json
CHANGED
package/package.json
CHANGED
package/src/campaign.js
CHANGED
|
@@ -204,7 +204,7 @@ const { Util } = require("./util.js");
|
|
|
204
204
|
* @private
|
|
205
205
|
* @param {SoapMethodCall} call the SOAP call
|
|
206
206
|
* @param {*} err the exception causing the SOAP call.
|
|
207
|
-
* @returns {CampaignException} a
|
|
207
|
+
* @returns {CampaignException} a CampaignException object wrapping the error
|
|
208
208
|
* @memberof Campaign
|
|
209
209
|
*/
|
|
210
210
|
function makeCampaignException(call, err) {
|
package/src/soap.js
CHANGED
|
@@ -218,7 +218,7 @@ class SoapMethodCall {
|
|
|
218
218
|
* @param {string} tag the parameter name
|
|
219
219
|
* @param {*} value the parameter value, which will be casted to a int32 according to xtk rules
|
|
220
220
|
*/
|
|
221
|
-
|
|
221
|
+
writeLong(tag, value) {
|
|
222
222
|
value = XtkCaster.asLong(value);
|
|
223
223
|
this._addNode(tag, "xsd:int", XtkCaster.asString(value), SOAP_ENCODING_NATIVE);
|
|
224
224
|
}
|
|
@@ -356,7 +356,7 @@ class SoapMethodCall {
|
|
|
356
356
|
*
|
|
357
357
|
* @returns {string} the string result value
|
|
358
358
|
*/
|
|
359
|
-
|
|
359
|
+
getNextString() {
|
|
360
360
|
this._checkTypeMatch("xsd:string");
|
|
361
361
|
var value = DomUtil.elementValue(this.elemCurrent);
|
|
362
362
|
this.elemCurrent = DomUtil.getNextSiblingElement(this.elemCurrent);
|
|
@@ -368,7 +368,7 @@ class SoapMethodCall {
|
|
|
368
368
|
*
|
|
369
369
|
* @returns {string} the primary key string result value
|
|
370
370
|
*/
|
|
371
|
-
|
|
371
|
+
getNextPrimaryKey() {
|
|
372
372
|
this._checkTypeMatch("xsd:primarykey");
|
|
373
373
|
var value = DomUtil.elementValue(this.elemCurrent);
|
|
374
374
|
this.elemCurrent = DomUtil.getNextSiblingElement(this.elemCurrent);
|
|
@@ -630,8 +630,6 @@ class SoapMethodCall {
|
|
|
630
630
|
const that = this;
|
|
631
631
|
const promise = this._transport(this.request, this.requestOptions);
|
|
632
632
|
return promise.then(function(body) {
|
|
633
|
-
if (body.indexOf(`XSV-350008`) != -1)
|
|
634
|
-
throw CampaignException.SESSION_EXPIRED();
|
|
635
633
|
that.response = body;
|
|
636
634
|
// Response is a serialized XML document with the following structure
|
|
637
635
|
//
|
|
@@ -685,7 +683,9 @@ class SoapMethodCall {
|
|
|
685
683
|
}
|
|
686
684
|
})
|
|
687
685
|
.catch(function(err) {
|
|
688
|
-
|
|
686
|
+
if (that.response && that.response.indexOf(`XSV-350008`) != -1)
|
|
687
|
+
throw CampaignException.SESSION_EXPIRED();
|
|
688
|
+
else throw makeCampaignException(that, err);
|
|
689
689
|
});
|
|
690
690
|
}
|
|
691
691
|
|
package/test/soap.test.js
CHANGED
|
@@ -539,6 +539,19 @@ describe('SOAP', function() {
|
|
|
539
539
|
});
|
|
540
540
|
});
|
|
541
541
|
|
|
542
|
+
it("Should not throw sesion expired exception", function() {
|
|
543
|
+
const transport = function() {
|
|
544
|
+
return Promise.resolve(makeSOAPResponse("Date",
|
|
545
|
+
"p", "xsd:string", "XSV-350008 Session has expired or is invalid. Please reconnect.",
|
|
546
|
+
));
|
|
547
|
+
};
|
|
548
|
+
const call = makeSoapMethodCall(transport, "xtk:session", "Date", "$session$", "$security$");
|
|
549
|
+
call.finalize(URL);
|
|
550
|
+
return call.execute().then(() => {
|
|
551
|
+
expect(call.getNextString()).toBe("XSV-350008 Session has expired or is invalid. Please reconnect.");
|
|
552
|
+
});
|
|
553
|
+
});
|
|
554
|
+
|
|
542
555
|
it("Should should read Element response", function() {
|
|
543
556
|
const xml = '<root att="Hello"><child/></root>';
|
|
544
557
|
const transport = function() {
|
package/CHANGELOG.md
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
# Adobe Campaign Classic (ACC) SDK in JavaScript (node.js and browser)
|
|
2
|
-
|
|
3
|
-
This is a node.js SDK for Campaign API. It exposes the Campaign API exactly like it is used inside Campaign using the NLWS notation.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# Changelog
|
|
7
|
-
|
|
8
|
-
## Version 1.1.10
|
|
9
|
-
_2022/10/13_
|
|
10
|
-
|
|
11
|
-
* Added support for `primaryKey` type
|
|
12
|
-
* Added support for the `xtk:persist` interface
|
|
13
|
-
* Added support for schema belongsTo attribute
|
|
14
|
-
|
|
15
|
-
## Version 1.1.9
|
|
16
|
-
_2022/10/11_
|
|
17
|
-
|
|
18
|
-
* Added support for schema visibleIf attribute
|
|
19
|
-
|
|
20
|
-
## Version 1.1.8
|
|
21
|
-
_2022/10/03_
|
|
22
|
-
|
|
23
|
-
* Added translation ids (`labelLocalizationId`,`descriptionLocalizationId`, `labelSingularLocalizationId`) for `XtkSchema`, `XtkSchemaNode`, `XtkEnumerationValue` and `XtkEnumeration`
|
|
24
|
-
|
|
25
|
-
## Version 1.1.7
|
|
26
|
-
_2022/08/30_
|
|
27
|
-
|
|
28
|
-
* New listener interface to be notified of internal events from the SDK. Can be used to integrate with observability frameworks. See the "Observers" section of the README file.
|
|
29
|
-
* Experimental file upload feature. Will require server-side changes to work, and is currently limited to be used with browsers only.
|
|
30
|
-
|
|
31
|
-
## Version 1.1.6
|
|
32
|
-
_2022/08/19_
|
|
33
|
-
|
|
34
|
-
* New auto-refresh mechanism to keep schemas and option caches up-to-date. See `client.startRefreshCaches` and `client.stopRefreshCaches` functions.
|
|
35
|
-
|
|
36
|
-
## Version 1.1.5
|
|
37
|
-
_2022/07/07_
|
|
38
|
-
|
|
39
|
-
* The SOAP method name was not showing up properly in the Chrome console
|
|
40
|
-
|
|
41
|
-
## Version 1.1.4
|
|
42
|
-
_2022/07/07_
|
|
43
|
-
|
|
44
|
-
* Added `application.version` which returns the server version in the format major.minor.servicePack (ex: 8.2.10)
|
|
45
|
-
* Added the ability to push down parameters to the SOAP and transport layers. See the pushDown section of the readme file.
|
|
46
|
-
* The pushDown mechanism can be used to simply overwrite the request timeout, either globally or at the method level
|
|
47
|
-
* Publicly export the HttpError class so that custom transports can be written more safely. A failure during transport should return an HttpError object
|
|
48
|
-
* By default, the SOAP method name is now added in the URLs for better troubleshooting
|
|
49
|
-
|
|
50
|
-
## Version 1.1.3
|
|
51
|
-
_2022/05/30_
|
|
52
|
-
|
|
53
|
-
* Fix a bug in client.hasPackage which was returning an incorrect result when passed a single parameter (it would always return false). Fixed the corresponding unit test too.
|
|
54
|
-
* Fix a bug causing API calls having a input parameter of type "int" to fail. Usually the type is described as "long", but sometimes "int" is used instead, such as, for instance, in the nms:extAccount#UpdateMCSynchWkf method.
|
|
55
|
-
* When using XML representations and DOMDocument method parameter type, the SDK expects to be passed an actual DOM document. Now it supports being passed a DOM element too. This is a common case when using the nms:delivery#createFromModel API followed by a xtk:session#Write API call.
|
|
56
|
-
* Avoid the error 'Cannot transform entity to xml because no XML root name was given' by using SOAP method parameter name as the default for XML document root when no other root is available
|
|
57
|
-
* Document how to set the password of an external account
|
|
58
|
-
* By default, SDK will send additional HTTP headers to help troubleshooting and usage tracking
|
|
59
|
-
* Add the ability to pass extra HTTP headers to API calls, either globally (to all HTTP headers), or locally, i.e. for a specific method
|
|
60
|
-
* Remove .vscode folder from the sources
|
|
61
|
-
* Example for xtkBuilder.installPackage API
|
|
62
|
-
* For APIs which have parameters of type DOMElement and which are called using XML, support passing either a DOMElement or a DOMDocument
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## Version 1.1.2
|
|
66
|
-
_2022/03/22_
|
|
67
|
-
|
|
68
|
-
* Add support for choosing the representation (XML or JSON) at the method level using NLWS.xml or NLWS.json.
|
|
69
|
-
|
|
70
|
-
## Version 1.1.1
|
|
71
|
-
_2022/03/10_
|
|
72
|
-
|
|
73
|
-
* Fixed an issue with encoding: make the default charset encoding to be UTF-8 (https://github.com/adobe/acc-js-sdk/issues/26)
|
|
74
|
-
|
|
75
|
-
## Version 1.1.0
|
|
76
|
-
_2022/03/05_
|
|
77
|
-
|
|
78
|
-
Changes in the metadata api (`application.getSchema`) which was not completely implemented. While this API is meant to be largely compatible with the [ACC JS API](https://docs.adobe.com/content/help/en/campaign-classic/technicalresources/api/c-Application.html), it's not always possible to do so because of the asynchronous nature of the SDK. The JS API is executed inside the Campaign application server can will synchronously and transparently fetch schemas as needed. Howerer the SDK runs outside of the Campaign server. It will synchronously and transparently fetch schemas as needed, but this will be done adynchronously.
|
|
79
|
-
|
|
80
|
-
Differences are document in the `Application` section of the README.
|
|
81
|
-
|
|
82
|
-
* Provide array and map access to XtkSchemaKey.fields,
|
|
83
|
-
* The order of children of a node has been changed. Beore 1.1.0, it was attributes, then elements. After 1.1.0, it's the order defined in the schema XML
|
|
84
|
-
* New application.getEnumeration function to retreive an enumeration
|
|
85
|
-
* Removed the XtkSchemaNode.hasChild function
|
|
86
|
-
* Support for ref nodes and links: XtkSchemaNode.refTarget(), XtkSchemaNode.linkTarget() functions
|
|
87
|
-
* Reviews XtkSchemaNode.findNode() function to support links, refs, ANY type, etc. and is now asynchronous
|
|
88
|
-
* The name attribute of enumerations (`XtkEnumeration.name`) is now the fully qualified name of the enumeration, i.e. is prefixed by the schema id
|
|
89
|
-
|
|
90
|
-
## Version 1.0.9
|
|
91
|
-
_2022/03/02_
|
|
92
|
-
|
|
93
|
-
* Ability to invoke SOAP calls dynamically with parameters computed at invocation time by a delegate function
|
|
94
|
-
* Fixed bug in XPath constructor which now supports expanded paths, i.e. xpaths such as `[@recipient-id]`.
|
|
95
|
-
* EntityAccessor: change the heuristic to detect XML types: use "nodeType" and "tagName" functions instead of "insertAdjacentElement" (which was not always working in the context of a React application)
|
|
96
|
-
* Add new escaping functions: `escapeForLike`, `expandXPath`, `unexpandXPath`, `xtkConstText`
|
|
97
|
-
* New XtkCaster methods: `asDatetime` (alias to `asTimestamp`), `isStringType`, and `isNumericType`
|
|
98
|
-
* Metadata API (application.getSchema)
|
|
99
|
-
* keys have a `isInternal` internal attribute which was mistakenly using the "string" type. It's now correctly using the boolean type.
|
|
100
|
-
* Added missing attributes on the XtkSchema: md5
|
|
101
|
-
* Added missing attributes on the XtkSchemaNode objects: dataPolicy, editType folderModel, enumerationImage, size, userEnumeration, hasUserEnumeration, isCollection,
|
|
102
|
-
isAdvanced, isAnyType, isLink, hasEnumeration, hasSQLTable, SQLName, SQLTable, isMappedAsXML, isTemporaryTable, isElementOnly, isDefaultOnDuplicate, isExternalJoin,
|
|
103
|
-
isMemo, isMemoData, isBlob, isCDATA, isNotNull, isRequired, isSQL, PKSequence, revLink, isCalculated, expr, isAutoIncrement, isAutoPK, isAutoUUID, isAutoStg, packageStatusString, and packageStatus
|
|
104
|
-
* Attribute type defaults to string if not set
|
|
105
|
-
* Removed userDescription attribut from schema nodes (only available at the schema level)
|
|
106
|
-
* Changed the toString function to use 4 spaces instead of 3 for indentation and display node label and internal name
|
|
107
|
-
* When label or description is missing from schema nodes or from enumerations, they default to the name value
|
|
108
|
-
* application.getSchema now uses a in-memory cache
|
|
109
|
-
|
|
110
|
-
For breaking changes see the [migration guide](MIGRATION.md)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
## Version 1.0.7
|
|
114
|
-
_2022/01/24_
|
|
115
|
-
* Added a hook `refreshClient` on connection parameters. This is a callback called when an authentication token expires. It can be used to implement reconnection logic
|
|
116
|
-
* New attributes on the schema API (application.getSchema)
|
|
117
|
-
* The `enum` attribute of a schema node returns the corresponding enum attribute, i.e. the enumeration name
|
|
118
|
-
* The `target` attribute of a schema node (of type link) returns the target (schema id) of the link
|
|
119
|
-
* The `integrity` attribute of a schema node (of type link) returns the link integrity ("define", "own", etc.)
|
|
120
|
-
* Added a github workflow for code analysis (CodeQL) to detect more potential issues before release
|
|
121
|
-
* Upgrade dependencies to fix some vulnerabilities
|
|
122
|
-
* Add new conversion functions in XtkCaster to support for int, timespan, uuid, html and blob
|
|
123
|
-
|
|
124
|
-
## Version 1.0.6
|
|
125
|
-
_2021/11/03_
|
|
126
|
-
* New ofBearerToken authentication for IMS access token
|
|
127
|
-
* Fix a small issue in the compile script which did not create the dist folder if it was missing
|
|
128
|
-
* Fix an intermittent bug when running the SDK in the browser and when using local storage cache. The schema cache and method cache
|
|
129
|
-
should contain XML representation of Campaign schemas and methods. Before it is put in local storage, data needs to be serialized
|
|
130
|
-
as text. This was only working of JavaScript objects, but DOM elements were not being serialied causing various errors when
|
|
131
|
-
using the cache later
|
|
132
|
-
|
|
133
|
-
## Version 1.0.5
|
|
134
|
-
_2021/10/09_
|
|
135
|
-
* Fix an issue in the logon() function which was not always returning a promise. Some authentication methods such as SessionToken we returning synchronously. Made it so that logon always returns a promise. This should not be a breaking change as logon does not actually return a value
|
|
136
|
-
* Refactor caches (Options cache, Schemas cache, and Methods cache) to use a generic cache class
|
|
137
|
-
* Make sure options parameter of ConnectionParameters constructor is not modified
|
|
138
|
-
* Added a persistent cache for schemas, methods, and options using the browser localStorage by default
|
|
139
|
-
* Make sure X-Security-Token header is hidden as well as session token cookies
|
|
140
|
-
* Added jshint configuration and fixed warnings reported by jshint
|
|
141
|
-
* Fixed vulnerability in ansi-regex; upgrade jest-junit to version 13 to fix
|
|
142
|
-
* Small jsdoc improvements
|
|
143
|
-
|
|
144
|
-
## Version 1.0.4
|
|
145
|
-
_2021/10/07_
|
|
146
|
-
* Fix a bug which caused XML text and cdata elements to be skipped during SimpleJson transformation
|
|
147
|
-
* Make sure passwords are not logged (replace with "***") when activating traces
|
|
148
|
-
|
|
149
|
-
## Version 1.0.3
|
|
150
|
-
_2021/10/06_
|
|
151
|
-
* Added the `sdk.ip()` function to retreive the ouptbound IP to be whitelisted to access Campaign
|
|
152
|
-
* New `ofSecurityToken` authentication method for the client-side SDK, which can be used to log on with a security token only. The session token will be passed automatically by the browser.
|
|
153
|
-
|
|
154
|
-
## Version 1.0.2
|
|
155
|
-
_2021/09/17_
|
|
156
|
-
* Dummy version to fix NPM build. Need to have the version in both package.json and a commit message to be "Release x.y.z" in master
|
|
157
|
-
|
|
158
|
-
## Version 1.0.1
|
|
159
|
-
_2021/09/16_
|
|
160
|
-
* Dummy version to fix NPM build
|
|
161
|
-
|
|
162
|
-
## Version 1.0.0
|
|
163
|
-
_2021/09/16_
|
|
164
|
-
* Support for a simpler flavor of JSON (see SimpleJson vs. BadgerFish) which is now the default
|
|
165
|
-
* New `EntityAccessor` object to access entity properties regardless of their representation
|
|
166
|
-
* Finalize the implementation to support int64
|
|
167
|
-
* Add 100% coverage for all tests
|
|
168
|
-
* Make some members of the Client object private to clarify what is the public API
|
|
169
|
-
* Fixed bug in JSON serialization for XML elments having an attribute named "length" (see `isArray` utility)
|
|
170
|
-
* New `application` object to mimic the public SDK (can be accessed via `client.application`)
|
|
171
|
-
* New schema API (`application.getSchema`) to easily navigate schemas
|
|
172
|
-
* New Campaign enumeration constants (`campaign.js`) for better readability of code using numerical enumeration values
|
|
173
|
-
* BadgerFish objects now have a `__representation = "BadgerFish"` attribute to easily distinguish between BadgerFish & SimpleJson
|
|
174
|
-
* Logon will fail if server returns a payload which does not contain a `userInfo` object
|
|
175
|
-
* New `setOption` function which allows to set (and cache) an option value
|
|
176
|
-
* Deprecated the `getSecretKeyCipher` function which may fail on instances where Vault is setup. Use `ConnectionParameters.ofExternalAccount` instead
|
|
177
|
-
* `getEntityIfMoreRecent` now takes an additional parameter which allows to specify and force a representation (xml, json...)
|
|
178
|
-
* New helper function `DomUtil.isArray` to test if a JavaScript object is an array
|
|
179
|
-
* New `EntityAccessor` object which allows to get attributes and child elements from xml or json objects, regardless of their representation
|
|
180
|
-
* New `escapeXtk` function to escape litteral values in Xtk expression. Can be used as a function or as a tagged template litteral
|
|
181
|
-
* New function `XtkCaster._variantStorageAttribute` which returns the name of a schema attribute used to store variant value types. The name of the attribute depends on the type: stringValue, longValue, etc.
|
|
182
|
-
* Support for non static method that mutate the object on which they apply. For instance, the xtk:queryDef#SelectAll
|
|
183
|
-
* Added samples in the samples/ folder
|
|
184
|
-
* Support of logon with session token only with sdk.ConnectionParameters.ofSessionToken
|
|
185
|
-
* Error management. Return a proper CampaignException upon failure with attributes that can be used to retreive error details (both http and soap)
|
|
186
|
-
* Message Center API and examples
|
|
187
|
-
* Added support for anonymous authentication via the "ofAnonymousUser" credentials function
|
|
188
|
-
* Implement SDK functions for /r/test, /nl/jsp/ping.jsp, nl/jsp/mcPing.jsp (health check functions)
|
|
189
|
-
* All HTTP request now add a user agent string identifying the SDK and it's version
|
|
190
|
-
* CampaignException has been improved to report errors on both SOAP and HTTP requests. It's now defined in `campaign.js`
|
|
191
|
-
* Added full jsdoc documentation of the SDK (run with `npm run jsdoc`). Result is saved in the `doc/jsdoc` folder
|
|
192
|
-
* Use "strict" mode
|
|
193
|
-
* Use E6 classes instead of prototype based inheritance
|
|
194
|
-
* Using `axios` as the default protocol instead of `request-promise-native` which is deprecated
|
|
195
|
-
* Added the notion of observer that can be called on any SOAP or HTTP request
|
|
196
|
-
* SOAP calls now have an "internal" flag, which indicates if the SOAP calls comes from the framework itself (for example, the framework will load schemas) or from a client app
|
|
197
|
-
* All session and security tokens are removed from logs
|
|
198
|
-
* Moved to DomUtil.isArray helper function to a new Utils package (internal)
|
|
199
|
-
* Fixed many tests which were not executed corresctly (assertion was not executed, leading to think the test was successful)
|
|
200
|
-
* Fixed CVE-2021-23343 in dependencies
|
|
201
|
-
|
|
202
|
-
_Breaking changes in 1.0.0_
|
|
203
|
-
* The default representation is now `SimpleJson` instead of `BadgerFish`
|
|
204
|
-
* Changes in the `sdk.init`, `Client` constructor, and `logon` functions. Now using `ConnectionParameters` and `Credentials` objects to configure a Campaign connection
|
|
205
|
-
* Client object members are now private: access to representation, etc. attributes is not allowed anymore except for `NLWS`, `XtkCaster`, and `DomUtil`
|
|
206
|
-
* Access to the `sessionInfo` object after `logon` can be done via the new `getSessionInfo` call
|
|
207
|
-
* Options cache internal strucutre change: option values in the cache are now object litterals containing the option value, type, and raw value (which may not be casted to the expected type yet)
|
|
208
|
-
* Connecting to mid-sourcing (or other Campaign instances which are defined by an external account) is now done with the `ConnectionParameters.ofExternalAccount` function. As a consequence, `getSecretKeyCipher` is now private and deprecated
|
|
209
|
-
* CampaignException object signature changed (but was not previously exposed)
|
|
210
|
-
* The client-side bundle is now generated in the `dist/bundle.js` file instead of `bundle.js``
|
|
211
|
-
* The main global object for the client SDK is now `document.accSDK` and not `accSDK`
|
|
212
|
-
* The client.traceSOAPCalls() function is now named client.traceAPICalls because it traces both SOAP and HTTP calls
|
|
213
|
-
|
|
214
|
-
---
|
|
215
|
-
|
|
216
|
-
## Version 0.1.24
|
|
217
|
-
_2021/09/16_
|
|
218
|
-
* Fix potential security vulnerabilities in the dependencies
|
|
219
|
-
|
|
220
|
-
## Versin 0.1.23
|
|
221
|
-
_2021/07/27_
|
|
222
|
-
* Support for int64 type (represented as a string to avoid rounding errors)
|
|
223
|
-
* Fix issue with the SoapAction header for interface methods. When calling a method which is defined on an interface (for instance xtk:persist), the SoapAction
|
|
224
|
-
header must use the interface id and not the schema id. For instance, when one calls the xtk:session Write method, one should call NLWS.xtkSession.Write, but
|
|
225
|
-
the SoapAction header must be "xtk:persist#Write" and not "xtk:session#Write" for the call to complete successfully. In older SDK versions, one had to call
|
|
226
|
-
NLWS.xtkPersist.Write which would only work if the xtk:persist interface schema was cached before. As there's no xtk:schema entity for the interfaces, the only
|
|
227
|
-
way to cache such an interface is to have previously called a method on xtk:session. This call will indirectly cache the xtk:session schema and its interfaces,
|
|
228
|
-
hence xtk:persist. From SDK 0.1.23 on, while the previous (incorrect) syntax NLWS.xtkPersist.Write still works, it's recommended to use NLWS.xtkSession.Write
|
|
229
|
-
* Upgrade 3rd parties (browserslist, hosted-git-info, lodash, ws) to fix vulnerabilities
|
|
230
|
-
|
|
231
|
-
## Version 0.1.22
|
|
232
|
-
_2021/02/23_
|
|
233
|
-
* Update node-notifier library (used by jest) to version 8.0.1 to fix a possible injection
|
|
234
|
-
|
|
235
|
-
### Version 0.1.20
|
|
236
|
-
Add client.hasPackage function to test if a package is installed or an instance or not (https://github.com/adobe/acc-js-sdk/issues/5)
|
|
237
|
-
|
|
238
|
-
### Version 0.1.3
|
|
239
|
-
Bug fixes
|
|
240
|
-
* Query returning empty result should return null when getIfExists operation, should fail when using get operation, and should return an empty array with select operation (https://github.com/adobe/acc-js-sdk/issues/3)
|
|
241
|
-
|
|
242
|
-
### Version 0.1.2
|
|
243
|
-
* Use github action to automatically publish to npm when one pushes a commit with the message "Release 1.2.3"
|
|
244
|
-
|
|
245
|
-
### Version 0.1.1
|
|
246
|
-
Bug fixes
|
|
247
|
-
* Query in select mode should always return an array, even if result is empty or one one row (https://github.com/adobe/acc-js-sdk/issues/1)
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
### Version 0.1.0
|
|
251
|
-
Initial version
|
|
252
|
-
|