@djangocfg/ext-payments 1.0.13 → 1.0.17
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/config.cjs +5 -8
- package/dist/config.js +5 -8
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +1 -1
- package/dist/index.cjs +1085 -1107
- package/dist/index.d.cts +480 -41
- package/dist/index.d.ts +480 -41
- package/dist/index.js +1037 -1093
- package/package.json +13 -16
- package/src/api/generated/ext_payments/CLAUDE.md +7 -3
- package/src/api/generated/ext_payments/_utils/fetchers/ext_payments__payments.ts +237 -5
- package/src/api/generated/ext_payments/_utils/hooks/ext_payments__payments.ts +71 -3
- package/src/api/generated/ext_payments/_utils/schemas/PaginatedWithdrawalListList.schema.ts +24 -0
- package/src/api/generated/ext_payments/_utils/schemas/PaymentCreateRequest.schema.ts +21 -0
- package/src/api/generated/ext_payments/_utils/schemas/WithdrawalCreateRequest.schema.ts +21 -0
- package/src/api/generated/ext_payments/_utils/schemas/WithdrawalDetail.schema.ts +42 -0
- package/src/api/generated/ext_payments/_utils/schemas/WithdrawalList.schema.ts +29 -0
- package/src/api/generated/ext_payments/_utils/schemas/index.ts +5 -0
- package/src/api/generated/ext_payments/enums.ts +36 -0
- package/src/api/generated/ext_payments/ext_payments__payments/client.ts +58 -5
- package/src/api/generated/ext_payments/ext_payments__payments/models.ts +141 -0
- package/src/api/generated/ext_payments/schema.json +579 -3
- package/src/components/ActivityItem.tsx +118 -0
- package/src/components/ActivityList.tsx +93 -0
- package/src/components/AddFundsSheet.tsx +258 -0
- package/src/components/BalanceHero.tsx +102 -0
- package/src/components/PaymentSheet.tsx +290 -0
- package/src/components/ResponsiveSheet.tsx +151 -0
- package/src/components/WithdrawSheet.tsx +329 -0
- package/src/components/index.ts +18 -0
- package/src/contexts/WalletContext.tsx +355 -0
- package/src/contexts/index.ts +12 -45
- package/src/index.ts +6 -18
- package/src/contexts/BalancesContext.tsx +0 -63
- package/src/contexts/CurrenciesContext.tsx +0 -64
- package/src/contexts/OverviewContext.tsx +0 -173
- package/src/contexts/PaymentsContext.tsx +0 -122
- package/src/contexts/PaymentsExtensionProvider.tsx +0 -56
- package/src/contexts/README.md +0 -201
- package/src/contexts/RootPaymentsContext.tsx +0 -66
- package/src/contexts/types.ts +0 -40
- package/src/hooks/index.ts +0 -20
- package/src/layouts/PaymentsLayout/PaymentsLayout.tsx +0 -90
- package/src/layouts/PaymentsLayout/components/CreatePaymentDialog.tsx +0 -274
- package/src/layouts/PaymentsLayout/components/PaymentDetailsDialog.tsx +0 -287
- package/src/layouts/PaymentsLayout/components/index.ts +0 -2
- package/src/layouts/PaymentsLayout/events.ts +0 -47
- package/src/layouts/PaymentsLayout/index.ts +0 -16
- package/src/layouts/PaymentsLayout/types.ts +0 -6
- package/src/layouts/PaymentsLayout/views/overview/components/BalanceCard.tsx +0 -121
- package/src/layouts/PaymentsLayout/views/overview/components/RecentPayments.tsx +0 -139
- package/src/layouts/PaymentsLayout/views/overview/components/index.ts +0 -2
- package/src/layouts/PaymentsLayout/views/overview/index.tsx +0 -21
- package/src/layouts/PaymentsLayout/views/payments/components/PaymentsList.tsx +0 -279
- package/src/layouts/PaymentsLayout/views/payments/components/index.ts +0 -1
- package/src/layouts/PaymentsLayout/views/payments/index.tsx +0 -18
- package/src/layouts/PaymentsLayout/views/transactions/components/TransactionsList.tsx +0 -260
- package/src/layouts/PaymentsLayout/views/transactions/components/index.ts +0 -1
- package/src/layouts/PaymentsLayout/views/transactions/index.tsx +0 -18
|
@@ -234,25 +234,49 @@
|
|
|
234
234
|
"/cfg/payments/payments/create/": {
|
|
235
235
|
"post": {
|
|
236
236
|
"operationId": "cfg_payments_payments_create_create",
|
|
237
|
-
"description": "
|
|
237
|
+
"description": "Create a new payment with specified amount and currency",
|
|
238
|
+
"summary": "Create payment",
|
|
238
239
|
"tags": [
|
|
239
240
|
"payments"
|
|
240
241
|
],
|
|
242
|
+
"requestBody": {
|
|
243
|
+
"content": {
|
|
244
|
+
"application/json": {
|
|
245
|
+
"schema": {
|
|
246
|
+
"$ref": "#/components/schemas/PaymentCreateRequest"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"application/x-www-form-urlencoded": {
|
|
250
|
+
"schema": {
|
|
251
|
+
"$ref": "#/components/schemas/PaymentCreateRequest"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"multipart/form-data": {
|
|
255
|
+
"schema": {
|
|
256
|
+
"$ref": "#/components/schemas/PaymentCreateRequest"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"required": true
|
|
261
|
+
},
|
|
241
262
|
"security": [
|
|
242
263
|
{
|
|
243
264
|
"jwtAuthWithLastLogin": []
|
|
244
265
|
}
|
|
245
266
|
],
|
|
246
267
|
"responses": {
|
|
247
|
-
"
|
|
268
|
+
"201": {
|
|
248
269
|
"content": {
|
|
249
270
|
"application/json": {
|
|
250
271
|
"schema": {
|
|
251
|
-
"$ref": "#/components/schemas/
|
|
272
|
+
"$ref": "#/components/schemas/PaymentDetail"
|
|
252
273
|
}
|
|
253
274
|
}
|
|
254
275
|
},
|
|
255
276
|
"description": ""
|
|
277
|
+
},
|
|
278
|
+
"400": {
|
|
279
|
+
"description": "Validation error"
|
|
256
280
|
}
|
|
257
281
|
},
|
|
258
282
|
"x-async-capable": false
|
|
@@ -314,6 +338,182 @@
|
|
|
314
338
|
},
|
|
315
339
|
"x-async-capable": false
|
|
316
340
|
}
|
|
341
|
+
},
|
|
342
|
+
"/cfg/payments/withdrawals/": {
|
|
343
|
+
"get": {
|
|
344
|
+
"operationId": "cfg_payments_withdrawals_list",
|
|
345
|
+
"description": "ViewSet for withdrawal operations.\n\nEndpoints:\n- GET /withdrawals/ - List user's withdrawal requests\n- GET /withdrawals/{id}/ - Get withdrawal details\n- POST /withdrawals/create/ - Create withdrawal request\n- POST /withdrawals/{id}/cancel/ - Cancel pending withdrawal",
|
|
346
|
+
"parameters": [
|
|
347
|
+
{
|
|
348
|
+
"name": "page",
|
|
349
|
+
"required": false,
|
|
350
|
+
"in": "query",
|
|
351
|
+
"description": "A page number within the paginated result set.",
|
|
352
|
+
"schema": {
|
|
353
|
+
"type": "integer"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"name": "page_size",
|
|
358
|
+
"required": false,
|
|
359
|
+
"in": "query",
|
|
360
|
+
"description": "Number of results to return per page.",
|
|
361
|
+
"schema": {
|
|
362
|
+
"type": "integer"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
"tags": [
|
|
367
|
+
"payments"
|
|
368
|
+
],
|
|
369
|
+
"security": [
|
|
370
|
+
{
|
|
371
|
+
"jwtAuthWithLastLogin": []
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
"responses": {
|
|
375
|
+
"200": {
|
|
376
|
+
"content": {
|
|
377
|
+
"application/json": {
|
|
378
|
+
"schema": {
|
|
379
|
+
"$ref": "#/components/schemas/PaginatedWithdrawalListList"
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"description": ""
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"x-async-capable": false
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"/cfg/payments/withdrawals/{id}/": {
|
|
390
|
+
"get": {
|
|
391
|
+
"operationId": "cfg_payments_withdrawals_retrieve",
|
|
392
|
+
"description": "ViewSet for withdrawal operations.\n\nEndpoints:\n- GET /withdrawals/ - List user's withdrawal requests\n- GET /withdrawals/{id}/ - Get withdrawal details\n- POST /withdrawals/create/ - Create withdrawal request\n- POST /withdrawals/{id}/cancel/ - Cancel pending withdrawal",
|
|
393
|
+
"parameters": [
|
|
394
|
+
{
|
|
395
|
+
"in": "path",
|
|
396
|
+
"name": "id",
|
|
397
|
+
"schema": {
|
|
398
|
+
"type": "string"
|
|
399
|
+
},
|
|
400
|
+
"required": true
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
"tags": [
|
|
404
|
+
"payments"
|
|
405
|
+
],
|
|
406
|
+
"security": [
|
|
407
|
+
{
|
|
408
|
+
"jwtAuthWithLastLogin": []
|
|
409
|
+
}
|
|
410
|
+
],
|
|
411
|
+
"responses": {
|
|
412
|
+
"200": {
|
|
413
|
+
"content": {
|
|
414
|
+
"application/json": {
|
|
415
|
+
"schema": {
|
|
416
|
+
"$ref": "#/components/schemas/WithdrawalDetail"
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"description": ""
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"x-async-capable": false
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"/cfg/payments/withdrawals/{id}/cancel/": {
|
|
427
|
+
"post": {
|
|
428
|
+
"operationId": "cfg_payments_withdrawals_cancel_create",
|
|
429
|
+
"description": "Cancel a pending withdrawal request",
|
|
430
|
+
"summary": "Cancel withdrawal request",
|
|
431
|
+
"parameters": [
|
|
432
|
+
{
|
|
433
|
+
"in": "path",
|
|
434
|
+
"name": "id",
|
|
435
|
+
"schema": {
|
|
436
|
+
"type": "string"
|
|
437
|
+
},
|
|
438
|
+
"required": true
|
|
439
|
+
}
|
|
440
|
+
],
|
|
441
|
+
"tags": [
|
|
442
|
+
"payments"
|
|
443
|
+
],
|
|
444
|
+
"security": [
|
|
445
|
+
{
|
|
446
|
+
"jwtAuthWithLastLogin": []
|
|
447
|
+
}
|
|
448
|
+
],
|
|
449
|
+
"responses": {
|
|
450
|
+
"200": {
|
|
451
|
+
"content": {
|
|
452
|
+
"application/json": {
|
|
453
|
+
"schema": {
|
|
454
|
+
"$ref": "#/components/schemas/WithdrawalDetail"
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
"description": ""
|
|
459
|
+
},
|
|
460
|
+
"400": {
|
|
461
|
+
"description": "Cannot cancel"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"x-async-capable": false
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"/cfg/payments/withdrawals/create/": {
|
|
468
|
+
"post": {
|
|
469
|
+
"operationId": "cfg_payments_withdrawals_create_create",
|
|
470
|
+
"description": "Create a new withdrawal request (requires admin approval)",
|
|
471
|
+
"summary": "Create withdrawal request",
|
|
472
|
+
"tags": [
|
|
473
|
+
"payments"
|
|
474
|
+
],
|
|
475
|
+
"requestBody": {
|
|
476
|
+
"content": {
|
|
477
|
+
"application/json": {
|
|
478
|
+
"schema": {
|
|
479
|
+
"$ref": "#/components/schemas/WithdrawalCreateRequest"
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
"application/x-www-form-urlencoded": {
|
|
483
|
+
"schema": {
|
|
484
|
+
"$ref": "#/components/schemas/WithdrawalCreateRequest"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"multipart/form-data": {
|
|
488
|
+
"schema": {
|
|
489
|
+
"$ref": "#/components/schemas/WithdrawalCreateRequest"
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
"required": true
|
|
494
|
+
},
|
|
495
|
+
"security": [
|
|
496
|
+
{
|
|
497
|
+
"jwtAuthWithLastLogin": []
|
|
498
|
+
}
|
|
499
|
+
],
|
|
500
|
+
"responses": {
|
|
501
|
+
"201": {
|
|
502
|
+
"content": {
|
|
503
|
+
"application/json": {
|
|
504
|
+
"schema": {
|
|
505
|
+
"$ref": "#/components/schemas/WithdrawalDetail"
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"description": ""
|
|
510
|
+
},
|
|
511
|
+
"400": {
|
|
512
|
+
"description": "Validation error"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
"x-async-capable": false
|
|
516
|
+
}
|
|
317
517
|
}
|
|
318
518
|
},
|
|
319
519
|
"components": {
|
|
@@ -496,6 +696,96 @@
|
|
|
496
696
|
}
|
|
497
697
|
}
|
|
498
698
|
},
|
|
699
|
+
"PaginatedWithdrawalListList": {
|
|
700
|
+
"type": "object",
|
|
701
|
+
"required": [
|
|
702
|
+
"count",
|
|
703
|
+
"page",
|
|
704
|
+
"pages",
|
|
705
|
+
"page_size",
|
|
706
|
+
"has_next",
|
|
707
|
+
"has_previous",
|
|
708
|
+
"results"
|
|
709
|
+
],
|
|
710
|
+
"properties": {
|
|
711
|
+
"count": {
|
|
712
|
+
"type": "integer",
|
|
713
|
+
"description": "Total number of items across all pages",
|
|
714
|
+
"example": 150
|
|
715
|
+
},
|
|
716
|
+
"page": {
|
|
717
|
+
"type": "integer",
|
|
718
|
+
"description": "Current page number (1-based)",
|
|
719
|
+
"example": 2
|
|
720
|
+
},
|
|
721
|
+
"pages": {
|
|
722
|
+
"type": "integer",
|
|
723
|
+
"description": "Total number of pages",
|
|
724
|
+
"example": 15
|
|
725
|
+
},
|
|
726
|
+
"page_size": {
|
|
727
|
+
"type": "integer",
|
|
728
|
+
"description": "Number of items per page",
|
|
729
|
+
"example": 10
|
|
730
|
+
},
|
|
731
|
+
"has_next": {
|
|
732
|
+
"type": "boolean",
|
|
733
|
+
"description": "Whether there is a next page",
|
|
734
|
+
"example": true
|
|
735
|
+
},
|
|
736
|
+
"has_previous": {
|
|
737
|
+
"type": "boolean",
|
|
738
|
+
"description": "Whether there is a previous page",
|
|
739
|
+
"example": true
|
|
740
|
+
},
|
|
741
|
+
"next_page": {
|
|
742
|
+
"type": "integer",
|
|
743
|
+
"nullable": true,
|
|
744
|
+
"description": "Next page number (null if no next page)",
|
|
745
|
+
"example": 3
|
|
746
|
+
},
|
|
747
|
+
"previous_page": {
|
|
748
|
+
"type": "integer",
|
|
749
|
+
"nullable": true,
|
|
750
|
+
"description": "Previous page number (null if no previous page)",
|
|
751
|
+
"example": 1
|
|
752
|
+
},
|
|
753
|
+
"results": {
|
|
754
|
+
"type": "array",
|
|
755
|
+
"items": {
|
|
756
|
+
"$ref": "#/components/schemas/WithdrawalList"
|
|
757
|
+
},
|
|
758
|
+
"description": "Array of items for current page"
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
"PaymentCreateRequest": {
|
|
763
|
+
"type": "object",
|
|
764
|
+
"description": "Serializer for creating payment.",
|
|
765
|
+
"properties": {
|
|
766
|
+
"amount_usd": {
|
|
767
|
+
"type": "string",
|
|
768
|
+
"format": "decimal",
|
|
769
|
+
"pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
|
|
770
|
+
"description": "Payment amount in USD"
|
|
771
|
+
},
|
|
772
|
+
"currency_code": {
|
|
773
|
+
"type": "string",
|
|
774
|
+
"minLength": 1,
|
|
775
|
+
"description": "Currency code (e.g., USDTTRC20)",
|
|
776
|
+
"maxLength": 20
|
|
777
|
+
},
|
|
778
|
+
"description": {
|
|
779
|
+
"type": "string",
|
|
780
|
+
"description": "Optional payment description",
|
|
781
|
+
"maxLength": 500
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
"required": [
|
|
785
|
+
"amount_usd",
|
|
786
|
+
"currency_code"
|
|
787
|
+
]
|
|
788
|
+
},
|
|
499
789
|
"PaymentDetail": {
|
|
500
790
|
"type": "object",
|
|
501
791
|
"description": "Detailed payment information.",
|
|
@@ -832,6 +1122,292 @@
|
|
|
832
1122
|
"transaction_type",
|
|
833
1123
|
"type_display"
|
|
834
1124
|
]
|
|
1125
|
+
},
|
|
1126
|
+
"WithdrawalCreateRequest": {
|
|
1127
|
+
"type": "object",
|
|
1128
|
+
"description": "Serializer for creating withdrawal request.",
|
|
1129
|
+
"properties": {
|
|
1130
|
+
"amount_usd": {
|
|
1131
|
+
"type": "string",
|
|
1132
|
+
"format": "decimal",
|
|
1133
|
+
"pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
|
|
1134
|
+
"description": "Withdrawal amount in USD (min $10)"
|
|
1135
|
+
},
|
|
1136
|
+
"currency_code": {
|
|
1137
|
+
"type": "string",
|
|
1138
|
+
"minLength": 1,
|
|
1139
|
+
"description": "Currency code (e.g., USDTTRC20)",
|
|
1140
|
+
"maxLength": 20
|
|
1141
|
+
},
|
|
1142
|
+
"wallet_address": {
|
|
1143
|
+
"type": "string",
|
|
1144
|
+
"minLength": 1,
|
|
1145
|
+
"description": "Destination wallet address",
|
|
1146
|
+
"maxLength": 255
|
|
1147
|
+
}
|
|
1148
|
+
},
|
|
1149
|
+
"required": [
|
|
1150
|
+
"amount_usd",
|
|
1151
|
+
"currency_code",
|
|
1152
|
+
"wallet_address"
|
|
1153
|
+
]
|
|
1154
|
+
},
|
|
1155
|
+
"WithdrawalDetail": {
|
|
1156
|
+
"type": "object",
|
|
1157
|
+
"description": "Detailed withdrawal information.",
|
|
1158
|
+
"properties": {
|
|
1159
|
+
"id": {
|
|
1160
|
+
"type": "string",
|
|
1161
|
+
"format": "uuid",
|
|
1162
|
+
"readOnly": true,
|
|
1163
|
+
"description": "Unique identifier for this record"
|
|
1164
|
+
},
|
|
1165
|
+
"internal_withdrawal_id": {
|
|
1166
|
+
"type": "string",
|
|
1167
|
+
"readOnly": true,
|
|
1168
|
+
"description": "Internal withdrawal identifier (WD_YYYYMMDDHHMMSS_UUID)"
|
|
1169
|
+
},
|
|
1170
|
+
"amount_usd": {
|
|
1171
|
+
"type": "string",
|
|
1172
|
+
"format": "decimal",
|
|
1173
|
+
"pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
|
|
1174
|
+
"readOnly": true,
|
|
1175
|
+
"description": "Withdrawal amount in USD (min $10)"
|
|
1176
|
+
},
|
|
1177
|
+
"currency_code": {
|
|
1178
|
+
"type": "string",
|
|
1179
|
+
"readOnly": true
|
|
1180
|
+
},
|
|
1181
|
+
"currency_name": {
|
|
1182
|
+
"type": "string",
|
|
1183
|
+
"readOnly": true
|
|
1184
|
+
},
|
|
1185
|
+
"currency_token": {
|
|
1186
|
+
"type": "string",
|
|
1187
|
+
"readOnly": true
|
|
1188
|
+
},
|
|
1189
|
+
"currency_network": {
|
|
1190
|
+
"type": "string",
|
|
1191
|
+
"readOnly": true
|
|
1192
|
+
},
|
|
1193
|
+
"wallet_address": {
|
|
1194
|
+
"type": "string",
|
|
1195
|
+
"readOnly": true,
|
|
1196
|
+
"description": "Destination wallet address"
|
|
1197
|
+
},
|
|
1198
|
+
"network_fee_usd": {
|
|
1199
|
+
"type": "string",
|
|
1200
|
+
"format": "decimal",
|
|
1201
|
+
"pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
|
|
1202
|
+
"readOnly": true,
|
|
1203
|
+
"description": "Network transaction fee in USD"
|
|
1204
|
+
},
|
|
1205
|
+
"service_fee_usd": {
|
|
1206
|
+
"type": "string",
|
|
1207
|
+
"format": "decimal",
|
|
1208
|
+
"pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
|
|
1209
|
+
"readOnly": true,
|
|
1210
|
+
"description": "Service fee in USD"
|
|
1211
|
+
},
|
|
1212
|
+
"total_fee_usd": {
|
|
1213
|
+
"type": "string",
|
|
1214
|
+
"format": "decimal",
|
|
1215
|
+
"pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
|
|
1216
|
+
"readOnly": true,
|
|
1217
|
+
"description": "Total fee (network + service) in USD"
|
|
1218
|
+
},
|
|
1219
|
+
"final_amount_usd": {
|
|
1220
|
+
"type": "string",
|
|
1221
|
+
"format": "decimal",
|
|
1222
|
+
"pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
|
|
1223
|
+
"readOnly": true,
|
|
1224
|
+
"description": "Final amount to receive (amount - total_fee)"
|
|
1225
|
+
},
|
|
1226
|
+
"crypto_amount": {
|
|
1227
|
+
"type": "string",
|
|
1228
|
+
"format": "decimal",
|
|
1229
|
+
"pattern": "^-?\\d{0,12}(?:\\.\\d{0,8})?$",
|
|
1230
|
+
"readOnly": true,
|
|
1231
|
+
"nullable": true,
|
|
1232
|
+
"description": "Amount in cryptocurrency (calculated at processing time)"
|
|
1233
|
+
},
|
|
1234
|
+
"status": {
|
|
1235
|
+
"enum": [
|
|
1236
|
+
"pending",
|
|
1237
|
+
"approved",
|
|
1238
|
+
"processing",
|
|
1239
|
+
"completed",
|
|
1240
|
+
"rejected",
|
|
1241
|
+
"cancelled"
|
|
1242
|
+
],
|
|
1243
|
+
"type": "string",
|
|
1244
|
+
"x-spec-enum-id": "5a5625f418e926b6",
|
|
1245
|
+
"readOnly": true,
|
|
1246
|
+
"description": "Withdrawal status\n\n* `pending` - Pending\n* `approved` - Approved\n* `processing` - Processing\n* `completed` - Completed\n* `rejected` - Rejected\n* `cancelled` - Cancelled"
|
|
1247
|
+
},
|
|
1248
|
+
"status_display": {
|
|
1249
|
+
"type": "string",
|
|
1250
|
+
"readOnly": true
|
|
1251
|
+
},
|
|
1252
|
+
"transaction_hash": {
|
|
1253
|
+
"type": "string",
|
|
1254
|
+
"readOnly": true,
|
|
1255
|
+
"nullable": true,
|
|
1256
|
+
"description": "Blockchain transaction hash (after sending)"
|
|
1257
|
+
},
|
|
1258
|
+
"explorer_link": {
|
|
1259
|
+
"type": "string",
|
|
1260
|
+
"nullable": true,
|
|
1261
|
+
"description": "Get blockchain explorer link.",
|
|
1262
|
+
"readOnly": true
|
|
1263
|
+
},
|
|
1264
|
+
"admin_notes": {
|
|
1265
|
+
"type": "string",
|
|
1266
|
+
"readOnly": true,
|
|
1267
|
+
"description": "Admin notes (reason for rejection, etc.)"
|
|
1268
|
+
},
|
|
1269
|
+
"created_at": {
|
|
1270
|
+
"type": "string",
|
|
1271
|
+
"format": "date-time",
|
|
1272
|
+
"readOnly": true,
|
|
1273
|
+
"description": "When this record was created"
|
|
1274
|
+
},
|
|
1275
|
+
"approved_at": {
|
|
1276
|
+
"type": "string",
|
|
1277
|
+
"format": "date-time",
|
|
1278
|
+
"readOnly": true,
|
|
1279
|
+
"nullable": true,
|
|
1280
|
+
"description": "When approved by admin"
|
|
1281
|
+
},
|
|
1282
|
+
"completed_at": {
|
|
1283
|
+
"type": "string",
|
|
1284
|
+
"format": "date-time",
|
|
1285
|
+
"readOnly": true,
|
|
1286
|
+
"nullable": true,
|
|
1287
|
+
"description": "When withdrawal was completed"
|
|
1288
|
+
},
|
|
1289
|
+
"rejected_at": {
|
|
1290
|
+
"type": "string",
|
|
1291
|
+
"format": "date-time",
|
|
1292
|
+
"readOnly": true,
|
|
1293
|
+
"nullable": true,
|
|
1294
|
+
"description": "When rejected by admin"
|
|
1295
|
+
},
|
|
1296
|
+
"cancelled_at": {
|
|
1297
|
+
"type": "string",
|
|
1298
|
+
"format": "date-time",
|
|
1299
|
+
"readOnly": true,
|
|
1300
|
+
"nullable": true,
|
|
1301
|
+
"description": "When cancelled by user"
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
"required": [
|
|
1305
|
+
"admin_notes",
|
|
1306
|
+
"amount_usd",
|
|
1307
|
+
"approved_at",
|
|
1308
|
+
"cancelled_at",
|
|
1309
|
+
"completed_at",
|
|
1310
|
+
"created_at",
|
|
1311
|
+
"crypto_amount",
|
|
1312
|
+
"currency_code",
|
|
1313
|
+
"currency_name",
|
|
1314
|
+
"currency_network",
|
|
1315
|
+
"currency_token",
|
|
1316
|
+
"explorer_link",
|
|
1317
|
+
"final_amount_usd",
|
|
1318
|
+
"id",
|
|
1319
|
+
"internal_withdrawal_id",
|
|
1320
|
+
"network_fee_usd",
|
|
1321
|
+
"rejected_at",
|
|
1322
|
+
"service_fee_usd",
|
|
1323
|
+
"status",
|
|
1324
|
+
"status_display",
|
|
1325
|
+
"total_fee_usd",
|
|
1326
|
+
"transaction_hash",
|
|
1327
|
+
"wallet_address"
|
|
1328
|
+
]
|
|
1329
|
+
},
|
|
1330
|
+
"WithdrawalList": {
|
|
1331
|
+
"type": "object",
|
|
1332
|
+
"description": "Withdrawal list item (lighter than detail).",
|
|
1333
|
+
"properties": {
|
|
1334
|
+
"id": {
|
|
1335
|
+
"type": "string",
|
|
1336
|
+
"format": "uuid",
|
|
1337
|
+
"readOnly": true,
|
|
1338
|
+
"description": "Unique identifier for this record"
|
|
1339
|
+
},
|
|
1340
|
+
"internal_withdrawal_id": {
|
|
1341
|
+
"type": "string",
|
|
1342
|
+
"readOnly": true,
|
|
1343
|
+
"description": "Internal withdrawal identifier (WD_YYYYMMDDHHMMSS_UUID)"
|
|
1344
|
+
},
|
|
1345
|
+
"amount_usd": {
|
|
1346
|
+
"type": "string",
|
|
1347
|
+
"format": "decimal",
|
|
1348
|
+
"pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
|
|
1349
|
+
"readOnly": true,
|
|
1350
|
+
"description": "Withdrawal amount in USD (min $10)"
|
|
1351
|
+
},
|
|
1352
|
+
"final_amount_usd": {
|
|
1353
|
+
"type": "string",
|
|
1354
|
+
"format": "decimal",
|
|
1355
|
+
"pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
|
|
1356
|
+
"readOnly": true,
|
|
1357
|
+
"description": "Final amount to receive (amount - total_fee)"
|
|
1358
|
+
},
|
|
1359
|
+
"currency_code": {
|
|
1360
|
+
"type": "string",
|
|
1361
|
+
"readOnly": true
|
|
1362
|
+
},
|
|
1363
|
+
"currency_token": {
|
|
1364
|
+
"type": "string",
|
|
1365
|
+
"readOnly": true
|
|
1366
|
+
},
|
|
1367
|
+
"status": {
|
|
1368
|
+
"enum": [
|
|
1369
|
+
"pending",
|
|
1370
|
+
"approved",
|
|
1371
|
+
"processing",
|
|
1372
|
+
"completed",
|
|
1373
|
+
"rejected",
|
|
1374
|
+
"cancelled"
|
|
1375
|
+
],
|
|
1376
|
+
"type": "string",
|
|
1377
|
+
"x-spec-enum-id": "5a5625f418e926b6",
|
|
1378
|
+
"readOnly": true,
|
|
1379
|
+
"description": "Withdrawal status\n\n* `pending` - Pending\n* `approved` - Approved\n* `processing` - Processing\n* `completed` - Completed\n* `rejected` - Rejected\n* `cancelled` - Cancelled"
|
|
1380
|
+
},
|
|
1381
|
+
"status_display": {
|
|
1382
|
+
"type": "string",
|
|
1383
|
+
"readOnly": true
|
|
1384
|
+
},
|
|
1385
|
+
"created_at": {
|
|
1386
|
+
"type": "string",
|
|
1387
|
+
"format": "date-time",
|
|
1388
|
+
"readOnly": true,
|
|
1389
|
+
"description": "When this record was created"
|
|
1390
|
+
},
|
|
1391
|
+
"completed_at": {
|
|
1392
|
+
"type": "string",
|
|
1393
|
+
"format": "date-time",
|
|
1394
|
+
"readOnly": true,
|
|
1395
|
+
"nullable": true,
|
|
1396
|
+
"description": "When withdrawal was completed"
|
|
1397
|
+
}
|
|
1398
|
+
},
|
|
1399
|
+
"required": [
|
|
1400
|
+
"amount_usd",
|
|
1401
|
+
"completed_at",
|
|
1402
|
+
"created_at",
|
|
1403
|
+
"currency_code",
|
|
1404
|
+
"currency_token",
|
|
1405
|
+
"final_amount_usd",
|
|
1406
|
+
"id",
|
|
1407
|
+
"internal_withdrawal_id",
|
|
1408
|
+
"status",
|
|
1409
|
+
"status_display"
|
|
1410
|
+
]
|
|
835
1411
|
}
|
|
836
1412
|
},
|
|
837
1413
|
"securitySchemes": {
|