react-native-acoustic-connect-beta 18.0.28 → 18.0.29

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.
@@ -1,4 +1,4 @@
1
- #Fri Jun 05 01:23:00 PDT 2026
1
+ #Fri Jun 05 02:59:23 PDT 2026
2
2
  UseWhiteList=true
3
3
  PrintScreen=3
4
4
  UseRandomSample=false
@@ -619,6 +619,52 @@ class HybridAcousticConnectRN : HybridAcousticConnectRNSpec(),
619
619
  return result
620
620
  }
621
621
 
622
+ /**
623
+ * Logs a user identity so device activity can be associated with a known
624
+ * Connect contact. Wraps [Connect.logIdentificationEvent].
625
+ *
626
+ * Returns a [Promise] to match the cross-platform spec — the iOS identity
627
+ * API is main-actor isolated and async. The native call is synchronous and
628
+ * returns false (emitting no signal) when either identifier is blank, so no
629
+ * extra guard is needed here.
630
+ *
631
+ * A `"url"` entry in [additionalParameters] is routed to the SDK's explicit
632
+ * `url` parameter so the JS surface matches iOS, where `url` rides inside the
633
+ * parameter map. When absent, the SDK's own default URL applies.
634
+ *
635
+ * @param identifierName Identifier name, e.g. "Email".
636
+ * @param identifierValue Identifier value, e.g. "user@example.com".
637
+ * @param signalType Optional signal type; defaults to "loggedIn" when omitted.
638
+ * @param additionalParameters Optional extra key/value pairs merged into the
639
+ * signal. Defaults to `{ "registrationMethod": "email" }` only when null
640
+ * (omitted); an explicit map — including an empty one — is used as-is.
641
+ * @return A promise resolving to true if the signal was queued, false otherwise.
642
+ */
643
+ override fun logIdentity(
644
+ identifierName: String,
645
+ identifierValue: String,
646
+ signalType: String?,
647
+ additionalParameters: Map<String, String>?
648
+ ): Promise<Boolean> {
649
+ val params = additionalParameters ?: mapOf("registrationMethod" to "email")
650
+ val resolvedSignalType = signalType ?: "loggedIn"
651
+ val result = params["url"]?.let { url ->
652
+ Connect.logIdentificationEvent(
653
+ identifierName,
654
+ identifierValue,
655
+ url,
656
+ resolvedSignalType,
657
+ params - "url"
658
+ )
659
+ } ?: Connect.logIdentificationEvent(
660
+ identifierName = identifierName,
661
+ identifierValue = identifierValue,
662
+ signalType = resolvedSignalType,
663
+ additionalParameters = params
664
+ )
665
+ return Promise.resolved(result)
666
+ }
667
+
622
668
  /**
623
669
  * Logs an exception event with the specified message and stack information.
624
670
  *
@@ -575,7 +575,37 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
575
575
  let result = ConnectCustomEvent().logSignal(convertToAnyDictionary(input: values), level: logLevel)
576
576
  return result
577
577
  }
578
-
578
+
579
+ /// Logs a user identity so device activity can be associated with a known
580
+ /// Connect contact. Wraps `ConnectSDK.shared.identity.log(...)`.
581
+ ///
582
+ /// `ConnectSDK.shared` is `@MainActor`-isolated, so — unlike the synchronous
583
+ /// loggers above (which use the legacy non-actor `ConnectCustomEvent`) —
584
+ /// this hops to the main actor and resolves with the SDK's real return
585
+ /// value. The native API returns `false` (and emits no signal) when either
586
+ /// identifier is blank, satisfying the bridge's blank-input contract without
587
+ /// extra guards here. `url`, if supplied, rides inside `additionalParameters`
588
+ /// (the iOS convention).
589
+ /// - Parameters:
590
+ /// - identifierName: Identifier name, e.g. "Email".
591
+ /// - identifierValue: Identifier value, e.g. "user@example.com".
592
+ /// - signalType: Optional signal type; defaults to "loggedIn" when omitted.
593
+ /// - additionalParameters: Optional extra key/value pairs merged into the
594
+ /// signal. Defaults to `["registrationMethod": "email"]` only when `nil`
595
+ /// (omitted); an explicit map — including an empty one — is used as-is.
596
+ /// - Returns: A promise resolving to `true` if the signal was dispatched,
597
+ /// `false` otherwise. Never rejects.
598
+ func logIdentity(identifierName: String, identifierValue: String, signalType: String?, additionalParameters: [String: String]?) throws -> Promise<Bool> {
599
+ return Promise.async { @MainActor in
600
+ ConnectSDK.shared.identity.log(
601
+ identifierName: identifierName,
602
+ identifierValue: identifierValue,
603
+ signalType: signalType ?? "loggedIn",
604
+ additionalParameters: additionalParameters ?? ["registrationMethod": "email"]
605
+ )
606
+ }
607
+ }
608
+
579
609
  /// Log exception.
580
610
  /// - Parameters:
581
611
  /// - message: the message of the error/exception to be logged this will appear in the posted json.
@@ -122,6 +122,46 @@ export interface AcousticConnectRN extends HybridObject<{
122
122
  logDialogDismissEvent(dialogId: string, dismissReason: string): boolean;
123
123
  logDialogButtonClickEvent(dialogId: string, buttonText: string, buttonIndex: number): boolean;
124
124
  logDialogCustomEvent(dialogId: string, eventName: string, values: Record<string, string | number | boolean>): boolean;
125
+ /**
126
+ * Logs a user identity so the current device/session can be associated with
127
+ * a known Connect contact — the foundation for audience building and
128
+ * cross-channel engagement. Wraps the native identity loggers
129
+ * (`ConnectSDK.shared.identity.log` on iOS, `Connect.logIdentificationEvent`
130
+ * on Android).
131
+ *
132
+ * Unlike the synchronous analytics loggers above, this returns a `Promise`:
133
+ * `ConnectSDK.shared` (iOS) is `@MainActor`-isolated, so the bridge hops to the
134
+ * main actor and resolves with the *real* success/failure value rather than
135
+ * firing and forgetting.
136
+ *
137
+ * The native APIs return `false` — and emit no signal — when either
138
+ * `identifierName` or `identifierValue` is empty/blank after trimming.
139
+ *
140
+ * @param identifierName Identifier name, e.g. `'Email'`.
141
+ * @param identifierValue Identifier value, e.g. `'user@example.com'`.
142
+ * @param signalType Optional signal type; the bridge supplies
143
+ * `'loggedIn'` when omitted (identity logging typically marks a sign-in),
144
+ * overriding the native SDKs' own `'pageView'` default.
145
+ * @param additionalParameters Optional extra key/value pairs merged into the
146
+ * signal payload. Only when omitted (`undefined`) does the bridge supply
147
+ * the default `{ registrationMethod: 'email' }`; an explicitly-provided
148
+ * map is used as-is, so passing an empty `{}` sends no extra parameters
149
+ * (the default is not merged in). A `'url'` entry is honoured uniformly on
150
+ * both platforms: on Android it is routed to the SDK's explicit `url`
151
+ * parameter, on iOS it rides inside the parameter map (where the native
152
+ * API expects it).
153
+ * @returns A promise resolving to `true` if the identity signal was
154
+ * dispatched, `false` otherwise (including the blank-identifier case).
155
+ * Never rejects.
156
+ *
157
+ * @example
158
+ * ```ts
159
+ * import AcousticConnectRN from 'react-native-acoustic-connect-beta'
160
+ *
161
+ * await AcousticConnectRN.logIdentity('Email', 'user@example.com')
162
+ * ```
163
+ */
164
+ logIdentity(identifierName: string, identifierValue: string, signalType?: string, additionalParameters?: Record<string, string>): Promise<boolean>;
125
165
  /**
126
166
  * Forwards the raw APNs device token to the Connect SDK (manual mode).
127
167
  *
@@ -1 +1 @@
1
- {"version":3,"file":"react-native-acoustic-connect.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/react-native-acoustic-connect.nitro.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAG9D,MAAM,MAAM,cAAc,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,iBAAiB,GAAG,MAAM,CAAA;AAE9E;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC1B,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gFAAgF;IAChF,OAAO,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACjC,gEAAgE;IAChE,OAAO,EAAE,OAAO,CAAA;IAChB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,MAAM,WAAW,iBAAkB,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;IACxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,MAAM,IAAI,OAAO,CAAA;IAEjB;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,IAAI,OAAO,CAAA;IAClB,0BAA0B,CAAC,GA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AMG;IACH,qBAAqB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE7D;;;;;;;;;;;;;OAaG;IACH,0BAA0B,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAEjG;;;;;;;;;;;OAWG;IACH,sBAAsB,CAAC,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAIvH;;;;;;;;;;;;;OAaG;IACH,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE7F;;;;;;;OAOG;IACH,qBAAqB,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAA;IAEtD;;;;OAIG;IACH,sBAAsB,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;CACpD"}
1
+ {"version":3,"file":"react-native-acoustic-connect.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/react-native-acoustic-connect.nitro.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAG9D,MAAM,MAAM,cAAc,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,iBAAiB,GAAG,MAAM,CAAA;AAE9E;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC1B,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gFAAgF;I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AAK,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE7F;;;;;;;OAOG;IACH,qBAAqB,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAA;IAEtD;;;;OAIG;IACH,sBAAsB,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;CACpD"}
@@ -201,6 +201,28 @@ namespace margelo::nitro::acousticconnectrn {
201
201
  }());
202
202
  return static_cast<bool>(__result);
203
203
  }
204
+ std::shared_ptr<Promise<bool>> JHybridAcousticConnectRNSpec::logIdentity(const std::string& identifierName, const std::string& identifierValue, const std::optional<std::string>& signalType, const std::optional<std::unordered_map<std::string, std::string>>& additionalParameters) {
205
+ static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>(jni::alias_ref<jni::JString> /* identifierName */, jni::alias_ref<jni::JString> /* identifierValue */, jni::alias_ref<jni::JString> /* signalType */, jni::alias_ref<jni::JMap<jni::JString, jni::JString>> /* additionalParameters */)>("logIdentity");
206
+ auto __result = method(_javaPart, jni::make_jstring(identifierName), jni::make_jstring(identifierValue), signalType.has_value() ? jni::make_jstring(signalType.value()) : nullptr, additionalParameters.has_value() ? [&]() -> jni::local_ref<jni::JMap<jni::JString, jni::JString>> {
207
+ auto __map = jni::JHashMap<jni::JString, jni::JString>::create(additionalParameters.value().size());
208
+ for (const auto& __entry : additionalParameters.value()) {
209
+ __map->put(jni::make_jstring(__entry.first), jni::make_jstring(__entry.second));
210
+ }
211
+ return __map;
212
+ }() : nullptr);
213
+ return [&]() {
214
+ auto __promise = Promise<bool>::create();
215
+ __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
216
+ auto __result = jni::static_ref_cast<jni::JBoolean>(__boxedResult);
217
+ __promise->resolve(static_cast<bool>(__result->value()));
218
+ });
219
+ __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
220
+ jni::JniException __jniError(__throwable);
221
+ __promise->reject(std::make_exception_ptr(__jniError));
222
+ });
223
+ return __promise;
224
+ }();
225
+ }
204
226
  std::shared_ptr<Promise<bool>> JHybridAcousticConnectRNSpec::pushDidRegisterWithToken(const std::shared_ptr<ArrayBuffer>& deviceToken) {
205
227
  static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>(jni::alias_ref<JArrayBuffer::javaobject> /* deviceToken */)>("pushDidRegisterWithToken");
206
228
  auto __result = method(_javaPart, JArrayBuffer::wrap(deviceToken));
@@ -78,6 +78,7 @@ namespace margelo::nitro::acousticconnectrn {
78
78
  bool logDialogDismissEvent(const std::string& dialogId, const std::string& dismissReason) override;
79
79
  bool logDialogButtonClickEvent(const std::string& dialogId, const std::string& buttonText, double buttonIndex) override;
80
80
  bool logDialogCustomEvent(const std::string& dialogId, const std::string& eventName, const std::unordered_map<std::string, std::variant<bool, std::string, double>>& values) override;
81
+ std::shared_ptr<Promise<bool>> logIdentity(const std::string& identifierName, const std::string& identifierValue, const std::optional<std::string>& signalType, const std::optional<std::unordered_map<std::string, std::string>>& additionalParameters) override;
81
82
  std::shared_ptr<Promise<bool>> pushDidRegisterWithToken(const std::shared_ptr<ArrayBuffer>& deviceToken) override;
82
83
  std::shared_ptr<Promise<bool>> pushDidFailToRegister(const PushErrorInfo& error) override;
83
84
  std::shared_ptr<Promise<bool>> pushDidReceiveNotification(const std::unordered_map<std::string, std::variant<bool, std::string, double>>& userInfo) override;
@@ -127,6 +127,10 @@ abstract class HybridAcousticConnectRNSpec: HybridObject() {
127
127
  @Keep
128
128
  abstract fun logDialogCustomEvent(dialogId: String, eventName: String, values: Map<String, Variant_Boolean_String_Double>): Boolean
129
129
 
130
+ @DoNotStrip
131
+ @Keep
132
+ abstract fun logIdentity(identifierName: String, identifierValue: String, signalType: String?, additionalParameters: Map<String, String>?): Promise<Boolean>
133
+
130
134
  @DoNotStrip
131
135
  @Keep
132
136
  abstract fun pushDidRegisterWithToken(deviceToken: ArrayBuffer): Promise<Boolean>
@@ -201,33 +201,73 @@ namespace margelo::nitro::acousticconnectrn::bridge::swift {
201
201
  return Func_void_std__exception_ptr_Wrapper(std::move(value));
202
202
  }
203
203
 
204
- // pragma MARK: std::optional<double>
204
+ // pragma MARK: std::optional<std::string>
205
205
  /**
206
- * Specialized version of `std::optional<double>`.
206
+ * Specialized version of `std::optional<std::string>`.
207
207
  */
208
- using std__optional_double_ = std::optional<double>;
209
- inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
210
- return std::optional<double>(value);
208
+ using std__optional_std__string_ = std::optional<std::string>;
209
+ inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
210
+ return std::optional<std::string>(value);
211
211
  }
212
- inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
212
+ inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
213
213
  return optional.has_value();
214
214
  }
215
- inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
215
+ inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
216
216
  return optional.value();
217
217
  }
218
218
 
219
- // pragma MARK: std::optional<std::string>
219
+ // pragma MARK: std::unordered_map<std::string, std::string>
220
220
  /**
221
- * Specialized version of `std::optional<std::string>`.
221
+ * Specialized version of `std::unordered_map<std::string, std::string>`.
222
222
  */
223
- using std__optional_std__string_ = std::optional<std::string>;
224
- inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
225
- return std::optional<std::string>(value);
223
+ using std__unordered_map_std__string__std__string_ = std::unordered_map<std::string, std::string>;
224
+ inline std::unordered_map<std::string, std::string> create_std__unordered_map_std__string__std__string_(size_t size) noexcept {
225
+ std::unordered_map<std::string, std::string> map;
226
+ map.reserve(size);
227
+ return map;
226
228
  }
227
- inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
229
+ inline std::vector<std::string> get_std__unordered_map_std__string__std__string__keys(const std__unordered_map_std__string__std__string_& map) noexcept {
230
+ std::vector<std::string> keys;
231
+ keys.reserve(map.size());
232
+ for (const auto& entry : map) {
233
+ keys.push_back(entry.first);
234
+ }
235
+ return keys;
236
+ }
237
+ inline std::string get_std__unordered_map_std__string__std__string__value(const std__unordered_map_std__string__std__string_& map, const std::string& key) noexcept {
238
+ return map.find(key)->second;
239
+ }
240
+ inline void emplace_std__unordered_map_std__string__std__string_(std__unordered_map_std__string__std__string_& map, const std::string& key, const std::string& value) noexcept {
241
+ map.emplace(key, value);
242
+ }
243
+
244
+ // pragma MARK: std::optional<std::unordered_map<std::string, std::string>>
245
+ /**
246
+ * Specialized version of `std::optional<std::unordered_map<std::string, std::string>>`.
247
+ */
248
+ using std__optional_std__unordered_map_std__string__std__string__ = std::optional<std::unordered_map<std::string, std::string>>;
249
+ inline std::optional<std::unordered_map<std::string, std::string>> create_std__optional_std__unordered_map_std__string__std__string__(const std::unordered_map<std::string, std::string>& value) noexcept {
250
+ return std::optional<std::unordered_map<std::string, std::string>>(value);
251
+ }
252
+ inline bool has_value_std__optional_std__unordered_map_std__string__std__string__(const std::optional<std::unordered_map<std::string, std::string>>& optional) noexcept {
228
253
  return optional.has_value();
229
254
  }
230
- inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
255
+ inline std::unordered_map<std::string, std::string> get_std__optional_std__unordered_map_std__string__std__string__(const std::optional<std::unordered_map<std::string, std::string>>& optional) noexcept {
256
+ return optional.value();
257
+ }
258
+
259
+ // pragma MARK: std::optional<double>
260
+ /**
261
+ * Specialized version of `std::optional<double>`.
262
+ */
263
+ using std__optional_double_ = std::optional<double>;
264
+ inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
265
+ return std::optional<double>(value);
266
+ }
267
+ inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
268
+ return optional.has_value();
269
+ }
270
+ inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
231
271
  return optional.value();
232
272
  }
233
273
 
@@ -272,6 +272,14 @@ namespace margelo::nitro::acousticconnectrn {
272
272
  auto __value = std::move(__result.value());
273
273
  return __value;
274
274
  }
275
+ inline std::shared_ptr<Promise<bool>> logIdentity(const std::string& identifierName, const std::string& identifierValue, const std::optional<std::string>& signalType, const std::optional<std::unordered_map<std::string, std::string>>& additionalParameters) override {
276
+ auto __result = _swiftPart.logIdentity(identifierName, identifierValue, signalType, additionalParameters);
277
+ if (__result.hasError()) [[unlikely]] {
278
+ std::rethrow_exception(__result.error());
279
+ }
280
+ auto __value = std::move(__result.value());
281
+ return __value;
282
+ }
275
283
  inline std::shared_ptr<Promise<bool>> pushDidRegisterWithToken(const std::shared_ptr<ArrayBuffer>& deviceToken) override {
276
284
  auto __result = _swiftPart.pushDidRegisterWithToken(ArrayBufferHolder(deviceToken));
277
285
  if (__result.hasError()) [[unlikely]] {
@@ -37,6 +37,7 @@ public protocol HybridAcousticConnectRNSpec_protocol: HybridObject {
37
37
  func logDialogDismissEvent(dialogId: String, dismissReason: String) throws -> Bool
38
38
  func logDialogButtonClickEvent(dialogId: String, buttonText: String, buttonIndex: Double) throws -> Bool
39
39
  func logDialogCustomEvent(dialogId: String, eventName: String, values: Dictionary<String, Variant_Bool_String_Double>) throws -> Bool
40
+ func logIdentity(identifierName: String, identifierValue: String, signalType: String?, additionalParameters: Dictionary<String, String>?) throws -> Promise<Bool>
40
41
  func pushDidRegisterWithToken(deviceToken: ArrayBuffer) throws -> Promise<Bool>
41
42
  func pushDidFailToRegister(error: PushErrorInfo) throws -> Promise<Bool>
42
43
  func pushDidReceiveNotification(userInfo: Dictionary<String, Variant_Bool_String_Double>) throws -> Promise<Bool>
@@ -604,6 +604,47 @@ open class HybridAcousticConnectRNSpec_cxx {
604
604
  }
605
605
  }
606
606
 
607
+ @inline(__always)
608
+ public final func logIdentity(identifierName: std.string, identifierValue: std.string, signalType: bridge.std__optional_std__string_, additionalParameters: bridge.std__optional_std__unordered_map_std__string__std__string__) -> bridge.Result_std__shared_ptr_Promise_bool___ {
609
+ do {
610
+ let __result = try self.__implementation.logIdentity(identifierName: String(identifierName), identifierValue: String(identifierValue), signalType: { () -> String? in
611
+ if bridge.has_value_std__optional_std__string_(signalType) {
612
+ let __unwrapped = bridge.get_std__optional_std__string_(signalType)
613
+ return String(__unwrapped)
614
+ } else {
615
+ return nil
616
+ }
617
+ }(), additionalParameters: { () -> Dictionary<String, String>? in
618
+ if bridge.has_value_std__optional_std__unordered_map_std__string__std__string__(additionalParameters) {
619
+ let __unwrapped = bridge.get_std__optional_std__unordered_map_std__string__std__string__(additionalParameters)
620
+ return { () -> Dictionary<String, String> in
621
+ var __dictionary = Dictionary<String, String>(minimumCapacity: __unwrapped.size())
622
+ let __keys = bridge.get_std__unordered_map_std__string__std__string__keys(__unwrapped)
623
+ for __key in __keys {
624
+ let __value = bridge.get_std__unordered_map_std__string__std__string__value(__unwrapped, __key)
625
+ __dictionary[String(__key)] = String(__value)
626
+ }
627
+ return __dictionary
628
+ }()
629
+ } else {
630
+ return nil
631
+ }
632
+ }())
633
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_bool__ in
634
+ let __promise = bridge.create_std__shared_ptr_Promise_bool__()
635
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_bool__(__promise)
636
+ __result
637
+ .then({ __result in __promiseHolder.resolve(__result) })
638
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
639
+ return __promise
640
+ }()
641
+ return bridge.create_Result_std__shared_ptr_Promise_bool___(__resultCpp)
642
+ } catch (let __error) {
643
+ let __exceptionPtr = __error.toCpp()
644
+ return bridge.create_Result_std__shared_ptr_Promise_bool___(__exceptionPtr)
645
+ }
646
+ }
647
+
607
648
  @inline(__always)
608
649
  public final func pushDidRegisterWithToken(deviceToken: ArrayBuffer) -> bridge.Result_std__shared_ptr_Promise_bool___ {
609
650
  do {
@@ -38,6 +38,7 @@ namespace margelo::nitro::acousticconnectrn {
38
38
  prototype.registerHybridMethod("logDialogDismissEvent", &HybridAcousticConnectRNSpec::logDialogDismissEvent);
39
39
  prototype.registerHybridMethod("logDialogButtonClickEvent", &HybridAcousticConnectRNSpec::logDialogButtonClickEvent);
40
40
  prototype.registerHybridMethod("logDialogCustomEvent", &HybridAcousticConnectRNSpec::logDialogCustomEvent);
41
+ prototype.registerHybridMethod("logIdentity", &HybridAcousticConnectRNSpec::logIdentity);
41
42
  prototype.registerHybridMethod("pushDidRegisterWithToken", &HybridAcousticConnectRNSpec::pushDidRegisterWithToken);
42
43
  prototype.registerHybridMethod("pushDidFailToRegister", &HybridAcousticConnectRNSpec::pushDidFailToRegister);
43
44
  prototype.registerHybridMethod("pushDidReceiveNotification", &HybridAcousticConnectRNSpec::pushDidReceiveNotification);
@@ -83,6 +83,7 @@ namespace margelo::nitro::acousticconnectrn {
83
83
  virtual bool logDialogDismissEvent(const std::string& dialogId, const std::string& dismissReason) = 0;
84
84
  virtual bool logDialogButtonClickEvent(const std::string& dialogId, const std::string& buttonText, double buttonIndex) = 0;
85
85
  virtual bool logDialogCustomEvent(const std::string& dialogId, const std::string& eventName, const std::unordered_map<std::string, std::variant<bool, std::string, double>>& values) = 0;
86
+ virtual std::shared_ptr<Promise<bool>> logIdentity(const std::string& identifierName, const std::string& identifierValue, const std::optional<std::string>& signalType, const std::optional<std::unordered_map<std::string, std::string>>& additionalParameters) = 0;
86
87
  virtual std::shared_ptr<Promise<bool>> pushDidRegisterWithToken(const std::shared_ptr<ArrayBuffer>& deviceToken) = 0;
87
88
  virtual std::shared_ptr<Promise<bool>> pushDidFailToRegister(const PushErrorInfo& error) = 0;
88
89
  virtual std::shared_ptr<Promise<bool>> pushDidReceiveNotification(const std::unordered_map<std::string, std::variant<bool, std::string, double>>& userInfo) = 0;
package/package.json CHANGED
@@ -195,7 +195,7 @@
195
195
  "source": "src/index",
196
196
  "summary": "react-native ios android tealeaf connect cxa wxca er enhanced-replay",
197
197
  "types": "./lib/typescript/src/index.d.ts",
198
- "version": "18.0.28",
198
+ "version": "18.0.29",
199
199
  "workspaces": [
200
200
  "example",
201
201
  "Examples/bare-workflow"
@@ -140,6 +140,52 @@ export interface AcousticConnectRN extends HybridObject<{ ios: 'swift', android:
140
140
  logDialogButtonClickEvent(dialogId: string, buttonText: string, buttonIndex: number): boolean
141
141
  logDialogCustomEvent(dialogId: string, eventName: string, values: Record<string, string | number | boolean>): boolean
142
142
 
143
+ /**
144
+ * Logs a user identity so the current device/session can be associated with
145
+ * a known Connect contact — the foundation for audience building and
146
+ * cross-channel engagement. Wraps the native identity loggers
147
+ * (`ConnectSDK.shared.identity.log` on iOS, `Connect.logIdentificationEvent`
148
+ * on Android).
149
+ *
150
+ * Unlike the synchronous analytics loggers above, this returns a `Promise`:
151
+ * `ConnectSDK.shared` (iOS) is `@MainActor`-isolated, so the bridge hops to the
152
+ * main actor and resolves with the *real* success/failure value rather than
153
+ * firing and forgetting.
154
+ *
155
+ * The native APIs return `false` — and emit no signal — when either
156
+ * `identifierName` or `identifierValue` is empty/blank after trimming.
157
+ *
158
+ * @param identifierName Identifier name, e.g. `'Email'`.
159
+ * @param identifierValue Identifier value, e.g. `'user@example.com'`.
160
+ * @param signalType Optional signal type; the bridge supplies
161
+ * `'loggedIn'` when omitted (identity logging typically marks a sign-in),
162
+ * overriding the native SDKs' own `'pageView'` default.
163
+ * @param additionalParameters Optional extra key/value pairs merged into the
164
+ * signal payload. Only when omitted (`undefined`) does the bridge supply
165
+ * the default `{ registrationMethod: 'email' }`; an explicitly-provided
166
+ * map is used as-is, so passing an empty `{}` sends no extra parameters
167
+ * (the default is not merged in). A `'url'` entry is honoured uniformly on
168
+ * both platforms: on Android it is routed to the SDK's explicit `url`
169
+ * parameter, on iOS it rides inside the parameter map (where the native
170
+ * API expects it).
171
+ * @returns A promise resolving to `true` if the identity signal was
172
+ * dispatched, `false` otherwise (including the blank-identifier case).
173
+ * Never rejects.
174
+ *
175
+ * @example
176
+ * ```ts
177
+ * import AcousticConnectRN from 'react-native-acoustic-connect-beta'
178
+ *
179
+ * await AcousticConnectRN.logIdentity('Email', 'user@example.com')
180
+ * ```
181
+ */
182
+ logIdentity(
183
+ identifierName: string,
184
+ identifierValue: string,
185
+ signalType?: string,
186
+ additionalParameters?: Record<string, string>
187
+ ): Promise<boolean>
188
+
143
189
  // ── Push: APNs lifecycle (iOS) ──────────────────────────────────────────
144
190
  //
145
191
  // Push mode (automatic / manual / off) is configured in `ConnectConfig.json`