@nuclia/sync-agent
Advanced tools
Comparing version 1.0.3 to 1.0.7
@@ -46,15 +46,9 @@ "use strict"; | ||
if (kb) { | ||
const { knowledgeBox, zone, backend, apiKey } = kb; | ||
const { knowledgeBox, backend } = kb; | ||
if (isDefined(knowledgeBox) && !knowledgeBox) { | ||
return ['Invalid format for kb: Error: knowledgeBox is required']; | ||
} | ||
if (isDefined(zone) && !zone) { | ||
return ['Invalid format for kb: Error: zone is required']; | ||
} | ||
if (isDefined(backend) && !backend) { | ||
return ['Invalid format for kb: Error: backend is required']; | ||
} | ||
if (isDefined(apiKey) && !apiKey) { | ||
return ['Invalid format for kb: Error: apiKey is required']; | ||
} | ||
} | ||
@@ -61,0 +55,0 @@ if (foldersToSync && foldersToSync.length > 0) { |
@@ -17,4 +17,6 @@ "use strict"; | ||
* | ||
* It is not defined when using a local NucliaDB | ||
* | ||
* Example: `europe-1` */ | ||
zone: zod_1.z.string().min(1, { message: 'Required' }), | ||
zone: zod_1.z.string().optional(), | ||
/** | ||
@@ -29,4 +31,5 @@ * The Nuclia Knowledge Box unique id. | ||
* It can be used in a server-side app, but never in a web app. | ||
* It is not defined when using a local NucliaDB | ||
*/ | ||
apiKey: zod_1.z.string().min(1, { message: 'Required' }), | ||
apiKey: zod_1.z.string().optional(), | ||
}); | ||
@@ -33,0 +36,0 @@ class SyncEntity { |
@@ -19,4 +19,6 @@ import { Observable } from 'rxjs'; | ||
* | ||
* It is not defined when using a local NucliaDB | ||
* | ||
* Example: `europe-1` */ | ||
zone: z.ZodString; | ||
zone: z.ZodOptional<z.ZodString>; | ||
/** | ||
@@ -31,14 +33,15 @@ * The Nuclia Knowledge Box unique id. | ||
* It can be used in a server-side app, but never in a web app. | ||
* It is not defined when using a local NucliaDB | ||
*/ | ||
apiKey: z.ZodString; | ||
apiKey: z.ZodOptional<z.ZodString>; | ||
}, "strip", z.ZodTypeAny, { | ||
backend: string; | ||
zone: string; | ||
knowledgeBox: string; | ||
apiKey: string; | ||
zone?: string | undefined; | ||
apiKey?: string | undefined; | ||
}, { | ||
backend: string; | ||
zone: string; | ||
knowledgeBox: string; | ||
apiKey: string; | ||
zone?: string | undefined; | ||
apiKey?: string | undefined; | ||
}>; | ||
@@ -45,0 +48,0 @@ export type NucliaOptions = z.infer<typeof NucliaOptionsValidator>; |
{ | ||
"name": "@nuclia/sync-agent", | ||
"version": "1.0.3", | ||
"version": "1.0.7", | ||
"description": "This is a sync agent to synchronize user files from diferent sources to nuclia", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
174746