@useinsider/guido 3.19.0-beta.3abc7c5 → 3.19.0-beta.3daecd0

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 (102) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +118 -107
  3. package/dist/components/Guido.vue.js +9 -9
  4. package/dist/components/Guido.vue2.js +84 -75
  5. package/dist/components/organisms/AutoSaveController.vue2.js +8 -9
  6. package/dist/components/organisms/base/AuthErrorModal.vue.js +18 -0
  7. package/dist/components/organisms/base/AuthErrorModal.vue2.js +42 -0
  8. package/dist/components/organisms/header/EditorActions.vue.js +5 -5
  9. package/dist/components/organisms/header/EditorActions.vue2.js +55 -85
  10. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  11. package/dist/components/organisms/header/LeftSlot.vue2.js +12 -16
  12. package/dist/components/wrappers/WpDrawer.vue.js +7 -9
  13. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  14. package/dist/components/wrappers/WpModal.vue.js +1 -1
  15. package/dist/components/wrappers/WpModal.vue2.js +4 -3
  16. package/dist/composables/useAuthError.js +52 -0
  17. package/dist/composables/useAutoSave.js +11 -11
  18. package/dist/composables/useCortexBlueprintBridge.js +122 -54
  19. package/dist/composables/useEmailTemplateApplier.js +111 -50
  20. package/dist/composables/useHtmlCompiler.js +26 -37
  21. package/dist/composables/useHtmlValidator.js +0 -2
  22. package/dist/composables/useHttp.js +64 -54
  23. package/dist/composables/useLegacyStrategyConversion.js +23 -19
  24. package/dist/composables/useSave.js +45 -90
  25. package/dist/composables/useStripo.js +24 -20
  26. package/dist/composables/useToaster.js +17 -15
  27. package/dist/composables/validators/useCouponBlockValidator.js +21 -24
  28. package/dist/composables/validators/useLiquidValidator.js +15 -15
  29. package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
  30. package/dist/config/migrator/index.js +14 -13
  31. package/dist/config/migrator/itemsBlockMigrator.js +236 -248
  32. package/dist/config/migrator/recommendationMigrator.js +28 -21
  33. package/dist/config/migrator/recommendationPartnerMigrator.js +56 -0
  34. package/dist/enums/extensions/recommendationBlock.js +30 -29
  35. package/dist/extensions/Blocks/Items/block.js +48 -45
  36. package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
  37. package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
  38. package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
  39. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  40. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
  41. package/dist/extensions/Blocks/Items/template.js +219 -204
  42. package/dist/extensions/Blocks/Recommendation/block.js +15 -14
  43. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +45 -38
  44. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -49
  45. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +32 -38
  46. package/dist/extensions/Blocks/Recommendation/utils/partnerCustomizations.js +3 -1
  47. package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +25 -0
  48. package/dist/guido.css +1 -1
  49. package/dist/src/@types/config/schemas.d.ts +16 -4
  50. package/dist/src/components/Guido.vue.d.ts +1 -17
  51. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
  52. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
  53. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
  54. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
  55. package/dist/src/components/wrappers/WpModal.vue.d.ts +5 -1
  56. package/dist/src/composables/useAuthError.d.ts +12 -0
  57. package/dist/src/composables/useConfig.d.ts +2 -2
  58. package/dist/src/composables/useCortexBlueprintBridge.d.ts +2 -3
  59. package/dist/src/composables/useEmailTemplateApplier.d.ts +18 -5
  60. package/dist/src/composables/useGuidoActions.d.ts +2 -0
  61. package/dist/src/composables/useHtmlValidator.d.ts +0 -21
  62. package/dist/src/composables/useHttp.d.ts +2 -0
  63. package/dist/src/composables/useSave.d.ts +1 -6
  64. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
  65. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
  66. package/dist/src/config/migrator/index.d.ts +2 -1
  67. package/dist/src/config/migrator/recommendationPartnerMigrator.d.ts +19 -0
  68. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -1
  69. package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
  70. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
  71. package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
  72. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -5
  73. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
  74. package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +33 -0
  75. package/dist/src/mock/cortexChatStore.d.ts +12 -0
  76. package/dist/src/stores/config.d.ts +20 -32
  77. package/dist/src/stores/guido-email-editor.d.ts +20 -10
  78. package/dist/src/stores/onboarding.d.ts +4 -0
  79. package/dist/src/stores/recommendation.d.ts +5 -0
  80. package/dist/src/utils/dateUtil.d.ts +10 -0
  81. package/dist/src/utils/genericUtil.d.ts +3 -0
  82. package/dist/src/utils/templatePreparation.d.ts +0 -30
  83. package/dist/static/styles/components/recommendation-strategy.css.js +9 -0
  84. package/dist/static/styles/components/version-history.css.js +2 -6
  85. package/dist/stores/config.js +67 -84
  86. package/dist/stores/guido-email-editor.js +3 -1
  87. package/dist/stores/onboarding.js +4 -0
  88. package/dist/utils/pairProductVariables.js +71 -71
  89. package/dist/utils/templatePreparation.js +36 -39
  90. package/package.json +1 -1
  91. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
  92. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -48
  93. package/dist/composables/useSaveValidation.js +0 -279
  94. package/dist/composables/useSaveValidationRollout.js +0 -9
  95. package/dist/enums/save-validation.js +0 -4
  96. package/dist/src/@types/save-validation.d.ts +0 -19
  97. package/dist/src/composables/useSaveValidation.d.ts +0 -6
  98. package/dist/src/composables/useSaveValidationRollout.d.ts +0 -3
  99. package/dist/src/enums/save-validation.d.ts +0 -27
  100. package/dist/src/stores/save-validation.d.ts +0 -22
  101. package/dist/stores/save-validation.js +0 -30
  102. /package/dist/src/components/organisms/{validation/ValidationErrorDrawer.vue.d.ts → base/AuthErrorModal.vue.d.ts} +0 -0
@@ -1,6 +1,3 @@
1
- export declare const COUPON_TAG_MODIFIED_KEY = "newsletter.coupon-tag-modified";
2
- /** Pure core: the tag text of every coupon block whose code was modified. */
3
- export declare function findInvalidCouponBlocks(html: string): string[];
4
1
  export declare const useCouponBlockValidator: () => {
5
2
  validateCouponBlockTags: (html: string) => boolean;
6
3
  };
@@ -1,14 +1,4 @@
1
- declare const SINGLETON_BLOCK_RULES: {
2
- pageType: number;
3
- messageKey: string;
4
- }[];
5
- export declare const EMPTY_BLOCK_KEY = "unsubscription-preference.select-page-to-continue";
6
- /** Pure core: the singleton rules whose page type appears more than once. */
7
- export declare function findDuplicateUnsubPageTypes(html: string): typeof SINGLETON_BLOCK_RULES;
8
- /** Pure core: count of unsubscribe blocks with no page type or page list chosen. */
9
- export declare function countUnsubBlocksWithoutPage(html: string): number;
10
1
  export declare const useUnsubscribeBlockValidator: () => {
11
2
  validateUnsubscribeBlockUniqueness: (html: string) => boolean;
12
3
  validateUnsubscribeBlockHasTemplate: (html: string) => boolean;
13
4
  };
14
- export {};
@@ -1,2 +1,3 @@
1
1
  import type { LegacyRecommendationConfig } from '@@/Types/config';
2
- export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>) => Promise<string>;
2
+ import { type PartnerScopeMigrationOptions } from './recommendationPartnerMigrator';
3
+ export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, partnerScope?: PartnerScopeMigrationOptions) => Promise<string>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Empties recommendation blocks copied in from another account and stamps the
3
+ * current one, before the editor ever sees the template (SD-151945).
4
+ *
5
+ * Runs at load rather than on document change: the stamp makes it a one-time
6
+ * pass per template, the campaign-URL rule only ever applies to the loaded HTML,
7
+ * and Stripo takes the result as the original document, so nothing is dirtied.
8
+ */
9
+ export interface PartnerScopeMigrationOptions {
10
+ partnerName: string;
11
+ /** `undefined` when the host does not pass the map — the unstamped check is then off. */
12
+ campaignUrls?: Record<string, unknown>;
13
+ rrsEnabled: boolean;
14
+ }
15
+ /**
16
+ * @param html Template HTML, already normalized by `migrateRecommendation`.
17
+ * @returns Migrated HTML, or the original when no block needed a reset or a stamp.
18
+ */
19
+ export declare function migrateRecommendationPartnerScope(html: string, { partnerName, campaignUrls, rrsEnabled }: PartnerScopeMigrationOptions): string;
@@ -8,8 +8,8 @@ export declare const URLS: {
8
8
  NEWSLETTER_RECOMMENDATIONS_PATH: string;
9
9
  MIGRATE_STRATEGIES_PATH: string;
10
10
  TEMPLATE_MIGRATE_STRATEGIES_PATH: string;
11
- RECOMMENDATION_STRATEGY_CREATE_PATH: string;
12
11
  };
12
+ export declare const strategyCreatePath: () => string;
13
13
  export declare const strategyEditPath: (strategyId: string | number) => string;
14
14
  export declare const MIGRATION_PATHS: Record<RrsMigrationTarget['scope'], string>;
15
15
  export declare const QUERY_PARAMS: {
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Single owner for the Items card orientation-dependent layout contract (SD-149368).
3
+ *
4
+ * Two things depend on a card's orientation and are written across several layers:
5
+ *
6
+ * 1. Name column width — a horizontal card lays the name in a narrow side-by-side
7
+ * column, so it is capped; a vertical card gives it a full-width row.
8
+ * 2. Block-cell padding — the collapsible price / original-price block-cell carries its
9
+ * own inter-cell spacing (horizontal cards pad left/right, vertical cards pad
10
+ * top/bottom) so a hidden element removes its own spacing instead of leaving a gap.
11
+ *
12
+ * Every layer that writes these — template render, layouts/horizontal.html,
13
+ * NameTrimmingControl (trimming toggle) and settingsControl (orientation change) — MUST
14
+ * derive them here, or a migrated / re-toggled card silently drifts out of sync with
15
+ * freshly generated markup (convention B1: cross-layer literals live in one module).
16
+ */
17
+ export declare const NAME_HORIZONTAL_MAX_WIDTH = "130px";
18
+ export declare const NAME_VERTICAL_MAX_WIDTH = "100%";
19
+ /** Name max-width for a card orientation. Non-horizontal (incl. undefined) → full width. */
20
+ export declare const nameMaxWidthFor: (orientation?: string) => string;
21
+ /** Orientation-dependent inter-cell padding classes for a collapsible block-cell. */
22
+ export declare const BLOCK_CELL_PADDING: {
23
+ readonly VERTICAL: "es-p5b es-p5t";
24
+ readonly HORIZONTAL: "es-p5l es-p5r";
25
+ };
26
+ /**
27
+ * Attribute the block-cell carries to mark its LAYOUT-owned padding orientation ('v'|'h').
28
+ * The orientation toggle keys off this marker so it only ever rewrites the padding the
29
+ * layout itself baked — a user's own es-p* padding classes are never matched or clobbered
30
+ * (SD-149368 F1), and a cell without the marker is left untouched rather than mis-swapped.
31
+ */
32
+ export declare const BLOCK_CELL_PAD_ATTR = "data-items-cell-pad";
33
+ /** Marker attribute (`data-items-cell-pad="v|h"`) for a block-cell in the given orientation. */
34
+ export declare const blockCellPadMarker: (isVertical: boolean) => string;
35
+ /** Padding classes (leading space included) for a block-cell in the given orientation. */
36
+ export declare const blockCellPaddingFor: (isVertical: boolean) => string;
37
+ /**
38
+ * Rewrites a block-cell's LAYOUT-owned padding classes to the target orientation, keyed off
39
+ * the BLOCK_CELL_PAD_ATTR marker. The orientation-change rebuild re-injects existing cells
40
+ * via getOuterHTML(), which still carry the previous orientation's padding — swap only the
41
+ * layout pair (and flip the marker) so price/original-price cells stay padded after a toggle
42
+ * (SD-149368 F3), while a user's own padding and any unmarked cell are left alone (F1).
43
+ */
44
+ export declare const reorientBlockCellPadding: (html: string, toVertical: boolean) => string;
@@ -39,14 +39,17 @@ export declare const productPairs: {
39
39
  CART_ITEMS: {
40
40
  ATTR: string;
41
41
  DEFAULT: string;
42
+ LEGACY_DEFAULTS: readonly string[];
42
43
  };
43
44
  BROWSED_ITEMS: {
44
45
  ATTR: string;
45
46
  DEFAULT: string;
47
+ LEGACY_DEFAULTS: readonly string[];
46
48
  };
47
49
  PURCHASED_ITEMS: {
48
50
  ATTR: string;
49
51
  DEFAULT: string;
52
+ LEGACY_DEFAULTS: readonly string[];
50
53
  };
51
54
  };
52
55
  price: {
@@ -37,6 +37,25 @@ type TemplateParameters = {
37
37
  /** Price orientation within the card ('vertical' = stacked, 'horizontal' = side-by-side) */
38
38
  priceOrientation?: PriceOrientationType;
39
39
  };
40
+ /**
41
+ * Applies price orientation styles to the generated HTML template.
42
+ *
43
+ * For Vertical Layout:
44
+ * - vertical price orientation: both cells 100% (stacked)
45
+ * - horizontal price orientation with both visible: both cells 50% (side-by-side)
46
+ * - horizontal price orientation with one hidden: visible cell 100%
47
+ *
48
+ * For Horizontal Layout:
49
+ * - horizontal price orientation: .horizontal-price visible, .vertical-price hidden
50
+ * - vertical price orientation: .horizontal-price hidden, .vertical-price visible
51
+ * @param html - The HTML template string with placeholders replaced
52
+ * @param layoutOrientation - The card layout orientation ('vertical' or 'horizontal')
53
+ * @param priceOrientation - The price orientation within the card ('vertical' or 'horizontal')
54
+ * @param isPriceVisible - Whether the price element is visible
55
+ * @param isOriginalPriceVisible - Whether the original price element is visible
56
+ * @returns HTML string with price orientation styles applied
57
+ */
58
+ export declare const applyPriceOrientationStyles: (html: string, layoutOrientation: OrientationType, priceOrientation: PriceOrientationType, isPriceVisible?: boolean, isOriginalPriceVisible?: boolean) => string;
40
59
  /**
41
60
  * Generates the default template for the Items Block.
42
61
  * @param params - Template parameters including orientation, items type, item ID, and formatting options
@@ -612,11 +612,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
612
612
  * every block's recommendationConfigs across user edits.
613
613
  */
614
614
  hasInvalidBlock(): boolean;
615
- /**
616
- * Per-instance counterpart to `hasInvalidBlock`: the ids of every block
617
- * that fails required-field validation, one drawer row each (SD-147430).
618
- */
619
- invalidBlockIds(): string[];
620
615
  /**
621
616
  * Which required fields are missing across the design's blocks, so the save
622
617
  * toaster can name the cause instead of always showing the generic message.
@@ -83,6 +83,12 @@ export interface RecommendationNodeConfig {
83
83
  */
84
84
  filters: Filter[];
85
85
  strategyId: string;
86
+ /**
87
+ * Account (`config.partner.name`) that last wrote the strategy config. Strategy ids and
88
+ * attribute types are account-scoped, so a block opened under another account is reset.
89
+ * Absent on blocks saved before SD-151945.
90
+ */
91
+ partnerName?: string;
86
92
  /**
87
93
  * Layout orientation
88
94
  * - 'grid': Products in a grid, attributes aligned across products
@@ -0,0 +1,33 @@
1
+ import type { RecommendationNodeConfig } from '../types/nodeConfig';
2
+ /**
3
+ * Mirrors the backend's `RecommendationCampaignUrls::isDefined`: a legacy feed URL
4
+ * string or an entry that names a strategy.
5
+ */
6
+ export declare function isDefinedCampaignUrl(value: unknown): boolean;
7
+ export interface PartnerScopeInputs {
8
+ config: Pick<RecommendationNodeConfig, 'strategyId' | 'partnerName'>;
9
+ blockId: number;
10
+ partnerName: string;
11
+ /** `undefined` when the host does not pass the map — the unstamped check is then off. */
12
+ campaignUrls: Record<string, unknown> | undefined;
13
+ /** With RRS off `buildCampaignUrl` drops the block's map entry, so the map says nothing. */
14
+ rrsEnabled: boolean;
15
+ }
16
+ /**
17
+ * Whether a block carries another account's strategy config (SD-151945).
18
+ *
19
+ * A stamped block is judged by its stamp. An unstamped one predates the stamp, so it
20
+ * falls back to the backend's own signal: a cross-account duplicate drops the block's
21
+ * strategy entry from the campaign URL map but leaves the HTML untouched. That signal
22
+ * only holds while RRS is on, and only for the HTML the host loaded — which is what
23
+ * the caller, a load-time migrator, runs on.
24
+ */
25
+ export declare function carriesForeignPartnerConfig({ config, blockId, partnerName, campaignUrls, rrsEnabled }: PartnerScopeInputs): boolean;
26
+ /**
27
+ * Whether an unstamped block's ownership can be decided at all. `carriesForeignPartnerConfig`
28
+ * answers `false` both for "clean" and for "cannot tell", and stamping on the latter would
29
+ * record a foreign block as this account's and silence every later check. A block with no
30
+ * strategy reference has nothing foreign to carry, so it is always decidable.
31
+ */
32
+ export declare function canJudgeUnstampedBlock({ config, campaignUrls, rrsEnabled }: Pick<PartnerScopeInputs, 'config' | 'campaignUrls' | 'rrsEnabled'>): boolean;
33
+ export declare function withoutCustomAttributes(composition: string[]): string[];
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Dev-harness stand-in for the cortex-fe MFE's shared `chat` store.
3
+ *
4
+ * `useCortexBlueprintBridge` resolves that store by id off the host's pinia at
5
+ * Guido's setup time, so a store registered after mount is never seen. Installing
6
+ * it here — before `<Guido>` renders — lets e2e drive the bridge through its real
7
+ * registration path instead of re-invoking the composable by hand.
8
+ *
9
+ * Activated with `?chatStore=true`; the instance is exposed on `window` so a test
10
+ * can push agent messages into it.
11
+ */
12
+ export declare const installMockChatStore: () => void;
@@ -48,6 +48,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
48
48
  selectedUnsubscribePages: number[];
49
49
  forceRecreate: boolean;
50
50
  trackIdCounter: number;
51
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
51
52
  migration: {
52
53
  recommendationConfigs: {
53
54
  [x: string]: {
@@ -106,7 +107,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
106
107
  autosave: boolean;
107
108
  allowlistEnabled: boolean;
108
109
  linkTrackingIds: boolean;
109
- allowSaveWithErrors: boolean;
110
110
  reusableRecommendationStrategy: boolean;
111
111
  };
112
112
  blocks: {
@@ -192,6 +192,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
192
192
  selectedUnsubscribePages: number[];
193
193
  forceRecreate: boolean;
194
194
  trackIdCounter: number;
195
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
195
196
  migration: {
196
197
  recommendationConfigs: {
197
198
  [x: string]: {
@@ -250,7 +251,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
250
251
  autosave: boolean;
251
252
  allowlistEnabled: boolean;
252
253
  linkTrackingIds: boolean;
253
- allowSaveWithErrors: boolean;
254
254
  reusableRecommendationStrategy: boolean;
255
255
  };
256
256
  blocks: {
@@ -336,6 +336,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
336
336
  selectedUnsubscribePages: number[];
337
337
  forceRecreate: boolean;
338
338
  trackIdCounter: number;
339
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
339
340
  migration: {
340
341
  recommendationConfigs: {
341
342
  [x: string]: {
@@ -394,7 +395,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
394
395
  autosave: boolean;
395
396
  allowlistEnabled: boolean;
396
397
  linkTrackingIds: boolean;
397
- allowSaveWithErrors: boolean;
398
398
  reusableRecommendationStrategy: boolean;
399
399
  };
400
400
  blocks: {
@@ -480,6 +480,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
480
480
  selectedUnsubscribePages: number[];
481
481
  forceRecreate: boolean;
482
482
  trackIdCounter: number;
483
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
483
484
  migration: {
484
485
  recommendationConfigs: {
485
486
  [x: string]: {
@@ -538,7 +539,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
538
539
  autosave: boolean;
539
540
  allowlistEnabled: boolean;
540
541
  linkTrackingIds: boolean;
541
- allowSaveWithErrors: boolean;
542
542
  reusableRecommendationStrategy: boolean;
543
543
  };
544
544
  blocks: {
@@ -624,6 +624,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
624
624
  selectedUnsubscribePages: number[];
625
625
  forceRecreate: boolean;
626
626
  trackIdCounter: number;
627
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
627
628
  migration: {
628
629
  recommendationConfigs: {
629
630
  [x: string]: {
@@ -682,7 +683,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
682
683
  autosave: boolean;
683
684
  allowlistEnabled: boolean;
684
685
  linkTrackingIds: boolean;
685
- allowSaveWithErrors: boolean;
686
686
  reusableRecommendationStrategy: boolean;
687
687
  };
688
688
  blocks: {
@@ -768,6 +768,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
768
768
  selectedUnsubscribePages: number[];
769
769
  forceRecreate: boolean;
770
770
  trackIdCounter: number;
771
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
771
772
  migration: {
772
773
  recommendationConfigs: {
773
774
  [x: string]: {
@@ -826,7 +827,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
826
827
  autosave: boolean;
827
828
  allowlistEnabled: boolean;
828
829
  linkTrackingIds: boolean;
829
- allowSaveWithErrors: boolean;
830
830
  reusableRecommendationStrategy: boolean;
831
831
  };
832
832
  blocks: {
@@ -912,6 +912,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
912
912
  selectedUnsubscribePages: number[];
913
913
  forceRecreate: boolean;
914
914
  trackIdCounter: number;
915
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
915
916
  migration: {
916
917
  recommendationConfigs: {
917
918
  [x: string]: {
@@ -970,7 +971,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
970
971
  autosave: boolean;
971
972
  allowlistEnabled: boolean;
972
973
  linkTrackingIds: boolean;
973
- allowSaveWithErrors: boolean;
974
974
  reusableRecommendationStrategy: boolean;
975
975
  };
976
976
  blocks: {
@@ -1056,6 +1056,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1056
1056
  selectedUnsubscribePages: number[];
1057
1057
  forceRecreate: boolean;
1058
1058
  trackIdCounter: number;
1059
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
1059
1060
  migration: {
1060
1061
  recommendationConfigs: {
1061
1062
  [x: string]: {
@@ -1114,7 +1115,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1114
1115
  autosave: boolean;
1115
1116
  allowlistEnabled: boolean;
1116
1117
  linkTrackingIds: boolean;
1117
- allowSaveWithErrors: boolean;
1118
1118
  reusableRecommendationStrategy: boolean;
1119
1119
  };
1120
1120
  blocks: {
@@ -1200,6 +1200,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1200
1200
  selectedUnsubscribePages: number[];
1201
1201
  forceRecreate: boolean;
1202
1202
  trackIdCounter: number;
1203
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
1203
1204
  migration: {
1204
1205
  recommendationConfigs: {
1205
1206
  [x: string]: {
@@ -1258,7 +1259,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1258
1259
  autosave: boolean;
1259
1260
  allowlistEnabled: boolean;
1260
1261
  linkTrackingIds: boolean;
1261
- allowSaveWithErrors: boolean;
1262
1262
  reusableRecommendationStrategy: boolean;
1263
1263
  };
1264
1264
  blocks: {
@@ -1344,6 +1344,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1344
1344
  selectedUnsubscribePages: number[];
1345
1345
  forceRecreate: boolean;
1346
1346
  trackIdCounter: number;
1347
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
1347
1348
  migration: {
1348
1349
  recommendationConfigs: {
1349
1350
  [x: string]: {
@@ -1402,7 +1403,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1402
1403
  autosave: boolean;
1403
1404
  allowlistEnabled: boolean;
1404
1405
  linkTrackingIds: boolean;
1405
- allowSaveWithErrors: boolean;
1406
1406
  reusableRecommendationStrategy: boolean;
1407
1407
  };
1408
1408
  blocks: {
@@ -1488,6 +1488,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1488
1488
  selectedUnsubscribePages: number[];
1489
1489
  forceRecreate: boolean;
1490
1490
  trackIdCounter: number;
1491
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
1491
1492
  migration: {
1492
1493
  recommendationConfigs: {
1493
1494
  [x: string]: {
@@ -1546,7 +1547,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1546
1547
  autosave: boolean;
1547
1548
  allowlistEnabled: boolean;
1548
1549
  linkTrackingIds: boolean;
1549
- allowSaveWithErrors: boolean;
1550
1550
  reusableRecommendationStrategy: boolean;
1551
1551
  };
1552
1552
  blocks: {
@@ -1632,6 +1632,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1632
1632
  selectedUnsubscribePages: number[];
1633
1633
  forceRecreate: boolean;
1634
1634
  trackIdCounter: number;
1635
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
1635
1636
  migration: {
1636
1637
  recommendationConfigs: {
1637
1638
  [x: string]: {
@@ -1690,7 +1691,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1690
1691
  autosave: boolean;
1691
1692
  allowlistEnabled: boolean;
1692
1693
  linkTrackingIds: boolean;
1693
- allowSaveWithErrors: boolean;
1694
1694
  reusableRecommendationStrategy: boolean;
1695
1695
  };
1696
1696
  blocks: {
@@ -1776,6 +1776,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1776
1776
  selectedUnsubscribePages: number[];
1777
1777
  forceRecreate: boolean;
1778
1778
  trackIdCounter: number;
1779
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
1779
1780
  migration: {
1780
1781
  recommendationConfigs: {
1781
1782
  [x: string]: {
@@ -1834,7 +1835,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1834
1835
  autosave: boolean;
1835
1836
  allowlistEnabled: boolean;
1836
1837
  linkTrackingIds: boolean;
1837
- allowSaveWithErrors: boolean;
1838
1838
  reusableRecommendationStrategy: boolean;
1839
1839
  };
1840
1840
  blocks: {
@@ -1920,6 +1920,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1920
1920
  selectedUnsubscribePages: number[];
1921
1921
  forceRecreate: boolean;
1922
1922
  trackIdCounter: number;
1923
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
1923
1924
  migration: {
1924
1925
  recommendationConfigs: {
1925
1926
  [x: string]: {
@@ -1978,7 +1979,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1978
1979
  autosave: boolean;
1979
1980
  allowlistEnabled: boolean;
1980
1981
  linkTrackingIds: boolean;
1981
- allowSaveWithErrors: boolean;
1982
1982
  reusableRecommendationStrategy: boolean;
1983
1983
  };
1984
1984
  blocks: {
@@ -2064,6 +2064,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2064
2064
  selectedUnsubscribePages: number[];
2065
2065
  forceRecreate: boolean;
2066
2066
  trackIdCounter: number;
2067
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
2067
2068
  migration: {
2068
2069
  recommendationConfigs: {
2069
2070
  [x: string]: {
@@ -2122,7 +2123,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2122
2123
  autosave: boolean;
2123
2124
  allowlistEnabled: boolean;
2124
2125
  linkTrackingIds: boolean;
2125
- allowSaveWithErrors: boolean;
2126
2126
  reusableRecommendationStrategy: boolean;
2127
2127
  };
2128
2128
  blocks: {
@@ -2208,6 +2208,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2208
2208
  selectedUnsubscribePages: number[];
2209
2209
  forceRecreate: boolean;
2210
2210
  trackIdCounter: number;
2211
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
2211
2212
  migration: {
2212
2213
  recommendationConfigs: {
2213
2214
  [x: string]: {
@@ -2266,7 +2267,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2266
2267
  autosave: boolean;
2267
2268
  allowlistEnabled: boolean;
2268
2269
  linkTrackingIds: boolean;
2269
- allowSaveWithErrors: boolean;
2270
2270
  reusableRecommendationStrategy: boolean;
2271
2271
  };
2272
2272
  blocks: {
@@ -2352,6 +2352,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2352
2352
  selectedUnsubscribePages: number[];
2353
2353
  forceRecreate: boolean;
2354
2354
  trackIdCounter: number;
2355
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
2355
2356
  migration: {
2356
2357
  recommendationConfigs: {
2357
2358
  [x: string]: {
@@ -2410,7 +2411,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2410
2411
  autosave: boolean;
2411
2412
  allowlistEnabled: boolean;
2412
2413
  linkTrackingIds: boolean;
2413
- allowSaveWithErrors: boolean;
2414
2414
  reusableRecommendationStrategy: boolean;
2415
2415
  };
2416
2416
  blocks: {
@@ -2454,18 +2454,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2454
2454
  };
2455
2455
  } | null;
2456
2456
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
2457
- /**
2458
- * Transactional campaigns keep the hard save block. Reactive getter, so
2459
- * consumers stay safe in setup where a raw config read snapshots null (SD-147945).
2460
- */
2461
- isTransactional(): boolean;
2462
- /**
2463
- * Soft-save policy: may the editor persist a template with validation errors?
2464
- * Default true (host sets features.allowSaveWithErrors=false for transactional +
2465
- * unsub). Reactive getter defaulting true — reading via isFeatureEnabled would
2466
- * floor to false pre-init and momentarily hide the soft-save option (SD-147430).
2467
- */
2468
- allowSaveWithErrors(): boolean;
2469
2457
  /**
2470
2458
  * Get the username
2471
2459
  */
@@ -2508,6 +2496,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2508
2496
  selectedUnsubscribePages: number[];
2509
2497
  forceRecreate: boolean;
2510
2498
  trackIdCounter: number;
2499
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
2511
2500
  migration: {
2512
2501
  recommendationConfigs: {
2513
2502
  [x: string]: {
@@ -2566,7 +2555,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2566
2555
  autosave: boolean;
2567
2556
  allowlistEnabled: boolean;
2568
2557
  linkTrackingIds: boolean;
2569
- allowSaveWithErrors: boolean;
2570
2558
  reusableRecommendationStrategy: boolean;
2571
2559
  };
2572
2560
  blocks: {
@@ -2652,6 +2640,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2652
2640
  selectedUnsubscribePages: number[];
2653
2641
  forceRecreate: boolean;
2654
2642
  trackIdCounter: number;
2643
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
2655
2644
  migration: {
2656
2645
  recommendationConfigs: {
2657
2646
  [x: string]: {
@@ -2710,7 +2699,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2710
2699
  autosave: boolean;
2711
2700
  allowlistEnabled: boolean;
2712
2701
  linkTrackingIds: boolean;
2713
- allowSaveWithErrors: boolean;
2714
2702
  reusableRecommendationStrategy: boolean;
2715
2703
  };
2716
2704
  blocks: {
@@ -2798,6 +2786,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2798
2786
  selectedUnsubscribePages: number[];
2799
2787
  forceRecreate: boolean;
2800
2788
  trackIdCounter: number;
2789
+ recommendationCampaignUrls?: Record<string, unknown> | undefined;
2801
2790
  migration: {
2802
2791
  recommendationConfigs: {
2803
2792
  [x: string]: {
@@ -2856,7 +2845,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2856
2845
  autosave: boolean;
2857
2846
  allowlistEnabled: boolean;
2858
2847
  linkTrackingIds: boolean;
2859
- allowSaveWithErrors: boolean;
2860
2848
  reusableRecommendationStrategy: boolean;
2861
2849
  };
2862
2850
  blocks: {
@@ -1,3 +1,13 @@
1
+ /** Terminal outcome of an editor write, keyed by `${blueprintId}:${version}`. */
2
+ export interface ApplyAck {
3
+ status: 'applied' | 'failed';
4
+ /** The `applyRequestedAt` of the click this ack answers — lets cortex drop stale acks. */
5
+ requestedAt: number;
6
+ /** Strictly increasing per key, so two acks in the same millisecond still order. */
7
+ ackAt: number;
8
+ /** Stringified — cortex JSON-clones store-derived payloads, an Error would not survive. */
9
+ error?: string;
10
+ }
1
11
  /** The published editor snapshot — the shape a consumer reads off the shared store. */
2
12
  export interface GuidoEmailEditorState {
3
13
  /** Current Stripo HTML — stripe tables only, no DOCTYPE/wrapper. */
@@ -8,6 +18,10 @@ export interface GuidoEmailEditorState {
8
18
  lastUpdatedAt: number;
9
19
  /** Template id from the editor config, so a consumer can scope per-template. */
10
20
  templateId: string;
21
+ /** True while a mounted Guido bridge is consuming the chat store. Gates cortex's Apply button. */
22
+ bridgeActive: boolean;
23
+ /** `${blueprintId}:${version}` → terminal outcome of the editor write, written only after it settles. */
24
+ applyAcks: Record<string, ApplyAck>;
11
25
  }
12
26
  /**
13
27
  * Outbound contract Guido publishes to the host's shared Pinia singleton so a
@@ -18,17 +32,11 @@ export interface GuidoEmailEditorState {
18
32
  * Published as `@useinsider/guido/editor-state` and from the root barrel, so a
19
33
  * consumer imports this store instead of re-declaring one under the same id.
20
34
  *
21
- * State + getters only, no actions. `useGuidoStateBridge` is the only intended
22
- * writer, but that is Guido's own convention rather than something the store
23
- * enforces: publishing the definition hands a consumer `$patch` as well, exactly
24
- * as the runtime `pinia._s` probe always did.
35
+ * State-only by contract: cortex-fe reads `pinia.state.value['guidoEmailEditor']`, which misses
36
+ * actions and getters. Intended writers: `useGuidoStateBridge` and `useCortexBlueprintBridge`.
25
37
  *
26
- * Store id `guidoEmailEditor` is cross-MFE: cortex-fe reads it via
27
- * `pinia._s.get('guidoEmailEditor')` at runtime rather than importing it, so the
28
- * id stays part of the contract. The internal Guido editor store keeps id
29
- * `guidoEditor` — these are intentionally separate. The internal store carries
30
- * UI state a consumer should not see; this public store carries the contract
31
- * Guido is willing to share.
38
+ * The id `guidoEmailEditor` is part of the cross-MFE contract; the internal
39
+ * store `guidoEditor` is intentionally separate.
32
40
  */
33
41
  export declare const useGuidoEmailEditorStore: import("pinia").StoreDefinition<"guidoEmailEditor", GuidoEmailEditorState, {
34
42
  /** True once the bridge has published at least one snapshot. */
@@ -37,5 +45,7 @@ export declare const useGuidoEmailEditorStore: import("pinia").StoreDefinition<"
37
45
  css: string;
38
46
  lastUpdatedAt: number;
39
47
  templateId: string;
48
+ bridgeActive: boolean;
49
+ applyAcks: Record<string, ApplyAck>;
40
50
  } & import("pinia").PiniaCustomStateProperties<GuidoEmailEditorState>) => boolean;
41
51
  }, {}>;
@@ -1,5 +1,6 @@
1
1
  import type { OnboardingCardConfig, OnboardingType, OnboardingStoreState } from '@@/Types/onboarding';
2
2
  export declare const useOnboardingStore: import("pinia").StoreDefinition<"guidoOnboarding", OnboardingStoreState, {
3
+ /** @deprecated Components use the type-specific getters. Slated for deletion, see the SD-667788 dead-code ledger. */
3
4
  getOnboarding: (state: {
4
5
  onboardings: {
5
6
  newVersionPopup: {
@@ -390,6 +391,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"guidoO
390
391
  };
391
392
  isFetched: boolean;
392
393
  } & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => (type: OnboardingType) => boolean;
394
+ /** @deprecated Components use getGenericCurrentCard / getTextBlockCurrentCard. Slated for deletion, see the SD-667788 dead-code ledger. */
393
395
  getCurrentCard: (state: {
394
396
  onboardings: {
395
397
  newVersionPopup: {
@@ -2190,6 +2192,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"guidoO
2190
2192
  close(type: OnboardingType): Promise<void>;
2191
2193
  next(type: OnboardingType): void;
2192
2194
  previous(type: OnboardingType): void;
2195
+ /** @deprecated No caller in src/. Slated for deletion, see the SD-667788 dead-code ledger. */
2193
2196
  updateCardPosition(type: OnboardingType, cardIndex: number, position: {
2194
2197
  top: string;
2195
2198
  position: string;
@@ -2198,6 +2201,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"guidoO
2198
2201
  onDiscoverNowClicked(): Promise<void>;
2199
2202
  onRemindMeLater(): void;
2200
2203
  onNewVersionPopupClose(): Promise<void>;
2204
+ /** @deprecated No caller in src/. Slated for deletion, see the SD-667788 dead-code ledger. */
2201
2205
  isOnboardingActive(): boolean;
2202
2206
  fetchUserModalState(): Promise<void>;
2203
2207
  setUserModalState(modal: string, state: string, page: string): Promise<void>;
@@ -6,5 +6,10 @@ type RecommendationConfig = {
6
6
  interface StoreState {
7
7
  recommendationConfigs: RecommendationConfig[];
8
8
  }
9
+ /**
10
+ * @deprecated recommendationConfigs has no writer in src/, so the store is
11
+ * permanently empty and its only readers (useHtmlValidator.ts:496-497) are a
12
+ * no-op. Slated for deletion, see the SD-667788 dead-code ledger.
13
+ */
9
14
  export declare const useRecommendationStore: import("pinia").StoreDefinition<"guidoRecommendation", StoreState, {}, {}>;
10
15
  export {};