vovk 3.0.0-draft.216 → 3.0.0-draft.218
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/openapi/openAPIToVovkSchema.js +1 -1
- package/cjs/utils/createLLMFunctions.d.ts +1 -10
- package/cjs/utils/createLLMFunctions.js +1 -1
- package/mjs/openapi/openAPIToVovkSchema.js +1 -1
- package/mjs/utils/createLLMFunctions.d.ts +1 -10
- package/mjs/utils/createLLMFunctions.js +1 -1
- package/package.json +1 -1
|
@@ -136,7 +136,7 @@ function openAPIToVovkSchema({ apiRoot, source: { object: openAPIObject }, getMo
|
|
|
136
136
|
openapi: openAPIObject,
|
|
137
137
|
},
|
|
138
138
|
};
|
|
139
|
-
const segment = schema.segments[
|
|
139
|
+
const segment = schema.segments[EXTENSIONS_SEGMENT_NAME];
|
|
140
140
|
getModuleName = normalizeGetModuleName(getModuleName);
|
|
141
141
|
getMethodName = normalizeGetMethodName(getMethodName);
|
|
142
142
|
return Object.entries(openAPIObject.paths ?? {}).reduce((acc, [path, operations]) => {
|
|
@@ -13,16 +13,7 @@ type CallerInput = {
|
|
|
13
13
|
handlerName: string;
|
|
14
14
|
rpcModuleName: string;
|
|
15
15
|
};
|
|
16
|
-
declare function defaultCaller({ handler, body, query, params
|
|
17
|
-
handler: ((...args: KnownAny[]) => KnownAny) & {
|
|
18
|
-
fn?: (req: KnownAny) => KnownAny;
|
|
19
|
-
isRPC?: boolean;
|
|
20
|
-
};
|
|
21
|
-
body: KnownAny;
|
|
22
|
-
query: KnownAny;
|
|
23
|
-
params: KnownAny;
|
|
24
|
-
schema: VovkHandlerSchema;
|
|
25
|
-
}, _options: KnownAny): Promise<any>;
|
|
16
|
+
declare function defaultCaller({ handler, body, query, params }: CallerInput, _options: KnownAny): Promise<any>;
|
|
26
17
|
export declare function createLLMFunctions({ modules, caller, onExecute, onError, }: {
|
|
27
18
|
modules: Record<string, unknown>;
|
|
28
19
|
caller?: typeof defaultCaller;
|
|
@@ -62,7 +62,7 @@ const createLLMFunction = ({ rpcModuleName, handlerName, caller, modules, onExec
|
|
|
62
62
|
: {}),
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
async function defaultCaller({ handler, body, query, params
|
|
65
|
+
async function defaultCaller({ handler, body, query, params },
|
|
66
66
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
67
67
|
_options) {
|
|
68
68
|
if (handler.isRPC) {
|
|
@@ -136,7 +136,7 @@ function openAPIToVovkSchema({ apiRoot, source: { object: openAPIObject }, getMo
|
|
|
136
136
|
openapi: openAPIObject,
|
|
137
137
|
},
|
|
138
138
|
};
|
|
139
|
-
const segment = schema.segments[
|
|
139
|
+
const segment = schema.segments[EXTENSIONS_SEGMENT_NAME];
|
|
140
140
|
getModuleName = normalizeGetModuleName(getModuleName);
|
|
141
141
|
getMethodName = normalizeGetMethodName(getMethodName);
|
|
142
142
|
return Object.entries(openAPIObject.paths ?? {}).reduce((acc, [path, operations]) => {
|
|
@@ -13,16 +13,7 @@ type CallerInput = {
|
|
|
13
13
|
handlerName: string;
|
|
14
14
|
rpcModuleName: string;
|
|
15
15
|
};
|
|
16
|
-
declare function defaultCaller({ handler, body, query, params
|
|
17
|
-
handler: ((...args: KnownAny[]) => KnownAny) & {
|
|
18
|
-
fn?: (req: KnownAny) => KnownAny;
|
|
19
|
-
isRPC?: boolean;
|
|
20
|
-
};
|
|
21
|
-
body: KnownAny;
|
|
22
|
-
query: KnownAny;
|
|
23
|
-
params: KnownAny;
|
|
24
|
-
schema: VovkHandlerSchema;
|
|
25
|
-
}, _options: KnownAny): Promise<any>;
|
|
16
|
+
declare function defaultCaller({ handler, body, query, params }: CallerInput, _options: KnownAny): Promise<any>;
|
|
26
17
|
export declare function createLLMFunctions({ modules, caller, onExecute, onError, }: {
|
|
27
18
|
modules: Record<string, unknown>;
|
|
28
19
|
caller?: typeof defaultCaller;
|
|
@@ -62,7 +62,7 @@ const createLLMFunction = ({ rpcModuleName, handlerName, caller, modules, onExec
|
|
|
62
62
|
: {}),
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
async function defaultCaller({ handler, body, query, params
|
|
65
|
+
async function defaultCaller({ handler, body, query, params },
|
|
66
66
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
67
67
|
_options) {
|
|
68
68
|
if (handler.isRPC) {
|