@djangocfg/ext-payments 1.0.14 → 1.0.19

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.
Files changed (76) hide show
  1. package/dist/config.cjs +5 -8
  2. package/dist/config.js +5 -8
  3. package/dist/index.cjs +1906 -1043
  4. package/dist/index.d.cts +644 -59
  5. package/dist/index.d.ts +644 -59
  6. package/dist/index.js +1886 -1040
  7. package/package.json +13 -16
  8. package/src/WalletPage.tsx +100 -0
  9. package/src/api/generated/ext_payments/CLAUDE.md +10 -4
  10. package/src/api/generated/ext_payments/_utils/fetchers/ext_payments__payments.ts +268 -5
  11. package/src/api/generated/ext_payments/_utils/hooks/ext_payments__payments.ts +102 -3
  12. package/src/api/generated/ext_payments/_utils/schemas/Balance.schema.ts +1 -1
  13. package/src/api/generated/ext_payments/_utils/schemas/PaginatedWithdrawalListList.schema.ts +24 -0
  14. package/src/api/generated/ext_payments/_utils/schemas/PaymentCreateRequest.schema.ts +21 -0
  15. package/src/api/generated/ext_payments/_utils/schemas/PaymentCreateResponse.schema.ts +22 -0
  16. package/src/api/generated/ext_payments/_utils/schemas/PaymentDetail.schema.ts +3 -3
  17. package/src/api/generated/ext_payments/_utils/schemas/PaymentList.schema.ts +2 -2
  18. package/src/api/generated/ext_payments/_utils/schemas/Transaction.schema.ts +1 -1
  19. package/src/api/generated/ext_payments/_utils/schemas/WithdrawalCancelResponse.schema.ts +22 -0
  20. package/src/api/generated/ext_payments/_utils/schemas/WithdrawalCreateRequest.schema.ts +21 -0
  21. package/src/api/generated/ext_payments/_utils/schemas/WithdrawalCreateResponse.schema.ts +22 -0
  22. package/src/api/generated/ext_payments/_utils/schemas/WithdrawalDetail.schema.ts +42 -0
  23. package/src/api/generated/ext_payments/_utils/schemas/WithdrawalList.schema.ts +29 -0
  24. package/src/api/generated/ext_payments/_utils/schemas/index.ts +8 -0
  25. package/src/api/generated/ext_payments/client.ts +1 -1
  26. package/src/api/generated/ext_payments/enums.ts +36 -0
  27. package/src/api/generated/ext_payments/ext_payments__payments/client.ts +104 -6
  28. package/src/api/generated/ext_payments/ext_payments__payments/models.ts +168 -8
  29. package/src/api/generated/ext_payments/index.ts +1 -1
  30. package/src/api/generated/ext_payments/schema.json +752 -42
  31. package/src/components/ActivityItem.tsx +118 -0
  32. package/src/components/ActivityList.tsx +93 -0
  33. package/src/components/AddFundsSheet.tsx +342 -0
  34. package/src/components/BalanceHero.tsx +102 -0
  35. package/src/components/CurrencyCombobox.tsx +49 -0
  36. package/src/components/PaymentSheet.tsx +352 -0
  37. package/src/components/WithdrawSheet.tsx +355 -0
  38. package/src/components/WithdrawalSheet.tsx +332 -0
  39. package/src/components/index.ts +11 -0
  40. package/src/config.ts +1 -0
  41. package/src/contexts/WalletContext.tsx +356 -0
  42. package/src/contexts/index.ts +13 -42
  43. package/src/contexts/types.ts +43 -37
  44. package/src/hooks/index.ts +3 -20
  45. package/src/hooks/useCurrencyOptions.ts +79 -0
  46. package/src/hooks/useEstimate.ts +113 -0
  47. package/src/hooks/useWithdrawalEstimate.ts +117 -0
  48. package/src/index.ts +9 -18
  49. package/src/types/index.ts +78 -0
  50. package/src/utils/errors.ts +36 -0
  51. package/src/utils/format.ts +65 -0
  52. package/src/utils/index.ts +3 -0
  53. package/src/contexts/BalancesContext.tsx +0 -63
  54. package/src/contexts/CurrenciesContext.tsx +0 -64
  55. package/src/contexts/OverviewContext.tsx +0 -173
  56. package/src/contexts/PaymentsContext.tsx +0 -122
  57. package/src/contexts/PaymentsExtensionProvider.tsx +0 -56
  58. package/src/contexts/README.md +0 -201
  59. package/src/contexts/RootPaymentsContext.tsx +0 -66
  60. package/src/layouts/PaymentsLayout/PaymentsLayout.tsx +0 -90
  61. package/src/layouts/PaymentsLayout/components/CreatePaymentDialog.tsx +0 -274
  62. package/src/layouts/PaymentsLayout/components/PaymentDetailsDialog.tsx +0 -287
  63. package/src/layouts/PaymentsLayout/components/index.ts +0 -2
  64. package/src/layouts/PaymentsLayout/events.ts +0 -47
  65. package/src/layouts/PaymentsLayout/index.ts +0 -16
  66. package/src/layouts/PaymentsLayout/types.ts +0 -6
  67. package/src/layouts/PaymentsLayout/views/overview/components/BalanceCard.tsx +0 -121
  68. package/src/layouts/PaymentsLayout/views/overview/components/RecentPayments.tsx +0 -139
  69. package/src/layouts/PaymentsLayout/views/overview/components/index.ts +0 -2
  70. package/src/layouts/PaymentsLayout/views/overview/index.tsx +0 -21
  71. package/src/layouts/PaymentsLayout/views/payments/components/PaymentsList.tsx +0 -279
  72. package/src/layouts/PaymentsLayout/views/payments/components/index.ts +0 -1
  73. package/src/layouts/PaymentsLayout/views/payments/index.tsx +0 -18
  74. package/src/layouts/PaymentsLayout/views/transactions/components/TransactionsList.tsx +0 -260
  75. package/src/layouts/PaymentsLayout/views/transactions/components/index.ts +0 -1
  76. package/src/layouts/PaymentsLayout/views/transactions/index.tsx +0 -18
package/dist/index.d.cts CHANGED
@@ -1,8 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { ConsolaInstance } from 'consola';
2
- import React from 'react';
3
3
  import { z, ZodError } from 'zod';
4
4
  import * as _djangocfg_ext_base from '@djangocfg/ext-base';
5
5
 
6
+ declare function WalletPage(): react_jsx_runtime.JSX.Element;
7
+
6
8
  /**
7
9
  * Current payment status
8
10
  * * `pending` - Pending
@@ -64,6 +66,40 @@ declare enum TransactionTransactionType {
64
66
  BONUS = "bonus",
65
67
  ADJUSTMENT = "adjustment"
66
68
  }
69
+ /**
70
+ * Withdrawal status
71
+ * * `pending` - Pending
72
+ * * `approved` - Approved
73
+ * * `processing` - Processing
74
+ * * `completed` - Completed
75
+ * * `rejected` - Rejected
76
+ * * `cancelled` - Cancelled
77
+ */
78
+ declare enum WithdrawalDetailStatus {
79
+ PENDING = "pending",
80
+ APPROVED = "approved",
81
+ PROCESSING = "processing",
82
+ COMPLETED = "completed",
83
+ REJECTED = "rejected",
84
+ CANCELLED = "cancelled"
85
+ }
86
+ /**
87
+ * Withdrawal status
88
+ * * `pending` - Pending
89
+ * * `approved` - Approved
90
+ * * `processing` - Processing
91
+ * * `completed` - Completed
92
+ * * `rejected` - Rejected
93
+ * * `cancelled` - Cancelled
94
+ */
95
+ declare enum WithdrawalListStatus {
96
+ PENDING = "pending",
97
+ APPROVED = "approved",
98
+ PROCESSING = "processing",
99
+ COMPLETED = "completed",
100
+ REJECTED = "rejected",
101
+ CANCELLED = "cancelled"
102
+ }
67
103
 
68
104
  type enums_PaymentDetailStatus = PaymentDetailStatus;
69
105
  declare const enums_PaymentDetailStatus: typeof PaymentDetailStatus;
@@ -71,8 +107,12 @@ type enums_PaymentListStatus = PaymentListStatus;
71
107
  declare const enums_PaymentListStatus: typeof PaymentListStatus;
72
108
  type enums_TransactionTransactionType = TransactionTransactionType;
73
109
  declare const enums_TransactionTransactionType: typeof TransactionTransactionType;
110
+ type enums_WithdrawalDetailStatus = WithdrawalDetailStatus;
111
+ declare const enums_WithdrawalDetailStatus: typeof WithdrawalDetailStatus;
112
+ type enums_WithdrawalListStatus = WithdrawalListStatus;
113
+ declare const enums_WithdrawalListStatus: typeof WithdrawalListStatus;
74
114
  declare namespace enums {
75
- export { enums_PaymentDetailStatus as PaymentDetailStatus, enums_PaymentListStatus as PaymentListStatus, enums_TransactionTransactionType as TransactionTransactionType };
115
+ export { enums_PaymentDetailStatus as PaymentDetailStatus, enums_PaymentListStatus as PaymentListStatus, enums_TransactionTransactionType as TransactionTransactionType, enums_WithdrawalDetailStatus as WithdrawalDetailStatus, enums_WithdrawalListStatus as WithdrawalListStatus };
76
116
  }
77
117
 
78
118
  /**
@@ -131,11 +171,8 @@ interface PaymentDetail$1 {
131
171
  currency_name: string;
132
172
  currency_token: string;
133
173
  currency_network: string;
134
- /** Amount to pay in cryptocurrency */
135
174
  pay_amount?: string | null;
136
- /** Actual amount received in cryptocurrency */
137
175
  actual_amount?: string | null;
138
- /** Actual amount received in USD */
139
176
  actual_amount_usd?: string | null;
140
177
  /** Current payment status
141
178
 
@@ -149,21 +186,16 @@ interface PaymentDetail$1 {
149
186
  * `cancelled` - Cancelled */
150
187
  status: PaymentDetailStatus;
151
188
  status_display: string;
152
- /** Cryptocurrency payment address */
153
189
  pay_address?: string | null;
154
190
  /** Get QR code URL. */
155
191
  qr_code_url?: string | null;
156
- /** Payment page URL (if provided by provider) */
157
192
  payment_url?: string | null;
158
- /** Blockchain transaction hash */
159
193
  transaction_hash?: string | null;
160
194
  /** Get blockchain explorer link. */
161
195
  explorer_link?: string | null;
162
196
  /** Number of blockchain confirmations */
163
197
  confirmations_count: number;
164
- /** When this payment expires (typically 30 minutes) */
165
198
  expires_at?: string | null;
166
- /** When this payment was completed */
167
199
  completed_at?: string | null;
168
200
  /** When this record was created */
169
201
  created_at: string;
@@ -204,9 +236,169 @@ interface PaymentList$1 {
204
236
  /** When this payment was completed */
205
237
  completed_at?: string | null;
206
238
  }
239
+ /**
240
+ * Serializer for creating payment.
241
+ *
242
+ * Request model (no read-only fields).
243
+ */
244
+ interface PaymentCreateRequest$1 {
245
+ /** Payment amount in USD */
246
+ amount_usd: string;
247
+ /** Currency code (e.g., USDTTRC20) */
248
+ currency_code: string;
249
+ /** Optional payment description */
250
+ description?: string;
251
+ }
252
+ /**
253
+ * Response for payment creation.
254
+ *
255
+ * Response model (includes read-only fields).
256
+ */
257
+ interface PaymentCreateResponse$1 {
258
+ success: boolean;
259
+ payment: PaymentDetail$1;
260
+ qr_code_url: string | null;
261
+ }
262
+ /**
263
+ *
264
+ * Response model (includes read-only fields).
265
+ */
266
+ interface PaginatedWithdrawalListList$1 {
267
+ /** Total number of items across all pages */
268
+ count: number;
269
+ /** Current page number (1-based) */
270
+ page: number;
271
+ /** Total number of pages */
272
+ pages: number;
273
+ /** Number of items per page */
274
+ page_size: number;
275
+ /** Whether there is a next page */
276
+ has_next: boolean;
277
+ /** Whether there is a previous page */
278
+ has_previous: boolean;
279
+ /** Next page number (null if no next page) */
280
+ next_page?: number | null;
281
+ /** Previous page number (null if no previous page) */
282
+ previous_page?: number | null;
283
+ /** Array of items for current page */
284
+ results: Array<WithdrawalList$1>;
285
+ }
286
+ /**
287
+ * Detailed withdrawal information.
288
+ *
289
+ * Response model (includes read-only fields).
290
+ */
291
+ interface WithdrawalDetail$1 {
292
+ /** Unique identifier for this record */
293
+ id: string;
294
+ /** Internal withdrawal identifier (WD_YYYYMMDDHHMMSS_UUID) */
295
+ internal_withdrawal_id: string;
296
+ /** Withdrawal amount in USD (min $10) */
297
+ amount_usd: string;
298
+ currency_code: string;
299
+ currency_name: string;
300
+ currency_token: string;
301
+ currency_network: string;
302
+ /** Destination wallet address */
303
+ wallet_address: string;
304
+ /** Network transaction fee in USD */
305
+ network_fee_usd: string;
306
+ /** Service fee in USD */
307
+ service_fee_usd: string;
308
+ /** Total fee (network + service) in USD */
309
+ total_fee_usd: string;
310
+ /** Final amount to receive (amount - total_fee) */
311
+ final_amount_usd: string;
312
+ crypto_amount?: string | null;
313
+ /** Withdrawal status
314
+
315
+ * `pending` - Pending
316
+ * `approved` - Approved
317
+ * `processing` - Processing
318
+ * `completed` - Completed
319
+ * `rejected` - Rejected
320
+ * `cancelled` - Cancelled */
321
+ status: WithdrawalDetailStatus;
322
+ status_display: string;
323
+ transaction_hash?: string | null;
324
+ /** Get blockchain explorer link. */
325
+ explorer_link?: string | null;
326
+ /** Admin notes (reason for rejection, etc.) */
327
+ admin_notes: string;
328
+ /** When this record was created */
329
+ created_at: string;
330
+ approved_at?: string | null;
331
+ completed_at?: string | null;
332
+ rejected_at?: string | null;
333
+ cancelled_at?: string | null;
334
+ }
335
+ /**
336
+ * Response for withdrawal cancellation.
337
+ *
338
+ * Response model (includes read-only fields).
339
+ */
340
+ interface WithdrawalCancelResponse$1 {
341
+ success: boolean;
342
+ withdrawal: WithdrawalDetail$1;
343
+ message: string;
344
+ }
345
+ /**
346
+ * Serializer for creating withdrawal request.
347
+ *
348
+ * Request model (no read-only fields).
349
+ */
350
+ interface WithdrawalCreateRequest$1 {
351
+ /** Withdrawal amount in USD (min $10) */
352
+ amount_usd: string;
353
+ /** Currency code (e.g., USDTTRC20) */
354
+ currency_code: string;
355
+ /** Destination wallet address */
356
+ wallet_address: string;
357
+ }
358
+ /**
359
+ * Response for withdrawal creation.
360
+ *
361
+ * Response model (includes read-only fields).
362
+ */
363
+ interface WithdrawalCreateResponse$1 {
364
+ success: boolean;
365
+ withdrawal: WithdrawalDetail$1;
366
+ message: string;
367
+ }
368
+ /**
369
+ * Withdrawal list item (lighter than detail).
370
+ *
371
+ * Response model (includes read-only fields).
372
+ */
373
+ interface WithdrawalList$1 {
374
+ /** Unique identifier for this record */
375
+ id: string;
376
+ /** Internal withdrawal identifier (WD_YYYYMMDDHHMMSS_UUID) */
377
+ internal_withdrawal_id: string;
378
+ /** Withdrawal amount in USD (min $10) */
379
+ amount_usd: string;
380
+ /** Final amount to receive (amount - total_fee) */
381
+ final_amount_usd: string;
382
+ currency_code: string;
383
+ currency_token: string;
384
+ /** Withdrawal status
385
+
386
+ * `pending` - Pending
387
+ * `approved` - Approved
388
+ * `processing` - Processing
389
+ * `completed` - Completed
390
+ * `rejected` - Rejected
391
+ * `cancelled` - Cancelled */
392
+ status: WithdrawalListStatus;
393
+ status_display: string;
394
+ /** When this record was created */
395
+ created_at: string;
396
+ /** When withdrawal was completed */
397
+ completed_at?: string | null;
398
+ }
207
399
 
208
400
  declare namespace models {
209
- export type { Balance$1 as Balance, PaginatedPaymentListList$1 as PaginatedPaymentListList, PaymentDetail$1 as PaymentDetail, PaymentList$1 as PaymentList };
401
+ export type { Balance$1 as Balance, PaginatedPaymentListList$1 as PaginatedPaymentListList, PaginatedWithdrawalListList$1 as PaginatedWithdrawalListList, PaymentCreateRequest$1 as PaymentCreateRequest, PaymentCreateResponse$1 as PaymentCreateResponse, PaymentDetail$1 as PaymentDetail, PaymentList$1 as PaymentList, WithdrawalCancelResponse$1 as WithdrawalCancelResponse, WithdrawalCreateRequest$1 as WithdrawalCreateRequest, WithdrawalCreateResponse$1 as WithdrawalCreateResponse, WithdrawalDetail$1 as WithdrawalDetail, WithdrawalList$1 as WithdrawalList };
210
402
  }
211
403
 
212
404
  /**
@@ -224,9 +416,18 @@ declare class ExtPaymentsPayments {
224
416
  /**
225
417
  * Get available currencies
226
418
  *
227
- * Returns list of available currencies with token+network info
419
+ * Returns list of available currencies with token+network info, popular
420
+ * first
228
421
  */
229
422
  currenciesList(): Promise<any>;
423
+ currenciesEstimateRetrieve(code: string, amount?: number): Promise<any>;
424
+ currenciesEstimateRetrieve(code: string, params?: {
425
+ amount?: number;
426
+ }): Promise<any>;
427
+ currenciesWithdrawalEstimateRetrieve(code: string, amount?: number): Promise<any>;
428
+ currenciesWithdrawalEstimateRetrieve(code: string, params?: {
429
+ amount?: number;
430
+ }): Promise<any>;
230
431
  paymentsList(page?: number, page_size?: number): Promise<PaginatedPaymentListList$1>;
231
432
  paymentsList(params?: {
232
433
  page?: number;
@@ -252,17 +453,41 @@ declare class ExtPaymentsPayments {
252
453
  */
253
454
  paymentsStatusRetrieve(id: string): Promise<PaymentList$1[]>;
254
455
  /**
255
- * POST /api/v1/payments/create/ Create new payment. Request body: {
256
- * "amount_usd": "100.00", "currency_code": "USDTTRC20", "description":
257
- * "Optional description" }
456
+ * Create payment
457
+ *
458
+ * Create a new payment with specified amount and currency
258
459
  */
259
- paymentsCreateCreate(): Promise<PaymentList$1>;
460
+ paymentsCreateCreate(data: PaymentCreateRequest$1): Promise<PaymentCreateResponse$1>;
260
461
  transactionsList(limit?: number, offset?: number, type?: string): Promise<any>;
261
462
  transactionsList(params?: {
262
463
  limit?: number;
263
464
  offset?: number;
264
465
  type?: string;
265
466
  }): Promise<any>;
467
+ withdrawalsList(page?: number, page_size?: number): Promise<PaginatedWithdrawalListList$1>;
468
+ withdrawalsList(params?: {
469
+ page?: number;
470
+ page_size?: number;
471
+ }): Promise<PaginatedWithdrawalListList$1>;
472
+ /**
473
+ * ViewSet for withdrawal operations. Endpoints: - GET /withdrawals/ - List
474
+ * user's withdrawal requests - GET /withdrawals/{id}/ - Get withdrawal
475
+ * details - POST /withdrawals/create/ - Create withdrawal request - POST
476
+ * /withdrawals/{id}/cancel/ - Cancel pending withdrawal
477
+ */
478
+ withdrawalsRetrieve(id: string): Promise<WithdrawalDetail$1>;
479
+ /**
480
+ * Cancel withdrawal request
481
+ *
482
+ * Cancel a pending withdrawal request
483
+ */
484
+ withdrawalsCancelCreate(id: string): Promise<WithdrawalCancelResponse$1>;
485
+ /**
486
+ * Create withdrawal request
487
+ *
488
+ * Create a new withdrawal request (requires admin approval)
489
+ */
490
+ withdrawalsCreateCreate(data: WithdrawalCreateRequest$1): Promise<WithdrawalCreateResponse$1>;
266
491
  }
267
492
 
268
493
  /**
@@ -514,7 +739,7 @@ declare function shouldRetry(error: any): boolean;
514
739
  declare function withRetry<T>(fn: () => Promise<T>, config?: RetryConfig): Promise<T>;
515
740
 
516
741
  /**
517
- * Async API client for Django CFG API.
742
+ * Async API client for Cmdop API.
518
743
  *
519
744
  * Usage:
520
745
  * ```typescript
@@ -644,7 +869,7 @@ declare const BalanceSchema: z.ZodObject<{
644
869
  balance_display: z.ZodString;
645
870
  total_deposited: z.ZodString;
646
871
  total_withdrawn: z.ZodString;
647
- last_transaction_at: z.ZodNullable<z.ZodISODateTime>;
872
+ last_transaction_at: z.ZodNullable<z.ZodString>;
648
873
  }, z.core.$strip>;
649
874
  /**
650
875
  * Infer TypeScript type from Zod schema
@@ -695,8 +920,8 @@ declare const PaginatedPaymentListListSchema: z.ZodObject<{
695
920
  currency_token: z.ZodString;
696
921
  status: z.ZodEnum<typeof PaymentListStatus>;
697
922
  status_display: z.ZodString;
698
- created_at: z.ZodISODateTime;
699
- completed_at: z.ZodNullable<z.ZodISODateTime>;
923
+ created_at: z.ZodString;
924
+ completed_at: z.ZodNullable<z.ZodString>;
700
925
  }, z.core.$strip>>;
701
926
  }, z.core.$strip>;
702
927
  /**
@@ -704,6 +929,92 @@ declare const PaginatedPaymentListListSchema: z.ZodObject<{
704
929
  */
705
930
  type PaginatedPaymentListList = z.infer<typeof PaginatedPaymentListListSchema>;
706
931
 
932
+ declare const PaginatedWithdrawalListListSchema: z.ZodObject<{
933
+ count: z.ZodInt;
934
+ page: z.ZodInt;
935
+ pages: z.ZodInt;
936
+ page_size: z.ZodInt;
937
+ has_next: z.ZodBoolean;
938
+ has_previous: z.ZodBoolean;
939
+ next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
940
+ previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
941
+ results: z.ZodArray<z.ZodObject<{
942
+ id: z.ZodString;
943
+ internal_withdrawal_id: z.ZodString;
944
+ amount_usd: z.ZodString;
945
+ final_amount_usd: z.ZodString;
946
+ currency_code: z.ZodString;
947
+ currency_token: z.ZodString;
948
+ status: z.ZodEnum<typeof WithdrawalListStatus>;
949
+ status_display: z.ZodString;
950
+ created_at: z.ZodString;
951
+ completed_at: z.ZodNullable<z.ZodString>;
952
+ }, z.core.$strip>>;
953
+ }, z.core.$strip>;
954
+ /**
955
+ * Infer TypeScript type from Zod schema
956
+ */
957
+ type PaginatedWithdrawalListList = z.infer<typeof PaginatedWithdrawalListListSchema>;
958
+
959
+ /**
960
+ * Zod schema for PaymentCreateRequest
961
+ *
962
+ * This schema provides runtime validation and type inference.
963
+ * * Serializer for creating payment.
964
+ * */
965
+
966
+ /**
967
+ * Serializer for creating payment.
968
+ */
969
+ declare const PaymentCreateRequestSchema: z.ZodObject<{
970
+ amount_usd: z.ZodString;
971
+ currency_code: z.ZodString;
972
+ description: z.ZodOptional<z.ZodString>;
973
+ }, z.core.$strip>;
974
+ /**
975
+ * Infer TypeScript type from Zod schema
976
+ */
977
+ type PaymentCreateRequest = z.infer<typeof PaymentCreateRequestSchema>;
978
+
979
+ /**
980
+ * Response for payment creation.
981
+ */
982
+ declare const PaymentCreateResponseSchema: z.ZodObject<{
983
+ success: z.ZodBoolean;
984
+ payment: z.ZodObject<{
985
+ id: z.ZodString;
986
+ internal_payment_id: z.ZodString;
987
+ amount_usd: z.ZodString;
988
+ currency_code: z.ZodString;
989
+ currency_name: z.ZodString;
990
+ currency_token: z.ZodString;
991
+ currency_network: z.ZodString;
992
+ pay_amount: z.ZodNullable<z.ZodString>;
993
+ actual_amount: z.ZodNullable<z.ZodString>;
994
+ actual_amount_usd: z.ZodNullable<z.ZodString>;
995
+ status: z.ZodEnum<typeof PaymentDetailStatus>;
996
+ status_display: z.ZodString;
997
+ pay_address: z.ZodNullable<z.ZodString>;
998
+ qr_code_url: z.ZodNullable<z.ZodString>;
999
+ payment_url: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
1000
+ transaction_hash: z.ZodNullable<z.ZodString>;
1001
+ explorer_link: z.ZodNullable<z.ZodString>;
1002
+ confirmations_count: z.ZodInt;
1003
+ expires_at: z.ZodNullable<z.ZodString>;
1004
+ completed_at: z.ZodNullable<z.ZodString>;
1005
+ created_at: z.ZodString;
1006
+ is_completed: z.ZodBoolean;
1007
+ is_failed: z.ZodBoolean;
1008
+ is_expired: z.ZodBoolean;
1009
+ description: z.ZodString;
1010
+ }, z.core.$strip>;
1011
+ qr_code_url: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
1012
+ }, z.core.$strip>;
1013
+ /**
1014
+ * Infer TypeScript type from Zod schema
1015
+ */
1016
+ type PaymentCreateResponse = z.infer<typeof PaymentCreateResponseSchema>;
1017
+
707
1018
  /**
708
1019
  * Zod schema for PaymentDetail
709
1020
  *
@@ -733,9 +1044,9 @@ declare const PaymentDetailSchema: z.ZodObject<{
733
1044
  transaction_hash: z.ZodNullable<z.ZodString>;
734
1045
  explorer_link: z.ZodNullable<z.ZodString>;
735
1046
  confirmations_count: z.ZodInt;
736
- expires_at: z.ZodNullable<z.ZodISODateTime>;
737
- completed_at: z.ZodNullable<z.ZodISODateTime>;
738
- created_at: z.ZodISODateTime;
1047
+ expires_at: z.ZodNullable<z.ZodString>;
1048
+ completed_at: z.ZodNullable<z.ZodString>;
1049
+ created_at: z.ZodString;
739
1050
  is_completed: z.ZodBoolean;
740
1051
  is_failed: z.ZodBoolean;
741
1052
  is_expired: z.ZodBoolean;
@@ -764,8 +1075,8 @@ declare const PaymentListSchema: z.ZodObject<{
764
1075
  currency_token: z.ZodString;
765
1076
  status: z.ZodEnum<typeof PaymentListStatus>;
766
1077
  status_display: z.ZodString;
767
- created_at: z.ZodISODateTime;
768
- completed_at: z.ZodNullable<z.ZodISODateTime>;
1078
+ created_at: z.ZodString;
1079
+ completed_at: z.ZodNullable<z.ZodString>;
769
1080
  }, z.core.$strip>;
770
1081
  /**
771
1082
  * Infer TypeScript type from Zod schema
@@ -791,13 +1102,174 @@ declare const TransactionSchema: z.ZodObject<{
791
1102
  balance_after: z.ZodString;
792
1103
  payment_id: z.ZodNullable<z.ZodString>;
793
1104
  description: z.ZodString;
794
- created_at: z.ZodISODateTime;
1105
+ created_at: z.ZodString;
795
1106
  }, z.core.$strip>;
796
1107
  /**
797
1108
  * Infer TypeScript type from Zod schema
798
1109
  */
799
1110
  type Transaction = z.infer<typeof TransactionSchema>;
800
1111
 
1112
+ /**
1113
+ * Response for withdrawal cancellation.
1114
+ */
1115
+ declare const WithdrawalCancelResponseSchema: z.ZodObject<{
1116
+ success: z.ZodBoolean;
1117
+ withdrawal: z.ZodObject<{
1118
+ id: z.ZodString;
1119
+ internal_withdrawal_id: z.ZodString;
1120
+ amount_usd: z.ZodString;
1121
+ currency_code: z.ZodString;
1122
+ currency_name: z.ZodString;
1123
+ currency_token: z.ZodString;
1124
+ currency_network: z.ZodString;
1125
+ wallet_address: z.ZodString;
1126
+ network_fee_usd: z.ZodString;
1127
+ service_fee_usd: z.ZodString;
1128
+ total_fee_usd: z.ZodString;
1129
+ final_amount_usd: z.ZodString;
1130
+ crypto_amount: z.ZodNullable<z.ZodString>;
1131
+ status: z.ZodEnum<typeof WithdrawalDetailStatus>;
1132
+ status_display: z.ZodString;
1133
+ transaction_hash: z.ZodNullable<z.ZodString>;
1134
+ explorer_link: z.ZodNullable<z.ZodString>;
1135
+ admin_notes: z.ZodString;
1136
+ created_at: z.ZodString;
1137
+ approved_at: z.ZodNullable<z.ZodString>;
1138
+ completed_at: z.ZodNullable<z.ZodString>;
1139
+ rejected_at: z.ZodNullable<z.ZodString>;
1140
+ cancelled_at: z.ZodNullable<z.ZodString>;
1141
+ }, z.core.$strip>;
1142
+ message: z.ZodString;
1143
+ }, z.core.$strip>;
1144
+ /**
1145
+ * Infer TypeScript type from Zod schema
1146
+ */
1147
+ type WithdrawalCancelResponse = z.infer<typeof WithdrawalCancelResponseSchema>;
1148
+
1149
+ /**
1150
+ * Zod schema for WithdrawalCreateRequest
1151
+ *
1152
+ * This schema provides runtime validation and type inference.
1153
+ * * Serializer for creating withdrawal request.
1154
+ * */
1155
+
1156
+ /**
1157
+ * Serializer for creating withdrawal request.
1158
+ */
1159
+ declare const WithdrawalCreateRequestSchema: z.ZodObject<{
1160
+ amount_usd: z.ZodString;
1161
+ currency_code: z.ZodString;
1162
+ wallet_address: z.ZodString;
1163
+ }, z.core.$strip>;
1164
+ /**
1165
+ * Infer TypeScript type from Zod schema
1166
+ */
1167
+ type WithdrawalCreateRequest = z.infer<typeof WithdrawalCreateRequestSchema>;
1168
+
1169
+ /**
1170
+ * Response for withdrawal creation.
1171
+ */
1172
+ declare const WithdrawalCreateResponseSchema: z.ZodObject<{
1173
+ success: z.ZodBoolean;
1174
+ withdrawal: z.ZodObject<{
1175
+ id: z.ZodString;
1176
+ internal_withdrawal_id: z.ZodString;
1177
+ amount_usd: z.ZodString;
1178
+ currency_code: z.ZodString;
1179
+ currency_name: z.ZodString;
1180
+ currency_token: z.ZodString;
1181
+ currency_network: z.ZodString;
1182
+ wallet_address: z.ZodString;
1183
+ network_fee_usd: z.ZodString;
1184
+ service_fee_usd: z.ZodString;
1185
+ total_fee_usd: z.ZodString;
1186
+ final_amount_usd: z.ZodString;
1187
+ crypto_amount: z.ZodNullable<z.ZodString>;
1188
+ status: z.ZodEnum<typeof WithdrawalDetailStatus>;
1189
+ status_display: z.ZodString;
1190
+ transaction_hash: z.ZodNullable<z.ZodString>;
1191
+ explorer_link: z.ZodNullable<z.ZodString>;
1192
+ admin_notes: z.ZodString;
1193
+ created_at: z.ZodString;
1194
+ approved_at: z.ZodNullable<z.ZodString>;
1195
+ completed_at: z.ZodNullable<z.ZodString>;
1196
+ rejected_at: z.ZodNullable<z.ZodString>;
1197
+ cancelled_at: z.ZodNullable<z.ZodString>;
1198
+ }, z.core.$strip>;
1199
+ message: z.ZodString;
1200
+ }, z.core.$strip>;
1201
+ /**
1202
+ * Infer TypeScript type from Zod schema
1203
+ */
1204
+ type WithdrawalCreateResponse = z.infer<typeof WithdrawalCreateResponseSchema>;
1205
+
1206
+ /**
1207
+ * Zod schema for WithdrawalDetail
1208
+ *
1209
+ * This schema provides runtime validation and type inference.
1210
+ * * Detailed withdrawal information.
1211
+ * */
1212
+
1213
+ /**
1214
+ * Detailed withdrawal information.
1215
+ */
1216
+ declare const WithdrawalDetailSchema: z.ZodObject<{
1217
+ id: z.ZodString;
1218
+ internal_withdrawal_id: z.ZodString;
1219
+ amount_usd: z.ZodString;
1220
+ currency_code: z.ZodString;
1221
+ currency_name: z.ZodString;
1222
+ currency_token: z.ZodString;
1223
+ currency_network: z.ZodString;
1224
+ wallet_address: z.ZodString;
1225
+ network_fee_usd: z.ZodString;
1226
+ service_fee_usd: z.ZodString;
1227
+ total_fee_usd: z.ZodString;
1228
+ final_amount_usd: z.ZodString;
1229
+ crypto_amount: z.ZodNullable<z.ZodString>;
1230
+ status: z.ZodEnum<typeof WithdrawalDetailStatus>;
1231
+ status_display: z.ZodString;
1232
+ transaction_hash: z.ZodNullable<z.ZodString>;
1233
+ explorer_link: z.ZodNullable<z.ZodString>;
1234
+ admin_notes: z.ZodString;
1235
+ created_at: z.ZodString;
1236
+ approved_at: z.ZodNullable<z.ZodString>;
1237
+ completed_at: z.ZodNullable<z.ZodString>;
1238
+ rejected_at: z.ZodNullable<z.ZodString>;
1239
+ cancelled_at: z.ZodNullable<z.ZodString>;
1240
+ }, z.core.$strip>;
1241
+ /**
1242
+ * Infer TypeScript type from Zod schema
1243
+ */
1244
+ type WithdrawalDetail = z.infer<typeof WithdrawalDetailSchema>;
1245
+
1246
+ /**
1247
+ * Zod schema for WithdrawalList
1248
+ *
1249
+ * This schema provides runtime validation and type inference.
1250
+ * * Withdrawal list item (lighter than detail).
1251
+ * */
1252
+
1253
+ /**
1254
+ * Withdrawal list item (lighter than detail).
1255
+ */
1256
+ declare const WithdrawalListSchema: z.ZodObject<{
1257
+ id: z.ZodString;
1258
+ internal_withdrawal_id: z.ZodString;
1259
+ amount_usd: z.ZodString;
1260
+ final_amount_usd: z.ZodString;
1261
+ currency_code: z.ZodString;
1262
+ currency_token: z.ZodString;
1263
+ status: z.ZodEnum<typeof WithdrawalListStatus>;
1264
+ status_display: z.ZodString;
1265
+ created_at: z.ZodString;
1266
+ completed_at: z.ZodNullable<z.ZodString>;
1267
+ }, z.core.$strip>;
1268
+ /**
1269
+ * Infer TypeScript type from Zod schema
1270
+ */
1271
+ type WithdrawalList = z.infer<typeof WithdrawalListSchema>;
1272
+
801
1273
  /**
802
1274
  * Zod Schemas - Runtime validation and type inference
803
1275
  *
@@ -822,14 +1294,30 @@ type index$1_Currency = Currency;
822
1294
  declare const index$1_CurrencySchema: typeof CurrencySchema;
823
1295
  type index$1_PaginatedPaymentListList = PaginatedPaymentListList;
824
1296
  declare const index$1_PaginatedPaymentListListSchema: typeof PaginatedPaymentListListSchema;
1297
+ type index$1_PaginatedWithdrawalListList = PaginatedWithdrawalListList;
1298
+ declare const index$1_PaginatedWithdrawalListListSchema: typeof PaginatedWithdrawalListListSchema;
1299
+ type index$1_PaymentCreateRequest = PaymentCreateRequest;
1300
+ declare const index$1_PaymentCreateRequestSchema: typeof PaymentCreateRequestSchema;
1301
+ type index$1_PaymentCreateResponse = PaymentCreateResponse;
1302
+ declare const index$1_PaymentCreateResponseSchema: typeof PaymentCreateResponseSchema;
825
1303
  type index$1_PaymentDetail = PaymentDetail;
826
1304
  declare const index$1_PaymentDetailSchema: typeof PaymentDetailSchema;
827
1305
  type index$1_PaymentList = PaymentList;
828
1306
  declare const index$1_PaymentListSchema: typeof PaymentListSchema;
829
1307
  type index$1_Transaction = Transaction;
830
1308
  declare const index$1_TransactionSchema: typeof TransactionSchema;
1309
+ type index$1_WithdrawalCancelResponse = WithdrawalCancelResponse;
1310
+ declare const index$1_WithdrawalCancelResponseSchema: typeof WithdrawalCancelResponseSchema;
1311
+ type index$1_WithdrawalCreateRequest = WithdrawalCreateRequest;
1312
+ declare const index$1_WithdrawalCreateRequestSchema: typeof WithdrawalCreateRequestSchema;
1313
+ type index$1_WithdrawalCreateResponse = WithdrawalCreateResponse;
1314
+ declare const index$1_WithdrawalCreateResponseSchema: typeof WithdrawalCreateResponseSchema;
1315
+ type index$1_WithdrawalDetail = WithdrawalDetail;
1316
+ declare const index$1_WithdrawalDetailSchema: typeof WithdrawalDetailSchema;
1317
+ type index$1_WithdrawalList = WithdrawalList;
1318
+ declare const index$1_WithdrawalListSchema: typeof WithdrawalListSchema;
831
1319
  declare namespace index$1 {
832
- export { type index$1_Balance as Balance, index$1_BalanceSchema as BalanceSchema, type index$1_Currency as Currency, index$1_CurrencySchema as CurrencySchema, type index$1_PaginatedPaymentListList as PaginatedPaymentListList, index$1_PaginatedPaymentListListSchema as PaginatedPaymentListListSchema, type index$1_PaymentDetail as PaymentDetail, index$1_PaymentDetailSchema as PaymentDetailSchema, type index$1_PaymentList as PaymentList, index$1_PaymentListSchema as PaymentListSchema, type index$1_Transaction as Transaction, index$1_TransactionSchema as TransactionSchema };
1320
+ export { type index$1_Balance as Balance, index$1_BalanceSchema as BalanceSchema, type index$1_Currency as Currency, index$1_CurrencySchema as CurrencySchema, type index$1_PaginatedPaymentListList as PaginatedPaymentListList, index$1_PaginatedPaymentListListSchema as PaginatedPaymentListListSchema, type index$1_PaginatedWithdrawalListList as PaginatedWithdrawalListList, index$1_PaginatedWithdrawalListListSchema as PaginatedWithdrawalListListSchema, type index$1_PaymentCreateRequest as PaymentCreateRequest, index$1_PaymentCreateRequestSchema as PaymentCreateRequestSchema, type index$1_PaymentCreateResponse as PaymentCreateResponse, index$1_PaymentCreateResponseSchema as PaymentCreateResponseSchema, type index$1_PaymentDetail as PaymentDetail, index$1_PaymentDetailSchema as PaymentDetailSchema, type index$1_PaymentList as PaymentList, index$1_PaymentListSchema as PaymentListSchema, type index$1_Transaction as Transaction, index$1_TransactionSchema as TransactionSchema, type index$1_WithdrawalCancelResponse as WithdrawalCancelResponse, index$1_WithdrawalCancelResponseSchema as WithdrawalCancelResponseSchema, type index$1_WithdrawalCreateRequest as WithdrawalCreateRequest, index$1_WithdrawalCreateRequestSchema as WithdrawalCreateRequestSchema, type index$1_WithdrawalCreateResponse as WithdrawalCreateResponse, index$1_WithdrawalCreateResponseSchema as WithdrawalCreateResponseSchema, type index$1_WithdrawalDetail as WithdrawalDetail, index$1_WithdrawalDetailSchema as WithdrawalDetailSchema, type index$1_WithdrawalList as WithdrawalList, index$1_WithdrawalListSchema as WithdrawalListSchema };
833
1321
  }
834
1322
 
835
1323
  /**
@@ -919,6 +1407,24 @@ declare function getPaymentsBalanceRetrieve(client?: any): Promise<Balance>;
919
1407
  * @path /cfg/payments/currencies/
920
1408
  */
921
1409
  declare function getPaymentsCurrenciesList(client?: any): Promise<any>;
1410
+ /**
1411
+ * Get currency estimate
1412
+ *
1413
+ * @method GET
1414
+ * @path /cfg/payments/currencies/{code}/estimate/
1415
+ */
1416
+ declare function getPaymentsCurrenciesEstimateRetrieve(code: string, params?: {
1417
+ amount?: number;
1418
+ }, client?: any): Promise<any>;
1419
+ /**
1420
+ * Get withdrawal estimate
1421
+ *
1422
+ * @method GET
1423
+ * @path /cfg/payments/currencies/{code}/withdrawal-estimate/
1424
+ */
1425
+ declare function getPaymentsCurrenciesWithdrawalEstimateRetrieve(code: string, params?: {
1426
+ amount?: number;
1427
+ }, client?: any): Promise<any>;
922
1428
  /**
923
1429
  * API operation
924
1430
  *
@@ -951,12 +1457,12 @@ declare function createPaymentsPaymentsConfirmCreate(id: string, client?: any):
951
1457
  */
952
1458
  declare function getPaymentsPaymentsStatusRetrieve(id: string, client?: any): Promise<PaymentList>;
953
1459
  /**
954
- * API operation
1460
+ * Create payment
955
1461
  *
956
1462
  * @method POST
957
1463
  * @path /cfg/payments/payments/create/
958
1464
  */
959
- declare function createPaymentsPaymentsCreateCreate(client?: any): Promise<PaymentList>;
1465
+ declare function createPaymentsPaymentsCreateCreate(data: PaymentCreateRequest, client?: any): Promise<PaymentCreateResponse>;
960
1466
  /**
961
1467
  * Get user transactions
962
1468
  *
@@ -968,6 +1474,37 @@ declare function getPaymentsTransactionsList(params?: {
968
1474
  offset?: number;
969
1475
  type?: string;
970
1476
  }, client?: any): Promise<any>;
1477
+ /**
1478
+ * API operation
1479
+ *
1480
+ * @method GET
1481
+ * @path /cfg/payments/withdrawals/
1482
+ */
1483
+ declare function getPaymentsWithdrawalsList(params?: {
1484
+ page?: number;
1485
+ page_size?: number;
1486
+ }, client?: any): Promise<PaginatedWithdrawalListList>;
1487
+ /**
1488
+ * API operation
1489
+ *
1490
+ * @method GET
1491
+ * @path /cfg/payments/withdrawals/{id}/
1492
+ */
1493
+ declare function getPaymentsWithdrawalsRetrieve(id: string, client?: any): Promise<WithdrawalDetail>;
1494
+ /**
1495
+ * Cancel withdrawal request
1496
+ *
1497
+ * @method POST
1498
+ * @path /cfg/payments/withdrawals/{id}/cancel/
1499
+ */
1500
+ declare function createPaymentsWithdrawalsCancelCreate(id: string, client?: any): Promise<WithdrawalCancelResponse>;
1501
+ /**
1502
+ * Create withdrawal request
1503
+ *
1504
+ * @method POST
1505
+ * @path /cfg/payments/withdrawals/create/
1506
+ */
1507
+ declare function createPaymentsWithdrawalsCreateCreate(data: WithdrawalCreateRequest, client?: any): Promise<WithdrawalCreateResponse>;
971
1508
 
972
1509
  /**
973
1510
  * Typed Fetchers - Universal API functions
@@ -998,14 +1535,20 @@ declare function getPaymentsTransactionsList(params?: {
998
1535
 
999
1536
  declare const index_createPaymentsPaymentsConfirmCreate: typeof createPaymentsPaymentsConfirmCreate;
1000
1537
  declare const index_createPaymentsPaymentsCreateCreate: typeof createPaymentsPaymentsCreateCreate;
1538
+ declare const index_createPaymentsWithdrawalsCancelCreate: typeof createPaymentsWithdrawalsCancelCreate;
1539
+ declare const index_createPaymentsWithdrawalsCreateCreate: typeof createPaymentsWithdrawalsCreateCreate;
1001
1540
  declare const index_getPaymentsBalanceRetrieve: typeof getPaymentsBalanceRetrieve;
1541
+ declare const index_getPaymentsCurrenciesEstimateRetrieve: typeof getPaymentsCurrenciesEstimateRetrieve;
1002
1542
  declare const index_getPaymentsCurrenciesList: typeof getPaymentsCurrenciesList;
1543
+ declare const index_getPaymentsCurrenciesWithdrawalEstimateRetrieve: typeof getPaymentsCurrenciesWithdrawalEstimateRetrieve;
1003
1544
  declare const index_getPaymentsPaymentsList: typeof getPaymentsPaymentsList;
1004
1545
  declare const index_getPaymentsPaymentsRetrieve: typeof getPaymentsPaymentsRetrieve;
1005
1546
  declare const index_getPaymentsPaymentsStatusRetrieve: typeof getPaymentsPaymentsStatusRetrieve;
1006
1547
  declare const index_getPaymentsTransactionsList: typeof getPaymentsTransactionsList;
1548
+ declare const index_getPaymentsWithdrawalsList: typeof getPaymentsWithdrawalsList;
1549
+ declare const index_getPaymentsWithdrawalsRetrieve: typeof getPaymentsWithdrawalsRetrieve;
1007
1550
  declare namespace index {
1008
- export { index_createPaymentsPaymentsConfirmCreate as createPaymentsPaymentsConfirmCreate, index_createPaymentsPaymentsCreateCreate as createPaymentsPaymentsCreateCreate, index_getPaymentsBalanceRetrieve as getPaymentsBalanceRetrieve, index_getPaymentsCurrenciesList as getPaymentsCurrenciesList, index_getPaymentsPaymentsList as getPaymentsPaymentsList, index_getPaymentsPaymentsRetrieve as getPaymentsPaymentsRetrieve, index_getPaymentsPaymentsStatusRetrieve as getPaymentsPaymentsStatusRetrieve, index_getPaymentsTransactionsList as getPaymentsTransactionsList };
1551
+ export { index_createPaymentsPaymentsConfirmCreate as createPaymentsPaymentsConfirmCreate, index_createPaymentsPaymentsCreateCreate as createPaymentsPaymentsCreateCreate, index_createPaymentsWithdrawalsCancelCreate as createPaymentsWithdrawalsCancelCreate, index_createPaymentsWithdrawalsCreateCreate as createPaymentsWithdrawalsCreateCreate, index_getPaymentsBalanceRetrieve as getPaymentsBalanceRetrieve, index_getPaymentsCurrenciesEstimateRetrieve as getPaymentsCurrenciesEstimateRetrieve, index_getPaymentsCurrenciesList as getPaymentsCurrenciesList, index_getPaymentsCurrenciesWithdrawalEstimateRetrieve as getPaymentsCurrenciesWithdrawalEstimateRetrieve, index_getPaymentsPaymentsList as getPaymentsPaymentsList, index_getPaymentsPaymentsRetrieve as getPaymentsPaymentsRetrieve, index_getPaymentsPaymentsStatusRetrieve as getPaymentsPaymentsStatusRetrieve, index_getPaymentsTransactionsList as getPaymentsTransactionsList, index_getPaymentsWithdrawalsList as getPaymentsWithdrawalsList, index_getPaymentsWithdrawalsRetrieve as getPaymentsWithdrawalsRetrieve };
1009
1552
  }
1010
1553
 
1011
1554
  /**
@@ -1159,7 +1702,7 @@ declare class NetworkError extends Error {
1159
1702
  }
1160
1703
 
1161
1704
  /**
1162
- * Django CFG API - API Client with JWT Management
1705
+ * Cmdop API - API Client with JWT Management
1163
1706
  *
1164
1707
  * Usage:
1165
1708
  * ```typescript
@@ -1269,48 +1812,90 @@ declare class API {
1269
1812
  declare const apiPayments: API;
1270
1813
 
1271
1814
  /**
1272
- * Payments Layout (v2.0 - Simplified)
1815
+ * Balance Hero (Apple-style)
1273
1816
  *
1274
- * Simplified layout with 3 tabs: Overview, Payments, Transactions
1275
- * Removed: API Keys, Tariffs (deprecated in v2.0)
1817
+ * Large centered balance display with action buttons
1276
1818
  */
1819
+ interface BalanceHeroProps {
1820
+ onAddFunds?: () => void;
1821
+ onWithdraw?: () => void;
1822
+ className?: string;
1823
+ }
1824
+ declare function BalanceHero({ onAddFunds, onWithdraw, className }: BalanceHeroProps): react_jsx_runtime.JSX.Element;
1825
+
1826
+ type ActivityType = 'payment' | 'deposit' | 'withdrawal';
1827
+ interface ActivityItem$1 {
1828
+ id: string;
1829
+ type: ActivityType;
1830
+ amount: string;
1831
+ amountDisplay: string;
1832
+ currency?: string;
1833
+ status: 'pending' | 'completed' | 'failed' | 'expired' | 'confirming';
1834
+ statusDisplay: string;
1835
+ description: string;
1836
+ createdAt: string;
1837
+ payment?: PaymentList;
1838
+ transaction?: Transaction;
1839
+ withdrawal?: WithdrawalList;
1840
+ }
1841
+
1842
+ interface ActivityListProps {
1843
+ onItemClick?: (item: ActivityItem$1) => void;
1844
+ onViewAll?: () => void;
1845
+ limit?: number;
1846
+ className?: string;
1847
+ }
1848
+ declare function ActivityList({ onItemClick, onViewAll, limit, className, }: ActivityListProps): react_jsx_runtime.JSX.Element;
1849
+
1850
+ interface ActivityItemProps {
1851
+ item: ActivityItem$1;
1852
+ onClick?: () => void;
1853
+ }
1854
+ declare function ActivityItem({ item, onClick }: ActivityItemProps): react_jsx_runtime.JSX.Element;
1855
+
1856
+ interface AddFundsSheetProps {
1857
+ open: boolean;
1858
+ onOpenChange: (open: boolean) => void;
1859
+ onSuccess?: (payment: PaymentDetail) => void;
1860
+ }
1861
+ declare function AddFundsSheet({ open, onOpenChange, onSuccess }: AddFundsSheetProps): react_jsx_runtime.JSX.Element;
1277
1862
 
1278
- interface PaymentsLayoutProps {
1279
- children?: React.ReactNode;
1863
+ interface WithdrawSheetProps {
1864
+ open: boolean;
1865
+ onOpenChange: (open: boolean) => void;
1866
+ onSuccess?: (withdrawal: WithdrawalDetail) => void;
1280
1867
  }
1281
- declare const PaymentsLayout: React.FC<PaymentsLayoutProps>;
1868
+ declare function WithdrawSheet({ open, onOpenChange, onSuccess }: WithdrawSheetProps): react_jsx_runtime.JSX.Element;
1282
1869
 
1283
1870
  /**
1284
- * Payments Layout Types (v2.0 - Simplified)
1871
+ * Withdrawal Details Sheet (Apple-style)
1872
+ *
1873
+ * Shows withdrawal request details and status
1285
1874
  */
1286
- type PaymentTab = 'overview' | 'payments' | 'transactions';
1875
+ interface WithdrawalSheetProps {
1876
+ withdrawalId: string | null;
1877
+ open: boolean;
1878
+ onOpenChange: (open: boolean) => void;
1879
+ }
1880
+ declare function WithdrawalSheet({ withdrawalId, open, onOpenChange }: WithdrawalSheetProps): react_jsx_runtime.JSX.Element;
1287
1881
 
1288
1882
  /**
1289
- * Payment Events System (v2.0 - Simplified)
1883
+ * Payment Sheet (Apple-style)
1290
1884
  *
1291
- * Event-based communication for dialogs using DOM events
1292
- * Removed: API Keys events (deprecated)
1885
+ * Responsive: Dialog on desktop, Drawer on mobile
1886
+ * Shows payment details with QR code and address
1293
1887
  */
1294
- declare const PAYMENT_EVENTS: {
1295
- readonly OPEN_CREATE_PAYMENT_DIALOG: "payments:open-create-payment";
1296
- readonly OPEN_PAYMENT_DETAILS_DIALOG: "payments:open-payment-details";
1297
- readonly CLOSE_DIALOG: "payments:close-dialog";
1298
- };
1299
- type PaymentEvent = {
1300
- type: 'OPEN_CREATE_PAYMENT';
1301
- } | {
1302
- type: 'OPEN_PAYMENT_DETAILS';
1303
- id: string;
1304
- } | {
1305
- type: 'CLOSE_DIALOG';
1306
- };
1307
- declare const openCreatePaymentDialog: () => void;
1308
- declare const openPaymentDetailsDialog: (id: string) => void;
1309
- declare const closePaymentsDialog: () => void;
1888
+ interface PaymentSheetProps {
1889
+ paymentId: string | null;
1890
+ open: boolean;
1891
+ onOpenChange: (open: boolean) => void;
1892
+ onCreateNew?: () => void;
1893
+ }
1894
+ declare function PaymentSheet({ paymentId, open, onOpenChange, onCreateNew }: PaymentSheetProps): react_jsx_runtime.JSX.Element;
1310
1895
 
1311
1896
  /**
1312
1897
  * Payments extension configuration
1313
1898
  */
1314
1899
  declare const extensionConfig: _djangocfg_ext_base.ExtensionMetadata;
1315
1900
 
1316
- export { API, APIClient, APIError, APILogger, type APIOptions, type Balance, BalanceSchema, CookieStorageAdapter, type Currency, CurrencySchema, DEFAULT_RETRY_CONFIG, enums as Enums, type ErrorLog, models as ExtPaymentsPaymentsTypes, type FailedAttemptInfo, FetchAdapter, index as Fetchers, type HttpClientAdapter, type HttpRequest, type HttpResponse, LocalStorageAdapter, type LoggerConfig, MemoryStorageAdapter, NetworkError, PAYMENT_EVENTS, type PaginatedPaymentListList, PaginatedPaymentListListSchema, type PaymentDetail, PaymentDetailSchema, type PaymentEvent, type PaymentList, PaymentListSchema, type PaymentTab, PaymentsLayout, type PaymentsLayoutProps, REFRESH_TOKEN_KEY, type RequestLog, type ResponseLog, type RetryConfig, index$1 as Schemas, type StorageAdapter, TOKEN_KEY, type Transaction, TransactionSchema, type ValidationErrorDetail, type ValidationErrorEvent, apiPayments, clearAPITokens, closePaymentsDialog, configureAPI, createPaymentsPaymentsConfirmCreate, createPaymentsPaymentsCreateCreate, dispatchValidationError, extensionConfig, formatZodError, getAPIInstance, getPaymentsBalanceRetrieve, getPaymentsCurrenciesList, getPaymentsPaymentsList, getPaymentsPaymentsRetrieve, getPaymentsPaymentsStatusRetrieve, getPaymentsTransactionsList, isAPIConfigured, onValidationError, openCreatePaymentDialog, openPaymentDetailsDialog, reconfigureAPI, resetAPI, shouldRetry, withRetry };
1901
+ export { API, APIClient, APIError, APILogger, type APIOptions, ActivityItem, ActivityList, AddFundsSheet, type Balance, BalanceHero, BalanceSchema, CookieStorageAdapter, type Currency, CurrencySchema, DEFAULT_RETRY_CONFIG, enums as Enums, type ErrorLog, models as ExtPaymentsPaymentsTypes, type FailedAttemptInfo, FetchAdapter, index as Fetchers, type HttpClientAdapter, type HttpRequest, type HttpResponse, LocalStorageAdapter, type LoggerConfig, MemoryStorageAdapter, NetworkError, type PaginatedPaymentListList, PaginatedPaymentListListSchema, type PaginatedWithdrawalListList, PaginatedWithdrawalListListSchema, type PaymentCreateRequest, PaymentCreateRequestSchema, type PaymentCreateResponse, PaymentCreateResponseSchema, type PaymentDetail, PaymentDetailSchema, type PaymentList, PaymentListSchema, PaymentSheet, REFRESH_TOKEN_KEY, type RequestLog, type ResponseLog, type RetryConfig, index$1 as Schemas, type StorageAdapter, TOKEN_KEY, type Transaction, TransactionSchema, type ValidationErrorDetail, type ValidationErrorEvent, WalletPage, WithdrawSheet, type WithdrawalCancelResponse, WithdrawalCancelResponseSchema, type WithdrawalCreateRequest, WithdrawalCreateRequestSchema, type WithdrawalCreateResponse, WithdrawalCreateResponseSchema, type WithdrawalDetail, WithdrawalDetailSchema, type WithdrawalList, WithdrawalListSchema, WithdrawalSheet, apiPayments, clearAPITokens, configureAPI, createPaymentsPaymentsConfirmCreate, createPaymentsPaymentsCreateCreate, createPaymentsWithdrawalsCancelCreate, createPaymentsWithdrawalsCreateCreate, dispatchValidationError, extensionConfig, formatZodError, getAPIInstance, getPaymentsBalanceRetrieve, getPaymentsCurrenciesEstimateRetrieve, getPaymentsCurrenciesList, getPaymentsCurrenciesWithdrawalEstimateRetrieve, getPaymentsPaymentsList, getPaymentsPaymentsRetrieve, getPaymentsPaymentsStatusRetrieve, getPaymentsTransactionsList, getPaymentsWithdrawalsList, getPaymentsWithdrawalsRetrieve, isAPIConfigured, onValidationError, reconfigureAPI, resetAPI, shouldRetry, withRetry };