New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aws-amplify/notifications

Package Overview
Dependencies
Maintainers
10
Versions
815
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/notifications - npm Package Compare versions

Comparing version 0.2.5-in-app-messaging.7287 to 1.0.1-clean-npm-artifacts.7214

59

lib-esm/InAppMessaging/InAppMessaging.js

@@ -13,60 +13,3 @@ /*

*/
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
import { __assign, __awaiter, __generator, __rest } from "tslib";
import { ConsoleLogger as Logger, Hub, StorageHelper, } from '@aws-amplify/core';

@@ -73,0 +16,0 @@ import flatten from 'lodash/flatten';

@@ -13,49 +13,3 @@ /*

*/
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
import { __assign, __awaiter, __generator } from "tslib";
import { ClientDevice, Credentials, getAmplifyUserAgent, StorageHelper, transferKeyToUpperCase, } from '@aws-amplify/core';

@@ -62,0 +16,0 @@ import Cache from '@aws-amplify/cache';

@@ -13,18 +13,3 @@ /*

*/
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
import { __read } from "tslib";
import { Amplify, ConsoleLogger, Hub } from '@aws-amplify/core';

@@ -31,0 +16,0 @@ import { Layout as PinpointInAppMessageLayout, } from '@aws-sdk/client-pinpoint';

@@ -13,13 +13,3 @@ /*

*/
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import { __assign } from "tslib";
import { Amplify, ConsoleLogger as Logger } from '@aws-amplify/core';

@@ -26,0 +16,0 @@ import InAppMessaging from './InAppMessaging';

104

lib/InAppMessaging/InAppMessaging.js

@@ -14,66 +14,6 @@ "use strict";

*/
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var core_1 = require("@aws-amplify/core");
var flatten_1 = __importDefault(require("lodash/flatten"));
var flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
var Providers_1 = require("./Providers");

@@ -97,4 +37,4 @@ var eventListeners_1 = require("./eventListeners");

if (_a === void 0) { _a = {}; }
var _b = _a.listenForAnalyticsEvents, listenForAnalyticsEvents = _b === void 0 ? true : _b, config = __rest(_a, ["listenForAnalyticsEvents"]);
_this.config = __assign(__assign({}, _this.config), config);
var _b = _a.listenForAnalyticsEvents, listenForAnalyticsEvents = _b === void 0 ? true : _b, config = tslib_1.__rest(_a, ["listenForAnalyticsEvents"]);
_this.config = tslib_1.__assign(tslib_1.__assign({}, _this.config), config);
logger.debug('configure InAppMessaging', _this.config);

@@ -159,5 +99,5 @@ _this.pluggables.forEach(function (pluggable) {

this.syncMessages = function () {
return Promise.all(_this.pluggables.map(function (pluggable) { return __awaiter(_this, void 0, void 0, function () {
return Promise.all(_this.pluggables.map(function (pluggable) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var messages, key, err_1;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -184,5 +124,5 @@ case 0:

this.clearMessages = function () {
return Promise.all(_this.pluggables.map(function (pluggable) { return __awaiter(_this, void 0, void 0, function () {
return Promise.all(_this.pluggables.map(function (pluggable) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var key;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -199,10 +139,10 @@ case 0:

};
this.dispatchEvent = function (event) { return __awaiter(_this, void 0, void 0, function () {
this.dispatchEvent = function (event) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var messages, flattenedMessages;
var _this = this;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, Promise.all(this.pluggables.map(function (pluggable) { return __awaiter(_this, void 0, void 0, function () {
case 0: return [4 /*yield*/, Promise.all(this.pluggables.map(function (pluggable) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var key, messages;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -229,5 +169,5 @@ case 0:

this.identifyUser = function (userId, userInfo) {
return Promise.all(_this.pluggables.map(function (pluggable) { return __awaiter(_this, void 0, void 0, function () {
return Promise.all(_this.pluggables.map(function (pluggable) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var err_2;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -279,5 +219,5 @@ case 0:

};
this.syncStorage = function () { return __awaiter(_this, void 0, void 0, function () {
this.syncStorage = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var storage, err_3;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -305,5 +245,5 @@ case 0:

}); };
this.getMessages = function (key) { return __awaiter(_this, void 0, void 0, function () {
this.getMessages = function (key) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var storage, storedMessages, err_4;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -329,5 +269,5 @@ case 0:

}); };
this.setMessages = function (key, messages) { return __awaiter(_this, void 0, void 0, function () {
this.setMessages = function (key, messages) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var storage, err_5;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -358,5 +298,5 @@ case 0:

}); };
this.removeMessages = function (key) { return __awaiter(_this, void 0, void 0, function () {
this.removeMessages = function (key) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var storage, err_6;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -363,0 +303,0 @@ case 0:

@@ -14,59 +14,10 @@ "use strict";

*/
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var core_1 = require("@aws-amplify/core");
var cache_1 = __importDefault(require("@aws-amplify/cache"));
var cache_1 = tslib_1.__importDefault(require("@aws-amplify/cache"));
var client_pinpoint_1 = require("@aws-sdk/client-pinpoint");
var uuid_1 = require("uuid");
var eventListeners_1 = require("../../eventListeners");
var SessionTracker_1 = __importDefault(require("../../SessionTracker"));
var SessionTracker_1 = tslib_1.__importDefault(require("../../SessionTracker"));
var types_1 = require("../../types");

@@ -87,3 +38,3 @@ var types_2 = require("./types");

if (config === void 0) { config = {}; }
_this.config = __assign(__assign({}, _this.config), config);
_this.config = tslib_1.__assign(tslib_1.__assign({}, _this.config), config);
utils_1.logger.debug('configure AWSPinpointProvider', _this.config);

@@ -109,5 +60,5 @@ // some configuration steps should not be re-run even if provider is re-configured for some reason

};
this.getInAppMessages = function () { return __awaiter(_this, void 0, void 0, function () {
this.getInAppMessages = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var _a, appId, endpointId, pinpointClient, input, command, response, messages, err_1;
return __generator(this, function (_b) {
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {

@@ -152,6 +103,6 @@ case 0:

}); };
this.processInAppMessages = function (messages, event) { return __awaiter(_this, void 0, void 0, function () {
this.processInAppMessages = function (messages, event) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var highestPrioritySeen;
var _this = this;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -202,5 +153,5 @@ case 0:

}); };
this.identifyUser = function (userId, userInfo) { return __awaiter(_this, void 0, void 0, function () {
this.identifyUser = function (userId, userInfo) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var err_2;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -227,5 +178,5 @@ case 0:

}); };
this.init = function () { return __awaiter(_this, void 0, void 0, function () {
this.init = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var _a, endpointId, storage, providerName, _b, err_3;
return __generator(this, function (_c) {
return tslib_1.__generator(this, function (_c) {
switch (_c.label) {

@@ -261,5 +212,5 @@ case 0:

}); };
this.initPinpointClient = function () { return __awaiter(_this, void 0, void 0, function () {
this.initPinpointClient = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var _a, appId, credentials, pinpointClient, region;
return __generator(this, function (_b) {
return tslib_1.__generator(this, function (_b) {
_a = this.config, appId = _a.appId, credentials = _a.credentials, pinpointClient = _a.pinpointClient, region = _a.region;

@@ -280,5 +231,5 @@ if (!appId || !credentials || !region) {

}); };
this.getEndpointId = function () { return __awaiter(_this, void 0, void 0, function () {
this.getEndpointId = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var appId, cacheKey, cachedEndpointId, endpointId, ttl, expiration;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -309,6 +260,6 @@ case 0:

if (userInfo === void 0) { userInfo = null; }
return __awaiter(_this, void 0, void 0, function () {
return tslib_1.__awaiter(_this, void 0, void 0, function () {
var _a, appId, credentials, endpointId, _b, endpointInfo, pinpointClient, currentCredentials, credentialsUpdated, _c, address, attributes, demographic, location_1, metrics, optOut, _d, appVersion, make, model, platform, version, input, command, err_4;
var _e;
return __generator(this, function (_f) {
return tslib_1.__generator(this, function (_f) {
switch (_f.label) {

@@ -350,6 +301,6 @@ case 0:

Address: address !== null && address !== void 0 ? address : endpointInfo.address,
Attributes: __assign(__assign({}, endpointInfo.attributes), attributes),
Demographic: __assign({ AppVersion: appVersion, Make: make, Model: model, ModelVersion: version, Platform: platform }, core_1.transferKeyToUpperCase(__assign(__assign({}, endpointInfo.demographic), demographic))),
Location: core_1.transferKeyToUpperCase(__assign(__assign({}, endpointInfo.location), location_1)),
Metrics: __assign(__assign({}, endpointInfo.metrics), metrics),
Attributes: tslib_1.__assign(tslib_1.__assign({}, endpointInfo.attributes), attributes),
Demographic: tslib_1.__assign({ AppVersion: appVersion, Make: make, Model: model, ModelVersion: version, Platform: platform }, core_1.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.demographic), demographic))),
Location: core_1.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.location), location_1)),
Metrics: tslib_1.__assign(tslib_1.__assign({}, endpointInfo.metrics), metrics),
OptOut: optOut !== null && optOut !== void 0 ? optOut : endpointInfo.optOut,

@@ -377,5 +328,5 @@ User: {

};
this.getCredentials = function () { return __awaiter(_this, void 0, void 0, function () {
this.getCredentials = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var credentials, err_5;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -478,8 +429,8 @@ case 0:

var _a;
var updatedMap = __assign(__assign({}, _this.getTotalCountMap()), (_a = {}, _a[messageId] = count, _a));
var updatedMap = tslib_1.__assign(tslib_1.__assign({}, _this.getTotalCountMap()), (_a = {}, _a[messageId] = count, _a));
_this.setTotalCountMap(updatedMap);
};
this.incrementCounts = function (messageId) { return __awaiter(_this, void 0, void 0, function () {
this.incrementCounts = function (messageId) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var _a, sessionCount, dailyCount, totalCount;
return __generator(this, function (_b) {
return tslib_1.__generator(this, function (_b) {
_a = this.getMessageCounts(messageId), sessionCount = _a.sessionCount, dailyCount = _a.dailyCount, totalCount = _a.totalCount;

@@ -503,4 +454,4 @@ this.setSessionCount(messageId, sessionCount + 1);

};
this.recordMessageEvent = function (message, event) { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
this.recordMessageEvent = function (message, event) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -507,0 +458,0 @@ case 0:

@@ -14,25 +14,7 @@ "use strict";

*/
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var core_1 = require("@aws-amplify/core");
var client_pinpoint_1 = require("@aws-sdk/client-pinpoint");
var isEmpty_1 = __importDefault(require("lodash/isEmpty"));
var isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty"));
var AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function'

@@ -101,3 +83,3 @@ ? Symbol.for('amplify_default')

eventAttributesMemo[memoKey] = Object.entries(Attributes).every(function (_a) {
var _b = __read(_a, 2), key = _b[0], Values = _b[1].Values;
var _b = tslib_1.__read(_a, 2), key = _b[0], Values = _b[1].Values;
return Values.includes(attributes[key]);

@@ -124,3 +106,3 @@ });

eventMetricsMemo[memoKey] = Object.entries(Metrics).every(function (_a) {
var _b = __read(_a, 2), key = _b[0], _c = _b[1], ComparisonOperator = _c.ComparisonOperator, Value = _c.Value;
var _b = tslib_1.__read(_a, 2), key = _b[0], _c = _b[1], ComparisonOperator = _c.ComparisonOperator, Value = _c.Value;
var compare = exports.getComparator(ComparisonOperator);

@@ -173,4 +155,4 @@ // if there is some unknown comparison operator, treat as a comparison failure

var end = new Date(now);
var _b = __read(Start.split(':'), 2), startHours = _b[0], startMinutes = _b[1];
var _c = __read(End.split(':'), 2), endHours = _c[0], endMinutes = _c[1];
var _b = tslib_1.__read(Start.split(':'), 2), startHours = _b[0], startMinutes = _b[1];
var _c = tslib_1.__read(End.split(':'), 2), endHours = _c[0], endMinutes = _c[1];
start.setHours(Number.parseInt(startHours, 10), Number.parseInt(startMinutes, 10), 0, 0);

@@ -177,0 +159,0 @@ end.setHours(Number.parseInt(endHours, 10), Number.parseInt(endMinutes, 10), 0, 0);

@@ -14,8 +14,6 @@ "use strict";

*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var SessionTracker_1 = __importDefault(require("./SessionTracker"));
var tslib_1 = require("tslib");
var SessionTracker_1 = tslib_1.__importDefault(require("./SessionTracker"));
exports.default = SessionTracker_1.default;
//# sourceMappingURL=index.js.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
/*

@@ -19,3 +17,3 @@ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.

var core_1 = require("@aws-amplify/core");
var noop_1 = __importDefault(require("lodash/noop"));
var noop_1 = tslib_1.__importDefault(require("lodash/noop"));
// Per https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API

@@ -22,0 +20,0 @@ var hidden;

@@ -14,9 +14,7 @@ "use strict";

*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var core_1 = require("@aws-amplify/core");
var react_native_1 = require("react-native");
var noop_1 = __importDefault(require("lodash/noop"));
var noop_1 = tslib_1.__importDefault(require("lodash/noop"));
var isActive = function (appState) { return appState === 'active'; };

@@ -23,0 +21,0 @@ var isInactive = function (appState) {

@@ -14,19 +14,6 @@ "use strict";

*/
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var core_1 = require("@aws-amplify/core");
var InAppMessaging_1 = __importDefault(require("./InAppMessaging"));
var InAppMessaging_1 = tslib_1.__importDefault(require("./InAppMessaging"));
var logger = new core_1.ConsoleLogger('Notifications');

@@ -43,3 +30,3 @@ var NotificationsClass = /** @class */ (function () {

var config = (_a === void 0 ? {} : _a).Notifications;
_this.config = __assign(__assign({}, _this.config), config);
_this.config = tslib_1.__assign(tslib_1.__assign({}, _this.config), config);
logger.debug('configure Notifications', config);

@@ -46,0 +33,0 @@ // Configure sub-categories

{
"name": "@aws-amplify/notifications",
"version": "0.2.5-in-app-messaging.7287+fc590d1c3",
"version": "1.0.1-clean-npm-artifacts.7214+239a23024",
"description": "Notifications category of aws-amplify",

@@ -44,6 +44,11 @@ "main": "./lib/index.js",

"homepage": "https://docs.amplify.aws/",
"files": [
"lib",
"lib-esm",
"src"
],
"dependencies": {
"@aws-amplify/cache": "4.0.23-in-app-messaging.70+fc590d1c3",
"@aws-amplify/core": "4.3.3-in-app-messaging.70+fc590d1c3",
"@aws-sdk/client-pinpoint": "^3.33.0",
"@aws-amplify/cache": "4.0.51-clean-npm-artifacts.25+239a23024",
"@aws-amplify/core": "4.6.2-clean-npm-artifacts.25+239a23024",
"@aws-sdk/client-pinpoint": "3.171.0",
"lodash": "^4.17.21",

@@ -96,3 +101,3 @@ "uuid": "^3.2.1"

},
"gitHead": "fc590d1c39ccf3209fb60c5facf57cba51b61861"
"gitHead": "239a230245df2be37e71eabc5adbdf12e3eb0f95"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc