@useinsider/guido 3.12.0-beta.98baf2f → 3.12.0-beta.aa6f9ba

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 (82) hide show
  1. package/dist/@types/config/schemas.js +13 -8
  2. package/dist/components/Guido.vue.js +6 -6
  3. package/dist/components/Guido.vue2.js +50 -49
  4. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
  5. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
  6. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
  7. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
  8. package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.js +36 -0
  9. package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue2.js +244 -0
  10. package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.js +18 -0
  11. package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue2.js +42 -0
  12. package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.js +20 -0
  13. package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue2.js +18 -0
  14. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.js +20 -0
  15. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue2.js +60 -0
  16. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.js +19 -0
  17. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue2.js +19 -0
  18. package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.js +22 -0
  19. package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue2.js +29 -0
  20. package/dist/composables/usePreviewInteractionGuard.js +36 -11
  21. package/dist/composables/useRecommendation.js +82 -51
  22. package/dist/composables/useRecommendationPreview.js +61 -60
  23. package/dist/composables/useStrategyFilters.js +16 -0
  24. package/dist/composables/useStripoEventHandler.js +9 -12
  25. package/dist/config/migrator/recommendationMigrator.js +7 -4
  26. package/dist/enums/date.js +4 -3
  27. package/dist/enums/extensions/filteringV2.js +8 -0
  28. package/dist/enums/extensions/recommendationBlock.js +28 -22
  29. package/dist/enums/extensions/strategyDetail.js +148 -0
  30. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  31. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +12 -11
  32. package/dist/extensions/Blocks/Recommendation/controls/blockBackground/index.js +10 -0
  33. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +123 -109
  34. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +146 -0
  35. package/dist/extensions/Blocks/Recommendation/extension.js +23 -21
  36. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +1 -1
  37. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +41 -40
  38. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +256 -102
  39. package/dist/extensions/Blocks/Recommendation/utils/strategyHumanizer.js +97 -0
  40. package/dist/extensions/Blocks/Recommendation/utils/strategySummary.js +10 -0
  41. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +24 -12
  42. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
  43. package/dist/extensions/Blocks/controlFactories.js +125 -75
  44. package/dist/guido.css +1 -1
  45. package/dist/services/recommendationApi.js +72 -29
  46. package/dist/services/stripoApi.js +27 -28
  47. package/dist/src/@types/config/schemas.d.ts +10 -0
  48. package/dist/src/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.d.ts +2 -0
  49. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.d.ts +43 -0
  50. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.d.ts +29 -0
  51. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.d.ts +40 -0
  52. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.d.ts +38 -0
  53. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.d.ts +51 -0
  54. package/dist/src/composables/useConfig.d.ts +2 -0
  55. package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
  56. package/dist/src/composables/useRecommendation.d.ts +2 -0
  57. package/dist/src/composables/useStrategyFilters.d.ts +24 -0
  58. package/dist/src/enums/extensions/filteringV2.d.ts +72 -0
  59. package/dist/src/enums/extensions/recommendationBlock.d.ts +10 -0
  60. package/dist/src/enums/extensions/strategyDetail.d.ts +90 -0
  61. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  62. package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +14 -0
  63. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  64. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -1
  65. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +61 -0
  66. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +606 -1
  67. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +7 -0
  68. package/dist/src/extensions/Blocks/Recommendation/utils/strategyHumanizer.d.ts +50 -0
  69. package/dist/src/extensions/Blocks/Recommendation/utils/strategySummary.d.ts +34 -0
  70. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +3 -1
  71. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
  72. package/dist/src/extensions/Blocks/controlFactories.d.ts +36 -0
  73. package/dist/src/services/recommendationApi.d.ts +7 -1
  74. package/dist/src/stores/config.d.ts +18 -0
  75. package/dist/src/utils/genericUtil.d.ts +9 -0
  76. package/dist/src/utils/urlSchemes.d.ts +6 -0
  77. package/dist/static/styles/base.css.js +15 -0
  78. package/dist/utils/dateUtil.js +23 -10
  79. package/dist/utils/genericUtil.js +10 -1
  80. package/dist/utils/templatePreparation.js +62 -58
  81. package/dist/utils/urlSchemes.js +4 -0
  82. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationProduct } from '@@/Types/recommendation';
1
+ import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationProduct, RrsCampaign, RrsStrategy } from '@@/Types/recommendation';
2
2
  export interface PerBlockConfigs {
3
3
  cardsInRow: number;
4
4
  currencySettings: {
@@ -21,6 +21,8 @@ export interface PerBlockConfigs {
21
21
  sendProductRequestFlag: boolean;
22
22
  shuffleProducts: boolean;
23
23
  strategy: string;
24
+ /** RRS strategy id; empty string when no strategy is assigned */
25
+ strategyId: string;
24
26
  textTrimming: boolean;
25
27
  unresponsive: boolean;
26
28
  size: string;
@@ -33,6 +35,8 @@ interface PerBlockState {
33
35
  recommendationProducts: RecommendationProduct[];
34
36
  filterStatus: boolean;
35
37
  filterSelectionDrawerStatus: boolean;
38
+ /** Whether the RRS detail drawer is open for this block */
39
+ strategyDetailDrawerStatus: boolean;
36
40
  filterGroup: number;
37
41
  /** Whether initial API data (filters, algorithms, products) has been fetched for this block */
38
42
  isInitialized: boolean;
@@ -47,6 +51,8 @@ interface PerBlockState {
47
51
  */
48
52
  export interface PerBlockUrlConfig {
49
53
  strategy: string;
54
+ /** RRS strategy id; empty string when the block still uses an algorithm. */
55
+ strategyId: string;
50
56
  language: string;
51
57
  size: string;
52
58
  productIds: string[];
@@ -64,6 +70,23 @@ interface StoreState {
64
70
  languages: Languages;
65
71
  currencyList: Currency[];
66
72
  filterList: FiltersResponse;
73
+ /** Reusable Recommendation Strategies available to the EMAIL channel */
74
+ strategies: RrsStrategy[];
75
+ /** True while the strategy listing is in flight, so the panel can show a loading state */
76
+ strategiesLoading: boolean;
77
+ /** Campaigns using the strategy currently shown in the detail drawer */
78
+ strategyCampaigns: RrsCampaign[];
79
+ /** True while the campaign list is in flight */
80
+ strategyCampaignsLoading: boolean;
81
+ /** Strategy id `strategyCampaigns` was loaded for; null when nothing is loaded */
82
+ strategyCampaignsFetchedFor: string | null;
83
+ /**
84
+ * Resolved recommendation-URL template per strategy id, with placeholders still
85
+ * unsubstituted. `buildCampaignUrl` is synchronous, so the template has to be
86
+ * cached here before it runs — an empty string records "asked, but the strategy
87
+ * has no usable URL", which stops a broken id being retried on every compile.
88
+ */
89
+ strategyUrlTemplates: Record<string, string>;
67
90
  blockStates: Record<number, PerBlockState>;
68
91
  currentRecommendationId: number | null;
69
92
  configVersion: number;
@@ -82,6 +105,54 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
82
105
  value: string;
83
106
  }[];
84
107
  filterList: FiltersResponse;
108
+ strategies: {
109
+ strategy_id: number;
110
+ name: string;
111
+ algorithm: string;
112
+ status: string;
113
+ size: number;
114
+ suitable_channels: string;
115
+ updated_at: string;
116
+ algorithm_used?: string | undefined;
117
+ exclude_view?: (boolean | number) | undefined;
118
+ exclude_purchase?: (boolean | number) | undefined;
119
+ exclude_cart?: (boolean | number) | undefined;
120
+ filters?: string | undefined;
121
+ manual_merchandising_products?: string | undefined;
122
+ mixed_strategies?: string | undefined;
123
+ suitable_page_types?: (string | string[]) | undefined;
124
+ base_product?: string | undefined;
125
+ checkout_recommendation_cart_value?: (number | string) | undefined;
126
+ shuffle?: (boolean | number) | undefined;
127
+ attribute_affinity?: (boolean | number) | undefined;
128
+ is_user_context_filter_optional?: (boolean | number) | undefined;
129
+ last_updated_by?: string | undefined;
130
+ created_at?: string | undefined;
131
+ exclude_view_option?: string | undefined;
132
+ exclude_view_duration?: number | undefined;
133
+ exclude_view_duration_type?: string | undefined;
134
+ exclude_view_item_count?: number | undefined;
135
+ exclude_purchase_option?: string | undefined;
136
+ exclude_purchase_duration?: number | undefined;
137
+ exclude_purchase_duration_type?: string | undefined;
138
+ exclude_purchase_item_count?: number | undefined;
139
+ }[];
140
+ strategiesLoading: boolean;
141
+ strategyCampaigns: {
142
+ id: string | number;
143
+ name: string;
144
+ status: string;
145
+ variants: {
146
+ id?: (number | string) | undefined;
147
+ name: string;
148
+ }[];
149
+ channel: string;
150
+ productAlias?: string | undefined;
151
+ isPreventing?: boolean | undefined;
152
+ }[];
153
+ strategyCampaignsLoading: boolean;
154
+ strategyCampaignsFetchedFor: string | null;
155
+ strategyUrlTemplates: Record<string, string>;
85
156
  blockStates: Record<number, PerBlockState>;
86
157
  currentRecommendationId: number | null;
87
158
  configVersion: number;
@@ -98,6 +169,54 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
98
169
  value: string;
99
170
  }[];
100
171
  filterList: FiltersResponse;
172
+ strategies: {
173
+ strategy_id: number;
174
+ name: string;
175
+ algorithm: string;
176
+ status: string;
177
+ size: number;
178
+ suitable_channels: string;
179
+ updated_at: string;
180
+ algorithm_used?: string | undefined;
181
+ exclude_view?: (boolean | number) | undefined;
182
+ exclude_purchase?: (boolean | number) | undefined;
183
+ exclude_cart?: (boolean | number) | undefined;
184
+ filters?: string | undefined;
185
+ manual_merchandising_products?: string | undefined;
186
+ mixed_strategies?: string | undefined;
187
+ suitable_page_types?: (string | string[]) | undefined;
188
+ base_product?: string | undefined;
189
+ checkout_recommendation_cart_value?: (number | string) | undefined;
190
+ shuffle?: (boolean | number) | undefined;
191
+ attribute_affinity?: (boolean | number) | undefined;
192
+ is_user_context_filter_optional?: (boolean | number) | undefined;
193
+ last_updated_by?: string | undefined;
194
+ created_at?: string | undefined;
195
+ exclude_view_option?: string | undefined;
196
+ exclude_view_duration?: number | undefined;
197
+ exclude_view_duration_type?: string | undefined;
198
+ exclude_view_item_count?: number | undefined;
199
+ exclude_purchase_option?: string | undefined;
200
+ exclude_purchase_duration?: number | undefined;
201
+ exclude_purchase_duration_type?: string | undefined;
202
+ exclude_purchase_item_count?: number | undefined;
203
+ }[];
204
+ strategiesLoading: boolean;
205
+ strategyCampaigns: {
206
+ id: string | number;
207
+ name: string;
208
+ status: string;
209
+ variants: {
210
+ id?: (number | string) | undefined;
211
+ name: string;
212
+ }[];
213
+ channel: string;
214
+ productAlias?: string | undefined;
215
+ isPreventing?: boolean | undefined;
216
+ }[];
217
+ strategyCampaignsLoading: boolean;
218
+ strategyCampaignsFetchedFor: string | null;
219
+ strategyUrlTemplates: Record<string, string>;
101
220
  blockStates: Record<number, PerBlockState>;
102
221
  currentRecommendationId: number | null;
103
222
  configVersion: number;
@@ -114,6 +233,118 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
114
233
  value: string;
115
234
  }[];
116
235
  filterList: FiltersResponse;
236
+ strategies: {
237
+ strategy_id: number;
238
+ name: string;
239
+ algorithm: string;
240
+ status: string;
241
+ size: number;
242
+ suitable_channels: string;
243
+ updated_at: string;
244
+ algorithm_used?: string | undefined;
245
+ exclude_view?: (boolean | number) | undefined;
246
+ exclude_purchase?: (boolean | number) | undefined;
247
+ exclude_cart?: (boolean | number) | undefined;
248
+ filters?: string | undefined;
249
+ manual_merchandising_products?: string | undefined;
250
+ mixed_strategies?: string | undefined;
251
+ suitable_page_types?: (string | string[]) | undefined;
252
+ base_product?: string | undefined;
253
+ checkout_recommendation_cart_value?: (number | string) | undefined;
254
+ shuffle?: (boolean | number) | undefined;
255
+ attribute_affinity?: (boolean | number) | undefined;
256
+ is_user_context_filter_optional?: (boolean | number) | undefined;
257
+ last_updated_by?: string | undefined;
258
+ created_at?: string | undefined;
259
+ exclude_view_option?: string | undefined;
260
+ exclude_view_duration?: number | undefined;
261
+ exclude_view_duration_type?: string | undefined;
262
+ exclude_view_item_count?: number | undefined;
263
+ exclude_purchase_option?: string | undefined;
264
+ exclude_purchase_duration?: number | undefined;
265
+ exclude_purchase_duration_type?: string | undefined;
266
+ exclude_purchase_item_count?: number | undefined;
267
+ }[];
268
+ strategiesLoading: boolean;
269
+ strategyCampaigns: {
270
+ id: string | number;
271
+ name: string;
272
+ status: string;
273
+ variants: {
274
+ id?: (number | string) | undefined;
275
+ name: string;
276
+ }[];
277
+ channel: string;
278
+ productAlias?: string | undefined;
279
+ isPreventing?: boolean | undefined;
280
+ }[];
281
+ strategyCampaignsLoading: boolean;
282
+ strategyCampaignsFetchedFor: string | null;
283
+ strategyUrlTemplates: Record<string, string>;
284
+ blockStates: Record<number, PerBlockState>;
285
+ currentRecommendationId: number | null;
286
+ configVersion: number;
287
+ } & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
288
+ /**
289
+ * Proxy getter: delegates to blockStates[currentRecommendationId].strategyDetailDrawerStatus
290
+ */
291
+ strategyDetailDrawerStatus(state: {
292
+ recommendationCampaignUrls: Record<string, string>;
293
+ activePredictiveAlgorithms: number[];
294
+ languages: Languages;
295
+ currencyList: {
296
+ text: string;
297
+ value: string;
298
+ }[];
299
+ filterList: FiltersResponse;
300
+ strategies: {
301
+ strategy_id: number;
302
+ name: string;
303
+ algorithm: string;
304
+ status: string;
305
+ size: number;
306
+ suitable_channels: string;
307
+ updated_at: string;
308
+ algorithm_used?: string | undefined;
309
+ exclude_view?: (boolean | number) | undefined;
310
+ exclude_purchase?: (boolean | number) | undefined;
311
+ exclude_cart?: (boolean | number) | undefined;
312
+ filters?: string | undefined;
313
+ manual_merchandising_products?: string | undefined;
314
+ mixed_strategies?: string | undefined;
315
+ suitable_page_types?: (string | string[]) | undefined;
316
+ base_product?: string | undefined;
317
+ checkout_recommendation_cart_value?: (number | string) | undefined;
318
+ shuffle?: (boolean | number) | undefined;
319
+ attribute_affinity?: (boolean | number) | undefined;
320
+ is_user_context_filter_optional?: (boolean | number) | undefined;
321
+ last_updated_by?: string | undefined;
322
+ created_at?: string | undefined;
323
+ exclude_view_option?: string | undefined;
324
+ exclude_view_duration?: number | undefined;
325
+ exclude_view_duration_type?: string | undefined;
326
+ exclude_view_item_count?: number | undefined;
327
+ exclude_purchase_option?: string | undefined;
328
+ exclude_purchase_duration?: number | undefined;
329
+ exclude_purchase_duration_type?: string | undefined;
330
+ exclude_purchase_item_count?: number | undefined;
331
+ }[];
332
+ strategiesLoading: boolean;
333
+ strategyCampaigns: {
334
+ id: string | number;
335
+ name: string;
336
+ status: string;
337
+ variants: {
338
+ id?: (number | string) | undefined;
339
+ name: string;
340
+ }[];
341
+ channel: string;
342
+ productAlias?: string | undefined;
343
+ isPreventing?: boolean | undefined;
344
+ }[];
345
+ strategyCampaignsLoading: boolean;
346
+ strategyCampaignsFetchedFor: string | null;
347
+ strategyUrlTemplates: Record<string, string>;
117
348
  blockStates: Record<number, PerBlockState>;
118
349
  currentRecommendationId: number | null;
119
350
  configVersion: number;
@@ -130,6 +361,54 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
130
361
  value: string;
131
362
  }[];
132
363
  filterList: FiltersResponse;
364
+ strategies: {
365
+ strategy_id: number;
366
+ name: string;
367
+ algorithm: string;
368
+ status: string;
369
+ size: number;
370
+ suitable_channels: string;
371
+ updated_at: string;
372
+ algorithm_used?: string | undefined;
373
+ exclude_view?: (boolean | number) | undefined;
374
+ exclude_purchase?: (boolean | number) | undefined;
375
+ exclude_cart?: (boolean | number) | undefined;
376
+ filters?: string | undefined;
377
+ manual_merchandising_products?: string | undefined;
378
+ mixed_strategies?: string | undefined;
379
+ suitable_page_types?: (string | string[]) | undefined;
380
+ base_product?: string | undefined;
381
+ checkout_recommendation_cart_value?: (number | string) | undefined;
382
+ shuffle?: (boolean | number) | undefined;
383
+ attribute_affinity?: (boolean | number) | undefined;
384
+ is_user_context_filter_optional?: (boolean | number) | undefined;
385
+ last_updated_by?: string | undefined;
386
+ created_at?: string | undefined;
387
+ exclude_view_option?: string | undefined;
388
+ exclude_view_duration?: number | undefined;
389
+ exclude_view_duration_type?: string | undefined;
390
+ exclude_view_item_count?: number | undefined;
391
+ exclude_purchase_option?: string | undefined;
392
+ exclude_purchase_duration?: number | undefined;
393
+ exclude_purchase_duration_type?: string | undefined;
394
+ exclude_purchase_item_count?: number | undefined;
395
+ }[];
396
+ strategiesLoading: boolean;
397
+ strategyCampaigns: {
398
+ id: string | number;
399
+ name: string;
400
+ status: string;
401
+ variants: {
402
+ id?: (number | string) | undefined;
403
+ name: string;
404
+ }[];
405
+ channel: string;
406
+ productAlias?: string | undefined;
407
+ isPreventing?: boolean | undefined;
408
+ }[];
409
+ strategyCampaignsLoading: boolean;
410
+ strategyCampaignsFetchedFor: string | null;
411
+ strategyUrlTemplates: Record<string, string>;
133
412
  blockStates: Record<number, PerBlockState>;
134
413
  currentRecommendationId: number | null;
135
414
  configVersion: number;
@@ -146,6 +425,54 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
146
425
  value: string;
147
426
  }[];
148
427
  filterList: FiltersResponse;
428
+ strategies: {
429
+ strategy_id: number;
430
+ name: string;
431
+ algorithm: string;
432
+ status: string;
433
+ size: number;
434
+ suitable_channels: string;
435
+ updated_at: string;
436
+ algorithm_used?: string | undefined;
437
+ exclude_view?: (boolean | number) | undefined;
438
+ exclude_purchase?: (boolean | number) | undefined;
439
+ exclude_cart?: (boolean | number) | undefined;
440
+ filters?: string | undefined;
441
+ manual_merchandising_products?: string | undefined;
442
+ mixed_strategies?: string | undefined;
443
+ suitable_page_types?: (string | string[]) | undefined;
444
+ base_product?: string | undefined;
445
+ checkout_recommendation_cart_value?: (number | string) | undefined;
446
+ shuffle?: (boolean | number) | undefined;
447
+ attribute_affinity?: (boolean | number) | undefined;
448
+ is_user_context_filter_optional?: (boolean | number) | undefined;
449
+ last_updated_by?: string | undefined;
450
+ created_at?: string | undefined;
451
+ exclude_view_option?: string | undefined;
452
+ exclude_view_duration?: number | undefined;
453
+ exclude_view_duration_type?: string | undefined;
454
+ exclude_view_item_count?: number | undefined;
455
+ exclude_purchase_option?: string | undefined;
456
+ exclude_purchase_duration?: number | undefined;
457
+ exclude_purchase_duration_type?: string | undefined;
458
+ exclude_purchase_item_count?: number | undefined;
459
+ }[];
460
+ strategiesLoading: boolean;
461
+ strategyCampaigns: {
462
+ id: string | number;
463
+ name: string;
464
+ status: string;
465
+ variants: {
466
+ id?: (number | string) | undefined;
467
+ name: string;
468
+ }[];
469
+ channel: string;
470
+ productAlias?: string | undefined;
471
+ isPreventing?: boolean | undefined;
472
+ }[];
473
+ strategyCampaignsLoading: boolean;
474
+ strategyCampaignsFetchedFor: string | null;
475
+ strategyUrlTemplates: Record<string, string>;
149
476
  blockStates: Record<number, PerBlockState>;
150
477
  currentRecommendationId: number | null;
151
478
  configVersion: number;
@@ -163,6 +490,54 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
163
490
  value: string;
164
491
  }[];
165
492
  filterList: FiltersResponse;
493
+ strategies: {
494
+ strategy_id: number;
495
+ name: string;
496
+ algorithm: string;
497
+ status: string;
498
+ size: number;
499
+ suitable_channels: string;
500
+ updated_at: string;
501
+ algorithm_used?: string | undefined;
502
+ exclude_view?: (boolean | number) | undefined;
503
+ exclude_purchase?: (boolean | number) | undefined;
504
+ exclude_cart?: (boolean | number) | undefined;
505
+ filters?: string | undefined;
506
+ manual_merchandising_products?: string | undefined;
507
+ mixed_strategies?: string | undefined;
508
+ suitable_page_types?: (string | string[]) | undefined;
509
+ base_product?: string | undefined;
510
+ checkout_recommendation_cart_value?: (number | string) | undefined;
511
+ shuffle?: (boolean | number) | undefined;
512
+ attribute_affinity?: (boolean | number) | undefined;
513
+ is_user_context_filter_optional?: (boolean | number) | undefined;
514
+ last_updated_by?: string | undefined;
515
+ created_at?: string | undefined;
516
+ exclude_view_option?: string | undefined;
517
+ exclude_view_duration?: number | undefined;
518
+ exclude_view_duration_type?: string | undefined;
519
+ exclude_view_item_count?: number | undefined;
520
+ exclude_purchase_option?: string | undefined;
521
+ exclude_purchase_duration?: number | undefined;
522
+ exclude_purchase_duration_type?: string | undefined;
523
+ exclude_purchase_item_count?: number | undefined;
524
+ }[];
525
+ strategiesLoading: boolean;
526
+ strategyCampaigns: {
527
+ id: string | number;
528
+ name: string;
529
+ status: string;
530
+ variants: {
531
+ id?: (number | string) | undefined;
532
+ name: string;
533
+ }[];
534
+ channel: string;
535
+ productAlias?: string | undefined;
536
+ isPreventing?: boolean | undefined;
537
+ }[];
538
+ strategyCampaignsLoading: boolean;
539
+ strategyCampaignsFetchedFor: string | null;
540
+ strategyUrlTemplates: Record<string, string>;
166
541
  blockStates: Record<number, PerBlockState>;
167
542
  currentRecommendationId: number | null;
168
543
  configVersion: number;
@@ -170,6 +545,99 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
170
545
  text: string;
171
546
  value: string;
172
547
  }[];
548
+ /**
549
+ * Reusable Recommendation Strategies as dropdown options.
550
+ *
551
+ * Unlike algorithms, strategy ids come straight from Smart Recommender —
552
+ * there is no local id→key table to join against.
553
+ */
554
+ getStrategyOptions: (state: {
555
+ recommendationCampaignUrls: Record<string, string>;
556
+ activePredictiveAlgorithms: number[];
557
+ languages: Languages;
558
+ currencyList: {
559
+ text: string;
560
+ value: string;
561
+ }[];
562
+ filterList: FiltersResponse;
563
+ strategies: {
564
+ strategy_id: number;
565
+ name: string;
566
+ algorithm: string;
567
+ status: string;
568
+ size: number;
569
+ suitable_channels: string;
570
+ updated_at: string;
571
+ algorithm_used?: string | undefined;
572
+ exclude_view?: (boolean | number) | undefined;
573
+ exclude_purchase?: (boolean | number) | undefined;
574
+ exclude_cart?: (boolean | number) | undefined;
575
+ filters?: string | undefined;
576
+ manual_merchandising_products?: string | undefined;
577
+ mixed_strategies?: string | undefined;
578
+ suitable_page_types?: (string | string[]) | undefined;
579
+ base_product?: string | undefined;
580
+ checkout_recommendation_cart_value?: (number | string) | undefined;
581
+ shuffle?: (boolean | number) | undefined;
582
+ attribute_affinity?: (boolean | number) | undefined;
583
+ is_user_context_filter_optional?: (boolean | number) | undefined;
584
+ last_updated_by?: string | undefined;
585
+ created_at?: string | undefined;
586
+ exclude_view_option?: string | undefined;
587
+ exclude_view_duration?: number | undefined;
588
+ exclude_view_duration_type?: string | undefined;
589
+ exclude_view_item_count?: number | undefined;
590
+ exclude_purchase_option?: string | undefined;
591
+ exclude_purchase_duration?: number | undefined;
592
+ exclude_purchase_duration_type?: string | undefined;
593
+ exclude_purchase_item_count?: number | undefined;
594
+ }[];
595
+ strategiesLoading: boolean;
596
+ strategyCampaigns: {
597
+ id: string | number;
598
+ name: string;
599
+ status: string;
600
+ variants: {
601
+ id?: (number | string) | undefined;
602
+ name: string;
603
+ }[];
604
+ channel: string;
605
+ productAlias?: string | undefined;
606
+ isPreventing?: boolean | undefined;
607
+ }[];
608
+ strategyCampaignsLoading: boolean;
609
+ strategyCampaignsFetchedFor: string | null;
610
+ strategyUrlTemplates: Record<string, string>;
611
+ blockStates: Record<number, PerBlockState>;
612
+ currentRecommendationId: number | null;
613
+ configVersion: number;
614
+ } & import("pinia").PiniaCustomStateProperties<StoreState>) => {
615
+ text: string;
616
+ value: string;
617
+ }[];
618
+ /**
619
+ * The current block's selected strategy, or null when none is selected
620
+ * or the selected id is no longer in the listing.
621
+ *
622
+ * A null return with a non-empty `strategyId` means the strategy was
623
+ * deleted in Smart Recommender after this block was configured — the
624
+ * panel flags that rather than silently clearing the selection.
625
+ */
626
+ getSelectedStrategy(): RrsStrategy | null;
627
+ /**
628
+ * Whether the RRS feature is enabled for this editor.
629
+ *
630
+ * Read through a getter so `hasInvalidBlock` can pass the store straight to
631
+ * the required-field descriptors, which need the flag to decide whether a
632
+ * missing strategy blocks the save.
633
+ */
634
+ isRrsEnabled(): boolean;
635
+ /**
636
+ * True when a strategy id is set but absent from the fetched listing.
637
+ *
638
+ * Guarded on the listing having loaded — mid-fetch every id looks missing.
639
+ */
640
+ hasMissingStrategy(): boolean;
173
641
  getLanguages: (state: {
174
642
  recommendationCampaignUrls: Record<string, string>;
175
643
  activePredictiveAlgorithms: number[];
@@ -179,6 +647,54 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
179
647
  value: string;
180
648
  }[];
181
649
  filterList: FiltersResponse;
650
+ strategies: {
651
+ strategy_id: number;
652
+ name: string;
653
+ algorithm: string;
654
+ status: string;
655
+ size: number;
656
+ suitable_channels: string;
657
+ updated_at: string;
658
+ algorithm_used?: string | undefined;
659
+ exclude_view?: (boolean | number) | undefined;
660
+ exclude_purchase?: (boolean | number) | undefined;
661
+ exclude_cart?: (boolean | number) | undefined;
662
+ filters?: string | undefined;
663
+ manual_merchandising_products?: string | undefined;
664
+ mixed_strategies?: string | undefined;
665
+ suitable_page_types?: (string | string[]) | undefined;
666
+ base_product?: string | undefined;
667
+ checkout_recommendation_cart_value?: (number | string) | undefined;
668
+ shuffle?: (boolean | number) | undefined;
669
+ attribute_affinity?: (boolean | number) | undefined;
670
+ is_user_context_filter_optional?: (boolean | number) | undefined;
671
+ last_updated_by?: string | undefined;
672
+ created_at?: string | undefined;
673
+ exclude_view_option?: string | undefined;
674
+ exclude_view_duration?: number | undefined;
675
+ exclude_view_duration_type?: string | undefined;
676
+ exclude_view_item_count?: number | undefined;
677
+ exclude_purchase_option?: string | undefined;
678
+ exclude_purchase_duration?: number | undefined;
679
+ exclude_purchase_duration_type?: string | undefined;
680
+ exclude_purchase_item_count?: number | undefined;
681
+ }[];
682
+ strategiesLoading: boolean;
683
+ strategyCampaigns: {
684
+ id: string | number;
685
+ name: string;
686
+ status: string;
687
+ variants: {
688
+ id?: (number | string) | undefined;
689
+ name: string;
690
+ }[];
691
+ channel: string;
692
+ productAlias?: string | undefined;
693
+ isPreventing?: boolean | undefined;
694
+ }[];
695
+ strategyCampaignsLoading: boolean;
696
+ strategyCampaignsFetchedFor: string | null;
697
+ strategyUrlTemplates: Record<string, string>;
182
698
  blockStates: Record<number, PerBlockState>;
183
699
  currentRecommendationId: number | null;
184
700
  configVersion: number;
@@ -195,6 +711,54 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
195
711
  value: string;
196
712
  }[];
197
713
  filterList: FiltersResponse;
714
+ strategies: {
715
+ strategy_id: number;
716
+ name: string;
717
+ algorithm: string;
718
+ status: string;
719
+ size: number;
720
+ suitable_channels: string;
721
+ updated_at: string;
722
+ algorithm_used?: string | undefined;
723
+ exclude_view?: (boolean | number) | undefined;
724
+ exclude_purchase?: (boolean | number) | undefined;
725
+ exclude_cart?: (boolean | number) | undefined;
726
+ filters?: string | undefined;
727
+ manual_merchandising_products?: string | undefined;
728
+ mixed_strategies?: string | undefined;
729
+ suitable_page_types?: (string | string[]) | undefined;
730
+ base_product?: string | undefined;
731
+ checkout_recommendation_cart_value?: (number | string) | undefined;
732
+ shuffle?: (boolean | number) | undefined;
733
+ attribute_affinity?: (boolean | number) | undefined;
734
+ is_user_context_filter_optional?: (boolean | number) | undefined;
735
+ last_updated_by?: string | undefined;
736
+ created_at?: string | undefined;
737
+ exclude_view_option?: string | undefined;
738
+ exclude_view_duration?: number | undefined;
739
+ exclude_view_duration_type?: string | undefined;
740
+ exclude_view_item_count?: number | undefined;
741
+ exclude_purchase_option?: string | undefined;
742
+ exclude_purchase_duration?: number | undefined;
743
+ exclude_purchase_duration_type?: string | undefined;
744
+ exclude_purchase_item_count?: number | undefined;
745
+ }[];
746
+ strategiesLoading: boolean;
747
+ strategyCampaigns: {
748
+ id: string | number;
749
+ name: string;
750
+ status: string;
751
+ variants: {
752
+ id?: (number | string) | undefined;
753
+ name: string;
754
+ }[];
755
+ channel: string;
756
+ productAlias?: string | undefined;
757
+ isPreventing?: boolean | undefined;
758
+ }[];
759
+ strategyCampaignsLoading: boolean;
760
+ strategyCampaignsFetchedFor: string | null;
761
+ strategyUrlTemplates: Record<string, string>;
198
762
  blockStates: Record<number, PerBlockState>;
199
763
  currentRecommendationId: number | null;
200
764
  configVersion: number;
@@ -267,12 +831,53 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
267
831
  * Called after successful apply — discards the snapshot.
268
832
  */
269
833
  closeFilterDrawer(): void;
834
+ /**
835
+ * Opens the RRS detail drawer for the current block.
836
+ *
837
+ * Unlike the filter drawer this takes no snapshot — the drawer is
838
+ * read-only, so there is nothing to revert on close.
839
+ */
840
+ openStrategyDrawer(): void;
841
+ /**
842
+ * Closes the RRS detail drawer for the current block and drops the campaign
843
+ * list, so reopening on a different strategy never flashes stale rows.
844
+ */
845
+ closeStrategyDrawer(): void;
846
+ /** Drops the campaign list and lets the next open refetch. */
847
+ clearStrategyCampaigns(): void;
848
+ /**
849
+ * Resolve and cache a strategy's recommendation-URL template.
850
+ *
851
+ * Must be awaited before `buildCampaignUrl` runs for a strategy-driven block,
852
+ * because that builder is synchronous and can only read what is already
853
+ * cached. Safe to call repeatedly: a cached id (including one cached as the
854
+ * empty string after a failure) short-circuits, and concurrent callers for
855
+ * the same id share one request.
856
+ */
857
+ fetchStrategyUrlTemplate(strategyId: string): Promise<void>;
858
+ /**
859
+ * Fetch the campaigns a strategy is used in, for the drawer's second tab.
860
+ *
861
+ * Lazy and once-per-strategy: the caller invokes this only while the drawer is
862
+ * open on that tab, and a repeat call for the same id is a no-op. A version
863
+ * counter discards a response that arrives after the user switched strategies,
864
+ * which would otherwise show one strategy's campaigns under another's name.
865
+ */
866
+ fetchStrategyCampaigns(strategyId: string): Promise<void>;
270
867
  /**
271
868
  * Cancels the filter selection drawer and reverts filters
272
869
  * to the snapshot taken when the drawer was opened.
273
870
  */
274
871
  cancelFilterDrawer(): void;
275
872
  fetchRecommendationCreateData(): Promise<void>;
873
+ /**
874
+ * Fetch the partner's Reusable Recommendation Strategies for the EMAIL channel.
875
+ *
876
+ * Same cache-guard + in-flight dedupe shape as fetchRecommendationCreateData.
877
+ * A failure leaves `strategies` empty so the dropdown renders empty rather
878
+ * than blocking the panel — the block keeps working on its algorithm.
879
+ */
880
+ fetchRecommendationStrategies(): Promise<void>;
276
881
  fetchRecommendationFilters(): Promise<void>;
277
882
  addFilterGroup(filterGroup: number): void;
278
883
  deleteFilterGroup(groupId: number): void;