@contentful/optimization-core 0.1.0-alpha → 0.1.0-alpha11

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 (149) hide show
  1. package/README.md +329 -93
  2. package/dist/160.mjs +3 -0
  3. package/dist/260.mjs +14 -0
  4. package/dist/260.mjs.map +1 -0
  5. package/dist/499.mjs +4 -0
  6. package/dist/632.mjs +5 -0
  7. package/dist/632.mjs.map +1 -0
  8. package/dist/942.mjs +2 -0
  9. package/dist/api-client.cjs +60 -0
  10. package/dist/api-client.cjs.map +1 -0
  11. package/dist/api-client.d.cts +4 -0
  12. package/dist/api-client.d.mts +4 -0
  13. package/dist/api-client.d.ts +4 -0
  14. package/dist/api-client.mjs +2 -0
  15. package/dist/api-schemas.cjs +63 -0
  16. package/dist/api-schemas.cjs.map +1 -0
  17. package/dist/api-schemas.d.cts +4 -0
  18. package/dist/api-schemas.d.mts +4 -0
  19. package/dist/api-schemas.d.ts +4 -0
  20. package/dist/api-schemas.mjs +2 -0
  21. package/dist/constants.cjs +78 -0
  22. package/dist/constants.cjs.map +1 -0
  23. package/dist/constants.d.cts +88 -0
  24. package/dist/constants.d.mts +88 -0
  25. package/dist/constants.d.ts +88 -0
  26. package/dist/constants.mjs +1 -0
  27. package/dist/index.cjs +1509 -1715
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +2523 -0
  30. package/dist/index.d.mts +2523 -0
  31. package/dist/index.d.ts +2523 -15
  32. package/dist/index.mjs +1215 -1362
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/logger.cjs +67 -0
  35. package/dist/logger.cjs.map +1 -0
  36. package/dist/logger.d.cts +8 -0
  37. package/dist/logger.d.mts +8 -0
  38. package/dist/logger.d.ts +8 -0
  39. package/dist/logger.mjs +2 -0
  40. package/dist/symbols.cjs +42 -0
  41. package/dist/symbols.cjs.map +1 -0
  42. package/dist/symbols.d.cts +10 -0
  43. package/dist/symbols.d.mts +10 -0
  44. package/dist/symbols.d.ts +10 -0
  45. package/dist/symbols.mjs +1 -0
  46. package/package.json +78 -12
  47. package/dist/Consent.d.ts +0 -44
  48. package/dist/Consent.d.ts.map +0 -1
  49. package/dist/Consent.js +0 -2
  50. package/dist/Consent.js.map +0 -1
  51. package/dist/CoreBase.d.ts +0 -161
  52. package/dist/CoreBase.d.ts.map +0 -1
  53. package/dist/CoreBase.js +0 -151
  54. package/dist/CoreBase.js.map +0 -1
  55. package/dist/CoreStateful.d.ts +0 -142
  56. package/dist/CoreStateful.d.ts.map +0 -1
  57. package/dist/CoreStateful.js +0 -137
  58. package/dist/CoreStateful.js.map +0 -1
  59. package/dist/CoreStateless.d.ts +0 -53
  60. package/dist/CoreStateless.d.ts.map +0 -1
  61. package/dist/CoreStateless.js +0 -43
  62. package/dist/CoreStateless.js.map +0 -1
  63. package/dist/ProductBase.d.ts +0 -83
  64. package/dist/ProductBase.d.ts.map +0 -1
  65. package/dist/ProductBase.js +0 -50
  66. package/dist/ProductBase.js.map +0 -1
  67. package/dist/analytics/AnalyticsBase.d.ts +0 -35
  68. package/dist/analytics/AnalyticsBase.d.ts.map +0 -1
  69. package/dist/analytics/AnalyticsBase.js +0 -13
  70. package/dist/analytics/AnalyticsBase.js.map +0 -1
  71. package/dist/analytics/AnalyticsStateful.d.ts +0 -138
  72. package/dist/analytics/AnalyticsStateful.d.ts.map +0 -1
  73. package/dist/analytics/AnalyticsStateful.js +0 -179
  74. package/dist/analytics/AnalyticsStateful.js.map +0 -1
  75. package/dist/analytics/AnalyticsStateless.d.ts +0 -48
  76. package/dist/analytics/AnalyticsStateless.d.ts.map +0 -1
  77. package/dist/analytics/AnalyticsStateless.js +0 -61
  78. package/dist/analytics/AnalyticsStateless.js.map +0 -1
  79. package/dist/analytics/index.d.ts +0 -5
  80. package/dist/analytics/index.d.ts.map +0 -1
  81. package/dist/analytics/index.js +0 -5
  82. package/dist/analytics/index.js.map +0 -1
  83. package/dist/global-constants.d.ts +0 -18
  84. package/dist/global-constants.d.ts.map +0 -1
  85. package/dist/global-constants.js +0 -18
  86. package/dist/global-constants.js.map +0 -1
  87. package/dist/index.d.ts.map +0 -1
  88. package/dist/index.js +0 -15
  89. package/dist/index.js.map +0 -1
  90. package/dist/lib/decorators/guardedBy.d.ts +0 -113
  91. package/dist/lib/decorators/guardedBy.d.ts.map +0 -1
  92. package/dist/lib/decorators/guardedBy.js +0 -143
  93. package/dist/lib/decorators/guardedBy.js.map +0 -1
  94. package/dist/lib/decorators/index.d.ts +0 -2
  95. package/dist/lib/decorators/index.d.ts.map +0 -1
  96. package/dist/lib/decorators/index.js +0 -2
  97. package/dist/lib/decorators/index.js.map +0 -1
  98. package/dist/lib/interceptor/InterceptorManager.d.ts +0 -127
  99. package/dist/lib/interceptor/InterceptorManager.d.ts.map +0 -1
  100. package/dist/lib/interceptor/InterceptorManager.js +0 -125
  101. package/dist/lib/interceptor/InterceptorManager.js.map +0 -1
  102. package/dist/lib/interceptor/index.d.ts +0 -2
  103. package/dist/lib/interceptor/index.d.ts.map +0 -1
  104. package/dist/lib/interceptor/index.js +0 -2
  105. package/dist/lib/interceptor/index.js.map +0 -1
  106. package/dist/lib/value-presence/ValuePresence.d.ts +0 -123
  107. package/dist/lib/value-presence/ValuePresence.d.ts.map +0 -1
  108. package/dist/lib/value-presence/ValuePresence.js +0 -141
  109. package/dist/lib/value-presence/ValuePresence.js.map +0 -1
  110. package/dist/lib/value-presence/index.d.ts +0 -2
  111. package/dist/lib/value-presence/index.d.ts.map +0 -1
  112. package/dist/lib/value-presence/index.js +0 -2
  113. package/dist/lib/value-presence/index.js.map +0 -1
  114. package/dist/personalization/PersonalizationBase.d.ts +0 -184
  115. package/dist/personalization/PersonalizationBase.d.ts.map +0 -1
  116. package/dist/personalization/PersonalizationBase.js +0 -76
  117. package/dist/personalization/PersonalizationBase.js.map +0 -1
  118. package/dist/personalization/PersonalizationStateful.d.ts +0 -226
  119. package/dist/personalization/PersonalizationStateful.d.ts.map +0 -1
  120. package/dist/personalization/PersonalizationStateful.js +0 -297
  121. package/dist/personalization/PersonalizationStateful.js.map +0 -1
  122. package/dist/personalization/PersonalizationStateless.d.ts +0 -74
  123. package/dist/personalization/PersonalizationStateless.d.ts.map +0 -1
  124. package/dist/personalization/PersonalizationStateless.js +0 -98
  125. package/dist/personalization/PersonalizationStateless.js.map +0 -1
  126. package/dist/personalization/index.d.ts +0 -6
  127. package/dist/personalization/index.d.ts.map +0 -1
  128. package/dist/personalization/index.js +0 -6
  129. package/dist/personalization/index.js.map +0 -1
  130. package/dist/personalization/resolvers/FlagsResolver.d.ts +0 -35
  131. package/dist/personalization/resolvers/FlagsResolver.d.ts.map +0 -1
  132. package/dist/personalization/resolvers/FlagsResolver.js +0 -47
  133. package/dist/personalization/resolvers/FlagsResolver.js.map +0 -1
  134. package/dist/personalization/resolvers/MergeTagValueResolver.d.ts +0 -74
  135. package/dist/personalization/resolvers/MergeTagValueResolver.d.ts.map +0 -1
  136. package/dist/personalization/resolvers/MergeTagValueResolver.js +0 -109
  137. package/dist/personalization/resolvers/MergeTagValueResolver.js.map +0 -1
  138. package/dist/personalization/resolvers/PersonalizedEntryResolver.d.ts +0 -142
  139. package/dist/personalization/resolvers/PersonalizedEntryResolver.d.ts.map +0 -1
  140. package/dist/personalization/resolvers/PersonalizedEntryResolver.js +0 -196
  141. package/dist/personalization/resolvers/PersonalizedEntryResolver.js.map +0 -1
  142. package/dist/personalization/resolvers/index.d.ts +0 -7
  143. package/dist/personalization/resolvers/index.d.ts.map +0 -1
  144. package/dist/personalization/resolvers/index.js +0 -7
  145. package/dist/personalization/resolvers/index.js.map +0 -1
  146. package/dist/signals.d.ts +0 -35
  147. package/dist/signals.d.ts.map +0 -1
  148. package/dist/signals.js +0 -30
  149. package/dist/signals.js.map +0 -1
@@ -1,98 +0,0 @@
1
- import { ComponentViewEvent, IdentifyEvent, PageViewEvent, ScreenViewEvent, TrackEvent, } from '@contentful/optimization-api-client';
2
- import { createScopedLogger } from 'logger';
3
- import PersonalizationBase from './PersonalizationBase';
4
- const logger = createScopedLogger('Personalization');
5
- /**
6
- * Stateless personalization implementation that immediately validates and sends
7
- * a single event to the Experience API, upserting the profile as needed.
8
- *
9
- * @public
10
- * @remarks
11
- * Each public method constructs a strongly-typed event via the shared builder,
12
- * runs it through event interceptors, and performs a profile upsert using the
13
- * Experience API. If an anonymous ID is available from the builder, it will be
14
- * preferred as the `profileId` unless an explicit profile is provided.
15
- */
16
- class PersonalizationStateless extends PersonalizationBase {
17
- /**
18
- * Identify the current profile/visitor to associate traits with a profile.
19
- *
20
- * @param payload - Identify builder arguments with an optional partial
21
- * profile to attach to the upsert request.
22
- * @returns The resulting {@link OptimizationData} for the identified user.
23
- */
24
- async identify(payload) {
25
- logger.info('Sending "identify" event');
26
- const { profile, ...builderArgs } = payload;
27
- const event = IdentifyEvent.parse(this.builder.buildIdentify(builderArgs));
28
- return await this.upsertProfile(event, profile);
29
- }
30
- /**
31
- * Record a page view.
32
- *
33
- * @param payload - Page view builder arguments with an optional partial profile.
34
- * @returns The evaluated {@link OptimizationData} for this page view.
35
- */
36
- async page(payload) {
37
- logger.info('Sending "page" event');
38
- const { profile, ...builderArgs } = payload;
39
- const event = PageViewEvent.parse(this.builder.buildPageView(builderArgs));
40
- return await this.upsertProfile(event, profile);
41
- }
42
- /**
43
- * Record a screen view.
44
- *
45
- * @param payload - Screen view builder arguments with an optional partial profile.
46
- * @returns The evaluated {@link OptimizationData} for this screen view.
47
- */
48
- async screen(payload) {
49
- logger.info(`Sending "screen" event for "${payload.name}"`);
50
- const { profile, ...builderArgs } = payload;
51
- const event = ScreenViewEvent.parse(this.builder.buildScreenView(builderArgs));
52
- return await this.upsertProfile(event, profile);
53
- }
54
- /**
55
- * Record a custom track event.
56
- *
57
- * @param payload - Track builder arguments with an optional partial profile.
58
- * @returns The evaluated {@link OptimizationData} for this event.
59
- */
60
- async track(payload) {
61
- logger.info(`Sending "track" event "${payload.event}"`);
62
- const { profile, ...builderArgs } = payload;
63
- const event = TrackEvent.parse(this.builder.buildTrack(builderArgs));
64
- return await this.upsertProfile(event, profile);
65
- }
66
- /**
67
- * Record a "sticky" component view.
68
- *
69
- * @param payload - Component view builder arguments with an optional partial profile.
70
- * @returns The evaluated {@link OptimizationData} for this component view.
71
- */
72
- async trackComponentView(payload) {
73
- logger.info('Sending "track personalization" event');
74
- const { profile, ...builderArgs } = payload;
75
- const event = ComponentViewEvent.parse(this.builder.buildComponentView(builderArgs));
76
- return await this.upsertProfile(event, profile);
77
- }
78
- /**
79
- * Intercept, validate, and upsert the profile with a single personalization
80
- * event.
81
- *
82
- * @param event - The {@link PersonalizationEvent} to submit.
83
- * @param profile - Optional partial profile. If omitted, the anonymous ID from
84
- * the builder (when present) is used as the `profileId`.
85
- * @returns The {@link OptimizationData} returned by the Experience API.
86
- * @internal
87
- */
88
- async upsertProfile(event, profile) {
89
- const intercepted = await this.interceptors.event.run(event);
90
- const data = await this.api.experience.upsertProfile({
91
- profileId: profile?.id,
92
- events: [intercepted],
93
- });
94
- return data;
95
- }
96
- }
97
- export default PersonalizationStateless;
98
- //# sourceMappingURL=PersonalizationStateless.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PersonalizationStateless.js","sourceRoot":"","sources":["../../src/personalization/PersonalizationStateless.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kBAAkB,EAElB,aAAa,EAGb,aAAa,EAIb,eAAe,EAEf,UAAU,GACX,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,mBAAmB,MAAM,uBAAuB,CAAA;AAEvD,MAAM,MAAM,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,wBAAyB,SAAQ,mBAAmB;IACxD;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,CACZ,OAA2D;QAE3D,MAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA;QAEvC,M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CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAA;QAEpE,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IACjD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,kBAAkB,CACtB,OAAgE;QAEhE,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAA;QAEpD,MAAM,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,GAAG,OAAO,CAAA;QAE3C,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAA;QAEpF,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IACjD,CAAC;IAED;;;;;;;;;OASG;IACK,KAAK,CAAC,aAAa,CACzB,KAA2B,EAC3B,OAAwB;QAExB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAE5D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC;YACnD,SAAS,EAAE,OAAO,EAAE,EAAE;YACtB,MAAM,EAAE,CAAC,WAAW,CAAC;SACtB,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED,eAAe,wBAAwB,CAAA"}
@@ -1,6 +0,0 @@
1
- export * from './resolvers';
2
- export * from './PersonalizationStateful';
3
- export { default as PersonalizationStateful } from './PersonalizationStateful';
4
- export * from './PersonalizationStateless';
5
- export { default as PersonalizationStateless } from './PersonalizationStateless';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/personalization/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAE3B,cAAc,2BAA2B,CAAA;AACzC,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAE9E,cAAc,4BAA4B,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAA"}
@@ -1,6 +0,0 @@
1
- export * from './resolvers';
2
- export * from './PersonalizationStateful';
3
- export { default as PersonalizationStateful } from './PersonalizationStateful';
4
- export * from './PersonalizationStateless';
5
- export { default as PersonalizationStateless } from './PersonalizationStateless';
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/personalization/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAE3B,cAAc,2BAA2B,CAAA;AACzC,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAE9E,cAAc,4BAA4B,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAA"}
@@ -1,35 +0,0 @@
1
- import type { ChangeArray, Flags } from '@contentful/optimization-api-client';
2
- /**
3
- * Resolves a {@link Flags} map from a list of optimization changes.
4
- *
5
- * @public
6
- * @remarks
7
- * Given an Optimization {@link ChangeArray}, this utility flattens the list into a
8
- * simple key–value object suitable for quick lookups in client code. When `changes`
9
- * is `undefined`, an empty object is returned. If a change value is wrapped in an
10
- * object like `{ value: { ... } }`, this resolver unwraps it to the underlying object.
11
- */
12
- declare const FlagsResolver: {
13
- /**
14
- * Build a flattened map of flag keys to values from a change list.
15
- *
16
- * @param changes - The change list returned by the optimization service.
17
- * @returns A map of flag keys to their resolved values.
18
- * @example
19
- * ```ts
20
- * const flags = FlagsResolver.resolve(data.changes)
21
- * if (flags['theme'] === 'dark') enableDarkMode()
22
- * ```
23
- * @example
24
- * // Handles wrapped values produced by the API
25
- * ```ts
26
- * const flags = FlagsResolver.resolve([
27
- * { type: 'Variable', key: 'price', value: { value: { amount: 10, currency: 'USD' } } }
28
- * ])
29
- * console.log(flags.price.amount) // 10
30
- * ```
31
- */
32
- resolve(changes?: ChangeArray): Flags;
33
- };
34
- export default FlagsResolver;
35
- //# sourceMappingURL=FlagsResolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlagsResolver.d.ts","sourceRoot":"","sources":["../../../src/personalization/resolvers/FlagsResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAA;AAE7E;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa;IACjB;;;;;;;;;;;;;;;;;;OAkBG;sBACe,WAAW,GAAG,KAAK;CAiBtC,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -1,47 +0,0 @@
1
- /**
2
- * Resolves a {@link Flags} map from a list of optimization changes.
3
- *
4
- * @public
5
- * @remarks
6
- * Given an Optimization {@link ChangeArray}, this utility flattens the list into a
7
- * simple key–value object suitable for quick lookups in client code. When `changes`
8
- * is `undefined`, an empty object is returned. If a change value is wrapped in an
9
- * object like `{ value: { ... } }`, this resolver unwraps it to the underlying object.
10
- */
11
- const FlagsResolver = {
12
- /**
13
- * Build a flattened map of flag keys to values from a change list.
14
- *
15
- * @param changes - The change list returned by the optimization service.
16
- * @returns A map of flag keys to their resolved values.
17
- * @example
18
- * ```ts
19
- * const flags = FlagsResolver.resolve(data.changes)
20
- * if (flags['theme'] === 'dark') enableDarkMode()
21
- * ```
22
- * @example
23
- * // Handles wrapped values produced by the API
24
- * ```ts
25
- * const flags = FlagsResolver.resolve([
26
- * { type: 'Variable', key: 'price', value: { value: { amount: 10, currency: 'USD' } } }
27
- * ])
28
- * console.log(flags.price.amount) // 10
29
- * ```
30
- */
31
- resolve(changes) {
32
- if (!changes)
33
- return {};
34
- return changes.reduce((acc, { key, value }) => {
35
- const actualValue = typeof value === 'object' &&
36
- value !== null &&
37
- 'value' in value &&
38
- typeof value.value === 'object'
39
- ? value.value
40
- : value;
41
- acc[key] = actualValue;
42
- return acc;
43
- }, {});
44
- },
45
- };
46
- export default FlagsResolver;
47
- //# sourceMappingURL=FlagsResolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlagsResolver.js","sourceRoot":"","sources":["../../../src/personalization/resolvers/FlagsResolver.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,aAAa,GAAG;IACpB;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,OAAqB;QAC3B,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,CAAA;QAEvB,OAAO,OAAO,CAAC,MAAM,CAAQ,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE;YACnD,MAAM,WAAW,GACf,OAAO,KAAK,KAAK,QAAQ;gBACzB,KAAK,KAAK,IAAI;gBACd,OAAO,IAAI,KAAK;gBAChB,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ;gBAC7B,CAAC,CAAC,KAAK,CAAC,KAAK;gBACb,CAAC,CAAC,KAAK,CAAA;YAEX,GAAG,CAAC,GAAG,CAAC,GAAG,WAAW,CAAA;YAEtB,OAAO,GAAG,CAAA;QACZ,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC;CACF,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -1,74 +0,0 @@
1
- import { MergeTagEntry, Profile } from '@contentful/optimization-api-client';
2
- /**
3
- * Resolves merge tag values from a {@link Profile}.
4
- *
5
- * @public
6
- * @remarks
7
- * *Merge tags* are references to user profile data that may be embedded in content
8
- * and expanded at runtime. This resolver normalizes the merge-tag identifier into
9
- * a set of candidate selectors and searches the profile for a matching value.
10
- * Result values are returned as strings; numeric/boolean primitives are stringified.
11
- */
12
- declare const MergeTagValueResolver: {
13
- /**
14
- * Type guard to ensure the input is a {@link MergeTagEntry}.
15
- *
16
- * @param embeddedEntryNodeTarget - Unknown value to validate.
17
- * @returns `true` if the input is a valid merge-tag entry.
18
- * @example
19
- * ```ts
20
- * if (MergeTagValueResolver.isMergeTagEntry(node)) {
21
- * // safe to read fields
22
- * }
23
- * ```
24
- */
25
- isMergeTagEntry(embeddedEntryNodeTarget: unknown): embeddedEntryNodeTarget is MergeTagEntry;
26
- /**
27
- * Generate a list of candidate selectors for a merge-tag ID.
28
- *
29
- * @param id - Merge-tag identifier (segments separated by `_`).
30
- * @returns Array of dot-path selectors to try against a profile.
31
- * @example
32
- * ```ts
33
- * // "profile_name_first" -> [
34
- * // 'profile',
35
- * // 'profile.name',
36
- * // 'profile.name.first'
37
- * // ]
38
- * const selectors = MergeTagValueResolver.normalizeSelectors('profile_name_first')
39
- * ```
40
- */
41
- normalizeSelectors(id: string): string[];
42
- /**
43
- * Look up a merge-tag value from a profile using normalized selectors.
44
- *
45
- * @param id - Merge-tag identifier.
46
- * @param profile - Profile from which to resolve the value.
47
- * @returns A stringified primitive if found; otherwise `undefined`.
48
- * @example
49
- * ```ts
50
- * const value = MergeTagValueResolver.getValueFromProfile('user_email', profile)
51
- * if (value) sendEmailTo(value)
52
- * ```
53
- * @remarks
54
- * Only string/number/boolean primitives are returned; objects/arrays are ignored.
55
- */
56
- getValueFromProfile(id: string, profile?: Profile): string | undefined;
57
- /**
58
- * Resolve the display value for a merge-tag entry using the provided profile,
59
- * falling back to the entry's configured `nt_fallback` when necessary.
60
- *
61
- * @param mergeTagEntry - The merge-tag entry to resolve.
62
- * @param profile - Optional profile used for lookup.
63
- * @returns The resolved string, or `undefined` if the entry is invalid and no
64
- * fallback is available.
65
- * @example
66
- * ```ts
67
- * const text = MergeTagValueResolver.resolve(entry, profile)
68
- * render(text ?? 'Guest')
69
- * ```
70
- */
71
- resolve(mergeTagEntry: MergeTagEntry | undefined, profile?: Profile): string | undefined;
72
- };
73
- export default MergeTagValueResolver;
74
- //# sourceMappingURL=MergeTagValueResolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MergeTagValueResolver.d.ts","sourceRoot":"","sources":["../../../src/personalization/resolvers/MergeTagValueResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAA;AAS5E;;;;;;;;;GASG;AACH,QAAA,MAAM,qBAAqB;IACzB;;;;;;;;;;;OAWG;6CACsC,OAAO,GAAG,uBAAuB,IAAI,aAAa;IAI3F;;;;;;;;;;;;;;OAcG;2BACoB,MAAM,GAAG,MAAM,EAAE;IASxC;;;;;;;;;;;;;OAaG;4BACqB,MAAM,YAAY,OAAO,GAAG,MAAM,GAAG,SAAS;IAiBtE;;;;;;;;;;;;;OAaG;2BACoB,aAAa,GAAG,SAAS,YAAY,OAAO,GAAG,MAAM,GAAG,SAAS;CAoBzF,CAAA;AAED,eAAe,qBAAqB,CAAA"}
@@ -1,109 +0,0 @@
1
- import { MergeTagEntry, Profile } from '@contentful/optimization-api-client';
2
- import { get } from 'es-toolkit/compat';
3
- import { createScopedLogger } from 'logger';
4
- const logger = createScopedLogger('Personalization');
5
- /** Base string for log messages when merge-tag resolution fails. */
6
- const RESOLUTION_WARNING_BASE = 'Could not resolve Merge Tag value:';
7
- /**
8
- * Resolves merge tag values from a {@link Profile}.
9
- *
10
- * @public
11
- * @remarks
12
- * *Merge tags* are references to user profile data that may be embedded in content
13
- * and expanded at runtime. This resolver normalizes the merge-tag identifier into
14
- * a set of candidate selectors and searches the profile for a matching value.
15
- * Result values are returned as strings; numeric/boolean primitives are stringified.
16
- */
17
- const MergeTagValueResolver = {
18
- /**
19
- * Type guard to ensure the input is a {@link MergeTagEntry}.
20
- *
21
- * @param embeddedEntryNodeTarget - Unknown value to validate.
22
- * @returns `true` if the input is a valid merge-tag entry.
23
- * @example
24
- * ```ts
25
- * if (MergeTagValueResolver.isMergeTagEntry(node)) {
26
- * // safe to read fields
27
- * }
28
- * ```
29
- */
30
- isMergeTagEntry(embeddedEntryNodeTarget) {
31
- return MergeTagEntry.safeParse(embeddedEntryNodeTarget).success;
32
- },
33
- /**
34
- * Generate a list of candidate selectors for a merge-tag ID.
35
- *
36
- * @param id - Merge-tag identifier (segments separated by `_`).
37
- * @returns Array of dot-path selectors to try against a profile.
38
- * @example
39
- * ```ts
40
- * // "profile_name_first" -> [
41
- * // 'profile',
42
- * // 'profile.name',
43
- * // 'profile.name.first'
44
- * // ]
45
- * const selectors = MergeTagValueResolver.normalizeSelectors('profile_name_first')
46
- * ```
47
- */
48
- normalizeSelectors(id) {
49
- return id.split('_').map((_path, index, paths) => {
50
- const dotPath = paths.slice(0, index).join('.');
51
- const underScorePath = paths.slice(index).join('_');
52
- return [dotPath, underScorePath].filter((path) => path !== '').join('.');
53
- });
54
- },
55
- /**
56
- * Look up a merge-tag value from a profile using normalized selectors.
57
- *
58
- * @param id - Merge-tag identifier.
59
- * @param profile - Profile from which to resolve the value.
60
- * @returns A stringified primitive if found; otherwise `undefined`.
61
- * @example
62
- * ```ts
63
- * const value = MergeTagValueResolver.getValueFromProfile('user_email', profile)
64
- * if (value) sendEmailTo(value)
65
- * ```
66
- * @remarks
67
- * Only string/number/boolean primitives are returned; objects/arrays are ignored.
68
- */
69
- getValueFromProfile(id, profile) {
70
- const selectors = MergeTagValueResolver.normalizeSelectors(id);
71
- const matchingSelector = selectors.find((selector) => get(profile, selector));
72
- if (!matchingSelector)
73
- return undefined;
74
- const value = get(profile, matchingSelector);
75
- if (!value ||
76
- (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'boolean'))
77
- return undefined;
78
- return `${value}`;
79
- },
80
- /**
81
- * Resolve the display value for a merge-tag entry using the provided profile,
82
- * falling back to the entry's configured `nt_fallback` when necessary.
83
- *
84
- * @param mergeTagEntry - The merge-tag entry to resolve.
85
- * @param profile - Optional profile used for lookup.
86
- * @returns The resolved string, or `undefined` if the entry is invalid and no
87
- * fallback is available.
88
- * @example
89
- * ```ts
90
- * const text = MergeTagValueResolver.resolve(entry, profile)
91
- * render(text ?? 'Guest')
92
- * ```
93
- */
94
- resolve(mergeTagEntry, profile) {
95
- if (!MergeTagValueResolver.isMergeTagEntry(mergeTagEntry)) {
96
- logger.warn(`${RESOLUTION_WARNING_BASE} supplied entry is not a Merge Tag entry`);
97
- return;
98
- }
99
- const { fields: { nt_fallback: fallback }, } = mergeTagEntry;
100
- if (!Profile.safeParse(profile).success) {
101
- logger.warn(`${RESOLUTION_WARNING_BASE} no valid profile`);
102
- return fallback;
103
- }
104
- return (MergeTagValueResolver.getValueFromProfile(mergeTagEntry.fields.nt_mergetag_id, profile) ??
105
- fallback);
106
- },
107
- };
108
- export default MergeTagValueResolver;
109
- //# sourceMappingURL=MergeTagValueResolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MergeTagValueResolver.js","sourceRoot":"","sources":["../../../src/personalization/resolvers/MergeTagValueResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAE3C,MAAM,MAAM,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AAEpD,oEAAoE;AACpE,MAAM,uBAAuB,GAAG,oCAAoC,CAAA;AAEpE;;;;;;;;;GASG;AACH,MAAM,qBAAqB,GAAG;IAC5B;;;;;;;;;;;OAWG;IACH,eAAe,CAAC,uBAAgC;QAC9C,OAAO,aAAa,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAA;IACjE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,kBAAkB,CAAC,EAAU;QAC3B,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YAC/C,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,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AO,CAAC,CAAC,OAAO,EAAE,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,GAAG,uBAAuB,mBAAmB,CAAC,CAAA;YAC1D,OAAO,QAAQ,CAAA;QACjB,CAAC;QAED,OAAO,CACL,qBAAqB,CAAC,mBAAmB,CAAC,aAAa,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC;YACvF,QAAQ,CACT,CAAA;IACH,CAAC;CACF,CAAA;AAED,eAAe,qBAAqB,CAAA"}
@@ -1,142 +0,0 @@
1
- import { type EntryReplacementVariant, type PersonalizationEntry, type PersonalizedEntry, type SelectedPersonalization, type SelectedPersonalizationArray } from '@contentful/optimization-api-client';
2
- import type { ChainModifiers, Entry, EntrySkeletonType, LocaleCode } from 'contentful';
3
- /**
4
- * Result returned by {@link PersonalizedEntryResolver.resolve}.
5
- *
6
- * @typeParam S - Entry skeleton type.
7
- * @typeParam M - Chain modifiers.
8
- * @typeParam L - Locale code.
9
- * @public
10
- */
11
- export interface ResolvedData<S extends EntrySkeletonType, M extends ChainModifiers = ChainModifiers, L extends LocaleCode = LocaleCode> {
12
- /** The baseline or resolved variant entry. */
13
- entry: Entry<S, M, L>;
14
- /** The selected personalization metadata, if a non‑baseline variant was chosen. */
15
- personalization?: SelectedPersonalization;
16
- }
17
- /**
18
- * Resolve a personalized Contentful entry to the correct variant for the current
19
- * selections.
20
- *
21
- * @public
22
- * @remarks
23
- * Given a baseline {@link PersonalizedEntry} and a set of selected personalizations
24
- * (variants per experience), this resolver finds the matching replacement variant
25
- * for the component configured against the baseline entry.
26
- *
27
- * **Variant indexing**: `variantIndex` in {@link SelectedPersonalization} is treated as
28
- * 1‑based (index 1 = first variant). A value of `0` indicates baseline.
29
- */
30
- declare const PersonalizedEntryResolver: {
31
- /**
32
- * Find the personalization entry corresponding to one of the selected experiences.
33
- *
34
- * @param params - Object containing the baseline personalized entry and the selections.
35
- * @param skipValidation - When `true`, skip type/shape validation for perf.
36
- * @returns The matching {@link PersonalizationEntry}, or `undefined` if not found/invalid.
37
- * @example
38
- * ```ts
39
- * const personalizationEntry = PersonalizedEntryResolver.getPersonalizationEntry({
40
- * personalizedEntry: entry,
41
- * selectedPersonalizations
42
- * })
43
- * ```
44
- * @remarks
45
- * A personalization entry is a personalization configuration object supplied in a
46
- * `PersonalizedEntry.nt_experiences` array. A personalized entry may relate to
47
- * multiple personalizations.
48
- */
49
- getPersonalizationEntry({ personalizedEntry, selectedPersonalizations, }: {
50
- personalizedEntry: PersonalizedEntry;
51
- selectedPersonalizations: SelectedPersonalizationArray;
52
- }, skipValidation?: boolean): PersonalizationEntry | undefined;
53
- /**
54
- * Look up the selection metadata for a specific personalization entry.
55
- *
56
- * @param params - Object with the target personalization entry and selections.
57
- * @param skipValidation - When `true`, skip type checks.
58
- * @returns The matching {@link SelectedPersonalization}, if present.
59
- * @example
60
- * ```ts
61
- * const selectedPersonalization = PersonalizedEntryResolver.getSelectedPersonalization({
62
- * personalizationEntry,
63
- * selectedPersonalizations
64
- * })
65
- * ```
66
- * @remarks
67
- * Selected personalizations are supplied by the Experience API in the
68
- * `experiences` response data property.
69
- */
70
- getSelectedPersonalization({ personalizationEntry, selectedPersonalizations, }: {
71
- personalizationEntry: PersonalizationEntry;
72
- selectedPersonalizations: SelectedPersonalizationArray;
73
- }, skipValidation?: boolean): SelectedPersonalization | undefined;
74
- /**
75
- * Get the replacement variant config for the given selection index.
76
- *
77
- * @param params - Baseline entry, personalization entry, and 1‑based variant index.
78
- * @param skipValidation - When `true`, skip type checks.
79
- * @returns The {@link EntryReplacementVariant} for the component, if any.
80
- * @example
81
- * ```ts
82
- * const selectedVariant = PersonalizedEntryResolver.getSelectedVariant({
83
- * personalizedEntry: entry,
84
- * personalizationEntry,
85
- * selectedVariantIndex: 2 // second variant (1‑based)
86
- * })
87
- * ```
88
- * @remarks
89
- * Entry replacement variants are variant configurations specified in a
90
- * personalization configuration component's `variants` array supplied by the
91
- * personalized entry via its `nt_config` field.
92
- */
93
- getSelectedVariant({ personalizedEntry, personalizationEntry, selectedVariantIndex, }: {
94
- personalizedEntry: PersonalizedEntry;
95
- personalizationEntry: PersonalizationEntry;
96
- selectedVariantIndex: number;
97
- }, skipValidation?: boolean): EntryReplacementVariant | undefined;
98
- /**
99
- * Resolve the concrete Contentful entry that corresponds to a selected variant.
100
- *
101
- * @typeParam S - Entry skeleton type.
102
- * @typeParam M - Chain modifiers.
103
- * @typeParam L - Locale code.
104
- * @param params - Personalization entry and selected variant.
105
- * @param skipValidation - When `true`, skip type checks.
106
- * @returns The resolved entry typed as {@link Entry} or `undefined`.
107
- * @example
108
- * ```ts
109
- * const selectedVariantEntry = PersonalizedEntryResolver.getSelectedVariantEntry<{ fields: unknown }>({
110
- * personalizationEntry,
111
- * selectedVariant
112
- * })
113
- * ```
114
- * @remarks
115
- * A personalized entry will resolve either to the baseline (the entry
116
- * supplied as `personalizedEntry`) or the selected variant.
117
- */
118
- getSelectedVariantEntry<S extends EntrySkeletonType, M extends ChainModifiers = ChainModifiers, L extends LocaleCode = string>({ personalizationEntry, selectedVariant, }: {
119
- personalizationEntry: PersonalizationEntry;
120
- selectedVariant: EntryReplacementVariant;
121
- }, skipValidation?: boolean): Entry<S, M, L> | undefined;
122
- /**
123
- * Resolve the selected entry (baseline or variant) for a personalized entry
124
- * and optional selected personalizations, returning both the entry and the
125
- * personalization metadata.
126
- *
127
- * @typeParam S - Entry skeleton type.
128
- * @typeParam M - Chain modifiers.
129
- * @typeParam L - Locale code.
130
- * @param entry - The baseline personalized entry.
131
- * @param selectedPersonalizations - Optional selections for the current profile.
132
- * @returns An object containing the resolved entry and (if chosen) the selection.
133
- * @example
134
- * ```ts
135
- * const { entry: personalizedEntry, personalization } = PersonalizedEntryResolver.resolve(entry, selections)
136
- * if (personalization) console.log('Variant index', personalization.variantIndex)
137
- * ```
138
- */
139
- resolve<S extends EntrySkeletonType, M extends ChainModifiers = ChainModifiers, L extends LocaleCode = string>(entry: Entry<S, M, L>, selectedPersonalizations?: SelectedPersonalizationArray): ResolvedData<S, M, L>;
140
- };
141
- export default PersonalizedEntryResolver;
142
- //# sourceMappingURL=PersonalizedEntryResolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PersonalizedEntryResolver.d.ts","sourceRoot":"","sources":["../../../src/personalization/resolvers/PersonalizedEntryResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAM5B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EAClC,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAKtF;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY,CAC3B,CAAC,SAAS,iBAAiB,EAC3B,CAAC,SAAS,cAAc,GAAG,cAAc,EACzC,CAAC,SAAS,UAAU,GAAG,UAAU;IAEjC,8CAA8C;IAC9C,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IACrB,mFAAmF;IACnF,eAAe,CAAC,EAAE,uBAAuB,CAAA;CAC1C;AAKD;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,yBAAyB;IAC7B;;;;;;;;;;;;;;;;;OAiBG;8EAKE;QACD,iBAAiB,EAAE,iBAAiB,CAAA;QACpC,wBAAwB,EAAE,4BAA4B,CAAA;KACvD,6BAEA,oBAAoB,GAAG,SAAS;IAkBnC;;;;;;;;;;;;;;;;OAgBG;oFAKE;QACD,oBAAoB,EAAE,oBAAoB,CAAA;QAC1C,wBAAwB,EAAE,4BAA4B,CAAA;KACvD,6BAEA,uBAAuB,GAAG,SAAS;IActC;;;;;;;;;;;;;;;;;;OAkBG;2FAME;QACD,iBAAiB,EAAE,iBAAiB,CAAA;QACpC,oBAAoB,EAAE,oBAAoB,CAAA;QAC1C,oBAAoB,EAAE,MAAM,CAAA;KAC7B,6BAE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