@sonordev/site-kit 2.8.1 → 2.9.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/blog/index.js +2 -1
- package/dist/blog/index.js.map +1 -1
- package/dist/blog/index.mjs +2 -1
- package/dist/blog/index.mjs.map +1 -1
- package/dist/{chunk-5SQ4NRPH.mjs → chunk-3AEOGV6V.mjs} +6 -4
- package/dist/chunk-3AEOGV6V.mjs.map +1 -0
- package/dist/chunk-662YHKWW.mjs +10 -0
- package/dist/chunk-662YHKWW.mjs.map +1 -0
- package/dist/{chunk-MNOVPHL6.mjs → chunk-72MRAYAS.mjs} +19 -14
- package/dist/chunk-72MRAYAS.mjs.map +1 -0
- package/dist/{chunk-MWE2HRPU.js → chunk-D5XTX5EB.js} +19 -14
- package/dist/chunk-D5XTX5EB.js.map +1 -0
- package/dist/{chunk-AT2ZF3TL.mjs → chunk-FMZOZQBV.mjs} +91 -15
- package/dist/chunk-FMZOZQBV.mjs.map +1 -0
- package/dist/{chunk-ZQINTH5K.js → chunk-I2GTT2DG.js} +91 -15
- package/dist/chunk-I2GTT2DG.js.map +1 -0
- package/dist/{chunk-PKUTYMN7.js → chunk-J25JPU77.js} +2 -2
- package/dist/chunk-J25JPU77.js.map +1 -0
- package/dist/chunk-J7QI3GDX.js +12 -0
- package/dist/chunk-J7QI3GDX.js.map +1 -0
- package/dist/{chunk-L7XPPFSS.mjs → chunk-QDKQZ5XH.mjs} +2 -2
- package/dist/chunk-QDKQZ5XH.mjs.map +1 -0
- package/dist/{chunk-PAF5IGGF.js → chunk-XNUPJC6R.js} +6 -4
- package/dist/chunk-XNUPJC6R.js.map +1 -0
- package/dist/commerce/index.d.mts +3 -3
- package/dist/commerce/index.d.ts +3 -3
- package/dist/commerce/server.d.mts +1 -1
- package/dist/commerce/server.d.ts +1 -1
- package/dist/index.d.mts +5 -191
- package/dist/index.d.ts +5 -191
- package/dist/index.js +13 -13
- package/dist/index.mjs +1 -1
- package/dist/layout/index.js +3 -3
- package/dist/layout/index.mjs +1 -1
- package/dist/llms/index.d.mts +18 -4
- package/dist/llms/index.d.ts +18 -4
- package/dist/llms/index.js +26 -51
- package/dist/llms/index.js.map +1 -1
- package/dist/llms/index.mjs +16 -41
- package/dist/llms/index.mjs.map +1 -1
- package/dist/seo/index.d.mts +10 -205
- package/dist/seo/index.d.ts +10 -205
- package/dist/seo/index.js +16 -15
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/index.mjs +7 -6
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo/server.d.mts +2 -106
- package/dist/seo/server.d.ts +2 -106
- package/dist/seo/server.js +56 -197
- package/dist/seo/server.js.map +1 -1
- package/dist/seo/server.mjs +2 -183
- package/dist/seo/server.mjs.map +1 -1
- package/dist/server-l6LMNvF1.d.ts +360 -0
- package/dist/server-mX5At_6x.d.mts +360 -0
- package/dist/sitemap/index.d.mts +1 -1
- package/dist/sitemap/index.d.ts +1 -1
- package/dist/sitemap/index.js +2 -2
- package/dist/sitemap/index.mjs +1 -1
- package/dist/sync/index.d.mts +213 -0
- package/dist/sync/index.d.ts +213 -0
- package/dist/sync/index.js +13 -13
- package/dist/sync/index.mjs +1 -1
- package/dist/{types-DYyIAgQg.d.ts → types-DPsbBKiu.d.mts} +1 -1
- package/dist/{types-DYyIAgQg.d.mts → types-DPsbBKiu.d.ts} +1 -1
- package/dist/{types-J7Z_FqmV.d.mts → types-DhCAWUmd.d.mts} +8 -0
- package/dist/{types-B0xmgGw-.d.ts → types-iZM4Lz71.d.mts} +1 -1
- package/dist/{types-B0xmgGw-.d.mts → types-iZM4Lz71.d.ts} +1 -1
- package/dist/{types-0NuBL1Gg.d.ts → types-xcP_owwn.d.ts} +8 -0
- package/dist/{useEventModal-CJLCmH5Y.d.ts → useEventModal-CcxNZOvp.d.ts} +2 -2
- package/dist/{useEventModal-4W_y1SYY.d.mts → useEventModal-qJfX_1XG.d.mts} +2 -2
- package/package.json +2 -2
- package/dist/chunk-5SQ4NRPH.mjs.map +0 -1
- package/dist/chunk-AT2ZF3TL.mjs.map +0 -1
- package/dist/chunk-L7XPPFSS.mjs.map +0 -1
- package/dist/chunk-MNOVPHL6.mjs.map +0 -1
- package/dist/chunk-MWE2HRPU.js.map +0 -1
- package/dist/chunk-PAF5IGGF.js.map +0 -1
- package/dist/chunk-PKUTYMN7.js.map +0 -1
- package/dist/chunk-ZQINTH5K.js.map +0 -1
- package/dist/routing-C7gmHWm9.d.ts +0 -163
- package/dist/routing-trNzR1Pz.d.mts +0 -163
package/dist/sitemap/index.d.mts
CHANGED
package/dist/sitemap/index.d.ts
CHANGED
package/dist/sitemap/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkD5XTX5EB_js = require('../chunk-D5XTX5EB.js');
|
|
4
4
|
var chunkJP5WGL75_js = require('../chunk-JP5WGL75.js');
|
|
5
5
|
require('../chunk-ATG4FJY6.js');
|
|
6
6
|
require('../chunk-ZSMWDLMK.js');
|
|
@@ -500,7 +500,7 @@ function createSitemap(config) {
|
|
|
500
500
|
}
|
|
501
501
|
if (config.optimizedLLMsTxt !== false) {
|
|
502
502
|
try {
|
|
503
|
-
const writeResult = await
|
|
503
|
+
const writeResult = await chunkD5XTX5EB_js.writeLLMsTxtToPublic({
|
|
504
504
|
apiUrl,
|
|
505
505
|
apiKey,
|
|
506
506
|
full: config.optimizedLLMsFullTxt ?? false,
|
package/dist/sitemap/index.mjs
CHANGED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sync Module Types - Booking Widget for Client Sites
|
|
5
|
+
*/
|
|
6
|
+
interface BookingType {
|
|
7
|
+
id: string;
|
|
8
|
+
slug: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
duration_minutes: number;
|
|
12
|
+
buffer_before?: number;
|
|
13
|
+
buffer_after?: number;
|
|
14
|
+
color?: string;
|
|
15
|
+
location_type: 'virtual' | 'phone' | 'in_person' | 'custom';
|
|
16
|
+
location_details?: string;
|
|
17
|
+
price_cents?: number;
|
|
18
|
+
currency?: string;
|
|
19
|
+
is_active: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface TimeSlot {
|
|
22
|
+
start: string;
|
|
23
|
+
end: string;
|
|
24
|
+
hostId?: string;
|
|
25
|
+
available: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface Host {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
email?: string;
|
|
31
|
+
avatar?: string;
|
|
32
|
+
title?: string;
|
|
33
|
+
bio?: string;
|
|
34
|
+
}
|
|
35
|
+
interface SlotHold {
|
|
36
|
+
holdId: string;
|
|
37
|
+
expiresAt: string;
|
|
38
|
+
expiresInSeconds: number;
|
|
39
|
+
}
|
|
40
|
+
interface BookingResult {
|
|
41
|
+
success?: boolean;
|
|
42
|
+
/** Top-level confirmation code (matches the API's BookingConfirmation shape). */
|
|
43
|
+
confirmationCode?: string;
|
|
44
|
+
booking: {
|
|
45
|
+
id: string;
|
|
46
|
+
confirmationCode?: string;
|
|
47
|
+
scheduledAt?: string;
|
|
48
|
+
durationMinutes?: number;
|
|
49
|
+
hostName?: string;
|
|
50
|
+
timezone?: string;
|
|
51
|
+
video_link?: string;
|
|
52
|
+
};
|
|
53
|
+
cancelUrl: string;
|
|
54
|
+
rescheduleUrl: string;
|
|
55
|
+
calendarLinks: {
|
|
56
|
+
google: string;
|
|
57
|
+
outlook: string;
|
|
58
|
+
ics: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
interface BookingWidgetProps {
|
|
62
|
+
/** Organization slug – required for public (unauthenticated) mode, optional with apiKey */
|
|
63
|
+
orgSlug?: string;
|
|
64
|
+
/** API key – when provided, uses authenticated /sync/widget/* endpoints (no orgSlug needed) */
|
|
65
|
+
apiKey?: string;
|
|
66
|
+
/** API base URL - defaults to https://api.sonor.io */
|
|
67
|
+
apiUrl?: string;
|
|
68
|
+
/** Specific booking type slug to show (optional - shows all if not provided) */
|
|
69
|
+
bookingTypeSlug?: string;
|
|
70
|
+
/** Guest's timezone (auto-detected if not provided) */
|
|
71
|
+
timezone?: string;
|
|
72
|
+
/** Custom class name for styling */
|
|
73
|
+
className?: string;
|
|
74
|
+
/** Number of days to show availability for */
|
|
75
|
+
daysToShow?: number;
|
|
76
|
+
/** Called when booking is completed */
|
|
77
|
+
onBookingComplete?: (result: BookingResult) => void;
|
|
78
|
+
/** Called when an error occurs */
|
|
79
|
+
onError?: (error: Error) => void;
|
|
80
|
+
/** Hide the booking type selector (for single type embed) */
|
|
81
|
+
hideTypeSelector?: boolean;
|
|
82
|
+
/** Custom styles */
|
|
83
|
+
styles?: {
|
|
84
|
+
primaryColor?: string;
|
|
85
|
+
borderRadius?: string;
|
|
86
|
+
fontFamily?: string;
|
|
87
|
+
/** Dark mode colors */
|
|
88
|
+
backgroundColor?: string;
|
|
89
|
+
surfaceColor?: string;
|
|
90
|
+
elevatedColor?: string;
|
|
91
|
+
textPrimary?: string;
|
|
92
|
+
textSecondary?: string;
|
|
93
|
+
textTertiary?: string;
|
|
94
|
+
borderColor?: string;
|
|
95
|
+
inputBorderColor?: string;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
interface DatePickerProps {
|
|
99
|
+
selectedDate: Date | null;
|
|
100
|
+
onDateSelect: (date: Date) => void;
|
|
101
|
+
availableDates: string[];
|
|
102
|
+
className?: string;
|
|
103
|
+
}
|
|
104
|
+
interface TimeSlotPickerProps {
|
|
105
|
+
slots: TimeSlot[];
|
|
106
|
+
selectedSlot: TimeSlot | null;
|
|
107
|
+
onSlotSelect: (slot: TimeSlot) => void;
|
|
108
|
+
className?: string;
|
|
109
|
+
timezone: string;
|
|
110
|
+
}
|
|
111
|
+
interface BookingFormProps {
|
|
112
|
+
onSubmit: (data: GuestInfo) => Promise<void>;
|
|
113
|
+
isLoading?: boolean;
|
|
114
|
+
className?: string;
|
|
115
|
+
bookingType?: BookingType;
|
|
116
|
+
selectedSlot?: TimeSlot;
|
|
117
|
+
}
|
|
118
|
+
interface GuestInfo {
|
|
119
|
+
name: string;
|
|
120
|
+
email: string;
|
|
121
|
+
phone?: string;
|
|
122
|
+
notes?: string;
|
|
123
|
+
}
|
|
124
|
+
interface SyncWidgetConfig {
|
|
125
|
+
apiUrl: string;
|
|
126
|
+
orgSlug: string;
|
|
127
|
+
timezone: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare function BookingWidget({ orgSlug, apiKey: propApiKey, apiUrl: propApiUrl, bookingTypeSlug, timezone: propTimezone, className, daysToShow, onBookingComplete, onError, hideTypeSelector, styles, }: BookingWidgetProps): react_jsx_runtime.JSX.Element;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Sync API Functions - Client-side API calls for booking widget
|
|
134
|
+
*
|
|
135
|
+
* Two modes:
|
|
136
|
+
* 1. API-key flow (preferred): Uses x-api-key header → /sync/widget/* endpoints.
|
|
137
|
+
* Project is resolved server-side from the key. No orgSlug needed.
|
|
138
|
+
* 2. Public/orgSlug flow (legacy): Uses /sync/public/:org/* endpoints. No auth.
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Fetch booking types.
|
|
143
|
+
* - With apiKey → GET /sync/widget/types
|
|
144
|
+
* - With orgSlug → GET /sync/public/:org/types
|
|
145
|
+
*/
|
|
146
|
+
declare function fetchBookingTypes(orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType[]>;
|
|
147
|
+
/**
|
|
148
|
+
* Fetch booking type details
|
|
149
|
+
*/
|
|
150
|
+
declare function fetchBookingTypeDetails(typeSlug: string, orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType>;
|
|
151
|
+
/**
|
|
152
|
+
* Fetch available time slots for a specific date
|
|
153
|
+
*/
|
|
154
|
+
declare function fetchAvailability(typeSlug: string, date: string, // YYYY-MM-DD format
|
|
155
|
+
orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string, hostId?: string): Promise<TimeSlot[]>;
|
|
156
|
+
/**
|
|
157
|
+
* Hold a time slot temporarily (5-10 minutes)
|
|
158
|
+
*/
|
|
159
|
+
declare function createSlotHold(holdData: {
|
|
160
|
+
bookingType: string;
|
|
161
|
+
slotStart: string;
|
|
162
|
+
slotEnd: string;
|
|
163
|
+
hostId: string;
|
|
164
|
+
sessionId: string;
|
|
165
|
+
guestEmail?: string;
|
|
166
|
+
}, apiUrl?: string, apiKey?: string): Promise<SlotHold>;
|
|
167
|
+
/**
|
|
168
|
+
* Release a slot hold
|
|
169
|
+
*/
|
|
170
|
+
declare function releaseSlotHold(holdId: string, apiUrl?: string, apiKey?: string): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Create a booking
|
|
173
|
+
*/
|
|
174
|
+
declare function createBooking(bookingData: {
|
|
175
|
+
bookingType: string;
|
|
176
|
+
scheduledAt: string;
|
|
177
|
+
hostId: string;
|
|
178
|
+
name: string;
|
|
179
|
+
email: string;
|
|
180
|
+
phone?: string;
|
|
181
|
+
company?: string;
|
|
182
|
+
message?: string;
|
|
183
|
+
source: string;
|
|
184
|
+
timezone?: string;
|
|
185
|
+
holdId?: string;
|
|
186
|
+
sessionId?: string;
|
|
187
|
+
sourceUrl?: string;
|
|
188
|
+
}, apiUrl?: string, apiKey?: string): Promise<BookingResult>;
|
|
189
|
+
/**
|
|
190
|
+
* Get available dates for a month (helper for calendar view)
|
|
191
|
+
* Returns dates that have at least one available slot
|
|
192
|
+
*/
|
|
193
|
+
declare function fetchAvailableDates(typeSlug: string, startDate: string, // YYYY-MM-DD
|
|
194
|
+
endDate: string, // YYYY-MM-DD
|
|
195
|
+
orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string): Promise<string[]>;
|
|
196
|
+
/**
|
|
197
|
+
* Detect user's timezone
|
|
198
|
+
*/
|
|
199
|
+
declare function detectTimezone(): string;
|
|
200
|
+
/**
|
|
201
|
+
* Format time for display
|
|
202
|
+
*/
|
|
203
|
+
declare function formatTime(isoString: string, timezone: string): string;
|
|
204
|
+
/**
|
|
205
|
+
* Format date for display
|
|
206
|
+
*/
|
|
207
|
+
declare function formatDate(isoString: string, timezone: string): string;
|
|
208
|
+
/**
|
|
209
|
+
* Format duration for display
|
|
210
|
+
*/
|
|
211
|
+
declare function formatDuration(minutes: number): string;
|
|
212
|
+
|
|
213
|
+
export { type BookingFormProps, type BookingResult, type BookingType, BookingWidget, type BookingWidgetProps, type DatePickerProps, type GuestInfo, type Host, type SlotHold, type SyncWidgetConfig, type TimeSlot, type TimeSlotPickerProps, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate, formatDuration, formatTime, releaseSlotHold };
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sync Module Types - Booking Widget for Client Sites
|
|
5
|
+
*/
|
|
6
|
+
interface BookingType {
|
|
7
|
+
id: string;
|
|
8
|
+
slug: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
duration_minutes: number;
|
|
12
|
+
buffer_before?: number;
|
|
13
|
+
buffer_after?: number;
|
|
14
|
+
color?: string;
|
|
15
|
+
location_type: 'virtual' | 'phone' | 'in_person' | 'custom';
|
|
16
|
+
location_details?: string;
|
|
17
|
+
price_cents?: number;
|
|
18
|
+
currency?: string;
|
|
19
|
+
is_active: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface TimeSlot {
|
|
22
|
+
start: string;
|
|
23
|
+
end: string;
|
|
24
|
+
hostId?: string;
|
|
25
|
+
available: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface Host {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
email?: string;
|
|
31
|
+
avatar?: string;
|
|
32
|
+
title?: string;
|
|
33
|
+
bio?: string;
|
|
34
|
+
}
|
|
35
|
+
interface SlotHold {
|
|
36
|
+
holdId: string;
|
|
37
|
+
expiresAt: string;
|
|
38
|
+
expiresInSeconds: number;
|
|
39
|
+
}
|
|
40
|
+
interface BookingResult {
|
|
41
|
+
success?: boolean;
|
|
42
|
+
/** Top-level confirmation code (matches the API's BookingConfirmation shape). */
|
|
43
|
+
confirmationCode?: string;
|
|
44
|
+
booking: {
|
|
45
|
+
id: string;
|
|
46
|
+
confirmationCode?: string;
|
|
47
|
+
scheduledAt?: string;
|
|
48
|
+
durationMinutes?: number;
|
|
49
|
+
hostName?: string;
|
|
50
|
+
timezone?: string;
|
|
51
|
+
video_link?: string;
|
|
52
|
+
};
|
|
53
|
+
cancelUrl: string;
|
|
54
|
+
rescheduleUrl: string;
|
|
55
|
+
calendarLinks: {
|
|
56
|
+
google: string;
|
|
57
|
+
outlook: string;
|
|
58
|
+
ics: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
interface BookingWidgetProps {
|
|
62
|
+
/** Organization slug – required for public (unauthenticated) mode, optional with apiKey */
|
|
63
|
+
orgSlug?: string;
|
|
64
|
+
/** API key – when provided, uses authenticated /sync/widget/* endpoints (no orgSlug needed) */
|
|
65
|
+
apiKey?: string;
|
|
66
|
+
/** API base URL - defaults to https://api.sonor.io */
|
|
67
|
+
apiUrl?: string;
|
|
68
|
+
/** Specific booking type slug to show (optional - shows all if not provided) */
|
|
69
|
+
bookingTypeSlug?: string;
|
|
70
|
+
/** Guest's timezone (auto-detected if not provided) */
|
|
71
|
+
timezone?: string;
|
|
72
|
+
/** Custom class name for styling */
|
|
73
|
+
className?: string;
|
|
74
|
+
/** Number of days to show availability for */
|
|
75
|
+
daysToShow?: number;
|
|
76
|
+
/** Called when booking is completed */
|
|
77
|
+
onBookingComplete?: (result: BookingResult) => void;
|
|
78
|
+
/** Called when an error occurs */
|
|
79
|
+
onError?: (error: Error) => void;
|
|
80
|
+
/** Hide the booking type selector (for single type embed) */
|
|
81
|
+
hideTypeSelector?: boolean;
|
|
82
|
+
/** Custom styles */
|
|
83
|
+
styles?: {
|
|
84
|
+
primaryColor?: string;
|
|
85
|
+
borderRadius?: string;
|
|
86
|
+
fontFamily?: string;
|
|
87
|
+
/** Dark mode colors */
|
|
88
|
+
backgroundColor?: string;
|
|
89
|
+
surfaceColor?: string;
|
|
90
|
+
elevatedColor?: string;
|
|
91
|
+
textPrimary?: string;
|
|
92
|
+
textSecondary?: string;
|
|
93
|
+
textTertiary?: string;
|
|
94
|
+
borderColor?: string;
|
|
95
|
+
inputBorderColor?: string;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
interface DatePickerProps {
|
|
99
|
+
selectedDate: Date | null;
|
|
100
|
+
onDateSelect: (date: Date) => void;
|
|
101
|
+
availableDates: string[];
|
|
102
|
+
className?: string;
|
|
103
|
+
}
|
|
104
|
+
interface TimeSlotPickerProps {
|
|
105
|
+
slots: TimeSlot[];
|
|
106
|
+
selectedSlot: TimeSlot | null;
|
|
107
|
+
onSlotSelect: (slot: TimeSlot) => void;
|
|
108
|
+
className?: string;
|
|
109
|
+
timezone: string;
|
|
110
|
+
}
|
|
111
|
+
interface BookingFormProps {
|
|
112
|
+
onSubmit: (data: GuestInfo) => Promise<void>;
|
|
113
|
+
isLoading?: boolean;
|
|
114
|
+
className?: string;
|
|
115
|
+
bookingType?: BookingType;
|
|
116
|
+
selectedSlot?: TimeSlot;
|
|
117
|
+
}
|
|
118
|
+
interface GuestInfo {
|
|
119
|
+
name: string;
|
|
120
|
+
email: string;
|
|
121
|
+
phone?: string;
|
|
122
|
+
notes?: string;
|
|
123
|
+
}
|
|
124
|
+
interface SyncWidgetConfig {
|
|
125
|
+
apiUrl: string;
|
|
126
|
+
orgSlug: string;
|
|
127
|
+
timezone: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare function BookingWidget({ orgSlug, apiKey: propApiKey, apiUrl: propApiUrl, bookingTypeSlug, timezone: propTimezone, className, daysToShow, onBookingComplete, onError, hideTypeSelector, styles, }: BookingWidgetProps): react_jsx_runtime.JSX.Element;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Sync API Functions - Client-side API calls for booking widget
|
|
134
|
+
*
|
|
135
|
+
* Two modes:
|
|
136
|
+
* 1. API-key flow (preferred): Uses x-api-key header → /sync/widget/* endpoints.
|
|
137
|
+
* Project is resolved server-side from the key. No orgSlug needed.
|
|
138
|
+
* 2. Public/orgSlug flow (legacy): Uses /sync/public/:org/* endpoints. No auth.
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Fetch booking types.
|
|
143
|
+
* - With apiKey → GET /sync/widget/types
|
|
144
|
+
* - With orgSlug → GET /sync/public/:org/types
|
|
145
|
+
*/
|
|
146
|
+
declare function fetchBookingTypes(orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType[]>;
|
|
147
|
+
/**
|
|
148
|
+
* Fetch booking type details
|
|
149
|
+
*/
|
|
150
|
+
declare function fetchBookingTypeDetails(typeSlug: string, orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType>;
|
|
151
|
+
/**
|
|
152
|
+
* Fetch available time slots for a specific date
|
|
153
|
+
*/
|
|
154
|
+
declare function fetchAvailability(typeSlug: string, date: string, // YYYY-MM-DD format
|
|
155
|
+
orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string, hostId?: string): Promise<TimeSlot[]>;
|
|
156
|
+
/**
|
|
157
|
+
* Hold a time slot temporarily (5-10 minutes)
|
|
158
|
+
*/
|
|
159
|
+
declare function createSlotHold(holdData: {
|
|
160
|
+
bookingType: string;
|
|
161
|
+
slotStart: string;
|
|
162
|
+
slotEnd: string;
|
|
163
|
+
hostId: string;
|
|
164
|
+
sessionId: string;
|
|
165
|
+
guestEmail?: string;
|
|
166
|
+
}, apiUrl?: string, apiKey?: string): Promise<SlotHold>;
|
|
167
|
+
/**
|
|
168
|
+
* Release a slot hold
|
|
169
|
+
*/
|
|
170
|
+
declare function releaseSlotHold(holdId: string, apiUrl?: string, apiKey?: string): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Create a booking
|
|
173
|
+
*/
|
|
174
|
+
declare function createBooking(bookingData: {
|
|
175
|
+
bookingType: string;
|
|
176
|
+
scheduledAt: string;
|
|
177
|
+
hostId: string;
|
|
178
|
+
name: string;
|
|
179
|
+
email: string;
|
|
180
|
+
phone?: string;
|
|
181
|
+
company?: string;
|
|
182
|
+
message?: string;
|
|
183
|
+
source: string;
|
|
184
|
+
timezone?: string;
|
|
185
|
+
holdId?: string;
|
|
186
|
+
sessionId?: string;
|
|
187
|
+
sourceUrl?: string;
|
|
188
|
+
}, apiUrl?: string, apiKey?: string): Promise<BookingResult>;
|
|
189
|
+
/**
|
|
190
|
+
* Get available dates for a month (helper for calendar view)
|
|
191
|
+
* Returns dates that have at least one available slot
|
|
192
|
+
*/
|
|
193
|
+
declare function fetchAvailableDates(typeSlug: string, startDate: string, // YYYY-MM-DD
|
|
194
|
+
endDate: string, // YYYY-MM-DD
|
|
195
|
+
orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string): Promise<string[]>;
|
|
196
|
+
/**
|
|
197
|
+
* Detect user's timezone
|
|
198
|
+
*/
|
|
199
|
+
declare function detectTimezone(): string;
|
|
200
|
+
/**
|
|
201
|
+
* Format time for display
|
|
202
|
+
*/
|
|
203
|
+
declare function formatTime(isoString: string, timezone: string): string;
|
|
204
|
+
/**
|
|
205
|
+
* Format date for display
|
|
206
|
+
*/
|
|
207
|
+
declare function formatDate(isoString: string, timezone: string): string;
|
|
208
|
+
/**
|
|
209
|
+
* Format duration for display
|
|
210
|
+
*/
|
|
211
|
+
declare function formatDuration(minutes: number): string;
|
|
212
|
+
|
|
213
|
+
export { type BookingFormProps, type BookingResult, type BookingType, BookingWidget, type BookingWidgetProps, type DatePickerProps, type GuestInfo, type Host, type SlotHold, type SyncWidgetConfig, type TimeSlot, type TimeSlotPickerProps, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate, formatDuration, formatTime, releaseSlotHold };
|
package/dist/sync/index.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkI2GTT2DG_js = require('../chunk-I2GTT2DG.js');
|
|
4
4
|
require('../chunk-ZSMWDLMK.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "BookingWidget", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkI2GTT2DG_js.BookingWidget; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "createBooking", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkI2GTT2DG_js.createBooking; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "createSlotHold", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkI2GTT2DG_js.createSlotHold; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "detectTimezone", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkI2GTT2DG_js.detectTimezone; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "fetchAvailability", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkI2GTT2DG_js.fetchAvailability; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "fetchAvailableDates", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkI2GTT2DG_js.fetchAvailableDates; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "fetchBookingTypeDetails", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkI2GTT2DG_js.fetchBookingTypeDetails; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "fetchBookingTypes", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkI2GTT2DG_js.fetchBookingTypes; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "formatDate", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkI2GTT2DG_js.formatDate; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "formatDuration", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkI2GTT2DG_js.formatDuration; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "formatTime", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkI2GTT2DG_js.formatTime; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "releaseSlotHold", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkI2GTT2DG_js.releaseSlotHold; }
|
|
55
55
|
});
|
|
56
56
|
//# sourceMappingURL=index.js.map
|
|
57
57
|
//# sourceMappingURL=index.js.map
|
package/dist/sync/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BookingWidget, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate, formatDuration, formatTime, releaseSlotHold } from '../chunk-
|
|
1
|
+
export { BookingWidget, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate, formatDuration, formatTime, releaseSlotHold } from '../chunk-FMZOZQBV.mjs';
|
|
2
2
|
import '../chunk-4XPGGLVP.mjs';
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
|
4
4
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -265,4 +265,4 @@ interface GetSitemapEntriesOptions {
|
|
|
265
265
|
publishedOnly?: boolean;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
export type { ABTest as A, FAQItem as F, GetManagedMetadataOptions as G, ManagedMetadataResult as M, RedirectResult as R, SonorSEOConfig as S,
|
|
268
|
+
export type { ABTest as A, FAQItem as F, GetManagedMetadataOptions as G, ManagedMetadataResult as M, RedirectResult as R, SonorSEOConfig as S, ManagedSchemaProps as a, ManagedFAQData as b, ManagedFAQProps as c, ManagedInternalLinksProps as d, ManagedContentProps as e, ManagedContentBlock as f, ManagedScriptsProps as g, SEOPageData as h, SchemaMarkup as i, ManagedLink as j, ABTestResult as k, GetABVariantOptions as l, ManagedRedirect as m, GetRedirectOptions as n, ManagedScript as o, RobotsDirective as p, GetRobotsOptions as q, SitemapEntry as r, GetSitemapEntriesOptions as s, SEOEntity as t };
|
|
@@ -265,4 +265,4 @@ interface GetSitemapEntriesOptions {
|
|
|
265
265
|
publishedOnly?: boolean;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
export type { ABTest as A, FAQItem as F, GetManagedMetadataOptions as G, ManagedMetadataResult as M, RedirectResult as R, SonorSEOConfig as S,
|
|
268
|
+
export type { ABTest as A, FAQItem as F, GetManagedMetadataOptions as G, ManagedMetadataResult as M, RedirectResult as R, SonorSEOConfig as S, ManagedSchemaProps as a, ManagedFAQData as b, ManagedFAQProps as c, ManagedInternalLinksProps as d, ManagedContentProps as e, ManagedContentBlock as f, ManagedScriptsProps as g, SEOPageData as h, SchemaMarkup as i, ManagedLink as j, ABTestResult as k, GetABVariantOptions as l, ManagedRedirect as m, GetRedirectOptions as n, ManagedScript as o, RobotsDirective as p, GetRobotsOptions as q, SitemapEntry as r, GetSitemapEntriesOptions as s, SEOEntity as t };
|
|
@@ -86,6 +86,14 @@ interface LLMPortfolioItem {
|
|
|
86
86
|
interface GenerateLLMSTxtOptions {
|
|
87
87
|
/** Project ID for fetching data (optional - uses API key's project) */
|
|
88
88
|
projectId?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Canonical site origin used to absolutize links (e.g. `https://example.com`),
|
|
91
|
+
* matching the sitemap helper's `baseUrl` convention. When omitted, falls back
|
|
92
|
+
* to Portal/local `business.website`, then `NEXT_PUBLIC_SITE_URL` / `SITE_URL`.
|
|
93
|
+
* Never derived from request headers, so /llms.txt stays statically
|
|
94
|
+
* prerenderable.
|
|
95
|
+
*/
|
|
96
|
+
baseUrl?: string;
|
|
89
97
|
/** When Portal returns empty services/faq/pages, use this to supply local site data */
|
|
90
98
|
getLocalData?: () => Promise<LLMsDataResponse | null>;
|
|
91
99
|
/** Include business info section */
|
|
@@ -339,4 +339,4 @@ interface FetchEventsOptions {
|
|
|
339
339
|
category?: string;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
export type { AdditionalFieldOption as A, CommerceOffering as C, EventTileProps as E, FetchOfferingsOptions as F, OfferingType as O, PriceType as P, RegistrationFormProps as R, SizeChart as S, UpcomingEventsProps as U,
|
|
342
|
+
export type { AdditionalFieldOption as A, CommerceOffering as C, EventTileProps as E, FetchOfferingsOptions as F, OfferingType as O, PriceType as P, RegistrationFormProps as R, SizeChart as S, UpcomingEventsProps as U, CommerceCategory as a, CommerceVariant as b, CommerceSchedule as c, Cart as d, CartItem as e, CheckoutResult as f, OfferingStatus as g, CheckoutCustomer as h, OfferingCardProps as i, OfferingListProps as j, OfferingDetailProps as k, ProductEmbedProps as l, EventEmbedProps as m, CheckoutFormProps as n, AdditionalField as o, CommerceApiConfig as p, FetchEventsOptions as q };
|
|
@@ -339,4 +339,4 @@ interface FetchEventsOptions {
|
|
|
339
339
|
category?: string;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
export type { AdditionalFieldOption as A, CommerceOffering as C, EventTileProps as E, FetchOfferingsOptions as F, OfferingType as O, PriceType as P, RegistrationFormProps as R, SizeChart as S, UpcomingEventsProps as U,
|
|
342
|
+
export type { AdditionalFieldOption as A, CommerceOffering as C, EventTileProps as E, FetchOfferingsOptions as F, OfferingType as O, PriceType as P, RegistrationFormProps as R, SizeChart as S, UpcomingEventsProps as U, CommerceCategory as a, CommerceVariant as b, CommerceSchedule as c, Cart as d, CartItem as e, CheckoutResult as f, OfferingStatus as g, CheckoutCustomer as h, OfferingCardProps as i, OfferingListProps as j, OfferingDetailProps as k, ProductEmbedProps as l, EventEmbedProps as m, CheckoutFormProps as n, AdditionalField as o, CommerceApiConfig as p, FetchEventsOptions as q };
|
|
@@ -86,6 +86,14 @@ interface LLMPortfolioItem {
|
|
|
86
86
|
interface GenerateLLMSTxtOptions {
|
|
87
87
|
/** Project ID for fetching data (optional - uses API key's project) */
|
|
88
88
|
projectId?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Canonical site origin used to absolutize links (e.g. `https://example.com`),
|
|
91
|
+
* matching the sitemap helper's `baseUrl` convention. When omitted, falls back
|
|
92
|
+
* to Portal/local `business.website`, then `NEXT_PUBLIC_SITE_URL` / `SITE_URL`.
|
|
93
|
+
* Never derived from request headers, so /llms.txt stays statically
|
|
94
|
+
* prerenderable.
|
|
95
|
+
*/
|
|
96
|
+
baseUrl?: string;
|
|
89
97
|
/** When Portal returns empty services/faq/pages, use this to supply local site data */
|
|
90
98
|
getLocalData?: () => Promise<LLMsDataResponse | null>;
|
|
91
99
|
/** Include business info section */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FetchOfferingsOptions, C as CommerceOffering, q as FetchEventsOptions, h as CheckoutCustomer,
|
|
1
|
+
import { F as FetchOfferingsOptions, C as CommerceOffering, q as FetchEventsOptions, h as CheckoutCustomer, f as CheckoutResult, i as OfferingCardProps, j as OfferingListProps, E as EventTileProps, U as UpcomingEventsProps, l as ProductEmbedProps, m as EventEmbedProps, n as CheckoutFormProps, c as CommerceSchedule, R as RegistrationFormProps } from './types-iZM4Lz71.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -332,4 +332,4 @@ interface UseEventModalReturn {
|
|
|
332
332
|
}
|
|
333
333
|
declare function useEventModal(): UseEventModalReturn;
|
|
334
334
|
|
|
335
|
-
export {
|
|
335
|
+
export { validateAddress as A, createPaymentIntent as B, CheckoutForm as C, fetchActiveProcessor as D, EventTile as E, fetchProcessorConfig as F, validateDiscountCode as G, type ShippingRate as H, type CreateCheckoutOptions as I, type ProcessorConfig as J, type DiscountValidationResult as K, formatTime as L, formatDateRange as M, getRelativeTimeUntil as N, OfferingCard as O, ProductEmbed as P, getSpotsRemaining as Q, RegistrationForm as R, type ShippingAddress as S, isEventSoldOut as T, UpcomingEvents as U, type ValidateAddressResult as V, OfferingList as a, EventEmbed as b, EventCheckout as c, CalendarView as d, EventModal as e, EventCalendar as f, fetchOfferings as g, fetchOffering as h, fetchProducts as i, fetchServices as j, fetchUpcomingEvents as k, fetchNextEvent as l, createCheckoutSession as m, formatPrice as n, formatDate as o, formatDateTime as p, getOfferingUrl as q, registerForEvent as r, type EventCheckoutProps as s, type CheckoutLineItem as t, useEventModal as u, fetchLatestOffering as v, fetchProductsPublic as w, fetchProductBySlug as x, fetchCategories as y, fetchShippingRates as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FetchOfferingsOptions, C as CommerceOffering, q as FetchEventsOptions, h as CheckoutCustomer,
|
|
1
|
+
import { F as FetchOfferingsOptions, C as CommerceOffering, q as FetchEventsOptions, h as CheckoutCustomer, f as CheckoutResult, i as OfferingCardProps, j as OfferingListProps, E as EventTileProps, U as UpcomingEventsProps, l as ProductEmbedProps, m as EventEmbedProps, n as CheckoutFormProps, c as CommerceSchedule, R as RegistrationFormProps } from './types-iZM4Lz71.mjs';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -332,4 +332,4 @@ interface UseEventModalReturn {
|
|
|
332
332
|
}
|
|
333
333
|
declare function useEventModal(): UseEventModalReturn;
|
|
334
334
|
|
|
335
|
-
export {
|
|
335
|
+
export { validateAddress as A, createPaymentIntent as B, CheckoutForm as C, fetchActiveProcessor as D, EventTile as E, fetchProcessorConfig as F, validateDiscountCode as G, type ShippingRate as H, type CreateCheckoutOptions as I, type ProcessorConfig as J, type DiscountValidationResult as K, formatTime as L, formatDateRange as M, getRelativeTimeUntil as N, OfferingCard as O, ProductEmbed as P, getSpotsRemaining as Q, RegistrationForm as R, type ShippingAddress as S, isEventSoldOut as T, UpcomingEvents as U, type ValidateAddressResult as V, OfferingList as a, EventEmbed as b, EventCheckout as c, CalendarView as d, EventModal as e, EventCalendar as f, fetchOfferings as g, fetchOffering as h, fetchProducts as i, fetchServices as j, fetchUpcomingEvents as k, fetchNextEvent as l, createCheckoutSession as m, formatPrice as n, formatDate as o, formatDateTime as p, getOfferingUrl as q, registerForEvent as r, type EventCheckoutProps as s, type CheckoutLineItem as t, useEventModal as u, fetchLatestOffering as v, fetchProductsPublic as w, fetchProductBySlug as x, fetchCategories as y, fetchShippingRates as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonordev/site-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Complete client-side integration kit for Sonor - SEO, Analytics, Engage, Forms, Blog",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"test": "vitest run",
|
|
188
188
|
"clean": "rm -rf dist",
|
|
189
189
|
"typecheck": "tsc --noEmit",
|
|
190
|
-
"prepublishOnly": "rm -rf dist && tsup && node -
|
|
190
|
+
"prepublishOnly": "rm -rf dist && tsup && node scripts/verify-dts.cjs"
|
|
191
191
|
},
|
|
192
192
|
"peerDependencies": {
|
|
193
193
|
"@vis.gl/react-google-maps": ">=1.0.0",
|