@ryneex/api-client 1.1.0 → 1.1.1

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.
Files changed (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -61,10 +61,10 @@ function createClient(axios) {
61
61
  import "zod";
62
62
  async function callApi(opts, _data) {
63
63
  const data = {};
64
- if (typeof data !== "object")
64
+ if (typeof _data !== "object")
65
65
  throw new Error("API_CLIENT_INTERNAL_ERROR: Data must be an object");
66
- if (opts.inputSchema && "input" in data) {
67
- const parsedResult = opts.inputSchema.safeParse(data.input);
66
+ if (opts.inputSchema && "input" in _data) {
67
+ const parsedResult = opts.inputSchema.safeParse(_data.input);
68
68
  if (!parsedResult.success)
69
69
  return err(
70
70
  new ValidationError({
@@ -74,8 +74,8 @@ async function callApi(opts, _data) {
74
74
  );
75
75
  data.input = parsedResult.data;
76
76
  }
77
- if (opts.variablesSchema && "variables" in data) {
78
- const parsedResult = opts.variablesSchema.safeParse(data.variables);
77
+ if (opts.variablesSchema && "variables" in _data) {
78
+ const parsedResult = opts.variablesSchema.safeParse(_data.variables);
79
79
  if (!parsedResult.success)
80
80
  return err(
81
81
  new ValidationError({
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ryneex/api-client",
3
3
  "module": "src/index.ts",
4
4
  "type": "module",
5
- "version": "1.1.0",
5
+ "version": "1.1.1",
6
6
  "exports": {
7
7
  ".": "./index.js"
8
8
  },