securiti-consent-sdk 1.132.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/NitroSecuritiConsentSdk.podspec +37 -0
- package/README.md +45 -0
- package/android/CMakeLists.txt +29 -0
- package/android/build.gradle +146 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/securiticonsentsdk/HybridConsentSDK.kt +669 -0
- package/android/src/main/java/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkPackage.java +33 -0
- package/ios/Bridge.h +10 -0
- package/ios/HybridConsentSDK.swift +640 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.cmake +78 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.cpp +48 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JAppPermission.hpp +86 -0
- package/nitrogen/generated/android/c++/JBannerConfig.hpp +194 -0
- package/nitrogen/generated/android/c++/JCmpSDKOptions.hpp +94 -0
- package/nitrogen/generated/android/c++/JCustomColors.hpp +82 -0
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.cpp +277 -0
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.hpp +78 -0
- package/nitrogen/generated/android/c++/JPermissionConsent.hpp +61 -0
- package/nitrogen/generated/android/c++/JPostConsentsRequest.hpp +137 -0
- package/nitrogen/generated/android/c++/JPurpose.hpp +118 -0
- package/nitrogen/generated/android/c++/JPurposeConsent.hpp +65 -0
- package/nitrogen/generated/android/c++/JSDK.hpp +104 -0
- package/nitrogen/generated/android/c++/JSettingsPrompt.hpp +88 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/AppPermission.kt +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/BannerConfig.kt +57 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CmpSDKOptions.kt +36 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CustomColors.kt +33 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Func_void_bool.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/HybridConsentSDKSpec.kt +121 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PermissionConsent.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PostConsentsRequest.kt +37 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Purpose.kt +37 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PurposeConsent.kt +29 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SDK.kt +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SettingsPrompt.kt +30 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.cpp +96 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.hpp +604 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Umbrella.hpp +78 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.hpp +223 -0
- package/nitrogen/generated/ios/swift/AppPermission.swift +267 -0
- package/nitrogen/generated/ios/swift/BannerConfig.swift +918 -0
- package/nitrogen/generated/ios/swift/CmpSDKOptions.swift +217 -0
- package/nitrogen/generated/ios/swift/CustomColors.swift +256 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_BannerConfig_.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_SettingsPrompt_.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AppPermission_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_Purpose_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_SDK_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec.swift +64 -0
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec_cxx.swift +398 -0
- package/nitrogen/generated/ios/swift/PermissionConsent.swift +57 -0
- package/nitrogen/generated/ios/swift/PostConsentsRequest.swift +216 -0
- package/nitrogen/generated/ios/swift/Purpose.swift +354 -0
- package/nitrogen/generated/ios/swift/PurposeConsent.swift +68 -0
- package/nitrogen/generated/ios/swift/SDK.swift +285 -0
- package/nitrogen/generated/ios/swift/SettingsPrompt.swift +181 -0
- package/nitrogen/generated/shared/c++/AppPermission.hpp +102 -0
- package/nitrogen/generated/shared/c++/BannerConfig.hpp +197 -0
- package/nitrogen/generated/shared/c++/CmpSDKOptions.hpp +110 -0
- package/nitrogen/generated/shared/c++/CustomColors.hpp +98 -0
- package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.cpp +37 -0
- package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.hpp +102 -0
- package/nitrogen/generated/shared/c++/PermissionConsent.hpp +77 -0
- package/nitrogen/generated/shared/c++/PostConsentsRequest.hpp +120 -0
- package/nitrogen/generated/shared/c++/Purpose.hpp +117 -0
- package/nitrogen/generated/shared/c++/PurposeConsent.hpp +81 -0
- package/nitrogen/generated/shared/c++/SDK.hpp +103 -0
- package/nitrogen/generated/shared/c++/SettingsPrompt.hpp +87 -0
- package/package.json +107 -0
- package/react-native.config.js +16 -0
- package/src/ConsentSDK.nitro.ts +232 -0
- package/src/index.ts +133 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules'
|
|
2
|
+
|
|
3
|
+
// CmpSDKLoggerLevel (using string for codegen compatibility)
|
|
4
|
+
export type CmpSDKLoggerLevel = string
|
|
5
|
+
|
|
6
|
+
// CmpSDKLoggerLevel constants
|
|
7
|
+
export const LoggerLevel = {
|
|
8
|
+
DEBUG: 'DEBUG' as CmpSDKLoggerLevel,
|
|
9
|
+
INFO: 'INFO' as CmpSDKLoggerLevel,
|
|
10
|
+
WARNING: 'WARNING' as CmpSDKLoggerLevel,
|
|
11
|
+
ERROR: 'ERROR' as CmpSDKLoggerLevel,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Mode enum (using string for codegen compatibility)
|
|
15
|
+
export type Mode = string
|
|
16
|
+
export const ModeValues = {
|
|
17
|
+
DRAFT: 'draft',
|
|
18
|
+
LIVE: 'live',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// CmpSDKOptions
|
|
22
|
+
export interface CmpSDKOptions {
|
|
23
|
+
appURL: string
|
|
24
|
+
cdnURL: string
|
|
25
|
+
tenantID: string
|
|
26
|
+
appID: string
|
|
27
|
+
testingMode: boolean
|
|
28
|
+
loggerLevel: CmpSDKLoggerLevel
|
|
29
|
+
consentsCheckInterval: number
|
|
30
|
+
subjectId?: string
|
|
31
|
+
languageCode?: string
|
|
32
|
+
locationCode?: string
|
|
33
|
+
mode?: Mode
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// ConsentStatus - Using string for compatibility with codegen
|
|
37
|
+
export type ConsentStatus = string
|
|
38
|
+
|
|
39
|
+
// Constants object for reference with the exact values from native SDK
|
|
40
|
+
export const ConsentStatusValues = {
|
|
41
|
+
GRANTED: 'granted' as ConsentStatus,
|
|
42
|
+
DECLINED: 'declined' as ConsentStatus,
|
|
43
|
+
NOT_DETERMINED: 'not_determined' as ConsentStatus,
|
|
44
|
+
WITHDRAWN: 'withdrawn' as ConsentStatus,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Purpose
|
|
48
|
+
export interface Purpose {
|
|
49
|
+
purposeId?: number
|
|
50
|
+
purposeName?: string
|
|
51
|
+
purposeDescription?: string
|
|
52
|
+
sdks?: SDK[]
|
|
53
|
+
consentStatus?: ConsentStatus
|
|
54
|
+
disableOptOut?: boolean
|
|
55
|
+
optOutText?: string
|
|
56
|
+
hideDetails?: boolean
|
|
57
|
+
isGADMapped?: boolean
|
|
58
|
+
gadDescription?: string
|
|
59
|
+
isATTMapped?: boolean
|
|
60
|
+
attDescription? : string
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// AppPermission
|
|
64
|
+
export interface AppPermission {
|
|
65
|
+
id?: number
|
|
66
|
+
name?: string
|
|
67
|
+
permissionId?: string
|
|
68
|
+
description?: string
|
|
69
|
+
group?: string
|
|
70
|
+
groupId?: number
|
|
71
|
+
consentStatus?: ConsentStatus
|
|
72
|
+
nameMap?: string
|
|
73
|
+
isSettingsPromptEnabled?: boolean
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// SDK
|
|
77
|
+
export interface SDK {
|
|
78
|
+
sdkId?: number
|
|
79
|
+
namespaceId?: string
|
|
80
|
+
sdkName?: string
|
|
81
|
+
sdkDescription?: string
|
|
82
|
+
vendor?: string
|
|
83
|
+
logoBase64?: string
|
|
84
|
+
website?: string
|
|
85
|
+
matchedBy?: string[]
|
|
86
|
+
collectingData?: boolean
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Compliance type for banner (using string for codegen compatibility)
|
|
90
|
+
export type ComplianceType = string
|
|
91
|
+
export const ComplianceTypeValues = {
|
|
92
|
+
NOTICE_ONLY: 'notice-only',
|
|
93
|
+
OPT_IN: 'opt-in',
|
|
94
|
+
OPT_OUT: 'opt-out',
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Banner position enum (using string for codegen compatibility)
|
|
98
|
+
export type BannerPosition = string
|
|
99
|
+
export const BannerPositionValues = {
|
|
100
|
+
BOTTOM: 'bottom',
|
|
101
|
+
CENTER: 'center',
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Button shape enum (using string for codegen compatibility)
|
|
105
|
+
export type ButtonShape = string
|
|
106
|
+
export const ButtonShapeValues = {
|
|
107
|
+
ROUNDED: 'rounded',
|
|
108
|
+
SQUARE: 'square',
|
|
109
|
+
PILL: 'pill',
|
|
110
|
+
OUTLINED: 'outlined',
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Custom colors for banner
|
|
114
|
+
export interface CustomColors {
|
|
115
|
+
buttonBackground?: string
|
|
116
|
+
buttonText?: string
|
|
117
|
+
buttonBorder?: string
|
|
118
|
+
bannerBackground?: string
|
|
119
|
+
bannerText?: string
|
|
120
|
+
bannerLinks?: string
|
|
121
|
+
preferenceCenterFooterBackground?: string
|
|
122
|
+
preferenceCenterFooterSelector?: string
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Banner config
|
|
126
|
+
export interface BannerConfig {
|
|
127
|
+
hideCloseButton?: boolean
|
|
128
|
+
hideAcceptButton?: boolean
|
|
129
|
+
embedDSRPortalLink?: boolean
|
|
130
|
+
recordConsentUponAppStart?: boolean
|
|
131
|
+
hideToggleForEssentialCategories?: boolean
|
|
132
|
+
name?: string
|
|
133
|
+
dsrPortalLink?: string
|
|
134
|
+
complianceType?: ComplianceType
|
|
135
|
+
bannerReappearanceTime?: string
|
|
136
|
+
privacyNoticeLink?: string
|
|
137
|
+
accept?: string
|
|
138
|
+
reject?: string
|
|
139
|
+
bannerText?: string
|
|
140
|
+
bannerHeading?: string
|
|
141
|
+
sdkTabHeading?: string
|
|
142
|
+
privacyNoticeText?: string
|
|
143
|
+
preferenceCenterLink?: string
|
|
144
|
+
permissionsTabHeading?: string
|
|
145
|
+
permissionsTabGuidance?: string
|
|
146
|
+
preferenceCenterHeading?: string
|
|
147
|
+
preferenceCenterGuidance?: string
|
|
148
|
+
permissionsTabDescription?: string
|
|
149
|
+
preferenceCenterDescription?: string
|
|
150
|
+
showPoweredBySecuritiLogo?: boolean
|
|
151
|
+
showDescriptionTextWithPrefCenterToggle?: boolean
|
|
152
|
+
paletteTheme?: number
|
|
153
|
+
bannerPosition?: BannerPosition
|
|
154
|
+
buttonShape?: ButtonShape
|
|
155
|
+
companyLogo?: string
|
|
156
|
+
customPaletteTheme?: CustomColors
|
|
157
|
+
shouldShowSettingsPrompt?: boolean
|
|
158
|
+
translations?: Record<string, string>
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Settings prompt for app permissions
|
|
162
|
+
export interface SettingsPrompt {
|
|
163
|
+
promptHeading?: string
|
|
164
|
+
promptMessage?: string
|
|
165
|
+
settingsButtonText?: string
|
|
166
|
+
notNowButtonText?: string
|
|
167
|
+
permissions?: string[]
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Consent posting requests
|
|
171
|
+
export interface PostConsentsRequest {
|
|
172
|
+
uuid: string
|
|
173
|
+
appUUID: string
|
|
174
|
+
device: string
|
|
175
|
+
implicitConsent: boolean
|
|
176
|
+
version: number
|
|
177
|
+
purposeConsents: PurposeConsent[]
|
|
178
|
+
permissions: PermissionConsent[]
|
|
179
|
+
isTestMode: boolean
|
|
180
|
+
adId: string
|
|
181
|
+
bannerInfo: string
|
|
182
|
+
sdkVersion?: string
|
|
183
|
+
platform?: string
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface PurposeConsent {
|
|
187
|
+
purposeID: number
|
|
188
|
+
consentStatus: ConsentStatus
|
|
189
|
+
timestamp: number
|
|
190
|
+
isEssential: boolean
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface PermissionConsent {
|
|
194
|
+
permission: string
|
|
195
|
+
consentStatus: ConsentStatus
|
|
196
|
+
timestamp: number
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Simple objects for setPurposeConsent and setPermissionConsent
|
|
200
|
+
export interface PurposeObject {
|
|
201
|
+
purposeId: number
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface PermissionObject {
|
|
205
|
+
permissionId: string
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface ConsentSDK
|
|
209
|
+
extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
|
|
210
|
+
// Core methods
|
|
211
|
+
initialize(options: CmpSDKOptions): void
|
|
212
|
+
isSdkReady(): boolean
|
|
213
|
+
presentConsentBanner(): void
|
|
214
|
+
presentPreferenceCenter(): void
|
|
215
|
+
isReady(callback: (isReady: boolean) => void): void
|
|
216
|
+
resetConsents(): void
|
|
217
|
+
|
|
218
|
+
// Consent Management
|
|
219
|
+
getConsentByPurposeId(purposeId: number): Promise<string>
|
|
220
|
+
getConsentByPermissionId(permissionId: string): Promise<string>
|
|
221
|
+
getPermissions(): Promise<Array<AppPermission>>
|
|
222
|
+
getPurposes(): Promise<Array<Purpose>>
|
|
223
|
+
getSdksInPurpose(purposeId: number): Promise<Array<SDK>>
|
|
224
|
+
setPurposeConsent(purpose: Purpose, consent: string): boolean
|
|
225
|
+
setPermissionConsent(permission: AppPermission, consent: string): boolean
|
|
226
|
+
|
|
227
|
+
// Configuration
|
|
228
|
+
getBannerConfig(): Promise<BannerConfig | null>
|
|
229
|
+
options(): CmpSDKOptions | null
|
|
230
|
+
getSettingsPrompt(): Promise<SettingsPrompt | null>
|
|
231
|
+
uploadConsents(request: PostConsentsRequest): Promise<boolean>
|
|
232
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { NitroModules } from 'react-native-nitro-modules'
|
|
2
|
+
import type {
|
|
3
|
+
CmpSDKLoggerLevel,
|
|
4
|
+
CmpSDKOptions,
|
|
5
|
+
ConsentSDK,
|
|
6
|
+
ConsentStatus,
|
|
7
|
+
Purpose,
|
|
8
|
+
AppPermission,
|
|
9
|
+
SDK,
|
|
10
|
+
BannerConfig,
|
|
11
|
+
SettingsPrompt,
|
|
12
|
+
PostConsentsRequest,
|
|
13
|
+
ComplianceType,
|
|
14
|
+
BannerPosition,
|
|
15
|
+
ButtonShape,
|
|
16
|
+
CustomColors,
|
|
17
|
+
PurposeConsent,
|
|
18
|
+
PermissionConsent,
|
|
19
|
+
Mode,
|
|
20
|
+
PurposeObject,
|
|
21
|
+
PermissionObject,
|
|
22
|
+
} from './ConsentSDK.nitro'
|
|
23
|
+
|
|
24
|
+
// Export all types and constants
|
|
25
|
+
export type {
|
|
26
|
+
CmpSDKLoggerLevel,
|
|
27
|
+
CmpSDKOptions,
|
|
28
|
+
ConsentStatus,
|
|
29
|
+
Purpose,
|
|
30
|
+
AppPermission,
|
|
31
|
+
SDK,
|
|
32
|
+
BannerConfig,
|
|
33
|
+
SettingsPrompt,
|
|
34
|
+
PostConsentsRequest,
|
|
35
|
+
ComplianceType,
|
|
36
|
+
BannerPosition,
|
|
37
|
+
ButtonShape,
|
|
38
|
+
CustomColors,
|
|
39
|
+
PurposeConsent,
|
|
40
|
+
PermissionConsent,
|
|
41
|
+
Mode,
|
|
42
|
+
PurposeObject,
|
|
43
|
+
PermissionObject,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
LoggerLevel,
|
|
48
|
+
ModeValues,
|
|
49
|
+
ConsentStatusValues,
|
|
50
|
+
ComplianceTypeValues,
|
|
51
|
+
BannerPositionValues,
|
|
52
|
+
ButtonShapeValues,
|
|
53
|
+
} from './ConsentSDK.nitro'
|
|
54
|
+
|
|
55
|
+
// Create the hybrid object
|
|
56
|
+
const ConsentSDKHybridObject =
|
|
57
|
+
NitroModules.createHybridObject<ConsentSDK>('ConsentSDK')
|
|
58
|
+
|
|
59
|
+
// Core methods
|
|
60
|
+
export function initialize(sdkOptions: CmpSDKOptions): void {
|
|
61
|
+
ConsentSDKHybridObject.initialize(sdkOptions)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function presentConsentBanner(): void {
|
|
65
|
+
ConsentSDKHybridObject.presentConsentBanner()
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function presentPreferenceCenter(): void {
|
|
69
|
+
ConsentSDKHybridObject.presentPreferenceCenter()
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function isSdkReady(): boolean {
|
|
73
|
+
return ConsentSDKHybridObject.isSdkReady()
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function isReady(callback: (isReady: boolean) => void): void {
|
|
77
|
+
ConsentSDKHybridObject.isReady(callback)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function resetConsents(): void {
|
|
81
|
+
ConsentSDKHybridObject.resetConsents()
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Consent Management methods
|
|
85
|
+
export function getConsentByPurposeId(purposeId: number): Promise<string> {
|
|
86
|
+
return ConsentSDKHybridObject.getConsentByPurposeId(purposeId)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function getConsentByPermissionId(
|
|
90
|
+
permissionId: string
|
|
91
|
+
): Promise<string> {
|
|
92
|
+
return ConsentSDKHybridObject.getConsentByPermissionId(permissionId)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function getPermissions(): Promise<Array<AppPermission>> {
|
|
96
|
+
return ConsentSDKHybridObject.getPermissions()
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function getPurposes(): Promise<Array<Purpose>> {
|
|
100
|
+
return ConsentSDKHybridObject.getPurposes()
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function getSdksInPurpose(purposeId: number): Promise<Array<SDK>> {
|
|
104
|
+
return ConsentSDKHybridObject.getSdksInPurpose(purposeId)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function setPurposeConsent(purpose: Purpose, consent: string): boolean {
|
|
108
|
+
return ConsentSDKHybridObject.setPurposeConsent(purpose, consent)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function setPermissionConsent(
|
|
112
|
+
permission: AppPermission,
|
|
113
|
+
consent: string
|
|
114
|
+
): boolean {
|
|
115
|
+
return ConsentSDKHybridObject.setPermissionConsent(permission, consent)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Configuration methods
|
|
119
|
+
export function getBannerConfig(): Promise<BannerConfig | null> {
|
|
120
|
+
return ConsentSDKHybridObject.getBannerConfig()
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function options(): CmpSDKOptions | null {
|
|
124
|
+
return ConsentSDKHybridObject.options()
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function getSettingsPrompt(): Promise<SettingsPrompt | null> {
|
|
128
|
+
return ConsentSDKHybridObject.getSettingsPrompt()
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function uploadConsents(request: PostConsentsRequest): Promise<boolean> {
|
|
132
|
+
return ConsentSDKHybridObject.uploadConsents(request)
|
|
133
|
+
}
|