Issue 105. Fix XML name of parameters in workflow functions. The name is expected to be 'variables' and not 'parameters'.
Methods StartWithParameters, PostEvent, SimulateWithParameters, SpawnWithParameters, and SpawnWithParametersEx are included.
Version 1.1.46
2024/03/19
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
Update follow-redirects 3rd party to fix a potential vulnerability
Version 1.1.45
2024/01/15
Update follow-redirects 3rd party to fix a potential vulnerability
Calling non-static, non-const, and non-pkonly methods would fail with a parameter type mismatch error.
The reason is that the entity returned by such methods is named <this> and not <entity>.
Note that const and non-pkonly methods are probably still not handled properly by the SDK.
Version 1.1.44
2024/01/02
Add the "ordered" and "doesNotSupportDiff" attributes to the nodes in the application object
Version 1.1.43
2023/12/21
Do not throw an error in case of duplicate enumeration value. Use the last one instead. This introduces a small behavior change
because this was causing an exception before.
Version 1.1.42
2023/12/20
Fixed a typo in documentation
Added 2 blog articles about schema creation (SOAP calls)
Fixed the documentation: blog articles links were broken
Upgraded Axios to fix a vulnerability
Version 1.1.41
2023/11/01
Support submitting jobs on static methods
Fixed a bug (missing await) when retreiving method object from cache when submitting a job on a non-static method
Version 1.1.40
2023/09/27
Every upload creates a new iframe is added to the body tag which takes up some space resulting in the scrollbar. Fix this by allowing CSS attributes on the iFrame.
Version 1.1.39
2023/09/20
Fixed the name of the returned object when querying a temporary schema and when the result of the query is empty.
Version 1.1.38
2023/09/06
Add support for anonymous SOAP calls. See for more information.
Version 1.1.37
2023/08/07
Fix missing schema localisation for description id when description is empty in the source schema
Version 1.1.36
2023/07/28
Fixed the `uploadAemAsset` method when used from a browser, using fetch for HTTP requests.
Version 1.1.35
2023/07/25
Added `sessionInfo` parameter to `ofImsBearerToken` function. When this parameter is used, the logon call will make sure user and server informations are returned. See for more information.
Version 1.1.34
2023/07/25
Added `uploadAemAsset` method which downloads an asset from AEM and uploads it to Campaign. See for more information.
Version 1.1.33
2023/07/08
Because of a server-side bug, there could be shemas with multiple copies of an enumeration. Make sure the SDK will not fail loading such schemas (only the first copy of the enumeration will be considered)
Version 1.1.32
2023/06/22
Support the fact that "translatedDefault" can be an element in a schema (and not just an attribute)
Version 1.1.31
2023/06/19
Fixed a caching issue: xtk:session method can be missing from the cache. This is a temporary fix. A better fix is needed to
properly handle consistency of the entity and method caches.
Version 1.1.30
2023/06/19
Fixed an issue causing errors when parsing some specific enumerations such as xtk:dataTransfer:decimalCount which
contain enumeration values without "value" attributes and whose "name" attribute contains stringified numbers.
Version 1.1.29
2023/06/15
Passing pushdown options to observability layer
Version 1.1.28
2023/06/09
Consider elements with multiple text children as if they had one single text child
Version 1.1.27
2023/05/10
Fixed a unit test which was failing in Node 16 but succeeding on node 14. The reason is that the error message thrown by Node when accessing a property of a null object changed between the 2 versions.
The `client.getSchema` and `application.getSchema` functions are now able to return group schemas
(using the temp:group:{id} format for the schema id). See for more information.
Version 1.1.26
2023/04/17
Added support for IMS Bearer tokens without require any session and security tokens. See for more details.
Fixed a bug causing incorrect JSON to XML transformation when the JSON object has a property named 'length'
Version 1.1.25
2023/03/07
Added an (optional) parameter "options" to the file upload function. This parameter contains an "action" property whose value
can be "publishIfNeeded" or "none" and indicates which action the upload function should perform after it uploaded the file.
The default is "publishIfNeeded" which consists of creating a public resources with the file content and publishing it (making
it available publicly). The other action "none" means that no action is taken and that it is the responsibility of the caller
to post-process the uploaded file by calling the relevant APIs.
Added public function client.newSchema to create a new XtkSchema object from an XML document or element.
Version 1.1.22
2023/01/19
Fix enumeration default value support (XtkEnumeration class). When an enumertion as a default value ('default' attribute of the enumeration)
object, this value should match the 'name' attribute of one of the enumeration values, not the 'value' attribute.
Version 1.1.21
2023/01/18
Extended XtkSchemaNode class with dbEnum attribute.
Version 1.1.20
2023/01/11
Upgrade json5 dependency from 2.2.1 to 2.2.3 to fix a vulnerability
Add support for asynchronous caches. The signature of cache objects (Cache, MethodCache,
OptionCache, XtkEntityCache, SafeStorage) have changed to asynchronous functions.
However, the delegate object used to configure custom caches now support either synchronous
or async results. See the Cache documentation for more details
Ability to configure the prefix to use for the cached objects. Default to a string containing
the SDK version and instance domain.
Version 1.1.19
2022/12/21
Add the X-Session-Token custom header to all SOAP and API calls
Version 1.1.18
2022/12/20
Automatically remove from local storage key items which correspond to previous versions of the SDK.
Version 1.1.17
2022/12/06
Fix a bug in schemas: the editType property of a schema node was not set properly (internal attribute is named "edit" but property exposed by the API is "editType")
Fix a bug with encoding of the SOAP urls: query parameter was not escaped properly
Add observer callbacks before and after SOAP calls (onBeforeCall, onAfterCall) which allow to intercept SOAP calls and modify SOAP call parameters and results. See the "Method Interception" section in the observability documentation for more details
Version 1.1.16
2022/11/29
Added support for xtk:job interface and job-related methods. See Jobs documentation for more details
Version 1.1.15
2022/11/28
Fix an issue with SimpleJson serialization. See SimpleJson documentation for more details, and in particular the Compatibility Notes section
Fix credentials passing for fileUpload and getReportData methods. This is still a temporary fix until those APIs are made IMS compatible.
Version 1.1.14
2022/11/25
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
Version 1.1.13
2022/11/24
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
Add "getReportData" API to fetch the data use to create a particular report
Add unit test to check that schema nodes mapped as both xml and sql are properly handled (as SQL)
Version 1.1.12
2022/11/16
Fix an issue with localization ids: do not generate localization ids for empty labels or descriptions
Add the instanceLocale attribute in the CurrentLogin object. This attribute returns the instance locale
Version 1.1.11
2022/11/09
Correction of a false positive session expiration error. The processing of the session expiration error (code XSV-350008) was incorrect as it was searching for the error code anywhere in an API response body instead of checking for an actual error
Version 1.1.10
2022/10/13
Added support for primaryKey type
Added support for the xtk:persist interface
Added support for schema belongsTo attribute
Version 1.1.9
2022/10/11
Added support for schema visibleIf attribute
Version 1.1.8
2022/10/03
Added translation ids labelLocalizationId, descriptionLocalizationId, labelSingularLocalizationId) for XtkSchema, XtkSchemaNode, XtkEnumerationValue and XtkEnumeration
Version 1.1.7
2022/08/30
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.
Experimental file upload feature. Will require server-side changes to work, and is currently limited to be used with browsers only.
Version 1.1.6
2022/08/19
New auto-refresh mechanism to keep schemas and option caches up-to-date. See client.startRefreshCaches and client.stopRefreshCaches functions.
Version 1.1.5
2022/07/07
The SOAP method name was not showing up properly in the Chrome console
Version 1.1.4
2022/07/07
Added application.version which returns the server version in the format major.minor.servicePack (ex: 8.2.10)
Added the ability to push down parameters to the SOAP and transport layers. See the pushDown section of the readme file.
The pushDown mechanism can be used to simply overwrite the request timeout, either globally or at the method level
Publicly export the HttpError class so that custom transports can be written more safely. A failure during transport should return an HttpError object
By default, the SOAP method name is now added in the URLs for better troubleshooting
Version 1.1.3
2022/05/30
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.
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.
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.
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
Document how to set the password of an external account
By default, SDK will send additional HTTP headers to help troubleshooting and usage tracking
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
Remove .vscode folder from the sources
Example for xtkBuilder.installPackage API
For APIs which have parameters of type DOMElement and which are called using XML, support passing either a DOMElement or a DOMDocument
Version 1.1.2
2022/03/22
Add support for choosing the representation (XML or JSON) at the method level using NLWS.xml or NLWS.json.
Version 1.1.1
2022/03/10
Fixed an issue with encoding: make the default charset encoding to be UTF-8 (https://github.com/adobe/acc-js-sdk/issues/26)
Version 1.1.0
2022/03/05
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.
Differences are document in the Application section of the README.
Provide array and map access to XtkSchemaKey.fields,
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
New application.getEnumeration function to retreive an enumeration
Removed the XtkSchemaNode.hasChild function
Support for ref nodes and links: XtkSchemaNode.refTarget(), XtkSchemaNode.linkTarget() functions
Reviews XtkSchemaNode.findNode() function to support links, refs, ANY type, etc. and is now asynchronous
The name attribute of enumerations (XtkEnumeration.name) is now the fully qualified name of the enumeration, i.e. is prefixed by the schema id
Version 1.0.9
2022/03/02
Ability to invoke SOAP calls dynamically with parameters computed at invocation time by a delegate function
Fixed bug in XPath constructor which now supports expanded paths, i.e. xpaths such as [@recipient-id].
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)
Add new escaping functions: escapeForLike, expandXPath, unexpandXPath, xtkConstText
New XtkCaster methods: asDatetime (alias to asTimestamp), isStringType, and isNumericType
Metadata API (application.getSchema)
keys have a isInternal internal attribute which was mistakenly using the "string" type. It's now correctly using the boolean type.
Removed userDescription attribut from schema nodes (only available at the schema level)
Changed the toString function to use 4 spaces instead of 3 for indentation and display node label and internal name
When label or description is missing from schema nodes or from enumerations, they default to the name value
application.getSchema now uses a in-memory cache
For breaking changes see the [migration guide](MIGRATION.md)
Version 1.0.7
2022/01/24
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
New attributes on the schema API (application.getSchema)
The enum attribute of a schema node returns the corresponding enum attribute, i.e. the enumeration name
The target attribute of a schema node (of type link) returns the target (schema id) of the link
The integrity attribute of a schema node (of type link) returns the link integrity ("define", "own", etc.)
Added a github workflow for code analysis (CodeQL) to detect more potential issues before release
Upgrade dependencies to fix some vulnerabilities
Add new conversion functions in XtkCaster to support for int, timespan, uuid, html and blob
Version 1.0.6
2021/11/03
New ofBearerToken authentication for IMS access token
Fix a small issue in the compile script which did not create the dist folder if it was missing
Fix an intermittent bug when running the SDK in the browser and when using local storage cache. The schema cache and method cache
should contain XML representation of Campaign schemas and methods. Before it is put in local storage, data needs to be serialized
as text. This was only working of JavaScript objects, but DOM elements were not being serialied causing various errors when
using the cache later
Version 1.0.5
2021/10/09
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
Refactor caches (Options cache, Schemas cache, and Methods cache) to use a generic cache class
Make sure options parameter of ConnectionParameters constructor is not modified
Added a persistent cache for schemas, methods, and options using the browser localStorage by default
Make sure X-Security-Token header is hidden as well as session token cookies
Added jshint configuration and fixed warnings reported by jshint
Fixed vulnerability in ansi-regex; upgrade jest-junit to version 13 to fix
Small jsdoc improvements
Version 1.0.4
2021/10/07
Fix a bug which caused XML text and cdata elements to be skipped during SimpleJson transformation
Make sure passwords are not logged (replace with "***") when activating traces
Version 1.0.3
2021/10/06
Added the sdk.ip() function to retreive the ouptbound IP to be whitelisted to access Campaign
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.
Version 1.0.2
2021/09/17
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
Version 1.0.1
2021/09/16
Dummy version to fix NPM build
Version 1.0.0
2021/09/16
Support for a simpler flavor of JSON (see SimpleJson vs. BadgerFish) which is now the default
New EntityAccessor object to access entity properties regardless of their representation
Finalize the implementation to support int64
Add 100% coverage for all tests
Make some members of the Client object private to clarify what is the public API
Fixed bug in JSON serialization for XML elments having an attribute named "length" (see isArray utility)
New application object to mimic the public SDK (can be accessed via client.application)
New schema API (application.getSchema) to easily navigate schemas
New Campaign enumeration constants (campaign.js) for better readability of code using numerical enumeration values
BadgerFish objects now have a __representation = "BadgerFish" attribute to easily distinguish between BadgerFish & SimpleJson
Logon will fail if server returns a payload which does not contain a userInfo object
New setOption function which allows to set (and cache) an option value
Deprecated the getSecretKeyCipher function which may fail on instances where Vault is setup. Use ConnectionParameters.ofExternalAccount instead
getEntityIfMoreRecent now takes an additional parameter which allows to specify and force a representation (xml, json...)
New helper function DomUtil.isArray to test if a JavaScript object is an array
New EntityAccessor object which allows to get attributes and child elements from xml or json objects, regardless of their representation
New escapeXtk function to escape literal values in Xtk expression. Can be used as a function or as a tagged template literal
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.
Support for non static method that mutate the object on which they apply. For instance, the xtk:queryDef#SelectAll
Added samples in the samples/ folder
Support of logon with session token only with sdk.ConnectionParameters.ofSessionToken
Error management. Return a proper CampaignException upon failure with attributes that can be used to retreive error details (both http and soap)
Message Center API and examples
Added support for anonymous authentication via the "ofAnonymousUser" credentials function
Implement SDK functions for /r/test, /nl/jsp/ping.jsp, nl/jsp/mcPing.jsp (health check functions)
All HTTP request now add a user agent string identifying the SDK and it's version
CampaignException has been improved to report errors on both SOAP and HTTP requests. It's now defined in campaign.js
Added full jsdoc documentation of the SDK (run with npm run jsdoc). Result is saved in the doc/jsdoc folder
Use "strict" mode
Use E6 classes instead of prototype based inheritance
Using axios as the default protocol instead of request-promise-native which is deprecated
Added the notion of observer that can be called on any SOAP or HTTP request
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
All session and security tokens are removed from logs
Moved to DomUtil.isArray helper function to a new Utils package (internal)
Fixed many tests which were not executed corresctly (assertion was not executed, leading to think the test was successful)
Fixed CVE-2021-23343 in dependencies
_Breaking changes in 1.0.0_
The default representation is now SimpleJson instead of BadgerFish
Changes in the sdk.init, Client constructor, and logon functions. Now using ConnectionParameters and Credentials objects to configure a Campaign connection
Client object members are now private: access to representation, etc. attributes is not allowed anymore except for NLWS, XtkCaster, and DomUtil
Access to the sessionInfo object after logon can be done via the new getSessionInfo call
Options cache internal strucutre change: option values in the cache are now object literals containing the option value, type, and raw value (which may not be casted to the expected type yet)
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
CampaignException object signature changed (but was not previously exposed)
The client-side bundle is now generated in the dist/bundle.js file instead of bundle.js
The main global object for the client SDK is now document.accSDK and not accSDK
The client.traceSOAPCalls() function is now named client.traceAPICalls because it traces both SOAP and HTTP calls
---
Version 0.1.24
2021/09/16
Fix potential security vulnerabilities in the dependencies
Version 0.1.23
2021/07/27
Support for int64 type (represented as a string to avoid rounding errors)
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
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
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
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
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,
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
Upgrade 3rd parties (browserslist, hosted-git-info, lodash, ws) to fix vulnerabilities
Version 0.1.22
2021/02/23
Update node-notifier library (used by jest) to version 8.0.1 to fix a possible injection
0.1.20
Add client.hasPackage function to test if
package is installed or an instance or not (https://github.com/adobe/acc-js-sdk/issues/5)
0.1.3
Bug fixe
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)
0.1.2
Use github action to automatically publsh to npm when one pushes a commit with the message "Release 1.2.3"
0.1.1
Bug fixe
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)