@teamkeel/functions-runtime 0.222.1 → 0.222.3

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/dist/index.d.ts CHANGED
@@ -240,7 +240,7 @@ declare module '@teamkeel/functions-runtime/staticAnalysis/cli' {
240
240
 
241
241
  }
242
242
  declare module '@teamkeel/functions-runtime/types' {
243
- import { JSONRPCParams, JSONRPCRequest, JSONRPCResponse } from "json-rpc-2.0";
243
+ import { JSONRPCRequest, JSONRPCResponse } from "json-rpc-2.0";
244
244
  import { StringConstraint, BooleanConstraint, NumberConstraint, DateConstraint, EnumConstraint } from "@teamkeel/functions-runtime/constraints";
245
245
  import { Logger } from "@teamkeel/functions-runtime/index";
246
246
  import Query from "@teamkeel/functions-runtime/query";
@@ -271,9 +271,7 @@ declare module '@teamkeel/functions-runtime/types' {
271
271
  }
272
272
  export type CustomFunctionRequestPayload = JSONRPCRequest;
273
273
  export type CustomFunctionResponsePayload = JSONRPCResponse;
274
- export interface CustomFunction {
275
- call: (payload: JSONRPCParams, api: API) => Promise<any>;
276
- }
274
+ export type CustomFunction = (inputs: any, api: API) => Promise<any>;
277
275
  type API = {
278
276
  [apiName: string]: Query<BuiltInFields>;
279
277
  };
package/dist/index.js CHANGED
@@ -26165,7 +26165,7 @@ var Logger = class {
26165
26165
 
26166
26166
  // src/customFunctions/index.ts
26167
26167
  var import_json_rpc_2 = __toESM(require_dist16());
26168
- var handler = async ({ method: name, params, id }, config) => {
26168
+ var handler = async ({ method: name, params: inputs, id }, config) => {
26169
26169
  const { api, functions } = config;
26170
26170
  if (!(name in functions)) {
26171
26171
  return (0, import_json_rpc_2.createJSONRPCErrorResponse)(
@@ -26175,7 +26175,7 @@ var handler = async ({ method: name, params, id }, config) => {
26175
26175
  );
26176
26176
  }
26177
26177
  try {
26178
- const result = await functions[name].call(params, api);
26178
+ const result = await functions[name](inputs, api);
26179
26179
  if (!result) {
26180
26180
  return (0, import_json_rpc_2.createJSONRPCErrorResponse)(
26181
26181
  id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/functions-runtime",
3
- "version": "0.222.1",
3
+ "version": "0.222.3",
4
4
  "description": "Internal package used by @teamkeel/sdk",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {