wjec-one 3.10.0 → 3.10.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wjec-one",
3
- "version": "3.10.0",
3
+ "version": "3.10.1",
4
4
  "description": "",
5
5
  "main": "legacy/index.js",
6
6
  "module": "index.js",
@@ -1,4 +1,4 @@
1
- import { callService } from 'services';
1
+ import { callService } from './';
2
2
  declare type ServiceCallParams = Parameters<typeof callService>[0];
3
3
  export declare type WheelhouseOptions = {
4
4
  refreshAfterConsecutiveFailures?: number;
@@ -16,7 +16,7 @@ export default class WheelhouseService {
16
16
  private _serviceIdentifier;
17
17
  private _wheelhouseUrl;
18
18
  constructor(wheelhouseEndpoint: string, service: string, options?: WheelhouseOptions);
19
- call(params?: Omit<ServiceCallParams, 'service'> & {
19
+ call<T = void>(params?: Omit<ServiceCallParams, 'service'> & {
20
20
  resource?: string;
21
21
  }): Promise<{
22
22
  body: {
@@ -27,16 +27,16 @@ export default class WheelhouseService {
27
27
  timestamp: string;
28
28
  };
29
29
  success: false;
30
- } | {
31
- body: void;
32
- status: number;
33
- success: true;
34
30
  } | {
35
31
  error: string;
36
32
  message: string;
37
33
  path: string;
38
34
  status: number;
39
35
  timestamp: string;
36
+ } | {
37
+ body: T;
38
+ status: number;
39
+ success: true;
40
40
  }>;
41
41
  private _fetchServiceInstances;
42
42
  private _isRefreshRequired;