@djangocfg/api 1.0.2 → 1.0.3

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 (34) hide show
  1. package/dist/index.cjs +1572 -2035
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +299 -144
  4. package/dist/index.d.ts +299 -144
  5. package/dist/index.mjs +1570 -1744
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/contexts/payments/ApiKeysContext.tsx +2 -2
  9. package/src/cfg/contexts/payments/CurrenciesContext.tsx +0 -26
  10. package/src/cfg/contexts/payments/OverviewContext.tsx +79 -0
  11. package/src/cfg/contexts/payments/RootPaymentsContext.tsx +137 -0
  12. package/src/cfg/contexts/payments/index.ts +13 -0
  13. package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +12 -10
  14. package/src/cfg/generated/_utils/hooks/cfg__payments.ts +12 -10
  15. package/src/cfg/generated/_utils/schemas/APIKeyValidationResponse.schema.ts +1 -1
  16. package/src/cfg/generated/_utils/schemas/AdminPaymentDetail.schema.ts +1 -1
  17. package/src/cfg/generated/_utils/schemas/AdminPaymentList.schema.ts +1 -1
  18. package/src/cfg/generated/_utils/schemas/CurrencyList.schema.ts +2 -0
  19. package/src/cfg/generated/_utils/schemas/CurrencyRates.schema.ts +26 -0
  20. package/src/cfg/generated/_utils/schemas/DocumentCreateRequest.schema.ts +1 -1
  21. package/src/cfg/generated/_utils/schemas/Network.schema.ts +1 -1
  22. package/src/cfg/generated/_utils/schemas/Payment.schema.ts +1 -0
  23. package/src/cfg/generated/_utils/schemas/PaymentCreate.schema.ts +0 -1
  24. package/src/cfg/generated/_utils/schemas/PaymentCreateRequest.schema.ts +0 -1
  25. package/src/cfg/generated/_utils/schemas/PaymentsMetrics.schema.ts +1 -1
  26. package/src/cfg/generated/_utils/schemas/ProviderCurrency.schema.ts +1 -1
  27. package/src/cfg/generated/_utils/schemas/SupportedCurrencies.schema.ts +25 -0
  28. package/src/cfg/generated/_utils/schemas/index.ts +2 -0
  29. package/src/cfg/generated/cfg__payments/client.ts +24 -44
  30. package/src/cfg/generated/cfg__payments/models.ts +46 -12
  31. package/src/cfg/generated/enums.ts +34 -22
  32. package/src/cfg/generated/index.ts +2 -3
  33. package/src/cfg/generated/schema.ts +90 -74
  34. package/src/index.ts +20 -1
@@ -290,8 +290,9 @@ export class CfgPayments {
290
290
  async apiKeysList(params?: { is_active?: boolean; ordering?: string; page?: number; page_size?: number; search?: string; user?: number }): Promise<Models.PaginatedAPIKeyListList>;
291
291
 
292
292
  /**
293
- * Global API Key ViewSet: /api/api-keys/ Provides admin-level access to
294
- * all API keys with filtering and stats.
293
+ * API Key ViewSet: /api/api-keys/ User-specific access to API keys with
294
+ * filtering and stats. - Regular users: can only see/manage their own API
295
+ * keys - Staff/Admin: can see/manage all API keys
295
296
  */
296
297
  async apiKeysList(...args: any[]): Promise<Models.PaginatedAPIKeyListList> {
297
298
  const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
@@ -307,8 +308,9 @@ export class CfgPayments {
307
308
  }
308
309
 
309
310
  /**
310
- * Global API Key ViewSet: /api/api-keys/ Provides admin-level access to
311
- * all API keys with filtering and stats.
311
+ * API Key ViewSet: /api/api-keys/ User-specific access to API keys with
312
+ * filtering and stats. - Regular users: can only see/manage their own API
313
+ * keys - Staff/Admin: can see/manage all API keys
312
314
  */
313
315
  async apiKeysCreate(data: Models.APIKeyCreateRequest): Promise<Models.APIKeyCreate> {
314
316
  const response = await this.client.request('POST', "/cfg/payments/api-keys/", { body: data });
@@ -316,8 +318,9 @@ export class CfgPayments {
316
318
  }
317
319
 
318
320
  /**
319
- * Global API Key ViewSet: /api/api-keys/ Provides admin-level access to
320
- * all API keys with filtering and stats.
321
+ * API Key ViewSet: /api/api-keys/ User-specific access to API keys with
322
+ * filtering and stats. - Regular users: can only see/manage their own API
323
+ * keys - Staff/Admin: can see/manage all API keys
321
324
  */
322
325
  async apiKeysRetrieve(id: string): Promise<Models.APIKeyDetail> {
323
326
  const response = await this.client.request('GET', `/cfg/payments/api-keys/${id}/`);
@@ -325,8 +328,9 @@ export class CfgPayments {
325
328
  }
326
329
 
327
330
  /**
328
- * Global API Key ViewSet: /api/api-keys/ Provides admin-level access to
329
- * all API keys with filtering and stats.
331
+ * API Key ViewSet: /api/api-keys/ User-specific access to API keys with
332
+ * filtering and stats. - Regular users: can only see/manage their own API
333
+ * keys - Staff/Admin: can see/manage all API keys
330
334
  */
331
335
  async apiKeysUpdate(id: string, data: Models.APIKeyUpdateRequest): Promise<Models.APIKeyUpdate> {
332
336
  const response = await this.client.request('PUT', `/cfg/payments/api-keys/${id}/`, { body: data });
@@ -334,8 +338,9 @@ export class CfgPayments {
334
338
  }
335
339
 
336
340
  /**
337
- * Global API Key ViewSet: /api/api-keys/ Provides admin-level access to
338
- * all API keys with filtering and stats.
341
+ * API Key ViewSet: /api/api-keys/ User-specific access to API keys with
342
+ * filtering and stats. - Regular users: can only see/manage their own API
343
+ * keys - Staff/Admin: can see/manage all API keys
339
344
  */
340
345
  async apiKeysPartialUpdate(id: string, data?: Models.PatchedAPIKeyUpdateRequest): Promise<Models.APIKeyUpdate> {
341
346
  const response = await this.client.request('PATCH', `/cfg/payments/api-keys/${id}/`, { body: data });
@@ -343,8 +348,9 @@ export class CfgPayments {
343
348
  }
344
349
 
345
350
  /**
346
- * Global API Key ViewSet: /api/api-keys/ Provides admin-level access to
347
- * all API keys with filtering and stats.
351
+ * API Key ViewSet: /api/api-keys/ User-specific access to API keys with
352
+ * filtering and stats. - Regular users: can only see/manage their own API
353
+ * keys - Staff/Admin: can see/manage all API keys
348
354
  */
349
355
  async apiKeysDestroy(id: string): Promise<void> {
350
356
  const response = await this.client.request('DELETE', `/cfg/payments/api-keys/${id}/`);
@@ -580,24 +586,11 @@ export class CfgPayments {
580
586
  return response;
581
587
  }
582
588
 
583
- async currenciesRatesRetrieve(base_currency: string, currencies: string): Promise<Models.Currency>;
584
- async currenciesRatesRetrieve(params: { base_currency: string; currencies: string }): Promise<Models.Currency>;
585
-
586
589
  /**
587
- * Get exchange rates
588
- *
589
- * Get current exchange rates for specified currencies
590
+ * Get current exchange rates.
590
591
  */
591
- async currenciesRatesRetrieve(...args: any[]): Promise<Models.Currency> {
592
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
593
-
594
- let params;
595
- if (isParamsObject) {
596
- params = args[0];
597
- } else {
598
- params = { base_currency: args[0], currencies: args[1] };
599
- }
600
- const response = await this.client.request('GET', "/cfg/payments/currencies/rates/", { params });
592
+ async currenciesRatesRetrieve(): Promise<Models.CurrencyRates> {
593
+ const response = await this.client.request('GET', "/cfg/payments/currencies/rates/");
601
594
  return response;
602
595
  }
603
596
 
@@ -618,24 +611,11 @@ export class CfgPayments {
618
611
  return response;
619
612
  }
620
613
 
621
- async currenciesSupportedRetrieve(currency_type?: string, provider?: string): Promise<Models.Currency>;
622
- async currenciesSupportedRetrieve(params?: { currency_type?: string; provider?: string }): Promise<Models.Currency>;
623
-
624
614
  /**
625
- * Get supported currencies
626
- *
627
- * Get list of supported currencies from payment providers
615
+ * Get supported currencies from providers.
628
616
  */
629
- async currenciesSupportedRetrieve(...args: any[]): Promise<Models.Currency> {
630
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
631
-
632
- let params;
633
- if (isParamsObject) {
634
- params = args[0];
635
- } else {
636
- params = { currency_type: args[0], provider: args[1] };
637
- }
638
- const response = await this.client.request('GET', "/cfg/payments/currencies/supported/", { params });
617
+ async currenciesSupportedRetrieve(): Promise<Models.SupportedCurrencies> {
618
+ const response = await this.client.request('GET', "/cfg/payments/currencies/supported/");
639
619
  return response;
640
620
  }
641
621
 
@@ -530,7 +530,7 @@ export interface APIKeyValidationResponse {
530
530
  success: boolean;
531
531
  /** Whether the API key is valid */
532
532
  valid: boolean;
533
- api_key: Record<string, any>;
533
+ api_key: Record<string, any> | null;
534
534
  /** Validation message */
535
535
  message: string;
536
536
  /** Error message if validation failed */
@@ -643,6 +643,42 @@ export interface Currency {
643
643
  updated_at: string;
644
644
  }
645
645
 
646
+ /**
647
+ * Currency rates serializer for getting exchange rates. Fetches current
648
+ * exchange rates through CurrencyService.
649
+ *
650
+ * Response model (includes read-only fields).
651
+ */
652
+ export interface CurrencyRates {
653
+ /** Base currency for rates (default: USD) */
654
+ base_currency?: string;
655
+ /** Specific currencies to get rates for (optional) */
656
+ currencies?: Array<string>;
657
+ /** Provider for exchange rates
658
+
659
+ * `nowpayments` - NowPayments */
660
+ provider?: Enums.CurrencyRatesProvider;
661
+ }
662
+
663
+ /**
664
+ * Supported currencies serializer for provider capabilities. Gets supported
665
+ * currencies from providers through CurrencyService.
666
+ *
667
+ * Response model (includes read-only fields).
668
+ */
669
+ export interface SupportedCurrencies {
670
+ /** Provider to get supported currencies from
671
+
672
+ * `nowpayments` - NowPayments */
673
+ provider?: Enums.SupportedCurrenciesProvider;
674
+ /** Filter by currency type
675
+
676
+ * `all` - All
677
+ * `crypto` - Cryptocurrency
678
+ * `fiat` - Fiat Currency */
679
+ currency_type?: Enums.SupportedCurrenciesCurrencyType;
680
+ }
681
+
646
682
  /**
647
683
  *
648
684
  * Response model (includes read-only fields).
@@ -698,6 +734,8 @@ export interface Payment {
698
734
  user: string;
699
735
  /** Payment amount in USD (float for performance) */
700
736
  amount_usd: number;
737
+ /** Calculate crypto amount from USD amount and currency rate. */
738
+ amount_crypto: number;
701
739
  /** Payment currency */
702
740
  currency: number;
703
741
  /** Blockchain network (for crypto payments) */
@@ -787,7 +825,7 @@ export interface PaginatedNetworkList {
787
825
  */
788
826
  export interface Network {
789
827
  id: number;
790
- currency: Record<string, any>;
828
+ currency: Record<string, any> | null;
791
829
  /** Network name (e.g., Ethereum, Bitcoin, Polygon) */
792
830
  name: string;
793
831
  /** Network code (e.g., ETH, BTC, MATIC) */
@@ -871,7 +909,7 @@ export interface PaymentsChartResponse {
871
909
  */
872
910
  export interface PaymentsMetrics {
873
911
  balance: Record<string, any>;
874
- subscription: Record<string, any>;
912
+ subscription: Record<string, any> | null;
875
913
  api_keys: Record<string, any>;
876
914
  payments: Record<string, any>;
877
915
  }
@@ -1043,10 +1081,6 @@ export interface PaymentCreateRequest {
1043
1081
  * `ADA` - Cardano
1044
1082
  * `DOT` - Polkadot */
1045
1083
  currency_code: Enums.PaymentCreateRequestCurrencyCode;
1046
- /** Payment provider
1047
-
1048
- * `nowpayments` - NowPayments */
1049
- provider?: Enums.PaymentCreateRequestProvider;
1050
1084
  /** Success callback URL */
1051
1085
  callback_url?: string;
1052
1086
  /** Cancellation URL */
@@ -1077,10 +1111,6 @@ export interface PaymentCreate {
1077
1111
  * `ADA` - Cardano
1078
1112
  * `DOT` - Polkadot */
1079
1113
  currency_code: Enums.PaymentCreateCurrencyCode;
1080
- /** Payment provider
1081
-
1082
- * `nowpayments` - NowPayments */
1083
- provider?: Enums.PaymentCreateProvider;
1084
1114
  /** Success callback URL */
1085
1115
  callback_url?: string;
1086
1116
  /** Cancellation URL */
@@ -1201,7 +1231,7 @@ export interface PaginatedProviderCurrencyList {
1201
1231
  export interface ProviderCurrency {
1202
1232
  id: number;
1203
1233
  currency: Record<string, any>;
1204
- network: Record<string, any>;
1234
+ network: Record<string, any> | null;
1205
1235
  /** Payment provider name (e.g., nowpayments) */
1206
1236
  provider: string;
1207
1237
  /** Currency code as used by the provider */
@@ -1616,6 +1646,10 @@ export interface CurrencyList {
1616
1646
  type_display: string;
1617
1647
  /** Whether this currency is available for payments */
1618
1648
  is_active: boolean;
1649
+ /** Current USD exchange rate (1 unit = X USD) */
1650
+ usd_rate: number;
1651
+ /** When USD rate was last updated */
1652
+ usd_rate_updated_at: string | null;
1619
1653
  }
1620
1654
 
1621
1655
  /**
@@ -198,6 +198,14 @@ export enum CurrencyListCurrencyType {
198
198
  CRYPTO = "crypto",
199
199
  }
200
200
 
201
+ /**
202
+ * Provider for exchange rates
203
+ * * `nowpayments` - NowPayments
204
+ */
205
+ export enum CurrencyRatesProvider {
206
+ NOWPAYMENTS = "nowpayments",
207
+ }
208
+
201
209
  /**
202
210
  * Archive format
203
211
  * * `zip` - ZIP
@@ -208,8 +216,8 @@ export enum CurrencyListCurrencyType {
208
216
  export enum DocumentArchiveArchiveType {
209
217
  ZIP = "zip",
210
218
  TAR = "tar",
211
- TAR_GZ = "tar.gz",
212
- TAR_BZ2 = "tar.bz2",
219
+ TAR_DOT_GZ = "tar.gz",
220
+ TAR_DOT_BZ2 = "tar.bz2",
213
221
  }
214
222
 
215
223
  /**
@@ -237,8 +245,8 @@ export enum DocumentArchiveProcessingStatus {
237
245
  export enum DocumentArchiveDetailArchiveType {
238
246
  ZIP = "zip",
239
247
  TAR = "tar",
240
- TAR_GZ = "tar.gz",
241
- TAR_BZ2 = "tar.bz2",
248
+ TAR_DOT_GZ = "tar.gz",
249
+ TAR_DOT_BZ2 = "tar.bz2",
242
250
  }
243
251
 
244
252
  /**
@@ -266,8 +274,8 @@ export enum DocumentArchiveDetailProcessingStatus {
266
274
  export enum DocumentArchiveListArchiveType {
267
275
  ZIP = "zip",
268
276
  TAR = "tar",
269
- TAR_GZ = "tar.gz",
270
- TAR_BZ2 = "tar.bz2",
277
+ TAR_DOT_GZ = "tar.gz",
278
+ TAR_DOT_BZ2 = "tar.bz2",
271
279
  }
272
280
 
273
281
  /**
@@ -541,14 +549,6 @@ export enum PaymentCreateCurrencyCode {
541
549
  DOT = "DOT",
542
550
  }
543
551
 
544
- /**
545
- * Payment provider
546
- * * `nowpayments` - NowPayments
547
- */
548
- export enum PaymentCreateProvider {
549
- NOWPAYMENTS = "nowpayments",
550
- }
551
-
552
552
  /**
553
553
  * Cryptocurrency to receive
554
554
  * * `BTC` - Bitcoin
@@ -571,14 +571,6 @@ export enum PaymentCreateRequestCurrencyCode {
571
571
  DOT = "DOT",
572
572
  }
573
573
 
574
- /**
575
- * Payment provider
576
- * * `nowpayments` - NowPayments
577
- */
578
- export enum PaymentCreateRequestProvider {
579
- NOWPAYMENTS = "nowpayments",
580
- }
581
-
582
574
  /**
583
575
  * Payment provider
584
576
  * * `nowpayments` - NowPayments
@@ -747,6 +739,26 @@ export enum SubscriptionRequestTier {
747
739
  ENTERPRISE = "enterprise",
748
740
  }
749
741
 
742
+ /**
743
+ * Provider to get supported currencies from
744
+ * * `nowpayments` - NowPayments
745
+ */
746
+ export enum SupportedCurrenciesProvider {
747
+ NOWPAYMENTS = "nowpayments",
748
+ }
749
+
750
+ /**
751
+ * Filter by currency type
752
+ * * `all` - All
753
+ * * `crypto` - Cryptocurrency
754
+ * * `fiat` - Fiat Currency
755
+ */
756
+ export enum SupportedCurrenciesCurrencyType {
757
+ ALL = "all",
758
+ CRYPTO = "crypto",
759
+ FIAT = "fiat",
760
+ }
761
+
750
762
  /**
751
763
  * * `open` - Open
752
764
  * * `waiting_for_user` - Waiting for User
@@ -83,12 +83,11 @@ export * as CfgSupportTypes from "./cfg__support/models";
83
83
  export * as CfgTasksTypes from "./cfg__tasks/models";
84
84
  export * as Enums from "./enums";
85
85
 
86
- // Re-export Zod schemas for runtime validation
86
+ // Re-export Zod schemas for runtime validation (namespace export to avoid conflicts)
87
87
  export * as Schemas from "./_utils/schemas";
88
88
 
89
- // Re-export typed fetchers for universal usage
89
+ // Re-export typed fetchers for universal usage (namespace export to avoid conflicts)
90
90
  export * as Fetchers from "./_utils/fetchers";
91
- export * from "./_utils/fetchers";
92
91
 
93
92
  // Re-export API instance configuration functions
94
93
  export {
@@ -2404,6 +2404,19 @@ export const OPENAPI_SCHEMA = {
2404
2404
  "type_display": {
2405
2405
  "readOnly": true,
2406
2406
  "type": "string"
2407
+ },
2408
+ "usd_rate": {
2409
+ "description": "Current USD exchange rate (1 unit = X USD)",
2410
+ "format": "double",
2411
+ "readOnly": true,
2412
+ "type": "number"
2413
+ },
2414
+ "usd_rate_updated_at": {
2415
+ "description": "When USD rate was last updated",
2416
+ "format": "date-time",
2417
+ "nullable": true,
2418
+ "readOnly": true,
2419
+ "type": "string"
2407
2420
  }
2408
2421
  },
2409
2422
  "required": [
@@ -2413,10 +2426,41 @@ export const OPENAPI_SCHEMA = {
2413
2426
  "is_active",
2414
2427
  "name",
2415
2428
  "symbol",
2416
- "type_display"
2429
+ "type_display",
2430
+ "usd_rate",
2431
+ "usd_rate_updated_at"
2417
2432
  ],
2418
2433
  "type": "object"
2419
2434
  },
2435
+ "CurrencyRates": {
2436
+ "description": "Currency rates serializer for getting exchange rates.\n\nFetches current exchange rates through CurrencyService.",
2437
+ "properties": {
2438
+ "base_currency": {
2439
+ "default": "USD",
2440
+ "description": "Base currency for rates (default: USD)",
2441
+ "maxLength": 10,
2442
+ "type": "string"
2443
+ },
2444
+ "currencies": {
2445
+ "description": "Specific currencies to get rates for (optional)",
2446
+ "items": {
2447
+ "maxLength": 10,
2448
+ "type": "string"
2449
+ },
2450
+ "type": "array"
2451
+ },
2452
+ "provider": {
2453
+ "default": "nowpayments",
2454
+ "description": "Provider for exchange rates\n\n* `nowpayments` - NowPayments",
2455
+ "enum": [
2456
+ "nowpayments"
2457
+ ],
2458
+ "type": "string",
2459
+ "x-spec-enum-id": "47694db6bd068cb3"
2460
+ }
2461
+ },
2462
+ "type": "object"
2463
+ },
2420
2464
  "Document": {
2421
2465
  "description": "Document response serializer.",
2422
2466
  "properties": {
@@ -3805,6 +3849,7 @@ export const OPENAPI_SCHEMA = {
3805
3849
  "$ref": "#/components/schemas/CurrencyList"
3806
3850
  }
3807
3851
  ],
3852
+ "nullable": true,
3808
3853
  "readOnly": true
3809
3854
  },
3810
3855
  "id": {
@@ -6795,6 +6840,12 @@ export const OPENAPI_SCHEMA = {
6795
6840
  "Payment": {
6796
6841
  "description": "Complete payment serializer with full details.\n\nUsed for detail views and updates.",
6797
6842
  "properties": {
6843
+ "amount_crypto": {
6844
+ "description": "Calculate crypto amount from USD amount and currency rate.",
6845
+ "format": "double",
6846
+ "readOnly": true,
6847
+ "type": "number"
6848
+ },
6798
6849
  "amount_display": {
6799
6850
  "description": "Get formatted amount display.",
6800
6851
  "readOnly": true,
@@ -6948,6 +6999,7 @@ export const OPENAPI_SCHEMA = {
6948
6999
  }
6949
7000
  },
6950
7001
  "required": [
7002
+ "amount_crypto",
6951
7003
  "amount_display",
6952
7004
  "amount_usd",
6953
7005
  "completed_at",
@@ -7035,15 +7087,6 @@ export const OPENAPI_SCHEMA = {
7035
7087
  },
7036
7088
  "metadata": {
7037
7089
  "description": "Additional metadata"
7038
- },
7039
- "provider": {
7040
- "default": "nowpayments",
7041
- "description": "Payment provider\n\n* `nowpayments` - NowPayments",
7042
- "enum": [
7043
- "nowpayments"
7044
- ],
7045
- "type": "string",
7046
- "x-spec-enum-id": "47694db6bd068cb3"
7047
7090
  }
7048
7091
  },
7049
7092
  "required": [
@@ -7094,15 +7137,6 @@ export const OPENAPI_SCHEMA = {
7094
7137
  },
7095
7138
  "metadata": {
7096
7139
  "description": "Additional metadata"
7097
- },
7098
- "provider": {
7099
- "default": "nowpayments",
7100
- "description": "Payment provider\n\n* `nowpayments` - NowPayments",
7101
- "enum": [
7102
- "nowpayments"
7103
- ],
7104
- "type": "string",
7105
- "x-spec-enum-id": "47694db6bd068cb3"
7106
7140
  }
7107
7141
  },
7108
7142
  "required": [
@@ -7543,6 +7577,7 @@ export const OPENAPI_SCHEMA = {
7543
7577
  "$ref": "#/components/schemas/Network"
7544
7578
  }
7545
7579
  ],
7580
+ "nullable": true,
7546
7581
  "readOnly": true
7547
7582
  },
7548
7583
  "provider": {
@@ -8516,6 +8551,32 @@ export const OPENAPI_SCHEMA = {
8516
8551
  ],
8517
8552
  "type": "object"
8518
8553
  },
8554
+ "SupportedCurrencies": {
8555
+ "description": "Supported currencies serializer for provider capabilities.\n\nGets supported currencies from providers through CurrencyService.",
8556
+ "properties": {
8557
+ "currency_type": {
8558
+ "default": "all",
8559
+ "description": "Filter by currency type\n\n* `all` - All\n* `crypto` - Cryptocurrency\n* `fiat` - Fiat Currency",
8560
+ "enum": [
8561
+ "all",
8562
+ "crypto",
8563
+ "fiat"
8564
+ ],
8565
+ "type": "string",
8566
+ "x-spec-enum-id": "aaea9f89fe6374a5"
8567
+ },
8568
+ "provider": {
8569
+ "default": "nowpayments",
8570
+ "description": "Provider to get supported currencies from\n\n* `nowpayments` - NowPayments",
8571
+ "enum": [
8572
+ "nowpayments"
8573
+ ],
8574
+ "type": "string",
8575
+ "x-spec-enum-id": "47694db6bd068cb3"
8576
+ }
8577
+ },
8578
+ "type": "object"
8579
+ },
8519
8580
  "SupportedProviders": {
8520
8581
  "description": "Serializer for supported providers response.",
8521
8582
  "properties": {
@@ -16073,7 +16134,7 @@ export const OPENAPI_SCHEMA = {
16073
16134
  },
16074
16135
  "/cfg/payments/api-keys/": {
16075
16136
  "get": {
16076
- "description": "Global API Key ViewSet: /api/api-keys/\n\nProvides admin-level access to all API keys with filtering and stats.",
16137
+ "description": "API Key ViewSet: /api/api-keys/\n\nUser-specific access to API keys with filtering and stats.\n- Regular users: can only see/manage their own API keys\n- Staff/Admin: can see/manage all API keys",
16077
16138
  "operationId": "cfg_payments_api_keys_list",
16078
16139
  "parameters": [
16079
16140
  {
@@ -16153,7 +16214,7 @@ export const OPENAPI_SCHEMA = {
16153
16214
  "x-async-capable": false
16154
16215
  },
16155
16216
  "post": {
16156
- "description": "Global API Key ViewSet: /api/api-keys/\n\nProvides admin-level access to all API keys with filtering and stats.",
16217
+ "description": "API Key ViewSet: /api/api-keys/\n\nUser-specific access to API keys with filtering and stats.\n- Regular users: can only see/manage their own API keys\n- Staff/Admin: can see/manage all API keys",
16157
16218
  "operationId": "cfg_payments_api_keys_create",
16158
16219
  "requestBody": {
16159
16220
  "content": {
@@ -16505,7 +16566,7 @@ export const OPENAPI_SCHEMA = {
16505
16566
  },
16506
16567
  "/cfg/payments/api-keys/{id}/": {
16507
16568
  "delete": {
16508
- "description": "Global API Key ViewSet: /api/api-keys/\n\nProvides admin-level access to all API keys with filtering and stats.",
16569
+ "description": "API Key ViewSet: /api/api-keys/\n\nUser-specific access to API keys with filtering and stats.\n- Regular users: can only see/manage their own API keys\n- Staff/Admin: can see/manage all API keys",
16509
16570
  "operationId": "cfg_payments_api_keys_destroy",
16510
16571
  "parameters": [
16511
16572
  {
@@ -16538,7 +16599,7 @@ export const OPENAPI_SCHEMA = {
16538
16599
  "x-async-capable": false
16539
16600
  },
16540
16601
  "get": {
16541
- "description": "Global API Key ViewSet: /api/api-keys/\n\nProvides admin-level access to all API keys with filtering and stats.",
16602
+ "description": "API Key ViewSet: /api/api-keys/\n\nUser-specific access to API keys with filtering and stats.\n- Regular users: can only see/manage their own API keys\n- Staff/Admin: can see/manage all API keys",
16542
16603
  "operationId": "cfg_payments_api_keys_retrieve",
16543
16604
  "parameters": [
16544
16605
  {
@@ -16578,7 +16639,7 @@ export const OPENAPI_SCHEMA = {
16578
16639
  "x-async-capable": false
16579
16640
  },
16580
16641
  "patch": {
16581
- "description": "Global API Key ViewSet: /api/api-keys/\n\nProvides admin-level access to all API keys with filtering and stats.",
16642
+ "description": "API Key ViewSet: /api/api-keys/\n\nUser-specific access to API keys with filtering and stats.\n- Regular users: can only see/manage their own API keys\n- Staff/Admin: can see/manage all API keys",
16582
16643
  "operationId": "cfg_payments_api_keys_partial_update",
16583
16644
  "parameters": [
16584
16645
  {
@@ -16637,7 +16698,7 @@ export const OPENAPI_SCHEMA = {
16637
16698
  "x-async-capable": false
16638
16699
  },
16639
16700
  "put": {
16640
- "description": "Global API Key ViewSet: /api/api-keys/\n\nProvides admin-level access to all API keys with filtering and stats.",
16701
+ "description": "API Key ViewSet: /api/api-keys/\n\nUser-specific access to API keys with filtering and stats.\n- Regular users: can only see/manage their own API keys\n- Staff/Admin: can see/manage all API keys",
16641
16702
  "operationId": "cfg_payments_api_keys_update",
16642
16703
  "parameters": [
16643
16704
  {
@@ -17213,34 +17274,14 @@ export const OPENAPI_SCHEMA = {
17213
17274
  },
17214
17275
  "/cfg/payments/currencies/rates/": {
17215
17276
  "get": {
17216
- "description": "Get current exchange rates for specified currencies",
17277
+ "description": "Get current exchange rates.",
17217
17278
  "operationId": "cfg_payments_currencies_rates_retrieve",
17218
- "parameters": [
17219
- {
17220
- "description": "Base currency code (e.g., USD)",
17221
- "in": "query",
17222
- "name": "base_currency",
17223
- "required": true,
17224
- "schema": {
17225
- "type": "string"
17226
- }
17227
- },
17228
- {
17229
- "description": "Comma-separated list of target currency codes (e.g., BTC,ETH,USDT)",
17230
- "in": "query",
17231
- "name": "currencies",
17232
- "required": true,
17233
- "schema": {
17234
- "type": "string"
17235
- }
17236
- }
17237
- ],
17238
17279
  "responses": {
17239
17280
  "200": {
17240
17281
  "content": {
17241
17282
  "application/json": {
17242
17283
  "schema": {
17243
- "$ref": "#/components/schemas/Currency"
17284
+ "$ref": "#/components/schemas/CurrencyRates"
17244
17285
  }
17245
17286
  }
17246
17287
  },
@@ -17255,7 +17296,6 @@ export const OPENAPI_SCHEMA = {
17255
17296
  "cookieAuth": []
17256
17297
  }
17257
17298
  ],
17258
- "summary": "Get exchange rates",
17259
17299
  "tags": [
17260
17300
  "payments"
17261
17301
  ],
@@ -17324,37 +17364,14 @@ export const OPENAPI_SCHEMA = {
17324
17364
  },
17325
17365
  "/cfg/payments/currencies/supported/": {
17326
17366
  "get": {
17327
- "description": "Get list of supported currencies from payment providers",
17367
+ "description": "Get supported currencies from providers.",
17328
17368
  "operationId": "cfg_payments_currencies_supported_retrieve",
17329
- "parameters": [
17330
- {
17331
- "description": "Currency type filter: crypto, fiat, or stablecoin",
17332
- "in": "query",
17333
- "name": "currency_type",
17334
- "schema": {
17335
- "enum": [
17336
- "crypto",
17337
- "fiat",
17338
- "stablecoin"
17339
- ],
17340
- "type": "string"
17341
- }
17342
- },
17343
- {
17344
- "description": "Payment provider name (e.g., nowpayments)",
17345
- "in": "query",
17346
- "name": "provider",
17347
- "schema": {
17348
- "type": "string"
17349
- }
17350
- }
17351
- ],
17352
17369
  "responses": {
17353
17370
  "200": {
17354
17371
  "content": {
17355
17372
  "application/json": {
17356
17373
  "schema": {
17357
- "$ref": "#/components/schemas/Currency"
17374
+ "$ref": "#/components/schemas/SupportedCurrencies"
17358
17375
  }
17359
17376
  }
17360
17377
  },
@@ -17369,7 +17386,6 @@ export const OPENAPI_SCHEMA = {
17369
17386
  "cookieAuth": []
17370
17387
  }
17371
17388
  ],
17372
- "summary": "Get supported currencies",
17373
17389
  "tags": [
17374
17390
  "payments"
17375
17391
  ],