@evoke-platform/context 1.4.0 → 1.4.1-testing.0

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.
@@ -1,7 +1,7 @@
1
1
  import { AxiosError, AxiosInstance, AxiosRequestConfig } from 'axios';
2
2
  import { AuthenticationContext } from '../authentication/AuthenticationContextProvider.js';
3
3
  import { Callback } from './callback.js';
4
- export type Data = Record<string, unknown> | FormData;
4
+ export type Data = Record<string, unknown> | FormData | File;
5
5
  export declare class ApiServices {
6
6
  private api;
7
7
  constructor(api: AxiosInstance, authContext?: AuthenticationContext);
@@ -67,7 +67,7 @@ export class ApiServices {
67
67
  }
68
68
  else {
69
69
  config = configOrCallback;
70
- if (typeof dataOrCallback === 'function') {
70
+ if (typeof dataOrCallback === 'function' && !(dataOrCallback instanceof File)) {
71
71
  cb = dataOrCallback;
72
72
  }
73
73
  else {
@@ -91,7 +91,7 @@ export class ApiServices {
91
91
  }
92
92
  else {
93
93
  config = configOrCallback;
94
- if (typeof dataOrCallback === 'function') {
94
+ if (typeof dataOrCallback === 'function' && !(dataOrCallback instanceof File)) {
95
95
  cb = dataOrCallback;
96
96
  }
97
97
  else {
@@ -115,7 +115,7 @@ export class ApiServices {
115
115
  }
116
116
  else {
117
117
  config = configOrCallback;
118
- if (typeof dataOrCallback === 'function') {
118
+ if (typeof dataOrCallback === 'function' && !(dataOrCallback instanceof File)) {
119
119
  cb = dataOrCallback;
120
120
  }
121
121
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/context",
3
- "version": "1.4.0",
3
+ "version": "1.4.1-testing.0",
4
4
  "description": "Utilities that provide context to Evoke platform widgets",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",