@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,492 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shipping and delivery types for the storefront
|
|
3
|
+
*/
|
|
4
|
+
interface ShippingRate {
|
|
5
|
+
id: string;
|
|
6
|
+
carrier_name: string;
|
|
7
|
+
carrier_logo: string;
|
|
8
|
+
carrier_rate_description: string;
|
|
9
|
+
carrier_slug: string;
|
|
10
|
+
amount: number;
|
|
11
|
+
currency: string;
|
|
12
|
+
delivery_time: string;
|
|
13
|
+
delivery_eta: number;
|
|
14
|
+
pickup_time: string;
|
|
15
|
+
pickup_eta: number;
|
|
16
|
+
pickup_available: boolean;
|
|
17
|
+
dropoff_available?: boolean;
|
|
18
|
+
dropoff_required?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface ShippingRatesResponse {
|
|
21
|
+
status: boolean;
|
|
22
|
+
message: string;
|
|
23
|
+
data: ShippingRate[];
|
|
24
|
+
}
|
|
25
|
+
interface DeliveryAddress {
|
|
26
|
+
first_name: string;
|
|
27
|
+
last_name: string;
|
|
28
|
+
phone: string;
|
|
29
|
+
street: string;
|
|
30
|
+
city: string;
|
|
31
|
+
state: string;
|
|
32
|
+
lga: string;
|
|
33
|
+
country: string;
|
|
34
|
+
postal: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type ProductType = "physical" | "digital" | "service" | "bespoke";
|
|
38
|
+
declare enum ServiceTypeEnum {
|
|
39
|
+
APPOINTMENT = "appointment",
|
|
40
|
+
PROJECT = "project",
|
|
41
|
+
RECURRING = "recurring"
|
|
42
|
+
}
|
|
43
|
+
type ServiceType = ServiceTypeEnum | 'appointment' | 'project' | 'recurring';
|
|
44
|
+
declare enum ServiceLocationTypeEnum {
|
|
45
|
+
REMOTE = "remote",
|
|
46
|
+
PHYSICAL = "physical",
|
|
47
|
+
BOTH = "both"
|
|
48
|
+
}
|
|
49
|
+
type ServiceLocationType = ServiceLocationTypeEnum | 'remote' | 'physical' | 'both';
|
|
50
|
+
declare enum ServiceRecurringIntervalEnum {
|
|
51
|
+
WEEKLY = "weekly",
|
|
52
|
+
MONTHLY = "monthly",
|
|
53
|
+
YEARLY = "yearly"
|
|
54
|
+
}
|
|
55
|
+
type ServiceRecurringInterval = ServiceRecurringIntervalEnum | 'weekly' | 'monthly' | 'yearly' | '';
|
|
56
|
+
interface Address {
|
|
57
|
+
street: string;
|
|
58
|
+
city: string;
|
|
59
|
+
state: string;
|
|
60
|
+
country: string;
|
|
61
|
+
zip?: string;
|
|
62
|
+
}
|
|
63
|
+
interface Collection {
|
|
64
|
+
id: string;
|
|
65
|
+
business_id?: string;
|
|
66
|
+
name: string;
|
|
67
|
+
slug: string;
|
|
68
|
+
description?: string;
|
|
69
|
+
image?: string;
|
|
70
|
+
collection_type?: string;
|
|
71
|
+
rules?: Record<string, unknown>;
|
|
72
|
+
status?: string;
|
|
73
|
+
sort_order?: number;
|
|
74
|
+
created_at: string;
|
|
75
|
+
updated_at: string;
|
|
76
|
+
}
|
|
77
|
+
interface Inventory {
|
|
78
|
+
id: string;
|
|
79
|
+
product_id: string;
|
|
80
|
+
variant_id?: string;
|
|
81
|
+
quantity: number;
|
|
82
|
+
reserved: number;
|
|
83
|
+
reorder_point: number;
|
|
84
|
+
reorder_quantity: number;
|
|
85
|
+
track_quantity: boolean;
|
|
86
|
+
allow_backorder: boolean;
|
|
87
|
+
available: number;
|
|
88
|
+
is_in_stock: boolean;
|
|
89
|
+
is_low_stock: boolean;
|
|
90
|
+
updated_at: string;
|
|
91
|
+
}
|
|
92
|
+
interface ProductVariant {
|
|
93
|
+
id: string;
|
|
94
|
+
product_id: string;
|
|
95
|
+
sku?: string;
|
|
96
|
+
attributes: Record<string, string>;
|
|
97
|
+
price?: number;
|
|
98
|
+
images: string[];
|
|
99
|
+
weight_kg?: number;
|
|
100
|
+
is_active: boolean;
|
|
101
|
+
inventory?: Inventory;
|
|
102
|
+
created_at: string;
|
|
103
|
+
updated_at: string;
|
|
104
|
+
}
|
|
105
|
+
interface CustomField {
|
|
106
|
+
label: string;
|
|
107
|
+
unit?: string;
|
|
108
|
+
required: boolean;
|
|
109
|
+
type?: string;
|
|
110
|
+
key?: string;
|
|
111
|
+
placeholder?: string;
|
|
112
|
+
}
|
|
113
|
+
interface Product {
|
|
114
|
+
id: string;
|
|
115
|
+
business_id: string;
|
|
116
|
+
name: string;
|
|
117
|
+
slug: string;
|
|
118
|
+
description?: string;
|
|
119
|
+
brand?: string;
|
|
120
|
+
product_type: ProductType;
|
|
121
|
+
requires_shipping: boolean;
|
|
122
|
+
is_consumable: boolean;
|
|
123
|
+
is_bespoke: boolean;
|
|
124
|
+
is_physical?: boolean | null;
|
|
125
|
+
base_price: number;
|
|
126
|
+
currency: string;
|
|
127
|
+
sale_price?: number;
|
|
128
|
+
sale_start?: string;
|
|
129
|
+
sale_end?: string;
|
|
130
|
+
images: string[];
|
|
131
|
+
tags: string[];
|
|
132
|
+
custom_fields: CustomField[];
|
|
133
|
+
is_published: boolean;
|
|
134
|
+
is_featured: boolean;
|
|
135
|
+
is_popular: boolean;
|
|
136
|
+
is_new: boolean;
|
|
137
|
+
is_temporary: boolean;
|
|
138
|
+
digital_file_key?: string;
|
|
139
|
+
download_limit?: number;
|
|
140
|
+
download_expires_at?: string;
|
|
141
|
+
service_type?: ServiceType | null;
|
|
142
|
+
service_duration_minutes?: number | null;
|
|
143
|
+
service_location_type?: ServiceLocationType | null;
|
|
144
|
+
service_requires_consultation?: boolean;
|
|
145
|
+
service_max_capacity_per_slot?: number | null;
|
|
146
|
+
service_buffer_minutes?: number;
|
|
147
|
+
service_is_recurring?: boolean;
|
|
148
|
+
service_recurring_interval?: ServiceRecurringInterval | null;
|
|
149
|
+
service_project_based?: boolean;
|
|
150
|
+
weight_kg: number;
|
|
151
|
+
length_cm?: number;
|
|
152
|
+
width_cm?: number;
|
|
153
|
+
height_cm?: number;
|
|
154
|
+
created_at: string;
|
|
155
|
+
updated_at: string;
|
|
156
|
+
variants: ProductVariant[];
|
|
157
|
+
collections: Collection[];
|
|
158
|
+
}
|
|
159
|
+
interface ListParams {
|
|
160
|
+
page?: number;
|
|
161
|
+
pageSize?: number;
|
|
162
|
+
search?: string;
|
|
163
|
+
ordering?: string;
|
|
164
|
+
collectionSlug?: string;
|
|
165
|
+
excludeProductId?: string;
|
|
166
|
+
}
|
|
167
|
+
interface PaginatedResponse<T> {
|
|
168
|
+
items: T[];
|
|
169
|
+
total: number;
|
|
170
|
+
page: number;
|
|
171
|
+
page_size: number;
|
|
172
|
+
total_pages: number;
|
|
173
|
+
}
|
|
174
|
+
interface CartItem {
|
|
175
|
+
id: string;
|
|
176
|
+
product_id: string;
|
|
177
|
+
product_slug: string;
|
|
178
|
+
product_name: string;
|
|
179
|
+
image?: string;
|
|
180
|
+
variant_id?: string;
|
|
181
|
+
variant_attributes?: string | Record<string, string>;
|
|
182
|
+
unit_price: number;
|
|
183
|
+
quantity: number;
|
|
184
|
+
custom_measurements?: string;
|
|
185
|
+
is_bespoke: boolean;
|
|
186
|
+
created_at: string;
|
|
187
|
+
updated_at: string;
|
|
188
|
+
}
|
|
189
|
+
interface CartResponse {
|
|
190
|
+
items: CartItem[];
|
|
191
|
+
subtotal: number;
|
|
192
|
+
total: number;
|
|
193
|
+
item_count: number;
|
|
194
|
+
product_type?: string;
|
|
195
|
+
}
|
|
196
|
+
interface WishlistItem {
|
|
197
|
+
id: string;
|
|
198
|
+
product_id: string;
|
|
199
|
+
notes?: string;
|
|
200
|
+
created_at: string;
|
|
201
|
+
product_name?: string;
|
|
202
|
+
product_slug?: string;
|
|
203
|
+
product_price?: number;
|
|
204
|
+
product_image?: string;
|
|
205
|
+
}
|
|
206
|
+
interface WishlistListResponse {
|
|
207
|
+
items: WishlistItem[];
|
|
208
|
+
total: number;
|
|
209
|
+
page: number;
|
|
210
|
+
page_size: number;
|
|
211
|
+
total_pages: number;
|
|
212
|
+
}
|
|
213
|
+
interface WishlistCheckResponse {
|
|
214
|
+
in_wishlist: boolean;
|
|
215
|
+
}
|
|
216
|
+
type OrderStatus = 'pending' | 'confirmed' | 'processing' | 'packed' | 'picked_up' | 'in_transit' | 'shipped' | 'delivered' | 'voided' | 'refunded' | 'failed';
|
|
217
|
+
type BespokeStageKey = "received" | "development" | "finished" | "dispatched";
|
|
218
|
+
interface OrderItem {
|
|
219
|
+
id: string;
|
|
220
|
+
productName: string;
|
|
221
|
+
image: string;
|
|
222
|
+
quantity: number;
|
|
223
|
+
price: number;
|
|
224
|
+
}
|
|
225
|
+
interface Order {
|
|
226
|
+
id: string;
|
|
227
|
+
display_id?: string;
|
|
228
|
+
items: OrderItem[];
|
|
229
|
+
total: number;
|
|
230
|
+
status: OrderStatus;
|
|
231
|
+
customerEmail: string;
|
|
232
|
+
customerName: string;
|
|
233
|
+
createdAt: number;
|
|
234
|
+
updatedAt: number;
|
|
235
|
+
deliveryMethod?: string;
|
|
236
|
+
trackingNumber?: string;
|
|
237
|
+
deliveryAddress?: string;
|
|
238
|
+
shippingAddress?: DeliveryAddress;
|
|
239
|
+
cancellationReason?: string;
|
|
240
|
+
hasBespoke?: boolean;
|
|
241
|
+
bespokeStage?: BespokeStageKey;
|
|
242
|
+
bespokeBrief?: string;
|
|
243
|
+
deliveryStatus?: string;
|
|
244
|
+
carrierName?: string;
|
|
245
|
+
terminalShipmentId?: string;
|
|
246
|
+
guestToken?: string;
|
|
247
|
+
guestEmail?: string;
|
|
248
|
+
guestPhone?: string;
|
|
249
|
+
guestName?: string;
|
|
250
|
+
}
|
|
251
|
+
interface CheckoutCustomer {
|
|
252
|
+
first_name: string;
|
|
253
|
+
last_name: string;
|
|
254
|
+
email: string;
|
|
255
|
+
phone: string;
|
|
256
|
+
}
|
|
257
|
+
interface ShippingLocation {
|
|
258
|
+
street: string;
|
|
259
|
+
city: string;
|
|
260
|
+
state: string;
|
|
261
|
+
lga: string;
|
|
262
|
+
country: string;
|
|
263
|
+
postal: string;
|
|
264
|
+
}
|
|
265
|
+
interface FindOrderParams {
|
|
266
|
+
email: string;
|
|
267
|
+
order_id: string;
|
|
268
|
+
}
|
|
269
|
+
interface CreateOrderParams {
|
|
270
|
+
customer_id?: string | null;
|
|
271
|
+
status?: string;
|
|
272
|
+
shipping_address?: DeliveryAddress;
|
|
273
|
+
checkout_session_id?: string;
|
|
274
|
+
items: Array<{
|
|
275
|
+
product_id: string;
|
|
276
|
+
product_name: string;
|
|
277
|
+
quantity: number;
|
|
278
|
+
unit_price: number;
|
|
279
|
+
variant_id?: string;
|
|
280
|
+
variant_details?: Record<string, unknown>;
|
|
281
|
+
custom_measurements?: Record<string, unknown>;
|
|
282
|
+
}>;
|
|
283
|
+
delivery_method?: string;
|
|
284
|
+
delivery_address?: string;
|
|
285
|
+
total?: number;
|
|
286
|
+
payment_method?: string;
|
|
287
|
+
shipping_rate_id?: string;
|
|
288
|
+
guest_token?: string;
|
|
289
|
+
guest_email?: string;
|
|
290
|
+
guest_phone?: string;
|
|
291
|
+
guest_name?: string;
|
|
292
|
+
product_type?: string;
|
|
293
|
+
bespoke_brief?: string;
|
|
294
|
+
bespoke_reference_images?: string[];
|
|
295
|
+
bespoke_measurements?: Record<string, string>;
|
|
296
|
+
bespoke_preferred_timeline?: string;
|
|
297
|
+
bespoke_special_instructions?: string;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Kasuvia SDK Configuration
|
|
302
|
+
*
|
|
303
|
+
* Stateless configuration - no module-scoped state.
|
|
304
|
+
* All configuration is passed as parameters to SDK functions.
|
|
305
|
+
*
|
|
306
|
+
* SECURITY NOTE: Backend URLs should never be exposed to the browser.
|
|
307
|
+
* They should only be used on the server side or in Next.js API routes.
|
|
308
|
+
*/
|
|
309
|
+
interface SdkConfig {
|
|
310
|
+
businessId: string;
|
|
311
|
+
storefrontApiKey: string;
|
|
312
|
+
backendUrls: {
|
|
313
|
+
auth: string;
|
|
314
|
+
store: string;
|
|
315
|
+
payment: string;
|
|
316
|
+
notifications: string;
|
|
317
|
+
cms: string;
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @file types/payments/index.ts
|
|
323
|
+
* @description All customer-facing payment types for the Kasuvia Payment System.
|
|
324
|
+
*
|
|
325
|
+
* Auth model:
|
|
326
|
+
* - X-Storefront-Key → identifies the business storefront
|
|
327
|
+
* - X-Business-ID → tenant context
|
|
328
|
+
* No business-owner JWT used here — these are CUSTOMER-facing types.
|
|
329
|
+
*
|
|
330
|
+
* Payment flow:
|
|
331
|
+
* Customer → Business Owner : Monnify (NGN) | Flutterwave (non-NGN)
|
|
332
|
+
* Business Owner → Kasuvia : Subscription (separate, JWT-auth)
|
|
333
|
+
* Kasuvia → Business Owner : Payout (separate, JWT-auth)
|
|
334
|
+
*/
|
|
335
|
+
interface Currency {
|
|
336
|
+
code: string;
|
|
337
|
+
name: string;
|
|
338
|
+
symbol: string;
|
|
339
|
+
decimals: number;
|
|
340
|
+
is_active: boolean;
|
|
341
|
+
}
|
|
342
|
+
interface SupportedCurrenciesResponse {
|
|
343
|
+
currencies: Currency[];
|
|
344
|
+
}
|
|
345
|
+
interface BackendLanguage {
|
|
346
|
+
code: string;
|
|
347
|
+
label: string;
|
|
348
|
+
flag: string;
|
|
349
|
+
}
|
|
350
|
+
interface SupportedLang {
|
|
351
|
+
code: string;
|
|
352
|
+
appCode: string;
|
|
353
|
+
label: string;
|
|
354
|
+
native: string;
|
|
355
|
+
flag: string;
|
|
356
|
+
}
|
|
357
|
+
interface SupportedLanguagesResponse {
|
|
358
|
+
languages: BackendLanguage[];
|
|
359
|
+
}
|
|
360
|
+
interface DVACreateRequest {
|
|
361
|
+
order_id?: string;
|
|
362
|
+
amount: number;
|
|
363
|
+
customer_email: string;
|
|
364
|
+
customer_name?: string;
|
|
365
|
+
/** Defaults to NGN — DVA is Monnify-only */
|
|
366
|
+
currency?: string;
|
|
367
|
+
/** Idempotency key to prevent duplicate DVA creation */
|
|
368
|
+
idempotency_key?: string;
|
|
369
|
+
}
|
|
370
|
+
interface PaymentInitiateRequest {
|
|
371
|
+
amount: number;
|
|
372
|
+
currency: string;
|
|
373
|
+
customer_email: string;
|
|
374
|
+
customer_name?: string;
|
|
375
|
+
order_id?: string;
|
|
376
|
+
quote_id?: string;
|
|
377
|
+
/** Window origin of the storefront — used as gateway redirect base URL */
|
|
378
|
+
storefront_origin?: string;
|
|
379
|
+
metadata?: Record<string, string | number | boolean>;
|
|
380
|
+
/** Idempotency key to prevent duplicate payment initiation */
|
|
381
|
+
idempotency_key?: string;
|
|
382
|
+
}
|
|
383
|
+
interface ConversionQuote {
|
|
384
|
+
id: string;
|
|
385
|
+
business_id: string;
|
|
386
|
+
from_currency: string;
|
|
387
|
+
to_currency: string;
|
|
388
|
+
rate: number;
|
|
389
|
+
original_amount: number;
|
|
390
|
+
converted_amount: number;
|
|
391
|
+
is_used: boolean;
|
|
392
|
+
expires_at: string;
|
|
393
|
+
created_at: string;
|
|
394
|
+
}
|
|
395
|
+
interface DVADetails {
|
|
396
|
+
account_number: string;
|
|
397
|
+
bank_name: string;
|
|
398
|
+
account_name: string;
|
|
399
|
+
reference: string;
|
|
400
|
+
amount: number;
|
|
401
|
+
transaction_id: string;
|
|
402
|
+
expires_at: string;
|
|
403
|
+
}
|
|
404
|
+
interface PaymentInitiateResponse {
|
|
405
|
+
id: string;
|
|
406
|
+
gateway_ref: string;
|
|
407
|
+
gateway: string;
|
|
408
|
+
status: string;
|
|
409
|
+
/** Normalised top-level checkout URL for gateway redirect */
|
|
410
|
+
checkout_url: string;
|
|
411
|
+
}
|
|
412
|
+
interface TransactionVerifyResponse {
|
|
413
|
+
id: string;
|
|
414
|
+
status: string;
|
|
415
|
+
amount: number;
|
|
416
|
+
currency: string;
|
|
417
|
+
gateway_ref: string;
|
|
418
|
+
gateway?: string;
|
|
419
|
+
order_id?: string;
|
|
420
|
+
escrow_status?: string;
|
|
421
|
+
escrow_release_date?: string;
|
|
422
|
+
metadata_json?: Record<string, unknown>;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* CMS Types
|
|
427
|
+
*
|
|
428
|
+
* Types for kasuvia-cms integration - dynamic content models and entries
|
|
429
|
+
*/
|
|
430
|
+
interface CmsField {
|
|
431
|
+
name: string;
|
|
432
|
+
label: string;
|
|
433
|
+
type: string;
|
|
434
|
+
required: boolean;
|
|
435
|
+
config: Record<string, any>;
|
|
436
|
+
sub_fields?: CmsField[];
|
|
437
|
+
}
|
|
438
|
+
interface CmsModelPermissions {
|
|
439
|
+
read: boolean;
|
|
440
|
+
create: boolean;
|
|
441
|
+
update: boolean;
|
|
442
|
+
delete: boolean;
|
|
443
|
+
}
|
|
444
|
+
interface CmsModelPublicApiPermissions {
|
|
445
|
+
public_api: CmsModelPermissions;
|
|
446
|
+
}
|
|
447
|
+
interface CmsModel {
|
|
448
|
+
id: string;
|
|
449
|
+
business_id: string;
|
|
450
|
+
model_slug: string;
|
|
451
|
+
display_name: string;
|
|
452
|
+
description: string | null;
|
|
453
|
+
fields: CmsField[];
|
|
454
|
+
permissions: CmsModelPublicApiPermissions;
|
|
455
|
+
}
|
|
456
|
+
interface CmsEntry {
|
|
457
|
+
id: string;
|
|
458
|
+
business_id: string;
|
|
459
|
+
model_slug: string;
|
|
460
|
+
data: Record<string, any>;
|
|
461
|
+
created_at: string;
|
|
462
|
+
updated_at: string;
|
|
463
|
+
created_by: string | null;
|
|
464
|
+
}
|
|
465
|
+
interface CmsEntryListResponse {
|
|
466
|
+
entries: CmsEntry[];
|
|
467
|
+
total: number;
|
|
468
|
+
page: number;
|
|
469
|
+
page_size: number;
|
|
470
|
+
}
|
|
471
|
+
interface CmsIcon {
|
|
472
|
+
id: string;
|
|
473
|
+
name: string;
|
|
474
|
+
category: string;
|
|
475
|
+
tags: string[];
|
|
476
|
+
}
|
|
477
|
+
interface CmsIconListResponse {
|
|
478
|
+
icons: CmsIcon[];
|
|
479
|
+
total: number;
|
|
480
|
+
}
|
|
481
|
+
interface ListCmsEntriesParams {
|
|
482
|
+
page?: number;
|
|
483
|
+
page_size?: number;
|
|
484
|
+
}
|
|
485
|
+
interface CreateCmsEntryParams {
|
|
486
|
+
data: Record<string, any>;
|
|
487
|
+
}
|
|
488
|
+
interface UpdateCmsEntryParams {
|
|
489
|
+
data: Record<string, any>;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
export { type WishlistListResponse as $, type Address as A, type BackendLanguage as B, type CheckoutCustomer as C, type DeliveryAddress as D, type ProductType as E, type FindOrderParams as F, type ProductVariant as G, type ServiceLocationType as H, type Inventory as I, ServiceLocationTypeEnum as J, type ServiceRecurringInterval as K, type ListCmsEntriesParams as L, ServiceRecurringIntervalEnum as M, type ServiceType as N, type Order as O, type PaginatedResponse as P, ServiceTypeEnum as Q, type ShippingRate as R, type SdkConfig as S, type ShippingRatesResponse as T, type SupportedCurrenciesResponse as U, type SupportedLang as V, type SupportedLanguagesResponse as W, type TransactionVerifyResponse as X, type UpdateCmsEntryParams as Y, type WishlistCheckResponse as Z, type WishlistItem as _, type ShippingLocation as a, type BespokeStageKey as b, type CartItem as c, type CartResponse as d, type CmsEntry as e, type CmsEntryListResponse as f, type CmsField as g, type CmsIcon as h, type CmsIconListResponse as i, type CmsModel as j, type CmsModelPermissions as k, type CmsModelPublicApiPermissions as l, type Collection as m, type ConversionQuote as n, type CreateCmsEntryParams as o, type CreateOrderParams as p, type Currency as q, type CustomField as r, type DVACreateRequest as s, type DVADetails as t, type ListParams as u, type OrderItem as v, type OrderStatus as w, type PaymentInitiateRequest as x, type PaymentInitiateResponse as y, type Product as z };
|