vovk 3.0.0-draft.334 → 3.0.0-draft.339

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/cjs/VovkApp.js CHANGED
@@ -125,9 +125,9 @@ class VovkApp {
125
125
  const handlers = {};
126
126
  const headersList = await (0, headers_1.headers)();
127
127
  const xMeta = headersList.get('x-meta');
128
- const meta = xMeta && JSON.parse(xMeta);
129
- if (meta)
130
- (0, reqMeta_1.default)(req, { clientMetaHeader: meta });
128
+ const xMetaHeader = xMeta && JSON.parse(xMeta);
129
+ if (xMetaHeader)
130
+ (0, reqMeta_1.default)(req, { xMetaHeader });
131
131
  controllers.forEach((staticMethods, controller) => {
132
132
  const prefix = controller._prefix ?? '';
133
133
  Object.entries(staticMethods ?? {}).forEach(([path, staticMethod]) => {
@@ -21,6 +21,12 @@ function progressive(fn, ...args) {
21
21
  }
22
22
  }
23
23
  }
24
+ Object.keys(reg).forEach((key) => {
25
+ if (reg[key].isSettled)
26
+ return;
27
+ reg[key].isSettled = true;
28
+ reg[key].reject(new Error(`The connection was closed without sending a value for "${key}"`));
29
+ });
24
30
  return result;
25
31
  })
26
32
  .catch((error) => {
@@ -2,31 +2,31 @@ import type { NextRequest } from 'next/server';
2
2
  import { type KnownAny, type DecoratorOptions, type VovkRequest, type StaticClass } from './types';
3
3
  export declare function createVovkApp(): {
4
4
  get: {
5
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
5
+ (givenPath?: string | undefined, options?: DecoratorOptions | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
6
6
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
7
7
  };
8
8
  post: {
9
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
9
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
10
10
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
11
11
  };
12
12
  put: {
13
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
13
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
14
14
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
15
15
  };
16
16
  patch: {
17
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
17
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
18
18
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
19
19
  };
20
20
  del: {
21
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
21
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
22
22
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
23
23
  };
24
24
  head: {
25
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
25
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
26
26
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
27
27
  };
28
28
  options: {
29
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
29
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
30
30
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
31
31
  };
32
32
  prefix: (givenPath?: string) => (givenTarget: KnownAny) => any;
@@ -26,10 +26,17 @@ const assignSchema = ({ controller, propertyKey, path, options, httpMethod, vovk
26
26
  }
27
27
  const methods = vovkApp.routes[httpMethod].get(controller) ?? {};
28
28
  vovkApp.routes[httpMethod].set(controller, methods);
29
+ if (options?.cors) {
30
+ const optionsMethods = vovkApp.routes.OPTIONS.get(controller) ?? {};
31
+ optionsMethods[path] = (() => { });
32
+ optionsMethods[path]._options = options;
33
+ vovkApp.routes.OPTIONS.set(controller, optionsMethods);
34
+ }
29
35
  const originalMethod = controller[propertyKey];
30
36
  originalMethod._controller = controller;
31
37
  originalMethod._sourceMethod = originalMethod._sourceMethod ?? originalMethod;
32
38
  const schema = originalMethod._sourceMethod._getSchema?.(controller);
39
+ // TODO: Some of these assignments probably not needed anymore
33
40
  originalMethod.schema = schema;
34
41
  originalMethod.fn = originalMethod._sourceMethod?.fn;
35
42
  originalMethod.models = originalMethod._sourceMethod?.models;
@@ -55,7 +62,7 @@ const assignSchema = ({ controller, propertyKey, path, options, httpMethod, vovk
55
62
  };
56
63
  function createVovkApp() {
57
64
  const vovkApp = new VovkApp_1.VovkApp();
58
- const createHTTPDecorator = (httpMethod) => {
65
+ function createHTTPDecorator(httpMethod) {
59
66
  function decoratorCreator(givenPath = '', options) {
60
67
  const path = trimPath(givenPath);
61
68
  function decorator(givenTarget, propertyKey) {
@@ -86,7 +93,7 @@ function createVovkApp() {
86
93
  const enhancedDecoratorCreator = decoratorCreator;
87
94
  enhancedDecoratorCreator.auto = auto;
88
95
  return enhancedDecoratorCreator;
89
- };
96
+ }
90
97
  const prefix = (givenPath = '') => {
91
98
  const path = trimPath(givenPath);
92
99
  return (givenTarget) => {
package/cjs/index.d.ts CHANGED
@@ -13,25 +13,25 @@ import { createLLMTools } from './utils/createLLMTools';
13
13
  import { createCodeExamples } from './utils/createCodeExamples';
14
14
  export { type KnownAny, type VovkClient, type VovkClientFetcher, type VovkDefaultFetcherOptions, type VovkStreamAsyncIterable, type VovkValidateOnClient, type VovkSegmentSchema, type VovkErrorResponse, type VovkRequest, type VovkOutput, type VovkIteration, type VovkBody, type VovkQuery, type VovkParams, type VovkYieldType, type VovkReturnType, type VovkMetaSchema, type VovkControllerSchema, type VovkHandlerSchema, type VovkSchema, type VovkConfig, type VovkStrictConfig, type VovkValidationType, type VovkLLMTool, type VovkTypedMethod, VovkSchemaIdEnum, JSONLinesResponse, HttpException, HttpStatus, HttpMethod, createVovkApp, createDecorator, createRPC, fetcher, createFetcher, generateStaticAPI, withValidationLibrary, createStandardValidation, multitenant, createLLMTools, createCodeExamples, progressive, openapi, openAPIToVovkSchema, vovkSchemaToOpenAPI, };
15
15
  export declare const get: {
16
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
16
+ (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
17
17
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
18
18
  }, post: {
19
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
19
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
20
20
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
21
21
  }, put: {
22
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
22
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
23
23
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
24
24
  }, patch: {
25
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
25
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
26
26
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
27
27
  }, del: {
28
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
28
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
29
29
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
30
30
  }, head: {
31
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
31
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
32
32
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
33
33
  }, options: {
34
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
34
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
35
35
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
36
36
  }, prefix: (givenPath?: string) => (givenTarget: KnownAny) => any, initSegment: (options: {
37
37
  segmentName?: string;
package/cjs/types.d.ts CHANGED
@@ -240,7 +240,8 @@ export interface VovkLLMTool {
240
240
  type: 'function';
241
241
  }
242
242
  export type SimpleJSONSchema = {
243
- type: 'object';
243
+ type: string;
244
+ format?: string;
244
245
  $ref?: string;
245
246
  items?: SimpleJSONSchema;
246
247
  description?: string;
package/mjs/VovkApp.js CHANGED
@@ -125,9 +125,9 @@ class VovkApp {
125
125
  const handlers = {};
126
126
  const headersList = await (0, headers_1.headers)();
127
127
  const xMeta = headersList.get('x-meta');
128
- const meta = xMeta && JSON.parse(xMeta);
129
- if (meta)
130
- (0, reqMeta_1.default)(req, { clientMetaHeader: meta });
128
+ const xMetaHeader = xMeta && JSON.parse(xMeta);
129
+ if (xMetaHeader)
130
+ (0, reqMeta_1.default)(req, { xMetaHeader });
131
131
  controllers.forEach((staticMethods, controller) => {
132
132
  const prefix = controller._prefix ?? '';
133
133
  Object.entries(staticMethods ?? {}).forEach(([path, staticMethod]) => {
@@ -21,6 +21,12 @@ function progressive(fn, ...args) {
21
21
  }
22
22
  }
23
23
  }
24
+ Object.keys(reg).forEach((key) => {
25
+ if (reg[key].isSettled)
26
+ return;
27
+ reg[key].isSettled = true;
28
+ reg[key].reject(new Error(`The connection was closed without sending a value for "${key}"`));
29
+ });
24
30
  return result;
25
31
  })
26
32
  .catch((error) => {
@@ -2,31 +2,31 @@ import type { NextRequest } from 'next/server';
2
2
  import { type KnownAny, type DecoratorOptions, type VovkRequest, type StaticClass } from './types';
3
3
  export declare function createVovkApp(): {
4
4
  get: {
5
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
5
+ (givenPath?: string | undefined, options?: DecoratorOptions | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
6
6
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
7
7
  };
8
8
  post: {
9
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
9
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
10
10
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
11
11
  };
12
12
  put: {
13
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
13
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
14
14
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
15
15
  };
16
16
  patch: {
17
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
17
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
18
18
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
19
19
  };
20
20
  del: {
21
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
21
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
22
22
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
23
23
  };
24
24
  head: {
25
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
25
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
26
26
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
27
27
  };
28
28
  options: {
29
- (givenPath?: string | undefined, options?: DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
29
+ (givenPath?: string | undefined, options?: Omit<DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
30
30
  auto: (options?: DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
31
31
  };
32
32
  prefix: (givenPath?: string) => (givenTarget: KnownAny) => any;
@@ -26,10 +26,17 @@ const assignSchema = ({ controller, propertyKey, path, options, httpMethod, vovk
26
26
  }
27
27
  const methods = vovkApp.routes[httpMethod].get(controller) ?? {};
28
28
  vovkApp.routes[httpMethod].set(controller, methods);
29
+ if (options?.cors) {
30
+ const optionsMethods = vovkApp.routes.OPTIONS.get(controller) ?? {};
31
+ optionsMethods[path] = (() => { });
32
+ optionsMethods[path]._options = options;
33
+ vovkApp.routes.OPTIONS.set(controller, optionsMethods);
34
+ }
29
35
  const originalMethod = controller[propertyKey];
30
36
  originalMethod._controller = controller;
31
37
  originalMethod._sourceMethod = originalMethod._sourceMethod ?? originalMethod;
32
38
  const schema = originalMethod._sourceMethod._getSchema?.(controller);
39
+ // TODO: Some of these assignments probably not needed anymore
33
40
  originalMethod.schema = schema;
34
41
  originalMethod.fn = originalMethod._sourceMethod?.fn;
35
42
  originalMethod.models = originalMethod._sourceMethod?.models;
@@ -55,7 +62,7 @@ const assignSchema = ({ controller, propertyKey, path, options, httpMethod, vovk
55
62
  };
56
63
  function createVovkApp() {
57
64
  const vovkApp = new VovkApp_1.VovkApp();
58
- const createHTTPDecorator = (httpMethod) => {
65
+ function createHTTPDecorator(httpMethod) {
59
66
  function decoratorCreator(givenPath = '', options) {
60
67
  const path = trimPath(givenPath);
61
68
  function decorator(givenTarget, propertyKey) {
@@ -86,7 +93,7 @@ function createVovkApp() {
86
93
  const enhancedDecoratorCreator = decoratorCreator;
87
94
  enhancedDecoratorCreator.auto = auto;
88
95
  return enhancedDecoratorCreator;
89
- };
96
+ }
90
97
  const prefix = (givenPath = '') => {
91
98
  const path = trimPath(givenPath);
92
99
  return (givenTarget) => {
package/mjs/index.d.ts CHANGED
@@ -13,25 +13,25 @@ import { createLLMTools } from './utils/createLLMTools';
13
13
  import { createCodeExamples } from './utils/createCodeExamples';
14
14
  export { type KnownAny, type VovkClient, type VovkClientFetcher, type VovkDefaultFetcherOptions, type VovkStreamAsyncIterable, type VovkValidateOnClient, type VovkSegmentSchema, type VovkErrorResponse, type VovkRequest, type VovkOutput, type VovkIteration, type VovkBody, type VovkQuery, type VovkParams, type VovkYieldType, type VovkReturnType, type VovkMetaSchema, type VovkControllerSchema, type VovkHandlerSchema, type VovkSchema, type VovkConfig, type VovkStrictConfig, type VovkValidationType, type VovkLLMTool, type VovkTypedMethod, VovkSchemaIdEnum, JSONLinesResponse, HttpException, HttpStatus, HttpMethod, createVovkApp, createDecorator, createRPC, fetcher, createFetcher, generateStaticAPI, withValidationLibrary, createStandardValidation, multitenant, createLLMTools, createCodeExamples, progressive, openapi, openAPIToVovkSchema, vovkSchemaToOpenAPI, };
15
15
  export declare const get: {
16
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
16
+ (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
17
17
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
18
18
  }, post: {
19
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
19
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
20
20
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
21
21
  }, put: {
22
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
22
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
23
23
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
24
24
  }, patch: {
25
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
25
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
26
26
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
27
27
  }, del: {
28
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
28
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
29
29
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
30
30
  }, head: {
31
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
31
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
32
32
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
33
33
  }, options: {
34
- (givenPath?: string | undefined, options?: import("./types").DecoratorOptions | undefined): ReturnType<(givenPath?: string, options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void>;
34
+ (givenPath?: string | undefined, options?: Omit<import("./types").DecoratorOptions, "staticParams"> | undefined): (givenTarget: KnownAny, propertyKey: string) => void;
35
35
  auto: (options?: import("./types").DecoratorOptions) => (givenTarget: KnownAny, propertyKey: string) => void;
36
36
  }, prefix: (givenPath?: string) => (givenTarget: KnownAny) => any, initSegment: (options: {
37
37
  segmentName?: string;
package/mjs/types.d.ts CHANGED
@@ -240,7 +240,8 @@ export interface VovkLLMTool {
240
240
  type: 'function';
241
241
  }
242
242
  export type SimpleJSONSchema = {
243
- type: 'object';
243
+ type: string;
244
+ format?: string;
244
245
  $ref?: string;
245
246
  items?: SimpleJSONSchema;
246
247
  description?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.334",
3
+ "version": "3.0.0-draft.339",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",