@djangocfg/api 1.0.4 → 1.0.5

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 (134) hide show
  1. package/dist/index.cjs +15856 -34128
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +15274 -34396
  4. package/dist/index.d.ts +15274 -34396
  5. package/dist/index.mjs +15853 -33956
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/contexts/payments/ApiKeysContext.tsx +21 -58
  9. package/src/cfg/contexts/payments/BalancesContext.tsx +19 -72
  10. package/src/cfg/contexts/payments/CurrenciesContext.tsx +5 -18
  11. package/src/cfg/contexts/payments/OverviewContext.tsx +78 -124
  12. package/src/cfg/contexts/payments/PaymentsContext.tsx +37 -36
  13. package/src/cfg/contexts/payments/RootPaymentsContext.tsx +7 -76
  14. package/src/cfg/contexts/payments/index.ts +5 -24
  15. package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +38 -2380
  16. package/src/cfg/generated/_utils/fetchers/index.ts +0 -1
  17. package/src/cfg/generated/_utils/hooks/cfg__payments.ts +41 -2615
  18. package/src/cfg/generated/_utils/hooks/index.ts +0 -1
  19. package/src/cfg/generated/_utils/schemas/ArchiveItem.schema.ts +1 -1
  20. package/src/cfg/generated/_utils/schemas/ArchiveItemChunk.schema.ts +1 -1
  21. package/src/cfg/generated/_utils/schemas/ArchiveItemChunkDetail.schema.ts +1 -1
  22. package/src/cfg/generated/_utils/schemas/ArchiveItemChunkRequest.schema.ts +1 -1
  23. package/src/cfg/generated/_utils/schemas/ArchiveItemDetail.schema.ts +1 -1
  24. package/src/cfg/generated/_utils/schemas/ArchiveItemRequest.schema.ts +1 -1
  25. package/src/cfg/generated/_utils/schemas/ChatMessage.schema.ts +2 -2
  26. package/src/cfg/generated/_utils/schemas/ChatSession.schema.ts +3 -3
  27. package/src/cfg/generated/_utils/schemas/ChatSessionRequest.schema.ts +3 -3
  28. package/src/cfg/generated/_utils/schemas/Document.schema.ts +1 -1
  29. package/src/cfg/generated/_utils/schemas/DocumentRequest.schema.ts +1 -1
  30. package/src/cfg/generated/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts +1 -1
  31. package/src/cfg/generated/_utils/schemas/PatchedArchiveItemRequest.schema.ts +1 -1
  32. package/src/cfg/generated/_utils/schemas/PatchedChatSessionRequest.schema.ts +3 -3
  33. package/src/cfg/generated/_utils/schemas/PatchedDocumentRequest.schema.ts +1 -1
  34. package/src/cfg/generated/_utils/schemas/PaymentDetail.schema.ts +44 -0
  35. package/src/cfg/generated/_utils/schemas/PaymentList.schema.ts +7 -11
  36. package/src/cfg/generated/_utils/schemas/index.ts +1 -81
  37. package/src/cfg/generated/cfg__payments/client.ts +40 -1732
  38. package/src/cfg/generated/cfg__payments/models.ts +50 -1795
  39. package/src/cfg/generated/client.ts +0 -3
  40. package/src/cfg/generated/enums.ts +5 -347
  41. package/src/cfg/generated/index.ts +0 -5
  42. package/src/cfg/generated/schema.ts +5918 -18352
  43. package/src/cfg/services/payments/ApiKeysService.ts +34 -116
  44. package/src/cfg/services/payments/DashboardService.ts +37 -122
  45. package/src/cfg/services/payments/PaymentsService.ts +36 -69
  46. package/src/cfg/services/payments/SubscriptionsService.ts +35 -136
  47. package/src/cfg/services/webhooks/WebhooksService.ts +24 -66
  48. package/src/index.ts +1 -6
  49. package/src/cfg/generated/_utils/fetchers/cfg__payments__webhooks.ts +0 -109
  50. package/src/cfg/generated/_utils/hooks/cfg__payments__webhooks.ts +0 -100
  51. package/src/cfg/generated/_utils/schemas/APIKeyCreate.schema.ts +0 -24
  52. package/src/cfg/generated/_utils/schemas/APIKeyCreateRequest.schema.ts +0 -24
  53. package/src/cfg/generated/_utils/schemas/APIKeyDetail.schema.ts +0 -35
  54. package/src/cfg/generated/_utils/schemas/APIKeyList.schema.ts +0 -32
  55. package/src/cfg/generated/_utils/schemas/APIKeyUpdate.schema.ts +0 -24
  56. package/src/cfg/generated/_utils/schemas/APIKeyUpdateRequest.schema.ts +0 -24
  57. package/src/cfg/generated/_utils/schemas/APIKeyValidationRequest.schema.ts +0 -23
  58. package/src/cfg/generated/_utils/schemas/APIKeyValidationResponse.schema.ts +0 -29
  59. package/src/cfg/generated/_utils/schemas/APIKeysOverview.schema.ts +0 -26
  60. package/src/cfg/generated/_utils/schemas/AdminPaymentCreate.schema.ts +0 -26
  61. package/src/cfg/generated/_utils/schemas/AdminPaymentCreateRequest.schema.ts +0 -27
  62. package/src/cfg/generated/_utils/schemas/AdminPaymentDetail.schema.ts +0 -50
  63. package/src/cfg/generated/_utils/schemas/AdminPaymentList.schema.ts +0 -38
  64. package/src/cfg/generated/_utils/schemas/AdminPaymentStats.schema.ts +0 -29
  65. package/src/cfg/generated/_utils/schemas/AdminPaymentUpdate.schema.ts +0 -25
  66. package/src/cfg/generated/_utils/schemas/AdminPaymentUpdateRequest.schema.ts +0 -25
  67. package/src/cfg/generated/_utils/schemas/AdminUser.schema.ts +0 -24
  68. package/src/cfg/generated/_utils/schemas/BalanceOverview.schema.ts +0 -25
  69. package/src/cfg/generated/_utils/schemas/ChartDataPoint.schema.ts +0 -20
  70. package/src/cfg/generated/_utils/schemas/ChartSeries.schema.ts +0 -22
  71. package/src/cfg/generated/_utils/schemas/Currency.schema.ts +0 -35
  72. package/src/cfg/generated/_utils/schemas/CurrencyAnalyticsItem.schema.ts +0 -25
  73. package/src/cfg/generated/_utils/schemas/CurrencyList.schema.ts +0 -32
  74. package/src/cfg/generated/_utils/schemas/CurrencyRates.schema.ts +0 -26
  75. package/src/cfg/generated/_utils/schemas/EndpointGroup.schema.ts +0 -28
  76. package/src/cfg/generated/_utils/schemas/Network.schema.ts +0 -30
  77. package/src/cfg/generated/_utils/schemas/PaginatedAPIKeyListList.schema.ts +0 -24
  78. package/src/cfg/generated/_utils/schemas/PaginatedAdminPaymentListList.schema.ts +0 -24
  79. package/src/cfg/generated/_utils/schemas/PaginatedAdminPaymentStatsList.schema.ts +0 -24
  80. package/src/cfg/generated/_utils/schemas/PaginatedAdminUserList.schema.ts +0 -24
  81. package/src/cfg/generated/_utils/schemas/PaginatedCurrencyListList.schema.ts +0 -24
  82. package/src/cfg/generated/_utils/schemas/PaginatedEndpointGroupList.schema.ts +0 -24
  83. package/src/cfg/generated/_utils/schemas/PaginatedNetworkList.schema.ts +0 -24
  84. package/src/cfg/generated/_utils/schemas/PaginatedProviderCurrencyList.schema.ts +0 -24
  85. package/src/cfg/generated/_utils/schemas/PaginatedRecentPaymentList.schema.ts +0 -24
  86. package/src/cfg/generated/_utils/schemas/PaginatedRecentTransactionList.schema.ts +0 -24
  87. package/src/cfg/generated/_utils/schemas/PaginatedSubscriptionListList.schema.ts +0 -24
  88. package/src/cfg/generated/_utils/schemas/PaginatedTariffList.schema.ts +0 -24
  89. package/src/cfg/generated/_utils/schemas/PaginatedTransactionList.schema.ts +0 -24
  90. package/src/cfg/generated/_utils/schemas/PaginatedUserBalanceList.schema.ts +0 -24
  91. package/src/cfg/generated/_utils/schemas/PaginatedWebhookEventListList.schema.ts +0 -24
  92. package/src/cfg/generated/_utils/schemas/PaginatedWebhookStatsList.schema.ts +0 -24
  93. package/src/cfg/generated/_utils/schemas/PatchedAPIKeyUpdateRequest.schema.ts +0 -24
  94. package/src/cfg/generated/_utils/schemas/PatchedAdminPaymentUpdateRequest.schema.ts +0 -25
  95. package/src/cfg/generated/_utils/schemas/PatchedPaymentRequest.schema.ts +0 -30
  96. package/src/cfg/generated/_utils/schemas/PatchedSubscriptionRequest.schema.ts +0 -26
  97. package/src/cfg/generated/_utils/schemas/Payment.schema.ts +0 -49
  98. package/src/cfg/generated/_utils/schemas/PaymentAnalyticsResponse.schema.ts +0 -22
  99. package/src/cfg/generated/_utils/schemas/PaymentCreate.schema.ts +0 -28
  100. package/src/cfg/generated/_utils/schemas/PaymentCreateRequest.schema.ts +0 -28
  101. package/src/cfg/generated/_utils/schemas/PaymentOverview.schema.ts +0 -31
  102. package/src/cfg/generated/_utils/schemas/PaymentRequest.schema.ts +0 -30
  103. package/src/cfg/generated/_utils/schemas/PaymentsChartResponse.schema.ts +0 -24
  104. package/src/cfg/generated/_utils/schemas/PaymentsDashboardOverview.schema.ts +0 -26
  105. package/src/cfg/generated/_utils/schemas/PaymentsMetrics.schema.ts +0 -26
  106. package/src/cfg/generated/_utils/schemas/ProviderAnalyticsItem.schema.ts +0 -24
  107. package/src/cfg/generated/_utils/schemas/ProviderCurrency.schema.ts +0 -36
  108. package/src/cfg/generated/_utils/schemas/RecentPayment.schema.ts +0 -32
  109. package/src/cfg/generated/_utils/schemas/RecentTransaction.schema.ts +0 -29
  110. package/src/cfg/generated/_utils/schemas/Subscription.schema.ts +0 -41
  111. package/src/cfg/generated/_utils/schemas/SubscriptionCreate.schema.ts +0 -25
  112. package/src/cfg/generated/_utils/schemas/SubscriptionCreateRequest.schema.ts +0 -25
  113. package/src/cfg/generated/_utils/schemas/SubscriptionList.schema.ts +0 -32
  114. package/src/cfg/generated/_utils/schemas/SubscriptionOverview.schema.ts +0 -37
  115. package/src/cfg/generated/_utils/schemas/SubscriptionRequest.schema.ts +0 -26
  116. package/src/cfg/generated/_utils/schemas/SupportedCurrencies.schema.ts +0 -25
  117. package/src/cfg/generated/_utils/schemas/SupportedProviders.schema.ts +0 -22
  118. package/src/cfg/generated/_utils/schemas/Tariff.schema.ts +0 -34
  119. package/src/cfg/generated/_utils/schemas/Transaction.schema.ts +0 -35
  120. package/src/cfg/generated/_utils/schemas/UserBalance.schema.ts +0 -29
  121. package/src/cfg/generated/_utils/schemas/WebhookEvent.schema.ts +0 -31
  122. package/src/cfg/generated/_utils/schemas/WebhookEventList.schema.ts +0 -25
  123. package/src/cfg/generated/_utils/schemas/WebhookEventListRequest.schema.ts +0 -25
  124. package/src/cfg/generated/_utils/schemas/WebhookEventRequest.schema.ts +0 -30
  125. package/src/cfg/generated/_utils/schemas/WebhookHealth.schema.ts +0 -21
  126. package/src/cfg/generated/_utils/schemas/WebhookProviderStats.schema.ts +0 -23
  127. package/src/cfg/generated/_utils/schemas/WebhookProviderStatsRequest.schema.ts +0 -23
  128. package/src/cfg/generated/_utils/schemas/WebhookResponse.schema.ts +0 -27
  129. package/src/cfg/generated/_utils/schemas/WebhookResponseRequest.schema.ts +0 -27
  130. package/src/cfg/generated/_utils/schemas/WebhookStats.schema.ts +0 -27
  131. package/src/cfg/generated/_utils/schemas/WebhookStatsRequest.schema.ts +0 -27
  132. package/src/cfg/generated/cfg__payments__webhooks/client.ts +0 -75
  133. package/src/cfg/generated/cfg__payments__webhooks/index.ts +0 -2
  134. package/src/cfg/generated/cfg__payments__webhooks/models.ts +0 -87
@@ -11,1783 +11,91 @@ export class CfgPayments {
11
11
  this.client = client;
12
12
  }
13
13
 
14
- async adminApiPaymentsList(currency__code?: string, ordering?: string, page?: number, page_size?: number, provider?: string, search?: string, status?: string, user?: number): Promise<Models.PaginatedAdminPaymentListList>;
15
- async adminApiPaymentsList(params?: { currency__code?: string; ordering?: string; page?: number; page_size?: number; provider?: string; search?: string; status?: string; user?: number }): Promise<Models.PaginatedAdminPaymentListList>;
16
-
17
- /**
18
- * Admin ViewSet for payment management. Provides full CRUD operations for
19
- * payments with admin-specific features.
20
- */
21
- async adminApiPaymentsList(...args: any[]): Promise<Models.PaginatedAdminPaymentListList> {
22
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
23
-
24
- let params;
25
- if (isParamsObject) {
26
- params = args[0];
27
- } else {
28
- params = { currency__code: args[0], ordering: args[1], page: args[2], page_size: args[3], provider: args[4], search: args[5], status: args[6], user: args[7] };
29
- }
30
- const response = await this.client.request('GET', "/cfg/payments/admin/api/payments/", { params });
31
- return response;
32
- }
33
-
34
- /**
35
- * Create payment with enhanced error handling.
36
- */
37
- async adminApiPaymentsCreate(data: Models.AdminPaymentCreateRequest): Promise<Models.AdminPaymentCreate> {
38
- const response = await this.client.request('POST', "/cfg/payments/admin/api/payments/", { body: data });
39
- return response;
40
- }
41
-
42
- /**
43
- * Admin ViewSet for payment management. Provides full CRUD operations for
44
- * payments with admin-specific features.
45
- */
46
- async adminApiPaymentsRetrieve(id: string): Promise<Models.AdminPaymentDetail> {
47
- const response = await this.client.request('GET', `/cfg/payments/admin/api/payments/${id}/`);
48
- return response;
49
- }
50
-
51
- /**
52
- * Admin ViewSet for payment management. Provides full CRUD operations for
53
- * payments with admin-specific features.
54
- */
55
- async adminApiPaymentsUpdate(id: string, data: Models.AdminPaymentUpdateRequest): Promise<Models.AdminPaymentUpdate> {
56
- const response = await this.client.request('PUT', `/cfg/payments/admin/api/payments/${id}/`, { body: data });
57
- return response;
58
- }
59
-
60
- /**
61
- * Admin ViewSet for payment management. Provides full CRUD operations for
62
- * payments with admin-specific features.
63
- */
64
- async adminApiPaymentsPartialUpdate(id: string, data?: Models.PatchedAdminPaymentUpdateRequest): Promise<Models.AdminPaymentUpdate> {
65
- const response = await this.client.request('PATCH', `/cfg/payments/admin/api/payments/${id}/`, { body: data });
66
- return response;
67
- }
68
-
69
- /**
70
- * Admin ViewSet for payment management. Provides full CRUD operations for
71
- * payments with admin-specific features.
72
- */
73
- async adminApiPaymentsDestroy(id: string): Promise<void> {
74
- const response = await this.client.request('DELETE', `/cfg/payments/admin/api/payments/${id}/`);
75
- return;
76
- }
77
-
78
- /**
79
- * Cancel a payment.
80
- */
81
- async adminApiPaymentsCancelCreate(id: string): Promise<Models.AdminPaymentDetail> {
82
- const response = await this.client.request('POST', `/cfg/payments/admin/api/payments/${id}/cancel/`);
83
- return response;
84
- }
85
-
86
- /**
87
- * Refresh payment status from provider via AJAX.
88
- */
89
- async adminApiPaymentsRefreshStatusCreate(id: string): Promise<Models.AdminPaymentDetail> {
90
- const response = await this.client.request('POST', `/cfg/payments/admin/api/payments/${id}/refresh_status/`);
91
- return response;
92
- }
93
-
94
- /**
95
- * Refund a payment.
96
- */
97
- async adminApiPaymentsRefundCreate(id: string): Promise<Models.AdminPaymentDetail> {
98
- const response = await this.client.request('POST', `/cfg/payments/admin/api/payments/${id}/refund/`);
99
- return response;
100
- }
101
-
102
- /**
103
- * Get comprehensive payment statistics.
104
- */
105
- async adminApiPaymentsStatsRetrieve(): Promise<Models.AdminPaymentStats> {
106
- const response = await this.client.request('GET', "/cfg/payments/admin/api/payments/stats/");
107
- return response;
108
- }
109
-
110
- async adminApiStatsList(ordering?: string, page?: number, page_size?: number, search?: string): Promise<Models.PaginatedAdminPaymentStatsList>;
111
- async adminApiStatsList(params?: { ordering?: string; page?: number; page_size?: number; search?: string }): Promise<Models.PaginatedAdminPaymentStatsList>;
112
-
113
- /**
114
- * Get overview statistics.
115
- */
116
- async adminApiStatsList(...args: any[]): Promise<Models.PaginatedAdminPaymentStatsList> {
117
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
118
-
119
- let params;
120
- if (isParamsObject) {
121
- params = args[0];
122
- } else {
123
- params = { ordering: args[0], page: args[1], page_size: args[2], search: args[3] };
124
- }
125
- const response = await this.client.request('GET', "/cfg/payments/admin/api/stats/", { params });
126
- return response;
127
- }
128
-
129
- /**
130
- * Admin ViewSet for comprehensive system statistics. Provides aggregated
131
- * statistics across all system components.
132
- */
133
- async adminApiStatsRetrieve(id: string): Promise<Models.AdminPaymentStats> {
134
- const response = await this.client.request('GET', `/cfg/payments/admin/api/stats/${id}/`);
135
- return response;
136
- }
137
-
138
- /**
139
- * Get detailed payment statistics.
140
- */
141
- async adminApiStatsPaymentsRetrieve(): Promise<Models.AdminPaymentStats> {
142
- const response = await this.client.request('GET', "/cfg/payments/admin/api/stats/payments/");
143
- return response;
144
- }
145
-
146
- /**
147
- * Get system health and performance statistics.
148
- */
149
- async adminApiStatsSystemRetrieve(): Promise<Models.AdminPaymentStats> {
150
- const response = await this.client.request('GET', "/cfg/payments/admin/api/stats/system/");
151
- return response;
152
- }
153
-
154
- /**
155
- * Get detailed webhook statistics.
156
- */
157
- async adminApiStatsWebhooksRetrieve(): Promise<Models.AdminPaymentStats> {
158
- const response = await this.client.request('GET', "/cfg/payments/admin/api/stats/webhooks/");
159
- return response;
160
- }
161
-
162
- async adminApiUsersList(is_active?: boolean, is_staff?: boolean, is_superuser?: boolean, ordering?: string, page?: number, page_size?: number, search?: string): Promise<Models.PaginatedAdminUserList>;
163
- async adminApiUsersList(params?: { is_active?: boolean; is_staff?: boolean; is_superuser?: boolean; ordering?: string; page?: number; page_size?: number; search?: string }): Promise<Models.PaginatedAdminUserList>;
164
-
165
- /**
166
- * Override list to limit results for dropdown.
167
- */
168
- async adminApiUsersList(...args: any[]): Promise<Models.PaginatedAdminUserList> {
169
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
170
-
171
- let params;
172
- if (isParamsObject) {
173
- params = args[0];
174
- } else {
175
- params = { is_active: args[0], is_staff: args[1], is_superuser: args[2], ordering: args[3], page: args[4], page_size: args[5], search: args[6] };
176
- }
177
- const response = await this.client.request('GET', "/cfg/payments/admin/api/users/", { params });
178
- return response;
179
- }
180
-
181
14
  /**
182
- * Admin ViewSet for user management. Provides read-only access to users
183
- * for admin interface.
15
+ * Get current user balance.
184
16
  */
185
- async adminApiUsersRetrieve(id: number): Promise<Models.AdminUser> {
186
- const response = await this.client.request('GET', `/cfg/payments/admin/api/users/${id}/`);
17
+ async balanceRetrieve(): Promise<any> {
18
+ const response = await this.client.request('GET', "/cfg/payments/balance/");
187
19
  return response;
188
20
  }
189
21
 
190
22
  /**
191
- * Test webhook endpoint. Sends a test webhook to the specified URL with
192
- * the given event type. Useful for developers to test their webhook
193
- * implementations.
23
+ * GET /api/v1/payments/currencies/ Returns list of available currencies
24
+ * with token+network info.
194
25
  */
195
- async adminApiWebhookTestTestCreate(data: Models.WebhookStatsRequest): Promise<Models.WebhookStats> {
196
- const response = await this.client.request('POST', "/cfg/payments/admin/api/webhook-test/test/", { body: data });
26
+ async currenciesRetrieve(): Promise<any> {
27
+ const response = await this.client.request('GET', "/cfg/payments/currencies/");
197
28
  return response;
198
29
  }
199
30
 
200
- async adminApiWebhooksList(ordering?: string, page?: number, page_size?: number, search?: string): Promise<Models.PaginatedWebhookStatsList>;
201
- async adminApiWebhooksList(params?: { ordering?: string; page?: number; page_size?: number; search?: string }): Promise<Models.PaginatedWebhookStatsList>;
31
+ async paymentsList(page?: number, page_size?: number): Promise<Models.PaginatedPaymentListList>;
32
+ async paymentsList(params?: { page?: number; page_size?: number }): Promise<Models.PaginatedPaymentListList>;
202
33
 
203
34
  /**
204
- * List webhook providers and configurations with real ngrok URLs.
35
+ * ViewSet for payment operations. Endpoints: - GET /payments/ - List
36
+ * user's payments - GET /payments/{id}/ - Get payment details - POST
37
+ * /payments/create/ - Create new payment - GET /payments/{id}/status/ -
38
+ * Check payment status - POST /payments/{id}/confirm/ - Confirm payment
205
39
  */
206
- async adminApiWebhooksList(...args: any[]): Promise<Models.PaginatedWebhookStatsList> {
40
+ async paymentsList(...args: any[]): Promise<Models.PaginatedPaymentListList> {
207
41
  const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
208
42
 
209
43
  let params;
210
44
  if (isParamsObject) {
211
45
  params = args[0];
212
46
  } else {
213
- params = { ordering: args[0], page: args[1], page_size: args[2], search: args[3] };
47
+ params = { page: args[0], page_size: args[1] };
214
48
  }
215
- const response = await this.client.request('GET', "/cfg/payments/admin/api/webhooks/", { params });
49
+ const response = await this.client.request('GET', "/cfg/payments/payments/", { params });
216
50
  return response;
217
51
  }
218
52
 
219
53
  /**
220
- * Admin ViewSet for webhook configuration management. Read-only view for
221
- * webhook configurations and provider info. Requires admin permissions.
54
+ * ViewSet for payment operations. Endpoints: - GET /payments/ - List
55
+ * user's payments - GET /payments/{id}/ - Get payment details - POST
56
+ * /payments/create/ - Create new payment - GET /payments/{id}/status/ -
57
+ * Check payment status - POST /payments/{id}/confirm/ - Confirm payment
222
58
  */
223
- async adminApiWebhooksRetrieve(id: string): Promise<Models.WebhookStats> {
224
- const response = await this.client.request('GET', `/cfg/payments/admin/api/webhooks/${id}/`);
59
+ async paymentsRetrieve(id: string): Promise<Models.PaymentDetail> {
60
+ const response = await this.client.request('GET', `/cfg/payments/payments/${id}/`);
225
61
  return response;
226
62
  }
227
63
 
228
- async adminApiWebhooksEventsList(webhook_pk: string, ordering?: string, page?: number, page_size?: number, search?: string): Promise<Models.PaginatedWebhookEventListList>;
229
- async adminApiWebhooksEventsList(webhook_pk: string, params?: { ordering?: string; page?: number; page_size?: number; search?: string }): Promise<Models.PaginatedWebhookEventListList>;
230
-
231
64
  /**
232
- * List webhook events with filtering and pagination.
65
+ * POST /api/v1/payments/{id}/confirm/ Confirm payment (user clicked "I
66
+ * have paid"). Checks status with provider and creates transaction if
67
+ * completed.
233
68
  */
234
- async adminApiWebhooksEventsList(...args: any[]): Promise<Models.PaginatedWebhookEventListList> {
235
- const webhook_pk = args[0];
236
- const isParamsObject = args.length === 2 && typeof args[1] === 'object' && args[1] !== null && !Array.isArray(args[1]);
237
-
238
- let params;
239
- if (isParamsObject) {
240
- params = args[1];
241
- } else {
242
- params = { ordering: args[1], page: args[2], page_size: args[3], search: args[4] };
243
- }
244
- const response = await this.client.request('GET', `/cfg/payments/admin/api/webhooks/${webhook_pk}/events/`, { params });
69
+ async paymentsConfirmCreate(id: string): Promise<Models.PaymentList> {
70
+ const response = await this.client.request('POST', `/cfg/payments/payments/${id}/confirm/`);
245
71
  return response;
246
72
  }
247
73
 
248
74
  /**
249
- * Admin ViewSet for webhook events management. Provides listing,
250
- * filtering, and actions for webhook events. Requires admin permissions.
75
+ * GET /api/v1/payments/{id}/status/?refresh=true Check payment status
76
+ * (with optional refresh from provider). Query params: - refresh: boolean
77
+ * (default: false) - Force refresh from provider
251
78
  */
252
- async adminApiWebhooksEventsRetrieve(id: string, webhook_pk: string): Promise<Models.WebhookEventList[]> {
253
- const response = await this.client.request('GET', `/cfg/payments/admin/api/webhooks/${webhook_pk}/events/${id}/`);
79
+ async paymentsStatusRetrieve(id: string): Promise<Models.PaymentList[]> {
80
+ const response = await this.client.request('GET', `/cfg/payments/payments/${id}/status/`);
254
81
  return (response as any).results || [];
255
82
  }
256
83
 
257
84
  /**
258
- * Retry a failed webhook event.
259
- */
260
- async adminApiWebhooksEventsRetryCreate(id: string, webhook_pk: string, data: Models.WebhookEventListRequest): Promise<Models.WebhookEventList> {
261
- const response = await this.client.request('POST', `/cfg/payments/admin/api/webhooks/${webhook_pk}/events/${id}/retry/`, { body: data });
262
- return response;
263
- }
264
-
265
- /**
266
- * Clear all webhook events.
267
- */
268
- async adminApiWebhooksEventsClearAllCreate(webhook_pk: string, data: Models.WebhookEventListRequest): Promise<Models.WebhookEventList> {
269
- const response = await this.client.request('POST', `/cfg/payments/admin/api/webhooks/${webhook_pk}/events/clear_all/`, { body: data });
270
- return response;
271
- }
272
-
273
- /**
274
- * Retry all failed webhook events.
275
- */
276
- async adminApiWebhooksEventsRetryFailedCreate(webhook_pk: string, data: Models.WebhookEventListRequest): Promise<Models.WebhookEventList> {
277
- const response = await this.client.request('POST', `/cfg/payments/admin/api/webhooks/${webhook_pk}/events/retry_failed/`, { body: data });
278
- return response;
279
- }
280
-
281
- /**
282
- * Get webhook statistics.
283
- */
284
- async adminApiWebhooksStatsRetrieve(): Promise<Models.WebhookStats> {
285
- const response = await this.client.request('GET', "/cfg/payments/admin/api/webhooks/stats/");
286
- return response;
287
- }
288
-
289
- async apiKeysList(is_active?: boolean, ordering?: string, page?: number, page_size?: number, search?: string, user?: number): Promise<Models.PaginatedAPIKeyListList>;
290
- async apiKeysList(params?: { is_active?: boolean; ordering?: string; page?: number; page_size?: number; search?: string; user?: number }): Promise<Models.PaginatedAPIKeyListList>;
291
-
292
- /**
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
296
- */
297
- async apiKeysList(...args: any[]): Promise<Models.PaginatedAPIKeyListList> {
298
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
299
-
300
- let params;
301
- if (isParamsObject) {
302
- params = args[0];
303
- } else {
304
- params = { is_active: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4], user: args[5] };
305
- }
306
- const response = await this.client.request('GET', "/cfg/payments/api-keys/", { params });
307
- return response;
308
- }
309
-
310
- /**
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
314
- */
315
- async apiKeysCreate(data: Models.APIKeyCreateRequest): Promise<Models.APIKeyCreate> {
316
- const response = await this.client.request('POST', "/cfg/payments/api-keys/", { body: data });
317
- return response;
318
- }
319
-
320
- /**
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
324
- */
325
- async apiKeysRetrieve(id: string): Promise<Models.APIKeyDetail> {
326
- const response = await this.client.request('GET', `/cfg/payments/api-keys/${id}/`);
327
- return response;
328
- }
329
-
330
- /**
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
334
- */
335
- async apiKeysUpdate(id: string, data: Models.APIKeyUpdateRequest): Promise<Models.APIKeyUpdate> {
336
- const response = await this.client.request('PUT', `/cfg/payments/api-keys/${id}/`, { body: data });
337
- return response;
338
- }
339
-
340
- /**
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
344
- */
345
- async apiKeysPartialUpdate(id: string, data?: Models.PatchedAPIKeyUpdateRequest): Promise<Models.APIKeyUpdate> {
346
- const response = await this.client.request('PATCH', `/cfg/payments/api-keys/${id}/`, { body: data });
347
- return response;
348
- }
349
-
350
- /**
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
354
- */
355
- async apiKeysDestroy(id: string): Promise<void> {
356
- const response = await this.client.request('DELETE', `/cfg/payments/api-keys/${id}/`);
357
- return;
358
- }
359
-
360
- /**
361
- * Perform action on API key. POST /api/api-keys/{id}/perform_action/
362
- */
363
- async apiKeysPerformActionCreate(id: string): Promise<Models.APIKeyDetail> {
364
- const response = await this.client.request('POST', `/cfg/payments/api-keys/${id}/perform_action/`);
365
- return response;
366
- }
367
-
368
- /**
369
- * Get API key analytics. GET /api/api-keys/analytics/?days=30
370
- */
371
- async apiKeysAnalyticsRetrieve(): Promise<Models.APIKeyDetail> {
372
- const response = await this.client.request('GET', "/cfg/payments/api-keys/analytics/");
373
- return response;
374
- }
375
-
376
- /**
377
- * Get API keys grouped by user. GET /api/api-keys/by_user/
378
- */
379
- async apiKeysByUserRetrieve(): Promise<Models.APIKeyDetail> {
380
- const response = await this.client.request('GET', "/cfg/payments/api-keys/by_user/");
381
- return response;
382
- }
383
-
384
- /**
385
- * Standalone API key creation endpoint: /api/api-keys/create/ Simplified
386
- * endpoint for API key creation.
387
- */
388
- async apiKeysCreateCreate(data: Models.APIKeyCreateRequest): Promise<Models.APIKeyCreate> {
389
- const response = await this.client.request('POST', "/cfg/payments/api-keys/create/", { body: data });
390
- return response;
391
- }
392
-
393
- /**
394
- * Get API keys expiring soon. GET /api/api-keys/expiring_soon/?days=7
395
- */
396
- async apiKeysExpiringSoonRetrieve(): Promise<Models.APIKeyDetail> {
397
- const response = await this.client.request('GET', "/cfg/payments/api-keys/expiring_soon/");
398
- return response;
399
- }
400
-
401
- /**
402
- * Health check for the ViewSet and related services. Returns service
403
- * status and basic metrics.
404
- */
405
- async apiKeysHealthRetrieve(): Promise<Models.APIKeyDetail> {
406
- const response = await this.client.request('GET', "/cfg/payments/api-keys/health/");
407
- return response;
408
- }
409
-
410
- /**
411
- * Get statistics for the current queryset. Returns counts, aggregates, and
412
- * breakdowns.
413
- */
414
- async apiKeysStatsRetrieve(): Promise<Models.APIKeyDetail> {
415
- const response = await this.client.request('GET', "/cfg/payments/api-keys/stats/");
416
- return response;
417
- }
418
-
419
- /**
420
- * Validate API Key (Standalone)
421
- *
422
- * Standalone endpoint to validate an API key and return key information
423
- */
424
- async apiKeysValidateCreate(data: Models.APIKeyValidationRequest): Promise<Models.APIKeyValidationResponse> {
425
- const response = await this.client.request('POST', "/cfg/payments/api-keys/validate/", { body: data });
426
- return response;
427
- }
428
-
429
- /**
430
- * Validate API Key
431
- *
432
- * Validate an API key and return key information
433
- */
434
- async apiKeysValidateKeyCreate(data: Models.APIKeyValidationRequest): Promise<Models.APIKeyValidationResponse> {
435
- const response = await this.client.request('POST', "/cfg/payments/api-keys/validate_key/", { body: data });
436
- return response;
437
- }
438
-
439
- async balancesList(ordering?: string, page?: number, page_size?: number, search?: string, user?: number): Promise<Models.PaginatedUserBalanceList>;
440
- async balancesList(params?: { ordering?: string; page?: number; page_size?: number; search?: string; user?: number }): Promise<Models.PaginatedUserBalanceList>;
441
-
442
- /**
443
- * User balance ViewSet: /api/balances/ Read-only access to user balances
444
- * with statistics.
445
- */
446
- async balancesList(...args: any[]): Promise<Models.PaginatedUserBalanceList> {
447
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
448
-
449
- let params;
450
- if (isParamsObject) {
451
- params = args[0];
452
- } else {
453
- params = { ordering: args[0], page: args[1], page_size: args[2], search: args[3], user: args[4] };
454
- }
455
- const response = await this.client.request('GET', "/cfg/payments/balances/", { params });
456
- return response;
457
- }
458
-
459
- /**
460
- * User balance ViewSet: /api/balances/ Read-only access to user balances
461
- * with statistics.
462
- */
463
- async balancesRetrieve(id: number): Promise<Models.UserBalance> {
464
- const response = await this.client.request('GET', `/cfg/payments/balances/${id}/`);
465
- return response;
466
- }
467
-
468
- /**
469
- * Get balance analytics. GET /api/balances/analytics/?days=30
470
- */
471
- async balancesAnalyticsRetrieve(): Promise<Models.UserBalance> {
472
- const response = await this.client.request('GET', "/cfg/payments/balances/analytics/");
473
- return response;
474
- }
475
-
476
- /**
477
- * Health check for the ViewSet and related services. Returns service
478
- * status and basic metrics.
479
- */
480
- async balancesHealthRetrieve(): Promise<Models.UserBalance> {
481
- const response = await this.client.request('GET', "/cfg/payments/balances/health/");
482
- return response;
483
- }
484
-
485
- /**
486
- * Get statistics for the current queryset. Returns counts, aggregates, and
487
- * breakdowns.
488
- */
489
- async balancesStatsRetrieve(): Promise<Models.UserBalance> {
490
- const response = await this.client.request('GET', "/cfg/payments/balances/stats/");
491
- return response;
492
- }
493
-
494
- /**
495
- * Get balance summary for all users. GET /api/balances/summary/
496
- */
497
- async balancesSummaryRetrieve(): Promise<Models.UserBalance> {
498
- const response = await this.client.request('GET', "/cfg/payments/balances/summary/");
499
- return response;
500
- }
501
-
502
- async currenciesList(currency_type?: string, is_active?: boolean, ordering?: string, page?: number, page_size?: number, search?: string): Promise<Models.PaginatedCurrencyListList>;
503
- async currenciesList(params?: { currency_type?: string; is_active?: boolean; ordering?: string; page?: number; page_size?: number; search?: string }): Promise<Models.PaginatedCurrencyListList>;
504
-
505
- /**
506
- * Currency ViewSet: /api/currencies/ Read-only access to currency
507
- * information with conversion capabilities.
508
- */
509
- async currenciesList(...args: any[]): Promise<Models.PaginatedCurrencyListList> {
510
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
511
-
512
- let params;
513
- if (isParamsObject) {
514
- params = args[0];
515
- } else {
516
- params = { currency_type: args[0], is_active: args[1], ordering: args[2], page: args[3], page_size: args[4], search: args[5] };
517
- }
518
- const response = await this.client.request('GET', "/cfg/payments/currencies/", { params });
519
- return response;
520
- }
521
-
522
- /**
523
- * Disable create action.
524
- */
525
- async currenciesCreate(): Promise<Models.Currency> {
526
- const response = await this.client.request('POST', "/cfg/payments/currencies/");
527
- return response;
528
- }
529
-
530
- /**
531
- * Currency ViewSet: /api/currencies/ Read-only access to currency
532
- * information with conversion capabilities.
533
- */
534
- async currenciesRetrieve(id: number): Promise<Models.Currency> {
535
- const response = await this.client.request('GET', `/cfg/payments/currencies/${id}/`);
536
- return response;
537
- }
538
-
539
- /**
540
- * Get networks for specific currency. GET /api/currencies/{id}/networks/
541
- */
542
- async currenciesNetworksRetrieve(id: number): Promise<Models.Currency> {
543
- const response = await this.client.request('GET', `/cfg/payments/currencies/${id}/networks/`);
544
- return response;
545
- }
546
-
547
- /**
548
- * Get providers supporting specific currency. GET
549
- * /api/currencies/{id}/providers/
550
- */
551
- async currenciesProvidersRetrieve(id: number): Promise<Models.Currency> {
552
- const response = await this.client.request('GET', `/cfg/payments/currencies/${id}/providers/`);
553
- return response;
554
- }
555
-
556
- /**
557
- * Convert between currencies. POST /api/currencies/convert/
558
- */
559
- async currenciesConvertCreate(): Promise<Models.Currency> {
560
- const response = await this.client.request('POST', "/cfg/payments/currencies/convert/");
561
- return response;
562
- }
563
-
564
- /**
565
- * Get only cryptocurrencies. GET /api/currencies/crypto/
566
- */
567
- async currenciesCryptoRetrieve(): Promise<Models.Currency> {
568
- const response = await this.client.request('GET', "/cfg/payments/currencies/crypto/");
569
- return response;
570
- }
571
-
572
- /**
573
- * Get only fiat currencies. GET /api/currencies/fiat/
574
- */
575
- async currenciesFiatRetrieve(): Promise<Models.Currency> {
576
- const response = await this.client.request('GET', "/cfg/payments/currencies/fiat/");
577
- return response;
578
- }
579
-
580
- /**
581
- * Health check for the ViewSet and related services. Returns service
582
- * status and basic metrics.
583
- */
584
- async currenciesHealthRetrieve(): Promise<Models.Currency> {
585
- const response = await this.client.request('GET', "/cfg/payments/currencies/health/");
586
- return response;
587
- }
588
-
589
- /**
590
- * Get current exchange rates.
591
- */
592
- async currenciesRatesRetrieve(): Promise<Models.CurrencyRates> {
593
- const response = await this.client.request('GET', "/cfg/payments/currencies/rates/");
594
- return response;
595
- }
596
-
597
- /**
598
- * Get only stablecoins. GET /api/currencies/stable/
599
- */
600
- async currenciesStableRetrieve(): Promise<Models.Currency> {
601
- const response = await this.client.request('GET', "/cfg/payments/currencies/stable/");
602
- return response;
603
- }
604
-
605
- /**
606
- * Get statistics for the current queryset. Returns counts, aggregates, and
607
- * breakdowns.
608
- */
609
- async currenciesStatsRetrieve(): Promise<Models.Currency> {
610
- const response = await this.client.request('GET', "/cfg/payments/currencies/stats/");
611
- return response;
612
- }
613
-
614
- /**
615
- * Get supported currencies from providers.
616
- */
617
- async currenciesSupportedRetrieve(): Promise<Models.SupportedCurrencies> {
618
- const response = await this.client.request('GET', "/cfg/payments/currencies/supported/");
619
- return response;
620
- }
621
-
622
- async endpointGroupsList(is_enabled?: boolean, ordering?: string, page?: number, page_size?: number, search?: string): Promise<Models.PaginatedEndpointGroupList>;
623
- async endpointGroupsList(params?: { is_enabled?: boolean; ordering?: string; page?: number; page_size?: number; search?: string }): Promise<Models.PaginatedEndpointGroupList>;
624
-
625
- /**
626
- * Endpoint Group ViewSet: /api/endpoint-groups/ Read-only access to
627
- * endpoint group information.
628
- */
629
- async endpointGroupsList(...args: any[]): Promise<Models.PaginatedEndpointGroupList> {
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 = { is_enabled: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4] };
637
- }
638
- const response = await this.client.request('GET', "/cfg/payments/endpoint-groups/", { params });
639
- return response;
640
- }
641
-
642
- /**
643
- * Endpoint Group ViewSet: /api/endpoint-groups/ Read-only access to
644
- * endpoint group information.
645
- */
646
- async endpointGroupsRetrieve(id: number): Promise<Models.EndpointGroup> {
647
- const response = await this.client.request('GET', `/cfg/payments/endpoint-groups/${id}/`);
648
- return response;
649
- }
650
-
651
- /**
652
- * Get available endpoint groups for subscription. GET
653
- * /api/endpoint-groups/available/
654
- */
655
- async endpointGroupsAvailableRetrieve(): Promise<Models.EndpointGroup> {
656
- const response = await this.client.request('GET', "/cfg/payments/endpoint-groups/available/");
657
- return response;
658
- }
659
-
660
- /**
661
- * Health check for the ViewSet and related services. Returns service
662
- * status and basic metrics.
663
- */
664
- async endpointGroupsHealthRetrieve(): Promise<Models.EndpointGroup> {
665
- const response = await this.client.request('GET', "/cfg/payments/endpoint-groups/health/");
666
- return response;
667
- }
668
-
669
- /**
670
- * Get statistics for the current queryset. Returns counts, aggregates, and
671
- * breakdowns.
672
- */
673
- async endpointGroupsStatsRetrieve(): Promise<Models.EndpointGroup> {
674
- const response = await this.client.request('GET', "/cfg/payments/endpoint-groups/stats/");
675
- return response;
676
- }
677
-
678
- /**
679
- * Health check for the ViewSet and related services. Returns service
680
- * status and basic metrics.
681
- */
682
- async healthRetrieve(): Promise<Models.Payment> {
683
- const response = await this.client.request('GET', "/cfg/payments/health/");
684
- return response;
685
- }
686
-
687
- async networksList(is_active?: boolean, native_currency__code?: string, ordering?: string, page?: number, page_size?: number, search?: string): Promise<Models.PaginatedNetworkList>;
688
- async networksList(params?: { is_active?: boolean; native_currency__code?: string; ordering?: string; page?: number; page_size?: number; search?: string }): Promise<Models.PaginatedNetworkList>;
689
-
690
- /**
691
- * Network ViewSet: /api/networks/ Read-only access to blockchain network
692
- * information.
693
- */
694
- async networksList(...args: any[]): Promise<Models.PaginatedNetworkList> {
695
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
696
-
697
- let params;
698
- if (isParamsObject) {
699
- params = args[0];
700
- } else {
701
- params = { is_active: args[0], native_currency__code: args[1], ordering: args[2], page: args[3], page_size: args[4], search: args[5] };
702
- }
703
- const response = await this.client.request('GET', "/cfg/payments/networks/", { params });
704
- return response;
705
- }
706
-
707
- /**
708
- * Network ViewSet: /api/networks/ Read-only access to blockchain network
709
- * information.
710
- */
711
- async networksRetrieve(id: number): Promise<Models.Network> {
712
- const response = await this.client.request('GET', `/cfg/payments/networks/${id}/`);
713
- return response;
714
- }
715
-
716
- /**
717
- * Get networks grouped by currency. GET /api/networks/by_currency/
718
- */
719
- async networksByCurrencyRetrieve(): Promise<Models.Network> {
720
- const response = await this.client.request('GET', "/cfg/payments/networks/by_currency/");
721
- return response;
722
- }
723
-
724
- /**
725
- * Health check for the ViewSet and related services. Returns service
726
- * status and basic metrics.
727
- */
728
- async networksHealthRetrieve(): Promise<Models.Network> {
729
- const response = await this.client.request('GET', "/cfg/payments/networks/health/");
730
- return response;
731
- }
732
-
733
- /**
734
- * Get statistics for the current queryset. Returns counts, aggregates, and
735
- * breakdowns.
736
- */
737
- async networksStatsRetrieve(): Promise<Models.Network> {
738
- const response = await this.client.request('GET', "/cfg/payments/networks/stats/");
739
- return response;
740
- }
741
-
742
- /**
743
- * API Keys Overview
744
- *
745
- * Get API keys overview
746
- */
747
- async overviewDashboardApiKeysOverviewRetrieve(): Promise<Models.APIKeysOverview> {
748
- const response = await this.client.request('GET', "/cfg/payments/overview/dashboard/api_keys_overview/");
749
- return response;
750
- }
751
-
752
- /**
753
- * Balance Overview
754
- *
755
- * Get user balance overview
756
- */
757
- async overviewDashboardBalanceOverviewRetrieve(): Promise<Models.BalanceOverview> {
758
- const response = await this.client.request('GET', "/cfg/payments/overview/dashboard/balance_overview/");
759
- return response;
760
- }
761
-
762
- async overviewDashboardChartDataRetrieve(period?: string): Promise<Models.PaymentsChartResponse>;
763
- async overviewDashboardChartDataRetrieve(params?: { period?: string }): Promise<Models.PaymentsChartResponse>;
764
-
765
- /**
766
- * Payments Chart Data
767
- *
768
- * Get chart data for payments visualization
769
- */
770
- async overviewDashboardChartDataRetrieve(...args: any[]): Promise<Models.PaymentsChartResponse> {
771
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
772
-
773
- let params;
774
- if (isParamsObject) {
775
- params = args[0];
776
- } else {
777
- params = { period: args[0] };
778
- }
779
- const response = await this.client.request('GET', "/cfg/payments/overview/dashboard/chart_data/", { params });
780
- return response;
781
- }
782
-
783
- /**
784
- * Payments Dashboard Metrics
785
- *
786
- * Get payments dashboard metrics including balance, subscriptions, API
787
- * keys, and payments
788
- */
789
- async overviewDashboardMetricsRetrieve(): Promise<Models.PaymentsMetrics> {
790
- const response = await this.client.request('GET', "/cfg/payments/overview/dashboard/metrics/");
791
- return response;
792
- }
793
-
794
- /**
795
- * Payments Dashboard Overview
796
- *
797
- * Get complete payments dashboard overview with metrics, recent payments,
798
- * and analytics
799
- */
800
- async overviewDashboardOverviewRetrieve(): Promise<Models.PaymentsDashboardOverview> {
801
- const response = await this.client.request('GET', "/cfg/payments/overview/dashboard/overview/");
802
- return response;
803
- }
804
-
805
- async overviewDashboardPaymentAnalyticsRetrieve(limit?: number): Promise<Models.PaymentAnalyticsResponse>;
806
- async overviewDashboardPaymentAnalyticsRetrieve(params?: { limit?: number }): Promise<Models.PaymentAnalyticsResponse>;
807
-
808
- /**
809
- * Payment Analytics
810
- *
811
- * Get analytics for payments by currency and provider
812
- */
813
- async overviewDashboardPaymentAnalyticsRetrieve(...args: any[]): Promise<Models.PaymentAnalyticsResponse> {
814
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
815
-
816
- let params;
817
- if (isParamsObject) {
818
- params = args[0];
819
- } else {
820
- params = { limit: args[0] };
821
- }
822
- const response = await this.client.request('GET', "/cfg/payments/overview/dashboard/payment_analytics/", { params });
823
- return response;
824
- }
825
-
826
- async overviewDashboardRecentPaymentsList(limit?: number, page?: number, page_size?: number): Promise<Models.PaginatedRecentPaymentList>;
827
- async overviewDashboardRecentPaymentsList(params?: { limit?: number; page?: number; page_size?: number }): Promise<Models.PaginatedRecentPaymentList>;
828
-
829
- /**
830
- * Recent Payments
831
- *
832
- * Get recent payments for the user
833
- */
834
- async overviewDashboardRecentPaymentsList(...args: any[]): Promise<Models.PaginatedRecentPaymentList> {
835
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
836
-
837
- let params;
838
- if (isParamsObject) {
839
- params = args[0];
840
- } else {
841
- params = { limit: args[0], page: args[1], page_size: args[2] };
842
- }
843
- const response = await this.client.request('GET', "/cfg/payments/overview/dashboard/recent_payments/", { params });
844
- return response;
845
- }
846
-
847
- async overviewDashboardRecentTransactionsList(limit?: number, page?: number, page_size?: number): Promise<Models.PaginatedRecentTransactionList>;
848
- async overviewDashboardRecentTransactionsList(params?: { limit?: number; page?: number; page_size?: number }): Promise<Models.PaginatedRecentTransactionList>;
849
-
850
- /**
851
- * Recent Transactions
852
- *
853
- * Get recent balance transactions for the user
854
- */
855
- async overviewDashboardRecentTransactionsList(...args: any[]): Promise<Models.PaginatedRecentTransactionList> {
856
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
857
-
858
- let params;
859
- if (isParamsObject) {
860
- params = args[0];
861
- } else {
862
- params = { limit: args[0], page: args[1], page_size: args[2] };
863
- }
864
- const response = await this.client.request('GET', "/cfg/payments/overview/dashboard/recent_transactions/", { params });
865
- return response;
866
- }
867
-
868
- /**
869
- * Subscription Overview
870
- *
871
- * Get current subscription overview
872
- */
873
- async overviewDashboardSubscriptionOverviewRetrieve(): Promise<Models.SubscriptionOverview> {
874
- const response = await this.client.request('GET', "/cfg/payments/overview/dashboard/subscription_overview/");
875
- return response;
876
- }
877
-
878
- async paymentList(currency__code?: string, ordering?: string, page?: number, page_size?: number, provider?: string, search?: string, status?: string, user?: number): Promise<Models.PaginatedPaymentListList>;
879
- async paymentList(params?: { currency__code?: string; ordering?: string; page?: number; page_size?: number; provider?: string; search?: string; status?: string; user?: number }): Promise<Models.PaginatedPaymentListList>;
880
-
881
- /**
882
- * Global payment ViewSet: /api/v1/payments/ Provides admin-level access to
883
- * all payments with filtering and stats.
884
- */
885
- async paymentList(...args: any[]): Promise<Models.PaginatedPaymentListList> {
886
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
887
-
888
- let params;
889
- if (isParamsObject) {
890
- params = args[0];
891
- } else {
892
- params = { currency__code: args[0], ordering: args[1], page: args[2], page_size: args[3], provider: args[4], search: args[5], status: args[6], user: args[7] };
893
- }
894
- const response = await this.client.request('GET', "/cfg/payments/payment/", { params });
895
- return response;
896
- }
897
-
898
- /**
899
- * Global payment ViewSet: /api/v1/payments/ Provides admin-level access to
900
- * all payments with filtering and stats.
901
- */
902
- async paymentCreate(data: Models.PaymentCreateRequest): Promise<Models.PaymentCreate> {
903
- const response = await this.client.request('POST', "/cfg/payments/payment/", { body: data });
904
- return response;
905
- }
906
-
907
- /**
908
- * Global payment ViewSet: /api/v1/payments/ Provides admin-level access to
909
- * all payments with filtering and stats.
910
- */
911
- async paymentRetrieve(id: string): Promise<Models.Payment> {
912
- const response = await this.client.request('GET', `/cfg/payments/payment/${id}/`);
913
- return response;
914
- }
915
-
916
- /**
917
- * Global payment ViewSet: /api/v1/payments/ Provides admin-level access to
918
- * all payments with filtering and stats.
919
- */
920
- async paymentUpdate(id: string, data: Models.PaymentRequest): Promise<Models.Payment> {
921
- const response = await this.client.request('PUT', `/cfg/payments/payment/${id}/`, { body: data });
922
- return response;
923
- }
924
-
925
- /**
926
- * Global payment ViewSet: /api/v1/payments/ Provides admin-level access to
927
- * all payments with filtering and stats.
928
- */
929
- async paymentPartialUpdate(id: string, data?: Models.PatchedPaymentRequest): Promise<Models.Payment> {
930
- const response = await this.client.request('PATCH', `/cfg/payments/payment/${id}/`, { body: data });
931
- return response;
932
- }
933
-
934
- /**
935
- * Global payment ViewSet: /api/v1/payments/ Provides admin-level access to
936
- * all payments with filtering and stats.
937
- */
938
- async paymentDestroy(id: string): Promise<void> {
939
- const response = await this.client.request('DELETE', `/cfg/payments/payment/${id}/`);
940
- return;
941
- }
942
-
943
- /**
944
- * Cancel payment. POST /api/v1/payments/{id}/cancel/
945
- */
946
- async paymentCancelCreate(id: string, data: Models.PaymentRequest): Promise<Models.Payment> {
947
- const response = await this.client.request('POST', `/cfg/payments/payment/${id}/cancel/`, { body: data });
948
- return response;
949
- }
950
-
951
- /**
952
- * Check payment status with provider. POST
953
- * /api/v1/payments/{id}/check_status/
954
- */
955
- async paymentCheckStatusCreate(id: string, data: Models.PaymentRequest): Promise<Models.Payment> {
956
- const response = await this.client.request('POST', `/cfg/payments/payment/${id}/check_status/`, { body: data });
957
- return response;
958
- }
959
-
960
- /**
961
- * Get payment analytics. GET /api/v1/payments/analytics/?days=30
962
- */
963
- async paymentAnalyticsRetrieve(): Promise<Models.Payment> {
964
- const response = await this.client.request('GET', "/cfg/payments/payment/analytics/");
965
- return response;
966
- }
967
-
968
- /**
969
- * Get payments grouped by provider. GET /api/v1/payments/by_provider/
970
- */
971
- async paymentByProviderRetrieve(): Promise<Models.Payment> {
972
- const response = await this.client.request('GET', "/cfg/payments/payment/by_provider/");
973
- return response;
974
- }
975
-
976
- /**
977
- * Standalone payment creation endpoint: /api/v1/payments/create/
978
- * Simplified endpoint for payment creation without full ViewSet overhead.
979
- */
980
- async paymentCreateCreate(data: Models.PaymentCreateRequest): Promise<Models.PaymentCreate> {
981
- const response = await this.client.request('POST', "/cfg/payments/payment/create/", { body: data });
982
- return response;
983
- }
984
-
985
- /**
986
- * Health check for the ViewSet and related services. Returns service
987
- * status and basic metrics.
988
- */
989
- async paymentHealthRetrieve(): Promise<Models.Payment> {
990
- const response = await this.client.request('GET', "/cfg/payments/payment/health/");
991
- return response;
992
- }
993
-
994
- /**
995
- * Get statistics for the current queryset. Returns counts, aggregates, and
996
- * breakdowns.
997
- */
998
- async paymentStatsRetrieve(): Promise<Models.Payment> {
999
- const response = await this.client.request('GET', "/cfg/payments/payment/stats/");
1000
- return response;
1001
- }
1002
-
1003
- /**
1004
- * Standalone payment status endpoint: /api/v1/payments/{id}/status/ Quick
1005
- * status check without full ViewSet overhead.
1006
- */
1007
- async paymentStatusRetrieve(id: string): Promise<Models.Payment> {
1008
- const response = await this.client.request('GET', `/cfg/payments/payment/status/${id}/`);
1009
- return response;
1010
- }
1011
-
1012
- async providerCurrenciesList(currency__code?: string, is_enabled?: boolean, network__code?: string, ordering?: string, page?: number, page_size?: number, provider?: string, search?: string): Promise<Models.PaginatedProviderCurrencyList>;
1013
- async providerCurrenciesList(params?: { currency__code?: string; is_enabled?: boolean; network__code?: string; ordering?: string; page?: number; page_size?: number; provider?: string; search?: string }): Promise<Models.PaginatedProviderCurrencyList>;
1014
-
1015
- /**
1016
- * Provider Currency ViewSet: /api/provider-currencies/ Read-only access to
1017
- * provider-specific currency information.
1018
- */
1019
- async providerCurrenciesList(...args: any[]): Promise<Models.PaginatedProviderCurrencyList> {
1020
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
1021
-
1022
- let params;
1023
- if (isParamsObject) {
1024
- params = args[0];
1025
- } else {
1026
- params = { currency__code: args[0], is_enabled: args[1], network__code: args[2], ordering: args[3], page: args[4], page_size: args[5], provider: args[6], search: args[7] };
1027
- }
1028
- const response = await this.client.request('GET', "/cfg/payments/provider-currencies/", { params });
1029
- return response;
1030
- }
1031
-
1032
- /**
1033
- * Provider Currency ViewSet: /api/provider-currencies/ Read-only access to
1034
- * provider-specific currency information.
1035
- */
1036
- async providerCurrenciesRetrieve(id: number): Promise<Models.ProviderCurrency> {
1037
- const response = await this.client.request('GET', `/cfg/payments/provider-currencies/${id}/`);
1038
- return response;
1039
- }
1040
-
1041
- async providerCurrenciesByProviderRetrieve(provider?: string): Promise<Models.ProviderCurrency>;
1042
- async providerCurrenciesByProviderRetrieve(params?: { provider?: string }): Promise<Models.ProviderCurrency>;
1043
-
1044
- /**
1045
- * Get provider currencies grouped by provider
1046
- *
1047
- * Get provider currencies grouped by provider
1048
- */
1049
- async providerCurrenciesByProviderRetrieve(...args: any[]): Promise<Models.ProviderCurrency> {
1050
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
1051
-
1052
- let params;
1053
- if (isParamsObject) {
1054
- params = args[0];
1055
- } else {
1056
- params = { provider: args[0] };
1057
- }
1058
- const response = await this.client.request('GET', "/cfg/payments/provider-currencies/by_provider/", { params });
1059
- return response;
1060
- }
1061
-
1062
- /**
1063
- * Health check for the ViewSet and related services. Returns service
1064
- * status and basic metrics.
1065
- */
1066
- async providerCurrenciesHealthRetrieve(): Promise<Models.ProviderCurrency> {
1067
- const response = await this.client.request('GET', "/cfg/payments/provider-currencies/health/");
1068
- return response;
1069
- }
1070
-
1071
- /**
1072
- * Get currency limits by provider. GET
1073
- * /api/provider-currencies/limits/?provider=nowpayments
1074
- */
1075
- async providerCurrenciesLimitsRetrieve(): Promise<Models.ProviderCurrency> {
1076
- const response = await this.client.request('GET', "/cfg/payments/provider-currencies/limits/");
1077
- return response;
1078
- }
1079
-
1080
- /**
1081
- * Get statistics for the current queryset. Returns counts, aggregates, and
1082
- * breakdowns.
1083
- */
1084
- async providerCurrenciesStatsRetrieve(): Promise<Models.ProviderCurrency> {
1085
- const response = await this.client.request('GET', "/cfg/payments/provider-currencies/stats/");
1086
- return response;
1087
- }
1088
-
1089
- async subscriptionsList(ordering?: string, page?: number, page_size?: number, search?: string, status?: string, tier?: string, user?: number): Promise<Models.PaginatedSubscriptionListList>;
1090
- async subscriptionsList(params?: { ordering?: string; page?: number; page_size?: number; search?: string; status?: string; tier?: string; user?: number }): Promise<Models.PaginatedSubscriptionListList>;
1091
-
1092
- /**
1093
- * Global subscription ViewSet: /api/subscriptions/ Provides admin-level
1094
- * access to all subscriptions with filtering and stats.
1095
- */
1096
- async subscriptionsList(...args: any[]): Promise<Models.PaginatedSubscriptionListList> {
1097
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
1098
-
1099
- let params;
1100
- if (isParamsObject) {
1101
- params = args[0];
1102
- } else {
1103
- params = { ordering: args[0], page: args[1], page_size: args[2], search: args[3], status: args[4], tier: args[5], user: args[6] };
1104
- }
1105
- const response = await this.client.request('GET', "/cfg/payments/subscriptions/", { params });
1106
- return response;
1107
- }
1108
-
1109
- /**
1110
- * Global subscription ViewSet: /api/subscriptions/ Provides admin-level
1111
- * access to all subscriptions with filtering and stats.
1112
- */
1113
- async subscriptionsCreate(data: Models.SubscriptionCreateRequest): Promise<Models.SubscriptionCreate> {
1114
- const response = await this.client.request('POST', "/cfg/payments/subscriptions/", { body: data });
1115
- return response;
1116
- }
1117
-
1118
- /**
1119
- * Global subscription ViewSet: /api/subscriptions/ Provides admin-level
1120
- * access to all subscriptions with filtering and stats.
1121
- */
1122
- async subscriptionsRetrieve(id: string): Promise<Models.Subscription> {
1123
- const response = await this.client.request('GET', `/cfg/payments/subscriptions/${id}/`);
1124
- return response;
1125
- }
1126
-
1127
- /**
1128
- * Global subscription ViewSet: /api/subscriptions/ Provides admin-level
1129
- * access to all subscriptions with filtering and stats.
1130
- */
1131
- async subscriptionsUpdate(id: string, data: Models.SubscriptionRequest): Promise<Models.Subscription> {
1132
- const response = await this.client.request('PUT', `/cfg/payments/subscriptions/${id}/`, { body: data });
1133
- return response;
1134
- }
1135
-
1136
- /**
1137
- * Global subscription ViewSet: /api/subscriptions/ Provides admin-level
1138
- * access to all subscriptions with filtering and stats.
1139
- */
1140
- async subscriptionsPartialUpdate(id: string, data?: Models.PatchedSubscriptionRequest): Promise<Models.Subscription> {
1141
- const response = await this.client.request('PATCH', `/cfg/payments/subscriptions/${id}/`, { body: data });
1142
- return response;
1143
- }
1144
-
1145
- /**
1146
- * Global subscription ViewSet: /api/subscriptions/ Provides admin-level
1147
- * access to all subscriptions with filtering and stats.
1148
- */
1149
- async subscriptionsDestroy(id: string): Promise<void> {
1150
- const response = await this.client.request('DELETE', `/cfg/payments/subscriptions/${id}/`);
1151
- return;
1152
- }
1153
-
1154
- /**
1155
- * Increment subscription usage. POST
1156
- * /api/subscriptions/{id}/increment_usage/
1157
- */
1158
- async subscriptionsIncrementUsageCreate(id: string, data: Models.SubscriptionRequest): Promise<Models.Subscription> {
1159
- const response = await this.client.request('POST', `/cfg/payments/subscriptions/${id}/increment_usage/`, { body: data });
1160
- return response;
1161
- }
1162
-
1163
- /**
1164
- * Update subscription status. POST /api/subscriptions/{id}/update_status/
1165
- */
1166
- async subscriptionsUpdateStatusCreate(id: string, data: Models.SubscriptionRequest): Promise<Models.Subscription> {
1167
- const response = await this.client.request('POST', `/cfg/payments/subscriptions/${id}/update_status/`, { body: data });
1168
- return response;
1169
- }
1170
-
1171
- /**
1172
- * Get subscription analytics. GET /api/subscriptions/analytics/?days=30
1173
- */
1174
- async subscriptionsAnalyticsRetrieve(): Promise<Models.Subscription> {
1175
- const response = await this.client.request('GET', "/cfg/payments/subscriptions/analytics/");
1176
- return response;
1177
- }
1178
-
1179
- /**
1180
- * Get subscriptions grouped by status. GET /api/subscriptions/by_status/
1181
- */
1182
- async subscriptionsByStatusRetrieve(): Promise<Models.Subscription> {
1183
- const response = await this.client.request('GET', "/cfg/payments/subscriptions/by_status/");
1184
- return response;
1185
- }
1186
-
1187
- /**
1188
- * Get subscriptions grouped by tier. GET /api/subscriptions/by_tier/
1189
- */
1190
- async subscriptionsByTierRetrieve(): Promise<Models.Subscription> {
1191
- const response = await this.client.request('GET', "/cfg/payments/subscriptions/by_tier/");
1192
- return response;
1193
- }
1194
-
1195
- /**
1196
- * Health check for the ViewSet and related services. Returns service
1197
- * status and basic metrics.
1198
- */
1199
- async subscriptionsHealthRetrieve(): Promise<Models.Subscription> {
1200
- const response = await this.client.request('GET', "/cfg/payments/subscriptions/health/");
1201
- return response;
1202
- }
1203
-
1204
- /**
1205
- * Get statistics for the current queryset. Returns counts, aggregates, and
1206
- * breakdowns.
1207
- */
1208
- async subscriptionsStatsRetrieve(): Promise<Models.Subscription> {
1209
- const response = await this.client.request('GET', "/cfg/payments/subscriptions/stats/");
1210
- return response;
1211
- }
1212
-
1213
- async tariffsList(is_active?: boolean, ordering?: string, page?: number, page_size?: number, search?: string): Promise<Models.PaginatedTariffList>;
1214
- async tariffsList(params?: { is_active?: boolean; ordering?: string; page?: number; page_size?: number; search?: string }): Promise<Models.PaginatedTariffList>;
1215
-
1216
- /**
1217
- * Tariff ViewSet: /api/tariffs/ Read-only access to tariff information for
1218
- * subscription selection.
1219
- */
1220
- async tariffsList(...args: any[]): Promise<Models.PaginatedTariffList> {
1221
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
1222
-
1223
- let params;
1224
- if (isParamsObject) {
1225
- params = args[0];
1226
- } else {
1227
- params = { is_active: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4] };
1228
- }
1229
- const response = await this.client.request('GET', "/cfg/payments/tariffs/", { params });
1230
- return response;
1231
- }
1232
-
1233
- /**
1234
- * Tariff ViewSet: /api/tariffs/ Read-only access to tariff information for
1235
- * subscription selection.
1236
- */
1237
- async tariffsRetrieve(id: number): Promise<Models.Tariff> {
1238
- const response = await this.client.request('GET', `/cfg/payments/tariffs/${id}/`);
1239
- return response;
1240
- }
1241
-
1242
- /**
1243
- * Get endpoint groups for specific tariff. GET
1244
- * /api/tariffs/{id}/endpoint_groups/
1245
- */
1246
- async tariffsEndpointGroupsRetrieve(id: number): Promise<Models.Tariff> {
1247
- const response = await this.client.request('GET', `/cfg/payments/tariffs/${id}/endpoint_groups/`);
1248
- return response;
1249
- }
1250
-
1251
- /**
1252
- * Get free tariffs. GET /api/tariffs/free/
1253
- */
1254
- async tariffsFreeRetrieve(): Promise<Models.Tariff> {
1255
- const response = await this.client.request('GET', "/cfg/payments/tariffs/free/");
1256
- return response;
1257
- }
1258
-
1259
- /**
1260
- * Health check for the ViewSet and related services. Returns service
1261
- * status and basic metrics.
1262
- */
1263
- async tariffsHealthRetrieve(): Promise<Models.Tariff> {
1264
- const response = await this.client.request('GET', "/cfg/payments/tariffs/health/");
1265
- return response;
1266
- }
1267
-
1268
- /**
1269
- * Get paid tariffs. GET /api/tariffs/paid/
1270
- */
1271
- async tariffsPaidRetrieve(): Promise<Models.Tariff> {
1272
- const response = await this.client.request('GET', "/cfg/payments/tariffs/paid/");
1273
- return response;
1274
- }
1275
-
1276
- /**
1277
- * Get statistics for the current queryset. Returns counts, aggregates, and
1278
- * breakdowns.
1279
- */
1280
- async tariffsStatsRetrieve(): Promise<Models.Tariff> {
1281
- const response = await this.client.request('GET', "/cfg/payments/tariffs/stats/");
1282
- return response;
1283
- }
1284
-
1285
- async transactionsList(ordering?: string, page?: number, page_size?: number, payment_id?: string, search?: string, transaction_type?: string, user?: number): Promise<Models.PaginatedTransactionList>;
1286
- async transactionsList(params?: { ordering?: string; page?: number; page_size?: number; payment_id?: string; search?: string; transaction_type?: string; user?: number }): Promise<Models.PaginatedTransactionList>;
1287
-
1288
- /**
1289
- * Transaction ViewSet: /api/transactions/ Read-only access to transaction
1290
- * history with filtering.
1291
- */
1292
- async transactionsList(...args: any[]): Promise<Models.PaginatedTransactionList> {
1293
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
1294
-
1295
- let params;
1296
- if (isParamsObject) {
1297
- params = args[0];
1298
- } else {
1299
- params = { ordering: args[0], page: args[1], page_size: args[2], payment_id: args[3], search: args[4], transaction_type: args[5], user: args[6] };
1300
- }
1301
- const response = await this.client.request('GET', "/cfg/payments/transactions/", { params });
1302
- return response;
1303
- }
1304
-
1305
- /**
1306
- * Transaction ViewSet: /api/transactions/ Read-only access to transaction
1307
- * history with filtering.
1308
- */
1309
- async transactionsRetrieve(id: string): Promise<Models.Transaction> {
1310
- const response = await this.client.request('GET', `/cfg/payments/transactions/${id}/`);
1311
- return response;
1312
- }
1313
-
1314
- /**
1315
- * Get transactions grouped by type. GET /api/transactions/by_type/
1316
- */
1317
- async transactionsByTypeRetrieve(): Promise<Models.Transaction> {
1318
- const response = await this.client.request('GET', "/cfg/payments/transactions/by_type/");
1319
- return response;
1320
- }
1321
-
1322
- /**
1323
- * Health check for the ViewSet and related services. Returns service
1324
- * status and basic metrics.
1325
- */
1326
- async transactionsHealthRetrieve(): Promise<Models.Transaction> {
1327
- const response = await this.client.request('GET', "/cfg/payments/transactions/health/");
1328
- return response;
1329
- }
1330
-
1331
- /**
1332
- * Get recent transactions. GET /api/transactions/recent/?limit=10
1333
- */
1334
- async transactionsRecentRetrieve(): Promise<Models.Transaction> {
1335
- const response = await this.client.request('GET', "/cfg/payments/transactions/recent/");
1336
- return response;
1337
- }
1338
-
1339
- /**
1340
- * Get statistics for the current queryset. Returns counts, aggregates, and
1341
- * breakdowns.
1342
- */
1343
- async transactionsStatsRetrieve(): Promise<Models.Transaction> {
1344
- const response = await this.client.request('GET', "/cfg/payments/transactions/stats/");
1345
- return response;
1346
- }
1347
-
1348
- async usersList(currency__code?: string, ordering?: string, page?: number, page_size?: number, provider?: string, search?: string, status?: string): Promise<Models.PaginatedPaymentListList>;
1349
- async usersList(params?: { currency__code?: string; ordering?: string; page?: number; page_size?: number; provider?: string; search?: string; status?: string }): Promise<Models.PaginatedPaymentListList>;
1350
-
1351
- /**
1352
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1353
- * Provides user-scoped access to payments with full CRUD operations.
1354
- */
1355
- async usersList(...args: any[]): Promise<Models.PaginatedPaymentListList> {
1356
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
1357
-
1358
- let params;
1359
- if (isParamsObject) {
1360
- params = args[0];
1361
- } else {
1362
- params = { currency__code: args[0], ordering: args[1], page: args[2], page_size: args[3], provider: args[4], search: args[5], status: args[6] };
1363
- }
1364
- const response = await this.client.request('GET', "/cfg/payments/users/", { params });
1365
- return response;
1366
- }
1367
-
1368
- /**
1369
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1370
- * Provides user-scoped access to payments with full CRUD operations.
1371
- */
1372
- async usersCreate(data: Models.PaymentCreateRequest): Promise<Models.PaymentCreate> {
1373
- const response = await this.client.request('POST', "/cfg/payments/users/", { body: data });
1374
- return response;
1375
- }
1376
-
1377
- /**
1378
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1379
- * Provides user-scoped access to payments with full CRUD operations.
1380
- */
1381
- async usersRetrieve(id: string): Promise<Models.Payment> {
1382
- const response = await this.client.request('GET', `/cfg/payments/users/${id}/`);
1383
- return response;
1384
- }
1385
-
1386
- /**
1387
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1388
- * Provides user-scoped access to payments with full CRUD operations.
1389
- */
1390
- async usersUpdate(id: string, data: Models.PaymentRequest): Promise<Models.Payment> {
1391
- const response = await this.client.request('PUT', `/cfg/payments/users/${id}/`, { body: data });
1392
- return response;
1393
- }
1394
-
1395
- /**
1396
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1397
- * Provides user-scoped access to payments with full CRUD operations.
1398
- */
1399
- async usersPartialUpdate(id: string, data?: Models.PatchedPaymentRequest): Promise<Models.Payment> {
1400
- const response = await this.client.request('PATCH', `/cfg/payments/users/${id}/`, { body: data });
1401
- return response;
1402
- }
1403
-
1404
- /**
1405
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1406
- * Provides user-scoped access to payments with full CRUD operations.
1407
- */
1408
- async usersDestroy(id: string): Promise<void> {
1409
- const response = await this.client.request('DELETE', `/cfg/payments/users/${id}/`);
1410
- return;
1411
- }
1412
-
1413
- /**
1414
- * Cancel payment. POST /api/v1/users/{user_id}/payments/{id}/cancel/
1415
- */
1416
- async usersCancelCreate(id: string, data: Models.PaymentRequest): Promise<Models.Payment> {
1417
- const response = await this.client.request('POST', `/cfg/payments/users/${id}/cancel/`, { body: data });
1418
- return response;
1419
- }
1420
-
1421
- /**
1422
- * Check payment status with provider. POST
1423
- * /api/v1/users/{user_id}/payments/{id}/check_status/
1424
- */
1425
- async usersCheckStatusCreate(id: string, data: Models.PaymentRequest): Promise<Models.Payment> {
1426
- const response = await this.client.request('POST', `/cfg/payments/users/${id}/check_status/`, { body: data });
1427
- return response;
1428
- }
1429
-
1430
- async usersApiKeysList(user_pk: number, is_active?: boolean, ordering?: string, page?: number, page_size?: number, search?: string): Promise<Models.PaginatedAPIKeyListList>;
1431
- async usersApiKeysList(user_pk: number, params?: { is_active?: boolean; ordering?: string; page?: number; page_size?: number; search?: string }): Promise<Models.PaginatedAPIKeyListList>;
1432
-
1433
- /**
1434
- * User-specific API Key ViewSet: /api/users/{user_id}/api-keys/ Provides
1435
- * user-scoped access to API keys with full CRUD operations.
1436
- */
1437
- async usersApiKeysList(...args: any[]): Promise<Models.PaginatedAPIKeyListList> {
1438
- const user_pk = args[0];
1439
- const isParamsObject = args.length === 2 && typeof args[1] === 'object' && args[1] !== null && !Array.isArray(args[1]);
1440
-
1441
- let params;
1442
- if (isParamsObject) {
1443
- params = args[1];
1444
- } else {
1445
- params = { is_active: args[1], ordering: args[2], page: args[3], page_size: args[4], search: args[5] };
1446
- }
1447
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/api-keys/`, { params });
1448
- return response;
1449
- }
1450
-
1451
- /**
1452
- * User-specific API Key ViewSet: /api/users/{user_id}/api-keys/ Provides
1453
- * user-scoped access to API keys with full CRUD operations.
1454
- */
1455
- async usersApiKeysCreate(user_pk: number, data: Models.APIKeyCreateRequest): Promise<Models.APIKeyCreate> {
1456
- const response = await this.client.request('POST', `/cfg/payments/users/${user_pk}/api-keys/`, { body: data });
1457
- return response;
1458
- }
1459
-
1460
- /**
1461
- * User-specific API Key ViewSet: /api/users/{user_id}/api-keys/ Provides
1462
- * user-scoped access to API keys with full CRUD operations.
1463
- */
1464
- async usersApiKeysRetrieve(id: string, user_pk: number): Promise<Models.APIKeyDetail> {
1465
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/api-keys/${id}/`);
1466
- return response;
1467
- }
1468
-
1469
- /**
1470
- * User-specific API Key ViewSet: /api/users/{user_id}/api-keys/ Provides
1471
- * user-scoped access to API keys with full CRUD operations.
1472
- */
1473
- async usersApiKeysUpdate(id: string, user_pk: number, data: Models.APIKeyUpdateRequest): Promise<Models.APIKeyUpdate> {
1474
- const response = await this.client.request('PUT', `/cfg/payments/users/${user_pk}/api-keys/${id}/`, { body: data });
1475
- return response;
1476
- }
1477
-
1478
- /**
1479
- * User-specific API Key ViewSet: /api/users/{user_id}/api-keys/ Provides
1480
- * user-scoped access to API keys with full CRUD operations.
1481
- */
1482
- async usersApiKeysPartialUpdate(id: string, user_pk: number, data?: Models.PatchedAPIKeyUpdateRequest): Promise<Models.APIKeyUpdate> {
1483
- const response = await this.client.request('PATCH', `/cfg/payments/users/${user_pk}/api-keys/${id}/`, { body: data });
1484
- return response;
1485
- }
1486
-
1487
- /**
1488
- * User-specific API Key ViewSet: /api/users/{user_id}/api-keys/ Provides
1489
- * user-scoped access to API keys with full CRUD operations.
1490
- */
1491
- async usersApiKeysDestroy(id: string, user_pk: number): Promise<void> {
1492
- const response = await this.client.request('DELETE', `/cfg/payments/users/${user_pk}/api-keys/${id}/`);
1493
- return;
1494
- }
1495
-
1496
- /**
1497
- * Perform action on API key. POST
1498
- * /api/users/{user_id}/api-keys/{id}/perform_action/
1499
- */
1500
- async usersApiKeysPerformActionCreate(id: string, user_pk: number): Promise<Models.APIKeyDetail> {
1501
- const response = await this.client.request('POST', `/cfg/payments/users/${user_pk}/api-keys/${id}/perform_action/`);
1502
- return response;
1503
- }
1504
-
1505
- /**
1506
- * Get user's active API keys. GET /api/users/{user_id}/api-keys/active/
1507
- */
1508
- async usersApiKeysActiveRetrieve(user_pk: number): Promise<Models.APIKeyDetail> {
1509
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/api-keys/active/`);
1510
- return response;
1511
- }
1512
-
1513
- /**
1514
- * Health check for the ViewSet and related services. Returns service
1515
- * status and basic metrics.
1516
- */
1517
- async usersApiKeysHealthRetrieve(user_pk: number): Promise<Models.APIKeyDetail> {
1518
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/api-keys/health/`);
1519
- return response;
1520
- }
1521
-
1522
- /**
1523
- * Get statistics for the current queryset. Returns counts, aggregates, and
1524
- * breakdowns.
1525
- */
1526
- async usersApiKeysStatsRetrieve(user_pk: number): Promise<Models.APIKeyDetail> {
1527
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/api-keys/stats/`);
1528
- return response;
1529
- }
1530
-
1531
- /**
1532
- * Get user API key summary. GET /api/users/{user_id}/api-keys/summary/
1533
- */
1534
- async usersApiKeysSummaryRetrieve(user_pk: number): Promise<Models.APIKeyDetail> {
1535
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/api-keys/summary/`);
1536
- return response;
1537
- }
1538
-
1539
- async usersPaymentList(user_pk: number, currency__code?: string, ordering?: string, page?: number, page_size?: number, provider?: string, search?: string, status?: string): Promise<Models.PaginatedPaymentListList>;
1540
- async usersPaymentList(user_pk: number, params?: { currency__code?: string; ordering?: string; page?: number; page_size?: number; provider?: string; search?: string; status?: string }): Promise<Models.PaginatedPaymentListList>;
1541
-
1542
- /**
1543
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1544
- * Provides user-scoped access to payments with full CRUD operations.
1545
- */
1546
- async usersPaymentList(...args: any[]): Promise<Models.PaginatedPaymentListList> {
1547
- const user_pk = args[0];
1548
- const isParamsObject = args.length === 2 && typeof args[1] === 'object' && args[1] !== null && !Array.isArray(args[1]);
1549
-
1550
- let params;
1551
- if (isParamsObject) {
1552
- params = args[1];
1553
- } else {
1554
- params = { currency__code: args[1], ordering: args[2], page: args[3], page_size: args[4], provider: args[5], search: args[6], status: args[7] };
1555
- }
1556
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/payment/`, { params });
1557
- return response;
1558
- }
1559
-
1560
- /**
1561
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1562
- * Provides user-scoped access to payments with full CRUD operations.
1563
- */
1564
- async usersPaymentCreate(user_pk: number, data: Models.PaymentCreateRequest): Promise<Models.PaymentCreate> {
1565
- const response = await this.client.request('POST', `/cfg/payments/users/${user_pk}/payment/`, { body: data });
1566
- return response;
1567
- }
1568
-
1569
- /**
1570
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1571
- * Provides user-scoped access to payments with full CRUD operations.
1572
- */
1573
- async usersPaymentRetrieve(id: string, user_pk: number): Promise<Models.Payment> {
1574
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/payment/${id}/`);
1575
- return response;
1576
- }
1577
-
1578
- /**
1579
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1580
- * Provides user-scoped access to payments with full CRUD operations.
1581
- */
1582
- async usersPaymentUpdate(id: string, user_pk: number, data: Models.PaymentRequest): Promise<Models.Payment> {
1583
- const response = await this.client.request('PUT', `/cfg/payments/users/${user_pk}/payment/${id}/`, { body: data });
1584
- return response;
1585
- }
1586
-
1587
- /**
1588
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1589
- * Provides user-scoped access to payments with full CRUD operations.
1590
- */
1591
- async usersPaymentPartialUpdate(id: string, user_pk: number, data?: Models.PatchedPaymentRequest): Promise<Models.Payment> {
1592
- const response = await this.client.request('PATCH', `/cfg/payments/users/${user_pk}/payment/${id}/`, { body: data });
1593
- return response;
1594
- }
1595
-
1596
- /**
1597
- * User-specific payment ViewSet: /api/v1/users/{user_id}/payments/
1598
- * Provides user-scoped access to payments with full CRUD operations.
1599
- */
1600
- async usersPaymentDestroy(id: string, user_pk: number): Promise<void> {
1601
- const response = await this.client.request('DELETE', `/cfg/payments/users/${user_pk}/payment/${id}/`);
1602
- return;
1603
- }
1604
-
1605
- /**
1606
- * Cancel payment. POST /api/v1/users/{user_id}/payments/{id}/cancel/
1607
- */
1608
- async usersPaymentCancelCreate(id: string, user_pk: number, data: Models.PaymentRequest): Promise<Models.Payment> {
1609
- const response = await this.client.request('POST', `/cfg/payments/users/${user_pk}/payment/${id}/cancel/`, { body: data });
1610
- return response;
1611
- }
1612
-
1613
- /**
1614
- * Check payment status with provider. POST
1615
- * /api/v1/users/{user_id}/payments/{id}/check_status/
1616
- */
1617
- async usersPaymentCheckStatusCreate(id: string, user_pk: number, data: Models.PaymentRequest): Promise<Models.Payment> {
1618
- const response = await this.client.request('POST', `/cfg/payments/users/${user_pk}/payment/${id}/check_status/`, { body: data });
1619
- return response;
1620
- }
1621
-
1622
- /**
1623
- * Health check for the ViewSet and related services. Returns service
1624
- * status and basic metrics.
1625
- */
1626
- async usersPaymentHealthRetrieve(user_pk: number): Promise<Models.Payment> {
1627
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/payment/health/`);
1628
- return response;
1629
- }
1630
-
1631
- /**
1632
- * Get statistics for the current queryset. Returns counts, aggregates, and
1633
- * breakdowns.
1634
- */
1635
- async usersPaymentStatsRetrieve(user_pk: number): Promise<Models.Payment> {
1636
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/payment/stats/`);
1637
- return response;
1638
- }
1639
-
1640
- /**
1641
- * Get user payment summary. GET /api/v1/users/{user_id}/payments/summary/
1642
- */
1643
- async usersPaymentSummaryRetrieve(user_pk: number): Promise<Models.Payment> {
1644
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/payment/summary/`);
1645
- return response;
1646
- }
1647
-
1648
- async usersSubscriptionsList(user_pk: number, ordering?: string, page?: number, page_size?: number, search?: string, status?: string, tier?: string): Promise<Models.PaginatedSubscriptionListList>;
1649
- async usersSubscriptionsList(user_pk: number, params?: { ordering?: string; page?: number; page_size?: number; search?: string; status?: string; tier?: string }): Promise<Models.PaginatedSubscriptionListList>;
1650
-
1651
- /**
1652
- * User-specific subscription ViewSet: /api/users/{user_id}/subscriptions/
1653
- * Provides user-scoped access to subscriptions with full CRUD operations.
1654
- */
1655
- async usersSubscriptionsList(...args: any[]): Promise<Models.PaginatedSubscriptionListList> {
1656
- const user_pk = args[0];
1657
- const isParamsObject = args.length === 2 && typeof args[1] === 'object' && args[1] !== null && !Array.isArray(args[1]);
1658
-
1659
- let params;
1660
- if (isParamsObject) {
1661
- params = args[1];
1662
- } else {
1663
- params = { ordering: args[1], page: args[2], page_size: args[3], search: args[4], status: args[5], tier: args[6] };
1664
- }
1665
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/subscriptions/`, { params });
1666
- return response;
1667
- }
1668
-
1669
- /**
1670
- * User-specific subscription ViewSet: /api/users/{user_id}/subscriptions/
1671
- * Provides user-scoped access to subscriptions with full CRUD operations.
1672
- */
1673
- async usersSubscriptionsCreate(user_pk: number, data: Models.SubscriptionCreateRequest): Promise<Models.SubscriptionCreate> {
1674
- const response = await this.client.request('POST', `/cfg/payments/users/${user_pk}/subscriptions/`, { body: data });
1675
- return response;
1676
- }
1677
-
1678
- /**
1679
- * User-specific subscription ViewSet: /api/users/{user_id}/subscriptions/
1680
- * Provides user-scoped access to subscriptions with full CRUD operations.
1681
- */
1682
- async usersSubscriptionsRetrieve(id: string, user_pk: number): Promise<Models.Subscription> {
1683
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/subscriptions/${id}/`);
1684
- return response;
1685
- }
1686
-
1687
- /**
1688
- * User-specific subscription ViewSet: /api/users/{user_id}/subscriptions/
1689
- * Provides user-scoped access to subscriptions with full CRUD operations.
1690
- */
1691
- async usersSubscriptionsUpdate(id: string, user_pk: number, data: Models.SubscriptionRequest): Promise<Models.Subscription> {
1692
- const response = await this.client.request('PUT', `/cfg/payments/users/${user_pk}/subscriptions/${id}/`, { body: data });
1693
- return response;
1694
- }
1695
-
1696
- /**
1697
- * User-specific subscription ViewSet: /api/users/{user_id}/subscriptions/
1698
- * Provides user-scoped access to subscriptions with full CRUD operations.
1699
- */
1700
- async usersSubscriptionsPartialUpdate(id: string, user_pk: number, data?: Models.PatchedSubscriptionRequest): Promise<Models.Subscription> {
1701
- const response = await this.client.request('PATCH', `/cfg/payments/users/${user_pk}/subscriptions/${id}/`, { body: data });
1702
- return response;
1703
- }
1704
-
1705
- /**
1706
- * User-specific subscription ViewSet: /api/users/{user_id}/subscriptions/
1707
- * Provides user-scoped access to subscriptions with full CRUD operations.
1708
- */
1709
- async usersSubscriptionsDestroy(id: string, user_pk: number): Promise<void> {
1710
- const response = await this.client.request('DELETE', `/cfg/payments/users/${user_pk}/subscriptions/${id}/`);
1711
- return;
1712
- }
1713
-
1714
- /**
1715
- * Increment subscription usage. POST
1716
- * /api/users/{user_id}/subscriptions/{id}/increment_usage/
1717
- */
1718
- async usersSubscriptionsIncrementUsageCreate(id: string, user_pk: number, data: Models.SubscriptionRequest): Promise<Models.Subscription> {
1719
- const response = await this.client.request('POST', `/cfg/payments/users/${user_pk}/subscriptions/${id}/increment_usage/`, { body: data });
1720
- return response;
1721
- }
1722
-
1723
- /**
1724
- * Update subscription status. POST
1725
- * /api/users/{user_id}/subscriptions/{id}/update_status/
1726
- */
1727
- async usersSubscriptionsUpdateStatusCreate(id: string, user_pk: number, data: Models.SubscriptionRequest): Promise<Models.Subscription> {
1728
- const response = await this.client.request('POST', `/cfg/payments/users/${user_pk}/subscriptions/${id}/update_status/`, { body: data });
1729
- return response;
1730
- }
1731
-
1732
- /**
1733
- * Get user's active subscription. GET
1734
- * /api/users/{user_id}/subscriptions/active/
1735
- */
1736
- async usersSubscriptionsActiveRetrieve(user_pk: number): Promise<Models.Subscription> {
1737
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/subscriptions/active/`);
1738
- return response;
1739
- }
1740
-
1741
- /**
1742
- * Health check for the ViewSet and related services. Returns service
1743
- * status and basic metrics.
1744
- */
1745
- async usersSubscriptionsHealthRetrieve(user_pk: number): Promise<Models.Subscription> {
1746
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/subscriptions/health/`);
1747
- return response;
1748
- }
1749
-
1750
- /**
1751
- * Get statistics for the current queryset. Returns counts, aggregates, and
1752
- * breakdowns.
1753
- */
1754
- async usersSubscriptionsStatsRetrieve(user_pk: number): Promise<Models.Subscription> {
1755
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/subscriptions/stats/`);
1756
- return response;
1757
- }
1758
-
1759
- /**
1760
- * Get user subscription summary. GET
1761
- * /api/users/{user_id}/subscriptions/summary/
1762
- */
1763
- async usersSubscriptionsSummaryRetrieve(user_pk: number): Promise<Models.Subscription> {
1764
- const response = await this.client.request('GET', `/cfg/payments/users/${user_pk}/subscriptions/summary/`);
1765
- return response;
1766
- }
1767
-
1768
- /**
1769
- * Health check for the ViewSet and related services. Returns service
1770
- * status and basic metrics.
1771
- */
1772
- async usersHealthRetrieve(): Promise<Models.Payment> {
1773
- const response = await this.client.request('GET', "/cfg/payments/users/health/");
1774
- return response;
1775
- }
1776
-
1777
- /**
1778
- * Get statistics for the current queryset. Returns counts, aggregates, and
1779
- * breakdowns.
85
+ * POST /api/v1/payments/create/ Create new payment. Request body: {
86
+ * "amount_usd": "100.00", "currency_code": "USDTTRC20", "description":
87
+ * "Optional description" }
1780
88
  */
1781
- async usersStatsRetrieve(): Promise<Models.Payment> {
1782
- const response = await this.client.request('GET', "/cfg/payments/users/stats/");
89
+ async paymentsCreateCreate(): Promise<Models.PaymentList> {
90
+ const response = await this.client.request('POST', "/cfg/payments/payments/create/");
1783
91
  return response;
1784
92
  }
1785
93
 
1786
94
  /**
1787
- * Get user payment summary. GET /api/v1/users/{user_id}/payments/summary/
95
+ * Get user transactions with pagination.
1788
96
  */
1789
- async usersSummaryRetrieve(): Promise<Models.Payment> {
1790
- const response = await this.client.request('GET', "/cfg/payments/users/summary/");
97
+ async transactionsRetrieve(): Promise<any> {
98
+ const response = await this.client.request('GET', "/cfg/payments/transactions/");
1791
99
  return response;
1792
100
  }
1793
101