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