@kasuvia/sdk 0.0.2 → 0.0.5
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/hooks/index.d.mts +430 -0
- package/dist/hooks/index.d.ts +430 -0
- package/dist/hooks/index.js +3073 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +2962 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index-CxNLI4nw.d.ts +786 -0
- package/dist/index-CzVMyUs4.d.mts +492 -0
- package/dist/index-CzVMyUs4.d.ts +492 -0
- package/dist/index-Dowl5224.d.mts +786 -0
- package/dist/index.d.mts +48 -1739
- package/dist/index.d.ts +48 -1739
- package/dist/index.js +1544 -2359
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1527 -2258
- package/dist/index.mjs.map +1 -1
- package/dist/sdk-context-BuarJbeb.d.ts +75 -0
- package/dist/sdk-context-Db8kf1Tv.d.mts +75 -0
- package/dist/services/index.d.mts +2 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +2369 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/index.mjs +2252 -0
- package/dist/services/index.mjs.map +1 -0
- package/package.json +11 -2
- package/src/config/index.ts +10 -91
- package/src/constants.ts +13 -0
- package/src/context/sdk-context.tsx +70 -0
- package/src/graphql/collections.graphql.ts +2 -10
- package/src/graphql/products.graphql.ts +215 -65
- package/src/graphql/wishlist.graphql.ts +7 -6
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use-auth.ts +82 -158
- package/src/hooks/use-bespoke-availability.ts +25 -8
- package/src/hooks/use-cart.ts +222 -119
- package/src/hooks/use-cms.ts +179 -86
- package/src/hooks/use-collections.ts +52 -15
- package/src/hooks/use-consultation-stream.ts +4 -3
- package/src/hooks/use-consultations.ts +120 -51
- package/src/hooks/use-countries.ts +35 -13
- package/src/hooks/use-currencies.ts +26 -13
- package/src/hooks/use-google-translate.ts +22 -8
- package/src/hooks/use-languages.ts +40 -20
- package/src/hooks/use-mobile.ts +23 -0
- package/src/hooks/use-order-stream.ts +9 -5
- package/src/hooks/use-orders.ts +99 -44
- package/src/hooks/use-payment.ts +108 -40
- package/src/hooks/use-products.ts +251 -53
- package/src/hooks/use-service-booking.ts +152 -90
- package/src/hooks/use-states.ts +35 -15
- package/src/hooks/use-wishlist.ts +92 -91
- package/src/index.ts +26 -30
- package/src/services/auth.service.ts +209 -167
- package/src/services/bespoke.service.ts +12 -4
- package/src/services/cart.service.ts +172 -70
- package/src/services/cms.service.ts +70 -35
- package/src/services/collection.service.ts +22 -5
- package/src/services/config.service.ts +34 -14
- package/src/services/consultation.service.ts +72 -18
- package/src/services/logistics.service.ts +35 -11
- package/src/services/notifications.service.ts +27 -12
- package/src/services/order.service.ts +74 -15
- package/src/services/payment.service.ts +86 -31
- package/src/services/product.service.ts +279 -39
- package/src/services/service-booking.service.ts +98 -26
- package/src/services/wishlist.service.ts +69 -25
- package/src/types/auth/index.ts +6 -4
- package/src/types/business/index.ts +7 -2
- package/src/types/payments/index.ts +3 -3
- package/src/types/services/index.ts +2 -5
- package/src/types/store/index.ts +38 -3
- package/src/utils/error-handler.ts +10 -5
- package/src/utils/storage.ts +48 -26
- package/src/utils/validators.ts +85 -0
- package/src/client/authClient.ts +0 -135
- package/src/client/graphqlClient.ts +0 -53
- package/src/client/httpClient.ts +0 -298
|
@@ -0,0 +1,786 @@
|
|
|
1
|
+
import { H as ServiceLocationType, S as SdkConfig, d as CartResponse, c as CartItem, O as Order, p as CreateOrderParams, F as FindOrderParams, u as ListParams, P as PaginatedResponse, z as Product, m as Collection, _ as WishlistItem, Z as WishlistCheckResponse, $ as WishlistListResponse, s as DVACreateRequest, t as DVADetails, X as TransactionVerifyResponse, x as PaymentInitiateRequest, y as PaymentInitiateResponse, n as ConversionQuote, G as ProductVariant, T as ShippingRatesResponse, W as SupportedLanguagesResponse, U as SupportedCurrenciesResponse, o as CreateCmsEntryParams, e as CmsEntry, L as ListCmsEntriesParams, f as CmsEntryListResponse, Y as UpdateCmsEntryParams } from './index-CzVMyUs4.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Simplified customer auth types for kasuvia-storefront.
|
|
5
|
+
* Customers only need enough to track their orders — no RBAC, MFA, or complex profiles.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Media System response object for avatar/profile picture.
|
|
9
|
+
* Stored as JSON in the backend Profile model.
|
|
10
|
+
*/
|
|
11
|
+
interface AvatarObject {
|
|
12
|
+
id: string;
|
|
13
|
+
alt: string;
|
|
14
|
+
url: string;
|
|
15
|
+
}
|
|
16
|
+
interface CustomerProfileFields {
|
|
17
|
+
firstname: string;
|
|
18
|
+
lastname: string;
|
|
19
|
+
phone: string;
|
|
20
|
+
}
|
|
21
|
+
interface CustomerUser {
|
|
22
|
+
id: string;
|
|
23
|
+
email: string;
|
|
24
|
+
firstname?: string;
|
|
25
|
+
lastname?: string;
|
|
26
|
+
phone?: string;
|
|
27
|
+
/** Derived display name — prefer firstname + lastname when available */
|
|
28
|
+
full_name?: string;
|
|
29
|
+
avatar: string | null;
|
|
30
|
+
provider: 'google' | 'facebook' | 'email';
|
|
31
|
+
}
|
|
32
|
+
/** GET/PUT /auth/profile/ — matches kasuvia-auth UserSerializer */
|
|
33
|
+
interface AuthUserResponse {
|
|
34
|
+
id: string;
|
|
35
|
+
email: string;
|
|
36
|
+
is_google_auth_enabled?: boolean;
|
|
37
|
+
is_facebook_auth_enabled?: boolean;
|
|
38
|
+
profile?: {
|
|
39
|
+
firstname?: string;
|
|
40
|
+
lastname?: string;
|
|
41
|
+
phone?: string;
|
|
42
|
+
profile_picture?: string | null;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
interface UpdateProfilePayload {
|
|
46
|
+
firstname?: string;
|
|
47
|
+
lastname?: string;
|
|
48
|
+
phone?: string;
|
|
49
|
+
}
|
|
50
|
+
interface NotificationPreferences {
|
|
51
|
+
email_enabled: boolean;
|
|
52
|
+
sms_enabled: boolean;
|
|
53
|
+
whatsapp_enabled: boolean;
|
|
54
|
+
push_enabled: boolean;
|
|
55
|
+
email_order_confirmations: boolean;
|
|
56
|
+
email_delivery_updates: boolean;
|
|
57
|
+
email_low_stock_alerts: boolean;
|
|
58
|
+
email_payment_received: boolean;
|
|
59
|
+
push_order_confirmations: boolean;
|
|
60
|
+
push_delivery_updates: boolean;
|
|
61
|
+
push_low_stock_alerts: boolean;
|
|
62
|
+
push_payment_received: boolean;
|
|
63
|
+
whatsapp_order_confirmations: boolean;
|
|
64
|
+
whatsapp_delivery_updates: boolean;
|
|
65
|
+
whatsapp_payment_received: boolean;
|
|
66
|
+
sms_order_confirmations: boolean;
|
|
67
|
+
sms_delivery_updates: boolean;
|
|
68
|
+
}
|
|
69
|
+
interface BusinessContext {
|
|
70
|
+
id: string;
|
|
71
|
+
business_id: string;
|
|
72
|
+
name: string;
|
|
73
|
+
logo_picture?: string | null;
|
|
74
|
+
display_currency?: string;
|
|
75
|
+
}
|
|
76
|
+
interface CustomerAuthResponse {
|
|
77
|
+
access: string;
|
|
78
|
+
refresh: string;
|
|
79
|
+
user: CustomerUser;
|
|
80
|
+
business: BusinessContext;
|
|
81
|
+
is_new?: boolean;
|
|
82
|
+
}
|
|
83
|
+
interface RefreshTokenResponse {
|
|
84
|
+
access: string;
|
|
85
|
+
refresh?: string;
|
|
86
|
+
}
|
|
87
|
+
/** POST /auth/login/customer/ — field name is `tenant_id` (the business_id) */
|
|
88
|
+
interface CustomerLoginPayload {
|
|
89
|
+
tenant_id: string;
|
|
90
|
+
email: string;
|
|
91
|
+
password: string;
|
|
92
|
+
}
|
|
93
|
+
/** POST /auth/register/customer/ */
|
|
94
|
+
interface CustomerRegisterPayload {
|
|
95
|
+
tenant_id: string;
|
|
96
|
+
first_name?: string;
|
|
97
|
+
last_name?: string;
|
|
98
|
+
email: string;
|
|
99
|
+
password: string;
|
|
100
|
+
}
|
|
101
|
+
/** POST /auth/verify-otp/ */
|
|
102
|
+
interface OTPVerifyPayload {
|
|
103
|
+
email: string;
|
|
104
|
+
code: string;
|
|
105
|
+
purpose?: 'verify' | 'password_reset';
|
|
106
|
+
}
|
|
107
|
+
/** POST /auth/resend-otp/ */
|
|
108
|
+
interface ResendOTPPayload {
|
|
109
|
+
email: string;
|
|
110
|
+
}
|
|
111
|
+
/** POST /auth/logout/ */
|
|
112
|
+
interface LogoutPayload {
|
|
113
|
+
refresh?: string;
|
|
114
|
+
}
|
|
115
|
+
interface AuthContextValue {
|
|
116
|
+
customer: CustomerUser | null;
|
|
117
|
+
isLoading: boolean;
|
|
118
|
+
isModalOpen: boolean;
|
|
119
|
+
openModal: () => void;
|
|
120
|
+
closeModal: () => void;
|
|
121
|
+
setCustomer: (user: CustomerUser | null) => void;
|
|
122
|
+
logout: () => Promise<void>;
|
|
123
|
+
login: (payload: Omit<CustomerLoginPayload, 'tenant_id'>) => Promise<void>;
|
|
124
|
+
register: (payload: Omit<CustomerRegisterPayload, 'tenant_id'>) => Promise<{
|
|
125
|
+
requires_verification: boolean;
|
|
126
|
+
}>;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Consultation types for customer-facing storefront
|
|
131
|
+
*/
|
|
132
|
+
type ConsultationStatus = "pending" | "quoted" | "negotiating" | "deposit_pending" | "deposit_paid" | "converting" | "converted" | "rejected";
|
|
133
|
+
type ConsultationProductType = "bespoke" | "service";
|
|
134
|
+
interface ConsultationMessage {
|
|
135
|
+
id: string;
|
|
136
|
+
consultation_id: string;
|
|
137
|
+
sender_id: string;
|
|
138
|
+
sender_role: "customer" | "merchant" | "system";
|
|
139
|
+
message: string;
|
|
140
|
+
attachments: string[];
|
|
141
|
+
is_read: boolean;
|
|
142
|
+
created_at: string;
|
|
143
|
+
}
|
|
144
|
+
interface Consultation {
|
|
145
|
+
id: string;
|
|
146
|
+
business_id: string;
|
|
147
|
+
customer_id: string;
|
|
148
|
+
product_id: string | null;
|
|
149
|
+
title: string;
|
|
150
|
+
status: ConsultationStatus;
|
|
151
|
+
product_type: ConsultationProductType;
|
|
152
|
+
quote_amount: number | null;
|
|
153
|
+
agreed_price: number | null;
|
|
154
|
+
deposit_amount: number | null;
|
|
155
|
+
deposit_required: boolean;
|
|
156
|
+
is_physical_delivery: boolean;
|
|
157
|
+
expected_delivery_type: string | null;
|
|
158
|
+
structured_details: Record<string, unknown>;
|
|
159
|
+
rejection_reason: string | null;
|
|
160
|
+
converted_order_id: string | null;
|
|
161
|
+
slot_booking_id: string | null;
|
|
162
|
+
capacity_config_id: string | null;
|
|
163
|
+
created_at: string;
|
|
164
|
+
updated_at: string;
|
|
165
|
+
messages: ConsultationMessage[];
|
|
166
|
+
}
|
|
167
|
+
interface ConsultationCreatePayload {
|
|
168
|
+
product_id?: string;
|
|
169
|
+
title: string;
|
|
170
|
+
description: string;
|
|
171
|
+
reference_images?: string[];
|
|
172
|
+
custom_measurements?: Record<string, string | number>;
|
|
173
|
+
preferred_timeline?: string;
|
|
174
|
+
special_instructions?: string;
|
|
175
|
+
product_type?: ConsultationProductType;
|
|
176
|
+
}
|
|
177
|
+
interface ConsultationMessagePayload {
|
|
178
|
+
message: string;
|
|
179
|
+
attachments?: string[];
|
|
180
|
+
}
|
|
181
|
+
interface ConsultationQuoteAcceptPayload {
|
|
182
|
+
agreed_price: number;
|
|
183
|
+
}
|
|
184
|
+
interface BespokeAvailability {
|
|
185
|
+
available_slots: number;
|
|
186
|
+
next_available_date: string | null;
|
|
187
|
+
period_end: string;
|
|
188
|
+
blocked_dates: string[];
|
|
189
|
+
production_days: number;
|
|
190
|
+
is_available: boolean;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Service booking types for customer-facing storefront
|
|
195
|
+
*/
|
|
196
|
+
type AppointmentStatus = "pending" | "confirmed" | "in_progress" | "completed" | "voided" | "no_show";
|
|
197
|
+
interface AvailableSlot {
|
|
198
|
+
date: string;
|
|
199
|
+
start_time: string;
|
|
200
|
+
end_time: string;
|
|
201
|
+
slots_remaining: number;
|
|
202
|
+
}
|
|
203
|
+
interface ServiceAppointment {
|
|
204
|
+
id: string;
|
|
205
|
+
product_id: string;
|
|
206
|
+
customer_id: string;
|
|
207
|
+
order_id: string | null;
|
|
208
|
+
status: AppointmentStatus;
|
|
209
|
+
appointment_date: string;
|
|
210
|
+
start_time: string;
|
|
211
|
+
end_time: string;
|
|
212
|
+
location_type: ServiceLocationType;
|
|
213
|
+
customer_address: Record<string, unknown> | null;
|
|
214
|
+
meeting_link: string | null;
|
|
215
|
+
customer_notes: string | null;
|
|
216
|
+
price: number;
|
|
217
|
+
created_at: string;
|
|
218
|
+
updated_at: string;
|
|
219
|
+
completed_at: string | null;
|
|
220
|
+
voided_at: string | null;
|
|
221
|
+
cancellation_reason: string | null;
|
|
222
|
+
}
|
|
223
|
+
interface ServiceAppointmentCreatePayload {
|
|
224
|
+
product_id: string;
|
|
225
|
+
scheduled_date: string;
|
|
226
|
+
scheduled_time: string;
|
|
227
|
+
location_type?: ServiceLocationType;
|
|
228
|
+
customer_address?: Record<string, unknown>;
|
|
229
|
+
customer_notes?: string;
|
|
230
|
+
}
|
|
231
|
+
interface DeliverableStatus {
|
|
232
|
+
pending: "pending";
|
|
233
|
+
in_progress: "in_progress";
|
|
234
|
+
review: "review";
|
|
235
|
+
approved: "approved";
|
|
236
|
+
rejected: "rejected";
|
|
237
|
+
}
|
|
238
|
+
type DeliverableStatusType = DeliverableStatus[keyof DeliverableStatus];
|
|
239
|
+
interface ServiceDeliverable {
|
|
240
|
+
id: string;
|
|
241
|
+
order_id: string;
|
|
242
|
+
title: string;
|
|
243
|
+
description: string;
|
|
244
|
+
status: DeliverableStatusType;
|
|
245
|
+
due_date: string | null;
|
|
246
|
+
submitted_at: string | null;
|
|
247
|
+
attachments: string[];
|
|
248
|
+
customer_feedback: string | null;
|
|
249
|
+
created_at: string;
|
|
250
|
+
updated_at: string;
|
|
251
|
+
}
|
|
252
|
+
interface DeliverableApprovalPayload {
|
|
253
|
+
approved: boolean;
|
|
254
|
+
feedback?: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
interface BusinessConfig {
|
|
258
|
+
business_id: string;
|
|
259
|
+
storefront_business_id: string;
|
|
260
|
+
name: string;
|
|
261
|
+
currency: string;
|
|
262
|
+
settlement_currency: string;
|
|
263
|
+
country: string;
|
|
264
|
+
region: string;
|
|
265
|
+
is_verified: boolean;
|
|
266
|
+
is_active: boolean;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Cart Service
|
|
271
|
+
*
|
|
272
|
+
* Handles cart operations for both guest and authenticated users.
|
|
273
|
+
* Stateless - all configuration passed as parameters.
|
|
274
|
+
*/
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Fetch guest cart from backend (Redis-backed).
|
|
278
|
+
*/
|
|
279
|
+
declare function getGuestCart(config: SdkConfig, guestSessionId: string): Promise<CartItem[]>;
|
|
280
|
+
/**
|
|
281
|
+
* Add item to guest cart (Redis-backed).
|
|
282
|
+
*/
|
|
283
|
+
declare function addToGuestCart(config: SdkConfig, guestSessionId: string, item: CartItem): Promise<CartItem[]>;
|
|
284
|
+
/**
|
|
285
|
+
* Update quantity of a guest cart item.
|
|
286
|
+
*/
|
|
287
|
+
declare function updateGuestCartItemQuantity(config: SdkConfig, guestSessionId: string, itemId: string, quantity: number): Promise<CartItem[]>;
|
|
288
|
+
/**
|
|
289
|
+
* Remove an item from the guest cart.
|
|
290
|
+
*/
|
|
291
|
+
declare function removeFromGuestCart(config: SdkConfig, guestSessionId: string, itemId: string): Promise<CartItem[]>;
|
|
292
|
+
/**
|
|
293
|
+
* Clear the entire guest cart.
|
|
294
|
+
*/
|
|
295
|
+
declare function clearGuestCart(config: SdkConfig, guestSessionId: string): Promise<void>;
|
|
296
|
+
/**
|
|
297
|
+
* Fetch authenticated user's cart from backend.
|
|
298
|
+
*/
|
|
299
|
+
declare function getCart(config: SdkConfig, accessToken?: string | null): Promise<CartResponse>;
|
|
300
|
+
/**
|
|
301
|
+
* Add item to authenticated user's cart.
|
|
302
|
+
*/
|
|
303
|
+
declare function addToCart(config: SdkConfig, accessToken: string, item: {
|
|
304
|
+
product_id: string;
|
|
305
|
+
product_slug: string;
|
|
306
|
+
product_name: string;
|
|
307
|
+
image?: string;
|
|
308
|
+
variant_id?: string;
|
|
309
|
+
variant_attributes?: string;
|
|
310
|
+
unit_price: number;
|
|
311
|
+
quantity: number;
|
|
312
|
+
custom_measurements?: string;
|
|
313
|
+
is_bespoke: boolean;
|
|
314
|
+
}): Promise<CartResponse>;
|
|
315
|
+
/**
|
|
316
|
+
* Update item quantity in authenticated user's cart.
|
|
317
|
+
*/
|
|
318
|
+
declare function updateCartItem(config: SdkConfig, accessToken: string, itemId: string, quantity: number): Promise<CartResponse>;
|
|
319
|
+
/**
|
|
320
|
+
* Remove item from authenticated user's cart.
|
|
321
|
+
*/
|
|
322
|
+
declare function removeFromCart(config: SdkConfig, accessToken: string, itemId: string): Promise<CartResponse>;
|
|
323
|
+
/**
|
|
324
|
+
* Clear authenticated user's cart.
|
|
325
|
+
*/
|
|
326
|
+
declare function clearCart(config: SdkConfig, accessToken: string): Promise<void>;
|
|
327
|
+
/**
|
|
328
|
+
* Merge guest cart (from Redis) into authenticated user's DB cart.
|
|
329
|
+
*/
|
|
330
|
+
declare function mergeGuestCart(config: SdkConfig, accessToken: string, guestSessionId: string): Promise<CartResponse>;
|
|
331
|
+
/**
|
|
332
|
+
* Convenience wrapper: merge guest cart if it has items (called post-login).
|
|
333
|
+
*/
|
|
334
|
+
declare function mergeGuestCartIfPresent(config: SdkConfig, accessToken: string, guestSessionId: string): Promise<void>;
|
|
335
|
+
/**
|
|
336
|
+
* Returns 0 — count is now server-driven. Use the hook instead.
|
|
337
|
+
* Kept for backward compatibility.
|
|
338
|
+
*/
|
|
339
|
+
declare function getGuestCartCount(): number;
|
|
340
|
+
/**
|
|
341
|
+
* Returns 0 — subtotal is now server-driven.
|
|
342
|
+
* Kept for backward compatibility.
|
|
343
|
+
*/
|
|
344
|
+
declare function getGuestCartSubtotal(): number;
|
|
345
|
+
/**
|
|
346
|
+
* Derive product type from items (guest cart, no backend lookup needed).
|
|
347
|
+
*/
|
|
348
|
+
declare function getGuestCartProductType(): "physical" | "digital" | "bespoke";
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Order Service
|
|
352
|
+
*
|
|
353
|
+
* Handles order operations including creation, lookup, and tracking.
|
|
354
|
+
* Stateless - all configuration passed as parameters.
|
|
355
|
+
*/
|
|
356
|
+
|
|
357
|
+
declare function createOrder(config: SdkConfig, accessToken: string, payload: CreateOrderParams): Promise<Order>;
|
|
358
|
+
declare function findOrder(config: SdkConfig, params: FindOrderParams & {
|
|
359
|
+
guest_token?: string;
|
|
360
|
+
}): Promise<Order>;
|
|
361
|
+
declare function findOrderByToken(config: SdkConfig, token: string): Promise<Order>;
|
|
362
|
+
declare function getOrders(config: SdkConfig, accessToken: string, params?: {
|
|
363
|
+
email?: string;
|
|
364
|
+
page?: number;
|
|
365
|
+
page_size?: number;
|
|
366
|
+
}): Promise<Order[]>;
|
|
367
|
+
declare function cancelOrder(config: SdkConfig, accessToken: string, orderId: string, reason: string): Promise<Order>;
|
|
368
|
+
declare function trackOrder(config: SdkConfig, orderId: string, token?: string): Promise<Order>;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Customer auth service — all API calls scoped to this storefront's business tenant.
|
|
372
|
+
* Stateless - all configuration passed as parameters.
|
|
373
|
+
*/
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* POST /auth/login/customer/
|
|
377
|
+
* The `tenant_id` is automatically filled from config.businessId.
|
|
378
|
+
*/
|
|
379
|
+
declare function loginCustomer(config: SdkConfig, payload: Omit<CustomerLoginPayload, 'tenant_id'>): Promise<CustomerAuthResponse>;
|
|
380
|
+
/**
|
|
381
|
+
* POST /auth/register/customer/
|
|
382
|
+
* The `tenant_id` is automatically filled from config.businessId.
|
|
383
|
+
*/
|
|
384
|
+
declare function registerCustomer(config: SdkConfig, payload: Omit<CustomerRegisterPayload, 'tenant_id'>): Promise<CustomerAuthResponse>;
|
|
385
|
+
/** POST /auth/token/refresh/
|
|
386
|
+
*/
|
|
387
|
+
declare function refreshToken(config: SdkConfig, refresh: string): Promise<RefreshTokenResponse>;
|
|
388
|
+
/** POST /auth/logout/ — revokes the server-side session. */
|
|
389
|
+
declare function logout(config: SdkConfig, refresh?: string): Promise<void>;
|
|
390
|
+
/**
|
|
391
|
+
* Verify a social provider id_token (or access_token for Facebook) with the backend.
|
|
392
|
+
*/
|
|
393
|
+
declare function verifySocialToken(config: SdkConfig, provider: 'google' | 'facebook', token: string): Promise<CustomerAuthResponse>;
|
|
394
|
+
/** Map kasuvia-auth UserSerializer response to storefront CustomerUser. */
|
|
395
|
+
declare function mapAuthUserToCustomer(data: AuthUserResponse, provider?: CustomerUser['provider']): CustomerUser;
|
|
396
|
+
/** GET /auth/profile/ */
|
|
397
|
+
declare function getMe(config?: SdkConfig, accessToken?: string): Promise<CustomerUser>;
|
|
398
|
+
/** GET /auth/profile/ - alias for getMe for backward compatibility */
|
|
399
|
+
declare function getAuthUser(config?: SdkConfig, accessToken?: string): Promise<AuthUserResponse>;
|
|
400
|
+
/** PUT /auth/profile/ — update firstname, lastname, phone */
|
|
401
|
+
declare function updateProfile(configOrPayload: SdkConfig | UpdateProfilePayload, accessTokenOrPayload?: string | UpdateProfilePayload, payloadParam?: UpdateProfilePayload): Promise<CustomerUser>;
|
|
402
|
+
/**
|
|
403
|
+
* Silently refresh the access token on app boot.
|
|
404
|
+
* Builds CustomerUser from JWT claims — no additional profile API call needed.
|
|
405
|
+
* Returns null if no refresh token exists or if the refresh fails.
|
|
406
|
+
*/
|
|
407
|
+
declare function silentRefresh(config: SdkConfig, refresh: string): Promise<{
|
|
408
|
+
user: CustomerUser;
|
|
409
|
+
provider: CustomerUser['provider'];
|
|
410
|
+
newAccessToken: string;
|
|
411
|
+
newRefreshToken: string;
|
|
412
|
+
} | null>;
|
|
413
|
+
/**
|
|
414
|
+
* Store tokens in localStorage (client-side utility)
|
|
415
|
+
* This is a convenience function for storefronts to store auth tokens
|
|
416
|
+
*/
|
|
417
|
+
declare function storeTokens(accessToken: string, refreshToken: string): void;
|
|
418
|
+
/**
|
|
419
|
+
* Clear tokens from localStorage (client-side utility)
|
|
420
|
+
*/
|
|
421
|
+
declare function clearTokens(): void;
|
|
422
|
+
/**
|
|
423
|
+
* Get stored tokens from localStorage (client-side utility)
|
|
424
|
+
*/
|
|
425
|
+
declare function getStoredTokens(): {
|
|
426
|
+
accessToken: string | null;
|
|
427
|
+
refreshToken: string | null;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Fetch all active products for the storefront.
|
|
432
|
+
*/
|
|
433
|
+
declare function getStorefrontProducts(config: SdkConfig, params?: ListParams): Promise<PaginatedResponse<Product>>;
|
|
434
|
+
/**
|
|
435
|
+
* Fetch a single product by slug for the storefront.
|
|
436
|
+
*/
|
|
437
|
+
declare function getStorefrontProductBySlug(config: SdkConfig, slug: string): Promise<Product>;
|
|
438
|
+
/**
|
|
439
|
+
* Fetch latest products for the storefront.
|
|
440
|
+
*/
|
|
441
|
+
declare function getLatestProducts(config: SdkConfig, params?: ListParams): Promise<PaginatedResponse<Product>>;
|
|
442
|
+
/**
|
|
443
|
+
* Fetch popular products for the storefront.
|
|
444
|
+
*/
|
|
445
|
+
declare function getPopularProducts(config: SdkConfig, params?: ListParams): Promise<PaginatedResponse<Product>>;
|
|
446
|
+
/**
|
|
447
|
+
* Fetch featured products for the storefront.
|
|
448
|
+
*/
|
|
449
|
+
declare function getFeaturedProducts(config: SdkConfig, params?: ListParams): Promise<PaginatedResponse<Product>>;
|
|
450
|
+
/**
|
|
451
|
+
* Fetch new products for the storefront.
|
|
452
|
+
*/
|
|
453
|
+
declare function getNewProducts(config: SdkConfig, params?: ListParams): Promise<PaginatedResponse<Product>>;
|
|
454
|
+
/**
|
|
455
|
+
* Fetch products currently on sale for the storefront.
|
|
456
|
+
*/
|
|
457
|
+
declare function getOnSaleProducts(config: SdkConfig, params?: ListParams): Promise<PaginatedResponse<Product>>;
|
|
458
|
+
/**
|
|
459
|
+
* Fetch products with low stock for the storefront.
|
|
460
|
+
*/
|
|
461
|
+
declare function getLowStockProducts(config: SdkConfig, params?: ListParams): Promise<PaginatedResponse<Product>>;
|
|
462
|
+
/**
|
|
463
|
+
* Fetch recommended products for the storefront.
|
|
464
|
+
* Returns featured, popular, and new products.
|
|
465
|
+
* Optionally excludes a specific product ID.
|
|
466
|
+
*/
|
|
467
|
+
declare function getRecommendedProducts(config: SdkConfig, params?: ListParams & {
|
|
468
|
+
excludeProductId?: string;
|
|
469
|
+
}): Promise<PaginatedResponse<Product>>;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Fetch paginated active collections for the storefront.
|
|
473
|
+
*/
|
|
474
|
+
declare function getStorefrontCollections(config: SdkConfig, params?: ListParams): Promise<PaginatedResponse<Collection>>;
|
|
475
|
+
/**
|
|
476
|
+
* Fetch a single collection by its slug.
|
|
477
|
+
*/
|
|
478
|
+
declare function getStorefrontCollectionBySlug(config: SdkConfig, slug: string): Promise<Collection>;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Fetch the customer's wishlist for the current business.
|
|
482
|
+
*/
|
|
483
|
+
declare function getWishlist(config: SdkConfig, accessToken: string, params?: {
|
|
484
|
+
page?: number;
|
|
485
|
+
pageSize?: number;
|
|
486
|
+
}): Promise<WishlistListResponse>;
|
|
487
|
+
/**
|
|
488
|
+
* Check if a product is in the customer's wishlist.
|
|
489
|
+
*/
|
|
490
|
+
declare function checkInWishlist(config: SdkConfig, accessToken: string, productId: string): Promise<WishlistCheckResponse>;
|
|
491
|
+
/**
|
|
492
|
+
* Add a product to the customer's wishlist.
|
|
493
|
+
*/
|
|
494
|
+
declare function addToWishlist(config: SdkConfig, accessToken: string, productId: string, notes?: string): Promise<WishlistItem>;
|
|
495
|
+
/**
|
|
496
|
+
* Remove an item from the customer's wishlist by item ID.
|
|
497
|
+
*/
|
|
498
|
+
declare function removeFromWishlist(config: SdkConfig, accessToken: string, itemId: string): Promise<void>;
|
|
499
|
+
/**
|
|
500
|
+
* Remove a product from the customer's wishlist by product ID.
|
|
501
|
+
*/
|
|
502
|
+
declare function removeProductFromWishlist(config: SdkConfig, accessToken: string, productId: string): Promise<void>;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Payment Service
|
|
506
|
+
*
|
|
507
|
+
* Customer-facing payment API for payment initiation and verification.
|
|
508
|
+
* Stateless - all configuration passed as parameters.
|
|
509
|
+
*/
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Create a Monnify Dedicated Virtual Account so the customer can pay via
|
|
513
|
+
* bank transfer. Note: Monnify DVA only supports NGN currency - the backend
|
|
514
|
+
* will reject non-NGN requests for this payment method.
|
|
515
|
+
*/
|
|
516
|
+
declare function createDedicatedAccount(config: SdkConfig, accessToken: string, request: DVACreateRequest): Promise<DVADetails>;
|
|
517
|
+
/**
|
|
518
|
+
* Initiate a card payment (customer → business owner).
|
|
519
|
+
* Routes to Monnify (NGN) or Flutterwave (non-NGN) on the backend.
|
|
520
|
+
* Returns a checkout_url to redirect the customer to the gateway.
|
|
521
|
+
*/
|
|
522
|
+
declare function initiatePayment(config: SdkConfig, accessToken: string, request: PaymentInitiateRequest): Promise<PaymentInitiateResponse>;
|
|
523
|
+
/**
|
|
524
|
+
* Request a 15-minute rate-locked conversion quote for non-NGN transactions.
|
|
525
|
+
*/
|
|
526
|
+
declare function requestQuote(config: SdkConfig, amount: number): Promise<ConversionQuote>;
|
|
527
|
+
/**
|
|
528
|
+
* Verify a payment after the gateway redirects back to /checkout/verify.
|
|
529
|
+
*/
|
|
530
|
+
declare function verifyTransaction(configOrReference: SdkConfig | string, reference?: string): Promise<TransactionVerifyResponse>;
|
|
531
|
+
/**
|
|
532
|
+
* Poll transaction status by internal transaction ID.
|
|
533
|
+
*/
|
|
534
|
+
declare function getTransactionStatus(config: SdkConfig, transactionId: string): Promise<TransactionVerifyResponse>;
|
|
535
|
+
declare const paymentService: {
|
|
536
|
+
readonly createDedicatedAccount: typeof createDedicatedAccount;
|
|
537
|
+
readonly initiatePayment: typeof initiatePayment;
|
|
538
|
+
readonly requestQuote: typeof requestQuote;
|
|
539
|
+
readonly verifyTransaction: typeof verifyTransaction;
|
|
540
|
+
readonly getTransactionStatus: typeof getTransactionStatus;
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Consultation Service
|
|
545
|
+
*
|
|
546
|
+
* Handles consultation operations for bespoke and service products.
|
|
547
|
+
* Stateless - all configuration passed as parameters.
|
|
548
|
+
*/
|
|
549
|
+
|
|
550
|
+
declare function createConsultation(config: SdkConfig, accessToken: string, payload: ConsultationCreatePayload): Promise<Consultation>;
|
|
551
|
+
declare function getConsultations(config: SdkConfig, accessToken: string): Promise<Consultation[]>;
|
|
552
|
+
declare function getConsultation(config: SdkConfig, accessToken: string, id: string): Promise<Consultation>;
|
|
553
|
+
declare function sendMessage(config: SdkConfig, accessToken: string, id: string, payload: ConsultationMessagePayload): Promise<void>;
|
|
554
|
+
declare function acceptQuote(config: SdkConfig, accessToken: string, id: string, payload: ConsultationQuoteAcceptPayload): Promise<Consultation>;
|
|
555
|
+
declare function rejectQuote(config: SdkConfig, accessToken: string, id: string, reason?: string): Promise<Consultation>;
|
|
556
|
+
declare const consultationService: {
|
|
557
|
+
createConsultation: typeof createConsultation;
|
|
558
|
+
getConsultations: typeof getConsultations;
|
|
559
|
+
getConsultation: typeof getConsultation;
|
|
560
|
+
sendMessage: typeof sendMessage;
|
|
561
|
+
acceptQuote: typeof acceptQuote;
|
|
562
|
+
rejectQuote: typeof rejectQuote;
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Logistics Service
|
|
567
|
+
*
|
|
568
|
+
* Handles shipping rates and address validation.
|
|
569
|
+
* Stateless - all configuration passed as parameters.
|
|
570
|
+
*/
|
|
571
|
+
|
|
572
|
+
interface CartItemPayload {
|
|
573
|
+
product: {
|
|
574
|
+
name: string;
|
|
575
|
+
price: number;
|
|
576
|
+
weight: number;
|
|
577
|
+
};
|
|
578
|
+
variant: ProductVariant | null;
|
|
579
|
+
quantity: number;
|
|
580
|
+
}
|
|
581
|
+
interface RateAddress {
|
|
582
|
+
city: string;
|
|
583
|
+
state: string;
|
|
584
|
+
country: string;
|
|
585
|
+
}
|
|
586
|
+
interface ShippingRatesRequest {
|
|
587
|
+
cart_items: CartItemPayload[];
|
|
588
|
+
origin_address: RateAddress;
|
|
589
|
+
destination_address: RateAddress;
|
|
590
|
+
currency?: string;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Fetch shipping rates for a cart.
|
|
594
|
+
*/
|
|
595
|
+
declare function getShippingRates(config: SdkConfig, payload: ShippingRatesRequest): Promise<ShippingRatesResponse>;
|
|
596
|
+
/**
|
|
597
|
+
* Fetch the seller's registered shipping address.
|
|
598
|
+
*/
|
|
599
|
+
declare function getSellerShippingAddress(config: SdkConfig): Promise<{
|
|
600
|
+
terminal_address_id: string | null;
|
|
601
|
+
address_details: {
|
|
602
|
+
city: string;
|
|
603
|
+
state: string;
|
|
604
|
+
country: string;
|
|
605
|
+
line1: string;
|
|
606
|
+
line2: string;
|
|
607
|
+
zip: string;
|
|
608
|
+
} | null;
|
|
609
|
+
business_id: string;
|
|
610
|
+
message: string;
|
|
611
|
+
}>;
|
|
612
|
+
/**
|
|
613
|
+
* Validate a shipping address.
|
|
614
|
+
*/
|
|
615
|
+
declare function validateShippingAddress(config: SdkConfig, payload: {
|
|
616
|
+
first_name: string;
|
|
617
|
+
last_name: string;
|
|
618
|
+
phone: string;
|
|
619
|
+
address_line1: string;
|
|
620
|
+
address_line2?: string;
|
|
621
|
+
city: string;
|
|
622
|
+
state: string;
|
|
623
|
+
country: string;
|
|
624
|
+
postal_code?: string;
|
|
625
|
+
}): Promise<{
|
|
626
|
+
valid: boolean;
|
|
627
|
+
message?: string;
|
|
628
|
+
data?: Array<{
|
|
629
|
+
name: string;
|
|
630
|
+
city_id: string;
|
|
631
|
+
stateCode: string;
|
|
632
|
+
countryCode: string;
|
|
633
|
+
}>;
|
|
634
|
+
}>;
|
|
635
|
+
declare const logisticsService: {
|
|
636
|
+
getShippingRates: typeof getShippingRates;
|
|
637
|
+
getSellerShippingAddress: typeof getSellerShippingAddress;
|
|
638
|
+
validateShippingAddress: typeof validateShippingAddress;
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Bespoke Service
|
|
643
|
+
*
|
|
644
|
+
* Handles bespoke product availability checks.
|
|
645
|
+
* Stateless - all configuration passed as parameters.
|
|
646
|
+
*/
|
|
647
|
+
|
|
648
|
+
declare function checkAvailability(config: SdkConfig, product_id: string): Promise<BespokeAvailability>;
|
|
649
|
+
declare const bespokeService: {
|
|
650
|
+
checkAvailability: typeof checkAvailability;
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Service Booking Service
|
|
655
|
+
*
|
|
656
|
+
* Handles service appointments and deliverables.
|
|
657
|
+
* Stateless - all configuration passed as parameters.
|
|
658
|
+
*/
|
|
659
|
+
|
|
660
|
+
declare function getAvailableSlots(config: SdkConfig, product_id: string, date_from: string, date_to: string): Promise<AvailableSlot[]>;
|
|
661
|
+
declare function bookAppointment(config: SdkConfig, accessToken: string, payload: ServiceAppointmentCreatePayload): Promise<ServiceAppointment>;
|
|
662
|
+
declare function getAppointments(config: SdkConfig, accessToken: string): Promise<ServiceAppointment[]>;
|
|
663
|
+
declare function getAppointment(config: SdkConfig, accessToken: string, id: string): Promise<ServiceAppointment>;
|
|
664
|
+
declare function cancelAppointment(config: SdkConfig, accessToken: string, id: string): Promise<void>;
|
|
665
|
+
declare function getDeliverables(config: SdkConfig, accessToken: string, order_id: string): Promise<ServiceDeliverable[]>;
|
|
666
|
+
declare function approveDeliverable(config: SdkConfig, accessToken: string, order_id: string, deliverable_id: string): Promise<ServiceDeliverable>;
|
|
667
|
+
declare function requestRevision(config: SdkConfig, accessToken: string, order_id: string, deliverable_id: string, feedback: string): Promise<ServiceDeliverable>;
|
|
668
|
+
declare const serviceBookingService: {
|
|
669
|
+
getAvailableSlots: typeof getAvailableSlots;
|
|
670
|
+
bookAppointment: typeof bookAppointment;
|
|
671
|
+
getAppointments: typeof getAppointments;
|
|
672
|
+
getAppointment: typeof getAppointment;
|
|
673
|
+
cancelAppointment: typeof cancelAppointment;
|
|
674
|
+
getDeliverables: typeof getDeliverables;
|
|
675
|
+
approveDeliverable: typeof approveDeliverable;
|
|
676
|
+
requestRevision: typeof requestRevision;
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Notification Service
|
|
681
|
+
*
|
|
682
|
+
* Handles contact form submissions and email notifications.
|
|
683
|
+
* Stateless - all configuration passed as parameters.
|
|
684
|
+
*/
|
|
685
|
+
|
|
686
|
+
interface ContactFormData {
|
|
687
|
+
name: string;
|
|
688
|
+
email: string;
|
|
689
|
+
subject: string;
|
|
690
|
+
message: string;
|
|
691
|
+
source?: string;
|
|
692
|
+
company_name?: string;
|
|
693
|
+
current_year?: number;
|
|
694
|
+
turnstile_token?: string;
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Send contact email to Kasuvia team.
|
|
698
|
+
* POST /contact/send-contact-email
|
|
699
|
+
*/
|
|
700
|
+
declare function sendContactEmail(config: SdkConfig, payload: ContactFormData): Promise<{
|
|
701
|
+
detail: string;
|
|
702
|
+
}>;
|
|
703
|
+
/**
|
|
704
|
+
* Send confirmation email to user.
|
|
705
|
+
* POST /contact/send-contact-confirmation
|
|
706
|
+
*/
|
|
707
|
+
declare function sendContactConfirmation(config: SdkConfig, payload: Omit<ContactFormData, 'turnstile_token'>): Promise<{
|
|
708
|
+
detail: string;
|
|
709
|
+
}>;
|
|
710
|
+
declare const notificationsService: {
|
|
711
|
+
readonly sendContactEmail: typeof sendContactEmail;
|
|
712
|
+
readonly sendContactConfirmation: typeof sendContactConfirmation;
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* App Service
|
|
717
|
+
*
|
|
718
|
+
* Handles translation and other app-level utilities.
|
|
719
|
+
*/
|
|
720
|
+
declare function googleTranslate(text: string, target: string, source?: string): Promise<string>;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Config Service
|
|
724
|
+
*
|
|
725
|
+
* Handles configuration endpoints (languages, currencies, locales, business config).
|
|
726
|
+
* Stateless - all configuration passed as parameters.
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Fetch supported languages from the payment system.
|
|
731
|
+
* Resolves to: {kasuviaPaymentBackendUrl}/config/supported-languages
|
|
732
|
+
*/
|
|
733
|
+
declare function getSupportedLanguages(config: SdkConfig): Promise<SupportedLanguagesResponse>;
|
|
734
|
+
/**
|
|
735
|
+
* Fetch supported currencies from the payment system.
|
|
736
|
+
* Resolves to: {kasuviaPaymentBackendUrl}/config/supported-currencies
|
|
737
|
+
*/
|
|
738
|
+
declare function getSupportedCurrencies(config: SdkConfig): Promise<SupportedCurrenciesResponse>;
|
|
739
|
+
/**
|
|
740
|
+
* Fetch the business's public configuration, including store_currency.
|
|
741
|
+
* Uses storefront API key header (X-Storefront-Key).
|
|
742
|
+
* Resolves to: {kasuviaAuthBackendUrl}/internal/businesses/{business_id}/
|
|
743
|
+
* This endpoint is designed for storefronts to fetch business config using their storefront API key.
|
|
744
|
+
*/
|
|
745
|
+
declare function getBusinessConfig(config: SdkConfig): Promise<BusinessConfig>;
|
|
746
|
+
declare const configService: {
|
|
747
|
+
readonly getSupportedLanguages: typeof getSupportedLanguages;
|
|
748
|
+
readonly getSupportedCurrencies: typeof getSupportedCurrencies;
|
|
749
|
+
readonly getBusinessConfig: typeof getBusinessConfig;
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* CMS Service
|
|
754
|
+
*
|
|
755
|
+
* Handles CMS model and entry operations using the kasuvia-cms SDK endpoints.
|
|
756
|
+
* Protected by X-Storefront-Key and X-Business-ID headers.
|
|
757
|
+
* Stateless - all configuration passed as parameters.
|
|
758
|
+
*/
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* List CMS entries for a specific model.
|
|
762
|
+
* Requires public_api.read permission on the model.
|
|
763
|
+
*/
|
|
764
|
+
declare function listCmsEntries(config: SdkConfig, modelSlug: string, params?: ListCmsEntriesParams): Promise<CmsEntryListResponse>;
|
|
765
|
+
/**
|
|
766
|
+
* Get a single CMS entry by ID.
|
|
767
|
+
* Requires public_api.read permission on the model.
|
|
768
|
+
*/
|
|
769
|
+
declare function getCmsEntry(config: SdkConfig, modelSlug: string, entryId: string): Promise<CmsEntry>;
|
|
770
|
+
/**
|
|
771
|
+
* Create a new CMS entry.
|
|
772
|
+
* Requires public_api.create permission on the model.
|
|
773
|
+
*/
|
|
774
|
+
declare function createCmsEntry(config: SdkConfig, accessToken: string, modelSlug: string, params: CreateCmsEntryParams): Promise<CmsEntry>;
|
|
775
|
+
/**
|
|
776
|
+
* Update an existing CMS entry.
|
|
777
|
+
* Requires public_api.update permission on the model.
|
|
778
|
+
*/
|
|
779
|
+
declare function updateCmsEntry(config: SdkConfig, accessToken: string, modelSlug: string, entryId: string, params: UpdateCmsEntryParams): Promise<CmsEntry>;
|
|
780
|
+
/**
|
|
781
|
+
* Delete a CMS entry.
|
|
782
|
+
* Requires public_api.delete permission on the model.
|
|
783
|
+
*/
|
|
784
|
+
declare function deleteCmsEntry(config: SdkConfig, accessToken: string, modelSlug: string, entryId: string): Promise<void>;
|
|
785
|
+
|
|
786
|
+
export { createConsultation as $, type AppointmentStatus as A, type BespokeAvailability as B, type CustomerUser as C, type DeliverableApprovalPayload as D, acceptQuote as E, addToCart as F, addToGuestCart as G, addToWishlist as H, approveDeliverable as I, bespokeService as J, bookAppointment as K, type LogoutPayload as L, cancelAppointment as M, type NotificationPreferences as N, type OTPVerifyPayload as O, cancelOrder as P, checkAvailability as Q, type RateAddress as R, type ServiceAppointment as S, checkInWishlist as T, type UpdateProfilePayload as U, clearCart as V, clearGuestCart as W, clearTokens as X, configService as Y, consultationService as Z, createCmsEntry as _, type AuthContextValue as a, silentRefresh as a$, createDedicatedAccount as a0, createOrder as a1, deleteCmsEntry as a2, findOrder as a3, findOrderByToken as a4, getAppointment as a5, getAppointments as a6, getAuthUser as a7, getAvailableSlots as a8, getBusinessConfig as a9, getSupportedLanguages as aA, getTransactionStatus as aB, getWishlist as aC, googleTranslate as aD, initiatePayment as aE, listCmsEntries as aF, loginCustomer as aG, logisticsService as aH, logout as aI, mapAuthUserToCustomer as aJ, mergeGuestCart as aK, mergeGuestCartIfPresent as aL, notificationsService as aM, paymentService as aN, refreshToken as aO, registerCustomer as aP, rejectQuote as aQ, removeFromCart as aR, removeFromGuestCart as aS, removeFromWishlist as aT, removeProductFromWishlist as aU, requestQuote as aV, requestRevision as aW, sendContactConfirmation as aX, sendContactEmail as aY, sendMessage as aZ, serviceBookingService as a_, getCart as aa, getCmsEntry as ab, getConsultation as ac, getConsultations as ad, getDeliverables as ae, getFeaturedProducts as af, getGuestCart as ag, getGuestCartCount as ah, getGuestCartProductType as ai, getGuestCartSubtotal as aj, getLatestProducts as ak, getLowStockProducts as al, getMe as am, getNewProducts as an, getOnSaleProducts as ao, getOrders as ap, getPopularProducts as aq, getRecommendedProducts as ar, getSellerShippingAddress as as, getShippingRates as at, getStoredTokens as au, getStorefrontCollectionBySlug as av, getStorefrontCollections as aw, getStorefrontProductBySlug as ax, getStorefrontProducts as ay, getSupportedCurrencies as az, type AuthUserResponse as b, storeTokens as b0, trackOrder as b1, updateCartItem as b2, updateCmsEntry as b3, updateGuestCartItemQuantity as b4, updateProfile as b5, validateShippingAddress as b6, verifySocialToken as b7, verifyTransaction as b8, type AvailableSlot as c, type AvatarObject as d, type BusinessConfig as e, type BusinessContext as f, type CartItemPayload as g, type Consultation as h, type ConsultationCreatePayload as i, type ConsultationMessage as j, type ConsultationMessagePayload as k, type ConsultationProductType as l, type ConsultationQuoteAcceptPayload as m, type ConsultationStatus as n, type ContactFormData as o, type CustomerAuthResponse as p, type CustomerLoginPayload as q, type CustomerProfileFields as r, type CustomerRegisterPayload as s, type DeliverableStatus as t, type DeliverableStatusType as u, type RefreshTokenResponse as v, type ResendOTPPayload as w, type ServiceAppointmentCreatePayload as x, type ServiceDeliverable as y, type ShippingRatesRequest as z };
|