@riverbankcms/sdk 0.84.2 → 0.88.0
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/dist/{PreviewEditorSidebar-4PH35ZIE.mjs → PreviewEditorSidebar-EVRS3C7T.mjs} +3 -3
- package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-54WD4IGE.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +684 -0
- package/dist/_dts/api/src/endpoints.d.ts +58 -14
- package/dist/_dts/api/src/index.d.ts +4 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
- package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
- package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
- package/dist/_dts/api/src/types.d.ts +6 -3
- package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
- package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
- package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
- package/dist/_dts/core/src/currency-format.d.ts +37 -2
- package/dist/_dts/core/src/event-pricing.d.ts +24 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +551 -20
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +53 -0
- package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +7 -1
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +73 -0
- package/dist/_dts/sdk/src/client/types.d.ts +9 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +57 -0
- package/dist/_dts/surfaces/src/index.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
- package/dist/_dts/theme-core/src/schema.d.ts +11 -11
- package/dist/{chunk-ZR2GQK2A.mjs → chunk-7KOO7RPP.mjs} +953 -315
- package/dist/{chunk-OCGTXHSO.mjs → chunk-ER4UIW4X.mjs} +7 -7
- package/dist/{chunk-WFPYN7KA.mjs → chunk-HVOBXA3Y.mjs} +2 -2
- package/dist/{chunk-NFWGLRZZ.mjs → chunk-K3JWH6HE.mjs} +37 -3
- package/dist/{chunk-4QNLOTES.mjs → chunk-O4LVYUVH.mjs} +58 -14
- package/dist/{chunk-PYDHOMEO.mjs → chunk-YDMBIIS5.mjs} +1 -1
- package/dist/cli/index.mjs +1858 -512
- package/dist/client/{accordion-2UZPBMYM.mjs → accordion-PT5CGW5N.mjs} +2 -2
- package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-2HLRTEYS.mjs} +7 -7
- package/dist/client/bookings.mjs +51 -6
- package/dist/client/{carousel-QH77HR6X.mjs → carousel-Z2LKYSWA.mjs} +3 -3
- package/dist/client/cart-ND5IK4A6.mjs +18 -0
- package/dist/client/checkout-EYUSGAY7.mjs +18 -0
- package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-6DVPO44G.mjs} +1 -1
- package/dist/client/{chunk-3C2VTPWI.mjs → chunk-BAWHZ5GM.mjs} +176 -13
- package/dist/client/{chunk-52CGCQ7B.mjs → chunk-BL66UWGD.mjs} +10 -80
- package/dist/client/{chunk-VGDBVNOO.mjs → chunk-DIRW2LNG.mjs} +241 -210
- package/dist/client/{chunk-UDNSI5PY.mjs → chunk-GOFO7HRH.mjs} +1 -2
- package/dist/client/{chunk-ZKUO52W3.mjs → chunk-H4MHEXYS.mjs} +1 -1
- package/dist/client/{chunk-ZE5G642V.mjs → chunk-LI2C6M5O.mjs} +75 -1
- package/dist/client/{chunk-3DTWLTXM.mjs → chunk-MHBEWDT7.mjs} +117 -3
- package/dist/client/{chunk-4OXKTA3D.mjs → chunk-O5JNI3E4.mjs} +2 -2
- package/dist/client/{chunk-XSV6KW4D.mjs → chunk-S4G65LGR.mjs} +1 -1
- package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
- package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-WCVK4MBJ.mjs} +1 -1
- package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-X7GVFB7Y.mjs} +4 -7
- package/dist/client/client.mjs +2125 -1403
- package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-H3AZBUEG.mjs} +7 -7
- package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-FPKJGLGS.mjs} +10 -11
- package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-QCGIZBUY.mjs} +10 -11
- package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-HIT3BJWU.mjs} +10 -11
- package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-R4HNWJDN.mjs} +10 -11
- package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-Q7BYY5HF.mjs} +10 -11
- package/dist/client/{form-MTCMVCZT.mjs → form-NI6YOG6S.mjs} +3 -3
- package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-SDYGII36.mjs} +4 -4
- package/dist/client/hooks.mjs +1682 -1412
- package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-BDETEUQD.mjs} +3 -4
- package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-EKYIU67X.mjs} +70 -22
- package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-5UTGNN76.mjs} +8 -9
- package/dist/client/{productList-4MA5S2CX.mjs → productList-7YA5KXZQ.mjs} +8 -9
- package/dist/client/rendering/client.mjs +753 -329
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3786 -3034
- package/dist/client/shop-AIMUMZYC.mjs +20 -0
- package/dist/preview-next/before-render.mjs +58 -14
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/editor-chrome.css +56 -9
- package/dist/preview-next/middleware.mjs +58 -14
- package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-NW472WNT.mjs} +6 -6
- package/dist/server/components.mjs +1518 -1015
- package/dist/server/config-validation.mjs +1719 -1461
- package/dist/server/config.mjs +1719 -1461
- package/dist/server/data.mjs +1683 -1413
- package/dist/server/index.mjs +79 -17
- package/dist/server/next.mjs +1902 -1311
- package/dist/server/page-converter.mjs +2193 -1169
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1709 -1209
- package/dist/server/rendering.mjs +1894 -1347
- package/dist/server/routing.mjs +1872 -1499
- package/dist/server/server.mjs +1571 -1264
- package/dist/server/theme-bridge.mjs +234 -0
- package/dist/styles/index.css +232 -0
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
- package/dist/client/cart-X4YK4FTW.mjs +0 -19
- package/dist/client/checkout-OM2BEPWD.mjs +0 -19
- package/dist/client/chunk-I2MMZO53.mjs +0 -6
- package/dist/client/shop-WXSYV5QO.mjs +0 -21
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import type { Brand } from '../../../../core/src/index';
|
|
2
|
+
type NonEmptyReadonlyArray<T> = readonly [T, ...T[]];
|
|
3
|
+
declare const serverResolvedMailchimpConnectionStateBrand: unique symbol;
|
|
4
|
+
declare const serverValidatedMailchimpAudienceCompatibilityBrand: unique symbol;
|
|
5
|
+
export type NewsletterListId = Brand<string, 'NewsletterListId'>;
|
|
6
|
+
export type MailchimpConnectionId = Brand<string, 'MailchimpConnectionId'>;
|
|
7
|
+
export type MailchimpAudienceId = Brand<string, 'MailchimpAudienceId'>;
|
|
8
|
+
export type MailchimpTagName = Brand<string, 'MailchimpTagName'>;
|
|
9
|
+
export type NewsletterSignupBlockId = Brand<string, 'NewsletterSignupBlockId'>;
|
|
10
|
+
export type SignedNewsletterDestinationRef = Brand<string, 'SignedNewsletterDestinationRef'>;
|
|
11
|
+
export type NewsletterSignupDestinationProvider = 'riverbank' | 'mailchimp';
|
|
12
|
+
export type NewsletterSignupFieldPreset = 'emailOnly' | 'emailName' | 'emailFirstLast' | 'emailNameCompany';
|
|
13
|
+
export type RiverbankNewsletterDestination = Readonly<{
|
|
14
|
+
tag: 'riverbank_list';
|
|
15
|
+
listId: NewsletterListId;
|
|
16
|
+
}>;
|
|
17
|
+
export type MailchimpNewsletterDestination = Readonly<{
|
|
18
|
+
tag: 'mailchimp_audience';
|
|
19
|
+
connectionId: MailchimpConnectionId;
|
|
20
|
+
audienceId: MailchimpAudienceId;
|
|
21
|
+
tags: readonly MailchimpTagName[];
|
|
22
|
+
}>;
|
|
23
|
+
export type NewsletterSignupAuthoringDestination = RiverbankNewsletterDestination | MailchimpNewsletterDestination;
|
|
24
|
+
export type NewsletterSignupPublicDestinationRef = Readonly<{
|
|
25
|
+
tag: 'block_ref';
|
|
26
|
+
blockId: NewsletterSignupBlockId;
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
tag: 'signed_destination_ref';
|
|
29
|
+
token: SignedNewsletterDestinationRef;
|
|
30
|
+
}>;
|
|
31
|
+
export type NewsletterSignupRawAuthoringContent = Readonly<{
|
|
32
|
+
destination?: unknown;
|
|
33
|
+
destinationProvider?: unknown;
|
|
34
|
+
listId?: unknown;
|
|
35
|
+
tags?: unknown;
|
|
36
|
+
mailchimpAudienceId?: unknown;
|
|
37
|
+
mailchimpTags?: unknown;
|
|
38
|
+
}>;
|
|
39
|
+
export type NewsletterSignupAuthoringState = Readonly<{
|
|
40
|
+
destination: NewsletterSignupAuthoringDestination;
|
|
41
|
+
}>;
|
|
42
|
+
export type NewsletterSignupDestinationEditorFieldState = Readonly<{
|
|
43
|
+
tag: 'riverbank';
|
|
44
|
+
showNewsletterList: true;
|
|
45
|
+
showRiverbankTags: true;
|
|
46
|
+
showMailchimpAudience: false;
|
|
47
|
+
showMailchimpTags: false;
|
|
48
|
+
showMailchimpConnectionWarning: false;
|
|
49
|
+
}> | Readonly<{
|
|
50
|
+
tag: 'mailchimp';
|
|
51
|
+
showNewsletterList: false;
|
|
52
|
+
showRiverbankTags: false;
|
|
53
|
+
showMailchimpAudience: true;
|
|
54
|
+
showMailchimpTags: true;
|
|
55
|
+
showMailchimpConnectionWarning: boolean;
|
|
56
|
+
}>;
|
|
57
|
+
export type NewsletterSignupEditorValues = Readonly<{
|
|
58
|
+
destinationProvider?: unknown;
|
|
59
|
+
listId?: unknown;
|
|
60
|
+
tags?: unknown;
|
|
61
|
+
mailchimpAudienceId?: unknown;
|
|
62
|
+
mailchimpTags?: unknown;
|
|
63
|
+
}>;
|
|
64
|
+
export type NormalizedNewsletterSignupEditorValues = Readonly<{
|
|
65
|
+
destinationProvider: 'riverbank';
|
|
66
|
+
listId?: unknown;
|
|
67
|
+
tags?: unknown;
|
|
68
|
+
}> | Readonly<{
|
|
69
|
+
destinationProvider: 'mailchimp';
|
|
70
|
+
mailchimpAudienceId?: unknown;
|
|
71
|
+
mailchimpTags?: unknown;
|
|
72
|
+
}>;
|
|
73
|
+
export type TrustedNewsletterSignupAuthoringDestinationError = Readonly<{
|
|
74
|
+
tag: 'invalid_destination_provider';
|
|
75
|
+
value: unknown;
|
|
76
|
+
}> | Readonly<{
|
|
77
|
+
tag: 'riverbank_list_required';
|
|
78
|
+
}> | Readonly<{
|
|
79
|
+
tag: 'mailchimp_connection_required';
|
|
80
|
+
}> | Readonly<{
|
|
81
|
+
tag: 'mailchimp_connection_needs_reauth';
|
|
82
|
+
}> | Readonly<{
|
|
83
|
+
tag: 'mailchimp_audience_required';
|
|
84
|
+
}> | Readonly<{
|
|
85
|
+
tag: 'mailchimp_compatibility_validation_pending';
|
|
86
|
+
}> | Readonly<{
|
|
87
|
+
tag: 'invalid_mailchimp_tags';
|
|
88
|
+
}> | Readonly<{
|
|
89
|
+
tag: 'mailchimp_audience_incompatible';
|
|
90
|
+
issues: readonly MailchimpAudienceCompatibilityIssue[];
|
|
91
|
+
}>;
|
|
92
|
+
export type TrustedNewsletterSignupAuthoringDestinationResult = Readonly<{
|
|
93
|
+
success: true;
|
|
94
|
+
destination: NewsletterSignupAuthoringDestination;
|
|
95
|
+
}> | Readonly<{
|
|
96
|
+
success: false;
|
|
97
|
+
error: TrustedNewsletterSignupAuthoringDestinationError;
|
|
98
|
+
}>;
|
|
99
|
+
export type NewsletterSignupRuntimeSource = Readonly<{
|
|
100
|
+
destinationProvider: NewsletterSignupDestinationProvider;
|
|
101
|
+
listId: string | null;
|
|
102
|
+
tags: string | null;
|
|
103
|
+
}>;
|
|
104
|
+
export type MailchimpConnectionEditorState = Readonly<{
|
|
105
|
+
tag: 'not_connected';
|
|
106
|
+
}> | Readonly<{
|
|
107
|
+
tag: 'connected';
|
|
108
|
+
connectionId: MailchimpConnectionId;
|
|
109
|
+
}> | Readonly<{
|
|
110
|
+
tag: 'needs_reauth';
|
|
111
|
+
connectionId: MailchimpConnectionId;
|
|
112
|
+
}>;
|
|
113
|
+
export type ServerResolvedMailchimpConnectionState = Readonly<{
|
|
114
|
+
tag: 'not_connected';
|
|
115
|
+
[serverResolvedMailchimpConnectionStateBrand]: true;
|
|
116
|
+
}> | Readonly<{
|
|
117
|
+
tag: 'connected';
|
|
118
|
+
connectionId: MailchimpConnectionId;
|
|
119
|
+
[serverResolvedMailchimpConnectionStateBrand]: true;
|
|
120
|
+
}> | Readonly<{
|
|
121
|
+
tag: 'needs_reauth';
|
|
122
|
+
connectionId: MailchimpConnectionId;
|
|
123
|
+
[serverResolvedMailchimpConnectionStateBrand]: true;
|
|
124
|
+
}>;
|
|
125
|
+
export type MailchimpAudienceCompatibilityIssue = Readonly<{
|
|
126
|
+
tag: 'required_merge_field';
|
|
127
|
+
fieldTag: string;
|
|
128
|
+
fieldType: string | null;
|
|
129
|
+
}> | Readonly<{
|
|
130
|
+
tag: 'unsupported_required_interest_group';
|
|
131
|
+
name: string | null;
|
|
132
|
+
}> | Readonly<{
|
|
133
|
+
tag: 'unsupported_marketing_permissions';
|
|
134
|
+
}> | Readonly<{
|
|
135
|
+
tag: 'unsupported_sms_field';
|
|
136
|
+
}>;
|
|
137
|
+
export type MailchimpMergeFieldCompatibilityInput = Readonly<{
|
|
138
|
+
fieldTag: string;
|
|
139
|
+
fieldType: string | null;
|
|
140
|
+
required: boolean;
|
|
141
|
+
}>;
|
|
142
|
+
export type MailchimpRequiredMergeField = Readonly<{
|
|
143
|
+
fieldTag: string;
|
|
144
|
+
fieldType: string | null;
|
|
145
|
+
}>;
|
|
146
|
+
export type MailchimpRequiredInterestGroup = Readonly<{
|
|
147
|
+
name: string | null;
|
|
148
|
+
}>;
|
|
149
|
+
export type NewsletterSignupFormCompatibilityFingerprint = Readonly<{
|
|
150
|
+
preset: NewsletterSignupFieldPreset;
|
|
151
|
+
includePhone: boolean;
|
|
152
|
+
}>;
|
|
153
|
+
export type MailchimpAudienceCompatibilityInput = Readonly<{
|
|
154
|
+
requiredMergeFields: readonly MailchimpRequiredMergeField[];
|
|
155
|
+
requiredInterestGroups?: readonly MailchimpRequiredInterestGroup[];
|
|
156
|
+
marketingPermissionsRequired?: boolean;
|
|
157
|
+
smsSignupRequired?: boolean;
|
|
158
|
+
}>;
|
|
159
|
+
export type MailchimpAudienceCompatibilityValidation = Readonly<{
|
|
160
|
+
tag: 'pending';
|
|
161
|
+
}> | Readonly<{
|
|
162
|
+
tag: 'validated';
|
|
163
|
+
connectionId: MailchimpConnectionId;
|
|
164
|
+
audienceId: MailchimpAudienceId;
|
|
165
|
+
form: NewsletterSignupFormCompatibilityFingerprint;
|
|
166
|
+
issues: readonly MailchimpAudienceCompatibilityIssue[];
|
|
167
|
+
}>;
|
|
168
|
+
export type ServerValidatedMailchimpAudienceCompatibility = Extract<MailchimpAudienceCompatibilityValidation, {
|
|
169
|
+
tag: 'validated';
|
|
170
|
+
}> & Readonly<{
|
|
171
|
+
[serverValidatedMailchimpAudienceCompatibilityBrand]: true;
|
|
172
|
+
}>;
|
|
173
|
+
export type NewsletterSignupDestinationReadinessIssue = Readonly<{
|
|
174
|
+
tag: 'invalid_destination_provider';
|
|
175
|
+
value: unknown;
|
|
176
|
+
}> | Readonly<{
|
|
177
|
+
tag: 'riverbank_list_required';
|
|
178
|
+
}> | Readonly<{
|
|
179
|
+
tag: 'mailchimp_connection_required';
|
|
180
|
+
}> | Readonly<{
|
|
181
|
+
tag: 'mailchimp_connection_needs_reauth';
|
|
182
|
+
}> | Readonly<{
|
|
183
|
+
tag: 'mailchimp_audience_required';
|
|
184
|
+
}> | Readonly<{
|
|
185
|
+
tag: 'mailchimp_compatibility_validation_pending';
|
|
186
|
+
}> | Readonly<{
|
|
187
|
+
tag: 'invalid_mailchimp_tags';
|
|
188
|
+
}> | Readonly<{
|
|
189
|
+
tag: 'mailchimp_audience_incompatible';
|
|
190
|
+
issues: readonly MailchimpAudienceCompatibilityIssue[];
|
|
191
|
+
}>;
|
|
192
|
+
export type NewsletterSignupDestinationReadiness = Readonly<{
|
|
193
|
+
tag: 'ready';
|
|
194
|
+
}> | Readonly<{
|
|
195
|
+
tag: 'blocked';
|
|
196
|
+
issues: NonEmptyReadonlyArray<NewsletterSignupDestinationReadinessIssue>;
|
|
197
|
+
}>;
|
|
198
|
+
export type NewsletterSignupDestinationActivationIssue = Readonly<{
|
|
199
|
+
tag: 'invalid_destination_provider';
|
|
200
|
+
value: unknown;
|
|
201
|
+
}> | Readonly<{
|
|
202
|
+
tag: 'invalid_mailchimp_destination';
|
|
203
|
+
}> | Readonly<{
|
|
204
|
+
tag: 'invalid_mailchimp_connection_id';
|
|
205
|
+
}> | Readonly<{
|
|
206
|
+
tag: 'mailchimp_audience_required';
|
|
207
|
+
}> | Readonly<{
|
|
208
|
+
tag: 'invalid_mailchimp_audience_id';
|
|
209
|
+
}> | Readonly<{
|
|
210
|
+
tag: 'invalid_mailchimp_tags';
|
|
211
|
+
}> | Readonly<{
|
|
212
|
+
tag: 'mailchimp_server_readiness_unavailable';
|
|
213
|
+
}>;
|
|
214
|
+
export type NewsletterSignupDestinationActivationInput = Readonly<{
|
|
215
|
+
tag: 'unresolved_authoring_content';
|
|
216
|
+
content: NewsletterSignupRawAuthoringContent;
|
|
217
|
+
}>;
|
|
218
|
+
export type NewsletterSignupDestinationActivationReadiness = Readonly<{
|
|
219
|
+
tag: 'ready';
|
|
220
|
+
}> | Readonly<{
|
|
221
|
+
tag: 'blocked';
|
|
222
|
+
issues: NonEmptyReadonlyArray<NewsletterSignupDestinationActivationIssue>;
|
|
223
|
+
}>;
|
|
224
|
+
export type NewsletterSignupDestinationProviderOption = Readonly<{
|
|
225
|
+
tag: 'available';
|
|
226
|
+
value: 'riverbank';
|
|
227
|
+
label: string;
|
|
228
|
+
}> | Readonly<{
|
|
229
|
+
tag: 'unavailable';
|
|
230
|
+
value: 'mailchimp';
|
|
231
|
+
label: string;
|
|
232
|
+
reason: 'connection_and_compatibility_pending';
|
|
233
|
+
}>;
|
|
234
|
+
export type NewsletterSignupDestinationParseError = Readonly<{
|
|
235
|
+
tag: 'missing_destination';
|
|
236
|
+
}> | Readonly<{
|
|
237
|
+
tag: 'mixed_legacy_and_destination';
|
|
238
|
+
}> | Readonly<{
|
|
239
|
+
tag: 'invalid_destination_shape';
|
|
240
|
+
}> | Readonly<{
|
|
241
|
+
tag: 'invalid_destination_tag';
|
|
242
|
+
value: unknown;
|
|
243
|
+
}> | Readonly<{
|
|
244
|
+
tag: 'invalid_destination_provider';
|
|
245
|
+
value: unknown;
|
|
246
|
+
}> | Readonly<{
|
|
247
|
+
tag: 'conflicting_destination_provider';
|
|
248
|
+
}> | Readonly<{
|
|
249
|
+
tag: 'invalid_newsletter_list_id';
|
|
250
|
+
}> | Readonly<{
|
|
251
|
+
tag: 'invalid_mailchimp_connection_id';
|
|
252
|
+
}> | Readonly<{
|
|
253
|
+
tag: 'invalid_mailchimp_audience_id';
|
|
254
|
+
}> | Readonly<{
|
|
255
|
+
tag: 'invalid_mailchimp_tags';
|
|
256
|
+
}>;
|
|
257
|
+
export type NewsletterSignupDestinationParseResult = Readonly<{
|
|
258
|
+
success: true;
|
|
259
|
+
data: NewsletterSignupAuthoringState;
|
|
260
|
+
}> | Readonly<{
|
|
261
|
+
success: false;
|
|
262
|
+
error: NewsletterSignupDestinationParseError;
|
|
263
|
+
}>;
|
|
264
|
+
export declare function parseNewsletterListId(value: unknown): NewsletterListId | null;
|
|
265
|
+
export declare function parseMailchimpConnectionId(value: unknown): MailchimpConnectionId | null;
|
|
266
|
+
export declare function parseMailchimpAudienceId(value: unknown): MailchimpAudienceId | null;
|
|
267
|
+
export declare function parseMailchimpTagName(value: unknown): MailchimpTagName | null;
|
|
268
|
+
export declare function parseNewsletterSignupBlockId(value: unknown): NewsletterSignupBlockId | null;
|
|
269
|
+
export declare function parseSignedNewsletterDestinationRef(value: unknown): SignedNewsletterDestinationRef | null;
|
|
270
|
+
export declare function parseNewsletterSignupDestinationProvider(value: unknown): NewsletterSignupDestinationProvider | null;
|
|
271
|
+
export declare function parseNewsletterSignupAuthoringDestination(content: unknown): NewsletterSignupDestinationParseResult;
|
|
272
|
+
export declare function normalizeNewsletterSignupAuthoringDestination(content: NewsletterSignupRawAuthoringContent): NewsletterSignupAuthoringDestination | null;
|
|
273
|
+
export declare function assertValidNewsletterSignupAuthoringDestination(destination: NewsletterSignupAuthoringDestination): NewsletterSignupAuthoringDestination;
|
|
274
|
+
export declare function buildNewsletterSignupBlockRef(blockId: string | null | undefined): NewsletterSignupPublicDestinationRef | null;
|
|
275
|
+
export declare function selectNewsletterDestinationEditorFields(destination: NewsletterSignupAuthoringDestination | NewsletterSignupDestinationProvider | null, connectionState?: MailchimpConnectionEditorState): NewsletterSignupDestinationEditorFieldState;
|
|
276
|
+
export declare function normalizeNewsletterSignupEditorValuesForDestination(values: NewsletterSignupEditorValues): NormalizedNewsletterSignupEditorValues;
|
|
277
|
+
export declare function buildTrustedNewsletterSignupAuthoringDestination(input: Readonly<{
|
|
278
|
+
values: NewsletterSignupEditorValues;
|
|
279
|
+
connectionState?: ServerResolvedMailchimpConnectionState;
|
|
280
|
+
form?: NewsletterSignupFormCompatibilityFingerprint;
|
|
281
|
+
compatibility?: ServerValidatedMailchimpAudienceCompatibility;
|
|
282
|
+
}>): TrustedNewsletterSignupAuthoringDestinationResult;
|
|
283
|
+
export declare function deriveNewsletterSignupRuntimeSource(values: NewsletterSignupEditorValues): NewsletterSignupRuntimeSource;
|
|
284
|
+
export declare function unsafeAssumeServerResolvedMailchimpConnectionState(state: MailchimpConnectionEditorState): ServerResolvedMailchimpConnectionState;
|
|
285
|
+
export declare function unsafeAssumeServerValidatedMailchimpAudienceCompatibility(validation: Extract<MailchimpAudienceCompatibilityValidation, {
|
|
286
|
+
tag: 'validated';
|
|
287
|
+
}>): ServerValidatedMailchimpAudienceCompatibility;
|
|
288
|
+
export declare function sanitizeNewsletterSignupPublicContent(content: unknown): unknown;
|
|
289
|
+
export declare function validateNewsletterSignupDestinationReadiness(input: Readonly<{
|
|
290
|
+
values: NewsletterSignupEditorValues;
|
|
291
|
+
connectionState?: MailchimpConnectionEditorState;
|
|
292
|
+
form?: NewsletterSignupFormCompatibilityFingerprint;
|
|
293
|
+
compatibility?: MailchimpAudienceCompatibilityValidation;
|
|
294
|
+
}>): NewsletterSignupDestinationReadiness;
|
|
295
|
+
export declare function validateNewsletterSignupDestinationActivationReadiness(input: NewsletterSignupDestinationActivationInput): NewsletterSignupDestinationActivationReadiness;
|
|
296
|
+
export declare function selectRequiredMailchimpMergeFields(fields: readonly MailchimpMergeFieldCompatibilityInput[]): readonly MailchimpRequiredMergeField[];
|
|
297
|
+
export declare function deriveMailchimpAudienceCompatibilityIssues(input: MailchimpAudienceCompatibilityInput): readonly MailchimpAudienceCompatibilityIssue[];
|
|
298
|
+
export declare function selectNewsletterSignupDestinationProviderOptions(): readonly NewsletterSignupDestinationProviderOption[];
|
|
299
|
+
export declare function getNewsletterSignupDestinationProvider(content: NewsletterSignupRawAuthoringContent): NewsletterSignupDestinationProvider;
|
|
300
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SystemBlockDefinition } from "../registry";
|
|
2
2
|
import type { SectionStylesContent } from "../fields/boxStyles";
|
|
3
3
|
import { newsletterFormBlockRuntime } from "../runtime/nodes/newsletter-form.interactive";
|
|
4
|
+
import type { NewsletterSignupAuthoringDestination, NewsletterSignupFieldPreset } from "./newsletter-signup-destination";
|
|
4
5
|
export declare const newsletterSignupManifest: import("..").DefinedBlockManifest<import("..").BlockContentShapeInput<{
|
|
5
6
|
readonly id: "block.newsletter-signup";
|
|
6
7
|
readonly title: "Newsletter Signup";
|
|
@@ -25,15 +26,60 @@ export declare const newsletterSignupManifest: import("..").DefinedBlockManifest
|
|
|
25
26
|
}, {
|
|
26
27
|
readonly fragment: import("..").DefinedFragment<{
|
|
27
28
|
readonly fields: readonly [{
|
|
29
|
+
readonly id: "destinationProvider";
|
|
30
|
+
readonly type: "select";
|
|
31
|
+
readonly label: "Send signups to";
|
|
32
|
+
readonly description: "Choose where new subscribers from this form should go.";
|
|
33
|
+
readonly defaultValue: "riverbank";
|
|
34
|
+
readonly required: true;
|
|
35
|
+
readonly ui: {
|
|
36
|
+
readonly intent: "behavior";
|
|
37
|
+
};
|
|
38
|
+
readonly options: [{
|
|
39
|
+
readonly value: "riverbank";
|
|
40
|
+
readonly label: "Riverbank newsletter";
|
|
41
|
+
}];
|
|
42
|
+
}, {
|
|
28
43
|
readonly id: "listId";
|
|
29
44
|
readonly type: "reference";
|
|
30
45
|
readonly label: "Newsletter list";
|
|
31
46
|
readonly description: "Select the list new subscribers should be added to.";
|
|
32
|
-
readonly required:
|
|
47
|
+
readonly required: false;
|
|
33
48
|
readonly referenceKind: "newsletterList";
|
|
34
49
|
readonly allowManualEntry: false;
|
|
35
50
|
readonly ui: {
|
|
36
51
|
readonly intent: "behavior";
|
|
52
|
+
readonly visibleWhen: {
|
|
53
|
+
readonly field: "destinationProvider";
|
|
54
|
+
readonly equals: "riverbank";
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}, {
|
|
58
|
+
readonly id: "mailchimpAudienceId";
|
|
59
|
+
readonly type: "reference";
|
|
60
|
+
readonly label: "Mailchimp audience";
|
|
61
|
+
readonly description: "Choose the Mailchimp audience for new subscribers.";
|
|
62
|
+
readonly required: false;
|
|
63
|
+
readonly referenceKind: "mailchimpAudience";
|
|
64
|
+
readonly allowManualEntry: false;
|
|
65
|
+
readonly ui: {
|
|
66
|
+
readonly intent: "behavior";
|
|
67
|
+
readonly visibleWhen: {
|
|
68
|
+
readonly field: "destinationProvider";
|
|
69
|
+
readonly equals: "mailchimp";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}, {
|
|
73
|
+
readonly id: "mailchimpTags";
|
|
74
|
+
readonly type: "text";
|
|
75
|
+
readonly label: "Mailchimp tags";
|
|
76
|
+
readonly description: "Optional tags to apply in Mailchimp, separated by commas or semicolons.";
|
|
77
|
+
readonly ui: {
|
|
78
|
+
readonly intent: "behavior";
|
|
79
|
+
readonly visibleWhen: {
|
|
80
|
+
readonly field: "destinationProvider";
|
|
81
|
+
readonly equals: "mailchimp";
|
|
82
|
+
};
|
|
37
83
|
};
|
|
38
84
|
}, {
|
|
39
85
|
readonly id: "preset";
|
|
@@ -87,6 +133,13 @@ export declare const newsletterSignupManifest: import("..").DefinedBlockManifest
|
|
|
87
133
|
readonly type: "text";
|
|
88
134
|
readonly label: "Tags (optional)";
|
|
89
135
|
readonly description: "Optional tags to apply on subscribe (comma or semicolon separated).";
|
|
136
|
+
readonly ui: {
|
|
137
|
+
readonly intent: "behavior";
|
|
138
|
+
readonly visibleWhen: {
|
|
139
|
+
readonly field: "destinationProvider";
|
|
140
|
+
readonly equals: "riverbank";
|
|
141
|
+
};
|
|
142
|
+
};
|
|
90
143
|
}];
|
|
91
144
|
}>;
|
|
92
145
|
readonly fieldPriority: 1;
|
|
@@ -136,15 +189,22 @@ type NewsletterRichTextDoc = {
|
|
|
136
189
|
[key: string]: unknown;
|
|
137
190
|
}>;
|
|
138
191
|
};
|
|
139
|
-
export type NewsletterSignupPreset =
|
|
192
|
+
export type NewsletterSignupPreset = NewsletterSignupFieldPreset;
|
|
140
193
|
export type NewsletterSignupContent = {
|
|
141
194
|
title?: string | null;
|
|
142
195
|
subtitle?: NewsletterRichTextDoc | null;
|
|
196
|
+
listId?: string | null;
|
|
143
197
|
preset: NewsletterSignupPreset;
|
|
198
|
+
includePhone?: boolean | null;
|
|
144
199
|
buttonLabel?: string | null;
|
|
145
200
|
successMessage?: string | null;
|
|
146
201
|
privacyNote?: string | null;
|
|
202
|
+
tags?: string | null;
|
|
147
203
|
_sectionStyles?: SectionStylesContent;
|
|
148
204
|
};
|
|
205
|
+
export type NewsletterSignupAuthoringContent = Omit<NewsletterSignupContent, 'listId' | 'tags'> & {
|
|
206
|
+
destination: NewsletterSignupAuthoringDestination;
|
|
207
|
+
};
|
|
208
|
+
export { buildTrustedNewsletterSignupAuthoringDestination, sanitizeNewsletterSignupPublicContent, validateNewsletterSignupDestinationActivationReadiness, } from "./newsletter-signup-destination";
|
|
209
|
+
export type { MailchimpAudienceCompatibilityIssue, MailchimpAudienceId, MailchimpConnectionId, MailchimpNewsletterDestination, MailchimpTagName, NewsletterListId, NewsletterSignupAuthoringDestination, NewsletterSignupDestinationActivationIssue, NewsletterSignupDestinationActivationInput, NewsletterSignupDestinationActivationReadiness, NewsletterSignupBlockId, NewsletterSignupDestinationEditorFieldState, NewsletterSignupDestinationReadinessIssue, NewsletterSignupFieldPreset, NewsletterSignupDestinationProviderOption, NewsletterSignupPublicDestinationRef, RiverbankNewsletterDestination, ServerResolvedMailchimpConnectionState, ServerValidatedMailchimpAudienceCompatibility, SignedNewsletterDestinationRef, TrustedNewsletterSignupAuthoringDestinationError, TrustedNewsletterSignupAuthoringDestinationResult, } from "./newsletter-signup-destination";
|
|
149
210
|
export declare const newsletterSignupBlockDefinition: SystemBlockDefinition<NewsletterSignupContent, typeof newsletterFormBlockRuntime>;
|
|
150
|
-
export {};
|