@growflowstudio/growflowbilling-admin-core 2.0.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/index.mjs ADDED
@@ -0,0 +1,625 @@
1
+ // src/api/client.ts
2
+ function buildQuery(params) {
3
+ const searchParams = new URLSearchParams();
4
+ for (const [key, value] of Object.entries(params)) {
5
+ if (value !== void 0) {
6
+ searchParams.set(key, String(value));
7
+ }
8
+ }
9
+ const query = searchParams.toString();
10
+ return query ? `?${query}` : "";
11
+ }
12
+ var BillingAdminApiClient = class {
13
+ constructor(config) {
14
+ this.basePath = config.basePath;
15
+ this.fetcher = config.fetcher;
16
+ }
17
+ url(path) {
18
+ return `${this.basePath}${path}`;
19
+ }
20
+ // --- Plans ---
21
+ async getPlans(params) {
22
+ const query = buildQuery({ is_active: params?.is_active });
23
+ return this.fetcher(this.url(`/plans${query}`));
24
+ }
25
+ async getPlan(planId) {
26
+ return this.fetcher(this.url(`/plans/${planId}`));
27
+ }
28
+ async createPlan(data) {
29
+ return this.fetcher(this.url("/plans"), {
30
+ method: "POST",
31
+ body: JSON.stringify(data)
32
+ });
33
+ }
34
+ async updatePlan(planId, data) {
35
+ return this.fetcher(this.url(`/plans/${planId}`), {
36
+ method: "PATCH",
37
+ body: JSON.stringify(data)
38
+ });
39
+ }
40
+ async deletePlan(planId) {
41
+ return this.fetcher(this.url(`/plans/${planId}`), { method: "DELETE" });
42
+ }
43
+ async syncPlanToStripe(planId) {
44
+ return this.fetcher(this.url(`/plans/${planId}/sync-stripe`), { method: "POST" });
45
+ }
46
+ // --- Subscriptions ---
47
+ async getSubscriptions(params) {
48
+ const query = buildQuery({
49
+ status: params?.status,
50
+ search: params?.search,
51
+ limit: params?.limit,
52
+ offset: params?.offset
53
+ });
54
+ return this.fetcher(this.url(`/subscriptions${query}`));
55
+ }
56
+ async getSubscription(subscriptionId) {
57
+ return this.fetcher(this.url(`/subscriptions/${subscriptionId}`));
58
+ }
59
+ async cancelSubscription(subscriptionId, atPeriodEnd = true) {
60
+ return this.fetcher(this.url(`/subscriptions/${subscriptionId}/cancel`), {
61
+ method: "POST",
62
+ body: JSON.stringify({ at_period_end: atPeriodEnd })
63
+ });
64
+ }
65
+ async createSubscription(data) {
66
+ return this.fetcher(this.url("/subscriptions"), {
67
+ method: "POST",
68
+ body: JSON.stringify(data)
69
+ });
70
+ }
71
+ async changeSubscriptionPlan(subscriptionId, newPlanSlug) {
72
+ return this.fetcher(this.url(`/subscriptions/${subscriptionId}/change-plan`), {
73
+ method: "POST",
74
+ body: JSON.stringify({ new_plan_slug: newPlanSlug })
75
+ });
76
+ }
77
+ // --- Payments ---
78
+ async getPayments(params) {
79
+ const query = buildQuery({
80
+ status: params?.status,
81
+ search: params?.search,
82
+ limit: params?.limit,
83
+ starting_after: params?.starting_after
84
+ });
85
+ return this.fetcher(this.url(`/payments${query}`));
86
+ }
87
+ async getPayment(paymentId) {
88
+ return this.fetcher(this.url(`/payments/${paymentId}`));
89
+ }
90
+ async refundPayment(paymentId, params) {
91
+ return this.fetcher(this.url(`/payments/${paymentId}/refund`), {
92
+ method: "POST",
93
+ body: JSON.stringify(params || {})
94
+ });
95
+ }
96
+ // --- Invoices ---
97
+ async getInvoices(params) {
98
+ const query = buildQuery({
99
+ status: params?.status,
100
+ search: params?.search,
101
+ store_id: params?.store_id,
102
+ limit: params?.limit,
103
+ starting_after: params?.starting_after
104
+ });
105
+ return this.fetcher(this.url(`/invoices${query}`));
106
+ }
107
+ async getInvoice(invoiceId) {
108
+ return this.fetcher(this.url(`/invoices/${invoiceId}`));
109
+ }
110
+ async sendInvoice(invoiceId) {
111
+ return this.fetcher(this.url(`/invoices/${invoiceId}/send`), { method: "POST" });
112
+ }
113
+ async voidInvoice(invoiceId) {
114
+ return this.fetcher(this.url(`/invoices/${invoiceId}/void`), { method: "POST" });
115
+ }
116
+ // --- Products ---
117
+ async getProducts(params) {
118
+ const query = buildQuery({ is_active: params?.is_active });
119
+ return this.fetcher(this.url(`/products${query}`));
120
+ }
121
+ async getProduct(productId) {
122
+ return this.fetcher(this.url(`/products/${productId}`));
123
+ }
124
+ async createProduct(data) {
125
+ return this.fetcher(this.url("/products"), {
126
+ method: "POST",
127
+ body: JSON.stringify(data)
128
+ });
129
+ }
130
+ async updateProduct(productId, data) {
131
+ return this.fetcher(this.url(`/products/${productId}`), {
132
+ method: "PATCH",
133
+ body: JSON.stringify(data)
134
+ });
135
+ }
136
+ async deleteProduct(productId) {
137
+ return this.fetcher(this.url(`/products/${productId}`), { method: "DELETE" });
138
+ }
139
+ async syncProductToStripe(productId) {
140
+ return this.fetcher(this.url(`/products/${productId}/sync-stripe`), { method: "POST" });
141
+ }
142
+ // --- Features ---
143
+ async getFeatures(params) {
144
+ const query = buildQuery({
145
+ available_only: params?.available_only,
146
+ category: params?.category
147
+ });
148
+ return this.fetcher(this.url(`/features${query}`));
149
+ }
150
+ async getAvailableFeatures(category) {
151
+ const query = buildQuery({ category });
152
+ return this.fetcher(this.url(`/features/available${query}`));
153
+ }
154
+ async getFeature(featureId) {
155
+ return this.fetcher(this.url(`/features/${featureId}`));
156
+ }
157
+ async createFeature(data) {
158
+ return this.fetcher(this.url("/features"), {
159
+ method: "POST",
160
+ body: JSON.stringify(data)
161
+ });
162
+ }
163
+ async updateFeature(featureId, data) {
164
+ return this.fetcher(this.url(`/features/${featureId}`), {
165
+ method: "PATCH",
166
+ body: JSON.stringify(data)
167
+ });
168
+ }
169
+ async deleteFeature(featureId) {
170
+ return this.fetcher(this.url(`/features/${featureId}`), { method: "DELETE" });
171
+ }
172
+ // --- Client Info ---
173
+ async getClientInfo() {
174
+ return this.fetcher(this.url("/client-info"));
175
+ }
176
+ };
177
+ function createBillingAdminClient(config) {
178
+ return new BillingAdminApiClient(config);
179
+ }
180
+
181
+ // src/hooks/context.ts
182
+ import { createContext, useContext } from "react";
183
+ var BillingAdminClientContext = createContext(null);
184
+ function useBillingAdminClient() {
185
+ const client = useContext(BillingAdminClientContext);
186
+ if (!client) {
187
+ throw new Error(
188
+ "useBillingAdminClient must be used within a BillingAdminProvider. Wrap your component tree with <BillingAdminProvider config={{...}}>."
189
+ );
190
+ }
191
+ return client;
192
+ }
193
+
194
+ // src/hooks/useDialogState.ts
195
+ import { useState, useCallback } from "react";
196
+ function useDialogState() {
197
+ const [isOpen, setIsOpen] = useState(false);
198
+ const [data, setData] = useState(void 0);
199
+ const open = useCallback((initialData) => {
200
+ setData(initialData);
201
+ setIsOpen(true);
202
+ }, []);
203
+ const close = useCallback(() => {
204
+ setIsOpen(false);
205
+ setTimeout(() => setData(void 0), 150);
206
+ }, []);
207
+ const toggle = useCallback(() => {
208
+ if (isOpen) {
209
+ close();
210
+ } else {
211
+ open();
212
+ }
213
+ }, [isOpen, open, close]);
214
+ return {
215
+ isOpen,
216
+ data,
217
+ open,
218
+ close,
219
+ toggle,
220
+ setData
221
+ };
222
+ }
223
+
224
+ // src/hooks/usePlans.ts
225
+ import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
226
+ var PLANS_KEY = "billing-admin-plans";
227
+ function useAdminPlans(params) {
228
+ const client = useBillingAdminClient();
229
+ return useQuery({
230
+ queryKey: [PLANS_KEY, params],
231
+ queryFn: () => client.getPlans(params)
232
+ });
233
+ }
234
+ function useCreatePlan() {
235
+ const client = useBillingAdminClient();
236
+ const queryClient = useQueryClient();
237
+ return useMutation({
238
+ mutationFn: (data) => client.createPlan(data),
239
+ onSuccess: () => {
240
+ queryClient.invalidateQueries({ queryKey: [PLANS_KEY] });
241
+ }
242
+ });
243
+ }
244
+ function useUpdatePlan() {
245
+ const client = useBillingAdminClient();
246
+ const queryClient = useQueryClient();
247
+ return useMutation({
248
+ mutationFn: ({ id, data }) => client.updatePlan(id, data),
249
+ onSuccess: () => {
250
+ queryClient.invalidateQueries({ queryKey: [PLANS_KEY] });
251
+ }
252
+ });
253
+ }
254
+ function useDeletePlan() {
255
+ const client = useBillingAdminClient();
256
+ const queryClient = useQueryClient();
257
+ return useMutation({
258
+ mutationFn: (id) => client.deletePlan(id),
259
+ onSuccess: () => {
260
+ queryClient.invalidateQueries({ queryKey: [PLANS_KEY] });
261
+ }
262
+ });
263
+ }
264
+ function useSyncPlanToStripe() {
265
+ const client = useBillingAdminClient();
266
+ const queryClient = useQueryClient();
267
+ return useMutation({
268
+ mutationFn: (id) => client.syncPlanToStripe(id),
269
+ onSuccess: () => {
270
+ queryClient.invalidateQueries({ queryKey: [PLANS_KEY] });
271
+ }
272
+ });
273
+ }
274
+
275
+ // src/hooks/useSubscriptions.ts
276
+ import { useQuery as useQuery2, useMutation as useMutation2, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
277
+ var SUBSCRIPTIONS_KEY = "billing-admin-subscriptions";
278
+ function useAdminSubscriptions(params) {
279
+ const client = useBillingAdminClient();
280
+ return useQuery2({
281
+ queryKey: [SUBSCRIPTIONS_KEY, params],
282
+ queryFn: () => client.getSubscriptions(params)
283
+ });
284
+ }
285
+ function useCreateSubscription() {
286
+ const client = useBillingAdminClient();
287
+ const queryClient = useQueryClient2();
288
+ return useMutation2({
289
+ mutationFn: (data) => client.createSubscription(data),
290
+ onSuccess: () => {
291
+ queryClient.invalidateQueries({ queryKey: [SUBSCRIPTIONS_KEY] });
292
+ }
293
+ });
294
+ }
295
+ function useCancelSubscription() {
296
+ const client = useBillingAdminClient();
297
+ const queryClient = useQueryClient2();
298
+ return useMutation2({
299
+ mutationFn: ({ id, atPeriodEnd }) => client.cancelSubscription(id, atPeriodEnd),
300
+ onSuccess: () => {
301
+ queryClient.invalidateQueries({ queryKey: [SUBSCRIPTIONS_KEY] });
302
+ }
303
+ });
304
+ }
305
+ function useChangeSubscriptionPlan() {
306
+ const client = useBillingAdminClient();
307
+ const queryClient = useQueryClient2();
308
+ return useMutation2({
309
+ mutationFn: ({ id, newPlanSlug }) => client.changeSubscriptionPlan(id, newPlanSlug),
310
+ onSuccess: () => {
311
+ queryClient.invalidateQueries({ queryKey: [SUBSCRIPTIONS_KEY] });
312
+ }
313
+ });
314
+ }
315
+
316
+ // src/hooks/usePayments.ts
317
+ import { useQuery as useQuery3, useMutation as useMutation3, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
318
+ var PAYMENTS_KEY = "billing-admin-payments";
319
+ function useAdminPayments(params) {
320
+ const client = useBillingAdminClient();
321
+ return useQuery3({
322
+ queryKey: [PAYMENTS_KEY, params],
323
+ queryFn: () => client.getPayments(params)
324
+ });
325
+ }
326
+ function useRefundPayment() {
327
+ const client = useBillingAdminClient();
328
+ const queryClient = useQueryClient3();
329
+ return useMutation3({
330
+ mutationFn: ({ id, amount, reason }) => client.refundPayment(id, { amount, reason }),
331
+ onSuccess: () => {
332
+ queryClient.invalidateQueries({ queryKey: [PAYMENTS_KEY] });
333
+ }
334
+ });
335
+ }
336
+
337
+ // src/hooks/useInvoices.ts
338
+ import { useQuery as useQuery4, useMutation as useMutation4, useQueryClient as useQueryClient4 } from "@tanstack/react-query";
339
+ var INVOICES_KEY = "billing-admin-invoices";
340
+ function useAdminInvoices(params) {
341
+ const client = useBillingAdminClient();
342
+ return useQuery4({
343
+ queryKey: [INVOICES_KEY, params],
344
+ queryFn: () => client.getInvoices(params)
345
+ });
346
+ }
347
+ function useSendInvoice() {
348
+ const client = useBillingAdminClient();
349
+ const queryClient = useQueryClient4();
350
+ return useMutation4({
351
+ mutationFn: (id) => client.sendInvoice(id),
352
+ onSuccess: () => {
353
+ queryClient.invalidateQueries({ queryKey: [INVOICES_KEY] });
354
+ }
355
+ });
356
+ }
357
+ function useVoidInvoice() {
358
+ const client = useBillingAdminClient();
359
+ const queryClient = useQueryClient4();
360
+ return useMutation4({
361
+ mutationFn: (id) => client.voidInvoice(id),
362
+ onSuccess: () => {
363
+ queryClient.invalidateQueries({ queryKey: [INVOICES_KEY] });
364
+ }
365
+ });
366
+ }
367
+
368
+ // src/hooks/useProducts.ts
369
+ import { useQuery as useQuery5, useMutation as useMutation5, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
370
+ var PRODUCTS_KEY = "billing-admin-products";
371
+ function useAdminProducts(params) {
372
+ const client = useBillingAdminClient();
373
+ return useQuery5({
374
+ queryKey: [PRODUCTS_KEY, params],
375
+ queryFn: () => client.getProducts(params)
376
+ });
377
+ }
378
+ function useCreateProduct() {
379
+ const client = useBillingAdminClient();
380
+ const queryClient = useQueryClient5();
381
+ return useMutation5({
382
+ mutationFn: (data) => client.createProduct(data),
383
+ onSuccess: () => {
384
+ queryClient.invalidateQueries({ queryKey: [PRODUCTS_KEY] });
385
+ }
386
+ });
387
+ }
388
+ function useUpdateProduct() {
389
+ const client = useBillingAdminClient();
390
+ const queryClient = useQueryClient5();
391
+ return useMutation5({
392
+ mutationFn: ({ id, data }) => client.updateProduct(id, data),
393
+ onSuccess: () => {
394
+ queryClient.invalidateQueries({ queryKey: [PRODUCTS_KEY] });
395
+ }
396
+ });
397
+ }
398
+ function useDeleteProduct() {
399
+ const client = useBillingAdminClient();
400
+ const queryClient = useQueryClient5();
401
+ return useMutation5({
402
+ mutationFn: (id) => client.deleteProduct(id),
403
+ onSuccess: () => {
404
+ queryClient.invalidateQueries({ queryKey: [PRODUCTS_KEY] });
405
+ }
406
+ });
407
+ }
408
+ function useSyncProductToStripe() {
409
+ const client = useBillingAdminClient();
410
+ const queryClient = useQueryClient5();
411
+ return useMutation5({
412
+ mutationFn: (id) => client.syncProductToStripe(id),
413
+ onSuccess: () => {
414
+ queryClient.invalidateQueries({ queryKey: [PRODUCTS_KEY] });
415
+ }
416
+ });
417
+ }
418
+
419
+ // src/hooks/useFeatures.ts
420
+ import { useQuery as useQuery6, useMutation as useMutation6, useQueryClient as useQueryClient6 } from "@tanstack/react-query";
421
+ function useAdminFeatures(params) {
422
+ const client = useBillingAdminClient();
423
+ return useQuery6({
424
+ queryKey: ["billing-admin", "features", params],
425
+ queryFn: () => client.getFeatures(params)
426
+ });
427
+ }
428
+ function useAvailableFeatures(category) {
429
+ const client = useBillingAdminClient();
430
+ return useQuery6({
431
+ queryKey: ["billing-admin", "features", "available", category],
432
+ queryFn: () => client.getAvailableFeatures(category)
433
+ });
434
+ }
435
+ function useCreateFeature() {
436
+ const client = useBillingAdminClient();
437
+ const queryClient = useQueryClient6();
438
+ return useMutation6({
439
+ mutationFn: (data) => client.createFeature(data),
440
+ onSuccess: () => {
441
+ queryClient.invalidateQueries({ queryKey: ["billing-admin", "features"] });
442
+ }
443
+ });
444
+ }
445
+ function useUpdateFeature() {
446
+ const client = useBillingAdminClient();
447
+ const queryClient = useQueryClient6();
448
+ return useMutation6({
449
+ mutationFn: ({ id, data }) => client.updateFeature(id, data),
450
+ onSuccess: () => {
451
+ queryClient.invalidateQueries({ queryKey: ["billing-admin", "features"] });
452
+ }
453
+ });
454
+ }
455
+ function useDeleteFeature() {
456
+ const client = useBillingAdminClient();
457
+ const queryClient = useQueryClient6();
458
+ return useMutation6({
459
+ mutationFn: (id) => client.deleteFeature(id),
460
+ onSuccess: () => {
461
+ queryClient.invalidateQueries({ queryKey: ["billing-admin", "features"] });
462
+ }
463
+ });
464
+ }
465
+
466
+ // src/utils/formatters.ts
467
+ function formatCurrency(amount, currency = "EUR", locale = "it-IT") {
468
+ return new Intl.NumberFormat(locale, {
469
+ style: "currency",
470
+ currency: currency.toUpperCase()
471
+ }).format(amount);
472
+ }
473
+ function formatCurrencyFromCents(amountCents, currency = "EUR", locale = "it-IT") {
474
+ return formatCurrency(amountCents / 100, currency, locale);
475
+ }
476
+ function formatPrice(price, currency = "EUR", locale = "it-IT") {
477
+ if (price === null) return "Contattaci";
478
+ return new Intl.NumberFormat(locale, {
479
+ style: "currency",
480
+ currency: currency.toUpperCase(),
481
+ minimumFractionDigits: 0,
482
+ maximumFractionDigits: 0
483
+ }).format(price);
484
+ }
485
+ function formatDate(date, locale = "it-IT") {
486
+ if (!date) return "N/A";
487
+ const d = typeof date === "string" ? new Date(date) : date;
488
+ if (isNaN(d.getTime())) return "N/A";
489
+ return new Intl.DateTimeFormat(locale, {
490
+ day: "numeric",
491
+ month: "short",
492
+ year: "numeric"
493
+ }).format(d);
494
+ }
495
+ function formatTimestamp(timestamp, includeTime = false, locale = "it-IT") {
496
+ if (!timestamp) return "-";
497
+ const date = new Date(timestamp * 1e3);
498
+ if (includeTime) {
499
+ return date.toLocaleDateString(locale, {
500
+ day: "2-digit",
501
+ month: "short",
502
+ year: "numeric",
503
+ hour: "2-digit",
504
+ minute: "2-digit"
505
+ });
506
+ }
507
+ return date.toLocaleDateString(locale, {
508
+ day: "2-digit",
509
+ month: "short",
510
+ year: "numeric"
511
+ });
512
+ }
513
+ function truncateId(id, maxLength = 20) {
514
+ if (id.length <= maxLength) return id;
515
+ return `${id.slice(0, 10)}...${id.slice(-6)}`;
516
+ }
517
+
518
+ // src/utils/status.ts
519
+ var subscriptionStatusColors = {
520
+ active: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",
521
+ trialing: "bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",
522
+ past_due: "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400",
523
+ canceled: "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-400",
524
+ unpaid: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",
525
+ incomplete: "bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400"
526
+ };
527
+ var subscriptionStatusLabels = {
528
+ active: "Attivo",
529
+ trialing: "In Prova",
530
+ past_due: "Scaduto",
531
+ canceled: "Cancellato",
532
+ unpaid: "Non Pagato",
533
+ incomplete: "Incompleto"
534
+ };
535
+ var paymentStatusColors = {
536
+ succeeded: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",
537
+ pending: "bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",
538
+ failed: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",
539
+ canceled: "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-400",
540
+ requires_payment_method: "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"
541
+ };
542
+ var paymentStatusLabels = {
543
+ succeeded: "Completato",
544
+ pending: "In Attesa",
545
+ failed: "Fallito",
546
+ canceled: "Annullato",
547
+ requires_payment_method: "Richiede Pagamento"
548
+ };
549
+ var invoiceStatusColors = {
550
+ draft: "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-400",
551
+ open: "bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",
552
+ paid: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",
553
+ void: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",
554
+ uncollectible: "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"
555
+ };
556
+ var invoiceStatusLabels = {
557
+ draft: "Bozza",
558
+ open: "Aperta",
559
+ paid: "Pagata",
560
+ void: "Annullata",
561
+ uncollectible: "Non Riscuotibile"
562
+ };
563
+
564
+ // src/utils/validators.ts
565
+ function validateSlug(slug) {
566
+ if (!slug.trim()) {
567
+ return "Lo slug \xE8 obbligatorio";
568
+ }
569
+ if (!/^[a-z0-9-]+$/.test(slug)) {
570
+ return "Lo slug pu\xF2 contenere solo lettere minuscole, numeri e trattini";
571
+ }
572
+ return null;
573
+ }
574
+ function validateRequired(value, fieldName) {
575
+ if (!value.trim()) {
576
+ return `${fieldName} \xE8 obbligatorio`;
577
+ }
578
+ return null;
579
+ }
580
+ export {
581
+ BillingAdminApiClient,
582
+ BillingAdminClientContext,
583
+ createBillingAdminClient,
584
+ formatCurrency,
585
+ formatCurrencyFromCents,
586
+ formatDate,
587
+ formatPrice,
588
+ formatTimestamp,
589
+ invoiceStatusColors,
590
+ invoiceStatusLabels,
591
+ paymentStatusColors,
592
+ paymentStatusLabels,
593
+ subscriptionStatusColors,
594
+ subscriptionStatusLabels,
595
+ truncateId,
596
+ useAdminFeatures,
597
+ useAdminInvoices,
598
+ useAdminPayments,
599
+ useAdminPlans,
600
+ useAdminProducts,
601
+ useAdminSubscriptions,
602
+ useAvailableFeatures,
603
+ useBillingAdminClient,
604
+ useCancelSubscription,
605
+ useChangeSubscriptionPlan,
606
+ useCreateFeature,
607
+ useCreatePlan,
608
+ useCreateProduct,
609
+ useCreateSubscription,
610
+ useDeleteFeature,
611
+ useDeletePlan,
612
+ useDeleteProduct,
613
+ useDialogState,
614
+ useRefundPayment,
615
+ useSendInvoice,
616
+ useSyncPlanToStripe,
617
+ useSyncProductToStripe,
618
+ useUpdateFeature,
619
+ useUpdatePlan,
620
+ useUpdateProduct,
621
+ useVoidInvoice,
622
+ validateRequired,
623
+ validateSlug
624
+ };
625
+ //# sourceMappingURL=index.mjs.map