@soliantconsulting/fm-mock-server
Advanced tools
Comparing version 1.0.6 to 1.0.7
import { type Script } from "./script.js"; | ||
export declare class ScriptManager { | ||
private readonly scripts; | ||
addScript(name: string, script: Script): void; | ||
addScript<T>(name: string, script: Script<T>): void; | ||
} |
import type { RouterContext } from "koa-tree-router"; | ||
import type { PathItemObject, SchemaObject } from "openapi3-ts/oas31"; | ||
export type ScriptHandler = (parameter: unknown) => Promise<ScriptHandlerResult>; | ||
export type ScriptHandler<T> = (parameter: T) => Promise<ScriptHandlerResult>; | ||
export type ScriptDefinition = { | ||
@@ -9,4 +9,4 @@ description: string; | ||
}; | ||
export type Script = { | ||
handler: ScriptHandler; | ||
export type Script<T> = { | ||
handler: ScriptHandler<T>; | ||
definition: ScriptDefinition; | ||
@@ -24,3 +24,3 @@ schemaDependencies?: Record<string, SchemaObject>; | ||
}; | ||
export declare const scriptHandlerProxy: (scriptHandler: ScriptHandler) => (context: RouterContext) => Promise<void>; | ||
export declare const scriptHandlerProxy: (scriptHandler: ScriptHandler<unknown>) => (context: RouterContext) => Promise<void>; | ||
export declare const buildScriptPathItemObject: (definition: ScriptDefinition) => PathItemObject; |
{ | ||
"name": "@soliantconsulting/fm-mock-server", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Mock server for FileMaker OData script calls", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15709