@allboatsrise/expo-marketingcloudsdk 51.0.13 → 53.0.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/android/build.gradle +3 -3
- package/build/ExpoMarketingCloudSdk.types.d.ts +5 -0
- package/build/ExpoMarketingCloudSdk.types.d.ts.map +1 -1
- package/build/ExpoMarketingCloudSdk.types.js.map +1 -1
- package/build/ExpoMarketingCloudSdkModule.d.ts +5 -1
- package/build/ExpoMarketingCloudSdkModule.d.ts.map +1 -1
- package/build/ExpoMarketingCloudSdkModule.js +2 -3
- package/build/ExpoMarketingCloudSdkModule.js.map +1 -1
- package/build/index.d.ts +3 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -5
- package/build/index.js.map +1 -1
- package/build/notifications/helpers/extractPayloadFromSfmcNotificationResponse.d.ts.map +1 -1
- package/build/notifications/helpers/isSfmcNotificationResponse.d.ts.map +1 -1
- package/build/notifications/helpers/normalizeSfmcNotificationResponsePayload.d.ts.map +1 -1
- package/ios/ExpoMarketingCloudSdk-Bridging-Header.h +0 -1
- package/ios/ExpoMarketingCloudSdkAppDelegateSubscriber.swift +4 -4
- package/ios/ExpoMarketingCloudSdkNotificationsDelegate.swift +14 -13
- package/package.json +8 -7
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
group = 'expo.modules.marketingcloudsdk'
|
|
4
|
-
version = '
|
|
4
|
+
version = '53.0.1'
|
|
5
5
|
|
|
6
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
7
7
|
apply from: expoModulesCorePlugin
|
|
@@ -35,7 +35,7 @@ android {
|
|
|
35
35
|
namespace "expo.modules.marketingcloudsdk"
|
|
36
36
|
defaultConfig {
|
|
37
37
|
versionCode 1
|
|
38
|
-
versionName "
|
|
38
|
+
versionName "53.0.1"
|
|
39
39
|
}
|
|
40
40
|
lintOptions {
|
|
41
41
|
abortOnError false
|
|
@@ -47,7 +47,7 @@ repositories {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
dependencies {
|
|
50
|
-
implementation
|
|
50
|
+
implementation 'host.exp.exponent:expo.modules.notifications:0.31.4'
|
|
51
51
|
implementation 'com.facebook.react:react-native:+'
|
|
52
52
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"
|
|
53
53
|
api "com.salesforce.marketingcloud:marketingcloudsdk:8.2.2"
|
|
@@ -64,4 +64,9 @@ export type RegistrationResponseSucceededPayload = {
|
|
|
64
64
|
"platform_Version": string;
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
+
export type ExpoMarketingCloudSdkModuleEvents = {
|
|
68
|
+
onLog: (params: LogEventPayload) => void;
|
|
69
|
+
onInboxResponse: (params: InboxResponsePayload) => void;
|
|
70
|
+
onRegistrationResponseSucceeded: (params: RegistrationResponseSucceededPayload) => void;
|
|
71
|
+
};
|
|
67
72
|
//# sourceMappingURL=ExpoMarketingCloudSdk.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoMarketingCloudSdk.types.d.ts","sourceRoot":"","sources":["../src/ExpoMarketingCloudSdk.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,qCAAqC;IACrC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,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AAE,oBAAoB,KAAK,IAAI,CAAC;IACxD,+BAA+B,EAAE,CAAC,MAAM,EAAE,oCAAoC,KAAK,IAAI,CAAC;CACzF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoMarketingCloudSdk.types.js","sourceRoot":"","sources":["../src/ExpoMarketingCloudSdk.types.ts"],"names":[],"mappings":"","sourcesContent":["export type LogEventPayload = {\n level: string\n subsystem: string\n category: string\n message: string\n stackTrace?: string\n}\n\nexport type Media = {\n altText: string | null\n url: string\n}\n\nexport type InboxMessage = {\n /** Push notification message body */\n alert: string | null\n /** Custom payload defined via POST /push/v1/messageContact/{messageId}/send */\n custom: Record<string, unknown> | null\n /** Custom key/value pairs defined for the app and set in message */\n customKeys: Record<string, string> | null\n deleted: boolean\n endDateUtc: string\n id: string\n media: Media | null\n /** Indicates whether inbox message has been marked as read */\n read: boolean\n sendDateUtc: string\n sound: 'default' | 'custom.caf' | null\n /** Inbox Message Title */\n subject: string\n /** Push notification title */\n title: string | null\n startDateUtc: string\n /** Push notification subtitle */\n subtitle: string | null\n /** Url to SFMC CloudPage */\n url: string\n}\n\nexport type InboxResponsePayload = {\n messages: InboxMessage[]\n}\n\nexport type RegistrationResponseSucceededPayload = {\n response: {\n \"quietPushEnabled\" : boolean,\n \"location_Enabled\" : boolean,\n \"registrationId\" : string,\n \"timeZone\" : string,\n \"locale\" : string,\n \"etAppId\" : string,\n \"attributes\" : Array<\n {\n \"key\" : string,\n \"value\" : string\n }\n >,\n \"proximity_Enabled\" : boolean,\n \"subscriberKey\" : string,\n \"platform\" : string,\n \"sdk_Version\" : string,\n \"language\" : string,\n \"app_Version\" : string,\n \"deviceID\" : string,\n \"tags\" : string[],\n \"hwid\" : string,\n \"push_Enabled\" : boolean,\n \"device_Token\" : string,\n \"dST\" : boolean,\n \"platform_Version\" : string\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ExpoMarketingCloudSdk.types.js","sourceRoot":"","sources":["../src/ExpoMarketingCloudSdk.types.ts"],"names":[],"mappings":"","sourcesContent":["export type LogEventPayload = {\n level: string\n subsystem: string\n category: string\n message: string\n stackTrace?: string\n}\n\nexport type Media = {\n altText: string | null\n url: string\n}\n\nexport type InboxMessage = {\n /** Push notification message body */\n alert: string | null\n /** Custom payload defined via POST /push/v1/messageContact/{messageId}/send */\n custom: Record<string, unknown> | null\n /** Custom key/value pairs defined for the app and set in message */\n customKeys: Record<string, string> | null\n deleted: boolean\n endDateUtc: string\n id: string\n media: Media | null\n /** Indicates whether inbox message has been marked as read */\n read: boolean\n sendDateUtc: string\n sound: 'default' | 'custom.caf' | null\n /** Inbox Message Title */\n subject: string\n /** Push notification title */\n title: string | null\n startDateUtc: string\n /** Push notification subtitle */\n subtitle: string | null\n /** Url to SFMC CloudPage */\n url: string\n}\n\nexport type InboxResponsePayload = {\n messages: InboxMessage[]\n}\n\nexport type RegistrationResponseSucceededPayload = {\n response: {\n \"quietPushEnabled\" : boolean,\n \"location_Enabled\" : boolean,\n \"registrationId\" : string,\n \"timeZone\" : string,\n \"locale\" : string,\n \"etAppId\" : string,\n \"attributes\" : Array<\n {\n \"key\" : string,\n \"value\" : string\n }\n >,\n \"proximity_Enabled\" : boolean,\n \"subscriberKey\" : string,\n \"platform\" : string,\n \"sdk_Version\" : string,\n \"language\" : string,\n \"app_Version\" : string,\n \"deviceID\" : string,\n \"tags\" : string[],\n \"hwid\" : string,\n \"push_Enabled\" : boolean,\n \"device_Token\" : string,\n \"dST\" : boolean,\n \"platform_Version\" : string\n }\n}\n\nexport type ExpoMarketingCloudSdkModuleEvents = {\n onLog: (params: LogEventPayload) => void;\n onInboxResponse: (params: InboxResponsePayload) => void;\n onRegistrationResponseSucceeded: (params: RegistrationResponseSucceededPayload) => void;\n}\n"]}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { NativeModule } from 'expo';
|
|
2
|
+
import { ExpoMarketingCloudSdkModuleEvents } from './ExpoMarketingCloudSdk.types';
|
|
3
|
+
declare class ExpoMarketingCloudSdkModule extends NativeModule<ExpoMarketingCloudSdkModuleEvents> {
|
|
4
|
+
}
|
|
5
|
+
declare const _default: ExpoMarketingCloudSdkModule;
|
|
2
6
|
export default _default;
|
|
3
7
|
//# sourceMappingURL=ExpoMarketingCloudSdkModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoMarketingCloudSdkModule.d.ts","sourceRoot":"","sources":["../src/ExpoMarketingCloudSdkModule.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ExpoMarketingCloudSdkModule.d.ts","sourceRoot":"","sources":["../src/ExpoMarketingCloudSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,+BAA+B,CAAC;AAElF,OAAO,OAAO,2BAA4B,SAAQ,YAAY,CAAC,iCAAiC,CAAC;CAAG;;AAGpG,wBAAyF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { requireNativeModule } from 'expo
|
|
2
|
-
//
|
|
3
|
-
// the bridge module (from NativeModulesProxy) if the remote debugger is on.
|
|
1
|
+
import { requireNativeModule } from 'expo';
|
|
2
|
+
// This call loads the native module object from the JSI.
|
|
4
3
|
export default requireNativeModule('ExpoMarketingCloudSdk');
|
|
5
4
|
//# sourceMappingURL=ExpoMarketingCloudSdkModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoMarketingCloudSdkModule.js","sourceRoot":"","sources":["../src/ExpoMarketingCloudSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ExpoMarketingCloudSdkModule.js","sourceRoot":"","sources":["../src/ExpoMarketingCloudSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAKzD,yDAAyD;AACzD,eAAe,mBAAmB,CAA8B,uBAAuB,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo';\nimport { ExpoMarketingCloudSdkModuleEvents } from './ExpoMarketingCloudSdk.types';\n\ndeclare class ExpoMarketingCloudSdkModule extends NativeModule<ExpoMarketingCloudSdkModuleEvents> {}\n\n// This call loads the native module object from the JSI.\nexport default requireNativeModule<ExpoMarketingCloudSdkModule>('ExpoMarketingCloudSdk');\n\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Subscription } from 'expo-modules-core';
|
|
2
1
|
import { InboxResponsePayload, LogEventPayload, InboxMessage, RegistrationResponseSucceededPayload } from './ExpoMarketingCloudSdk.types';
|
|
3
2
|
export { isSfmcNotificationResponse } from './notifications/helpers/isSfmcNotificationResponse';
|
|
4
3
|
export { extractPayloadFromSfmcNotificationResponse } from './notifications/helpers/extractPayloadFromSfmcNotificationResponse';
|
|
@@ -37,8 +36,8 @@ export declare function trackMessageOpened(messageId: string): Promise<boolean>;
|
|
|
37
36
|
export declare function isAnalyticsEnabled(): Promise<boolean>;
|
|
38
37
|
export declare function enableAnalytics(): Promise<boolean>;
|
|
39
38
|
export declare function disableAnalytics(): Promise<boolean>;
|
|
40
|
-
export declare function addLogListener(listener: (event: LogEventPayload) => void):
|
|
41
|
-
export declare function addInboxResponseListener(listener: (event: InboxResponsePayload) => void):
|
|
42
|
-
export declare function addRegistrationResponseSucceededListener(listener: (event: RegistrationResponseSucceededPayload) => void):
|
|
39
|
+
export declare function addLogListener(listener: (event: LogEventPayload) => void): import("expo-modules-core/build/ts-declarations/EventEmitter").EventSubscription;
|
|
40
|
+
export declare function addInboxResponseListener(listener: (event: InboxResponsePayload) => void): import("expo-modules-core/build/ts-declarations/EventEmitter").EventSubscription;
|
|
41
|
+
export declare function addRegistrationResponseSucceededListener(listener: (event: RegistrationResponseSucceededPayload) => void): import("expo-modules-core/build/ts-declarations/EventEmitter").EventSubscription;
|
|
43
42
|
export { LogEventPayload, InboxResponsePayload, InboxMessage, RegistrationResponseSucceededPayload };
|
|
44
43
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,YAAY,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAC;AAE1I,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAA;AAC/F,OAAO,EAAE,0CAA0C,EAAE,MAAM,oEAAoE,CAAA;AAC/H,OAAO,EAAE,+BAA+B,EAAE,MAAM,uDAAuD,CAAA;AACvG,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AAE/H,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAEtD;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,CAEnD;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAEpD;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE7D;AAED,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE1E;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE1D;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAE5E;AAED,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CA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CAE7D;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAEjE;AAED,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAE5D;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEzD;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,CAErD;AAED,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAErE;AAED,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE5E;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC,CAE3D;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAExD;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAEzD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,oFAExE;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,oFAEvF;AAED,wBAAgB,wCAAwC,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,oCAAoC,KAAK,IAAI,oFAEvH;AAED,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,YAAY,EAAE,oCAAoC,EAAE,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NativeModulesProxy, EventEmitter } from 'expo-modules-core';
|
|
2
1
|
import ExpoMarketingCloudSdkModule from './ExpoMarketingCloudSdkModule';
|
|
3
2
|
export { isSfmcNotificationResponse } from './notifications/helpers/isSfmcNotificationResponse';
|
|
4
3
|
export { extractPayloadFromSfmcNotificationResponse } from './notifications/helpers/extractPayloadFromSfmcNotificationResponse';
|
|
@@ -103,14 +102,13 @@ export async function enableAnalytics() {
|
|
|
103
102
|
export async function disableAnalytics() {
|
|
104
103
|
return await ExpoMarketingCloudSdkModule.disableAnalytics();
|
|
105
104
|
}
|
|
106
|
-
const emitter = new EventEmitter(ExpoMarketingCloudSdkModule ?? NativeModulesProxy.ExpoMarketingCloudSdk);
|
|
107
105
|
export function addLogListener(listener) {
|
|
108
|
-
return
|
|
106
|
+
return ExpoMarketingCloudSdkModule.addListener('onLog', listener);
|
|
109
107
|
}
|
|
110
108
|
export function addInboxResponseListener(listener) {
|
|
111
|
-
return
|
|
109
|
+
return ExpoMarketingCloudSdkModule.addListener('onInboxResponse', listener);
|
|
112
110
|
}
|
|
113
111
|
export function addRegistrationResponseSucceededListener(listener) {
|
|
114
|
-
return
|
|
112
|
+
return ExpoMarketingCloudSdkModule.addListener('onRegistrationResponseSucceeded', listener);
|
|
115
113
|
}
|
|
116
114
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AAGxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAA;AAC/F,OAAO,EAAE,0CAA0C,EAAE,MAAM,oEAAoE,CAAA;AAC/H,OAAO,EAAE,+BAA+B,EAAE,MAAM,uDAAuD,CAAA;AACvG,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAmC,MAAM,uBAAuB,CAAA;AAE/H,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,OAAO,MAAM,2BAA2B,CAAC,aAAa,EAAE,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,OAAO,MAAM,2BAA2B,CAAC,UAAU,EAAE,CAAC;AACxD,CAAC;AAED,MA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CAAA;AAC7F,CAAC","sourcesContent":["import ExpoMarketingCloudSdkModule from './ExpoMarketingCloudSdkModule';\nimport { InboxResponsePayload, LogEventPayload, InboxMessage, RegistrationResponseSucceededPayload } from './ExpoMarketingCloudSdk.types';\n\nexport { isSfmcNotificationResponse } from './notifications/helpers/isSfmcNotificationResponse'\nexport { extractPayloadFromSfmcNotificationResponse } from './notifications/helpers/extractPayloadFromSfmcNotificationResponse'\nexport { useLastSfmcNotificationResponse } from './notifications/hooks/useLastSfmcNotificationResponse'\nexport { SfmcNotificationMessageType, SfmcNotificationSoundType, SfmcNotificationResponsePayload } from './notifications/types'\n\nexport async function isPushEnabled(): Promise<boolean> {\n return await ExpoMarketingCloudSdkModule.isPushEnabled();\n}\n\nexport async function enablePush(): Promise<boolean> {\n return await ExpoMarketingCloudSdkModule.enablePush();\n}\n\nexport async function disablePush(): Promise<boolean> {\n return await ExpoMarketingCloudSdkModule.disablePush();\n}\n\nexport async function getSystemToken(): Promise<string | null> {\n return await ExpoMarketingCloudSdkModule.getSystemToken();\n}\n\nexport async function setSystemToken(token: string): Promise<string | null> {\n return await ExpoMarketingCloudSdkModule.setSystemToken(token);\n}\n\nexport async function getDeviceID(): Promise<string | null> {\n return await ExpoMarketingCloudSdkModule.getDeviceID();\n}\n\nexport async function getAttributes(): Promise<Record<string, string> | null> {\n return await ExpoMarketingCloudSdkModule.getAttributes();\n}\n\nexport async function setAttribute(key: string, value: string): Promise<Record<string, string> | null> {\n return await ExpoMarketingCloudSdkModule.setAttribute(key, value);\n}\n\nexport async function clearAttribute(key: string): Promise<Record<string, string> | null> {\n return await ExpoMarketingCloudSdkModule.clearAttribute(key);\n}\n\nexport async function addTag(tag: string): Promise<void> {\n await ExpoMarketingCloudSdkModule.addTag(tag);\n}\n\nexport async function removeTag(tag: string): Promise<void> {\n await ExpoMarketingCloudSdkModule.removeTag(tag);\n}\n\nexport async function getTags(): Promise<string[] | null> {\n return await ExpoMarketingCloudSdkModule.getTags();\n}\n\nexport async function setContactKey(contactKey: string): Promise<string | null> {\n return await ExpoMarketingCloudSdkModule.setContactKey(contactKey);\n}\n\nexport async function getContactKey(): Promise<string | null> {\n return await ExpoMarketingCloudSdkModule.getContactKey();\n}\n\nexport async function getSdkState(): Promise<string> {\n return await ExpoMarketingCloudSdkModule.getSdkState();\n}\n\nexport async function track(name: string, attributes: Record<string, string>): Promise<true> {\n return await ExpoMarketingCloudSdkModule.track(name, attributes);\n}\n\nexport async function deleteMessage(messageId: string): Promise<void> {\n await ExpoMarketingCloudSdkModule.deleteMessage(messageId);\n}\n\nexport async function getDeletedMessageCount(): Promise<number> {\n return await ExpoMarketingCloudSdkModule.getDeletedMessageCount();\n}\n\nexport async function getDeletedMessages(): Promise<InboxMessage[]> {\n return await ExpoMarketingCloudSdkModule.getDeletedMessages();\n}\n\nexport async function getMessageCount(): Promise<number> {\n return await ExpoMarketingCloudSdkModule.getMessageCount();\n}\n\nexport async function getMessages(): Promise<InboxMessage[]> {\n return await ExpoMarketingCloudSdkModule.getMessages();\n}\n\nexport async function getReadMessageCount(): Promise<number> {\n return await ExpoMarketingCloudSdkModule.getReadMessageCount();\n}\n\nexport async function getReadMessages(): Promise<InboxMessage[]> {\n return await ExpoMarketingCloudSdkModule.getReadMessages();\n}\n\nexport async function getUnreadMessageCount(): Promise<number> {\n return await ExpoMarketingCloudSdkModule.getUnreadMessageCount();\n}\n\nexport async function getUnreadMessages(): Promise<InboxMessage[]> {\n return await ExpoMarketingCloudSdkModule.getUnreadMessages();\n}\n\nexport async function markAllMessagesDeleted(): Promise<void> {\n await ExpoMarketingCloudSdkModule.markAllMessagesDeleted();\n}\n\nexport async function markAllMessagesRead(): Promise<void> {\n await ExpoMarketingCloudSdkModule.markAllMessagesRead();\n}\n\nexport async function refreshInbox(): Promise<boolean> {\n return await ExpoMarketingCloudSdkModule.refreshInbox();\n}\n\nexport async function setMessageRead(messageId: string): Promise<void> {\n await ExpoMarketingCloudSdkModule.setMessageRead(messageId);\n}\n\nexport async function trackMessageOpened(messageId: string): Promise<boolean> {\n return await ExpoMarketingCloudSdkModule.trackMessageOpened(messageId);\n}\n\nexport async function isAnalyticsEnabled(): Promise<boolean> {\n return await ExpoMarketingCloudSdkModule.isAnalyticsEnabled();\n}\n\nexport async function enableAnalytics(): Promise<boolean> {\n return await ExpoMarketingCloudSdkModule.enableAnalytics();\n}\n\nexport async function disableAnalytics(): Promise<boolean> {\n return await ExpoMarketingCloudSdkModule.disableAnalytics();\n}\n\nexport function addLogListener(listener: (event: LogEventPayload) => void) {\n return ExpoMarketingCloudSdkModule.addListener('onLog', listener);\n}\n\nexport function addInboxResponseListener(listener: (event: InboxResponsePayload) => void) {\n return ExpoMarketingCloudSdkModule.addListener('onInboxResponse', listener)\n}\n\nexport function addRegistrationResponseSucceededListener(listener: (event: RegistrationResponseSucceededPayload) => void) {\n return ExpoMarketingCloudSdkModule.addListener('onRegistrationResponseSucceeded', listener)\n}\n\nexport { LogEventPayload, InboxResponsePayload, InboxMessage, RegistrationResponseSucceededPayload }\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractPayloadFromSfmcNotificationResponse.d.ts","sourceRoot":"","sources":["../../../src/notifications/helpers/extractPayloadFromSfmcNotificationResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAMvF,eAAO,MAAM,iDAAiD,
|
|
1
|
+
{"version":3,"file":"extractPayloadFromSfmcNotificationResponse.d.ts","sourceRoot":"","sources":["../../../src/notifications/helpers/extractPayloadFromSfmcNotificationResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAMvF,eAAO,MAAM,iDAAiD,GAC5D,sBAAsB,+BAA+B,uDAKtD,CAAA;AAED,eAAO,MAAM,6CAA6C,GACxD,sBAAsB,2BAA2B,uDAKlD,CAAA;AAED,eAAO,MAAM,0CAA0C,0BAf/B,+BAA+B,mFAQ/B,2BAA2B,wDAUA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isSfmcNotificationResponse.d.ts","sourceRoot":"","sources":["../../../src/notifications/helpers/isSfmcNotificationResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,EAE5B,MAAM,UAAU,CAAA;AAEjB,eAAO,MAAM,iCAAiC,
|
|
1
|
+
{"version":3,"file":"isSfmcNotificationResponse.d.ts","sourceRoot":"","sources":["../../../src/notifications/helpers/isSfmcNotificationResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,EAE5B,MAAM,UAAU,CAAA;AAEjB,eAAO,MAAM,iCAAiC,GAC5C,sBAAsB,oBAAoB,KACzC,oBAAoB,IAAI,+BAG1B,CAAA;AAED,eAAO,MAAM,6BAA6B,GACxC,sBAAsB,oBAAoB,KACzC,oBAAoB,IAAI,2BAU1B,CAAA;AAED,eAAO,MAAM,0BAA0B,0BApBf,oBAAoB,KACzC,oBAAoB,IAAI,+BAA+B,4BAMlC,oBAAoB,KACzC,oBAAoB,IAAI,2BAA2B,CAayC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeSfmcNotificationResponsePayload.d.ts","sourceRoot":"","sources":["../../../src/notifications/helpers/normalizeSfmcNotificationResponsePayload.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sCAAsC,EACtC,+BAA+B,EAC/B,yCAAyC,EAG1C,MAAM,UAAU,CAAA;AAEjB,eAAO,MAAM,+CAA+C,
|
|
1
|
+
{"version":3,"file":"normalizeSfmcNotificationResponsePayload.d.ts","sourceRoot":"","sources":["../../../src/notifications/helpers/normalizeSfmcNotificationResponsePayload.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sCAAsC,EACtC,+BAA+B,EAC/B,yCAAyC,EAG1C,MAAM,UAAU,CAAA;AAEjB,eAAO,MAAM,+CAA+C,GAC1D,SAAS,sCAAsC,KAC9C,+BAiCF,CAAA;AAED,eAAO,MAAM,2CAA2C,GACtD,SAAS,yCAAyC,KACjD,+BAiBF,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ExpoModulesCore
|
|
2
|
+
import EXNotifications
|
|
2
3
|
import SFMCSDK
|
|
3
4
|
import MarketingCloudSDK
|
|
4
5
|
|
|
@@ -46,10 +47,9 @@ public class ExpoMarketingCloudSdkAppDelegateSubscriber : ExpoAppDelegateSubscri
|
|
|
46
47
|
let completionHandler: (OperationResult) -> () = { result in
|
|
47
48
|
if result == .success {
|
|
48
49
|
// module is fully configured and ready for user
|
|
49
|
-
let
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
notificationCenterDelegate.add(self.notificationDelegate!)
|
|
50
|
+
let delegate = ExpoMarketingCloudSdkNotificationsDelegate()
|
|
51
|
+
self.notificationDelegate = delegate
|
|
52
|
+
NotificationCenterManager.shared.addDelegate(delegate)
|
|
53
53
|
|
|
54
54
|
} else if result == .error {
|
|
55
55
|
// module failed to initialize, check logs for more details
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import ExpoModulesCore
|
|
2
|
+
import EXNotifications
|
|
2
3
|
import SFMCSDK
|
|
3
4
|
import MarketingCloudSDK
|
|
4
5
|
|
|
5
|
-
class ExpoMarketingCloudSdkNotificationsDelegate : NSObject,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
class ExpoMarketingCloudSdkNotificationsDelegate : NSObject, NotificationDelegate {
|
|
7
|
+
public func didReceive(_ userInfo: [AnyHashable : Any], completionHandler: @escaping (UIBackgroundFetchResult) -> Void) -> Bool {
|
|
8
|
+
SFMCSdk.requestPushSdk { mp in
|
|
9
|
+
mp.setNotificationUserInfo(userInfo)
|
|
10
|
+
}
|
|
11
|
+
completionHandler(UIBackgroundFetchResult.newData)
|
|
12
|
+
return true
|
|
10
13
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
|
|
15
|
+
public func didReceive(_ response: UNNotificationResponse, completionHandler: @escaping () -> Void) -> Bool {
|
|
16
|
+
SFMCSdk.requestPushSdk { mp in
|
|
17
|
+
mp.setNotificationRequest(response.notification.request)
|
|
18
|
+
}
|
|
19
|
+
return true
|
|
17
20
|
}
|
|
18
|
-
completionHandler()
|
|
19
|
-
}
|
|
20
21
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allboatsrise/expo-marketingcloudsdk",
|
|
3
3
|
"author": "All Boats Rise Inc.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "53.0.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Expo module for Salesforce Marketing Cloud SDK",
|
|
7
7
|
"homepage": "https://github.com/allboatsrise/expo-marketingcloudsdk",
|
|
@@ -46,15 +46,16 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"
|
|
50
|
-
"expo-module-scripts": "^
|
|
51
|
-
"expo-notifications": "^0.
|
|
52
|
-
"
|
|
49
|
+
"@types/react": "~19.0.0",
|
|
50
|
+
"expo-module-scripts": "^4.1.9",
|
|
51
|
+
"expo-notifications": "^0.31.4",
|
|
52
|
+
"expo": "~53.0.0",
|
|
53
|
+
"react-native": "0.79.1",
|
|
53
54
|
"zod": "~3.15.0"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
|
-
"expo": ">=
|
|
57
|
-
"expo-notifications": ">=0.
|
|
57
|
+
"expo": ">=53.0.0",
|
|
58
|
+
"expo-notifications": ">=0.31.4",
|
|
58
59
|
"zod": "^3.15.0"
|
|
59
60
|
},
|
|
60
61
|
"peerDependenciesMeta": {
|