timber-node 0.0.8 → 0.0.9

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,6 +1,8 @@
1
- import { AxiosInstance, AxiosResponse } from 'axios';
1
+ import { AxiosInstance, AxiosProgressEvent, AxiosResponse, CancelToken } from 'axios';
2
2
  export interface BankStatementData {
3
3
  file: File | string;
4
+ progressCallback?: (progressEvent: AxiosProgressEvent) => void;
5
+ cancelToken?: CancelToken;
4
6
  }
5
7
  export interface BankStatement extends BankStatementData {
6
8
  _id: string;
@@ -54,13 +54,14 @@ class BankStatementService {
54
54
  const formData = new form_data_1.default();
55
55
  if (data === null || data === void 0 ? void 0 : data.file) {
56
56
  formData.append('file', data.file);
57
- formData.append('company', '6777a90c5cd5d327209fa239');
58
57
  }
59
58
  else {
60
59
  throw new Error('File is required');
61
60
  }
62
61
  return await this.http.post('/customer/reconcile/bank-statement', formData, {
63
62
  headers: formData.getHeaders(),
63
+ cancelToken: data.cancelToken,
64
+ onUploadProgress: data.progressCallback,
64
65
  });
65
66
  }
66
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "timber-node",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Simplifying accounting and tax filing for businesses",
5
5
  "keywords": [
6
6
  "timber"