@djangocfg/ext-knowbase 1.0.25 → 1.0.27
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/config.cjs +1 -1
- package/dist/config.js +1 -1
- package/dist/hooks.cjs +592 -210
- package/dist/hooks.d.cts +21 -0
- package/dist/hooks.d.ts +21 -0
- package/dist/hooks.js +592 -210
- package/dist/i18n.cjs +507 -3
- package/dist/i18n.d.cts +29 -1
- package/dist/i18n.d.ts +29 -1
- package/dist/i18n.js +492 -2
- package/dist/index.cjs +115 -209
- package/dist/index.d.cts +72 -205
- package/dist/index.d.ts +72 -205
- package/dist/index.js +115 -209
- package/package.json +9 -9
- package/src/api/generated/ext_knowbase/_utils/fetchers/ext_knowbase__knowbase.ts +69 -136
- package/src/api/generated/ext_knowbase/_utils/hooks/ext_knowbase__knowbase.ts +14 -15
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItem.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItemChunk.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItemChunkDetail.schema.ts +3 -4
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItemChunkRequest.schema.ts +3 -4
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItemDetail.schema.ts +3 -4
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItemRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveProcessingResult.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveSearchRequestRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveSearchResult.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveStatistics.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/CfgKnowbaseSystemArchivesCreateRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatHistory.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatMessage.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatQueryRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatResponse.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatResponseRequest.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatSession.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatSessionCreateRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatSessionRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatSource.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatSourceRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChunkRevectorizationRequestRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/Document.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentArchive.schema.ts +3 -4
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentArchiveDetail.schema.ts +6 -7
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentArchiveList.schema.ts +5 -6
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentArchiveRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentCategory.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentCategoryRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentCreateRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentProcessingStatus.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentStats.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedArchiveItemChunkList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedArchiveItemList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedArchiveSearchResultList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedChatResponseList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedChatSessionList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedDocumentArchiveListList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedDocumentList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedPublicCategoryList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedPublicDocumentListList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts +3 -4
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedArchiveItemRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedChatResponseRequest.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedChatSessionRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedDocumentArchiveRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedDocumentRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PublicCategory.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PublicDocument.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PublicDocumentList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/VectorizationResult.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/VectorizationStatistics.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/api-instance.ts +1 -1
- package/src/api/generated/ext_knowbase/client.ts +6 -5
- package/src/api/generated/ext_knowbase/enums.ts +0 -165
- package/src/api/generated/ext_knowbase/ext_knowbase__knowbase/client.ts +35 -34
- package/src/api/generated/ext_knowbase/ext_knowbase__knowbase/models.ts +9 -9
- package/src/api/generated/ext_knowbase/index.ts +8 -6
- package/src/api/generated/ext_knowbase/retry.ts +0 -1
- package/src/api/generated/ext_knowbase/schema.json +189 -0
- package/src/i18n/index.ts +14 -0
- package/src/i18n/locales/ar.ts +36 -0
- package/src/i18n/locales/da.ts +36 -0
- package/src/i18n/locales/de.ts +36 -0
- package/src/i18n/locales/es.ts +36 -0
- package/src/i18n/locales/fr.ts +36 -0
- package/src/i18n/locales/it.ts +36 -0
- package/src/i18n/locales/ja.ts +36 -0
- package/src/i18n/locales/nl.ts +36 -0
- package/src/i18n/locales/no.ts +36 -0
- package/src/i18n/locales/pl.ts +36 -0
- package/src/i18n/locales/pt-BR.ts +36 -0
- package/src/i18n/locales/sv.ts +36 -0
- package/src/i18n/locales/tr.ts +36 -0
- package/src/i18n/locales/zh.ts +36 -0
- package/src/i18n/useKnowbaseT.ts +15 -1
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Chat response serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import { ChatSourceRequestSchema } from './ChatSourceRequest.schema';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ChatSourceRequestSchema } from './ChatSourceRequest.schema'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Chat response serializer.
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Document archive serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import { DocumentCategorySchema } from './DocumentCategory.schema';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
9
|
+
import { DocumentCategorySchema } from './DocumentCategory.schema'
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Document archive serializer.
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Detailed archive serializer with items.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { DocumentCategorySchema } from './DocumentCategory.schema';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
9
|
+
import { ArchiveItemSchema } from './ArchiveItem.schema'
|
|
10
|
+
import { DocumentCategorySchema } from './DocumentCategory.schema'
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Detailed archive serializer with items.
|
|
@@ -22,8 +21,8 @@ export const DocumentArchiveDetailSchema = z.object({
|
|
|
22
21
|
archive_file: z.union([z.url(), z.literal('')]),
|
|
23
22
|
original_filename: z.string(),
|
|
24
23
|
file_size: z.int(),
|
|
25
|
-
archive_type: z.nativeEnum(Enums.
|
|
26
|
-
processing_status: z.nativeEnum(Enums.
|
|
24
|
+
archive_type: z.nativeEnum(Enums.DocumentArchiveArchiveType),
|
|
25
|
+
processing_status: z.nativeEnum(Enums.DocumentArchiveProcessingStatus),
|
|
27
26
|
processed_at: z.string().datetime({ offset: true }).nullable(),
|
|
28
27
|
processing_duration_ms: z.int(),
|
|
29
28
|
processing_error: z.string(),
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Simplified archive serializer for list views.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import { DocumentCategorySchema } from './DocumentCategory.schema';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
9
|
+
import { DocumentCategorySchema } from './DocumentCategory.schema'
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Simplified archive serializer for list views.
|
|
@@ -20,8 +19,8 @@ export const DocumentArchiveListSchema = z.object({
|
|
|
20
19
|
is_public: z.boolean(),
|
|
21
20
|
original_filename: z.string(),
|
|
22
21
|
file_size: z.int(),
|
|
23
|
-
archive_type: z.nativeEnum(Enums.
|
|
24
|
-
processing_status: z.nativeEnum(Enums.
|
|
22
|
+
archive_type: z.nativeEnum(Enums.DocumentArchiveArchiveType),
|
|
23
|
+
processing_status: z.nativeEnum(Enums.DocumentArchiveProcessingStatus),
|
|
25
24
|
processed_at: z.string().datetime({ offset: true }).nullable(),
|
|
26
25
|
total_items: z.int(),
|
|
27
26
|
total_chunks: z.int(),
|
package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedArchiveItemChunkList.schema.ts
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import { ArchiveItemChunkSchema } from './ArchiveItemChunk.schema';
|
|
6
|
+
import { z } from 'zod'
|
|
7
|
+
import { ArchiveItemChunkSchema } from './ArchiveItemChunk.schema'
|
|
9
8
|
|
|
10
9
|
export const PaginatedArchiveItemChunkListSchema = z.object({
|
|
11
10
|
count: z.int(),
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import { ArchiveItemSchema } from './ArchiveItem.schema';
|
|
6
|
+
import { z } from 'zod'
|
|
7
|
+
import { ArchiveItemSchema } from './ArchiveItem.schema'
|
|
9
8
|
|
|
10
9
|
export const PaginatedArchiveItemListSchema = z.object({
|
|
11
10
|
count: z.int(),
|
package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedArchiveSearchResultList.schema.ts
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import { ArchiveSearchResultSchema } from './ArchiveSearchResult.schema';
|
|
6
|
+
import { z } from 'zod'
|
|
7
|
+
import { ArchiveSearchResultSchema } from './ArchiveSearchResult.schema'
|
|
9
8
|
|
|
10
9
|
export const PaginatedArchiveSearchResultListSchema = z.object({
|
|
11
10
|
count: z.int(),
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import { ChatResponseSchema } from './ChatResponse.schema';
|
|
6
|
+
import { z } from 'zod'
|
|
7
|
+
import { ChatResponseSchema } from './ChatResponse.schema'
|
|
9
8
|
|
|
10
9
|
export const PaginatedChatResponseListSchema = z.object({
|
|
11
10
|
count: z.int(),
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import { ChatSessionSchema } from './ChatSession.schema';
|
|
6
|
+
import { z } from 'zod'
|
|
7
|
+
import { ChatSessionSchema } from './ChatSession.schema'
|
|
9
8
|
|
|
10
9
|
export const PaginatedChatSessionListSchema = z.object({
|
|
11
10
|
count: z.int(),
|
package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedDocumentArchiveListList.schema.ts
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import { DocumentArchiveListSchema } from './DocumentArchiveList.schema';
|
|
6
|
+
import { z } from 'zod'
|
|
7
|
+
import { DocumentArchiveListSchema } from './DocumentArchiveList.schema'
|
|
9
8
|
|
|
10
9
|
export const PaginatedDocumentArchiveListListSchema = z.object({
|
|
11
10
|
count: z.int(),
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import { DocumentSchema } from './Document.schema';
|
|
6
|
+
import { z } from 'zod'
|
|
7
|
+
import { DocumentSchema } from './Document.schema'
|
|
9
8
|
|
|
10
9
|
export const PaginatedDocumentListSchema = z.object({
|
|
11
10
|
count: z.int(),
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import { PublicCategorySchema } from './PublicCategory.schema';
|
|
6
|
+
import { z } from 'zod'
|
|
7
|
+
import { PublicCategorySchema } from './PublicCategory.schema'
|
|
9
8
|
|
|
10
9
|
export const PaginatedPublicCategoryListSchema = z.object({
|
|
11
10
|
count: z.int(),
|
package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedPublicDocumentListList.schema.ts
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* */
|
|
6
|
-
import { z } from 'zod'
|
|
7
|
-
|
|
8
|
-
import { PublicDocumentListSchema } from './PublicDocumentList.schema';
|
|
6
|
+
import { z } from 'zod'
|
|
7
|
+
import { PublicDocumentListSchema } from './PublicDocumentList.schema'
|
|
9
8
|
|
|
10
9
|
export const PaginatedPublicDocumentListListSchema = z.object({
|
|
11
10
|
count: z.int(),
|
package/src/api/generated/ext_knowbase/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts
CHANGED
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Archive item chunk serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import * as Enums from '../../enums';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Archive item chunk serializer.
|
|
@@ -14,7 +13,7 @@ import * as Enums from '../../enums';
|
|
|
14
13
|
export const PatchedArchiveItemChunkRequestSchema = z.object({
|
|
15
14
|
content: z.string().min(1).optional(),
|
|
16
15
|
chunk_index: z.int().min(0.0).max(2147483647.0).optional(),
|
|
17
|
-
chunk_type: z.nativeEnum(Enums.
|
|
16
|
+
chunk_type: z.nativeEnum(Enums.ArchiveItemChunkChunkType).optional(),
|
|
18
17
|
})
|
|
19
18
|
|
|
20
19
|
/**
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Chat response serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import { ChatSourceRequestSchema } from './ChatSourceRequest.schema';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ChatSourceRequestSchema } from './ChatSourceRequest.schema'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Chat response serializer.
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Public document detail serializer - only essential data for clients.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import { PublicCategorySchema } from './PublicCategory.schema';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { PublicCategorySchema } from './PublicCategory.schema'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Public document detail serializer - only essential data for clients.
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Public document list serializer - minimal fields for listing.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import { PublicCategorySchema } from './PublicCategory.schema';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { PublicCategorySchema } from './PublicCategory.schema'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Public document list serializer - minimal fields for listing.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { APILogger, type LoggerConfig } from
|
|
5
|
-
import { type RetryConfig
|
|
1
|
+
import { ExtKnowbaseKnowbase } from "./ext_knowbase__knowbase";
|
|
2
|
+
import { HttpClientAdapter, FetchAdapter } from "./http";
|
|
3
|
+
import { APIError, NetworkError } from "./errors";
|
|
4
|
+
import { APILogger, type LoggerConfig } from "./logger";
|
|
5
|
+
import { withRetry, type RetryConfig } from "./retry";
|
|
6
|
+
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Async API client for Django CFG API.
|