@djangocfg/api 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +15856 -34128
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15274 -34396
- package/dist/index.d.ts +15274 -34396
- package/dist/index.mjs +15853 -33956
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/contexts/payments/ApiKeysContext.tsx +21 -58
- package/src/cfg/contexts/payments/BalancesContext.tsx +19 -72
- package/src/cfg/contexts/payments/CurrenciesContext.tsx +5 -18
- package/src/cfg/contexts/payments/OverviewContext.tsx +78 -124
- package/src/cfg/contexts/payments/PaymentsContext.tsx +37 -36
- package/src/cfg/contexts/payments/RootPaymentsContext.tsx +7 -76
- package/src/cfg/contexts/payments/index.ts +5 -24
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +38 -2380
- package/src/cfg/generated/_utils/fetchers/index.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__payments.ts +41 -2615
- package/src/cfg/generated/_utils/hooks/index.ts +0 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItem.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunk.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunkDetail.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunkRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemDetail.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ChatMessage.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/ChatSession.schema.ts +3 -3
- package/src/cfg/generated/_utils/schemas/ChatSessionRequest.schema.ts +3 -3
- package/src/cfg/generated/_utils/schemas/Document.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/DocumentRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PatchedArchiveItemRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PatchedChatSessionRequest.schema.ts +3 -3
- package/src/cfg/generated/_utils/schemas/PatchedDocumentRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PaymentDetail.schema.ts +44 -0
- package/src/cfg/generated/_utils/schemas/PaymentList.schema.ts +7 -11
- package/src/cfg/generated/_utils/schemas/index.ts +1 -81
- package/src/cfg/generated/cfg__payments/client.ts +40 -1732
- package/src/cfg/generated/cfg__payments/models.ts +50 -1795
- package/src/cfg/generated/client.ts +0 -3
- package/src/cfg/generated/enums.ts +5 -347
- package/src/cfg/generated/index.ts +0 -5
- package/src/cfg/generated/schema.ts +5918 -18352
- package/src/cfg/services/payments/ApiKeysService.ts +34 -116
- package/src/cfg/services/payments/DashboardService.ts +37 -122
- package/src/cfg/services/payments/PaymentsService.ts +36 -69
- package/src/cfg/services/payments/SubscriptionsService.ts +35 -136
- package/src/cfg/services/webhooks/WebhooksService.ts +24 -66
- package/src/index.ts +1 -6
- package/src/cfg/generated/_utils/fetchers/cfg__payments__webhooks.ts +0 -109
- package/src/cfg/generated/_utils/hooks/cfg__payments__webhooks.ts +0 -100
- package/src/cfg/generated/_utils/schemas/APIKeyCreate.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyCreateRequest.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyDetail.schema.ts +0 -35
- package/src/cfg/generated/_utils/schemas/APIKeyList.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/APIKeyUpdate.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyUpdateRequest.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyValidationRequest.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/APIKeyValidationResponse.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/APIKeysOverview.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/AdminPaymentCreate.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/AdminPaymentCreateRequest.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/AdminPaymentDetail.schema.ts +0 -50
- package/src/cfg/generated/_utils/schemas/AdminPaymentList.schema.ts +0 -38
- package/src/cfg/generated/_utils/schemas/AdminPaymentStats.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/AdminPaymentUpdate.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/AdminPaymentUpdateRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/AdminUser.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/BalanceOverview.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/ChartDataPoint.schema.ts +0 -20
- package/src/cfg/generated/_utils/schemas/ChartSeries.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/Currency.schema.ts +0 -35
- package/src/cfg/generated/_utils/schemas/CurrencyAnalyticsItem.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/CurrencyList.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/CurrencyRates.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/EndpointGroup.schema.ts +0 -28
- package/src/cfg/generated/_utils/schemas/Network.schema.ts +0 -30
- package/src/cfg/generated/_utils/schemas/PaginatedAPIKeyListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedAdminPaymentListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedAdminPaymentStatsList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedAdminUserList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedCurrencyListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedEndpointGroupList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedNetworkList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedProviderCurrencyList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedRecentPaymentList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedRecentTransactionList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedSubscriptionListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedTariffList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedTransactionList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedUserBalanceList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedWebhookEventListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedWebhookStatsList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PatchedAPIKeyUpdateRequest.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PatchedAdminPaymentUpdateRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/PatchedPaymentRequest.schema.ts +0 -30
- package/src/cfg/generated/_utils/schemas/PatchedSubscriptionRequest.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/Payment.schema.ts +0 -49
- package/src/cfg/generated/_utils/schemas/PaymentAnalyticsResponse.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/PaymentCreate.schema.ts +0 -28
- package/src/cfg/generated/_utils/schemas/PaymentCreateRequest.schema.ts +0 -28
- package/src/cfg/generated/_utils/schemas/PaymentOverview.schema.ts +0 -31
- package/src/cfg/generated/_utils/schemas/PaymentRequest.schema.ts +0 -30
- package/src/cfg/generated/_utils/schemas/PaymentsChartResponse.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaymentsDashboardOverview.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/PaymentsMetrics.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/ProviderAnalyticsItem.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/ProviderCurrency.schema.ts +0 -36
- package/src/cfg/generated/_utils/schemas/RecentPayment.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/RecentTransaction.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/Subscription.schema.ts +0 -41
- package/src/cfg/generated/_utils/schemas/SubscriptionCreate.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/SubscriptionCreateRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/SubscriptionList.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/SubscriptionOverview.schema.ts +0 -37
- package/src/cfg/generated/_utils/schemas/SubscriptionRequest.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/SupportedCurrencies.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/SupportedProviders.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/Tariff.schema.ts +0 -34
- package/src/cfg/generated/_utils/schemas/Transaction.schema.ts +0 -35
- package/src/cfg/generated/_utils/schemas/UserBalance.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/WebhookEvent.schema.ts +0 -31
- package/src/cfg/generated/_utils/schemas/WebhookEventList.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/WebhookEventListRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/WebhookEventRequest.schema.ts +0 -30
- package/src/cfg/generated/_utils/schemas/WebhookHealth.schema.ts +0 -21
- package/src/cfg/generated/_utils/schemas/WebhookProviderStats.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/WebhookProviderStatsRequest.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/WebhookResponse.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/WebhookResponseRequest.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/WebhookStats.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/WebhookStatsRequest.schema.ts +0 -27
- package/src/cfg/generated/cfg__payments__webhooks/client.ts +0 -75
- package/src/cfg/generated/cfg__payments__webhooks/index.ts +0 -2
- package/src/cfg/generated/cfg__payments__webhooks/models.ts +0 -87
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedAPIKeyListList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { APIKeyListSchema } from './APIKeyList.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedAPIKeyListListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(APIKeyListSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedAPIKeyListList = z.infer<typeof PaginatedAPIKeyListListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedAdminPaymentListList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { AdminPaymentListSchema } from './AdminPaymentList.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedAdminPaymentListListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(AdminPaymentListSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedAdminPaymentListList = z.infer<typeof PaginatedAdminPaymentListListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedAdminPaymentStatsList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { AdminPaymentStatsSchema } from './AdminPaymentStats.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedAdminPaymentStatsListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(AdminPaymentStatsSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedAdminPaymentStatsList = z.infer<typeof PaginatedAdminPaymentStatsListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedAdminUserList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { AdminUserSchema } from './AdminUser.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedAdminUserListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(AdminUserSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedAdminUserList = z.infer<typeof PaginatedAdminUserListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedCurrencyListList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { CurrencyListSchema } from './CurrencyList.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedCurrencyListListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(CurrencyListSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedCurrencyListList = z.infer<typeof PaginatedCurrencyListListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedEndpointGroupList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { EndpointGroupSchema } from './EndpointGroup.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedEndpointGroupListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(EndpointGroupSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedEndpointGroupList = z.infer<typeof PaginatedEndpointGroupListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedNetworkList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { NetworkSchema } from './Network.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedNetworkListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(NetworkSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedNetworkList = z.infer<typeof PaginatedNetworkListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedProviderCurrencyList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { ProviderCurrencySchema } from './ProviderCurrency.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedProviderCurrencyListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(ProviderCurrencySchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedProviderCurrencyList = z.infer<typeof PaginatedProviderCurrencyListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedRecentPaymentList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { RecentPaymentSchema } from './RecentPayment.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedRecentPaymentListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(RecentPaymentSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedRecentPaymentList = z.infer<typeof PaginatedRecentPaymentListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedRecentTransactionList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { RecentTransactionSchema } from './RecentTransaction.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedRecentTransactionListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(RecentTransactionSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedRecentTransactionList = z.infer<typeof PaginatedRecentTransactionListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedSubscriptionListList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { SubscriptionListSchema } from './SubscriptionList.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedSubscriptionListListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(SubscriptionListSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedSubscriptionListList = z.infer<typeof PaginatedSubscriptionListListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedTariffList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { TariffSchema } from './Tariff.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedTariffListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(TariffSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedTariffList = z.infer<typeof PaginatedTariffListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedTransactionList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { TransactionSchema } from './Transaction.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedTransactionListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(TransactionSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedTransactionList = z.infer<typeof PaginatedTransactionListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedUserBalanceList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { UserBalanceSchema } from './UserBalance.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedUserBalanceListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(UserBalanceSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedUserBalanceList = z.infer<typeof PaginatedUserBalanceListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedWebhookEventListList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { WebhookEventListSchema } from './WebhookEventList.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedWebhookEventListListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(WebhookEventListSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedWebhookEventListList = z.infer<typeof PaginatedWebhookEventListListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaginatedWebhookStatsList
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
import { WebhookStatsSchema } from './WebhookStats.schema'
|
|
8
|
-
|
|
9
|
-
export const PaginatedWebhookStatsListSchema = z.object({
|
|
10
|
-
count: z.int(),
|
|
11
|
-
page: z.int(),
|
|
12
|
-
pages: z.int(),
|
|
13
|
-
page_size: z.int(),
|
|
14
|
-
has_next: z.boolean(),
|
|
15
|
-
has_previous: z.boolean(),
|
|
16
|
-
next_page: z.int().nullable().optional(),
|
|
17
|
-
previous_page: z.int().nullable().optional(),
|
|
18
|
-
results: z.array(WebhookStatsSchema),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PaginatedWebhookStatsList = z.infer<typeof PaginatedWebhookStatsListSchema>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PatchedAPIKeyUpdateRequest
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* * API key update serializer for modifying API key properties.
|
|
6
|
-
|
|
7
|
-
Allows updating name and active status only.
|
|
8
|
-
* */
|
|
9
|
-
import { z } from 'zod'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* API key update serializer for modifying API key properties.
|
|
13
|
-
|
|
14
|
-
Allows updating name and active status only.
|
|
15
|
-
*/
|
|
16
|
-
export const PatchedAPIKeyUpdateRequestSchema = z.object({
|
|
17
|
-
name: z.string().min(1).max(100).optional(),
|
|
18
|
-
is_active: z.boolean().optional(),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Infer TypeScript type from Zod schema
|
|
23
|
-
*/
|
|
24
|
-
export type PatchedAPIKeyUpdateRequest = z.infer<typeof PatchedAPIKeyUpdateRequestSchema>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PatchedAdminPaymentUpdateRequest
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* * Serializer for updating payments in admin interface.
|
|
6
|
-
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
import * as Enums from '../../enums'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Serializer for updating payments in admin interface.
|
|
12
|
-
*/
|
|
13
|
-
export const PatchedAdminPaymentUpdateRequestSchema = z.object({
|
|
14
|
-
status: z.nativeEnum(Enums.PatchedAdminPaymentUpdateRequestStatus).optional(),
|
|
15
|
-
description: z.string().optional(),
|
|
16
|
-
callback_url: z.url().nullable().optional(),
|
|
17
|
-
cancel_url: z.url().nullable().optional(),
|
|
18
|
-
provider_data: z.string().optional(),
|
|
19
|
-
webhook_data: z.string().optional(),
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Infer TypeScript type from Zod schema
|
|
24
|
-
*/
|
|
25
|
-
export type PatchedAdminPaymentUpdateRequest = z.infer<typeof PatchedAdminPaymentUpdateRequestSchema>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PatchedPaymentRequest
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* * Complete payment serializer with full details.
|
|
6
|
-
|
|
7
|
-
Used for detail views and updates.
|
|
8
|
-
* */
|
|
9
|
-
import { z } from 'zod'
|
|
10
|
-
import * as Enums from '../../enums'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Complete payment serializer with full details.
|
|
14
|
-
|
|
15
|
-
Used for detail views and updates.
|
|
16
|
-
*/
|
|
17
|
-
export const PatchedPaymentRequestSchema = z.object({
|
|
18
|
-
amount_usd: z.number().min(1.0).max(50000.0).optional(),
|
|
19
|
-
provider: z.nativeEnum(Enums.PatchedPaymentRequestProvider).optional(),
|
|
20
|
-
status: z.nativeEnum(Enums.PatchedPaymentRequestStatus).optional(),
|
|
21
|
-
callback_url: z.url().nullable().optional(),
|
|
22
|
-
cancel_url: z.url().nullable().optional(),
|
|
23
|
-
description: z.string().optional(),
|
|
24
|
-
expires_at: z.iso.datetime().nullable().optional(),
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Infer TypeScript type from Zod schema
|
|
29
|
-
*/
|
|
30
|
-
export type PatchedPaymentRequest = z.infer<typeof PatchedPaymentRequestSchema>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PatchedSubscriptionRequest
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* * Complete subscription serializer with full details.
|
|
6
|
-
|
|
7
|
-
Used for subscription detail views and updates.
|
|
8
|
-
* */
|
|
9
|
-
import { z } from 'zod'
|
|
10
|
-
import * as Enums from '../../enums'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Complete subscription serializer with full details.
|
|
14
|
-
|
|
15
|
-
Used for subscription detail views and updates.
|
|
16
|
-
*/
|
|
17
|
-
export const PatchedSubscriptionRequestSchema = z.object({
|
|
18
|
-
status: z.nativeEnum(Enums.PatchedSubscriptionRequestStatus).optional(),
|
|
19
|
-
tier: z.nativeEnum(Enums.PatchedSubscriptionRequestTier).optional(),
|
|
20
|
-
expires_at: z.iso.datetime().optional(),
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Infer TypeScript type from Zod schema
|
|
25
|
-
*/
|
|
26
|
-
export type PatchedSubscriptionRequest = z.infer<typeof PatchedSubscriptionRequestSchema>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for Payment
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* * Complete payment serializer with full details.
|
|
6
|
-
|
|
7
|
-
Used for detail views and updates.
|
|
8
|
-
* */
|
|
9
|
-
import { z } from 'zod'
|
|
10
|
-
import * as Enums from '../../enums'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Complete payment serializer with full details.
|
|
14
|
-
|
|
15
|
-
Used for detail views and updates.
|
|
16
|
-
*/
|
|
17
|
-
export const PaymentSchema = z.object({
|
|
18
|
-
id: z.uuid(),
|
|
19
|
-
user: z.string(),
|
|
20
|
-
amount_usd: z.number().min(1.0).max(50000.0),
|
|
21
|
-
amount_crypto: z.number(),
|
|
22
|
-
currency: z.string(),
|
|
23
|
-
network: z.string().nullable(),
|
|
24
|
-
provider: z.nativeEnum(Enums.PaymentProvider).optional(),
|
|
25
|
-
status: z.nativeEnum(Enums.PaymentStatus).optional(),
|
|
26
|
-
status_display: z.string(),
|
|
27
|
-
amount_display: z.string(),
|
|
28
|
-
provider_payment_id: z.string().nullable(),
|
|
29
|
-
payment_url: z.url().nullable(),
|
|
30
|
-
pay_address: z.string().nullable(),
|
|
31
|
-
callback_url: z.url().nullable().optional(),
|
|
32
|
-
cancel_url: z.url().nullable().optional(),
|
|
33
|
-
description: z.string().optional(),
|
|
34
|
-
transaction_hash: z.string().nullable(),
|
|
35
|
-
confirmations_count: z.int(),
|
|
36
|
-
created_at: z.iso.datetime(),
|
|
37
|
-
updated_at: z.iso.datetime(),
|
|
38
|
-
expires_at: z.iso.datetime().nullable().optional(),
|
|
39
|
-
completed_at: z.iso.datetime().nullable(),
|
|
40
|
-
is_pending: z.boolean(),
|
|
41
|
-
is_completed: z.boolean(),
|
|
42
|
-
is_failed: z.boolean(),
|
|
43
|
-
is_expired: z.boolean(),
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Infer TypeScript type from Zod schema
|
|
48
|
-
*/
|
|
49
|
-
export type Payment = z.infer<typeof PaymentSchema>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaymentAnalyticsResponse
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* * Payment analytics response with currency and provider breakdown
|
|
6
|
-
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
import { CurrencyAnalyticsItemSchema } from './CurrencyAnalyticsItem.schema'
|
|
9
|
-
import { ProviderAnalyticsItemSchema } from './ProviderAnalyticsItem.schema'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Payment analytics response with currency and provider breakdown
|
|
13
|
-
*/
|
|
14
|
-
export const PaymentAnalyticsResponseSchema = z.object({
|
|
15
|
-
currency_analytics: z.array(CurrencyAnalyticsItemSchema),
|
|
16
|
-
provider_analytics: z.array(ProviderAnalyticsItemSchema),
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Infer TypeScript type from Zod schema
|
|
21
|
-
*/
|
|
22
|
-
export type PaymentAnalyticsResponse = z.infer<typeof PaymentAnalyticsResponseSchema>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaymentCreate
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* * Payment creation serializer with Pydantic integration.
|
|
6
|
-
|
|
7
|
-
Validates input and delegates to PaymentService.
|
|
8
|
-
* */
|
|
9
|
-
import { z } from 'zod'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Payment creation serializer with Pydantic integration.
|
|
13
|
-
|
|
14
|
-
Validates input and delegates to PaymentService.
|
|
15
|
-
*/
|
|
16
|
-
export const PaymentCreateSchema = z.object({
|
|
17
|
-
amount_usd: z.number().min(1.0).max(50000.0),
|
|
18
|
-
currency_code: z.string().max(10),
|
|
19
|
-
callback_url: z.url().optional(),
|
|
20
|
-
cancel_url: z.url().optional(),
|
|
21
|
-
description: z.string().max(500).optional(),
|
|
22
|
-
metadata: z.string().optional(),
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Infer TypeScript type from Zod schema
|
|
27
|
-
*/
|
|
28
|
-
export type PaymentCreate = z.infer<typeof PaymentCreateSchema>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaymentCreateRequest
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* * Payment creation serializer with Pydantic integration.
|
|
6
|
-
|
|
7
|
-
Validates input and delegates to PaymentService.
|
|
8
|
-
* */
|
|
9
|
-
import { z } from 'zod'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Payment creation serializer with Pydantic integration.
|
|
13
|
-
|
|
14
|
-
Validates input and delegates to PaymentService.
|
|
15
|
-
*/
|
|
16
|
-
export const PaymentCreateRequestSchema = z.object({
|
|
17
|
-
amount_usd: z.number().min(1.0).max(50000.0),
|
|
18
|
-
currency_code: z.string().min(1).max(10),
|
|
19
|
-
callback_url: z.url().optional(),
|
|
20
|
-
cancel_url: z.url().optional(),
|
|
21
|
-
description: z.string().max(500).optional(),
|
|
22
|
-
metadata: z.string().optional(),
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Infer TypeScript type from Zod schema
|
|
27
|
-
*/
|
|
28
|
-
export type PaymentCreateRequest = z.infer<typeof PaymentCreateRequestSchema>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zod schema for PaymentOverview
|
|
3
|
-
*
|
|
4
|
-
* This schema provides runtime validation and type inference.
|
|
5
|
-
* * Payments overview metrics
|
|
6
|
-
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Payments overview metrics
|
|
11
|
-
*/
|
|
12
|
-
export const PaymentOverviewSchema = z.object({
|
|
13
|
-
total_payments: z.int(),
|
|
14
|
-
completed_payments: z.int(),
|
|
15
|
-
pending_payments: z.int(),
|
|
16
|
-
failed_payments: z.int(),
|
|
17
|
-
total_amount_usd: z.number(),
|
|
18
|
-
completed_amount_usd: z.number(),
|
|
19
|
-
average_payment_usd: z.number(),
|
|
20
|
-
success_rate: z.number(),
|
|
21
|
-
last_payment_at: z.iso.datetime().nullable(),
|
|
22
|
-
payments_this_month: z.int(),
|
|
23
|
-
amount_this_month: z.number(),
|
|
24
|
-
top_currency: z.string().nullable(),
|
|
25
|
-
top_currency_count: z.int(),
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Infer TypeScript type from Zod schema
|
|
30
|
-
*/
|
|
31
|
-
export type PaymentOverview = z.infer<typeof PaymentOverviewSchema>
|