@reblu/site-contracts 0.1.0 → 0.1.2

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/index.cjs ADDED
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=index.cjs.map
4
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,142 @@
1
+ /**
2
+ * GENERATED by scripts/generate-dts.ts — DO NOT EDIT.
3
+ * Flattened structural types for the Reblu SITE API (REB-414).
4
+ * Source of truth: apps/base-api/src/lib/contracts/*.contract.ts.
5
+ */
6
+ export type Analytics = { gaId: string | null; clarityId: string | null; recaptchaSiteKey: string | null; contactFormMode: "DISABLED" | "DB_ONLY" | "WEBHOOK" | "RESEND"; metaPixelId: string | null; metaVerificationContent: string | null; googleVerificationContent: string | null;}
7
+
8
+ export type BlogAuthor = { firstName: string | null; lastName: string | null; avatarUrl: string | null;}
9
+
10
+ export type BlogAuthorDetail = { id: string; firstName: string | null; lastName: string | null; avatarUrl: string | null;}
11
+
12
+ export type BlogCategory = { id: string; name: string; slug: string; color: string;}
13
+
14
+ export type BlogCategoryWithCount = { id: string; name: string; slug: string; color: string; _count: { posts: number; };}
15
+
16
+ export type BlogPostDetail = { id: string; slug: string; title: string; content: string; excerpt: string | null; featuredImageUrl: string | null; publishedAt: string | null; updatedAt: string; metaTitle: string | null; metaDescription: string | null; author: { id: string; firstName: string | null; lastName: string | null; avatarUrl: string | null; }; category: { id: string; name: string; slug: string; color: string; } | null; postTags: { id: string; name: string; slug: string; color: string; }[];}
17
+
18
+ export type BlogPostListItem = { id: string; slug: string; title: string; excerpt: string | null; featuredImageUrl: string | null; publishedAt: string | null; author: { firstName: string | null; lastName: string | null; avatarUrl: string | null; }; category: { id: string; name: string; slug: string; color: string; } | null; postTags: { id: string; name: string; slug: string; color: string; }[];}
19
+
20
+ export type BlogPostPreview = { id: string; slug: string; title: string; content: string; excerpt: string | null; featuredImageUrl: string | null; publishedAt: string | null; updatedAt: string; metaTitle: string | null; metaDescription: string | null; author: { id: string; firstName: string | null; lastName: string | null; avatarUrl: string | null; }; category: { id: string; name: string; slug: string; color: string; } | null; postTags: { id: string; name: string; slug: string; color: string; }[]; status: "DRAFT" | "PUBLISHED" | "ARCHIVED"; published: boolean;}
21
+
22
+ export type BlogSlug = { slug: string; updatedAt: string;}
23
+
24
+ export type BlogTag = { id: string; name: string; slug: string; color: string;}
25
+
26
+ export type Config = { siteName: string; siteDescription: string | null; language: string | null; contactEmail: string | null; keywords: string[]; businessType: string | null; isSetupComplete: boolean; logoLightExpandedUrl: string | null; logoDarkExpandedUrl: string | null; logoLightSmallUrl: string | null; logoDarkSmallUrl: string | null; ogImageUrl: string | null; owner: { name: string | null; email: string | null; jobTitle: string | null; }; business: { name: string | null; }; address: { street: string | null; city: string | null; region: string | null; postalCode: string | null; country: string | null; telephone: string | null; lat: number | null; lng: number | null; } | null; social: { linkedin: string | null; twitter: string | null; facebook: string | null; instagram: string | null; youtube: string | null; } | null; metadata: unknown; contactFormMode: "DISABLED" | "DB_ONLY" | "WEBHOOK" | "RESEND"; features: Record<string, unknown>;}
27
+
28
+ export type ConfigAddress = { street: string | null; city: string | null; region: string | null; postalCode: string | null; country: string | null; telephone: string | null; lat: number | null; lng: number | null;}
29
+
30
+ export type ConfigSocial = { linkedin: string | null; twitter: string | null; facebook: string | null; instagram: string | null; youtube: string | null;}
31
+
32
+ export type ContactFormInput = { name: string; surname: string; email: string; phone: string; businessName: string; message: string; agreement: boolean; captcha: string; metadata: { fromPage: string; timestamp: string; currentUrl: string; leadSource: { platform: string; }; };}
33
+
34
+ export type ContactFormMode = "DISABLED" | "DB_ONLY" | "WEBHOOK" | "RESEND"
35
+
36
+ export type ContactFormSubmission = { id: string; createdAt: string;}
37
+
38
+ export type Cta = { id: string; slot: "hero" | "blog-end" | "services" | "contact" | "sticky-mobile" | "footer"; label: string; href: string; sortOrder: number; abVariant: string | null; analyticsId: string;}
39
+
40
+ export type CustomFieldDefinition = { id: string; entityType: "page" | "product"; key: string; label: string; valueType: "boolean" | "text" | "select" | "multiselect"; options: { value: string; label: string; }[]; isFilterable: boolean; showInDetail: boolean; unit: string | null; sortOrder: number;}
41
+
42
+ export type CustomFieldEntityType = "page" | "product"
43
+
44
+ export type CustomFieldOption = { value: string; label: string;}
45
+
46
+ export type CustomFieldValueType = "boolean" | "text" | "select" | "multiselect"
47
+
48
+ export type LeadInput = { name: string; email?: string | undefined; phone?: string | undefined; businessName?: string | undefined; message?: string | undefined; source?: string | undefined; metadata?: Record<string, unknown> | undefined;}
49
+
50
+ export type LeadSubmission = { id: string; createdAt: string;}
51
+
52
+ export type LegacyPageType = "SERVICE" | "CUSTOM"
53
+
54
+ export type Legal = { privacyPolicy: string | null; termsAndConditions: string | null; cookiePolicy: string | null;}
55
+
56
+ export type PageCategoryRef = { name: string; slug: string;}
57
+
58
+ export type PageContentMode = "BLOCKS" | "HTML"
59
+
60
+ 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;}
61
+
62
+ 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;}
63
+
64
+ export type PageSection = { 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; }[];}
65
+
66
+ export type PageSectionImage = { url: string; alt: string; caption: string | null; order: number;}
67
+
68
+ export type PageSlug = { slug: string; type: "SERVICE" | "CUSTOM"; updatedAt: string;}
69
+
70
+ export type PageType = "custom" | "service" | "treatments" | "specialties" | "team" | "generic"
71
+
72
+ export type PaginationMeta = { total?: number | undefined; page?: number | undefined; limit?: number | undefined; pages?: number | undefined;}
73
+
74
+ export type ProductType = "SERVICE" | "PHYSICAL" | "DIGITAL" | "SERVICE_B2B" | "BUNDLE"
75
+
76
+ export type SectionLayout = "TEXT" | "TEXT_IMAGE" | "IMAGE_TEXT" | "IMAGE_FULL" | "FEATURE_LIST" | "GALLERY" | "CTA_BLOCK"
77
+
78
+ export type ShopAddressInput = { firstName: string; lastName: string; street: string; city: string; postalCode: string; region?: string | undefined; country?: string | undefined; phone?: string | undefined;}
79
+
80
+ export type ShopApplyDiscountInput = { code: string; orderSubtotal: number; customerEmail?: string | undefined;}
81
+
82
+ export type ShopBillingInput = { billingName: string; billingNif?: string | undefined; billingEmail?: string | undefined; billingAddress?: { firstName: string; lastName: string; street: string; city: string; postalCode: string; region?: string | undefined; country?: string | undefined; phone?: string | undefined; } | undefined;}
83
+
84
+ export type ShopBundleComponent = { quantity: number; component: { id: string; name: string; slug: string; price: number; };}
85
+
86
+ export type ShopCartItemInput = { productId: string; quantity: number; variantId?: string | null | undefined;}
87
+
88
+ export type ShopCartValidation = { valid: boolean; errors: { productId: string; productName: string; type: "not_found" | "inactive" | "out_of_stock" | "insufficient_stock" | "price_changed" | "empty_cart"; message: string; suggestedAction: "remove" | "update_quantity"; variantId?: string | null | undefined; newQuantity?: number | undefined; }[]; items: { productId: string; name: string; unitPrice: number; quantity: number; maxStock: number | null; variantId?: string | null | undefined; variantName?: string | undefined; imageUrl?: string | undefined; }[];}
89
+
90
+ export type ShopCartValidationError = { productId: string; productName: string; type: "not_found" | "inactive" | "out_of_stock" | "insufficient_stock" | "price_changed" | "empty_cart"; message: string; suggestedAction: "remove" | "update_quantity"; variantId?: string | null | undefined; newQuantity?: number | undefined;}
91
+
92
+ export type ShopCartValidationItem = { productId: string; name: string; unitPrice: number; quantity: number; maxStock: number | null; variantId?: string | null | undefined; variantName?: string | undefined; imageUrl?: string | undefined;}
93
+
94
+ export type ShopCategory = { id: string; name: string; slug: string; description: string | null; imageUrl: string | null; parentId: string | null; sortOrder: number;}
95
+
96
+ export type ShopCheckEmailInput = { email: string;}
97
+
98
+ export type ShopCheckoutInput = { items: { productId: string; quantity: number; variantId?: string | null | undefined; }[]; customerEmail: string; customerName: string; successUrl: string; cancelUrl: string; customerPhone?: string | undefined; discountCode?: string | undefined; shippingAddress?: { firstName: string; lastName: string; street: string; city: string; postalCode: string; region?: string | undefined; country?: string | undefined; phone?: string | undefined; } | undefined; billing?: { billingName: string; billingNif?: string | undefined; billingEmail?: string | undefined; billingAddress?: { firstName: string; lastName: string; street: string; city: string; postalCode: string; region?: string | undefined; country?: string | undefined; phone?: string | undefined; } | undefined; } | undefined;}
99
+
100
+ export type ShopCheckoutSession = { url: string; sessionId: string;}
101
+
102
+ export type ShopConfig = { shopName: string | null; defaultLowStockThreshold: number; currencyCode: string; stripePublishableKey: string | null; stripeTestPublishableKey: string | null; stripeTestMode: boolean; shippingEnabled: boolean; pickupEnabled: boolean; taxEnabled: boolean; taxIncludedInPrice: boolean;}
103
+
104
+ export type ShopDiscountApplication = { valid: boolean; discount: number; type: "PERCENTAGE" | "FIXED" | null; code: string | null; error?: string | undefined;}
105
+
106
+ export type ShopEmailCheck = { exists: boolean;}
107
+
108
+ export type ShopFacets = { taxonomies: { key: string; label: string; showAsBadge: boolean; terms: { slug: string; name: string; count: number; }[]; }[]; attributes: { key: string; label: string; valueType: "boolean" | "text" | "select" | "multiselect"; options: { value: string; label: string; count: number; }[]; }[]; price: { min: number; max: number; }; onSale: { count: number; };}
109
+
110
+ export type ShopInventoryRef = { stockQuantity: number; reservedQuantity: number; lowStockThreshold: number | null;}
111
+
112
+ export type ShopProductAttributes = unknown
113
+
114
+ export type ShopProductCategoryRef = { id: string; name: string; slug: string;}
115
+
116
+ export type ShopProductDetail = { id: string; slug: string; name: string; description: string | null; shortDescription: string | null; price: number; comparePrice: number | null; type: "SERVICE" | "PHYSICAL" | "DIGITAL" | "SERVICE_B2B" | "BUNDLE"; isActive: boolean; sku: string | null; trackStock: boolean; weightGrams: number | null; freeShipping: boolean; metaTitle: string | null; metaDescription: string | null; category: { id: string; name: string; slug: string; } | null; taxRate: { rate: number; type: "IVA" | "IGIC" | "RETENTION" | "OTHER"; isExempt: boolean; } | null; retentionRate: { rate: number; type: "IVA" | "IGIC" | "RETENTION" | "OTHER"; isExempt: boolean; } | null; variants: { id: string; name: string; sku: string | null; price: number | null; attributes: unknown; isActive: boolean; sortOrder: number; }[]; images: { url: string; alt: string | null; isPrimary: boolean; sortOrder: number; }[]; videos: { url: string; title: string | null; isExternal: boolean; thumbnailUrl: string | null; sortOrder: number; }[]; bundleComponents: { quantity: number; component: { id: string; name: string; slug: string; price: number; }; }[]; related: { id: string; slug: string; name: string; price: number; comparePrice: number | null; images: { url: string; alt: string | null; isPrimary: boolean; sortOrder: number; }[]; }[]; taxonomyTerms: { taxonomyKey: string; taxonomyLabel: string; showAsBadge: boolean; slug: string; name: string; imageUrl: string | null; }[]; attributes: unknown; attributeDefinitions: { id: string; entityType: "page" | "product"; key: string; label: string; valueType: "boolean" | "text" | "select" | "multiselect"; options: { value: string; label: string; }[]; isFilterable: boolean; showInDetail: boolean; unit: string | null; sortOrder: number; }[];}
117
+
118
+ export type ShopProductImage = { url: string; alt: string | null; isPrimary: boolean; sortOrder: number;}
119
+
120
+ export type ShopProductListItem = { id: string; slug: string; name: string; shortDescription: string | null; price: number; comparePrice: number | null; isActive: boolean; type: "SERVICE" | "PHYSICAL" | "DIGITAL" | "SERVICE_B2B" | "BUNDLE"; category: { id: string; name: string; slug: string; } | null; taxRate: { rate: number; type: "IVA" | "IGIC" | "RETENTION" | "OTHER"; isExempt: boolean; } | null; inventory: { stockQuantity: number; reservedQuantity: number; lowStockThreshold: number | null; } | null; images: { url: string; alt: string | null; isPrimary: boolean; sortOrder: number; }[]; taxonomyTerms: { taxonomyKey: string; taxonomyLabel: string; showAsBadge: boolean; slug: string; name: string; imageUrl: string | null; }[]; attributes: unknown;}
121
+
122
+ export type ShopProductListParams = { page?: number | undefined; limit?: number | undefined; q?: string | undefined; sort?: "price_asc" | "price_desc" | "newest" | "on_sale" | undefined; category?: string | undefined; priceMin?: number | undefined; priceMax?: number | undefined; onSale?: boolean | undefined; taxonomy?: Record<string, string> | undefined; attr?: Record<string, string | string[]> | undefined;}
123
+
124
+ export type ShopProductVariant = { id: string; name: string; sku: string | null; price: number | null; attributes: unknown; isActive: boolean; sortOrder: number;}
125
+
126
+ export type ShopProductVideo = { url: string; title: string | null; isExternal: boolean; thumbnailUrl: string | null; sortOrder: number;}
127
+
128
+ export type ShopRelatedProduct = { id: string; slug: string; name: string; price: number; comparePrice: number | null; images: { url: string; alt: string | null; isPrimary: boolean; sortOrder: number; }[];}
129
+
130
+ export type ShopSort = "price_asc" | "price_desc" | "newest" | "on_sale"
131
+
132
+ export type ShopTaxRateRef = { rate: number; type: "IVA" | "IGIC" | "RETENTION" | "OTHER"; isExempt: boolean;}
133
+
134
+ export type ShopTaxonomyTermRef = { taxonomyKey: string; taxonomyLabel: string; showAsBadge: boolean; slug: string; name: string; imageUrl: string | null;}
135
+
136
+ export type ShopValidateCartInput = { items: { productId: string; quantity: number; variantId?: string | null | undefined; }[];}
137
+
138
+ export type TaxType = "IVA" | "IGIC" | "RETENTION" | "OTHER"
139
+
140
+ export type TrustBadge = { id: string; name: string; logoUrl: string | null; url: string | null; type: "PARTNER" | "INSURANCE" | "SUBVENTION" | "CERTIFICATION" | "AWARD"; sortOrder: number;}
141
+
142
+ export type TrustBadgeType = "PARTNER" | "INSURANCE" | "SUBVENTION" | "CERTIFICATION" | "AWARD"
@@ -0,0 +1,142 @@
1
+ /**
2
+ * GENERATED by scripts/generate-dts.ts — DO NOT EDIT.
3
+ * Flattened structural types for the Reblu SITE API (REB-414).
4
+ * Source of truth: apps/base-api/src/lib/contracts/*.contract.ts.
5
+ */
6
+ export type Analytics = { gaId: string | null; clarityId: string | null; recaptchaSiteKey: string | null; contactFormMode: "DISABLED" | "DB_ONLY" | "WEBHOOK" | "RESEND"; metaPixelId: string | null; metaVerificationContent: string | null; googleVerificationContent: string | null;}
7
+
8
+ export type BlogAuthor = { firstName: string | null; lastName: string | null; avatarUrl: string | null;}
9
+
10
+ export type BlogAuthorDetail = { id: string; firstName: string | null; lastName: string | null; avatarUrl: string | null;}
11
+
12
+ export type BlogCategory = { id: string; name: string; slug: string; color: string;}
13
+
14
+ export type BlogCategoryWithCount = { id: string; name: string; slug: string; color: string; _count: { posts: number; };}
15
+
16
+ export type BlogPostDetail = { id: string; slug: string; title: string; content: string; excerpt: string | null; featuredImageUrl: string | null; publishedAt: string | null; updatedAt: string; metaTitle: string | null; metaDescription: string | null; author: { id: string; firstName: string | null; lastName: string | null; avatarUrl: string | null; }; category: { id: string; name: string; slug: string; color: string; } | null; postTags: { id: string; name: string; slug: string; color: string; }[];}
17
+
18
+ export type BlogPostListItem = { id: string; slug: string; title: string; excerpt: string | null; featuredImageUrl: string | null; publishedAt: string | null; author: { firstName: string | null; lastName: string | null; avatarUrl: string | null; }; category: { id: string; name: string; slug: string; color: string; } | null; postTags: { id: string; name: string; slug: string; color: string; }[];}
19
+
20
+ export type BlogPostPreview = { id: string; slug: string; title: string; content: string; excerpt: string | null; featuredImageUrl: string | null; publishedAt: string | null; updatedAt: string; metaTitle: string | null; metaDescription: string | null; author: { id: string; firstName: string | null; lastName: string | null; avatarUrl: string | null; }; category: { id: string; name: string; slug: string; color: string; } | null; postTags: { id: string; name: string; slug: string; color: string; }[]; status: "DRAFT" | "PUBLISHED" | "ARCHIVED"; published: boolean;}
21
+
22
+ export type BlogSlug = { slug: string; updatedAt: string;}
23
+
24
+ export type BlogTag = { id: string; name: string; slug: string; color: string;}
25
+
26
+ export type Config = { siteName: string; siteDescription: string | null; language: string | null; contactEmail: string | null; keywords: string[]; businessType: string | null; isSetupComplete: boolean; logoLightExpandedUrl: string | null; logoDarkExpandedUrl: string | null; logoLightSmallUrl: string | null; logoDarkSmallUrl: string | null; ogImageUrl: string | null; owner: { name: string | null; email: string | null; jobTitle: string | null; }; business: { name: string | null; }; address: { street: string | null; city: string | null; region: string | null; postalCode: string | null; country: string | null; telephone: string | null; lat: number | null; lng: number | null; } | null; social: { linkedin: string | null; twitter: string | null; facebook: string | null; instagram: string | null; youtube: string | null; } | null; metadata: unknown; contactFormMode: "DISABLED" | "DB_ONLY" | "WEBHOOK" | "RESEND"; features: Record<string, unknown>;}
27
+
28
+ export type ConfigAddress = { street: string | null; city: string | null; region: string | null; postalCode: string | null; country: string | null; telephone: string | null; lat: number | null; lng: number | null;}
29
+
30
+ export type ConfigSocial = { linkedin: string | null; twitter: string | null; facebook: string | null; instagram: string | null; youtube: string | null;}
31
+
32
+ export type ContactFormInput = { name: string; surname: string; email: string; phone: string; businessName: string; message: string; agreement: boolean; captcha: string; metadata: { fromPage: string; timestamp: string; currentUrl: string; leadSource: { platform: string; }; };}
33
+
34
+ export type ContactFormMode = "DISABLED" | "DB_ONLY" | "WEBHOOK" | "RESEND"
35
+
36
+ export type ContactFormSubmission = { id: string; createdAt: string;}
37
+
38
+ export type Cta = { id: string; slot: "hero" | "blog-end" | "services" | "contact" | "sticky-mobile" | "footer"; label: string; href: string; sortOrder: number; abVariant: string | null; analyticsId: string;}
39
+
40
+ export type CustomFieldDefinition = { id: string; entityType: "page" | "product"; key: string; label: string; valueType: "boolean" | "text" | "select" | "multiselect"; options: { value: string; label: string; }[]; isFilterable: boolean; showInDetail: boolean; unit: string | null; sortOrder: number;}
41
+
42
+ export type CustomFieldEntityType = "page" | "product"
43
+
44
+ export type CustomFieldOption = { value: string; label: string;}
45
+
46
+ export type CustomFieldValueType = "boolean" | "text" | "select" | "multiselect"
47
+
48
+ export type LeadInput = { name: string; email?: string | undefined; phone?: string | undefined; businessName?: string | undefined; message?: string | undefined; source?: string | undefined; metadata?: Record<string, unknown> | undefined;}
49
+
50
+ export type LeadSubmission = { id: string; createdAt: string;}
51
+
52
+ export type LegacyPageType = "SERVICE" | "CUSTOM"
53
+
54
+ export type Legal = { privacyPolicy: string | null; termsAndConditions: string | null; cookiePolicy: string | null;}
55
+
56
+ export type PageCategoryRef = { name: string; slug: string;}
57
+
58
+ export type PageContentMode = "BLOCKS" | "HTML"
59
+
60
+ 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;}
61
+
62
+ 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;}
63
+
64
+ export type PageSection = { 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; }[];}
65
+
66
+ export type PageSectionImage = { url: string; alt: string; caption: string | null; order: number;}
67
+
68
+ export type PageSlug = { slug: string; type: "SERVICE" | "CUSTOM"; updatedAt: string;}
69
+
70
+ export type PageType = "custom" | "service" | "treatments" | "specialties" | "team" | "generic"
71
+
72
+ export type PaginationMeta = { total?: number | undefined; page?: number | undefined; limit?: number | undefined; pages?: number | undefined;}
73
+
74
+ export type ProductType = "SERVICE" | "PHYSICAL" | "DIGITAL" | "SERVICE_B2B" | "BUNDLE"
75
+
76
+ export type SectionLayout = "TEXT" | "TEXT_IMAGE" | "IMAGE_TEXT" | "IMAGE_FULL" | "FEATURE_LIST" | "GALLERY" | "CTA_BLOCK"
77
+
78
+ export type ShopAddressInput = { firstName: string; lastName: string; street: string; city: string; postalCode: string; region?: string | undefined; country?: string | undefined; phone?: string | undefined;}
79
+
80
+ export type ShopApplyDiscountInput = { code: string; orderSubtotal: number; customerEmail?: string | undefined;}
81
+
82
+ export type ShopBillingInput = { billingName: string; billingNif?: string | undefined; billingEmail?: string | undefined; billingAddress?: { firstName: string; lastName: string; street: string; city: string; postalCode: string; region?: string | undefined; country?: string | undefined; phone?: string | undefined; } | undefined;}
83
+
84
+ export type ShopBundleComponent = { quantity: number; component: { id: string; name: string; slug: string; price: number; };}
85
+
86
+ export type ShopCartItemInput = { productId: string; quantity: number; variantId?: string | null | undefined;}
87
+
88
+ export type ShopCartValidation = { valid: boolean; errors: { productId: string; productName: string; type: "not_found" | "inactive" | "out_of_stock" | "insufficient_stock" | "price_changed" | "empty_cart"; message: string; suggestedAction: "remove" | "update_quantity"; variantId?: string | null | undefined; newQuantity?: number | undefined; }[]; items: { productId: string; name: string; unitPrice: number; quantity: number; maxStock: number | null; variantId?: string | null | undefined; variantName?: string | undefined; imageUrl?: string | undefined; }[];}
89
+
90
+ export type ShopCartValidationError = { productId: string; productName: string; type: "not_found" | "inactive" | "out_of_stock" | "insufficient_stock" | "price_changed" | "empty_cart"; message: string; suggestedAction: "remove" | "update_quantity"; variantId?: string | null | undefined; newQuantity?: number | undefined;}
91
+
92
+ export type ShopCartValidationItem = { productId: string; name: string; unitPrice: number; quantity: number; maxStock: number | null; variantId?: string | null | undefined; variantName?: string | undefined; imageUrl?: string | undefined;}
93
+
94
+ export type ShopCategory = { id: string; name: string; slug: string; description: string | null; imageUrl: string | null; parentId: string | null; sortOrder: number;}
95
+
96
+ export type ShopCheckEmailInput = { email: string;}
97
+
98
+ export type ShopCheckoutInput = { items: { productId: string; quantity: number; variantId?: string | null | undefined; }[]; customerEmail: string; customerName: string; successUrl: string; cancelUrl: string; customerPhone?: string | undefined; discountCode?: string | undefined; shippingAddress?: { firstName: string; lastName: string; street: string; city: string; postalCode: string; region?: string | undefined; country?: string | undefined; phone?: string | undefined; } | undefined; billing?: { billingName: string; billingNif?: string | undefined; billingEmail?: string | undefined; billingAddress?: { firstName: string; lastName: string; street: string; city: string; postalCode: string; region?: string | undefined; country?: string | undefined; phone?: string | undefined; } | undefined; } | undefined;}
99
+
100
+ export type ShopCheckoutSession = { url: string; sessionId: string;}
101
+
102
+ export type ShopConfig = { shopName: string | null; defaultLowStockThreshold: number; currencyCode: string; stripePublishableKey: string | null; stripeTestPublishableKey: string | null; stripeTestMode: boolean; shippingEnabled: boolean; pickupEnabled: boolean; taxEnabled: boolean; taxIncludedInPrice: boolean;}
103
+
104
+ export type ShopDiscountApplication = { valid: boolean; discount: number; type: "PERCENTAGE" | "FIXED" | null; code: string | null; error?: string | undefined;}
105
+
106
+ export type ShopEmailCheck = { exists: boolean;}
107
+
108
+ export type ShopFacets = { taxonomies: { key: string; label: string; showAsBadge: boolean; terms: { slug: string; name: string; count: number; }[]; }[]; attributes: { key: string; label: string; valueType: "boolean" | "text" | "select" | "multiselect"; options: { value: string; label: string; count: number; }[]; }[]; price: { min: number; max: number; }; onSale: { count: number; };}
109
+
110
+ export type ShopInventoryRef = { stockQuantity: number; reservedQuantity: number; lowStockThreshold: number | null;}
111
+
112
+ export type ShopProductAttributes = unknown
113
+
114
+ export type ShopProductCategoryRef = { id: string; name: string; slug: string;}
115
+
116
+ export type ShopProductDetail = { id: string; slug: string; name: string; description: string | null; shortDescription: string | null; price: number; comparePrice: number | null; type: "SERVICE" | "PHYSICAL" | "DIGITAL" | "SERVICE_B2B" | "BUNDLE"; isActive: boolean; sku: string | null; trackStock: boolean; weightGrams: number | null; freeShipping: boolean; metaTitle: string | null; metaDescription: string | null; category: { id: string; name: string; slug: string; } | null; taxRate: { rate: number; type: "IVA" | "IGIC" | "RETENTION" | "OTHER"; isExempt: boolean; } | null; retentionRate: { rate: number; type: "IVA" | "IGIC" | "RETENTION" | "OTHER"; isExempt: boolean; } | null; variants: { id: string; name: string; sku: string | null; price: number | null; attributes: unknown; isActive: boolean; sortOrder: number; }[]; images: { url: string; alt: string | null; isPrimary: boolean; sortOrder: number; }[]; videos: { url: string; title: string | null; isExternal: boolean; thumbnailUrl: string | null; sortOrder: number; }[]; bundleComponents: { quantity: number; component: { id: string; name: string; slug: string; price: number; }; }[]; related: { id: string; slug: string; name: string; price: number; comparePrice: number | null; images: { url: string; alt: string | null; isPrimary: boolean; sortOrder: number; }[]; }[]; taxonomyTerms: { taxonomyKey: string; taxonomyLabel: string; showAsBadge: boolean; slug: string; name: string; imageUrl: string | null; }[]; attributes: unknown; attributeDefinitions: { id: string; entityType: "page" | "product"; key: string; label: string; valueType: "boolean" | "text" | "select" | "multiselect"; options: { value: string; label: string; }[]; isFilterable: boolean; showInDetail: boolean; unit: string | null; sortOrder: number; }[];}
117
+
118
+ export type ShopProductImage = { url: string; alt: string | null; isPrimary: boolean; sortOrder: number;}
119
+
120
+ export type ShopProductListItem = { id: string; slug: string; name: string; shortDescription: string | null; price: number; comparePrice: number | null; isActive: boolean; type: "SERVICE" | "PHYSICAL" | "DIGITAL" | "SERVICE_B2B" | "BUNDLE"; category: { id: string; name: string; slug: string; } | null; taxRate: { rate: number; type: "IVA" | "IGIC" | "RETENTION" | "OTHER"; isExempt: boolean; } | null; inventory: { stockQuantity: number; reservedQuantity: number; lowStockThreshold: number | null; } | null; images: { url: string; alt: string | null; isPrimary: boolean; sortOrder: number; }[]; taxonomyTerms: { taxonomyKey: string; taxonomyLabel: string; showAsBadge: boolean; slug: string; name: string; imageUrl: string | null; }[]; attributes: unknown;}
121
+
122
+ export type ShopProductListParams = { page?: number | undefined; limit?: number | undefined; q?: string | undefined; sort?: "price_asc" | "price_desc" | "newest" | "on_sale" | undefined; category?: string | undefined; priceMin?: number | undefined; priceMax?: number | undefined; onSale?: boolean | undefined; taxonomy?: Record<string, string> | undefined; attr?: Record<string, string | string[]> | undefined;}
123
+
124
+ export type ShopProductVariant = { id: string; name: string; sku: string | null; price: number | null; attributes: unknown; isActive: boolean; sortOrder: number;}
125
+
126
+ export type ShopProductVideo = { url: string; title: string | null; isExternal: boolean; thumbnailUrl: string | null; sortOrder: number;}
127
+
128
+ export type ShopRelatedProduct = { id: string; slug: string; name: string; price: number; comparePrice: number | null; images: { url: string; alt: string | null; isPrimary: boolean; sortOrder: number; }[];}
129
+
130
+ export type ShopSort = "price_asc" | "price_desc" | "newest" | "on_sale"
131
+
132
+ export type ShopTaxRateRef = { rate: number; type: "IVA" | "IGIC" | "RETENTION" | "OTHER"; isExempt: boolean;}
133
+
134
+ export type ShopTaxonomyTermRef = { taxonomyKey: string; taxonomyLabel: string; showAsBadge: boolean; slug: string; name: string; imageUrl: string | null;}
135
+
136
+ export type ShopValidateCartInput = { items: { productId: string; quantity: number; variantId?: string | null | undefined; }[];}
137
+
138
+ export type TaxType = "IVA" | "IGIC" | "RETENTION" | "OTHER"
139
+
140
+ export type TrustBadge = { id: string; name: string; logoUrl: string | null; url: string | null; type: "PARTNER" | "INSURANCE" | "SUBVENTION" | "CERTIFICATION" | "AWARD"; sortOrder: number;}
141
+
142
+ export type TrustBadgeType = "PARTNER" | "INSURANCE" | "SUBVENTION" | "CERTIFICATION" | "AWARD"
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reblu/site-contracts",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "description": "Public, dependency-free TypeScript types for the Reblu SITE API (types only — no Zod, no Prisma at runtime).",
6
6
  "license": "Apache-2.0",