@ada-support/embed2 1.0.52 → 1.0.53
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.
|
@@ -12,5 +12,5 @@ interface TriggerCampaignImplParams {
|
|
|
12
12
|
messageService: MessageService;
|
|
13
13
|
}
|
|
14
14
|
export declare function triggerCampaignImpl({ adaSettings, chatterToken, campaign, ignoreStatus, ignoreFrequency, clearCampaignToTrigger, messageService, }: TriggerCampaignImplParams): void;
|
|
15
|
-
export declare const getCampaignToTrigger: (adaSettings: StartOptions, marketingCampaigns: MarketingCampaign[] | undefined, options: EvaluateCampaignParams, onlyBasic: boolean) => MarketingCampaign;
|
|
15
|
+
export declare const getCampaignToTrigger: (adaSettings: StartOptions, marketingCampaigns: MarketingCampaign[] | undefined, options: EvaluateCampaignParams, onlyBasic: boolean) => MarketingCampaign | undefined;
|
|
16
16
|
export {};
|
|
@@ -22,14 +22,14 @@ export interface MarketingCampaign {
|
|
|
22
22
|
_id: string;
|
|
23
23
|
version: "2021-01-12";
|
|
24
24
|
client_id: string;
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
created: string;
|
|
26
|
+
updated: string;
|
|
27
27
|
updated_by: string;
|
|
28
28
|
name: string;
|
|
29
29
|
description: string;
|
|
30
30
|
campaign_key: string;
|
|
31
31
|
status: "draft" | "active" | "off";
|
|
32
|
-
trigger_conditions
|
|
32
|
+
trigger_conditions?: TriggerCondition[];
|
|
33
33
|
goals: GoalEvent[];
|
|
34
34
|
message_frequency: CampaignFrequency;
|
|
35
35
|
message_delay: number;
|
package/dist/npm-entry/index.js
CHANGED
|
@@ -736,7 +736,7 @@ var browserPerformanceTimeOrigin = (function () {
|
|
|
736
736
|
|
|
737
737
|
/***/ }),
|
|
738
738
|
|
|
739
|
-
/***/
|
|
739
|
+
/***/ 356:
|
|
740
740
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
741
741
|
|
|
742
742
|
"use strict";
|
|
@@ -8514,7 +8514,7 @@ var client = new error_tracker_BrowserClient({
|
|
|
8514
8514
|
return event;
|
|
8515
8515
|
},
|
|
8516
8516
|
environment: "production",
|
|
8517
|
-
release: "1.0.
|
|
8517
|
+
release: "1.0.53-036d569",
|
|
8518
8518
|
sampleRate: 0.25,
|
|
8519
8519
|
autoSessionTracking: false,
|
|
8520
8520
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -9213,7 +9213,7 @@ function getEmbedURL(_ref) {
|
|
|
9213
9213
|
polyfillVersionString = "legacy";
|
|
9214
9214
|
}
|
|
9215
9215
|
|
|
9216
|
-
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "
|
|
9216
|
+
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "036d569", "/index.html");
|
|
9217
9217
|
}
|
|
9218
9218
|
/**
|
|
9219
9219
|
* Generate the Chat / API URL
|
|
@@ -10055,6 +10055,9 @@ var get_browser_language_getBrowserLanguage = function getBrowserLanguage() {
|
|
|
10055
10055
|
};
|
|
10056
10056
|
|
|
10057
10057
|
/* harmony default export */ var get_browser_language = (get_browser_language_getBrowserLanguage);
|
|
10058
|
+
;// CONCATENATED MODULE: ./src/services/helpers.ts
|
|
10059
|
+
var NO_OP_FUNCTION = function NO_OP_FUNCTION() {// Do nothing
|
|
10060
|
+
};
|
|
10058
10061
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/trim.js
|
|
10059
10062
|
var trim = __webpack_require__(5843);
|
|
10060
10063
|
var trim_default = /*#__PURE__*/__webpack_require__.n(trim);
|
|
@@ -10223,6 +10226,7 @@ var TriggerConditionEvaluator_evalTriggerCondition = function evalTriggerConditi
|
|
|
10223
10226
|
|
|
10224
10227
|
|
|
10225
10228
|
|
|
10229
|
+
|
|
10226
10230
|
/**
|
|
10227
10231
|
* To enforce frequency restrictions, when a campaign is shown we add its id to a list of shown
|
|
10228
10232
|
* campaigns, and any campaigns in this list will not be shown again until removed from the list.
|
|
@@ -10359,7 +10363,7 @@ function triggerCampaignImpl(_ref) {
|
|
|
10359
10363
|
},
|
|
10360
10364
|
ignore_status: ignoreStatus
|
|
10361
10365
|
})
|
|
10362
|
-
});
|
|
10366
|
+
}).catch(NO_OP_FUNCTION); // we don't want to log errors here, it may fail because of rate limiting
|
|
10363
10367
|
}
|
|
10364
10368
|
}
|
|
10365
10369
|
var getCampaignToTrigger = function getCampaignToTrigger(adaSettings, marketingCampaigns, options, onlyBasic) {
|
|
@@ -10378,7 +10382,7 @@ var getCampaignToTrigger = function getCampaignToTrigger(adaSettings, marketingC
|
|
|
10378
10382
|
} // Campaigns with no trigger conditions can only be triggered manually
|
|
10379
10383
|
|
|
10380
10384
|
|
|
10381
|
-
if (campaign.trigger_conditions.length === 0) {
|
|
10385
|
+
if (!campaign.trigger_conditions || campaign.trigger_conditions.length === 0) {
|
|
10382
10386
|
return false;
|
|
10383
10387
|
}
|
|
10384
10388
|
|
|
@@ -14086,7 +14090,7 @@ window.__AdaEmbedConstructor = Embed;
|
|
|
14086
14090
|
/* harmony export */ });
|
|
14087
14091
|
var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(14|(1[5-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(92|(9[3-9]|\\d{3,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(14|(1[5-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(91|(9[2-9]|\\d{3,}))\\.\\d+\\.\\d+)|(Firefox\\/(91|(9[2-9]|\\d{3,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
|
|
14088
14092
|
var isProduction = "production" === "production";
|
|
14089
|
-
var embed2Version = "
|
|
14093
|
+
var embed2Version = "036d569";
|
|
14090
14094
|
|
|
14091
14095
|
/***/ }),
|
|
14092
14096
|
|
|
@@ -14419,9 +14423,9 @@ function _log() {
|
|
|
14419
14423
|
service: "embed",
|
|
14420
14424
|
env: "production",
|
|
14421
14425
|
embedVersion: 2,
|
|
14422
|
-
version: "1.0.
|
|
14426
|
+
version: "1.0.53",
|
|
14423
14427
|
isNpm: true,
|
|
14424
|
-
commitHash: "
|
|
14428
|
+
commitHash: "036d569"
|
|
14425
14429
|
}))
|
|
14426
14430
|
});
|
|
14427
14431
|
|
|
@@ -23896,7 +23900,7 @@ function _loadEmbed() {
|
|
|
23896
23900
|
polyfillVersionString = "legacy";
|
|
23897
23901
|
}
|
|
23898
23902
|
|
|
23899
|
-
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "
|
|
23903
|
+
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "036d569", "/index.js");
|
|
23900
23904
|
}
|
|
23901
23905
|
|
|
23902
23906
|
clientScriptExists = Boolean( true || // The client script is bundled with npm module
|
|
@@ -24434,7 +24438,7 @@ function createEmbedObject() {
|
|
|
24434
24438
|
}
|
|
24435
24439
|
;// CONCATENATED MODULE: ./src/index-npm.ts
|
|
24436
24440
|
|
|
24437
|
-
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
24441
|
+
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 356));
|
|
24438
24442
|
/* harmony default export */ var index_npm = (createEmbedObject());
|
|
24439
24443
|
}();
|
|
24440
24444
|
module.exports = __webpack_exports__;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NO_OP_FUNCTION: () => void;
|