@useinsider/guido 3.12.0-beta.e16c8db → 3.12.0-beta.eb4ca1c

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 CHANGED
@@ -161,11 +161,16 @@ const config: GuidoConfigInput = {
161
161
  modulesDisabled?: boolean, // Default: false - Disable modules panel
162
162
  liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
163
163
  autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
164
+ allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (see below).
164
165
  },
165
166
 
166
167
  // Optional: Callbacks
167
168
  callbacks?: {
168
169
  externalValidation?: (data: SavedTemplateDetails) => Promise<boolean>, // Return false to cancel save
170
+ // OPTIONAL override for the allowlist block toaster. By default Guido self-serves it: it resolves the user
171
+ // role via /get-user-role-and-email, builds the settings deep-link, and reads copy from window.trans — so
172
+ // consumers only set features.allowlistEnabled. Supply this only to replace that content; null/void keeps the default.
173
+ resolveAllowlistToast?: (blockedDomains: string[]) => { message: string, actionButton?: { text: string, onClick: () => void } } | null | void,
169
174
  },
170
175
 
171
176
  // Optional: Block configuration
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
- import { object as a, number as n, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as f, boolean as o, array as c, record as k, fallback as C, literal as i, looseObject as g, variant as R, union as h, unknown as s, lazy as T } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as a, number as n, optional as e, string as t, picklist as i, pipe as p, minLength as b, custom as S, boolean as o, array as c, record as k, fallback as C, literal as m, looseObject as g, variant as R, union as h, unknown as l, lazy as T } from "../../node_modules/valibot/dist/index.js";
3
3
  const d = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -30,7 +30,7 @@ const d = {
30
30
  name: t(),
31
31
  /** Fallback font family (e.g., "serif" or "sans-serif") */
32
32
  family: t()
33
- }), L = a({
33
+ }), v = a({
34
34
  /** Partner/organization name (required) */
35
35
  name: p(
36
36
  t(),
@@ -38,7 +38,7 @@ const d = {
38
38
  ),
39
39
  /** Product type identifier */
40
40
  productType: e(
41
- l([
41
+ i([
42
42
  r.EMAIL,
43
43
  r.ARCHITECT,
44
44
  r.UNSUBSCRIBE_PAGES
@@ -47,14 +47,14 @@ const d = {
47
47
  ),
48
48
  /** Message type (promotional or transactional) */
49
49
  messageType: e(
50
- l([d.PROMOTIONAL, d.TRANSACTIONAL]),
50
+ i([d.PROMOTIONAL, d.TRANSACTIONAL]),
51
51
  d.PROMOTIONAL
52
52
  ),
53
53
  /** Display name for the current user */
54
54
  username: e(t(), "Guido User"),
55
55
  /** Fallback font settings from partner settings — used to match backend size calculation */
56
56
  fallbackFont: e(I)
57
- }), v = a({
57
+ }), L = a({
58
58
  /** Display text for the dynamic content */
59
59
  text: t(),
60
60
  /** Template variable value (e.g., {{username}}) */
@@ -68,40 +68,40 @@ const d = {
68
68
  value: t()
69
69
  })
70
70
  )
71
- }), S = T(() => g({
71
+ }), f = T(() => g({
72
72
  text: e(t()),
73
73
  // eslint-disable-next-line camelcase -- backend field name
74
74
  tag_text: e(t()),
75
75
  value: e(t()),
76
- children: e(c(S)),
76
+ children: e(c(f)),
77
77
  // eslint-disable-next-line camelcase -- backend field name
78
- select_items: e(c(S))
79
- })), P = k(
78
+ select_items: e(c(f))
79
+ })), E = k(
80
80
  t(),
81
- C(c(S), [])
82
- ), D = g({
81
+ C(c(f), [])
82
+ ), P = g({
83
83
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
84
84
  id: e(n()),
85
85
  /** Decimal places for price display (legacy data may use string or number) */
86
86
  decimalCount: e(h([t(), n()])),
87
87
  /** Pinned product IDs (empty array when filter-driven) */
88
- productIds: e(c(s())),
88
+ productIds: e(c(l())),
89
89
  /** Whether the block requested live products at send time */
90
90
  sendProductRequestFlag: e(o()),
91
91
  /** Whether to randomize product order */
92
92
  shuffleProducts: e(o()),
93
93
  /** Filter rules driving product selection */
94
- filters: e(c(s())),
94
+ filters: e(c(l())),
95
95
  /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
96
96
  currency: e(t()),
97
97
  /** Currency display settings (separators, alignment, decimals) */
98
- currencySettings: e(s()),
98
+ currencySettings: e(l()),
99
99
  /** Locale (e.g. 'nl_NL') */
100
100
  language: e(t()),
101
101
  /** Recommendation strategy key (e.g. 'newArrivals') */
102
102
  strategy: e(t()),
103
103
  /** Snapshot of products as rendered by the legacy block */
104
- recommendedProducts: e(c(s())),
104
+ recommendedProducts: e(c(l())),
105
105
  /** Number of product cards per row */
106
106
  cardsInRow: e(n()),
107
107
  /** Mobile-only padding (right) */
@@ -124,7 +124,7 @@ const d = {
124
124
  isPriceMovedToNextLine: e(o()),
125
125
  /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
126
126
  isPriceDeletedForZeroSale: e(o())
127
- }), E = a({
127
+ }), D = a({
128
128
  /**
129
129
  * Legacy recommendation block configs keyed by block ID.
130
130
  * Pass this when loading a template authored with the v1
@@ -132,7 +132,7 @@ const d = {
132
132
  * strategy, currency, locale, and layout data.
133
133
  */
134
134
  recommendationConfigs: e(
135
- k(t(), D),
135
+ k(t(), P),
136
136
  {}
137
137
  )
138
138
  }), M = a({
@@ -142,7 +142,7 @@ const d = {
142
142
  css: e(t(), ""),
143
143
  /** Preselected dynamic content items */
144
144
  preselectedDynamicContent: e(
145
- c(v),
145
+ c(L),
146
146
  []
147
147
  ),
148
148
  /**
@@ -151,7 +151,7 @@ const d = {
151
151
  * (first) partner's leaf attributes into the label→token map that repairs
152
152
  * label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
153
153
  */
154
- dynamicContentList: e(P, {}),
154
+ dynamicContentList: e(E, {}),
155
155
  /** Valid custom field attribute names from the partner's categorized fields */
156
156
  customFieldAttributes: e(c(t()), []),
157
157
  /** Selected unsubscribe page IDs */
@@ -159,7 +159,7 @@ const d = {
159
159
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
160
160
  forceRecreate: e(o(), !1),
161
161
  /** Migration-only inputs (legacy block configs) */
162
- migration: e(E, {})
162
+ migration: e(D, {})
163
163
  }), N = a({
164
164
  /** Sender display name */
165
165
  senderName: e(t(), ""),
@@ -201,8 +201,10 @@ const d = {
201
201
  /** Enable Liquid template syntax */
202
202
  liquidSyntax: e(o(), !1),
203
203
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
204
- autosave: e(o(), !1)
205
- }), U = l([
204
+ autosave: e(o(), !1),
205
+ /** Enable pre-save domain-allowlist validation (opt-in; host supplies the block toaster via callbacks.resolveAllowlistToast) */
206
+ allowlistEnabled: e(o(), !1)
207
+ }), w = i([
206
208
  "amp-accordion",
207
209
  "amp-carousel",
208
210
  "amp-form-controls",
@@ -216,7 +218,7 @@ const d = {
216
218
  "text-block",
217
219
  "timer-block",
218
220
  "video-block"
219
- ]), B = l([
221
+ ]), U = i([
220
222
  "dynamic-content",
221
223
  "checkbox-block",
222
224
  "radio-button-block",
@@ -224,18 +226,18 @@ const d = {
224
226
  "unsubscribe-block",
225
227
  "coupon-block",
226
228
  "items-block"
227
- ]), w = a({
229
+ ]), B = a({
228
230
  /** Default blocks to exclude from the editor */
229
231
  excludeDefaults: e(
230
- c(U),
232
+ c(w),
231
233
  []
232
234
  ),
233
235
  /** Custom blocks to include in the editor */
234
236
  includeCustoms: e(
235
- c(B),
237
+ c(U),
236
238
  []
237
239
  )
238
- }), m = a({
240
+ }), u = a({
239
241
  /** Unique identifier for the rule */
240
242
  id: t(),
241
243
  /** Human-readable description */
@@ -243,8 +245,8 @@ const d = {
243
245
  /** Priority for rule ordering (lower = earlier) */
244
246
  priority: n()
245
247
  }), H = a({
246
- ...m.entries,
247
- type: i("replace"),
248
+ ...u.entries,
249
+ type: m("replace"),
248
250
  /** String to search for */
249
251
  search: t(),
250
252
  /** Replacement string */
@@ -252,8 +254,8 @@ const d = {
252
254
  /** Replace all occurrences (default: false) */
253
255
  replaceAll: e(o())
254
256
  }), _ = a({
255
- ...m.entries,
256
- type: i("regex"),
257
+ ...u.entries,
258
+ type: m("regex"),
257
259
  /** Regex pattern string */
258
260
  pattern: t(),
259
261
  /** Replacement string (supports $1, $2, etc.) */
@@ -261,16 +263,16 @@ const d = {
261
263
  /** Regex flags (e.g., 'gi') */
262
264
  flags: e(t())
263
265
  }), j = a({
264
- ...m.entries,
265
- type: i("remove"),
266
+ ...u.entries,
267
+ type: m("remove"),
266
268
  /** Strings or patterns to remove */
267
269
  targets: c(t())
268
270
  }), q = a({
269
- ...m.entries,
270
- type: i("custom"),
271
+ ...u.entries,
272
+ type: m("custom"),
271
273
  /** Custom processor function */
272
- processor: f(
273
- (u) => typeof u == "function",
274
+ processor: S(
275
+ (s) => typeof s == "function",
274
276
  "processor must be a function"
275
277
  )
276
278
  }), G = R("type", [
@@ -289,17 +291,29 @@ const d = {
289
291
  * Return false to cancel the save operation.
290
292
  */
291
293
  externalValidation: e(
292
- f(
293
- (u) => typeof u == "function",
294
+ S(
295
+ (s) => typeof s == "function",
294
296
  "externalValidation must be a function"
295
297
  )
298
+ ),
299
+ /**
300
+ * OPTIONAL override for the domain-allowlist block toaster (features.allowlistEnabled). By
301
+ * default Guido self-serves the toaster — resolves the user role via /get-user-role-and-email,
302
+ * builds the settings deep-link, and reads copy from window.trans — so consumers only flip the
303
+ * flag. Supply this only to replace that content. Returning null/void keeps Guido's default.
304
+ */
305
+ resolveAllowlistToast: e(
306
+ S(
307
+ (s) => typeof s == "function",
308
+ "resolveAllowlistToast must be a function"
309
+ )
296
310
  )
297
311
  }), K = a({
298
312
  // Required sections
299
313
  /** Identity configuration (required) */
300
314
  identity: A,
301
315
  /** Partner configuration (required) */
302
- partner: L,
316
+ partner: v,
303
317
  // Optional sections (with defaults)
304
318
  /** Template content and presets */
305
319
  template: e(M, {}),
@@ -310,37 +324,37 @@ const d = {
310
324
  /** Feature toggles */
311
325
  features: e(F, {}),
312
326
  /** Block configuration */
313
- blocks: e(w, {}),
327
+ blocks: e(B, {}),
314
328
  /** Compiler configuration */
315
329
  compiler: e(V, {}),
316
330
  /** Callbacks and event handlers */
317
331
  callbacks: e(z, {})
318
332
  });
319
333
  export {
320
- w as BlocksSchema,
334
+ B as BlocksSchema,
321
335
  z as CallbacksSchema,
322
336
  G as CompilerRuleSchema,
323
337
  V as CompilerSchema,
324
- B as CustomBlockTypeSchema,
338
+ U as CustomBlockTypeSchema,
325
339
  q as CustomRuleSchema,
326
- U as DefaultBlockTypeSchema,
327
- P as DynamicContentListSchema,
328
- S as DynamicContentNodeSchema,
329
- v as DynamicContentSchema,
340
+ w as DefaultBlockTypeSchema,
341
+ E as DynamicContentListSchema,
342
+ f as DynamicContentNodeSchema,
343
+ L as DynamicContentSchema,
330
344
  O as EditorSchema,
331
345
  N as EmailHeaderSchema,
332
346
  I as FallbackFontSchema,
333
347
  F as FeaturesSchema,
334
348
  K as GuidoConfigSchema,
335
349
  A as IdentitySchema,
336
- D as LegacyRecommendationConfigSchema,
350
+ P as LegacyRecommendationConfigSchema,
337
351
  d as MessageType,
338
- L as PartnerSchema,
352
+ v as PartnerSchema,
339
353
  r as ProductType,
340
354
  _ as RegexRuleSchema,
341
355
  j as RemoveRuleSchema,
342
356
  H as ReplaceRuleSchema,
343
- E as TemplateMigrationSchema,
357
+ D as TemplateMigrationSchema,
344
358
  M as TemplateSchema,
345
359
  x as UISchema
346
360
  };
@@ -0,0 +1,21 @@
1
+ import { base64EncodeWithSpecialChars as o } from "../utils/base64.js";
2
+ import { useTranslations as a } from "./useTranslations.js";
3
+ import { useUserRole as i } from "./useUserRole.js";
4
+ const s = {
5
+ MANAGE: "journey-builder.domain-allowlist-warning",
6
+ NON_MANAGE: "settings.allow-list-warning-not-admin-architect",
7
+ ADD_BUTTON: "settings.allow-list-warning-add-button"
8
+ }, l = (t) => `/settings?openAddModal=true&type=domain&values=${o(t)}#security`, w = () => {
9
+ const t = a(), { getIsManageUser: n } = i();
10
+ return { resolveAllowlistToast: async (e) => await n() ? {
11
+ message: t(s.MANAGE),
12
+ actionButton: {
13
+ text: t(s.ADD_BUTTON),
14
+ onClick: () => window.open(l(e.join(",")), "_blank")
15
+ }
16
+ } : { message: t(s.NON_MANAGE) } };
17
+ };
18
+ export {
19
+ l as buildAllowlistSettingsUrl,
20
+ w as useAllowlistToast
21
+ };
@@ -1,32 +1,52 @@
1
- import { useActionsApi as H } from "./useActionsApi.js";
2
- import { useConfig as y } from "./useConfig.js";
3
- import { useSaveStart as w, useSaveComplete as k } from "./useGuidoActions.js";
4
- import { useSyncModuleExtractor as q } from "./useSyncModuleExtractor.js";
5
- import { useStripoApi as C } from "../services/stripoApi.js";
6
- import { useTemplatePreparation as E } from "../utils/templatePreparation.js";
7
- import { useHtmlValidator as B } from "./useHtmlValidator.js";
8
- import { useCouponBlockValidator as L } from "./validators/useCouponBlockValidator.js";
9
- import { useLiquidValidator as P } from "./validators/useLiquidValidator.js";
10
- import { useUnsubscribeBlockValidator as U } from "./validators/useUnsubscribeBlockValidator.js";
11
- const K = () => {
12
- const o = w(), s = k(), { validateHtml: r } = B(), { validateLiquidSyntax: l } = P(), { validateCouponBlockTags: n } = L(), { validateUnsubscribeBlockUniqueness: d, validateUnsubscribeBlockHasTemplate: c } = U(), { callbacks: i, isFeatureEnabled: u } = y(), { extractSyncModuleData: m } = q(), { setSyncModuleUnsubscriptionPages: p } = C(), { editorSave: v } = H();
13
- return { save: async (f = !1, S = !1) => {
14
- var a;
15
- o();
16
- const { prepareTemplateDetails: V } = E(), t = await V();
17
- if (!n(t.compiledHtml) || !d(t.compiledHtml) || !c(t.compiledHtml))
1
+ import { useActionsApi as B } from "./useActionsApi.js";
2
+ import { useConfig as E } from "./useConfig.js";
3
+ import { useSaveStart as q, useSaveComplete as C } from "./useGuidoActions.js";
4
+ import { useSyncModuleExtractor as D } from "./useSyncModuleExtractor.js";
5
+ import { ToasterTypeOptions as L } from "../enums/toaster.js";
6
+ import { useStripoApi as P } from "../services/stripoApi.js";
7
+ import { useTemplatePreparation as U } from "../utils/templatePreparation.js";
8
+ import { useAllowlistToast as M } from "./useAllowlistToast.js";
9
+ import { useHtmlValidator as h } from "./useHtmlValidator.js";
10
+ import { useToaster as F } from "./useToaster.js";
11
+ import { useAllowlistValidator as O } from "./validators/useAllowlistValidator.js";
12
+ import { useCouponBlockValidator as W } from "./validators/useCouponBlockValidator.js";
13
+ import { useLiquidValidator as j } from "./validators/useLiquidValidator.js";
14
+ import { useUnsubscribeBlockValidator as z } from "./validators/useUnsubscribeBlockValidator.js";
15
+ const at = () => {
16
+ const c = q(), d = C(), { validateHtml: u } = h(), { validateLiquidSyntax: p } = j(), { validateCouponBlockTags: f } = W(), { validateUnsubscribeBlockUniqueness: v, validateUnsubscribeBlockHasTemplate: w } = z(), { callbacks: s, isFeatureEnabled: l } = E(), { extractSyncModuleData: S } = D(), { setSyncModuleUnsubscriptionPages: b } = P(), { editorSave: V } = B(), { showToaster: T } = F(), { getBlockedDomains: g } = O(), { resolveAllowlistToast: y } = M();
17
+ return { save: async (H = !1, r = !1) => {
18
+ var n, e, m;
19
+ c();
20
+ const { prepareTemplateDetails: x } = U(), t = await x();
21
+ if (!f(t.compiledHtml) || !v(t.compiledHtml) || !w(t.compiledHtml))
18
22
  return;
19
- if (u("liquidSyntax")) {
20
- if (!await l(t.compiledHtml))
23
+ if (l("liquidSyntax")) {
24
+ if (!await p(t.compiledHtml))
21
25
  return;
22
- } else if (!await r(t.compiledHtml, t.dynamicContentList, !0))
26
+ } else if (!await u(t.compiledHtml, t.dynamicContentList, !0))
23
27
  return;
24
- if ((a = i.value) != null && a.externalValidation && !await i.value.externalValidation(t) || !await v())
28
+ if ((n = s.value) != null && n.externalValidation && !await s.value.externalValidation(t))
25
29
  return;
26
- const { unsubscribePayload: b, stripoModules: x } = m(t.rawHtml);
27
- return await p(b), t.modules = x, f || s({ ...t, silent: S }), t;
30
+ if (l("allowlistEnabled")) {
31
+ const o = await g(t.compiledHtml, t.css);
32
+ if (o.length) {
33
+ if (!r) {
34
+ const a = (m = (e = s.value) == null ? void 0 : e.resolveAllowlistToast) == null ? void 0 : m.call(e, o), i = a != null && a.message ? a : await y(o);
35
+ i != null && i.message && T({
36
+ type: L.Warning,
37
+ message: i.message,
38
+ actionButton: i.actionButton
39
+ });
40
+ }
41
+ return;
42
+ }
43
+ }
44
+ if (!await V())
45
+ return;
46
+ const { unsubscribePayload: k, stripoModules: A } = S(t.rawHtml);
47
+ return await b(k), t.modules = A, H || d({ ...t, silent: r }), t;
28
48
  } };
29
49
  };
30
50
  export {
31
- K as useSave
51
+ at as useSave
32
52
  };
@@ -0,0 +1,13 @@
1
+ import { RoleEnums as t } from "../enums/roles.js";
2
+ import { useHttp as o } from "./useHttp.js";
3
+ const s = "/get-user-role-and-email";
4
+ let r = null, n = null;
5
+ const f = () => {
6
+ const { get: l } = o();
7
+ return { getIsManageUser: async () => r !== null ? r : (n || (n = l(s).then(({ data: e }) => (r = (e == null ? void 0 : e.role) === t.MANAGE_USERS, r)).catch((e) => (console.error("[GUIDO_ALLOWLIST] role fetch failed", e), !1)).finally(() => {
8
+ n = null;
9
+ })), n) };
10
+ };
11
+ export {
12
+ f as useUserRole
13
+ };
@@ -0,0 +1,31 @@
1
+ import { base64EncodeWithSpecialChars as d } from "../../utils/base64.js";
2
+ import { useHttp as p } from "../useHttp.js";
3
+ const w = "/allowlist/check-single-item", h = /(?:https?:\/\/|www\.)[^\s"'<>()]+/gi, u = /&quot;\/\//gi, D = () => {
4
+ const { get: i } = p(), r = (e, o) => {
5
+ const c = `${e || ""} ${o || ""}`.replace(u, "https://").match(h) || [], t = /* @__PURE__ */ new Set();
6
+ return c.forEach((n) => {
7
+ const m = /^https?:\/\//i.test(n) ? n : `https://${n}`;
8
+ try {
9
+ const { hostname: a } = new URL(m);
10
+ a && t.add(a.replace(/^www\./i, "").toLowerCase());
11
+ } catch {
12
+ }
13
+ }), [...t];
14
+ }, l = async (e) => {
15
+ const o = encodeURIComponent(d(`https://${e}`)), { data: s } = await i(`${w}?item=${o}&type=domain`);
16
+ return s.type === "success";
17
+ };
18
+ return { getBlockedDomains: async (e, o) => {
19
+ try {
20
+ const s = r(e, o);
21
+ return s.length ? (await Promise.all(
22
+ s.map(async (t) => ({ domain: t, allowlisted: await l(t) }))
23
+ )).filter((t) => !t.allowlisted).map((t) => t.domain) : [];
24
+ } catch (s) {
25
+ return console.error("[GUIDO_ALLOWLIST] getBlockedDomains failed", s), [];
26
+ }
27
+ } };
28
+ };
29
+ export {
30
+ D as useAllowlistValidator
31
+ };
@@ -0,0 +1,4 @@
1
+ var e = /* @__PURE__ */ ((r) => (r.MANAGE_USERS = "manage-users", r))(e || {});
2
+ export {
3
+ e as RoleEnums
4
+ };
@@ -1,9 +1,13 @@
1
- import { useHttp as d } from "../composables/useHttp.js";
2
- import { useToaster as m } from "../composables/useToaster.js";
3
- import { MAX_DEFAULT_TEMPLATE_ID as y } from "../enums/defaults.js";
4
- import { useBlankTemplate as f } from "./blankTemplate.js";
5
- const D = () => {
6
- const { get: s, post: u } = d(), { handleError: r } = m(), { getBlankTemplate: o } = f();
1
+ import { useHttp as m } from "../composables/useHttp.js";
2
+ import { useToaster as y } from "../composables/useToaster.js";
3
+ import { MAX_DEFAULT_TEMPLATE_ID as f } from "../enums/defaults.js";
4
+ import { useBlankTemplate as g } from "./blankTemplate.js";
5
+ const l = () => ({
6
+ id: 0,
7
+ stripoId: 0,
8
+ unsubscriptionPreferencePages: []
9
+ }), D = () => {
10
+ const { get: s, post: u } = m(), { handleError: r } = y(), { getBlankTemplate: n } = g();
7
11
  return {
8
12
  getToken: async () => {
9
13
  try {
@@ -26,13 +30,13 @@ const D = () => {
26
30
  },
27
31
  getDefaultTemplate: async () => {
28
32
  try {
29
- const t = new URLSearchParams(window.location.search), e = t.get("default-template"), l = t.get("master"), n = e ? parseInt(e) : 0, i = n >= 1 && n <= y ? n : 0;
30
- if (!i && !l)
31
- return await o();
32
- const p = `/stripo/default-template/${i}`, { data: c } = await s(p), a = typeof c == "string" ? JSON.parse(c) : c;
33
- return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? await o() : a;
33
+ const t = new URLSearchParams(window.location.search), e = t.get("default-template"), p = t.get("master"), o = e ? parseInt(e) : 0, i = o >= 1 && o <= f ? o : 0;
34
+ if (!i && !p)
35
+ return await n();
36
+ const d = `/stripo/default-template/${i}`, { data: c } = await s(d), a = typeof c == "string" ? JSON.parse(c) : c;
37
+ return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? await n() : a;
34
38
  } catch (t) {
35
- return r(t, "Failed to fetch default template"), o();
39
+ return r(t, "Failed to fetch default template"), n();
36
40
  }
37
41
  },
38
42
  getSyncModulesStatus: async () => {
@@ -53,13 +57,9 @@ const D = () => {
53
57
  getSyncModule: async (t) => {
54
58
  try {
55
59
  const { data: e } = await s(`/stripo/stripo-modules/${t}/get`);
56
- return e;
60
+ return Array.isArray(e == null ? void 0 : e.unsubscriptionPreferencePages) ? e : l();
57
61
  } catch (e) {
58
- return r(e, "Failed to get sync module"), {
59
- id: 0,
60
- stripoId: 0,
61
- unsubscriptionPreferencePages: []
62
- };
62
+ return r(e, "Failed to get sync module"), l();
63
63
  }
64
64
  },
65
65
  setSyncModuleUnsubscriptionPages: async (t) => {
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import type { DynamicContentNode } from '../generic';
9
9
  import type { SavedTemplateDetails } from '../stripo';
10
+ import type { ActionButton } from '../toaster';
10
11
  import * as v from 'valibot';
11
12
  /**
12
13
  * Handler function for external validation before save
@@ -14,6 +15,19 @@ import * as v from 'valibot';
14
15
  * @returns Promise<boolean> - true if valid, false to cancel save
15
16
  */
16
17
  export type ExternalValidationHandler = (data: Omit<SavedTemplateDetails, 'metadata'>) => Promise<boolean>;
18
+ /**
19
+ * Content for the domain-allowlist block toaster. By default Guido self-serves this (see
20
+ * useAllowlistToast): it resolves the user role via /get-user-role-and-email, builds the
21
+ * settings deep-link, and pulls copy from window.trans. A host may supply an override to
22
+ * replace that content. `actionButton.onClick` runs the action (e.g. the "Add to allowlist"
23
+ * deep-link). Returning null/void falls back to Guido's self-served toaster.
24
+ * @param blockedDomains - the non-allowlisted domains found in the template
25
+ */
26
+ export interface AllowlistToastContent {
27
+ message: string;
28
+ actionButton?: ActionButton;
29
+ }
30
+ export type ResolveAllowlistToastHandler = (blockedDomains: string[]) => AllowlistToastContent | null | void;
17
31
  /**
18
32
  * Message type constants for email templates
19
33
  */
@@ -377,6 +391,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
377
391
  readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
378
392
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
379
393
  readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
394
+ /** Enable pre-save domain-allowlist validation (opt-in; host supplies the block toaster via callbacks.resolveAllowlistToast) */
395
+ readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
380
396
  }, undefined>;
381
397
  /**
382
398
  * Default block types available in Stripo
@@ -582,6 +598,13 @@ export declare const CallbacksSchema: v.ObjectSchema<{
582
598
  * Return false to cancel the save operation.
583
599
  */
584
600
  readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
601
+ /**
602
+ * OPTIONAL override for the domain-allowlist block toaster (features.allowlistEnabled). By
603
+ * default Guido self-serves the toaster — resolves the user role via /get-user-role-and-email,
604
+ * builds the settings deep-link, and reads copy from window.trans — so consumers only flip the
605
+ * flag. Supply this only to replace that content. Returning null/void keeps Guido's default.
606
+ */
607
+ readonly resolveAllowlistToast: v.OptionalSchema<v.CustomSchema<ResolveAllowlistToastHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
585
608
  }, undefined>;
586
609
  /**
587
610
  * Complete Guido configuration schema
@@ -764,6 +787,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
764
787
  readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
765
788
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
766
789
  readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
790
+ /** Enable pre-save domain-allowlist validation (opt-in; host supplies the block toaster via callbacks.resolveAllowlistToast) */
791
+ readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
767
792
  }, undefined>, {}>;
768
793
  /** Block configuration */
769
794
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -834,5 +859,12 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
834
859
  * Return false to cancel the save operation.
835
860
  */
836
861
  readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
862
+ /**
863
+ * OPTIONAL override for the domain-allowlist block toaster (features.allowlistEnabled). By
864
+ * default Guido self-serves the toaster — resolves the user role via /get-user-role-and-email,
865
+ * builds the settings deep-link, and reads copy from window.trans — so consumers only flip the
866
+ * flag. Supply this only to replace that content. Returning null/void keeps Guido's default.
867
+ */
868
+ readonly resolveAllowlistToast: v.OptionalSchema<v.CustomSchema<ResolveAllowlistToastHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
837
869
  }, undefined>, {}>;
838
870
  }, undefined>;
@@ -0,0 +1,17 @@
1
+ import type { AllowlistToastContent } from '@@/Types/config/schemas';
2
+ /**
3
+ * Builds the "Add to allowlist" InOne Settings deep-link (Security tab, add-domain modal
4
+ * prefilled). The route is identical across InOne products, so Guido builds it generically.
5
+ * @param value - domain(s) to prefill; base64-encoded into the `values` query param.
6
+ */
7
+ export declare const buildAllowlistSettingsUrl: (value: string) => string;
8
+ /**
9
+ * Builds the domain-allowlist block-toaster content Guido renders when a save is blocked.
10
+ * Guido owns the whole toaster: it resolves the user role itself (useUserRole → the shared
11
+ * /get-user-role-and-email endpoint) and pulls copy from window.trans, so consumers only need
12
+ * to set features.allowlistEnabled. Manage users get the "Add to allowlist" deep-link button;
13
+ * everyone else gets a message-only warning. SD-143197.
14
+ */
15
+ export declare const useAllowlistToast: () => {
16
+ resolveAllowlistToast: (blockedDomains: string[]) => Promise<AllowlistToastContent>;
17
+ };
@@ -96,6 +96,7 @@ export declare const useConfig: () => {
96
96
  modulesDisabled: boolean;
97
97
  liquidSyntax: boolean;
98
98
  autosave: boolean;
99
+ allowlistEnabled: boolean;
99
100
  };
100
101
  blocks: {
101
102
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -135,6 +136,7 @@ export declare const useConfig: () => {
135
136
  };
136
137
  callbacks: {
137
138
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
139
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
138
140
  };
139
141
  } | null>;
140
142
  initialized: import("vue").Ref<boolean>;
@@ -227,6 +229,7 @@ export declare const useConfig: () => {
227
229
  modulesDisabled: boolean;
228
230
  liquidSyntax: boolean;
229
231
  autosave: boolean;
232
+ allowlistEnabled: boolean;
230
233
  } | null>;
231
234
  blocks: import("vue").ComputedRef<{
232
235
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -266,6 +269,7 @@ export declare const useConfig: () => {
266
269
  } | null>;
267
270
  callbacks: import("vue").ComputedRef<{
268
271
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
272
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
269
273
  } | null>;
270
274
  templateId: import("vue").ComputedRef<string>;
271
275
  userId: import("vue").ComputedRef<string>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Resolves whether the current user may manage the partner's domain allowlist, via the shared
3
+ * InOne endpoint GET /get-user-role-and-email. Fail-open: on any error the user is treated as
4
+ * non-manage (message-only toaster, no "Add to allowlist" deep-link they may not be able to use).
5
+ */
6
+ export declare const useUserRole: () => {
7
+ getIsManageUser: () => Promise<boolean>;
8
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Pre-save domain-allowlist validation. Extracts every external domain from the compiled
3
+ * HTML/CSS and asks the backend whether each is allowlisted, so an un-allowlisted link can
4
+ * block the save BEFORE anything is persisted. Gated by `features.allowlistEnabled` in
5
+ * `useSave`; the block toaster is rendered by Guido from host-supplied content.
6
+ */
7
+ export declare const useAllowlistValidator: () => {
8
+ getBlockedDomains: (html: string, css: string) => Promise<string[]>;
9
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Insider user-role aliases — the kebab-case wire values returned by
3
+ * GET /get-user-role-and-email (the same set honey-badger's RoleEnums defines).
4
+ * Only the manage-user role is needed in Guido: it gates the "Add to allowlist"
5
+ * action in the domain-allowlist block toaster. SD-143197.
6
+ */
7
+ export declare enum RoleEnums {
8
+ MANAGE_USERS = "manage-users"
9
+ }
@@ -101,6 +101,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
101
101
  modulesDisabled: boolean;
102
102
  liquidSyntax: boolean;
103
103
  autosave: boolean;
104
+ allowlistEnabled: boolean;
104
105
  };
105
106
  blocks: {
106
107
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -140,6 +141,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
140
141
  };
141
142
  callbacks: {
142
143
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
144
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
143
145
  };
144
146
  } | null;
145
147
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
@@ -238,6 +240,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
238
240
  modulesDisabled: boolean;
239
241
  liquidSyntax: boolean;
240
242
  autosave: boolean;
243
+ allowlistEnabled: boolean;
241
244
  };
242
245
  blocks: {
243
246
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -277,6 +280,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
277
280
  };
278
281
  callbacks: {
279
282
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
283
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
280
284
  };
281
285
  } | null;
282
286
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
@@ -375,6 +379,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
375
379
  modulesDisabled: boolean;
376
380
  liquidSyntax: boolean;
377
381
  autosave: boolean;
382
+ allowlistEnabled: boolean;
378
383
  };
379
384
  blocks: {
380
385
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -414,6 +419,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
414
419
  };
415
420
  callbacks: {
416
421
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
422
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
417
423
  };
418
424
  } | null;
419
425
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
@@ -512,6 +518,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
512
518
  modulesDisabled: boolean;
513
519
  liquidSyntax: boolean;
514
520
  autosave: boolean;
521
+ allowlistEnabled: boolean;
515
522
  };
516
523
  blocks: {
517
524
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -551,6 +558,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
551
558
  };
552
559
  callbacks: {
553
560
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
561
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
554
562
  };
555
563
  } | null;
556
564
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
@@ -649,6 +657,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
649
657
  modulesDisabled: boolean;
650
658
  liquidSyntax: boolean;
651
659
  autosave: boolean;
660
+ allowlistEnabled: boolean;
652
661
  };
653
662
  blocks: {
654
663
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -688,6 +697,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
688
697
  };
689
698
  callbacks: {
690
699
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
700
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
691
701
  };
692
702
  } | null;
693
703
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
@@ -786,6 +796,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
786
796
  modulesDisabled: boolean;
787
797
  liquidSyntax: boolean;
788
798
  autosave: boolean;
799
+ allowlistEnabled: boolean;
789
800
  };
790
801
  blocks: {
791
802
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -825,6 +836,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
825
836
  };
826
837
  callbacks: {
827
838
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
839
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
828
840
  };
829
841
  } | null;
830
842
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
@@ -923,6 +935,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
923
935
  modulesDisabled: boolean;
924
936
  liquidSyntax: boolean;
925
937
  autosave: boolean;
938
+ allowlistEnabled: boolean;
926
939
  };
927
940
  blocks: {
928
941
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -962,6 +975,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
962
975
  };
963
976
  callbacks: {
964
977
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
978
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
965
979
  };
966
980
  } | null;
967
981
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
@@ -1060,6 +1074,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1060
1074
  modulesDisabled: boolean;
1061
1075
  liquidSyntax: boolean;
1062
1076
  autosave: boolean;
1077
+ allowlistEnabled: boolean;
1063
1078
  };
1064
1079
  blocks: {
1065
1080
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1099,6 +1114,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1099
1114
  };
1100
1115
  callbacks: {
1101
1116
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1117
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1102
1118
  };
1103
1119
  } | null;
1104
1120
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
@@ -1197,6 +1213,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1197
1213
  modulesDisabled: boolean;
1198
1214
  liquidSyntax: boolean;
1199
1215
  autosave: boolean;
1216
+ allowlistEnabled: boolean;
1200
1217
  };
1201
1218
  blocks: {
1202
1219
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1236,6 +1253,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1236
1253
  };
1237
1254
  callbacks: {
1238
1255
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1256
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1239
1257
  };
1240
1258
  } | null;
1241
1259
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
@@ -1334,6 +1352,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1334
1352
  modulesDisabled: boolean;
1335
1353
  liquidSyntax: boolean;
1336
1354
  autosave: boolean;
1355
+ allowlistEnabled: boolean;
1337
1356
  };
1338
1357
  blocks: {
1339
1358
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1373,6 +1392,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1373
1392
  };
1374
1393
  callbacks: {
1375
1394
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1395
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1376
1396
  };
1377
1397
  } | null;
1378
1398
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
@@ -1471,6 +1491,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1471
1491
  modulesDisabled: boolean;
1472
1492
  liquidSyntax: boolean;
1473
1493
  autosave: boolean;
1494
+ allowlistEnabled: boolean;
1474
1495
  };
1475
1496
  blocks: {
1476
1497
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1510,6 +1531,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1510
1531
  };
1511
1532
  callbacks: {
1512
1533
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1534
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1513
1535
  };
1514
1536
  } | null;
1515
1537
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
@@ -1608,6 +1630,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1608
1630
  modulesDisabled: boolean;
1609
1631
  liquidSyntax: boolean;
1610
1632
  autosave: boolean;
1633
+ allowlistEnabled: boolean;
1611
1634
  };
1612
1635
  blocks: {
1613
1636
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1647,6 +1670,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1647
1670
  };
1648
1671
  callbacks: {
1649
1672
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1673
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1650
1674
  };
1651
1675
  } | null;
1652
1676
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
@@ -1745,6 +1769,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1745
1769
  modulesDisabled: boolean;
1746
1770
  liquidSyntax: boolean;
1747
1771
  autosave: boolean;
1772
+ allowlistEnabled: boolean;
1748
1773
  };
1749
1774
  blocks: {
1750
1775
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1784,6 +1809,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1784
1809
  };
1785
1810
  callbacks: {
1786
1811
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1812
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1787
1813
  };
1788
1814
  } | null;
1789
1815
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
@@ -1882,6 +1908,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1882
1908
  modulesDisabled: boolean;
1883
1909
  liquidSyntax: boolean;
1884
1910
  autosave: boolean;
1911
+ allowlistEnabled: boolean;
1885
1912
  };
1886
1913
  blocks: {
1887
1914
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1921,6 +1948,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1921
1948
  };
1922
1949
  callbacks: {
1923
1950
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1951
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1924
1952
  };
1925
1953
  } | null;
1926
1954
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
@@ -2019,6 +2047,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2019
2047
  modulesDisabled: boolean;
2020
2048
  liquidSyntax: boolean;
2021
2049
  autosave: boolean;
2050
+ allowlistEnabled: boolean;
2022
2051
  };
2023
2052
  blocks: {
2024
2053
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2058,6 +2087,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2058
2087
  };
2059
2088
  callbacks: {
2060
2089
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
2090
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
2061
2091
  };
2062
2092
  } | null;
2063
2093
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
@@ -2156,6 +2186,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2156
2186
  modulesDisabled: boolean;
2157
2187
  liquidSyntax: boolean;
2158
2188
  autosave: boolean;
2189
+ allowlistEnabled: boolean;
2159
2190
  };
2160
2191
  blocks: {
2161
2192
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2195,6 +2226,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2195
2226
  };
2196
2227
  callbacks: {
2197
2228
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
2229
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
2198
2230
  };
2199
2231
  } | null;
2200
2232
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
@@ -2293,6 +2325,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2293
2325
  modulesDisabled: boolean;
2294
2326
  liquidSyntax: boolean;
2295
2327
  autosave: boolean;
2328
+ allowlistEnabled: boolean;
2296
2329
  };
2297
2330
  blocks: {
2298
2331
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2332,6 +2365,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2332
2365
  };
2333
2366
  callbacks: {
2334
2367
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
2368
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
2335
2369
  };
2336
2370
  } | null;
2337
2371
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
@@ -2430,6 +2464,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2430
2464
  modulesDisabled: boolean;
2431
2465
  liquidSyntax: boolean;
2432
2466
  autosave: boolean;
2467
+ allowlistEnabled: boolean;
2433
2468
  };
2434
2469
  blocks: {
2435
2470
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2469,6 +2504,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2469
2504
  };
2470
2505
  callbacks: {
2471
2506
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
2507
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
2472
2508
  };
2473
2509
  } | null;
2474
2510
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.12.0-beta.e16c8db",
3
+ "version": "3.12.0-beta.eb4ca1c",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",