@forge/bridge
7.1.1-next.77.2.0-next.8
out/cookieConsent/getCookieConsentPreferences.js+
out/cookieConsent/getCookieConsentPreferences.jsNew file+21
Index: package/out/cookieConsent/getCookieConsentPreferences.js
===================================================================
--- package/out/cookieConsent/getCookieConsentPreferences.js
+++ package/out/cookieConsent/getCookieConsentPreferences.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getCookieConsentPreferences = void 0;
+const bridge_1 = require("../bridge");
+const callBridge = (0, bridge_1.getCallBridge)();
+/**
+ * Gets the user's current cookie-consent preferences.
+ *
+ * Resolves to `null` if the host has not published preferences, or if the host doesn't support
+ * this API.
+ */
+const getCookieConsentPreferences = async () => {
+ var _a;
+ try {
+ return (_a = (await callBridge('getCookieConsentPreferences'))) !== null && _a !== void 0 ? _a : null;
+ }
+ catch {
+ return null;
+ }
+};
+exports.getCookieConsentPreferences = getCookieConsentPreferences;