@djangocfg/ext-payments 1.0.17 → 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 (46) hide show
  1. package/dist/config.cjs +1 -1
  2. package/dist/config.js +1 -1
  3. package/dist/index.cjs +1175 -290
  4. package/dist/index.d.cts +226 -80
  5. package/dist/index.d.ts +226 -80
  6. package/dist/index.js +1157 -255
  7. package/package.json +9 -9
  8. package/src/WalletPage.tsx +100 -0
  9. package/src/api/generated/ext_payments/CLAUDE.md +6 -4
  10. package/src/api/generated/ext_payments/_utils/fetchers/ext_payments__payments.ts +37 -6
  11. package/src/api/generated/ext_payments/_utils/hooks/ext_payments__payments.ts +34 -3
  12. package/src/api/generated/ext_payments/_utils/schemas/Balance.schema.ts +1 -1
  13. package/src/api/generated/ext_payments/_utils/schemas/PaymentCreateResponse.schema.ts +22 -0
  14. package/src/api/generated/ext_payments/_utils/schemas/PaymentDetail.schema.ts +3 -3
  15. package/src/api/generated/ext_payments/_utils/schemas/PaymentList.schema.ts +2 -2
  16. package/src/api/generated/ext_payments/_utils/schemas/Transaction.schema.ts +1 -1
  17. package/src/api/generated/ext_payments/_utils/schemas/WithdrawalCancelResponse.schema.ts +22 -0
  18. package/src/api/generated/ext_payments/_utils/schemas/WithdrawalCreateResponse.schema.ts +22 -0
  19. package/src/api/generated/ext_payments/_utils/schemas/WithdrawalDetail.schema.ts +5 -5
  20. package/src/api/generated/ext_payments/_utils/schemas/WithdrawalList.schema.ts +2 -2
  21. package/src/api/generated/ext_payments/_utils/schemas/index.ts +3 -0
  22. package/src/api/generated/ext_payments/client.ts +1 -1
  23. package/src/api/generated/ext_payments/ext_payments__payments/client.ts +49 -4
  24. package/src/api/generated/ext_payments/ext_payments__payments/models.ts +33 -14
  25. package/src/api/generated/ext_payments/index.ts +1 -1
  26. package/src/api/generated/ext_payments/schema.json +167 -33
  27. package/src/components/AddFundsSheet.tsx +157 -73
  28. package/src/components/CurrencyCombobox.tsx +49 -0
  29. package/src/components/PaymentSheet.tsx +94 -32
  30. package/src/components/WithdrawSheet.tsx +121 -95
  31. package/src/components/WithdrawalSheet.tsx +332 -0
  32. package/src/components/index.ts +1 -8
  33. package/src/config.ts +1 -0
  34. package/src/contexts/WalletContext.tsx +10 -9
  35. package/src/contexts/index.ts +5 -1
  36. package/src/contexts/types.ts +46 -0
  37. package/src/hooks/index.ts +3 -0
  38. package/src/hooks/useCurrencyOptions.ts +79 -0
  39. package/src/hooks/useEstimate.ts +113 -0
  40. package/src/hooks/useWithdrawalEstimate.ts +117 -0
  41. package/src/index.ts +3 -0
  42. package/src/types/index.ts +78 -0
  43. package/src/utils/errors.ts +36 -0
  44. package/src/utils/format.ts +65 -0
  45. package/src/utils/index.ts +3 -0
  46. package/src/components/ResponsiveSheet.tsx +0 -151
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { ConsolaInstance } from 'consola';
2
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ConsolaInstance } from 'consola';
3
3
  import { z, ZodError } from 'zod';
4
- import * as React from 'react';
5
4
  import * as _djangocfg_ext_base from '@djangocfg/ext-base';
6
5
 
6
+ declare function WalletPage(): react_jsx_runtime.JSX.Element;
7
+
7
8
  /**
8
9
  * Current payment status
9
10
  * * `pending` - Pending
@@ -170,11 +171,8 @@ interface PaymentDetail$1 {
170
171
  currency_name: string;
171
172
  currency_token: string;
172
173
  currency_network: string;
173
- /** Amount to pay in cryptocurrency */
174
174
  pay_amount?: string | null;
175
- /** Actual amount received in cryptocurrency */
176
175
  actual_amount?: string | null;
177
- /** Actual amount received in USD */
178
176
  actual_amount_usd?: string | null;
179
177
  /** Current payment status
180
178
 
@@ -188,21 +186,16 @@ interface PaymentDetail$1 {
188
186
  * `cancelled` - Cancelled */
189
187
  status: PaymentDetailStatus;
190
188
  status_display: string;
191
- /** Cryptocurrency payment address */
192
189
  pay_address?: string | null;
193
190
  /** Get QR code URL. */
194
191
  qr_code_url?: string | null;
195
- /** Payment page URL (if provided by provider) */
196
192
  payment_url?: string | null;
197
- /** Blockchain transaction hash */
198
193
  transaction_hash?: string | null;
199
194
  /** Get blockchain explorer link. */
200
195
  explorer_link?: string | null;
201
196
  /** Number of blockchain confirmations */
202
197
  confirmations_count: number;
203
- /** When this payment expires (typically 30 minutes) */
204
198
  expires_at?: string | null;
205
- /** When this payment was completed */
206
199
  completed_at?: string | null;
207
200
  /** When this record was created */
208
201
  created_at: string;
@@ -256,6 +249,16 @@ interface PaymentCreateRequest$1 {
256
249
  /** Optional payment description */
257
250
  description?: string;
258
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
+ }
259
262
  /**
260
263
  *
261
264
  * Response model (includes read-only fields).
@@ -306,7 +309,6 @@ interface WithdrawalDetail$1 {
306
309
  total_fee_usd: string;
307
310
  /** Final amount to receive (amount - total_fee) */
308
311
  final_amount_usd: string;
309
- /** Amount in cryptocurrency (calculated at processing time) */
310
312
  crypto_amount?: string | null;
311
313
  /** Withdrawal status
312
314
 
@@ -318,7 +320,6 @@ interface WithdrawalDetail$1 {
318
320
  * `cancelled` - Cancelled */
319
321
  status: WithdrawalDetailStatus;
320
322
  status_display: string;
321
- /** Blockchain transaction hash (after sending) */
322
323
  transaction_hash?: string | null;
323
324
  /** Get blockchain explorer link. */
324
325
  explorer_link?: string | null;
@@ -326,15 +327,21 @@ interface WithdrawalDetail$1 {
326
327
  admin_notes: string;
327
328
  /** When this record was created */
328
329
  created_at: string;
329
- /** When approved by admin */
330
330
  approved_at?: string | null;
331
- /** When withdrawal was completed */
332
331
  completed_at?: string | null;
333
- /** When rejected by admin */
334
332
  rejected_at?: string | null;
335
- /** When cancelled by user */
336
333
  cancelled_at?: string | null;
337
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
+ }
338
345
  /**
339
346
  * Serializer for creating withdrawal request.
340
347
  *
@@ -348,6 +355,16 @@ interface WithdrawalCreateRequest$1 {
348
355
  /** Destination wallet address */
349
356
  wallet_address: string;
350
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
+ }
351
368
  /**
352
369
  * Withdrawal list item (lighter than detail).
353
370
  *
@@ -381,7 +398,7 @@ interface WithdrawalList$1 {
381
398
  }
382
399
 
383
400
  declare namespace models {
384
- export type { Balance$1 as Balance, PaginatedPaymentListList$1 as PaginatedPaymentListList, PaginatedWithdrawalListList$1 as PaginatedWithdrawalListList, PaymentCreateRequest$1 as PaymentCreateRequest, PaymentDetail$1 as PaymentDetail, PaymentList$1 as PaymentList, WithdrawalCreateRequest$1 as WithdrawalCreateRequest, WithdrawalDetail$1 as WithdrawalDetail, WithdrawalList$1 as WithdrawalList };
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 };
385
402
  }
386
403
 
387
404
  /**
@@ -399,9 +416,18 @@ declare class ExtPaymentsPayments {
399
416
  /**
400
417
  * Get available currencies
401
418
  *
402
- * Returns list of available currencies with token+network info
419
+ * Returns list of available currencies with token+network info, popular
420
+ * first
403
421
  */
404
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>;
405
431
  paymentsList(page?: number, page_size?: number): Promise<PaginatedPaymentListList$1>;
406
432
  paymentsList(params?: {
407
433
  page?: number;
@@ -431,7 +457,7 @@ declare class ExtPaymentsPayments {
431
457
  *
432
458
  * Create a new payment with specified amount and currency
433
459
  */
434
- paymentsCreateCreate(data: PaymentCreateRequest$1): Promise<PaymentDetail$1>;
460
+ paymentsCreateCreate(data: PaymentCreateRequest$1): Promise<PaymentCreateResponse$1>;
435
461
  transactionsList(limit?: number, offset?: number, type?: string): Promise<any>;
436
462
  transactionsList(params?: {
437
463
  limit?: number;
@@ -455,13 +481,13 @@ declare class ExtPaymentsPayments {
455
481
  *
456
482
  * Cancel a pending withdrawal request
457
483
  */
458
- withdrawalsCancelCreate(id: string): Promise<WithdrawalDetail$1>;
484
+ withdrawalsCancelCreate(id: string): Promise<WithdrawalCancelResponse$1>;
459
485
  /**
460
486
  * Create withdrawal request
461
487
  *
462
488
  * Create a new withdrawal request (requires admin approval)
463
489
  */
464
- withdrawalsCreateCreate(data: WithdrawalCreateRequest$1): Promise<WithdrawalDetail$1>;
490
+ withdrawalsCreateCreate(data: WithdrawalCreateRequest$1): Promise<WithdrawalCreateResponse$1>;
465
491
  }
466
492
 
467
493
  /**
@@ -713,7 +739,7 @@ declare function shouldRetry(error: any): boolean;
713
739
  declare function withRetry<T>(fn: () => Promise<T>, config?: RetryConfig): Promise<T>;
714
740
 
715
741
  /**
716
- * Async API client for Django CFG API.
742
+ * Async API client for Cmdop API.
717
743
  *
718
744
  * Usage:
719
745
  * ```typescript
@@ -843,7 +869,7 @@ declare const BalanceSchema: z.ZodObject<{
843
869
  balance_display: z.ZodString;
844
870
  total_deposited: z.ZodString;
845
871
  total_withdrawn: z.ZodString;
846
- last_transaction_at: z.ZodNullable<z.ZodISODateTime>;
872
+ last_transaction_at: z.ZodNullable<z.ZodString>;
847
873
  }, z.core.$strip>;
848
874
  /**
849
875
  * Infer TypeScript type from Zod schema
@@ -894,8 +920,8 @@ declare const PaginatedPaymentListListSchema: z.ZodObject<{
894
920
  currency_token: z.ZodString;
895
921
  status: z.ZodEnum<typeof PaymentListStatus>;
896
922
  status_display: z.ZodString;
897
- created_at: z.ZodISODateTime;
898
- completed_at: z.ZodNullable<z.ZodISODateTime>;
923
+ created_at: z.ZodString;
924
+ completed_at: z.ZodNullable<z.ZodString>;
899
925
  }, z.core.$strip>>;
900
926
  }, z.core.$strip>;
901
927
  /**
@@ -921,8 +947,8 @@ declare const PaginatedWithdrawalListListSchema: z.ZodObject<{
921
947
  currency_token: z.ZodString;
922
948
  status: z.ZodEnum<typeof WithdrawalListStatus>;
923
949
  status_display: z.ZodString;
924
- created_at: z.ZodISODateTime;
925
- completed_at: z.ZodNullable<z.ZodISODateTime>;
950
+ created_at: z.ZodString;
951
+ completed_at: z.ZodNullable<z.ZodString>;
926
952
  }, z.core.$strip>>;
927
953
  }, z.core.$strip>;
928
954
  /**
@@ -950,6 +976,45 @@ declare const PaymentCreateRequestSchema: z.ZodObject<{
950
976
  */
951
977
  type PaymentCreateRequest = z.infer<typeof PaymentCreateRequestSchema>;
952
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
+
953
1018
  /**
954
1019
  * Zod schema for PaymentDetail
955
1020
  *
@@ -979,9 +1044,9 @@ declare const PaymentDetailSchema: z.ZodObject<{
979
1044
  transaction_hash: z.ZodNullable<z.ZodString>;
980
1045
  explorer_link: z.ZodNullable<z.ZodString>;
981
1046
  confirmations_count: z.ZodInt;
982
- expires_at: z.ZodNullable<z.ZodISODateTime>;
983
- completed_at: z.ZodNullable<z.ZodISODateTime>;
984
- created_at: z.ZodISODateTime;
1047
+ expires_at: z.ZodNullable<z.ZodString>;
1048
+ completed_at: z.ZodNullable<z.ZodString>;
1049
+ created_at: z.ZodString;
985
1050
  is_completed: z.ZodBoolean;
986
1051
  is_failed: z.ZodBoolean;
987
1052
  is_expired: z.ZodBoolean;
@@ -1010,8 +1075,8 @@ declare const PaymentListSchema: z.ZodObject<{
1010
1075
  currency_token: z.ZodString;
1011
1076
  status: z.ZodEnum<typeof PaymentListStatus>;
1012
1077
  status_display: z.ZodString;
1013
- created_at: z.ZodISODateTime;
1014
- completed_at: z.ZodNullable<z.ZodISODateTime>;
1078
+ created_at: z.ZodString;
1079
+ completed_at: z.ZodNullable<z.ZodString>;
1015
1080
  }, z.core.$strip>;
1016
1081
  /**
1017
1082
  * Infer TypeScript type from Zod schema
@@ -1037,13 +1102,50 @@ declare const TransactionSchema: z.ZodObject<{
1037
1102
  balance_after: z.ZodString;
1038
1103
  payment_id: z.ZodNullable<z.ZodString>;
1039
1104
  description: z.ZodString;
1040
- created_at: z.ZodISODateTime;
1105
+ created_at: z.ZodString;
1041
1106
  }, z.core.$strip>;
1042
1107
  /**
1043
1108
  * Infer TypeScript type from Zod schema
1044
1109
  */
1045
1110
  type Transaction = z.infer<typeof TransactionSchema>;
1046
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
+
1047
1149
  /**
1048
1150
  * Zod schema for WithdrawalCreateRequest
1049
1151
  *
@@ -1064,6 +1166,43 @@ declare const WithdrawalCreateRequestSchema: z.ZodObject<{
1064
1166
  */
1065
1167
  type WithdrawalCreateRequest = z.infer<typeof WithdrawalCreateRequestSchema>;
1066
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
+
1067
1206
  /**
1068
1207
  * Zod schema for WithdrawalDetail
1069
1208
  *
@@ -1093,11 +1232,11 @@ declare const WithdrawalDetailSchema: z.ZodObject<{
1093
1232
  transaction_hash: z.ZodNullable<z.ZodString>;
1094
1233
  explorer_link: z.ZodNullable<z.ZodString>;
1095
1234
  admin_notes: z.ZodString;
1096
- created_at: z.ZodISODateTime;
1097
- approved_at: z.ZodNullable<z.ZodISODateTime>;
1098
- completed_at: z.ZodNullable<z.ZodISODateTime>;
1099
- rejected_at: z.ZodNullable<z.ZodISODateTime>;
1100
- cancelled_at: z.ZodNullable<z.ZodISODateTime>;
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>;
1101
1240
  }, z.core.$strip>;
1102
1241
  /**
1103
1242
  * Infer TypeScript type from Zod schema
@@ -1123,8 +1262,8 @@ declare const WithdrawalListSchema: z.ZodObject<{
1123
1262
  currency_token: z.ZodString;
1124
1263
  status: z.ZodEnum<typeof WithdrawalListStatus>;
1125
1264
  status_display: z.ZodString;
1126
- created_at: z.ZodISODateTime;
1127
- completed_at: z.ZodNullable<z.ZodISODateTime>;
1265
+ created_at: z.ZodString;
1266
+ completed_at: z.ZodNullable<z.ZodString>;
1128
1267
  }, z.core.$strip>;
1129
1268
  /**
1130
1269
  * Infer TypeScript type from Zod schema
@@ -1159,20 +1298,26 @@ type index$1_PaginatedWithdrawalListList = PaginatedWithdrawalListList;
1159
1298
  declare const index$1_PaginatedWithdrawalListListSchema: typeof PaginatedWithdrawalListListSchema;
1160
1299
  type index$1_PaymentCreateRequest = PaymentCreateRequest;
1161
1300
  declare const index$1_PaymentCreateRequestSchema: typeof PaymentCreateRequestSchema;
1301
+ type index$1_PaymentCreateResponse = PaymentCreateResponse;
1302
+ declare const index$1_PaymentCreateResponseSchema: typeof PaymentCreateResponseSchema;
1162
1303
  type index$1_PaymentDetail = PaymentDetail;
1163
1304
  declare const index$1_PaymentDetailSchema: typeof PaymentDetailSchema;
1164
1305
  type index$1_PaymentList = PaymentList;
1165
1306
  declare const index$1_PaymentListSchema: typeof PaymentListSchema;
1166
1307
  type index$1_Transaction = Transaction;
1167
1308
  declare const index$1_TransactionSchema: typeof TransactionSchema;
1309
+ type index$1_WithdrawalCancelResponse = WithdrawalCancelResponse;
1310
+ declare const index$1_WithdrawalCancelResponseSchema: typeof WithdrawalCancelResponseSchema;
1168
1311
  type index$1_WithdrawalCreateRequest = WithdrawalCreateRequest;
1169
1312
  declare const index$1_WithdrawalCreateRequestSchema: typeof WithdrawalCreateRequestSchema;
1313
+ type index$1_WithdrawalCreateResponse = WithdrawalCreateResponse;
1314
+ declare const index$1_WithdrawalCreateResponseSchema: typeof WithdrawalCreateResponseSchema;
1170
1315
  type index$1_WithdrawalDetail = WithdrawalDetail;
1171
1316
  declare const index$1_WithdrawalDetailSchema: typeof WithdrawalDetailSchema;
1172
1317
  type index$1_WithdrawalList = WithdrawalList;
1173
1318
  declare const index$1_WithdrawalListSchema: typeof WithdrawalListSchema;
1174
1319
  declare namespace index$1 {
1175
- 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_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_WithdrawalCreateRequest as WithdrawalCreateRequest, index$1_WithdrawalCreateRequestSchema as WithdrawalCreateRequestSchema, type index$1_WithdrawalDetail as WithdrawalDetail, index$1_WithdrawalDetailSchema as WithdrawalDetailSchema, type index$1_WithdrawalList as WithdrawalList, index$1_WithdrawalListSchema as WithdrawalListSchema };
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 };
1176
1321
  }
1177
1322
 
1178
1323
  /**
@@ -1262,6 +1407,24 @@ declare function getPaymentsBalanceRetrieve(client?: any): Promise<Balance>;
1262
1407
  * @path /cfg/payments/currencies/
1263
1408
  */
1264
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>;
1265
1428
  /**
1266
1429
  * API operation
1267
1430
  *
@@ -1299,7 +1462,7 @@ declare function getPaymentsPaymentsStatusRetrieve(id: string, client?: any): Pr
1299
1462
  * @method POST
1300
1463
  * @path /cfg/payments/payments/create/
1301
1464
  */
1302
- declare function createPaymentsPaymentsCreateCreate(data: PaymentCreateRequest, client?: any): Promise<PaymentDetail>;
1465
+ declare function createPaymentsPaymentsCreateCreate(data: PaymentCreateRequest, client?: any): Promise<PaymentCreateResponse>;
1303
1466
  /**
1304
1467
  * Get user transactions
1305
1468
  *
@@ -1334,14 +1497,14 @@ declare function getPaymentsWithdrawalsRetrieve(id: string, client?: any): Promi
1334
1497
  * @method POST
1335
1498
  * @path /cfg/payments/withdrawals/{id}/cancel/
1336
1499
  */
1337
- declare function createPaymentsWithdrawalsCancelCreate(id: string, client?: any): Promise<WithdrawalDetail>;
1500
+ declare function createPaymentsWithdrawalsCancelCreate(id: string, client?: any): Promise<WithdrawalCancelResponse>;
1338
1501
  /**
1339
1502
  * Create withdrawal request
1340
1503
  *
1341
1504
  * @method POST
1342
1505
  * @path /cfg/payments/withdrawals/create/
1343
1506
  */
1344
- declare function createPaymentsWithdrawalsCreateCreate(data: WithdrawalCreateRequest, client?: any): Promise<WithdrawalDetail>;
1507
+ declare function createPaymentsWithdrawalsCreateCreate(data: WithdrawalCreateRequest, client?: any): Promise<WithdrawalCreateResponse>;
1345
1508
 
1346
1509
  /**
1347
1510
  * Typed Fetchers - Universal API functions
@@ -1375,7 +1538,9 @@ declare const index_createPaymentsPaymentsCreateCreate: typeof createPaymentsPay
1375
1538
  declare const index_createPaymentsWithdrawalsCancelCreate: typeof createPaymentsWithdrawalsCancelCreate;
1376
1539
  declare const index_createPaymentsWithdrawalsCreateCreate: typeof createPaymentsWithdrawalsCreateCreate;
1377
1540
  declare const index_getPaymentsBalanceRetrieve: typeof getPaymentsBalanceRetrieve;
1541
+ declare const index_getPaymentsCurrenciesEstimateRetrieve: typeof getPaymentsCurrenciesEstimateRetrieve;
1378
1542
  declare const index_getPaymentsCurrenciesList: typeof getPaymentsCurrenciesList;
1543
+ declare const index_getPaymentsCurrenciesWithdrawalEstimateRetrieve: typeof getPaymentsCurrenciesWithdrawalEstimateRetrieve;
1379
1544
  declare const index_getPaymentsPaymentsList: typeof getPaymentsPaymentsList;
1380
1545
  declare const index_getPaymentsPaymentsRetrieve: typeof getPaymentsPaymentsRetrieve;
1381
1546
  declare const index_getPaymentsPaymentsStatusRetrieve: typeof getPaymentsPaymentsStatusRetrieve;
@@ -1383,7 +1548,7 @@ declare const index_getPaymentsTransactionsList: typeof getPaymentsTransactionsL
1383
1548
  declare const index_getPaymentsWithdrawalsList: typeof getPaymentsWithdrawalsList;
1384
1549
  declare const index_getPaymentsWithdrawalsRetrieve: typeof getPaymentsWithdrawalsRetrieve;
1385
1550
  declare namespace index {
1386
- export { index_createPaymentsPaymentsConfirmCreate as createPaymentsPaymentsConfirmCreate, index_createPaymentsPaymentsCreateCreate as createPaymentsPaymentsCreateCreate, index_createPaymentsWithdrawalsCancelCreate as createPaymentsWithdrawalsCancelCreate, index_createPaymentsWithdrawalsCreateCreate as createPaymentsWithdrawalsCreateCreate, index_getPaymentsBalanceRetrieve as getPaymentsBalanceRetrieve, index_getPaymentsCurrenciesList as getPaymentsCurrenciesList, index_getPaymentsPaymentsList as getPaymentsPaymentsList, index_getPaymentsPaymentsRetrieve as getPaymentsPaymentsRetrieve, index_getPaymentsPaymentsStatusRetrieve as getPaymentsPaymentsStatusRetrieve, index_getPaymentsTransactionsList as getPaymentsTransactionsList, index_getPaymentsWithdrawalsList as getPaymentsWithdrawalsList, index_getPaymentsWithdrawalsRetrieve as getPaymentsWithdrawalsRetrieve };
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 };
1387
1552
  }
1388
1553
 
1389
1554
  /**
@@ -1537,7 +1702,7 @@ declare class NetworkError extends Error {
1537
1702
  }
1538
1703
 
1539
1704
  /**
1540
- * Django CFG API - API Client with JWT Management
1705
+ * Cmdop API - API Client with JWT Management
1541
1706
  *
1542
1707
  * Usage:
1543
1708
  * ```typescript
@@ -1702,6 +1867,18 @@ interface WithdrawSheetProps {
1702
1867
  }
1703
1868
  declare function WithdrawSheet({ open, onOpenChange, onSuccess }: WithdrawSheetProps): react_jsx_runtime.JSX.Element;
1704
1869
 
1870
+ /**
1871
+ * Withdrawal Details Sheet (Apple-style)
1872
+ *
1873
+ * Shows withdrawal request details and status
1874
+ */
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;
1881
+
1705
1882
  /**
1706
1883
  * Payment Sheet (Apple-style)
1707
1884
  *
@@ -1712,44 +1889,13 @@ interface PaymentSheetProps {
1712
1889
  paymentId: string | null;
1713
1890
  open: boolean;
1714
1891
  onOpenChange: (open: boolean) => void;
1892
+ onCreateNew?: () => void;
1715
1893
  }
1716
- declare function PaymentSheet({ paymentId, open, onOpenChange }: PaymentSheetProps): react_jsx_runtime.JSX.Element;
1717
-
1718
- interface ResponsiveSheetProps {
1719
- open: boolean;
1720
- onOpenChange: (open: boolean) => void;
1721
- children: React.ReactNode;
1722
- }
1723
- interface ResponsiveSheetHeaderProps {
1724
- children: React.ReactNode;
1725
- className?: string;
1726
- }
1727
- interface ResponsiveSheetTitleProps {
1728
- children: React.ReactNode;
1729
- className?: string;
1730
- }
1731
- interface ResponsiveSheetDescriptionProps {
1732
- children: React.ReactNode;
1733
- className?: string;
1734
- }
1735
- interface ResponsiveSheetContentProps {
1736
- children: React.ReactNode;
1737
- className?: string;
1738
- }
1739
- interface ResponsiveSheetFooterProps {
1740
- children: React.ReactNode;
1741
- className?: string;
1742
- }
1743
- declare function ResponsiveSheet({ open, onOpenChange, children }: ResponsiveSheetProps): react_jsx_runtime.JSX.Element;
1744
- declare function ResponsiveSheetContent({ children, className }: ResponsiveSheetContentProps): react_jsx_runtime.JSX.Element;
1745
- declare function ResponsiveSheetHeader({ children, className }: ResponsiveSheetHeaderProps): react_jsx_runtime.JSX.Element;
1746
- declare function ResponsiveSheetTitle({ children, className }: ResponsiveSheetTitleProps): react_jsx_runtime.JSX.Element;
1747
- declare function ResponsiveSheetDescription({ children, className }: ResponsiveSheetDescriptionProps): react_jsx_runtime.JSX.Element;
1748
- declare function ResponsiveSheetFooter({ children, className }: ResponsiveSheetFooterProps): react_jsx_runtime.JSX.Element;
1894
+ declare function PaymentSheet({ paymentId, open, onOpenChange, onCreateNew }: PaymentSheetProps): react_jsx_runtime.JSX.Element;
1749
1895
 
1750
1896
  /**
1751
1897
  * Payments extension configuration
1752
1898
  */
1753
1899
  declare const extensionConfig: _djangocfg_ext_base.ExtensionMetadata;
1754
1900
 
1755
- 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 PaymentDetail, PaymentDetailSchema, type PaymentList, PaymentListSchema, PaymentSheet, REFRESH_TOKEN_KEY, type RequestLog, type ResponseLog, ResponsiveSheet, ResponsiveSheetContent, ResponsiveSheetDescription, ResponsiveSheetFooter, ResponsiveSheetHeader, ResponsiveSheetTitle, type RetryConfig, index$1 as Schemas, type StorageAdapter, TOKEN_KEY, type Transaction, TransactionSchema, type ValidationErrorDetail, type ValidationErrorEvent, WithdrawSheet, type WithdrawalCreateRequest, WithdrawalCreateRequestSchema, type WithdrawalDetail, WithdrawalDetailSchema, type WithdrawalList, WithdrawalListSchema, apiPayments, clearAPITokens, configureAPI, createPaymentsPaymentsConfirmCreate, createPaymentsPaymentsCreateCreate, createPaymentsWithdrawalsCancelCreate, createPaymentsWithdrawalsCreateCreate, dispatchValidationError, extensionConfig, formatZodError, getAPIInstance, getPaymentsBalanceRetrieve, getPaymentsCurrenciesList, getPaymentsPaymentsList, getPaymentsPaymentsRetrieve, getPaymentsPaymentsStatusRetrieve, getPaymentsTransactionsList, getPaymentsWithdrawalsList, getPaymentsWithdrawalsRetrieve, isAPIConfigured, onValidationError, 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 };