appsprint-react-native 0.2.0 → 1.0.3

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 (43) hide show
  1. package/README.md +173 -68
  2. package/android/build.gradle +4 -2
  3. package/android/libs/appsprint-sdk.aar +0 -0
  4. package/android/src/main/AndroidManifest.xml +2 -0
  5. package/android/src/main/kotlin/com/appsprint/AppSprintBridgeModule.kt +125 -29
  6. package/ios/AppSprintBridge.m +6 -0
  7. package/ios/AppSprintBridge.swift +92 -16
  8. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/AppSprintSDK +0 -0
  9. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Info.plist +0 -0
  10. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.abi.json +4757 -952
  11. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.package.swiftinterface +102 -30
  12. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +102 -30
  13. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  14. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.swiftinterface +102 -30
  15. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/PrivacyInfo.xcprivacy +91 -0
  16. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/AppSprintSDK +0 -0
  17. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Info.plist +0 -0
  18. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +4757 -952
  19. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.package.swiftinterface +102 -30
  20. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +102 -30
  21. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  22. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +102 -30
  23. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +4757 -952
  24. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.package.swiftinterface +102 -30
  25. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +102 -30
  26. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  27. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +102 -30
  28. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/PrivacyInfo.xcprivacy +91 -0
  29. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/_CodeSignature/CodeResources +1 -1
  30. package/lib/commonjs/AppSprint.js +40 -4
  31. package/lib/commonjs/NativeAppSprint.js +15 -3
  32. package/lib/module/AppSprint.js +40 -4
  33. package/lib/module/NativeAppSprint.js +15 -3
  34. package/lib/typescript/AppSprint.d.ts +6 -4
  35. package/lib/typescript/index.d.ts +1 -1
  36. package/lib/typescript/types.d.ts +53 -7
  37. package/package.json +5 -2
  38. package/plugin/build/index.js +37 -10
  39. package/plugin/src/index.ts +44 -1
  40. package/src/AppSprint.ts +85 -10
  41. package/src/NativeAppSprint.ts +15 -3
  42. package/src/index.ts +1 -0
  43. package/src/types.ts +87 -7
@@ -1,16 +1,21 @@
1
1
  // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 6.2.3 effective-5.10 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
3
- // swift-module-flags: -target x86_64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -module-name AppSprintSDK -package-name appsprint_ios
4
- // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.3
2
+ // swift-compiler-version: Apple Swift version 6.3.1 effective-5.10 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
3
+ // swift-module-flags: -target x86_64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -O -enable-experimental-feature DebugDescriptionMacro -module-name AppSprintSDK -package-name appsprint_ios
4
+ // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.1
5
5
  import AdServices
6
6
  import AdSupport
7
7
  import AppTrackingTransparency
8
+ import CryptoKit
8
9
  import Foundation
10
+ import Foundation/*.Bundle*/
11
+ import Foundation/*.ProcessInfo*/
12
+ import Foundation/*.URL*/
9
13
  import Swift
10
14
  import UIKit
11
15
  import _Concurrency
12
16
  import _StringProcessing
13
17
  import _SwiftConcurrencyShims
18
+ import os
14
19
  @_hasMissingDesignatedInitializers @_Concurrency.MainActor final public class AppSprint {
15
20
  @_Concurrency.MainActor public static let shared: AppSprintSDK.AppSprint
16
21
  @_Concurrency.MainActor final public var isInitialized: Swift.Bool {
@@ -18,45 +23,41 @@ import _SwiftConcurrencyShims
18
23
  }
19
24
  @_Concurrency.MainActor public init()
20
25
  @_Concurrency.MainActor final public func configure(_ config: AppSprintSDK.AppSprintConfig) async
21
- #if compiler(>=5.3) && $NonescapableTypes
22
26
  @_Concurrency.MainActor final public func sendEvent(_ eventType: AppSprintSDK.AppSprintEventType, name: Swift.String? = nil, params: [Swift.String : Any]? = nil) async
23
- #endif
24
27
  @_Concurrency.MainActor final public func flush() async
25
28
  @_Concurrency.MainActor final public func clearData()
26
29
  @_Concurrency.MainActor final public func isSdkDisabled() -> Swift.Bool
27
30
  @_Concurrency.MainActor final public func setCustomerUserId(_ userId: Swift.String) async
28
31
  @_Concurrency.MainActor final public func sendTestEvent() async -> AppSprintSDK.TestEventResult
29
- #if compiler(>=5.3) && $NonescapableTypes
30
32
  @_Concurrency.MainActor final public func getAppSprintId() -> Swift.String?
31
- #endif
32
- #if compiler(>=5.3) && $NonescapableTypes
33
33
  @_Concurrency.MainActor final public func getAttribution() -> AppSprintSDK.AttributionResult?
34
- #endif
35
- @_Concurrency.MainActor final public func enableAppleAdsAttribution()
34
+ @_Concurrency.MainActor final public func getAttributionParams() -> [Swift.String : Swift.String]
35
+ @discardableResult
36
+ @_Concurrency.MainActor final public func refreshAttribution() async -> AppSprintSDK.AttributionResult?
37
+ @discardableResult
38
+ @_Concurrency.MainActor final public func enableAppleAdsAttribution() -> Swift.Bool
36
39
  @_Concurrency.MainActor final public func destroy()
37
40
  @objc deinit
38
41
  }
39
42
  public struct AppSprintConfig : Swift.Sendable {
43
+ public static let defaultAPIURL: Foundation.URL
40
44
  public var apiKey: Swift.String
41
45
  public var apiURL: Foundation.URL
42
46
  public var enableAppleAdsAttribution: Swift.Bool
43
47
  public var isDebug: Swift.Bool
44
48
  public var logLevel: AppSprintSDK.AppSprintLogLevel
45
49
  public var customerUserId: Swift.String?
46
- #if compiler(>=5.3) && $NonescapableTypes
47
- public init(apiKey: Swift.String, apiURL: Foundation.URL = URL(string: "https://api.appsprint.app")!, enableAppleAdsAttribution: Swift.Bool = true, isDebug: Swift.Bool = false, logLevel: AppSprintSDK.AppSprintLogLevel = .warn, customerUserId: Swift.String? = nil)
48
- #endif
50
+ public var autoTrackSessions: Swift.Bool
51
+ public var autoRefreshAttribution: Swift.Bool
52
+ public var googleAdsConsent: AppSprintSDK.GoogleAdsConsent?
53
+ public init(apiKey: Swift.String, apiURL: Foundation.URL = AppSprintConfig.defaultAPIURL, enableAppleAdsAttribution: Swift.Bool = true, isDebug: Swift.Bool = false, logLevel: AppSprintSDK.AppSprintLogLevel = .warn, customerUserId: Swift.String? = nil, autoTrackSessions: Swift.Bool = true, autoRefreshAttribution: Swift.Bool = true, googleAdsConsent: AppSprintSDK.GoogleAdsConsent? = nil)
49
54
  }
50
55
  public enum AppSprintNative {
51
56
  @_Concurrency.MainActor public static func getDeviceInfo() -> AppSprintSDK.DeviceInfo
52
- #if compiler(>=5.3) && $NonescapableTypes
53
57
  public static func getAdServicesToken() -> Swift.String?
54
- #endif
55
- public static func requestTrackingAuthorization() async -> Swift.Bool
58
+ @_Concurrency.MainActor public static func requestTrackingAuthorization() async -> Swift.Bool
56
59
  public static func storageSet(_ key: Swift.String, value: Swift.String)
57
- #if compiler(>=5.3) && $NonescapableTypes
58
60
  public static func storageGet(_ key: Swift.String) -> Swift.String?
59
- #endif
60
61
  public static func storageRemove(_ key: Swift.String)
61
62
  }
62
63
  public enum AppSprintLogLevel : Swift.Int, Swift.Codable, Swift.Sendable {
@@ -64,21 +65,21 @@ public enum AppSprintLogLevel : Swift.Int, Swift.Codable, Swift.Sendable {
64
65
  case info
65
66
  case warn
66
67
  case error
67
- #if compiler(>=5.3) && $NonescapableTypes
68
68
  public init?(rawValue: Swift.Int)
69
- #endif
70
69
  public typealias RawValue = Swift.Int
71
70
  public var rawValue: Swift.Int {
72
71
  get
73
72
  }
74
73
  }
75
74
  public enum AppSprintEventType : Swift.String, Swift.Codable, Swift.CaseIterable, Swift.Sendable {
75
+ case sessionStart
76
76
  case login
77
77
  case signUp
78
78
  case register
79
79
  case purchase
80
80
  case subscribe
81
81
  case startTrial
82
+ case addPaymentInfo
82
83
  case addToCart
83
84
  case addToWishlist
84
85
  case initiateCheckout
@@ -87,12 +88,11 @@ public enum AppSprintEventType : Swift.String, Swift.Codable, Swift.CaseIterable
87
88
  case search
88
89
  case share
89
90
  case tutorialComplete
91
+ case achieveLevel
90
92
  case levelStart
91
93
  case levelComplete
92
94
  case custom
93
- #if compiler(>=5.3) && $NonescapableTypes
94
95
  public init?(rawValue: Swift.String)
95
- #endif
96
96
  public typealias AllCases = [AppSprintSDK.AppSprintEventType]
97
97
  public typealias RawValue = Swift.String
98
98
  nonisolated public static var allCases: [AppSprintSDK.AppSprintEventType] {
@@ -102,23 +102,72 @@ public enum AppSprintEventType : Swift.String, Swift.Codable, Swift.CaseIterable
102
102
  get
103
103
  }
104
104
  }
105
+ public enum AppSprintAttStatus : Swift.String, Swift.Codable, Swift.Sendable {
106
+ case notDetermined
107
+ case restricted
108
+ case denied
109
+ case authorized
110
+ public init?(rawValue: Swift.String)
111
+ public typealias RawValue = Swift.String
112
+ public var rawValue: Swift.String {
113
+ get
114
+ }
115
+ }
116
+ public struct AttributionLink : Swift.Codable, Swift.Equatable, Swift.Sendable {
117
+ public let id: Swift.String
118
+ public let name: Swift.String
119
+ public static func == (a: AppSprintSDK.AttributionLink, b: AppSprintSDK.AttributionLink) -> Swift.Bool
120
+ public func encode(to encoder: any Swift.Encoder) throws
121
+ public init(from decoder: any Swift.Decoder) throws
122
+ }
123
+ public struct AppleAdsAttribution : Swift.Codable, Swift.Equatable, Swift.Sendable {
124
+ public let campaignId: Swift.String
125
+ public let orgId: Swift.String?
126
+ public let adGroupId: Swift.String?
127
+ public let keywordId: Swift.String?
128
+ public let adId: Swift.String?
129
+ public let countryOrRegion: Swift.String?
130
+ public let claimType: Swift.String?
131
+ public let clickDate: Swift.String?
132
+ public let impressionDate: Swift.String?
133
+ public let conversionType: Swift.String?
134
+ public let supplyPlacement: Swift.String?
135
+ public init(campaignId: Swift.String, orgId: Swift.String? = nil, adGroupId: Swift.String? = nil, keywordId: Swift.String? = nil, adId: Swift.String? = nil, countryOrRegion: Swift.String? = nil, claimType: Swift.String? = nil, clickDate: Swift.String? = nil, impressionDate: Swift.String? = nil, conversionType: Swift.String? = nil, supplyPlacement: Swift.String? = nil)
136
+ public static func == (a: AppSprintSDK.AppleAdsAttribution, b: AppSprintSDK.AppleAdsAttribution) -> Swift.Bool
137
+ public func encode(to encoder: any Swift.Encoder) throws
138
+ public init(from decoder: any Swift.Decoder) throws
139
+ }
105
140
  public struct AttributionResult : Swift.Codable, Swift.Equatable, Swift.Sendable {
106
- public let source: Swift.String
107
- public let confidence: Swift.Double
108
- public let campaignName: Swift.String?
141
+ public let isAttributed: Swift.Bool
142
+ public let matchType: Swift.String?
143
+ public let link: AppSprintSDK.AttributionLink?
144
+ public let appleAds: AppSprintSDK.AppleAdsAttribution?
109
145
  public let utmSource: Swift.String?
110
146
  public let utmMedium: Swift.String?
111
147
  public let utmCampaign: Swift.String?
112
- #if compiler(>=5.3) && $NonescapableTypes
148
+ public let utmContent: Swift.String?
149
+ public let utmTerm: Swift.String?
150
+ public var source: Swift.String {
151
+ get
152
+ }
153
+ public var confidence: Swift.Double {
154
+ get
155
+ }
156
+ public var campaignName: Swift.String? {
157
+ get
158
+ }
113
159
  public init(source: Swift.String, confidence: Swift.Double, campaignName: Swift.String? = nil, utmSource: Swift.String? = nil, utmMedium: Swift.String? = nil, utmCampaign: Swift.String? = nil)
114
- #endif
160
+ public init(isAttributed: Swift.Bool, source: Swift.String? = nil, matchType: Swift.String? = nil, link: AppSprintSDK.AttributionLink? = nil, appleAds: AppSprintSDK.AppleAdsAttribution? = nil, utmSource: Swift.String? = nil, utmMedium: Swift.String? = nil, utmCampaign: Swift.String? = nil, utmContent: Swift.String? = nil, utmTerm: Swift.String? = nil)
115
161
  public static func == (a: AppSprintSDK.AttributionResult, b: AppSprintSDK.AttributionResult) -> Swift.Bool
116
162
  public func encode(to encoder: any Swift.Encoder) throws
117
163
  public init(from decoder: any Swift.Decoder) throws
118
164
  }
119
165
  public struct InstallResponse : Swift.Codable, Swift.Sendable {
120
166
  public let appsprintId: Swift.String
167
+ public let installId: Swift.String?
121
168
  public let attribution: AppSprintSDK.AttributionResult
169
+ public let attributionParams: [Swift.String : Swift.String]?
170
+ public init(appsprintId: Swift.String, installId: Swift.String? = nil, attribution: AppSprintSDK.AttributionResult, attributionParams: [Swift.String : Swift.String]? = nil)
122
171
  public func encode(to encoder: any Swift.Encoder) throws
123
172
  public init(from decoder: any Swift.Decoder) throws
124
173
  }
@@ -135,16 +184,33 @@ public struct DeviceInfo : Swift.Codable, Swift.Equatable, Swift.Sendable {
135
184
  public let locale: Swift.String?
136
185
  public let timezone: Swift.String?
137
186
  public let osVersion: Swift.String?
187
+ public let appVersion: Swift.String?
138
188
  public let idfv: Swift.String?
139
189
  public let idfa: Swift.String?
140
190
  public let adServicesToken: Swift.String?
141
- #if compiler(>=5.3) && $NonescapableTypes
142
- public init(deviceModel: Swift.String? = nil, screenWidth: Swift.Int? = nil, screenHeight: Swift.Int? = nil, locale: Swift.String? = nil, timezone: Swift.String? = nil, osVersion: Swift.String? = nil, idfv: Swift.String? = nil, idfa: Swift.String? = nil, adServicesToken: Swift.String? = nil)
143
- #endif
191
+ public let attStatus: AppSprintSDK.AppSprintAttStatus?
192
+ public init(deviceModel: Swift.String? = nil, screenWidth: Swift.Int? = nil, screenHeight: Swift.Int? = nil, locale: Swift.String? = nil, timezone: Swift.String? = nil, osVersion: Swift.String? = nil, appVersion: Swift.String? = nil, idfv: Swift.String? = nil, idfa: Swift.String? = nil, adServicesToken: Swift.String? = nil, attStatus: AppSprintSDK.AppSprintAttStatus? = nil)
144
193
  public static func == (a: AppSprintSDK.DeviceInfo, b: AppSprintSDK.DeviceInfo) -> Swift.Bool
145
194
  public func encode(to encoder: any Swift.Encoder) throws
146
195
  public init(from decoder: any Swift.Decoder) throws
147
196
  }
197
+ public enum GoogleAdsConsentStatus : Swift.String, Swift.Codable, Swift.Sendable {
198
+ case granted
199
+ case denied
200
+ case unspecified
201
+ public init?(rawValue: Swift.String)
202
+ public typealias RawValue = Swift.String
203
+ public var rawValue: Swift.String {
204
+ get
205
+ }
206
+ }
207
+ public struct GoogleAdsConsent : Swift.Codable, Swift.Equatable, Swift.Sendable {
208
+ public let adUserData: AppSprintSDK.GoogleAdsConsentStatus
209
+ public init(adUserData: AppSprintSDK.GoogleAdsConsentStatus)
210
+ public static func == (a: AppSprintSDK.GoogleAdsConsent, b: AppSprintSDK.GoogleAdsConsent) -> Swift.Bool
211
+ public func encode(to encoder: any Swift.Encoder) throws
212
+ public init(from decoder: any Swift.Decoder) throws
213
+ }
148
214
  public struct AnyCodable : Swift.Codable, Swift.Equatable, Swift.Sendable {
149
215
  public let value: AppSprintSDK.AnySendable
150
216
  public init(_ value: some Sendable)
@@ -157,9 +223,15 @@ public struct AnySendable : @unchecked Swift.Sendable, Swift.Equatable {
157
223
  public static func == (lhs: AppSprintSDK.AnySendable, rhs: AppSprintSDK.AnySendable) -> Swift.Bool
158
224
  }
159
225
  extension AppSprintSDK.AppSprint : Swift.Sendable {}
226
+ extension AppSprintSDK.AppSprintAttStatus : Swift.Equatable {}
227
+ extension AppSprintSDK.AppSprintAttStatus : Swift.Hashable {}
228
+ extension AppSprintSDK.AppSprintAttStatus : Swift.RawRepresentable {}
160
229
  extension AppSprintSDK.AppSprintLogLevel : Swift.Equatable {}
161
230
  extension AppSprintSDK.AppSprintLogLevel : Swift.Hashable {}
162
231
  extension AppSprintSDK.AppSprintLogLevel : Swift.RawRepresentable {}
163
232
  extension AppSprintSDK.AppSprintEventType : Swift.Equatable {}
164
233
  extension AppSprintSDK.AppSprintEventType : Swift.Hashable {}
165
234
  extension AppSprintSDK.AppSprintEventType : Swift.RawRepresentable {}
235
+ extension AppSprintSDK.GoogleAdsConsentStatus : Swift.Equatable {}
236
+ extension AppSprintSDK.GoogleAdsConsentStatus : Swift.Hashable {}
237
+ extension AppSprintSDK.GoogleAdsConsentStatus : Swift.RawRepresentable {}
@@ -1,16 +1,21 @@
1
1
  // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 6.2.3 effective-5.10 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
3
- // swift-module-flags: -target x86_64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -module-name AppSprintSDK -package-name appsprint_ios
4
- // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.3
2
+ // swift-compiler-version: Apple Swift version 6.3.1 effective-5.10 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
3
+ // swift-module-flags: -target x86_64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -O -enable-experimental-feature DebugDescriptionMacro -module-name AppSprintSDK -package-name appsprint_ios
4
+ // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.1
5
5
  import AdServices
6
6
  import AdSupport
7
7
  import AppTrackingTransparency
8
+ import CryptoKit
8
9
  import Foundation
10
+ import Foundation/*.Bundle*/
11
+ import Foundation/*.ProcessInfo*/
12
+ import Foundation/*.URL*/
9
13
  import Swift
10
14
  import UIKit
11
15
  import _Concurrency
12
16
  import _StringProcessing
13
17
  import _SwiftConcurrencyShims
18
+ import os
14
19
  @_hasMissingDesignatedInitializers @_Concurrency.MainActor final public class AppSprint {
15
20
  @_Concurrency.MainActor public static let shared: AppSprintSDK.AppSprint
16
21
  @_Concurrency.MainActor final public var isInitialized: Swift.Bool {
@@ -18,45 +23,41 @@ import _SwiftConcurrencyShims
18
23
  }
19
24
  @_Concurrency.MainActor public init()
20
25
  @_Concurrency.MainActor final public func configure(_ config: AppSprintSDK.AppSprintConfig) async
21
- #if compiler(>=5.3) && $NonescapableTypes
22
26
  @_Concurrency.MainActor final public func sendEvent(_ eventType: AppSprintSDK.AppSprintEventType, name: Swift.String? = nil, params: [Swift.String : Any]? = nil) async
23
- #endif
24
27
  @_Concurrency.MainActor final public func flush() async
25
28
  @_Concurrency.MainActor final public func clearData()
26
29
  @_Concurrency.MainActor final public func isSdkDisabled() -> Swift.Bool
27
30
  @_Concurrency.MainActor final public func setCustomerUserId(_ userId: Swift.String) async
28
31
  @_Concurrency.MainActor final public func sendTestEvent() async -> AppSprintSDK.TestEventResult
29
- #if compiler(>=5.3) && $NonescapableTypes
30
32
  @_Concurrency.MainActor final public func getAppSprintId() -> Swift.String?
31
- #endif
32
- #if compiler(>=5.3) && $NonescapableTypes
33
33
  @_Concurrency.MainActor final public func getAttribution() -> AppSprintSDK.AttributionResult?
34
- #endif
35
- @_Concurrency.MainActor final public func enableAppleAdsAttribution()
34
+ @_Concurrency.MainActor final public func getAttributionParams() -> [Swift.String : Swift.String]
35
+ @discardableResult
36
+ @_Concurrency.MainActor final public func refreshAttribution() async -> AppSprintSDK.AttributionResult?
37
+ @discardableResult
38
+ @_Concurrency.MainActor final public func enableAppleAdsAttribution() -> Swift.Bool
36
39
  @_Concurrency.MainActor final public func destroy()
37
40
  @objc deinit
38
41
  }
39
42
  public struct AppSprintConfig : Swift.Sendable {
43
+ public static let defaultAPIURL: Foundation.URL
40
44
  public var apiKey: Swift.String
41
45
  public var apiURL: Foundation.URL
42
46
  public var enableAppleAdsAttribution: Swift.Bool
43
47
  public var isDebug: Swift.Bool
44
48
  public var logLevel: AppSprintSDK.AppSprintLogLevel
45
49
  public var customerUserId: Swift.String?
46
- #if compiler(>=5.3) && $NonescapableTypes
47
- public init(apiKey: Swift.String, apiURL: Foundation.URL = URL(string: "https://api.appsprint.app")!, enableAppleAdsAttribution: Swift.Bool = true, isDebug: Swift.Bool = false, logLevel: AppSprintSDK.AppSprintLogLevel = .warn, customerUserId: Swift.String? = nil)
48
- #endif
50
+ public var autoTrackSessions: Swift.Bool
51
+ public var autoRefreshAttribution: Swift.Bool
52
+ public var googleAdsConsent: AppSprintSDK.GoogleAdsConsent?
53
+ public init(apiKey: Swift.String, apiURL: Foundation.URL = AppSprintConfig.defaultAPIURL, enableAppleAdsAttribution: Swift.Bool = true, isDebug: Swift.Bool = false, logLevel: AppSprintSDK.AppSprintLogLevel = .warn, customerUserId: Swift.String? = nil, autoTrackSessions: Swift.Bool = true, autoRefreshAttribution: Swift.Bool = true, googleAdsConsent: AppSprintSDK.GoogleAdsConsent? = nil)
49
54
  }
50
55
  public enum AppSprintNative {
51
56
  @_Concurrency.MainActor public static func getDeviceInfo() -> AppSprintSDK.DeviceInfo
52
- #if compiler(>=5.3) && $NonescapableTypes
53
57
  public static func getAdServicesToken() -> Swift.String?
54
- #endif
55
- public static func requestTrackingAuthorization() async -> Swift.Bool
58
+ @_Concurrency.MainActor public static func requestTrackingAuthorization() async -> Swift.Bool
56
59
  public static func storageSet(_ key: Swift.String, value: Swift.String)
57
- #if compiler(>=5.3) && $NonescapableTypes
58
60
  public static func storageGet(_ key: Swift.String) -> Swift.String?
59
- #endif
60
61
  public static func storageRemove(_ key: Swift.String)
61
62
  }
62
63
  public enum AppSprintLogLevel : Swift.Int, Swift.Codable, Swift.Sendable {
@@ -64,21 +65,21 @@ public enum AppSprintLogLevel : Swift.Int, Swift.Codable, Swift.Sendable {
64
65
  case info
65
66
  case warn
66
67
  case error
67
- #if compiler(>=5.3) && $NonescapableTypes
68
68
  public init?(rawValue: Swift.Int)
69
- #endif
70
69
  public typealias RawValue = Swift.Int
71
70
  public var rawValue: Swift.Int {
72
71
  get
73
72
  }
74
73
  }
75
74
  public enum AppSprintEventType : Swift.String, Swift.Codable, Swift.CaseIterable, Swift.Sendable {
75
+ case sessionStart
76
76
  case login
77
77
  case signUp
78
78
  case register
79
79
  case purchase
80
80
  case subscribe
81
81
  case startTrial
82
+ case addPaymentInfo
82
83
  case addToCart
83
84
  case addToWishlist
84
85
  case initiateCheckout
@@ -87,12 +88,11 @@ public enum AppSprintEventType : Swift.String, Swift.Codable, Swift.CaseIterable
87
88
  case search
88
89
  case share
89
90
  case tutorialComplete
91
+ case achieveLevel
90
92
  case levelStart
91
93
  case levelComplete
92
94
  case custom
93
- #if compiler(>=5.3) && $NonescapableTypes
94
95
  public init?(rawValue: Swift.String)
95
- #endif
96
96
  public typealias AllCases = [AppSprintSDK.AppSprintEventType]
97
97
  public typealias RawValue = Swift.String
98
98
  nonisolated public static var allCases: [AppSprintSDK.AppSprintEventType] {
@@ -102,23 +102,72 @@ public enum AppSprintEventType : Swift.String, Swift.Codable, Swift.CaseIterable
102
102
  get
103
103
  }
104
104
  }
105
+ public enum AppSprintAttStatus : Swift.String, Swift.Codable, Swift.Sendable {
106
+ case notDetermined
107
+ case restricted
108
+ case denied
109
+ case authorized
110
+ public init?(rawValue: Swift.String)
111
+ public typealias RawValue = Swift.String
112
+ public var rawValue: Swift.String {
113
+ get
114
+ }
115
+ }
116
+ public struct AttributionLink : Swift.Codable, Swift.Equatable, Swift.Sendable {
117
+ public let id: Swift.String
118
+ public let name: Swift.String
119
+ public static func == (a: AppSprintSDK.AttributionLink, b: AppSprintSDK.AttributionLink) -> Swift.Bool
120
+ public func encode(to encoder: any Swift.Encoder) throws
121
+ public init(from decoder: any Swift.Decoder) throws
122
+ }
123
+ public struct AppleAdsAttribution : Swift.Codable, Swift.Equatable, Swift.Sendable {
124
+ public let campaignId: Swift.String
125
+ public let orgId: Swift.String?
126
+ public let adGroupId: Swift.String?
127
+ public let keywordId: Swift.String?
128
+ public let adId: Swift.String?
129
+ public let countryOrRegion: Swift.String?
130
+ public let claimType: Swift.String?
131
+ public let clickDate: Swift.String?
132
+ public let impressionDate: Swift.String?
133
+ public let conversionType: Swift.String?
134
+ public let supplyPlacement: Swift.String?
135
+ public init(campaignId: Swift.String, orgId: Swift.String? = nil, adGroupId: Swift.String? = nil, keywordId: Swift.String? = nil, adId: Swift.String? = nil, countryOrRegion: Swift.String? = nil, claimType: Swift.String? = nil, clickDate: Swift.String? = nil, impressionDate: Swift.String? = nil, conversionType: Swift.String? = nil, supplyPlacement: Swift.String? = nil)
136
+ public static func == (a: AppSprintSDK.AppleAdsAttribution, b: AppSprintSDK.AppleAdsAttribution) -> Swift.Bool
137
+ public func encode(to encoder: any Swift.Encoder) throws
138
+ public init(from decoder: any Swift.Decoder) throws
139
+ }
105
140
  public struct AttributionResult : Swift.Codable, Swift.Equatable, Swift.Sendable {
106
- public let source: Swift.String
107
- public let confidence: Swift.Double
108
- public let campaignName: Swift.String?
141
+ public let isAttributed: Swift.Bool
142
+ public let matchType: Swift.String?
143
+ public let link: AppSprintSDK.AttributionLink?
144
+ public let appleAds: AppSprintSDK.AppleAdsAttribution?
109
145
  public let utmSource: Swift.String?
110
146
  public let utmMedium: Swift.String?
111
147
  public let utmCampaign: Swift.String?
112
- #if compiler(>=5.3) && $NonescapableTypes
148
+ public let utmContent: Swift.String?
149
+ public let utmTerm: Swift.String?
150
+ public var source: Swift.String {
151
+ get
152
+ }
153
+ public var confidence: Swift.Double {
154
+ get
155
+ }
156
+ public var campaignName: Swift.String? {
157
+ get
158
+ }
113
159
  public init(source: Swift.String, confidence: Swift.Double, campaignName: Swift.String? = nil, utmSource: Swift.String? = nil, utmMedium: Swift.String? = nil, utmCampaign: Swift.String? = nil)
114
- #endif
160
+ public init(isAttributed: Swift.Bool, source: Swift.String? = nil, matchType: Swift.String? = nil, link: AppSprintSDK.AttributionLink? = nil, appleAds: AppSprintSDK.AppleAdsAttribution? = nil, utmSource: Swift.String? = nil, utmMedium: Swift.String? = nil, utmCampaign: Swift.String? = nil, utmContent: Swift.String? = nil, utmTerm: Swift.String? = nil)
115
161
  public static func == (a: AppSprintSDK.AttributionResult, b: AppSprintSDK.AttributionResult) -> Swift.Bool
116
162
  public func encode(to encoder: any Swift.Encoder) throws
117
163
  public init(from decoder: any Swift.Decoder) throws
118
164
  }
119
165
  public struct InstallResponse : Swift.Codable, Swift.Sendable {
120
166
  public let appsprintId: Swift.String
167
+ public let installId: Swift.String?
121
168
  public let attribution: AppSprintSDK.AttributionResult
169
+ public let attributionParams: [Swift.String : Swift.String]?
170
+ public init(appsprintId: Swift.String, installId: Swift.String? = nil, attribution: AppSprintSDK.AttributionResult, attributionParams: [Swift.String : Swift.String]? = nil)
122
171
  public func encode(to encoder: any Swift.Encoder) throws
123
172
  public init(from decoder: any Swift.Decoder) throws
124
173
  }
@@ -135,16 +184,33 @@ public struct DeviceInfo : Swift.Codable, Swift.Equatable, Swift.Sendable {
135
184
  public let locale: Swift.String?
136
185
  public let timezone: Swift.String?
137
186
  public let osVersion: Swift.String?
187
+ public let appVersion: Swift.String?
138
188
  public let idfv: Swift.String?
139
189
  public let idfa: Swift.String?
140
190
  public let adServicesToken: Swift.String?
141
- #if compiler(>=5.3) && $NonescapableTypes
142
- public init(deviceModel: Swift.String? = nil, screenWidth: Swift.Int? = nil, screenHeight: Swift.Int? = nil, locale: Swift.String? = nil, timezone: Swift.String? = nil, osVersion: Swift.String? = nil, idfv: Swift.String? = nil, idfa: Swift.String? = nil, adServicesToken: Swift.String? = nil)
143
- #endif
191
+ public let attStatus: AppSprintSDK.AppSprintAttStatus?
192
+ public init(deviceModel: Swift.String? = nil, screenWidth: Swift.Int? = nil, screenHeight: Swift.Int? = nil, locale: Swift.String? = nil, timezone: Swift.String? = nil, osVersion: Swift.String? = nil, appVersion: Swift.String? = nil, idfv: Swift.String? = nil, idfa: Swift.String? = nil, adServicesToken: Swift.String? = nil, attStatus: AppSprintSDK.AppSprintAttStatus? = nil)
144
193
  public static func == (a: AppSprintSDK.DeviceInfo, b: AppSprintSDK.DeviceInfo) -> Swift.Bool
145
194
  public func encode(to encoder: any Swift.Encoder) throws
146
195
  public init(from decoder: any Swift.Decoder) throws
147
196
  }
197
+ public enum GoogleAdsConsentStatus : Swift.String, Swift.Codable, Swift.Sendable {
198
+ case granted
199
+ case denied
200
+ case unspecified
201
+ public init?(rawValue: Swift.String)
202
+ public typealias RawValue = Swift.String
203
+ public var rawValue: Swift.String {
204
+ get
205
+ }
206
+ }
207
+ public struct GoogleAdsConsent : Swift.Codable, Swift.Equatable, Swift.Sendable {
208
+ public let adUserData: AppSprintSDK.GoogleAdsConsentStatus
209
+ public init(adUserData: AppSprintSDK.GoogleAdsConsentStatus)
210
+ public static func == (a: AppSprintSDK.GoogleAdsConsent, b: AppSprintSDK.GoogleAdsConsent) -> Swift.Bool
211
+ public func encode(to encoder: any Swift.Encoder) throws
212
+ public init(from decoder: any Swift.Decoder) throws
213
+ }
148
214
  public struct AnyCodable : Swift.Codable, Swift.Equatable, Swift.Sendable {
149
215
  public let value: AppSprintSDK.AnySendable
150
216
  public init(_ value: some Sendable)
@@ -157,9 +223,15 @@ public struct AnySendable : @unchecked Swift.Sendable, Swift.Equatable {
157
223
  public static func == (lhs: AppSprintSDK.AnySendable, rhs: AppSprintSDK.AnySendable) -> Swift.Bool
158
224
  }
159
225
  extension AppSprintSDK.AppSprint : Swift.Sendable {}
226
+ extension AppSprintSDK.AppSprintAttStatus : Swift.Equatable {}
227
+ extension AppSprintSDK.AppSprintAttStatus : Swift.Hashable {}
228
+ extension AppSprintSDK.AppSprintAttStatus : Swift.RawRepresentable {}
160
229
  extension AppSprintSDK.AppSprintLogLevel : Swift.Equatable {}
161
230
  extension AppSprintSDK.AppSprintLogLevel : Swift.Hashable {}
162
231
  extension AppSprintSDK.AppSprintLogLevel : Swift.RawRepresentable {}
163
232
  extension AppSprintSDK.AppSprintEventType : Swift.Equatable {}
164
233
  extension AppSprintSDK.AppSprintEventType : Swift.Hashable {}
165
234
  extension AppSprintSDK.AppSprintEventType : Swift.RawRepresentable {}
235
+ extension AppSprintSDK.GoogleAdsConsentStatus : Swift.Equatable {}
236
+ extension AppSprintSDK.GoogleAdsConsentStatus : Swift.Hashable {}
237
+ extension AppSprintSDK.GoogleAdsConsentStatus : Swift.RawRepresentable {}