washday-sdk 0.0.46 → 0.0.47

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.
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.updateCompanyById = void 0;
15
+ exports.updateCompanyTaxInfoById = exports.updateCompanyById = void 0;
16
16
  const axiosInstance_1 = __importDefault(require("../axiosInstance"));
17
17
  const GET_SET_COMPANIES = 'api/company';
18
18
  const updateCompanyById = function (companyId, data) {
@@ -31,3 +31,19 @@ const updateCompanyById = function (companyId, data) {
31
31
  });
32
32
  };
33
33
  exports.updateCompanyById = updateCompanyById;
34
+ const updateCompanyTaxInfoById = function (companyId, data) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ try {
37
+ const config = {
38
+ headers: { Authorization: `Bearer ${this.apiToken}` }
39
+ };
40
+ const response = yield axiosInstance_1.default.put(`${GET_SET_COMPANIES}/${companyId}/taxInfo`, data, config);
41
+ return response;
42
+ }
43
+ catch (error) {
44
+ console.error('Error fetching updateCompanyTaxInfoById:', error);
45
+ throw error;
46
+ }
47
+ });
48
+ };
49
+ exports.updateCompanyTaxInfoById = updateCompanyTaxInfoById;
package/dist/api/index.js CHANGED
@@ -40,6 +40,7 @@ WashdayClient.prototype.countries = {
40
40
  };
41
41
  WashdayClient.prototype.companies = {
42
42
  getCompanyById: get_1.getCompanyById,
43
- updateCompanyById: put_1.updateCompanyById
43
+ updateCompanyById: put_1.updateCompanyById,
44
+ updateCompanyTaxInfoById: put_1.updateCompanyTaxInfoById
44
45
  };
45
46
  exports.default = WashdayClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.46",
3
+ "version": "0.0.47",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -13,4 +13,17 @@ export const updateCompanyById = async function (this: WashdayClientInstance, co
13
13
  console.error('Error fetching updateCompanyById:', error);
14
14
  throw error;
15
15
  }
16
+ };
17
+
18
+ export const updateCompanyTaxInfoById = async function (this: WashdayClientInstance, companyId: string, data: any): Promise<any> {
19
+ try {
20
+ const config = {
21
+ headers: { Authorization: `Bearer ${this.apiToken}` }
22
+ };
23
+ const response = await axiosInstance.put(`${GET_SET_COMPANIES}/${companyId}/taxInfo`, data, config);
24
+ return response;
25
+ } catch (error) {
26
+ console.error('Error fetching updateCompanyTaxInfoById:', error);
27
+ throw error;
28
+ }
16
29
  };
package/src/api/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { WashdayClientInstance } from "../interfaces/Api";
2
2
  import { getCompanyById } from "./companies/get";
3
- import { updateCompanyById } from "./companies/put";
3
+ import { updateCompanyById, updateCompanyTaxInfoById } from "./companies/put";
4
4
  import { getCountries } from "./countries/get";
5
5
  import { getCustomerById, getCustomerHighlightsById } from "./customers/get";
6
6
  import { bulkUpdate } from "./products/put";
@@ -53,7 +53,9 @@ WashdayClient.prototype.countries = {
53
53
 
54
54
  WashdayClient.prototype.companies = {
55
55
  getCompanyById: getCompanyById,
56
- updateCompanyById: updateCompanyById
56
+ updateCompanyById: updateCompanyById,
57
+ updateCompanyTaxInfoById: updateCompanyTaxInfoById
58
+
57
59
  };
58
60
 
59
61
  export default WashdayClient;