@useinsider/guido 3.17.0-beta.e6704da → 3.17.0-beta.ec0523a

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 (41) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +6 -12
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +61 -63
  5. package/dist/composables/useCustomInterfaceAppearance.js +16 -19
  6. package/dist/composables/useRecommendation.js +34 -41
  7. package/dist/config/migrator/recommendationMigrator.js +4 -6
  8. package/dist/enums/academy.js +1 -2
  9. package/dist/enums/date.js +3 -4
  10. package/dist/enums/extensions/recommendationBlock.js +23 -25
  11. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +11 -13
  12. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +95 -96
  13. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +154 -156
  14. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +68 -216
  15. package/dist/extensions/Blocks/common-control.js +19 -22
  16. package/dist/guido.css +1 -1
  17. package/dist/services/recommendationApi.js +29 -78
  18. package/dist/src/@types/config/schemas.d.ts +0 -12
  19. package/dist/src/composables/useConfig.d.ts +0 -2
  20. package/dist/src/composables/useRecommendation.d.ts +0 -1
  21. package/dist/src/enums/academy.d.ts +0 -1
  22. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
  23. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -14
  24. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +10 -214
  25. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -6
  26. package/dist/src/extensions/Blocks/common-control.d.ts +1 -4
  27. package/dist/src/services/recommendationApi.d.ts +1 -4
  28. package/dist/src/stores/config.d.ts +0 -18
  29. package/dist/utils/dateUtil.js +10 -23
  30. package/dist/utils/templatePreparation.js +34 -37
  31. package/package.json +1 -2
  32. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +0 -18
  33. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +0 -70
  34. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +0 -20
  35. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +0 -55
  36. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -141
  37. package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +0 -3
  38. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBox.vue.d.ts +0 -24
  39. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -29
  40. package/dist/src/mock/api/recommendation-strategies.d.ts +0 -43
  41. package/dist/static/styles/components/recommendation-strategy.css.js +0 -171
@@ -1,101 +1,52 @@
1
- import { useHttp as p } from "../composables/useHttp.js";
2
- import { URLS as m, RRS_ACTIVE_EMAIL_FILTER as l, QUERY_PARAMS as h } from "../enums/extensions/recommendationBlock.js";
3
- const R = 100, y = (s) => s.reduce(
4
- (i, a, d) => (i[d] = {
5
- attributeName: a.attributeName,
6
- attributeJs: a.attributeJs,
7
- attributeType: a.attributeType,
8
- type: a.type,
9
- displayName: a.displayName,
10
- isFilterable: a.isFilterable
11
- }, i),
1
+ import { useHttp as d } from "../composables/useHttp.js";
2
+ import { QUERY_PARAMS as l, URLS as u } from "../enums/extensions/recommendationBlock.js";
3
+ const R = (o) => o.reduce(
4
+ (a, t, s) => (a[s] = {
5
+ attributeName: t.attributeName,
6
+ attributeJs: t.attributeJs,
7
+ attributeType: t.attributeType,
8
+ type: t.type,
9
+ displayName: t.displayName,
10
+ isFilterable: t.isFilterable
11
+ }, a),
12
12
  {}
13
- ), w = () => {
14
- const { get: s, post: i } = p(), { get: a } = p({ headers: {} }), d = "6KcLM9TwheVB1mgK";
13
+ ), f = () => {
14
+ const { get: o } = d(), { get: a } = d({ headers: {} }), t = "6KcLM9TwheVB1mgK";
15
15
  return {
16
16
  fetchRecommendationCreateData: async () => {
17
17
  try {
18
- return (await s("/newsletter/recommendations/create-data")).data;
18
+ return (await o("/newsletter/recommendations/create-data")).data;
19
19
  } catch (e) {
20
20
  throw console.error("fetchUserModalState error:", e), e;
21
21
  }
22
22
  },
23
23
  fetchRecommendationFilters: async () => {
24
24
  try {
25
- const { data: e } = await s(
26
- m.PRODUCT_ATTRIBUTES_PATH
27
- ), t = Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
28
- return y(t);
25
+ const { data: e } = await o(
26
+ u.PRODUCT_ATTRIBUTES_PATH
27
+ ), n = Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
28
+ return R(n);
29
29
  } catch (e) {
30
30
  throw console.error("fetchRecommendationFilters error:", e), e;
31
31
  }
32
32
  },
33
- fetchRecommendationProducts: async (e, t) => {
34
- var r;
33
+ fetchRecommendationProducts: async (e, n) => {
34
+ var i;
35
35
  try {
36
- const o = new URLSearchParams(Object.entries(t));
37
- o.set(h.CLIENT_ID, d);
38
- const c = decodeURIComponent(o.toString());
39
- console.debug("🏁 Recommendation API Query:", c);
40
- const n = await a(
41
- `${m.RECOMMENDATION_API_URL}/v2/${e}?${c}`
36
+ const r = new URLSearchParams(Object.entries(n));
37
+ r.set(l.CLIENT_ID, t);
38
+ const m = decodeURIComponent(r.toString());
39
+ console.debug("🏁 Recommendation API Query:", m);
40
+ const c = await a(
41
+ `${u.RECOMMENDATION_API_URL}/v2/${e}?${m}`
42
42
  );
43
- return ((r = n == null ? void 0 : n.data) == null ? void 0 : r.data) ?? [];
44
- } catch (o) {
45
- throw console.error("fetchRecommendationProducts error:", o), o;
46
- }
47
- },
48
- fetchRecommendationProductsByUrl: async (e) => {
49
- var t;
50
- try {
51
- const r = new RegExp(`[?&]${h.CLIENT_ID}=`).test(e), o = e.includes("?") ? "&" : "?", c = r ? e : `${e}${o}${h.CLIENT_ID}=${d}`, n = await a(
52
- c
53
- );
54
- return ((t = n == null ? void 0 : n.data) == null ? void 0 : t.data) ?? [];
43
+ return ((i = c == null ? void 0 : c.data) == null ? void 0 : i.data) ?? [];
55
44
  } catch (r) {
56
- throw console.error("fetchRecommendationProductsByUrl error:", r), r;
57
- }
58
- },
59
- fetchRecommendationStrategies: async () => {
60
- try {
61
- const e = /* @__PURE__ */ new Map();
62
- let t = 1;
63
- for (; ; ) {
64
- const { data: r } = await s(
65
- `${m.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(l)}&per_page=${R}&page=${t}`
66
- ), o = Array.isArray(r) ? r : (r == null ? void 0 : r.data) ?? [], c = e.size;
67
- if (o.forEach((n) => e.set(n.strategy_id, n)), o.length < R || e.size === c)
68
- break;
69
- t += 1;
70
- }
71
- return [...e.values()];
72
- } catch (e) {
73
- throw console.error("fetchRecommendationStrategies error:", e), e;
74
- }
75
- },
76
- generateStrategyEndpoint: async (e) => {
77
- try {
78
- const { data: t } = await i(
79
- `${m.RECOMMENDATION_STRATEGIES_PATH}/endpoint-generate`,
80
- {
81
- // Email designs have no campaign yet; backend only needs it
82
- // for previewer flows.
83
- campaignId: 0,
84
- pageTypes: [],
85
- isPreviewer: !1,
86
- strategy: e,
87
- userId: ""
88
- }
89
- );
90
- if (!t || typeof t != "object" || !("full_path" in t || "data" in t))
91
- throw new Error("Unexpected endpoint-generate response shape");
92
- return "full_path" in t ? t : t.data;
93
- } catch (t) {
94
- throw console.error("generateStrategyEndpoint error:", t), t;
45
+ throw console.error("fetchRecommendationProducts error:", r), r;
95
46
  }
96
47
  }
97
48
  };
98
49
  };
99
50
  export {
100
- w as useRecommendationApi
51
+ f as useRecommendationApi
101
52
  };
@@ -395,12 +395,6 @@ export declare const FeaturesSchema: v.ObjectSchema<{
395
395
  readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
396
396
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
397
397
  readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
398
- /**
399
- * Assign a Reusable Recommendation Strategy (RRS) to recommendation blocks instead of
400
- * per-block algorithm settings. Hides Algorithm, Filters, Shuffle and Number of Products
401
- * (they live on the strategy) and adds the Assign Strategy flow.
402
- */
403
- readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
404
398
  }, undefined>;
405
399
  /**
406
400
  * Default block types available in Stripo
@@ -800,12 +794,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
800
794
  readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
801
795
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
802
796
  readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
803
- /**
804
- * Assign a Reusable Recommendation Strategy (RRS) to recommendation blocks instead of
805
- * per-block algorithm settings. Hides Algorithm, Filters, Shuffle and Number of Products
806
- * (they live on the strategy) and adds the Assign Strategy flow.
807
- */
808
- readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
809
797
  }, undefined>, {}>;
810
798
  /** Block configuration */
811
799
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -99,7 +99,6 @@ export declare const useConfig: () => {
99
99
  autosave: boolean;
100
100
  allowlistEnabled: boolean;
101
101
  linkTrackingIds: boolean;
102
- reusableRecommendationStrategy: boolean;
103
102
  };
104
103
  blocks: {
105
104
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -234,7 +233,6 @@ export declare const useConfig: () => {
234
233
  autosave: boolean;
235
234
  allowlistEnabled: boolean;
236
235
  linkTrackingIds: boolean;
237
- reusableRecommendationStrategy: boolean;
238
236
  } | null>;
239
237
  blocks: import("vue").ComputedRef<{
240
238
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -18,7 +18,6 @@ export declare const useRecommendation: () => {
18
18
  getRecommendationCampaignData: (id: string) => CampaignData;
19
19
  buildCampaignUrl: (campaignId: string, overrides?: {
20
20
  strategy: string;
21
- strategyId: string;
22
21
  language: string;
23
22
  currencyCode: string;
24
23
  size: string;
@@ -8,6 +8,5 @@ export declare const ACADEMY_LINKS: {
8
8
  readonly EMAIL_EDITOR: "https://academy.insiderone.com/docs/email-drag-and-drop-editor";
9
9
  readonly GLOBAL_UNSUBSCRIBE: "https://academy.insiderone.com/docs/global-unsubscribe-preference-center";
10
10
  readonly AMP_FOR_EMAILS: "https://academy.insiderone.com/docs/amp-for-emails";
11
- readonly EMAIL_RECOMMENDATION_BLOCK: "https://academy.insiderone.com/docs/new-editor-email-recommendation-block";
12
11
  };
13
12
  export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
@@ -3,9 +3,7 @@ import type { RecommendationFeedItem } from '@@/Types/recommendation';
3
3
  export declare const URLS: {
4
4
  RECOMMENDATION_API_URL: string;
5
5
  PRODUCT_ATTRIBUTES_PATH: string;
6
- RECOMMENDATION_STRATEGIES_PATH: string;
7
6
  };
8
- export declare const RRS_ACTIVE_EMAIL_FILTER = "[sr_strategies.status][=][active]*[sr_strategies.suitable_channels][~][EMAIL]";
9
7
  export declare const QUERY_PARAMS: {
10
8
  CLIENT_ID: string;
11
9
  };
@@ -9,9 +9,8 @@ import { PricePlacementControl, PRICE_PLACEMENT_CONTROL_ID } from './pricePlacem
9
9
  import { ProductCountControl, PRODUCT_COUNT_CONTROL_ID } from './productCount';
10
10
  import { ProductLayoutControl, PRODUCT_LAYOUT_CONTROL_ID } from './productLayout';
11
11
  import { ShuffleControl, SHUFFLE_CONTROL_ID } from './shuffle';
12
- import { StrategyControl, STRATEGY_CONTROL_ID } from './strategy';
13
12
  export declare const CONTROL_BLOCK_ID = "ui-elements-recommendation-block";
14
- export { AlgorithmControl, ALGORITHM_CONTROL_ID, LocaleControl, LOCALE_CONTROL_ID, CurrencyControl, CURRENCY_CONTROL_ID, ProductCountControl, PRODUCT_COUNT_CONTROL_ID, ProductLayoutControl, PRODUCT_LAYOUT_CONTROL_ID, FiltersControl, FILTERS_CONTROL_ID, ShuffleControl, SHUFFLE_CONTROL_ID, LayoutOrientationControl, LAYOUT_ORIENTATION_CONTROL_ID, PricePlacementControl, PRICE_PLACEMENT_CONTROL_ID, StrategyControl, STRATEGY_CONTROL_ID, };
13
+ export { AlgorithmControl, ALGORITHM_CONTROL_ID, LocaleControl, LOCALE_CONTROL_ID, CurrencyControl, CURRENCY_CONTROL_ID, ProductCountControl, PRODUCT_COUNT_CONTROL_ID, ProductLayoutControl, PRODUCT_LAYOUT_CONTROL_ID, FiltersControl, FILTERS_CONTROL_ID, ShuffleControl, SHUFFLE_CONTROL_ID, LayoutOrientationControl, LAYOUT_ORIENTATION_CONTROL_ID, PricePlacementControl, PRICE_PLACEMENT_CONTROL_ID, };
15
14
  export * from './utils';
16
15
  /**
17
16
  * Main recommendation block control that composes all sub-controls
@@ -30,10 +29,7 @@ export declare class RecommendationBlockControl extends CommonControl {
30
29
  private shuffleControl;
31
30
  private pricePlacementControl;
32
31
  private layoutOrientationControl;
33
- private strategyControl;
34
32
  getId(): string;
35
- /** Every sub-control the coordinator owns, in panel order. */
36
- private get _subControls();
37
33
  getTemplate(): string;
38
34
  onRender(): Promise<void>;
39
35
  onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
@@ -111,15 +107,8 @@ export declare class RecommendationBlockControl extends CommonControl {
111
107
  */
112
108
  private _listenStateUpdates;
113
109
  /**
114
- * Persists the current filter + strategy state from Pinia store to the
115
- * Stripo node config. This ensures they survive template save/reload cycles
116
- * (strategyId must be in esd-ext-config before any save — SD-149105).
117
- *
118
- * `size` rides along because assigning a strategy overwrites it in the
119
- * store only. Without this write, `_syncNodeConfigToStore` re-seeds the
120
- * store from the stale node config on the next panel open, and a block
121
- * whose saved HTML has the strategy's slot count gets rebuilt against the
122
- * old one — resetting migrator-applied per-element styles.
110
+ * Persists the current filter state from Pinia store to the Stripo node config.
111
+ * This ensures filters survive template save/reload cycles.
123
112
  */
124
113
  private _persistFiltersToNodeConfig;
125
114
  }
@@ -1,4 +1,4 @@
1
- import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationCampaignUrlValue, RecommendationProduct, RrsStrategy } from '@@/Types/recommendation';
1
+ import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationProduct } from '@@/Types/recommendation';
2
2
  export interface PerBlockConfigs {
3
3
  cardsInRow: number;
4
4
  currencySettings: {
@@ -21,8 +21,6 @@ export interface PerBlockConfigs {
21
21
  sendProductRequestFlag: boolean;
22
22
  shuffleProducts: boolean;
23
23
  strategy: string;
24
- /** Assigned RRS id ('' = none) — mirrors RecommendationNodeConfig.strategyId (SD-149105) */
25
- strategyId: string;
26
24
  textTrimming: boolean;
27
25
  unresponsive: boolean;
28
26
  size: string;
@@ -35,8 +33,6 @@ interface PerBlockState {
35
33
  recommendationProducts: RecommendationProduct[];
36
34
  filterStatus: boolean;
37
35
  filterSelectionDrawerStatus: boolean;
38
- /** Assign Recommendation Strategy drawer visibility (SD-149105) */
39
- assignStrategyDrawerStatus: boolean;
40
36
  filterGroup: number;
41
37
  /** Whether initial API data (filters, algorithms, products) has been fetched for this block */
42
38
  isInitialized: boolean;
@@ -51,7 +47,6 @@ interface PerBlockState {
51
47
  */
52
48
  export interface PerBlockUrlConfig {
53
49
  strategy: string;
54
- strategyId: string;
55
50
  language: string;
56
51
  size: string;
57
52
  productIds: string[];
@@ -64,14 +59,11 @@ export interface PerBlockUrlConfig {
64
59
  currencyThousandSeparator: string;
65
60
  }
66
61
  interface StoreState {
67
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
62
+ recommendationCampaignUrls: Record<string, string>;
68
63
  activePredictiveAlgorithms: number[];
69
64
  languages: Languages;
70
65
  currencyList: Currency[];
71
66
  filterList: FiltersResponse;
72
- strategies: RrsStrategy[];
73
- strategiesLoading: boolean;
74
- strategyUrlTemplates: Record<string, string>;
75
67
  blockStates: Record<number, PerBlockState>;
76
68
  currentRecommendationId: number | null;
77
69
  configVersion: number;
@@ -82,7 +74,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
82
74
  * This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
83
75
  */
84
76
  recommendationConfigs(state: {
85
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
77
+ recommendationCampaignUrls: Record<string, string>;
86
78
  activePredictiveAlgorithms: number[];
87
79
  languages: Languages;
88
80
  currencyList: {
@@ -90,16 +82,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
90
82
  value: string;
91
83
  }[];
92
84
  filterList: FiltersResponse;
93
- strategies: {
94
- [x: string]: unknown;
95
- strategy_id: number;
96
- name: string;
97
- status: string;
98
- suitable_channels: string;
99
- size?: (number | string) | undefined;
100
- }[];
101
- strategiesLoading: boolean;
102
- strategyUrlTemplates: Record<string, string>;
103
85
  blockStates: Record<number, PerBlockState>;
104
86
  currentRecommendationId: number | null;
105
87
  configVersion: number;
@@ -108,7 +90,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
108
90
  * Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
109
91
  */
110
92
  recommendationProducts(state: {
111
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
93
+ recommendationCampaignUrls: Record<string, string>;
112
94
  activePredictiveAlgorithms: number[];
113
95
  languages: Languages;
114
96
  currencyList: {
@@ -116,16 +98,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
116
98
  value: string;
117
99
  }[];
118
100
  filterList: FiltersResponse;
119
- strategies: {
120
- [x: string]: unknown;
121
- strategy_id: number;
122
- name: string;
123
- status: string;
124
- suitable_channels: string;
125
- size?: (number | string) | undefined;
126
- }[];
127
- strategiesLoading: boolean;
128
- strategyUrlTemplates: Record<string, string>;
129
101
  blockStates: Record<number, PerBlockState>;
130
102
  currentRecommendationId: number | null;
131
103
  configVersion: number;
@@ -134,33 +106,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
134
106
  * Proxy getter: delegates to blockStates[currentRecommendationId].filterSelectionDrawerStatus
135
107
  */
136
108
  filterSelectionDrawerStatus(state: {
137
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
138
- activePredictiveAlgorithms: number[];
139
- languages: Languages;
140
- currencyList: {
141
- text: string;
142
- value: string;
143
- }[];
144
- filterList: FiltersResponse;
145
- strategies: {
146
- [x: string]: unknown;
147
- strategy_id: number;
148
- name: string;
149
- status: string;
150
- suitable_channels: string;
151
- size?: (number | string) | undefined;
152
- }[];
153
- strategiesLoading: boolean;
154
- strategyUrlTemplates: Record<string, string>;
155
- blockStates: Record<number, PerBlockState>;
156
- currentRecommendationId: number | null;
157
- configVersion: number;
158
- } & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
159
- /**
160
- * Proxy getter: delegates to blockStates[currentRecommendationId].assignStrategyDrawerStatus
161
- */
162
- assignStrategyDrawerStatus(state: {
163
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
109
+ recommendationCampaignUrls: Record<string, string>;
164
110
  activePredictiveAlgorithms: number[];
165
111
  languages: Languages;
166
112
  currencyList: {
@@ -168,52 +114,15 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
168
114
  value: string;
169
115
  }[];
170
116
  filterList: FiltersResponse;
171
- strategies: {
172
- [x: string]: unknown;
173
- strategy_id: number;
174
- name: string;
175
- status: string;
176
- suitable_channels: string;
177
- size?: (number | string) | undefined;
178
- }[];
179
- strategiesLoading: boolean;
180
- strategyUrlTemplates: Record<string, string>;
181
117
  blockStates: Record<number, PerBlockState>;
182
118
  currentRecommendationId: number | null;
183
119
  configVersion: number;
184
120
  } & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
185
- /**
186
- * The current block's assigned strategy record from the listing,
187
- * or null when nothing is assigned / the strategy is no longer listed.
188
- */
189
- assignedStrategy(state: {
190
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
191
- activePredictiveAlgorithms: number[];
192
- languages: Languages;
193
- currencyList: {
194
- text: string;
195
- value: string;
196
- }[];
197
- filterList: FiltersResponse;
198
- strategies: {
199
- [x: string]: unknown;
200
- strategy_id: number;
201
- name: string;
202
- status: string;
203
- suitable_channels: string;
204
- size?: (number | string) | undefined;
205
- }[];
206
- strategiesLoading: boolean;
207
- strategyUrlTemplates: Record<string, string>;
208
- blockStates: Record<number, PerBlockState>;
209
- currentRecommendationId: number | null;
210
- configVersion: number;
211
- } & import("pinia").PiniaCustomStateProperties<StoreState>): RrsStrategy | null;
212
121
  /**
213
122
  * Proxy getter: delegates to blockStates[currentRecommendationId].filterStatus
214
123
  */
215
124
  filterStatus(state: {
216
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
125
+ recommendationCampaignUrls: Record<string, string>;
217
126
  activePredictiveAlgorithms: number[];
218
127
  languages: Languages;
219
128
  currencyList: {
@@ -221,16 +130,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
221
130
  value: string;
222
131
  }[];
223
132
  filterList: FiltersResponse;
224
- strategies: {
225
- [x: string]: unknown;
226
- strategy_id: number;
227
- name: string;
228
- status: string;
229
- suitable_channels: string;
230
- size?: (number | string) | undefined;
231
- }[];
232
- strategiesLoading: boolean;
233
- strategyUrlTemplates: Record<string, string>;
234
133
  blockStates: Record<number, PerBlockState>;
235
134
  currentRecommendationId: number | null;
236
135
  configVersion: number;
@@ -239,7 +138,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
239
138
  * Proxy getter: delegates to blockStates[currentRecommendationId].filterGroup
240
139
  */
241
140
  filterGroup(state: {
242
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
141
+ recommendationCampaignUrls: Record<string, string>;
243
142
  activePredictiveAlgorithms: number[];
244
143
  languages: Languages;
245
144
  currencyList: {
@@ -247,16 +146,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
247
146
  value: string;
248
147
  }[];
249
148
  filterList: FiltersResponse;
250
- strategies: {
251
- [x: string]: unknown;
252
- strategy_id: number;
253
- name: string;
254
- status: string;
255
- suitable_channels: string;
256
- size?: (number | string) | undefined;
257
- }[];
258
- strategiesLoading: boolean;
259
- strategyUrlTemplates: Record<string, string>;
260
149
  blockStates: Record<number, PerBlockState>;
261
150
  currentRecommendationId: number | null;
262
151
  configVersion: number;
@@ -266,7 +155,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
266
155
  getFilterGroupCount(): number;
267
156
  getUniqueFilterGroups(): number[];
268
157
  getActivePredictiveAlgorithms: (state: {
269
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
158
+ recommendationCampaignUrls: Record<string, string>;
270
159
  activePredictiveAlgorithms: number[];
271
160
  languages: Languages;
272
161
  currencyList: {
@@ -274,16 +163,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
274
163
  value: string;
275
164
  }[];
276
165
  filterList: FiltersResponse;
277
- strategies: {
278
- [x: string]: unknown;
279
- strategy_id: number;
280
- name: string;
281
- status: string;
282
- suitable_channels: string;
283
- size?: (number | string) | undefined;
284
- }[];
285
- strategiesLoading: boolean;
286
- strategyUrlTemplates: Record<string, string>;
287
166
  blockStates: Record<number, PerBlockState>;
288
167
  currentRecommendationId: number | null;
289
168
  configVersion: number;
@@ -292,7 +171,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
292
171
  value: string;
293
172
  }[];
294
173
  getLanguages: (state: {
295
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
174
+ recommendationCampaignUrls: Record<string, string>;
296
175
  activePredictiveAlgorithms: number[];
297
176
  languages: Languages;
298
177
  currencyList: {
@@ -300,16 +179,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
300
179
  value: string;
301
180
  }[];
302
181
  filterList: FiltersResponse;
303
- strategies: {
304
- [x: string]: unknown;
305
- strategy_id: number;
306
- name: string;
307
- status: string;
308
- suitable_channels: string;
309
- size?: (number | string) | undefined;
310
- }[];
311
- strategiesLoading: boolean;
312
- strategyUrlTemplates: Record<string, string>;
313
182
  blockStates: Record<number, PerBlockState>;
314
183
  currentRecommendationId: number | null;
315
184
  configVersion: number;
@@ -318,7 +187,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
318
187
  value: string;
319
188
  }[];
320
189
  getCurrencySymbolList: (state: {
321
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
190
+ recommendationCampaignUrls: Record<string, string>;
322
191
  activePredictiveAlgorithms: number[];
323
192
  languages: Languages;
324
193
  currencyList: {
@@ -326,16 +195,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
326
195
  value: string;
327
196
  }[];
328
197
  filterList: FiltersResponse;
329
- strategies: {
330
- [x: string]: unknown;
331
- strategy_id: number;
332
- name: string;
333
- status: string;
334
- suitable_channels: string;
335
- size?: (number | string) | undefined;
336
- }[];
337
- strategiesLoading: boolean;
338
- strategyUrlTemplates: Record<string, string>;
339
198
  blockStates: Record<number, PerBlockState>;
340
199
  currentRecommendationId: number | null;
341
200
  configVersion: number;
@@ -413,52 +272,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
413
272
  * to the snapshot taken when the drawer was opened.
414
273
  */
415
274
  cancelFilterDrawer(): void;
416
- /**
417
- * Opens the Assign Strategy drawer for the current block.
418
- * Selection state lives in the drawer component until Assign is
419
- * pressed, so closing without assigning needs no snapshot/revert.
420
- */
421
- openAssignStrategyDrawer(): void;
422
- closeAssignStrategyDrawer(): void;
423
- /**
424
- * Fetches the active + EMAIL strategy listing. Always fetches fresh
425
- * (dead-strategy detection and post-create refresh need freshness);
426
- * only concurrent in-flight calls share one request.
427
- */
428
- fetchStrategies(): Promise<void>;
429
- /**
430
- * Resolves a strategy's recommendation endpoint template via
431
- * endpoint-generate, cached per strategy id + revision. Failures throw
432
- * and are NOT cached, so the next attempt retries.
433
- *
434
- * The revision is part of the key because `full_path` bakes in the
435
- * algorithm path and `size=` as they were when it was generated, while
436
- * the listing is deliberately never cached — editing a strategy in the
437
- * panel and re-assigning it here would otherwise call a stale endpoint.
438
- *
439
- * A record with no revision is not cached at all: a `<id>:` key can
440
- * never change, so it would serve the stale template forever — exactly
441
- * what the revision is here to prevent.
442
- */
443
- resolveStrategyUrlTemplate(strategy: RrsStrategy): Promise<string>;
444
- /**
445
- * Assigns a strategy to the current block. The config write is
446
- * synchronous (before any await) so a block switch cannot misdirect
447
- * it; the configVersion bump persists it to node config and triggers
448
- * the product refetch via the coordinator control's subscription.
449
- */
450
- assignStrategy(strategy: RrsStrategy): void;
451
- /**
452
- * Clears the current block's strategy; it falls back to the per-block
453
- * algorithm settings.
454
- *
455
- * `size` goes back to the default rather than staying on the removed
456
- * strategy's count: the Number of Products control is hidden in RRS
457
- * mode (D2), so a block left on the strategy's count would have no UI
458
- * to correct it. The pre-assign count is not restored — that would
459
- * need a persisted snapshot field; tracked for a later phase.
460
- */
461
- removeStrategy(): void;
462
275
  fetchRecommendationCreateData(): Promise<void>;
463
276
  fetchRecommendationFilters(): Promise<void>;
464
277
  addFilterGroup(filterGroup: number): void;
@@ -475,22 +288,5 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
475
288
  hasInvalidBlock(): boolean;
476
289
  fetchRecommendationProducts(): Promise<void>;
477
290
  _doFetchProducts(): Promise<void>;
478
- /**
479
- * Fetches products for a strategy-backed block: listing lookup →
480
- * endpoint-generate template → fill {locale}/{currency}, drop
481
- * {user_id} (resolved at send time) → fetch. Any failure (dead
482
- * strategy, resolution error) falls back to placeholder products.
483
- */
484
- _doFetchStrategyProducts(blockId: number): Promise<void>;
485
- /**
486
- * Writes products to a block's state, padded/clipped to `size` so
487
- * in-place content updates (which compare DOM element count vs
488
- * products.length) succeed:
489
- * - API returned nothing → fill entirely with defaults
490
- * - fewer than requested → pad with dummies
491
- * - more than requested → clip, preventing the renderer from extending
492
- * its slot grid (which would reset migrator-applied styles).
493
- */
494
- _setBlockProducts(blockId: number, products: RecommendationProduct[], size: number): void;
495
291
  }>;
496
292
  export {};
@@ -82,12 +82,6 @@ export interface RecommendationNodeConfig {
82
82
  * Uses existing Filter interface from recommendation types
83
83
  */
84
84
  filters: Filter[];
85
- /**
86
- * Assigned Reusable Recommendation Strategy id (SD-149105).
87
- * '' = no strategy assigned; block uses the per-block settings above.
88
- * When set, algorithm/size/filters/shuffle come from the strategy record.
89
- */
90
- strategyId: string;
91
85
  /**
92
86
  * Layout orientation
93
87
  * - 'grid': Products in a grid, attributes aligned across products
@@ -56,9 +56,6 @@ interface ButtonProps {
56
56
  name: string;
57
57
  label: string;
58
58
  id?: string;
59
- className?: string;
60
- icon?: string;
61
- disabled?: boolean;
62
59
  }
63
60
  /**
64
61
  * Common control for all blocks which includes common UI Elements.
@@ -119,7 +116,7 @@ export declare abstract class CommonControl extends Control {
119
116
  icon?: string;
120
117
  }): string;
121
118
  _GuRadioButton({ name, buttons, id }: RadioButtonProps): string;
122
- _GuButton({ name, label, id, className, icon, disabled }: ButtonProps): string;
119
+ _GuButton({ name, label, id }: ButtonProps): string;
123
120
  _GuIcon({ src, className }: IconProps): string;
124
121
  /**
125
122
  *
@@ -1,9 +1,6 @@
1
- import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams, RrsEndpointGenerateResponse, RrsStrategy } from '@@/Types/recommendation';
1
+ import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams } from '@@/Types/recommendation';
2
2
  export declare const useRecommendationApi: () => {
3
3
  fetchRecommendationCreateData: () => Promise<InitialResponse>;
4
4
  fetchRecommendationFilters: () => Promise<FiltersResponse>;
5
5
  fetchRecommendationProducts: (strategy: string, params: RecommendationProductsParams) => Promise<RecommendationProduct[]>;
6
- fetchRecommendationProductsByUrl: (url: string) => Promise<RecommendationProduct[]>;
7
- fetchRecommendationStrategies: () => Promise<RrsStrategy[]>;
8
- generateStrategyEndpoint: (strategy: RrsStrategy) => Promise<RrsEndpointGenerateResponse>;
9
6
  };