@reblu/site-contracts 1.6.1 → 1.7.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/CHANGELOG.md +34 -0
- package/README.md +63 -0
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @reblu/site-contracts
|
|
2
2
|
|
|
3
|
+
## 1.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- af0745a: `GET /api/site/pages/[slug]`'s `blocks[]` items now mirror their parent
|
|
8
|
+
section's `heading`, `backgroundColor` and `cta` (REB-849), and
|
|
9
|
+
`doctor_embed`/`specialty_embed` blocks additionally carry a server-resolved
|
|
10
|
+
`resolved: { slug, title, excerpt, coverImageUrl, role } | null` (REB-851
|
|
11
|
+
phase 1). `sections[]` is unchanged.
|
|
12
|
+
|
|
13
|
+
Newly exported type: `ResolvedEmbed` (`PageBlock`/`BlockCta` gain the new
|
|
14
|
+
optional fields). All three new `PageBlock` fields (`heading`,
|
|
15
|
+
`backgroundColor`, `cta`) plus `resolved` are `optional` on the type, so
|
|
16
|
+
validating an older payload that predates this release still works.
|
|
17
|
+
|
|
18
|
+
`@reblu/site-client` is unaffected — its public types still reference
|
|
19
|
+
`PageDetail` by name and did not change shape or signature.
|
|
20
|
+
|
|
21
|
+
- 7f6f441: `GET /api/site/pages/[slug]`'s block registry gains two generic, niche-agnostic
|
|
22
|
+
block types: `page_embed` (a card for any published page) and `profile_embed`
|
|
23
|
+
(a card for a team member's page). Both carry the same server-resolved
|
|
24
|
+
`resolved: { slug, title, excerpt, coverImageUrl, role } | null` as the
|
|
25
|
+
existing doctor/specialty embeds, computed in the same single batched query.
|
|
26
|
+
|
|
27
|
+
`doctor_embed`/`specialty_embed` are now **deprecated aliases** of
|
|
28
|
+
`profile_embed`/`page_embed` respectively — still accepted by the schema and
|
|
29
|
+
still resolved server-side exactly as before, so existing tenant data keeps
|
|
30
|
+
working unchanged. They will be removed after 2027-01-31, once no tenant data
|
|
31
|
+
uses them (REB-852). No existing tenant data is migrated by this change.
|
|
32
|
+
|
|
33
|
+
No new exported types — `page_embed`/`profile_embed` widen the existing
|
|
34
|
+
`BlockType` union and are covered by the existing `PageBlock`/`ResolvedEmbed`
|
|
35
|
+
shapes.
|
|
36
|
+
|
|
3
37
|
## 1.6.1
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -30,6 +30,69 @@ async function getPosts(): Promise<{ data: BlogPostListItem[] }> {
|
|
|
30
30
|
Pair it with `@reblu/site-client` for a typed client that already knows these
|
|
31
31
|
shapes.
|
|
32
32
|
|
|
33
|
+
### Page blocks — canonical shape (REB-849 / REB-851 / REB-852)
|
|
34
|
+
|
|
35
|
+
`GET /api/site/pages/[slug]` (`PageDetail`) returns BOTH `sections[]` (legacy,
|
|
36
|
+
unchanged) and `blocks[]` (`PageBlock[]`, the typed registry — REB-75 D-D). A
|
|
37
|
+
SITE should render from `blocks[]`; `sections[]` stays only for backward
|
|
38
|
+
compat during the dual-read window.
|
|
39
|
+
|
|
40
|
+
Every block mirrors its parent section's presentation fields, and a
|
|
41
|
+
`page_embed`/`profile_embed` block additionally carries the referenced page,
|
|
42
|
+
resolved server-side:
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import type { PageBlock } from '@reblu/site-contracts'
|
|
46
|
+
|
|
47
|
+
const block: PageBlock = {
|
|
48
|
+
id: 'sec-hero',
|
|
49
|
+
order: 0,
|
|
50
|
+
// Mirrored from the parent section. All three are OPTIONAL on the type
|
|
51
|
+
// (so validating an older, pre-REB-849 payload still works) — the route
|
|
52
|
+
// itself always emits them.
|
|
53
|
+
heading: 'Bienvenidos',
|
|
54
|
+
backgroundColor: '#fff',
|
|
55
|
+
// null unless BOTH a label and a url are authored on the section.
|
|
56
|
+
cta: {
|
|
57
|
+
label: 'Reserva',
|
|
58
|
+
url: '/reserva',
|
|
59
|
+
isExternal: false,
|
|
60
|
+
variant: 'default', // one of: 'default' | 'outline' | 'ghost' | null
|
|
61
|
+
},
|
|
62
|
+
blockType: 'profile_embed',
|
|
63
|
+
data: { pageSlug: 'dra-perez' },
|
|
64
|
+
// Present ONLY on page_embed/profile_embed blocks (optional on the type,
|
|
65
|
+
// omitted entirely for every other blockType). null when the referenced
|
|
66
|
+
// slug is unknown, unpublished, or belongs to another tenant.
|
|
67
|
+
resolved: {
|
|
68
|
+
slug: 'dra-perez',
|
|
69
|
+
title: 'Dra. Pérez',
|
|
70
|
+
excerpt: 'Dermatóloga',
|
|
71
|
+
coverImageUrl: '/img/perez.jpg',
|
|
72
|
+
// Sourced from the referenced page's professional profile ONLY when
|
|
73
|
+
// that page is pageType='team' — null otherwise (e.g. any other page).
|
|
74
|
+
role: 'Dermatóloga',
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`heading`/`backgroundColor` are `string | null`; `cta` is `BlockCta` (`{
|
|
80
|
+
label, url, isExternal, variant } | null`); `resolved` is `ResolvedEmbed | null`
|
|
81
|
+
(`{ slug, title, excerpt, coverImageUrl, role }`). `sections[]` is never
|
|
82
|
+
mutated by either feature.
|
|
83
|
+
|
|
84
|
+
#### `page_embed` / `profile_embed` — niche-agnostic, and their deprecated aliases
|
|
85
|
+
|
|
86
|
+
`page_embed` (any published page) and `profile_embed` (a team member's page)
|
|
87
|
+
are the generic, sector-agnostic block types — the platform's block registry
|
|
88
|
+
never hardcodes vocabulary for one tenant's niche. `doctor_embed` and
|
|
89
|
+
`specialty_embed` are **deprecated aliases** of `profile_embed` and
|
|
90
|
+
`page_embed` respectively: still accepted by the schema and still resolved
|
|
91
|
+
server-side exactly as before (so existing tenant data keeps working), but no
|
|
92
|
+
longer offered as a choice for a new section in nexus. They will be removed
|
|
93
|
+
after 2027-01-31, once no tenant data uses them (REB-852) — this release does
|
|
94
|
+
not migrate existing data.
|
|
95
|
+
|
|
33
96
|
## How the types stay correct
|
|
34
97
|
|
|
35
98
|
The types are re-derived from the response schemas that live in the Reblu API
|
package/dist/index.d.cts
CHANGED
|
@@ -21,6 +21,12 @@ export type AcademyValidationFieldPublic = { key: string; label: string;
|
|
|
21
21
|
|
|
22
22
|
export type Analytics = { gaId: string | null; clarityId: string | null; recaptchaSiteKey: string | null; contactFormMode: "NOT_CONFIGURED" | "DISABLED" | "DB_ONLY" | "WEBHOOK" | "RESEND"; metaPixelId: string | null; metaVerificationContent: string | null; googleVerificationContent: string | null; consentRequired: boolean; cookiePolicyVersion: string | null; cookieBanner: { enabled: boolean; title: string | null; body: string | null; acceptLabel: string | null; rejectLabel: string | null; manageLabel: string | null; policyUrl: string | null; }; cookieInventory: { vendor: string; category: "necessary" | "analytics" | "marketing"; }[];}
|
|
23
23
|
|
|
24
|
+
export type Block = { blockType: "hero"; data: { title: string; subtitle?: string | undefined; imageUrl?: string | undefined; ctaSlot?: string | undefined; };} | { blockType: "richtext"; data: { html: string; };} | { blockType: "faq"; data: { items: { q: string; a: string; }[]; };} | { blockType: "stats"; data: { items: { label: string; value: string; }[]; };} | { blockType: "testimonial"; data: { quote: string; author: string; role?: string | undefined; avatarUrl?: string | undefined; };} | { blockType: "cta"; data: { slot: string; };} | { blockType: "feature_list"; data: { items: { text: string; icon?: string | undefined; }[]; };} | { blockType: "gallery"; data: { images: { url: string; alt?: string | undefined; caption?: string | undefined; }[]; };} | { blockType: "page_embed"; data: { pageSlug: string; };} | { blockType: "profile_embed"; data: { pageSlug: string; };} | { blockType: "doctor_embed"; data: { pageSlug: string; };} | { blockType: "specialty_embed"; data: { pageSlug: string; };}
|
|
25
|
+
|
|
26
|
+
export type BlockCta = null | { label: string; url: string; isExternal: boolean; variant: string | null;}
|
|
27
|
+
|
|
28
|
+
export type BlockType = "hero" | "richtext" | "faq" | "stats" | "testimonial" | "cta" | "feature_list" | "gallery" | "page_embed" | "profile_embed" | "doctor_embed" | "specialty_embed"
|
|
29
|
+
|
|
24
30
|
export type BlogAuthor = { firstName: string | null; lastName: string | null; avatarUrl: string | null;}
|
|
25
31
|
|
|
26
32
|
export type BlogAuthorDetail = { id: string; firstName: string | null; lastName: string | null; avatarUrl: string | null;}
|
|
@@ -83,11 +89,13 @@ export type LegacyPageType = "SERVICE" | "CUSTOM"
|
|
|
83
89
|
|
|
84
90
|
export type Legal = { privacyPolicy: string | null; termsAndConditions: string | null; cookiePolicy: string | null;}
|
|
85
91
|
|
|
92
|
+
export type PageBlock = { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "hero"; data: { title: string; subtitle?: string | undefined; imageUrl?: string | undefined; ctaSlot?: string | undefined; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "richtext"; data: { html: string; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "faq"; data: { items: { q: string; a: string; }[]; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "stats"; data: { items: { label: string; value: string; }[]; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "testimonial"; data: { quote: string; author: string; role?: string | undefined; avatarUrl?: string | undefined; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "cta"; data: { slot: string; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "feature_list"; data: { items: { text: string; icon?: string | undefined; }[]; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "gallery"; data: { images: { url: string; alt?: string | undefined; caption?: string | undefined; }[]; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "page_embed"; data: { pageSlug: string; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "profile_embed"; data: { pageSlug: string; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "doctor_embed"; data: { pageSlug: string; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "specialty_embed"; data: { pageSlug: string; };}
|
|
93
|
+
|
|
86
94
|
export type PageCategoryRef = { name: string; slug: string;}
|
|
87
95
|
|
|
88
96
|
export type PageContentMode = "BLOCKS" | "HTML"
|
|
89
97
|
|
|
90
|
-
export type PageDetail = { slug: string; title: string; subtitle: string | null; excerpt: string | null; coverImageUrl: string | null; type: "SERVICE" | "CUSTOM"; pageType: "custom" | "service" | "treatments" | "specialties" | "team" | "generic"; contentMode: "BLOCKS" | "HTML"; customHtml: string | null; seoTitle: string | null; seoDescription: string | null; category: { name: string; slug: string; } | null; sections: { id: string; order: number; heading: string | null; contentHtml: string; layout: "TEXT" | "TEXT_IMAGE" | "IMAGE_TEXT" | "IMAGE_FULL" | "FEATURE_LIST" | "GALLERY" | "CTA_BLOCK"; backgroundColor: string | null; features: unknown; ctaLabel: string | null; ctaUrl: string | null; ctaIsExternal: boolean; ctaVariant: string | null; images: { url: string; alt: string; caption: string | null; order: number; }[]; }[]; blocks: ({ id: string; order: number; } & ({ blockType: "hero"; data: { title: string; subtitle?: string | undefined; imageUrl?: string | undefined; ctaSlot?: string | undefined; }; } | { blockType: "richtext"; data: { html: string; }; } | { blockType: "faq"; data: { items: { q: string; a: string; }[]; }; } | { blockType: "stats"; data: { items: { label: string; value: string; }[]; }; } | { blockType: "testimonial"; data: { quote: string; author: string; role?: string | undefined; avatarUrl?: string | undefined; }; } | { blockType: "cta"; data: { slot: string; }; } | { blockType: "feature_list"; data: { items: { text: string; icon?: string | undefined; }[]; }; } | { blockType: "gallery"; data: { images: { url: string; alt?: string | undefined; caption?: string | undefined; }[]; }; } | { blockType: "doctor_embed"; data: { pageSlug: string; }; } | { blockType: "specialty_embed"; data: { pageSlug: string; }; }))[]; jsonLd: unknown; professional: { role: string | null; socialLinks: { platform: "linkedin" | "twitter" | "facebook" | "instagram" | "website" | "other"; url: string; }[]; cv: { education: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; experience: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; certifications: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; memberships: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; languages: { language: string; level: "basic" | "conversational" | "fluent" | "native" | null; }[]; } | null; } | null;}
|
|
98
|
+
export type PageDetail = { slug: string; title: string; subtitle: string | null; excerpt: string | null; coverImageUrl: string | null; type: "SERVICE" | "CUSTOM"; pageType: "custom" | "service" | "treatments" | "specialties" | "team" | "generic"; contentMode: "BLOCKS" | "HTML"; customHtml: string | null; seoTitle: string | null; seoDescription: string | null; category: { name: string; slug: string; } | null; sections: { id: string; order: number; heading: string | null; contentHtml: string; layout: "TEXT" | "TEXT_IMAGE" | "IMAGE_TEXT" | "IMAGE_FULL" | "FEATURE_LIST" | "GALLERY" | "CTA_BLOCK"; backgroundColor: string | null; features: unknown; ctaLabel: string | null; ctaUrl: string | null; ctaIsExternal: boolean; ctaVariant: string | null; images: { url: string; alt: string; caption: string | null; order: number; }[]; }[]; blocks: ({ id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; } & ({ blockType: "hero"; data: { title: string; subtitle?: string | undefined; imageUrl?: string | undefined; ctaSlot?: string | undefined; }; } | { blockType: "richtext"; data: { html: string; }; } | { blockType: "faq"; data: { items: { q: string; a: string; }[]; }; } | { blockType: "stats"; data: { items: { label: string; value: string; }[]; }; } | { blockType: "testimonial"; data: { quote: string; author: string; role?: string | undefined; avatarUrl?: string | undefined; }; } | { blockType: "cta"; data: { slot: string; }; } | { blockType: "feature_list"; data: { items: { text: string; icon?: string | undefined; }[]; }; } | { blockType: "gallery"; data: { images: { url: string; alt?: string | undefined; caption?: string | undefined; }[]; }; } | { blockType: "page_embed"; data: { pageSlug: string; }; } | { blockType: "profile_embed"; data: { pageSlug: string; }; } | { blockType: "doctor_embed"; data: { pageSlug: string; }; } | { blockType: "specialty_embed"; data: { pageSlug: string; }; }))[]; jsonLd: unknown; professional: { role: string | null; socialLinks: { platform: "linkedin" | "twitter" | "facebook" | "instagram" | "website" | "other"; url: string; }[]; cv: { education: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; experience: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; certifications: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; memberships: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; languages: { language: string; level: "basic" | "conversational" | "fluent" | "native" | null; }[]; } | null; } | null;}
|
|
91
99
|
|
|
92
100
|
export type PageListItem = { slug: string; title: string; subtitle: string | null; excerpt: string | null; coverImageUrl: string | null; type: "SERVICE" | "CUSTOM"; pageType: "custom" | "service" | "treatments" | "specialties" | "team" | "generic"; order: number; seoTitle: string | null; seoDescription: string | null; category: { name: string; slug: string; } | null; professional: { role: string | null; } | null;}
|
|
93
101
|
|
|
@@ -121,6 +129,8 @@ export type ProfessionalSocialPlatform = "linkedin" | "twitter" | "facebook" | "
|
|
|
121
129
|
|
|
122
130
|
export type ProfessionalSummary = { role: string | null;}
|
|
123
131
|
|
|
132
|
+
export type ResolvedEmbed = { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null;}
|
|
133
|
+
|
|
124
134
|
export type SectionLayout = "TEXT" | "TEXT_IMAGE" | "IMAGE_TEXT" | "IMAGE_FULL" | "FEATURE_LIST" | "GALLERY" | "CTA_BLOCK"
|
|
125
135
|
|
|
126
136
|
export type ShopAddressInput = { firstName: string; lastName: string; street: string; city: string; postalCode: string; region?: string | undefined; country?: string | undefined; phone?: string | null | undefined;}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ export type AcademyValidationFieldPublic = { key: string; label: string;
|
|
|
21
21
|
|
|
22
22
|
export type Analytics = { gaId: string | null; clarityId: string | null; recaptchaSiteKey: string | null; contactFormMode: "NOT_CONFIGURED" | "DISABLED" | "DB_ONLY" | "WEBHOOK" | "RESEND"; metaPixelId: string | null; metaVerificationContent: string | null; googleVerificationContent: string | null; consentRequired: boolean; cookiePolicyVersion: string | null; cookieBanner: { enabled: boolean; title: string | null; body: string | null; acceptLabel: string | null; rejectLabel: string | null; manageLabel: string | null; policyUrl: string | null; }; cookieInventory: { vendor: string; category: "necessary" | "analytics" | "marketing"; }[];}
|
|
23
23
|
|
|
24
|
+
export type Block = { blockType: "hero"; data: { title: string; subtitle?: string | undefined; imageUrl?: string | undefined; ctaSlot?: string | undefined; };} | { blockType: "richtext"; data: { html: string; };} | { blockType: "faq"; data: { items: { q: string; a: string; }[]; };} | { blockType: "stats"; data: { items: { label: string; value: string; }[]; };} | { blockType: "testimonial"; data: { quote: string; author: string; role?: string | undefined; avatarUrl?: string | undefined; };} | { blockType: "cta"; data: { slot: string; };} | { blockType: "feature_list"; data: { items: { text: string; icon?: string | undefined; }[]; };} | { blockType: "gallery"; data: { images: { url: string; alt?: string | undefined; caption?: string | undefined; }[]; };} | { blockType: "page_embed"; data: { pageSlug: string; };} | { blockType: "profile_embed"; data: { pageSlug: string; };} | { blockType: "doctor_embed"; data: { pageSlug: string; };} | { blockType: "specialty_embed"; data: { pageSlug: string; };}
|
|
25
|
+
|
|
26
|
+
export type BlockCta = null | { label: string; url: string; isExternal: boolean; variant: string | null;}
|
|
27
|
+
|
|
28
|
+
export type BlockType = "hero" | "richtext" | "faq" | "stats" | "testimonial" | "cta" | "feature_list" | "gallery" | "page_embed" | "profile_embed" | "doctor_embed" | "specialty_embed"
|
|
29
|
+
|
|
24
30
|
export type BlogAuthor = { firstName: string | null; lastName: string | null; avatarUrl: string | null;}
|
|
25
31
|
|
|
26
32
|
export type BlogAuthorDetail = { id: string; firstName: string | null; lastName: string | null; avatarUrl: string | null;}
|
|
@@ -83,11 +89,13 @@ export type LegacyPageType = "SERVICE" | "CUSTOM"
|
|
|
83
89
|
|
|
84
90
|
export type Legal = { privacyPolicy: string | null; termsAndConditions: string | null; cookiePolicy: string | null;}
|
|
85
91
|
|
|
92
|
+
export type PageBlock = { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "hero"; data: { title: string; subtitle?: string | undefined; imageUrl?: string | undefined; ctaSlot?: string | undefined; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "richtext"; data: { html: string; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "faq"; data: { items: { q: string; a: string; }[]; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "stats"; data: { items: { label: string; value: string; }[]; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "testimonial"; data: { quote: string; author: string; role?: string | undefined; avatarUrl?: string | undefined; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "cta"; data: { slot: string; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "feature_list"; data: { items: { text: string; icon?: string | undefined; }[]; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "gallery"; data: { images: { url: string; alt?: string | undefined; caption?: string | undefined; }[]; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "page_embed"; data: { pageSlug: string; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "profile_embed"; data: { pageSlug: string; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "doctor_embed"; data: { pageSlug: string; };} | { id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; blockType: "specialty_embed"; data: { pageSlug: string; };}
|
|
93
|
+
|
|
86
94
|
export type PageCategoryRef = { name: string; slug: string;}
|
|
87
95
|
|
|
88
96
|
export type PageContentMode = "BLOCKS" | "HTML"
|
|
89
97
|
|
|
90
|
-
export type PageDetail = { slug: string; title: string; subtitle: string | null; excerpt: string | null; coverImageUrl: string | null; type: "SERVICE" | "CUSTOM"; pageType: "custom" | "service" | "treatments" | "specialties" | "team" | "generic"; contentMode: "BLOCKS" | "HTML"; customHtml: string | null; seoTitle: string | null; seoDescription: string | null; category: { name: string; slug: string; } | null; sections: { id: string; order: number; heading: string | null; contentHtml: string; layout: "TEXT" | "TEXT_IMAGE" | "IMAGE_TEXT" | "IMAGE_FULL" | "FEATURE_LIST" | "GALLERY" | "CTA_BLOCK"; backgroundColor: string | null; features: unknown; ctaLabel: string | null; ctaUrl: string | null; ctaIsExternal: boolean; ctaVariant: string | null; images: { url: string; alt: string; caption: string | null; order: number; }[]; }[]; blocks: ({ id: string; order: number; } & ({ blockType: "hero"; data: { title: string; subtitle?: string | undefined; imageUrl?: string | undefined; ctaSlot?: string | undefined; }; } | { blockType: "richtext"; data: { html: string; }; } | { blockType: "faq"; data: { items: { q: string; a: string; }[]; }; } | { blockType: "stats"; data: { items: { label: string; value: string; }[]; }; } | { blockType: "testimonial"; data: { quote: string; author: string; role?: string | undefined; avatarUrl?: string | undefined; }; } | { blockType: "cta"; data: { slot: string; }; } | { blockType: "feature_list"; data: { items: { text: string; icon?: string | undefined; }[]; }; } | { blockType: "gallery"; data: { images: { url: string; alt?: string | undefined; caption?: string | undefined; }[]; }; } | { blockType: "doctor_embed"; data: { pageSlug: string; }; } | { blockType: "specialty_embed"; data: { pageSlug: string; }; }))[]; jsonLd: unknown; professional: { role: string | null; socialLinks: { platform: "linkedin" | "twitter" | "facebook" | "instagram" | "website" | "other"; url: string; }[]; cv: { education: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; experience: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; certifications: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; memberships: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; languages: { language: string; level: "basic" | "conversational" | "fluent" | "native" | null; }[]; } | null; } | null;}
|
|
98
|
+
export type PageDetail = { slug: string; title: string; subtitle: string | null; excerpt: string | null; coverImageUrl: string | null; type: "SERVICE" | "CUSTOM"; pageType: "custom" | "service" | "treatments" | "specialties" | "team" | "generic"; contentMode: "BLOCKS" | "HTML"; customHtml: string | null; seoTitle: string | null; seoDescription: string | null; category: { name: string; slug: string; } | null; sections: { id: string; order: number; heading: string | null; contentHtml: string; layout: "TEXT" | "TEXT_IMAGE" | "IMAGE_TEXT" | "IMAGE_FULL" | "FEATURE_LIST" | "GALLERY" | "CTA_BLOCK"; backgroundColor: string | null; features: unknown; ctaLabel: string | null; ctaUrl: string | null; ctaIsExternal: boolean; ctaVariant: string | null; images: { url: string; alt: string; caption: string | null; order: number; }[]; }[]; blocks: ({ id: string; order: number; heading?: string | null | undefined; backgroundColor?: string | null | undefined; cta?: { label: string; url: string; isExternal: boolean; variant: string | null; } | null | undefined; resolved?: { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null; } | null | undefined; } & ({ blockType: "hero"; data: { title: string; subtitle?: string | undefined; imageUrl?: string | undefined; ctaSlot?: string | undefined; }; } | { blockType: "richtext"; data: { html: string; }; } | { blockType: "faq"; data: { items: { q: string; a: string; }[]; }; } | { blockType: "stats"; data: { items: { label: string; value: string; }[]; }; } | { blockType: "testimonial"; data: { quote: string; author: string; role?: string | undefined; avatarUrl?: string | undefined; }; } | { blockType: "cta"; data: { slot: string; }; } | { blockType: "feature_list"; data: { items: { text: string; icon?: string | undefined; }[]; }; } | { blockType: "gallery"; data: { images: { url: string; alt?: string | undefined; caption?: string | undefined; }[]; }; } | { blockType: "page_embed"; data: { pageSlug: string; }; } | { blockType: "profile_embed"; data: { pageSlug: string; }; } | { blockType: "doctor_embed"; data: { pageSlug: string; }; } | { blockType: "specialty_embed"; data: { pageSlug: string; }; }))[]; jsonLd: unknown; professional: { role: string | null; socialLinks: { platform: "linkedin" | "twitter" | "facebook" | "instagram" | "website" | "other"; url: string; }[]; cv: { education: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; experience: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; certifications: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; memberships: { id: string; title: string; organization: string | null; startYear: number | null; endYear: number | null; description: string | null; }[]; languages: { language: string; level: "basic" | "conversational" | "fluent" | "native" | null; }[]; } | null; } | null;}
|
|
91
99
|
|
|
92
100
|
export type PageListItem = { slug: string; title: string; subtitle: string | null; excerpt: string | null; coverImageUrl: string | null; type: "SERVICE" | "CUSTOM"; pageType: "custom" | "service" | "treatments" | "specialties" | "team" | "generic"; order: number; seoTitle: string | null; seoDescription: string | null; category: { name: string; slug: string; } | null; professional: { role: string | null; } | null;}
|
|
93
101
|
|
|
@@ -121,6 +129,8 @@ export type ProfessionalSocialPlatform = "linkedin" | "twitter" | "facebook" | "
|
|
|
121
129
|
|
|
122
130
|
export type ProfessionalSummary = { role: string | null;}
|
|
123
131
|
|
|
132
|
+
export type ResolvedEmbed = { slug: string; title: string; excerpt: string | null; coverImageUrl: string | null; role: string | null;}
|
|
133
|
+
|
|
124
134
|
export type SectionLayout = "TEXT" | "TEXT_IMAGE" | "IMAGE_TEXT" | "IMAGE_FULL" | "FEATURE_LIST" | "GALLERY" | "CTA_BLOCK"
|
|
125
135
|
|
|
126
136
|
export type ShopAddressInput = { firstName: string; lastName: string; street: string; city: string; postalCode: string; region?: string | undefined; country?: string | undefined; phone?: string | null | undefined;}
|
package/package.json
CHANGED