comprodls-sdk 2.28.0 → 2.30.1
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/dist/comprodls-sdk.js
CHANGED
|
@@ -2186,7 +2186,9 @@ function getUserProductAnalyticById(options) {
|
|
|
2186
2186
|
// ext_user_id: <ext_user_id>, // mandatory
|
|
2187
2187
|
// productcode: <productcode>, // mandatory
|
|
2188
2188
|
// itemcode: <itemcode>, // mandatory
|
|
2189
|
-
// submission_order
|
|
2189
|
+
// (any one field from 'submission_order' OR 'ext_link_id' is mandatory)
|
|
2190
|
+
// submission_order: number, // optional
|
|
2191
|
+
// ext_link_id: <ext_link_id>, // optional
|
|
2190
2192
|
// part: number, // mandatory
|
|
2191
2193
|
// classid: <classid>, // optional
|
|
2192
2194
|
//}
|
|
@@ -2196,7 +2198,7 @@ function getExternalDataForUserAnalyticItem(options) {
|
|
|
2196
2198
|
// Validations
|
|
2197
2199
|
var err = {};
|
|
2198
2200
|
if(options && options.ext_user_id && options.productcode && options.itemcode &&
|
|
2199
|
-
options.submission_order && options.part) {
|
|
2201
|
+
(options.submission_order || options.ext_link_id) && options.part) {
|
|
2200
2202
|
err = helpers.validations.isAuthenticated(self.orgId, self.token);
|
|
2201
2203
|
if(err) { dfd.reject(err); }
|
|
2202
2204
|
else {
|
|
@@ -2209,10 +2211,11 @@ function getExternalDataForUserAnalyticItem(options) {
|
|
|
2209
2211
|
ext_user_id: options.ext_user_id,
|
|
2210
2212
|
productcode: options.productcode,
|
|
2211
2213
|
itemcode: options.itemcode,
|
|
2212
|
-
submission_order: options.submission_order,
|
|
2213
2214
|
part: options.part
|
|
2214
2215
|
};
|
|
2215
2216
|
|
|
2217
|
+
if(options.submission_order) { params.submission_order = options.submission_order; }
|
|
2218
|
+
if(options.ext_link_id) { params.ext_link_id = options.ext_link_id; }
|
|
2216
2219
|
if(options.classid) { params.classid = options.classid; }
|
|
2217
2220
|
|
|
2218
2221
|
// Setup request with URL and Params
|
|
@@ -2235,7 +2238,7 @@ function getExternalDataForUserAnalyticItem(options) {
|
|
|
2235
2238
|
}
|
|
2236
2239
|
} else {
|
|
2237
2240
|
err.message = err.description = "Required parameters 'ext_user_id' or 'productcode' or 'itemcode'" +
|
|
2238
|
-
" or 'submission_order' or 'part'are not found in request options";
|
|
2241
|
+
" or (either 'submission_order' OR 'ext_link_id') or 'part'are not found in request options";
|
|
2239
2242
|
err = new DLSError(helpers.errors.ERROR_TYPES.SDK_ERROR, err);
|
|
2240
2243
|
dfd.reject(err);
|
|
2241
2244
|
}
|
|
@@ -9351,6 +9354,13 @@ function pushX() {
|
|
|
9351
9354
|
**********************************/
|
|
9352
9355
|
|
|
9353
9356
|
function _connect(pubnubCW, options) {
|
|
9357
|
+
if (!options.userid) {
|
|
9358
|
+
var err = {};
|
|
9359
|
+
err.message = err.description = 'Mandatory parameter userid not found in request options.';
|
|
9360
|
+
err = new DLSError(helpers.errors.ERROR_TYPES.PUSHX_ERROR, err);
|
|
9361
|
+
throw err;
|
|
9362
|
+
}
|
|
9363
|
+
|
|
9354
9364
|
// Adding SSL flag
|
|
9355
9365
|
return pubnubCW.setup({
|
|
9356
9366
|
'userid': options.userid,
|