@useinsider/guido 3.18.2-beta.32d291d → 3.18.2-beta.345283a
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 +3 -21
- package/dist/@types/config/schemas.js +51 -59
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +53 -55
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +57 -82
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +22 -24
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +24 -28
- package/dist/composables/useCustomInterfaceAppearance.js +42 -46
- package/dist/enums/extensions/recommendationBlock.js +31 -40
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +76 -77
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +28 -72
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +44 -45
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +46 -110
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +7 -7
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +37 -46
- package/dist/src/@types/config/schemas.d.ts +0 -16
- package/dist/src/composables/useConfig.d.ts +0 -4
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -70
- package/dist/src/services/recommendationApi.d.ts +1 -2
- package/dist/src/stores/config.d.ts +0 -322
- package/dist/src/stores/onboarding.d.ts +10 -808
- package/dist/static/styles/components/recommendation-strategy.css.js +5 -70
- package/dist/stores/config.js +60 -74
- package/dist/stores/onboarding.js +36 -46
- package/package.json +2 -2
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +0 -46
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +0 -46
- package/dist/composables/useLegacyStrategyConversion.js +0 -61
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -42
- package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -32
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
- package/dist/static/assets/icons/line-info.svg.js +0 -5
|
@@ -1,100 +1,91 @@
|
|
|
1
|
-
import { useHttp as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
(s,
|
|
5
|
-
attributeName:
|
|
6
|
-
attributeJs:
|
|
7
|
-
attributeType:
|
|
8
|
-
type:
|
|
9
|
-
displayName:
|
|
10
|
-
isFilterable:
|
|
1
|
+
import { useHttp as l } from "../composables/useHttp.js";
|
|
2
|
+
import { URLS as m, QUERY_PARAMS as u } from "../enums/extensions/recommendationBlock.js";
|
|
3
|
+
const y = "[sr_strategies.status][=][active]*[sr_strategies.suitable_channels][~][EMAIL]", R = (c) => c.reduce(
|
|
4
|
+
(s, r, i) => (s[i] = {
|
|
5
|
+
attributeName: r.attributeName,
|
|
6
|
+
attributeJs: r.attributeJs,
|
|
7
|
+
attributeType: r.attributeType,
|
|
8
|
+
type: r.type,
|
|
9
|
+
displayName: r.displayName,
|
|
10
|
+
isFilterable: r.isFilterable
|
|
11
11
|
}, s),
|
|
12
12
|
{}
|
|
13
|
-
),
|
|
14
|
-
const { get:
|
|
13
|
+
), _ = () => {
|
|
14
|
+
const { get: c, post: s } = l(), { get: r } = l({ headers: {} }), i = "6KcLM9TwheVB1mgK";
|
|
15
15
|
return {
|
|
16
16
|
fetchRecommendationCreateData: async () => {
|
|
17
17
|
try {
|
|
18
|
-
return (await
|
|
18
|
+
return (await c("/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 c(
|
|
26
|
+
m.PRODUCT_ATTRIBUTES_PATH
|
|
27
|
+
), o = Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
|
|
28
|
+
return R(o);
|
|
29
29
|
} catch (e) {
|
|
30
30
|
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
fetchRecommendationProducts: async (e,
|
|
33
|
+
fetchRecommendationProducts: async (e, o) => {
|
|
34
34
|
var t;
|
|
35
35
|
try {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
console.debug("🏁 Recommendation API Query:",
|
|
40
|
-
const
|
|
41
|
-
`${
|
|
36
|
+
const n = new URLSearchParams(Object.entries(o));
|
|
37
|
+
n.set(u.CLIENT_ID, i);
|
|
38
|
+
const d = decodeURIComponent(n.toString());
|
|
39
|
+
console.debug("🏁 Recommendation API Query:", d);
|
|
40
|
+
const a = await r(
|
|
41
|
+
`${m.RECOMMENDATION_API_URL}/v2/${e}?${d}`
|
|
42
42
|
);
|
|
43
|
-
return ((t =
|
|
44
|
-
} catch (
|
|
45
|
-
throw console.error("fetchRecommendationProducts error:",
|
|
43
|
+
return ((t = a == null ? void 0 : a.data) == null ? void 0 : t.data) ?? [];
|
|
44
|
+
} catch (n) {
|
|
45
|
+
throw console.error("fetchRecommendationProducts error:", n), n;
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
fetchRecommendationProductsByUrl: async (e) => {
|
|
49
|
-
var
|
|
49
|
+
var o;
|
|
50
50
|
try {
|
|
51
|
-
const t = new RegExp(`[?&]${u.CLIENT_ID}=`).test(e),
|
|
52
|
-
|
|
51
|
+
const t = new RegExp(`[?&]${u.CLIENT_ID}=`).test(e), n = e.includes("?") ? "&" : "?", d = t ? e : `${e}${n}${u.CLIENT_ID}=${i}`, a = await r(
|
|
52
|
+
d
|
|
53
53
|
);
|
|
54
|
-
return ((
|
|
54
|
+
return ((o = a == null ? void 0 : a.data) == null ? void 0 : o.data) ?? [];
|
|
55
55
|
} catch (t) {
|
|
56
56
|
return console.error("fetchRecommendationProductsByUrl error:", t), [];
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
fetchRecommendationStrategies: async () => {
|
|
60
60
|
try {
|
|
61
|
-
const { data: e } = await
|
|
62
|
-
`${
|
|
61
|
+
const { data: e } = await c(
|
|
62
|
+
`${m.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(y)}`
|
|
63
63
|
);
|
|
64
64
|
return Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
|
|
65
65
|
} catch (e) {
|
|
66
66
|
throw console.error("fetchRecommendationStrategies error:", e), e;
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
generateStrategyEndpoint: async (e,
|
|
69
|
+
generateStrategyEndpoint: async (e, o) => {
|
|
70
70
|
try {
|
|
71
71
|
const { data: t } = await s(
|
|
72
|
-
`${
|
|
72
|
+
`${m.RECOMMENDATION_STRATEGIES_PATH}/endpoint-generate`,
|
|
73
73
|
{
|
|
74
74
|
campaignId: 0,
|
|
75
75
|
pageTypes: [],
|
|
76
76
|
isPreviewer: !1,
|
|
77
77
|
strategy: e,
|
|
78
78
|
userId: "",
|
|
79
|
-
currency:
|
|
79
|
+
currency: o
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
82
|
return !t || typeof t != "object" || !("full_path" in t || "data" in t) ? (console.error("generateStrategyEndpoint unexpected response shape:", t), null) : "full_path" in t ? t : t.data;
|
|
83
83
|
} catch (t) {
|
|
84
84
|
return console.error("generateStrategyEndpoint error:", t), null;
|
|
85
85
|
}
|
|
86
|
-
},
|
|
87
|
-
migrateLegacyStrategy: async (e, n = { scope: "campaign" }) => {
|
|
88
|
-
const { data: t } = await s(
|
|
89
|
-
R[n.scope],
|
|
90
|
-
e
|
|
91
|
-
), { strategyId: o } = h(t) ?? {};
|
|
92
|
-
if (o == null || o === "")
|
|
93
|
-
throw new Error("[Guido] migrate-strategies returned no strategyId");
|
|
94
|
-
return String(o);
|
|
95
86
|
}
|
|
96
87
|
};
|
|
97
88
|
};
|
|
98
89
|
export {
|
|
99
|
-
|
|
90
|
+
_ as useRecommendationApi
|
|
100
91
|
};
|
|
@@ -50,14 +50,6 @@ export declare const IdentitySchema: v.ObjectSchema<{
|
|
|
50
50
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "userId is required">]>;
|
|
51
51
|
/** Optional variation ID for A/B testing */
|
|
52
52
|
readonly variationId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
53
|
-
/** Optional numeric campaign ID of the host campaign; absent for templates and modules */
|
|
54
|
-
readonly campaignId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
55
|
-
/**
|
|
56
|
-
* Optional numeric template-library id of the host template; absent for campaigns and
|
|
57
|
-
* modules. Distinct from `templateId`, which is the editor's document identity (a uuid /
|
|
58
|
-
* Stripo doc id) and is never an endpoint id.
|
|
59
|
-
*/
|
|
60
|
-
readonly templateLibraryId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
61
53
|
}, undefined>;
|
|
62
54
|
/**
|
|
63
55
|
* Partner configuration - organization and product context
|
|
@@ -633,14 +625,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
633
625
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "userId is required">]>;
|
|
634
626
|
/** Optional variation ID for A/B testing */
|
|
635
627
|
readonly variationId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
636
|
-
/** Optional numeric campaign ID of the host campaign; absent for templates and modules */
|
|
637
|
-
readonly campaignId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
638
|
-
/**
|
|
639
|
-
* Optional numeric template-library id of the host template; absent for campaigns and
|
|
640
|
-
* modules. Distinct from `templateId`, which is the editor's document identity (a uuid /
|
|
641
|
-
* Stripo doc id) and is never an endpoint id.
|
|
642
|
-
*/
|
|
643
|
-
readonly templateLibraryId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
644
628
|
}, undefined>;
|
|
645
629
|
/** Partner configuration (required) */
|
|
646
630
|
readonly partner: v.ObjectSchema<{
|
|
@@ -11,8 +11,6 @@ export declare const useConfig: () => {
|
|
|
11
11
|
templateId: string;
|
|
12
12
|
userId: string;
|
|
13
13
|
variationId?: string | undefined;
|
|
14
|
-
campaignId?: string | undefined;
|
|
15
|
-
templateLibraryId?: string | undefined;
|
|
16
14
|
};
|
|
17
15
|
partner: {
|
|
18
16
|
name: string;
|
|
@@ -148,8 +146,6 @@ export declare const useConfig: () => {
|
|
|
148
146
|
templateId: string;
|
|
149
147
|
userId: string;
|
|
150
148
|
variationId?: string | undefined;
|
|
151
|
-
campaignId?: string | undefined;
|
|
152
|
-
templateLibraryId?: string | undefined;
|
|
153
149
|
} | null>;
|
|
154
150
|
partner: import("vue").ComputedRef<{
|
|
155
151
|
name: string;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import type { TextValueObject } from '@@/Types/generic';
|
|
2
|
-
import type { RecommendationFeedItem
|
|
2
|
+
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
6
|
RECOMMENDATION_STRATEGIES_PATH: string;
|
|
7
7
|
RECOMMENDATION_STRATEGIES_PANEL_PATH: string;
|
|
8
|
-
NEWSLETTER_RECOMMENDATIONS_PATH: string;
|
|
9
|
-
MIGRATE_STRATEGIES_PATH: string;
|
|
10
|
-
TEMPLATE_MIGRATE_STRATEGIES_PATH: string;
|
|
11
8
|
};
|
|
12
|
-
export declare const MIGRATION_PATHS: Record<RrsMigrationTarget['scope'], string>;
|
|
13
9
|
export declare const QUERY_PARAMS: {
|
|
14
10
|
CLIENT_ID: string;
|
|
15
11
|
};
|
|
@@ -2,8 +2,6 @@ import { CommonControl } from '../../../common-control';
|
|
|
2
2
|
export declare const STRATEGY_CONTROL_ID = "recommendation-strategy-control";
|
|
3
3
|
export declare class StrategyControl extends CommonControl {
|
|
4
4
|
private store;
|
|
5
|
-
private onboardingStore;
|
|
6
|
-
private legacyConversion;
|
|
7
5
|
private storeUnsubscription;
|
|
8
6
|
private listeners;
|
|
9
7
|
private lastPaintedState;
|
|
@@ -88,8 +88,6 @@ export interface RegenerateWithStylesOptions extends Omit<RegenerateProductRowsO
|
|
|
88
88
|
products?: RecommendationProduct[];
|
|
89
89
|
/** Optional: pass layout directly to avoid stale DOM reads after setAttribute */
|
|
90
90
|
layout?: Orientation;
|
|
91
|
-
/** Applies the batch even when the rows are unchanged, for callers that staged their own edits. */
|
|
92
|
-
forceApply?: boolean;
|
|
93
91
|
}
|
|
94
92
|
/**
|
|
95
93
|
* Regenerates product rows while preserving user-applied styles, in a SINGLE commit.
|
|
@@ -153,8 +151,6 @@ export interface UpdateProductContentInPlaceOptions {
|
|
|
153
151
|
currentNode: ImmutableHtmlNode | null | undefined;
|
|
154
152
|
documentModifier: DocumentModifier;
|
|
155
153
|
products: RecommendationProduct[];
|
|
156
|
-
/** Applies the batch even when the cards are unchanged, for callers that staged their own edits. */
|
|
157
|
-
forceApply?: boolean;
|
|
158
154
|
}
|
|
159
155
|
/**
|
|
160
156
|
* Updates product content in-place without regenerating HTML structure.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationCampaignUrlValue, RecommendationProduct,
|
|
1
|
+
import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationCampaignUrlValue, RecommendationProduct, RrsStrategy } from '@@/Types/recommendation';
|
|
2
2
|
export interface PerBlockConfigs {
|
|
3
3
|
cardsInRow: number;
|
|
4
4
|
currencySettings: {
|
|
@@ -22,7 +22,6 @@ export interface PerBlockConfigs {
|
|
|
22
22
|
shuffleProducts: boolean;
|
|
23
23
|
strategy: string;
|
|
24
24
|
strategyId: string;
|
|
25
|
-
nodeConfigVersion: number;
|
|
26
25
|
textTrimming: boolean;
|
|
27
26
|
unresponsive: boolean;
|
|
28
27
|
size: string;
|
|
@@ -37,7 +36,6 @@ interface PerBlockState {
|
|
|
37
36
|
filterSelectionDrawerStatus: boolean;
|
|
38
37
|
assignStrategyDrawerStatus: boolean;
|
|
39
38
|
removeStrategyModalStatus: boolean;
|
|
40
|
-
legacyStrategyUpdatedModalStatus: boolean;
|
|
41
39
|
filterGroup: number;
|
|
42
40
|
/** Whether initial API data (filters, algorithms, products) has been fetched for this block */
|
|
43
41
|
isInitialized: boolean;
|
|
@@ -53,7 +51,6 @@ interface PerBlockState {
|
|
|
53
51
|
* same id skipped the re-sync and kept the defaults (SD-150347).
|
|
54
52
|
*/
|
|
55
53
|
syncedConfigFingerprint: string | null;
|
|
56
|
-
legacyConversionLoading: boolean;
|
|
57
54
|
}
|
|
58
55
|
/**
|
|
59
56
|
* Persisted-config subset used by `seedBlockUrlConfig` to reconstruct
|
|
@@ -216,53 +213,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
216
213
|
currentRecommendationId: number | null;
|
|
217
214
|
configVersion: number;
|
|
218
215
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
219
|
-
isLegacyStrategyBlock(): boolean;
|
|
220
|
-
legacyConversionLoading(state: {
|
|
221
|
-
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
222
|
-
activePredictiveAlgorithms: number[];
|
|
223
|
-
languages: Languages;
|
|
224
|
-
currencyList: {
|
|
225
|
-
text: string;
|
|
226
|
-
value: string;
|
|
227
|
-
}[];
|
|
228
|
-
filterList: FiltersResponse;
|
|
229
|
-
strategies: {
|
|
230
|
-
[x: string]: unknown;
|
|
231
|
-
strategy_id: number;
|
|
232
|
-
name: string;
|
|
233
|
-
status: string;
|
|
234
|
-
suitable_channels: string;
|
|
235
|
-
size?: (number | string) | undefined;
|
|
236
|
-
}[];
|
|
237
|
-
strategiesLoading: boolean;
|
|
238
|
-
strategyUrlTemplates: Record<string, string>;
|
|
239
|
-
blockStates: Record<number, PerBlockState>;
|
|
240
|
-
currentRecommendationId: number | null;
|
|
241
|
-
configVersion: number;
|
|
242
|
-
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
243
|
-
legacyStrategyUpdatedModalStatus(state: {
|
|
244
|
-
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
245
|
-
activePredictiveAlgorithms: number[];
|
|
246
|
-
languages: Languages;
|
|
247
|
-
currencyList: {
|
|
248
|
-
text: string;
|
|
249
|
-
value: string;
|
|
250
|
-
}[];
|
|
251
|
-
filterList: FiltersResponse;
|
|
252
|
-
strategies: {
|
|
253
|
-
[x: string]: unknown;
|
|
254
|
-
strategy_id: number;
|
|
255
|
-
name: string;
|
|
256
|
-
status: string;
|
|
257
|
-
suitable_channels: string;
|
|
258
|
-
size?: (number | string) | undefined;
|
|
259
|
-
}[];
|
|
260
|
-
strategiesLoading: boolean;
|
|
261
|
-
strategyUrlTemplates: Record<string, string>;
|
|
262
|
-
blockStates: Record<number, PerBlockState>;
|
|
263
|
-
currentRecommendationId: number | null;
|
|
264
|
-
configVersion: number;
|
|
265
|
-
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
266
216
|
assignedStrategy(state: {
|
|
267
217
|
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
268
218
|
activePredictiveAlgorithms: number[];
|
|
@@ -492,24 +442,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
492
442
|
cancelFilterDrawer(): void;
|
|
493
443
|
openAssignStrategyDrawer(): void;
|
|
494
444
|
closeAssignStrategyDrawer(): void;
|
|
495
|
-
openLegacyStrategyUpdatedModal(): void;
|
|
496
|
-
closeLegacyStrategyUpdatedModal(): void;
|
|
497
445
|
openRemoveStrategyModal(): void;
|
|
498
446
|
closeRemoveStrategyModal(): void;
|
|
499
447
|
fetchStrategies(): Promise<void>;
|
|
500
448
|
resolveStrategyUrlTemplate(strategy: RrsStrategy, currency: string): Promise<string>;
|
|
501
449
|
assignStrategy(strategy: RrsStrategy): void;
|
|
502
|
-
convertLegacyStrategy(payload: RrsMigrationPayload, target?: RrsMigrationTarget): Promise<string>;
|
|
503
|
-
/**
|
|
504
|
-
* Undoes the config half of a conversion whose document write never landed, so the
|
|
505
|
-
* panel and the drawer fall back to "Legacy Strategy" instead of showing an assignment
|
|
506
|
-
* the document never received.
|
|
507
|
-
*/
|
|
508
|
-
revertLegacyConversion(blockId: number, previous: {
|
|
509
|
-
strategyId: string;
|
|
510
|
-
size: string;
|
|
511
|
-
nodeConfigVersion: number;
|
|
512
|
-
}): void;
|
|
513
450
|
removeStrategy(): void;
|
|
514
451
|
fetchRecommendationCreateData(): Promise<void>;
|
|
515
452
|
fetchRecommendationFilters(): Promise<void>;
|
|
@@ -527,12 +464,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
527
464
|
hasInvalidBlock(): boolean;
|
|
528
465
|
fetchRecommendationProducts(): Promise<void>;
|
|
529
466
|
_doFetchProducts(): Promise<void>;
|
|
530
|
-
/**
|
|
531
|
-
* Block-scoped counterpart of `fetchRecommendationProducts`, which only ever serves the
|
|
532
|
-
* selected block. The legacy conversion must refresh the products of the block that
|
|
533
|
-
* started it even after the user selected another one.
|
|
534
|
-
*/
|
|
535
|
-
fetchStrategyProductsForBlock(blockId: number): Promise<void>;
|
|
536
467
|
_doFetchStrategyProducts(blockId: number): Promise<void>;
|
|
537
468
|
_setBlockProducts(blockId: number, products: RecommendationProduct[], size: number): void;
|
|
538
469
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams, RrsEndpointGenerateResponse,
|
|
1
|
+
import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams, RrsEndpointGenerateResponse, RrsStrategy } from '@@/Types/recommendation';
|
|
2
2
|
export declare const useRecommendationApi: () => {
|
|
3
3
|
fetchRecommendationCreateData: () => Promise<InitialResponse>;
|
|
4
4
|
fetchRecommendationFilters: () => Promise<FiltersResponse>;
|
|
@@ -6,5 +6,4 @@ export declare const useRecommendationApi: () => {
|
|
|
6
6
|
fetchRecommendationProductsByUrl: (url: string) => Promise<RecommendationProduct[]>;
|
|
7
7
|
fetchRecommendationStrategies: () => Promise<RrsStrategy[]>;
|
|
8
8
|
generateStrategyEndpoint: (strategy: RrsStrategy, currency: string) => Promise<RrsEndpointGenerateResponse | null>;
|
|
9
|
-
migrateLegacyStrategy: (payload: RrsMigrationPayload, target?: RrsMigrationTarget) => Promise<string>;
|
|
10
9
|
};
|