@useinsider/guido 3.16.0-beta.ff4f1bd → 3.16.1-beta.626490d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/@types/config/schemas.js +6 -12
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +30 -31
- package/dist/composables/useRecommendation.js +36 -43
- package/dist/config/migrator/recommendationMigrator.js +4 -6
- package/dist/enums/extensions/recommendationBlock.js +23 -25
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +11 -13
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +90 -112
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +53 -188
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +28 -77
- package/dist/src/@types/config/schemas.d.ts +0 -12
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/useRecommendation.d.ts +0 -1
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -6
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +10 -199
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -6
- package/dist/src/services/recommendationApi.d.ts +1 -4
- package/dist/src/stores/config.d.ts +0 -18
- package/dist/utils/templatePreparation.js +34 -37
- package/package.json +1 -2
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +0 -18
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +0 -61
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -106
- package/dist/node_modules/@useinsider/design-system-organisms/dist/index-5JHlb8rM.js +0 -524
- package/dist/node_modules/@useinsider/design-system-organisms/dist/index.js +0 -8450
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InAccordion.js +0 -174
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBasicTextInput.js +0 -381
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBox.js +0 -236
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBulkActions.js +0 -70
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButton.js +0 -350
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButtonV2.js +0 -371
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCheckBox.js +0 -152
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InChips.js +0 -141
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCustomDropDown.js +0 -1047
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDataTableV2.js +0 -96050
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDatePicker.js +0 -2042
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDrawer.js +0 -166
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDropDown.js +0 -1098
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InIcons.js +0 -55
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InInfoBox.js +0 -265
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLinks.js +0 -184
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLoading.js +0 -50
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InModals.js +0 -453
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InNoData.js +0 -145
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InOnPageMessage.js +0 -176
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InProgress.js +0 -266
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InRadioButton.js +0 -114
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSegments.js +0 -200
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSelect.js +0 -451
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSkeleton.js +0 -49
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InStatusText.js +0 -119
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTabs.js +0 -4309
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTagsText.js +0 -129
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTextInput.js +0 -503
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToasts.js +0 -253
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToggle.js +0 -107
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltip.js +0 -134
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltipV2.js +0 -464
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_commonjsHelpers.BItOPCY9.js +0 -28
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_plugin-vue2_normalizer.WQT2Fc8L.js +0 -23
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/clickOutside.qP9M0QCm.js +0 -29
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/helpers.CgHNyjAJ.js +0 -109
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/index.Bw_06igr.js +0 -2339
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/localLocalesMixin.DYMhydo2.js +0 -16
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/useLocalLocales.Ckuhy7d-.js +0 -17
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/vue-property-decorator.BtlM7Epa.js +0 -188
- package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +0 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -26
- package/dist/src/mock/api/recommendation-strategies.d.ts +0 -41
|
@@ -1,101 +1,52 @@
|
|
|
1
|
-
import { useHttp as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
(
|
|
5
|
-
attributeName:
|
|
6
|
-
attributeJs:
|
|
7
|
-
attributeType:
|
|
8
|
-
type:
|
|
9
|
-
displayName:
|
|
10
|
-
isFilterable:
|
|
11
|
-
},
|
|
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
|
-
),
|
|
14
|
-
const { get:
|
|
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
|
|
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
|
|
26
|
-
|
|
27
|
-
),
|
|
28
|
-
return
|
|
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,
|
|
34
|
-
var
|
|
33
|
+
fetchRecommendationProducts: async (e, n) => {
|
|
34
|
+
var i;
|
|
35
35
|
try {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const m = decodeURIComponent(
|
|
36
|
+
const r = new URLSearchParams(Object.entries(n));
|
|
37
|
+
r.set(l.CLIENT_ID, t);
|
|
38
|
+
const m = decodeURIComponent(r.toString());
|
|
39
39
|
console.debug("🏁 Recommendation API Query:", m);
|
|
40
|
-
const
|
|
41
|
-
`${
|
|
40
|
+
const c = await a(
|
|
41
|
+
`${u.RECOMMENDATION_API_URL}/v2/${e}?${m}`
|
|
42
42
|
);
|
|
43
|
-
return ((
|
|
44
|
-
} catch (o) {
|
|
45
|
-
throw console.error("fetchRecommendationProducts error:", o), o;
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
fetchRecommendationProductsByUrl: async (e) => {
|
|
49
|
-
var r;
|
|
50
|
-
try {
|
|
51
|
-
const t = new URL(e);
|
|
52
|
-
t.searchParams.has(R.CLIENT_ID) || t.searchParams.set(R.CLIENT_ID, i);
|
|
53
|
-
const o = await a(
|
|
54
|
-
decodeURIComponent(t.toString())
|
|
55
|
-
);
|
|
56
|
-
return ((r = o == null ? void 0 : o.data) == null ? void 0 : r.data) ?? [];
|
|
57
|
-
} catch (t) {
|
|
58
|
-
throw console.error("fetchRecommendationProductsByUrl error:", t), t;
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
fetchRecommendationStrategies: async () => {
|
|
62
|
-
try {
|
|
63
|
-
const e = /* @__PURE__ */ new Map();
|
|
64
|
-
let r = 1;
|
|
65
|
-
for (; ; ) {
|
|
66
|
-
const { data: t } = await c(
|
|
67
|
-
`${d.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(l)}&per_page=${y}&page=${r}`
|
|
68
|
-
), o = Array.isArray(t) ? t : (t == null ? void 0 : t.data) ?? [], m = e.size;
|
|
69
|
-
if (o.forEach((n) => e.set(n.strategy_id, n)), o.length < y || e.size === m)
|
|
70
|
-
break;
|
|
71
|
-
r += 1;
|
|
72
|
-
}
|
|
73
|
-
return [...e.values()];
|
|
74
|
-
} catch (e) {
|
|
75
|
-
throw console.error("fetchRecommendationStrategies error:", e), e;
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
generateStrategyEndpoint: async (e) => {
|
|
79
|
-
try {
|
|
80
|
-
const { data: r } = await s(
|
|
81
|
-
`${d.RECOMMENDATION_STRATEGIES_PATH}/endpoint-generate`,
|
|
82
|
-
{
|
|
83
|
-
// Email designs have no campaign yet; backend only needs it
|
|
84
|
-
// for previewer flows.
|
|
85
|
-
campaignId: 0,
|
|
86
|
-
pageTypes: [],
|
|
87
|
-
isPreviewer: !1,
|
|
88
|
-
strategy: e,
|
|
89
|
-
userId: ""
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
return r.data;
|
|
43
|
+
return ((i = c == null ? void 0 : c.data) == null ? void 0 : i.data) ?? [];
|
|
93
44
|
} catch (r) {
|
|
94
|
-
throw console.error("
|
|
45
|
+
throw console.error("fetchRecommendationProducts error:", r), r;
|
|
95
46
|
}
|
|
96
47
|
}
|
|
97
48
|
};
|
|
98
49
|
};
|
|
99
50
|
export {
|
|
100
|
-
|
|
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<{
|
|
@@ -35,9 +35,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
35
35
|
size: "X-small" | "small" | "medium" | "large";
|
|
36
36
|
description: string;
|
|
37
37
|
closeOnOutsideClick: boolean;
|
|
38
|
-
footerStatus: boolean;
|
|
39
38
|
footerButtonOptions: FooterButtonGroup;
|
|
40
39
|
closeButtonStatus: boolean;
|
|
40
|
+
footerStatus: boolean;
|
|
41
41
|
}>;
|
|
42
42
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
43
43
|
export default _default;
|
|
@@ -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;
|
|
@@ -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,
|
|
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,7 +29,6 @@ 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
33
|
getTemplate(): string;
|
|
36
34
|
onRender(): Promise<void>;
|
|
@@ -109,9 +107,8 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
109
107
|
*/
|
|
110
108
|
private _listenStateUpdates;
|
|
111
109
|
/**
|
|
112
|
-
* Persists the current filter
|
|
113
|
-
*
|
|
114
|
-
* (strategyId must be in esd-ext-config before any save — SD-149105).
|
|
110
|
+
* Persists the current filter state from Pinia store to the Stripo node config.
|
|
111
|
+
* This ensures filters survive template save/reload cycles.
|
|
115
112
|
*/
|
|
116
113
|
private _persistFiltersToNodeConfig;
|
|
117
114
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter,
|
|
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,
|
|
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,
|
|
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,
|
|
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,7 +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,
|
|
109
|
+
recommendationCampaignUrls: Record<string, string>;
|
|
138
110
|
activePredictiveAlgorithms: number[];
|
|
139
111
|
languages: Languages;
|
|
140
112
|
currencyList: {
|
|
@@ -142,78 +114,15 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
142
114
|
value: string;
|
|
143
115
|
}[];
|
|
144
116
|
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
117
|
blockStates: Record<number, PerBlockState>;
|
|
156
118
|
currentRecommendationId: number | null;
|
|
157
119
|
configVersion: number;
|
|
158
120
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
159
|
-
/**
|
|
160
|
-
* Proxy getter: delegates to blockStates[currentRecommendationId].assignStrategyDrawerStatus
|
|
161
|
-
*/
|
|
162
|
-
assignStrategyDrawerStatus(state: {
|
|
163
|
-
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
164
|
-
activePredictiveAlgorithms: number[];
|
|
165
|
-
languages: Languages;
|
|
166
|
-
currencyList: {
|
|
167
|
-
text: string;
|
|
168
|
-
value: string;
|
|
169
|
-
}[];
|
|
170
|
-
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
|
-
blockStates: Record<number, PerBlockState>;
|
|
182
|
-
currentRecommendationId: number | null;
|
|
183
|
-
configVersion: number;
|
|
184
|
-
} & 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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,37 +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. Failures throw and are
|
|
432
|
-
* NOT cached, so the next attempt retries.
|
|
433
|
-
*/
|
|
434
|
-
resolveStrategyUrlTemplate(strategy: RrsStrategy): Promise<string>;
|
|
435
|
-
/**
|
|
436
|
-
* Assigns a strategy to the current block. The config write is
|
|
437
|
-
* synchronous (before any await) so a block switch cannot misdirect
|
|
438
|
-
* it; the configVersion bump persists it to node config and triggers
|
|
439
|
-
* the product refetch via the coordinator control's subscription.
|
|
440
|
-
*/
|
|
441
|
-
assignStrategy(strategy: RrsStrategy): void;
|
|
442
|
-
/**
|
|
443
|
-
* Clears the current block's strategy; it falls back to the
|
|
444
|
-
* per-block algorithm settings.
|
|
445
|
-
*/
|
|
446
|
-
removeStrategy(): void;
|
|
447
275
|
fetchRecommendationCreateData(): Promise<void>;
|
|
448
276
|
fetchRecommendationFilters(): Promise<void>;
|
|
449
277
|
addFilterGroup(filterGroup: number): void;
|
|
@@ -460,22 +288,5 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
460
288
|
hasInvalidBlock(): boolean;
|
|
461
289
|
fetchRecommendationProducts(): Promise<void>;
|
|
462
290
|
_doFetchProducts(): Promise<void>;
|
|
463
|
-
/**
|
|
464
|
-
* Fetches products for a strategy-backed block: listing lookup →
|
|
465
|
-
* endpoint-generate template → fill {locale}/{currency}, drop
|
|
466
|
-
* {user_id} (resolved at send time) → fetch. Any failure (dead
|
|
467
|
-
* strategy, resolution error) falls back to placeholder products.
|
|
468
|
-
*/
|
|
469
|
-
_doFetchStrategyProducts(blockId: number): Promise<void>;
|
|
470
|
-
/**
|
|
471
|
-
* Writes products to a block's state, padded/clipped to `size` so
|
|
472
|
-
* in-place content updates (which compare DOM element count vs
|
|
473
|
-
* products.length) succeed:
|
|
474
|
-
* - API returned nothing → fill entirely with defaults
|
|
475
|
-
* - fewer than requested → pad with dummies
|
|
476
|
-
* - more than requested → clip, preventing the renderer from extending
|
|
477
|
-
* its slot grid (which would reset migrator-applied styles).
|
|
478
|
-
*/
|
|
479
|
-
_setBlockProducts(blockId: number, products: RecommendationProduct[], size: number): void;
|
|
480
291
|
}>;
|
|
481
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
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams
|
|
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
|
};
|