@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,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Webhooks
|
|
3
|
+
*
|
|
4
|
+
* Universal functions that work in any environment:
|
|
5
|
+
* - Next.js (App Router / Pages Router / Server Components)
|
|
6
|
+
* - React Native
|
|
7
|
+
* - Node.js backend
|
|
8
|
+
*
|
|
9
|
+
* These fetchers use Zod schemas for runtime validation.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Configure API once (in your app entry point)
|
|
14
|
+
* import { configureAPI } from '../../api-instance'
|
|
15
|
+
* configureAPI({ baseUrl: 'https://api.example.com' })
|
|
16
|
+
*
|
|
17
|
+
* // Then use fetchers anywhere
|
|
18
|
+
* const users = await getUsers({ page: 1 })
|
|
19
|
+
*
|
|
20
|
+
* // With SWR
|
|
21
|
+
* const { data } = useSWR(['users', params], () => getUsers(params))
|
|
22
|
+
*
|
|
23
|
+
* // With React Query
|
|
24
|
+
* const { data } = useQuery(['users', params], () => getUsers(params))
|
|
25
|
+
*
|
|
26
|
+
* // In Server Component or SSR (pass custom client)
|
|
27
|
+
* import { API } from '../../index'
|
|
28
|
+
* const api = new API('https://api.example.com')
|
|
29
|
+
* const users = await getUsers({ page: 1 }, api)
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import { SupportedProvidersSchema, type SupportedProviders } from '../schemas/SupportedProviders.schema'
|
|
33
|
+
import { WebhookHealthSchema, type WebhookHealth } from '../schemas/WebhookHealth.schema'
|
|
34
|
+
import { WebhookResponseSchema, type WebhookResponse } from '../schemas/WebhookResponse.schema'
|
|
35
|
+
import { WebhookResponseRequestSchema, type WebhookResponseRequest } from '../schemas/WebhookResponseRequest.schema'
|
|
36
|
+
import { WebhookStatsSchema, type WebhookStats } from '../schemas/WebhookStats.schema'
|
|
37
|
+
import { getAPIInstance } from '../../api-instance'
|
|
38
|
+
import type { API } from '../../index'
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Webhook Endpoint Info
|
|
42
|
+
*
|
|
43
|
+
* @method GET
|
|
44
|
+
* @path /cfg/payments/webhooks/{provider}/
|
|
45
|
+
*/
|
|
46
|
+
export async function getPaymentsWebhooksRetrieve( provider: string, client?: API
|
|
47
|
+
): Promise<WebhookResponse> {
|
|
48
|
+
const api = client || getAPIInstance()
|
|
49
|
+
const response = await api.cfg_webhooks.paymentsWebhooksRetrieve(provider)
|
|
50
|
+
return WebhookResponseSchema.parse(response)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Process Webhook
|
|
56
|
+
*
|
|
57
|
+
* @method POST
|
|
58
|
+
* @path /cfg/payments/webhooks/{provider}/
|
|
59
|
+
*/
|
|
60
|
+
export async function createPaymentsWebhooksCreate( provider: string, data: WebhookResponseRequest, client?: API
|
|
61
|
+
): Promise<WebhookResponse> {
|
|
62
|
+
const api = client || getAPIInstance()
|
|
63
|
+
const response = await api.cfg_webhooks.paymentsWebhooksCreate(provider, data)
|
|
64
|
+
return WebhookResponseSchema.parse(response)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Webhook Health Check
|
|
70
|
+
*
|
|
71
|
+
* @method GET
|
|
72
|
+
* @path /cfg/payments/webhooks/health/
|
|
73
|
+
*/
|
|
74
|
+
export async function getPaymentsWebhooksHealthRetrieve( client?: API
|
|
75
|
+
): Promise<WebhookHealth> {
|
|
76
|
+
const api = client || getAPIInstance()
|
|
77
|
+
const response = await api.cfg_webhooks.paymentsWebhooksHealthRetrieve()
|
|
78
|
+
return WebhookHealthSchema.parse(response)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Supported Webhook Providers
|
|
84
|
+
*
|
|
85
|
+
* @method GET
|
|
86
|
+
* @path /cfg/payments/webhooks/providers/
|
|
87
|
+
*/
|
|
88
|
+
export async function getPaymentsWebhooksProvidersRetrieve( client?: API
|
|
89
|
+
): Promise<SupportedProviders> {
|
|
90
|
+
const api = client || getAPIInstance()
|
|
91
|
+
const response = await api.cfg_webhooks.paymentsWebhooksProvidersRetrieve()
|
|
92
|
+
return SupportedProvidersSchema.parse(response)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Webhook Statistics
|
|
98
|
+
*
|
|
99
|
+
* @method GET
|
|
100
|
+
* @path /cfg/payments/webhooks/stats/
|
|
101
|
+
*/
|
|
102
|
+
export async function getPaymentsWebhooksStatsRetrieve( params?: { days?: number }, client?: API
|
|
103
|
+
): Promise<WebhookStats> {
|
|
104
|
+
const api = client || getAPIInstance()
|
|
105
|
+
const response = await api.cfg_webhooks.paymentsWebhooksStatsRetrieve(params?.days)
|
|
106
|
+
return WebhookStatsSchema.parse(response)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Support
|
|
3
|
+
*
|
|
4
|
+
* Universal functions that work in any environment:
|
|
5
|
+
* - Next.js (App Router / Pages Router / Server Components)
|
|
6
|
+
* - React Native
|
|
7
|
+
* - Node.js backend
|
|
8
|
+
*
|
|
9
|
+
* These fetchers use Zod schemas for runtime validation.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Configure API once (in your app entry point)
|
|
14
|
+
* import { configureAPI } from '../../api-instance'
|
|
15
|
+
* configureAPI({ baseUrl: 'https://api.example.com' })
|
|
16
|
+
*
|
|
17
|
+
* // Then use fetchers anywhere
|
|
18
|
+
* const users = await getUsers({ page: 1 })
|
|
19
|
+
*
|
|
20
|
+
* // With SWR
|
|
21
|
+
* const { data } = useSWR(['users', params], () => getUsers(params))
|
|
22
|
+
*
|
|
23
|
+
* // With React Query
|
|
24
|
+
* const { data } = useQuery(['users', params], () => getUsers(params))
|
|
25
|
+
*
|
|
26
|
+
* // In Server Component or SSR (pass custom client)
|
|
27
|
+
* import { API } from '../../index'
|
|
28
|
+
* const api = new API('https://api.example.com')
|
|
29
|
+
* const users = await getUsers({ page: 1 }, api)
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import { MessageSchema, type Message } from '../schemas/Message.schema'
|
|
33
|
+
import { MessageCreateSchema, type MessageCreate } from '../schemas/MessageCreate.schema'
|
|
34
|
+
import { MessageCreateRequestSchema, type MessageCreateRequest } from '../schemas/MessageCreateRequest.schema'
|
|
35
|
+
import { MessageRequestSchema, type MessageRequest } from '../schemas/MessageRequest.schema'
|
|
36
|
+
import { PaginatedMessageListSchema, type PaginatedMessageList } from '../schemas/PaginatedMessageList.schema'
|
|
37
|
+
import { PaginatedTicketListSchema, type PaginatedTicketList } from '../schemas/PaginatedTicketList.schema'
|
|
38
|
+
import { PatchedMessageRequestSchema, type PatchedMessageRequest } from '../schemas/PatchedMessageRequest.schema'
|
|
39
|
+
import { PatchedTicketRequestSchema, type PatchedTicketRequest } from '../schemas/PatchedTicketRequest.schema'
|
|
40
|
+
import { TicketSchema, type Ticket } from '../schemas/Ticket.schema'
|
|
41
|
+
import { TicketRequestSchema, type TicketRequest } from '../schemas/TicketRequest.schema'
|
|
42
|
+
import { getAPIInstance } from '../../api-instance'
|
|
43
|
+
import type { API } from '../../index'
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* API operation
|
|
47
|
+
*
|
|
48
|
+
* @method GET
|
|
49
|
+
* @path /cfg/support/tickets/
|
|
50
|
+
*/
|
|
51
|
+
export async function getSupportTicketsList( params?: { page?: number; page_size?: number }, client?: API
|
|
52
|
+
): Promise<PaginatedTicketList> {
|
|
53
|
+
const api = client || getAPIInstance()
|
|
54
|
+
const response = await api.cfg_support.ticketsList(params?.page, params?.page_size)
|
|
55
|
+
return PaginatedTicketListSchema.parse(response)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* API operation
|
|
61
|
+
*
|
|
62
|
+
* @method POST
|
|
63
|
+
* @path /cfg/support/tickets/
|
|
64
|
+
*/
|
|
65
|
+
export async function createSupportTicketsCreate( data: TicketRequest, client?: API
|
|
66
|
+
): Promise<Ticket> {
|
|
67
|
+
const api = client || getAPIInstance()
|
|
68
|
+
const response = await api.cfg_support.ticketsCreate(data)
|
|
69
|
+
return TicketSchema.parse(response)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* API operation
|
|
75
|
+
*
|
|
76
|
+
* @method GET
|
|
77
|
+
* @path /cfg/support/tickets/{ticket_uuid}/messages/
|
|
78
|
+
*/
|
|
79
|
+
export async function getSupportTicketsMessagesList( ticket_uuid: string, params?: { page?: number; page_size?: number }, client?: API
|
|
80
|
+
): Promise<PaginatedMessageList> {
|
|
81
|
+
const api = client || getAPIInstance()
|
|
82
|
+
const response = await api.cfg_support.ticketsMessagesList(ticket_uuid, params?.page, params?.page_size)
|
|
83
|
+
return PaginatedMessageListSchema.parse(response)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* API operation
|
|
89
|
+
*
|
|
90
|
+
* @method POST
|
|
91
|
+
* @path /cfg/support/tickets/{ticket_uuid}/messages/
|
|
92
|
+
*/
|
|
93
|
+
export async function createSupportTicketsMessagesCreate( ticket_uuid: string, data: MessageCreateRequest, client?: API
|
|
94
|
+
): Promise<MessageCreate> {
|
|
95
|
+
const api = client || getAPIInstance()
|
|
96
|
+
const response = await api.cfg_support.ticketsMessagesCreate(ticket_uuid, data)
|
|
97
|
+
return MessageCreateSchema.parse(response)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* API operation
|
|
103
|
+
*
|
|
104
|
+
* @method GET
|
|
105
|
+
* @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
|
|
106
|
+
*/
|
|
107
|
+
export async function getSupportTicketsMessagesRetrieve( ticket_uuid: string, uuid: string, client?: API
|
|
108
|
+
): Promise<Message> {
|
|
109
|
+
const api = client || getAPIInstance()
|
|
110
|
+
const response = await api.cfg_support.ticketsMessagesRetrieve(ticket_uuid, uuid)
|
|
111
|
+
return MessageSchema.parse(response)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* API operation
|
|
117
|
+
*
|
|
118
|
+
* @method PUT
|
|
119
|
+
* @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
|
|
120
|
+
*/
|
|
121
|
+
export async function updateSupportTicketsMessagesUpdate( ticket_uuid: string, uuid: string, data: MessageRequest, client?: API
|
|
122
|
+
): Promise<Message> {
|
|
123
|
+
const api = client || getAPIInstance()
|
|
124
|
+
const response = await api.cfg_support.ticketsMessagesUpdate(ticket_uuid, uuid, data)
|
|
125
|
+
return MessageSchema.parse(response)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* API operation
|
|
131
|
+
*
|
|
132
|
+
* @method PATCH
|
|
133
|
+
* @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
|
|
134
|
+
*/
|
|
135
|
+
export async function partialUpdateSupportTicketsMessagesPartialUpdate( ticket_uuid: string, uuid: string, data?: PatchedMessageRequest, client?: API
|
|
136
|
+
): Promise<Message> {
|
|
137
|
+
const api = client || getAPIInstance()
|
|
138
|
+
const response = await api.cfg_support.ticketsMessagesPartialUpdate(ticket_uuid, uuid, data)
|
|
139
|
+
return MessageSchema.parse(response)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* API operation
|
|
145
|
+
*
|
|
146
|
+
* @method DELETE
|
|
147
|
+
* @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
|
|
148
|
+
*/
|
|
149
|
+
export async function deleteSupportTicketsMessagesDestroy( ticket_uuid: string, uuid: string, client?: API
|
|
150
|
+
): Promise<void> {
|
|
151
|
+
const api = client || getAPIInstance()
|
|
152
|
+
const response = await api.cfg_support.ticketsMessagesDestroy(ticket_uuid, uuid)
|
|
153
|
+
return response
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* API operation
|
|
159
|
+
*
|
|
160
|
+
* @method GET
|
|
161
|
+
* @path /cfg/support/tickets/{uuid}/
|
|
162
|
+
*/
|
|
163
|
+
export async function getSupportTicketsRetrieve( uuid: string, client?: API
|
|
164
|
+
): Promise<Ticket> {
|
|
165
|
+
const api = client || getAPIInstance()
|
|
166
|
+
const response = await api.cfg_support.ticketsRetrieve(uuid)
|
|
167
|
+
return TicketSchema.parse(response)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* API operation
|
|
173
|
+
*
|
|
174
|
+
* @method PUT
|
|
175
|
+
* @path /cfg/support/tickets/{uuid}/
|
|
176
|
+
*/
|
|
177
|
+
export async function updateSupportTicketsUpdate( uuid: string, data: TicketRequest, client?: API
|
|
178
|
+
): Promise<Ticket> {
|
|
179
|
+
const api = client || getAPIInstance()
|
|
180
|
+
const response = await api.cfg_support.ticketsUpdate(uuid, data)
|
|
181
|
+
return TicketSchema.parse(response)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* API operation
|
|
187
|
+
*
|
|
188
|
+
* @method PATCH
|
|
189
|
+
* @path /cfg/support/tickets/{uuid}/
|
|
190
|
+
*/
|
|
191
|
+
export async function partialUpdateSupportTicketsPartialUpdate( uuid: string, data?: PatchedTicketRequest, client?: API
|
|
192
|
+
): Promise<Ticket> {
|
|
193
|
+
const api = client || getAPIInstance()
|
|
194
|
+
const response = await api.cfg_support.ticketsPartialUpdate(uuid, data)
|
|
195
|
+
return TicketSchema.parse(response)
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* API operation
|
|
201
|
+
*
|
|
202
|
+
* @method DELETE
|
|
203
|
+
* @path /cfg/support/tickets/{uuid}/
|
|
204
|
+
*/
|
|
205
|
+
export async function deleteSupportTicketsDestroy( uuid: string, client?: API
|
|
206
|
+
): Promise<void> {
|
|
207
|
+
const api = client || getAPIInstance()
|
|
208
|
+
const response = await api.cfg_support.ticketsDestroy(uuid)
|
|
209
|
+
return response
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Tasks
|
|
3
|
+
*
|
|
4
|
+
* Universal functions that work in any environment:
|
|
5
|
+
* - Next.js (App Router / Pages Router / Server Components)
|
|
6
|
+
* - React Native
|
|
7
|
+
* - Node.js backend
|
|
8
|
+
*
|
|
9
|
+
* These fetchers use Zod schemas for runtime validation.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Configure API once (in your app entry point)
|
|
14
|
+
* import { configureAPI } from '../../api-instance'
|
|
15
|
+
* configureAPI({ baseUrl: 'https://api.example.com' })
|
|
16
|
+
*
|
|
17
|
+
* // Then use fetchers anywhere
|
|
18
|
+
* const users = await getUsers({ page: 1 })
|
|
19
|
+
*
|
|
20
|
+
* // With SWR
|
|
21
|
+
* const { data } = useSWR(['users', params], () => getUsers(params))
|
|
22
|
+
*
|
|
23
|
+
* // With React Query
|
|
24
|
+
* const { data } = useQuery(['users', params], () => getUsers(params))
|
|
25
|
+
*
|
|
26
|
+
* // In Server Component or SSR (pass custom client)
|
|
27
|
+
* import { API } from '../../index'
|
|
28
|
+
* const api = new API('https://api.example.com')
|
|
29
|
+
* const users = await getUsers({ page: 1 }, api)
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import { APIResponseSchema, type APIResponse } from '../schemas/APIResponse.schema'
|
|
33
|
+
import { APIResponseRequestSchema, type APIResponseRequest } from '../schemas/APIResponseRequest.schema'
|
|
34
|
+
import { QueueActionSchema, type QueueAction } from '../schemas/QueueAction.schema'
|
|
35
|
+
import { QueueActionRequestSchema, type QueueActionRequest } from '../schemas/QueueActionRequest.schema'
|
|
36
|
+
import { QueueStatusSchema, type QueueStatus } from '../schemas/QueueStatus.schema'
|
|
37
|
+
import { TaskStatisticsSchema, type TaskStatistics } from '../schemas/TaskStatistics.schema'
|
|
38
|
+
import { WorkerActionSchema, type WorkerAction } from '../schemas/WorkerAction.schema'
|
|
39
|
+
import { WorkerActionRequestSchema, type WorkerActionRequest } from '../schemas/WorkerActionRequest.schema'
|
|
40
|
+
import { getAPIInstance } from '../../api-instance'
|
|
41
|
+
import type { API } from '../../index'
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* API operation
|
|
45
|
+
*
|
|
46
|
+
* @method POST
|
|
47
|
+
* @path /cfg/tasks/api/clear/
|
|
48
|
+
*/
|
|
49
|
+
export async function createTasksApiClearCreate( data: APIResponseRequest, client?: API
|
|
50
|
+
): Promise<APIResponse> {
|
|
51
|
+
const api = client || getAPIInstance()
|
|
52
|
+
const response = await api.cfg_tasks.apiClearCreate(data)
|
|
53
|
+
return APIResponseSchema.parse(response)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* API operation
|
|
59
|
+
*
|
|
60
|
+
* @method POST
|
|
61
|
+
* @path /cfg/tasks/api/clear-queues/
|
|
62
|
+
*/
|
|
63
|
+
export async function createTasksApiClearQueuesCreate( data: APIResponseRequest, client?: API
|
|
64
|
+
): Promise<APIResponse> {
|
|
65
|
+
const api = client || getAPIInstance()
|
|
66
|
+
const response = await api.cfg_tasks.apiClearQueuesCreate(data)
|
|
67
|
+
return APIResponseSchema.parse(response)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* API operation
|
|
73
|
+
*
|
|
74
|
+
* @method POST
|
|
75
|
+
* @path /cfg/tasks/api/purge-failed/
|
|
76
|
+
*/
|
|
77
|
+
export async function createTasksApiPurgeFailedCreate( data: APIResponseRequest, client?: API
|
|
78
|
+
): Promise<APIResponse> {
|
|
79
|
+
const api = client || getAPIInstance()
|
|
80
|
+
const response = await api.cfg_tasks.apiPurgeFailedCreate(data)
|
|
81
|
+
return APIResponseSchema.parse(response)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* API operation
|
|
87
|
+
*
|
|
88
|
+
* @method POST
|
|
89
|
+
* @path /cfg/tasks/api/queues/manage/
|
|
90
|
+
*/
|
|
91
|
+
export async function createTasksApiQueuesManageCreate( data: QueueActionRequest, client?: API
|
|
92
|
+
): Promise<QueueAction> {
|
|
93
|
+
const api = client || getAPIInstance()
|
|
94
|
+
const response = await api.cfg_tasks.apiQueuesManageCreate(data)
|
|
95
|
+
return QueueActionSchema.parse(response)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* API operation
|
|
101
|
+
*
|
|
102
|
+
* @method GET
|
|
103
|
+
* @path /cfg/tasks/api/queues/status/
|
|
104
|
+
*/
|
|
105
|
+
export async function getTasksApiQueuesStatusRetrieve( client?: API
|
|
106
|
+
): Promise<QueueStatus> {
|
|
107
|
+
const api = client || getAPIInstance()
|
|
108
|
+
const response = await api.cfg_tasks.apiQueuesStatusRetrieve()
|
|
109
|
+
return QueueStatusSchema.parse(response)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* API operation
|
|
115
|
+
*
|
|
116
|
+
* @method POST
|
|
117
|
+
* @path /cfg/tasks/api/simulate/
|
|
118
|
+
*/
|
|
119
|
+
export async function createTasksApiSimulateCreate( data: APIResponseRequest, client?: API
|
|
120
|
+
): Promise<APIResponse> {
|
|
121
|
+
const api = client || getAPIInstance()
|
|
122
|
+
const response = await api.cfg_tasks.apiSimulateCreate(data)
|
|
123
|
+
return APIResponseSchema.parse(response)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* API operation
|
|
129
|
+
*
|
|
130
|
+
* @method GET
|
|
131
|
+
* @path /cfg/tasks/api/tasks/list/
|
|
132
|
+
*/
|
|
133
|
+
export async function getTasksApiTasksListRetrieve( client?: API
|
|
134
|
+
): Promise<APIResponse> {
|
|
135
|
+
const api = client || getAPIInstance()
|
|
136
|
+
const response = await api.cfg_tasks.apiTasksListRetrieve()
|
|
137
|
+
return APIResponseSchema.parse(response)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* API operation
|
|
143
|
+
*
|
|
144
|
+
* @method GET
|
|
145
|
+
* @path /cfg/tasks/api/tasks/stats/
|
|
146
|
+
*/
|
|
147
|
+
export async function getTasksApiTasksStatsRetrieve( client?: API
|
|
148
|
+
): Promise<TaskStatistics> {
|
|
149
|
+
const api = client || getAPIInstance()
|
|
150
|
+
const response = await api.cfg_tasks.apiTasksStatsRetrieve()
|
|
151
|
+
return TaskStatisticsSchema.parse(response)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* API operation
|
|
157
|
+
*
|
|
158
|
+
* @method GET
|
|
159
|
+
* @path /cfg/tasks/api/workers/list/
|
|
160
|
+
*/
|
|
161
|
+
export async function getTasksApiWorkersListRetrieve( client?: API
|
|
162
|
+
): Promise<APIResponse> {
|
|
163
|
+
const api = client || getAPIInstance()
|
|
164
|
+
const response = await api.cfg_tasks.apiWorkersListRetrieve()
|
|
165
|
+
return APIResponseSchema.parse(response)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* API operation
|
|
171
|
+
*
|
|
172
|
+
* @method POST
|
|
173
|
+
* @path /cfg/tasks/api/workers/manage/
|
|
174
|
+
*/
|
|
175
|
+
export async function createTasksApiWorkersManageCreate( data: WorkerActionRequest, client?: API
|
|
176
|
+
): Promise<WorkerAction> {
|
|
177
|
+
const api = client || getAPIInstance()
|
|
178
|
+
const response = await api.cfg_tasks.apiWorkersManageCreate(data)
|
|
179
|
+
return WorkerActionSchema.parse(response)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed Fetchers - Universal API functions
|
|
3
|
+
*
|
|
4
|
+
* Auto-generated from OpenAPI specification.
|
|
5
|
+
* These functions work in any JavaScript environment.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Runtime validation with Zod
|
|
9
|
+
* - Type-safe parameters and responses
|
|
10
|
+
* - Works with any data-fetching library (SWR, React Query, etc)
|
|
11
|
+
* - Server Component compatible
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import * as fetchers from './fetchers'
|
|
16
|
+
*
|
|
17
|
+
* // Direct usage
|
|
18
|
+
* const user = await fetchers.getUser(1)
|
|
19
|
+
*
|
|
20
|
+
* // With SWR
|
|
21
|
+
* const { data } = useSWR('user-1', () => fetchers.getUser(1))
|
|
22
|
+
*
|
|
23
|
+
* // With React Query
|
|
24
|
+
* const { data } = useQuery(['user', 1], () => fetchers.getUser(1))
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
export * from './cfg__accounts'
|
|
29
|
+
export * from './cfg__accounts__auth'
|
|
30
|
+
export * from './cfg__accounts__user_profile'
|
|
31
|
+
export * from './cfg__endpoints'
|
|
32
|
+
export * from './cfg__health'
|
|
33
|
+
export * from './cfg__leads'
|
|
34
|
+
export * from './cfg__leads__lead_submission'
|
|
35
|
+
export * from './cfg__newsletter'
|
|
36
|
+
export * from './cfg__newsletter__bulk_email'
|
|
37
|
+
export * from './cfg__newsletter__campaigns'
|
|
38
|
+
export * from './cfg__newsletter__logs'
|
|
39
|
+
export * from './cfg__newsletter__newsletters'
|
|
40
|
+
export * from './cfg__newsletter__subscriptions'
|
|
41
|
+
export * from './cfg__newsletter__testing'
|
|
42
|
+
export * from './cfg__payments'
|
|
43
|
+
export * from './cfg__payments__webhooks'
|
|
44
|
+
export * from './cfg__support'
|
|
45
|
+
export * from './cfg__tasks'
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Accounts
|
|
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__accounts'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
import type { OTPRequestRequest } from '../schemas/OTPRequestRequest.schema'
|
|
22
|
+
import type { OTPRequestResponse } from '../schemas/OTPRequestResponse.schema'
|
|
23
|
+
import type { OTPVerifyRequest } from '../schemas/OTPVerifyRequest.schema'
|
|
24
|
+
import type { OTPVerifyResponse } from '../schemas/OTPVerifyResponse.schema'
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* API operation
|
|
28
|
+
*
|
|
29
|
+
* @method POST
|
|
30
|
+
* @path /cfg/accounts/otp/request/
|
|
31
|
+
*/
|
|
32
|
+
export function useCreateAccountsOtpRequestCreate() {
|
|
33
|
+
const { mutate } = useSWRConfig()
|
|
34
|
+
|
|
35
|
+
return async (data: OTPRequestRequest, client?: API): Promise<OTPRequestResponse> => {
|
|
36
|
+
const result = await Fetchers.createAccountsOtpRequestCreate(data, client)
|
|
37
|
+
// Revalidate related queries
|
|
38
|
+
mutate('cfg-accounts-otp-request')
|
|
39
|
+
return result
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* API operation
|
|
46
|
+
*
|
|
47
|
+
* @method POST
|
|
48
|
+
* @path /cfg/accounts/otp/verify/
|
|
49
|
+
*/
|
|
50
|
+
export function useCreateAccountsOtpVerifyCreate() {
|
|
51
|
+
const { mutate } = useSWRConfig()
|
|
52
|
+
|
|
53
|
+
return async (data: OTPVerifyRequest, client?: API): Promise<OTPVerifyResponse> => {
|
|
54
|
+
const result = await Fetchers.createAccountsOtpVerifyCreate(data, client)
|
|
55
|
+
// Revalidate related queries
|
|
56
|
+
mutate('cfg-accounts-otp-verify')
|
|
57
|
+
return result
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Auth
|
|
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__accounts__auth'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
import type { TokenRefresh } from '../schemas/TokenRefresh.schema'
|
|
22
|
+
import type { TokenRefreshRequest } from '../schemas/TokenRefreshRequest.schema'
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* API operation
|
|
26
|
+
*
|
|
27
|
+
* @method POST
|
|
28
|
+
* @path /cfg/accounts/token/refresh/
|
|
29
|
+
*/
|
|
30
|
+
export function useCreateAccountsTokenRefreshCreate() {
|
|
31
|
+
const { mutate } = useSWRConfig()
|
|
32
|
+
|
|
33
|
+
return async (data: TokenRefreshRequest, client?: API): Promise<TokenRefresh> => {
|
|
34
|
+
const result = await Fetchers.createAccountsTokenRefreshCreate(data, client)
|
|
35
|
+
// Revalidate related queries
|
|
36
|
+
mutate('cfg-accounts-token-refresh')
|
|
37
|
+
return result
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|