@npaw/forge-react-native 9.7.5 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/npaw/forge/reactnative/ForgeDtoMapper.java +3 -0
- package/android/src/main/java/com/npaw/forge/reactnative/NPAWForgeModule.java +10 -0
- package/ios/ForgeApple/ForgeKernelFFI.xcframework/Info.plist +4 -4
- package/ios/ForgeApple/ForgeKernelFFI.xcframework/ios-arm64/Headers/forge_kernelFFI.h +11 -0
- package/ios/ForgeApple/ForgeKernelFFI.xcframework/ios-arm64/libForgeKernelFFI.a +0 -0
- package/ios/ForgeApple/ForgeKernelFFI.xcframework/ios-arm64_x86_64-simulator/Headers/forge_kernelFFI.h +11 -0
- package/ios/ForgeApple/ForgeKernelFFI.xcframework/ios-arm64_x86_64-simulator/libForgeKernelFFI.a +0 -0
- package/ios/ForgeApple/ForgeKernelFFI.xcframework/tvos-arm64/Headers/forge_kernelFFI.h +11 -0
- package/ios/ForgeApple/ForgeKernelFFI.xcframework/tvos-arm64/libForgeKernelFFI.a +0 -0
- package/ios/ForgeApple/ForgeKernelFFI.xcframework/tvos-arm64-simulator/Headers/forge_kernelFFI.h +11 -0
- package/ios/ForgeApple/ForgeKernelFFI.xcframework/tvos-arm64-simulator/libForgeKernelFFI.a +0 -0
- package/ios/ForgeApple/Sources/ForgeKernelUniFFI/forge_kernel.swift +201 -12
- package/ios/ForgeApple/Sources/ForgeKernelUniFFI/forge_kernelFFI.h +11 -0
- package/ios/ForgeApple/Sources/NPAWForgeCore/ForgeApple.swift +48 -8
- package/ios/ForgeApple/Sources/NPAWForgeCore/ForgeRuntime.swift +22 -2
- package/ios/ForgeApple/Sources/NPAWForgeCore/NPAWForge.swift +34 -2
- package/ios/ForgeApple/Sources/NPAWForgeCore/NativeUniFFIRuntime.swift +42 -7
- package/ios/ForgeApple/Sources/NPAWForgeCore/ObjectiveCWrappers.swift +14 -0
- package/ios/ForgeApple/Sources/NPAWForgeCore/VideoAdapter.swift +5 -5
- package/ios/ForgeApple/Sources/NPAWForgeCore/WireValue.swift +207 -0
- package/ios/ForgeModuleImpl.swift +33 -0
- package/ios/NPAWForgeTurboModule.mm +10 -0
- package/package.json +1 -1
- package/src/NPAWForge.ts +22 -0
- package/src/specs/NativeNPAWForge.ts +3 -0
- package/src/types.ts +8 -0
package/android/build.gradle
CHANGED
|
@@ -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') ?: '
|
|
31
|
+
: (System.getenv('FORGE_CORE_VERSION') ?: '10.0.0')
|
|
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;
|
|
@@ -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)));
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
<key>HeadersPath</key>
|
|
48
48
|
<string>Headers</string>
|
|
49
49
|
<key>LibraryIdentifier</key>
|
|
50
|
-
<string>
|
|
50
|
+
<string>tvos-arm64</string>
|
|
51
51
|
<key>LibraryPath</key>
|
|
52
52
|
<string>libForgeKernelFFI.a</string>
|
|
53
53
|
<key>SupportedArchitectures</key>
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<string>arm64</string>
|
|
56
56
|
</array>
|
|
57
57
|
<key>SupportedPlatform</key>
|
|
58
|
-
<string>
|
|
58
|
+
<string>tvos</string>
|
|
59
59
|
</dict>
|
|
60
60
|
<dict>
|
|
61
61
|
<key>BinaryPath</key>
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
<key>HeadersPath</key>
|
|
64
64
|
<string>Headers</string>
|
|
65
65
|
<key>LibraryIdentifier</key>
|
|
66
|
-
<string>
|
|
66
|
+
<string>ios-arm64</string>
|
|
67
67
|
<key>LibraryPath</key>
|
|
68
68
|
<string>libForgeKernelFFI.a</string>
|
|
69
69
|
<key>SupportedArchitectures</key>
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<string>arm64</string>
|
|
72
72
|
</array>
|
|
73
73
|
<key>SupportedPlatform</key>
|
|
74
|
-
<string>
|
|
74
|
+
<string>ios</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
|
|
Binary file
|
|
@@ -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
|
package/ios/ForgeApple/ForgeKernelFFI.xcframework/ios-arm64_x86_64-simulator/libForgeKernelFFI.a
CHANGED
|
Binary file
|
|
@@ -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
|
|
Binary file
|
package/ios/ForgeApple/ForgeKernelFFI.xcframework/tvos-arm64-simulator/Headers/forge_kernelFFI.h
CHANGED
|
@@ -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
|
|
Binary file
|
|
@@ -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(
|
|
@@ -2075,10 +2088,11 @@ public struct AppleRuntimeConfig: Equatable, Hashable {
|
|
|
2075
2088
|
public var deviceInfoJson: String?
|
|
2076
2089
|
public var framework: String?
|
|
2077
2090
|
public var preSessionEventPolicy: ApplePreSessionEventPolicy
|
|
2091
|
+
public var logoutSessionGuardMs: UInt64?
|
|
2078
2092
|
|
|
2079
2093
|
// Default memberwise initializers are never public by default, so we
|
|
2080
2094
|
// 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) {
|
|
2095
|
+
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
2096
|
self.accountCode = accountCode
|
|
2083
2097
|
self.pluginVersion = pluginVersion
|
|
2084
2098
|
self.appName = appName
|
|
@@ -2092,6 +2106,7 @@ public struct AppleRuntimeConfig: Equatable, Hashable {
|
|
|
2092
2106
|
self.deviceInfoJson = deviceInfoJson
|
|
2093
2107
|
self.framework = framework
|
|
2094
2108
|
self.preSessionEventPolicy = preSessionEventPolicy
|
|
2109
|
+
self.logoutSessionGuardMs = logoutSessionGuardMs
|
|
2095
2110
|
}
|
|
2096
2111
|
|
|
2097
2112
|
|
|
@@ -2122,7 +2137,8 @@ public struct FfiConverterTypeAppleRuntimeConfig: FfiConverterRustBuffer {
|
|
|
2122
2137
|
deviceUuid: FfiConverterOptionString.read(from: &buf),
|
|
2123
2138
|
deviceInfoJson: FfiConverterOptionString.read(from: &buf),
|
|
2124
2139
|
framework: FfiConverterOptionString.read(from: &buf),
|
|
2125
|
-
preSessionEventPolicy: FfiConverterTypeApplePreSessionEventPolicy.read(from: &buf)
|
|
2140
|
+
preSessionEventPolicy: FfiConverterTypeApplePreSessionEventPolicy.read(from: &buf),
|
|
2141
|
+
logoutSessionGuardMs: FfiConverterOptionUInt64.read(from: &buf)
|
|
2126
2142
|
)
|
|
2127
2143
|
}
|
|
2128
2144
|
|
|
@@ -2140,6 +2156,7 @@ public struct FfiConverterTypeAppleRuntimeConfig: FfiConverterRustBuffer {
|
|
|
2140
2156
|
FfiConverterOptionString.write(value.deviceInfoJson, into: &buf)
|
|
2141
2157
|
FfiConverterOptionString.write(value.framework, into: &buf)
|
|
2142
2158
|
FfiConverterTypeApplePreSessionEventPolicy.write(value.preSessionEventPolicy, into: &buf)
|
|
2159
|
+
FfiConverterOptionUInt64.write(value.logoutSessionGuardMs, into: &buf)
|
|
2143
2160
|
}
|
|
2144
2161
|
}
|
|
2145
2162
|
|
|
@@ -3116,6 +3133,124 @@ public func FfiConverterTypeAppleVideoEvent_lower(_ value: AppleVideoEvent) -> R
|
|
|
3116
3133
|
}
|
|
3117
3134
|
|
|
3118
3135
|
|
|
3136
|
+
// Note that we don't yet support `indirect` for enums.
|
|
3137
|
+
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
|
|
3138
|
+
/**
|
|
3139
|
+
* One request-body value as the wire carries it. `Object` and `Array` nest
|
|
3140
|
+
* recursively, so `entities`, `metrics`, `dimensions` and `deviceInfo` cross
|
|
3141
|
+
* the boundary as real structure rather than as JSON escaped into a string.
|
|
3142
|
+
*/
|
|
3143
|
+
|
|
3144
|
+
public enum AppleWireValue: Equatable, Hashable {
|
|
3145
|
+
|
|
3146
|
+
case str(value: String
|
|
3147
|
+
)
|
|
3148
|
+
case int(value: Int64
|
|
3149
|
+
)
|
|
3150
|
+
case num(value: Double
|
|
3151
|
+
)
|
|
3152
|
+
case bool(value: Bool
|
|
3153
|
+
)
|
|
3154
|
+
case object(value: [String: AppleWireValue]
|
|
3155
|
+
)
|
|
3156
|
+
case array(value: [AppleWireValue]
|
|
3157
|
+
)
|
|
3158
|
+
|
|
3159
|
+
|
|
3160
|
+
|
|
3161
|
+
|
|
3162
|
+
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3165
|
+
#if compiler(>=6)
|
|
3166
|
+
extension AppleWireValue: Sendable {}
|
|
3167
|
+
#endif
|
|
3168
|
+
|
|
3169
|
+
#if swift(>=5.8)
|
|
3170
|
+
@_documentation(visibility: private)
|
|
3171
|
+
#endif
|
|
3172
|
+
public struct FfiConverterTypeAppleWireValue: FfiConverterRustBuffer {
|
|
3173
|
+
typealias SwiftType = AppleWireValue
|
|
3174
|
+
|
|
3175
|
+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AppleWireValue {
|
|
3176
|
+
let variant: Int32 = try readInt(&buf)
|
|
3177
|
+
switch variant {
|
|
3178
|
+
|
|
3179
|
+
case 1: return .str(value: try FfiConverterString.read(from: &buf)
|
|
3180
|
+
)
|
|
3181
|
+
|
|
3182
|
+
case 2: return .int(value: try FfiConverterInt64.read(from: &buf)
|
|
3183
|
+
)
|
|
3184
|
+
|
|
3185
|
+
case 3: return .num(value: try FfiConverterDouble.read(from: &buf)
|
|
3186
|
+
)
|
|
3187
|
+
|
|
3188
|
+
case 4: return .bool(value: try FfiConverterBool.read(from: &buf)
|
|
3189
|
+
)
|
|
3190
|
+
|
|
3191
|
+
case 5: return .object(value: try FfiConverterDictionaryStringTypeAppleWireValue.read(from: &buf)
|
|
3192
|
+
)
|
|
3193
|
+
|
|
3194
|
+
case 6: return .array(value: try FfiConverterSequenceTypeAppleWireValue.read(from: &buf)
|
|
3195
|
+
)
|
|
3196
|
+
|
|
3197
|
+
default: throw UniffiInternalError.unexpectedEnumCase
|
|
3198
|
+
}
|
|
3199
|
+
}
|
|
3200
|
+
|
|
3201
|
+
public static func write(_ value: AppleWireValue, into buf: inout [UInt8]) {
|
|
3202
|
+
switch value {
|
|
3203
|
+
|
|
3204
|
+
|
|
3205
|
+
case let .str(value):
|
|
3206
|
+
writeInt(&buf, Int32(1))
|
|
3207
|
+
FfiConverterString.write(value, into: &buf)
|
|
3208
|
+
|
|
3209
|
+
|
|
3210
|
+
case let .int(value):
|
|
3211
|
+
writeInt(&buf, Int32(2))
|
|
3212
|
+
FfiConverterInt64.write(value, into: &buf)
|
|
3213
|
+
|
|
3214
|
+
|
|
3215
|
+
case let .num(value):
|
|
3216
|
+
writeInt(&buf, Int32(3))
|
|
3217
|
+
FfiConverterDouble.write(value, into: &buf)
|
|
3218
|
+
|
|
3219
|
+
|
|
3220
|
+
case let .bool(value):
|
|
3221
|
+
writeInt(&buf, Int32(4))
|
|
3222
|
+
FfiConverterBool.write(value, into: &buf)
|
|
3223
|
+
|
|
3224
|
+
|
|
3225
|
+
case let .object(value):
|
|
3226
|
+
writeInt(&buf, Int32(5))
|
|
3227
|
+
FfiConverterDictionaryStringTypeAppleWireValue.write(value, into: &buf)
|
|
3228
|
+
|
|
3229
|
+
|
|
3230
|
+
case let .array(value):
|
|
3231
|
+
writeInt(&buf, Int32(6))
|
|
3232
|
+
FfiConverterSequenceTypeAppleWireValue.write(value, into: &buf)
|
|
3233
|
+
|
|
3234
|
+
}
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
|
|
3238
|
+
|
|
3239
|
+
#if swift(>=5.8)
|
|
3240
|
+
@_documentation(visibility: private)
|
|
3241
|
+
#endif
|
|
3242
|
+
public func FfiConverterTypeAppleWireValue_lift(_ buf: RustBuffer) throws -> AppleWireValue {
|
|
3243
|
+
return try FfiConverterTypeAppleWireValue.lift(buf)
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3246
|
+
#if swift(>=5.8)
|
|
3247
|
+
@_documentation(visibility: private)
|
|
3248
|
+
#endif
|
|
3249
|
+
public func FfiConverterTypeAppleWireValue_lower(_ value: AppleWireValue) -> RustBuffer {
|
|
3250
|
+
return FfiConverterTypeAppleWireValue.lower(value)
|
|
3251
|
+
}
|
|
3252
|
+
|
|
3253
|
+
|
|
3119
3254
|
|
|
3120
3255
|
|
|
3121
3256
|
|
|
@@ -3647,7 +3782,7 @@ public func FfiConverterCallbackInterfaceAppleLogListener_lower(_ v: AppleLogLis
|
|
|
3647
3782
|
|
|
3648
3783
|
public protocol AppleSessionPreSendHook: AnyObject, Sendable {
|
|
3649
3784
|
|
|
3650
|
-
func willSend(serviceName: String, params: [String:
|
|
3785
|
+
func willSend(serviceName: String, params: [String: AppleWireValue]) -> [String: AppleWireValue]
|
|
3651
3786
|
|
|
3652
3787
|
}
|
|
3653
3788
|
|
|
@@ -3682,18 +3817,18 @@ fileprivate struct UniffiCallbackInterfaceAppleSessionPreSendHook {
|
|
|
3682
3817
|
uniffiCallStatus: UnsafeMutablePointer<RustCallStatus>
|
|
3683
3818
|
) in
|
|
3684
3819
|
let makeCall = {
|
|
3685
|
-
() throws -> [String:
|
|
3820
|
+
() throws -> [String: AppleWireValue] in
|
|
3686
3821
|
guard let uniffiObj = try? FfiConverterCallbackInterfaceAppleSessionPreSendHook.handleMap.get(handle: uniffiHandle) else {
|
|
3687
3822
|
throw UniffiInternalError.unexpectedStaleHandle
|
|
3688
3823
|
}
|
|
3689
3824
|
return uniffiObj.willSend(
|
|
3690
3825
|
serviceName: try FfiConverterString.lift(serviceName),
|
|
3691
|
-
params: try
|
|
3826
|
+
params: try FfiConverterDictionaryStringTypeAppleWireValue.lift(params)
|
|
3692
3827
|
)
|
|
3693
3828
|
}
|
|
3694
3829
|
|
|
3695
3830
|
|
|
3696
|
-
let writeReturn = { uniffiOutReturn.pointee =
|
|
3831
|
+
let writeReturn = { uniffiOutReturn.pointee = FfiConverterDictionaryStringTypeAppleWireValue.lower($0) }
|
|
3697
3832
|
uniffiTraitInterfaceCall(
|
|
3698
3833
|
callStatus: uniffiCallStatus,
|
|
3699
3834
|
makeCall: makeCall,
|
|
@@ -3780,7 +3915,7 @@ public func FfiConverterCallbackInterfaceAppleSessionPreSendHook_lower(_ v: Appl
|
|
|
3780
3915
|
|
|
3781
3916
|
public protocol AppleVideoPreSendHook: AnyObject, Sendable {
|
|
3782
3917
|
|
|
3783
|
-
func willSend(eventName: String, viewId: UInt64, serviceName: String, params: [String:
|
|
3918
|
+
func willSend(eventName: String, viewId: UInt64, serviceName: String, params: [String: AppleWireValue]) -> [String: AppleWireValue]
|
|
3784
3919
|
|
|
3785
3920
|
}
|
|
3786
3921
|
|
|
@@ -3817,7 +3952,7 @@ fileprivate struct UniffiCallbackInterfaceAppleVideoPreSendHook {
|
|
|
3817
3952
|
uniffiCallStatus: UnsafeMutablePointer<RustCallStatus>
|
|
3818
3953
|
) in
|
|
3819
3954
|
let makeCall = {
|
|
3820
|
-
() throws -> [String:
|
|
3955
|
+
() throws -> [String: AppleWireValue] in
|
|
3821
3956
|
guard let uniffiObj = try? FfiConverterCallbackInterfaceAppleVideoPreSendHook.handleMap.get(handle: uniffiHandle) else {
|
|
3822
3957
|
throw UniffiInternalError.unexpectedStaleHandle
|
|
3823
3958
|
}
|
|
@@ -3825,12 +3960,12 @@ fileprivate struct UniffiCallbackInterfaceAppleVideoPreSendHook {
|
|
|
3825
3960
|
eventName: try FfiConverterString.lift(eventName),
|
|
3826
3961
|
viewId: try FfiConverterUInt64.lift(viewId),
|
|
3827
3962
|
serviceName: try FfiConverterString.lift(serviceName),
|
|
3828
|
-
params: try
|
|
3963
|
+
params: try FfiConverterDictionaryStringTypeAppleWireValue.lift(params)
|
|
3829
3964
|
)
|
|
3830
3965
|
}
|
|
3831
3966
|
|
|
3832
3967
|
|
|
3833
|
-
let writeReturn = { uniffiOutReturn.pointee =
|
|
3968
|
+
let writeReturn = { uniffiOutReturn.pointee = FfiConverterDictionaryStringTypeAppleWireValue.lower($0) }
|
|
3834
3969
|
uniffiTraitInterfaceCall(
|
|
3835
3970
|
callStatus: uniffiCallStatus,
|
|
3836
3971
|
makeCall: makeCall,
|
|
@@ -4346,6 +4481,31 @@ fileprivate struct FfiConverterSequenceTypeAppleRuntimeEventSnapshot: FfiConvert
|
|
|
4346
4481
|
}
|
|
4347
4482
|
}
|
|
4348
4483
|
|
|
4484
|
+
#if swift(>=5.8)
|
|
4485
|
+
@_documentation(visibility: private)
|
|
4486
|
+
#endif
|
|
4487
|
+
fileprivate struct FfiConverterSequenceTypeAppleWireValue: FfiConverterRustBuffer {
|
|
4488
|
+
typealias SwiftType = [AppleWireValue]
|
|
4489
|
+
|
|
4490
|
+
public static func write(_ value: [AppleWireValue], into buf: inout [UInt8]) {
|
|
4491
|
+
let len = Int32(value.count)
|
|
4492
|
+
writeInt(&buf, len)
|
|
4493
|
+
for item in value {
|
|
4494
|
+
FfiConverterTypeAppleWireValue.write(item, into: &buf)
|
|
4495
|
+
}
|
|
4496
|
+
}
|
|
4497
|
+
|
|
4498
|
+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [AppleWireValue] {
|
|
4499
|
+
let len: Int32 = try readInt(&buf)
|
|
4500
|
+
var seq = [AppleWireValue]()
|
|
4501
|
+
seq.reserveCapacity(Int(len))
|
|
4502
|
+
for _ in 0 ..< len {
|
|
4503
|
+
seq.append(try FfiConverterTypeAppleWireValue.read(from: &buf))
|
|
4504
|
+
}
|
|
4505
|
+
return seq
|
|
4506
|
+
}
|
|
4507
|
+
}
|
|
4508
|
+
|
|
4349
4509
|
#if swift(>=5.8)
|
|
4350
4510
|
@_documentation(visibility: private)
|
|
4351
4511
|
#endif
|
|
@@ -4397,6 +4557,32 @@ fileprivate struct FfiConverterDictionaryStringString: FfiConverterRustBuffer {
|
|
|
4397
4557
|
return dict
|
|
4398
4558
|
}
|
|
4399
4559
|
}
|
|
4560
|
+
|
|
4561
|
+
#if swift(>=5.8)
|
|
4562
|
+
@_documentation(visibility: private)
|
|
4563
|
+
#endif
|
|
4564
|
+
fileprivate struct FfiConverterDictionaryStringTypeAppleWireValue: FfiConverterRustBuffer {
|
|
4565
|
+
public static func write(_ value: [String: AppleWireValue], into buf: inout [UInt8]) {
|
|
4566
|
+
let len = Int32(value.count)
|
|
4567
|
+
writeInt(&buf, len)
|
|
4568
|
+
for (key, value) in value {
|
|
4569
|
+
FfiConverterString.write(key, into: &buf)
|
|
4570
|
+
FfiConverterTypeAppleWireValue.write(value, into: &buf)
|
|
4571
|
+
}
|
|
4572
|
+
}
|
|
4573
|
+
|
|
4574
|
+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [String: AppleWireValue] {
|
|
4575
|
+
let len: Int32 = try readInt(&buf)
|
|
4576
|
+
var dict = [String: AppleWireValue]()
|
|
4577
|
+
dict.reserveCapacity(Int(len))
|
|
4578
|
+
for _ in 0..<len {
|
|
4579
|
+
let key = try FfiConverterString.read(from: &buf)
|
|
4580
|
+
let value = try FfiConverterTypeAppleWireValue.read(from: &buf)
|
|
4581
|
+
dict[key] = value
|
|
4582
|
+
}
|
|
4583
|
+
return dict
|
|
4584
|
+
}
|
|
4585
|
+
}
|
|
4400
4586
|
public func forgePluginVersion() -> String {
|
|
4401
4587
|
return try! FfiConverterString.lift(try! rustCall() {
|
|
4402
4588
|
uniffi_forge_kernel_uniffi_fn_func_forge_plugin_version($0
|
|
@@ -4473,6 +4659,9 @@ private let initializationResult: InitializationResult = {
|
|
|
4473
4659
|
if (uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_event() != 32672) {
|
|
4474
4660
|
return InitializationResult.apiChecksumMismatch
|
|
4475
4661
|
}
|
|
4662
|
+
if (uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_record_session_update() != 42476) {
|
|
4663
|
+
return InitializationResult.apiChecksumMismatch
|
|
4664
|
+
}
|
|
4476
4665
|
if (uniffi_forge_kernel_uniffi_checksum_method_forgeruntimebridge_set_auto_connection_type() != 38828) {
|
|
4477
4666
|
return InitializationResult.apiChecksumMismatch
|
|
4478
4667
|
}
|
|
@@ -4518,10 +4707,10 @@ private let initializationResult: InitializationResult = {
|
|
|
4518
4707
|
if (uniffi_forge_kernel_uniffi_checksum_method_appleloglistener_on_log() != 23012) {
|
|
4519
4708
|
return InitializationResult.apiChecksumMismatch
|
|
4520
4709
|
}
|
|
4521
|
-
if (uniffi_forge_kernel_uniffi_checksum_method_applesessionpresendhook_will_send() !=
|
|
4710
|
+
if (uniffi_forge_kernel_uniffi_checksum_method_applesessionpresendhook_will_send() != 42303) {
|
|
4522
4711
|
return InitializationResult.apiChecksumMismatch
|
|
4523
4712
|
}
|
|
4524
|
-
if (uniffi_forge_kernel_uniffi_checksum_method_applevideopresendhook_will_send() !=
|
|
4713
|
+
if (uniffi_forge_kernel_uniffi_checksum_method_applevideopresendhook_will_send() != 47813) {
|
|
4525
4714
|
return InitializationResult.apiChecksumMismatch
|
|
4526
4715
|
}
|
|
4527
4716
|
|
|
@@ -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
|