@npaw/forge-react-native 9.7.5 → 10.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.
Files changed (29) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/npaw/forge/reactnative/ForgeDtoMapper.java +6 -1
  3. package/android/src/main/java/com/npaw/forge/reactnative/NPAWForgeModule.java +10 -0
  4. package/android/src/test/java/com/npaw/forge/reactnative/ForgeDtoMapperTest.java +4 -0
  5. package/ios/ForgeApple/ForgeKernelFFI.xcframework/Info.plist +11 -11
  6. package/ios/ForgeApple/ForgeKernelFFI.xcframework/ios-arm64/Headers/forge_kernelFFI.h +11 -0
  7. package/ios/ForgeApple/ForgeKernelFFI.xcframework/ios-arm64/libForgeKernelFFI.a +0 -0
  8. package/ios/ForgeApple/ForgeKernelFFI.xcframework/ios-arm64_x86_64-simulator/Headers/forge_kernelFFI.h +11 -0
  9. package/ios/ForgeApple/ForgeKernelFFI.xcframework/ios-arm64_x86_64-simulator/libForgeKernelFFI.a +0 -0
  10. package/ios/ForgeApple/ForgeKernelFFI.xcframework/tvos-arm64/Headers/forge_kernelFFI.h +11 -0
  11. package/ios/ForgeApple/ForgeKernelFFI.xcframework/tvos-arm64/libForgeKernelFFI.a +0 -0
  12. package/ios/ForgeApple/ForgeKernelFFI.xcframework/tvos-arm64-simulator/Headers/forge_kernelFFI.h +11 -0
  13. package/ios/ForgeApple/ForgeKernelFFI.xcframework/tvos-arm64-simulator/libForgeKernelFFI.a +0 -0
  14. package/ios/ForgeApple/Sources/ForgeKernelUniFFI/forge_kernel.swift +206 -13
  15. package/ios/ForgeApple/Sources/ForgeKernelUniFFI/forge_kernelFFI.h +11 -0
  16. package/ios/ForgeApple/Sources/NPAWForgeCore/ForgeApple.swift +48 -8
  17. package/ios/ForgeApple/Sources/NPAWForgeCore/ForgeRuntime.swift +22 -2
  18. package/ios/ForgeApple/Sources/NPAWForgeCore/NPAWForge.swift +34 -2
  19. package/ios/ForgeApple/Sources/NPAWForgeCore/NativeUniFFIRuntime.swift +43 -7
  20. package/ios/ForgeApple/Sources/NPAWForgeCore/NetworkRequestRecord.swift +5 -0
  21. package/ios/ForgeApple/Sources/NPAWForgeCore/ObjectiveCWrappers.swift +14 -0
  22. package/ios/ForgeApple/Sources/NPAWForgeCore/VideoAdapter.swift +5 -5
  23. package/ios/ForgeApple/Sources/NPAWForgeCore/WireValue.swift +207 -0
  24. package/ios/ForgeModuleImpl.swift +34 -0
  25. package/ios/NPAWForgeTurboModule.mm +10 -0
  26. package/package.json +1 -1
  27. package/src/NPAWForge.ts +22 -0
  28. package/src/specs/NativeNPAWForge.ts +3 -0
  29. package/src/types.ts +15 -0
@@ -28,7 +28,7 @@ def safeExtGet(prop, fallback) {
28
28
  // FORGE_CORE_VERSION (see scripts/react-native/hydrate-natives.sh).
29
29
  def forgeCoreVersion = project.hasProperty('NpawForge_forgeCoreVersion')
30
30
  ? project.property('NpawForge_forgeCoreVersion')
31
- : (System.getenv('FORGE_CORE_VERSION') ?: '9.7.5')
31
+ : (System.getenv('FORGE_CORE_VERSION') ?: '10.0.1')
32
32
 
33
33
  android {
34
34
  namespace 'com.npaw.forge.reactnative'
@@ -133,6 +133,9 @@ public final class ForgeDtoMapper {
133
133
  case "preSessionEventQueueMaxAgeMs":
134
134
  builder.setPreSessionEventQueueMaxAgeMs(asLong(value));
135
135
  break;
136
+ case "logoutSessionGuardMs":
137
+ builder.setLogoutSessionGuardMs(asLong(value));
138
+ break;
136
139
  case "allowLocalHttpForTesting":
137
140
  builder.setLocalPlaintextTransportForTesting(asBoolean(value));
138
141
  break;
@@ -183,7 +186,9 @@ public final class ForgeDtoMapper {
183
186
  nullableLong(map, "requestBytes"),
184
187
  nullableLong(map, "responseBytes"),
185
188
  Collections.emptyMap(),
186
- Collections.emptyMap());
189
+ Collections.emptyMap(),
190
+ Collections.emptyMap(),
191
+ nullableString(map, "requestType"));
187
192
  }
188
193
 
189
194
  // ---- outputs ----
@@ -178,6 +178,16 @@ public class NPAWForgeModule extends NativeNPAWForgeSpec {
178
178
 
179
179
  // ---- identity ----
180
180
 
181
+ @Override
182
+ public void updateSession(String instanceId, @Nullable ReadableMap metadata, Promise promise) {
183
+ withForge(instanceId, promise, forge -> forge.updateSession(ForgeDtoMapper.toObjectMap(metadata)));
184
+ }
185
+
186
+ @Override
187
+ public void updateSessionMetrics(String instanceId, @Nullable ReadableMap metrics, Promise promise) {
188
+ withForge(instanceId, promise, forge -> forge.updateSessionMetrics(ForgeDtoMapper.toDoubleMap(metrics)));
189
+ }
190
+
181
191
  @Override
182
192
  public void loginSuccess(String instanceId, String userId, @Nullable ReadableMap options, Promise promise) {
183
193
  withForge(instanceId, promise, forge -> forge.loginSuccess(userId, ForgeDtoMapper.toObjectMap(options)));
@@ -77,6 +77,7 @@ public class ForgeDtoMapperTest {
77
77
  map.putString("protocol", "h2");
78
78
  map.putInt("redirectCount", 1);
79
79
  map.putInt("requestBytes", 100);
80
+ map.putString("requestType", "drm_license");
80
81
 
81
82
  NetworkRequestRecord record = ForgeDtoMapper.toNetworkRequestRecord(map);
82
83
 
@@ -89,6 +90,9 @@ public class ForgeDtoMapperTest {
89
90
  assertEquals("h2", record.getProtocol());
90
91
  assertEquals(Integer.valueOf(1), record.getRedirectCount());
91
92
  assertEquals(Long.valueOf(100L), record.getRequestBytes());
93
+ // The map key is a string contract the compiler cannot check; a typo in
94
+ // ForgeDtoMapper would silently drop the field without this assertion.
95
+ assertEquals("drm_license", record.getRequestType());
92
96
  assertNull(record.getDnsDurationMs());
93
97
  assertNull(record.getErrorMessage());
94
98
  }
@@ -10,18 +10,15 @@
10
10
  <key>HeadersPath</key>
11
11
  <string>Headers</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64_x86_64-simulator</string>
13
+ <string>ios-arm64</string>
14
14
  <key>LibraryPath</key>
15
15
  <string>libForgeKernelFFI.a</string>
16
16
  <key>SupportedArchitectures</key>
17
17
  <array>
18
18
  <string>arm64</string>
19
- <string>x86_64</string>
20
19
  </array>
21
20
  <key>SupportedPlatform</key>
22
21
  <string>ios</string>
23
- <key>SupportedPlatformVariant</key>
24
- <string>simulator</string>
25
22
  </dict>
26
23
  <dict>
27
24
  <key>BinaryPath</key>
@@ -29,7 +26,7 @@
29
26
  <key>HeadersPath</key>
30
27
  <string>Headers</string>
31
28
  <key>LibraryIdentifier</key>
32
- <string>tvos-arm64-simulator</string>
29
+ <string>tvos-arm64</string>
33
30
  <key>LibraryPath</key>
34
31
  <string>libForgeKernelFFI.a</string>
35
32
  <key>SupportedArchitectures</key>
@@ -38,8 +35,6 @@
38
35
  </array>
39
36
  <key>SupportedPlatform</key>
40
37
  <string>tvos</string>
41
- <key>SupportedPlatformVariant</key>
42
- <string>simulator</string>
43
38
  </dict>
44
39
  <dict>
45
40
  <key>BinaryPath</key>
@@ -47,7 +42,7 @@
47
42
  <key>HeadersPath</key>
48
43
  <string>Headers</string>
49
44
  <key>LibraryIdentifier</key>
50
- <string>ios-arm64</string>
45
+ <string>tvos-arm64-simulator</string>
51
46
  <key>LibraryPath</key>
52
47
  <string>libForgeKernelFFI.a</string>
53
48
  <key>SupportedArchitectures</key>
@@ -55,7 +50,9 @@
55
50
  <string>arm64</string>
56
51
  </array>
57
52
  <key>SupportedPlatform</key>
58
- <string>ios</string>
53
+ <string>tvos</string>
54
+ <key>SupportedPlatformVariant</key>
55
+ <string>simulator</string>
59
56
  </dict>
60
57
  <dict>
61
58
  <key>BinaryPath</key>
@@ -63,15 +60,18 @@
63
60
  <key>HeadersPath</key>
64
61
  <string>Headers</string>
65
62
  <key>LibraryIdentifier</key>
66
- <string>tvos-arm64</string>
63
+ <string>ios-arm64_x86_64-simulator</string>
67
64
  <key>LibraryPath</key>
68
65
  <string>libForgeKernelFFI.a</string>
69
66
  <key>SupportedArchitectures</key>
70
67
  <array>
71
68
  <string>arm64</string>
69
+ <string>x86_64</string>
72
70
  </array>
73
71
  <key>SupportedPlatform</key>
74
- <string>tvos</string>
72
+ <string>ios</string>
73
+ <key>SupportedPlatformVariant</key>
74
+ <string>simulator</string>
75
75
  </dict>
76
76
  </array>
77
77
  <key>CFBundlePackageType</key>
@@ -439,6 +439,11 @@ RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_player
439
439
  RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_event(uint64_t ptr, RustBuffer event_name, uint64_t timemark_ms, RustBuffer params, RustCallStatus *_Nonnull out_status
440
440
  );
441
441
  #endif
442
+ #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
443
+ #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
444
+ RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_update(uint64_t ptr, uint64_t timemark_ms, RustBuffer params, RustBuffer metrics, RustCallStatus *_Nonnull out_status
445
+ );
446
+ #endif
442
447
  #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
443
448
  #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
444
449
  RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_set_auto_connection_type(uint64_t ptr, RustBuffer connection_type, RustCallStatus *_Nonnull out_status
@@ -891,6 +896,12 @@ uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_pl
891
896
  #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_EVENT
892
897
  uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_event(void
893
898
 
899
+ );
900
+ #endif
901
+ #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
902
+ #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
903
+ uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_update(void
904
+
894
905
  );
895
906
  #endif
896
907
  #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
@@ -439,6 +439,11 @@ RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_player
439
439
  RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_event(uint64_t ptr, RustBuffer event_name, uint64_t timemark_ms, RustBuffer params, RustCallStatus *_Nonnull out_status
440
440
  );
441
441
  #endif
442
+ #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
443
+ #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
444
+ RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_update(uint64_t ptr, uint64_t timemark_ms, RustBuffer params, RustBuffer metrics, RustCallStatus *_Nonnull out_status
445
+ );
446
+ #endif
442
447
  #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
443
448
  #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
444
449
  RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_set_auto_connection_type(uint64_t ptr, RustBuffer connection_type, RustCallStatus *_Nonnull out_status
@@ -891,6 +896,12 @@ uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_pl
891
896
  #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_EVENT
892
897
  uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_event(void
893
898
 
899
+ );
900
+ #endif
901
+ #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
902
+ #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
903
+ uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_update(void
904
+
894
905
  );
895
906
  #endif
896
907
  #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
@@ -439,6 +439,11 @@ RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_player
439
439
  RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_event(uint64_t ptr, RustBuffer event_name, uint64_t timemark_ms, RustBuffer params, RustCallStatus *_Nonnull out_status
440
440
  );
441
441
  #endif
442
+ #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
443
+ #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
444
+ RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_update(uint64_t ptr, uint64_t timemark_ms, RustBuffer params, RustBuffer metrics, RustCallStatus *_Nonnull out_status
445
+ );
446
+ #endif
442
447
  #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
443
448
  #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
444
449
  RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_set_auto_connection_type(uint64_t ptr, RustBuffer connection_type, RustCallStatus *_Nonnull out_status
@@ -891,6 +896,12 @@ uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_pl
891
896
  #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_EVENT
892
897
  uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_event(void
893
898
 
899
+ );
900
+ #endif
901
+ #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
902
+ #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
903
+ uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_update(void
904
+
894
905
  );
895
906
  #endif
896
907
  #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
@@ -439,6 +439,11 @@ RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_player
439
439
  RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_event(uint64_t ptr, RustBuffer event_name, uint64_t timemark_ms, RustBuffer params, RustCallStatus *_Nonnull out_status
440
440
  );
441
441
  #endif
442
+ #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
443
+ #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
444
+ RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_update(uint64_t ptr, uint64_t timemark_ms, RustBuffer params, RustBuffer metrics, RustCallStatus *_Nonnull out_status
445
+ );
446
+ #endif
442
447
  #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
443
448
  #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
444
449
  RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_set_auto_connection_type(uint64_t ptr, RustBuffer connection_type, RustCallStatus *_Nonnull out_status
@@ -891,6 +896,12 @@ uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_pl
891
896
  #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_EVENT
892
897
  uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_event(void
893
898
 
899
+ );
900
+ #endif
901
+ #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
902
+ #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
903
+ uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_update(void
904
+
894
905
  );
895
906
  #endif
896
907
  #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
@@ -633,6 +633,8 @@ public protocol ForgeRuntimeBridgeProtocol: AnyObject, Sendable {
633
633
 
634
634
  func recordSessionEvent(eventName: String, timemarkMs: UInt64, params: [String: String]) -> AppleBindingOutcome
635
635
 
636
+ func recordSessionUpdate(timemarkMs: UInt64, params: [String: String], metrics: [String: Double]) -> AppleBindingOutcome
637
+
636
638
  func setAutoConnectionType(connectionType: String?) -> AppleBindingOutcome
637
639
 
638
640
  func setCapturePlanListener(listener: AppleCapturePlanListener) -> AppleBindingOutcome
@@ -880,6 +882,17 @@ open func recordSessionEvent(eventName: String, timemarkMs: UInt64, params: [Str
880
882
  })
881
883
  }
882
884
 
885
+ open func recordSessionUpdate(timemarkMs: UInt64, params: [String: String], metrics: [String: Double]) -> AppleBindingOutcome {
886
+ return try! FfiConverterTypeAppleBindingOutcome_lift(try! rustCall() {
887
+ uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_update(
888
+ self.uniffiCloneHandle(),
889
+ FfiConverterUInt64.lower(timemarkMs),
890
+ FfiConverterDictionaryStringString.lower(params),
891
+ FfiConverterDictionaryStringDouble.lower(metrics),$0
892
+ )
893
+ })
894
+ }
895
+
883
896
  open func setAutoConnectionType(connectionType: String?) -> AppleBindingOutcome {
884
897
  return try! FfiConverterTypeAppleBindingOutcome_lift(try! rustCall() {
885
898
  uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_set_auto_connection_type(
@@ -1730,6 +1743,7 @@ public struct AppleNetworkObservation: Equatable, Hashable {
1730
1743
  public var redirectDurationMs: UInt64?
1731
1744
  public var redirectCount: UInt64?
1732
1745
  public var `protocol`: String?
1746
+ public var requestType: String?
1733
1747
  public var requestBytes: UInt64?
1734
1748
  public var responseBytes: UInt64?
1735
1749
  public var requestQuery: [String: String]?
@@ -1738,7 +1752,7 @@ public struct AppleNetworkObservation: Equatable, Hashable {
1738
1752
 
1739
1753
  // Default memberwise initializers are never public by default, so we
1740
1754
  // declare one manually.
1741
- public init(eventId: String, source: String, targetUrl: String, method: String, timemarkMs: UInt64, durationMs: UInt64, responseStatusCode: UInt16, outcome: String, responseStatusText: String?, errorMessage: String?, traceparent: String?, dnsDurationMs: UInt64?, connectDurationMs: UInt64?, sslDurationMs: UInt64?, requestDurationMs: UInt64?, timeToFirstByteMs: UInt64?, responseDownloadDurationMs: UInt64?, redirectDurationMs: UInt64?, redirectCount: UInt64?, `protocol`: String?, requestBytes: UInt64?, responseBytes: UInt64?, requestQuery: [String: String]?, requestHeaders: [String: String]?, responseHeaders: [String: String]?) {
1755
+ public init(eventId: String, source: String, targetUrl: String, method: String, timemarkMs: UInt64, durationMs: UInt64, responseStatusCode: UInt16, outcome: String, responseStatusText: String?, errorMessage: String?, traceparent: String?, dnsDurationMs: UInt64?, connectDurationMs: UInt64?, sslDurationMs: UInt64?, requestDurationMs: UInt64?, timeToFirstByteMs: UInt64?, responseDownloadDurationMs: UInt64?, redirectDurationMs: UInt64?, redirectCount: UInt64?, `protocol`: String?, requestType: String?, requestBytes: UInt64?, responseBytes: UInt64?, requestQuery: [String: String]?, requestHeaders: [String: String]?, responseHeaders: [String: String]?) {
1742
1756
  self.eventId = eventId
1743
1757
  self.source = source
1744
1758
  self.targetUrl = targetUrl
@@ -1759,6 +1773,7 @@ public struct AppleNetworkObservation: Equatable, Hashable {
1759
1773
  self.redirectDurationMs = redirectDurationMs
1760
1774
  self.redirectCount = redirectCount
1761
1775
  self.`protocol` = `protocol`
1776
+ self.requestType = requestType
1762
1777
  self.requestBytes = requestBytes
1763
1778
  self.responseBytes = responseBytes
1764
1779
  self.requestQuery = requestQuery
@@ -1802,6 +1817,7 @@ public struct FfiConverterTypeAppleNetworkObservation: FfiConverterRustBuffer {
1802
1817
  redirectDurationMs: FfiConverterOptionUInt64.read(from: &buf),
1803
1818
  redirectCount: FfiConverterOptionUInt64.read(from: &buf),
1804
1819
  protocol: FfiConverterOptionString.read(from: &buf),
1820
+ requestType: FfiConverterOptionString.read(from: &buf),
1805
1821
  requestBytes: FfiConverterOptionUInt64.read(from: &buf),
1806
1822
  responseBytes: FfiConverterOptionUInt64.read(from: &buf),
1807
1823
  requestQuery: FfiConverterOptionDictionaryStringString.read(from: &buf),
@@ -1831,6 +1847,7 @@ public struct FfiConverterTypeAppleNetworkObservation: FfiConverterRustBuffer {
1831
1847
  FfiConverterOptionUInt64.write(value.redirectDurationMs, into: &buf)
1832
1848
  FfiConverterOptionUInt64.write(value.redirectCount, into: &buf)
1833
1849
  FfiConverterOptionString.write(value.`protocol`, into: &buf)
1850
+ FfiConverterOptionString.write(value.requestType, into: &buf)
1834
1851
  FfiConverterOptionUInt64.write(value.requestBytes, into: &buf)
1835
1852
  FfiConverterOptionUInt64.write(value.responseBytes, into: &buf)
1836
1853
  FfiConverterOptionDictionaryStringString.write(value.requestQuery, into: &buf)
@@ -2075,10 +2092,11 @@ public struct AppleRuntimeConfig: Equatable, Hashable {
2075
2092
  public var deviceInfoJson: String?
2076
2093
  public var framework: String?
2077
2094
  public var preSessionEventPolicy: ApplePreSessionEventPolicy
2095
+ public var logoutSessionGuardMs: UInt64?
2078
2096
 
2079
2097
  // Default memberwise initializers are never public by default, so we
2080
2098
  // declare one manually.
2081
- public init(accountCode: String, pluginVersion: String, appName: String, buildVariant: String, appReleaseVersion: String?, lmaEndpoint: String, analyticsUserAgent: String?, allowLocalHttp: Bool, logLevel: String, deviceUuid: String?, deviceInfoJson: String?, framework: String?, preSessionEventPolicy: ApplePreSessionEventPolicy) {
2099
+ public init(accountCode: String, pluginVersion: String, appName: String, buildVariant: String, appReleaseVersion: String?, lmaEndpoint: String, analyticsUserAgent: String?, allowLocalHttp: Bool, logLevel: String, deviceUuid: String?, deviceInfoJson: String?, framework: String?, preSessionEventPolicy: ApplePreSessionEventPolicy, logoutSessionGuardMs: UInt64?) {
2082
2100
  self.accountCode = accountCode
2083
2101
  self.pluginVersion = pluginVersion
2084
2102
  self.appName = appName
@@ -2092,6 +2110,7 @@ public struct AppleRuntimeConfig: Equatable, Hashable {
2092
2110
  self.deviceInfoJson = deviceInfoJson
2093
2111
  self.framework = framework
2094
2112
  self.preSessionEventPolicy = preSessionEventPolicy
2113
+ self.logoutSessionGuardMs = logoutSessionGuardMs
2095
2114
  }
2096
2115
 
2097
2116
 
@@ -2122,7 +2141,8 @@ public struct FfiConverterTypeAppleRuntimeConfig: FfiConverterRustBuffer {
2122
2141
  deviceUuid: FfiConverterOptionString.read(from: &buf),
2123
2142
  deviceInfoJson: FfiConverterOptionString.read(from: &buf),
2124
2143
  framework: FfiConverterOptionString.read(from: &buf),
2125
- preSessionEventPolicy: FfiConverterTypeApplePreSessionEventPolicy.read(from: &buf)
2144
+ preSessionEventPolicy: FfiConverterTypeApplePreSessionEventPolicy.read(from: &buf),
2145
+ logoutSessionGuardMs: FfiConverterOptionUInt64.read(from: &buf)
2126
2146
  )
2127
2147
  }
2128
2148
 
@@ -2140,6 +2160,7 @@ public struct FfiConverterTypeAppleRuntimeConfig: FfiConverterRustBuffer {
2140
2160
  FfiConverterOptionString.write(value.deviceInfoJson, into: &buf)
2141
2161
  FfiConverterOptionString.write(value.framework, into: &buf)
2142
2162
  FfiConverterTypeApplePreSessionEventPolicy.write(value.preSessionEventPolicy, into: &buf)
2163
+ FfiConverterOptionUInt64.write(value.logoutSessionGuardMs, into: &buf)
2143
2164
  }
2144
2165
  }
2145
2166
 
@@ -3116,6 +3137,124 @@ public func FfiConverterTypeAppleVideoEvent_lower(_ value: AppleVideoEvent) -> R
3116
3137
  }
3117
3138
 
3118
3139
 
3140
+ // Note that we don't yet support `indirect` for enums.
3141
+ // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
3142
+ /**
3143
+ * One request-body value as the wire carries it. `Object` and `Array` nest
3144
+ * recursively, so `entities`, `metrics`, `dimensions` and `deviceInfo` cross
3145
+ * the boundary as real structure rather than as JSON escaped into a string.
3146
+ */
3147
+
3148
+ public enum AppleWireValue: Equatable, Hashable {
3149
+
3150
+ case str(value: String
3151
+ )
3152
+ case int(value: Int64
3153
+ )
3154
+ case num(value: Double
3155
+ )
3156
+ case bool(value: Bool
3157
+ )
3158
+ case object(value: [String: AppleWireValue]
3159
+ )
3160
+ case array(value: [AppleWireValue]
3161
+ )
3162
+
3163
+
3164
+
3165
+
3166
+
3167
+ }
3168
+
3169
+ #if compiler(>=6)
3170
+ extension AppleWireValue: Sendable {}
3171
+ #endif
3172
+
3173
+ #if swift(>=5.8)
3174
+ @_documentation(visibility: private)
3175
+ #endif
3176
+ public struct FfiConverterTypeAppleWireValue: FfiConverterRustBuffer {
3177
+ typealias SwiftType = AppleWireValue
3178
+
3179
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AppleWireValue {
3180
+ let variant: Int32 = try readInt(&buf)
3181
+ switch variant {
3182
+
3183
+ case 1: return .str(value: try FfiConverterString.read(from: &buf)
3184
+ )
3185
+
3186
+ case 2: return .int(value: try FfiConverterInt64.read(from: &buf)
3187
+ )
3188
+
3189
+ case 3: return .num(value: try FfiConverterDouble.read(from: &buf)
3190
+ )
3191
+
3192
+ case 4: return .bool(value: try FfiConverterBool.read(from: &buf)
3193
+ )
3194
+
3195
+ case 5: return .object(value: try FfiConverterDictionaryStringTypeAppleWireValue.read(from: &buf)
3196
+ )
3197
+
3198
+ case 6: return .array(value: try FfiConverterSequenceTypeAppleWireValue.read(from: &buf)
3199
+ )
3200
+
3201
+ default: throw UniffiInternalError.unexpectedEnumCase
3202
+ }
3203
+ }
3204
+
3205
+ public static func write(_ value: AppleWireValue, into buf: inout [UInt8]) {
3206
+ switch value {
3207
+
3208
+
3209
+ case let .str(value):
3210
+ writeInt(&buf, Int32(1))
3211
+ FfiConverterString.write(value, into: &buf)
3212
+
3213
+
3214
+ case let .int(value):
3215
+ writeInt(&buf, Int32(2))
3216
+ FfiConverterInt64.write(value, into: &buf)
3217
+
3218
+
3219
+ case let .num(value):
3220
+ writeInt(&buf, Int32(3))
3221
+ FfiConverterDouble.write(value, into: &buf)
3222
+
3223
+
3224
+ case let .bool(value):
3225
+ writeInt(&buf, Int32(4))
3226
+ FfiConverterBool.write(value, into: &buf)
3227
+
3228
+
3229
+ case let .object(value):
3230
+ writeInt(&buf, Int32(5))
3231
+ FfiConverterDictionaryStringTypeAppleWireValue.write(value, into: &buf)
3232
+
3233
+
3234
+ case let .array(value):
3235
+ writeInt(&buf, Int32(6))
3236
+ FfiConverterSequenceTypeAppleWireValue.write(value, into: &buf)
3237
+
3238
+ }
3239
+ }
3240
+ }
3241
+
3242
+
3243
+ #if swift(>=5.8)
3244
+ @_documentation(visibility: private)
3245
+ #endif
3246
+ public func FfiConverterTypeAppleWireValue_lift(_ buf: RustBuffer) throws -> AppleWireValue {
3247
+ return try FfiConverterTypeAppleWireValue.lift(buf)
3248
+ }
3249
+
3250
+ #if swift(>=5.8)
3251
+ @_documentation(visibility: private)
3252
+ #endif
3253
+ public func FfiConverterTypeAppleWireValue_lower(_ value: AppleWireValue) -> RustBuffer {
3254
+ return FfiConverterTypeAppleWireValue.lower(value)
3255
+ }
3256
+
3257
+
3119
3258
 
3120
3259
 
3121
3260
 
@@ -3647,7 +3786,7 @@ public func FfiConverterCallbackInterfaceAppleLogListener_lower(_ v: AppleLogLis
3647
3786
 
3648
3787
  public protocol AppleSessionPreSendHook: AnyObject, Sendable {
3649
3788
 
3650
- func willSend(serviceName: String, params: [String: String]) -> [String: String]
3789
+ func willSend(serviceName: String, params: [String: AppleWireValue]) -> [String: AppleWireValue]
3651
3790
 
3652
3791
  }
3653
3792
 
@@ -3682,18 +3821,18 @@ fileprivate struct UniffiCallbackInterfaceAppleSessionPreSendHook {
3682
3821
  uniffiCallStatus: UnsafeMutablePointer<RustCallStatus>
3683
3822
  ) in
3684
3823
  let makeCall = {
3685
- () throws -> [String: String] in
3824
+ () throws -> [String: AppleWireValue] in
3686
3825
  guard let uniffiObj = try? FfiConverterCallbackInterfaceAppleSessionPreSendHook.handleMap.get(handle: uniffiHandle) else {
3687
3826
  throw UniffiInternalError.unexpectedStaleHandle
3688
3827
  }
3689
3828
  return uniffiObj.willSend(
3690
3829
  serviceName: try FfiConverterString.lift(serviceName),
3691
- params: try FfiConverterDictionaryStringString.lift(params)
3830
+ params: try FfiConverterDictionaryStringTypeAppleWireValue.lift(params)
3692
3831
  )
3693
3832
  }
3694
3833
 
3695
3834
 
3696
- let writeReturn = { uniffiOutReturn.pointee = FfiConverterDictionaryStringString.lower($0) }
3835
+ let writeReturn = { uniffiOutReturn.pointee = FfiConverterDictionaryStringTypeAppleWireValue.lower($0) }
3697
3836
  uniffiTraitInterfaceCall(
3698
3837
  callStatus: uniffiCallStatus,
3699
3838
  makeCall: makeCall,
@@ -3780,7 +3919,7 @@ public func FfiConverterCallbackInterfaceAppleSessionPreSendHook_lower(_ v: Appl
3780
3919
 
3781
3920
  public protocol AppleVideoPreSendHook: AnyObject, Sendable {
3782
3921
 
3783
- func willSend(eventName: String, viewId: UInt64, serviceName: String, params: [String: String]) -> [String: String]
3922
+ func willSend(eventName: String, viewId: UInt64, serviceName: String, params: [String: AppleWireValue]) -> [String: AppleWireValue]
3784
3923
 
3785
3924
  }
3786
3925
 
@@ -3817,7 +3956,7 @@ fileprivate struct UniffiCallbackInterfaceAppleVideoPreSendHook {
3817
3956
  uniffiCallStatus: UnsafeMutablePointer<RustCallStatus>
3818
3957
  ) in
3819
3958
  let makeCall = {
3820
- () throws -> [String: String] in
3959
+ () throws -> [String: AppleWireValue] in
3821
3960
  guard let uniffiObj = try? FfiConverterCallbackInterfaceAppleVideoPreSendHook.handleMap.get(handle: uniffiHandle) else {
3822
3961
  throw UniffiInternalError.unexpectedStaleHandle
3823
3962
  }
@@ -3825,12 +3964,12 @@ fileprivate struct UniffiCallbackInterfaceAppleVideoPreSendHook {
3825
3964
  eventName: try FfiConverterString.lift(eventName),
3826
3965
  viewId: try FfiConverterUInt64.lift(viewId),
3827
3966
  serviceName: try FfiConverterString.lift(serviceName),
3828
- params: try FfiConverterDictionaryStringString.lift(params)
3967
+ params: try FfiConverterDictionaryStringTypeAppleWireValue.lift(params)
3829
3968
  )
3830
3969
  }
3831
3970
 
3832
3971
 
3833
- let writeReturn = { uniffiOutReturn.pointee = FfiConverterDictionaryStringString.lower($0) }
3972
+ let writeReturn = { uniffiOutReturn.pointee = FfiConverterDictionaryStringTypeAppleWireValue.lower($0) }
3834
3973
  uniffiTraitInterfaceCall(
3835
3974
  callStatus: uniffiCallStatus,
3836
3975
  makeCall: makeCall,
@@ -4346,6 +4485,31 @@ fileprivate struct FfiConverterSequenceTypeAppleRuntimeEventSnapshot: FfiConvert
4346
4485
  }
4347
4486
  }
4348
4487
 
4488
+ #if swift(>=5.8)
4489
+ @_documentation(visibility: private)
4490
+ #endif
4491
+ fileprivate struct FfiConverterSequenceTypeAppleWireValue: FfiConverterRustBuffer {
4492
+ typealias SwiftType = [AppleWireValue]
4493
+
4494
+ public static func write(_ value: [AppleWireValue], into buf: inout [UInt8]) {
4495
+ let len = Int32(value.count)
4496
+ writeInt(&buf, len)
4497
+ for item in value {
4498
+ FfiConverterTypeAppleWireValue.write(item, into: &buf)
4499
+ }
4500
+ }
4501
+
4502
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [AppleWireValue] {
4503
+ let len: Int32 = try readInt(&buf)
4504
+ var seq = [AppleWireValue]()
4505
+ seq.reserveCapacity(Int(len))
4506
+ for _ in 0 ..< len {
4507
+ seq.append(try FfiConverterTypeAppleWireValue.read(from: &buf))
4508
+ }
4509
+ return seq
4510
+ }
4511
+ }
4512
+
4349
4513
  #if swift(>=5.8)
4350
4514
  @_documentation(visibility: private)
4351
4515
  #endif
@@ -4397,6 +4561,32 @@ fileprivate struct FfiConverterDictionaryStringString: FfiConverterRustBuffer {
4397
4561
  return dict
4398
4562
  }
4399
4563
  }
4564
+
4565
+ #if swift(>=5.8)
4566
+ @_documentation(visibility: private)
4567
+ #endif
4568
+ fileprivate struct FfiConverterDictionaryStringTypeAppleWireValue: FfiConverterRustBuffer {
4569
+ public static func write(_ value: [String: AppleWireValue], into buf: inout [UInt8]) {
4570
+ let len = Int32(value.count)
4571
+ writeInt(&buf, len)
4572
+ for (key, value) in value {
4573
+ FfiConverterString.write(key, into: &buf)
4574
+ FfiConverterTypeAppleWireValue.write(value, into: &buf)
4575
+ }
4576
+ }
4577
+
4578
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [String: AppleWireValue] {
4579
+ let len: Int32 = try readInt(&buf)
4580
+ var dict = [String: AppleWireValue]()
4581
+ dict.reserveCapacity(Int(len))
4582
+ for _ in 0..<len {
4583
+ let key = try FfiConverterString.read(from: &buf)
4584
+ let value = try FfiConverterTypeAppleWireValue.read(from: &buf)
4585
+ dict[key] = value
4586
+ }
4587
+ return dict
4588
+ }
4589
+ }
4400
4590
  public func forgePluginVersion() -> String {
4401
4591
  return try! FfiConverterString.lift(try! rustCall() {
4402
4592
  uniffi_forge_kernel_uniffi_fn_func_forge_plugin_version($0
@@ -4473,6 +4663,9 @@ private let initializationResult: InitializationResult = {
4473
4663
  if (uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_event() != 32672) {
4474
4664
  return InitializationResult.apiChecksumMismatch
4475
4665
  }
4666
+ if (uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_update() != 42476) {
4667
+ return InitializationResult.apiChecksumMismatch
4668
+ }
4476
4669
  if (uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_set_auto_connection_type() != 38828) {
4477
4670
  return InitializationResult.apiChecksumMismatch
4478
4671
  }
@@ -4518,10 +4711,10 @@ private let initializationResult: InitializationResult = {
4518
4711
  if (uniffi_forge_kernel_uniffi_checksum_method_appleloglistener_on_log() != 23012) {
4519
4712
  return InitializationResult.apiChecksumMismatch
4520
4713
  }
4521
- if (uniffi_forge_kernel_uniffi_checksum_method_applesessionpresendhook_will_send() != 48599) {
4714
+ if (uniffi_forge_kernel_uniffi_checksum_method_applesessionpresendhook_will_send() != 42303) {
4522
4715
  return InitializationResult.apiChecksumMismatch
4523
4716
  }
4524
- if (uniffi_forge_kernel_uniffi_checksum_method_applevideopresendhook_will_send() != 35608) {
4717
+ if (uniffi_forge_kernel_uniffi_checksum_method_applevideopresendhook_will_send() != 47813) {
4525
4718
  return InitializationResult.apiChecksumMismatch
4526
4719
  }
4527
4720
 
@@ -439,6 +439,11 @@ RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_player
439
439
  RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_event(uint64_t ptr, RustBuffer event_name, uint64_t timemark_ms, RustBuffer params, RustCallStatus *_Nonnull out_status
440
440
  );
441
441
  #endif
442
+ #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
443
+ #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
444
+ RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_record_session_update(uint64_t ptr, uint64_t timemark_ms, RustBuffer params, RustBuffer metrics, RustCallStatus *_Nonnull out_status
445
+ );
446
+ #endif
442
447
  #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
443
448
  #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_FN_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE
444
449
  RustBuffer uniffi_forge_kernel_uniffi_fn_method_forgeruntimebridge_set_auto_connection_type(uint64_t ptr, RustBuffer connection_type, RustCallStatus *_Nonnull out_status
@@ -891,6 +896,12 @@ uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_pl
891
896
  #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_EVENT
892
897
  uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_event(void
893
898
 
899
+ );
900
+ #endif
901
+ #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
902
+ #define UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_RECORD_SESSION_UPDATE
903
+ uint16_t uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_update(void
904
+
894
905
  );
895
906
  #endif
896
907
  #ifndef UNIFFI_FFIDEF_UNIFFI_FORGE_KERNEL_UNIFFI_CHECKSUM_METHOD_FORGERUNTIMEBRIDGE_SET_AUTO_CONNECTION_TYPE