@djangocfg/api 1.0.3 → 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.
- package/dist/index.cjs +16105 -33860
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15267 -34486
- package/dist/index.d.ts +15267 -34486
- package/dist/index.mjs +15970 -33847
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/contexts/payments/ApiKeysContext.tsx +21 -58
- package/src/cfg/contexts/payments/BalancesContext.tsx +19 -72
- package/src/cfg/contexts/payments/CurrenciesContext.tsx +5 -18
- package/src/cfg/contexts/payments/OverviewContext.tsx +78 -124
- package/src/cfg/contexts/payments/PaymentsContext.tsx +37 -36
- package/src/cfg/contexts/payments/RootPaymentsContext.tsx +7 -76
- package/src/cfg/contexts/payments/index.ts +5 -24
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +38 -2380
- package/src/cfg/generated/_utils/fetchers/index.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__payments.ts +41 -2615
- package/src/cfg/generated/_utils/hooks/index.ts +0 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItem.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunk.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunkDetail.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunkRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemDetail.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ChatMessage.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/ChatSession.schema.ts +3 -3
- package/src/cfg/generated/_utils/schemas/ChatSessionRequest.schema.ts +3 -3
- package/src/cfg/generated/_utils/schemas/Document.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/DocumentRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PatchedArchiveItemRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PatchedChatSessionRequest.schema.ts +3 -3
- package/src/cfg/generated/_utils/schemas/PatchedDocumentRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PaymentDetail.schema.ts +44 -0
- package/src/cfg/generated/_utils/schemas/PaymentList.schema.ts +7 -11
- package/src/cfg/generated/_utils/schemas/index.ts +1 -81
- package/src/cfg/generated/cfg__payments/client.ts +40 -1732
- package/src/cfg/generated/cfg__payments/models.ts +50 -1823
- package/src/cfg/generated/client.ts +0 -3
- package/src/cfg/generated/enums.ts +5 -391
- package/src/cfg/generated/index.ts +3 -7
- package/src/cfg/generated/schema.ts +5918 -18389
- package/src/cfg/services/payments/ApiKeysService.ts +34 -116
- package/src/cfg/services/payments/DashboardService.ts +37 -122
- package/src/cfg/services/payments/PaymentsService.ts +36 -69
- package/src/cfg/services/payments/SubscriptionsService.ts +35 -136
- package/src/cfg/services/webhooks/WebhooksService.ts +24 -66
- package/src/index.ts +1 -6
- package/src/cfg/generated/_utils/fetchers/cfg__payments__webhooks.ts +0 -109
- package/src/cfg/generated/_utils/hooks/cfg__payments__webhooks.ts +0 -100
- package/src/cfg/generated/_utils/schemas/APIKeyCreate.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyCreateRequest.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyDetail.schema.ts +0 -35
- package/src/cfg/generated/_utils/schemas/APIKeyList.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/APIKeyUpdate.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyUpdateRequest.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyValidationRequest.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/APIKeyValidationResponse.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/APIKeysOverview.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/AdminPaymentCreate.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/AdminPaymentCreateRequest.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/AdminPaymentDetail.schema.ts +0 -50
- package/src/cfg/generated/_utils/schemas/AdminPaymentList.schema.ts +0 -38
- package/src/cfg/generated/_utils/schemas/AdminPaymentStats.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/AdminPaymentUpdate.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/AdminPaymentUpdateRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/AdminUser.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/BalanceOverview.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/ChartDataPoint.schema.ts +0 -20
- package/src/cfg/generated/_utils/schemas/ChartSeries.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/Currency.schema.ts +0 -35
- package/src/cfg/generated/_utils/schemas/CurrencyAnalyticsItem.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/CurrencyList.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/CurrencyRates.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/EndpointGroup.schema.ts +0 -28
- package/src/cfg/generated/_utils/schemas/Network.schema.ts +0 -30
- package/src/cfg/generated/_utils/schemas/PaginatedAPIKeyListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedAdminPaymentListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedAdminPaymentStatsList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedAdminUserList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedCurrencyListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedEndpointGroupList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedNetworkList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedProviderCurrencyList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedRecentPaymentList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedRecentTransactionList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedSubscriptionListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedTariffList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedTransactionList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedUserBalanceList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedWebhookEventListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedWebhookStatsList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PatchedAPIKeyUpdateRequest.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PatchedAdminPaymentUpdateRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/PatchedPaymentRequest.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/PatchedSubscriptionRequest.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/Payment.schema.ts +0 -49
- package/src/cfg/generated/_utils/schemas/PaymentAnalyticsResponse.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/PaymentCreate.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/PaymentCreateRequest.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/PaymentOverview.schema.ts +0 -31
- package/src/cfg/generated/_utils/schemas/PaymentRequest.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/PaymentsChartResponse.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaymentsDashboardOverview.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/PaymentsMetrics.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/ProviderAnalyticsItem.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/ProviderCurrency.schema.ts +0 -36
- package/src/cfg/generated/_utils/schemas/RecentPayment.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/RecentTransaction.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/Subscription.schema.ts +0 -41
- package/src/cfg/generated/_utils/schemas/SubscriptionCreate.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/SubscriptionCreateRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/SubscriptionList.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/SubscriptionOverview.schema.ts +0 -37
- package/src/cfg/generated/_utils/schemas/SubscriptionRequest.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/SupportedCurrencies.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/SupportedProviders.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/Tariff.schema.ts +0 -34
- package/src/cfg/generated/_utils/schemas/Transaction.schema.ts +0 -35
- package/src/cfg/generated/_utils/schemas/UserBalance.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/WebhookEvent.schema.ts +0 -31
- package/src/cfg/generated/_utils/schemas/WebhookEventList.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/WebhookEventListRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/WebhookEventRequest.schema.ts +0 -30
- package/src/cfg/generated/_utils/schemas/WebhookHealth.schema.ts +0 -21
- package/src/cfg/generated/_utils/schemas/WebhookProviderStats.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/WebhookProviderStatsRequest.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/WebhookResponse.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/WebhookResponseRequest.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/WebhookStats.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/WebhookStatsRequest.schema.ts +0 -27
- package/src/cfg/generated/cfg__payments__webhooks/client.ts +0 -75
- package/src/cfg/generated/cfg__payments__webhooks/index.ts +0 -2
- package/src/cfg/generated/cfg__payments__webhooks/models.ts +0 -87
|
@@ -18,2272 +18,20 @@ import useSWR from 'swr'
|
|
|
18
18
|
import { useSWRConfig } from 'swr'
|
|
19
19
|
import * as Fetchers from '../fetchers/cfg__payments'
|
|
20
20
|
import type { API } from '../../index'
|
|
21
|
-
import type { APIKeyCreate } from '../schemas/APIKeyCreate.schema'
|
|
22
|
-
import type { APIKeyCreateRequest } from '../schemas/APIKeyCreateRequest.schema'
|
|
23
|
-
import type { APIKeyDetail } from '../schemas/APIKeyDetail.schema'
|
|
24
|
-
import type { APIKeyUpdate } from '../schemas/APIKeyUpdate.schema'
|
|
25
|
-
import type { APIKeyUpdateRequest } from '../schemas/APIKeyUpdateRequest.schema'
|
|
26
|
-
import type { APIKeyValidationRequest } from '../schemas/APIKeyValidationRequest.schema'
|
|
27
|
-
import type { APIKeyValidationResponse } from '../schemas/APIKeyValidationResponse.schema'
|
|
28
|
-
import type { APIKeysOverview } from '../schemas/APIKeysOverview.schema'
|
|
29
|
-
import type { AdminPaymentCreate } from '../schemas/AdminPaymentCreate.schema'
|
|
30
|
-
import type { AdminPaymentCreateRequest } from '../schemas/AdminPaymentCreateRequest.schema'
|
|
31
|
-
import type { AdminPaymentDetail } from '../schemas/AdminPaymentDetail.schema'
|
|
32
|
-
import type { AdminPaymentStats } from '../schemas/AdminPaymentStats.schema'
|
|
33
|
-
import type { AdminPaymentUpdate } from '../schemas/AdminPaymentUpdate.schema'
|
|
34
|
-
import type { AdminPaymentUpdateRequest } from '../schemas/AdminPaymentUpdateRequest.schema'
|
|
35
|
-
import type { AdminUser } from '../schemas/AdminUser.schema'
|
|
36
|
-
import type { BalanceOverview } from '../schemas/BalanceOverview.schema'
|
|
37
|
-
import type { Currency } from '../schemas/Currency.schema'
|
|
38
|
-
import type { CurrencyRates } from '../schemas/CurrencyRates.schema'
|
|
39
|
-
import type { EndpointGroup } from '../schemas/EndpointGroup.schema'
|
|
40
|
-
import type { Network } from '../schemas/Network.schema'
|
|
41
|
-
import type { PaginatedAPIKeyListList } from '../schemas/PaginatedAPIKeyListList.schema'
|
|
42
|
-
import type { PaginatedAdminPaymentListList } from '../schemas/PaginatedAdminPaymentListList.schema'
|
|
43
|
-
import type { PaginatedAdminPaymentStatsList } from '../schemas/PaginatedAdminPaymentStatsList.schema'
|
|
44
|
-
import type { PaginatedAdminUserList } from '../schemas/PaginatedAdminUserList.schema'
|
|
45
|
-
import type { PaginatedCurrencyListList } from '../schemas/PaginatedCurrencyListList.schema'
|
|
46
|
-
import type { PaginatedEndpointGroupList } from '../schemas/PaginatedEndpointGroupList.schema'
|
|
47
|
-
import type { PaginatedNetworkList } from '../schemas/PaginatedNetworkList.schema'
|
|
48
21
|
import type { PaginatedPaymentListList } from '../schemas/PaginatedPaymentListList.schema'
|
|
49
|
-
import type {
|
|
50
|
-
import type {
|
|
51
|
-
import type { PaginatedRecentTransactionList } from '../schemas/PaginatedRecentTransactionList.schema'
|
|
52
|
-
import type { PaginatedSubscriptionListList } from '../schemas/PaginatedSubscriptionListList.schema'
|
|
53
|
-
import type { PaginatedTariffList } from '../schemas/PaginatedTariffList.schema'
|
|
54
|
-
import type { PaginatedTransactionList } from '../schemas/PaginatedTransactionList.schema'
|
|
55
|
-
import type { PaginatedUserBalanceList } from '../schemas/PaginatedUserBalanceList.schema'
|
|
56
|
-
import type { PaginatedWebhookEventListList } from '../schemas/PaginatedWebhookEventListList.schema'
|
|
57
|
-
import type { PaginatedWebhookStatsList } from '../schemas/PaginatedWebhookStatsList.schema'
|
|
58
|
-
import type { PatchedAPIKeyUpdateRequest } from '../schemas/PatchedAPIKeyUpdateRequest.schema'
|
|
59
|
-
import type { PatchedAdminPaymentUpdateRequest } from '../schemas/PatchedAdminPaymentUpdateRequest.schema'
|
|
60
|
-
import type { PatchedPaymentRequest } from '../schemas/PatchedPaymentRequest.schema'
|
|
61
|
-
import type { PatchedSubscriptionRequest } from '../schemas/PatchedSubscriptionRequest.schema'
|
|
62
|
-
import type { Payment } from '../schemas/Payment.schema'
|
|
63
|
-
import type { PaymentAnalyticsResponse } from '../schemas/PaymentAnalyticsResponse.schema'
|
|
64
|
-
import type { PaymentCreate } from '../schemas/PaymentCreate.schema'
|
|
65
|
-
import type { PaymentCreateRequest } from '../schemas/PaymentCreateRequest.schema'
|
|
66
|
-
import type { PaymentRequest } from '../schemas/PaymentRequest.schema'
|
|
67
|
-
import type { PaymentsChartResponse } from '../schemas/PaymentsChartResponse.schema'
|
|
68
|
-
import type { PaymentsDashboardOverview } from '../schemas/PaymentsDashboardOverview.schema'
|
|
69
|
-
import type { PaymentsMetrics } from '../schemas/PaymentsMetrics.schema'
|
|
70
|
-
import type { ProviderCurrency } from '../schemas/ProviderCurrency.schema'
|
|
71
|
-
import type { Subscription } from '../schemas/Subscription.schema'
|
|
72
|
-
import type { SubscriptionCreate } from '../schemas/SubscriptionCreate.schema'
|
|
73
|
-
import type { SubscriptionCreateRequest } from '../schemas/SubscriptionCreateRequest.schema'
|
|
74
|
-
import type { SubscriptionOverview } from '../schemas/SubscriptionOverview.schema'
|
|
75
|
-
import type { SubscriptionRequest } from '../schemas/SubscriptionRequest.schema'
|
|
76
|
-
import type { SupportedCurrencies } from '../schemas/SupportedCurrencies.schema'
|
|
77
|
-
import type { Tariff } from '../schemas/Tariff.schema'
|
|
78
|
-
import type { Transaction } from '../schemas/Transaction.schema'
|
|
79
|
-
import type { UserBalance } from '../schemas/UserBalance.schema'
|
|
80
|
-
import type { WebhookEventList } from '../schemas/WebhookEventList.schema'
|
|
81
|
-
import type { WebhookEventListRequest } from '../schemas/WebhookEventListRequest.schema'
|
|
82
|
-
import type { WebhookStats } from '../schemas/WebhookStats.schema'
|
|
83
|
-
import type { WebhookStatsRequest } from '../schemas/WebhookStatsRequest.schema'
|
|
22
|
+
import type { PaymentDetail } from '../schemas/PaymentDetail.schema'
|
|
23
|
+
import type { PaymentList } from '../schemas/PaymentList.schema'
|
|
84
24
|
|
|
85
25
|
/**
|
|
86
26
|
* API operation
|
|
87
27
|
*
|
|
88
28
|
* @method GET
|
|
89
|
-
* @path /cfg/payments/
|
|
29
|
+
* @path /cfg/payments/balance/
|
|
90
30
|
*/
|
|
91
|
-
export function
|
|
92
|
-
return useSWR<
|
|
93
|
-
|
|
94
|
-
() => Fetchers.
|
|
95
|
-
)
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* API operation
|
|
101
|
-
*
|
|
102
|
-
* @method POST
|
|
103
|
-
* @path /cfg/payments/admin/api/payments/
|
|
104
|
-
*/
|
|
105
|
-
export function useCreatePaymentsAdminApiPaymentsCreate() {
|
|
106
|
-
const { mutate } = useSWRConfig()
|
|
107
|
-
|
|
108
|
-
return async (data: AdminPaymentCreateRequest, client?: API): Promise<AdminPaymentCreate> => {
|
|
109
|
-
const result = await Fetchers.createPaymentsAdminApiPaymentsCreate(data, client)
|
|
110
|
-
// Revalidate related queries
|
|
111
|
-
mutate('cfg-payments-admin-api-payments')
|
|
112
|
-
return result
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* API operation
|
|
119
|
-
*
|
|
120
|
-
* @method GET
|
|
121
|
-
* @path /cfg/payments/admin/api/payments/{id}/
|
|
122
|
-
*/
|
|
123
|
-
export function usePaymentsAdminApiPaymentsRetrieve(id: string, client?: API): ReturnType<typeof useSWR<AdminPaymentDetail>> {
|
|
124
|
-
return useSWR<AdminPaymentDetail>(
|
|
125
|
-
['cfg-payments-admin-api-payment', id],
|
|
126
|
-
() => Fetchers.getPaymentsAdminApiPaymentsRetrieve(id, client)
|
|
127
|
-
)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* API operation
|
|
133
|
-
*
|
|
134
|
-
* @method PUT
|
|
135
|
-
* @path /cfg/payments/admin/api/payments/{id}/
|
|
136
|
-
*/
|
|
137
|
-
export function useUpdatePaymentsAdminApiPaymentsUpdate() {
|
|
138
|
-
const { mutate } = useSWRConfig()
|
|
139
|
-
|
|
140
|
-
return async (id: string, data: AdminPaymentUpdateRequest, client?: API): Promise<AdminPaymentUpdate> => {
|
|
141
|
-
const result = await Fetchers.updatePaymentsAdminApiPaymentsUpdate(id, data, client)
|
|
142
|
-
// Revalidate related queries
|
|
143
|
-
mutate('cfg-payments-admin-api-payments')
|
|
144
|
-
mutate('cfg-payments-admin-api-payment')
|
|
145
|
-
return result
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* API operation
|
|
152
|
-
*
|
|
153
|
-
* @method PATCH
|
|
154
|
-
* @path /cfg/payments/admin/api/payments/{id}/
|
|
155
|
-
*/
|
|
156
|
-
export function usePartialUpdatePaymentsAdminApiPaymentsPartialUpdate() {
|
|
157
|
-
const { mutate } = useSWRConfig()
|
|
158
|
-
|
|
159
|
-
return async (id: string, data?: PatchedAdminPaymentUpdateRequest, client?: API): Promise<AdminPaymentUpdate> => {
|
|
160
|
-
const result = await Fetchers.partialUpdatePaymentsAdminApiPaymentsPartialUpdate(id, data, client)
|
|
161
|
-
// Revalidate related queries
|
|
162
|
-
mutate('cfg-payments-admin-api-payments-partial')
|
|
163
|
-
return result
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* API operation
|
|
170
|
-
*
|
|
171
|
-
* @method DELETE
|
|
172
|
-
* @path /cfg/payments/admin/api/payments/{id}/
|
|
173
|
-
*/
|
|
174
|
-
export function useDeletePaymentsAdminApiPaymentsDestroy() {
|
|
175
|
-
const { mutate } = useSWRConfig()
|
|
176
|
-
|
|
177
|
-
return async (id: string, client?: API): Promise<void> => {
|
|
178
|
-
const result = await Fetchers.deletePaymentsAdminApiPaymentsDestroy(id, client)
|
|
179
|
-
// Revalidate related queries
|
|
180
|
-
mutate('cfg-payments-admin-api-payments')
|
|
181
|
-
mutate('cfg-payments-admin-api-payment')
|
|
182
|
-
return result
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* API operation
|
|
189
|
-
*
|
|
190
|
-
* @method POST
|
|
191
|
-
* @path /cfg/payments/admin/api/payments/{id}/cancel/
|
|
192
|
-
*/
|
|
193
|
-
export function useCreatePaymentsAdminApiPaymentsCancelCreate() {
|
|
194
|
-
const { mutate } = useSWRConfig()
|
|
195
|
-
|
|
196
|
-
return async (id: string, client?: API): Promise<AdminPaymentDetail> => {
|
|
197
|
-
const result = await Fetchers.createPaymentsAdminApiPaymentsCancelCreate(id, client)
|
|
198
|
-
// Revalidate related queries
|
|
199
|
-
mutate('cfg-payments-admin-api-payments-cancel')
|
|
200
|
-
return result
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* API operation
|
|
207
|
-
*
|
|
208
|
-
* @method POST
|
|
209
|
-
* @path /cfg/payments/admin/api/payments/{id}/refresh_status/
|
|
210
|
-
*/
|
|
211
|
-
export function useCreatePaymentsAdminApiPaymentsRefreshStatusCreate() {
|
|
212
|
-
const { mutate } = useSWRConfig()
|
|
213
|
-
|
|
214
|
-
return async (id: string, client?: API): Promise<AdminPaymentDetail> => {
|
|
215
|
-
const result = await Fetchers.createPaymentsAdminApiPaymentsRefreshStatusCreate(id, client)
|
|
216
|
-
// Revalidate related queries
|
|
217
|
-
mutate('cfg-payments-admin-api-payments-refresh-status')
|
|
218
|
-
return result
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* API operation
|
|
225
|
-
*
|
|
226
|
-
* @method POST
|
|
227
|
-
* @path /cfg/payments/admin/api/payments/{id}/refund/
|
|
228
|
-
*/
|
|
229
|
-
export function useCreatePaymentsAdminApiPaymentsRefundCreate() {
|
|
230
|
-
const { mutate } = useSWRConfig()
|
|
231
|
-
|
|
232
|
-
return async (id: string, client?: API): Promise<AdminPaymentDetail> => {
|
|
233
|
-
const result = await Fetchers.createPaymentsAdminApiPaymentsRefundCreate(id, client)
|
|
234
|
-
// Revalidate related queries
|
|
235
|
-
mutate('cfg-payments-admin-api-payments-refund')
|
|
236
|
-
return result
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* API operation
|
|
243
|
-
*
|
|
244
|
-
* @method GET
|
|
245
|
-
* @path /cfg/payments/admin/api/payments/stats/
|
|
246
|
-
*/
|
|
247
|
-
export function usePaymentsAdminApiPaymentsStatsRetrieve(client?: API): ReturnType<typeof useSWR<AdminPaymentStats>> {
|
|
248
|
-
return useSWR<AdminPaymentStats>(
|
|
249
|
-
'cfg-payments-admin-api-payments-stat',
|
|
250
|
-
() => Fetchers.getPaymentsAdminApiPaymentsStatsRetrieve(client)
|
|
251
|
-
)
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* API operation
|
|
257
|
-
*
|
|
258
|
-
* @method GET
|
|
259
|
-
* @path /cfg/payments/admin/api/stats/
|
|
260
|
-
*/
|
|
261
|
-
export function usePaymentsAdminApiStatsList(params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedAdminPaymentStatsList>> {
|
|
262
|
-
return useSWR<PaginatedAdminPaymentStatsList>(
|
|
263
|
-
params ? ['cfg-payments-admin-api-stats', params] : 'cfg-payments-admin-api-stats',
|
|
264
|
-
() => Fetchers.getPaymentsAdminApiStatsList(params, client)
|
|
265
|
-
)
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* API operation
|
|
271
|
-
*
|
|
272
|
-
* @method GET
|
|
273
|
-
* @path /cfg/payments/admin/api/stats/{id}/
|
|
274
|
-
*/
|
|
275
|
-
export function usePaymentsAdminApiStatsRetrieve(id: string, client?: API): ReturnType<typeof useSWR<AdminPaymentStats>> {
|
|
276
|
-
return useSWR<AdminPaymentStats>(
|
|
277
|
-
['cfg-payments-admin-api-stat', id],
|
|
278
|
-
() => Fetchers.getPaymentsAdminApiStatsRetrieve(id, client)
|
|
279
|
-
)
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* API operation
|
|
285
|
-
*
|
|
286
|
-
* @method GET
|
|
287
|
-
* @path /cfg/payments/admin/api/stats/payments/
|
|
288
|
-
*/
|
|
289
|
-
export function usePaymentsAdminApiStatsPaymentsRetrieve(client?: API): ReturnType<typeof useSWR<AdminPaymentStats>> {
|
|
290
|
-
return useSWR<AdminPaymentStats>(
|
|
291
|
-
'cfg-payments-admin-api-stats-payment',
|
|
292
|
-
() => Fetchers.getPaymentsAdminApiStatsPaymentsRetrieve(client)
|
|
293
|
-
)
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* API operation
|
|
299
|
-
*
|
|
300
|
-
* @method GET
|
|
301
|
-
* @path /cfg/payments/admin/api/stats/system/
|
|
302
|
-
*/
|
|
303
|
-
export function usePaymentsAdminApiStatsSystemRetrieve(client?: API): ReturnType<typeof useSWR<AdminPaymentStats>> {
|
|
304
|
-
return useSWR<AdminPaymentStats>(
|
|
305
|
-
'cfg-payments-admin-api-stats-system',
|
|
306
|
-
() => Fetchers.getPaymentsAdminApiStatsSystemRetrieve(client)
|
|
307
|
-
)
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* API operation
|
|
313
|
-
*
|
|
314
|
-
* @method GET
|
|
315
|
-
* @path /cfg/payments/admin/api/stats/webhooks/
|
|
316
|
-
*/
|
|
317
|
-
export function usePaymentsAdminApiStatsWebhooksRetrieve(client?: API): ReturnType<typeof useSWR<AdminPaymentStats>> {
|
|
318
|
-
return useSWR<AdminPaymentStats>(
|
|
319
|
-
'cfg-payments-admin-api-stats-webhook',
|
|
320
|
-
() => Fetchers.getPaymentsAdminApiStatsWebhooksRetrieve(client)
|
|
321
|
-
)
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* API operation
|
|
327
|
-
*
|
|
328
|
-
* @method GET
|
|
329
|
-
* @path /cfg/payments/admin/api/users/
|
|
330
|
-
*/
|
|
331
|
-
export function usePaymentsAdminApiUsersList(params?: { is_active?: boolean; is_staff?: boolean; is_superuser?: boolean; ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedAdminUserList>> {
|
|
332
|
-
return useSWR<PaginatedAdminUserList>(
|
|
333
|
-
params ? ['cfg-payments-admin-api-users', params] : 'cfg-payments-admin-api-users',
|
|
334
|
-
() => Fetchers.getPaymentsAdminApiUsersList(params, client)
|
|
335
|
-
)
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* API operation
|
|
341
|
-
*
|
|
342
|
-
* @method GET
|
|
343
|
-
* @path /cfg/payments/admin/api/users/{id}/
|
|
344
|
-
*/
|
|
345
|
-
export function usePaymentsAdminApiUsersRetrieve(id: number, client?: API): ReturnType<typeof useSWR<AdminUser>> {
|
|
346
|
-
return useSWR<AdminUser>(
|
|
347
|
-
['cfg-payments-admin-api-user', id],
|
|
348
|
-
() => Fetchers.getPaymentsAdminApiUsersRetrieve(id, client)
|
|
349
|
-
)
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* API operation
|
|
355
|
-
*
|
|
356
|
-
* @method POST
|
|
357
|
-
* @path /cfg/payments/admin/api/webhook-test/test/
|
|
358
|
-
*/
|
|
359
|
-
export function useCreatePaymentsAdminApiWebhookTestTestCreate() {
|
|
360
|
-
const { mutate } = useSWRConfig()
|
|
361
|
-
|
|
362
|
-
return async (data: WebhookStatsRequest, client?: API): Promise<WebhookStats> => {
|
|
363
|
-
const result = await Fetchers.createPaymentsAdminApiWebhookTestTestCreate(data, client)
|
|
364
|
-
// Revalidate related queries
|
|
365
|
-
mutate('cfg-payments-admin-api-webhook-test-test')
|
|
366
|
-
return result
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* API operation
|
|
373
|
-
*
|
|
374
|
-
* @method GET
|
|
375
|
-
* @path /cfg/payments/admin/api/webhooks/
|
|
376
|
-
*/
|
|
377
|
-
export function usePaymentsAdminApiWebhooksList(params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedWebhookStatsList>> {
|
|
378
|
-
return useSWR<PaginatedWebhookStatsList>(
|
|
379
|
-
params ? ['cfg-payments-admin-api-webhooks', params] : 'cfg-payments-admin-api-webhooks',
|
|
380
|
-
() => Fetchers.getPaymentsAdminApiWebhooksList(params, client)
|
|
381
|
-
)
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* API operation
|
|
387
|
-
*
|
|
388
|
-
* @method GET
|
|
389
|
-
* @path /cfg/payments/admin/api/webhooks/{id}/
|
|
390
|
-
*/
|
|
391
|
-
export function usePaymentsAdminApiWebhooksRetrieve(id: string, client?: API): ReturnType<typeof useSWR<WebhookStats>> {
|
|
392
|
-
return useSWR<WebhookStats>(
|
|
393
|
-
['cfg-payments-admin-api-webhook', id],
|
|
394
|
-
() => Fetchers.getPaymentsAdminApiWebhooksRetrieve(id, client)
|
|
395
|
-
)
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* API operation
|
|
401
|
-
*
|
|
402
|
-
* @method GET
|
|
403
|
-
* @path /cfg/payments/admin/api/webhooks/{webhook_pk}/events/
|
|
404
|
-
*/
|
|
405
|
-
export function usePaymentsAdminApiWebhooksEventsList(webhook_pk: string, params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedWebhookEventListList>> {
|
|
406
|
-
return useSWR<PaginatedWebhookEventListList>(
|
|
407
|
-
['cfg-payments-admin-api-webhooks-events', webhook_pk],
|
|
408
|
-
() => Fetchers.getPaymentsAdminApiWebhooksEventsList(webhook_pk, params, client)
|
|
409
|
-
)
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* API operation
|
|
415
|
-
*
|
|
416
|
-
* @method GET
|
|
417
|
-
* @path /cfg/payments/admin/api/webhooks/{webhook_pk}/events/{id}/
|
|
418
|
-
*/
|
|
419
|
-
export function usePaymentsAdminApiWebhooksEventsRetrieve(id: string, webhook_pk: string, client?: API): ReturnType<typeof useSWR<WebhookEventList>> {
|
|
420
|
-
return useSWR<WebhookEventList>(
|
|
421
|
-
['cfg-payments-admin-api-webhooks-event', id],
|
|
422
|
-
() => Fetchers.getPaymentsAdminApiWebhooksEventsRetrieve(id, webhook_pk, client)
|
|
423
|
-
)
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* API operation
|
|
429
|
-
*
|
|
430
|
-
* @method POST
|
|
431
|
-
* @path /cfg/payments/admin/api/webhooks/{webhook_pk}/events/{id}/retry/
|
|
432
|
-
*/
|
|
433
|
-
export function useCreatePaymentsAdminApiWebhooksEventsRetryCreate() {
|
|
434
|
-
const { mutate } = useSWRConfig()
|
|
435
|
-
|
|
436
|
-
return async (id: string, webhook_pk: string, data: WebhookEventListRequest, client?: API): Promise<WebhookEventList> => {
|
|
437
|
-
const result = await Fetchers.createPaymentsAdminApiWebhooksEventsRetryCreate(id, webhook_pk, data, client)
|
|
438
|
-
// Revalidate related queries
|
|
439
|
-
mutate('cfg-payments-admin-api-webhooks-events-retry')
|
|
440
|
-
return result
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
/**
|
|
446
|
-
* API operation
|
|
447
|
-
*
|
|
448
|
-
* @method POST
|
|
449
|
-
* @path /cfg/payments/admin/api/webhooks/{webhook_pk}/events/clear_all/
|
|
450
|
-
*/
|
|
451
|
-
export function useCreatePaymentsAdminApiWebhooksEventsClearAllCreate() {
|
|
452
|
-
const { mutate } = useSWRConfig()
|
|
453
|
-
|
|
454
|
-
return async (webhook_pk: string, data: WebhookEventListRequest, client?: API): Promise<WebhookEventList> => {
|
|
455
|
-
const result = await Fetchers.createPaymentsAdminApiWebhooksEventsClearAllCreate(webhook_pk, data, client)
|
|
456
|
-
// Revalidate related queries
|
|
457
|
-
mutate('cfg-payments-admin-api-webhooks-events-clear-all')
|
|
458
|
-
return result
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* API operation
|
|
465
|
-
*
|
|
466
|
-
* @method POST
|
|
467
|
-
* @path /cfg/payments/admin/api/webhooks/{webhook_pk}/events/retry_failed/
|
|
468
|
-
*/
|
|
469
|
-
export function useCreatePaymentsAdminApiWebhooksEventsRetryFailedCreate() {
|
|
470
|
-
const { mutate } = useSWRConfig()
|
|
471
|
-
|
|
472
|
-
return async (webhook_pk: string, data: WebhookEventListRequest, client?: API): Promise<WebhookEventList> => {
|
|
473
|
-
const result = await Fetchers.createPaymentsAdminApiWebhooksEventsRetryFailedCreate(webhook_pk, data, client)
|
|
474
|
-
// Revalidate related queries
|
|
475
|
-
mutate('cfg-payments-admin-api-webhooks-events-retry-failed')
|
|
476
|
-
return result
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* API operation
|
|
483
|
-
*
|
|
484
|
-
* @method GET
|
|
485
|
-
* @path /cfg/payments/admin/api/webhooks/stats/
|
|
486
|
-
*/
|
|
487
|
-
export function usePaymentsAdminApiWebhooksStatsRetrieve(client?: API): ReturnType<typeof useSWR<WebhookStats>> {
|
|
488
|
-
return useSWR<WebhookStats>(
|
|
489
|
-
'cfg-payments-admin-api-webhooks-stat',
|
|
490
|
-
() => Fetchers.getPaymentsAdminApiWebhooksStatsRetrieve(client)
|
|
491
|
-
)
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* API operation
|
|
497
|
-
*
|
|
498
|
-
* @method GET
|
|
499
|
-
* @path /cfg/payments/api-keys/
|
|
500
|
-
*/
|
|
501
|
-
export function usePaymentsApiKeysList(params?: { is_active?: boolean; ordering?: string; page?: number; page_size?: number; search?: string; user?: number }, client?: API): ReturnType<typeof useSWR<PaginatedAPIKeyListList>> {
|
|
502
|
-
return useSWR<PaginatedAPIKeyListList>(
|
|
503
|
-
params ? ['cfg-payments-api-keys', params] : 'cfg-payments-api-keys',
|
|
504
|
-
() => Fetchers.getPaymentsApiKeysList(params, client)
|
|
505
|
-
)
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
/**
|
|
510
|
-
* API operation
|
|
511
|
-
*
|
|
512
|
-
* @method POST
|
|
513
|
-
* @path /cfg/payments/api-keys/
|
|
514
|
-
*/
|
|
515
|
-
export function useCreatePaymentsApiKeysCreate() {
|
|
516
|
-
const { mutate } = useSWRConfig()
|
|
517
|
-
|
|
518
|
-
return async (data: APIKeyCreateRequest, client?: API): Promise<APIKeyCreate> => {
|
|
519
|
-
const result = await Fetchers.createPaymentsApiKeysCreate(data, client)
|
|
520
|
-
// Revalidate related queries
|
|
521
|
-
mutate('cfg-payments-api-keys')
|
|
522
|
-
return result
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
/**
|
|
528
|
-
* API operation
|
|
529
|
-
*
|
|
530
|
-
* @method GET
|
|
531
|
-
* @path /cfg/payments/api-keys/{id}/
|
|
532
|
-
*/
|
|
533
|
-
export function usePaymentsApiKeysRetrieve(id: string, client?: API): ReturnType<typeof useSWR<APIKeyDetail>> {
|
|
534
|
-
return useSWR<APIKeyDetail>(
|
|
535
|
-
['cfg-payments-api-key', id],
|
|
536
|
-
() => Fetchers.getPaymentsApiKeysRetrieve(id, client)
|
|
537
|
-
)
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* API operation
|
|
543
|
-
*
|
|
544
|
-
* @method PUT
|
|
545
|
-
* @path /cfg/payments/api-keys/{id}/
|
|
546
|
-
*/
|
|
547
|
-
export function useUpdatePaymentsApiKeysUpdate() {
|
|
548
|
-
const { mutate } = useSWRConfig()
|
|
549
|
-
|
|
550
|
-
return async (id: string, data: APIKeyUpdateRequest, client?: API): Promise<APIKeyUpdate> => {
|
|
551
|
-
const result = await Fetchers.updatePaymentsApiKeysUpdate(id, data, client)
|
|
552
|
-
// Revalidate related queries
|
|
553
|
-
mutate('cfg-payments-api-keys')
|
|
554
|
-
mutate('cfg-payments-api-key')
|
|
555
|
-
return result
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* API operation
|
|
562
|
-
*
|
|
563
|
-
* @method PATCH
|
|
564
|
-
* @path /cfg/payments/api-keys/{id}/
|
|
565
|
-
*/
|
|
566
|
-
export function usePartialUpdatePaymentsApiKeysPartialUpdate() {
|
|
567
|
-
const { mutate } = useSWRConfig()
|
|
568
|
-
|
|
569
|
-
return async (id: string, data?: PatchedAPIKeyUpdateRequest, client?: API): Promise<APIKeyUpdate> => {
|
|
570
|
-
const result = await Fetchers.partialUpdatePaymentsApiKeysPartialUpdate(id, data, client)
|
|
571
|
-
// Revalidate related queries
|
|
572
|
-
mutate('cfg-payments-api-keys-partial')
|
|
573
|
-
return result
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* API operation
|
|
580
|
-
*
|
|
581
|
-
* @method DELETE
|
|
582
|
-
* @path /cfg/payments/api-keys/{id}/
|
|
583
|
-
*/
|
|
584
|
-
export function useDeletePaymentsApiKeysDestroy() {
|
|
585
|
-
const { mutate } = useSWRConfig()
|
|
586
|
-
|
|
587
|
-
return async (id: string, client?: API): Promise<void> => {
|
|
588
|
-
const result = await Fetchers.deletePaymentsApiKeysDestroy(id, client)
|
|
589
|
-
// Revalidate related queries
|
|
590
|
-
mutate('cfg-payments-api-keys')
|
|
591
|
-
mutate('cfg-payments-api-key')
|
|
592
|
-
return result
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* API operation
|
|
599
|
-
*
|
|
600
|
-
* @method POST
|
|
601
|
-
* @path /cfg/payments/api-keys/{id}/perform_action/
|
|
602
|
-
*/
|
|
603
|
-
export function useCreatePaymentsApiKeysPerformActionCreate() {
|
|
604
|
-
const { mutate } = useSWRConfig()
|
|
605
|
-
|
|
606
|
-
return async (id: string, client?: API): Promise<APIKeyDetail> => {
|
|
607
|
-
const result = await Fetchers.createPaymentsApiKeysPerformActionCreate(id, client)
|
|
608
|
-
// Revalidate related queries
|
|
609
|
-
mutate('cfg-payments-api-keys-perform-action')
|
|
610
|
-
return result
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* API operation
|
|
617
|
-
*
|
|
618
|
-
* @method GET
|
|
619
|
-
* @path /cfg/payments/api-keys/analytics/
|
|
620
|
-
*/
|
|
621
|
-
export function usePaymentsApiKeysAnalyticsRetrieve(client?: API): ReturnType<typeof useSWR<APIKeyDetail>> {
|
|
622
|
-
return useSWR<APIKeyDetail>(
|
|
623
|
-
'cfg-payments-api-keys-analytic',
|
|
624
|
-
() => Fetchers.getPaymentsApiKeysAnalyticsRetrieve(client)
|
|
625
|
-
)
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* API operation
|
|
631
|
-
*
|
|
632
|
-
* @method GET
|
|
633
|
-
* @path /cfg/payments/api-keys/by_user/
|
|
634
|
-
*/
|
|
635
|
-
export function usePaymentsApiKeysByUserRetrieve(client?: API): ReturnType<typeof useSWR<APIKeyDetail>> {
|
|
636
|
-
return useSWR<APIKeyDetail>(
|
|
637
|
-
'cfg-payments-api-keys-by-user',
|
|
638
|
-
() => Fetchers.getPaymentsApiKeysByUserRetrieve(client)
|
|
639
|
-
)
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* API operation
|
|
645
|
-
*
|
|
646
|
-
* @method POST
|
|
647
|
-
* @path /cfg/payments/api-keys/create/
|
|
648
|
-
*/
|
|
649
|
-
export function useCreatePaymentsApiKeysCreateCreate() {
|
|
650
|
-
const { mutate } = useSWRConfig()
|
|
651
|
-
|
|
652
|
-
return async (data: APIKeyCreateRequest, client?: API): Promise<APIKeyCreate> => {
|
|
653
|
-
const result = await Fetchers.createPaymentsApiKeysCreateCreate(data, client)
|
|
654
|
-
// Revalidate related queries
|
|
655
|
-
mutate('cfg-payments-api-keys')
|
|
656
|
-
return result
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* API operation
|
|
663
|
-
*
|
|
664
|
-
* @method GET
|
|
665
|
-
* @path /cfg/payments/api-keys/expiring_soon/
|
|
666
|
-
*/
|
|
667
|
-
export function usePaymentsApiKeysExpiringSoonRetrieve(client?: API): ReturnType<typeof useSWR<APIKeyDetail>> {
|
|
668
|
-
return useSWR<APIKeyDetail>(
|
|
669
|
-
'cfg-payments-api-keys-expiring-soon',
|
|
670
|
-
() => Fetchers.getPaymentsApiKeysExpiringSoonRetrieve(client)
|
|
671
|
-
)
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* API operation
|
|
677
|
-
*
|
|
678
|
-
* @method GET
|
|
679
|
-
* @path /cfg/payments/api-keys/health/
|
|
680
|
-
*/
|
|
681
|
-
export function usePaymentsApiKeysHealthRetrieve(client?: API): ReturnType<typeof useSWR<APIKeyDetail>> {
|
|
682
|
-
return useSWR<APIKeyDetail>(
|
|
683
|
-
'cfg-payments-api-keys-health',
|
|
684
|
-
() => Fetchers.getPaymentsApiKeysHealthRetrieve(client)
|
|
685
|
-
)
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* API operation
|
|
691
|
-
*
|
|
692
|
-
* @method GET
|
|
693
|
-
* @path /cfg/payments/api-keys/stats/
|
|
694
|
-
*/
|
|
695
|
-
export function usePaymentsApiKeysStatsRetrieve(client?: API): ReturnType<typeof useSWR<APIKeyDetail>> {
|
|
696
|
-
return useSWR<APIKeyDetail>(
|
|
697
|
-
'cfg-payments-api-keys-stat',
|
|
698
|
-
() => Fetchers.getPaymentsApiKeysStatsRetrieve(client)
|
|
699
|
-
)
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* Validate API Key (Standalone)
|
|
705
|
-
*
|
|
706
|
-
* @method POST
|
|
707
|
-
* @path /cfg/payments/api-keys/validate/
|
|
708
|
-
*/
|
|
709
|
-
export function useCreatePaymentsApiKeysValidateCreate() {
|
|
710
|
-
const { mutate } = useSWRConfig()
|
|
711
|
-
|
|
712
|
-
return async (data: APIKeyValidationRequest, client?: API): Promise<APIKeyValidationResponse> => {
|
|
713
|
-
const result = await Fetchers.createPaymentsApiKeysValidateCreate(data, client)
|
|
714
|
-
// Revalidate related queries
|
|
715
|
-
mutate('cfg-payments-api-keys-validate')
|
|
716
|
-
return result
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* Validate API Key
|
|
723
|
-
*
|
|
724
|
-
* @method POST
|
|
725
|
-
* @path /cfg/payments/api-keys/validate_key/
|
|
726
|
-
*/
|
|
727
|
-
export function useCreatePaymentsApiKeysValidateKeyCreate() {
|
|
728
|
-
const { mutate } = useSWRConfig()
|
|
729
|
-
|
|
730
|
-
return async (data: APIKeyValidationRequest, client?: API): Promise<APIKeyValidationResponse> => {
|
|
731
|
-
const result = await Fetchers.createPaymentsApiKeysValidateKeyCreate(data, client)
|
|
732
|
-
// Revalidate related queries
|
|
733
|
-
mutate('cfg-payments-api-keys-validate-key')
|
|
734
|
-
return result
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* API operation
|
|
741
|
-
*
|
|
742
|
-
* @method GET
|
|
743
|
-
* @path /cfg/payments/balances/
|
|
744
|
-
*/
|
|
745
|
-
export function usePaymentsBalancesList(params?: { ordering?: string; page?: number; page_size?: number; search?: string; user?: number }, client?: API): ReturnType<typeof useSWR<PaginatedUserBalanceList>> {
|
|
746
|
-
return useSWR<PaginatedUserBalanceList>(
|
|
747
|
-
params ? ['cfg-payments-balances', params] : 'cfg-payments-balances',
|
|
748
|
-
() => Fetchers.getPaymentsBalancesList(params, client)
|
|
749
|
-
)
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
/**
|
|
754
|
-
* API operation
|
|
755
|
-
*
|
|
756
|
-
* @method GET
|
|
757
|
-
* @path /cfg/payments/balances/{id}/
|
|
758
|
-
*/
|
|
759
|
-
export function usePaymentsBalancesRetrieve(id: number, client?: API): ReturnType<typeof useSWR<UserBalance>> {
|
|
760
|
-
return useSWR<UserBalance>(
|
|
761
|
-
['cfg-payments-balance', id],
|
|
762
|
-
() => Fetchers.getPaymentsBalancesRetrieve(id, client)
|
|
763
|
-
)
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* API operation
|
|
769
|
-
*
|
|
770
|
-
* @method GET
|
|
771
|
-
* @path /cfg/payments/balances/analytics/
|
|
772
|
-
*/
|
|
773
|
-
export function usePaymentsBalancesAnalyticsRetrieve(client?: API): ReturnType<typeof useSWR<UserBalance>> {
|
|
774
|
-
return useSWR<UserBalance>(
|
|
775
|
-
'cfg-payments-balances-analytic',
|
|
776
|
-
() => Fetchers.getPaymentsBalancesAnalyticsRetrieve(client)
|
|
777
|
-
)
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* API operation
|
|
783
|
-
*
|
|
784
|
-
* @method GET
|
|
785
|
-
* @path /cfg/payments/balances/health/
|
|
786
|
-
*/
|
|
787
|
-
export function usePaymentsBalancesHealthRetrieve(client?: API): ReturnType<typeof useSWR<UserBalance>> {
|
|
788
|
-
return useSWR<UserBalance>(
|
|
789
|
-
'cfg-payments-balances-health',
|
|
790
|
-
() => Fetchers.getPaymentsBalancesHealthRetrieve(client)
|
|
791
|
-
)
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
* API operation
|
|
797
|
-
*
|
|
798
|
-
* @method GET
|
|
799
|
-
* @path /cfg/payments/balances/stats/
|
|
800
|
-
*/
|
|
801
|
-
export function usePaymentsBalancesStatsRetrieve(client?: API): ReturnType<typeof useSWR<UserBalance>> {
|
|
802
|
-
return useSWR<UserBalance>(
|
|
803
|
-
'cfg-payments-balances-stat',
|
|
804
|
-
() => Fetchers.getPaymentsBalancesStatsRetrieve(client)
|
|
805
|
-
)
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* API operation
|
|
811
|
-
*
|
|
812
|
-
* @method GET
|
|
813
|
-
* @path /cfg/payments/balances/summary/
|
|
814
|
-
*/
|
|
815
|
-
export function usePaymentsBalancesSummaryRetrieve(client?: API): ReturnType<typeof useSWR<UserBalance>> {
|
|
816
|
-
return useSWR<UserBalance>(
|
|
817
|
-
'cfg-payments-balances-summary',
|
|
818
|
-
() => Fetchers.getPaymentsBalancesSummaryRetrieve(client)
|
|
819
|
-
)
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
/**
|
|
824
|
-
* API operation
|
|
825
|
-
*
|
|
826
|
-
* @method GET
|
|
827
|
-
* @path /cfg/payments/currencies/
|
|
828
|
-
*/
|
|
829
|
-
export function usePaymentsCurrenciesList(params?: { currency_type?: string; is_active?: boolean; ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedCurrencyListList>> {
|
|
830
|
-
return useSWR<PaginatedCurrencyListList>(
|
|
831
|
-
params ? ['cfg-payments-currencies', params] : 'cfg-payments-currencies',
|
|
832
|
-
() => Fetchers.getPaymentsCurrenciesList(params, client)
|
|
833
|
-
)
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
/**
|
|
838
|
-
* API operation
|
|
839
|
-
*
|
|
840
|
-
* @method POST
|
|
841
|
-
* @path /cfg/payments/currencies/
|
|
842
|
-
*/
|
|
843
|
-
export function useCreatePaymentsCurrenciesCreate() {
|
|
844
|
-
const { mutate } = useSWRConfig()
|
|
845
|
-
|
|
846
|
-
return async (client?: API): Promise<Currency> => {
|
|
847
|
-
const result = await Fetchers.createPaymentsCurrenciesCreate(client)
|
|
848
|
-
// Revalidate related queries
|
|
849
|
-
mutate('cfg-payments-currencies')
|
|
850
|
-
return result
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
* API operation
|
|
857
|
-
*
|
|
858
|
-
* @method GET
|
|
859
|
-
* @path /cfg/payments/currencies/{id}/
|
|
860
|
-
*/
|
|
861
|
-
export function usePaymentsCurrenciesRetrieve(id: number, client?: API): ReturnType<typeof useSWR<Currency>> {
|
|
862
|
-
return useSWR<Currency>(
|
|
863
|
-
['cfg-payments-currencie', id],
|
|
864
|
-
() => Fetchers.getPaymentsCurrenciesRetrieve(id, client)
|
|
865
|
-
)
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
/**
|
|
870
|
-
* API operation
|
|
871
|
-
*
|
|
872
|
-
* @method GET
|
|
873
|
-
* @path /cfg/payments/currencies/{id}/networks/
|
|
874
|
-
*/
|
|
875
|
-
export function usePaymentsCurrenciesNetworksRetrieve(id: number, client?: API): ReturnType<typeof useSWR<Currency>> {
|
|
876
|
-
return useSWR<Currency>(
|
|
877
|
-
['cfg-payments-currencies-network', id],
|
|
878
|
-
() => Fetchers.getPaymentsCurrenciesNetworksRetrieve(id, client)
|
|
879
|
-
)
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
/**
|
|
884
|
-
* API operation
|
|
885
|
-
*
|
|
886
|
-
* @method GET
|
|
887
|
-
* @path /cfg/payments/currencies/{id}/providers/
|
|
888
|
-
*/
|
|
889
|
-
export function usePaymentsCurrenciesProvidersRetrieve(id: number, client?: API): ReturnType<typeof useSWR<Currency>> {
|
|
890
|
-
return useSWR<Currency>(
|
|
891
|
-
['cfg-payments-currencies-provider', id],
|
|
892
|
-
() => Fetchers.getPaymentsCurrenciesProvidersRetrieve(id, client)
|
|
893
|
-
)
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
/**
|
|
898
|
-
* API operation
|
|
899
|
-
*
|
|
900
|
-
* @method POST
|
|
901
|
-
* @path /cfg/payments/currencies/convert/
|
|
902
|
-
*/
|
|
903
|
-
export function useCreatePaymentsCurrenciesConvertCreate() {
|
|
904
|
-
const { mutate } = useSWRConfig()
|
|
905
|
-
|
|
906
|
-
return async (client?: API): Promise<Currency> => {
|
|
907
|
-
const result = await Fetchers.createPaymentsCurrenciesConvertCreate(client)
|
|
908
|
-
// Revalidate related queries
|
|
909
|
-
mutate('cfg-payments-currencies-convert')
|
|
910
|
-
return result
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
/**
|
|
916
|
-
* API operation
|
|
917
|
-
*
|
|
918
|
-
* @method GET
|
|
919
|
-
* @path /cfg/payments/currencies/crypto/
|
|
920
|
-
*/
|
|
921
|
-
export function usePaymentsCurrenciesCryptoRetrieve(client?: API): ReturnType<typeof useSWR<Currency>> {
|
|
922
|
-
return useSWR<Currency>(
|
|
923
|
-
'cfg-payments-currencies-crypto',
|
|
924
|
-
() => Fetchers.getPaymentsCurrenciesCryptoRetrieve(client)
|
|
925
|
-
)
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
/**
|
|
930
|
-
* API operation
|
|
931
|
-
*
|
|
932
|
-
* @method GET
|
|
933
|
-
* @path /cfg/payments/currencies/fiat/
|
|
934
|
-
*/
|
|
935
|
-
export function usePaymentsCurrenciesFiatRetrieve(client?: API): ReturnType<typeof useSWR<Currency>> {
|
|
936
|
-
return useSWR<Currency>(
|
|
937
|
-
'cfg-payments-currencies-fiat',
|
|
938
|
-
() => Fetchers.getPaymentsCurrenciesFiatRetrieve(client)
|
|
939
|
-
)
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* API operation
|
|
945
|
-
*
|
|
946
|
-
* @method GET
|
|
947
|
-
* @path /cfg/payments/currencies/health/
|
|
948
|
-
*/
|
|
949
|
-
export function usePaymentsCurrenciesHealthRetrieve(client?: API): ReturnType<typeof useSWR<Currency>> {
|
|
950
|
-
return useSWR<Currency>(
|
|
951
|
-
'cfg-payments-currencies-health',
|
|
952
|
-
() => Fetchers.getPaymentsCurrenciesHealthRetrieve(client)
|
|
953
|
-
)
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
/**
|
|
958
|
-
* API operation
|
|
959
|
-
*
|
|
960
|
-
* @method GET
|
|
961
|
-
* @path /cfg/payments/currencies/rates/
|
|
962
|
-
*/
|
|
963
|
-
export function usePaymentsCurrenciesRatesRetrieve(client?: API): ReturnType<typeof useSWR<CurrencyRates>> {
|
|
964
|
-
return useSWR<CurrencyRates>(
|
|
965
|
-
'cfg-payments-currencies-rate',
|
|
966
|
-
() => Fetchers.getPaymentsCurrenciesRatesRetrieve(client)
|
|
967
|
-
)
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
/**
|
|
972
|
-
* API operation
|
|
973
|
-
*
|
|
974
|
-
* @method GET
|
|
975
|
-
* @path /cfg/payments/currencies/stable/
|
|
976
|
-
*/
|
|
977
|
-
export function usePaymentsCurrenciesStableRetrieve(client?: API): ReturnType<typeof useSWR<Currency>> {
|
|
978
|
-
return useSWR<Currency>(
|
|
979
|
-
'cfg-payments-currencies-stable',
|
|
980
|
-
() => Fetchers.getPaymentsCurrenciesStableRetrieve(client)
|
|
981
|
-
)
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
/**
|
|
986
|
-
* API operation
|
|
987
|
-
*
|
|
988
|
-
* @method GET
|
|
989
|
-
* @path /cfg/payments/currencies/stats/
|
|
990
|
-
*/
|
|
991
|
-
export function usePaymentsCurrenciesStatsRetrieve(client?: API): ReturnType<typeof useSWR<Currency>> {
|
|
992
|
-
return useSWR<Currency>(
|
|
993
|
-
'cfg-payments-currencies-stat',
|
|
994
|
-
() => Fetchers.getPaymentsCurrenciesStatsRetrieve(client)
|
|
995
|
-
)
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
/**
|
|
1000
|
-
* API operation
|
|
1001
|
-
*
|
|
1002
|
-
* @method GET
|
|
1003
|
-
* @path /cfg/payments/currencies/supported/
|
|
1004
|
-
*/
|
|
1005
|
-
export function usePaymentsCurrenciesSupportedRetrieve(client?: API): ReturnType<typeof useSWR<SupportedCurrencies>> {
|
|
1006
|
-
return useSWR<SupportedCurrencies>(
|
|
1007
|
-
'cfg-payments-currencies-supported',
|
|
1008
|
-
() => Fetchers.getPaymentsCurrenciesSupportedRetrieve(client)
|
|
1009
|
-
)
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
/**
|
|
1014
|
-
* API operation
|
|
1015
|
-
*
|
|
1016
|
-
* @method GET
|
|
1017
|
-
* @path /cfg/payments/endpoint-groups/
|
|
1018
|
-
*/
|
|
1019
|
-
export function usePaymentsEndpointGroupsList(params?: { is_enabled?: boolean; ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedEndpointGroupList>> {
|
|
1020
|
-
return useSWR<PaginatedEndpointGroupList>(
|
|
1021
|
-
params ? ['cfg-payments-endpoint-groups', params] : 'cfg-payments-endpoint-groups',
|
|
1022
|
-
() => Fetchers.getPaymentsEndpointGroupsList(params, client)
|
|
1023
|
-
)
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
/**
|
|
1028
|
-
* API operation
|
|
1029
|
-
*
|
|
1030
|
-
* @method GET
|
|
1031
|
-
* @path /cfg/payments/endpoint-groups/{id}/
|
|
1032
|
-
*/
|
|
1033
|
-
export function usePaymentsEndpointGroupsRetrieve(id: number, client?: API): ReturnType<typeof useSWR<EndpointGroup>> {
|
|
1034
|
-
return useSWR<EndpointGroup>(
|
|
1035
|
-
['cfg-payments-endpoint-group', id],
|
|
1036
|
-
() => Fetchers.getPaymentsEndpointGroupsRetrieve(id, client)
|
|
1037
|
-
)
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
/**
|
|
1042
|
-
* API operation
|
|
1043
|
-
*
|
|
1044
|
-
* @method GET
|
|
1045
|
-
* @path /cfg/payments/endpoint-groups/available/
|
|
1046
|
-
*/
|
|
1047
|
-
export function usePaymentsEndpointGroupsAvailableRetrieve(client?: API): ReturnType<typeof useSWR<EndpointGroup>> {
|
|
1048
|
-
return useSWR<EndpointGroup>(
|
|
1049
|
-
'cfg-payments-endpoint-groups-available',
|
|
1050
|
-
() => Fetchers.getPaymentsEndpointGroupsAvailableRetrieve(client)
|
|
1051
|
-
)
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
/**
|
|
1056
|
-
* API operation
|
|
1057
|
-
*
|
|
1058
|
-
* @method GET
|
|
1059
|
-
* @path /cfg/payments/endpoint-groups/health/
|
|
1060
|
-
*/
|
|
1061
|
-
export function usePaymentsEndpointGroupsHealthRetrieve(client?: API): ReturnType<typeof useSWR<EndpointGroup>> {
|
|
1062
|
-
return useSWR<EndpointGroup>(
|
|
1063
|
-
'cfg-payments-endpoint-groups-health',
|
|
1064
|
-
() => Fetchers.getPaymentsEndpointGroupsHealthRetrieve(client)
|
|
1065
|
-
)
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
/**
|
|
1070
|
-
* API operation
|
|
1071
|
-
*
|
|
1072
|
-
* @method GET
|
|
1073
|
-
* @path /cfg/payments/endpoint-groups/stats/
|
|
1074
|
-
*/
|
|
1075
|
-
export function usePaymentsEndpointGroupsStatsRetrieve(client?: API): ReturnType<typeof useSWR<EndpointGroup>> {
|
|
1076
|
-
return useSWR<EndpointGroup>(
|
|
1077
|
-
'cfg-payments-endpoint-groups-stat',
|
|
1078
|
-
() => Fetchers.getPaymentsEndpointGroupsStatsRetrieve(client)
|
|
1079
|
-
)
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
/**
|
|
1084
|
-
* API operation
|
|
1085
|
-
*
|
|
1086
|
-
* @method GET
|
|
1087
|
-
* @path /cfg/payments/health/
|
|
1088
|
-
*/
|
|
1089
|
-
export function usePaymentsHealthRetrieve(client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
1090
|
-
return useSWR<Payment>(
|
|
1091
|
-
'cfg-payments-health',
|
|
1092
|
-
() => Fetchers.getPaymentsHealthRetrieve(client)
|
|
1093
|
-
)
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
/**
|
|
1098
|
-
* API operation
|
|
1099
|
-
*
|
|
1100
|
-
* @method GET
|
|
1101
|
-
* @path /cfg/payments/networks/
|
|
1102
|
-
*/
|
|
1103
|
-
export function usePaymentsNetworksList(params?: { is_active?: boolean; native_currency__code?: string; ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedNetworkList>> {
|
|
1104
|
-
return useSWR<PaginatedNetworkList>(
|
|
1105
|
-
params ? ['cfg-payments-networks', params] : 'cfg-payments-networks',
|
|
1106
|
-
() => Fetchers.getPaymentsNetworksList(params, client)
|
|
1107
|
-
)
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
/**
|
|
1112
|
-
* API operation
|
|
1113
|
-
*
|
|
1114
|
-
* @method GET
|
|
1115
|
-
* @path /cfg/payments/networks/{id}/
|
|
1116
|
-
*/
|
|
1117
|
-
export function usePaymentsNetworksRetrieve(id: number, client?: API): ReturnType<typeof useSWR<Network>> {
|
|
1118
|
-
return useSWR<Network>(
|
|
1119
|
-
['cfg-payments-network', id],
|
|
1120
|
-
() => Fetchers.getPaymentsNetworksRetrieve(id, client)
|
|
1121
|
-
)
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
/**
|
|
1126
|
-
* API operation
|
|
1127
|
-
*
|
|
1128
|
-
* @method GET
|
|
1129
|
-
* @path /cfg/payments/networks/by_currency/
|
|
1130
|
-
*/
|
|
1131
|
-
export function usePaymentsNetworksByCurrencyRetrieve(client?: API): ReturnType<typeof useSWR<Network>> {
|
|
1132
|
-
return useSWR<Network>(
|
|
1133
|
-
'cfg-payments-networks-by-currency',
|
|
1134
|
-
() => Fetchers.getPaymentsNetworksByCurrencyRetrieve(client)
|
|
1135
|
-
)
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
/**
|
|
1140
|
-
* API operation
|
|
1141
|
-
*
|
|
1142
|
-
* @method GET
|
|
1143
|
-
* @path /cfg/payments/networks/health/
|
|
1144
|
-
*/
|
|
1145
|
-
export function usePaymentsNetworksHealthRetrieve(client?: API): ReturnType<typeof useSWR<Network>> {
|
|
1146
|
-
return useSWR<Network>(
|
|
1147
|
-
'cfg-payments-networks-health',
|
|
1148
|
-
() => Fetchers.getPaymentsNetworksHealthRetrieve(client)
|
|
1149
|
-
)
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
/**
|
|
1154
|
-
* API operation
|
|
1155
|
-
*
|
|
1156
|
-
* @method GET
|
|
1157
|
-
* @path /cfg/payments/networks/stats/
|
|
1158
|
-
*/
|
|
1159
|
-
export function usePaymentsNetworksStatsRetrieve(client?: API): ReturnType<typeof useSWR<Network>> {
|
|
1160
|
-
return useSWR<Network>(
|
|
1161
|
-
'cfg-payments-networks-stat',
|
|
1162
|
-
() => Fetchers.getPaymentsNetworksStatsRetrieve(client)
|
|
1163
|
-
)
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
/**
|
|
1168
|
-
* API Keys Overview
|
|
1169
|
-
*
|
|
1170
|
-
* @method GET
|
|
1171
|
-
* @path /cfg/payments/overview/dashboard/api_keys_overview/
|
|
1172
|
-
*/
|
|
1173
|
-
export function usePaymentsOverviewDashboardApiKeysOverviewRetrieve(client?: API): ReturnType<typeof useSWR<APIKeysOverview>> {
|
|
1174
|
-
return useSWR<APIKeysOverview>(
|
|
1175
|
-
'cfg-payments-overview-dashboard-api-keys-overview',
|
|
1176
|
-
() => Fetchers.getPaymentsOverviewDashboardApiKeysOverviewRetrieve(client)
|
|
1177
|
-
)
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
* Balance Overview
|
|
1183
|
-
*
|
|
1184
|
-
* @method GET
|
|
1185
|
-
* @path /cfg/payments/overview/dashboard/balance_overview/
|
|
1186
|
-
*/
|
|
1187
|
-
export function usePaymentsOverviewDashboardBalanceOverviewRetrieve(client?: API): ReturnType<typeof useSWR<BalanceOverview>> {
|
|
1188
|
-
return useSWR<BalanceOverview>(
|
|
1189
|
-
'cfg-payments-overview-dashboard-balance-overview',
|
|
1190
|
-
() => Fetchers.getPaymentsOverviewDashboardBalanceOverviewRetrieve(client)
|
|
1191
|
-
)
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* Payments Chart Data
|
|
1197
|
-
*
|
|
1198
|
-
* @method GET
|
|
1199
|
-
* @path /cfg/payments/overview/dashboard/chart_data/
|
|
1200
|
-
*/
|
|
1201
|
-
export function usePaymentsOverviewDashboardChartDataRetrieve(params?: { period?: string }, client?: API): ReturnType<typeof useSWR<PaymentsChartResponse>> {
|
|
1202
|
-
return useSWR<PaymentsChartResponse>(
|
|
1203
|
-
params ? ['cfg-payments-overview-dashboard-chart-data', params] : 'cfg-payments-overview-dashboard-chart-data',
|
|
1204
|
-
() => Fetchers.getPaymentsOverviewDashboardChartDataRetrieve(params, client)
|
|
1205
|
-
)
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
/**
|
|
1210
|
-
* Payments Dashboard Metrics
|
|
1211
|
-
*
|
|
1212
|
-
* @method GET
|
|
1213
|
-
* @path /cfg/payments/overview/dashboard/metrics/
|
|
1214
|
-
*/
|
|
1215
|
-
export function usePaymentsOverviewDashboardMetricsRetrieve(client?: API): ReturnType<typeof useSWR<PaymentsMetrics>> {
|
|
1216
|
-
return useSWR<PaymentsMetrics>(
|
|
1217
|
-
'cfg-payments-overview-dashboard-metric',
|
|
1218
|
-
() => Fetchers.getPaymentsOverviewDashboardMetricsRetrieve(client)
|
|
1219
|
-
)
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
/**
|
|
1224
|
-
* Payments Dashboard Overview
|
|
1225
|
-
*
|
|
1226
|
-
* @method GET
|
|
1227
|
-
* @path /cfg/payments/overview/dashboard/overview/
|
|
1228
|
-
*/
|
|
1229
|
-
export function usePaymentsOverviewDashboardOverviewRetrieve(client?: API): ReturnType<typeof useSWR<PaymentsDashboardOverview>> {
|
|
1230
|
-
return useSWR<PaymentsDashboardOverview>(
|
|
1231
|
-
'cfg-payments-overview-dashboard-overview',
|
|
1232
|
-
() => Fetchers.getPaymentsOverviewDashboardOverviewRetrieve(client)
|
|
1233
|
-
)
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
/**
|
|
1238
|
-
* Payment Analytics
|
|
1239
|
-
*
|
|
1240
|
-
* @method GET
|
|
1241
|
-
* @path /cfg/payments/overview/dashboard/payment_analytics/
|
|
1242
|
-
*/
|
|
1243
|
-
export function usePaymentsOverviewDashboardPaymentAnalyticsRetrieve(params?: { limit?: number }, client?: API): ReturnType<typeof useSWR<PaymentAnalyticsResponse>> {
|
|
1244
|
-
return useSWR<PaymentAnalyticsResponse>(
|
|
1245
|
-
params ? ['cfg-payments-overview-dashboard-payment-analytic', params] : 'cfg-payments-overview-dashboard-payment-analytic',
|
|
1246
|
-
() => Fetchers.getPaymentsOverviewDashboardPaymentAnalyticsRetrieve(params, client)
|
|
1247
|
-
)
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
/**
|
|
1252
|
-
* Recent Payments
|
|
1253
|
-
*
|
|
1254
|
-
* @method GET
|
|
1255
|
-
* @path /cfg/payments/overview/dashboard/recent_payments/
|
|
1256
|
-
*/
|
|
1257
|
-
export function usePaymentsOverviewDashboardRecentPaymentsList(params?: { limit?: number; page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedRecentPaymentList>> {
|
|
1258
|
-
return useSWR<PaginatedRecentPaymentList>(
|
|
1259
|
-
params ? ['cfg-payments-overview-dashboard-recent-payments', params] : 'cfg-payments-overview-dashboard-recent-payments',
|
|
1260
|
-
() => Fetchers.getPaymentsOverviewDashboardRecentPaymentsList(params, client)
|
|
1261
|
-
)
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
/**
|
|
1266
|
-
* Recent Transactions
|
|
1267
|
-
*
|
|
1268
|
-
* @method GET
|
|
1269
|
-
* @path /cfg/payments/overview/dashboard/recent_transactions/
|
|
1270
|
-
*/
|
|
1271
|
-
export function usePaymentsOverviewDashboardRecentTransactionsList(params?: { limit?: number; page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedRecentTransactionList>> {
|
|
1272
|
-
return useSWR<PaginatedRecentTransactionList>(
|
|
1273
|
-
params ? ['cfg-payments-overview-dashboard-recent-transactions', params] : 'cfg-payments-overview-dashboard-recent-transactions',
|
|
1274
|
-
() => Fetchers.getPaymentsOverviewDashboardRecentTransactionsList(params, client)
|
|
1275
|
-
)
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
/**
|
|
1280
|
-
* Subscription Overview
|
|
1281
|
-
*
|
|
1282
|
-
* @method GET
|
|
1283
|
-
* @path /cfg/payments/overview/dashboard/subscription_overview/
|
|
1284
|
-
*/
|
|
1285
|
-
export function usePaymentsOverviewDashboardSubscriptionOverviewRetrieve(client?: API): ReturnType<typeof useSWR<SubscriptionOverview>> {
|
|
1286
|
-
return useSWR<SubscriptionOverview>(
|
|
1287
|
-
'cfg-payments-overview-dashboard-subscription-overview',
|
|
1288
|
-
() => Fetchers.getPaymentsOverviewDashboardSubscriptionOverviewRetrieve(client)
|
|
1289
|
-
)
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
/**
|
|
1294
|
-
* API operation
|
|
1295
|
-
*
|
|
1296
|
-
* @method GET
|
|
1297
|
-
* @path /cfg/payments/payment/
|
|
1298
|
-
*/
|
|
1299
|
-
export function usePaymentsPaymentList(params?: { currency__code?: string; ordering?: string; page?: number; page_size?: number; provider?: string; search?: string; status?: string; user?: number }, client?: API): ReturnType<typeof useSWR<PaginatedPaymentListList>> {
|
|
1300
|
-
return useSWR<PaginatedPaymentListList>(
|
|
1301
|
-
params ? ['cfg-payments-payment', params] : 'cfg-payments-payment',
|
|
1302
|
-
() => Fetchers.getPaymentsPaymentList(params, client)
|
|
1303
|
-
)
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
/**
|
|
1308
|
-
* API operation
|
|
1309
|
-
*
|
|
1310
|
-
* @method POST
|
|
1311
|
-
* @path /cfg/payments/payment/
|
|
1312
|
-
*/
|
|
1313
|
-
export function useCreatePaymentsPaymentCreate() {
|
|
1314
|
-
const { mutate } = useSWRConfig()
|
|
1315
|
-
|
|
1316
|
-
return async (data: PaymentCreateRequest, client?: API): Promise<PaymentCreate> => {
|
|
1317
|
-
const result = await Fetchers.createPaymentsPaymentCreate(data, client)
|
|
1318
|
-
// Revalidate related queries
|
|
1319
|
-
mutate('cfg-payments-payment')
|
|
1320
|
-
return result
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
/**
|
|
1326
|
-
* API operation
|
|
1327
|
-
*
|
|
1328
|
-
* @method GET
|
|
1329
|
-
* @path /cfg/payments/payment/{id}/
|
|
1330
|
-
*/
|
|
1331
|
-
export function usePaymentsPaymentRetrieve(id: string, client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
1332
|
-
return useSWR<Payment>(
|
|
1333
|
-
['cfg-payments-payment', id],
|
|
1334
|
-
() => Fetchers.getPaymentsPaymentRetrieve(id, client)
|
|
1335
|
-
)
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
/**
|
|
1340
|
-
* API operation
|
|
1341
|
-
*
|
|
1342
|
-
* @method PUT
|
|
1343
|
-
* @path /cfg/payments/payment/{id}/
|
|
1344
|
-
*/
|
|
1345
|
-
export function useUpdatePaymentsPaymentUpdate() {
|
|
1346
|
-
const { mutate } = useSWRConfig()
|
|
1347
|
-
|
|
1348
|
-
return async (id: string, data: PaymentRequest, client?: API): Promise<Payment> => {
|
|
1349
|
-
const result = await Fetchers.updatePaymentsPaymentUpdate(id, data, client)
|
|
1350
|
-
// Revalidate related queries
|
|
1351
|
-
mutate('cfg-payments-payment')
|
|
1352
|
-
return result
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
/**
|
|
1358
|
-
* API operation
|
|
1359
|
-
*
|
|
1360
|
-
* @method PATCH
|
|
1361
|
-
* @path /cfg/payments/payment/{id}/
|
|
1362
|
-
*/
|
|
1363
|
-
export function usePartialUpdatePaymentsPaymentPartialUpdate() {
|
|
1364
|
-
const { mutate } = useSWRConfig()
|
|
1365
|
-
|
|
1366
|
-
return async (id: string, data?: PatchedPaymentRequest, client?: API): Promise<Payment> => {
|
|
1367
|
-
const result = await Fetchers.partialUpdatePaymentsPaymentPartialUpdate(id, data, client)
|
|
1368
|
-
// Revalidate related queries
|
|
1369
|
-
mutate('cfg-payments-payment-partial')
|
|
1370
|
-
return result
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
/**
|
|
1376
|
-
* API operation
|
|
1377
|
-
*
|
|
1378
|
-
* @method DELETE
|
|
1379
|
-
* @path /cfg/payments/payment/{id}/
|
|
1380
|
-
*/
|
|
1381
|
-
export function useDeletePaymentsPaymentDestroy() {
|
|
1382
|
-
const { mutate } = useSWRConfig()
|
|
1383
|
-
|
|
1384
|
-
return async (id: string, client?: API): Promise<void> => {
|
|
1385
|
-
const result = await Fetchers.deletePaymentsPaymentDestroy(id, client)
|
|
1386
|
-
// Revalidate related queries
|
|
1387
|
-
mutate('cfg-payments-payment')
|
|
1388
|
-
return result
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
/**
|
|
1394
|
-
* API operation
|
|
1395
|
-
*
|
|
1396
|
-
* @method POST
|
|
1397
|
-
* @path /cfg/payments/payment/{id}/cancel/
|
|
1398
|
-
*/
|
|
1399
|
-
export function useCreatePaymentsPaymentCancelCreate() {
|
|
1400
|
-
const { mutate } = useSWRConfig()
|
|
1401
|
-
|
|
1402
|
-
return async (id: string, data: PaymentRequest, client?: API): Promise<Payment> => {
|
|
1403
|
-
const result = await Fetchers.createPaymentsPaymentCancelCreate(id, data, client)
|
|
1404
|
-
// Revalidate related queries
|
|
1405
|
-
mutate('cfg-payments-payment-cancel')
|
|
1406
|
-
return result
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
/**
|
|
1412
|
-
* API operation
|
|
1413
|
-
*
|
|
1414
|
-
* @method POST
|
|
1415
|
-
* @path /cfg/payments/payment/{id}/check_status/
|
|
1416
|
-
*/
|
|
1417
|
-
export function useCreatePaymentsPaymentCheckStatusCreate() {
|
|
1418
|
-
const { mutate } = useSWRConfig()
|
|
1419
|
-
|
|
1420
|
-
return async (id: string, data: PaymentRequest, client?: API): Promise<Payment> => {
|
|
1421
|
-
const result = await Fetchers.createPaymentsPaymentCheckStatusCreate(id, data, client)
|
|
1422
|
-
// Revalidate related queries
|
|
1423
|
-
mutate('cfg-payments-payment-check-status')
|
|
1424
|
-
return result
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
/**
|
|
1430
|
-
* API operation
|
|
1431
|
-
*
|
|
1432
|
-
* @method GET
|
|
1433
|
-
* @path /cfg/payments/payment/analytics/
|
|
1434
|
-
*/
|
|
1435
|
-
export function usePaymentsPaymentAnalyticsRetrieve(client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
1436
|
-
return useSWR<Payment>(
|
|
1437
|
-
'cfg-payments-payment-analytic',
|
|
1438
|
-
() => Fetchers.getPaymentsPaymentAnalyticsRetrieve(client)
|
|
1439
|
-
)
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
/**
|
|
1444
|
-
* API operation
|
|
1445
|
-
*
|
|
1446
|
-
* @method GET
|
|
1447
|
-
* @path /cfg/payments/payment/by_provider/
|
|
1448
|
-
*/
|
|
1449
|
-
export function usePaymentsPaymentByProviderRetrieve(client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
1450
|
-
return useSWR<Payment>(
|
|
1451
|
-
'cfg-payments-payment-by-provider',
|
|
1452
|
-
() => Fetchers.getPaymentsPaymentByProviderRetrieve(client)
|
|
1453
|
-
)
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
/**
|
|
1458
|
-
* API operation
|
|
1459
|
-
*
|
|
1460
|
-
* @method POST
|
|
1461
|
-
* @path /cfg/payments/payment/create/
|
|
1462
|
-
*/
|
|
1463
|
-
export function useCreatePaymentsPaymentCreateCreate() {
|
|
1464
|
-
const { mutate } = useSWRConfig()
|
|
1465
|
-
|
|
1466
|
-
return async (data: PaymentCreateRequest, client?: API): Promise<PaymentCreate> => {
|
|
1467
|
-
const result = await Fetchers.createPaymentsPaymentCreateCreate(data, client)
|
|
1468
|
-
// Revalidate related queries
|
|
1469
|
-
mutate('cfg-payments-payment')
|
|
1470
|
-
return result
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
/**
|
|
1476
|
-
* API operation
|
|
1477
|
-
*
|
|
1478
|
-
* @method GET
|
|
1479
|
-
* @path /cfg/payments/payment/health/
|
|
1480
|
-
*/
|
|
1481
|
-
export function usePaymentsPaymentHealthRetrieve(client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
1482
|
-
return useSWR<Payment>(
|
|
1483
|
-
'cfg-payments-payment-health',
|
|
1484
|
-
() => Fetchers.getPaymentsPaymentHealthRetrieve(client)
|
|
1485
|
-
)
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
/**
|
|
1490
|
-
* API operation
|
|
1491
|
-
*
|
|
1492
|
-
* @method GET
|
|
1493
|
-
* @path /cfg/payments/payment/stats/
|
|
1494
|
-
*/
|
|
1495
|
-
export function usePaymentsPaymentStatsRetrieve(client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
1496
|
-
return useSWR<Payment>(
|
|
1497
|
-
'cfg-payments-payment-stat',
|
|
1498
|
-
() => Fetchers.getPaymentsPaymentStatsRetrieve(client)
|
|
1499
|
-
)
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
/**
|
|
1504
|
-
* API operation
|
|
1505
|
-
*
|
|
1506
|
-
* @method GET
|
|
1507
|
-
* @path /cfg/payments/payment/status/{id}/
|
|
1508
|
-
*/
|
|
1509
|
-
export function usePaymentsPaymentStatusRetrieve(id: string, client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
1510
|
-
return useSWR<Payment>(
|
|
1511
|
-
['cfg-payments-payment-statu', id],
|
|
1512
|
-
() => Fetchers.getPaymentsPaymentStatusRetrieve(id, client)
|
|
1513
|
-
)
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
/**
|
|
1518
|
-
* API operation
|
|
1519
|
-
*
|
|
1520
|
-
* @method GET
|
|
1521
|
-
* @path /cfg/payments/provider-currencies/
|
|
1522
|
-
*/
|
|
1523
|
-
export function usePaymentsProviderCurrenciesList(params?: { currency__code?: string; is_enabled?: boolean; network__code?: string; ordering?: string; page?: number; page_size?: number; provider?: string; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedProviderCurrencyList>> {
|
|
1524
|
-
return useSWR<PaginatedProviderCurrencyList>(
|
|
1525
|
-
params ? ['cfg-payments-provider-currencies', params] : 'cfg-payments-provider-currencies',
|
|
1526
|
-
() => Fetchers.getPaymentsProviderCurrenciesList(params, client)
|
|
1527
|
-
)
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
/**
|
|
1532
|
-
* API operation
|
|
1533
|
-
*
|
|
1534
|
-
* @method GET
|
|
1535
|
-
* @path /cfg/payments/provider-currencies/{id}/
|
|
1536
|
-
*/
|
|
1537
|
-
export function usePaymentsProviderCurrenciesRetrieve(id: number, client?: API): ReturnType<typeof useSWR<ProviderCurrency>> {
|
|
1538
|
-
return useSWR<ProviderCurrency>(
|
|
1539
|
-
['cfg-payments-provider-currencie', id],
|
|
1540
|
-
() => Fetchers.getPaymentsProviderCurrenciesRetrieve(id, client)
|
|
1541
|
-
)
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
/**
|
|
1546
|
-
* Get provider currencies grouped by provider
|
|
1547
|
-
*
|
|
1548
|
-
* @method GET
|
|
1549
|
-
* @path /cfg/payments/provider-currencies/by_provider/
|
|
1550
|
-
*/
|
|
1551
|
-
export function usePaymentsProviderCurrenciesByProviderRetrieve(params?: { provider?: string }, client?: API): ReturnType<typeof useSWR<ProviderCurrency>> {
|
|
1552
|
-
return useSWR<ProviderCurrency>(
|
|
1553
|
-
params ? ['cfg-payments-provider-currencies-by-provider', params] : 'cfg-payments-provider-currencies-by-provider',
|
|
1554
|
-
() => Fetchers.getPaymentsProviderCurrenciesByProviderRetrieve(params, client)
|
|
1555
|
-
)
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
/**
|
|
1560
|
-
* API operation
|
|
1561
|
-
*
|
|
1562
|
-
* @method GET
|
|
1563
|
-
* @path /cfg/payments/provider-currencies/health/
|
|
1564
|
-
*/
|
|
1565
|
-
export function usePaymentsProviderCurrenciesHealthRetrieve(client?: API): ReturnType<typeof useSWR<ProviderCurrency>> {
|
|
1566
|
-
return useSWR<ProviderCurrency>(
|
|
1567
|
-
'cfg-payments-provider-currencies-health',
|
|
1568
|
-
() => Fetchers.getPaymentsProviderCurrenciesHealthRetrieve(client)
|
|
1569
|
-
)
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
/**
|
|
1574
|
-
* API operation
|
|
1575
|
-
*
|
|
1576
|
-
* @method GET
|
|
1577
|
-
* @path /cfg/payments/provider-currencies/limits/
|
|
1578
|
-
*/
|
|
1579
|
-
export function usePaymentsProviderCurrenciesLimitsRetrieve(client?: API): ReturnType<typeof useSWR<ProviderCurrency>> {
|
|
1580
|
-
return useSWR<ProviderCurrency>(
|
|
1581
|
-
'cfg-payments-provider-currencies-limit',
|
|
1582
|
-
() => Fetchers.getPaymentsProviderCurrenciesLimitsRetrieve(client)
|
|
1583
|
-
)
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
/**
|
|
1588
|
-
* API operation
|
|
1589
|
-
*
|
|
1590
|
-
* @method GET
|
|
1591
|
-
* @path /cfg/payments/provider-currencies/stats/
|
|
1592
|
-
*/
|
|
1593
|
-
export function usePaymentsProviderCurrenciesStatsRetrieve(client?: API): ReturnType<typeof useSWR<ProviderCurrency>> {
|
|
1594
|
-
return useSWR<ProviderCurrency>(
|
|
1595
|
-
'cfg-payments-provider-currencies-stat',
|
|
1596
|
-
() => Fetchers.getPaymentsProviderCurrenciesStatsRetrieve(client)
|
|
1597
|
-
)
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
/**
|
|
1602
|
-
* API operation
|
|
1603
|
-
*
|
|
1604
|
-
* @method GET
|
|
1605
|
-
* @path /cfg/payments/subscriptions/
|
|
1606
|
-
*/
|
|
1607
|
-
export function usePaymentsSubscriptionsList(params?: { ordering?: string; page?: number; page_size?: number; search?: string; status?: string; tier?: string; user?: number }, client?: API): ReturnType<typeof useSWR<PaginatedSubscriptionListList>> {
|
|
1608
|
-
return useSWR<PaginatedSubscriptionListList>(
|
|
1609
|
-
params ? ['cfg-payments-subscriptions', params] : 'cfg-payments-subscriptions',
|
|
1610
|
-
() => Fetchers.getPaymentsSubscriptionsList(params, client)
|
|
1611
|
-
)
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
/**
|
|
1616
|
-
* API operation
|
|
1617
|
-
*
|
|
1618
|
-
* @method POST
|
|
1619
|
-
* @path /cfg/payments/subscriptions/
|
|
1620
|
-
*/
|
|
1621
|
-
export function useCreatePaymentsSubscriptionsCreate() {
|
|
1622
|
-
const { mutate } = useSWRConfig()
|
|
1623
|
-
|
|
1624
|
-
return async (data: SubscriptionCreateRequest, client?: API): Promise<SubscriptionCreate> => {
|
|
1625
|
-
const result = await Fetchers.createPaymentsSubscriptionsCreate(data, client)
|
|
1626
|
-
// Revalidate related queries
|
|
1627
|
-
mutate('cfg-payments-subscriptions')
|
|
1628
|
-
return result
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
/**
|
|
1634
|
-
* API operation
|
|
1635
|
-
*
|
|
1636
|
-
* @method GET
|
|
1637
|
-
* @path /cfg/payments/subscriptions/{id}/
|
|
1638
|
-
*/
|
|
1639
|
-
export function usePaymentsSubscriptionsRetrieve(id: string, client?: API): ReturnType<typeof useSWR<Subscription>> {
|
|
1640
|
-
return useSWR<Subscription>(
|
|
1641
|
-
['cfg-payments-subscription', id],
|
|
1642
|
-
() => Fetchers.getPaymentsSubscriptionsRetrieve(id, client)
|
|
1643
|
-
)
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
/**
|
|
1648
|
-
* API operation
|
|
1649
|
-
*
|
|
1650
|
-
* @method PUT
|
|
1651
|
-
* @path /cfg/payments/subscriptions/{id}/
|
|
1652
|
-
*/
|
|
1653
|
-
export function useUpdatePaymentsSubscriptionsUpdate() {
|
|
1654
|
-
const { mutate } = useSWRConfig()
|
|
1655
|
-
|
|
1656
|
-
return async (id: string, data: SubscriptionRequest, client?: API): Promise<Subscription> => {
|
|
1657
|
-
const result = await Fetchers.updatePaymentsSubscriptionsUpdate(id, data, client)
|
|
1658
|
-
// Revalidate related queries
|
|
1659
|
-
mutate('cfg-payments-subscriptions')
|
|
1660
|
-
mutate('cfg-payments-subscription')
|
|
1661
|
-
return result
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
/**
|
|
1667
|
-
* API operation
|
|
1668
|
-
*
|
|
1669
|
-
* @method PATCH
|
|
1670
|
-
* @path /cfg/payments/subscriptions/{id}/
|
|
1671
|
-
*/
|
|
1672
|
-
export function usePartialUpdatePaymentsSubscriptionsPartialUpdate() {
|
|
1673
|
-
const { mutate } = useSWRConfig()
|
|
1674
|
-
|
|
1675
|
-
return async (id: string, data?: PatchedSubscriptionRequest, client?: API): Promise<Subscription> => {
|
|
1676
|
-
const result = await Fetchers.partialUpdatePaymentsSubscriptionsPartialUpdate(id, data, client)
|
|
1677
|
-
// Revalidate related queries
|
|
1678
|
-
mutate('cfg-payments-subscriptions-partial')
|
|
1679
|
-
return result
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
/**
|
|
1685
|
-
* API operation
|
|
1686
|
-
*
|
|
1687
|
-
* @method DELETE
|
|
1688
|
-
* @path /cfg/payments/subscriptions/{id}/
|
|
1689
|
-
*/
|
|
1690
|
-
export function useDeletePaymentsSubscriptionsDestroy() {
|
|
1691
|
-
const { mutate } = useSWRConfig()
|
|
1692
|
-
|
|
1693
|
-
return async (id: string, client?: API): Promise<void> => {
|
|
1694
|
-
const result = await Fetchers.deletePaymentsSubscriptionsDestroy(id, client)
|
|
1695
|
-
// Revalidate related queries
|
|
1696
|
-
mutate('cfg-payments-subscriptions')
|
|
1697
|
-
mutate('cfg-payments-subscription')
|
|
1698
|
-
return result
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
/**
|
|
1704
|
-
* API operation
|
|
1705
|
-
*
|
|
1706
|
-
* @method POST
|
|
1707
|
-
* @path /cfg/payments/subscriptions/{id}/increment_usage/
|
|
1708
|
-
*/
|
|
1709
|
-
export function useCreatePaymentsSubscriptionsIncrementUsageCreate() {
|
|
1710
|
-
const { mutate } = useSWRConfig()
|
|
1711
|
-
|
|
1712
|
-
return async (id: string, data: SubscriptionRequest, client?: API): Promise<Subscription> => {
|
|
1713
|
-
const result = await Fetchers.createPaymentsSubscriptionsIncrementUsageCreate(id, data, client)
|
|
1714
|
-
// Revalidate related queries
|
|
1715
|
-
mutate('cfg-payments-subscriptions-increment-usage')
|
|
1716
|
-
return result
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
/**
|
|
1722
|
-
* API operation
|
|
1723
|
-
*
|
|
1724
|
-
* @method POST
|
|
1725
|
-
* @path /cfg/payments/subscriptions/{id}/update_status/
|
|
1726
|
-
*/
|
|
1727
|
-
export function useCreatePaymentsSubscriptionsUpdateStatusCreate() {
|
|
1728
|
-
const { mutate } = useSWRConfig()
|
|
1729
|
-
|
|
1730
|
-
return async (id: string, data: SubscriptionRequest, client?: API): Promise<Subscription> => {
|
|
1731
|
-
const result = await Fetchers.createPaymentsSubscriptionsUpdateStatusCreate(id, data, client)
|
|
1732
|
-
// Revalidate related queries
|
|
1733
|
-
mutate('cfg-payments-subscriptions-status')
|
|
1734
|
-
return result
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
/**
|
|
1740
|
-
* API operation
|
|
1741
|
-
*
|
|
1742
|
-
* @method GET
|
|
1743
|
-
* @path /cfg/payments/subscriptions/analytics/
|
|
1744
|
-
*/
|
|
1745
|
-
export function usePaymentsSubscriptionsAnalyticsRetrieve(client?: API): ReturnType<typeof useSWR<Subscription>> {
|
|
1746
|
-
return useSWR<Subscription>(
|
|
1747
|
-
'cfg-payments-subscriptions-analytic',
|
|
1748
|
-
() => Fetchers.getPaymentsSubscriptionsAnalyticsRetrieve(client)
|
|
1749
|
-
)
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
/**
|
|
1754
|
-
* API operation
|
|
1755
|
-
*
|
|
1756
|
-
* @method GET
|
|
1757
|
-
* @path /cfg/payments/subscriptions/by_status/
|
|
1758
|
-
*/
|
|
1759
|
-
export function usePaymentsSubscriptionsByStatusRetrieve(client?: API): ReturnType<typeof useSWR<Subscription>> {
|
|
1760
|
-
return useSWR<Subscription>(
|
|
1761
|
-
'cfg-payments-subscriptions-by-statu',
|
|
1762
|
-
() => Fetchers.getPaymentsSubscriptionsByStatusRetrieve(client)
|
|
1763
|
-
)
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
/**
|
|
1768
|
-
* API operation
|
|
1769
|
-
*
|
|
1770
|
-
* @method GET
|
|
1771
|
-
* @path /cfg/payments/subscriptions/by_tier/
|
|
1772
|
-
*/
|
|
1773
|
-
export function usePaymentsSubscriptionsByTierRetrieve(client?: API): ReturnType<typeof useSWR<Subscription>> {
|
|
1774
|
-
return useSWR<Subscription>(
|
|
1775
|
-
'cfg-payments-subscriptions-by-tier',
|
|
1776
|
-
() => Fetchers.getPaymentsSubscriptionsByTierRetrieve(client)
|
|
1777
|
-
)
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
/**
|
|
1782
|
-
* API operation
|
|
1783
|
-
*
|
|
1784
|
-
* @method GET
|
|
1785
|
-
* @path /cfg/payments/subscriptions/health/
|
|
1786
|
-
*/
|
|
1787
|
-
export function usePaymentsSubscriptionsHealthRetrieve(client?: API): ReturnType<typeof useSWR<Subscription>> {
|
|
1788
|
-
return useSWR<Subscription>(
|
|
1789
|
-
'cfg-payments-subscriptions-health',
|
|
1790
|
-
() => Fetchers.getPaymentsSubscriptionsHealthRetrieve(client)
|
|
1791
|
-
)
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
/**
|
|
1796
|
-
* API operation
|
|
1797
|
-
*
|
|
1798
|
-
* @method GET
|
|
1799
|
-
* @path /cfg/payments/subscriptions/stats/
|
|
1800
|
-
*/
|
|
1801
|
-
export function usePaymentsSubscriptionsStatsRetrieve(client?: API): ReturnType<typeof useSWR<Subscription>> {
|
|
1802
|
-
return useSWR<Subscription>(
|
|
1803
|
-
'cfg-payments-subscriptions-stat',
|
|
1804
|
-
() => Fetchers.getPaymentsSubscriptionsStatsRetrieve(client)
|
|
1805
|
-
)
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
/**
|
|
1810
|
-
* API operation
|
|
1811
|
-
*
|
|
1812
|
-
* @method GET
|
|
1813
|
-
* @path /cfg/payments/tariffs/
|
|
1814
|
-
*/
|
|
1815
|
-
export function usePaymentsTariffsList(params?: { is_active?: boolean; ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedTariffList>> {
|
|
1816
|
-
return useSWR<PaginatedTariffList>(
|
|
1817
|
-
params ? ['cfg-payments-tariffs', params] : 'cfg-payments-tariffs',
|
|
1818
|
-
() => Fetchers.getPaymentsTariffsList(params, client)
|
|
1819
|
-
)
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
/**
|
|
1824
|
-
* API operation
|
|
1825
|
-
*
|
|
1826
|
-
* @method GET
|
|
1827
|
-
* @path /cfg/payments/tariffs/{id}/
|
|
1828
|
-
*/
|
|
1829
|
-
export function usePaymentsTariffsRetrieve(id: number, client?: API): ReturnType<typeof useSWR<Tariff>> {
|
|
1830
|
-
return useSWR<Tariff>(
|
|
1831
|
-
['cfg-payments-tariff', id],
|
|
1832
|
-
() => Fetchers.getPaymentsTariffsRetrieve(id, client)
|
|
1833
|
-
)
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
/**
|
|
1838
|
-
* API operation
|
|
1839
|
-
*
|
|
1840
|
-
* @method GET
|
|
1841
|
-
* @path /cfg/payments/tariffs/{id}/endpoint_groups/
|
|
1842
|
-
*/
|
|
1843
|
-
export function usePaymentsTariffsEndpointGroupsRetrieve(id: number, client?: API): ReturnType<typeof useSWR<Tariff>> {
|
|
1844
|
-
return useSWR<Tariff>(
|
|
1845
|
-
['cfg-payments-tariffs-endpoint-group', id],
|
|
1846
|
-
() => Fetchers.getPaymentsTariffsEndpointGroupsRetrieve(id, client)
|
|
1847
|
-
)
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
/**
|
|
1852
|
-
* API operation
|
|
1853
|
-
*
|
|
1854
|
-
* @method GET
|
|
1855
|
-
* @path /cfg/payments/tariffs/free/
|
|
1856
|
-
*/
|
|
1857
|
-
export function usePaymentsTariffsFreeRetrieve(client?: API): ReturnType<typeof useSWR<Tariff>> {
|
|
1858
|
-
return useSWR<Tariff>(
|
|
1859
|
-
'cfg-payments-tariffs-free',
|
|
1860
|
-
() => Fetchers.getPaymentsTariffsFreeRetrieve(client)
|
|
1861
|
-
)
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
/**
|
|
1866
|
-
* API operation
|
|
1867
|
-
*
|
|
1868
|
-
* @method GET
|
|
1869
|
-
* @path /cfg/payments/tariffs/health/
|
|
1870
|
-
*/
|
|
1871
|
-
export function usePaymentsTariffsHealthRetrieve(client?: API): ReturnType<typeof useSWR<Tariff>> {
|
|
1872
|
-
return useSWR<Tariff>(
|
|
1873
|
-
'cfg-payments-tariffs-health',
|
|
1874
|
-
() => Fetchers.getPaymentsTariffsHealthRetrieve(client)
|
|
1875
|
-
)
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
/**
|
|
1880
|
-
* API operation
|
|
1881
|
-
*
|
|
1882
|
-
* @method GET
|
|
1883
|
-
* @path /cfg/payments/tariffs/paid/
|
|
1884
|
-
*/
|
|
1885
|
-
export function usePaymentsTariffsPaidRetrieve(client?: API): ReturnType<typeof useSWR<Tariff>> {
|
|
1886
|
-
return useSWR<Tariff>(
|
|
1887
|
-
'cfg-payments-tariffs-paid',
|
|
1888
|
-
() => Fetchers.getPaymentsTariffsPaidRetrieve(client)
|
|
1889
|
-
)
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
/**
|
|
1894
|
-
* API operation
|
|
1895
|
-
*
|
|
1896
|
-
* @method GET
|
|
1897
|
-
* @path /cfg/payments/tariffs/stats/
|
|
1898
|
-
*/
|
|
1899
|
-
export function usePaymentsTariffsStatsRetrieve(client?: API): ReturnType<typeof useSWR<Tariff>> {
|
|
1900
|
-
return useSWR<Tariff>(
|
|
1901
|
-
'cfg-payments-tariffs-stat',
|
|
1902
|
-
() => Fetchers.getPaymentsTariffsStatsRetrieve(client)
|
|
1903
|
-
)
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
/**
|
|
1908
|
-
* API operation
|
|
1909
|
-
*
|
|
1910
|
-
* @method GET
|
|
1911
|
-
* @path /cfg/payments/transactions/
|
|
1912
|
-
*/
|
|
1913
|
-
export function usePaymentsTransactionsList(params?: { ordering?: string; page?: number; page_size?: number; payment_id?: string; search?: string; transaction_type?: string; user?: number }, client?: API): ReturnType<typeof useSWR<PaginatedTransactionList>> {
|
|
1914
|
-
return useSWR<PaginatedTransactionList>(
|
|
1915
|
-
params ? ['cfg-payments-transactions', params] : 'cfg-payments-transactions',
|
|
1916
|
-
() => Fetchers.getPaymentsTransactionsList(params, client)
|
|
1917
|
-
)
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
/**
|
|
1922
|
-
* API operation
|
|
1923
|
-
*
|
|
1924
|
-
* @method GET
|
|
1925
|
-
* @path /cfg/payments/transactions/{id}/
|
|
1926
|
-
*/
|
|
1927
|
-
export function usePaymentsTransactionsRetrieve(id: string, client?: API): ReturnType<typeof useSWR<Transaction>> {
|
|
1928
|
-
return useSWR<Transaction>(
|
|
1929
|
-
['cfg-payments-transaction', id],
|
|
1930
|
-
() => Fetchers.getPaymentsTransactionsRetrieve(id, client)
|
|
1931
|
-
)
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
/**
|
|
1936
|
-
* API operation
|
|
1937
|
-
*
|
|
1938
|
-
* @method GET
|
|
1939
|
-
* @path /cfg/payments/transactions/by_type/
|
|
1940
|
-
*/
|
|
1941
|
-
export function usePaymentsTransactionsByTypeRetrieve(client?: API): ReturnType<typeof useSWR<Transaction>> {
|
|
1942
|
-
return useSWR<Transaction>(
|
|
1943
|
-
'cfg-payments-transactions-by-type',
|
|
1944
|
-
() => Fetchers.getPaymentsTransactionsByTypeRetrieve(client)
|
|
1945
|
-
)
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
/**
|
|
1950
|
-
* API operation
|
|
1951
|
-
*
|
|
1952
|
-
* @method GET
|
|
1953
|
-
* @path /cfg/payments/transactions/health/
|
|
1954
|
-
*/
|
|
1955
|
-
export function usePaymentsTransactionsHealthRetrieve(client?: API): ReturnType<typeof useSWR<Transaction>> {
|
|
1956
|
-
return useSWR<Transaction>(
|
|
1957
|
-
'cfg-payments-transactions-health',
|
|
1958
|
-
() => Fetchers.getPaymentsTransactionsHealthRetrieve(client)
|
|
1959
|
-
)
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
/**
|
|
1964
|
-
* API operation
|
|
1965
|
-
*
|
|
1966
|
-
* @method GET
|
|
1967
|
-
* @path /cfg/payments/transactions/recent/
|
|
1968
|
-
*/
|
|
1969
|
-
export function usePaymentsTransactionsRecentRetrieve(client?: API): ReturnType<typeof useSWR<Transaction>> {
|
|
1970
|
-
return useSWR<Transaction>(
|
|
1971
|
-
'cfg-payments-transactions-recent',
|
|
1972
|
-
() => Fetchers.getPaymentsTransactionsRecentRetrieve(client)
|
|
1973
|
-
)
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
/**
|
|
1978
|
-
* API operation
|
|
1979
|
-
*
|
|
1980
|
-
* @method GET
|
|
1981
|
-
* @path /cfg/payments/transactions/stats/
|
|
1982
|
-
*/
|
|
1983
|
-
export function usePaymentsTransactionsStatsRetrieve(client?: API): ReturnType<typeof useSWR<Transaction>> {
|
|
1984
|
-
return useSWR<Transaction>(
|
|
1985
|
-
'cfg-payments-transactions-stat',
|
|
1986
|
-
() => Fetchers.getPaymentsTransactionsStatsRetrieve(client)
|
|
1987
|
-
)
|
|
1988
|
-
}
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
/**
|
|
1992
|
-
* API operation
|
|
1993
|
-
*
|
|
1994
|
-
* @method GET
|
|
1995
|
-
* @path /cfg/payments/users/
|
|
1996
|
-
*/
|
|
1997
|
-
export function usePaymentsUsersList(params?: { currency__code?: string; ordering?: string; page?: number; page_size?: number; provider?: string; search?: string; status?: string }, client?: API): ReturnType<typeof useSWR<PaginatedPaymentListList>> {
|
|
1998
|
-
return useSWR<PaginatedPaymentListList>(
|
|
1999
|
-
params ? ['cfg-payments-users', params] : 'cfg-payments-users',
|
|
2000
|
-
() => Fetchers.getPaymentsUsersList(params, client)
|
|
2001
|
-
)
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
/**
|
|
2006
|
-
* API operation
|
|
2007
|
-
*
|
|
2008
|
-
* @method POST
|
|
2009
|
-
* @path /cfg/payments/users/
|
|
2010
|
-
*/
|
|
2011
|
-
export function useCreatePaymentsUsersCreate() {
|
|
2012
|
-
const { mutate } = useSWRConfig()
|
|
2013
|
-
|
|
2014
|
-
return async (data: PaymentCreateRequest, client?: API): Promise<PaymentCreate> => {
|
|
2015
|
-
const result = await Fetchers.createPaymentsUsersCreate(data, client)
|
|
2016
|
-
// Revalidate related queries
|
|
2017
|
-
mutate('cfg-payments-users')
|
|
2018
|
-
return result
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
/**
|
|
2024
|
-
* API operation
|
|
2025
|
-
*
|
|
2026
|
-
* @method GET
|
|
2027
|
-
* @path /cfg/payments/users/{id}/
|
|
2028
|
-
*/
|
|
2029
|
-
export function usePaymentsUsersRetrieve(id: string, client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
2030
|
-
return useSWR<Payment>(
|
|
2031
|
-
['cfg-payments-user', id],
|
|
2032
|
-
() => Fetchers.getPaymentsUsersRetrieve(id, client)
|
|
2033
|
-
)
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
/**
|
|
2038
|
-
* API operation
|
|
2039
|
-
*
|
|
2040
|
-
* @method PUT
|
|
2041
|
-
* @path /cfg/payments/users/{id}/
|
|
2042
|
-
*/
|
|
2043
|
-
export function useUpdatePaymentsUsersUpdate() {
|
|
2044
|
-
const { mutate } = useSWRConfig()
|
|
2045
|
-
|
|
2046
|
-
return async (id: string, data: PaymentRequest, client?: API): Promise<Payment> => {
|
|
2047
|
-
const result = await Fetchers.updatePaymentsUsersUpdate(id, data, client)
|
|
2048
|
-
// Revalidate related queries
|
|
2049
|
-
mutate('cfg-payments-users')
|
|
2050
|
-
mutate('cfg-payments-user')
|
|
2051
|
-
return result
|
|
2052
|
-
}
|
|
2053
|
-
}
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
/**
|
|
2057
|
-
* API operation
|
|
2058
|
-
*
|
|
2059
|
-
* @method PATCH
|
|
2060
|
-
* @path /cfg/payments/users/{id}/
|
|
2061
|
-
*/
|
|
2062
|
-
export function usePartialUpdatePaymentsUsersPartialUpdate() {
|
|
2063
|
-
const { mutate } = useSWRConfig()
|
|
2064
|
-
|
|
2065
|
-
return async (id: string, data?: PatchedPaymentRequest, client?: API): Promise<Payment> => {
|
|
2066
|
-
const result = await Fetchers.partialUpdatePaymentsUsersPartialUpdate(id, data, client)
|
|
2067
|
-
// Revalidate related queries
|
|
2068
|
-
mutate('cfg-payments-users-partial')
|
|
2069
|
-
return result
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
/**
|
|
2075
|
-
* API operation
|
|
2076
|
-
*
|
|
2077
|
-
* @method DELETE
|
|
2078
|
-
* @path /cfg/payments/users/{id}/
|
|
2079
|
-
*/
|
|
2080
|
-
export function useDeletePaymentsUsersDestroy() {
|
|
2081
|
-
const { mutate } = useSWRConfig()
|
|
2082
|
-
|
|
2083
|
-
return async (id: string, client?: API): Promise<void> => {
|
|
2084
|
-
const result = await Fetchers.deletePaymentsUsersDestroy(id, client)
|
|
2085
|
-
// Revalidate related queries
|
|
2086
|
-
mutate('cfg-payments-users')
|
|
2087
|
-
mutate('cfg-payments-user')
|
|
2088
|
-
return result
|
|
2089
|
-
}
|
|
2090
|
-
}
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
/**
|
|
2094
|
-
* API operation
|
|
2095
|
-
*
|
|
2096
|
-
* @method POST
|
|
2097
|
-
* @path /cfg/payments/users/{id}/cancel/
|
|
2098
|
-
*/
|
|
2099
|
-
export function useCreatePaymentsUsersCancelCreate() {
|
|
2100
|
-
const { mutate } = useSWRConfig()
|
|
2101
|
-
|
|
2102
|
-
return async (id: string, data: PaymentRequest, client?: API): Promise<Payment> => {
|
|
2103
|
-
const result = await Fetchers.createPaymentsUsersCancelCreate(id, data, client)
|
|
2104
|
-
// Revalidate related queries
|
|
2105
|
-
mutate('cfg-payments-users-cancel')
|
|
2106
|
-
return result
|
|
2107
|
-
}
|
|
2108
|
-
}
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
/**
|
|
2112
|
-
* API operation
|
|
2113
|
-
*
|
|
2114
|
-
* @method POST
|
|
2115
|
-
* @path /cfg/payments/users/{id}/check_status/
|
|
2116
|
-
*/
|
|
2117
|
-
export function useCreatePaymentsUsersCheckStatusCreate() {
|
|
2118
|
-
const { mutate } = useSWRConfig()
|
|
2119
|
-
|
|
2120
|
-
return async (id: string, data: PaymentRequest, client?: API): Promise<Payment> => {
|
|
2121
|
-
const result = await Fetchers.createPaymentsUsersCheckStatusCreate(id, data, client)
|
|
2122
|
-
// Revalidate related queries
|
|
2123
|
-
mutate('cfg-payments-users-check-status')
|
|
2124
|
-
return result
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
/**
|
|
2130
|
-
* API operation
|
|
2131
|
-
*
|
|
2132
|
-
* @method GET
|
|
2133
|
-
* @path /cfg/payments/users/{user_pk}/api-keys/
|
|
2134
|
-
*/
|
|
2135
|
-
export function usePaymentsUsersApiKeysList(user_pk: number, params?: { is_active?: boolean; ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedAPIKeyListList>> {
|
|
2136
|
-
return useSWR<PaginatedAPIKeyListList>(
|
|
2137
|
-
['cfg-payments-users-api-keys', user_pk],
|
|
2138
|
-
() => Fetchers.getPaymentsUsersApiKeysList(user_pk, params, client)
|
|
2139
|
-
)
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
/**
|
|
2144
|
-
* API operation
|
|
2145
|
-
*
|
|
2146
|
-
* @method POST
|
|
2147
|
-
* @path /cfg/payments/users/{user_pk}/api-keys/
|
|
2148
|
-
*/
|
|
2149
|
-
export function useCreatePaymentsUsersApiKeysCreate() {
|
|
2150
|
-
const { mutate } = useSWRConfig()
|
|
2151
|
-
|
|
2152
|
-
return async (user_pk: number, data: APIKeyCreateRequest, client?: API): Promise<APIKeyCreate> => {
|
|
2153
|
-
const result = await Fetchers.createPaymentsUsersApiKeysCreate(user_pk, data, client)
|
|
2154
|
-
// Revalidate related queries
|
|
2155
|
-
mutate('cfg-payments-users-api-keys')
|
|
2156
|
-
return result
|
|
2157
|
-
}
|
|
2158
|
-
}
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
/**
|
|
2162
|
-
* API operation
|
|
2163
|
-
*
|
|
2164
|
-
* @method GET
|
|
2165
|
-
* @path /cfg/payments/users/{user_pk}/api-keys/{id}/
|
|
2166
|
-
*/
|
|
2167
|
-
export function usePaymentsUsersApiKeysRetrieve(id: string, user_pk: number, client?: API): ReturnType<typeof useSWR<APIKeyDetail>> {
|
|
2168
|
-
return useSWR<APIKeyDetail>(
|
|
2169
|
-
['cfg-payments-users-api-key', id],
|
|
2170
|
-
() => Fetchers.getPaymentsUsersApiKeysRetrieve(id, user_pk, client)
|
|
2171
|
-
)
|
|
2172
|
-
}
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
/**
|
|
2176
|
-
* API operation
|
|
2177
|
-
*
|
|
2178
|
-
* @method PUT
|
|
2179
|
-
* @path /cfg/payments/users/{user_pk}/api-keys/{id}/
|
|
2180
|
-
*/
|
|
2181
|
-
export function useUpdatePaymentsUsersApiKeysUpdate() {
|
|
2182
|
-
const { mutate } = useSWRConfig()
|
|
2183
|
-
|
|
2184
|
-
return async (id: string, user_pk: number, data: APIKeyUpdateRequest, client?: API): Promise<APIKeyUpdate> => {
|
|
2185
|
-
const result = await Fetchers.updatePaymentsUsersApiKeysUpdate(id, user_pk, data, client)
|
|
2186
|
-
// Revalidate related queries
|
|
2187
|
-
mutate('cfg-payments-users-api-keys')
|
|
2188
|
-
mutate('cfg-payments-users-api-key')
|
|
2189
|
-
return result
|
|
2190
|
-
}
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
/**
|
|
2195
|
-
* API operation
|
|
2196
|
-
*
|
|
2197
|
-
* @method PATCH
|
|
2198
|
-
* @path /cfg/payments/users/{user_pk}/api-keys/{id}/
|
|
2199
|
-
*/
|
|
2200
|
-
export function usePartialUpdatePaymentsUsersApiKeysPartialUpdate() {
|
|
2201
|
-
const { mutate } = useSWRConfig()
|
|
2202
|
-
|
|
2203
|
-
return async (id: string, user_pk: number, data?: PatchedAPIKeyUpdateRequest, client?: API): Promise<APIKeyUpdate> => {
|
|
2204
|
-
const result = await Fetchers.partialUpdatePaymentsUsersApiKeysPartialUpdate(id, user_pk, data, client)
|
|
2205
|
-
// Revalidate related queries
|
|
2206
|
-
mutate('cfg-payments-users-api-keys-partial')
|
|
2207
|
-
return result
|
|
2208
|
-
}
|
|
2209
|
-
}
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
/**
|
|
2213
|
-
* API operation
|
|
2214
|
-
*
|
|
2215
|
-
* @method DELETE
|
|
2216
|
-
* @path /cfg/payments/users/{user_pk}/api-keys/{id}/
|
|
2217
|
-
*/
|
|
2218
|
-
export function useDeletePaymentsUsersApiKeysDestroy() {
|
|
2219
|
-
const { mutate } = useSWRConfig()
|
|
2220
|
-
|
|
2221
|
-
return async (id: string, user_pk: number, client?: API): Promise<void> => {
|
|
2222
|
-
const result = await Fetchers.deletePaymentsUsersApiKeysDestroy(id, user_pk, client)
|
|
2223
|
-
// Revalidate related queries
|
|
2224
|
-
mutate('cfg-payments-users-api-keys')
|
|
2225
|
-
mutate('cfg-payments-users-api-key')
|
|
2226
|
-
return result
|
|
2227
|
-
}
|
|
2228
|
-
}
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
/**
|
|
2232
|
-
* API operation
|
|
2233
|
-
*
|
|
2234
|
-
* @method POST
|
|
2235
|
-
* @path /cfg/payments/users/{user_pk}/api-keys/{id}/perform_action/
|
|
2236
|
-
*/
|
|
2237
|
-
export function useCreatePaymentsUsersApiKeysPerformActionCreate() {
|
|
2238
|
-
const { mutate } = useSWRConfig()
|
|
2239
|
-
|
|
2240
|
-
return async (id: string, user_pk: number, client?: API): Promise<APIKeyDetail> => {
|
|
2241
|
-
const result = await Fetchers.createPaymentsUsersApiKeysPerformActionCreate(id, user_pk, client)
|
|
2242
|
-
// Revalidate related queries
|
|
2243
|
-
mutate('cfg-payments-users-api-keys-perform-action')
|
|
2244
|
-
return result
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
/**
|
|
2250
|
-
* API operation
|
|
2251
|
-
*
|
|
2252
|
-
* @method GET
|
|
2253
|
-
* @path /cfg/payments/users/{user_pk}/api-keys/active/
|
|
2254
|
-
*/
|
|
2255
|
-
export function usePaymentsUsersApiKeysActiveRetrieve(user_pk: number, client?: API): ReturnType<typeof useSWR<APIKeyDetail>> {
|
|
2256
|
-
return useSWR<APIKeyDetail>(
|
|
2257
|
-
['cfg-payments-users-api-keys-active', user_pk],
|
|
2258
|
-
() => Fetchers.getPaymentsUsersApiKeysActiveRetrieve(user_pk, client)
|
|
2259
|
-
)
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
/**
|
|
2264
|
-
* API operation
|
|
2265
|
-
*
|
|
2266
|
-
* @method GET
|
|
2267
|
-
* @path /cfg/payments/users/{user_pk}/api-keys/health/
|
|
2268
|
-
*/
|
|
2269
|
-
export function usePaymentsUsersApiKeysHealthRetrieve(user_pk: number, client?: API): ReturnType<typeof useSWR<APIKeyDetail>> {
|
|
2270
|
-
return useSWR<APIKeyDetail>(
|
|
2271
|
-
['cfg-payments-users-api-keys-health', user_pk],
|
|
2272
|
-
() => Fetchers.getPaymentsUsersApiKeysHealthRetrieve(user_pk, client)
|
|
2273
|
-
)
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
/**
|
|
2278
|
-
* API operation
|
|
2279
|
-
*
|
|
2280
|
-
* @method GET
|
|
2281
|
-
* @path /cfg/payments/users/{user_pk}/api-keys/stats/
|
|
2282
|
-
*/
|
|
2283
|
-
export function usePaymentsUsersApiKeysStatsRetrieve(user_pk: number, client?: API): ReturnType<typeof useSWR<APIKeyDetail>> {
|
|
2284
|
-
return useSWR<APIKeyDetail>(
|
|
2285
|
-
['cfg-payments-users-api-keys-stat', user_pk],
|
|
2286
|
-
() => Fetchers.getPaymentsUsersApiKeysStatsRetrieve(user_pk, client)
|
|
31
|
+
export function usePaymentsBalanceRetrieve(client?: API): ReturnType<typeof useSWR<any>> {
|
|
32
|
+
return useSWR<any>(
|
|
33
|
+
'cfg-payments-balance',
|
|
34
|
+
() => Fetchers.getPaymentsBalanceRetrieve(client)
|
|
2287
35
|
)
|
|
2288
36
|
}
|
|
2289
37
|
|
|
@@ -2292,12 +40,12 @@ export function usePaymentsUsersApiKeysStatsRetrieve(user_pk: number, client?: A
|
|
|
2292
40
|
* API operation
|
|
2293
41
|
*
|
|
2294
42
|
* @method GET
|
|
2295
|
-
* @path /cfg/payments/
|
|
43
|
+
* @path /cfg/payments/currencies/
|
|
2296
44
|
*/
|
|
2297
|
-
export function
|
|
2298
|
-
return useSWR<
|
|
2299
|
-
|
|
2300
|
-
() => Fetchers.
|
|
45
|
+
export function usePaymentsCurrenciesRetrieve(client?: API): ReturnType<typeof useSWR<any>> {
|
|
46
|
+
return useSWR<any>(
|
|
47
|
+
'cfg-payments-currencie',
|
|
48
|
+
() => Fetchers.getPaymentsCurrenciesRetrieve(client)
|
|
2301
49
|
)
|
|
2302
50
|
}
|
|
2303
51
|
|
|
@@ -2306,176 +54,12 @@ export function usePaymentsUsersApiKeysSummaryRetrieve(user_pk: number, client?:
|
|
|
2306
54
|
* API operation
|
|
2307
55
|
*
|
|
2308
56
|
* @method GET
|
|
2309
|
-
* @path /cfg/payments/
|
|
57
|
+
* @path /cfg/payments/payments/
|
|
2310
58
|
*/
|
|
2311
|
-
export function
|
|
59
|
+
export function usePaymentsPaymentsList(params?: { page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedPaymentListList>> {
|
|
2312
60
|
return useSWR<PaginatedPaymentListList>(
|
|
2313
|
-
['cfg-payments-
|
|
2314
|
-
() => Fetchers.
|
|
2315
|
-
)
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
/**
|
|
2320
|
-
* API operation
|
|
2321
|
-
*
|
|
2322
|
-
* @method POST
|
|
2323
|
-
* @path /cfg/payments/users/{user_pk}/payment/
|
|
2324
|
-
*/
|
|
2325
|
-
export function useCreatePaymentsUsersPaymentCreate() {
|
|
2326
|
-
const { mutate } = useSWRConfig()
|
|
2327
|
-
|
|
2328
|
-
return async (user_pk: number, data: PaymentCreateRequest, client?: API): Promise<PaymentCreate> => {
|
|
2329
|
-
const result = await Fetchers.createPaymentsUsersPaymentCreate(user_pk, data, client)
|
|
2330
|
-
// Revalidate related queries
|
|
2331
|
-
mutate('cfg-payments-users-payment')
|
|
2332
|
-
return result
|
|
2333
|
-
}
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
/**
|
|
2338
|
-
* API operation
|
|
2339
|
-
*
|
|
2340
|
-
* @method GET
|
|
2341
|
-
* @path /cfg/payments/users/{user_pk}/payment/{id}/
|
|
2342
|
-
*/
|
|
2343
|
-
export function usePaymentsUsersPaymentRetrieve(id: string, user_pk: number, client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
2344
|
-
return useSWR<Payment>(
|
|
2345
|
-
['cfg-payments-users-payment', id],
|
|
2346
|
-
() => Fetchers.getPaymentsUsersPaymentRetrieve(id, user_pk, client)
|
|
2347
|
-
)
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
/**
|
|
2352
|
-
* API operation
|
|
2353
|
-
*
|
|
2354
|
-
* @method PUT
|
|
2355
|
-
* @path /cfg/payments/users/{user_pk}/payment/{id}/
|
|
2356
|
-
*/
|
|
2357
|
-
export function useUpdatePaymentsUsersPaymentUpdate() {
|
|
2358
|
-
const { mutate } = useSWRConfig()
|
|
2359
|
-
|
|
2360
|
-
return async (id: string, user_pk: number, data: PaymentRequest, client?: API): Promise<Payment> => {
|
|
2361
|
-
const result = await Fetchers.updatePaymentsUsersPaymentUpdate(id, user_pk, data, client)
|
|
2362
|
-
// Revalidate related queries
|
|
2363
|
-
mutate('cfg-payments-users-payment')
|
|
2364
|
-
return result
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
/**
|
|
2370
|
-
* API operation
|
|
2371
|
-
*
|
|
2372
|
-
* @method PATCH
|
|
2373
|
-
* @path /cfg/payments/users/{user_pk}/payment/{id}/
|
|
2374
|
-
*/
|
|
2375
|
-
export function usePartialUpdatePaymentsUsersPaymentPartialUpdate() {
|
|
2376
|
-
const { mutate } = useSWRConfig()
|
|
2377
|
-
|
|
2378
|
-
return async (id: string, user_pk: number, data?: PatchedPaymentRequest, client?: API): Promise<Payment> => {
|
|
2379
|
-
const result = await Fetchers.partialUpdatePaymentsUsersPaymentPartialUpdate(id, user_pk, data, client)
|
|
2380
|
-
// Revalidate related queries
|
|
2381
|
-
mutate('cfg-payments-users-payment-partial')
|
|
2382
|
-
return result
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
/**
|
|
2388
|
-
* API operation
|
|
2389
|
-
*
|
|
2390
|
-
* @method DELETE
|
|
2391
|
-
* @path /cfg/payments/users/{user_pk}/payment/{id}/
|
|
2392
|
-
*/
|
|
2393
|
-
export function useDeletePaymentsUsersPaymentDestroy() {
|
|
2394
|
-
const { mutate } = useSWRConfig()
|
|
2395
|
-
|
|
2396
|
-
return async (id: string, user_pk: number, client?: API): Promise<void> => {
|
|
2397
|
-
const result = await Fetchers.deletePaymentsUsersPaymentDestroy(id, user_pk, client)
|
|
2398
|
-
// Revalidate related queries
|
|
2399
|
-
mutate('cfg-payments-users-payment')
|
|
2400
|
-
return result
|
|
2401
|
-
}
|
|
2402
|
-
}
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
/**
|
|
2406
|
-
* API operation
|
|
2407
|
-
*
|
|
2408
|
-
* @method POST
|
|
2409
|
-
* @path /cfg/payments/users/{user_pk}/payment/{id}/cancel/
|
|
2410
|
-
*/
|
|
2411
|
-
export function useCreatePaymentsUsersPaymentCancelCreate() {
|
|
2412
|
-
const { mutate } = useSWRConfig()
|
|
2413
|
-
|
|
2414
|
-
return async (id: string, user_pk: number, data: PaymentRequest, client?: API): Promise<Payment> => {
|
|
2415
|
-
const result = await Fetchers.createPaymentsUsersPaymentCancelCreate(id, user_pk, data, client)
|
|
2416
|
-
// Revalidate related queries
|
|
2417
|
-
mutate('cfg-payments-users-payment-cancel')
|
|
2418
|
-
return result
|
|
2419
|
-
}
|
|
2420
|
-
}
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
/**
|
|
2424
|
-
* API operation
|
|
2425
|
-
*
|
|
2426
|
-
* @method POST
|
|
2427
|
-
* @path /cfg/payments/users/{user_pk}/payment/{id}/check_status/
|
|
2428
|
-
*/
|
|
2429
|
-
export function useCreatePaymentsUsersPaymentCheckStatusCreate() {
|
|
2430
|
-
const { mutate } = useSWRConfig()
|
|
2431
|
-
|
|
2432
|
-
return async (id: string, user_pk: number, data: PaymentRequest, client?: API): Promise<Payment> => {
|
|
2433
|
-
const result = await Fetchers.createPaymentsUsersPaymentCheckStatusCreate(id, user_pk, data, client)
|
|
2434
|
-
// Revalidate related queries
|
|
2435
|
-
mutate('cfg-payments-users-payment-check-status')
|
|
2436
|
-
return result
|
|
2437
|
-
}
|
|
2438
|
-
}
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
/**
|
|
2442
|
-
* API operation
|
|
2443
|
-
*
|
|
2444
|
-
* @method GET
|
|
2445
|
-
* @path /cfg/payments/users/{user_pk}/payment/health/
|
|
2446
|
-
*/
|
|
2447
|
-
export function usePaymentsUsersPaymentHealthRetrieve(user_pk: number, client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
2448
|
-
return useSWR<Payment>(
|
|
2449
|
-
['cfg-payments-users-payment-health', user_pk],
|
|
2450
|
-
() => Fetchers.getPaymentsUsersPaymentHealthRetrieve(user_pk, client)
|
|
2451
|
-
)
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
/**
|
|
2456
|
-
* API operation
|
|
2457
|
-
*
|
|
2458
|
-
* @method GET
|
|
2459
|
-
* @path /cfg/payments/users/{user_pk}/payment/stats/
|
|
2460
|
-
*/
|
|
2461
|
-
export function usePaymentsUsersPaymentStatsRetrieve(user_pk: number, client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
2462
|
-
return useSWR<Payment>(
|
|
2463
|
-
['cfg-payments-users-payment-stat', user_pk],
|
|
2464
|
-
() => Fetchers.getPaymentsUsersPaymentStatsRetrieve(user_pk, client)
|
|
2465
|
-
)
|
|
2466
|
-
}
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
/**
|
|
2470
|
-
* API operation
|
|
2471
|
-
*
|
|
2472
|
-
* @method GET
|
|
2473
|
-
* @path /cfg/payments/users/{user_pk}/payment/summary/
|
|
2474
|
-
*/
|
|
2475
|
-
export function usePaymentsUsersPaymentSummaryRetrieve(user_pk: number, client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
2476
|
-
return useSWR<Payment>(
|
|
2477
|
-
['cfg-payments-users-payment-summary', user_pk],
|
|
2478
|
-
() => Fetchers.getPaymentsUsersPaymentSummaryRetrieve(user_pk, client)
|
|
61
|
+
params ? ['cfg-payments-payments', params] : 'cfg-payments-payments',
|
|
62
|
+
() => Fetchers.getPaymentsPaymentsList(params, client)
|
|
2479
63
|
)
|
|
2480
64
|
}
|
|
2481
65
|
|
|
@@ -2484,12 +68,12 @@ export function usePaymentsUsersPaymentSummaryRetrieve(user_pk: number, client?:
|
|
|
2484
68
|
* API operation
|
|
2485
69
|
*
|
|
2486
70
|
* @method GET
|
|
2487
|
-
* @path /cfg/payments/
|
|
71
|
+
* @path /cfg/payments/payments/{id}/
|
|
2488
72
|
*/
|
|
2489
|
-
export function
|
|
2490
|
-
return useSWR<
|
|
2491
|
-
['cfg-payments-
|
|
2492
|
-
() => Fetchers.
|
|
73
|
+
export function usePaymentsPaymentsRetrieve(id: string, client?: API): ReturnType<typeof useSWR<PaymentDetail>> {
|
|
74
|
+
return useSWR<PaymentDetail>(
|
|
75
|
+
['cfg-payments-payment', id],
|
|
76
|
+
() => Fetchers.getPaymentsPaymentsRetrieve(id, client)
|
|
2493
77
|
)
|
|
2494
78
|
}
|
|
2495
79
|
|
|
@@ -2498,15 +82,15 @@ export function usePaymentsUsersSubscriptionsList(user_pk: number, params?: { or
|
|
|
2498
82
|
* API operation
|
|
2499
83
|
*
|
|
2500
84
|
* @method POST
|
|
2501
|
-
* @path /cfg/payments/
|
|
85
|
+
* @path /cfg/payments/payments/{id}/confirm/
|
|
2502
86
|
*/
|
|
2503
|
-
export function
|
|
87
|
+
export function useCreatePaymentsPaymentsConfirmCreate() {
|
|
2504
88
|
const { mutate } = useSWRConfig()
|
|
2505
89
|
|
|
2506
|
-
return async (
|
|
2507
|
-
const result = await Fetchers.
|
|
90
|
+
return async (id: string, client?: API): Promise<PaymentList> => {
|
|
91
|
+
const result = await Fetchers.createPaymentsPaymentsConfirmCreate(id, client)
|
|
2508
92
|
// Revalidate related queries
|
|
2509
|
-
mutate('cfg-payments-
|
|
93
|
+
mutate('cfg-payments-payments-confirm')
|
|
2510
94
|
return result
|
|
2511
95
|
}
|
|
2512
96
|
}
|
|
@@ -2516,103 +100,29 @@ export function useCreatePaymentsUsersSubscriptionsCreate() {
|
|
|
2516
100
|
* API operation
|
|
2517
101
|
*
|
|
2518
102
|
* @method GET
|
|
2519
|
-
* @path /cfg/payments/
|
|
103
|
+
* @path /cfg/payments/payments/{id}/status/
|
|
2520
104
|
*/
|
|
2521
|
-
export function
|
|
2522
|
-
return useSWR<
|
|
2523
|
-
['cfg-payments-
|
|
2524
|
-
() => Fetchers.
|
|
105
|
+
export function usePaymentsPaymentsStatusRetrieve(id: string, client?: API): ReturnType<typeof useSWR<PaymentList>> {
|
|
106
|
+
return useSWR<PaymentList>(
|
|
107
|
+
['cfg-payments-payments-statu', id],
|
|
108
|
+
() => Fetchers.getPaymentsPaymentsStatusRetrieve(id, client)
|
|
2525
109
|
)
|
|
2526
110
|
}
|
|
2527
111
|
|
|
2528
112
|
|
|
2529
|
-
/**
|
|
2530
|
-
* API operation
|
|
2531
|
-
*
|
|
2532
|
-
* @method PUT
|
|
2533
|
-
* @path /cfg/payments/users/{user_pk}/subscriptions/{id}/
|
|
2534
|
-
*/
|
|
2535
|
-
export function useUpdatePaymentsUsersSubscriptionsUpdate() {
|
|
2536
|
-
const { mutate } = useSWRConfig()
|
|
2537
|
-
|
|
2538
|
-
return async (id: string, user_pk: number, data: SubscriptionRequest, client?: API): Promise<Subscription> => {
|
|
2539
|
-
const result = await Fetchers.updatePaymentsUsersSubscriptionsUpdate(id, user_pk, data, client)
|
|
2540
|
-
// Revalidate related queries
|
|
2541
|
-
mutate('cfg-payments-users-subscriptions')
|
|
2542
|
-
mutate('cfg-payments-users-subscription')
|
|
2543
|
-
return result
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
/**
|
|
2549
|
-
* API operation
|
|
2550
|
-
*
|
|
2551
|
-
* @method PATCH
|
|
2552
|
-
* @path /cfg/payments/users/{user_pk}/subscriptions/{id}/
|
|
2553
|
-
*/
|
|
2554
|
-
export function usePartialUpdatePaymentsUsersSubscriptionsPartialUpdate() {
|
|
2555
|
-
const { mutate } = useSWRConfig()
|
|
2556
|
-
|
|
2557
|
-
return async (id: string, user_pk: number, data?: PatchedSubscriptionRequest, client?: API): Promise<Subscription> => {
|
|
2558
|
-
const result = await Fetchers.partialUpdatePaymentsUsersSubscriptionsPartialUpdate(id, user_pk, data, client)
|
|
2559
|
-
// Revalidate related queries
|
|
2560
|
-
mutate('cfg-payments-users-subscriptions-partial')
|
|
2561
|
-
return result
|
|
2562
|
-
}
|
|
2563
|
-
}
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
/**
|
|
2567
|
-
* API operation
|
|
2568
|
-
*
|
|
2569
|
-
* @method DELETE
|
|
2570
|
-
* @path /cfg/payments/users/{user_pk}/subscriptions/{id}/
|
|
2571
|
-
*/
|
|
2572
|
-
export function useDeletePaymentsUsersSubscriptionsDestroy() {
|
|
2573
|
-
const { mutate } = useSWRConfig()
|
|
2574
|
-
|
|
2575
|
-
return async (id: string, user_pk: number, client?: API): Promise<void> => {
|
|
2576
|
-
const result = await Fetchers.deletePaymentsUsersSubscriptionsDestroy(id, user_pk, client)
|
|
2577
|
-
// Revalidate related queries
|
|
2578
|
-
mutate('cfg-payments-users-subscriptions')
|
|
2579
|
-
mutate('cfg-payments-users-subscription')
|
|
2580
|
-
return result
|
|
2581
|
-
}
|
|
2582
|
-
}
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
/**
|
|
2586
|
-
* API operation
|
|
2587
|
-
*
|
|
2588
|
-
* @method POST
|
|
2589
|
-
* @path /cfg/payments/users/{user_pk}/subscriptions/{id}/increment_usage/
|
|
2590
|
-
*/
|
|
2591
|
-
export function useCreatePaymentsUsersSubscriptionsIncrementUsageCreate() {
|
|
2592
|
-
const { mutate } = useSWRConfig()
|
|
2593
|
-
|
|
2594
|
-
return async (id: string, user_pk: number, data: SubscriptionRequest, client?: API): Promise<Subscription> => {
|
|
2595
|
-
const result = await Fetchers.createPaymentsUsersSubscriptionsIncrementUsageCreate(id, user_pk, data, client)
|
|
2596
|
-
// Revalidate related queries
|
|
2597
|
-
mutate('cfg-payments-users-subscriptions-increment-usage')
|
|
2598
|
-
return result
|
|
2599
|
-
}
|
|
2600
|
-
}
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
113
|
/**
|
|
2604
114
|
* API operation
|
|
2605
115
|
*
|
|
2606
116
|
* @method POST
|
|
2607
|
-
* @path /cfg/payments/
|
|
117
|
+
* @path /cfg/payments/payments/create/
|
|
2608
118
|
*/
|
|
2609
|
-
export function
|
|
119
|
+
export function useCreatePaymentsPaymentsCreateCreate() {
|
|
2610
120
|
const { mutate } = useSWRConfig()
|
|
2611
121
|
|
|
2612
|
-
return async (
|
|
2613
|
-
const result = await Fetchers.
|
|
122
|
+
return async (client?: API): Promise<PaymentList> => {
|
|
123
|
+
const result = await Fetchers.createPaymentsPaymentsCreateCreate(client)
|
|
2614
124
|
// Revalidate related queries
|
|
2615
|
-
mutate('cfg-payments-
|
|
125
|
+
mutate('cfg-payments-payments')
|
|
2616
126
|
return result
|
|
2617
127
|
}
|
|
2618
128
|
}
|
|
@@ -2622,96 +132,12 @@ export function useCreatePaymentsUsersSubscriptionsUpdateStatusCreate() {
|
|
|
2622
132
|
* API operation
|
|
2623
133
|
*
|
|
2624
134
|
* @method GET
|
|
2625
|
-
* @path /cfg/payments/
|
|
2626
|
-
*/
|
|
2627
|
-
export function usePaymentsUsersSubscriptionsActiveRetrieve(user_pk: number, client?: API): ReturnType<typeof useSWR<Subscription>> {
|
|
2628
|
-
return useSWR<Subscription>(
|
|
2629
|
-
['cfg-payments-users-subscriptions-active', user_pk],
|
|
2630
|
-
() => Fetchers.getPaymentsUsersSubscriptionsActiveRetrieve(user_pk, client)
|
|
2631
|
-
)
|
|
2632
|
-
}
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
/**
|
|
2636
|
-
* API operation
|
|
2637
|
-
*
|
|
2638
|
-
* @method GET
|
|
2639
|
-
* @path /cfg/payments/users/{user_pk}/subscriptions/health/
|
|
2640
|
-
*/
|
|
2641
|
-
export function usePaymentsUsersSubscriptionsHealthRetrieve(user_pk: number, client?: API): ReturnType<typeof useSWR<Subscription>> {
|
|
2642
|
-
return useSWR<Subscription>(
|
|
2643
|
-
['cfg-payments-users-subscriptions-health', user_pk],
|
|
2644
|
-
() => Fetchers.getPaymentsUsersSubscriptionsHealthRetrieve(user_pk, client)
|
|
2645
|
-
)
|
|
2646
|
-
}
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
/**
|
|
2650
|
-
* API operation
|
|
2651
|
-
*
|
|
2652
|
-
* @method GET
|
|
2653
|
-
* @path /cfg/payments/users/{user_pk}/subscriptions/stats/
|
|
2654
|
-
*/
|
|
2655
|
-
export function usePaymentsUsersSubscriptionsStatsRetrieve(user_pk: number, client?: API): ReturnType<typeof useSWR<Subscription>> {
|
|
2656
|
-
return useSWR<Subscription>(
|
|
2657
|
-
['cfg-payments-users-subscriptions-stat', user_pk],
|
|
2658
|
-
() => Fetchers.getPaymentsUsersSubscriptionsStatsRetrieve(user_pk, client)
|
|
2659
|
-
)
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
/**
|
|
2664
|
-
* API operation
|
|
2665
|
-
*
|
|
2666
|
-
* @method GET
|
|
2667
|
-
* @path /cfg/payments/users/{user_pk}/subscriptions/summary/
|
|
2668
|
-
*/
|
|
2669
|
-
export function usePaymentsUsersSubscriptionsSummaryRetrieve(user_pk: number, client?: API): ReturnType<typeof useSWR<Subscription>> {
|
|
2670
|
-
return useSWR<Subscription>(
|
|
2671
|
-
['cfg-payments-users-subscriptions-summary', user_pk],
|
|
2672
|
-
() => Fetchers.getPaymentsUsersSubscriptionsSummaryRetrieve(user_pk, client)
|
|
2673
|
-
)
|
|
2674
|
-
}
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
/**
|
|
2678
|
-
* API operation
|
|
2679
|
-
*
|
|
2680
|
-
* @method GET
|
|
2681
|
-
* @path /cfg/payments/users/health/
|
|
2682
|
-
*/
|
|
2683
|
-
export function usePaymentsUsersHealthRetrieve(client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
2684
|
-
return useSWR<Payment>(
|
|
2685
|
-
'cfg-payments-users-health',
|
|
2686
|
-
() => Fetchers.getPaymentsUsersHealthRetrieve(client)
|
|
2687
|
-
)
|
|
2688
|
-
}
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
/**
|
|
2692
|
-
* API operation
|
|
2693
|
-
*
|
|
2694
|
-
* @method GET
|
|
2695
|
-
* @path /cfg/payments/users/stats/
|
|
2696
|
-
*/
|
|
2697
|
-
export function usePaymentsUsersStatsRetrieve(client?: API): ReturnType<typeof useSWR<Payment>> {
|
|
2698
|
-
return useSWR<Payment>(
|
|
2699
|
-
'cfg-payments-users-stat',
|
|
2700
|
-
() => Fetchers.getPaymentsUsersStatsRetrieve(client)
|
|
2701
|
-
)
|
|
2702
|
-
}
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
/**
|
|
2706
|
-
* API operation
|
|
2707
|
-
*
|
|
2708
|
-
* @method GET
|
|
2709
|
-
* @path /cfg/payments/users/summary/
|
|
135
|
+
* @path /cfg/payments/transactions/
|
|
2710
136
|
*/
|
|
2711
|
-
export function
|
|
2712
|
-
return useSWR<
|
|
2713
|
-
'cfg-payments-
|
|
2714
|
-
() => Fetchers.
|
|
137
|
+
export function usePaymentsTransactionsRetrieve(client?: API): ReturnType<typeof useSWR<any>> {
|
|
138
|
+
return useSWR<any>(
|
|
139
|
+
'cfg-payments-transaction',
|
|
140
|
+
() => Fetchers.getPaymentsTransactionsRetrieve(client)
|
|
2715
141
|
)
|
|
2716
142
|
}
|
|
2717
143
|
|