change document to text and binary content
Some checks failed
Build and release / Build (push) Failing after 1m12s
Build and release / update-release-draft (push) Has been skipped
Build and release / Release (push) Has been skipped

This commit is contained in:
Morten Olsen
2025-12-10 22:06:15 +01:00
parent 25f614a730
commit 1255639058
7 changed files with 40 additions and 20 deletions

View File

@@ -11,12 +11,11 @@ const documentSchema = z
updatedAt: z.iso.datetime(),
deletedAt: z.iso.datetime().nullable(),
contentType: z.string().nullable(),
content: z.string().nullable(),
text: z.string().nullable(),
source: z.string().nullable(),
sourceId: z.string().nullable(),
type: z.string(),
typeVersion: z.int().nullable(),
searchText: z.string().nullable(),
metadata: z.unknown(),
})
.meta({ id: 'Document' });
@@ -29,17 +28,17 @@ const documentUpsertSchema = z
owner: z.string().nullish(),
contentType: z.string().nullish(),
content: z.string().nullish(),
text: z.string().nullish(),
source: z.string().nullish(),
sourceId: z.string().nullish(),
type: z.string().optional(),
typeVersion: z.int().nullish(),
searchText: z.string().nullish(),
metadata: z.unknown().nullish(),
})
.meta({
id: 'DocumentUpsert',
example: {
content: 'the cat is yellow',
text: 'the cat is yellow',
contentType: 'text/plain',
source: 'test',
sourceId: 'test',