@omnikit-js/ui 0.9.45 → 0.9.47
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/chunk-LIZKLYHH.js +2205 -0
- package/dist/chunk-LIZKLYHH.js.map +1 -0
- package/dist/{chunk-3AQCVPQI.js → chunk-SRPYYSJZ.js} +694 -34
- package/dist/chunk-SRPYYSJZ.js.map +1 -0
- package/dist/components/client/index.d.ts +61 -7
- package/dist/components/client/index.js +23 -35
- package/dist/components/client/index.js.map +1 -1
- package/dist/components/server/index.d.ts +2 -2
- package/dist/components/server/index.js +2 -2
- package/dist/index-Bp2ZenHB.d.ts +376 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/{types-CnhWTSXv.d.ts → types-DAbudCAC.d.ts} +5 -3
- package/package.json +1 -1
- package/dist/chunk-3AQCVPQI.js.map +0 -1
- package/dist/chunk-FNZCGWVE.js +0 -531
- package/dist/chunk-FNZCGWVE.js.map +0 -1
- package/dist/index-DKuejSvz.d.ts +0 -83
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { B as BillingProps } from './types-DAbudCAC.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* OmniKit API shared types
|
|
6
|
+
*/
|
|
7
|
+
interface QueryOptions {
|
|
8
|
+
filter?: Record<string, any> | FilterExpression;
|
|
9
|
+
sort?: string;
|
|
10
|
+
limit?: number;
|
|
11
|
+
offset?: number;
|
|
12
|
+
}
|
|
13
|
+
interface FilterExpression {
|
|
14
|
+
operator?: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'in';
|
|
15
|
+
value: any;
|
|
16
|
+
}
|
|
17
|
+
interface QueryResponse<T = any> {
|
|
18
|
+
success: boolean;
|
|
19
|
+
data: T[];
|
|
20
|
+
total?: number;
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
interface SingleRecordResponse<T = any> {
|
|
24
|
+
success: boolean;
|
|
25
|
+
data: T;
|
|
26
|
+
error?: string;
|
|
27
|
+
}
|
|
28
|
+
interface MutationResponse {
|
|
29
|
+
success: boolean;
|
|
30
|
+
data?: any;
|
|
31
|
+
error?: string;
|
|
32
|
+
}
|
|
33
|
+
interface OmniKitConfig {
|
|
34
|
+
baseUrl: string;
|
|
35
|
+
apiKey?: string;
|
|
36
|
+
jwt?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface ColumnDefinition<T = any> {
|
|
40
|
+
key: string;
|
|
41
|
+
label?: string;
|
|
42
|
+
render?: (value: any, row: T) => React.ReactNode;
|
|
43
|
+
sortable?: boolean;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
type Column<T = any> = string | ColumnDefinition<T>;
|
|
47
|
+
interface DataListProps<T = any> {
|
|
48
|
+
/** Table name to query */
|
|
49
|
+
table: string;
|
|
50
|
+
/** OmniKit API base URL (e.g., http://localhost:3000/omnikit) */
|
|
51
|
+
baseUrl: string;
|
|
52
|
+
/** API Key for authentication */
|
|
53
|
+
apiKey?: string;
|
|
54
|
+
/** JWT token for authentication (alternative to apiKey) */
|
|
55
|
+
jwt?: string;
|
|
56
|
+
/** Columns to display */
|
|
57
|
+
columns: Column<T>[];
|
|
58
|
+
/** Key field for row identification (defaults to 'id') */
|
|
59
|
+
keyField?: keyof T;
|
|
60
|
+
/** Query options (filter, sort, limit, offset) */
|
|
61
|
+
filter?: QueryOptions['filter'];
|
|
62
|
+
sort?: string;
|
|
63
|
+
limit?: number;
|
|
64
|
+
offset?: number;
|
|
65
|
+
/** Custom class names */
|
|
66
|
+
className?: string;
|
|
67
|
+
headerClassName?: string;
|
|
68
|
+
rowClassName?: string | ((row: T) => string);
|
|
69
|
+
cellClassName?: string | ((column: Column<T>, row: T) => string);
|
|
70
|
+
/** Messages */
|
|
71
|
+
emptyMessage?: string;
|
|
72
|
+
errorMessage?: string;
|
|
73
|
+
/** Loading state (for client-side refetching) */
|
|
74
|
+
loading?: boolean;
|
|
75
|
+
/** Custom row click handler (converts to client component behavior) */
|
|
76
|
+
onRowClick?: (row: T) => void;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
declare function DataList<T extends Record<string, any>>({ table, baseUrl, apiKey, jwt, columns, keyField, filter, sort, limit, offset, className, emptyMessage, errorMessage, }: DataListProps<T>): Promise<react_jsx_runtime.JSX.Element>;
|
|
80
|
+
|
|
81
|
+
declare function Billing(props: BillingProps): Promise<react_jsx_runtime.JSX.Element>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Shared types for commerce components
|
|
85
|
+
*/
|
|
86
|
+
interface Product {
|
|
87
|
+
id: string;
|
|
88
|
+
name: string;
|
|
89
|
+
slug: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
price: number;
|
|
92
|
+
compareAtPrice?: number;
|
|
93
|
+
images: string[];
|
|
94
|
+
sku?: string;
|
|
95
|
+
category?: string;
|
|
96
|
+
inStock: boolean;
|
|
97
|
+
stockQuantity?: number;
|
|
98
|
+
}
|
|
99
|
+
interface ProductVariant {
|
|
100
|
+
id: string;
|
|
101
|
+
productId: string;
|
|
102
|
+
name: string;
|
|
103
|
+
price: number;
|
|
104
|
+
sku?: string;
|
|
105
|
+
attributes: Record<string, string>;
|
|
106
|
+
inStock: boolean;
|
|
107
|
+
stockQuantity?: number;
|
|
108
|
+
}
|
|
109
|
+
interface CartItem {
|
|
110
|
+
id: string;
|
|
111
|
+
product: Product;
|
|
112
|
+
variant?: ProductVariant;
|
|
113
|
+
quantity: number;
|
|
114
|
+
price: number;
|
|
115
|
+
}
|
|
116
|
+
interface Cart$1 {
|
|
117
|
+
id: string;
|
|
118
|
+
userId?: string;
|
|
119
|
+
items: CartItem[];
|
|
120
|
+
itemCount: number;
|
|
121
|
+
subtotal: number;
|
|
122
|
+
tax: number;
|
|
123
|
+
shipping: number;
|
|
124
|
+
discount: number;
|
|
125
|
+
total: number;
|
|
126
|
+
currency: string;
|
|
127
|
+
couponCode?: string;
|
|
128
|
+
createdAt: string;
|
|
129
|
+
updatedAt: string;
|
|
130
|
+
}
|
|
131
|
+
interface Address {
|
|
132
|
+
id?: string;
|
|
133
|
+
firstName: string;
|
|
134
|
+
lastName: string;
|
|
135
|
+
company?: string;
|
|
136
|
+
address1: string;
|
|
137
|
+
address2?: string;
|
|
138
|
+
city: string;
|
|
139
|
+
state: string;
|
|
140
|
+
postalCode: string;
|
|
141
|
+
country: string;
|
|
142
|
+
phone?: string;
|
|
143
|
+
isDefault?: boolean;
|
|
144
|
+
}
|
|
145
|
+
interface ShippingMethod {
|
|
146
|
+
id: string;
|
|
147
|
+
name: string;
|
|
148
|
+
description?: string;
|
|
149
|
+
price: number;
|
|
150
|
+
estimatedDays: string;
|
|
151
|
+
carrier?: string;
|
|
152
|
+
}
|
|
153
|
+
interface PaymentMethod {
|
|
154
|
+
id: string;
|
|
155
|
+
type: 'card' | 'paypal' | 'bank_transfer' | 'apple_pay' | 'google_pay';
|
|
156
|
+
last4?: string;
|
|
157
|
+
brand?: string;
|
|
158
|
+
expiryMonth?: number;
|
|
159
|
+
expiryYear?: number;
|
|
160
|
+
isDefault?: boolean;
|
|
161
|
+
}
|
|
162
|
+
interface Order {
|
|
163
|
+
id: string;
|
|
164
|
+
orderNumber: string;
|
|
165
|
+
userId?: string;
|
|
166
|
+
email: string;
|
|
167
|
+
status: 'pending' | 'processing' | 'shipped' | 'delivered' | 'cancelled' | 'refunded';
|
|
168
|
+
items: CartItem[];
|
|
169
|
+
subtotal: number;
|
|
170
|
+
tax: number;
|
|
171
|
+
shipping: number;
|
|
172
|
+
discount: number;
|
|
173
|
+
total: number;
|
|
174
|
+
currency: string;
|
|
175
|
+
shippingAddress: Address;
|
|
176
|
+
billingAddress: Address;
|
|
177
|
+
shippingMethod: ShippingMethod;
|
|
178
|
+
paymentMethod: Partial<PaymentMethod>;
|
|
179
|
+
trackingNumber?: string;
|
|
180
|
+
trackingUrl?: string;
|
|
181
|
+
notes?: string;
|
|
182
|
+
createdAt: string;
|
|
183
|
+
updatedAt: string;
|
|
184
|
+
}
|
|
185
|
+
interface CheckoutStep {
|
|
186
|
+
id: string;
|
|
187
|
+
title: string;
|
|
188
|
+
description?: string;
|
|
189
|
+
completed: boolean;
|
|
190
|
+
active: boolean;
|
|
191
|
+
}
|
|
192
|
+
interface BaseCommerceProps {
|
|
193
|
+
/** OmniKit API base URL */
|
|
194
|
+
baseUrl: string;
|
|
195
|
+
/** API Key for authentication */
|
|
196
|
+
apiKey?: string;
|
|
197
|
+
/** JWT token for authentication (alternative to apiKey) */
|
|
198
|
+
accessToken?: string;
|
|
199
|
+
/** Project ID */
|
|
200
|
+
projectId?: number;
|
|
201
|
+
/** Custom class name */
|
|
202
|
+
className?: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
interface CartProps extends BaseCommerceProps {
|
|
206
|
+
/** User ID to fetch cart for */
|
|
207
|
+
userId?: string;
|
|
208
|
+
/** Cart ID to fetch (alternative to userId) */
|
|
209
|
+
cartId?: string;
|
|
210
|
+
/** Show item images */
|
|
211
|
+
showImages?: boolean;
|
|
212
|
+
/** Show quantity controls (requires client interactivity) */
|
|
213
|
+
showQuantityControls?: boolean;
|
|
214
|
+
/** Show remove button (requires client interactivity) */
|
|
215
|
+
showRemoveButton?: boolean;
|
|
216
|
+
/** Show continue shopping link */
|
|
217
|
+
continueShoppingUrl?: string;
|
|
218
|
+
/** Checkout URL */
|
|
219
|
+
checkoutUrl?: string;
|
|
220
|
+
/** Currency symbol */
|
|
221
|
+
currencySymbol?: string;
|
|
222
|
+
/** Empty cart message */
|
|
223
|
+
emptyMessage?: string;
|
|
224
|
+
/** Empty cart action text */
|
|
225
|
+
emptyActionText?: string;
|
|
226
|
+
/** Empty cart action URL */
|
|
227
|
+
emptyActionUrl?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
declare function Cart({ baseUrl: _baseUrl, apiKey: _apiKey, accessToken: _accessToken, projectId: _projectId, userId: _userId, cartId: _cartId, showImages, showQuantityControls, showRemoveButton, continueShoppingUrl, checkoutUrl, currencySymbol, emptyMessage, emptyActionText, emptyActionUrl, className, }: CartProps): Promise<react_jsx_runtime.JSX.Element>;
|
|
231
|
+
|
|
232
|
+
interface CartSummaryProps extends BaseCommerceProps {
|
|
233
|
+
/** User ID to fetch cart for */
|
|
234
|
+
userId?: string;
|
|
235
|
+
/** Cart ID to fetch (alternative to userId) */
|
|
236
|
+
cartId?: string;
|
|
237
|
+
/** Display variant */
|
|
238
|
+
variant?: 'compact' | 'detailed' | 'mini';
|
|
239
|
+
/** Show item count badge */
|
|
240
|
+
showBadge?: boolean;
|
|
241
|
+
/** Show total price */
|
|
242
|
+
showTotal?: boolean;
|
|
243
|
+
/** Cart URL */
|
|
244
|
+
cartUrl?: string;
|
|
245
|
+
/** Checkout URL */
|
|
246
|
+
checkoutUrl?: string;
|
|
247
|
+
/** Currency symbol */
|
|
248
|
+
currencySymbol?: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
declare function CartSummary({ baseUrl: _baseUrl, apiKey: _apiKey, accessToken: _accessToken, projectId: _projectId, userId: _userId, cartId: _cartId, variant, showBadge, showTotal, cartUrl, checkoutUrl, currencySymbol, className, }: CartSummaryProps): Promise<react_jsx_runtime.JSX.Element>;
|
|
252
|
+
|
|
253
|
+
interface CheckoutProps extends BaseCommerceProps {
|
|
254
|
+
/** User ID */
|
|
255
|
+
userId?: string;
|
|
256
|
+
/** Cart ID */
|
|
257
|
+
cartId?: string;
|
|
258
|
+
/** Current step (1-4) */
|
|
259
|
+
step?: number;
|
|
260
|
+
/** Show order summary sidebar */
|
|
261
|
+
showOrderSummary?: boolean;
|
|
262
|
+
/** Show step indicator */
|
|
263
|
+
showStepIndicator?: boolean;
|
|
264
|
+
/** Success redirect URL */
|
|
265
|
+
successUrl?: string;
|
|
266
|
+
/** Cancel/back to cart URL */
|
|
267
|
+
cancelUrl?: string;
|
|
268
|
+
/** Currency symbol */
|
|
269
|
+
currencySymbol?: string;
|
|
270
|
+
/** Available shipping methods (will be fetched if not provided) */
|
|
271
|
+
shippingMethods?: ShippingMethod[];
|
|
272
|
+
/** Saved addresses (will be fetched if not provided) */
|
|
273
|
+
savedAddresses?: Address[];
|
|
274
|
+
/** Enable guest checkout */
|
|
275
|
+
allowGuestCheckout?: boolean;
|
|
276
|
+
/** Require phone number */
|
|
277
|
+
requirePhone?: boolean;
|
|
278
|
+
/** Countries to show in address form */
|
|
279
|
+
countries?: {
|
|
280
|
+
code: string;
|
|
281
|
+
name: string;
|
|
282
|
+
}[];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
declare function Checkout({ baseUrl: _baseUrl, apiKey: _apiKey, accessToken: _accessToken, projectId: _projectId, userId: _userId, cartId: _cartId, step, showOrderSummary, showStepIndicator, successUrl: _successUrl, cancelUrl, currencySymbol, shippingMethods, savedAddresses, allowGuestCheckout: _allowGuestCheckout, requirePhone, countries, className, }: CheckoutProps): Promise<react_jsx_runtime.JSX.Element>;
|
|
286
|
+
|
|
287
|
+
interface OrderConfirmationProps extends BaseCommerceProps {
|
|
288
|
+
/** Order ID to display */
|
|
289
|
+
orderId: string;
|
|
290
|
+
/** Show order items */
|
|
291
|
+
showItems?: boolean;
|
|
292
|
+
/** Show shipping address */
|
|
293
|
+
showShippingAddress?: boolean;
|
|
294
|
+
/** Show billing address */
|
|
295
|
+
showBillingAddress?: boolean;
|
|
296
|
+
/** Show payment method */
|
|
297
|
+
showPaymentMethod?: boolean;
|
|
298
|
+
/** Show order timeline/status */
|
|
299
|
+
showTimeline?: boolean;
|
|
300
|
+
/** Continue shopping URL */
|
|
301
|
+
continueShoppingUrl?: string;
|
|
302
|
+
/** Track order URL */
|
|
303
|
+
trackOrderUrl?: string;
|
|
304
|
+
/** Currency symbol */
|
|
305
|
+
currencySymbol?: string;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
declare function OrderConfirmation({ baseUrl: _baseUrl, apiKey: _apiKey, accessToken: _accessToken, projectId: _projectId, orderId, showItems, showShippingAddress, showBillingAddress, showPaymentMethod, showTimeline, continueShoppingUrl, trackOrderUrl, currencySymbol, className, }: OrderConfirmationProps): Promise<react_jsx_runtime.JSX.Element>;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Digital product for payment
|
|
312
|
+
*/
|
|
313
|
+
interface DigitalProduct {
|
|
314
|
+
id: string;
|
|
315
|
+
name: string;
|
|
316
|
+
description?: string;
|
|
317
|
+
price: number;
|
|
318
|
+
image?: string;
|
|
319
|
+
type?: 'subscription' | 'one-time' | 'license';
|
|
320
|
+
/** For subscriptions */
|
|
321
|
+
interval?: 'month' | 'year';
|
|
322
|
+
/** Features or details to display */
|
|
323
|
+
features?: string[];
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Payment component props
|
|
327
|
+
*
|
|
328
|
+
* A simplified single-page checkout for digital products.
|
|
329
|
+
* Similar to Stripe Checkout - no shipping, just email and payment.
|
|
330
|
+
*/
|
|
331
|
+
interface PaymentProps extends BaseCommerceProps {
|
|
332
|
+
/** User ID - used to look up billing customer */
|
|
333
|
+
userId?: string;
|
|
334
|
+
/** Product ID to load from database */
|
|
335
|
+
productId?: string;
|
|
336
|
+
/** Multiple product IDs for bundle purchases */
|
|
337
|
+
productIds?: string[];
|
|
338
|
+
/** Override product data (skips API fetch if provided) */
|
|
339
|
+
product?: DigitalProduct;
|
|
340
|
+
/** Quantity per product (defaults to 1) */
|
|
341
|
+
quantity?: number;
|
|
342
|
+
/** Pre-filled email address */
|
|
343
|
+
email?: string;
|
|
344
|
+
/** URL to redirect after successful payment */
|
|
345
|
+
successUrl?: string;
|
|
346
|
+
/** URL to redirect if user cancels */
|
|
347
|
+
cancelUrl?: string;
|
|
348
|
+
/** Currency symbol (defaults to $) */
|
|
349
|
+
currencySymbol?: string;
|
|
350
|
+
/** Show product image */
|
|
351
|
+
showImage?: boolean;
|
|
352
|
+
/** Show product features list */
|
|
353
|
+
showFeatures?: boolean;
|
|
354
|
+
/** Custom submit button text */
|
|
355
|
+
submitText?: string;
|
|
356
|
+
/** Show secure payment badges */
|
|
357
|
+
showSecurityBadges?: boolean;
|
|
358
|
+
/** Allow promo/discount codes */
|
|
359
|
+
allowPromoCode?: boolean;
|
|
360
|
+
/** Company/seller name for branding */
|
|
361
|
+
sellerName?: string;
|
|
362
|
+
/** Company logo URL */
|
|
363
|
+
sellerLogo?: string;
|
|
364
|
+
/** Terms of service URL */
|
|
365
|
+
termsUrl?: string;
|
|
366
|
+
/** Privacy policy URL */
|
|
367
|
+
privacyUrl?: string;
|
|
368
|
+
/** Additional CSS classes */
|
|
369
|
+
className?: string;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
declare function Payment({ baseUrl, apiKey, accessToken, projectId, userId, productId, productIds: productIdsProp, product: productProp, quantity, email: _email, successUrl, cancelUrl, currencySymbol, showImage, showFeatures, submitText: _submitText, showSecurityBadges, allowPromoCode, sellerName, sellerLogo, termsUrl, privacyUrl, className, layout, }: PaymentProps & {
|
|
373
|
+
layout?: 'single-column' | 'two-column';
|
|
374
|
+
}): Promise<react_jsx_runtime.JSX.Element>;
|
|
375
|
+
|
|
376
|
+
export { type Address as A, Billing as B, type Column as C, DataList as D, type FilterExpression as F, type MutationResponse as M, type OmniKitConfig as O, type Product as P, type QueryOptions as Q, type SingleRecordResponse as S, type QueryResponse as a, type DataListProps as b, type ColumnDefinition as c, Cart as d, type CartProps as e, CartSummary as f, type CartSummaryProps as g, Checkout as h, type CheckoutProps as i, OrderConfirmation as j, type OrderConfirmationProps as k, type ProductVariant as l, type CartItem as m, type Cart$1 as n, type ShippingMethod as o, type PaymentMethod as p, type Order as q, type CheckoutStep as r, type BaseCommerceProps as s, Payment as t, type PaymentProps as u, type DigitalProduct as v };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as OmniKitConfig, Q as QueryOptions, a as QueryResponse, S as SingleRecordResponse, M as MutationResponse } from './index-
|
|
2
|
-
export { B as Billing, C as Column, c as ColumnDefinition, D as DataList, b as DataListProps, F as FilterExpression } from './index-
|
|
3
|
-
export { a as BillingData, B as BillingProps, C as Customer, E as Entitlement, I as Invoice, c as PaymentMethod, b as Price, P as Product, d as ProductFeature, S as Subscription } from './types-
|
|
1
|
+
import { O as OmniKitConfig, Q as QueryOptions, a as QueryResponse, S as SingleRecordResponse, M as MutationResponse } from './index-Bp2ZenHB.js';
|
|
2
|
+
export { A as Address, s as BaseCommerceProps, B as Billing, d as Cart, n as CartData, m as CartItem, e as CartProps, f as CartSummary, g as CartSummaryProps, h as Checkout, i as CheckoutProps, r as CheckoutStep, C as Column, c as ColumnDefinition, p as CommercePaymentMethod, P as CommerceProduct, D as DataList, b as DataListProps, v as DigitalProduct, F as FilterExpression, q as Order, j as OrderConfirmation, k as OrderConfirmationProps, t as Payment, u as PaymentProps, l as ProductVariant, o as ShippingMethod } from './index-Bp2ZenHB.js';
|
|
3
|
+
export { a as BillingData, B as BillingProps, C as Customer, E as Entitlement, I as Invoice, c as PaymentMethod, b as Price, P as Product, d as ProductFeature, S as Subscription } from './types-DAbudCAC.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Billing, DataList, OmniKitClient, createOmniKitClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { Billing, Cart, CartSummary, Checkout, DataList, OmniKitClient, OrderConfirmation, Payment, createOmniKitClient } from './chunk-LIZKLYHH.js';
|
|
2
|
+
import './chunk-SRPYYSJZ.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -170,13 +170,15 @@ interface FeatureUsage {
|
|
|
170
170
|
feature_name: string;
|
|
171
171
|
feature_type: string;
|
|
172
172
|
unit?: string;
|
|
173
|
-
limit
|
|
174
|
-
current_usage
|
|
173
|
+
limit?: number;
|
|
174
|
+
current_usage?: number;
|
|
175
175
|
remaining: number;
|
|
176
176
|
can_use_more: boolean;
|
|
177
|
-
percentage_used
|
|
177
|
+
percentage_used?: number;
|
|
178
178
|
count_mode?: string;
|
|
179
179
|
auto_counted?: boolean;
|
|
180
|
+
/** Display mode: 'usage_based' shows used/limit, 'balance_based' shows remaining balance */
|
|
181
|
+
display_mode?: 'usage_based' | 'balance_based';
|
|
180
182
|
}
|
|
181
183
|
interface BillingData {
|
|
182
184
|
customer: Customer;
|