@aws-amplify/react-native 1.0.1-console-preview.8f82e46.0 → 1.0.1-console-preview.8d88eef.0
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/lib/apis/getOperatingSystem.d.ts +1 -0
- package/lib/apis/getOperatingSystem.js +9 -0
- package/lib/apis/getOperatingSystem.js.map +1 -0
- package/lib/apis/index.d.ts +1 -0
- package/lib/apis/index.js +3 -1
- package/lib/apis/index.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/moduleLoaders/index.d.ts +1 -0
- package/lib/moduleLoaders/index.js +3 -1
- package/lib/moduleLoaders/index.js.map +1 -1
- package/lib/moduleLoaders/loadAmplifyPushNotification.d.ts +21 -0
- package/lib/moduleLoaders/loadAmplifyPushNotification.js +26 -0
- package/lib/moduleLoaders/loadAmplifyPushNotification.js.map +1 -0
- package/lib/moduleLoaders/loadAsyncStorage.js +2 -2
- package/lib/moduleLoaders/loadAsyncStorage.js.map +1 -1
- package/lib-esm/apis/getOperatingSystem.d.ts +1 -0
- package/lib-esm/apis/getOperatingSystem.js +5 -0
- package/lib-esm/apis/getOperatingSystem.js.map +1 -0
- package/lib-esm/apis/index.d.ts +1 -0
- package/lib-esm/apis/index.js +1 -0
- package/lib-esm/apis/index.js.map +1 -1
- package/lib-esm/index.d.ts +3 -2
- package/lib-esm/index.js +2 -2
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/moduleLoaders/index.d.ts +1 -0
- package/lib-esm/moduleLoaders/index.js +1 -0
- package/lib-esm/moduleLoaders/index.js.map +1 -1
- package/lib-esm/moduleLoaders/loadAmplifyPushNotification.d.ts +21 -0
- package/lib-esm/moduleLoaders/loadAmplifyPushNotification.js +22 -0
- package/lib-esm/moduleLoaders/loadAmplifyPushNotification.js.map +1 -0
- package/lib-esm/moduleLoaders/loadAsyncStorage.js +2 -2
- package/lib-esm/moduleLoaders/loadAsyncStorage.js.map +1 -1
- package/package.json +4 -2
- package/src/apis/getOperatingSystem.ts +6 -0
- package/src/apis/index.ts +1 -0
- package/src/index.ts +7 -1
- package/src/moduleLoaders/index.ts +1 -0
- package/src/moduleLoaders/loadAmplifyPushNotification.ts +29 -0
- package/src/moduleLoaders/loadAsyncStorage.ts +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getOperatingSystem: () => "ios" | "android" | "macos" | "windows" | "web";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getOperatingSystem = void 0;
|
|
6
|
+
const react_native_1 = require("react-native");
|
|
7
|
+
const getOperatingSystem = () => react_native_1.Platform.OS;
|
|
8
|
+
exports.getOperatingSystem = getOperatingSystem;
|
|
9
|
+
//# sourceMappingURL=getOperatingSystem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOperatingSystem.js","sourceRoot":"","sources":["../../src/apis/getOperatingSystem.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,+CAAwC;AAEjC,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAAC,uBAAQ,CAAC,EAAE,CAAC;AAAvC,QAAA,kBAAkB,sBAAqB"}
|
package/lib/apis/index.d.ts
CHANGED
package/lib/apis/index.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.computeS = exports.computeModPow = void 0;
|
|
5
|
+
exports.getOperatingSystem = exports.computeS = exports.computeModPow = void 0;
|
|
6
6
|
var computeModPow_1 = require("./computeModPow");
|
|
7
7
|
Object.defineProperty(exports, "computeModPow", { enumerable: true, get: function () { return computeModPow_1.computeModPow; } });
|
|
8
8
|
var computeS_1 = require("./computeS");
|
|
9
9
|
Object.defineProperty(exports, "computeS", { enumerable: true, get: function () { return computeS_1.computeS; } });
|
|
10
|
+
var getOperatingSystem_1 = require("./getOperatingSystem");
|
|
11
|
+
Object.defineProperty(exports, "getOperatingSystem", { enumerable: true, get: function () { return getOperatingSystem_1.getOperatingSystem; } });
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
package/lib/apis/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/apis/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/apis/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export type { PushNotificationMessage, PushNotificationPermissions, PushNotificationPermissionStatus, } from '@aws-amplify/rtn-push-notification';
|
|
2
|
+
export { computeModPow, computeS, getOperatingSystem } from './apis';
|
|
3
|
+
export { loadAmplifyPushNotification, loadAsyncStorage, loadNetInfo, loadBuffer, loadUrlPolyfill, loadGetRandomValues, loadBase64, } from './moduleLoaders';
|
package/lib/index.js
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.loadBase64 = exports.loadGetRandomValues = exports.loadUrlPolyfill = exports.loadBuffer = exports.loadNetInfo = exports.loadAsyncStorage = exports.computeS = exports.computeModPow = void 0;
|
|
5
|
+
exports.loadBase64 = exports.loadGetRandomValues = exports.loadUrlPolyfill = exports.loadBuffer = exports.loadNetInfo = exports.loadAsyncStorage = exports.loadAmplifyPushNotification = exports.getOperatingSystem = exports.computeS = exports.computeModPow = void 0;
|
|
6
6
|
var apis_1 = require("./apis");
|
|
7
7
|
Object.defineProperty(exports, "computeModPow", { enumerable: true, get: function () { return apis_1.computeModPow; } });
|
|
8
8
|
Object.defineProperty(exports, "computeS", { enumerable: true, get: function () { return apis_1.computeS; } });
|
|
9
|
+
Object.defineProperty(exports, "getOperatingSystem", { enumerable: true, get: function () { return apis_1.getOperatingSystem; } });
|
|
9
10
|
var moduleLoaders_1 = require("./moduleLoaders");
|
|
11
|
+
Object.defineProperty(exports, "loadAmplifyPushNotification", { enumerable: true, get: function () { return moduleLoaders_1.loadAmplifyPushNotification; } });
|
|
10
12
|
Object.defineProperty(exports, "loadAsyncStorage", { enumerable: true, get: function () { return moduleLoaders_1.loadAsyncStorage; } });
|
|
11
13
|
Object.defineProperty(exports, "loadNetInfo", { enumerable: true, get: function () { return moduleLoaders_1.loadNetInfo; } });
|
|
12
14
|
Object.defineProperty(exports, "loadBuffer", { enumerable: true, get: function () { return moduleLoaders_1.loadBuffer; } });
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAOtC,+BAAqE;AAA5D,qGAAA,aAAa,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAAE,0GAAA,kBAAkB,OAAA;AACpD,iDAQyB;AAPxB,4HAAA,2BAA2B,OAAA;AAC3B,iHAAA,gBAAgB,OAAA;AAChB,4GAAA,WAAW,OAAA;AACX,2GAAA,UAAU,OAAA;AACV,gHAAA,eAAe,OAAA;AACf,oHAAA,mBAAmB,OAAA;AACnB,2GAAA,UAAU,OAAA"}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.loadBase64 = exports.loadGetRandomValues = exports.loadUrlPolyfill = exports.loadBuffer = exports.loadNetInfo = exports.loadAsyncStorage = void 0;
|
|
5
|
+
exports.loadBase64 = exports.loadGetRandomValues = exports.loadUrlPolyfill = exports.loadBuffer = exports.loadNetInfo = exports.loadAsyncStorage = exports.loadAmplifyPushNotification = void 0;
|
|
6
|
+
var loadAmplifyPushNotification_1 = require("./loadAmplifyPushNotification");
|
|
7
|
+
Object.defineProperty(exports, "loadAmplifyPushNotification", { enumerable: true, get: function () { return loadAmplifyPushNotification_1.loadAmplifyPushNotification; } });
|
|
6
8
|
var loadAsyncStorage_1 = require("./loadAsyncStorage");
|
|
7
9
|
Object.defineProperty(exports, "loadAsyncStorage", { enumerable: true, get: function () { return loadAsyncStorage_1.loadAsyncStorage; } });
|
|
8
10
|
var loadNetInfo_1 = require("./loadNetInfo");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/moduleLoaders/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,2CAA0C;AAAjC,wGAAA,UAAU,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/moduleLoaders/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA;AACpC,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,2CAA0C;AAAjC,wGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const loadAmplifyPushNotification: () => {
|
|
2
|
+
addMessageEventListener: (event: string, listener: (message: import("@aws-amplify/rtn-push-notification").PushNotificationMessage | null, completionHandlerId?: string | undefined) => void) => import("react-native").EmitterSubscription;
|
|
3
|
+
addTokenEventListener: (event: string, listener: (token: string) => void) => import("react-native").EmitterSubscription;
|
|
4
|
+
completeNotification: (completionHandlerId: string) => void;
|
|
5
|
+
getBadgeCount: () => void | Promise<number | null>;
|
|
6
|
+
getConstants: () => {
|
|
7
|
+
NativeEvent: {
|
|
8
|
+
BACKGROUND_MESSAGE_RECEIVED?: string | undefined;
|
|
9
|
+
FOREGROUND_MESSAGE_RECEIVED: string;
|
|
10
|
+
LAUNCH_NOTIFICATION_OPENED: string;
|
|
11
|
+
NOTIFICATION_OPENED: string;
|
|
12
|
+
TOKEN_RECEIVED: string;
|
|
13
|
+
};
|
|
14
|
+
NativeHeadlessTaskKey?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
getLaunchNotification: () => Promise<import("@aws-amplify/rtn-push-notification").PushNotificationMessage | null>;
|
|
17
|
+
getPermissionStatus: () => Promise<import("@aws-amplify/rtn-push-notification").PushNotificationPermissionStatus>;
|
|
18
|
+
registerHeadlessTask: (task: (message: import("@aws-amplify/rtn-push-notification").PushNotificationMessage | null) => Promise<void>) => void;
|
|
19
|
+
requestPermissions: (permissions?: import("@aws-amplify/rtn-push-notification").PushNotificationPermissions | undefined) => Promise<boolean>;
|
|
20
|
+
setBadgeCount: (count: number) => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.loadAmplifyPushNotification = void 0;
|
|
6
|
+
const loadAmplifyPushNotification = () => {
|
|
7
|
+
try {
|
|
8
|
+
// metro bundler requires static string for loading module.
|
|
9
|
+
// See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages
|
|
10
|
+
const module = require('@aws-amplify/rtn-push-notification')
|
|
11
|
+
?.module;
|
|
12
|
+
if (module) {
|
|
13
|
+
return module;
|
|
14
|
+
}
|
|
15
|
+
throw new Error('Ensure `@aws-amplify/rtn-push-notification` is installed and linked.');
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
// The error parsing logic cannot be extracted with metro as the `require`
|
|
19
|
+
// would be confused when there is a `import` in the same file importing
|
|
20
|
+
// another module and that causes an error
|
|
21
|
+
const message = e.message.replace(/undefined/g, '@aws-amplify/rtn-push-notification');
|
|
22
|
+
throw new Error(message);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.loadAmplifyPushNotification = loadAmplifyPushNotification;
|
|
26
|
+
//# sourceMappingURL=loadAmplifyPushNotification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadAmplifyPushNotification.js","sourceRoot":"","sources":["../../src/moduleLoaders/loadAmplifyPushNotification.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAI/B,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC/C,IAAI;QACH,2DAA2D;QAC3D,kFAAkF;QAClF,MAAM,MAAM,GAAG,OAAO,CAAC,oCAAoC,CAAC;YAC3D,EAAE,MAAgC,CAAC;QACpC,IAAI,MAAM,EAAE;YACX,OAAO,MAAM,CAAC;SACd;QAED,MAAM,IAAI,KAAK,CACd,sEAAsE,CACtE,CAAC;KACF;IAAC,OAAO,CAAC,EAAE;QACX,0EAA0E;QAC1E,wEAAwE;QACxE,0CAA0C;QAC1C,MAAM,OAAO,GAAI,CAAW,CAAC,OAAO,CAAC,OAAO,CAC3C,YAAY,EACZ,oCAAoC,CACpC,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KACzB;AACF,CAAC,CAAC;AAvBW,QAAA,2BAA2B,+BAuBtC"}
|
|
@@ -15,9 +15,9 @@ const loadAsyncStorage = () => {
|
|
|
15
15
|
throw new Error('Ensure `@react-native-async-storage/async-storage` is installed and linked.');
|
|
16
16
|
}
|
|
17
17
|
catch (e) {
|
|
18
|
-
// The error parsing logic cannot be
|
|
18
|
+
// The error parsing logic cannot be extracted with metro as the `require`
|
|
19
19
|
// would be confused when there is a `import` in the same file importing
|
|
20
|
-
// another module and that causes error
|
|
20
|
+
// another module and that causes an error
|
|
21
21
|
const message = e.message.replace(/undefined/g, '@react-native-async-storage/async-storage');
|
|
22
22
|
throw new Error(message);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadAsyncStorage.js","sourceRoot":"","sources":["../../src/moduleLoaders/loadAsyncStorage.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAI/B,MAAM,gBAAgB,GAAG,GAAuB,EAAE;IACxD,IAAI;QACH,2DAA2D;QAC3D,kFAAkF;QAClF,MAAM,MAAM,GAAG,OAAO,CAAC,2CAA2C,CAAC;YAClE,EAAE,OAA6B,CAAC;QACjC,IAAI,MAAM,EAAE;YACX,OAAO,MAAM,CAAC;SACd;QAED,MAAM,IAAI,KAAK,CACd,6EAA6E,CAC7E,CAAC;KACF;IAAC,OAAO,CAAC,EAAE;QACX,
|
|
1
|
+
{"version":3,"file":"loadAsyncStorage.js","sourceRoot":"","sources":["../../src/moduleLoaders/loadAsyncStorage.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAI/B,MAAM,gBAAgB,GAAG,GAAuB,EAAE;IACxD,IAAI;QACH,2DAA2D;QAC3D,kFAAkF;QAClF,MAAM,MAAM,GAAG,OAAO,CAAC,2CAA2C,CAAC;YAClE,EAAE,OAA6B,CAAC;QACjC,IAAI,MAAM,EAAE;YACX,OAAO,MAAM,CAAC;SACd;QAED,MAAM,IAAI,KAAK,CACd,6EAA6E,CAC7E,CAAC;KACF;IAAC,OAAO,CAAC,EAAE;QACX,0EAA0E;QAC1E,wEAAwE;QACxE,0CAA0C;QAC1C,MAAM,OAAO,GAAI,CAAW,CAAC,OAAO,CAAC,OAAO,CAC3C,YAAY,EACZ,2CAA2C,CAC3C,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KACzB;AACF,CAAC,CAAC;AAvBW,QAAA,gBAAgB,oBAuB3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getOperatingSystem: () => "ios" | "android" | "macos" | "windows" | "web";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOperatingSystem.js","sourceRoot":"","sources":["../../src/apis/getOperatingSystem.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC"}
|
package/lib-esm/apis/index.d.ts
CHANGED
package/lib-esm/apis/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/apis/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/apis/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/lib-esm/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export type { PushNotificationMessage, PushNotificationPermissions, PushNotificationPermissionStatus, } from '@aws-amplify/rtn-push-notification';
|
|
2
|
+
export { computeModPow, computeS, getOperatingSystem } from './apis';
|
|
3
|
+
export { loadAmplifyPushNotification, loadAsyncStorage, loadNetInfo, loadBuffer, loadUrlPolyfill, loadGetRandomValues, loadBase64, } from './moduleLoaders';
|
package/lib-esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
export { computeModPow, computeS } from './apis';
|
|
4
|
-
export { loadAsyncStorage, loadNetInfo, loadBuffer, loadUrlPolyfill, loadGetRandomValues, loadBase64, } from './moduleLoaders';
|
|
3
|
+
export { computeModPow, computeS, getOperatingSystem } from './apis';
|
|
4
|
+
export { loadAmplifyPushNotification, loadAsyncStorage, loadNetInfo, loadBuffer, loadUrlPolyfill, loadGetRandomValues, loadBase64, } from './moduleLoaders';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/lib-esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAOtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EACN,2BAA2B,EAC3B,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,UAAU,GACV,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
export { loadAmplifyPushNotification } from './loadAmplifyPushNotification';
|
|
3
4
|
export { loadAsyncStorage } from './loadAsyncStorage';
|
|
4
5
|
export { loadNetInfo } from './loadNetInfo';
|
|
5
6
|
export { loadBuffer } from './loadBuffer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/moduleLoaders/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/moduleLoaders/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const loadAmplifyPushNotification: () => {
|
|
2
|
+
addMessageEventListener: (event: string, listener: (message: import("@aws-amplify/rtn-push-notification").PushNotificationMessage | null, completionHandlerId?: string | undefined) => void) => import("react-native").EmitterSubscription;
|
|
3
|
+
addTokenEventListener: (event: string, listener: (token: string) => void) => import("react-native").EmitterSubscription;
|
|
4
|
+
completeNotification: (completionHandlerId: string) => void;
|
|
5
|
+
getBadgeCount: () => void | Promise<number | null>;
|
|
6
|
+
getConstants: () => {
|
|
7
|
+
NativeEvent: {
|
|
8
|
+
BACKGROUND_MESSAGE_RECEIVED?: string | undefined;
|
|
9
|
+
FOREGROUND_MESSAGE_RECEIVED: string;
|
|
10
|
+
LAUNCH_NOTIFICATION_OPENED: string;
|
|
11
|
+
NOTIFICATION_OPENED: string;
|
|
12
|
+
TOKEN_RECEIVED: string;
|
|
13
|
+
};
|
|
14
|
+
NativeHeadlessTaskKey?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
getLaunchNotification: () => Promise<import("@aws-amplify/rtn-push-notification").PushNotificationMessage | null>;
|
|
17
|
+
getPermissionStatus: () => Promise<import("@aws-amplify/rtn-push-notification").PushNotificationPermissionStatus>;
|
|
18
|
+
registerHeadlessTask: (task: (message: import("@aws-amplify/rtn-push-notification").PushNotificationMessage | null) => Promise<void>) => void;
|
|
19
|
+
requestPermissions: (permissions?: import("@aws-amplify/rtn-push-notification").PushNotificationPermissions | undefined) => Promise<boolean>;
|
|
20
|
+
setBadgeCount: (count: number) => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
export const loadAmplifyPushNotification = () => {
|
|
4
|
+
try {
|
|
5
|
+
// metro bundler requires static string for loading module.
|
|
6
|
+
// See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages
|
|
7
|
+
const module = require('@aws-amplify/rtn-push-notification')
|
|
8
|
+
?.module;
|
|
9
|
+
if (module) {
|
|
10
|
+
return module;
|
|
11
|
+
}
|
|
12
|
+
throw new Error('Ensure `@aws-amplify/rtn-push-notification` is installed and linked.');
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
15
|
+
// The error parsing logic cannot be extracted with metro as the `require`
|
|
16
|
+
// would be confused when there is a `import` in the same file importing
|
|
17
|
+
// another module and that causes an error
|
|
18
|
+
const message = e.message.replace(/undefined/g, '@aws-amplify/rtn-push-notification');
|
|
19
|
+
throw new Error(message);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=loadAmplifyPushNotification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadAmplifyPushNotification.js","sourceRoot":"","sources":["../../src/moduleLoaders/loadAmplifyPushNotification.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAItC,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC/C,IAAI;QACH,2DAA2D;QAC3D,kFAAkF;QAClF,MAAM,MAAM,GAAG,OAAO,CAAC,oCAAoC,CAAC;YAC3D,EAAE,MAAgC,CAAC;QACpC,IAAI,MAAM,EAAE;YACX,OAAO,MAAM,CAAC;SACd;QAED,MAAM,IAAI,KAAK,CACd,sEAAsE,CACtE,CAAC;KACF;IAAC,OAAO,CAAC,EAAE;QACX,0EAA0E;QAC1E,wEAAwE;QACxE,0CAA0C;QAC1C,MAAM,OAAO,GAAI,CAAW,CAAC,OAAO,CAAC,OAAO,CAC3C,YAAY,EACZ,oCAAoC,CACpC,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KACzB;AACF,CAAC,CAAC"}
|
|
@@ -12,9 +12,9 @@ export const loadAsyncStorage = () => {
|
|
|
12
12
|
throw new Error('Ensure `@react-native-async-storage/async-storage` is installed and linked.');
|
|
13
13
|
}
|
|
14
14
|
catch (e) {
|
|
15
|
-
// The error parsing logic cannot be
|
|
15
|
+
// The error parsing logic cannot be extracted with metro as the `require`
|
|
16
16
|
// would be confused when there is a `import` in the same file importing
|
|
17
|
-
// another module and that causes error
|
|
17
|
+
// another module and that causes an error
|
|
18
18
|
const message = e.message.replace(/undefined/g, '@react-native-async-storage/async-storage');
|
|
19
19
|
throw new Error(message);
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadAsyncStorage.js","sourceRoot":"","sources":["../../src/moduleLoaders/loadAsyncStorage.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAItC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAuB,EAAE;IACxD,IAAI;QACH,2DAA2D;QAC3D,kFAAkF;QAClF,MAAM,MAAM,GAAG,OAAO,CAAC,2CAA2C,CAAC;YAClE,EAAE,OAA6B,CAAC;QACjC,IAAI,MAAM,EAAE;YACX,OAAO,MAAM,CAAC;SACd;QAED,MAAM,IAAI,KAAK,CACd,6EAA6E,CAC7E,CAAC;KACF;IAAC,OAAO,CAAC,EAAE;QACX,
|
|
1
|
+
{"version":3,"file":"loadAsyncStorage.js","sourceRoot":"","sources":["../../src/moduleLoaders/loadAsyncStorage.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAItC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAuB,EAAE;IACxD,IAAI;QACH,2DAA2D;QAC3D,kFAAkF;QAClF,MAAM,MAAM,GAAG,OAAO,CAAC,2CAA2C,CAAC;YAClE,EAAE,OAA6B,CAAC;QACjC,IAAI,MAAM,EAAE;YACX,OAAO,MAAM,CAAC;SACd;QAED,MAAM,IAAI,KAAK,CACd,6EAA6E,CAC7E,CAAC;KACF;IAAC,OAAO,CAAC,EAAE;QACX,0EAA0E;QAC1E,wEAAwE;QACxE,0CAA0C;QAC1C,MAAM,OAAO,GAAI,CAAW,CAAC,OAAO,CAAC,OAAO,CAC3C,YAAY,EACZ,2CAA2C,CAC3C,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KACzB;AACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/react-native",
|
|
3
|
-
"version": "1.0.1-console-preview.
|
|
3
|
+
"version": "1.0.1-console-preview.8d88eef.0+8d88eef",
|
|
4
4
|
"description": "React Native core module for aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"react-native-get-random-values": ">=1.9.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
+
"@aws-amplify/rtn-push-notification": "1.2.1-console-preview.8d88eef.0+8d88eef",
|
|
37
|
+
"@aws-amplify/rtn-web-browser": "1.0.1-console-preview.8d88eef.0+8d88eef",
|
|
36
38
|
"@react-native-async-storage/async-storage": "^1.17.12",
|
|
37
39
|
"@react-native-community/netinfo": "4.7.0",
|
|
38
40
|
"@types/base-64": "1.0.0",
|
|
@@ -63,5 +65,5 @@
|
|
|
63
65
|
"src"
|
|
64
66
|
],
|
|
65
67
|
"source": "src/index",
|
|
66
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "8d88eef4137cef4fbe03d7d3683b5bec59feb7b8"
|
|
67
69
|
}
|
package/src/apis/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
export {
|
|
4
|
+
export type {
|
|
5
|
+
PushNotificationMessage,
|
|
6
|
+
PushNotificationPermissions,
|
|
7
|
+
PushNotificationPermissionStatus,
|
|
8
|
+
} from '@aws-amplify/rtn-push-notification';
|
|
9
|
+
export { computeModPow, computeS, getOperatingSystem } from './apis';
|
|
5
10
|
export {
|
|
11
|
+
loadAmplifyPushNotification,
|
|
6
12
|
loadAsyncStorage,
|
|
7
13
|
loadNetInfo,
|
|
8
14
|
loadBuffer,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
export { loadAmplifyPushNotification } from './loadAmplifyPushNotification';
|
|
4
5
|
export { loadAsyncStorage } from './loadAsyncStorage';
|
|
5
6
|
export { loadNetInfo } from './loadNetInfo';
|
|
6
7
|
export { loadBuffer } from './loadBuffer';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import type { PushNotificationModule } from '@aws-amplify/rtn-push-notification';
|
|
5
|
+
|
|
6
|
+
export const loadAmplifyPushNotification = () => {
|
|
7
|
+
try {
|
|
8
|
+
// metro bundler requires static string for loading module.
|
|
9
|
+
// See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages
|
|
10
|
+
const module = require('@aws-amplify/rtn-push-notification')
|
|
11
|
+
?.module as PushNotificationModule;
|
|
12
|
+
if (module) {
|
|
13
|
+
return module;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
throw new Error(
|
|
17
|
+
'Ensure `@aws-amplify/rtn-push-notification` is installed and linked.'
|
|
18
|
+
);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
// The error parsing logic cannot be extracted with metro as the `require`
|
|
21
|
+
// would be confused when there is a `import` in the same file importing
|
|
22
|
+
// another module and that causes an error
|
|
23
|
+
const message = (e as Error).message.replace(
|
|
24
|
+
/undefined/g,
|
|
25
|
+
'@aws-amplify/rtn-push-notification'
|
|
26
|
+
);
|
|
27
|
+
throw new Error(message);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -17,9 +17,9 @@ export const loadAsyncStorage = (): AsyncStorageStatic => {
|
|
|
17
17
|
'Ensure `@react-native-async-storage/async-storage` is installed and linked.'
|
|
18
18
|
);
|
|
19
19
|
} catch (e) {
|
|
20
|
-
// The error parsing logic cannot be
|
|
20
|
+
// The error parsing logic cannot be extracted with metro as the `require`
|
|
21
21
|
// would be confused when there is a `import` in the same file importing
|
|
22
|
-
// another module and that causes error
|
|
22
|
+
// another module and that causes an error
|
|
23
23
|
const message = (e as Error).message.replace(
|
|
24
24
|
/undefined/g,
|
|
25
25
|
'@react-native-async-storage/async-storage'
|