@useinsider/guido 2.2.0-beta.eeefcc3 → 3.0.0-beta.5b2298c

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 (126) hide show
  1. package/README.md +41 -2
  2. package/dist/@types/config/schemas.js +1 -1
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +66 -66
  5. package/dist/components/organisms/base/Toaster.vue.js +4 -4
  6. package/dist/components/organisms/base/Toaster.vue2.js +12 -9
  7. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +5 -5
  8. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
  9. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +11 -13
  10. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +54 -23
  11. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +7 -5
  12. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +34 -21
  13. package/dist/components/organisms/extensions/recommendation/Filters.vue.js +11 -11
  14. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +48 -36
  15. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +11 -9
  16. package/dist/components/organisms/header/EditorActions.vue.js +10 -8
  17. package/dist/components/organisms/header/EditorActions.vue2.js +40 -30
  18. package/dist/components/organisms/header/MigrationConfirmModal.vue.js +17 -0
  19. package/dist/components/organisms/header/MigrationConfirmModal.vue2.js +39 -0
  20. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
  21. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
  22. package/dist/composables/useRecommendation.js +9 -9
  23. package/dist/composables/useSave.js +16 -12
  24. package/dist/composables/useStripo.js +66 -62
  25. package/dist/composables/useStripoEventHandler.js +27 -12
  26. package/dist/composables/useSyncModuleExtractor.js +45 -0
  27. package/dist/config/compiler/utils/recommendationCompilerUtils.js +1 -1
  28. package/dist/config/i18n/en/labels.json.js +8 -3
  29. package/dist/config/migrator/itemsBlockMigrator.js +135 -131
  30. package/dist/config/migrator/recommendationMigrator.js +59 -55
  31. package/dist/enums/block.js +4 -0
  32. package/dist/enums/unsubscribe.js +25 -21
  33. package/dist/extensions/Blocks/Items/block.js +30 -21
  34. package/dist/extensions/Blocks/Items/iconsRegistry.js +7 -6
  35. package/dist/extensions/Blocks/Items/items.css.js +48 -0
  36. package/dist/extensions/Blocks/Recommendation/block.js +22 -13
  37. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +36 -33
  38. package/dist/extensions/Blocks/Recommendation/constants/layout.js +16 -14
  39. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +15 -13
  40. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +9 -9
  41. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +1 -1
  42. package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +41 -29
  43. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +16 -16
  44. package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +30 -32
  45. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +194 -104
  46. package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +9 -9
  47. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +46 -38
  48. package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +16 -16
  49. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +291 -217
  50. package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +14 -14
  51. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +10 -10
  52. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +5 -5
  53. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +14 -14
  54. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +9 -9
  55. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +3 -3
  56. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +1 -1
  57. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +9 -9
  58. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +3 -3
  59. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +13 -13
  60. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +3 -3
  61. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +223 -99
  62. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +5 -4
  63. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +48 -0
  64. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +172 -85
  65. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +2 -2
  66. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +1 -1
  67. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +2 -2
  68. package/dist/extensions/Blocks/Recommendation/templates/utils.js +32 -32
  69. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +8 -8
  70. package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +29 -0
  71. package/dist/extensions/Blocks/Unsubscribe/block.js +29 -29
  72. package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
  73. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
  74. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
  75. package/dist/extensions/Blocks/common-control.js +12 -4
  76. package/dist/guido.css +1 -1
  77. package/dist/services/stripoApi.js +55 -19
  78. package/dist/src/@types/config/schemas.d.ts +1 -1
  79. package/dist/src/@types/events.d.ts +38 -2
  80. package/dist/src/@types/extensions/block.d.ts +2 -0
  81. package/dist/src/components/Guido.vue.d.ts +2 -2
  82. package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +1 -0
  83. package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +17 -1
  84. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
  85. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
  86. package/dist/src/components/organisms/header/MigrationConfirmModal.vue.d.ts +6 -0
  87. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
  88. package/dist/src/components/wrappers/WpModal.vue.d.ts +2 -2
  89. package/dist/src/composables/useGuidoActions.d.ts +1 -1
  90. package/dist/src/composables/useSave.d.ts +2 -2
  91. package/dist/src/composables/useStripo.d.ts +2 -2
  92. package/dist/src/composables/useSyncModuleExtractor.d.ts +4 -0
  93. package/dist/src/enums/block.d.ts +4 -0
  94. package/dist/src/enums/unsubscribe.d.ts +3 -0
  95. package/dist/src/extensions/Blocks/Items/block.d.ts +3 -1
  96. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +3 -1
  97. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +6 -0
  98. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +3 -3
  99. package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +6 -2
  100. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +8 -1
  101. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +38 -10
  102. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +27 -14
  103. package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +50 -17
  104. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +19 -2
  105. package/dist/src/extensions/Blocks/Recommendation/templates/grid/migration.d.ts +1 -1
  106. package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +4 -2
  107. package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +1 -1
  108. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +1 -1
  109. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +8 -0
  110. package/dist/src/extensions/Blocks/Recommendation/validation/filterSchema.d.ts +15 -0
  111. package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
  112. package/dist/src/extensions/Blocks/common-control.d.ts +5 -0
  113. package/dist/src/mock/api/settings.d.ts +2 -0
  114. package/dist/src/services/stripoApi.d.ts +5 -0
  115. package/dist/src/stores/editor.d.ts +23 -0
  116. package/dist/src/stores/template.d.ts +29 -0
  117. package/dist/src/utils/migrationBannerHtml.d.ts +2 -0
  118. package/dist/src/utils/templatePreparation.d.ts +1 -1
  119. package/dist/static/assets/info.svg.js +5 -0
  120. package/dist/static/styles/customEditorStyle.css.js +50 -23
  121. package/dist/stores/editor.js +2 -1
  122. package/dist/stores/template.js +15 -0
  123. package/dist/stores/unsubscribe.js +37 -34
  124. package/dist/utils/migrationBannerHtml.js +21 -0
  125. package/dist/utils/templatePreparation.js +1 -1
  126. package/package.json +2 -2
@@ -25,6 +25,9 @@ export declare const PAGE_TYPES: {
25
25
  SUBSCRIPTION_PREFERENCE_CONFIRMATION: number;
26
26
  RESUBSCRIBE: number;
27
27
  };
28
+ export declare const UNSUBSCRIBE_SYNC_MODULE_TYPES: {
29
+ [x: number]: string;
30
+ };
28
31
  export declare const TYPE_COLLECTIONS: {
29
32
  [x: number]: number[];
30
33
  };
@@ -1,5 +1,6 @@
1
+ import type { BlockId } from '@@/Types/extensions/block';
1
2
  import { Block, BlockCompositionType, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
2
- export declare const BLOCK_ID = "items-block";
3
+ export declare const BLOCK_ID: BlockId;
3
4
  /**
4
5
  * Items Block extension for Stripo email editor.
5
6
  *
@@ -20,6 +21,7 @@ export declare class ItemsBlock extends Block {
20
21
  getBlockCompositionType(): BlockCompositionType;
21
22
  getName(): string;
22
23
  getDescription(): string;
24
+ getSettingsPanelTitleHtml(): string;
23
25
  getTemplate(): string;
24
26
  allowInnerBlocksDND(): boolean;
25
27
  onCreated(node: ImmutableHtmlNode): void;
@@ -5,9 +5,10 @@
5
5
  * Handles block lifecycle including configuration initialization and migration.
6
6
  * Supports multiple block instances with unique recommendation-id attributes.
7
7
  */
8
+ import type { BlockId } from '@@/Types/extensions/block';
8
9
  import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
9
10
  import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
10
- export declare const BLOCK_ID = "recommendation-block";
11
+ export declare const BLOCK_ID: BlockId;
11
12
  export declare class RecommendationBlock extends Block {
12
13
  /**
13
14
  * Stores the ID generated in getTemplate() so onCreated() can reuse it.
@@ -20,6 +21,7 @@ export declare class RecommendationBlock extends Block {
20
21
  getBlockCompositionType(): BlockCompositionType;
21
22
  getName(): string;
22
23
  getDescription(): string;
24
+ getSettingsPanelTitleHtml(): string;
23
25
  /**
24
26
  * Returns the template HTML for a new recommendation block.
25
27
  * Generates a unique recommendation ID and embeds the instance class
@@ -41,6 +41,12 @@ export declare const DEFAULT_VISIBILITY: Record<string, boolean>;
41
41
  * All other code should import and use this constant.
42
42
  */
43
43
  export declare const DEFAULT_NODE_CONFIG: RecommendationNodeConfig;
44
+ /**
45
+ * Algorithm IDs to exclude from the recommendation algorithm dropdown.
46
+ * These algorithms will not be shown as options regardless of API response.
47
+ * View Together and Purchase Together algorithms are disabled because these require product id.
48
+ */
49
+ export declare const EXCLUDED_ALGORITHM_IDS: number[];
44
50
  /**
45
51
  * Current configuration version
46
52
  * Increment this when making breaking changes to the schema
@@ -8,6 +8,6 @@
8
8
  */
9
9
  export { RecommendationBlockId } from './blockIds';
10
10
  export { RecommendationControlId } from './controlIds';
11
- export { CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, } from './selectors';
12
- export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, DEFAULT_MOBILE_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, MAX_MOBILE_PRODUCTS_PER_ROW, MIN_MOBILE_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
13
- export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, } from './defaultConfig';
11
+ export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, } from './selectors';
12
+ export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, DEFAULT_MOBILE_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, MAX_MOBILE_PRODUCTS_PER_ROW, MIN_MOBILE_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, DEFAULT_MOBILE_COLUMN_SPACING, DEFAULT_MOBILE_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
13
+ export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
@@ -31,8 +31,12 @@ export declare const MAX_MOBILE_PRODUCTS_PER_ROW = 2;
31
31
  export declare const MIN_MOBILE_PRODUCTS_PER_ROW = 1;
32
32
  /** Default column spacing between product cards (5px on each side = 10px total) */
33
33
  export declare const DEFAULT_COLUMN_SPACING = 10;
34
- /** Default row spacing between product rows */
35
- export declare const DEFAULT_ROW_SPACING = 20;
34
+ /** Default row spacing between product rows (matches spacer height in template) */
35
+ export declare const DEFAULT_ROW_SPACING = 10;
36
+ /** Default mobile column spacing between product cards */
37
+ export declare const DEFAULT_MOBILE_COLUMN_SPACING = 10;
38
+ /** Default mobile row spacing between product rows (matches spacer height in template) */
39
+ export declare const DEFAULT_MOBILE_ROW_SPACING = 10;
36
40
  /** Minimum spacing value */
37
41
  export declare const MIN_SPACING = 0;
38
42
  /** Maximum spacing value */
@@ -1,15 +1,22 @@
1
1
  /**
2
2
  * CSS selectors and data attributes used across the Recommendation extension
3
3
  */
4
+ /**
5
+ * Block root selector — common ancestor of both desktop and mobile containers.
6
+ * Used across attribute controls so edits apply to BOTH containers simultaneously.
7
+ */
8
+ export declare const BLOCK_ROOT_SELECTOR = ".recommendation-block-v2";
4
9
  /**
5
10
  * Container selector for the product container element
6
- * Used across controls to target elements within the recommendation block
11
+ * Used in product regeneration logic where container-specific scoping is needed
7
12
  */
8
13
  export declare const CONTAINER_SELECTOR = ".ins-recommendation-product-container";
9
14
  /** Desktop product container selector */
10
15
  export declare const DESKTOP_CONTAINER_SELECTOR = ".ins-recommendation-desktop-container";
11
16
  /** Mobile product container selector */
12
17
  export declare const MOBILE_CONTAINER_SELECTOR = ".ins-recommendation-mobile-container";
18
+ /** Mobile row wrapper — the <tr> that wraps the mobile container <td>/<table> */
19
+ export declare const MOBILE_ROW_SELECTOR = ".ins-recommendation-mobile-row";
13
20
  /**
14
21
  * Currency HTML attributes set on the block element
15
22
  * These are read by the HTML compiler at runtime to format prices
@@ -25,18 +25,13 @@ export declare class RecommendationBlockControl extends CommonControl {
25
25
  getId(): string;
26
26
  getTemplate(): string;
27
27
  onRender(): Promise<void>;
28
- /**
29
- * Immediately regenerate products with styles (no debounce)
30
- * Used for initial load after fetch completes
31
- */
32
- private _regenerateWithProducts;
33
28
  onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
34
29
  onDestroy(): void;
35
30
  /**
36
31
  * Initialize all sub-controls with the shared API context
37
32
  * Each sub-control manages its own form values and event listeners
38
33
  */
39
- _initializeSubControls(): void;
34
+ private _initializeSubControls;
40
35
  /**
41
36
  * Syncs persisted node config into the Pinia store's block state.
42
37
  *
@@ -50,11 +45,26 @@ export declare class RecommendationBlockControl extends CommonControl {
50
45
  */
51
46
  private _syncNodeConfigToStore;
52
47
  /**
53
- * Fetches initial data for a block (filters, algorithms, products).
48
+ * Fetches initial data for a block in three phases:
49
+ * 1. Shared reference data (algorithms, currencies, filters) — parallel
50
+ * 2. Smart defaults for new blocks (currency, algorithm) — sequential
51
+ * 3. Product data with correct defaults — sequential
52
+ *
54
53
  * Shared by onRender() and onTemplateNodeUpdated() to avoid duplication.
55
54
  * Marks the block as initialized to prevent redundant fetches on re-selection.
56
55
  */
57
56
  private _fetchBlockData;
57
+ /**
58
+ * Applies smart defaults for newly dropped blocks.
59
+ *
60
+ * For new blocks (config still matches hardcoded defaults), validates that
61
+ * the default currency and algorithm are available from the API response.
62
+ * If not, falls back to the first available option.
63
+ *
64
+ * Saved templates with user-customized config are left unchanged because
65
+ * their values won't match the hardcoded defaults.
66
+ */
67
+ private _applySmartDefaults;
58
68
  /**
59
69
  * Reads the recommendation-id attribute from the block element within the node
60
70
  */
@@ -64,8 +74,15 @@ export declare class RecommendationBlockControl extends CommonControl {
64
74
  */
65
75
  private _debouncedFetchProducts;
66
76
  /**
67
- * Debounced regeneration when products arrive from API
68
- * Tries in-place update first to preserve styles, falls back to full regeneration
77
+ * Debounced content update when products arrive from API.
78
+ *
79
+ * Tries in-place update first (preserves user-applied styles) — this succeeds
80
+ * when the product count matches the DOM (algorithm/locale/currency changes).
81
+ *
82
+ * Falls back to full regeneration when product count differs from DOM — this
83
+ * happens after "Number of Products" changes where the DOM still has the old
84
+ * count. The store pads products to the configured size, so in-place only
85
+ * fails when the size actually changed.
69
86
  */
70
87
  private _debouncedRegenerateWithProducts;
71
88
  /**
@@ -74,6 +91,17 @@ export declare class RecommendationBlockControl extends CommonControl {
74
91
  * Uses configVersion counter (incremented only by patchCurrentBlockConfig)
75
92
  * to distinguish user-initiated config changes from internal mutations
76
93
  * (e.g., fetchRecommendationCreateData setting preferred currency).
94
+ *
95
+ * Tracks currentRecommendationId to detect block switches. When the user
96
+ * selects a different recommendation block, the proxy getters (e.g.,
97
+ * recommendationProducts) return the new block's data — a different array
98
+ * reference that would be falsely detected as "new products arrived".
99
+ * We skip that tick and update tracking references instead.
100
+ */
101
+ private _listenStateUpdates;
102
+ /**
103
+ * Persists the current filter state from Pinia store to the Stripo node config.
104
+ * This ensures filters survive template save/reload cycles.
77
105
  */
78
- _listenStateUpdates(): void;
106
+ private _persistFiltersToNodeConfig;
79
107
  }
@@ -61,6 +61,9 @@ export interface RegenerateProductRowsOptions {
61
61
  * Regenerates only the mobile product container rows.
62
62
  * Used when mobile-specific settings change (mobileCardsInRow)
63
63
  * or when the desktop container is regenerated (to keep both in sync).
64
+ *
65
+ * For list layout: hides the mobile row entirely (list is inherently responsive).
66
+ * For grid layout: shows the mobile row and populates it.
64
67
  */
65
68
  export declare function regenerateMobileProductRows(options: Omit<RegenerateProductRowsOptions, 'afterRegenerate'>): void;
66
69
  /**
@@ -75,8 +78,12 @@ export interface ReapplySpacingOptions {
75
78
  documentModifier: DocumentModifier;
76
79
  }
77
80
  /**
78
- * Reapplies spacing values from data attributes after product regeneration
79
- * This ensures spacing persists when products are regenerated
81
+ * Reapplies spacing values after product regeneration.
82
+ * Desktop spacing applies only to the desktop container;
83
+ * mobile spacing applies only to the mobile container.
84
+ *
85
+ * Reads values from node config (primary) with data-attribute fallback
86
+ * for backward compatibility with pre-nodeConfig templates.
80
87
  * @param options - Configuration options
81
88
  */
82
89
  export declare function reapplySpacing(options: ReapplySpacingOptions): void;
@@ -112,6 +119,17 @@ export interface RegenerateWithStylesOptions extends Omit<RegenerateProductRowsO
112
119
  * @param options - Configuration options for regeneration
113
120
  */
114
121
  export declare function regenerateProductRowsWithStyles(options: RegenerateWithStylesOptions): void;
122
+ /**
123
+ * Adjusts a products array to a target size.
124
+ * Used by ProductLayoutControl to synchronously match products to the new size
125
+ * before regeneration, avoiding the race condition where the store still holds
126
+ * products from the previous (stale) fetch.
127
+ *
128
+ * - More products than target → truncate
129
+ * - Fewer products than target → pad with dummy products
130
+ * - Exact match → return as-is
131
+ */
132
+ export declare function adjustProductsToSize(products: RecommendationProduct[], targetSize: number): RecommendationProduct[];
115
133
  type PriceKey = 'price' | 'original_price' | 'discount';
116
134
  /**
117
135
  * Formats a product price using current currency settings
@@ -149,16 +167,11 @@ export interface UpdateProductContentInPlaceOptions {
149
167
  * Updates product content in-place without regenerating HTML structure.
150
168
  * Preserves all user-applied styles by only touching dynamic content.
151
169
  *
152
- * This is the preferred method when:
153
- * - Product data changed but count remains the same
154
- * - Currency/locale changed (prices need reformatting)
155
- *
156
- * Uses setText() on text nodes instead of setInnerHtml() to preserve
157
- * Stripo's internal node references and avoid cursor/selection tracking issues.
170
+ * Scopes element queries to the desktop container to avoid double-counting
171
+ * mobile container elements (both containers share identical block IDs).
172
+ * After updating desktop, also updates mobile container to keep them in sync.
158
173
  *
159
- * Falls back to false when:
160
- * - Product count changed (need to add/remove elements)
161
- * - Cannot find required elements
174
+ * Falls back to false when product count changed (need to add/remove elements).
162
175
  * @param options - Configuration options
163
176
  * @returns true if in-place update was successful, false to fall back to full regeneration
164
177
  */
@@ -171,13 +184,13 @@ export interface UpdatePricesInPlaceOptions {
171
184
  * Updates only price displays in-place (for currency changes).
172
185
  * This is a lightweight update when only formatting changes, not product data.
173
186
  *
187
+ * Scopes element queries to the desktop container to avoid double-counting
188
+ * mobile container elements. After updating desktop, also updates mobile.
189
+ *
174
190
  * Perfect for:
175
191
  * - Currency symbol change
176
192
  * - Currency alignment change
177
193
  * - Decimal/thousand separator changes
178
- *
179
- * Uses setText() on text nodes instead of setInnerHtml() to preserve
180
- * Stripo's internal node references and avoid cursor/selection tracking issues.
181
194
  * @param options - Configuration options
182
195
  * @returns true if update was successful, false otherwise
183
196
  */
@@ -5,16 +5,20 @@
5
5
  * - Column spacing: horizontal gap between cards in the same row
6
6
  * - Row spacing: vertical gap between different rows
7
7
  *
8
+ * Desktop and mobile have independent spacing controls that toggle
9
+ * visibility based on Stripo's editor preview mode (desktop/mobile).
10
+ *
8
11
  * Configuration is stored via node config (persists with template).
9
12
  * Actual spacing is applied to DOM elements via inline styles.
10
13
  */
11
- import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
14
+ import { type ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
12
15
  import { CommonControl } from '../../../common-control';
13
16
  export declare const SPACING_CONTROL_ID = "recommendation-spacing-control";
14
17
  /**
15
18
  * Control for managing spacing between product cards
16
19
  * - Column spacing: horizontal gap between cards in the same row
17
20
  * - Row spacing: vertical gap between different rows
21
+ * - Separate controls for desktop and mobile with device-mode toggling
18
22
  */
19
23
  export declare class SpacingControl extends CommonControl {
20
24
  private store;
@@ -25,17 +29,28 @@ export declare class SpacingControl extends CommonControl {
25
29
  onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
26
30
  onDestroy(): void;
27
31
  /**
28
- * Updates column spacing visibility based on layout orientation
29
- * Column spacing is hidden for list layout (products are stacked vertically)
30
- * Reads from node config first, falls back to store then DOM
32
+ * Checks if the editor is currently in mobile preview mode
33
+ * using Stripo's EditorStatePropertyType API.
34
+ */
35
+ _isMobileMode(): boolean;
36
+ /**
37
+ * Updates spacing control visibility based on layout orientation, editor mode,
38
+ * and products-per-row count.
39
+ * - List layout: hide column spacing (products are full-width), hide ALL mobile
40
+ * spacing controls (list is responsive — single row spacing applies to both views)
41
+ * - Desktop mode: show desktop spacing, hide mobile spacing
42
+ * - Mobile mode: show mobile spacing, hide desktop spacing
43
+ * - 1 product per row: hide column spacing (no gap between single column)
31
44
  */
32
- _updateColumnSpacingVisibility(): void;
45
+ _updateSpacingVisibility(): void;
33
46
  /**
34
- * Reads spacing values from node config first, falls back to DOM styles
47
+ * Reads spacing values from node config first, falls back to DOM styles.
48
+ * DOM fallback is only used for legacy templates that lack node config.
35
49
  */
36
50
  _setFormValues(): void;
37
51
  /**
38
52
  * Gets stored column spacing from the first attribute row cell's padding.
53
+ * Scoped to the desktop container for accurate readings.
39
54
  * For grid layout: cells inside .recommendation-attribute-row have padding applied.
40
55
  * For list layout: the parent of .product-card-wrapper has the padding.
41
56
  * The padding is applied as "0 {halfSpacing}px", so we extract and multiply by 2.
@@ -43,27 +58,33 @@ export declare class SpacingControl extends CommonControl {
43
58
  _getStoredColumnSpacing(): number;
44
59
  /**
45
60
  * Gets stored row spacing from the first spacer element's height style
61
+ * Scoped to the desktop container for accurate readings.
46
62
  */
47
63
  _getStoredRowSpacing(): number;
48
64
  /**
49
- * Handles column spacing changes.
50
- * For grid layout: applies horizontal padding to all cells inside attribute rows.
51
- * For list layout: applies padding to parent of product card wrappers.
65
+ * Handles column spacing changes for desktop.
66
+ * Applies horizontal padding only to the desktop container elements.
52
67
  */
53
68
  _onColumnSpacingChange(spacing: number): void;
54
69
  /**
55
- * Handles row spacing changes
56
- * Applies height to all spacer elements between product rows
70
+ * Handles row spacing changes for desktop.
71
+ * Applies height only to spacer elements in the desktop container.
57
72
  */
58
73
  _onRowSpacingChange(spacing: number): void;
59
74
  /**
60
- * Stores column spacing value in block data attribute
75
+ * Handles column spacing changes for mobile.
76
+ * Applies horizontal padding only to the mobile container elements.
61
77
  */
62
- _storeColumnSpacing(spacing: number): void;
78
+ _onMobileColumnSpacingChange(spacing: number): void;
63
79
  /**
64
- * Stores row spacing value in block data attribute
80
+ * Handles row spacing changes for mobile.
81
+ * Applies height only to spacer elements in the mobile container.
65
82
  */
66
- _storeRowSpacing(spacing: number): void;
83
+ _onMobileRowSpacingChange(spacing: number): void;
84
+ /**
85
+ * Stores a spacing value as a data attribute on the block root element
86
+ */
87
+ _storeDataAttribute(attr: string, spacing: number): void;
67
88
  _listenToFormUpdates(): void;
68
89
  /**
69
90
  * Debounced version of _onColumnSpacingChange
@@ -72,12 +93,24 @@ export declare class SpacingControl extends CommonControl {
72
93
  _debouncedOnColumnSpacingChange: import("@vueuse/shared").PromisifyFn<(spacing: number) => void>;
73
94
  /**
74
95
  * Debounced version of _onRowSpacingChange
75
- * Prevents excessive DOM updates when user rapidly adjusts the counter
76
96
  */
77
97
  _debouncedOnRowSpacingChange: import("@vueuse/shared").PromisifyFn<(spacing: number) => void>;
98
+ /**
99
+ * Debounced version of _onMobileColumnSpacingChange
100
+ */
101
+ _debouncedOnMobileColumnSpacingChange: import("@vueuse/shared").PromisifyFn<(spacing: number) => void>;
102
+ /**
103
+ * Debounced version of _onMobileRowSpacingChange
104
+ */
105
+ _debouncedOnMobileRowSpacingChange: import("@vueuse/shared").PromisifyFn<(spacing: number) => void>;
78
106
  /**
79
107
  * Subscribe to store orientation changes
80
- * Updates column spacing visibility when layout changes via the layout control
108
+ * Updates spacing visibility when layout changes via the layout control
81
109
  */
82
110
  _subscribeToOrientationChanges(): void;
111
+ /**
112
+ * Subscribes to editor preview mode changes via Stripo API.
113
+ * Toggles which spacing controls (desktop/mobile) are visible.
114
+ */
115
+ _subscribeToEditorModeChanges(): void;
83
116
  }
@@ -31,6 +31,8 @@ interface PerBlockState {
31
31
  filterGroup: number;
32
32
  /** Whether initial API data (filters, algorithms, products) has been fetched for this block */
33
33
  isInitialized: boolean;
34
+ /** Snapshot of filters taken when the drawer opens, used to revert on cancel */
35
+ filterSnapshot: Filter[] | null;
34
36
  }
35
37
  interface StoreState {
36
38
  recommendationCampaignUrls: Record<string, string>;
@@ -125,7 +127,9 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
125
127
  configVersion: number;
126
128
  } & import("pinia").PiniaCustomStateProperties<StoreState>): number;
127
129
  hasFilters(): boolean;
130
+ hasValidFilters(): boolean;
128
131
  getFilterGroupCount(): number;
132
+ getUniqueFilterGroups(): number[];
129
133
  getActivePredictiveAlgorithms: (state: {
130
134
  recommendationCampaignUrls: Record<string, string>;
131
135
  activePredictiveAlgorithms: number[];
@@ -203,23 +207,36 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
203
207
  patchCurrentBlockConfig(updates: Partial<PerBlockConfigs>, options?: {
204
208
  triggerRefetch?: boolean;
205
209
  }): void;
210
+ /**
211
+ * Creates a filter with the first available attribute and operator pre-selected.
212
+ */
213
+ createDefaultFilter(filterGroup: number, filterNumber: number): Filter;
206
214
  /**
207
215
  * Opens the filter selection drawer for the current block.
208
- * If no filters exist, initializes with a default empty filter
216
+ * Saves a snapshot of current filters for cancel/revert.
217
+ * If no filters exist, initializes with a default filter
209
218
  * so the user has a starting point for input.
210
219
  */
211
220
  openFilterDrawer(): void;
212
221
  /**
213
- * Closes the filter selection drawer for the current block
222
+ * Closes the filter selection drawer for the current block.
223
+ * Called after successful apply — discards the snapshot.
214
224
  */
215
225
  closeFilterDrawer(): void;
226
+ /**
227
+ * Cancels the filter selection drawer and reverts filters
228
+ * to the snapshot taken when the drawer was opened.
229
+ */
230
+ cancelFilterDrawer(): void;
216
231
  fetchRecommendationCreateData(): Promise<void>;
217
232
  fetchRecommendationFilters(): Promise<void>;
218
233
  addFilterGroup(filterGroup: number): void;
234
+ deleteFilterGroup(groupId: number): void;
219
235
  updateFilter(updatedFilter: Filter): void;
220
236
  deleteFilter(filter: Filter): void;
221
237
  addFilter(filter: Filter): void;
222
238
  generateFilterQuery(): string;
223
239
  fetchRecommendationProducts(): Promise<void>;
240
+ _doFetchProducts(): Promise<void>;
224
241
  }>;
225
242
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { RecommendationProduct } from '@@/Types/recommendation';
2
2
  import { DEFAULTS, getDefaultProducts, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY } from '../utils';
3
- declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block esd-extension-block es-p20\"\n >\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
3
+ declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"recommendation-block-v2 esd-block-recommendation-v3-block esd-extension-block es-p20\"\n >\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
4
4
  /**
5
5
  * Prepares migration product rows with attribute-aligned structure.
6
6
  * @param products - Array of products to display
@@ -24,14 +24,16 @@ export { DEFAULTS, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY, getDefault
24
24
  export declare function prepareProductRows(products: RecommendationProduct[], layout: Orientation, options?: PrepareProductRowsOptions): string;
25
25
  /**
26
26
  * Generates the default template for a given layout.
27
- * Includes both desktop and mobile product containers for grid layouts.
27
+ * Grid layout includes both desktop and mobile product containers.
28
+ * List layout only populates the desktop container (list rows are responsive).
28
29
  * @param layout - The layout orientation ('list' or 'grid')
29
30
  * @returns Complete HTML template with default products
30
31
  */
31
32
  export declare function getDefaultTemplate(layout?: Orientation): string;
32
33
  /**
33
34
  * Generates a complete block template with custom products.
34
- * Includes both desktop and mobile product containers for grid layouts.
35
+ * Grid layout includes both desktop and mobile product containers.
36
+ * List layout only populates the desktop container (list rows are responsive).
35
37
  * @param products - Array of products to display
36
38
  * @param layout - The layout orientation ('list' or 'grid')
37
39
  * @param title - Title for the block
@@ -4,7 +4,7 @@ import { DEFAULTS, getDefaultProducts } from '../utils';
4
4
  * Migration template for list layout
5
5
  * Used when migrating old recommendation blocks to list format
6
6
  */
7
- declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block esd-extension-block es-p20\"\n data-layout=\"list\"\n >\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
7
+ declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"recommendation-block-v2 esd-block-recommendation-v3-block\n esd-extension-block es-p20 es-m-p0 ins-recommendation-list-layout\"\n data-layout=\"list\"\n >\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
8
8
  export declare function getMigrationTemplate(): string;
9
9
  /**
10
10
  * Generates a custom list migration template with specified products
@@ -61,6 +61,6 @@ export declare function getDefaultProducts(count?: number): RecommendationProduc
61
61
  * @param instanceClass - Optional instance-specific class (e.g., 'ins-recommendation-v3-block-1')
62
62
  * for CSS scoping per block instance. Must be included in the initial template HTML because
63
63
  * Stripo's Angular rendering manages the class attribute and overwrites dynamic setAttribute changes.
64
- * @returns HTML template string with {-{-TITLE-}-}, {-{-PRODUCT_ROWS-}-}, and {-{-MOBILE_PRODUCT_ROWS-}-} placeholders
64
+ * @returns HTML template string with {-{-TITLE-}-}, {-{-PRODUCT_ROWS-}-}, and {-{-MOBILE_PRODUCT_ROWS-}-} (grid only) placeholders
65
65
  */
66
66
  export declare function createBlockTemplate(layout?: Orientation, instanceClass?: string): string;
@@ -106,6 +106,14 @@ export interface RecommendationNodeConfig {
106
106
  * Vertical spacing between product rows in pixels
107
107
  */
108
108
  rowSpacing: number;
109
+ /**
110
+ * Horizontal spacing between product cards on mobile in pixels (grid layout only)
111
+ */
112
+ mobileColumnSpacing: number;
113
+ /**
114
+ * Vertical spacing between product rows on mobile in pixels
115
+ */
116
+ mobileRowSpacing: number;
109
117
  /**
110
118
  * Order of card elements from top to bottom
111
119
  * Array of ATTR_PRODUCT_* constants
@@ -0,0 +1,15 @@
1
+ import type { Filter } from '@@/Types/recommendation';
2
+ import * as v from 'valibot';
3
+ export declare const FilterSchema: v.ObjectSchema<{
4
+ readonly type: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5
+ readonly attribute: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6
+ readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
7
+ readonly innerGroupOperator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
8
+ readonly outerGroupOperator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
9
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
10
+ readonly filterGroup: v.NumberSchema<undefined>;
11
+ readonly filterNumber: v.NumberSchema<undefined>;
12
+ readonly isValid: v.BooleanSchema<undefined>;
13
+ }, undefined>;
14
+ export declare function isFilterValid(filter: Filter): boolean;
15
+ export declare function getInvalidFilterFields(filter: Filter): Set<string>;
@@ -17,6 +17,7 @@ export declare class UnsubscribeControl extends Control {
17
17
  private _onButtonClick;
18
18
  private _onPrevClick;
19
19
  private _onNextClick;
20
+ private _loadAndUpdatePreview;
20
21
  private _updatePreview;
21
22
  private _updateCounter;
22
23
  private _getPreview;
@@ -11,6 +11,10 @@ interface LabelProps {
11
11
  name?: string;
12
12
  position?: 'top' | 'left';
13
13
  }
14
+ interface IconProps {
15
+ src: string;
16
+ className?: string;
17
+ }
14
18
  interface IconButtonProps {
15
19
  name: string;
16
20
  icon: string;
@@ -89,6 +93,7 @@ export declare abstract class CommonControl extends Control {
89
93
  }): string;
90
94
  _GuRadioButton({ name, buttons, id }: RadioButtonProps): string;
91
95
  _GuButton({ name, label, id }: ButtonProps): string;
96
+ _GuIcon({ src, className }: IconProps): string;
92
97
  /**
93
98
  *
94
99
  * @param param0
@@ -0,0 +1,2 @@
1
+ declare const _default: import("msw").HttpHandler[];
2
+ export default _default;
@@ -1,3 +1,4 @@
1
+ import type { ModuleUpdatedParams, SyncModuleResponse, SyncModuleUnsubscribePayload } from '@@/Types/events';
1
2
  import type { CustomFont, Template } from '@@/Types/stripo';
2
3
  export declare const useStripoApi: () => {
3
4
  getToken: () => Promise<string>;
@@ -5,4 +6,8 @@ export declare const useStripoApi: () => {
5
6
  active: boolean;
6
7
  })[]>;
7
8
  getDefaultTemplate: () => Promise<Template>;
9
+ getSyncModulesStatus: () => Promise<boolean>;
10
+ updateSyncModule: (params: ModuleUpdatedParams) => Promise<boolean>;
11
+ getSyncModule: (moduleId: number) => Promise<SyncModuleResponse>;
12
+ setSyncModuleUnsubscriptionPages: (payload: SyncModuleUnsubscribePayload[]) => Promise<boolean>;
8
13
  };