@djangocfg/api 1.0.1 → 1.0.3
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 +17641 -8457
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14654 -5066
- package/dist/index.d.ts +14654 -5066
- package/dist/index.mjs +17885 -8728
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -17
- package/src/cfg/contexts/payments/ApiKeysContext.tsx +2 -2
- package/src/cfg/contexts/payments/CurrenciesContext.tsx +0 -26
- package/src/cfg/contexts/payments/OverviewContext.tsx +79 -0
- package/src/cfg/contexts/payments/RootPaymentsContext.tsx +137 -0
- package/src/cfg/contexts/payments/index.ts +13 -0
- package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -6
- package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +876 -0
- package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -6
- package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -6
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +181 -179
- package/src/cfg/generated/_utils/fetchers/cfg__payments__webhooks.ts +5 -5
- package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -12
- package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -10
- package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
- package/src/cfg/generated/_utils/hooks/cfg__knowbase.ts +997 -0
- package/src/cfg/generated/_utils/hooks/cfg__payments.ts +12 -10
- package/src/cfg/generated/_utils/hooks/index.ts +1 -0
- package/src/cfg/generated/_utils/schemas/APIKeyValidationResponse.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/AdminPaymentDetail.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/AdminPaymentList.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItem.schema.ts +33 -0
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunk.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunkDetail.schema.ts +30 -0
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunkRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ArchiveItemDetail.schema.ts +35 -0
- package/src/cfg/generated/_utils/schemas/ArchiveItemRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ArchiveProcessingResult.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/ArchiveSearchRequestRequest.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ArchiveSearchResult.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ArchiveStatistics.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/ChatHistory.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ChatMessage.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/ChatQueryRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ChatResponse.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/ChatResponseRequest.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/ChatSession.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/ChatSessionCreateRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ChatSessionRequest.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ChatSource.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ChatSourceRequest.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ChunkRevectorizationRequestRequest.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CurrencyList.schema.ts +2 -0
- package/src/cfg/generated/_utils/schemas/CurrencyRates.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/Document.schema.ts +32 -0
- package/src/cfg/generated/_utils/schemas/DocumentArchive.schema.ts +44 -0
- package/src/cfg/generated/_utils/schemas/DocumentArchiveDetail.schema.ts +48 -0
- package/src/cfg/generated/_utils/schemas/DocumentArchiveList.schema.ts +35 -0
- package/src/cfg/generated/_utils/schemas/DocumentArchiveRequest.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/DocumentCategory.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/DocumentCategoryRequest.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/DocumentCreateRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/DocumentProcessingStatus.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/DocumentRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/DocumentStats.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/Network.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PaginatedArchiveItemChunkList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedArchiveItemList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedArchiveSearchResultList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedChatResponseList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedChatSessionList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedDocumentArchiveListList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedDocumentList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedPublicCategoryList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedPublicDocumentListList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/PatchedArchiveItemRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/PatchedChatResponseRequest.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/PatchedChatSessionRequest.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/PatchedDocumentArchiveRequest.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/PatchedDocumentRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/Payment.schema.ts +1 -0
- package/src/cfg/generated/_utils/schemas/PaymentCreate.schema.ts +0 -1
- package/src/cfg/generated/_utils/schemas/PaymentCreateRequest.schema.ts +0 -1
- package/src/cfg/generated/_utils/schemas/PaymentsMetrics.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ProviderCurrency.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PublicCategory.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/PublicDocument.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/PublicDocumentList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/SupportedCurrencies.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/VectorizationResult.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/VectorizationStatistics.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/index.ts +54 -0
- package/src/cfg/generated/cfg__accounts/client.ts +1 -1
- package/src/cfg/generated/cfg__accounts__auth/client.ts +1 -1
- package/src/cfg/generated/cfg__accounts__user_profile/client.ts +1 -1
- package/src/cfg/generated/cfg__endpoints/client.ts +1 -1
- package/src/cfg/generated/cfg__health/client.ts +1 -1
- package/src/cfg/generated/cfg__knowbase/client.ts +666 -0
- package/src/cfg/generated/cfg__knowbase/index.ts +2 -0
- package/src/cfg/generated/cfg__knowbase/models.ts +1120 -0
- package/src/cfg/generated/cfg__leads/client.ts +1 -1
- package/src/cfg/generated/cfg__leads__lead_submission/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__bulk_email/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__campaigns/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__logs/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__newsletters/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__subscriptions/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__testing/client.ts +1 -1
- package/src/cfg/generated/cfg__payments/client.ts +25 -45
- package/src/cfg/generated/cfg__payments/models.ts +46 -12
- package/src/cfg/generated/cfg__payments__webhooks/client.ts +1 -1
- package/src/cfg/generated/cfg__support/client.ts +1 -1
- package/src/cfg/generated/cfg__tasks/client.ts +1 -1
- package/src/cfg/generated/client.ts +57 -54
- package/src/cfg/generated/enums.ts +269 -16
- package/src/cfg/generated/index.ts +82 -29
- package/src/cfg/generated/schema.ts +10238 -4386
- package/src/index.ts +23 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for PatchedChatSessionRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Chat session response serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Chat session response serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const PatchedChatSessionRequestSchema = z.object({
|
|
13
|
+
title: z.string().max(255).optional(),
|
|
14
|
+
is_active: z.boolean().optional(),
|
|
15
|
+
messages_count: z.int().min(0.0).max(9.223372036854776e+18).optional(),
|
|
16
|
+
total_tokens_used: z.int().min(0.0).max(9.223372036854776e+18).optional(),
|
|
17
|
+
model_name: z.string().min(1).max(100).optional(),
|
|
18
|
+
temperature: z.number().optional(),
|
|
19
|
+
max_context_chunks: z.int().min(0.0).max(9.223372036854776e+18).optional(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type PatchedChatSessionRequest = z.infer<typeof PatchedChatSessionRequestSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for PatchedDocumentArchiveRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Document archive serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Document archive serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const PatchedDocumentArchiveRequestSchema = z.object({
|
|
13
|
+
title: z.string().min(1).max(512).optional(),
|
|
14
|
+
description: z.string().optional(),
|
|
15
|
+
is_public: z.boolean().optional(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type PatchedDocumentArchiveRequest = z.infer<typeof PatchedDocumentArchiveRequestSchema>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for PatchedDocumentRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Document response serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Document response serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const PatchedDocumentRequestSchema = z.object({
|
|
13
|
+
title: z.string().min(1).max(512).optional(),
|
|
14
|
+
file_type: z.string().min(1).max(100).optional(),
|
|
15
|
+
file_size: z.int().min(0.0).max(9.223372036854776e+18).optional(),
|
|
16
|
+
metadata: z.string().nullable().optional(),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type PatchedDocumentRequest = z.infer<typeof PatchedDocumentRequestSchema>
|
|
@@ -18,6 +18,7 @@ export const PaymentSchema = z.object({
|
|
|
18
18
|
id: z.uuid(),
|
|
19
19
|
user: z.string(),
|
|
20
20
|
amount_usd: z.number().min(1.0).max(50000.0),
|
|
21
|
+
amount_crypto: z.number(),
|
|
21
22
|
currency: z.int(),
|
|
22
23
|
network: z.int().nullable().optional(),
|
|
23
24
|
provider: z.nativeEnum(Enums.PaymentProvider).optional(),
|
|
@@ -17,7 +17,6 @@ Validates input and delegates to PaymentService.
|
|
|
17
17
|
export const PaymentCreateSchema = z.object({
|
|
18
18
|
amount_usd: z.number().min(1.0).max(50000.0),
|
|
19
19
|
currency_code: z.nativeEnum(Enums.PaymentCreateCurrencyCode),
|
|
20
|
-
provider: z.nativeEnum(Enums.PaymentCreateProvider).optional(),
|
|
21
20
|
callback_url: z.url().optional(),
|
|
22
21
|
cancel_url: z.url().optional(),
|
|
23
22
|
description: z.string().max(500).optional(),
|
|
@@ -17,7 +17,6 @@ Validates input and delegates to PaymentService.
|
|
|
17
17
|
export const PaymentCreateRequestSchema = z.object({
|
|
18
18
|
amount_usd: z.number().min(1.0).max(50000.0),
|
|
19
19
|
currency_code: z.nativeEnum(Enums.PaymentCreateRequestCurrencyCode),
|
|
20
|
-
provider: z.nativeEnum(Enums.PaymentCreateRequestProvider).optional(),
|
|
21
20
|
callback_url: z.url().optional(),
|
|
22
21
|
cancel_url: z.url().optional(),
|
|
23
22
|
description: z.string().max(500).optional(),
|
|
@@ -15,7 +15,7 @@ import { SubscriptionOverviewSchema } from './SubscriptionOverview.schema'
|
|
|
15
15
|
*/
|
|
16
16
|
export const PaymentsMetricsSchema = z.object({
|
|
17
17
|
balance: BalanceOverviewSchema,
|
|
18
|
-
subscription: SubscriptionOverviewSchema,
|
|
18
|
+
subscription: SubscriptionOverviewSchema.nullable(),
|
|
19
19
|
api_keys: APIKeysOverviewSchema,
|
|
20
20
|
payments: PaymentOverviewSchema,
|
|
21
21
|
})
|
|
@@ -18,7 +18,7 @@ Used for provider currency management and rates.
|
|
|
18
18
|
export const ProviderCurrencySchema = z.object({
|
|
19
19
|
id: z.int(),
|
|
20
20
|
currency: CurrencyListSchema,
|
|
21
|
-
network: NetworkSchema,
|
|
21
|
+
network: NetworkSchema.nullable(),
|
|
22
22
|
provider: z.string(),
|
|
23
23
|
provider_currency_code: z.string(),
|
|
24
24
|
provider_min_amount_usd: z.number(),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for PublicCategory
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Public category serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Public category serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const PublicCategorySchema = z.object({
|
|
13
|
+
id: z.uuid(),
|
|
14
|
+
name: z.string().max(255),
|
|
15
|
+
description: z.string().optional(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type PublicCategory = z.infer<typeof PublicCategorySchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for PublicDocument
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Public document detail serializer - only essential data for clients.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { PublicCategorySchema } from './PublicCategory.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Public document detail serializer - only essential data for clients.
|
|
12
|
+
*/
|
|
13
|
+
export const PublicDocumentSchema = z.object({
|
|
14
|
+
id: z.uuid(),
|
|
15
|
+
title: z.string().max(512),
|
|
16
|
+
content: z.string(),
|
|
17
|
+
category: PublicCategorySchema,
|
|
18
|
+
created_at: z.iso.datetime(),
|
|
19
|
+
updated_at: z.iso.datetime(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type PublicDocument = z.infer<typeof PublicDocumentSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for PublicDocumentList
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Public document list serializer - minimal fields for listing.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { PublicCategorySchema } from './PublicCategory.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Public document list serializer - minimal fields for listing.
|
|
12
|
+
*/
|
|
13
|
+
export const PublicDocumentListSchema = z.object({
|
|
14
|
+
id: z.uuid(),
|
|
15
|
+
title: z.string().max(512),
|
|
16
|
+
category: PublicCategorySchema,
|
|
17
|
+
created_at: z.iso.datetime(),
|
|
18
|
+
updated_at: z.iso.datetime(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type PublicDocumentList = z.infer<typeof PublicDocumentListSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for SupportedCurrencies
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Supported currencies serializer for provider capabilities.
|
|
6
|
+
|
|
7
|
+
Gets supported currencies from providers through CurrencyService.
|
|
8
|
+
* */
|
|
9
|
+
import { z } from 'zod'
|
|
10
|
+
import * as Enums from '../../enums'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Supported currencies serializer for provider capabilities.
|
|
14
|
+
|
|
15
|
+
Gets supported currencies from providers through CurrencyService.
|
|
16
|
+
*/
|
|
17
|
+
export const SupportedCurrenciesSchema = z.object({
|
|
18
|
+
provider: z.nativeEnum(Enums.SupportedCurrenciesProvider).optional(),
|
|
19
|
+
currency_type: z.nativeEnum(Enums.SupportedCurrenciesCurrencyType).optional(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type SupportedCurrencies = z.infer<typeof SupportedCurrenciesSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for VectorizationResult
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Vectorization result serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Vectorization result serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const VectorizationResultSchema = z.object({
|
|
13
|
+
vectorized_count: z.int(),
|
|
14
|
+
failed_count: z.int(),
|
|
15
|
+
total_tokens: z.int(),
|
|
16
|
+
total_cost: z.number(),
|
|
17
|
+
success_rate: z.number(),
|
|
18
|
+
errors: z.array(z.string()),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type VectorizationResult = z.infer<typeof VectorizationResultSchema>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for VectorizationStatistics
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Vectorization statistics serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Vectorization statistics serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const VectorizationStatisticsSchema = z.object({
|
|
13
|
+
total_chunks: z.int(),
|
|
14
|
+
vectorized_chunks: z.int(),
|
|
15
|
+
pending_chunks: z.int(),
|
|
16
|
+
vectorization_rate: z.number(),
|
|
17
|
+
total_tokens: z.int(),
|
|
18
|
+
total_cost: z.number(),
|
|
19
|
+
avg_tokens_per_chunk: z.number(),
|
|
20
|
+
avg_cost_per_chunk: z.number(),
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Infer TypeScript type from Zod schema
|
|
25
|
+
*/
|
|
26
|
+
export type VectorizationStatistics = z.infer<typeof VectorizationStatisticsSchema>
|
|
@@ -35,14 +35,47 @@ export * from './AdminPaymentStats.schema'
|
|
|
35
35
|
export * from './AdminPaymentUpdate.schema'
|
|
36
36
|
export * from './AdminPaymentUpdateRequest.schema'
|
|
37
37
|
export * from './AdminUser.schema'
|
|
38
|
+
export * from './ArchiveItem.schema'
|
|
39
|
+
export * from './ArchiveItemChunk.schema'
|
|
40
|
+
export * from './ArchiveItemChunkDetail.schema'
|
|
41
|
+
export * from './ArchiveItemChunkRequest.schema'
|
|
42
|
+
export * from './ArchiveItemDetail.schema'
|
|
43
|
+
export * from './ArchiveItemRequest.schema'
|
|
44
|
+
export * from './ArchiveProcessingResult.schema'
|
|
45
|
+
export * from './ArchiveSearchRequestRequest.schema'
|
|
46
|
+
export * from './ArchiveSearchResult.schema'
|
|
47
|
+
export * from './ArchiveStatistics.schema'
|
|
38
48
|
export * from './BalanceOverview.schema'
|
|
39
49
|
export * from './BulkEmailRequest.schema'
|
|
40
50
|
export * from './BulkEmailResponse.schema'
|
|
41
51
|
export * from './ChartDataPoint.schema'
|
|
42
52
|
export * from './ChartSeries.schema'
|
|
53
|
+
export * from './ChatHistory.schema'
|
|
54
|
+
export * from './ChatMessage.schema'
|
|
55
|
+
export * from './ChatQueryRequest.schema'
|
|
56
|
+
export * from './ChatResponse.schema'
|
|
57
|
+
export * from './ChatResponseRequest.schema'
|
|
58
|
+
export * from './ChatSession.schema'
|
|
59
|
+
export * from './ChatSessionCreateRequest.schema'
|
|
60
|
+
export * from './ChatSessionRequest.schema'
|
|
61
|
+
export * from './ChatSource.schema'
|
|
62
|
+
export * from './ChatSourceRequest.schema'
|
|
63
|
+
export * from './ChunkRevectorizationRequestRequest.schema'
|
|
43
64
|
export * from './Currency.schema'
|
|
44
65
|
export * from './CurrencyAnalyticsItem.schema'
|
|
45
66
|
export * from './CurrencyList.schema'
|
|
67
|
+
export * from './CurrencyRates.schema'
|
|
68
|
+
export * from './Document.schema'
|
|
69
|
+
export * from './DocumentArchive.schema'
|
|
70
|
+
export * from './DocumentArchiveDetail.schema'
|
|
71
|
+
export * from './DocumentArchiveList.schema'
|
|
72
|
+
export * from './DocumentArchiveRequest.schema'
|
|
73
|
+
export * from './DocumentCategory.schema'
|
|
74
|
+
export * from './DocumentCategoryRequest.schema'
|
|
75
|
+
export * from './DocumentCreateRequest.schema'
|
|
76
|
+
export * from './DocumentProcessingStatus.schema'
|
|
77
|
+
export * from './DocumentRequest.schema'
|
|
78
|
+
export * from './DocumentStats.schema'
|
|
46
79
|
export * from './EmailLog.schema'
|
|
47
80
|
export * from './Endpoint.schema'
|
|
48
81
|
export * from './EndpointGroup.schema'
|
|
@@ -71,7 +104,14 @@ export * from './PaginatedAPIKeyListList.schema'
|
|
|
71
104
|
export * from './PaginatedAdminPaymentListList.schema'
|
|
72
105
|
export * from './PaginatedAdminPaymentStatsList.schema'
|
|
73
106
|
export * from './PaginatedAdminUserList.schema'
|
|
107
|
+
export * from './PaginatedArchiveItemChunkList.schema'
|
|
108
|
+
export * from './PaginatedArchiveItemList.schema'
|
|
109
|
+
export * from './PaginatedArchiveSearchResultList.schema'
|
|
110
|
+
export * from './PaginatedChatResponseList.schema'
|
|
111
|
+
export * from './PaginatedChatSessionList.schema'
|
|
74
112
|
export * from './PaginatedCurrencyListList.schema'
|
|
113
|
+
export * from './PaginatedDocumentArchiveListList.schema'
|
|
114
|
+
export * from './PaginatedDocumentList.schema'
|
|
75
115
|
export * from './PaginatedEmailLogList.schema'
|
|
76
116
|
export * from './PaginatedEndpointGroupList.schema'
|
|
77
117
|
export * from './PaginatedLeadSubmissionList.schema'
|
|
@@ -82,6 +122,8 @@ export * from './PaginatedNewsletterList.schema'
|
|
|
82
122
|
export * from './PaginatedNewsletterSubscriptionList.schema'
|
|
83
123
|
export * from './PaginatedPaymentListList.schema'
|
|
84
124
|
export * from './PaginatedProviderCurrencyList.schema'
|
|
125
|
+
export * from './PaginatedPublicCategoryList.schema'
|
|
126
|
+
export * from './PaginatedPublicDocumentListList.schema'
|
|
85
127
|
export * from './PaginatedRecentPaymentList.schema'
|
|
86
128
|
export * from './PaginatedRecentTransactionList.schema'
|
|
87
129
|
export * from './PaginatedSubscriptionListList.schema'
|
|
@@ -93,6 +135,12 @@ export * from './PaginatedWebhookEventListList.schema'
|
|
|
93
135
|
export * from './PaginatedWebhookStatsList.schema'
|
|
94
136
|
export * from './PatchedAPIKeyUpdateRequest.schema'
|
|
95
137
|
export * from './PatchedAdminPaymentUpdateRequest.schema'
|
|
138
|
+
export * from './PatchedArchiveItemChunkRequest.schema'
|
|
139
|
+
export * from './PatchedArchiveItemRequest.schema'
|
|
140
|
+
export * from './PatchedChatResponseRequest.schema'
|
|
141
|
+
export * from './PatchedChatSessionRequest.schema'
|
|
142
|
+
export * from './PatchedDocumentArchiveRequest.schema'
|
|
143
|
+
export * from './PatchedDocumentRequest.schema'
|
|
96
144
|
export * from './PatchedLeadSubmissionRequest.schema'
|
|
97
145
|
export * from './PatchedMessageRequest.schema'
|
|
98
146
|
export * from './PatchedNewsletterCampaignRequest.schema'
|
|
@@ -113,6 +161,9 @@ export * from './PaymentsDashboardOverview.schema'
|
|
|
113
161
|
export * from './PaymentsMetrics.schema'
|
|
114
162
|
export * from './ProviderAnalyticsItem.schema'
|
|
115
163
|
export * from './ProviderCurrency.schema'
|
|
164
|
+
export * from './PublicCategory.schema'
|
|
165
|
+
export * from './PublicDocument.schema'
|
|
166
|
+
export * from './PublicDocumentList.schema'
|
|
116
167
|
export * from './QueueAction.schema'
|
|
117
168
|
export * from './QueueActionRequest.schema'
|
|
118
169
|
export * from './QueueStatus.schema'
|
|
@@ -131,6 +182,7 @@ export * from './SubscriptionList.schema'
|
|
|
131
182
|
export * from './SubscriptionOverview.schema'
|
|
132
183
|
export * from './SubscriptionRequest.schema'
|
|
133
184
|
export * from './SuccessResponse.schema'
|
|
185
|
+
export * from './SupportedCurrencies.schema'
|
|
134
186
|
export * from './SupportedProviders.schema'
|
|
135
187
|
export * from './Tariff.schema'
|
|
136
188
|
export * from './TaskStatistics.schema'
|
|
@@ -145,6 +197,8 @@ export * from './UnsubscribeRequest.schema'
|
|
|
145
197
|
export * from './User.schema'
|
|
146
198
|
export * from './UserBalance.schema'
|
|
147
199
|
export * from './UserProfileUpdateRequest.schema'
|
|
200
|
+
export * from './VectorizationResult.schema'
|
|
201
|
+
export * from './VectorizationStatistics.schema'
|
|
148
202
|
export * from './WebhookEvent.schema'
|
|
149
203
|
export * from './WebhookEventList.schema'
|
|
150
204
|
export * from './WebhookEventListRequest.schema'
|