@djangocfg/api 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -735,6 +735,51 @@ export const OPENAPI_SCHEMA = {
735
735
  ],
736
736
  "type": "object"
737
737
  },
738
+ "Balance": {
739
+ "description": "User balance serializer.",
740
+ "properties": {
741
+ "balance_display": {
742
+ "readOnly": true,
743
+ "type": "string"
744
+ },
745
+ "balance_usd": {
746
+ "description": "Current balance in USD",
747
+ "format": "decimal",
748
+ "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
749
+ "readOnly": true,
750
+ "type": "string"
751
+ },
752
+ "last_transaction_at": {
753
+ "description": "When the last transaction occurred",
754
+ "format": "date-time",
755
+ "nullable": true,
756
+ "readOnly": true,
757
+ "type": "string"
758
+ },
759
+ "total_deposited": {
760
+ "description": "Total amount deposited (lifetime)",
761
+ "format": "decimal",
762
+ "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
763
+ "readOnly": true,
764
+ "type": "string"
765
+ },
766
+ "total_withdrawn": {
767
+ "description": "Total amount withdrawn (lifetime)",
768
+ "format": "decimal",
769
+ "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
770
+ "readOnly": true,
771
+ "type": "string"
772
+ }
773
+ },
774
+ "required": [
775
+ "balance_display",
776
+ "balance_usd",
777
+ "last_transaction_at",
778
+ "total_deposited",
779
+ "total_withdrawn"
780
+ ],
781
+ "type": "object"
782
+ },
738
783
  "BulkEmailRequest": {
739
784
  "description": "Simple serializer for bulk email.",
740
785
  "properties": {
@@ -1220,6 +1265,76 @@ export const OPENAPI_SCHEMA = {
1220
1265
  ],
1221
1266
  "type": "object"
1222
1267
  },
1268
+ "Currency": {
1269
+ "description": "Currency list serializer.",
1270
+ "properties": {
1271
+ "code": {
1272
+ "description": "Currency code from provider (e.g., USDTTRC20, BTC, ETH)",
1273
+ "readOnly": true,
1274
+ "type": "string"
1275
+ },
1276
+ "decimal_places": {
1277
+ "description": "Number of decimal places for this currency",
1278
+ "readOnly": true,
1279
+ "type": "integer"
1280
+ },
1281
+ "display_name": {
1282
+ "readOnly": true,
1283
+ "type": "string"
1284
+ },
1285
+ "is_active": {
1286
+ "description": "Whether this currency is available for payments",
1287
+ "readOnly": true,
1288
+ "type": "boolean"
1289
+ },
1290
+ "min_amount_usd": {
1291
+ "description": "Minimum payment amount in USD",
1292
+ "format": "decimal",
1293
+ "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
1294
+ "readOnly": true,
1295
+ "type": "string"
1296
+ },
1297
+ "name": {
1298
+ "description": "Full currency name (e.g., USDT (TRC20), Bitcoin)",
1299
+ "readOnly": true,
1300
+ "type": "string"
1301
+ },
1302
+ "network": {
1303
+ "description": "Network name (e.g., TRC20, ERC20, Bitcoin)",
1304
+ "nullable": true,
1305
+ "readOnly": true,
1306
+ "type": "string"
1307
+ },
1308
+ "sort_order": {
1309
+ "description": "Sort order for currency list (lower = higher priority)",
1310
+ "readOnly": true,
1311
+ "type": "integer"
1312
+ },
1313
+ "symbol": {
1314
+ "description": "Currency symbol (e.g., \u20ae, \u20bf, \u039e)",
1315
+ "readOnly": true,
1316
+ "type": "string"
1317
+ },
1318
+ "token": {
1319
+ "description": "Token symbol (e.g., USDT, BTC, ETH)",
1320
+ "readOnly": true,
1321
+ "type": "string"
1322
+ }
1323
+ },
1324
+ "required": [
1325
+ "code",
1326
+ "decimal_places",
1327
+ "display_name",
1328
+ "is_active",
1329
+ "min_amount_usd",
1330
+ "name",
1331
+ "network",
1332
+ "sort_order",
1333
+ "symbol",
1334
+ "token"
1335
+ ],
1336
+ "type": "object"
1337
+ },
1223
1338
  "Document": {
1224
1339
  "description": "Document response serializer.",
1225
1340
  "properties": {
@@ -4391,6 +4506,8 @@ export const OPENAPI_SCHEMA = {
4391
4506
  "type": "string"
4392
4507
  },
4393
4508
  "explorer_link": {
4509
+ "description": "Get blockchain explorer link.",
4510
+ "nullable": true,
4394
4511
  "readOnly": true,
4395
4512
  "type": "string"
4396
4513
  },
@@ -4439,6 +4556,8 @@ export const OPENAPI_SCHEMA = {
4439
4556
  "type": "string"
4440
4557
  },
4441
4558
  "qr_code_url": {
4559
+ "description": "Get QR code URL.",
4560
+ "nullable": true,
4442
4561
  "readOnly": true,
4443
4562
  "type": "string"
4444
4563
  },
@@ -5101,6 +5220,83 @@ export const OPENAPI_SCHEMA = {
5101
5220
  ],
5102
5221
  "type": "object"
5103
5222
  },
5223
+ "Transaction": {
5224
+ "description": "Transaction serializer.",
5225
+ "properties": {
5226
+ "amount_display": {
5227
+ "readOnly": true,
5228
+ "type": "string"
5229
+ },
5230
+ "amount_usd": {
5231
+ "description": "Transaction amount in USD (positive=credit, negative=debit)",
5232
+ "format": "decimal",
5233
+ "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
5234
+ "readOnly": true,
5235
+ "type": "string"
5236
+ },
5237
+ "balance_after": {
5238
+ "description": "User balance after this transaction",
5239
+ "format": "decimal",
5240
+ "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
5241
+ "readOnly": true,
5242
+ "type": "string"
5243
+ },
5244
+ "created_at": {
5245
+ "description": "When this record was created",
5246
+ "format": "date-time",
5247
+ "readOnly": true,
5248
+ "type": "string"
5249
+ },
5250
+ "description": {
5251
+ "description": "Transaction description",
5252
+ "readOnly": true,
5253
+ "type": "string"
5254
+ },
5255
+ "id": {
5256
+ "description": "Unique identifier for this record",
5257
+ "format": "uuid",
5258
+ "readOnly": true,
5259
+ "type": "string"
5260
+ },
5261
+ "payment_id": {
5262
+ "description": "Related payment ID (if applicable)",
5263
+ "nullable": true,
5264
+ "readOnly": true,
5265
+ "type": "string"
5266
+ },
5267
+ "transaction_type": {
5268
+ "description": "Type of transaction\n\n* `deposit` - Deposit\n* `withdrawal` - Withdrawal\n* `payment` - Payment\n* `refund` - Refund\n* `fee` - Fee\n* `bonus` - Bonus\n* `adjustment` - Adjustment",
5269
+ "enum": [
5270
+ "deposit",
5271
+ "withdrawal",
5272
+ "payment",
5273
+ "refund",
5274
+ "fee",
5275
+ "bonus",
5276
+ "adjustment"
5277
+ ],
5278
+ "readOnly": true,
5279
+ "type": "string",
5280
+ "x-spec-enum-id": "25d1662d4db37694"
5281
+ },
5282
+ "type_display": {
5283
+ "readOnly": true,
5284
+ "type": "string"
5285
+ }
5286
+ },
5287
+ "required": [
5288
+ "amount_display",
5289
+ "amount_usd",
5290
+ "balance_after",
5291
+ "created_at",
5292
+ "description",
5293
+ "id",
5294
+ "payment_id",
5295
+ "transaction_type",
5296
+ "type_display"
5297
+ ],
5298
+ "type": "object"
5299
+ },
5104
5300
  "Unsubscribe": {
5105
5301
  "description": "Simple serializer for unsubscribe.",
5106
5302
  "properties": {
@@ -5428,8 +5624,8 @@ export const OPENAPI_SCHEMA = {
5428
5624
  }
5429
5625
  },
5430
5626
  "info": {
5431
- "description": "Complete API documentation for Django CFG sample project",
5432
- "title": "Django CFG Sample API",
5627
+ "description": "Complete API documentation for Django CFG Demo Project",
5628
+ "title": "Django CFG API",
5433
5629
  "version": "1.0.0",
5434
5630
  "x-django-metadata": {
5435
5631
  "apps": [
@@ -6680,40 +6876,13 @@ export const OPENAPI_SCHEMA = {
6680
6876
  "description": ""
6681
6877
  },
6682
6878
  "400": {
6683
- "content": {
6684
- "application/json": {
6685
- "schema": {
6686
- "additionalProperties": {},
6687
- "description": "Unspecified response body",
6688
- "type": "object"
6689
- }
6690
- }
6691
- },
6692
- "description": ""
6879
+ "description": "Validation errors"
6693
6880
  },
6694
6881
  "413": {
6695
- "content": {
6696
- "application/json": {
6697
- "schema": {
6698
- "additionalProperties": {},
6699
- "description": "Unspecified response body",
6700
- "type": "object"
6701
- }
6702
- }
6703
- },
6704
- "description": ""
6882
+ "description": "File too large"
6705
6883
  },
6706
6884
  "429": {
6707
- "content": {
6708
- "application/json": {
6709
- "schema": {
6710
- "additionalProperties": {},
6711
- "description": "Unspecified response body",
6712
- "type": "object"
6713
- }
6714
- }
6715
- },
6716
- "description": ""
6885
+ "description": "Rate limit exceeded"
6717
6886
  }
6718
6887
  },
6719
6888
  "security": [
@@ -6780,28 +6949,10 @@ export const OPENAPI_SCHEMA = {
6780
6949
  ],
6781
6950
  "responses": {
6782
6951
  "204": {
6783
- "content": {
6784
- "application/json": {
6785
- "schema": {
6786
- "additionalProperties": {},
6787
- "description": "Unspecified response body",
6788
- "type": "object"
6789
- }
6790
- }
6791
- },
6792
- "description": ""
6952
+ "description": "Document deleted successfully"
6793
6953
  },
6794
6954
  "404": {
6795
- "content": {
6796
- "application/json": {
6797
- "schema": {
6798
- "additionalProperties": {},
6799
- "description": "Unspecified response body",
6800
- "type": "object"
6801
- }
6802
- }
6803
- },
6804
- "description": ""
6955
+ "description": "Document not found"
6805
6956
  }
6806
6957
  },
6807
6958
  "security": [
@@ -6845,16 +6996,7 @@ export const OPENAPI_SCHEMA = {
6845
6996
  "description": ""
6846
6997
  },
6847
6998
  "404": {
6848
- "content": {
6849
- "application/json": {
6850
- "schema": {
6851
- "additionalProperties": {},
6852
- "description": "Unspecified response body",
6853
- "type": "object"
6854
- }
6855
- }
6856
- },
6857
- "description": ""
6999
+ "description": "Document not found"
6858
7000
  }
6859
7001
  },
6860
7002
  "security": [
@@ -7593,16 +7735,7 @@ export const OPENAPI_SCHEMA = {
7593
7735
  "description": ""
7594
7736
  },
7595
7737
  "404": {
7596
- "content": {
7597
- "application/json": {
7598
- "schema": {
7599
- "additionalProperties": {},
7600
- "description": "Unspecified response body",
7601
- "type": "object"
7602
- }
7603
- }
7604
- },
7605
- "description": ""
7738
+ "description": "Category not found"
7606
7739
  }
7607
7740
  },
7608
7741
  "security": [
@@ -7717,16 +7850,7 @@ export const OPENAPI_SCHEMA = {
7717
7850
  "description": ""
7718
7851
  },
7719
7852
  "404": {
7720
- "content": {
7721
- "application/json": {
7722
- "schema": {
7723
- "additionalProperties": {},
7724
- "description": "Unspecified response body",
7725
- "type": "object"
7726
- }
7727
- }
7728
- },
7729
- "description": ""
7853
+ "description": "Document not found"
7730
7854
  }
7731
7855
  },
7732
7856
  "security": [
@@ -7842,40 +7966,13 @@ export const OPENAPI_SCHEMA = {
7842
7966
  "description": ""
7843
7967
  },
7844
7968
  "400": {
7845
- "content": {
7846
- "application/json": {
7847
- "schema": {
7848
- "additionalProperties": {},
7849
- "description": "Unspecified response body",
7850
- "type": "object"
7851
- }
7852
- }
7853
- },
7854
- "description": ""
7969
+ "description": "Validation errors"
7855
7970
  },
7856
7971
  "413": {
7857
- "content": {
7858
- "application/json": {
7859
- "schema": {
7860
- "additionalProperties": {},
7861
- "description": "Unspecified response body",
7862
- "type": "object"
7863
- }
7864
- }
7865
- },
7866
- "description": ""
7972
+ "description": "File too large"
7867
7973
  },
7868
7974
  "429": {
7869
- "content": {
7870
- "application/json": {
7871
- "schema": {
7872
- "additionalProperties": {},
7873
- "description": "Unspecified response body",
7874
- "type": "object"
7875
- }
7876
- }
7877
- },
7878
- "description": ""
7975
+ "description": "Rate limit exceeded"
7879
7976
  }
7880
7977
  },
7881
7978
  "security": [
@@ -10443,11 +10540,18 @@ export const OPENAPI_SCHEMA = {
10443
10540
  },
10444
10541
  "/cfg/payments/balance/": {
10445
10542
  "get": {
10446
- "description": "Get current user balance.",
10543
+ "description": "Get current user balance and transaction statistics",
10447
10544
  "operationId": "cfg_payments_balance_retrieve",
10448
10545
  "responses": {
10449
10546
  "200": {
10450
- "description": "No response body"
10547
+ "content": {
10548
+ "application/json": {
10549
+ "schema": {
10550
+ "$ref": "#/components/schemas/Balance"
10551
+ }
10552
+ }
10553
+ },
10554
+ "description": ""
10451
10555
  }
10452
10556
  },
10453
10557
  "security": [
@@ -10458,6 +10562,7 @@ export const OPENAPI_SCHEMA = {
10458
10562
  "cookieAuth": []
10459
10563
  }
10460
10564
  ],
10565
+ "summary": "Get user balance",
10461
10566
  "tags": [
10462
10567
  "payments"
10463
10568
  ],
@@ -10466,11 +10571,21 @@ export const OPENAPI_SCHEMA = {
10466
10571
  },
10467
10572
  "/cfg/payments/currencies/": {
10468
10573
  "get": {
10469
- "description": "GET /api/v1/payments/currencies/\n\nReturns list of available currencies with token+network info.",
10470
- "operationId": "cfg_payments_currencies_retrieve",
10574
+ "description": "Returns list of available currencies with token+network info",
10575
+ "operationId": "cfg_payments_currencies_list",
10471
10576
  "responses": {
10472
10577
  "200": {
10473
- "description": "No response body"
10578
+ "content": {
10579
+ "application/json": {
10580
+ "schema": {
10581
+ "items": {
10582
+ "$ref": "#/components/schemas/Currency"
10583
+ },
10584
+ "type": "array"
10585
+ }
10586
+ }
10587
+ },
10588
+ "description": ""
10474
10589
  }
10475
10590
  },
10476
10591
  "security": [
@@ -10481,6 +10596,7 @@ export const OPENAPI_SCHEMA = {
10481
10596
  "cookieAuth": []
10482
10597
  }
10483
10598
  ],
10599
+ "summary": "Get available currencies",
10484
10600
  "tags": [
10485
10601
  "payments"
10486
10602
  ],
@@ -10689,11 +10805,47 @@ export const OPENAPI_SCHEMA = {
10689
10805
  },
10690
10806
  "/cfg/payments/transactions/": {
10691
10807
  "get": {
10692
- "description": "Get user transactions with pagination.",
10693
- "operationId": "cfg_payments_transactions_retrieve",
10808
+ "description": "Get user transactions with pagination and filtering",
10809
+ "operationId": "cfg_payments_transactions_list",
10810
+ "parameters": [
10811
+ {
10812
+ "description": "Number of transactions to return (max 100)",
10813
+ "in": "query",
10814
+ "name": "limit",
10815
+ "schema": {
10816
+ "type": "integer"
10817
+ }
10818
+ },
10819
+ {
10820
+ "description": "Offset for pagination",
10821
+ "in": "query",
10822
+ "name": "offset",
10823
+ "schema": {
10824
+ "type": "integer"
10825
+ }
10826
+ },
10827
+ {
10828
+ "description": "Filter by transaction type (deposit/withdrawal)",
10829
+ "in": "query",
10830
+ "name": "type",
10831
+ "schema": {
10832
+ "type": "string"
10833
+ }
10834
+ }
10835
+ ],
10694
10836
  "responses": {
10695
10837
  "200": {
10696
- "description": "No response body"
10838
+ "content": {
10839
+ "application/json": {
10840
+ "schema": {
10841
+ "items": {
10842
+ "$ref": "#/components/schemas/Transaction"
10843
+ },
10844
+ "type": "array"
10845
+ }
10846
+ }
10847
+ },
10848
+ "description": ""
10697
10849
  }
10698
10850
  },
10699
10851
  "security": [
@@ -10704,6 +10856,7 @@ export const OPENAPI_SCHEMA = {
10704
10856
  "cookieAuth": []
10705
10857
  }
10706
10858
  ],
10859
+ "summary": "Get user transactions",
10707
10860
  "tags": [
10708
10861
  "payments"
10709
10862
  ],