react-native-nami-sdk 3.0.14 → 3.0.16

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.
@@ -84,7 +84,7 @@ dependencies {
84
84
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
85
85
 
86
86
  implementation 'com.github.jeziellago:compose-markdown:0.3.0'
87
- implementation "com.namiml:sdk-android:3.0.16"
87
+ implementation "com.namiml:sdk-android:3.0.19"
88
88
 
89
89
  implementation 'com.facebook.react:react-native:+' // From node_modules
90
90
  coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
@@ -115,7 +115,7 @@ class NamiBridgeModule(reactContext: ReactApplicationContext) :
115
115
  } else {
116
116
  Arguments.createArray()
117
117
  }
118
- val settingsList = mutableListOf("extendedClientInfo:react-native:3.0.14")
118
+ val settingsList = mutableListOf("extendedClientInfo:react-native:3.0.16")
119
119
  namiCommandsReact?.toArrayList()?.filterIsInstance<String>()?.let { commandsFromReact ->
120
120
  settingsList.addAll(commandsFromReact)
121
121
  }
@@ -15,6 +15,24 @@ import com.namiml.paywall.model.PaywallLaunchContext
15
15
 
16
16
  class NamiCampaignManagerBridgeModule(reactContext: ReactApplicationContext) :
17
17
  ReactContextBaseJavaModule(reactContext), ActivityEventListener {
18
+ // handlePaywallCallback metadata
19
+ companion object {
20
+ const val CAMPAIGN_ID = "campaignId"
21
+ const val CAMPAIGN_LABEL = "campaignLabel"
22
+ const val PAYWALL_ID = "paywallId"
23
+ const val ACTION = "action"
24
+ const val SKU_ID = "skuId"
25
+ const val PURCHASE_ERROR = "purchaseError"
26
+ const val PURCHASES = "purchases"
27
+ const val CAMPAIGN_NAME = "campaignName"
28
+ const val CAMPAIGN_TYPE = "campaignType"
29
+ const val CAMPAIGN_URL = "campaignUrl"
30
+ const val PAYWALL_NAME = "paywallName"
31
+ const val SEGMENT_ID = "segmentId"
32
+ const val EXTERNAL_SEGMENT_ID = "externalSegmentId"
33
+ const val DEEP_LINK_URL = "deeplinkUrl"
34
+ const val _RESULT_CAMPAIGN = "ResultCampaign"
35
+ }
18
36
 
19
37
  override fun getName(): String {
20
38
  return "RNNamiCampaignManager"
@@ -73,21 +91,50 @@ class NamiCampaignManagerBridgeModule(reactContext: ReactApplicationContext) :
73
91
 
74
92
  if (theActivity != null) {
75
93
  reactApplicationContext.runOnUiQueueThread {
94
+ val paywallActionCallback = {
95
+ campaignId: String,
96
+ campaignName: String?,
97
+ campaignType: String?,
98
+ campaignLabel: String?,
99
+ campaignUrl: String?,
100
+ paywallId: String,
101
+ paywallName: String?,
102
+ segmentId: String?,
103
+ externalSegmentId: String?,
104
+ action: NamiPaywallAction,
105
+ sku: NamiSKU?,
106
+ purchaseError: String?,
107
+ purchases: List<NamiPurchase>?,
108
+ deeplinkUrl: String? ->
109
+ handlePaywallCallback(
110
+ campaignId,
111
+ campaignName,
112
+ campaignType,
113
+ campaignLabel,
114
+ campaignUrl,
115
+ paywallId,
116
+ paywallName,
117
+ segmentId,
118
+ externalSegmentId,
119
+ action,
120
+ sku,
121
+ purchaseError,
122
+ purchases,
123
+ deeplinkUrl,
124
+ actionCallback)
125
+ }
126
+
76
127
  if (label != null) {
77
128
  NamiCampaignManager.launch(
78
129
  theActivity,
79
130
  label,
80
- paywallActionCallback = { campaignId, campaignLabel, paywallId, action, sku, purchaseError, purchases ->
81
- handlePaywallCallback(campaignId, campaignLabel, paywallId, action, sku, purchaseError, purchases, actionCallback)
82
- },
131
+ paywallActionCallback = paywallActionCallback,
83
132
  paywallLaunchContext,
84
133
  ) { result -> handleResult(result, resultCallback) }
85
134
  } else {
86
135
  NamiCampaignManager.launch(
87
136
  theActivity,
88
- paywallActionCallback = { campaignId, campaignLabel, paywallId, action, sku, purchaseError, purchases ->
89
- handlePaywallCallback(campaignId, campaignLabel, paywallId, action, sku, purchaseError, purchases, actionCallback)
90
- },
137
+ paywallActionCallback = paywallActionCallback,
91
138
  ) { result -> handleResult(result, resultCallback) }
92
139
  }
93
140
  }
@@ -95,26 +142,67 @@ class NamiCampaignManagerBridgeModule(reactContext: ReactApplicationContext) :
95
142
 
96
143
  }
97
144
 
98
- private fun handlePaywallCallback(campaignId: String, campaignLabel: String?, paywallId: String, action: NamiPaywallAction, sku: NamiSKU?, purchaseError: String?, purchases: List<NamiPurchase>?, actionCallback: Callback) {
145
+ private fun handlePaywallCallback(
146
+ campaignId: String,
147
+ campaignName: String?,
148
+ campaignType: String?,
149
+ campaignLabel: String?,
150
+ campaignUrl: String?,
151
+ paywallId: String,
152
+ paywallName: String?,
153
+ segmentId: String?,
154
+ externalSegmentId: String?,
155
+ action: NamiPaywallAction,
156
+ sku: NamiSKU?,
157
+ purchaseError: String?,
158
+ purchases: List<NamiPurchase>?,
159
+ deeplinkUrl: String?,
160
+ actionCallback: Callback
161
+ ) {
99
162
  val actionString = action.toString()
100
- val skuString = sku?.skuId.orEmpty()
101
- val purchasesArray: WritableArray = WritableNativeArray()
102
- if (purchases != null) {
103
- for (purchase in purchases) {
104
- purchasesArray.pushMap(purchase.toPurchaseDict())
163
+ val skuString = sku?.skuId ?: ""
164
+
165
+ val purchasesArray = createPurchaseArray(purchases)
166
+
167
+ val resultMap = Arguments.createMap().apply {
168
+ putString(CAMPAIGN_ID, campaignId)
169
+ putString(CAMPAIGN_LABEL, campaignLabel ?: "")
170
+ putString(PAYWALL_ID, paywallId)
171
+ putString(ACTION, actionString)
172
+ putString(SKU_ID, skuString)
173
+ putString(PURCHASE_ERROR, purchaseError ?: "")
174
+ putArray(PURCHASES, purchasesArray)
175
+ putString(CAMPAIGN_NAME, campaignName ?: "")
176
+ putString(CAMPAIGN_TYPE, campaignType ?: "")
177
+ putString(CAMPAIGN_URL, campaignUrl ?: "")
178
+ putString(PAYWALL_NAME, paywallName ?: "")
179
+ putString(SEGMENT_ID, segmentId ?: "")
180
+ putString(EXTERNAL_SEGMENT_ID, externalSegmentId ?: "")
181
+ putString(DEEP_LINK_URL, deeplinkUrl ?: "")
182
+ }
183
+
184
+ emitEvent(_RESULT_CAMPAIGN, resultMap)
185
+ }
186
+
187
+ private fun createPurchaseArray(purchases: List<NamiPurchase>?): WritableArray {
188
+ return WritableNativeArray().apply {
189
+ purchases?.forEach { purchase ->
190
+ try {
191
+ pushMap(purchase.toPurchaseDict())
192
+ } catch (e: Exception) {
193
+ Log.e(LOG_TAG, "Error while converting data in createPurchaseArray to a Map", e)
194
+ }
105
195
  }
106
196
  }
107
- val resultMap = Arguments.createMap()
108
- resultMap.putString("campaignId", campaignId)
109
- resultMap.putString("campaignLabel", campaignLabel)
110
- resultMap.putString("paywallId", paywallId)
111
- resultMap.putString("action", actionString)
112
- resultMap.putString("skuId", skuString)
113
- resultMap.putString("purchaseError", purchaseError)
114
- resultMap.putArray("purchases", purchasesArray)
115
- reactApplicationContext
116
- .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
117
- .emit("ResultCampaign", resultMap)
197
+ }
198
+
199
+ private fun emitEvent(event: String, map: WritableMap) {
200
+ val emitter = reactApplicationContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
201
+ if (emitter is DeviceEventManagerModule.RCTDeviceEventEmitter) {
202
+ emitter.emit(event, map)
203
+ } else {
204
+ Log.w(LOG_TAG, "Cannot emit $event event: RCTDeviceEventEmitter instance is null")
205
+ }
118
206
  }
119
207
 
120
208
  private fun handleResult(result: LaunchCampaignResult, resultCallback: Callback) {
@@ -55,6 +55,17 @@ class NamiCustomerManagerBridgeModule(reactContext: ReactApplicationContext) :
55
55
  NamiCustomerManager.setCustomerDataPlatformId(cdpId)
56
56
  }
57
57
 
58
+ @ReactMethod
59
+ fun setAnonymousMode(anonymousMode: Boolean) {
60
+ NamiCustomerManager.setAnonymousMode(anonymousMode)
61
+ }
62
+
63
+ @ReactMethod
64
+ fun inAnonymousMode(promise: Promise) {
65
+ val anonymousMode = NamiCustomerManager.inAnonymousMode()
66
+ promise.resolve(anonymousMode)
67
+ }
68
+
58
69
  @ReactMethod
59
70
  fun journeyState(promise: Promise) {
60
71
  val journeyState = NamiCustomerManager.journeyState()
package/index.d.ts CHANGED
@@ -1,20 +1,20 @@
1
- export { Nami, NamiConfiguration, NamiLanguageCodes } from "./src/Nami";
2
- export { NamiMLManager } from "./src/NamiMLManager";
1
+ export {Nami, NamiConfiguration, NamiLanguageCodes} from './src/Nami';
2
+ export {NamiMLManager} from './src/NamiMLManager';
3
3
  export {
4
4
  NamiCampaignManager,
5
5
  NamiCampaign,
6
- NamiCampaignRuleType,
6
+ NamiCampaignRule,
7
7
  LaunchCampaignError,
8
- } from "./src/NamiCampaignManager";
8
+ } from './src/NamiCampaignManager';
9
9
  export {
10
10
  NamiCustomerManager,
11
11
  CustomerJourneyState,
12
12
  AccountStateAction,
13
- } from "./src/NamiCustomerManager";
13
+ } from './src/NamiCustomerManager';
14
14
  export {
15
15
  NamiEntitlementManager,
16
16
  NamiEntitlement,
17
- } from "./src/NamiEntitlementManager";
18
- export { NamiPurchaseManager, NamiPurchase } from "./src/NamiPurchaseManager";
19
- export { NamiPaywallManager } from "./src/NamiPaywallManager";
20
- export { NamiSKU } from "./src/types";
17
+ } from './src/NamiEntitlementManager';
18
+ export {NamiPurchaseManager, NamiPurchase} from './src/NamiPurchaseManager';
19
+ export {NamiPaywallManager} from './src/NamiPaywallManager';
20
+ export {NamiSKU} from './src/types';
package/ios/Nami.m CHANGED
@@ -52,7 +52,7 @@ RCT_EXPORT_METHOD(configure: (NSDictionary *)configDict completion: (RCTResponse
52
52
  }
53
53
 
54
54
  // Start commands with header iformation for Nami to let them know this is a React client.
55
- NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.0.14"]];
55
+ NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.0.16"]];
56
56
 
57
57
  // Add additional namiCommands app may have sent in.
58
58
  NSObject *appCommandStrings = configDict[@"namiCommands"];
@@ -55,7 +55,7 @@ class RNNamiCampaignManager: RCTEventEmitter {
55
55
 
56
56
  NamiCampaignManager.launch(label: label, context: paywallLaunchContext, launchHandler: { success, error in
57
57
  callback([success, error?._code as Any])
58
- }, paywallActionHandler: { campaignId, campaignName, campaignType, campaignLabel, campaignUrl, paywallId, paywallName, segmentId, externalSegmentId, paywallLaunchContext, action, sku, purchaseError, purchases, deeplinkUrl in
58
+ }, paywallActionHandler: { campaignId, campaignName, campaignType, campaignLabel, campaignUrl, paywallId, paywallName, segmentId, externalSegmentId, _, action, sku, purchaseError, purchases, deeplinkUrl in
59
59
  let actionString: String
60
60
  switch action {
61
61
  case .show_paywall:
@@ -93,12 +93,19 @@ class RNNamiCampaignManager: RCTEventEmitter {
93
93
  let dictionaries = purchases.map { purchase in RNNamiPurchaseManager.purchaseToPurchaseDict(purchase) }
94
94
  let payload: [String: Any?] = [
95
95
  "campaignId": campaignId,
96
+ "campaignName": campaignName,
97
+ "campaignType": campaignType,
96
98
  "campaignLabel": campaignLabel,
99
+ "campaignUrl": campaignUrl,
97
100
  "paywallId": paywallId,
101
+ "paywallName": paywallName,
102
+ "segmentId": segmentId,
103
+ "externalSegmentId": externalSegmentId,
98
104
  "action": actionString,
99
105
  "skuId": skuId,
100
106
  "purchaseError": errorSting,
101
107
  "purchases": dictionaries,
108
+ "deeplinkUrl": deeplinkUrl,
102
109
  ]
103
110
  RNNamiCampaignManager.shared?.sendEvent(withName: "ResultCampaign", body: payload)
104
111
  })
@@ -21,6 +21,10 @@ RCT_EXTERN_METHOD(setCustomerDataPlatformId:(NSString *)platformId)
21
21
 
22
22
  RCT_EXTERN_METHOD(clearCustomerDataPlatformId)
23
23
 
24
+ RCT_EXTERN_METHOD(setAnonymousMode:(BOOL *)anonymousMode)
25
+
26
+ RCT_EXTERN_METHOD(inAnonymousMode:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
27
+
24
28
  RCT_EXTERN_METHOD(journeyState:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
25
29
 
26
30
  RCT_EXTERN_METHOD(isLoggedIn:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
@@ -66,6 +66,17 @@ class RNNamiCustomerManager: RCTEventEmitter {
66
66
  NamiCustomerManager.clearCustomerDataPlatformId()
67
67
  }
68
68
 
69
+ @objc(setAnonymousMode:)
70
+ func setAnonymousMode(anonymousMode: Bool) {
71
+ NamiCustomerManager.setAnonymousMode(anonymousMode)
72
+ }
73
+
74
+ @objc(inAnonymousMode:rejecter:)
75
+ func inAnonymousMode(resolve: @escaping RCTPromiseResolveBlock, reject _: @escaping RCTPromiseRejectBlock) {
76
+ let inAnonymousMode: Bool = NamiCustomerManager.inAnonymousMode()
77
+ resolve(inAnonymousMode)
78
+ }
79
+
69
80
  @objc(journeyState:rejecter:)
70
81
  func journeyState(resolve: @escaping RCTPromiseResolveBlock, reject _: @escaping RCTPromiseRejectBlock) {
71
82
  if let journeyState = NamiCustomerManager.journeyState() {
@@ -137,6 +148,14 @@ class RNNamiCustomerManager: RCTEventEmitter {
137
148
  actionString = "vendor_id_set"
138
149
  case .vendor_id_cleared:
139
150
  actionString = "vendor_id_cleared"
151
+ case .nami_device_id_set:
152
+ actionString = "nami_device_id_set"
153
+ case .nami_device_id_cleared:
154
+ actionString = "nami_device_id_cleared"
155
+ case .anonymous_mode_on:
156
+ actionString = "anonymous_mode_on"
157
+ case .anonymous_mode_off:
158
+ actionString = "anonymous_mode_off"
140
159
  @unknown default:
141
160
  actionString = "unknown"
142
161
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nami-sdk",
3
- "version": "3.0.14",
3
+ "version": "3.0.16",
4
4
  "description": "React Native Module for Nami - Easy subscriptions & in-app purchases, with powerful built-in paywalls and A/B testing.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,7 +20,7 @@ Pod::Spec.new do |s|
20
20
  s.source_files = "ios/**/*.{h,m,swift}"
21
21
  s.requires_arc = true
22
22
 
23
- s.dependency 'Nami', '3.0.16'
23
+ s.dependency 'Nami', '3.0.19'
24
24
  s.dependency 'React'
25
25
 
26
26
  end
@@ -1,6 +1,6 @@
1
- import { EmitterSubscription } from "react-native";
2
- import { NamiPurchase } from "./NamiPurchaseManager";
3
- import { NamiPaywallAction } from "./NamiPaywallManager";
1
+ import {EmitterSubscription} from 'react-native';
2
+ import {NamiPurchase} from './NamiPurchaseManager';
3
+ import {NamiPaywallAction} from './NamiPaywallManager';
4
4
 
5
5
  export const NamiCampaignManager: {
6
6
  allCampaigns: () => Promise<Array<NamiCampaign>>;
@@ -10,19 +10,26 @@ export const NamiCampaignManager: {
10
10
  context?: PaywallLaunchContext,
11
11
  resultCallback?: (success: boolean, error?: LaunchCampaignError) => void,
12
12
  actionCallback?: (
13
+ campaignId: string,
14
+ paywallId: string,
13
15
  action: NamiPaywallAction,
16
+ campaignName?: string,
17
+ campaignType?: string,
18
+ campaignLabel?: string,
19
+ campaignUrl?: string,
20
+ paywallName?: string,
21
+ segmentId?: string,
22
+ externalSegmentId?: string,
23
+ deeplinkUrl?: string,
14
24
  skuId?: string,
15
25
  purchaseError?: string,
16
26
  purchases?: NamiPurchase[],
17
- campaignId?: string,
18
- campaignLabel?: string,
19
- paywallId?: string
20
- ) => void
27
+ ) => void,
21
28
  ) => void;
22
29
  refresh: () => void;
23
30
  registerAvailableCampaignsHandler: (
24
- callback: (availableCampaigns: NamiCampaign[]) => void
25
- ) => EmitterSubscription["remove"];
31
+ callback: (availableCampaigns: NamiCampaign[]) => void,
32
+ ) => EmitterSubscription['remove'];
26
33
  };
27
34
 
28
35
  export type NamiCampaign = {
@@ -30,14 +37,15 @@ export type NamiCampaign = {
30
37
  rule: string;
31
38
  segment: string;
32
39
  paywall: string;
33
- type: NamiCampaignRuleType;
40
+ type: NamiCampaignRule;
34
41
  value?: string | null;
35
42
  };
36
43
 
37
- export enum NamiCampaignRuleType {
38
- DEFAULT = "default",
39
- LABEL = "label",
40
- UNKNOWN = "unknown",
44
+ export enum NamiCampaignRule {
45
+ DEFAULT = 'default',
46
+ LABEL = 'label',
47
+ UNKNOWN = 'unknown',
48
+ URL = 'url',
41
49
  }
42
50
 
43
51
  export enum LaunchCampaignError {
@@ -49,8 +57,8 @@ export enum LaunchCampaignError {
49
57
  }
50
58
 
51
59
  export enum LaunchCampaignResultAction {
52
- FAILURE = "FAILURE",
53
- SUCCESS = "SUCCESS",
60
+ FAILURE = 'FAILURE',
61
+ SUCCESS = 'SUCCESS',
54
62
  }
55
63
 
56
64
  export type FailureResultObject = {
@@ -59,5 +67,7 @@ export type FailureResultObject = {
59
67
 
60
68
  export type PaywallLaunchContext = {
61
69
  productGroups?: string[];
62
- customAttributes: Map<string, string>;
70
+ customAttributes?: {
71
+ [key: string]: string;
72
+ };
63
73
  };
@@ -1,6 +1,6 @@
1
- import { NativeModules, NativeEventEmitter } from "react-native";
1
+ import {NativeModules, NativeEventEmitter} from 'react-native';
2
2
 
3
- export const { RNNamiCampaignManager } = NativeModules;
3
+ export const {RNNamiCampaignManager} = NativeModules;
4
4
 
5
5
  export const NamiCampaignManager = {
6
6
  launchSubscription: undefined,
@@ -9,20 +9,28 @@ export const NamiCampaignManager = {
9
9
  launch(label, context, resultCallback, actionCallback) {
10
10
  this.launchSubscription?.remove();
11
11
  this.launchSubscription = this.emitter.addListener(
12
- "ResultCampaign",
13
- (body) => {
14
- var action = body.action;
12
+ 'ResultCampaign',
13
+ body => {
14
+ body.action = body.action.startsWith('NAMI_')
15
+ ? body.action.substring(5, body.action.length)
16
+ : body.action;
15
17
 
16
- if (action.startsWith("NAMI_")) {
17
- action = action.substring(5, action.length);
18
- }
19
-
20
- var skuId = body.skuId;
21
- var purchaseError = body.purchaseError;
22
- var purchases = body.purchases;
23
- var campaignId = body.campaignId;
24
- var campaignLabel = body.campaignLabel;
25
- var paywallId = body.paywallId;
18
+ const {
19
+ action,
20
+ skuId,
21
+ purchaseError,
22
+ purchases,
23
+ campaignId,
24
+ campaignLabel,
25
+ paywallId,
26
+ campaignName,
27
+ campaignType,
28
+ campaignUrl,
29
+ segmentId,
30
+ externalSegmentId,
31
+ paywallName,
32
+ deeplinkUrl,
33
+ } = body;
26
34
  actionCallback(
27
35
  action,
28
36
  skuId,
@@ -30,24 +38,32 @@ export const NamiCampaignManager = {
30
38
  purchases,
31
39
  campaignId,
32
40
  campaignLabel,
33
- paywallId
41
+ paywallId,
42
+ campaignName,
43
+ campaignType,
44
+ campaignUrl,
45
+ segmentId,
46
+ externalSegmentId,
47
+ paywallName,
48
+ deeplinkUrl,
34
49
  );
35
- }
50
+ },
36
51
  );
52
+
37
53
  RNNamiCampaignManager.launch(
38
54
  label ?? null,
39
55
  context ?? null,
40
56
  resultCallback ?? (() => {}),
41
- actionCallback ?? (() => {})
57
+ actionCallback ?? (() => {}),
42
58
  );
43
59
  },
44
- isCampaignAvailable: (label) => {
60
+ isCampaignAvailable: label => {
45
61
  return RNNamiCampaignManager.isCampaignAvailable(label ?? null);
46
62
  },
47
63
  registerAvailableCampaignsHandler(callback) {
48
64
  const subscription = this.emitter.addListener(
49
- "AvailableCampaignsChanged",
50
- callback
65
+ 'AvailableCampaignsChanged',
66
+ callback,
51
67
  );
52
68
  RNNamiCampaignManager.registerAvailableCampaignsHandler();
53
69
  return subscription.remove;
@@ -26,6 +26,8 @@ export const NamiCustomerManager: {
26
26
  ) => EmitterSubscription["remove"];
27
27
  clearCustomerDataPlatformId: () => void;
28
28
  setCustomerDataPlatformId: (platformId: string) => void;
29
+ setAnonymousMode: (anonymousMode: boolean) => void;
30
+ inAnonymousMode: () => Promise<boolean>;
29
31
  };
30
32
 
31
33
  export type CustomerJourneyState = {
@@ -38,4 +40,4 @@ export type CustomerJourneyState = {
38
40
  inAccountHold: boolean;
39
41
  };
40
42
 
41
- export type AccountStateAction = "login" | "logout";
43
+ export type AccountStateAction = "login" | "logout" | "advertising_id_set" | "vendor_id_set" | "customer_data_platform_id_set" | "nami_device_id_set" | "advertising_id_cleared" | "vendor_id_cleared" | "customer_data_platform_id_cleared" | "nami_device_id_cleared" | "anonymous_mode_on" | "anonymous_mode_off";