Commit 19fb7ab 1 parent 1c34390 commit 19fb7ab Copy full SHA for 19fb7ab
File tree 1 file changed +17
-0
lines changed
clients/fides-js/src/lib/gpp
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,23 @@ interface FidesStringToConsentArgs {
188
188
fidesString : string ;
189
189
cmpApi : CmpApi ;
190
190
}
191
+
192
+ /**
193
+ * Converts a Fides string to consent preferences and updates the CMP API
194
+ *
195
+ * This function handles both TCF and non-TCF consent scenarios:
196
+ * 1. Decodes the provided Fides string and extracts GPP data
197
+ * 2. Updates the CMP API with the GPP string and sets signal status
198
+ * 3. Maps privacy notices with their translation ID
199
+ * 4. Decodes consent preferences from appropriate CMP API
200
+ * 5. Formats consent preferences to save
201
+ * 6. Calls updateConsentPreferences with the formatted consent preferences
202
+ *
203
+ * @param {FidesStringToConsentArgs } args - The arguments object
204
+ * @param {string } args.fidesString - The encoded Fides consent string containing GPP data
205
+ * @param {CmpApi } args.cmpApi - The GPP CMP API instance to update with consent data
206
+ * @returns {void }
207
+ */
191
208
export const fidesStringToConsent = ( {
192
209
fidesString,
193
210
cmpApi,
You can’t perform that action at this time.
0 commit comments