@contentful/optimization-core 0.1.0-alpha7 → 0.1.0-alpha9
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/README.md +221 -31
- package/dist/260.mjs +14 -0
- package/dist/260.mjs.map +1 -0
- package/dist/499.mjs +4 -0
- package/dist/632.mjs +5 -0
- package/dist/632.mjs.map +1 -0
- package/dist/808.mjs +2 -0
- package/dist/942.mjs +2 -0
- package/dist/api-client.cjs +60 -0
- package/dist/api-client.cjs.map +1 -0
- package/dist/api-client.d.cts +4 -0
- package/dist/api-client.d.mts +4 -0
- package/dist/api-client.d.ts +4 -0
- package/dist/api-client.mjs +2 -0
- package/dist/api-schemas.cjs +60 -0
- package/dist/api-schemas.cjs.map +1 -0
- package/dist/api-schemas.d.cts +4 -0
- package/dist/api-schemas.d.mts +4 -0
- package/dist/api-schemas.d.ts +4 -0
- package/dist/api-schemas.mjs +2 -0
- package/dist/constants.cjs +78 -0
- package/dist/constants.cjs.map +1 -0
- package/dist/{global-constants.d.ts → constants.d.cts} +88 -67
- package/dist/{global-constants.js → constants.d.mts} +88 -69
- package/dist/constants.d.ts +88 -0
- package/dist/constants.mjs +1 -0
- package/dist/index.cjs +1833 -1706
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2432 -0
- package/dist/index.d.mts +2432 -0
- package/dist/index.d.ts +2432 -15
- package/dist/index.mjs +617 -341
- package/dist/index.mjs.map +1 -1
- package/dist/logger.cjs +67 -0
- package/dist/logger.cjs.map +1 -0
- package/dist/logger.d.cts +8 -0
- package/dist/logger.d.mts +8 -0
- package/dist/logger.d.ts +8 -0
- package/dist/logger.mjs +2 -0
- package/dist/symbols.cjs +42 -0
- package/dist/symbols.cjs.map +1 -0
- package/dist/symbols.d.cts +10 -0
- package/dist/symbols.d.mts +10 -0
- package/dist/symbols.d.ts +10 -0
- package/dist/symbols.mjs +1 -0
- package/package.json +65 -12
- package/dist/Consent.d.ts +0 -44
- package/dist/Consent.d.ts.map +0 -1
- package/dist/Consent.js +0 -2
- package/dist/Consent.js.map +0 -1
- package/dist/CoreBase.d.ts +0 -161
- package/dist/CoreBase.d.ts.map +0 -1
- package/dist/CoreBase.js +0 -151
- package/dist/CoreBase.js.map +0 -1
- package/dist/CoreStateful.d.ts +0 -144
- package/dist/CoreStateful.d.ts.map +0 -1
- package/dist/CoreStateful.js +0 -141
- package/dist/CoreStateful.js.map +0 -1
- package/dist/CoreStateless.d.ts +0 -53
- package/dist/CoreStateless.d.ts.map +0 -1
- package/dist/CoreStateless.js +0 -43
- package/dist/CoreStateless.js.map +0 -1
- package/dist/ProductBase.d.ts +0 -83
- package/dist/ProductBase.d.ts.map +0 -1
- package/dist/ProductBase.js +0 -50
- package/dist/ProductBase.js.map +0 -1
- package/dist/analytics/AnalyticsBase.d.ts +0 -35
- package/dist/analytics/AnalyticsBase.d.ts.map +0 -1
- package/dist/analytics/AnalyticsBase.js +0 -13
- package/dist/analytics/AnalyticsBase.js.map +0 -1
- package/dist/analytics/AnalyticsStateful.d.ts +0 -138
- package/dist/analytics/AnalyticsStateful.d.ts.map +0 -1
- package/dist/analytics/AnalyticsStateful.js +0 -179
- package/dist/analytics/AnalyticsStateful.js.map +0 -1
- package/dist/analytics/AnalyticsStateless.d.ts +0 -48
- package/dist/analytics/AnalyticsStateless.d.ts.map +0 -1
- package/dist/analytics/AnalyticsStateless.js +0 -61
- package/dist/analytics/AnalyticsStateless.js.map +0 -1
- package/dist/analytics/index.d.ts +0 -5
- package/dist/analytics/index.d.ts.map +0 -1
- package/dist/analytics/index.js +0 -5
- package/dist/analytics/index.js.map +0 -1
- package/dist/global-constants.d.ts.map +0 -1
- package/dist/global-constants.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -15
- package/dist/index.js.map +0 -1
- package/dist/lib/decorators/guardedBy.d.ts +0 -113
- package/dist/lib/decorators/guardedBy.d.ts.map +0 -1
- package/dist/lib/decorators/guardedBy.js +0 -143
- package/dist/lib/decorators/guardedBy.js.map +0 -1
- package/dist/lib/decorators/index.d.ts +0 -2
- package/dist/lib/decorators/index.d.ts.map +0 -1
- package/dist/lib/decorators/index.js +0 -2
- package/dist/lib/decorators/index.js.map +0 -1
- package/dist/lib/interceptor/InterceptorManager.d.ts +0 -127
- package/dist/lib/interceptor/InterceptorManager.d.ts.map +0 -1
- package/dist/lib/interceptor/InterceptorManager.js +0 -125
- package/dist/lib/interceptor/InterceptorManager.js.map +0 -1
- package/dist/lib/interceptor/index.d.ts +0 -2
- package/dist/lib/interceptor/index.d.ts.map +0 -1
- package/dist/lib/interceptor/index.js +0 -2
- package/dist/lib/interceptor/index.js.map +0 -1
- package/dist/lib/value-presence/ValuePresence.d.ts +0 -123
- package/dist/lib/value-presence/ValuePresence.d.ts.map +0 -1
- package/dist/lib/value-presence/ValuePresence.js +0 -141
- package/dist/lib/value-presence/ValuePresence.js.map +0 -1
- package/dist/lib/value-presence/index.d.ts +0 -2
- package/dist/lib/value-presence/index.d.ts.map +0 -1
- package/dist/lib/value-presence/index.js +0 -2
- package/dist/lib/value-presence/index.js.map +0 -1
- package/dist/personalization/PersonalizationBase.d.ts +0 -184
- package/dist/personalization/PersonalizationBase.d.ts.map +0 -1
- package/dist/personalization/PersonalizationBase.js +0 -76
- package/dist/personalization/PersonalizationBase.js.map +0 -1
- package/dist/personalization/PersonalizationStateful.d.ts +0 -226
- package/dist/personalization/PersonalizationStateful.d.ts.map +0 -1
- package/dist/personalization/PersonalizationStateful.js +0 -297
- package/dist/personalization/PersonalizationStateful.js.map +0 -1
- package/dist/personalization/PersonalizationStateless.d.ts +0 -74
- package/dist/personalization/PersonalizationStateless.d.ts.map +0 -1
- package/dist/personalization/PersonalizationStateless.js +0 -98
- package/dist/personalization/PersonalizationStateless.js.map +0 -1
- package/dist/personalization/index.d.ts +0 -6
- package/dist/personalization/index.d.ts.map +0 -1
- package/dist/personalization/index.js +0 -6
- package/dist/personalization/index.js.map +0 -1
- package/dist/personalization/resolvers/FlagsResolver.d.ts +0 -35
- package/dist/personalization/resolvers/FlagsResolver.d.ts.map +0 -1
- package/dist/personalization/resolvers/FlagsResolver.js +0 -47
- package/dist/personalization/resolvers/FlagsResolver.js.map +0 -1
- package/dist/personalization/resolvers/MergeTagValueResolver.d.ts +0 -74
- package/dist/personalization/resolvers/MergeTagValueResolver.d.ts.map +0 -1
- package/dist/personalization/resolvers/MergeTagValueResolver.js +0 -109
- package/dist/personalization/resolvers/MergeTagValueResolver.js.map +0 -1
- package/dist/personalization/resolvers/PersonalizedEntryResolver.d.ts +0 -142
- package/dist/personalization/resolvers/PersonalizedEntryResolver.d.ts.map +0 -1
- package/dist/personalization/resolvers/PersonalizedEntryResolver.js +0 -196
- package/dist/personalization/resolvers/PersonalizedEntryResolver.js.map +0 -1
- package/dist/personalization/resolvers/index.d.ts +0 -7
- package/dist/personalization/resolvers/index.d.ts.map +0 -1
- package/dist/personalization/resolvers/index.js +0 -7
- package/dist/personalization/resolvers/index.js.map +0 -1
- package/dist/signals.d.ts +0 -42
- package/dist/signals.d.ts.map +0 -1
- package/dist/signals.js +0 -36
- package/dist/signals.js.map +0 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
ANONYMOUS_ID_COOKIE: ()=>ANONYMOUS_ID_COOKIE,
|
|
28
|
+
ANONYMOUS_ID_COOKIE_LEGACY: ()=>ANONYMOUS_ID_COOKIE_LEGACY,
|
|
29
|
+
ANONYMOUS_ID_KEY: ()=>ANONYMOUS_ID_KEY,
|
|
30
|
+
ANONYMOUS_ID_KEY_LEGACY: ()=>ANONYMOUS_ID_KEY_LEGACY,
|
|
31
|
+
CHANGES_CACHE_KEY: ()=>CHANGES_CACHE_KEY,
|
|
32
|
+
CONSENT_KEY: ()=>CONSENT_KEY,
|
|
33
|
+
DEBUG_FLAG_KEY: ()=>DEBUG_FLAG_KEY,
|
|
34
|
+
OPTIMIZATION_CORE_SDK_NAME: ()=>OPTIMIZATION_CORE_SDK_NAME,
|
|
35
|
+
OPTIMIZATION_CORE_SDK_VERSION: ()=>OPTIMIZATION_CORE_SDK_VERSION,
|
|
36
|
+
PERSONALIZATIONS_CACHE_KEY: ()=>PERSONALIZATIONS_CACHE_KEY,
|
|
37
|
+
PROFILE_CACHE_KEY: ()=>PROFILE_CACHE_KEY
|
|
38
|
+
});
|
|
39
|
+
const OPTIMIZATION_CORE_SDK_VERSION = "0.1.0-alpha9";
|
|
40
|
+
const OPTIMIZATION_CORE_SDK_NAME = "@contentful/optimization-core";
|
|
41
|
+
const ANONYMOUS_ID_COOKIE = 'ctfl-opt-aid';
|
|
42
|
+
const ANONYMOUS_ID_KEY = '__ctfl_opt_anonymous_id__';
|
|
43
|
+
const CONSENT_KEY = '__ctfl_opt_consent__';
|
|
44
|
+
const CHANGES_CACHE_KEY = '__ctfl_opt_changes__';
|
|
45
|
+
const DEBUG_FLAG_KEY = '__ctfl_opt_debug__';
|
|
46
|
+
const PROFILE_CACHE_KEY = '__ctfl_opt_profile__';
|
|
47
|
+
const PERSONALIZATIONS_CACHE_KEY = '__ctfl_opt_personalizations__';
|
|
48
|
+
const ANONYMOUS_ID_COOKIE_LEGACY = 'ntaid';
|
|
49
|
+
const ANONYMOUS_ID_KEY_LEGACY = '__nt_anonymous_id__';
|
|
50
|
+
exports.ANONYMOUS_ID_COOKIE = __webpack_exports__.ANONYMOUS_ID_COOKIE;
|
|
51
|
+
exports.ANONYMOUS_ID_COOKIE_LEGACY = __webpack_exports__.ANONYMOUS_ID_COOKIE_LEGACY;
|
|
52
|
+
exports.ANONYMOUS_ID_KEY = __webpack_exports__.ANONYMOUS_ID_KEY;
|
|
53
|
+
exports.ANONYMOUS_ID_KEY_LEGACY = __webpack_exports__.ANONYMOUS_ID_KEY_LEGACY;
|
|
54
|
+
exports.CHANGES_CACHE_KEY = __webpack_exports__.CHANGES_CACHE_KEY;
|
|
55
|
+
exports.CONSENT_KEY = __webpack_exports__.CONSENT_KEY;
|
|
56
|
+
exports.DEBUG_FLAG_KEY = __webpack_exports__.DEBUG_FLAG_KEY;
|
|
57
|
+
exports.OPTIMIZATION_CORE_SDK_NAME = __webpack_exports__.OPTIMIZATION_CORE_SDK_NAME;
|
|
58
|
+
exports.OPTIMIZATION_CORE_SDK_VERSION = __webpack_exports__.OPTIMIZATION_CORE_SDK_VERSION;
|
|
59
|
+
exports.PERSONALIZATIONS_CACHE_KEY = __webpack_exports__.PERSONALIZATIONS_CACHE_KEY;
|
|
60
|
+
exports.PROFILE_CACHE_KEY = __webpack_exports__.PROFILE_CACHE_KEY;
|
|
61
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
62
|
+
"ANONYMOUS_ID_COOKIE",
|
|
63
|
+
"ANONYMOUS_ID_COOKIE_LEGACY",
|
|
64
|
+
"ANONYMOUS_ID_KEY",
|
|
65
|
+
"ANONYMOUS_ID_KEY_LEGACY",
|
|
66
|
+
"CHANGES_CACHE_KEY",
|
|
67
|
+
"CONSENT_KEY",
|
|
68
|
+
"DEBUG_FLAG_KEY",
|
|
69
|
+
"OPTIMIZATION_CORE_SDK_NAME",
|
|
70
|
+
"OPTIMIZATION_CORE_SDK_VERSION",
|
|
71
|
+
"PERSONALIZATIONS_CACHE_KEY",
|
|
72
|
+
"PROFILE_CACHE_KEY"
|
|
73
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
74
|
+
Object.defineProperty(exports, '__esModule', {
|
|
75
|
+
value: true
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
//# sourceMappingURL=constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.cjs","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../src/constants.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// eslint-disable-next-line @typescript-eslint/naming-convention -- Replaced at build-time\ndeclare const __OPTIMIZATION_VERSION__: string | undefined\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Replaced at build-time\ndeclare const __OPTIMIZATION_PACKAGE_NAME__: string | undefined\n\n/**\n * The current version of the Optimization Core SDK, injected at build time.\n *\n * @public\n */\nexport const OPTIMIZATION_CORE_SDK_VERSION =\n typeof __OPTIMIZATION_VERSION__ === 'string' ? __OPTIMIZATION_VERSION__ : '0.0.0'\n/**\n * The package name of the Optimization Core SDK, injected at build time.\n *\n * @public\n */\nexport const OPTIMIZATION_CORE_SDK_NAME =\n typeof __OPTIMIZATION_PACKAGE_NAME__ === 'string'\n ? __OPTIMIZATION_PACKAGE_NAME__\n : '@contentful/optimization-core'\n\n/**\n * Anonymous-ID cookie name used by the Optimization Core.\n *\n * @public\n * @remarks\n * This constant represents the cookie key used by the Optimization Framework\n * to persist an anonymous identifier for tracking personalization and analytics\n * events when no explicit profile is known.\n *\n * @example\n * ```ts\n * import { ANONYMOUS_ID_COOKIE } from '@contentful/optimization-core/constants'\n * const profileId = request.cookies[ANONYMOUS_ID_COOKIE]\n * ```\n */\nexport const ANONYMOUS_ID_COOKIE = 'ctfl-opt-aid'\n\n/**\n * Storage key for the anonymous identifier.\n *\n * @internal\n */\nexport const ANONYMOUS_ID_KEY = '__ctfl_opt_anonymous_id__'\n\n/**\n * Storage key for the persisted consent status.\n *\n * @internal\n */\nexport const CONSENT_KEY = '__ctfl_opt_consent__'\n\n/**\n * Storage key for cached Custom Flags.\n *\n * @internal\n */\nexport const CHANGES_CACHE_KEY = '__ctfl_opt_changes__'\n\n/**\n * Storage key for the debug flag toggle.\n *\n * @internal\n */\nexport const DEBUG_FLAG_KEY = '__ctfl_opt_debug__'\n\n/**\n * Storage key for cached profile data.\n *\n * @internal\n */\nexport const PROFILE_CACHE_KEY = '__ctfl_opt_profile__'\n\n/**\n * Storage key for cached selected personalizations.\n *\n * @internal\n */\nexport const PERSONALIZATIONS_CACHE_KEY = '__ctfl_opt_personalizations__'\n\n/**\n * Legacy anoynmous ID cookie key for migration from experience.js\n *\n * @internal\n */\nexport const ANONYMOUS_ID_COOKIE_LEGACY = 'ntaid'\n\n/**\n * Legacy anoynmous ID storage key for migration from experience.js\n *\n * @internal\n */\nexport const ANONYMOUS_ID_KEY_LEGACY = '__nt_anonymous_id__'\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","OPTIMIZATION_CORE_SDK_VERSION","__OPTIMIZATION_VERSION__","OPTIMIZATION_CORE_SDK_NAME","__OPTIMIZATION_PACKAGE_NAME__","ANONYMOUS_ID_COOKIE","ANONYMOUS_ID_KEY","CONSENT_KEY","CHANGES_CACHE_KEY","DEBUG_FLAG_KEY","PROFILE_CACHE_KEY","PERSONALIZATIONS_CACHE_KEY","ANONYMOUS_ID_COOKIE_LEGACY","ANONYMOUS_ID_KEY_LEGACY"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;;;;;;ACIO,MAAMI,gCACoCC;AAM1C,MAAMC,6BAEPC;AAkBC,MAAMC,sBAAsB;AAO5B,MAAMC,mBAAmB;AAOzB,MAAMC,cAAc;AAOpB,MAAMC,oBAAoB;AAO1B,MAAMC,iBAAiB;AAOvB,MAAMC,oBAAoB;AAO1B,MAAMC,6BAA6B;AAOnC,MAAMC,6BAA6B;AAOnC,MAAMC,0BAA0B"}
|
|
@@ -1,67 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Storage key for the
|
|
27
|
-
*
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
export declare const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Anonymous-ID cookie name used by the Optimization Core.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
* @remarks
|
|
6
|
+
* This constant represents the cookie key used by the Optimization Framework
|
|
7
|
+
* to persist an anonymous identifier for tracking personalization and analytics
|
|
8
|
+
* events when no explicit profile is known.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { ANONYMOUS_ID_COOKIE } from '@contentful/optimization-core/constants'
|
|
13
|
+
* const profileId = request.cookies[ANONYMOUS_ID_COOKIE]
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const ANONYMOUS_ID_COOKIE = "ctfl-opt-aid";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Legacy anoynmous ID cookie key for migration from experience.js
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare const ANONYMOUS_ID_COOKIE_LEGACY = "ntaid";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Storage key for the anonymous identifier.
|
|
27
|
+
*
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare const ANONYMOUS_ID_KEY = "__ctfl_opt_anonymous_id__";
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Legacy anoynmous ID storage key for migration from experience.js
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare const ANONYMOUS_ID_KEY_LEGACY = "__nt_anonymous_id__";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Storage key for cached Custom Flags.
|
|
41
|
+
*
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export declare const CHANGES_CACHE_KEY = "__ctfl_opt_changes__";
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Storage key for the persisted consent status.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export declare const CONSENT_KEY = "__ctfl_opt_consent__";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Storage key for the debug flag toggle.
|
|
55
|
+
*
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEBUG_FLAG_KEY = "__ctfl_opt_debug__";
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The package name of the Optimization Core SDK, injected at build time.
|
|
62
|
+
*
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
export declare const OPTIMIZATION_CORE_SDK_NAME: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The current version of the Optimization Core SDK, injected at build time.
|
|
69
|
+
*
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
export declare const OPTIMIZATION_CORE_SDK_VERSION: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Storage key for cached selected personalizations.
|
|
76
|
+
*
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export declare const PERSONALIZATIONS_CACHE_KEY = "__ctfl_opt_personalizations__";
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Storage key for cached profile data.
|
|
83
|
+
*
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
export declare const PROFILE_CACHE_KEY = "__ctfl_opt_profile__";
|
|
87
|
+
|
|
88
|
+
export { }
|
|
@@ -1,69 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Storage key for
|
|
41
|
-
*
|
|
42
|
-
* @internal
|
|
43
|
-
*/
|
|
44
|
-
export const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Anonymous-ID cookie name used by the Optimization Core.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
* @remarks
|
|
6
|
+
* This constant represents the cookie key used by the Optimization Framework
|
|
7
|
+
* to persist an anonymous identifier for tracking personalization and analytics
|
|
8
|
+
* events when no explicit profile is known.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { ANONYMOUS_ID_COOKIE } from '@contentful/optimization-core/constants'
|
|
13
|
+
* const profileId = request.cookies[ANONYMOUS_ID_COOKIE]
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const ANONYMOUS_ID_COOKIE = "ctfl-opt-aid";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Legacy anoynmous ID cookie key for migration from experience.js
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare const ANONYMOUS_ID_COOKIE_LEGACY = "ntaid";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Storage key for the anonymous identifier.
|
|
27
|
+
*
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare const ANONYMOUS_ID_KEY = "__ctfl_opt_anonymous_id__";
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Legacy anoynmous ID storage key for migration from experience.js
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare const ANONYMOUS_ID_KEY_LEGACY = "__nt_anonymous_id__";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Storage key for cached Custom Flags.
|
|
41
|
+
*
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export declare const CHANGES_CACHE_KEY = "__ctfl_opt_changes__";
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Storage key for the persisted consent status.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export declare const CONSENT_KEY = "__ctfl_opt_consent__";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Storage key for the debug flag toggle.
|
|
55
|
+
*
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEBUG_FLAG_KEY = "__ctfl_opt_debug__";
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The package name of the Optimization Core SDK, injected at build time.
|
|
62
|
+
*
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
export declare const OPTIMIZATION_CORE_SDK_NAME: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The current version of the Optimization Core SDK, injected at build time.
|
|
69
|
+
*
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
export declare const OPTIMIZATION_CORE_SDK_VERSION: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Storage key for cached selected personalizations.
|
|
76
|
+
*
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export declare const PERSONALIZATIONS_CACHE_KEY = "__ctfl_opt_personalizations__";
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Storage key for cached profile data.
|
|
83
|
+
*
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
export declare const PROFILE_CACHE_KEY = "__ctfl_opt_profile__";
|
|
87
|
+
|
|
88
|
+
export { }
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Anonymous-ID cookie name used by the Optimization Core.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
* @remarks
|
|
6
|
+
* This constant represents the cookie key used by the Optimization Framework
|
|
7
|
+
* to persist an anonymous identifier for tracking personalization and analytics
|
|
8
|
+
* events when no explicit profile is known.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { ANONYMOUS_ID_COOKIE } from '@contentful/optimization-core/constants'
|
|
13
|
+
* const profileId = request.cookies[ANONYMOUS_ID_COOKIE]
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const ANONYMOUS_ID_COOKIE = "ctfl-opt-aid";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Legacy anoynmous ID cookie key for migration from experience.js
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare const ANONYMOUS_ID_COOKIE_LEGACY = "ntaid";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Storage key for the anonymous identifier.
|
|
27
|
+
*
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare const ANONYMOUS_ID_KEY = "__ctfl_opt_anonymous_id__";
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Legacy anoynmous ID storage key for migration from experience.js
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare const ANONYMOUS_ID_KEY_LEGACY = "__nt_anonymous_id__";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Storage key for cached Custom Flags.
|
|
41
|
+
*
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export declare const CHANGES_CACHE_KEY = "__ctfl_opt_changes__";
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Storage key for the persisted consent status.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export declare const CONSENT_KEY = "__ctfl_opt_consent__";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Storage key for the debug flag toggle.
|
|
55
|
+
*
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEBUG_FLAG_KEY = "__ctfl_opt_debug__";
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The package name of the Optimization Core SDK, injected at build time.
|
|
62
|
+
*
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
export declare const OPTIMIZATION_CORE_SDK_NAME: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The current version of the Optimization Core SDK, injected at build time.
|
|
69
|
+
*
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
export declare const OPTIMIZATION_CORE_SDK_VERSION: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Storage key for cached selected personalizations.
|
|
76
|
+
*
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export declare const PERSONALIZATIONS_CACHE_KEY = "__ctfl_opt_personalizations__";
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Storage key for cached profile data.
|
|
83
|
+
*
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
export declare const PROFILE_CACHE_KEY = "__ctfl_opt_profile__";
|
|
87
|
+
|
|
88
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ANONYMOUS_ID_COOKIE, ANONYMOUS_ID_COOKIE_LEGACY, ANONYMOUS_ID_KEY, ANONYMOUS_ID_KEY_LEGACY, CHANGES_CACHE_KEY, CONSENT_KEY, DEBUG_FLAG_KEY, OPTIMIZATION_CORE_SDK_NAME, OPTIMIZATION_CORE_SDK_VERSION, PERSONALIZATIONS_CACHE_KEY, PROFILE_CACHE_KEY } from "./260.mjs";
|