@aws-amplify/notifications 2.0.4-unstable.4d80239.0 → 2.0.5-unstable.4e12ec9.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/notifications",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5-unstable.4e12ec9.0+4e12ec9",
|
|
4
4
|
"description": "Notifications category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -95,11 +95,11 @@
|
|
|
95
95
|
"tslib": "^2.5.0"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@aws-amplify/core": "6.0.
|
|
98
|
+
"@aws-amplify/core": "6.0.5-unstable.4e12ec9.0+4e12ec9"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@aws-amplify/core": "6.0.
|
|
102
|
-
"@aws-amplify/react-native": "1.0.
|
|
101
|
+
"@aws-amplify/core": "6.0.5-unstable.4e12ec9.0+4e12ec9",
|
|
102
|
+
"@aws-amplify/react-native": "1.0.5-unstable.4e12ec9.0+4e12ec9",
|
|
103
103
|
"@rollup/plugin-typescript": "11.1.5",
|
|
104
104
|
"rollup": "3.29.4",
|
|
105
105
|
"typescript": "5.0.2"
|
|
@@ -144,5 +144,5 @@
|
|
|
144
144
|
"dist"
|
|
145
145
|
]
|
|
146
146
|
},
|
|
147
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "4e12ec91147a034b4d53551fce1c327403e674e6"
|
|
148
148
|
}
|
|
@@ -98,8 +98,8 @@ export const matchesAttributes = (
|
|
|
98
98
|
if (!eventAttributesMemo.hasOwnProperty(memoKey)) {
|
|
99
99
|
eventAttributesMemo[memoKey] =
|
|
100
100
|
!Attributes ||
|
|
101
|
-
Object.entries(Attributes).every(
|
|
102
|
-
|
|
101
|
+
Object.entries(Attributes).every(([key, { Values }]) =>
|
|
102
|
+
Values?.includes(attributes[key])
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
return eventAttributesMemo[memoKey];
|
|
@@ -76,8 +76,9 @@ export function sessionStateChangeHandler(state: SessionState): void {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export async function incrementMessageCounts(messageId: string): Promise<void> {
|
|
79
|
-
const { sessionCount, dailyCount, totalCount } =
|
|
80
|
-
|
|
79
|
+
const { sessionCount, dailyCount, totalCount } = await getMessageCounts(
|
|
80
|
+
messageId
|
|
81
|
+
);
|
|
81
82
|
setSessionCount(messageId, sessionCount + 1);
|
|
82
83
|
setDailyCount(dailyCount + 1);
|
|
83
84
|
await setTotalCount(messageId, totalCount + 1);
|
|
@@ -105,8 +106,9 @@ async function isBelowCap({
|
|
|
105
106
|
DailyCap,
|
|
106
107
|
TotalCap,
|
|
107
108
|
}: PinpointInAppMessage): Promise<Boolean> {
|
|
108
|
-
const { sessionCount, dailyCount, totalCount } =
|
|
109
|
-
|
|
109
|
+
const { sessionCount, dailyCount, totalCount } = await getMessageCounts(
|
|
110
|
+
CampaignId
|
|
111
|
+
);
|
|
110
112
|
|
|
111
113
|
return (
|
|
112
114
|
(!SessionCap || sessionCount < SessionCap) &&
|
|
@@ -8,8 +8,7 @@ import { InAppMessagingServiceOptions } from '.';
|
|
|
8
8
|
* Input type for `identifyUser`.
|
|
9
9
|
*/
|
|
10
10
|
export type InAppMessagingIdentifyUserInput<
|
|
11
|
-
ServiceOptions extends
|
|
12
|
-
InAppMessagingServiceOptions = InAppMessagingServiceOptions,
|
|
11
|
+
ServiceOptions extends InAppMessagingServiceOptions = InAppMessagingServiceOptions
|
|
13
12
|
> = {
|
|
14
13
|
/**
|
|
15
14
|
* A User ID associated to the current device.
|
|
@@ -10,8 +10,7 @@ import {
|
|
|
10
10
|
} from './pushNotifications';
|
|
11
11
|
|
|
12
12
|
export type PushNotificationIdentifyUserInput<
|
|
13
|
-
ServiceOptions extends
|
|
14
|
-
PushNotificationServiceOptions = PushNotificationServiceOptions,
|
|
13
|
+
ServiceOptions extends PushNotificationServiceOptions = PushNotificationServiceOptions
|
|
15
14
|
> = {
|
|
16
15
|
/**
|
|
17
16
|
* A User ID associated to the current device.
|